From owner-svn-src-stable@freebsd.org Sun May 7 00:26:59 2017 Return-Path: Delivered-To: svn-src-stable@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 274D9D556E9; Sun, 7 May 2017 00:26:59 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CFF2F111E; Sun, 7 May 2017 00:26:58 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v470QvMI033936; Sun, 7 May 2017 00:26:57 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v470QvVU033931; Sun, 7 May 2017 00:26:57 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201705070026.v470QvVU033931@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 7 May 2017 00:26:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r317892 - in stable/11/sys/dev/ntb: . if_ntb X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 May 2017 00:26:59 -0000 Author: mav Date: Sun May 7 00:26:57 2017 New Revision: 317892 URL: https://svnweb.freebsd.org/changeset/base/317892 Log: MFC r317340: Report NTB link speed to console and interface. Modified: stable/11/sys/dev/ntb/if_ntb/if_ntb.c stable/11/sys/dev/ntb/ntb.c stable/11/sys/dev/ntb/ntb_if.m stable/11/sys/dev/ntb/ntb_transport.c stable/11/sys/dev/ntb/ntb_transport.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/ntb/if_ntb/if_ntb.c ============================================================================== --- stable/11/sys/dev/ntb/if_ntb/if_ntb.c Sat May 6 23:05:49 2017 (r317891) +++ stable/11/sys/dev/ntb/if_ntb/if_ntb.c Sun May 7 00:26:57 2017 (r317892) @@ -225,6 +225,7 @@ ntb_net_init(void *arg) if_t ifp = sc->ifp; if_setdrvflagbits(ifp, IFF_DRV_RUNNING, IFF_DRV_OACTIVE); + if_setbaudrate(ifp, ntb_transport_link_speed(sc->queues[0].qp)); if_link_state_change(ifp, ntb_transport_link_query(sc->queues[0].qp) ? LINK_STATE_UP : LINK_STATE_DOWN); } @@ -474,20 +475,10 @@ static void ntb_net_event_handler(void *data, enum ntb_link_event status) { struct ntb_net_queue *q = data; - int new_state; - switch (status) { - case NTB_LINK_DOWN: - new_state = LINK_STATE_DOWN; - break; - case NTB_LINK_UP: - new_state = LINK_STATE_UP; - break; - default: - new_state = LINK_STATE_UNKNOWN; - break; - } - if_link_state_change(q->ifp, new_state); + if_setbaudrate(q->ifp, ntb_transport_link_speed(q->qp)); + if_link_state_change(q->ifp, (status == NTB_LINK_UP) ? LINK_STATE_UP : + LINK_STATE_DOWN); } /* Helper functions */ Modified: stable/11/sys/dev/ntb/ntb.c ============================================================================== --- stable/11/sys/dev/ntb/ntb.c Sat May 6 23:05:49 2017 (r317891) +++ stable/11/sys/dev/ntb/ntb.c Sun May 7 00:26:57 2017 (r317892) @@ -168,7 +168,15 @@ ntb_link_event(device_t dev) struct ntb_child **cpp = device_get_softc(dev); struct ntb_child *nc; struct rm_priotracker ctx_tracker; + enum ntb_speed speed; + enum ntb_width width; + if (NTB_LINK_IS_UP(dev, &speed, &width)) { + device_printf(dev, "Link is up (PCIe %d.x / x%d)\n", + (int)speed, (int)width); + } else { + device_printf(dev, "Link is down\n"); + } for (nc = *cpp; nc != NULL; nc = nc->next) { rm_rlock(&nc->ctx_lock, &ctx_tracker); if (nc->ctx_ops != NULL && nc->ctx_ops->link_event != NULL) Modified: stable/11/sys/dev/ntb/ntb_if.m ============================================================================== --- stable/11/sys/dev/ntb/ntb_if.m Sat May 6 23:05:49 2017 (r317891) +++ stable/11/sys/dev/ntb/ntb_if.m Sun May 7 00:26:57 2017 (r317892) @@ -38,6 +38,7 @@ HEADER { NTB_SPEED_GEN1 = 1, NTB_SPEED_GEN2 = 2, NTB_SPEED_GEN3 = 3, + NTB_SPEED_GEN4 = 4, }; enum ntb_width { Modified: stable/11/sys/dev/ntb/ntb_transport.c ============================================================================== --- stable/11/sys/dev/ntb/ntb_transport.c Sat May 6 23:05:49 2017 (r317891) +++ stable/11/sys/dev/ntb/ntb_transport.c Sun May 7 00:26:57 2017 (r317892) @@ -202,6 +202,8 @@ struct ntb_transport_ctx { unsigned qp_count; uint64_t qp_bitmap; volatile bool link_is_up; + enum ntb_speed link_speed; + enum ntb_width link_width; struct callout link_work; struct callout link_watchdog; struct task link_cleanup; @@ -1024,7 +1026,7 @@ ntb_transport_event_callback(void *data) { struct ntb_transport_ctx *nt = data; - if (ntb_link_is_up(nt->dev, NULL, NULL)) { + if (ntb_link_is_up(nt->dev, &nt->link_speed, &nt->link_width)) { ntb_printf(1, "HW link up\n"); callout_reset(&nt->link_work, 0, ntb_transport_link_work, nt); } else { @@ -1105,7 +1107,7 @@ free_mws: for (i = 0; i < nt->mw_count; i++) ntb_free_mw(nt, i); out: - if (ntb_link_is_up(dev, NULL, NULL)) + if (ntb_link_is_up(dev, &nt->link_speed, &nt->link_width)) callout_reset(&nt->link_work, NTB_LINK_DOWN_TIMEOUT * hz / 1000, ntb_transport_link_work, nt); } @@ -1379,6 +1381,43 @@ ntb_transport_link_query(struct ntb_tran return (qp->link_is_up); } +/** + * ntb_transport_link_speed - Query transport link speed + * @qp: NTB transport layer queue to be queried + * + * Query connection speed to the remote system of the NTB transport queue + * + * RETURNS: link speed in bits per second + */ +uint64_t +ntb_transport_link_speed(struct ntb_transport_qp *qp) +{ + struct ntb_transport_ctx *nt = qp->transport; + uint64_t rate; + + if (!nt->link_is_up) + return (0); + switch (nt->link_speed) { + case NTB_SPEED_GEN1: + rate = 2500000000 * 8 / 10; + break; + case NTB_SPEED_GEN2: + rate = 5000000000 * 8 / 10; + break; + case NTB_SPEED_GEN3: + rate = 8000000000 * 128 / 130; + break; + case NTB_SPEED_GEN4: + rate = 16000000000 * 128 / 130; + break; + default: + return (0); + } + if (nt->link_width <= 0) + return (0); + return (rate * nt->link_width); +} + static void ntb_send_link_down(struct ntb_transport_qp *qp) { Modified: stable/11/sys/dev/ntb/ntb_transport.h ============================================================================== --- stable/11/sys/dev/ntb/ntb_transport.h Sat May 6 23:05:49 2017 (r317891) +++ stable/11/sys/dev/ntb/ntb_transport.h Sun May 7 00:26:57 2017 (r317892) @@ -58,4 +58,5 @@ void *ntb_transport_rx_remove(struct ntb void ntb_transport_link_up(struct ntb_transport_qp *qp); void ntb_transport_link_down(struct ntb_transport_qp *qp); bool ntb_transport_link_query(struct ntb_transport_qp *qp); +uint64_t ntb_transport_link_speed(struct ntb_transport_qp *qp); unsigned int ntb_transport_tx_free_entry(struct ntb_transport_qp *qp); From owner-svn-src-stable@freebsd.org Sun May 7 01:28:54 2017 Return-Path: Delivered-To: svn-src-stable@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 6986DD56A38; Sun, 7 May 2017 01:28:54 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 25ED21842; Sun, 7 May 2017 01:28:54 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v471SrZX058177; Sun, 7 May 2017 01:28:53 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v471Srh4058176; Sun, 7 May 2017 01:28:53 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201705070128.v471Srh4058176@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sun, 7 May 2017 01:28:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r317893 - stable/11/lib/libjail X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 May 2017 01:28:54 -0000 Author: pfg Date: Sun May 7 01:28:52 2017 New Revision: 317893 URL: https://svnweb.freebsd.org/changeset/base/317893 Log: MFC r317036: libjail: make allocation in jailparam_all() somewhat more robust. Unsign some variables involved in allocation as they will never be negative anyways. Provide some bounds checking through reallocarray(3). This is all very unlikely to have any visible effect. Reviewed by: jamie Modified: stable/11/lib/libjail/jail.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libjail/jail.c ============================================================================== --- stable/11/lib/libjail/jail.c Sun May 7 00:26:57 2017 (r317892) +++ stable/11/lib/libjail/jail.c Sun May 7 01:28:52 2017 (r317893) @@ -200,7 +200,7 @@ jailparam_all(struct jailparam **jpp) { struct jailparam *jp, *tjp; size_t mlen1, mlen2, buflen; - int njp, nlist; + unsigned njp, nlist; int mib1[CTL_MAXNAME], mib2[CTL_MAXNAME - 2]; char buf[MAXPATHLEN]; @@ -245,7 +245,7 @@ jailparam_all(struct jailparam **jpp) /* Add the parameter to the list */ if (njp >= nlist) { nlist *= 2; - tjp = realloc(jp, nlist * sizeof(*jp)); + tjp = reallocarray(jp, nlist, sizeof(*jp)); if (tjp == NULL) goto error; jp = tjp; @@ -254,7 +254,7 @@ jailparam_all(struct jailparam **jpp) goto error; mib1[1] = 2; } - jp = realloc(jp, njp * sizeof(*jp)); + jp = reallocarray(jp, njp, sizeof(*jp)); *jpp = jp; return (njp); From owner-svn-src-stable@freebsd.org Sun May 7 01:31:44 2017 Return-Path: Delivered-To: svn-src-stable@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 65DC5D56B58; Sun, 7 May 2017 01:31:44 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1FE34798; Sun, 7 May 2017 01:31:44 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v471VhHV060447; Sun, 7 May 2017 01:31:43 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v471Vg7J060440; Sun, 7 May 2017 01:31:42 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201705070131.v471Vg7J060440@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sun, 7 May 2017 01:31:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r317894 - stable/11/lib/libc/regex X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 May 2017 01:31:44 -0000 Author: pfg Date: Sun May 7 01:31:42 2017 New Revision: 317894 URL: https://svnweb.freebsd.org/changeset/base/317894 Log: MFC r317346: regex: unsign and constify some variables. Taking some hints from the regex variant in nvi(1) and higher-level compiler warnings, update some types in our regex(3) implementation. Joint work with: Kyle Evans Modified: stable/11/lib/libc/regex/cname.h stable/11/lib/libc/regex/regcomp.c stable/11/lib/libc/regex/regerror.c stable/11/lib/libc/regex/regex2.h stable/11/lib/libc/regex/regexec.c stable/11/lib/libc/regex/regfree.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/regex/cname.h ============================================================================== --- stable/11/lib/libc/regex/cname.h Sun May 7 01:28:52 2017 (r317893) +++ stable/11/lib/libc/regex/cname.h Sun May 7 01:31:42 2017 (r317894) @@ -36,7 +36,7 @@ /* character-name table */ static struct cname { - char *name; + const char *name; char code; } cnames[] = { {"NUL", '\0'}, Modified: stable/11/lib/libc/regex/regcomp.c ============================================================================== --- stable/11/lib/libc/regex/regcomp.c Sun May 7 01:28:52 2017 (r317893) +++ stable/11/lib/libc/regex/regcomp.c Sun May 7 01:31:42 2017 (r317894) @@ -66,8 +66,8 @@ __FBSDID("$FreeBSD$"); * other clumsinesses */ struct parse { - char *next; /* next character in RE */ - char *end; /* end of string (-> NUL normally) */ + const char *next; /* next character in RE */ + const char *end; /* end of string (-> NUL normally) */ int error; /* has an error been seen? */ sop *strip; /* malloced strip */ sopno ssize; /* malloced strip size (allocated) */ @@ -207,7 +207,7 @@ regcomp(regex_t * __restrict preg, return(REG_INVARG); len = preg->re_endp - pattern; } else - len = strlen((char *)pattern); + len = strlen(pattern); /* do the mallocs early so failure handling is easy */ g = (struct re_guts *)malloc(sizeof(struct re_guts)); @@ -239,7 +239,7 @@ regcomp(regex_t * __restrict preg, /* set things up */ p->g = g; - p->next = (char *)pattern; /* convenience; we do not modify it */ + p->next = pattern; /* convenience; we do not modify it */ p->end = p->next + len; p->error = 0; p->ncsalloc = 0; @@ -840,7 +840,7 @@ p_b_term(struct parse *p, cset *cs) static void p_b_cclass(struct parse *p, cset *cs) { - char *sp = p->next; + const char *sp = p->next; size_t len; wctype_t wct; char clname[16]; @@ -903,12 +903,11 @@ static wint_t /* value of collating el p_b_coll_elem(struct parse *p, wint_t endc) /* name ended by endc,']' */ { - char *sp = p->next; + const char *sp = p->next; struct cname *cp; - int len; mbstate_t mbs; wchar_t wc; - size_t clen; + size_t clen, len; while (MORE() && !SEETWO(endc, ']')) NEXT(); @@ -955,8 +954,8 @@ othercase(wint_t ch) static void bothcases(struct parse *p, wint_t ch) { - char *oldnext = p->next; - char *oldend = p->end; + const char *oldnext = p->next; + const char *oldend = p->end; char bracket[3 + MB_LEN_MAX]; size_t n; mbstate_t mbs; @@ -1009,8 +1008,8 @@ ordinary(struct parse *p, wint_t ch) static void nonnewline(struct parse *p) { - char *oldnext = p->next; - char *oldend = p->end; + const char *oldnext = p->next; + const char *oldend = p->end; char bracket[4]; p->next = bracket; Modified: stable/11/lib/libc/regex/regerror.c ============================================================================== --- stable/11/lib/libc/regex/regerror.c Sun May 7 01:28:52 2017 (r317893) +++ stable/11/lib/libc/regex/regerror.c Sun May 7 01:31:42 2017 (r317894) @@ -54,7 +54,7 @@ extern "C" { #endif /* === regerror.c === */ -static char *regatoi(const regex_t *preg, char *localbuf); +static const char *regatoi(const regex_t *preg, char *localbuf); #ifdef __cplusplus } @@ -83,8 +83,8 @@ static char *regatoi(const regex_t *preg */ static struct rerr { int code; - char *name; - char *explain; + const char *name; + const char *explain; } rerrs[] = { {REG_NOMATCH, "REG_NOMATCH", "regexec() failed to match"}, {REG_BADPAT, "REG_BADPAT", "invalid regular expression"}, @@ -120,7 +120,7 @@ regerror(int errcode, struct rerr *r; size_t len; int target = errcode &~ REG_ITOA; - char *s; + const char *s; char convbuf[50]; if (errcode == REG_ATOI) @@ -158,7 +158,7 @@ regerror(int errcode, - regatoi - internal routine to implement REG_ATOI == static char *regatoi(const regex_t *preg, char *localbuf); */ -static char * +static const char * regatoi(const regex_t *preg, char *localbuf) { struct rerr *r; Modified: stable/11/lib/libc/regex/regex2.h ============================================================================== --- stable/11/lib/libc/regex/regex2.h Sun May 7 01:28:52 2017 (r317893) +++ stable/11/lib/libc/regex/regex2.h Sun May 7 01:31:42 2017 (r317894) @@ -73,7 +73,7 @@ * immediately *preceding* "execution" of that operator. */ typedef unsigned long sop; /* strip operator */ -typedef long sopno; +typedef unsigned long sopno; #define OPRMASK 0xf8000000L #define OPDMASK 0x07ffffffL #define OPSHIFT ((unsigned)27) @@ -113,11 +113,11 @@ typedef struct { typedef struct { unsigned char bmp[NC / 8]; wctype_t *types; - int ntypes; + unsigned int ntypes; wint_t *wides; - int nwides; + unsigned int nwides; crange *ranges; - int nranges; + unsigned int nranges; int invert; int icase; } cset; @@ -125,7 +125,7 @@ typedef struct { static int CHIN1(cset *cs, wint_t ch) { - int i; + unsigned int i; assert(ch >= 0); if (ch < NC) @@ -165,7 +165,7 @@ struct re_guts { int magic; # define MAGIC2 ((('R'^0200)<<8)|'E') sop *strip; /* malloced area for strip */ - int ncsets; /* number of csets in use */ + unsigned int ncsets; /* number of csets in use */ cset *sets; /* -> cset [ncsets] */ int cflags; /* copy of regcomp() cflags argument */ sopno nstates; /* = number of sops */ Modified: stable/11/lib/libc/regex/regexec.c ============================================================================== --- stable/11/lib/libc/regex/regexec.c Sun May 7 01:28:52 2017 (r317893) +++ stable/11/lib/libc/regex/regexec.c Sun May 7 01:31:42 2017 (r317894) @@ -225,9 +225,9 @@ regexec(const regex_t * __restrict preg, eflags = GOODFLAGS(eflags); if (MB_CUR_MAX > 1) - return(mmatcher(g, (char *)string, nmatch, pmatch, eflags)); + return(mmatcher(g, string, nmatch, pmatch, eflags)); else if (g->nstates <= CHAR_BIT*sizeof(states1) && !(eflags®_LARGE)) - return(smatcher(g, (char *)string, nmatch, pmatch, eflags)); + return(smatcher(g, string, nmatch, pmatch, eflags)); else - return(lmatcher(g, (char *)string, nmatch, pmatch, eflags)); + return(lmatcher(g, string, nmatch, pmatch, eflags)); } Modified: stable/11/lib/libc/regex/regfree.c ============================================================================== --- stable/11/lib/libc/regex/regfree.c Sun May 7 01:28:52 2017 (r317893) +++ stable/11/lib/libc/regex/regfree.c Sun May 7 01:31:42 2017 (r317894) @@ -58,7 +58,7 @@ void regfree(regex_t *preg) { struct re_guts *g; - int i; + unsigned int i; if (preg->re_magic != MAGIC1) /* oops */ return; /* nice to complain, but hard */ From owner-svn-src-stable@freebsd.org Sun May 7 07:51:37 2017 Return-Path: Delivered-To: svn-src-stable@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 DB27FD62A25; Sun, 7 May 2017 07:51:37 +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 AB0C6D6A; Sun, 7 May 2017 07:51:37 +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 v477paq4016254; Sun, 7 May 2017 07:51:36 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v477paIX016253; Sun, 7 May 2017 07:51:36 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201705070751.v477paIX016253@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 7 May 2017 07:51:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r317895 - stable/11/lib/libc/gen X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 May 2017 07:51:38 -0000 Author: kib Date: Sun May 7 07:51:36 2017 New Revision: 317895 URL: https://svnweb.freebsd.org/changeset/base/317895 Log: MFC r317606: Style. Modified: stable/11/lib/libc/gen/sem_new.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/gen/sem_new.c ============================================================================== --- stable/11/lib/libc/gen/sem_new.c Sun May 7 01:31:42 2017 (r317894) +++ stable/11/lib/libc/gen/sem_new.c Sun May 7 07:51:36 2017 (r317895) @@ -77,24 +77,26 @@ struct sem_nameinfo { static pthread_once_t once = PTHREAD_ONCE_INIT; static pthread_mutex_t sem_llock; -static LIST_HEAD(,sem_nameinfo) sem_list = LIST_HEAD_INITIALIZER(sem_list); +static LIST_HEAD(, sem_nameinfo) sem_list = LIST_HEAD_INITIALIZER(sem_list); static void -sem_prefork() +sem_prefork(void) { _pthread_mutex_lock(&sem_llock); } static void -sem_postfork() +sem_postfork(void) { + _pthread_mutex_unlock(&sem_llock); } static void -sem_child_postfork() +sem_child_postfork(void) { + _pthread_mutex_unlock(&sem_llock); } @@ -116,10 +118,8 @@ sem_check_validity(sem_t *sem) if (sem->_magic == SEM_MAGIC) return (0); - else { - errno = EINVAL; - return (-1); - } + errno = EINVAL; + return (-1); } int @@ -142,13 +142,16 @@ sem_t * _sem_open(const char *name, int flags, ...) { char path[PATH_MAX]; - struct stat sb; va_list ap; - struct sem_nameinfo *ni = NULL; - sem_t *sem = NULL; - int fd = -1, mode, len, errsave; - int value = 0; + struct sem_nameinfo *ni; + sem_t *sem, tmp; + int errsave, fd, len, mode, value; + + ni = NULL; + sem = NULL; + fd = -1; + value = 0; if (name[0] != '/') { errno = EINVAL; @@ -213,8 +216,6 @@ _sem_open(const char *name, int flags, . goto error; } if (sb.st_size < sizeof(sem_t)) { - sem_t tmp; - tmp._magic = SEM_MAGIC; tmp._kern._count = value; tmp._kern._flags = USYNC_PROCESS_SHARED | SEM_NAMED; @@ -222,8 +223,8 @@ _sem_open(const char *name, int flags, . goto error; } flock(fd, LOCK_UN); - sem = (sem_t *)mmap(NULL, sizeof(sem_t), PROT_READ|PROT_WRITE, - MAP_SHARED|MAP_NOSYNC, fd, 0); + sem = mmap(NULL, sizeof(sem_t), PROT_READ | PROT_WRITE, + MAP_SHARED | MAP_NOSYNC, fd, 0); if (sem == MAP_FAILED) { sem = NULL; if (errno == ENOMEM) @@ -277,12 +278,11 @@ _sem_close(sem_t *sem) _pthread_mutex_unlock(&sem_llock); return (0); } - else - break; + break; } } - if (ni) { + if (ni != NULL) { LIST_REMOVE(ni, next); _pthread_mutex_unlock(&sem_llock); munmap(sem, sizeof(*sem)); @@ -342,7 +342,8 @@ _sem_getvalue(sem_t * __restrict sem, in static __inline int usem_wake(struct _usem2 *sem) { - return _umtx_op(sem, UMTX_OP_SEM2_WAKE, 0, NULL, NULL); + + return (_umtx_op(sem, UMTX_OP_SEM2_WAKE, 0, NULL, NULL)); } static __inline int @@ -436,6 +437,7 @@ int _sem_timedwait(sem_t * __restrict sem, const struct timespec * __restrict abstime) { + return (_sem_clockwait_np(sem, CLOCK_REALTIME, TIMER_ABSTIME, abstime, NULL)); }; @@ -443,7 +445,8 @@ _sem_timedwait(sem_t * __restrict sem, int _sem_wait(sem_t *sem) { - return _sem_timedwait(sem, NULL); + + return (_sem_timedwait(sem, NULL)); } /* From owner-svn-src-stable@freebsd.org Sun May 7 07:54:22 2017 Return-Path: Delivered-To: svn-src-stable@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 A3602D62C06; Sun, 7 May 2017 07:54:22 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7548718B0; Sun, 7 May 2017 07:54:22 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v477sLHW017391; Sun, 7 May 2017 07:54:21 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v477sLSI017390; Sun, 7 May 2017 07:54:21 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201705070754.v477sLSI017390@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 7 May 2017 07:54:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r317896 - stable/11/lib/libc/gen X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 May 2017 07:54:22 -0000 Author: kib Date: Sun May 7 07:54:21 2017 New Revision: 317896 URL: https://svnweb.freebsd.org/changeset/base/317896 Log: MFC r317610: Restructure normal (non-error) control flow in sem_close(). Modified: stable/11/lib/libc/gen/sem_new.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/gen/sem_new.c ============================================================================== --- stable/11/lib/libc/gen/sem_new.c Sun May 7 07:51:36 2017 (r317895) +++ stable/11/lib/libc/gen/sem_new.c Sun May 7 07:54:21 2017 (r317896) @@ -41,6 +41,7 @@ #include #include #include +#include #include #include #include @@ -260,6 +261,7 @@ int _sem_close(sem_t *sem) { struct sem_nameinfo *ni; + bool last; if (sem_check_validity(sem) != 0) return (-1); @@ -274,21 +276,17 @@ _sem_close(sem_t *sem) _pthread_mutex_lock(&sem_llock); LIST_FOREACH(ni, &sem_list, next) { if (sem == ni->sem) { - if (--ni->open_count > 0) { - _pthread_mutex_unlock(&sem_llock); - return (0); + last = --ni->open_count == 0; + if (last) + LIST_REMOVE(ni, next); + _pthread_mutex_unlock(&sem_llock); + if (last) { + munmap(sem, sizeof(*sem)); + free(ni); } - break; + return (0); } } - - if (ni != NULL) { - LIST_REMOVE(ni, next); - _pthread_mutex_unlock(&sem_llock); - munmap(sem, sizeof(*sem)); - free(ni); - return (0); - } _pthread_mutex_unlock(&sem_llock); errno = EINVAL; return (-1); From owner-svn-src-stable@freebsd.org Sun May 7 07:56:00 2017 Return-Path: Delivered-To: svn-src-stable@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 1F3DCD62C75; Sun, 7 May 2017 07:56:00 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C9E7FFD; Sun, 7 May 2017 07:55:59 +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 v477twMY017523; Sun, 7 May 2017 07:55:58 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v477twrQ017522; Sun, 7 May 2017 07:55:58 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201705070755.v477twrQ017522@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 7 May 2017 07:55:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r317897 - stable/11/lib/libc/gen X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 May 2017 07:56:00 -0000 Author: kib Date: Sun May 7 07:55:58 2017 New Revision: 317897 URL: https://svnweb.freebsd.org/changeset/base/317897 Log: MFC r317611: Make semaphore names list mutex non-recursive. Modified: stable/11/lib/libc/gen/sem_new.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/gen/sem_new.c ============================================================================== --- stable/11/lib/libc/gen/sem_new.c Sun May 7 07:54:21 2017 (r317896) +++ stable/11/lib/libc/gen/sem_new.c Sun May 7 07:55:58 2017 (r317897) @@ -104,12 +104,8 @@ sem_child_postfork(void) static void sem_module_init(void) { - pthread_mutexattr_t ma; - _pthread_mutexattr_init(&ma); - _pthread_mutexattr_settype(&ma, PTHREAD_MUTEX_RECURSIVE); - _pthread_mutex_init(&sem_llock, &ma); - _pthread_mutexattr_destroy(&ma); + _pthread_mutex_init(&sem_llock, NULL); _pthread_atfork(sem_prefork, sem_postfork, sem_child_postfork); } From owner-svn-src-stable@freebsd.org Sun May 7 08:00:35 2017 Return-Path: Delivered-To: svn-src-stable@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 83A20D62EF8; Sun, 7 May 2017 08:00:35 +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 3990314F0; Sun, 7 May 2017 08:00:35 +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 v4780YM2017771; Sun, 7 May 2017 08:00:34 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4780YNl017770; Sun, 7 May 2017 08:00:34 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201705070800.v4780YNl017770@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 7 May 2017 08:00: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: r317898 - 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@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 May 2017 08:00:35 -0000 Author: kib Date: Sun May 7 08:00:34 2017 New Revision: 317898 URL: https://svnweb.freebsd.org/changeset/base/317898 Log: MFC r317606: Style. Modified: stable/10/lib/libc/gen/sem_new.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/gen/sem_new.c ============================================================================== --- stable/10/lib/libc/gen/sem_new.c Sun May 7 07:55:58 2017 (r317897) +++ stable/10/lib/libc/gen/sem_new.c Sun May 7 08:00:34 2017 (r317898) @@ -74,24 +74,26 @@ struct sem_nameinfo { static pthread_once_t once = PTHREAD_ONCE_INIT; static pthread_mutex_t sem_llock; -static LIST_HEAD(,sem_nameinfo) sem_list = LIST_HEAD_INITIALIZER(sem_list); +static LIST_HEAD(, sem_nameinfo) sem_list = LIST_HEAD_INITIALIZER(sem_list); static void -sem_prefork() +sem_prefork(void) { _pthread_mutex_lock(&sem_llock); } static void -sem_postfork() +sem_postfork(void) { + _pthread_mutex_unlock(&sem_llock); } static void -sem_child_postfork() +sem_child_postfork(void) { + _pthread_mutex_unlock(&sem_llock); } @@ -113,10 +115,8 @@ sem_check_validity(sem_t *sem) if (sem->_magic == SEM_MAGIC) return (0); - else { - errno = EINVAL; - return (-1); - } + errno = EINVAL; + return (-1); } int @@ -140,13 +140,16 @@ sem_t * _sem_open(const char *name, int flags, ...) { char path[PATH_MAX]; - struct stat sb; va_list ap; - struct sem_nameinfo *ni = NULL; - sem_t *sem = NULL; - int fd = -1, mode, len, errsave; - int value = 0; + struct sem_nameinfo *ni; + sem_t *sem, tmp; + int errsave, fd, len, mode, value; + + ni = NULL; + sem = NULL; + fd = -1; + value = 0; if (name[0] != '/') { errno = EINVAL; @@ -211,8 +214,6 @@ _sem_open(const char *name, int flags, . goto error; } if (sb.st_size < sizeof(sem_t)) { - sem_t tmp; - tmp._magic = SEM_MAGIC; tmp._kern._has_waiters = 0; tmp._kern._count = value; @@ -221,8 +222,8 @@ _sem_open(const char *name, int flags, . goto error; } flock(fd, LOCK_UN); - sem = (sem_t *)mmap(NULL, sizeof(sem_t), PROT_READ|PROT_WRITE, - MAP_SHARED|MAP_NOSYNC, fd, 0); + sem = mmap(NULL, sizeof(sem_t), PROT_READ | PROT_WRITE, + MAP_SHARED | MAP_NOSYNC, fd, 0); if (sem == MAP_FAILED) { sem = NULL; if (errno == ENOMEM) @@ -276,12 +277,11 @@ _sem_close(sem_t *sem) _pthread_mutex_unlock(&sem_llock); return (0); } - else - break; + break; } } - if (ni) { + if (ni != NULL) { LIST_REMOVE(ni, next); _pthread_mutex_unlock(&sem_llock); munmap(sem, sizeof(*sem)); @@ -341,7 +341,8 @@ _sem_getvalue(sem_t * __restrict sem, in static __inline int usem_wake(struct _usem *sem) { - return _umtx_op(sem, UMTX_OP_SEM_WAKE, 0, NULL, NULL); + + return (_umtx_op(sem, UMTX_OP_SEM_WAKE, 0, NULL, NULL)); } static __inline int @@ -422,7 +423,8 @@ _sem_timedwait(sem_t * __restrict sem, int _sem_wait(sem_t *sem) { - return _sem_timedwait(sem, NULL); + + return (_sem_timedwait(sem, NULL)); } /* From owner-svn-src-stable@freebsd.org Sun May 7 08:01:31 2017 Return-Path: Delivered-To: svn-src-stable@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 0955AD62F7D; Sun, 7 May 2017 08:01: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 91D481906; Sun, 7 May 2017 08:01:30 +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 v4781TuH017856; Sun, 7 May 2017 08:01:29 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4781To1017855; Sun, 7 May 2017 08:01:29 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201705070801.v4781To1017855@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 7 May 2017 08:01:29 +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: r317899 - 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@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 May 2017 08:01:31 -0000 Author: kib Date: Sun May 7 08:01:29 2017 New Revision: 317899 URL: https://svnweb.freebsd.org/changeset/base/317899 Log: MFC r317610: Restructure normal (non-error) control flow in sem_close(). Modified: stable/10/lib/libc/gen/sem_new.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/gen/sem_new.c ============================================================================== --- stable/10/lib/libc/gen/sem_new.c Sun May 7 08:00:34 2017 (r317898) +++ stable/10/lib/libc/gen/sem_new.c Sun May 7 08:01:29 2017 (r317899) @@ -41,6 +41,7 @@ #include #include #include +#include #include #include #include @@ -259,6 +260,7 @@ int _sem_close(sem_t *sem) { struct sem_nameinfo *ni; + bool last; if (sem_check_validity(sem) != 0) return (-1); @@ -273,21 +275,17 @@ _sem_close(sem_t *sem) _pthread_mutex_lock(&sem_llock); LIST_FOREACH(ni, &sem_list, next) { if (sem == ni->sem) { - if (--ni->open_count > 0) { - _pthread_mutex_unlock(&sem_llock); - return (0); + last = --ni->open_count == 0; + if (last) + LIST_REMOVE(ni, next); + _pthread_mutex_unlock(&sem_llock); + if (last) { + munmap(sem, sizeof(*sem)); + free(ni); } - break; + return (0); } } - - if (ni != NULL) { - LIST_REMOVE(ni, next); - _pthread_mutex_unlock(&sem_llock); - munmap(sem, sizeof(*sem)); - free(ni); - return (0); - } _pthread_mutex_unlock(&sem_llock); errno = EINVAL; return (-1); From owner-svn-src-stable@freebsd.org Sun May 7 08:02:30 2017 Return-Path: Delivered-To: svn-src-stable@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 4C131D5F162; Sun, 7 May 2017 08:02:30 +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 124EA1E02; Sun, 7 May 2017 08:02:29 +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 v4782SvQ021618; Sun, 7 May 2017 08:02:28 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4782SFX021617; Sun, 7 May 2017 08:02:28 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201705070802.v4782SFX021617@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 7 May 2017 08:02: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: r317900 - 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@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 May 2017 08:02:30 -0000 Author: kib Date: Sun May 7 08:02:28 2017 New Revision: 317900 URL: https://svnweb.freebsd.org/changeset/base/317900 Log: MFC r317611: Make semaphore names list mutex non-recursive. Modified: stable/10/lib/libc/gen/sem_new.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/gen/sem_new.c ============================================================================== --- stable/10/lib/libc/gen/sem_new.c Sun May 7 08:01:29 2017 (r317899) +++ stable/10/lib/libc/gen/sem_new.c Sun May 7 08:02:28 2017 (r317900) @@ -101,12 +101,8 @@ sem_child_postfork(void) static void sem_module_init(void) { - pthread_mutexattr_t ma; - _pthread_mutexattr_init(&ma); - _pthread_mutexattr_settype(&ma, PTHREAD_MUTEX_RECURSIVE); - _pthread_mutex_init(&sem_llock, &ma); - _pthread_mutexattr_destroy(&ma); + _pthread_mutex_init(&sem_llock, NULL); _pthread_atfork(sem_prefork, sem_postfork, sem_child_postfork); } From owner-svn-src-stable@freebsd.org Sun May 7 11:10:00 2017 Return-Path: Delivered-To: svn-src-stable@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 A7A40D6240D; Sun, 7 May 2017 11:10:00 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 219C9118D; Sun, 7 May 2017 11:09:59 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v47B9xW1094923; Sun, 7 May 2017 11:09:59 GMT (envelope-from nyan@FreeBSD.org) Received: (from nyan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v47B9x6t094922; Sun, 7 May 2017 11:09:59 GMT (envelope-from nyan@FreeBSD.org) Message-Id: <201705071109.v47B9x6t094922@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: nyan set sender to nyan@FreeBSD.org using -f From: Takahashi Yoshihiro Date: Sun, 7 May 2017 11:09:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r317902 - stable/11/sys/dev/drm2/radeon X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 May 2017 11:10:00 -0000 Author: nyan Date: Sun May 7 11:09:58 2017 New Revision: 317902 URL: https://svnweb.freebsd.org/changeset/base/317902 Log: MFC: r317591 Add TUNABLE_INT to radeonkms driver parameters. They are required by PowerMac G5 DP. PR: 217852 Submitted by: Hiroo Ono Modified: stable/11/sys/dev/drm2/radeon/radeon_drv.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/drm2/radeon/radeon_drv.c ============================================================================== --- stable/11/sys/dev/drm2/radeon/radeon_drv.c Sun May 7 09:19:42 2017 (r317901) +++ stable/11/sys/dev/drm2/radeon/radeon_drv.c Sun May 7 11:09:58 2017 (r317902) @@ -127,54 +127,71 @@ int radeon_pcie_gen2 = -1; int radeon_msi = -1; int radeon_lockup_timeout = 10000; +TUNABLE_INT("drm.radeon.no_wb", &radeon_no_wb); MODULE_PARM_DESC(no_wb, "Disable AGP writeback for scratch registers"); module_param_named(no_wb, radeon_no_wb, int, 0444); +TUNABLE_INT("drm.radeon.modeset", &radeon_modeset); MODULE_PARM_DESC(modeset, "Disable/Enable modesetting"); module_param_named(modeset, radeon_modeset, int, 0400); +TUNABLE_INT("drm.radeon.dynclks", &radeon_dynclks); MODULE_PARM_DESC(dynclks, "Disable/Enable dynamic clocks"); module_param_named(dynclks, radeon_dynclks, int, 0444); +TUNABLE_INT("drm.radeon.r4xx_atom", &radeon_r4xx_atom); MODULE_PARM_DESC(r4xx_atom, "Enable ATOMBIOS modesetting for R4xx"); module_param_named(r4xx_atom, radeon_r4xx_atom, int, 0444); +TUNABLE_INT("drm.radeon.vramlimit", &radeon_vram_limit); MODULE_PARM_DESC(vramlimit, "Restrict VRAM for testing"); module_param_named(vramlimit, radeon_vram_limit, int, 0600); +TUNABLE_INT("drm.radeon.agpmode", &radeon_agpmode); MODULE_PARM_DESC(agpmode, "AGP Mode (-1 == PCI)"); module_param_named(agpmode, radeon_agpmode, int, 0444); +TUNABLE_INT("drm.radeon.gartsize", &radeon_gart_size); MODULE_PARM_DESC(gartsize, "Size of PCIE/IGP gart to setup in megabytes (32, 64, etc)"); module_param_named(gartsize, radeon_gart_size, int, 0600); +TUNABLE_INT("drm.radeon.benchmark", &radeon_benchmarking); MODULE_PARM_DESC(benchmark, "Run benchmark"); module_param_named(benchmark, radeon_benchmarking, int, 0444); +TUNABLE_INT("drm.radeon.test", &radeon_testing); MODULE_PARM_DESC(test, "Run tests"); module_param_named(test, radeon_testing, int, 0444); +TUNABLE_INT("drm.radeon.connector_table", &radeon_connector_table); MODULE_PARM_DESC(connector_table, "Force connector table"); module_param_named(connector_table, radeon_connector_table, int, 0444); +TUNABLE_INT("drm.radeon.tv", &radeon_tv); MODULE_PARM_DESC(tv, "TV enable (0 = disable)"); module_param_named(tv, radeon_tv, int, 0444); +TUNABLE_INT("drm.radeon.audio", &radeon_audio); MODULE_PARM_DESC(audio, "Audio enable (1 = enable)"); module_param_named(audio, radeon_audio, int, 0444); +TUNABLE_INT("drm.radeon.disp_priority", &radeon_disp_priority); MODULE_PARM_DESC(disp_priority, "Display Priority (0 = auto, 1 = normal, 2 = high)"); module_param_named(disp_priority, radeon_disp_priority, int, 0444); +TUNABLE_INT("drm.radeon.hw_i2c", &radeon_hw_i2c); MODULE_PARM_DESC(hw_i2c, "hw i2c engine enable (0 = disable)"); module_param_named(hw_i2c, radeon_hw_i2c, int, 0444); +TUNABLE_INT("drm.radeon.pcie_gen2", &radeon_pcie_gen2); MODULE_PARM_DESC(pcie_gen2, "PCIE Gen2 mode (-1 = auto, 0 = disable, 1 = enable)"); module_param_named(pcie_gen2, radeon_pcie_gen2, int, 0444); +TUNABLE_INT("drm.radeon.msi", &radeon_msi); MODULE_PARM_DESC(msi, "MSI support (1 = enable, 0 = disable, -1 = auto)"); module_param_named(msi, radeon_msi, int, 0444); +TUNABLE_INT("drm.radeon.lockup_timeout", &radeon_lockup_timeout); MODULE_PARM_DESC(lockup_timeout, "GPU lockup timeout in ms (defaul 10000 = 10 seconds, 0 = disable)"); module_param_named(lockup_timeout, radeon_lockup_timeout, int, 0444); From owner-svn-src-stable@freebsd.org Sun May 7 11:11:52 2017 Return-Path: Delivered-To: svn-src-stable@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 A81C8D625D6; Sun, 7 May 2017 11:11:52 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 51BC71BCC; Sun, 7 May 2017 11:11:52 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v47BBpj4097182; Sun, 7 May 2017 11:11:51 GMT (envelope-from nyan@FreeBSD.org) Received: (from nyan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v47BBpjT097181; Sun, 7 May 2017 11:11:51 GMT (envelope-from nyan@FreeBSD.org) Message-Id: <201705071111.v47BBpjT097181@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: nyan set sender to nyan@FreeBSD.org using -f From: Takahashi Yoshihiro Date: Sun, 7 May 2017 11:11: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: r317903 - stable/10/sys/dev/drm2/radeon 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@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 May 2017 11:11:52 -0000 Author: nyan Date: Sun May 7 11:11:51 2017 New Revision: 317903 URL: https://svnweb.freebsd.org/changeset/base/317903 Log: MFC: r317591 Add TUNABLE_INT to radeonkms driver parameters. They are required by PowerMac G5 DP. PR: 217852 Submitted by: Hiroo Ono Modified: stable/10/sys/dev/drm2/radeon/radeon_drv.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/drm2/radeon/radeon_drv.c ============================================================================== --- stable/10/sys/dev/drm2/radeon/radeon_drv.c Sun May 7 11:09:58 2017 (r317902) +++ stable/10/sys/dev/drm2/radeon/radeon_drv.c Sun May 7 11:11:51 2017 (r317903) @@ -127,54 +127,71 @@ int radeon_pcie_gen2 = -1; int radeon_msi = -1; int radeon_lockup_timeout = 10000; +TUNABLE_INT("drm.radeon.no_wb", &radeon_no_wb); MODULE_PARM_DESC(no_wb, "Disable AGP writeback for scratch registers"); module_param_named(no_wb, radeon_no_wb, int, 0444); +TUNABLE_INT("drm.radeon.modeset", &radeon_modeset); MODULE_PARM_DESC(modeset, "Disable/Enable modesetting"); module_param_named(modeset, radeon_modeset, int, 0400); +TUNABLE_INT("drm.radeon.dynclks", &radeon_dynclks); MODULE_PARM_DESC(dynclks, "Disable/Enable dynamic clocks"); module_param_named(dynclks, radeon_dynclks, int, 0444); +TUNABLE_INT("drm.radeon.r4xx_atom", &radeon_r4xx_atom); MODULE_PARM_DESC(r4xx_atom, "Enable ATOMBIOS modesetting for R4xx"); module_param_named(r4xx_atom, radeon_r4xx_atom, int, 0444); +TUNABLE_INT("drm.radeon.vramlimit", &radeon_vram_limit); MODULE_PARM_DESC(vramlimit, "Restrict VRAM for testing"); module_param_named(vramlimit, radeon_vram_limit, int, 0600); +TUNABLE_INT("drm.radeon.agpmode", &radeon_agpmode); MODULE_PARM_DESC(agpmode, "AGP Mode (-1 == PCI)"); module_param_named(agpmode, radeon_agpmode, int, 0444); +TUNABLE_INT("drm.radeon.gartsize", &radeon_gart_size); MODULE_PARM_DESC(gartsize, "Size of PCIE/IGP gart to setup in megabytes (32, 64, etc)"); module_param_named(gartsize, radeon_gart_size, int, 0600); +TUNABLE_INT("drm.radeon.benchmark", &radeon_benchmarking); MODULE_PARM_DESC(benchmark, "Run benchmark"); module_param_named(benchmark, radeon_benchmarking, int, 0444); +TUNABLE_INT("drm.radeon.test", &radeon_testing); MODULE_PARM_DESC(test, "Run tests"); module_param_named(test, radeon_testing, int, 0444); +TUNABLE_INT("drm.radeon.connector_table", &radeon_connector_table); MODULE_PARM_DESC(connector_table, "Force connector table"); module_param_named(connector_table, radeon_connector_table, int, 0444); +TUNABLE_INT("drm.radeon.tv", &radeon_tv); MODULE_PARM_DESC(tv, "TV enable (0 = disable)"); module_param_named(tv, radeon_tv, int, 0444); +TUNABLE_INT("drm.radeon.audio", &radeon_audio); MODULE_PARM_DESC(audio, "Audio enable (1 = enable)"); module_param_named(audio, radeon_audio, int, 0444); +TUNABLE_INT("drm.radeon.disp_priority", &radeon_disp_priority); MODULE_PARM_DESC(disp_priority, "Display Priority (0 = auto, 1 = normal, 2 = high)"); module_param_named(disp_priority, radeon_disp_priority, int, 0444); +TUNABLE_INT("drm.radeon.hw_i2c", &radeon_hw_i2c); MODULE_PARM_DESC(hw_i2c, "hw i2c engine enable (0 = disable)"); module_param_named(hw_i2c, radeon_hw_i2c, int, 0444); +TUNABLE_INT("drm.radeon.pcie_gen2", &radeon_pcie_gen2); MODULE_PARM_DESC(pcie_gen2, "PCIE Gen2 mode (-1 = auto, 0 = disable, 1 = enable)"); module_param_named(pcie_gen2, radeon_pcie_gen2, int, 0444); +TUNABLE_INT("drm.radeon.msi", &radeon_msi); MODULE_PARM_DESC(msi, "MSI support (1 = enable, 0 = disable, -1 = auto)"); module_param_named(msi, radeon_msi, int, 0444); +TUNABLE_INT("drm.radeon.lockup_timeout", &radeon_lockup_timeout); MODULE_PARM_DESC(lockup_timeout, "GPU lockup timeout in ms (defaul 10000 = 10 seconds, 0 = disable)"); module_param_named(lockup_timeout, radeon_lockup_timeout, int, 0444); From owner-svn-src-stable@freebsd.org Sun May 7 19:47:51 2017 Return-Path: Delivered-To: svn-src-stable@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 B5F59D62068; Sun, 7 May 2017 19:47:51 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 53F0BC66; Sun, 7 May 2017 19:47:51 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v47JloFG009189; Sun, 7 May 2017 19:47:50 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v47JlomB009188; Sun, 7 May 2017 19:47:50 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201705071947.v47JlomB009188@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Sun, 7 May 2017 19:47:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r317911 - stable/11/sys/fs/nfsserver X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 May 2017 19:47:51 -0000 Author: rmacklem Date: Sun May 7 19:47:50 2017 New Revision: 317911 URL: https://svnweb.freebsd.org/changeset/base/317911 Log: MFC: r317236 Fix the setting of atime for Linux client NFSv4 mounts. The FreeBSD NFSv4 server did not set the attribute bit for TimeAccess in the reply to an Open with exclusive_create, as required by the RFCs. (This is required since the FreeBSD NFS server stores the create_verifier in the va_atime attribute.) As such, the Linux NFSv4 client did not set the TimeAccess (atime) in the Setattr done in an RPC after the one with the Open/exclusive_create. This patch fixes the server to set the TimeAccess bit in the reply. I believe that storing the create_verifier in an extended attribute for file systems that support extended attributes might be a good idea, but I will wait for a discussion of this on the freebsd-fs@ email list before considering committing a patch to do this. Modified: stable/11/sys/fs/nfsserver/nfs_nfsdport.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/fs/nfsserver/nfs_nfsdport.c ============================================================================== --- stable/11/sys/fs/nfsserver/nfs_nfsdport.c Sun May 7 19:01:08 2017 (r317910) +++ stable/11/sys/fs/nfsserver/nfs_nfsdport.c Sun May 7 19:47:50 2017 (r317911) @@ -1436,7 +1436,9 @@ nfsvno_open(struct nfsrv_descript *nd, s vput(ndp->ni_vp); ndp->ni_vp = NULL; nd->nd_repstat = NFSERR_NOTSUPP; - } + } else + NFSSETBIT_ATTRBIT(attrbitp, + NFSATTRBIT_TIMEACCESS); } else { nfsrv_fixattr(nd, ndp->ni_vp, nvap, aclp, p, attrbitp, exp); From owner-svn-src-stable@freebsd.org Sun May 7 19:57:46 2017 Return-Path: Delivered-To: svn-src-stable@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 9CD10D6244D; Sun, 7 May 2017 19:57:46 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 462DFA28; Sun, 7 May 2017 19:57:46 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v47Jvj9V013308; Sun, 7 May 2017 19:57:45 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v47JvjTl013307; Sun, 7 May 2017 19:57:45 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201705071957.v47JvjTl013307@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Sun, 7 May 2017 19:57: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: r317914 - stable/10/sys/fs/nfsserver 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@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 May 2017 19:57:46 -0000 Author: rmacklem Date: Sun May 7 19:57:45 2017 New Revision: 317914 URL: https://svnweb.freebsd.org/changeset/base/317914 Log: MFC: r317236 Fix the setting of atime for Linux client NFSv4 mounts. The FreeBSD NFSv4 server did not set the attribute bit for TimeAccess in the reply to an Open with exclusive_create, as required by the RFCs. (This is required since the FreeBSD NFS server stores the create_verifier in the va_atime attribute.) As such, the Linux NFSv4 client did not set the TimeAccess (atime) in the Setattr done in an RPC after the one with the Open/exclusive_create. This patch fixes the server to set the TimeAccess bit in the reply. I believe that storing the create_verifier in an extended attribute for file systems that support extended attributes might be a good idea, but I will wait for a discussion of this on the freebsd-fs@ email list before considering committing a patch to do this. Modified: stable/10/sys/fs/nfsserver/nfs_nfsdport.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/nfsserver/nfs_nfsdport.c ============================================================================== --- stable/10/sys/fs/nfsserver/nfs_nfsdport.c Sun May 7 19:52:56 2017 (r317913) +++ stable/10/sys/fs/nfsserver/nfs_nfsdport.c Sun May 7 19:57:45 2017 (r317914) @@ -1431,7 +1431,9 @@ nfsvno_open(struct nfsrv_descript *nd, s vput(ndp->ni_vp); ndp->ni_vp = NULL; nd->nd_repstat = NFSERR_NOTSUPP; - } + } else + NFSSETBIT_ATTRBIT(attrbitp, + NFSATTRBIT_TIMEACCESS); } else { nfsrv_fixattr(nd, ndp->ni_vp, nvap, aclp, p, attrbitp, exp); From owner-svn-src-stable@freebsd.org Sun May 7 20:11:59 2017 Return-Path: Delivered-To: svn-src-stable@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 E8018D62A2C; Sun, 7 May 2017 20:11:59 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9255AC91; Sun, 7 May 2017 20:11:59 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v47KBwQK021349; Sun, 7 May 2017 20:11:58 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v47KBw4D021347; Sun, 7 May 2017 20:11:58 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201705072011.v47KBw4D021347@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Sun, 7 May 2017 20:11:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r317916 - in stable/11/sys: fs/nfs sys X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 May 2017 20:12:00 -0000 Author: rmacklem Date: Sun May 7 20:11:58 2017 New Revision: 317916 URL: https://svnweb.freebsd.org/changeset/base/317916 Log: MFC: r317269 Set default uid/gid to nobody/nogroup for NFSv4 mapping. The default uid/gid for NFSv4 are set by the nfsuserd(8) daemon. However, they were 0 until the nfsuserd(8) was run. Since it is possible to use NFSv4 without running the nfsuserd(8) daemon, set them to nobody/nogroup initially. Without this patch, the values would be set by the nfsuserd(8) daemon and left changed even if the nfsuserd(8) daemon was killed. The default values of 0 meant that setting a group to "wheel" would fail even when done by root. It also adds a definition of GID_NOGROUP to sys/conf.h. Modified: stable/11/sys/fs/nfs/nfs_commonsubs.c stable/11/sys/sys/conf.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/fs/nfs/nfs_commonsubs.c ============================================================================== --- stable/11/sys/fs/nfs/nfs_commonsubs.c Sun May 7 19:59:37 2017 (r317915) +++ stable/11/sys/fs/nfs/nfs_commonsubs.c Sun May 7 20:11:58 2017 (r317916) @@ -63,8 +63,8 @@ int nfsrv_useacl = 1; struct nfssockreq nfsrv_nfsuserdsock; int nfsrv_nfsuserd = 0; struct nfsreqhead nfsd_reqq; -uid_t nfsrv_defaultuid; -gid_t nfsrv_defaultgid; +uid_t nfsrv_defaultuid = UID_NOBODY; +gid_t nfsrv_defaultgid = GID_NOGROUP; int nfsrv_lease = NFSRV_LEASE; int ncl_mbuf_mlen = MLEN; int nfsd_enable_stringtouid = 0; Modified: stable/11/sys/sys/conf.h ============================================================================== --- stable/11/sys/sys/conf.h Sun May 7 19:59:37 2017 (r317915) +++ stable/11/sys/sys/conf.h Sun May 7 20:11:58 2017 (r317916) @@ -315,6 +315,7 @@ void devfs_free_cdp_inode(ino_t ino); #define GID_GAMES 13 #define GID_VIDEO 44 #define GID_DIALER 68 +#define GID_NOGROUP 65533 #define GID_NOBODY 65534 typedef void (*dev_clone_fn)(void *arg, struct ucred *cred, char *name, From owner-svn-src-stable@freebsd.org Sun May 7 20:22:01 2017 Return-Path: Delivered-To: svn-src-stable@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 3783DD62E41; Sun, 7 May 2017 20:22:01 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C0C2818EB; Sun, 7 May 2017 20:22:00 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v47KLx5m024136; Sun, 7 May 2017 20:21:59 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v47KLxXm024134; Sun, 7 May 2017 20:21:59 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201705072021.v47KLxXm024134@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Sun, 7 May 2017 20:21: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: r317917 - in stable/10/sys: fs/nfs sys 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@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 May 2017 20:22:01 -0000 Author: rmacklem Date: Sun May 7 20:21:59 2017 New Revision: 317917 URL: https://svnweb.freebsd.org/changeset/base/317917 Log: MFC: r317269 Set default uid/gid to nobody/nogroup for NFSv4 mapping. The default uid/gid for NFSv4 are set by the nfsuserd(8) daemon. However, they were 0 until the nfsuserd(8) was run. Since it is possible to use NFSv4 without running the nfsuserd(8) daemon, set them to nobody/nogroup initially. Without this patch, the values would be set by the nfsuserd(8) daemon and left changed even if the nfsuserd(8) daemon was killed. The default values of 0 meant that setting a group to "wheel" would fail even when done by root. It also adds a definition of GID_NOGROUP to sys/conf.h. Modified: stable/10/sys/fs/nfs/nfs_commonsubs.c stable/10/sys/sys/conf.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/nfs/nfs_commonsubs.c ============================================================================== --- stable/10/sys/fs/nfs/nfs_commonsubs.c Sun May 7 20:11:58 2017 (r317916) +++ stable/10/sys/fs/nfs/nfs_commonsubs.c Sun May 7 20:21:59 2017 (r317917) @@ -63,8 +63,8 @@ int nfsrv_useacl = 1; struct nfssockreq nfsrv_nfsuserdsock; int nfsrv_nfsuserd = 0; struct nfsreqhead nfsd_reqq; -uid_t nfsrv_defaultuid; -gid_t nfsrv_defaultgid; +uid_t nfsrv_defaultuid = UID_NOBODY; +gid_t nfsrv_defaultgid = GID_NOGROUP; int nfsrv_lease = NFSRV_LEASE; int ncl_mbuf_mlen = MLEN; int nfsd_enable_stringtouid = 0; Modified: stable/10/sys/sys/conf.h ============================================================================== --- stable/10/sys/sys/conf.h Sun May 7 20:11:58 2017 (r317916) +++ stable/10/sys/sys/conf.h Sun May 7 20:21:59 2017 (r317917) @@ -335,6 +335,7 @@ void devfs_free_cdp_inode(ino_t ino); #define GID_BIN 7 #define GID_GAMES 13 #define GID_DIALER 68 +#define GID_NOGROUP 65533 #define GID_NOBODY 65534 typedef void (*dev_clone_fn)(void *arg, struct ucred *cred, char *name, From owner-svn-src-stable@freebsd.org Sun May 7 20:32:09 2017 Return-Path: Delivered-To: svn-src-stable@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 1A314D5326C; Sun, 7 May 2017 20:32:09 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BD9C03DB; Sun, 7 May 2017 20:32:08 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v47KW7oY029601; Sun, 7 May 2017 20:32:07 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v47KW75P029600; Sun, 7 May 2017 20:32:07 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201705072032.v47KW75P029600@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Sun, 7 May 2017 20:32:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r317918 - stable/9/sys/fs/nfsserver X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 May 2017 20:32:09 -0000 Author: rmacklem Date: Sun May 7 20:32:07 2017 New Revision: 317918 URL: https://svnweb.freebsd.org/changeset/base/317918 Log: MFC: r317236 Fix the setting of atime for Linux client NFSv4 mounts. The FreeBSD NFSv4 server did not set the attribute bit for TimeAccess in the reply to an Open with exclusive_create, as required by the RFCs. (This is required since the FreeBSD NFS server stores the create_verifier in the va_atime attribute.) As such, the Linux NFSv4 client did not set the TimeAccess (atime) in the Setattr done in an RPC after the one with the Open/exclusive_create. This patch fixes the server to set the TimeAccess bit in the reply. I believe that storing the create_verifier in an extended attribute for file systems that support extended attributes might be a good idea, but I will wait for a discussion of this on the freebsd-fs@ email list before considering committing a patch to do this. Modified: stable/9/sys/fs/nfsserver/nfs_nfsdport.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/fs/ (props changed) Modified: stable/9/sys/fs/nfsserver/nfs_nfsdport.c ============================================================================== --- stable/9/sys/fs/nfsserver/nfs_nfsdport.c Sun May 7 20:21:59 2017 (r317917) +++ stable/9/sys/fs/nfsserver/nfs_nfsdport.c Sun May 7 20:32:07 2017 (r317918) @@ -1422,7 +1422,9 @@ nfsvno_open(struct nfsrv_descript *nd, s vput(ndp->ni_vp); ndp->ni_vp = NULL; nd->nd_repstat = NFSERR_NOTSUPP; - } + } else + NFSSETBIT_ATTRBIT(attrbitp, + NFSATTRBIT_TIMEACCESS); } else { nfsrv_fixattr(nd, ndp->ni_vp, nvap, aclp, p, attrbitp, exp); From owner-svn-src-stable@freebsd.org Sun May 7 20:42:03 2017 Return-Path: Delivered-To: svn-src-stable@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 78210D536CC; Sun, 7 May 2017 20:42:03 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 32EF112DA; Sun, 7 May 2017 20:42:03 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v47Kg2eN031751; Sun, 7 May 2017 20:42:02 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v47Kg2AT031750; Sun, 7 May 2017 20:42:02 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201705072042.v47Kg2AT031750@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Sun, 7 May 2017 20:42:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r317919 - stable/11/usr.sbin/nfsuserd X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 May 2017 20:42:03 -0000 Author: rmacklem Date: Sun May 7 20:42:01 2017 New Revision: 317919 URL: https://svnweb.freebsd.org/changeset/base/317919 Log: MFC: r317350 Fix the default uid/gid values in nfsuserd.c This patch sets the default uid/gid values for "nobody" and "nogroup" to the values in the password and group databases. Normally nfsuserd(8) will override these with whatever is in the password/group databases, so these values are only used when the databases entries aren't available. It would be nice to use the definitions in sys/conf.h, but those are in the _KERNEL section of the file. Modified: stable/11/usr.sbin/nfsuserd/nfsuserd.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/nfsuserd/nfsuserd.c ============================================================================== --- stable/11/usr.sbin/nfsuserd/nfsuserd.c Sun May 7 20:32:07 2017 (r317918) +++ stable/11/usr.sbin/nfsuserd/nfsuserd.c Sun May 7 20:42:01 2017 (r317919) @@ -88,9 +88,9 @@ struct info { u_char *dnsname = "default.domain"; u_char *defaultuser = "nobody"; -uid_t defaultuid = (uid_t)32767; +uid_t defaultuid = 65534; u_char *defaultgroup = "nogroup"; -gid_t defaultgid = (gid_t)32767; +gid_t defaultgid = 65533; int verbose = 0, im_a_slave = 0, nfsuserdcnt = -1, forcestart = 0; int defusertimeout = DEFUSERTIMEOUT, manage_gids = 0; pid_t slaves[MAXNFSUSERD]; From owner-svn-src-stable@freebsd.org Sun May 7 20:50:34 2017 Return-Path: Delivered-To: svn-src-stable@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 5A513D53815; Sun, 7 May 2017 20:50:34 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E98EC13C6; Sun, 7 May 2017 20:50:33 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v47KoWg8034401; Sun, 7 May 2017 20:50:32 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v47KoWNW034400; Sun, 7 May 2017 20:50:32 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201705072050.v47KoWNW034400@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Sun, 7 May 2017 20:50:32 +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: r317920 - stable/10/usr.sbin/nfsuserd 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@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 May 2017 20:50:34 -0000 Author: rmacklem Date: Sun May 7 20:50:32 2017 New Revision: 317920 URL: https://svnweb.freebsd.org/changeset/base/317920 Log: MFC: r317350 Fix the default uid/gid values in nfsuserd.c This patch sets the default uid/gid values for "nobody" and "nogroup" to the values in the password and group databases. Normally nfsuserd(8) will override these with whatever is in the password/group databases, so these values are only used when the databases entries aren't available. It would be nice to use the definitions in sys/conf.h, but those are in the _KERNEL section of the file. Modified: stable/10/usr.sbin/nfsuserd/nfsuserd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/nfsuserd/nfsuserd.c ============================================================================== --- stable/10/usr.sbin/nfsuserd/nfsuserd.c Sun May 7 20:42:01 2017 (r317919) +++ stable/10/usr.sbin/nfsuserd/nfsuserd.c Sun May 7 20:50:32 2017 (r317920) @@ -88,9 +88,9 @@ struct info { u_char *dnsname = "default.domain"; u_char *defaultuser = "nobody"; -uid_t defaultuid = (uid_t)32767; +uid_t defaultuid = 65534; u_char *defaultgroup = "nogroup"; -gid_t defaultgid = (gid_t)32767; +gid_t defaultgid = 65533; int verbose = 0, im_a_slave = 0, nfsuserdcnt = -1, forcestart = 0; int defusertimeout = DEFUSERTIMEOUT, manage_gids = 0; pid_t slaves[MAXNFSUSERD]; From owner-svn-src-stable@freebsd.org Sun May 7 20:57:15 2017 Return-Path: Delivered-To: svn-src-stable@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 284A8D53A89; Sun, 7 May 2017 20:57:15 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B7C1C110C; Sun, 7 May 2017 20:57:14 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v47KvDa4038493; Sun, 7 May 2017 20:57:13 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v47KvDjp038492; Sun, 7 May 2017 20:57:13 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201705072057.v47KvDjp038492@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Sun, 7 May 2017 20:57:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r317921 - stable/11/usr.sbin/nfsuserd X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 May 2017 20:57:15 -0000 Author: rmacklem Date: Sun May 7 20:57:13 2017 New Revision: 317921 URL: https://svnweb.freebsd.org/changeset/base/317921 Log: MFC: r317270 Get rid of bogus statement in the nfsuserd.8 man page. The nfsuserd.8 man page stated that a usertimeout of 0 would disable the cache timeout. This was simply not true, so this patch deletes the sentence. This is a content change. Modified: stable/11/usr.sbin/nfsuserd/nfsuserd.8 Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/nfsuserd/nfsuserd.8 ============================================================================== --- stable/11/usr.sbin/nfsuserd/nfsuserd.8 Sun May 7 20:50:32 2017 (r317920) +++ stable/11/usr.sbin/nfsuserd/nfsuserd.8 Sun May 7 20:57:13 2017 (r317921) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 1, 2015 +.Dd April 21, 2017 .Dt NFSUSERD 8 .Os .Sh NAME @@ -64,8 +64,8 @@ if that name is not a fully qualified ho reported by .Xr getaddrinfo 3 . .It Fl usertimeout Ar minutes -Overrides the default timeout for cache entries, in minutes. If the -timeout is specified as 0, cache entries never time out. The longer the +Overrides the default timeout for cache entries, in minutes. +The longer the time out, the better the performance, but the longer it takes for replaced entries to be seen. If your user/group database management system almost never re-uses the same names or id numbers, a large timeout is recommended. From owner-svn-src-stable@freebsd.org Sun May 7 21:06:25 2017 Return-Path: Delivered-To: svn-src-stable@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 620D1D625E2; Sun, 7 May 2017 21:06:25 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 21EF07D; Sun, 7 May 2017 21:06:25 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v47L6Og0042520; Sun, 7 May 2017 21:06:24 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v47L6OuE042519; Sun, 7 May 2017 21:06:24 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201705072106.v47L6OuE042519@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Sun, 7 May 2017 21:06:24 +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: r317922 - stable/10/usr.sbin/nfsuserd 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@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 May 2017 21:06:25 -0000 Author: rmacklem Date: Sun May 7 21:06:23 2017 New Revision: 317922 URL: https://svnweb.freebsd.org/changeset/base/317922 Log: MFC: r317270 Get rid of bogus statement in the nfsuserd.8 man page. The nfsuserd.8 man page stated that a usertimeout of 0 would disable the cache timeout. This was simply not true, so this patch deletes the sentence. This is a content change. Modified: stable/10/usr.sbin/nfsuserd/nfsuserd.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/nfsuserd/nfsuserd.8 ============================================================================== --- stable/10/usr.sbin/nfsuserd/nfsuserd.8 Sun May 7 20:57:13 2017 (r317921) +++ stable/10/usr.sbin/nfsuserd/nfsuserd.8 Sun May 7 21:06:23 2017 (r317922) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 1, 2015 +.Dd April 21, 2017 .Dt NFSUSERD 8 .Os .Sh NAME @@ -64,8 +64,8 @@ if that name is not a fully qualified ho reported by .Xr getaddrinfo 3 . .It Fl usertimeout Ar minutes -Overrides the default timeout for cache entries, in minutes. If the -timeout is specified as 0, cache entries never time out. The longer the +Overrides the default timeout for cache entries, in minutes. +The longer the time out, the better the performance, but the longer it takes for replaced entries to be seen. If your user/group database management system almost never re-uses the same names or id numbers, a large timeout is recommended. From owner-svn-src-stable@freebsd.org Sun May 7 21:22:48 2017 Return-Path: Delivered-To: svn-src-stable@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 738CFD62BFC; Sun, 7 May 2017 21:22:48 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 36BB282A; Sun, 7 May 2017 21:22:48 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v47LMlNp050536; Sun, 7 May 2017 21:22:47 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v47LMlA4050535; Sun, 7 May 2017 21:22:47 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201705072122.v47LMlA4050535@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Sun, 7 May 2017 21:22:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r317924 - stable/11/sys/fs/nfsclient X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 May 2017 21:22:48 -0000 Author: rmacklem Date: Sun May 7 21:22:47 2017 New Revision: 317924 URL: https://svnweb.freebsd.org/changeset/base/317924 Log: MFC: r317272 Add checks for failed operations to the NFSv4 client function nfscl_mtofh(). The nfscl_mtofh() function didn't check for failed operations and, as such, would have returned EBADRPC for these cases, due to parsing failure. This patch adds checks, so that it returns with ND_NOMOREDATA set. This is needed for future use in the pNFS server and acts as a safety belt in the meantime. Modified: stable/11/sys/fs/nfsclient/nfs_clcomsubs.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/fs/nfsclient/nfs_clcomsubs.c ============================================================================== --- stable/11/sys/fs/nfsclient/nfs_clcomsubs.c Sun May 7 21:11:28 2017 (r317923) +++ stable/11/sys/fs/nfsclient/nfs_clcomsubs.c Sun May 7 21:22:47 2017 (r317924) @@ -471,6 +471,11 @@ nfscl_mtofh(struct nfsrv_descript *nd, s flag = fxdr_unsigned(int, *tl); } else if (nd->nd_flag & ND_NFSV4) { NFSM_DISSECT(tl, u_int32_t *, 2 * NFSX_UNSIGNED); + /* If the GetFH failed, clear flag. */ + if (*++tl != 0) { + nd->nd_flag |= ND_NOMOREDATA; + flag = 0; + } } if (flag) { error = nfsm_getfh(nd, nfhpp); @@ -481,8 +486,12 @@ nfscl_mtofh(struct nfsrv_descript *nd, s /* * Now, get the attributes. */ - if (nd->nd_flag & ND_NFSV4) { + if (flag != 0 && (nd->nd_flag & ND_NFSV4) != 0) { NFSM_DISSECT(tl, u_int32_t *, 2 * NFSX_UNSIGNED); + if (*++tl != 0) { + nd->nd_flag |= ND_NOMOREDATA; + flag = 0; + } } else if (nd->nd_flag & ND_NFSV3) { NFSM_DISSECT(tl, u_int32_t *, NFSX_UNSIGNED); if (flag) { From owner-svn-src-stable@freebsd.org Sun May 7 21:32:56 2017 Return-Path: Delivered-To: svn-src-stable@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 9785ED63204; Sun, 7 May 2017 21:32:56 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 43402E23; Sun, 7 May 2017 21:32:56 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v47LWtAJ057422; Sun, 7 May 2017 21:32:55 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v47LWt4K057421; Sun, 7 May 2017 21:32:55 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201705072132.v47LWt4K057421@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Sun, 7 May 2017 21:32: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: r317925 - stable/10/sys/fs/nfsclient 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@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 May 2017 21:32:56 -0000 Author: rmacklem Date: Sun May 7 21:32:55 2017 New Revision: 317925 URL: https://svnweb.freebsd.org/changeset/base/317925 Log: MFC: r317272 Add checks for failed operations to the NFSv4 client function nfscl_mtofh(). The nfscl_mtofh() function didn't check for failed operations and, as such, would have returned EBADRPC for these cases, due to parsing failure. This patch adds checks, so that it returns with ND_NOMOREDATA set. This is needed for future use in the pNFS server and acts as a safety belt in the meantime. Modified: stable/10/sys/fs/nfsclient/nfs_clcomsubs.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/nfsclient/nfs_clcomsubs.c ============================================================================== --- stable/10/sys/fs/nfsclient/nfs_clcomsubs.c Sun May 7 21:22:47 2017 (r317924) +++ stable/10/sys/fs/nfsclient/nfs_clcomsubs.c Sun May 7 21:32:55 2017 (r317925) @@ -471,6 +471,11 @@ nfscl_mtofh(struct nfsrv_descript *nd, s flag = fxdr_unsigned(int, *tl); } else if (nd->nd_flag & ND_NFSV4) { NFSM_DISSECT(tl, u_int32_t *, 2 * NFSX_UNSIGNED); + /* If the GetFH failed, clear flag. */ + if (*++tl != 0) { + nd->nd_flag |= ND_NOMOREDATA; + flag = 0; + } } if (flag) { error = nfsm_getfh(nd, nfhpp); @@ -481,8 +486,12 @@ nfscl_mtofh(struct nfsrv_descript *nd, s /* * Now, get the attributes. */ - if (nd->nd_flag & ND_NFSV4) { + if (flag != 0 && (nd->nd_flag & ND_NFSV4) != 0) { NFSM_DISSECT(tl, u_int32_t *, 2 * NFSX_UNSIGNED); + if (*++tl != 0) { + nd->nd_flag |= ND_NOMOREDATA; + flag = 0; + } } else if (nd->nd_flag & ND_NFSV3) { NFSM_DISSECT(tl, u_int32_t *, NFSX_UNSIGNED); if (flag) { From owner-svn-src-stable@freebsd.org Sun May 7 21:42:03 2017 Return-Path: Delivered-To: svn-src-stable@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 ED114D63687; Sun, 7 May 2017 21:42:03 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 844F41747; Sun, 7 May 2017 21:42:03 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v47Lg2mA060823; Sun, 7 May 2017 21:42:02 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v47Lg2Gh060821; Sun, 7 May 2017 21:42:02 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201705072142.v47Lg2Gh060821@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Sun, 7 May 2017 21:42:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r317926 - in stable/11/sys/fs: nfs nfsclient X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 May 2017 21:42:04 -0000 Author: rmacklem Date: Sun May 7 21:42:02 2017 New Revision: 317926 URL: https://svnweb.freebsd.org/changeset/base/317926 Log: MFC: r317275, r317344 Don't create a backchannel for a DS connection. An NFSv4.1 client connection to a Data Server (DS) should not have a backchannel. This patch fixes the NFSv4.1/pNFS client to not do a backchannel for this case. Found during recent testing with the pNFS server under development. Modified: stable/11/sys/fs/nfs/nfs_commonkrpc.c stable/11/sys/fs/nfsclient/nfs_clrpcops.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/fs/nfs/nfs_commonkrpc.c ============================================================================== --- stable/11/sys/fs/nfs/nfs_commonkrpc.c Sun May 7 21:32:55 2017 (r317925) +++ stable/11/sys/fs/nfs/nfs_commonkrpc.c Sun May 7 21:42:02 2017 (r317926) @@ -280,7 +280,8 @@ newnfs_connect(struct nfsmount *nmp, str retries = nmp->nm_retry; } else retries = INT_MAX; - if (NFSHASNFSV4N(nmp)) { + /* cred == NULL for DS connects. */ + if (NFSHASNFSV4N(nmp) && cred != NULL) { /* * Make sure the nfscbd_pool doesn't get destroyed * while doing this. Modified: stable/11/sys/fs/nfsclient/nfs_clrpcops.c ============================================================================== --- stable/11/sys/fs/nfsclient/nfs_clrpcops.c Sun May 7 21:32:55 2017 (r317925) +++ stable/11/sys/fs/nfsclient/nfs_clrpcops.c Sun May 7 21:42:02 2017 (r317926) @@ -4613,7 +4613,7 @@ nfsrpc_createsession(struct nfsmount *nm *tl++ = sep->nfsess_clientid.lval[1]; *tl++ = txdr_unsigned(sequenceid); crflags = (NFSMNT_RDONLY(nmp->nm_mountp) ? 0 : NFSV4CRSESS_PERSIST); - if (nfscl_enablecallb != 0 && nfs_numnfscbd > 0) + if (nfscl_enablecallb != 0 && nfs_numnfscbd > 0 && mds != 0) crflags |= NFSV4CRSESS_CONNBACKCHAN; *tl = txdr_unsigned(crflags); From owner-svn-src-stable@freebsd.org Sun May 7 21:57:48 2017 Return-Path: Delivered-To: svn-src-stable@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 45179D63943; Sun, 7 May 2017 21:57:48 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C62C41AA2; Sun, 7 May 2017 21:57:47 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v47LvkD9066108; Sun, 7 May 2017 21:57:46 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v47Lvkdl066106; Sun, 7 May 2017 21:57:46 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201705072157.v47Lvkdl066106@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Sun, 7 May 2017 21:57:46 +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: r317927 - in stable/10/sys/fs: nfs nfsclient 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@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 May 2017 21:57:48 -0000 Author: rmacklem Date: Sun May 7 21:57:46 2017 New Revision: 317927 URL: https://svnweb.freebsd.org/changeset/base/317927 Log: MFC: r317275, r317344 Don't create a backchannel for a DS connection. An NFSv4.1 client connection to a Data Server (DS) should not have a backchannel. This patch fixes the NFSv4.1/pNFS client to not do a backchannel for this case. Found during recent testing with the pNFS server under development. Modified: stable/10/sys/fs/nfs/nfs_commonkrpc.c stable/10/sys/fs/nfsclient/nfs_clrpcops.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/nfs/nfs_commonkrpc.c ============================================================================== --- stable/10/sys/fs/nfs/nfs_commonkrpc.c Sun May 7 21:42:02 2017 (r317926) +++ stable/10/sys/fs/nfs/nfs_commonkrpc.c Sun May 7 21:57:46 2017 (r317927) @@ -281,7 +281,8 @@ newnfs_connect(struct nfsmount *nmp, str retries = nmp->nm_retry; } else retries = INT_MAX; - if (NFSHASNFSV4N(nmp)) { + /* cred == NULL for DS connects. */ + if (NFSHASNFSV4N(nmp) && cred != NULL) { /* * Make sure the nfscbd_pool doesn't get destroyed * while doing this. Modified: stable/10/sys/fs/nfsclient/nfs_clrpcops.c ============================================================================== --- stable/10/sys/fs/nfsclient/nfs_clrpcops.c Sun May 7 21:42:02 2017 (r317926) +++ stable/10/sys/fs/nfsclient/nfs_clrpcops.c Sun May 7 21:57:46 2017 (r317927) @@ -4610,7 +4610,7 @@ nfsrpc_createsession(struct nfsmount *nm *tl++ = sep->nfsess_clientid.lval[1]; *tl++ = txdr_unsigned(sequenceid); crflags = (NFSMNT_RDONLY(nmp->nm_mountp) ? 0 : NFSV4CRSESS_PERSIST); - if (nfscl_enablecallb != 0 && nfs_numnfscbd > 0) + if (nfscl_enablecallb != 0 && nfs_numnfscbd > 0 && mds != 0) crflags |= NFSV4CRSESS_CONNBACKCHAN; *tl = txdr_unsigned(crflags); From owner-svn-src-stable@freebsd.org Sun May 7 22:10:56 2017 Return-Path: Delivered-To: svn-src-stable@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 DFD6DD63E93; Sun, 7 May 2017 22:10:56 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A64741873; Sun, 7 May 2017 22:10:56 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v47MAteJ073331; Sun, 7 May 2017 22:10:55 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v47MAtw6073330; Sun, 7 May 2017 22:10:55 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201705072210.v47MAtw6073330@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Sun, 7 May 2017 22:10:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r317929 - stable/11/sys/fs/nfs X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 May 2017 22:10:57 -0000 Author: rmacklem Date: Sun May 7 22:10:55 2017 New Revision: 317929 URL: https://svnweb.freebsd.org/changeset/base/317929 Log: MFC: r317276 Don't set ND_NOMOREDATA for a failed Setattr operation (NFSv4). The NFSv4 Setattr operation always has reply data even when it fails, so don't set the ND_NOMOREDATA for it. This would only affect unusual cases where Setattr fails and the RPC code wants to parse the rest of the compound. Detected during recent development related to the pNFS server. Modified: stable/11/sys/fs/nfs/nfs_commonkrpc.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/fs/nfs/nfs_commonkrpc.c ============================================================================== --- stable/11/sys/fs/nfs/nfs_commonkrpc.c Sun May 7 22:04:12 2017 (r317928) +++ stable/11/sys/fs/nfs/nfs_commonkrpc.c Sun May 7 22:10:55 2017 (r317929) @@ -1043,8 +1043,10 @@ tryagain: /* * If this op's status is non-zero, mark * that there is no more data to process. + * The exception is Setattr, which always has xdr + * when it has failed. */ - if (j) + if (j != 0 && i != NFSV4OP_SETATTR) nd->nd_flag |= ND_NOMOREDATA; /* From owner-svn-src-stable@freebsd.org Sun May 7 22:18:06 2017 Return-Path: Delivered-To: svn-src-stable@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 B86A7D62106; Sun, 7 May 2017 22:18:06 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7FD9B1743; Sun, 7 May 2017 22:18:06 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v47MI5lL074315; Sun, 7 May 2017 22:18:05 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v47MI58o074314; Sun, 7 May 2017 22:18:05 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201705072218.v47MI58o074314@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Sun, 7 May 2017 22:18: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: r317930 - stable/10/sys/fs/nfs 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@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 May 2017 22:18:06 -0000 Author: rmacklem Date: Sun May 7 22:18:05 2017 New Revision: 317930 URL: https://svnweb.freebsd.org/changeset/base/317930 Log: MFC: r317276 Don't set ND_NOMOREDATA for a failed Setattr operation (NFSv4). The NFSv4 Setattr operation always has reply data even when it fails, so don't set the ND_NOMOREDATA for it. This would only affect unusual cases where Setattr fails and the RPC code wants to parse the rest of the compound. Detected during recent development related to the pNFS server. Modified: stable/10/sys/fs/nfs/nfs_commonkrpc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/nfs/nfs_commonkrpc.c ============================================================================== --- stable/10/sys/fs/nfs/nfs_commonkrpc.c Sun May 7 22:10:55 2017 (r317929) +++ stable/10/sys/fs/nfs/nfs_commonkrpc.c Sun May 7 22:18:05 2017 (r317930) @@ -1044,8 +1044,10 @@ tryagain: /* * If this op's status is non-zero, mark * that there is no more data to process. + * The exception is Setattr, which always has xdr + * when it has failed. */ - if (j) + if (j != 0 && i != NFSV4OP_SETATTR) nd->nd_flag |= ND_NOMOREDATA; /* From owner-svn-src-stable@freebsd.org Mon May 8 01:29:41 2017 Return-Path: Delivered-To: svn-src-stable@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 CA1FDD602B9; Mon, 8 May 2017 01:29:41 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 860A91C28; Mon, 8 May 2017 01:29:41 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v481TeMo051895; Mon, 8 May 2017 01:29:40 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v481TeiR051894; Mon, 8 May 2017 01:29:40 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201705080129.v481TeiR051894@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 8 May 2017 01:29:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r317932 - stable/11/contrib/elftoolchain/elfcopy X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 01:29:42 -0000 Author: emaste Date: Mon May 8 01:29:40 2017 New Revision: 317932 URL: https://svnweb.freebsd.org/changeset/base/317932 Log: MFC r317371: elfcopy: allow empty symbol list files Modified: stable/11/contrib/elftoolchain/elfcopy/main.c Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/elftoolchain/elfcopy/main.c ============================================================================== --- stable/11/contrib/elftoolchain/elfcopy/main.c Mon May 8 00:45:05 2017 (r317931) +++ stable/11/contrib/elftoolchain/elfcopy/main.c Mon May 8 01:29:40 2017 (r317932) @@ -1285,8 +1285,9 @@ parse_symlist_file(struct elfcopy *ecp, err(EXIT_FAILURE, "can not open %s", fn); if ((data = malloc(sb.st_size + 1)) == NULL) err(EXIT_FAILURE, "malloc failed"); - if (fread(data, 1, sb.st_size, fp) == 0 || ferror(fp)) - err(EXIT_FAILURE, "fread failed"); + if (sb.st_size > 0) + if (fread(data, sb.st_size, 1, fp) != 1) + err(EXIT_FAILURE, "fread failed"); fclose(fp); data[sb.st_size] = '\0'; From owner-svn-src-stable@freebsd.org Mon May 8 10:51:32 2017 Return-Path: Delivered-To: svn-src-stable@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 272E7D60D6D; Mon, 8 May 2017 10:51:32 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 B1AC1954; Mon, 8 May 2017 10:51:31 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v48ApUbN083437; Mon, 8 May 2017 10:51:30 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v48ApUKi083436; Mon, 8 May 2017 10:51:30 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201705081051.v48ApUKi083436@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Mon, 8 May 2017 10:51:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r317936 - stable/11/sys/compat/linux X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 10:51:32 -0000 Author: dchagin Date: Mon May 8 10:51:30 2017 New Revision: 317936 URL: https://svnweb.freebsd.org/changeset/base/317936 Log: MFC r317645: Fix NULL pointer dereference in futex_wake_op() in case when the same address specified for arguments uaddr and uaddr2. PR: 218987 Modified: stable/11/sys/compat/linux/linux_futex.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linux/linux_futex.c ============================================================================== --- stable/11/sys/compat/linux/linux_futex.c Mon May 8 09:14:41 2017 (r317935) +++ stable/11/sys/compat/linux/linux_futex.c Mon May 8 10:51:30 2017 (r317936) @@ -952,6 +952,11 @@ retry1: args->uaddr, args->val, args->uaddr2, args->val3, args->timeout); + if (args->uaddr == args->uaddr2) { + LIN_SDT_PROBE1(futex, linux_sys_futex, return, EINVAL); + return (EINVAL); + } + retry2: error = futex_get(args->uaddr, NULL, &f, flags | FUTEX_DONTLOCK); if (error) { @@ -959,9 +964,7 @@ retry2: return (error); } - if (args->uaddr != args->uaddr2) - error = futex_get(args->uaddr2, NULL, &f2, - flags | FUTEX_DONTLOCK); + error = futex_get(args->uaddr2, NULL, &f2, flags | FUTEX_DONTLOCK); if (error) { futex_put(f, NULL); From owner-svn-src-stable@freebsd.org Mon May 8 14:48:40 2017 Return-Path: Delivered-To: svn-src-stable@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 7215FD63DD8; Mon, 8 May 2017 14:48:40 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3D0409FB; Mon, 8 May 2017 14:48:40 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v48Emd6F081591; Mon, 8 May 2017 14:48:39 GMT (envelope-from ken@FreeBSD.org) Received: (from ken@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v48EmdpC081590; Mon, 8 May 2017 14:48:39 GMT (envelope-from ken@FreeBSD.org) Message-Id: <201705081448.v48EmdpC081590@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ken set sender to ken@FreeBSD.org using -f From: "Kenneth D. Merry" Date: Mon, 8 May 2017 14:48: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: r317941 - stable/10/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@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 14:48:40 -0000 Author: ken Date: Mon May 8 14:48:39 2017 New Revision: 317941 URL: https://svnweb.freebsd.org/changeset/base/317941 Log: MFC r317745: Don't bother retrying errors for encrypted drives that are locked. sys/cam/scsi/scsi_all.c: In the asc_table, if we get a 0x20,0x02 error ("Access denied - no access rights"), don't bother retrying. Instead, immediately fail the command. This is the error returned by Self Encrypting Drives (SED) when they are locked. Sponsored by: Spectra Logic Modified: stable/10/sys/cam/scsi/scsi_all.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/scsi/scsi_all.c ============================================================================== --- stable/10/sys/cam/scsi/scsi_all.c Mon May 8 14:48:37 2017 (r317940) +++ stable/10/sys/cam/scsi/scsi_all.c Mon May 8 14:48:39 2017 (r317941) @@ -1613,7 +1613,7 @@ static struct asc_table_entry asc_table[ { SST(0x20, 0x01, SS_RDEF, /* XXX TBD */ "Access denied - initiator pending-enrolled") }, /* DT PWROMAEBK */ - { SST(0x20, 0x02, SS_RDEF, /* XXX TBD */ + { SST(0x20, 0x02, SS_FATAL | EPERM, "Access denied - no access rights") }, /* DT PWROMAEBK */ { SST(0x20, 0x03, SS_RDEF, /* XXX TBD */ From owner-svn-src-stable@freebsd.org Mon May 8 14:48:39 2017 Return-Path: Delivered-To: svn-src-stable@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 4C80FD63DD2; Mon, 8 May 2017 14:48:39 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 130309E9; Mon, 8 May 2017 14:48:38 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v48Emcqb081545; Mon, 8 May 2017 14:48:38 GMT (envelope-from ken@FreeBSD.org) Received: (from ken@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v48Emc5k081544; Mon, 8 May 2017 14:48:38 GMT (envelope-from ken@FreeBSD.org) Message-Id: <201705081448.v48Emc5k081544@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ken set sender to ken@FreeBSD.org using -f From: "Kenneth D. Merry" Date: Mon, 8 May 2017 14:48:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r317940 - stable/11/sys/cam/scsi X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 14:48:39 -0000 Author: ken Date: Mon May 8 14:48:37 2017 New Revision: 317940 URL: https://svnweb.freebsd.org/changeset/base/317940 Log: MFC r317745: Don't bother retrying errors for encrypted drives that are locked. sys/cam/scsi/scsi_all.c: In the asc_table, if we get a 0x20,0x02 error ("Access denied - no access rights"), don't bother retrying. Instead, immediately fail the command. This is the error returned by Self Encrypting Drives (SED) when they are locked. Sponsored by: Spectra Logic Modified: stable/11/sys/cam/scsi/scsi_all.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cam/scsi/scsi_all.c ============================================================================== --- stable/11/sys/cam/scsi/scsi_all.c Mon May 8 14:33:38 2017 (r317939) +++ stable/11/sys/cam/scsi/scsi_all.c Mon May 8 14:48:37 2017 (r317940) @@ -1614,7 +1614,7 @@ static struct asc_table_entry asc_table[ { SST(0x20, 0x01, SS_RDEF, /* XXX TBD */ "Access denied - initiator pending-enrolled") }, /* DT PWROMAEBK */ - { SST(0x20, 0x02, SS_RDEF, /* XXX TBD */ + { SST(0x20, 0x02, SS_FATAL | EPERM, "Access denied - no access rights") }, /* DT PWROMAEBK */ { SST(0x20, 0x03, SS_RDEF, /* XXX TBD */ From owner-svn-src-stable@freebsd.org Mon May 8 16:06:22 2017 Return-Path: Delivered-To: svn-src-stable@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 7FE1AD636DE; Mon, 8 May 2017 16:06:22 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2DDED9B6; Mon, 8 May 2017 16:06:22 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v48G6LfW014011; Mon, 8 May 2017 16:06:21 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v48G6LnM014010; Mon, 8 May 2017 16:06:21 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201705081606.v48G6LnM014010@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 8 May 2017 16:06:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r317943 - stable/11/contrib/llvm/lib/Target/PowerPC X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 16:06:22 -0000 Author: dim Date: Mon May 8 16:06:20 2017 New Revision: 317943 URL: https://svnweb.freebsd.org/changeset/base/317943 Log: MFC r317810: Pull in r302183 from upstream llvm trunk (by Krzysztof Parzyszek): [PPC] When restoring R30 (PIC base pointer), mark it as This happened on the PPC32/SVR4 path and was discovered when building FreeBSD on PPC32. It was a typo-class error in the frame lowering code. This fixes PR26519. Reported by: Mark Millard PR: 206990 Modified: stable/11/contrib/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp ============================================================================== --- stable/11/contrib/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp Mon May 8 15:51:29 2017 (r317942) +++ stable/11/contrib/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp Mon May 8 16:06:20 2017 (r317943) @@ -1467,8 +1467,7 @@ void PPCFrameLowering::emitEpilogue(Mach } if (FI->usesPICBase()) - BuildMI(MBB, MBBI, dl, LoadInst) - .addReg(PPC::R30) + BuildMI(MBB, MBBI, dl, LoadInst, PPC::R30) .addImm(PBPOffset) .addReg(RBReg); From owner-svn-src-stable@freebsd.org Mon May 8 17:02:03 2017 Return-Path: Delivered-To: svn-src-stable@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 3359BD63EF2; Mon, 8 May 2017 17:02:03 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0BAF1165A; Mon, 8 May 2017 17:02:02 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v48H22im036150; Mon, 8 May 2017 17:02:02 GMT (envelope-from ken@FreeBSD.org) Received: (from ken@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v48H21Xr036148; Mon, 8 May 2017 17:02:01 GMT (envelope-from ken@FreeBSD.org) Message-Id: <201705081702.v48H21Xr036148@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ken set sender to ken@FreeBSD.org using -f From: "Kenneth D. Merry" Date: Mon, 8 May 2017 17:02:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r317946 - stable/11/sbin/camcontrol X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 17:02:03 -0000 Author: ken Date: Mon May 8 17:02:01 2017 New Revision: 317946 URL: https://svnweb.freebsd.org/changeset/base/317946 Log: MFC r317774, r317776 r317774: Add the ability to rescan or reset devices specified by peripheral name and unit number in camcontrol(8). Previously camcontrol(8) only supported rescanning or resetting devices specified by bus:target:lun. This is because for rescanning at least, you don't have a peripheral name and unit number (e.g. da4) for devices that don't exist yet. That is still the case after this change, but in other cases, when the device does exist in the CAM EDT (Existing Device Table), we do a careful lookup of the bus/target/lun if the user supplies a peripheral name and unit number to find the bus:target:lun and then issue the requested reset or rescan. The lookup is done without actually opening the device in question, since a rescan is often done to make a device go away after it has been pulled. (This is especially true for busses/controllers, like parallel SCSI controllers, that don't automatically detect changes in topology.) Opening a device that is no longer there to determine the bus/target/lun might result in error recovery actions when the user really just wanted to make the device go away. sbin/camcontrol/camcontrol.c: In dorescan_or_reset(), if the use hasn't specified a numeric argument, assume he has specified a device. Lookup the pass(4) instance for that device using the transport layer CAMGETPASSTHRU ioctl. If that is successful, we can use the returned bus:target:lun to rescan or reset the device. Under the hood, resetting a device using XPT_RESET_DEV is actually sent via the pass(4) device anyway. But this provides a way for the user to specify devices in a more convenient way, and can work on device rescans when the device is going away, assuming it still exists in the EDT. sbin/camcontrol/camcontrol.8: Update the man page for the rescan and reset subcommands to reflect that you can now use a device name and unit number with them. Sponsored by: Spectra Logic r317776: Bump the camcontrol(8) man page date. Sponsored by: Spectra Logic Modified: stable/11/sbin/camcontrol/camcontrol.8 stable/11/sbin/camcontrol/camcontrol.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/camcontrol/camcontrol.8 ============================================================================== --- stable/11/sbin/camcontrol/camcontrol.8 Mon May 8 16:57:33 2017 (r317945) +++ stable/11/sbin/camcontrol/camcontrol.8 Mon May 8 17:02:01 2017 (r317946) @@ -102,10 +102,10 @@ .Op device id .Nm .Ic rescan -.Aq all | bus Ns Op :target:lun +.Aq all | device id | bus Ns Op :target:lun .Nm .Ic reset -.Aq all | bus Ns Op :target:lun +.Aq all | device id | bus Ns Op :target:lun .Nm .Ic defects .Op device id @@ -578,12 +578,20 @@ start bit cleared and the load/eject bit .It Ic rescan Tell the kernel to scan all busses in the system (with the .Ar all -argument), the given bus (XPT_SCAN_BUS), or bus:target:lun +argument), the given bus (XPT_SCAN_BUS), bus:target:lun or device (XPT_SCAN_LUN) for new devices or devices that have gone away. The user may specify a scan of all busses, a single bus, or a lun. Scanning all luns on a target is not supported. +.Pp +If a device is specified by peripheral name and unit number, for instance +da4, it may only be rescanned if that device currently exists in the CAM EDT +(Existing Device Table). +If the device is no longer there (see +.Nm +devlist ), +you must use the bus:target:lun form to rescan it. .It Ic reprobe Tell the kernel to refresh the information about the device and notify the upper layer, @@ -593,8 +601,8 @@ the disk size visible to the rest of the .It Ic reset Tell the kernel to reset all busses in the system (with the .Ar all -argument) or the given bus (XPT_RESET_BUS) by issuing a SCSI bus -reset for that bus, or to reset the given bus:target:lun +argument), the given bus (XPT_RESET_BUS) by issuing a SCSI bus +reset for that bus, or to reset the given bus:target:lun or device (XPT_RESET_DEV), typically by issuing a BUS DEVICE RESET message after connecting to that device. Note that this can have a destructive impact Modified: stable/11/sbin/camcontrol/camcontrol.c ============================================================================== --- stable/11/sbin/camcontrol/camcontrol.c Mon May 8 16:57:33 2017 (r317945) +++ stable/11/sbin/camcontrol/camcontrol.c Mon May 8 17:02:01 2017 (r317946) @@ -3131,12 +3131,107 @@ dorescan_or_reset(int argc, char **argv, tstr++; if (strncasecmp(tstr, "all", strlen("all")) == 0) arglist |= CAM_ARG_BUS; - else { + else if (isdigit(*tstr)) { rv = parse_btl(argv[optind], &bus, &target, &lun, &arglist); if (rv != 1 && rv != 3) { warnx(must, rescan? "rescan" : "reset"); return(1); } + } else { + char name[30]; + int unit; + int fd = -1; + union ccb ccb; + + /* + * Note that resetting or rescanning a device used to + * require a bus or bus:target:lun. This is because the + * device in question may not exist and you're trying to + * get the controller to rescan to find it. It may also be + * because the device is hung / unresponsive, and opening + * an unresponsive device is not desireable. + * + * It can be more convenient to reference a device by + * peripheral name and unit number, though, and it is + * possible to get the bus:target:lun for devices that + * currently exist in the EDT. So this can work for + * devices that we want to reset, or devices that exist + * that we want to rescan, but not devices that do not + * exist yet. + * + * So, we are careful here to look up the bus/target/lun + * for the device the user wants to operate on, specified + * by peripheral instance (e.g. da0, pass32) without + * actually opening that device. The process is similar to + * what cam_lookup_pass() does, except that we don't + * actually open the passthrough driver instance in the end. + */ + + if (cam_get_device(tstr, name, sizeof(name), &unit) == -1) { + warnx("%s", cam_errbuf); + error = 1; + goto bailout; + } + + if ((fd = open(XPT_DEVICE, O_RDWR)) == -1) { + warn("Unable to open %s", XPT_DEVICE); + error = 1; + goto bailout; + } + + bzero(&ccb, sizeof(ccb)); + + /* + * The function code isn't strictly necessary for the + * GETPASSTHRU ioctl. + */ + ccb.ccb_h.func_code = XPT_GDEVLIST; + + /* + * These two are necessary for the GETPASSTHRU ioctl to + * work. + */ + strlcpy(ccb.cgdl.periph_name, name, + sizeof(ccb.cgdl.periph_name)); + ccb.cgdl.unit_number = unit; + + /* + * Attempt to get the passthrough device. This ioctl will + * fail if the device name is null, if the device doesn't + * exist, or if the passthrough driver isn't in the kernel. + */ + if (ioctl(fd, CAMGETPASSTHRU, &ccb) == -1) { + warn("Unable to find bus:target:lun for device %s%d", + name, unit); + error = 1; + close(fd); + goto bailout; + } + if ((ccb.ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { + const struct cam_status_entry *entry; + + entry = cam_fetch_status_entry(ccb.ccb_h.status); + warnx("Unable to find bus:target_lun for device %s%d, " + "CAM status: %s (%#x)", name, unit, + entry ? entry->status_text : "Unknown", + ccb.ccb_h.status); + error = 1; + close(fd); + goto bailout; + } + + /* + * The kernel fills in the bus/target/lun. We don't + * need the passthrough device name and unit number since + * we aren't going to open it. + */ + bus = ccb.ccb_h.path_id; + target = ccb.ccb_h.target_id; + lun = ccb.ccb_h.target_lun; + + arglist |= CAM_ARG_BUS | CAM_ARG_TARGET | CAM_ARG_LUN; + + close(fd); } if ((arglist & CAM_ARG_BUS) @@ -3146,6 +3241,8 @@ dorescan_or_reset(int argc, char **argv, else error = rescan_or_reset_bus(bus, rescan); +bailout: + return(error); } @@ -8916,8 +9013,8 @@ usage(int printlong) " camcontrol eject [dev_id][generic args]\n" " camcontrol reprobe [dev_id][generic args]\n" #endif /* MINIMALISTIC */ -" camcontrol rescan \n" -" camcontrol reset \n" +" camcontrol rescan \n" +" camcontrol reset \n" #ifndef MINIMALISTIC " camcontrol defects [dev_id][generic args] <-f format> [-P][-G]\n" " [-q][-s][-S offset][-X]\n" @@ -8996,8 +9093,8 @@ usage(int printlong) "load send a Start Unit command to the device with the load bit set\n" "eject send a Stop Unit command to the device with the eject bit set\n" "reprobe update capacity information of the given device\n" -"rescan rescan all busses, the given bus, or bus:target:lun\n" -"reset reset all busses, the given bus, or bus:target:lun\n" +"rescan rescan all buses, the given bus, bus:target:lun or device\n" +"reset reset all buses, the given bus, bus:target:lun or device\n" "defects read the defect list of the specified device\n" "modepage display or edit (-e) the given mode page\n" "cmd send the given SCSI command, may need -i or -o as well\n" From owner-svn-src-stable@freebsd.org Mon May 8 17:02:05 2017 Return-Path: Delivered-To: svn-src-stable@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 30F94D63F00; Mon, 8 May 2017 17:02:05 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0A62E1671; Mon, 8 May 2017 17:02:04 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v48H24fq036198; Mon, 8 May 2017 17:02:04 GMT (envelope-from ken@FreeBSD.org) Received: (from ken@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v48H230l036196; Mon, 8 May 2017 17:02:03 GMT (envelope-from ken@FreeBSD.org) Message-Id: <201705081702.v48H230l036196@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ken set sender to ken@FreeBSD.org using -f From: "Kenneth D. Merry" Date: Mon, 8 May 2017 17:02:03 +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: r317947 - stable/10/sbin/camcontrol 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@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 17:02:05 -0000 Author: ken Date: Mon May 8 17:02:03 2017 New Revision: 317947 URL: https://svnweb.freebsd.org/changeset/base/317947 Log: MFC r317774, r317776 r317774: Add the ability to rescan or reset devices specified by peripheral name and unit number in camcontrol(8). Previously camcontrol(8) only supported rescanning or resetting devices specified by bus:target:lun. This is because for rescanning at least, you don't have a peripheral name and unit number (e.g. da4) for devices that don't exist yet. That is still the case after this change, but in other cases, when the device does exist in the CAM EDT (Existing Device Table), we do a careful lookup of the bus/target/lun if the user supplies a peripheral name and unit number to find the bus:target:lun and then issue the requested reset or rescan. The lookup is done without actually opening the device in question, since a rescan is often done to make a device go away after it has been pulled. (This is especially true for busses/controllers, like parallel SCSI controllers, that don't automatically detect changes in topology.) Opening a device that is no longer there to determine the bus/target/lun might result in error recovery actions when the user really just wanted to make the device go away. sbin/camcontrol/camcontrol.c: In dorescan_or_reset(), if the use hasn't specified a numeric argument, assume he has specified a device. Lookup the pass(4) instance for that device using the transport layer CAMGETPASSTHRU ioctl. If that is successful, we can use the returned bus:target:lun to rescan or reset the device. Under the hood, resetting a device using XPT_RESET_DEV is actually sent via the pass(4) device anyway. But this provides a way for the user to specify devices in a more convenient way, and can work on device rescans when the device is going away, assuming it still exists in the EDT. sbin/camcontrol/camcontrol.8: Update the man page for the rescan and reset subcommands to reflect that you can now use a device name and unit number with them. Sponsored by: Spectra Logic r317776: Bump the camcontrol(8) man page date. Sponsored by: Spectra Logic Modified: stable/10/sbin/camcontrol/camcontrol.8 stable/10/sbin/camcontrol/camcontrol.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/camcontrol/camcontrol.8 ============================================================================== --- stable/10/sbin/camcontrol/camcontrol.8 Mon May 8 17:02:01 2017 (r317946) +++ stable/10/sbin/camcontrol/camcontrol.8 Mon May 8 17:02:03 2017 (r317947) @@ -102,10 +102,10 @@ .Op device id .Nm .Ic rescan -.Aq all | bus Ns Op :target:lun +.Aq all | device id | bus Ns Op :target:lun .Nm .Ic reset -.Aq all | bus Ns Op :target:lun +.Aq all | device id | bus Ns Op :target:lun .Nm .Ic defects .Op device id @@ -553,12 +553,20 @@ start bit cleared and the load/eject bit .It Ic rescan Tell the kernel to scan all busses in the system (with the .Ar all -argument), the given bus (XPT_SCAN_BUS), or bus:target:lun +argument), the given bus (XPT_SCAN_BUS), bus:target:lun or device (XPT_SCAN_LUN) for new devices or devices that have gone away. The user may specify a scan of all busses, a single bus, or a lun. Scanning all luns on a target is not supported. +.Pp +If a device is specified by peripheral name and unit number, for instance +da4, it may only be rescanned if that device currently exists in the CAM EDT +(Existing Device Table). +If the device is no longer there (see +.Nm +devlist ), +you must use the bus:target:lun form to rescan it. .It Ic reprobe Tell the kernel to refresh the information about the device and notify the upper layer, @@ -568,8 +576,8 @@ the disk size visible to the rest of the .It Ic reset Tell the kernel to reset all busses in the system (with the .Ar all -argument) or the given bus (XPT_RESET_BUS) by issuing a SCSI bus -reset for that bus, or to reset the given bus:target:lun +argument), the given bus (XPT_RESET_BUS) by issuing a SCSI bus +reset for that bus, or to reset the given bus:target:lun or device (XPT_RESET_DEV), typically by issuing a BUS DEVICE RESET message after connecting to that device. Note that this can have a destructive impact Modified: stable/10/sbin/camcontrol/camcontrol.c ============================================================================== --- stable/10/sbin/camcontrol/camcontrol.c Mon May 8 17:02:01 2017 (r317946) +++ stable/10/sbin/camcontrol/camcontrol.c Mon May 8 17:02:03 2017 (r317947) @@ -3126,12 +3126,107 @@ dorescan_or_reset(int argc, char **argv, tstr++; if (strncasecmp(tstr, "all", strlen("all")) == 0) arglist |= CAM_ARG_BUS; - else { + else if (isdigit(*tstr)) { rv = parse_btl(argv[optind], &bus, &target, &lun, &arglist); if (rv != 1 && rv != 3) { warnx(must, rescan? "rescan" : "reset"); return(1); } + } else { + char name[30]; + int unit; + int fd = -1; + union ccb ccb; + + /* + * Note that resetting or rescanning a device used to + * require a bus or bus:target:lun. This is because the + * device in question may not exist and you're trying to + * get the controller to rescan to find it. It may also be + * because the device is hung / unresponsive, and opening + * an unresponsive device is not desireable. + * + * It can be more convenient to reference a device by + * peripheral name and unit number, though, and it is + * possible to get the bus:target:lun for devices that + * currently exist in the EDT. So this can work for + * devices that we want to reset, or devices that exist + * that we want to rescan, but not devices that do not + * exist yet. + * + * So, we are careful here to look up the bus/target/lun + * for the device the user wants to operate on, specified + * by peripheral instance (e.g. da0, pass32) without + * actually opening that device. The process is similar to + * what cam_lookup_pass() does, except that we don't + * actually open the passthrough driver instance in the end. + */ + + if (cam_get_device(tstr, name, sizeof(name), &unit) == -1) { + warnx("%s", cam_errbuf); + error = 1; + goto bailout; + } + + if ((fd = open(XPT_DEVICE, O_RDWR)) == -1) { + warn("Unable to open %s", XPT_DEVICE); + error = 1; + goto bailout; + } + + bzero(&ccb, sizeof(ccb)); + + /* + * The function code isn't strictly necessary for the + * GETPASSTHRU ioctl. + */ + ccb.ccb_h.func_code = XPT_GDEVLIST; + + /* + * These two are necessary for the GETPASSTHRU ioctl to + * work. + */ + strlcpy(ccb.cgdl.periph_name, name, + sizeof(ccb.cgdl.periph_name)); + ccb.cgdl.unit_number = unit; + + /* + * Attempt to get the passthrough device. This ioctl will + * fail if the device name is null, if the device doesn't + * exist, or if the passthrough driver isn't in the kernel. + */ + if (ioctl(fd, CAMGETPASSTHRU, &ccb) == -1) { + warn("Unable to find bus:target:lun for device %s%d", + name, unit); + error = 1; + close(fd); + goto bailout; + } + if ((ccb.ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { + const struct cam_status_entry *entry; + + entry = cam_fetch_status_entry(ccb.ccb_h.status); + warnx("Unable to find bus:target_lun for device %s%d, " + "CAM status: %s (%#x)", name, unit, + entry ? entry->status_text : "Unknown", + ccb.ccb_h.status); + error = 1; + close(fd); + goto bailout; + } + + /* + * The kernel fills in the bus/target/lun. We don't + * need the passthrough device name and unit number since + * we aren't going to open it. + */ + bus = ccb.ccb_h.path_id; + target = ccb.ccb_h.target_id; + lun = ccb.ccb_h.target_lun; + + arglist |= CAM_ARG_BUS | CAM_ARG_TARGET | CAM_ARG_LUN; + + close(fd); } if ((arglist & CAM_ARG_BUS) @@ -3141,6 +3236,8 @@ dorescan_or_reset(int argc, char **argv, else error = rescan_or_reset_bus(bus, rescan); +bailout: + return(error); } @@ -8739,8 +8836,8 @@ usage(int printlong) " camcontrol eject [dev_id][generic args]\n" " camcontrol reprobe [dev_id][generic args]\n" #endif /* MINIMALISTIC */ -" camcontrol rescan \n" -" camcontrol reset \n" +" camcontrol rescan \n" +" camcontrol reset \n" #ifndef MINIMALISTIC " camcontrol defects [dev_id][generic args] <-f format> [-P][-G]\n" " [-q][-s][-S offset][-X]\n" @@ -8811,8 +8908,8 @@ usage(int printlong) "load send a Start Unit command to the device with the load bit set\n" "eject send a Stop Unit command to the device with the eject bit set\n" "reprobe update capacity information of the given device\n" -"rescan rescan all busses, the given bus, or bus:target:lun\n" -"reset reset all busses, the given bus, or bus:target:lun\n" +"rescan rescan all buses, the given bus, bus:target:lun or device\n" +"reset reset all buses, the given bus, bus:target:lun or device\n" "defects read the defect list of the specified device\n" "modepage display or edit (-e) the given mode page\n" "cmd send the given SCSI command, may need -i or -o as well\n" From owner-svn-src-stable@freebsd.org Mon May 8 17:21:59 2017 Return-Path: Delivered-To: svn-src-stable@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 29B55D63DCE; Mon, 8 May 2017 17:21:59 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C4E441997; Mon, 8 May 2017 17:21:58 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v48HLvPL047325; Mon, 8 May 2017 17:21:57 GMT (envelope-from ken@FreeBSD.org) Received: (from ken@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v48HLvAQ047324; Mon, 8 May 2017 17:21:57 GMT (envelope-from ken@FreeBSD.org) Message-Id: <201705081721.v48HLvAQ047324@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ken set sender to ken@FreeBSD.org using -f From: "Kenneth D. Merry" Date: Mon, 8 May 2017 17:21: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: r317962 - stable/10/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@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 17:21:59 -0000 Author: ken Date: Mon May 8 17:21:57 2017 New Revision: 317962 URL: https://svnweb.freebsd.org/changeset/base/317962 Log: MFC r317799: Add the SCSI Solid State Media Log page (0x11) definition. sys/cam/scsi/scsi_all.h: Add the SCSI Solid State Media log page (0x11) structure definition. This gives the percentage used (in terms of lifetime flash wear) of an SSD. Sponsored by: Spectra Logic Modified: stable/10/sys/cam/scsi/scsi_all.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/scsi/scsi_all.h ============================================================================== --- stable/10/sys/cam/scsi/scsi_all.h Mon May 8 17:21:55 2017 (r317961) +++ stable/10/sys/cam/scsi/scsi_all.h Mon May 8 17:21:57 2017 (r317962) @@ -565,6 +565,7 @@ struct scsi_log_sense #define SLS_ERROR_LASTN_PAGE 0x07 #define SLS_LOGICAL_BLOCK_PROVISIONING 0x0c #define SLS_SELF_TEST_PAGE 0x10 +#define SLS_SOLID_STATE_MEDIA 0x11 #define SLS_STAT_AND_PERF 0x19 #define SLS_IE_PAGE 0x2f #define SLS_PAGE_CTRL_MASK 0xC0 @@ -624,6 +625,13 @@ struct scsi_log_param_header { u_int8_t param_len; }; +struct scsi_log_media_pct_used { + struct scsi_log_param_header hdr; +#define SLP_SS_MEDIA_PCT_USED 0x0001 + uint8_t reserved[3]; + uint8_t pct_used; +}; + struct scsi_log_stat_and_perf { struct scsi_log_param_header hdr; #define SLP_SAP 0x0001 From owner-svn-src-stable@freebsd.org Mon May 8 17:21:57 2017 Return-Path: Delivered-To: svn-src-stable@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 86551D63DC2; Mon, 8 May 2017 17:21:57 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3EDDE1979; Mon, 8 May 2017 17:21:57 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v48HLuP8047254; Mon, 8 May 2017 17:21:56 GMT (envelope-from ken@FreeBSD.org) Received: (from ken@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v48HLuTx047253; Mon, 8 May 2017 17:21:56 GMT (envelope-from ken@FreeBSD.org) Message-Id: <201705081721.v48HLuTx047253@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ken set sender to ken@FreeBSD.org using -f From: "Kenneth D. Merry" Date: Mon, 8 May 2017 17:21:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r317961 - stable/11/sys/cam/scsi X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 17:21:57 -0000 Author: ken Date: Mon May 8 17:21:55 2017 New Revision: 317961 URL: https://svnweb.freebsd.org/changeset/base/317961 Log: MFC r317799: Add the SCSI Solid State Media Log page (0x11) definition. sys/cam/scsi/scsi_all.h: Add the SCSI Solid State Media log page (0x11) structure definition. This gives the percentage used (in terms of lifetime flash wear) of an SSD. Sponsored by: Spectra Logic Modified: stable/11/sys/cam/scsi/scsi_all.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cam/scsi/scsi_all.h ============================================================================== --- stable/11/sys/cam/scsi/scsi_all.h Mon May 8 17:14:01 2017 (r317960) +++ stable/11/sys/cam/scsi/scsi_all.h Mon May 8 17:21:55 2017 (r317961) @@ -565,6 +565,7 @@ struct scsi_log_sense #define SLS_ERROR_LASTN_PAGE 0x07 #define SLS_LOGICAL_BLOCK_PROVISIONING 0x0c #define SLS_SELF_TEST_PAGE 0x10 +#define SLS_SOLID_STATE_MEDIA 0x11 #define SLS_STAT_AND_PERF 0x19 #define SLS_IE_PAGE 0x2f #define SLS_PAGE_CTRL_MASK 0xC0 @@ -624,6 +625,13 @@ struct scsi_log_param_header { u_int8_t param_len; }; +struct scsi_log_media_pct_used { + struct scsi_log_param_header hdr; +#define SLP_SS_MEDIA_PCT_USED 0x0001 + uint8_t reserved[3]; + uint8_t pct_used; +}; + struct scsi_log_stat_and_perf { struct scsi_log_param_header hdr; #define SLP_SAP 0x0001 From owner-svn-src-stable@freebsd.org Mon May 8 17:55:52 2017 Return-Path: Delivered-To: svn-src-stable@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 ADA72D6391D; Mon, 8 May 2017 17:55:52 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6C50610F5; Mon, 8 May 2017 17:55:52 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v48Htp71061230; Mon, 8 May 2017 17:55:51 GMT (envelope-from ken@FreeBSD.org) Received: (from ken@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v48HtpEb061227; Mon, 8 May 2017 17:55:51 GMT (envelope-from ken@FreeBSD.org) Message-Id: <201705081755.v48HtpEb061227@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ken set sender to ken@FreeBSD.org using -f From: "Kenneth D. Merry" Date: Mon, 8 May 2017 17:55: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: r317964 - in stable/10: share/man/man4 sys/cam/scsi usr.bin/mt 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@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 17:55:52 -0000 Author: ken Date: Mon May 8 17:55:51 2017 New Revision: 317964 URL: https://svnweb.freebsd.org/changeset/base/317964 Log: MFC r317848: Add basic programmable early warning error injection to the sa(4) driver. This will help application developers simulate end of tape conditions. To inject an error in sa0: sysctl kern.cam.sa.0.inject_eom=1 This will return the next read or write request queued with 0 bytes written. Any subsequent writes or reads will go along as usual. This will also cause the early warning position flag to get set for the next position query. So, 'mt status' will show the BPEW (Beyond Programmable Early Warning) flag on the first query after an error injection. After that, the position flags will be as they are in the underlying tape drive. Also, update the sa(4) man page to describe tape parameters, which can be set via 'mt param'. sys/cam/scsi/scsi_sa.c: In saregister(), create the inject_eom sysctl variable. In sastart(), check to see whether inject_eom is set. If so, return the read or write with 0 bytes written to indicate EOM. Set the set_pews_status flag so that we fake PEWS status in the next position call for reads, and the next 3 calls for writes. This allows the user to see the BPEW flag one time via 'mt status'. In sagetpos(), check the set_pews_status flag and fake PEWS status and decrement the counter if it is set. share/man/man4/sa.4: Document the inject_eom sysctl variable. Document all of the parameters currently supported via 'mt param'. usr.bin/mt/mt.1: Point the user to the sa(4) man page for more details on supported parameters. Sponsored by: Spectra Logic Modified: stable/10/share/man/man4/sa.4 stable/10/sys/cam/scsi/scsi_sa.c stable/10/usr.bin/mt/mt.1 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/sa.4 ============================================================================== --- stable/10/share/man/man4/sa.4 Mon May 8 17:55:49 2017 (r317963) +++ stable/10/share/man/man4/sa.4 Mon May 8 17:55:51 2017 (r317964) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 12, 2015 +.Dd May 5, 2017 .Dt SA 4 .Os .Sh NAME @@ -242,6 +242,87 @@ These devices include the QIC family of block devices. This has not been determined yet, and they are treated as separate behaviors by the driver at this time.) +.Sh PARAMETERS +The +.Nm +driver supports a number of parameters. +The user can query parameters using +.Dq mt param -l +(which uses the +.Dv MTIOCPARAMGET +ioctl) and the user can set parameters using +.Dq mt param -s +(which uses the +.Dv MTIOCPARAMSET +ioctl). +See +.Xr mt 1 +and +.Xr mtio 4 +for more details on the interface. +.Pp +Supported parameters: +.Bl -tag -width 5n +.It sili +The default is 0. +When set to 1, it sets the Suppress Incorrect Length Indicator (SILI) bit +on tape reads. +Tape drives normally return sense data (which contains the residual) when the +application reads a block that is not the same length as the amount of data +requested. +The SILI bit supresses that notification in most cases. +See the SSC-5 spec (available at t10.org), specifically the section on the +READ(6) command, for more information. +.It eot_warn +The default is 0. +By default, the +.Nm +driver reports entering Programmable Early Warning, Early Warning and End +of Media conditions by returning a write with 0 bytes written, and +.Dv errno +set to 0. +If +.Va eot_warn +is set to 1, the +.Nm +driver will set +.Dv errno +to +.Dv ENOSPC +when it enters any of the out of space conditions. +.It protection.protection_supported +This is a read-only parameter, and is set to 1 if the tape drive supports +protection information. +.It protection.prot_method +If protection is supported, set this to the desired protection method +supported by the tape drive. +As of SSC-5r03 (available at t10.org), the protection method values are: +.Bl -tag -width 3n +.It 0 +No protection. +.It 1 +Reed-Solomon CRC, 4 bytes in length. +.It 2 +CRC32C, 4 bytes in length. +.El +.It protection.pi_length +Length of the protection information, see above for lengths. +.It protection.lbp_w +If set to 1, enable logical block protection on writes. +The CRC must be appended to the end of the block written to the tape driver. +The tape drive will verify the CRC when it receives the block. +.It protection.lbp_r +If set to 1, enable logical block protection on reads. +The CRC will be appended to the end of the block read from the tape driver. +The application should verify the CRC when it receives the block. +.It protection.rdbp +If set to 1, enable logical block protection on the RECOVER BUFFERED DATA +command. +The +.Nm +driver does not currently use the +RECOVER BUFFERED DATA command. +.El .Sh IOCTLS The .Nm @@ -262,7 +343,26 @@ Control mode device (to examine state wh accessing the device, e.g.). .El .Sh DIAGNOSTICS -None. +The +.Nm +driver supports injecting End Of Media (EOM) notification to aid +application development and testing. +EOM is indicated to the application by returning the read or write with 0 +bytes written. +In addition, when EOM is injected, the tape position status will be updated +to temporarily show Beyond of the Programmable Early Warning (BPEW) status. +To see BPEW status, use the +.Dv MTIOCEXTGET +ioctl, which is used by the +.Dq mt status +command. +To inject an EOM notification, set the +.Pp +.Va kern.cam.sa.%d.inject_eom +.Pp +sysctl variable to 1. +One EOM notification will be sent, BPEW status will be set for one position +query, and then the driver state will be reset to normal. .Sh SEE ALSO .Xr cam 4 , .Xr mt 1 Modified: stable/10/sys/cam/scsi/scsi_sa.c ============================================================================== --- stable/10/sys/cam/scsi/scsi_sa.c Mon May 8 17:55:49 2017 (r317963) +++ stable/10/sys/cam/scsi/scsi_sa.c Mon May 8 17:55:51 2017 (r317964) @@ -337,6 +337,8 @@ struct sa_softc { u_int32_t maxio; u_int32_t cpi_maxio; int allow_io_split; + int inject_eom; + int set_pews_status; u_int32_t comp_algorithm; u_int32_t saved_comp_algorithm; u_int32_t media_blksize; @@ -2322,6 +2324,9 @@ sasysctlinit(void *context, int pending) SYSCTL_ADD_INT(&softc->sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree), OID_AUTO, "cpi_maxio", CTLFLAG_RD, &softc->cpi_maxio, 0, "Maximum Controller I/O size"); + SYSCTL_ADD_INT(&softc->sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree), + OID_AUTO, "inject_eom", CTLFLAG_RW, + &softc->inject_eom, 0, "Queue EOM for the next write/read"); bailout: /* @@ -2587,8 +2592,27 @@ sastart(struct cam_periph *periph, union bp = bioq_first(&softc->bio_queue); if (bp == NULL) { xpt_release_ccb(start_ccb); - } else if ((softc->flags & SA_FLAG_ERR_PENDING) != 0) { + } else if (((softc->flags & SA_FLAG_ERR_PENDING) != 0) + || (softc->inject_eom != 0)) { struct bio *done_bp; + + if (softc->inject_eom != 0) { + softc->flags |= SA_FLAG_EOM_PENDING; + softc->inject_eom = 0; + /* + * If we're injecting EOM for writes, we + * need to keep PEWS set for 3 queries + * to cover 2 position requests from the + * kernel via sagetpos(), and then allow + * for one for the user to see the BPEW + * flag (e.g. via mt status). After that, + * it will be cleared. + */ + if (bp->bio_cmd == BIO_WRITE) + softc->set_pews_status = 3; + else + softc->set_pews_status = 1; + } again: softc->queue_count--; bioq_remove(&softc->bio_queue, bp); @@ -4841,9 +4865,12 @@ sagetpos(struct cam_periph *periph) else softc->eop = 0; - if (long_pos.flags & SA_RPOS_LONG_BPEW) + if ((long_pos.flags & SA_RPOS_LONG_BPEW) + || (softc->set_pews_status != 0)) { softc->bpew = 1; - else + if (softc->set_pews_status > 0) + softc->set_pews_status--; + } else softc->bpew = 0; } else if (error == EINVAL) { /* Modified: stable/10/usr.bin/mt/mt.1 ============================================================================== --- stable/10/usr.bin/mt/mt.1 Mon May 8 17:55:49 2017 (r317963) +++ stable/10/usr.bin/mt/mt.1 Mon May 8 17:55:51 2017 (r317964) @@ -29,7 +29,7 @@ .\" @(#)mt.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd May 20, 2016 +.Dd May 5, 2017 .Dt MT 1 .Os .Sh NAME @@ -284,6 +284,9 @@ One of or .Fl x must be specified to indicate which operation to perform. +See +.Xr sa 4 +for more detailed information on the parameters. .Bl -tag -width 8n .It Fl l List parameters, values and descriptions. From owner-svn-src-stable@freebsd.org Mon May 8 17:55:51 2017 Return-Path: Delivered-To: svn-src-stable@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 DC722D63918; Mon, 8 May 2017 17:55:51 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5AA0F10E1; Mon, 8 May 2017 17:55:51 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v48Hto95061185; Mon, 8 May 2017 17:55:50 GMT (envelope-from ken@FreeBSD.org) Received: (from ken@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v48HtoYk061181; Mon, 8 May 2017 17:55:50 GMT (envelope-from ken@FreeBSD.org) Message-Id: <201705081755.v48HtoYk061181@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ken set sender to ken@FreeBSD.org using -f From: "Kenneth D. Merry" Date: Mon, 8 May 2017 17:55:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r317963 - in stable/11: share/man/man4 sys/cam/scsi usr.bin/mt X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 17:55:52 -0000 Author: ken Date: Mon May 8 17:55:49 2017 New Revision: 317963 URL: https://svnweb.freebsd.org/changeset/base/317963 Log: MFC r317848: Add basic programmable early warning error injection to the sa(4) driver. This will help application developers simulate end of tape conditions. To inject an error in sa0: sysctl kern.cam.sa.0.inject_eom=1 This will return the next read or write request queued with 0 bytes written. Any subsequent writes or reads will go along as usual. This will also cause the early warning position flag to get set for the next position query. So, 'mt status' will show the BPEW (Beyond Programmable Early Warning) flag on the first query after an error injection. After that, the position flags will be as they are in the underlying tape drive. Also, update the sa(4) man page to describe tape parameters, which can be set via 'mt param'. sys/cam/scsi/scsi_sa.c: In saregister(), create the inject_eom sysctl variable. In sastart(), check to see whether inject_eom is set. If so, return the read or write with 0 bytes written to indicate EOM. Set the set_pews_status flag so that we fake PEWS status in the next position call for reads, and the next 3 calls for writes. This allows the user to see the BPEW flag one time via 'mt status'. In sagetpos(), check the set_pews_status flag and fake PEWS status and decrement the counter if it is set. share/man/man4/sa.4: Document the inject_eom sysctl variable. Document all of the parameters currently supported via 'mt param'. usr.bin/mt/mt.1: Point the user to the sa(4) man page for more details on supported parameters. Sponsored by: Spectra Logic Modified: stable/11/share/man/man4/sa.4 stable/11/sys/cam/scsi/scsi_sa.c stable/11/usr.bin/mt/mt.1 Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man4/sa.4 ============================================================================== --- stable/11/share/man/man4/sa.4 Mon May 8 17:21:57 2017 (r317962) +++ stable/11/share/man/man4/sa.4 Mon May 8 17:55:49 2017 (r317963) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 12, 2015 +.Dd May 5, 2017 .Dt SA 4 .Os .Sh NAME @@ -242,6 +242,87 @@ These devices include the QIC family of block devices. This has not been determined yet, and they are treated as separate behaviors by the driver at this time.) +.Sh PARAMETERS +The +.Nm +driver supports a number of parameters. +The user can query parameters using +.Dq mt param -l +(which uses the +.Dv MTIOCPARAMGET +ioctl) and the user can set parameters using +.Dq mt param -s +(which uses the +.Dv MTIOCPARAMSET +ioctl). +See +.Xr mt 1 +and +.Xr mtio 4 +for more details on the interface. +.Pp +Supported parameters: +.Bl -tag -width 5n +.It sili +The default is 0. +When set to 1, it sets the Suppress Incorrect Length Indicator (SILI) bit +on tape reads. +Tape drives normally return sense data (which contains the residual) when the +application reads a block that is not the same length as the amount of data +requested. +The SILI bit supresses that notification in most cases. +See the SSC-5 spec (available at t10.org), specifically the section on the +READ(6) command, for more information. +.It eot_warn +The default is 0. +By default, the +.Nm +driver reports entering Programmable Early Warning, Early Warning and End +of Media conditions by returning a write with 0 bytes written, and +.Dv errno +set to 0. +If +.Va eot_warn +is set to 1, the +.Nm +driver will set +.Dv errno +to +.Dv ENOSPC +when it enters any of the out of space conditions. +.It protection.protection_supported +This is a read-only parameter, and is set to 1 if the tape drive supports +protection information. +.It protection.prot_method +If protection is supported, set this to the desired protection method +supported by the tape drive. +As of SSC-5r03 (available at t10.org), the protection method values are: +.Bl -tag -width 3n +.It 0 +No protection. +.It 1 +Reed-Solomon CRC, 4 bytes in length. +.It 2 +CRC32C, 4 bytes in length. +.El +.It protection.pi_length +Length of the protection information, see above for lengths. +.It protection.lbp_w +If set to 1, enable logical block protection on writes. +The CRC must be appended to the end of the block written to the tape driver. +The tape drive will verify the CRC when it receives the block. +.It protection.lbp_r +If set to 1, enable logical block protection on reads. +The CRC will be appended to the end of the block read from the tape driver. +The application should verify the CRC when it receives the block. +.It protection.rdbp +If set to 1, enable logical block protection on the RECOVER BUFFERED DATA +command. +The +.Nm +driver does not currently use the +RECOVER BUFFERED DATA command. +.El .Sh IOCTLS The .Nm @@ -262,7 +343,26 @@ Control mode device (to examine state wh accessing the device, e.g.). .El .Sh DIAGNOSTICS -None. +The +.Nm +driver supports injecting End Of Media (EOM) notification to aid +application development and testing. +EOM is indicated to the application by returning the read or write with 0 +bytes written. +In addition, when EOM is injected, the tape position status will be updated +to temporarily show Beyond of the Programmable Early Warning (BPEW) status. +To see BPEW status, use the +.Dv MTIOCEXTGET +ioctl, which is used by the +.Dq mt status +command. +To inject an EOM notification, set the +.Pp +.Va kern.cam.sa.%d.inject_eom +.Pp +sysctl variable to 1. +One EOM notification will be sent, BPEW status will be set for one position +query, and then the driver state will be reset to normal. .Sh SEE ALSO .Xr mt 1 , .Xr cam 4 Modified: stable/11/sys/cam/scsi/scsi_sa.c ============================================================================== --- stable/11/sys/cam/scsi/scsi_sa.c Mon May 8 17:21:57 2017 (r317962) +++ stable/11/sys/cam/scsi/scsi_sa.c Mon May 8 17:55:49 2017 (r317963) @@ -337,6 +337,8 @@ struct sa_softc { u_int32_t maxio; u_int32_t cpi_maxio; int allow_io_split; + int inject_eom; + int set_pews_status; u_int32_t comp_algorithm; u_int32_t saved_comp_algorithm; u_int32_t media_blksize; @@ -2323,6 +2325,9 @@ sasysctlinit(void *context, int pending) SYSCTL_ADD_INT(&softc->sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree), OID_AUTO, "cpi_maxio", CTLFLAG_RD, &softc->cpi_maxio, 0, "Maximum Controller I/O size"); + SYSCTL_ADD_INT(&softc->sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree), + OID_AUTO, "inject_eom", CTLFLAG_RW, + &softc->inject_eom, 0, "Queue EOM for the next write/read"); bailout: /* @@ -2588,8 +2593,27 @@ sastart(struct cam_periph *periph, union bp = bioq_first(&softc->bio_queue); if (bp == NULL) { xpt_release_ccb(start_ccb); - } else if ((softc->flags & SA_FLAG_ERR_PENDING) != 0) { + } else if (((softc->flags & SA_FLAG_ERR_PENDING) != 0) + || (softc->inject_eom != 0)) { struct bio *done_bp; + + if (softc->inject_eom != 0) { + softc->flags |= SA_FLAG_EOM_PENDING; + softc->inject_eom = 0; + /* + * If we're injecting EOM for writes, we + * need to keep PEWS set for 3 queries + * to cover 2 position requests from the + * kernel via sagetpos(), and then allow + * for one for the user to see the BPEW + * flag (e.g. via mt status). After that, + * it will be cleared. + */ + if (bp->bio_cmd == BIO_WRITE) + softc->set_pews_status = 3; + else + softc->set_pews_status = 1; + } again: softc->queue_count--; bioq_remove(&softc->bio_queue, bp); @@ -4842,9 +4866,12 @@ sagetpos(struct cam_periph *periph) else softc->eop = 0; - if (long_pos.flags & SA_RPOS_LONG_BPEW) + if ((long_pos.flags & SA_RPOS_LONG_BPEW) + || (softc->set_pews_status != 0)) { softc->bpew = 1; - else + if (softc->set_pews_status > 0) + softc->set_pews_status--; + } else softc->bpew = 0; } else if (error == EINVAL) { /* Modified: stable/11/usr.bin/mt/mt.1 ============================================================================== --- stable/11/usr.bin/mt/mt.1 Mon May 8 17:21:57 2017 (r317962) +++ stable/11/usr.bin/mt/mt.1 Mon May 8 17:55:49 2017 (r317963) @@ -29,7 +29,7 @@ .\" @(#)mt.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd May 20, 2016 +.Dd May 5, 2017 .Dt MT 1 .Os .Sh NAME @@ -284,6 +284,9 @@ One of or .Fl x must be specified to indicate which operation to perform. +See +.Xr sa 4 +for more detailed information on the parameters. .Bl -tag -width 8n .It Fl l List parameters, values and descriptions. From owner-svn-src-stable@freebsd.org Mon May 8 18:30:58 2017 Return-Path: Delivered-To: svn-src-stable@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 A5477D63ACE; Mon, 8 May 2017 18:30:58 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 36C061047; Mon, 8 May 2017 18:30:58 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v48IUvTl074010; Mon, 8 May 2017 18:30:57 GMT (envelope-from ken@FreeBSD.org) Received: (from ken@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v48IUvP9074009; Mon, 8 May 2017 18:30:57 GMT (envelope-from ken@FreeBSD.org) Message-Id: <201705081830.v48IUvP9074009@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ken set sender to ken@FreeBSD.org using -f From: "Kenneth D. Merry" Date: Mon, 8 May 2017 18:30: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: r317966 - stable/10/sbin/camcontrol 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@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 18:30:58 -0000 Author: ken Date: Mon May 8 18:30:56 2017 New Revision: 317966 URL: https://svnweb.freebsd.org/changeset/base/317966 Log: MFC r317854: When editing a mode page on a tape drive, do not clear the device specific parameter. Tape drives include write protect (WP), Buffered Mode and Speed settings in the device-specific parameter. Clearing this parameter on a mode select can have the effect of turning off write protect or buffered mode, or changing the speed setting of the tape drive. Disks report DPO/FUA support via the device specific parameter for MODE SENSE, but the bit is reserved for MODE SELECT. So we clear this for disks (and other non-tape devices) to avoid potential errors from the target device. sbin/camcontrol/modeedit.c: Clear the device-specific parameter in the mode page header if we're not operating on a tape drive. Sponsored by: Spectra Logic Modified: stable/10/sbin/camcontrol/modeedit.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/camcontrol/modeedit.c ============================================================================== --- stable/10/sbin/camcontrol/modeedit.c Mon May 8 18:30:55 2017 (r317965) +++ stable/10/sbin/camcontrol/modeedit.c Mon May 8 18:30:56 2017 (r317966) @@ -629,8 +629,21 @@ editlist_save(struct cam_device *device, /* Recalculate headers & offsets. */ mh->data_length = 0; /* Reserved for MODE SELECT command. */ - mh->dev_spec = 0; /* Clear device-specific parameters. */ mh->blk_desc_len = 0; /* No block descriptors. */ + /* + * Tape drives include write protect (WP), Buffered Mode and Speed + * settings in the device-specific parameter. Clearing this + * parameter on a mode select can have the effect of turning off + * write protect or buffered mode, or changing the speed setting of + * the tape drive. + * + * Disks report DPO/FUA support via the device specific parameter + * for MODE SENSE, but the bit is reserved for MODE SELECT. So we + * clear this for disks (and other non-tape devices) to avoid + * potential errors from the target device. + */ + if (device->pd_type != T_SEQUENTIAL) + mh->dev_spec = 0; mph = MODE_PAGE_HEADER(mh); mph->page_code &= ~SMPH_PS; /* Reserved for MODE SELECT command. */ From owner-svn-src-stable@freebsd.org Mon May 8 18:30:56 2017 Return-Path: Delivered-To: svn-src-stable@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 BCEE8D63AB8; Mon, 8 May 2017 18:30:56 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5BF1C1026; Mon, 8 May 2017 18:30:56 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v48IUtXP073961; Mon, 8 May 2017 18:30:55 GMT (envelope-from ken@FreeBSD.org) Received: (from ken@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v48IUt6Y073960; Mon, 8 May 2017 18:30:55 GMT (envelope-from ken@FreeBSD.org) Message-Id: <201705081830.v48IUt6Y073960@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ken set sender to ken@FreeBSD.org using -f From: "Kenneth D. Merry" Date: Mon, 8 May 2017 18:30:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r317965 - stable/11/sbin/camcontrol X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 18:30:57 -0000 Author: ken Date: Mon May 8 18:30:55 2017 New Revision: 317965 URL: https://svnweb.freebsd.org/changeset/base/317965 Log: MFC r317854: When editing a mode page on a tape drive, do not clear the device specific parameter. Tape drives include write protect (WP), Buffered Mode and Speed settings in the device-specific parameter. Clearing this parameter on a mode select can have the effect of turning off write protect or buffered mode, or changing the speed setting of the tape drive. Disks report DPO/FUA support via the device specific parameter for MODE SENSE, but the bit is reserved for MODE SELECT. So we clear this for disks (and other non-tape devices) to avoid potential errors from the target device. sbin/camcontrol/modeedit.c: Clear the device-specific parameter in the mode page header if we're not operating on a tape drive. Sponsored by: Spectra Logic Modified: stable/11/sbin/camcontrol/modeedit.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/camcontrol/modeedit.c ============================================================================== --- stable/11/sbin/camcontrol/modeedit.c Mon May 8 17:55:51 2017 (r317964) +++ stable/11/sbin/camcontrol/modeedit.c Mon May 8 18:30:55 2017 (r317965) @@ -629,8 +629,21 @@ editlist_save(struct cam_device *device, /* Recalculate headers & offsets. */ mh->data_length = 0; /* Reserved for MODE SELECT command. */ - mh->dev_spec = 0; /* Clear device-specific parameters. */ mh->blk_desc_len = 0; /* No block descriptors. */ + /* + * Tape drives include write protect (WP), Buffered Mode and Speed + * settings in the device-specific parameter. Clearing this + * parameter on a mode select can have the effect of turning off + * write protect or buffered mode, or changing the speed setting of + * the tape drive. + * + * Disks report DPO/FUA support via the device specific parameter + * for MODE SENSE, but the bit is reserved for MODE SELECT. So we + * clear this for disks (and other non-tape devices) to avoid + * potential errors from the target device. + */ + if (device->pd_type != T_SEQUENTIAL) + mh->dev_spec = 0; mph = MODE_PAGE_HEADER(mh); mph->page_code &= ~SMPH_PS; /* Reserved for MODE SELECT command. */ From owner-svn-src-stable@freebsd.org Mon May 8 19:23:00 2017 Return-Path: Delivered-To: svn-src-stable@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 6F985D633AA; Mon, 8 May 2017 19:23:00 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 2FA0C38E; Mon, 8 May 2017 19:23:00 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v48JMxX4098908; Mon, 8 May 2017 19:22:59 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v48JMxSe098907; Mon, 8 May 2017 19:22:59 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201705081922.v48JMxSe098907@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Mon, 8 May 2017 19:22:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r317970 - stable/11/sys/contrib/vchiq/interface/vchiq_arm X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 19:23:00 -0000 Author: gonzo Date: Mon May 8 19:22:59 2017 New Revision: 317970 URL: https://svnweb.freebsd.org/changeset/base/317970 Log: MFC r310560: [vchi] replace non-reproducible __DATE__/__TIME__ with hardcoded string Although vchiq_build_date and vchiq_build_time are not used in current vchi driver at the moment, make sure these value will not leak into build later on if at some point they will be refered in some new imported code PR: 215494 Reported by: emaste Modified: stable/11/sys/contrib/vchiq/interface/vchiq_arm/vchiq_version.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/contrib/vchiq/interface/vchiq_arm/vchiq_version.c ============================================================================== --- stable/11/sys/contrib/vchiq/interface/vchiq_arm/vchiq_version.c Mon May 8 19:20:55 2017 (r317969) +++ stable/11/sys/contrib/vchiq/interface/vchiq_arm/vchiq_version.c Mon May 8 19:22:59 2017 (r317970) @@ -35,8 +35,8 @@ VC_DEBUG_DECLARE_STRING_VAR( vchiq_build_hostname, "dc4-arm-01" ); VC_DEBUG_DECLARE_STRING_VAR( vchiq_build_version, "9245b4c35b99b3870e1f7dc598c5692b3c66a6f0 (tainted)" ); -VC_DEBUG_DECLARE_STRING_VAR( vchiq_build_time, __TIME__ ); -VC_DEBUG_DECLARE_STRING_VAR( vchiq_build_date, __DATE__ ); +VC_DEBUG_DECLARE_STRING_VAR( vchiq_build_time, "not available" ); +VC_DEBUG_DECLARE_STRING_VAR( vchiq_build_date, "not available" ); const char *vchiq_get_build_hostname( void ) { From owner-svn-src-stable@freebsd.org Mon May 8 19:50:36 2017 Return-Path: Delivered-To: svn-src-stable@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 DBE99D63EFD; Mon, 8 May 2017 19:50:36 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9C5B41D55; Mon, 8 May 2017 19:50:36 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v48JoZ7b007517; Mon, 8 May 2017 19:50:35 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v48JoZbI007515; Mon, 8 May 2017 19:50:35 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201705081950.v48JoZbI007515@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Mon, 8 May 2017 19:50:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r317973 - stable/11/sys/fs/nfsclient X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 19:50:37 -0000 Author: rmacklem Date: Mon May 8 19:50:35 2017 New Revision: 317973 URL: https://svnweb.freebsd.org/changeset/base/317973 Log: MFC: r317296 Fix some krpc leaks for the NFSv4.1/pNFS client. The NFSv4.1/pNFS client wasn't doing a newnfs_disconnect() call for the connection to the Data Server (DS) under some circumstances. The main effect of this was a leak of malloc'd structures in the krpc. This patch adds the newnfs_disconnect() calls to fix this. Detected during recent testing against the pNFS server under development. Modified: stable/11/sys/fs/nfsclient/nfs_clrpcops.c stable/11/sys/fs/nfsclient/nfs_clvfsops.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/fs/nfsclient/nfs_clrpcops.c ============================================================================== --- stable/11/sys/fs/nfsclient/nfs_clrpcops.c Mon May 8 19:46:33 2017 (r317972) +++ stable/11/sys/fs/nfsclient/nfs_clrpcops.c Mon May 8 19:50:35 2017 (r317973) @@ -5399,10 +5399,13 @@ nfsrpc_fillsa(struct nfsmount *nmp, stru NFSCL_DEBUG(3, "DS connect=%d\n", error); /* Now, do the exchangeid and create session. */ - if (error == 0) + if (error == 0) { error = nfsrpc_exchangeid(nmp, clp, nrp, NFSV4EXCH_USEPNFSDS, &dsp, nrp->nr_cred, p); - NFSCL_DEBUG(3, "DS exchangeid=%d\n", error); + NFSCL_DEBUG(3, "DS exchangeid=%d\n", error); + if (error != 0) + newnfs_disconnect(nrp); + } if (error == 0) { dsp->nfsclds_sockp = nrp; NFSLOCKMNT(nmp); @@ -5445,8 +5448,10 @@ nfsrpc_fillsa(struct nfsmount *nmp, stru TAILQ_INSERT_TAIL(&nmp->nm_sess, dsp, nfsclds_list); NFSUNLOCKMNT(nmp); *dspp = dsp; - } else if (dsp != NULL) + } else if (dsp != NULL) { + newnfs_disconnect(nrp); nfscl_freenfsclds(dsp); + } return (error); } Modified: stable/11/sys/fs/nfsclient/nfs_clvfsops.c ============================================================================== --- stable/11/sys/fs/nfsclient/nfs_clvfsops.c Mon May 8 19:46:33 2017 (r317972) +++ stable/11/sys/fs/nfsclient/nfs_clvfsops.c Mon May 8 19:50:35 2017 (r317973) @@ -1643,8 +1643,12 @@ bad: NFSUNLOCKCLSTATE(); free(nmp->nm_clp, M_NFSCLCLIENT); } - TAILQ_FOREACH_SAFE(dsp, &nmp->nm_sess, nfsclds_list, tdsp) + TAILQ_FOREACH_SAFE(dsp, &nmp->nm_sess, nfsclds_list, tdsp) { + if (dsp != TAILQ_FIRST(&nmp->nm_sess) && + dsp->nfsclds_sockp != NULL) + newnfs_disconnect(dsp->nfsclds_sockp); nfscl_freenfsclds(dsp); + } FREE(nmp, M_NEWNFSMNT); FREE(nam, M_SONAME); return (error); @@ -1709,8 +1713,12 @@ nfs_unmount(struct mount *mp, int mntfla AUTH_DESTROY(nmp->nm_sockreq.nr_auth); mtx_destroy(&nmp->nm_sockreq.nr_mtx); mtx_destroy(&nmp->nm_mtx); - TAILQ_FOREACH_SAFE(dsp, &nmp->nm_sess, nfsclds_list, tdsp) + TAILQ_FOREACH_SAFE(dsp, &nmp->nm_sess, nfsclds_list, tdsp) { + if (dsp != TAILQ_FIRST(&nmp->nm_sess) && + dsp->nfsclds_sockp != NULL) + newnfs_disconnect(dsp->nfsclds_sockp); nfscl_freenfsclds(dsp); + } FREE(nmp, M_NEWNFSMNT); out: return (error); From owner-svn-src-stable@freebsd.org Mon May 8 19:57:17 2017 Return-Path: Delivered-To: svn-src-stable@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 8C453D62100; Mon, 8 May 2017 19:57:17 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 160701F94; Mon, 8 May 2017 19:57:16 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v48JvGoK013109; Mon, 8 May 2017 19:57:16 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v48JvGeH013108; Mon, 8 May 2017 19:57:16 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201705081957.v48JvGeH013108@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Mon, 8 May 2017 19:57:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r317974 - stable/11/sys/arm/broadcom/bcm2835 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 19:57:17 -0000 Author: gonzo Date: Mon May 8 19:57:15 2017 New Revision: 317974 URL: https://svnweb.freebsd.org/changeset/base/317974 Log: MFC r308424, r310636 r308424: Fix locking in bcm2835_audio driver - Move all VCHI activity to worker thread: channel methods are called with non-sleepable lock held and VCHI uses sleepable lock. - In worker thread use sx(9) lock instead of mutex(9) for the same reason. PR: 213801, 205979 r310636: [rpi] Fix bcm2835_audio locking and samples starvation Rework general approach to locking and working with audio worker thread: - Use flags to signal requested worker action - Fix submitted buffer calculations to avoid samples starvation - Protect buffer pointers with locks to fix race condition between callback and audio worker thread - Remove unnecessary vchi_service_use - Do not use lock to serialize VCHI requests since only one thread issues them now - Fix unloading signaling per hselasky@ suggestion - Add output to detect inconsistent callback data caused by possible firmware bug https://github.com/raspberrypi/firmware/issues/696 - Add stats/debug sysctls to troubleshoot possible bugs PR: 213687, 205979, 215194 Modified: stable/11/sys/arm/broadcom/bcm2835/bcm2835_audio.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/arm/broadcom/bcm2835/bcm2835_audio.c ============================================================================== --- stable/11/sys/arm/broadcom/bcm2835/bcm2835_audio.c Mon May 8 19:50:35 2017 (r317973) +++ stable/11/sys/arm/broadcom/bcm2835/bcm2835_audio.c Mon May 8 19:57:15 2017 (r317974) @@ -40,13 +40,33 @@ SND_DECLARE_FILE("$FreeBSD$"); +/* Audio destination */ #define DEST_AUTO 0 #define DEST_HEADPHONES 1 #define DEST_HDMI 2 +/* Playback state */ +#define PLAYBACK_IDLE 0 +#define PLAYBACK_PLAYING 1 +#define PLAYBACK_STOPPING 2 + +/* Worker thread state */ +#define WORKER_RUNNING 0 +#define WORKER_STOPPING 1 +#define WORKER_STOPPED 2 + +/* + * Worker thread flags, set to 1 in flags_pending + * when driver requests one or another operation + * from worker. Cleared to 0 once worker performs + * the operations. + */ +#define AUDIO_PARAMS (1 << 0) +#define AUDIO_PLAY (1 << 1) +#define AUDIO_STOP (1 << 2) + #define VCHIQ_AUDIO_PACKET_SIZE 4000 -#define VCHIQ_AUDIO_BUFFER_SIZE 128000 -#define VCHIQ_AUDIO_PREBUFFER 10 /* Number of pre-buffered audio messages */ +#define VCHIQ_AUDIO_BUFFER_SIZE 10*VCHIQ_AUDIO_PACKET_SIZE #define VCHIQ_AUDIO_MAX_VOLUME /* volume in terms of 0.01dB */ @@ -77,22 +97,25 @@ static struct pcmchan_caps bcm2835_audio struct bcm2835_audio_info; -#define PLAYBACK_IDLE 0 -#define PLAYBACK_STARTING 1 -#define PLAYBACK_PLAYING 2 -#define PLAYBACK_STOPPING 3 - struct bcm2835_audio_chinfo { struct bcm2835_audio_info *parent; struct pcm_channel *channel; struct snd_dbuf *buffer; uint32_t fmt, spd, blksz; - uint32_t complete_pos; - uint32_t free_buffer; - uint32_t buffered_ptr; + /* Pointer to first unsubmitted sample */ + uint32_t unsubmittedptr; + /* + * Number of bytes in "submitted but not played" + * pseudo-buffer + */ + int available_space; int playback_state; - int prebuffered; + uint64_t callbacks; + uint64_t submitted_samples; + uint64_t retrieved_samples; + uint64_t underruns; + int starved; }; struct bcm2835_audio_info { @@ -100,29 +123,25 @@ struct bcm2835_audio_info { unsigned int bufsz; struct bcm2835_audio_chinfo pch; uint32_t dest, volume; - struct mtx *lock; struct intr_config_hook intr_hook; /* VCHI data */ - struct mtx vchi_lock; - VCHI_INSTANCE_T vchi_instance; VCHI_CONNECTION_T *vchi_connection; VCHI_SERVICE_HANDLE_T vchi_handle; - struct mtx data_lock; - struct cv data_cv; + struct mtx lock; + struct cv worker_cv; - /* Unloadign module */ - int unloading; -}; + uint32_t flags_pending; -#define bcm2835_audio_lock(_ess) snd_mtxlock((_ess)->lock) -#define bcm2835_audio_unlock(_ess) snd_mtxunlock((_ess)->lock) -#define bcm2835_audio_lock_assert(_ess) snd_mtxassert((_ess)->lock) + /* Worker thread state */ + int worker_state; +}; -#define VCHIQ_VCHI_LOCK(sc) mtx_lock(&(sc)->vchi_lock) -#define VCHIQ_VCHI_UNLOCK(sc) mtx_unlock(&(sc)->vchi_lock) +#define BCM2835_AUDIO_LOCK(sc) mtx_lock(&(sc)->lock) +#define BCM2835_AUDIO_LOCKED(sc) mtx_assert(&(sc)->lock, MA_OWNED) +#define BCM2835_AUDIO_UNLOCK(sc) mtx_unlock(&(sc)->lock) static const char * dest_description(uint32_t dest) @@ -146,6 +165,36 @@ dest_description(uint32_t dest) } static void +bcm2835_worker_update_params(struct bcm2835_audio_info *sc) +{ + + BCM2835_AUDIO_LOCKED(sc); + + sc->flags_pending |= AUDIO_PARAMS; + cv_signal(&sc->worker_cv); +} + +static void +bcm2835_worker_play_start(struct bcm2835_audio_info *sc) +{ + BCM2835_AUDIO_LOCK(sc); + sc->flags_pending &= ~(AUDIO_STOP); + sc->flags_pending |= AUDIO_PLAY; + cv_signal(&sc->worker_cv); + BCM2835_AUDIO_UNLOCK(sc); +} + +static void +bcm2835_worker_play_stop(struct bcm2835_audio_info *sc) +{ + BCM2835_AUDIO_LOCK(sc); + sc->flags_pending &= ~(AUDIO_PLAY); + sc->flags_pending |= AUDIO_STOP; + cv_signal(&sc->worker_cv); + BCM2835_AUDIO_UNLOCK(sc); +} + +static void bcm2835_audio_callback(void *param, const VCHI_CALLBACK_REASON_T reason, void *msg_handle) { struct bcm2835_audio_info *sc = (struct bcm2835_audio_info *)param; @@ -160,7 +209,7 @@ bcm2835_audio_callback(void *param, cons &m, sizeof m, &msg_len, VCHI_FLAGS_NONE); if (m.type == VC_AUDIO_MSG_TYPE_RESULT) { if (m.u.result.success) { - device_printf(sc->dev, + device_printf(sc->dev, "msg type %08x failed\n", m.type); } @@ -169,13 +218,35 @@ bcm2835_audio_callback(void *param, cons int count = m.u.complete.count & 0xffff; int perr = (m.u.complete.count & (1U << 30)) != 0; - - ch->complete_pos = (ch->complete_pos + count) % sndbuf_getsize(ch->buffer); - ch->free_buffer += count; - chn_intr(sc->pch.channel); - - if (perr || ch->free_buffer >= VCHIQ_AUDIO_PACKET_SIZE) - cv_signal(&sc->data_cv); + ch->callbacks++; + if (perr) + ch->underruns++; + + BCM2835_AUDIO_LOCK(sc); + if (ch->playback_state != PLAYBACK_IDLE) { + /* Prevent LOR */ + BCM2835_AUDIO_UNLOCK(sc); + chn_intr(sc->pch.channel); + BCM2835_AUDIO_LOCK(sc); + } + /* We should check again, state might have changed */ + if (ch->playback_state != PLAYBACK_IDLE) { + if (!perr) { + if ((ch->available_space + count)> VCHIQ_AUDIO_BUFFER_SIZE) { + device_printf(sc->dev, "inconsistent data in callback:\n"); + device_printf(sc->dev, "available_space == %d, count = %d, perr=%d\n", + ch->available_space, count, perr); + device_printf(sc->dev, + "retrieved_samples = %lld, submitted_samples = %lld\n", + ch->retrieved_samples, ch->submitted_samples); + } + ch->available_space += count; + ch->retrieved_samples += count; + } + if (perr || (ch->available_space >= VCHIQ_AUDIO_PACKET_SIZE)) + cv_signal(&sc->worker_cv); + } + BCM2835_AUDIO_UNLOCK(sc); } else printf("%s: unknown m.type: %d\n", __func__, m.type); } @@ -215,10 +286,7 @@ bcm2835_audio_init(struct bcm2835_audio_ status = vchi_service_open(sc->vchi_instance, ¶ms, &sc->vchi_handle); - if (status == 0) - /* Finished with the service for now */ - vchi_service_release(sc->vchi_handle); - else + if (status != 0) sc->vchi_handle = VCHIQ_SERVICE_HANDLE_INVALID; } @@ -228,10 +296,10 @@ bcm2835_audio_release(struct bcm2835_aud int success; if (sc->vchi_handle != VCHIQ_SERVICE_HANDLE_INVALID) { - vchi_service_use(sc->vchi_handle); success = vchi_service_close(sc->vchi_handle); if (success != 0) printf("vchi_service_close failed: %d\n", success); + vchi_service_release(sc->vchi_handle); sc->vchi_handle = VCHIQ_SERVICE_HANDLE_INVALID; } @@ -241,12 +309,9 @@ bcm2835_audio_release(struct bcm2835_aud static void bcm2835_audio_reset_channel(struct bcm2835_audio_chinfo *ch) { - ch->free_buffer = VCHIQ_AUDIO_BUFFER_SIZE; - ch->playback_state = 0; - ch->buffered_ptr = 0; - ch->complete_pos = 0; - ch->prebuffered = 0; + ch->available_space = VCHIQ_AUDIO_BUFFER_SIZE; + ch->unsubmittedptr = 0; sndbuf_reset(ch->buffer); } @@ -257,23 +322,14 @@ bcm2835_audio_start(struct bcm2835_audio int ret; struct bcm2835_audio_info *sc = ch->parent; - VCHIQ_VCHI_LOCK(sc); if (sc->vchi_handle != VCHIQ_SERVICE_HANDLE_INVALID) { - vchi_service_use(sc->vchi_handle); - - bcm2835_audio_reset_channel(ch); - m.type = VC_AUDIO_MSG_TYPE_START; ret = vchi_msg_queue(sc->vchi_handle, &m, sizeof m, VCHI_FLAGS_BLOCK_UNTIL_QUEUED, NULL); if (ret != 0) printf("%s: vchi_msg_queue failed (err %d)\n", __func__, ret); - - vchi_service_release(sc->vchi_handle); } - VCHIQ_VCHI_UNLOCK(sc); - } static void @@ -283,10 +339,7 @@ bcm2835_audio_stop(struct bcm2835_audio_ int ret; struct bcm2835_audio_info *sc = ch->parent; - VCHIQ_VCHI_LOCK(sc); if (sc->vchi_handle != VCHIQ_SERVICE_HANDLE_INVALID) { - vchi_service_use(sc->vchi_handle); - m.type = VC_AUDIO_MSG_TYPE_STOP; m.u.stop.draining = 0; @@ -295,10 +348,7 @@ bcm2835_audio_stop(struct bcm2835_audio_ if (ret != 0) printf("%s: vchi_msg_queue failed (err %d)\n", __func__, ret); - - vchi_service_release(sc->vchi_handle); } - VCHIQ_VCHI_UNLOCK(sc); } static void @@ -307,37 +357,28 @@ bcm2835_audio_open(struct bcm2835_audio_ VC_AUDIO_MSG_T m; int ret; - VCHIQ_VCHI_LOCK(sc); if (sc->vchi_handle != VCHIQ_SERVICE_HANDLE_INVALID) { - vchi_service_use(sc->vchi_handle); - m.type = VC_AUDIO_MSG_TYPE_OPEN; ret = vchi_msg_queue(sc->vchi_handle, &m, sizeof m, VCHI_FLAGS_BLOCK_UNTIL_QUEUED, NULL); if (ret != 0) printf("%s: vchi_msg_queue failed (err %d)\n", __func__, ret); - - vchi_service_release(sc->vchi_handle); } - VCHIQ_VCHI_UNLOCK(sc); } static void -bcm2835_audio_update_controls(struct bcm2835_audio_info *sc) +bcm2835_audio_update_controls(struct bcm2835_audio_info *sc, uint32_t volume, uint32_t dest) { VC_AUDIO_MSG_T m; int ret, db; - VCHIQ_VCHI_LOCK(sc); if (sc->vchi_handle != VCHIQ_SERVICE_HANDLE_INVALID) { - vchi_service_use(sc->vchi_handle); - m.type = VC_AUDIO_MSG_TYPE_CONTROL; - m.u.control.dest = sc->dest; - if (sc->volume > 99) - sc->volume = 99; - db = db_levels[sc->volume/5]; + m.u.control.dest = dest; + if (volume > 99) + volume = 99; + db = db_levels[volume/5]; m.u.control.volume = VCHIQ_AUDIO_VOLUME(db); ret = vchi_msg_queue(sc->vchi_handle, @@ -345,102 +386,68 @@ bcm2835_audio_update_controls(struct bcm if (ret != 0) printf("%s: vchi_msg_queue failed (err %d)\n", __func__, ret); - - vchi_service_release(sc->vchi_handle); } - VCHIQ_VCHI_UNLOCK(sc); } static void -bcm2835_audio_update_params(struct bcm2835_audio_info *sc, struct bcm2835_audio_chinfo *ch) +bcm2835_audio_update_params(struct bcm2835_audio_info *sc, uint32_t fmt, uint32_t speed) { VC_AUDIO_MSG_T m; int ret; - VCHIQ_VCHI_LOCK(sc); if (sc->vchi_handle != VCHIQ_SERVICE_HANDLE_INVALID) { - vchi_service_use(sc->vchi_handle); - m.type = VC_AUDIO_MSG_TYPE_CONFIG; - m.u.config.channels = AFMT_CHANNEL(ch->fmt); - m.u.config.samplerate = ch->spd; - m.u.config.bps = AFMT_BIT(ch->fmt); + m.u.config.channels = AFMT_CHANNEL(fmt); + m.u.config.samplerate = speed; + m.u.config.bps = AFMT_BIT(fmt); ret = vchi_msg_queue(sc->vchi_handle, &m, sizeof m, VCHI_FLAGS_BLOCK_UNTIL_QUEUED, NULL); if (ret != 0) printf("%s: vchi_msg_queue failed (err %d)\n", __func__, ret); - - vchi_service_release(sc->vchi_handle); } - VCHIQ_VCHI_UNLOCK(sc); } -static __inline uint32_t -vchiq_unbuffered_bytes(struct bcm2835_audio_chinfo *ch) +static bool +bcm2835_audio_buffer_should_sleep(struct bcm2835_audio_chinfo *ch) { - uint32_t size, ready, readyptr, readyend; - - size = sndbuf_getsize(ch->buffer); - readyptr = sndbuf_getreadyptr(ch->buffer); - ready = sndbuf_getready(ch->buffer); + + if (ch->playback_state != PLAYBACK_PLAYING) + return (true); - readyend = readyptr + ready; - /* Normal case */ - if (ch->buffered_ptr >= readyptr) { - if (readyend > ch->buffered_ptr) - return readyend - ch->buffered_ptr; - else - return 0; + /* Not enough data */ + if (sndbuf_getready(ch->buffer) < VCHIQ_AUDIO_PACKET_SIZE) { + printf("starve\n"); + ch->starved++; + return (true); } - else { /* buffered_ptr overflow */ - if (readyend > ch->buffered_ptr + size) - return readyend - ch->buffered_ptr - size; - else - return 0; + + /* Not enough free space */ + if (ch->available_space < VCHIQ_AUDIO_PACKET_SIZE) { + return (true); } + + return (false); } static void -bcm2835_audio_write_samples(struct bcm2835_audio_chinfo *ch) +bcm2835_audio_write_samples(struct bcm2835_audio_chinfo *ch, void *buf, uint32_t count) { struct bcm2835_audio_info *sc = ch->parent; VC_AUDIO_MSG_T m; - void *buf; - uint32_t count, size; int ret; - VCHIQ_VCHI_LOCK(sc); if (sc->vchi_handle == VCHIQ_SERVICE_HANDLE_INVALID) { - VCHIQ_VCHI_UNLOCK(sc); return; } - vchi_service_use(sc->vchi_handle); - - size = sndbuf_getsize(ch->buffer); - count = vchiq_unbuffered_bytes(ch); - buf = (uint8_t*)sndbuf_getbuf(ch->buffer) + ch->buffered_ptr; - - if (ch->buffered_ptr + count > size) - count = size - ch->buffered_ptr; - - if (count < VCHIQ_AUDIO_PACKET_SIZE) - goto done; - - count = min(count, ch->free_buffer); - count -= count % VCHIQ_AUDIO_PACKET_SIZE; - m.type = VC_AUDIO_MSG_TYPE_WRITE; m.u.write.count = count; m.u.write.max_packet = VCHIQ_AUDIO_PACKET_SIZE; m.u.write.callback = NULL; m.u.write.cookie = ch; - if (buf) - m.u.write.silence = 0; - else - m.u.write.silence = 1; + m.u.write.silence = 0; ret = vchi_msg_queue(sc->vchi_handle, &m, sizeof m, VCHI_FLAGS_BLOCK_UNTIL_QUEUED, NULL); @@ -448,25 +455,16 @@ bcm2835_audio_write_samples(struct bcm28 if (ret != 0) printf("%s: vchi_msg_queue failed (err %d)\n", __func__, ret); - if (buf) { - while (count > 0) { - int bytes = MIN((int)m.u.write.max_packet, (int)count); - ch->free_buffer -= bytes; - ch->buffered_ptr += bytes; - ch->buffered_ptr = ch->buffered_ptr % size; - ret = vchi_msg_queue(sc->vchi_handle, - buf, bytes, VCHI_FLAGS_BLOCK_UNTIL_QUEUED, NULL); - if (ret != 0) - printf("%s: vchi_msg_queue failed: %d\n", - __func__, ret); - buf = (char *)buf + bytes; - count -= bytes; - } + while (count > 0) { + int bytes = MIN((int)m.u.write.max_packet, (int)count); + ret = vchi_msg_queue(sc->vchi_handle, + buf, bytes, VCHI_FLAGS_BLOCK_UNTIL_QUEUED, NULL); + if (ret != 0) + printf("%s: vchi_msg_queue failed: %d\n", + __func__, ret); + buf = (char *)buf + bytes; + count -= bytes; } -done: - - vchi_service_release(sc->vchi_handle); - VCHIQ_VCHI_UNLOCK(sc); } static void @@ -474,40 +472,100 @@ bcm2835_audio_worker(void *data) { struct bcm2835_audio_info *sc = (struct bcm2835_audio_info *)data; struct bcm2835_audio_chinfo *ch = &sc->pch; - mtx_lock(&sc->data_lock); - while(1) { + uint32_t speed, format; + uint32_t volume, dest; + uint32_t flags; + uint32_t count, size, readyptr; + uint8_t *buf; + + ch->playback_state = PLAYBACK_IDLE; - if (sc->unloading) + while (1) { + if (sc->worker_state != WORKER_RUNNING) break; - if (ch->playback_state == PLAYBACK_IDLE) { - cv_wait_sig(&sc->data_cv, &sc->data_lock); - continue; + BCM2835_AUDIO_LOCK(sc); + /* + * wait until there are flags set or buffer is ready + * to consume more samples + */ + while ((sc->flags_pending == 0) && + bcm2835_audio_buffer_should_sleep(ch)) { + cv_wait_sig(&sc->worker_cv, &sc->lock); + } + flags = sc->flags_pending; + /* Clear pending flags */ + sc->flags_pending = 0; + BCM2835_AUDIO_UNLOCK(sc); + + /* Requested to change parameters */ + if (flags & AUDIO_PARAMS) { + BCM2835_AUDIO_LOCK(sc); + speed = ch->spd; + format = ch->fmt; + volume = sc->volume; + dest = sc->dest; + BCM2835_AUDIO_UNLOCK(sc); + if (ch->playback_state == PLAYBACK_IDLE) + bcm2835_audio_update_params(sc, format, speed); + bcm2835_audio_update_controls(sc, volume, dest); } - if (ch->playback_state == PLAYBACK_STOPPING) { + /* Requested to stop playback */ + if ((flags & AUDIO_STOP) && + (ch->playback_state == PLAYBACK_PLAYING)) { + bcm2835_audio_stop(ch); + BCM2835_AUDIO_LOCK(sc); bcm2835_audio_reset_channel(&sc->pch); ch->playback_state = PLAYBACK_IDLE; + BCM2835_AUDIO_UNLOCK(sc); continue; } - if (ch->free_buffer < vchiq_unbuffered_bytes(ch)) { - cv_timedwait_sig(&sc->data_cv, &sc->data_lock, 10); - continue; + /* Requested to start playback */ + if ((flags & AUDIO_PLAY) && + (ch->playback_state == PLAYBACK_IDLE)) { + BCM2835_AUDIO_LOCK(sc); + ch->playback_state = PLAYBACK_PLAYING; + BCM2835_AUDIO_UNLOCK(sc); + bcm2835_audio_start(ch); } + if (ch->playback_state == PLAYBACK_IDLE) + continue; - bcm2835_audio_write_samples(ch); + if (sndbuf_getready(ch->buffer) == 0) + continue; - if (ch->playback_state == PLAYBACK_STARTING) { - ch->prebuffered++; - if (ch->prebuffered == VCHIQ_AUDIO_PREBUFFER) { - bcm2835_audio_start(ch); - ch->playback_state = PLAYBACK_PLAYING; - } - } + count = sndbuf_getready(ch->buffer); + size = sndbuf_getsize(ch->buffer); + readyptr = sndbuf_getreadyptr(ch->buffer); + + BCM2835_AUDIO_LOCK(sc); + if (readyptr + count > size) + count = size - readyptr; + count = min(count, ch->available_space); + count -= (count % VCHIQ_AUDIO_PACKET_SIZE); + BCM2835_AUDIO_UNLOCK(sc); + + if (count < VCHIQ_AUDIO_PACKET_SIZE) + continue; + + buf = (uint8_t*)sndbuf_getbuf(ch->buffer) + readyptr; + + bcm2835_audio_write_samples(ch, buf, count); + BCM2835_AUDIO_LOCK(sc); + ch->unsubmittedptr = (ch->unsubmittedptr + count) % sndbuf_getsize(ch->buffer); + ch->available_space -= count; + ch->submitted_samples += count; + KASSERT(ch->available_space >= 0, ("ch->available_space == %d\n", ch->available_space)); + BCM2835_AUDIO_UNLOCK(sc); } - mtx_unlock(&sc->data_lock); + + BCM2835_AUDIO_LOCK(sc); + sc->worker_state = WORKER_STOPPED; + cv_signal(&sc->worker_cv); + BCM2835_AUDIO_UNLOCK(sc); kproc_exit(0); } @@ -517,6 +575,7 @@ bcm2835_audio_create_worker(struct bcm28 { struct proc *newp; + sc->worker_state = WORKER_RUNNING; if (kproc_create(bcm2835_audio_worker, (void*)sc, &newp, 0, 0, "bcm2835_audio_worker") != 0) { printf("failed to create bcm2835_audio_worker\n"); @@ -547,11 +606,14 @@ bcmchan_init(kobj_t obj, void *devinfo, buffer = malloc(sc->bufsz, M_DEVBUF, M_WAITOK | M_ZERO); if (sndbuf_setup(ch->buffer, buffer, sc->bufsz) != 0) { + device_printf(sc->dev, "sndbuf_setup failed\n"); free(buffer, M_DEVBUF); return NULL; } - bcm2835_audio_update_params(sc, ch); + BCM2835_AUDIO_LOCK(sc); + bcm2835_worker_update_params(sc); + BCM2835_AUDIO_UNLOCK(sc); return ch; } @@ -575,12 +637,10 @@ bcmchan_setformat(kobj_t obj, void *data struct bcm2835_audio_chinfo *ch = data; struct bcm2835_audio_info *sc = ch->parent; - bcm2835_audio_lock(sc); - + BCM2835_AUDIO_LOCK(sc); ch->fmt = format; - bcm2835_audio_update_params(sc, ch); - - bcm2835_audio_unlock(sc); + bcm2835_worker_update_params(sc); + BCM2835_AUDIO_UNLOCK(sc); return 0; } @@ -591,12 +651,10 @@ bcmchan_setspeed(kobj_t obj, void *data, struct bcm2835_audio_chinfo *ch = data; struct bcm2835_audio_info *sc = ch->parent; - bcm2835_audio_lock(sc); - + BCM2835_AUDIO_LOCK(sc); ch->spd = speed; - bcm2835_audio_update_params(sc, ch); - - bcm2835_audio_unlock(sc); + bcm2835_worker_update_params(sc); + BCM2835_AUDIO_UNLOCK(sc); return ch->spd; } @@ -618,26 +676,23 @@ bcmchan_trigger(kobj_t obj, void *data, if (!PCMTRIG_COMMON(go)) return (0); - bcm2835_audio_lock(sc); - switch (go) { case PCMTRIG_START: - ch->playback_state = PLAYBACK_STARTING; - /* wakeup worker thread */ - cv_signal(&sc->data_cv); + /* kickstart data flow */ + chn_intr(sc->pch.channel); + ch->submitted_samples = 0; + ch->retrieved_samples = 0; + bcm2835_worker_play_start(sc); break; case PCMTRIG_STOP: case PCMTRIG_ABORT: - ch->playback_state = PLAYBACK_STOPPING; - bcm2835_audio_stop(ch); + bcm2835_worker_play_stop(sc); break; default: break; } - - bcm2835_audio_unlock(sc); return 0; } @@ -648,11 +703,9 @@ bcmchan_getptr(kobj_t obj, void *data) struct bcm2835_audio_info *sc = ch->parent; uint32_t ret; - bcm2835_audio_lock(sc); - - ret = ch->complete_pos - (ch->complete_pos % VCHIQ_AUDIO_PACKET_SIZE); - - bcm2835_audio_unlock(sc); + BCM2835_AUDIO_LOCK(sc); + ret = ch->unsubmittedptr; + BCM2835_AUDIO_UNLOCK(sc); return ret; } @@ -695,8 +748,11 @@ bcmmix_set(struct snd_mixer *m, unsigned switch (dev) { case SOUND_MIXER_VOLUME: + BCM2835_AUDIO_LOCK(sc); sc->volume = left; - bcm2835_audio_update_controls(sc); + bcm2835_worker_update_params(sc); + BCM2835_AUDIO_UNLOCK(sc); + break; default: @@ -729,9 +785,13 @@ sysctl_bcm2835_audio_dest(SYSCTL_HANDLER if ((val < 0) || (val > 2)) return (EINVAL); + BCM2835_AUDIO_LOCK(sc); sc->dest = val; - device_printf(sc->dev, "destination set to %s\n", dest_description(val)); - bcm2835_audio_update_controls(sc); + bcm2835_worker_update_params(sc); + BCM2835_AUDIO_UNLOCK(sc); + + if (bootverbose) + device_printf(sc->dev, "destination set to %s\n", dest_description(val)); return (0); } @@ -753,6 +813,24 @@ vchi_audio_sysctl_init(struct bcm2835_au CTLFLAG_RW | CTLTYPE_UINT, sc, sizeof(*sc), sysctl_bcm2835_audio_dest, "IU", "audio destination, " "0 - auto, 1 - headphones, 2 - HDMI"); + SYSCTL_ADD_UQUAD(ctx, tree, OID_AUTO, "callbacks", + CTLFLAG_RD, &sc->pch.callbacks, + "callbacks total"); + SYSCTL_ADD_UQUAD(ctx, tree, OID_AUTO, "submitted", + CTLFLAG_RD, &sc->pch.submitted_samples, + "last play submitted samples"); + SYSCTL_ADD_UQUAD(ctx, tree, OID_AUTO, "retrieved", + CTLFLAG_RD, &sc->pch.retrieved_samples, + "last play retrieved samples"); + SYSCTL_ADD_UQUAD(ctx, tree, OID_AUTO, "underruns", + CTLFLAG_RD, &sc->pch.underruns, + "callback underruns"); + SYSCTL_ADD_INT(ctx, tree, OID_AUTO, "freebuffer", + CTLFLAG_RD, &sc->pch.available_space, + sc->pch.available_space, "callbacks total"); + SYSCTL_ADD_INT(ctx, tree, OID_AUTO, "starved", + CTLFLAG_RD, &sc->pch.starved, + sc->pch.starved, "number of starved conditions"); } static void @@ -770,7 +848,6 @@ bcm2835_audio_probe(device_t dev) return (BUS_PROBE_DEFAULT); } - static void bcm2835_audio_delayed_init(void *xsc) { @@ -791,7 +868,7 @@ bcm2835_audio_delayed_init(void *xsc) goto no; } - if (pcm_register(sc->dev, sc, 1, 1)) { + if (pcm_register(sc->dev, sc, 1, 0)) { device_printf(sc->dev, "pcm_register failed\n"); goto no; } @@ -819,14 +896,12 @@ bcm2835_audio_attach(device_t dev) sc->dev = dev; sc->bufsz = VCHIQ_AUDIO_BUFFER_SIZE; - sc->lock = snd_mtxcreate(device_get_nameunit(dev), "bcm2835_audio softc"); - - mtx_init(&sc->vchi_lock, "bcm2835_audio", "vchi_lock", MTX_DEF); - mtx_init(&sc->data_lock, "data_mtx", "data_mtx", MTX_DEF); - cv_init(&sc->data_cv, "data_cv"); + mtx_init(&sc->lock, device_get_nameunit(dev), + "bcm_audio_lock", MTX_DEF); + cv_init(&sc->worker_cv, "worker_cv"); sc->vchi_handle = VCHIQ_SERVICE_HANDLE_INVALID; - /* + /* * We need interrupts enabled for VCHI to work properly, * so delay initialization until it happens. */ @@ -850,24 +925,23 @@ bcm2835_audio_detach(device_t dev) sc = pcm_getdevinfo(dev); /* Stop worker thread */ - sc->unloading = 1; - cv_signal(&sc->data_cv); + BCM2835_AUDIO_LOCK(sc); + sc->worker_state = WORKER_STOPPING; + cv_signal(&sc->worker_cv); + /* Wait for thread to exit */ + while (sc->worker_state != WORKER_STOPPED) + cv_wait_sig(&sc->worker_cv, &sc->lock); + BCM2835_AUDIO_UNLOCK(sc); r = pcm_unregister(dev); if (r) return r; - mtx_destroy(&sc->vchi_lock); - mtx_destroy(&sc->data_lock); - cv_destroy(&sc->data_cv); + mtx_destroy(&sc->lock); + cv_destroy(&sc->worker_cv); bcm2835_audio_release(sc); - if (sc->lock) { - snd_mtxfree(sc->lock); - sc->lock = NULL; - } - free(sc, M_DEVBUF); return 0; From owner-svn-src-stable@freebsd.org Mon May 8 19:57:45 2017 Return-Path: Delivered-To: svn-src-stable@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 78848D6218D; Mon, 8 May 2017 19:57:45 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1DA7A154; Mon, 8 May 2017 19:57:45 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v48Jvime013386; Mon, 8 May 2017 19:57:44 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v48JvhNc013383; Mon, 8 May 2017 19:57:43 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201705081957.v48JvhNc013383@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Mon, 8 May 2017 19:57: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: r317975 - stable/10/sys/fs/nfsclient 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@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 19:57:45 -0000 Author: rmacklem Date: Mon May 8 19:57:43 2017 New Revision: 317975 URL: https://svnweb.freebsd.org/changeset/base/317975 Log: MFC: r317296 Fix some krpc leaks for the NFSv4.1/pNFS client. The NFSv4.1/pNFS client wasn't doing a newnfs_disconnect() call for the connection to the Data Server (DS) under some circumstances. The main effect of this was a leak of malloc'd structures in the krpc. This patch adds the newnfs_disconnect() calls to fix this. Detected during recent testing against the pNFS server under development. Modified: stable/10/sys/fs/nfsclient/nfs_clrpcops.c stable/10/sys/fs/nfsclient/nfs_clvfsops.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/nfsclient/nfs_clrpcops.c ============================================================================== --- stable/10/sys/fs/nfsclient/nfs_clrpcops.c Mon May 8 19:57:15 2017 (r317974) +++ stable/10/sys/fs/nfsclient/nfs_clrpcops.c Mon May 8 19:57:43 2017 (r317975) @@ -5396,10 +5396,13 @@ nfsrpc_fillsa(struct nfsmount *nmp, stru NFSCL_DEBUG(3, "DS connect=%d\n", error); /* Now, do the exchangeid and create session. */ - if (error == 0) + if (error == 0) { error = nfsrpc_exchangeid(nmp, clp, nrp, NFSV4EXCH_USEPNFSDS, &dsp, nrp->nr_cred, p); - NFSCL_DEBUG(3, "DS exchangeid=%d\n", error); + NFSCL_DEBUG(3, "DS exchangeid=%d\n", error); + if (error != 0) + newnfs_disconnect(nrp); + } if (error == 0) { dsp->nfsclds_sockp = nrp; NFSLOCKMNT(nmp); @@ -5442,8 +5445,10 @@ nfsrpc_fillsa(struct nfsmount *nmp, stru TAILQ_INSERT_TAIL(&nmp->nm_sess, dsp, nfsclds_list); NFSUNLOCKMNT(nmp); *dspp = dsp; - } else if (dsp != NULL) + } else if (dsp != NULL) { + newnfs_disconnect(nrp); nfscl_freenfsclds(dsp); + } return (error); } Modified: stable/10/sys/fs/nfsclient/nfs_clvfsops.c ============================================================================== --- stable/10/sys/fs/nfsclient/nfs_clvfsops.c Mon May 8 19:57:15 2017 (r317974) +++ stable/10/sys/fs/nfsclient/nfs_clvfsops.c Mon May 8 19:57:43 2017 (r317975) @@ -1527,8 +1527,12 @@ bad: NFSUNLOCKCLSTATE(); free(nmp->nm_clp, M_NFSCLCLIENT); } - TAILQ_FOREACH_SAFE(dsp, &nmp->nm_sess, nfsclds_list, tdsp) + TAILQ_FOREACH_SAFE(dsp, &nmp->nm_sess, nfsclds_list, tdsp) { + if (dsp != TAILQ_FIRST(&nmp->nm_sess) && + dsp->nfsclds_sockp != NULL) + newnfs_disconnect(dsp->nfsclds_sockp); nfscl_freenfsclds(dsp); + } FREE(nmp, M_NEWNFSMNT); FREE(nam, M_SONAME); return (error); @@ -1593,8 +1597,12 @@ nfs_unmount(struct mount *mp, int mntfla AUTH_DESTROY(nmp->nm_sockreq.nr_auth); mtx_destroy(&nmp->nm_sockreq.nr_mtx); mtx_destroy(&nmp->nm_mtx); - TAILQ_FOREACH_SAFE(dsp, &nmp->nm_sess, nfsclds_list, tdsp) + TAILQ_FOREACH_SAFE(dsp, &nmp->nm_sess, nfsclds_list, tdsp) { + if (dsp != TAILQ_FIRST(&nmp->nm_sess) && + dsp->nfsclds_sockp != NULL) + newnfs_disconnect(dsp->nfsclds_sockp); nfscl_freenfsclds(dsp); + } FREE(nmp, M_NEWNFSMNT); out: return (error); From owner-svn-src-stable@freebsd.org Mon May 8 20:09:25 2017 Return-Path: Delivered-To: svn-src-stable@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 05D8AD624E3; Mon, 8 May 2017 20:09:25 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 966FF14CB; Mon, 8 May 2017 20:09:24 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v48K9N9q021298; Mon, 8 May 2017 20:09:23 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v48K9NYw021297; Mon, 8 May 2017 20:09:23 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201705082009.v48K9NYw021297@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Mon, 8 May 2017 20:09:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r317976 - stable/11/sys/arm/arm X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 20:09:25 -0000 Author: gonzo Date: Mon May 8 20:09:23 2017 New Revision: 317976 URL: https://svnweb.freebsd.org/changeset/base/317976 Log: MFC r310791: [qemu] Fix VERSATILEPB kernel boot in QEMU broken by r300968 QEMU does not implement hardware debug registers so when dbg_monitor_is_enabled is called kernel receives "invalid instruction" exception. QEMU implements only DIDR register and on read returns all zeroes to indicate that it doesn't support other registers. Real hardware has Version bits set. Modified: stable/11/sys/arm/arm/debug_monitor.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/arm/arm/debug_monitor.c ============================================================================== --- stable/11/sys/arm/arm/debug_monitor.c Mon May 8 19:57:43 2017 (r317975) +++ stable/11/sys/arm/arm/debug_monitor.c Mon May 8 20:09:23 2017 (r317976) @@ -792,10 +792,21 @@ dbg_get_ossr(void) static __inline boolean_t dbg_arch_supported(void) { + uint32_t dbg_didr; switch (dbg_model) { case ID_DFR0_CP_DEBUG_M_V6: case ID_DFR0_CP_DEBUG_M_V6_1: + dbg_didr = cp14_dbgdidr_get(); + /* + * read-all-zeroes is used by QEMU + * to indicate that ARMv6 debug support + * is not implemented. Real hardware has at + * least version bits set + */ + if (dbg_didr == 0) + return (FALSE); + return (TRUE); case ID_DFR0_CP_DEBUG_M_V7: case ID_DFR0_CP_DEBUG_M_V7_1: /* fall through */ return (TRUE); From owner-svn-src-stable@freebsd.org Mon May 8 20:21:12 2017 Return-Path: Delivered-To: svn-src-stable@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 4677CD628F1; Mon, 8 May 2017 20:21:12 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0B092D0E; Mon, 8 May 2017 20:21:11 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v48KLBLF030305; Mon, 8 May 2017 20:21:11 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v48KLBsG030304; Mon, 8 May 2017 20:21:11 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201705082021.v48KLBsG030304@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Mon, 8 May 2017 20:21:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r317977 - stable/11/sys/fs/nfsclient X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 20:21:12 -0000 Author: rmacklem Date: Mon May 8 20:21:10 2017 New Revision: 317977 URL: https://svnweb.freebsd.org/changeset/base/317977 Log: MFC: r317305 Fix the NFSv4.1/pNFS client return layout on close. The "return layout on close" case in the pNFS client was badly broken. Fortunately, extant pNFS servers that I have tested against do not do this. This patch fixes it. It also changes the way the layout stateid.seqid is set for LayoutReturn. I think this change is correct w.r.t. the RFC, but I am not 100% sure. This was found during recent testing of the pNFS server under development. Modified: stable/11/sys/fs/nfsclient/nfs_clstate.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/fs/nfsclient/nfs_clstate.c ============================================================================== --- stable/11/sys/fs/nfsclient/nfs_clstate.c Mon May 8 20:09:23 2017 (r317976) +++ stable/11/sys/fs/nfsclient/nfs_clstate.c Mon May 8 20:21:10 2017 (r317977) @@ -88,6 +88,8 @@ extern struct nfsstatsv1 nfsstatsv1; extern struct nfsreqhead nfsd_reqq; extern u_int32_t newnfs_false, newnfs_true; extern int nfscl_debuglevel; +extern int nfscl_enablecallb; +extern int nfs_numnfscbd; NFSREQSPINLOCK; NFSCLSTATEMUTEX; int nfscl_inited = 0; @@ -118,7 +120,8 @@ static struct nfsclclient *nfscl_getclnt static struct nfsclclient *nfscl_getclntsess(uint8_t *); static struct nfscldeleg *nfscl_finddeleg(struct nfsclclient *, u_int8_t *, int); -static void nfscl_retoncloselayout(struct nfsclclient *, uint8_t *, int); +static void nfscl_retoncloselayout(vnode_t, struct nfsclclient *, uint8_t *, + int, struct nfsclrecalllayout **); static void nfscl_reldevinfo_locked(struct nfscldevinfo *); static struct nfscllayout *nfscl_findlayout(struct nfsclclient *, u_int8_t *, int); @@ -3121,6 +3124,7 @@ nfscl_doclose(vnode_t vp, struct nfsclcl struct nfsclopen *op; struct nfscldeleg *dp; struct nfsfh *nfhp; + struct nfsclrecalllayout *recallp; int error; error = nfscl_getcl(vnode_mount(vp), NULL, NULL, 1, &clp); @@ -3129,6 +3133,7 @@ nfscl_doclose(vnode_t vp, struct nfsclcl *clpp = clp; nfhp = VTONFS(vp)->n_fhp; + recallp = malloc(sizeof(*recallp), M_NFSLAYRECALL, M_WAITOK); NFSLOCKCLSTATE(); /* * First get rid of the local Open structures, which should be no @@ -3148,7 +3153,7 @@ nfscl_doclose(vnode_t vp, struct nfsclcl } /* Return any layouts marked return on close. */ - nfscl_retoncloselayout(clp, nfhp->nfh_fh, nfhp->nfh_len); + nfscl_retoncloselayout(vp, clp, nfhp->nfh_fh, nfhp->nfh_len, &recallp); /* Now process the opens against the server. */ lookformore: @@ -3171,6 +3176,11 @@ lookformore: } } NFSUNLOCKCLSTATE(); + /* + * recallp has been set NULL by nfscl_retoncloselayout() if it was + * used by the function, but calling free() with a NULL pointer is ok. + */ + free(recallp, M_NFSLAYRECALL); return (0); } @@ -4890,28 +4900,32 @@ nfscl_getlayout(struct nfsclclient *clp, } /* - * Search for a layout by MDS file handle. If one is found that is marked - * "return on close", delete it, since it should now be forgotten. + * Search for a layout by MDS file handle. If one is found, mark in to be + * recalled, if it already marked "return on close". */ static void -nfscl_retoncloselayout(struct nfsclclient *clp, uint8_t *fhp, int fhlen) +nfscl_retoncloselayout(vnode_t vp, struct nfsclclient *clp, uint8_t *fhp, + int fhlen, struct nfsclrecalllayout **recallpp) { struct nfscllayout *lyp; + uint32_t iomode; -tryagain: + if (vp->v_type != VREG || !NFSHASPNFS(VFSTONFS(vnode_mount(vp))) || + nfscl_enablecallb == 0 || nfs_numnfscbd == 0 || + (VTONFS(vp)->n_flag & NNOLAYOUT) != 0) + return; lyp = nfscl_findlayout(clp, fhp, fhlen); - if (lyp != NULL && (lyp->nfsly_flags & NFSLY_RETONCLOSE) != 0) { - /* - * Wait for outstanding I/O ops to be done. - */ - if (lyp->nfsly_lock.nfslock_usecnt != 0 || - lyp->nfsly_lock.nfslock_lock != 0) { - lyp->nfsly_lock.nfslock_lock |= NFSV4LOCK_WANTED; - (void)mtx_sleep(&lyp->nfsly_lock, - NFSCLSTATEMUTEXPTR, PZERO, "nfslyc", 0); - goto tryagain; - } - nfscl_freelayout(lyp); + if (lyp != NULL && (lyp->nfsly_flags & (NFSLY_RETONCLOSE | + NFSLY_RECALL)) == NFSLY_RETONCLOSE) { + iomode = 0; + if (!LIST_EMPTY(&lyp->nfsly_flayread)) + iomode |= NFSLAYOUTIOMODE_READ; + if (!LIST_EMPTY(&lyp->nfsly_flayrw)) + iomode |= NFSLAYOUTIOMODE_RW; + (void)nfscl_layoutrecall(NFSLAYOUTRETURN_FILE, lyp, iomode, + 0, UINT64_MAX, lyp->nfsly_stateid.seqid, *recallpp); + NFSCL_DEBUG(4, "retoncls recall iomode=%d\n", iomode); + *recallpp = NULL; } } @@ -5195,8 +5209,8 @@ nfscl_layoutreturn(struct nfsmount *nmp, nfsv4stateid_t stateid; NFSBCOPY(lyp->nfsly_stateid.other, stateid.other, NFSX_STATEIDOTHER); + stateid.seqid = lyp->nfsly_stateid.seqid; LIST_FOREACH(rp, &lyp->nfsly_recall, nfsrecly_list) { - stateid.seqid = rp->nfsrecly_stateseqid; (void)nfsrpc_layoutreturn(nmp, lyp->nfsly_fh, lyp->nfsly_fhlen, 0, NFSLAYOUT_NFSV4_1_FILES, rp->nfsrecly_iomode, rp->nfsrecly_recalltype, From owner-svn-src-stable@freebsd.org Mon May 8 20:30:32 2017 Return-Path: Delivered-To: svn-src-stable@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 2F2B3D62BCC; Mon, 8 May 2017 20:30:32 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C743A1491; Mon, 8 May 2017 20:30:31 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v48KUUPr036481; Mon, 8 May 2017 20:30:30 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v48KUUFN036480; Mon, 8 May 2017 20:30:30 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201705082030.v48KUUFN036480@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Mon, 8 May 2017 20:30: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: r317978 - stable/10/sys/fs/nfsclient 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@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 20:30:32 -0000 Author: rmacklem Date: Mon May 8 20:30:30 2017 New Revision: 317978 URL: https://svnweb.freebsd.org/changeset/base/317978 Log: MFC: r317305 Fix the NFSv4.1/pNFS client return layout on close. The "return layout on close" case in the pNFS client was badly broken. Fortunately, extant pNFS servers that I have tested against do not do this. This patch fixes it. It also changes the way the layout stateid.seqid is set for LayoutReturn. I think this change is correct w.r.t. the RFC, but I am not 100% sure. This was found during recent testing of the pNFS server under development. Modified: stable/10/sys/fs/nfsclient/nfs_clstate.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/nfsclient/nfs_clstate.c ============================================================================== --- stable/10/sys/fs/nfsclient/nfs_clstate.c Mon May 8 20:21:10 2017 (r317977) +++ stable/10/sys/fs/nfsclient/nfs_clstate.c Mon May 8 20:30:30 2017 (r317978) @@ -88,6 +88,8 @@ extern struct nfsstats newnfsstats; extern struct nfsreqhead nfsd_reqq; extern u_int32_t newnfs_false, newnfs_true; extern int nfscl_debuglevel; +extern int nfscl_enablecallb; +extern int nfs_numnfscbd; NFSREQSPINLOCK; NFSCLSTATEMUTEX; int nfscl_inited = 0; @@ -118,7 +120,8 @@ static struct nfsclclient *nfscl_getclnt static struct nfsclclient *nfscl_getclntsess(uint8_t *); static struct nfscldeleg *nfscl_finddeleg(struct nfsclclient *, u_int8_t *, int); -static void nfscl_retoncloselayout(struct nfsclclient *, uint8_t *, int); +static void nfscl_retoncloselayout(vnode_t, struct nfsclclient *, uint8_t *, + int, struct nfsclrecalllayout **); static void nfscl_reldevinfo_locked(struct nfscldevinfo *); static struct nfscllayout *nfscl_findlayout(struct nfsclclient *, u_int8_t *, int); @@ -3121,6 +3124,7 @@ nfscl_doclose(vnode_t vp, struct nfsclcl struct nfsclopen *op; struct nfscldeleg *dp; struct nfsfh *nfhp; + struct nfsclrecalllayout *recallp; int error; error = nfscl_getcl(vnode_mount(vp), NULL, NULL, 1, &clp); @@ -3129,6 +3133,7 @@ nfscl_doclose(vnode_t vp, struct nfsclcl *clpp = clp; nfhp = VTONFS(vp)->n_fhp; + recallp = malloc(sizeof(*recallp), M_NFSLAYRECALL, M_WAITOK); NFSLOCKCLSTATE(); /* * First get rid of the local Open structures, which should be no @@ -3148,7 +3153,7 @@ nfscl_doclose(vnode_t vp, struct nfsclcl } /* Return any layouts marked return on close. */ - nfscl_retoncloselayout(clp, nfhp->nfh_fh, nfhp->nfh_len); + nfscl_retoncloselayout(vp, clp, nfhp->nfh_fh, nfhp->nfh_len, &recallp); /* Now process the opens against the server. */ lookformore: @@ -3171,6 +3176,11 @@ lookformore: } } NFSUNLOCKCLSTATE(); + /* + * recallp has been set NULL by nfscl_retoncloselayout() if it was + * used by the function, but calling free() with a NULL pointer is ok. + */ + free(recallp, M_NFSLAYRECALL); return (0); } @@ -4890,28 +4900,32 @@ nfscl_getlayout(struct nfsclclient *clp, } /* - * Search for a layout by MDS file handle. If one is found that is marked - * "return on close", delete it, since it should now be forgotten. + * Search for a layout by MDS file handle. If one is found, mark in to be + * recalled, if it already marked "return on close". */ static void -nfscl_retoncloselayout(struct nfsclclient *clp, uint8_t *fhp, int fhlen) +nfscl_retoncloselayout(vnode_t vp, struct nfsclclient *clp, uint8_t *fhp, + int fhlen, struct nfsclrecalllayout **recallpp) { struct nfscllayout *lyp; + uint32_t iomode; -tryagain: + if (vp->v_type != VREG || !NFSHASPNFS(VFSTONFS(vnode_mount(vp))) || + nfscl_enablecallb == 0 || nfs_numnfscbd == 0 || + (VTONFS(vp)->n_flag & NNOLAYOUT) != 0) + return; lyp = nfscl_findlayout(clp, fhp, fhlen); - if (lyp != NULL && (lyp->nfsly_flags & NFSLY_RETONCLOSE) != 0) { - /* - * Wait for outstanding I/O ops to be done. - */ - if (lyp->nfsly_lock.nfslock_usecnt != 0 || - lyp->nfsly_lock.nfslock_lock != 0) { - lyp->nfsly_lock.nfslock_lock |= NFSV4LOCK_WANTED; - (void)mtx_sleep(&lyp->nfsly_lock, - NFSCLSTATEMUTEXPTR, PZERO, "nfslyc", 0); - goto tryagain; - } - nfscl_freelayout(lyp); + if (lyp != NULL && (lyp->nfsly_flags & (NFSLY_RETONCLOSE | + NFSLY_RECALL)) == NFSLY_RETONCLOSE) { + iomode = 0; + if (!LIST_EMPTY(&lyp->nfsly_flayread)) + iomode |= NFSLAYOUTIOMODE_READ; + if (!LIST_EMPTY(&lyp->nfsly_flayrw)) + iomode |= NFSLAYOUTIOMODE_RW; + (void)nfscl_layoutrecall(NFSLAYOUTRETURN_FILE, lyp, iomode, + 0, UINT64_MAX, lyp->nfsly_stateid.seqid, *recallpp); + NFSCL_DEBUG(4, "retoncls recall iomode=%d\n", iomode); + *recallpp = NULL; } } @@ -5195,8 +5209,8 @@ nfscl_layoutreturn(struct nfsmount *nmp, nfsv4stateid_t stateid; NFSBCOPY(lyp->nfsly_stateid.other, stateid.other, NFSX_STATEIDOTHER); + stateid.seqid = lyp->nfsly_stateid.seqid; LIST_FOREACH(rp, &lyp->nfsly_recall, nfsrecly_list) { - stateid.seqid = rp->nfsrecly_stateseqid; (void)nfsrpc_layoutreturn(nmp, lyp->nfsly_fh, lyp->nfsly_fhlen, 0, NFSLAYOUT_NFSV4_1_FILES, rp->nfsrecly_iomode, rp->nfsrecly_recalltype, From owner-svn-src-stable@freebsd.org Mon May 8 21:29:31 2017 Return-Path: Delivered-To: svn-src-stable@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 524F6D64228; Mon, 8 May 2017 21:29:31 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 19E17255; Mon, 8 May 2017 21:29:31 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v48LTT8b061201; Mon, 8 May 2017 21:29:30 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v48LTTAR061198; Mon, 8 May 2017 21:29:29 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201705082129.v48LTTAR061198@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Mon, 8 May 2017 21:29:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r317983 - in stable/11/sys/fs: nfs nfsclient X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 21:29:31 -0000 Author: rmacklem Date: Mon May 8 21:29:29 2017 New Revision: 317983 URL: https://svnweb.freebsd.org/changeset/base/317983 Log: MFC: r317345 Make the NFSv4 client to use a write open for reading if allowed by the server. An NFSv4 server has the option of allowing a Read to be done using a Write Open. If this is not allowed, the server will return NFSERR_OPENMODE. This patch attempts the read with a write open and then disables this if the server replies NFSERR_OPENMODE. This change will avoid some uses of the special stateids. This will be useful for pNFS/DS Reads, since they cannot use special stateids. It will also be useful for any NFSv4 server that does not support reading via the special stateids. It has been tested against both types of NFSv4 server. Modified: stable/11/sys/fs/nfs/nfsport.h stable/11/sys/fs/nfsclient/nfs_clrpcops.c stable/11/sys/fs/nfsclient/nfs_clstate.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/fs/nfs/nfsport.h ============================================================================== --- stable/11/sys/fs/nfs/nfsport.h Mon May 8 21:08:39 2017 (r317982) +++ stable/11/sys/fs/nfs/nfsport.h Mon May 8 21:29:29 2017 (r317983) @@ -899,6 +899,7 @@ int newnfs_realign(struct mbuf **, int); */ #define NFSSTA_HASWRITEVERF 0x00040000 /* Has write verifier */ #define NFSSTA_GOTFSINFO 0x00100000 /* Got the fsinfo */ +#define NFSSTA_OPENMODE 0x00200000 /* Must use correct open mode */ #define NFSSTA_NOLAYOUTCOMMIT 0x04000000 /* Don't do LayoutCommit */ #define NFSSTA_SESSPERSIST 0x08000000 /* Has a persistent session */ #define NFSSTA_TIMEO 0x10000000 /* Experiencing a timeout */ @@ -929,6 +930,7 @@ int newnfs_realign(struct mbuf **, int); #define NFSHASNOLAYOUTCOMMIT(n) ((n)->nm_state & NFSSTA_NOLAYOUTCOMMIT) #define NFSHASSESSPERSIST(n) ((n)->nm_state & NFSSTA_SESSPERSIST) #define NFSHASPNFS(n) ((n)->nm_state & NFSSTA_PNFS) +#define NFSHASOPENMODE(n) ((n)->nm_state & NFSSTA_OPENMODE) #define NFSHASONEOPENOWN(n) (((n)->nm_flag & NFSMNT_ONEOPENOWN) != 0 && \ (n)->nm_minorvers > 0) Modified: stable/11/sys/fs/nfsclient/nfs_clrpcops.c ============================================================================== --- stable/11/sys/fs/nfsclient/nfs_clrpcops.c Mon May 8 21:08:39 2017 (r317982) +++ stable/11/sys/fs/nfsclient/nfs_clrpcops.c Mon May 8 21:29:29 2017 (r317983) @@ -1134,6 +1134,11 @@ nfsrpc_setattr(vnode_t vp, struct vattr else error = nfsrpc_setaclrpc(vp, cred, p, aclp, &stateid, stuff); + if (error == NFSERR_OPENMODE && mode == NFSV4OPEN_ACCESSREAD) { + NFSLOCKMNT(nmp); + nmp->nm_state |= NFSSTA_OPENMODE; + NFSUNLOCKMNT(nmp); + } if (error == NFSERR_STALESTATEID) nfscl_initiate_recovery(nmp->nm_clp); if (lckp != NULL) @@ -1154,7 +1159,9 @@ nfsrpc_setattr(vnode_t vp, struct vattr error == NFSERR_BADSESSION || (error == NFSERR_OLDSTATEID && retrycnt < 20) || ((error == NFSERR_EXPIRED || error == NFSERR_BADSTATEID) && - expireret == 0 && clidrev != 0 && retrycnt < 4)); + expireret == 0 && clidrev != 0 && retrycnt < 4) || + (error == NFSERR_OPENMODE && mode == NFSV4OPEN_ACCESSREAD && + retrycnt < 4)); if (error && retrycnt >= 4) error = EIO; return (error); @@ -1391,6 +1398,11 @@ nfsrpc_read(vnode_t vp, struct uio *uiop &lckp); error = nfsrpc_readrpc(vp, uiop, newcred, &stateid, p, nap, attrflagp, stuff); + if (error == NFSERR_OPENMODE) { + NFSLOCKMNT(nmp); + nmp->nm_state |= NFSSTA_OPENMODE; + NFSUNLOCKMNT(nmp); + } if (error == NFSERR_STALESTATEID) nfscl_initiate_recovery(nmp->nm_clp); if (lckp != NULL) @@ -1409,7 +1421,8 @@ nfsrpc_read(vnode_t vp, struct uio *uiop error == NFSERR_BADSESSION || (error == NFSERR_OLDSTATEID && retrycnt < 20) || ((error == NFSERR_EXPIRED || error == NFSERR_BADSTATEID) && - expireret == 0 && clidrev != 0 && retrycnt < 4)); + expireret == 0 && clidrev != 0 && retrycnt < 4) || + (error == NFSERR_OPENMODE && retrycnt < 4)); if (error && retrycnt >= 4) error = EIO; if (NFSHASNFSV4(nmp)) @@ -5594,6 +5607,11 @@ nfscl_doiods(vnode_t vp, struct uio *uio if (lastbyte > layp->nfsly_lastbyte) layp->nfsly_lastbyte = lastbyte; NFSUNLOCKCLSTATE(); + } else if (error == NFSERR_OPENMODE && + rwaccess == NFSV4OPEN_ACCESSREAD) { + NFSLOCKMNT(nmp); + nmp->nm_state |= NFSSTA_OPENMODE; + NFSUNLOCKMNT(nmp); } } else error = EIO; Modified: stable/11/sys/fs/nfsclient/nfs_clstate.c ============================================================================== --- stable/11/sys/fs/nfsclient/nfs_clstate.c Mon May 8 21:08:39 2017 (r317982) +++ stable/11/sys/fs/nfsclient/nfs_clstate.c Mon May 8 21:29:29 2017 (r317983) @@ -500,10 +500,11 @@ nfscl_getstateid(vnode_t vp, u_int8_t *n { struct nfsclclient *clp; struct nfsclowner *owp; - struct nfsclopen *op = NULL; + struct nfsclopen *op = NULL, *top; struct nfscllockowner *lp; struct nfscldeleg *dp; struct nfsnode *np; + struct nfsmount *nmp; u_int8_t own[NFSV4CL_LOCKNAMELEN]; int error, done; @@ -521,8 +522,9 @@ nfscl_getstateid(vnode_t vp, u_int8_t *n if (vnode_vtype(vp) != VREG) return (EISDIR); np = VTONFS(vp); + nmp = VFSTONFS(vnode_mount(vp)); NFSLOCKCLSTATE(); - clp = nfscl_findcl(VFSTONFS(vnode_mount(vp))); + clp = nfscl_findcl(nmp); if (clp == NULL) { NFSUNLOCKCLSTATE(); return (EACCES); @@ -592,23 +594,33 @@ nfscl_getstateid(vnode_t vp, u_int8_t *n } if (op == NULL) { /* If not found, just look for any OpenOwner that will work. */ + top = NULL; done = 0; owp = LIST_FIRST(&clp->nfsc_owner); while (!done && owp != NULL) { LIST_FOREACH(op, &owp->nfsow_open, nfso_list) { if (op->nfso_fhlen == fhlen && - !NFSBCMP(op->nfso_fh, nfhp, fhlen) && - (mode & op->nfso_mode) == mode) { - done = 1; - break; + !NFSBCMP(op->nfso_fh, nfhp, fhlen)) { + if (top == NULL && (op->nfso_mode & + NFSV4OPEN_ACCESSWRITE) != 0 && + (mode & NFSV4OPEN_ACCESSREAD) != 0) + top = op; + if ((mode & op->nfso_mode) == mode) { + done = 1; + break; + } } } if (!done) owp = LIST_NEXT(owp, nfsow_list); } if (!done) { - NFSUNLOCKCLSTATE(); - return (ENOENT); + NFSCL_DEBUG(2, "openmode top=%p\n", top); + if (top == NULL || NFSHASOPENMODE(nmp)) { + NFSUNLOCKCLSTATE(); + return (ENOENT); + } else + op = top; } /* * For read aheads or write behinds, use the open cred. From owner-svn-src-stable@freebsd.org Mon May 8 21:40:44 2017 Return-Path: Delivered-To: svn-src-stable@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 BF64FD644F3; Mon, 8 May 2017 21:40:44 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3E62414BC; Mon, 8 May 2017 21:40:44 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v48LehnV065378; Mon, 8 May 2017 21:40:43 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v48Legg9065350; Mon, 8 May 2017 21:40:42 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201705082140.v48Legg9065350@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Mon, 8 May 2017 21:40:42 +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: r317984 - in stable/10/sys/fs: nfs nfsclient 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@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 21:40:44 -0000 Author: rmacklem Date: Mon May 8 21:40:42 2017 New Revision: 317984 URL: https://svnweb.freebsd.org/changeset/base/317984 Log: MFC: r317345 Make the NFSv4 client to use a write open for reading if allowed by the server. An NFSv4 server has the option of allowing a Read to be done using a Write Open. If this is not allowed, the server will return NFSERR_OPENMODE. This patch attempts the read with a write open and then disables this if the server replies NFSERR_OPENMODE. This change will avoid some uses of the special stateids. This will be useful for pNFS/DS Reads, since they cannot use special stateids. It will also be useful for any NFSv4 server that does not support reading via the special stateids. It has been tested against both types of NFSv4 server. Modified: stable/10/sys/fs/nfs/nfsport.h stable/10/sys/fs/nfsclient/nfs_clrpcops.c stable/10/sys/fs/nfsclient/nfs_clstate.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/nfs/nfsport.h ============================================================================== --- stable/10/sys/fs/nfs/nfsport.h Mon May 8 21:29:29 2017 (r317983) +++ stable/10/sys/fs/nfs/nfsport.h Mon May 8 21:40:42 2017 (r317984) @@ -832,6 +832,7 @@ int newnfs_realign(struct mbuf **, int); */ #define NFSSTA_HASWRITEVERF 0x00040000 /* Has write verifier */ #define NFSSTA_GOTFSINFO 0x00100000 /* Got the fsinfo */ +#define NFSSTA_OPENMODE 0x00200000 /* Must use correct open mode */ #define NFSSTA_NOLAYOUTCOMMIT 0x04000000 /* Don't do LayoutCommit */ #define NFSSTA_SESSPERSIST 0x08000000 /* Has a persistent session */ #define NFSSTA_TIMEO 0x10000000 /* Experiencing a timeout */ @@ -862,6 +863,7 @@ int newnfs_realign(struct mbuf **, int); #define NFSHASNOLAYOUTCOMMIT(n) ((n)->nm_state & NFSSTA_NOLAYOUTCOMMIT) #define NFSHASSESSPERSIST(n) ((n)->nm_state & NFSSTA_SESSPERSIST) #define NFSHASPNFS(n) ((n)->nm_state & NFSSTA_PNFS) +#define NFSHASOPENMODE(n) ((n)->nm_state & NFSSTA_OPENMODE) #define NFSHASONEOPENOWN(n) (((n)->nm_flag & NFSMNT_ONEOPENOWN) != 0 && \ (n)->nm_minorvers > 0) Modified: stable/10/sys/fs/nfsclient/nfs_clrpcops.c ============================================================================== --- stable/10/sys/fs/nfsclient/nfs_clrpcops.c Mon May 8 21:29:29 2017 (r317983) +++ stable/10/sys/fs/nfsclient/nfs_clrpcops.c Mon May 8 21:40:42 2017 (r317984) @@ -1131,6 +1131,11 @@ nfsrpc_setattr(vnode_t vp, struct vattr else error = nfsrpc_setaclrpc(vp, cred, p, aclp, &stateid, stuff); + if (error == NFSERR_OPENMODE && mode == NFSV4OPEN_ACCESSREAD) { + NFSLOCKMNT(nmp); + nmp->nm_state |= NFSSTA_OPENMODE; + NFSUNLOCKMNT(nmp); + } if (error == NFSERR_STALESTATEID) nfscl_initiate_recovery(nmp->nm_clp); if (lckp != NULL) @@ -1151,7 +1156,9 @@ nfsrpc_setattr(vnode_t vp, struct vattr error == NFSERR_BADSESSION || (error == NFSERR_OLDSTATEID && retrycnt < 20) || ((error == NFSERR_EXPIRED || error == NFSERR_BADSTATEID) && - expireret == 0 && clidrev != 0 && retrycnt < 4)); + expireret == 0 && clidrev != 0 && retrycnt < 4) || + (error == NFSERR_OPENMODE && mode == NFSV4OPEN_ACCESSREAD && + retrycnt < 4)); if (error && retrycnt >= 4) error = EIO; return (error); @@ -1388,6 +1395,11 @@ nfsrpc_read(vnode_t vp, struct uio *uiop &lckp); error = nfsrpc_readrpc(vp, uiop, newcred, &stateid, p, nap, attrflagp, stuff); + if (error == NFSERR_OPENMODE) { + NFSLOCKMNT(nmp); + nmp->nm_state |= NFSSTA_OPENMODE; + NFSUNLOCKMNT(nmp); + } if (error == NFSERR_STALESTATEID) nfscl_initiate_recovery(nmp->nm_clp); if (lckp != NULL) @@ -1406,7 +1418,8 @@ nfsrpc_read(vnode_t vp, struct uio *uiop error == NFSERR_BADSESSION || (error == NFSERR_OLDSTATEID && retrycnt < 20) || ((error == NFSERR_EXPIRED || error == NFSERR_BADSTATEID) && - expireret == 0 && clidrev != 0 && retrycnt < 4)); + expireret == 0 && clidrev != 0 && retrycnt < 4) || + (error == NFSERR_OPENMODE && retrycnt < 4)); if (error && retrycnt >= 4) error = EIO; if (NFSHASNFSV4(nmp)) @@ -5591,6 +5604,11 @@ nfscl_doiods(vnode_t vp, struct uio *uio if (lastbyte > layp->nfsly_lastbyte) layp->nfsly_lastbyte = lastbyte; NFSUNLOCKCLSTATE(); + } else if (error == NFSERR_OPENMODE && + rwaccess == NFSV4OPEN_ACCESSREAD) { + NFSLOCKMNT(nmp); + nmp->nm_state |= NFSSTA_OPENMODE; + NFSUNLOCKMNT(nmp); } } else error = EIO; Modified: stable/10/sys/fs/nfsclient/nfs_clstate.c ============================================================================== --- stable/10/sys/fs/nfsclient/nfs_clstate.c Mon May 8 21:29:29 2017 (r317983) +++ stable/10/sys/fs/nfsclient/nfs_clstate.c Mon May 8 21:40:42 2017 (r317984) @@ -500,10 +500,11 @@ nfscl_getstateid(vnode_t vp, u_int8_t *n { struct nfsclclient *clp; struct nfsclowner *owp; - struct nfsclopen *op = NULL; + struct nfsclopen *op = NULL, *top; struct nfscllockowner *lp; struct nfscldeleg *dp; struct nfsnode *np; + struct nfsmount *nmp; u_int8_t own[NFSV4CL_LOCKNAMELEN]; int error, done; @@ -521,8 +522,9 @@ nfscl_getstateid(vnode_t vp, u_int8_t *n if (vnode_vtype(vp) != VREG) return (EISDIR); np = VTONFS(vp); + nmp = VFSTONFS(vnode_mount(vp)); NFSLOCKCLSTATE(); - clp = nfscl_findcl(VFSTONFS(vnode_mount(vp))); + clp = nfscl_findcl(nmp); if (clp == NULL) { NFSUNLOCKCLSTATE(); return (EACCES); @@ -592,23 +594,33 @@ nfscl_getstateid(vnode_t vp, u_int8_t *n } if (op == NULL) { /* If not found, just look for any OpenOwner that will work. */ + top = NULL; done = 0; owp = LIST_FIRST(&clp->nfsc_owner); while (!done && owp != NULL) { LIST_FOREACH(op, &owp->nfsow_open, nfso_list) { if (op->nfso_fhlen == fhlen && - !NFSBCMP(op->nfso_fh, nfhp, fhlen) && - (mode & op->nfso_mode) == mode) { - done = 1; - break; + !NFSBCMP(op->nfso_fh, nfhp, fhlen)) { + if (top == NULL && (op->nfso_mode & + NFSV4OPEN_ACCESSWRITE) != 0 && + (mode & NFSV4OPEN_ACCESSREAD) != 0) + top = op; + if ((mode & op->nfso_mode) == mode) { + done = 1; + break; + } } } if (!done) owp = LIST_NEXT(owp, nfsow_list); } if (!done) { - NFSUNLOCKCLSTATE(); - return (ENOENT); + NFSCL_DEBUG(2, "openmode top=%p\n", top); + if (top == NULL || NFSHASOPENMODE(nmp)) { + NFSUNLOCKCLSTATE(); + return (ENOENT); + } else + op = top; } /* * For read aheads or write behinds, use the open cred. From owner-svn-src-stable@freebsd.org Mon May 8 21:49:57 2017 Return-Path: Delivered-To: svn-src-stable@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 7787FD648B3; Mon, 8 May 2017 21:49:57 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DC06A1EB2; Mon, 8 May 2017 21:49:56 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v48Lntdq069570; Mon, 8 May 2017 21:49:55 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v48Lnt7h069569; Mon, 8 May 2017 21:49:55 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201705082149.v48Lnt7h069569@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Mon, 8 May 2017 21:49:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r317985 - stable/11/sys/fs/nfsserver X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 21:49:57 -0000 Author: rmacklem Date: Mon May 8 21:49:55 2017 New Revision: 317985 URL: https://svnweb.freebsd.org/changeset/base/317985 Log: MFC: r317382 Allow use of a write open stateid for reading in the NFSv4 server. The NFSv4 RFCs give a server the option of allowing the use of an open stateid for write access to be used for a Read operation. This patch enables this by default and adds a sysctl to disable it, for anyone who does not want this capability. Allowing this is particularily useful for a pNFS Data Server (DS), since they are not permitted to allow the use of special stateids. Discovered during recent testing of the pNFS server under development. Modified: stable/11/sys/fs/nfsserver/nfs_nfsdstate.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/fs/nfsserver/nfs_nfsdstate.c ============================================================================== --- stable/11/sys/fs/nfsserver/nfs_nfsdstate.c Mon May 8 21:40:42 2017 (r317984) +++ stable/11/sys/fs/nfsserver/nfs_nfsdstate.c Mon May 8 21:49:55 2017 (r317985) @@ -75,6 +75,11 @@ SYSCTL_INT(_vfs_nfsd, OID_AUTO, writedel &nfsrv_writedelegifpos, 0, "Issue a write delegation for read opens if possible"); +static int nfsrv_allowreadforwriteopen = 1; +SYSCTL_INT(_vfs_nfsd, OID_AUTO, allowreadforwriteopen, CTLFLAG_RW, + &nfsrv_allowreadforwriteopen, 0, + "Allow Reads to be done with Write Access StateIDs"); + /* * Hash lists for nfs V4. */ @@ -1872,7 +1877,8 @@ tryagain: mystp->ls_flags & NFSLCK_ACCESSBITS)) || ((new_stp->ls_flags & (NFSLCK_CHECK|NFSLCK_READACCESS)) == (NFSLCK_CHECK | NFSLCK_READACCESS) && - !(mystp->ls_flags & NFSLCK_READACCESS)) || + !(mystp->ls_flags & NFSLCK_READACCESS) && + nfsrv_allowreadforwriteopen == 0) || ((new_stp->ls_flags & (NFSLCK_CHECK|NFSLCK_WRITEACCESS)) == (NFSLCK_CHECK | NFSLCK_WRITEACCESS) && !(mystp->ls_flags & NFSLCK_WRITEACCESS))) { From owner-svn-src-stable@freebsd.org Mon May 8 21:58:31 2017 Return-Path: Delivered-To: svn-src-stable@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 355A3D64A3E; Mon, 8 May 2017 21:58:31 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A022C914; Mon, 8 May 2017 21:58:30 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v48LwTom073426; Mon, 8 May 2017 21:58:29 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v48LwTIx073425; Mon, 8 May 2017 21:58:29 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201705082158.v48LwTIx073425@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Mon, 8 May 2017 21:58:29 +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: r317986 - stable/10/sys/fs/nfsserver 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@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 21:58:31 -0000 Author: rmacklem Date: Mon May 8 21:58:29 2017 New Revision: 317986 URL: https://svnweb.freebsd.org/changeset/base/317986 Log: MFC: r317382 Allow use of a write open stateid for reading in the NFSv4 server. The NFSv4 RFCs give a server the option of allowing the use of an open stateid for write access to be used for a Read operation. This patch enables this by default and adds a sysctl to disable it, for anyone who does not want this capability. Allowing this is particularily useful for a pNFS Data Server (DS), since they are not permitted to allow the use of special stateids. Discovered during recent testing of the pNFS server under development. Modified: stable/10/sys/fs/nfsserver/nfs_nfsdstate.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/nfsserver/nfs_nfsdstate.c ============================================================================== --- stable/10/sys/fs/nfsserver/nfs_nfsdstate.c Mon May 8 21:49:55 2017 (r317985) +++ stable/10/sys/fs/nfsserver/nfs_nfsdstate.c Mon May 8 21:58:29 2017 (r317986) @@ -80,6 +80,11 @@ SYSCTL_INT(_vfs_nfsd, OID_AUTO, writedel &nfsrv_writedelegifpos, 0, "Issue a write delegation for read opens if possible"); +static int nfsrv_allowreadforwriteopen = 1; +SYSCTL_INT(_vfs_nfsd, OID_AUTO, allowreadforwriteopen, CTLFLAG_RW, + &nfsrv_allowreadforwriteopen, 0, + "Allow Reads to be done with Write Access StateIDs"); + /* * Hash lists for nfs V4. */ @@ -1869,7 +1874,8 @@ tryagain: mystp->ls_flags & NFSLCK_ACCESSBITS)) || ((new_stp->ls_flags & (NFSLCK_CHECK|NFSLCK_READACCESS)) == (NFSLCK_CHECK | NFSLCK_READACCESS) && - !(mystp->ls_flags & NFSLCK_READACCESS)) || + !(mystp->ls_flags & NFSLCK_READACCESS) && + nfsrv_allowreadforwriteopen == 0) || ((new_stp->ls_flags & (NFSLCK_CHECK|NFSLCK_WRITEACCESS)) == (NFSLCK_CHECK | NFSLCK_WRITEACCESS) && !(mystp->ls_flags & NFSLCK_WRITEACCESS))) { From owner-svn-src-stable@freebsd.org Mon May 8 22:23:03 2017 Return-Path: Delivered-To: svn-src-stable@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 63A04D64F15; Mon, 8 May 2017 22:23:03 +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 0AD6E18DE; Mon, 8 May 2017 22:23: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 v48MN1ws085310; Mon, 8 May 2017 22:23:01 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v48MN1s5085308; Mon, 8 May 2017 22:23:01 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201705082223.v48MN1s5085308@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 8 May 2017 22:23:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r317987 - stable/11/sys/cam/ctl X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 22:23:03 -0000 Author: mav Date: Mon May 8 22:23:01 2017 New Revision: 317987 URL: https://svnweb.freebsd.org/changeset/base/317987 Log: MFC r317369: Slightly compact the code. Modified: stable/11/sys/cam/ctl/ctl_backend_block.c stable/11/sys/cam/ctl/ctl_backend_ramdisk.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- stable/11/sys/cam/ctl/ctl_backend_block.c Mon May 8 21:58:29 2017 (r317986) +++ stable/11/sys/cam/ctl/ctl_backend_block.c Mon May 8 22:23:01 2017 (r317987) @@ -2650,11 +2650,8 @@ bailout_error: static void ctl_be_block_lun_shutdown(void *be_lun) { - struct ctl_be_block_lun *lun; - struct ctl_be_block_softc *softc; - - lun = (struct ctl_be_block_lun *)be_lun; - softc = lun->softc; + struct ctl_be_block_lun *lun = be_lun; + struct ctl_be_block_softc *softc = lun->softc; mtx_lock(&softc->lock); lun->flags |= CTL_BE_BLOCK_LUN_UNCONFIGURED; Modified: stable/11/sys/cam/ctl/ctl_backend_ramdisk.c ============================================================================== --- stable/11/sys/cam/ctl/ctl_backend_ramdisk.c Mon May 8 21:58:29 2017 (r317986) +++ stable/11/sys/cam/ctl/ctl_backend_ramdisk.c Mon May 8 22:23:01 2017 (r317987) @@ -1287,13 +1287,8 @@ bailout_error: static void ctl_backend_ramdisk_lun_shutdown(void *be_lun) { - struct ctl_be_ramdisk_lun *lun; - struct ctl_be_ramdisk_softc *softc; - int do_free; - - lun = (struct ctl_be_ramdisk_lun *)be_lun; - softc = lun->softc; - do_free = 0; + struct ctl_be_ramdisk_lun *lun = be_lun; + struct ctl_be_ramdisk_softc *softc = lun->softc; mtx_lock(&softc->lock); lun->flags |= CTL_BE_RAMDISK_LUN_UNCONFIGURED; @@ -1303,12 +1298,9 @@ ctl_backend_ramdisk_lun_shutdown(void *b STAILQ_REMOVE(&softc->lun_list, lun, ctl_be_ramdisk_lun, links); softc->num_luns--; - do_free = 1; + free(be_lun, M_RAMDISK); } mtx_unlock(&softc->lock); - - if (do_free != 0) - free(be_lun, M_RAMDISK); } static void From owner-svn-src-stable@freebsd.org Mon May 8 22:24:08 2017 Return-Path: Delivered-To: svn-src-stable@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 B6FF7D64FC1; Mon, 8 May 2017 22:24:08 +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 1DB451DC1; Mon, 8 May 2017 22:24:08 +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 v48MO7vJ085402; Mon, 8 May 2017 22:24:07 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v48MO7xJ085401; Mon, 8 May 2017 22:24:07 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201705082224.v48MO7xJ085401@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 8 May 2017 22:24:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r317988 - stable/11/sys/cam/ctl X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 22:24:08 -0000 Author: mav Date: Mon May 8 22:24:06 2017 New Revision: 317988 URL: https://svnweb.freebsd.org/changeset/base/317988 Log: MFC r317370: Change ctl_free_lun() locking. This fixes potential callout_drain() sleep under non-sleepable lock. PR: 218167 Modified: stable/11/sys/cam/ctl/ctl.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cam/ctl/ctl.c ============================================================================== --- stable/11/sys/cam/ctl/ctl.c Mon May 8 22:23:01 2017 (r317987) +++ stable/11/sys/cam/ctl/ctl.c Mon May 8 22:24:06 2017 (r317988) @@ -4731,18 +4731,20 @@ ctl_free_lun(struct ctl_lun *lun) struct ctl_lun *nlun; int i; - mtx_assert(&softc->ctl_lock, MA_OWNED); + KASSERT(TAILQ_EMPTY(&lun->ooa_queue), + ("Freeing a LUN %p with outstanding I/O!\n", lun)); + mtx_lock(&softc->ctl_lock); STAILQ_REMOVE(&softc->lun_list, lun, ctl_lun, links); - ctl_clear_mask(softc->ctl_lun_mask, lun->lun); - softc->ctl_luns[lun->lun] = NULL; - - if (!TAILQ_EMPTY(&lun->ooa_queue)) - panic("Freeing a LUN %p with outstanding I/O!!\n", lun); - softc->num_luns--; + STAILQ_FOREACH(nlun, &softc->lun_list, links) { + mtx_lock(&nlun->lun_lock); + ctl_est_ua_all(nlun, -1, CTL_UA_LUN_CHANGE); + mtx_unlock(&nlun->lun_lock); + } + mtx_unlock(&softc->ctl_lock); /* * Tell the backend to free resources, if this LUN has a backend. @@ -4752,7 +4754,6 @@ ctl_free_lun(struct ctl_lun *lun) lun->ie_reportcnt = UINT32_MAX; callout_drain(&lun->ie_callout); - ctl_tpc_lun_shutdown(lun); mtx_destroy(&lun->lun_lock); free(lun->lun_devid, M_CTL); @@ -4765,12 +4766,6 @@ ctl_free_lun(struct ctl_lun *lun) if (lun->flags & CTL_LUN_MALLOCED) free(lun, M_CTL); - STAILQ_FOREACH(nlun, &softc->lun_list, links) { - mtx_lock(&nlun->lun_lock); - ctl_est_ua_all(nlun, -1, CTL_UA_LUN_CHANGE); - mtx_unlock(&nlun->lun_lock); - } - return (0); } @@ -5027,9 +5022,7 @@ ctl_invalidate_lun(struct ctl_be_lun *be */ if (TAILQ_EMPTY(&lun->ooa_queue)) { mtx_unlock(&lun->lun_lock); - mtx_lock(&softc->ctl_lock); ctl_free_lun(lun); - mtx_unlock(&softc->ctl_lock); } else mtx_unlock(&lun->lun_lock); @@ -13068,9 +13061,7 @@ ctl_process_done(union ctl_io *io) if ((lun->flags & CTL_LUN_INVALID) && TAILQ_EMPTY(&lun->ooa_queue)) { mtx_unlock(&lun->lun_lock); - mtx_lock(&softc->ctl_lock); ctl_free_lun(lun); - mtx_unlock(&softc->ctl_lock); } else mtx_unlock(&lun->lun_lock); From owner-svn-src-stable@freebsd.org Mon May 8 22:35:17 2017 Return-Path: Delivered-To: svn-src-stable@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 BC7FAD632F8; Mon, 8 May 2017 22:35:17 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 2A9F6109F; Mon, 8 May 2017 22:35:17 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v48MZGB2089401; Mon, 8 May 2017 22:35:16 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v48MZFGS089398; Mon, 8 May 2017 22:35:15 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201705082235.v48MZFGS089398@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Mon, 8 May 2017 22:35:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r317989 - stable/11/sys/dev/evdev X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 22:35:17 -0000 Author: gonzo Date: Mon May 8 22:35:15 2017 New Revision: 317989 URL: https://svnweb.freebsd.org/changeset/base/317989 Log: MFC r315176-r315178 r315176: [evdev] Do not ignore result evdev_register in UI_DEV_CREATE handler Make sure that uinput state field reflects actual state by checking evdev_register result for errors Submitted by: Vladimir Kondratiev Differential Revision: https://reviews.freebsd.org/D9320 r315177: [evdev] Fix race condition between client's event queue reading and dropping Submitted by: Vladimir Kondratiev Differential Revision: https://reviews.freebsd.org/D9320 r315178: [evdev] Fix Right Alt and Keypad Enter event codes for atkbd(4) and kbdmux(4) drivers Submitted by: Vladimir Kondratiev Differential Revision: https://reviews.freebsd.org/D9320 Modified: stable/11/sys/dev/evdev/cdev.c stable/11/sys/dev/evdev/evdev_utils.c stable/11/sys/dev/evdev/uinput.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/evdev/cdev.c ============================================================================== --- stable/11/sys/dev/evdev/cdev.c Mon May 8 22:24:06 2017 (r317988) +++ stable/11/sys/dev/evdev/cdev.c Mon May 8 22:35:15 2017 (r317989) @@ -162,7 +162,7 @@ static int evdev_read(struct cdev *dev, struct uio *uio, int ioflag) { struct evdev_client *client; - struct input_event *event; + struct input_event event; int ret = 0; int remaining; @@ -197,13 +197,14 @@ evdev_read(struct cdev *dev, struct uio } while (ret == 0 && !EVDEV_CLIENT_EMPTYQ(client) && remaining > 0) { - event = &client->ec_buffer[client->ec_buffer_head]; + memcpy(&event, &client->ec_buffer[client->ec_buffer_head], + sizeof(struct input_event)); client->ec_buffer_head = (client->ec_buffer_head + 1) % client->ec_buffer_size; remaining--; EVDEV_CLIENT_UNLOCKQ(client); - ret = uiomove(event, sizeof(struct input_event), uio); + ret = uiomove(&event, sizeof(struct input_event), uio); EVDEV_CLIENT_LOCKQ(client); } Modified: stable/11/sys/dev/evdev/evdev_utils.c ============================================================================== --- stable/11/sys/dev/evdev/evdev_utils.c Mon May 8 22:24:06 2017 (r317988) +++ stable/11/sys/dev/evdev/evdev_utils.c Mon May 8 22:35:15 2017 (r317989) @@ -159,7 +159,7 @@ static uint16_t evdev_at_set1_scancodes[ KEY_PREVIOUSSONG, NONE, NONE, NONE, NONE, NONE, NONE, NONE, NONE, KEY_NEXTSONG, NONE, NONE, - NONE, KEY_KPENTER, KEY_RIGHTCTRL, NONE, + KEY_KPENTER, KEY_RIGHTCTRL, NONE, NONE, /* 0x20 - 0x3f. 0xE0 prefixed */ KEY_MUTE, KEY_CALC, KEY_PLAYPAUSE, NONE, KEY_STOPCD, NONE, NONE, NONE, Modified: stable/11/sys/dev/evdev/uinput.c ============================================================================== --- stable/11/sys/dev/evdev/uinput.c Mon May 8 22:24:06 2017 (r317988) +++ stable/11/sys/dev/evdev/uinput.c Mon May 8 22:35:15 2017 (r317989) @@ -501,9 +501,10 @@ uinput_ioctl_sub(struct uinput_cdev_stat evdev_set_methods(state->ucs_evdev, state, &uinput_ev_methods); evdev_set_flag(state->ucs_evdev, EVDEV_FLAG_SOFTREPEAT); - evdev_register(state->ucs_evdev); - state->ucs_state = UINPUT_RUNNING; - return (0); + ret = evdev_register(state->ucs_evdev); + if (ret == 0) + state->ucs_state = UINPUT_RUNNING; + return (ret); case UI_DEV_DESTROY: if (state->ucs_state != UINPUT_RUNNING) From owner-svn-src-stable@freebsd.org Mon May 8 22:37:39 2017 Return-Path: Delivered-To: svn-src-stable@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 CBF69D633C0; Mon, 8 May 2017 22:37:39 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 1DD3C1934; Mon, 8 May 2017 22:37:39 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v48MbcRP089690; Mon, 8 May 2017 22:37:38 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v48MbbsO089686; Mon, 8 May 2017 22:37:37 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201705082237.v48MbbsO089686@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Mon, 8 May 2017 22:37:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r317990 - stable/11/sys/dev/qlxgbe X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 22:37:40 -0000 Author: davidcs Date: Mon May 8 22:37:37 2017 New Revision: 317990 URL: https://svnweb.freebsd.org/changeset/base/317990 Log: MFC r317180 Cleanup QLA_LOCK/QLA_UNLOCK macros remove unused QLA_TX_LOCK/QLA_TX_UNLOCK macros format qla_error_recovery() Modified: stable/11/sys/dev/qlxgbe/ql_hw.c stable/11/sys/dev/qlxgbe/ql_ioctl.c stable/11/sys/dev/qlxgbe/ql_os.c stable/11/sys/dev/qlxgbe/ql_os.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/qlxgbe/ql_hw.c ============================================================================== --- stable/11/sys/dev/qlxgbe/ql_hw.c Mon May 8 22:35:15 2017 (r317989) +++ stable/11/sys/dev/qlxgbe/ql_hw.c Mon May 8 22:37:37 2017 (r317990) @@ -183,9 +183,9 @@ qla_sysctl_stop_pegs(SYSCTL_HANDLER_ARGS if (ret == 1) { ha = (qla_host_t *)arg1; - (void)QLA_LOCK(ha, __func__, 0); + QLA_LOCK(ha); qla_stop_pegs(ha); - QLA_UNLOCK(ha, __func__); + QLA_UNLOCK(ha); } return err; Modified: stable/11/sys/dev/qlxgbe/ql_ioctl.c ============================================================================== --- stable/11/sys/dev/qlxgbe/ql_ioctl.c Mon May 8 22:35:15 2017 (r317989) +++ stable/11/sys/dev/qlxgbe/ql_ioctl.c Mon May 8 22:37:37 2017 (r317990) @@ -233,10 +233,10 @@ ql_eioctl(struct cdev *dev, u_long cmd, break; } - (void)QLA_LOCK(ha, __func__, 0); + QLA_LOCK(ha); if (!ha->hw.mdump_done) ha->qla_initiate_recovery = 1; - QLA_UNLOCK(ha, __func__); + QLA_UNLOCK(ha); #define QLNX_DUMP_WAIT_SECS 30 @@ -254,9 +254,9 @@ ql_eioctl(struct cdev *dev, u_long cmd, break; } - (void)QLA_LOCK(ha, __func__, 0); + QLA_LOCK(ha); ha->hw.mdump_done = 0; - QLA_UNLOCK(ha, __func__); + QLA_UNLOCK(ha); if ((rval = copyout(ha->hw.mdump_template, fw_dump->minidump, ha->hw.mdump_template_size))) { Modified: stable/11/sys/dev/qlxgbe/ql_os.c ============================================================================== --- stable/11/sys/dev/qlxgbe/ql_os.c Mon May 8 22:35:15 2017 (r317989) +++ stable/11/sys/dev/qlxgbe/ql_os.c Mon May 8 22:37:37 2017 (r317990) @@ -519,9 +519,9 @@ qla_pci_detach(device_t dev) ifp = ha->ifp; - (void)QLA_LOCK(ha, __func__, 0); + QLA_LOCK(ha); qla_stop(ha); - QLA_UNLOCK(ha, __func__); + QLA_UNLOCK(ha); qla_release(ha); @@ -890,9 +890,9 @@ qla_init(void *arg) QL_DPRINT2(ha, (ha->pci_dev, "%s: enter\n", __func__)); - (void)QLA_LOCK(ha, __func__, 0); + QLA_LOCK(ha); qla_init_locked(ha); - QLA_UNLOCK(ha, __func__); + QLA_UNLOCK(ha); QL_DPRINT2(ha, (ha->pci_dev, "%s: exit\n", __func__)); } @@ -924,13 +924,9 @@ qla_set_multi(qla_host_t *ha, uint32_t a if_maddr_runlock(ifp); - //if (QLA_LOCK(ha, __func__, 1) == 0) { - // ret = ql_hw_set_multi(ha, mta, mcnt, add_multi); - // QLA_UNLOCK(ha, __func__); - //} - QLA_LOCK(ha, __func__, 1); + QLA_LOCK(ha); ret = ql_hw_set_multi(ha, mta, mcnt, add_multi); - QLA_UNLOCK(ha, __func__); + QLA_UNLOCK(ha); return (ret); } @@ -953,9 +949,9 @@ qla_ioctl(struct ifnet *ifp, u_long cmd, if (ifa->ifa_addr->sa_family == AF_INET) { ifp->if_flags |= IFF_UP; if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) { - (void)QLA_LOCK(ha, __func__, 0); + QLA_LOCK(ha); qla_init_locked(ha); - QLA_UNLOCK(ha, __func__); + QLA_UNLOCK(ha); } QL_DPRINT4(ha, (ha->pci_dev, "%s: SIOCSIFADDR (0x%lx) ipv4 [0x%08x]\n", @@ -975,10 +971,12 @@ qla_ioctl(struct ifnet *ifp, u_long cmd, if (ifr->ifr_mtu > QLA_MAX_MTU) { ret = EINVAL; } else { - (void) QLA_LOCK(ha, __func__, 0); + QLA_LOCK(ha); + ifp->if_mtu = ifr->ifr_mtu; ha->max_frame_size = ifp->if_mtu + ETHER_HDR_LEN + ETHER_CRC_LEN; + if ((ifp->if_drv_flags & IFF_DRV_RUNNING)) { ret = ql_set_max_mtu(ha, ha->max_frame_size, ha->hw.rcv_cntxt_id); @@ -990,7 +988,7 @@ qla_ioctl(struct ifnet *ifp, u_long cmd, ha->std_replenish = QL_STD_REPLENISH_THRES; - QLA_UNLOCK(ha, __func__); + QLA_UNLOCK(ha); if (ret) ret = EINVAL; @@ -1002,7 +1000,7 @@ qla_ioctl(struct ifnet *ifp, u_long cmd, QL_DPRINT4(ha, (ha->pci_dev, "%s: SIOCSIFFLAGS (0x%lx)\n", __func__, cmd)); - (void)QLA_LOCK(ha, __func__, 0); + QLA_LOCK(ha); if (ifp->if_flags & IFF_UP) { if ((ifp->if_drv_flags & IFF_DRV_RUNNING)) { @@ -1026,7 +1024,7 @@ qla_ioctl(struct ifnet *ifp, u_long cmd, ha->if_flags = ifp->if_flags; } - QLA_UNLOCK(ha, __func__); + QLA_UNLOCK(ha); break; case SIOCADDMULTI: @@ -1917,7 +1915,7 @@ qla_error_recovery(void *context, int pe struct ifnet *ifp = ha->ifp; int i = 0; - (void)QLA_LOCK(ha, __func__, 0); + QLA_LOCK(ha); if (ha->flags.qla_interface_up) { @@ -1943,7 +1941,7 @@ qla_error_recovery(void *context, int pe } } - QLA_UNLOCK(ha, __func__); + QLA_UNLOCK(ha); if ((ha->pci_func & 0x1) == 0) { @@ -1957,18 +1955,22 @@ qla_error_recovery(void *context, int pe ha->msg_from_peer = 0; - (void)QLA_LOCK(ha, __func__, 0); + QLA_LOCK(ha); + ql_minidump(ha); - QLA_UNLOCK(ha, __func__); + + QLA_UNLOCK(ha); (void) ql_init_hw(ha); - (void)QLA_LOCK(ha, __func__, 0); + QLA_LOCK(ha); + if (ha->flags.qla_interface_up) { - qla_free_xmt_bufs(ha); - qla_free_rcv_bufs(ha); + qla_free_xmt_bufs(ha); + qla_free_rcv_bufs(ha); } - QLA_UNLOCK(ha, __func__); + + QLA_UNLOCK(ha); qla_send_msg_to_peer(ha, QL_PEER_MSG_ACK); @@ -1988,39 +1990,43 @@ qla_error_recovery(void *context, int pe (void) ql_init_hw(ha); - (void)QLA_LOCK(ha, __func__, 0); + QLA_LOCK(ha); + if (ha->flags.qla_interface_up) { - qla_free_xmt_bufs(ha); - qla_free_rcv_bufs(ha); - } - QLA_UNLOCK(ha, __func__); + qla_free_xmt_bufs(ha); + qla_free_rcv_bufs(ha); + } + + QLA_UNLOCK(ha); } - (void)QLA_LOCK(ha, __func__, 0); + QLA_LOCK(ha); if (ha->flags.qla_interface_up) { - if (qla_alloc_xmt_bufs(ha) != 0) { - QLA_UNLOCK(ha, __func__); - return; - } - qla_confirm_9kb_enable(ha); - if (qla_alloc_rcv_bufs(ha) != 0) { - QLA_UNLOCK(ha, __func__); - return; - } + if (qla_alloc_xmt_bufs(ha) != 0) { + QLA_UNLOCK(ha); + return; + } + qla_confirm_9kb_enable(ha); - ha->flags.stop_rcv = 0; - if (ql_init_hw_if(ha) == 0) { - ifp = ha->ifp; - ifp->if_drv_flags |= IFF_DRV_RUNNING; - ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; - ha->flags.qla_watchdog_pause = 0; - } + if (qla_alloc_rcv_bufs(ha) != 0) { + QLA_UNLOCK(ha); + return; + } + + ha->flags.stop_rcv = 0; + + if (ql_init_hw_if(ha) == 0) { + ifp = ha->ifp; + ifp->if_drv_flags |= IFF_DRV_RUNNING; + ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; + ha->flags.qla_watchdog_pause = 0; + } } else ha->flags.qla_watchdog_pause = 0; - QLA_UNLOCK(ha, __func__); + QLA_UNLOCK(ha); } static void @@ -2028,8 +2034,8 @@ qla_async_event(void *context, int pendi { qla_host_t *ha = context; - (void)QLA_LOCK(ha, __func__, 0); + QLA_LOCK(ha); qla_hw_async_event(ha); - QLA_UNLOCK(ha, __func__); + QLA_UNLOCK(ha); } Modified: stable/11/sys/dev/qlxgbe/ql_os.h ============================================================================== --- stable/11/sys/dev/qlxgbe/ql_os.h Mon May 8 22:35:15 2017 (r317989) +++ stable/11/sys/dev/qlxgbe/ql_os.h Mon May 8 22:37:37 2017 (r317990) @@ -148,12 +148,9 @@ MALLOC_DECLARE(M_QLA83XXBUF); /* * Locks */ -#define QLA_LOCK(ha, str, no_delay) mtx_lock(&ha->hw_lock) -#define QLA_UNLOCK(ha, str) mtx_unlock(&ha->hw_lock) +#define QLA_LOCK(ha) mtx_lock(&ha->hw_lock) +#define QLA_UNLOCK(ha) mtx_unlock(&ha->hw_lock) -#define QLA_TX_LOCK(ha) mtx_lock(&ha->tx_lock); -#define QLA_TX_UNLOCK(ha) mtx_unlock(&ha->tx_lock); - /* * structure encapsulating a DMA buffer */ From owner-svn-src-stable@freebsd.org Mon May 8 22:41:15 2017 Return-Path: Delivered-To: svn-src-stable@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 0517AD6348C; Mon, 8 May 2017 22:41:15 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 9A1CD7E4; Mon, 8 May 2017 22:41:14 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v48MfDaW091979; Mon, 8 May 2017 22:41:13 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v48MfDaW091975; Mon, 8 May 2017 22:41:13 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201705082241.v48MfDaW091975@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Mon, 8 May 2017 22:41:13 +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: r317991 - stable/10/sys/dev/qlxgbe 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@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 22:41:15 -0000 Author: davidcs Date: Mon May 8 22:41:13 2017 New Revision: 317991 URL: https://svnweb.freebsd.org/changeset/base/317991 Log: MFC r317180 Cleanup QLA_LOCK/QLA_UNLOCK macros remove unused QLA_TX_LOCK/QLA_TX_UNLOCK macros format qla_error_recovery() Modified: stable/10/sys/dev/qlxgbe/ql_hw.c stable/10/sys/dev/qlxgbe/ql_ioctl.c stable/10/sys/dev/qlxgbe/ql_os.c stable/10/sys/dev/qlxgbe/ql_os.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/qlxgbe/ql_hw.c ============================================================================== --- stable/10/sys/dev/qlxgbe/ql_hw.c Mon May 8 22:37:37 2017 (r317990) +++ stable/10/sys/dev/qlxgbe/ql_hw.c Mon May 8 22:41:13 2017 (r317991) @@ -183,9 +183,9 @@ qla_sysctl_stop_pegs(SYSCTL_HANDLER_ARGS if (ret == 1) { ha = (qla_host_t *)arg1; - (void)QLA_LOCK(ha, __func__, 0); + QLA_LOCK(ha); qla_stop_pegs(ha); - QLA_UNLOCK(ha, __func__); + QLA_UNLOCK(ha); } return err; Modified: stable/10/sys/dev/qlxgbe/ql_ioctl.c ============================================================================== --- stable/10/sys/dev/qlxgbe/ql_ioctl.c Mon May 8 22:37:37 2017 (r317990) +++ stable/10/sys/dev/qlxgbe/ql_ioctl.c Mon May 8 22:41:13 2017 (r317991) @@ -233,10 +233,10 @@ ql_eioctl(struct cdev *dev, u_long cmd, break; } - (void)QLA_LOCK(ha, __func__, 0); + QLA_LOCK(ha); if (!ha->hw.mdump_done) ha->qla_initiate_recovery = 1; - QLA_UNLOCK(ha, __func__); + QLA_UNLOCK(ha); #define QLNX_DUMP_WAIT_SECS 30 @@ -254,9 +254,9 @@ ql_eioctl(struct cdev *dev, u_long cmd, break; } - (void)QLA_LOCK(ha, __func__, 0); + QLA_LOCK(ha); ha->hw.mdump_done = 0; - QLA_UNLOCK(ha, __func__); + QLA_UNLOCK(ha); if ((rval = copyout(ha->hw.mdump_template, fw_dump->minidump, ha->hw.mdump_template_size))) { Modified: stable/10/sys/dev/qlxgbe/ql_os.c ============================================================================== --- stable/10/sys/dev/qlxgbe/ql_os.c Mon May 8 22:37:37 2017 (r317990) +++ stable/10/sys/dev/qlxgbe/ql_os.c Mon May 8 22:41:13 2017 (r317991) @@ -519,9 +519,9 @@ qla_pci_detach(device_t dev) ifp = ha->ifp; - (void)QLA_LOCK(ha, __func__, 0); + QLA_LOCK(ha); qla_stop(ha); - QLA_UNLOCK(ha, __func__); + QLA_UNLOCK(ha); qla_release(ha); @@ -895,9 +895,9 @@ qla_init(void *arg) QL_DPRINT2(ha, (ha->pci_dev, "%s: enter\n", __func__)); - (void)QLA_LOCK(ha, __func__, 0); + QLA_LOCK(ha); qla_init_locked(ha); - QLA_UNLOCK(ha, __func__); + QLA_UNLOCK(ha); QL_DPRINT2(ha, (ha->pci_dev, "%s: exit\n", __func__)); } @@ -929,13 +929,9 @@ qla_set_multi(qla_host_t *ha, uint32_t a if_maddr_runlock(ifp); - //if (QLA_LOCK(ha, __func__, 1) == 0) { - // ret = ql_hw_set_multi(ha, mta, mcnt, add_multi); - // QLA_UNLOCK(ha, __func__); - //} - QLA_LOCK(ha, __func__, 1); + QLA_LOCK(ha); ret = ql_hw_set_multi(ha, mta, mcnt, add_multi); - QLA_UNLOCK(ha, __func__); + QLA_UNLOCK(ha); return (ret); } @@ -958,9 +954,9 @@ qla_ioctl(struct ifnet *ifp, u_long cmd, if (ifa->ifa_addr->sa_family == AF_INET) { ifp->if_flags |= IFF_UP; if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) { - (void)QLA_LOCK(ha, __func__, 0); + QLA_LOCK(ha); qla_init_locked(ha); - QLA_UNLOCK(ha, __func__); + QLA_UNLOCK(ha); } QL_DPRINT4(ha, (ha->pci_dev, "%s: SIOCSIFADDR (0x%lx) ipv4 [0x%08x]\n", @@ -980,10 +976,12 @@ qla_ioctl(struct ifnet *ifp, u_long cmd, if (ifr->ifr_mtu > QLA_MAX_MTU) { ret = EINVAL; } else { - (void) QLA_LOCK(ha, __func__, 0); + QLA_LOCK(ha); + ifp->if_mtu = ifr->ifr_mtu; ha->max_frame_size = ifp->if_mtu + ETHER_HDR_LEN + ETHER_CRC_LEN; + if ((ifp->if_drv_flags & IFF_DRV_RUNNING)) { ret = ql_set_max_mtu(ha, ha->max_frame_size, ha->hw.rcv_cntxt_id); @@ -995,7 +993,7 @@ qla_ioctl(struct ifnet *ifp, u_long cmd, ha->std_replenish = QL_STD_REPLENISH_THRES; - QLA_UNLOCK(ha, __func__); + QLA_UNLOCK(ha); if (ret) ret = EINVAL; @@ -1007,7 +1005,7 @@ qla_ioctl(struct ifnet *ifp, u_long cmd, QL_DPRINT4(ha, (ha->pci_dev, "%s: SIOCSIFFLAGS (0x%lx)\n", __func__, cmd)); - (void)QLA_LOCK(ha, __func__, 0); + QLA_LOCK(ha); if (ifp->if_flags & IFF_UP) { if ((ifp->if_drv_flags & IFF_DRV_RUNNING)) { @@ -1031,7 +1029,7 @@ qla_ioctl(struct ifnet *ifp, u_long cmd, ha->if_flags = ifp->if_flags; } - QLA_UNLOCK(ha, __func__); + QLA_UNLOCK(ha); break; case SIOCADDMULTI: @@ -1922,7 +1920,7 @@ qla_error_recovery(void *context, int pe struct ifnet *ifp = ha->ifp; int i = 0; - (void)QLA_LOCK(ha, __func__, 0); + QLA_LOCK(ha); if (ha->flags.qla_interface_up) { @@ -1948,7 +1946,7 @@ qla_error_recovery(void *context, int pe } } - QLA_UNLOCK(ha, __func__); + QLA_UNLOCK(ha); if ((ha->pci_func & 0x1) == 0) { @@ -1962,18 +1960,22 @@ qla_error_recovery(void *context, int pe ha->msg_from_peer = 0; - (void)QLA_LOCK(ha, __func__, 0); + QLA_LOCK(ha); + ql_minidump(ha); - QLA_UNLOCK(ha, __func__); + + QLA_UNLOCK(ha); (void) ql_init_hw(ha); - (void)QLA_LOCK(ha, __func__, 0); + QLA_LOCK(ha); + if (ha->flags.qla_interface_up) { - qla_free_xmt_bufs(ha); - qla_free_rcv_bufs(ha); + qla_free_xmt_bufs(ha); + qla_free_rcv_bufs(ha); } - QLA_UNLOCK(ha, __func__); + + QLA_UNLOCK(ha); qla_send_msg_to_peer(ha, QL_PEER_MSG_ACK); @@ -1993,39 +1995,43 @@ qla_error_recovery(void *context, int pe (void) ql_init_hw(ha); - (void)QLA_LOCK(ha, __func__, 0); + QLA_LOCK(ha); + if (ha->flags.qla_interface_up) { - qla_free_xmt_bufs(ha); - qla_free_rcv_bufs(ha); - } - QLA_UNLOCK(ha, __func__); + qla_free_xmt_bufs(ha); + qla_free_rcv_bufs(ha); + } + + QLA_UNLOCK(ha); } - (void)QLA_LOCK(ha, __func__, 0); + QLA_LOCK(ha); if (ha->flags.qla_interface_up) { - if (qla_alloc_xmt_bufs(ha) != 0) { - QLA_UNLOCK(ha, __func__); - return; - } - qla_confirm_9kb_enable(ha); - if (qla_alloc_rcv_bufs(ha) != 0) { - QLA_UNLOCK(ha, __func__); - return; - } + if (qla_alloc_xmt_bufs(ha) != 0) { + QLA_UNLOCK(ha); + return; + } + qla_confirm_9kb_enable(ha); - ha->flags.stop_rcv = 0; - if (ql_init_hw_if(ha) == 0) { - ifp = ha->ifp; - ifp->if_drv_flags |= IFF_DRV_RUNNING; - ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; - ha->flags.qla_watchdog_pause = 0; - } + if (qla_alloc_rcv_bufs(ha) != 0) { + QLA_UNLOCK(ha); + return; + } + + ha->flags.stop_rcv = 0; + + if (ql_init_hw_if(ha) == 0) { + ifp = ha->ifp; + ifp->if_drv_flags |= IFF_DRV_RUNNING; + ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; + ha->flags.qla_watchdog_pause = 0; + } } else ha->flags.qla_watchdog_pause = 0; - QLA_UNLOCK(ha, __func__); + QLA_UNLOCK(ha); } static void @@ -2033,8 +2039,8 @@ qla_async_event(void *context, int pendi { qla_host_t *ha = context; - (void)QLA_LOCK(ha, __func__, 0); + QLA_LOCK(ha); qla_hw_async_event(ha); - QLA_UNLOCK(ha, __func__); + QLA_UNLOCK(ha); } Modified: stable/10/sys/dev/qlxgbe/ql_os.h ============================================================================== --- stable/10/sys/dev/qlxgbe/ql_os.h Mon May 8 22:37:37 2017 (r317990) +++ stable/10/sys/dev/qlxgbe/ql_os.h Mon May 8 22:41:13 2017 (r317991) @@ -147,12 +147,9 @@ MALLOC_DECLARE(M_QLA83XXBUF); /* * Locks */ -#define QLA_LOCK(ha, str, no_delay) mtx_lock(&ha->hw_lock) -#define QLA_UNLOCK(ha, str) mtx_unlock(&ha->hw_lock) +#define QLA_LOCK(ha) mtx_lock(&ha->hw_lock) +#define QLA_UNLOCK(ha) mtx_unlock(&ha->hw_lock) -#define QLA_TX_LOCK(ha) mtx_lock(&ha->tx_lock); -#define QLA_TX_UNLOCK(ha) mtx_unlock(&ha->tx_lock); - /* * structure encapsulating a DMA buffer */ From owner-svn-src-stable@freebsd.org Mon May 8 22:44:18 2017 Return-Path: Delivered-To: svn-src-stable@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 AE9D3D6370C; Mon, 8 May 2017 22:44:18 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 544A61AAD; Mon, 8 May 2017 22:44:18 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v48MiHdA093545; Mon, 8 May 2017 22:44:17 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v48MiHeZ093541; Mon, 8 May 2017 22:44:17 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201705082244.v48MiHeZ093541@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Mon, 8 May 2017 22:44:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r317992 - stable/9/sys/dev/qlxgbe X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 22:44:18 -0000 Author: davidcs Date: Mon May 8 22:44:16 2017 New Revision: 317992 URL: https://svnweb.freebsd.org/changeset/base/317992 Log: MFC r317180 Cleanup QLA_LOCK/QLA_UNLOCK macros remove unused QLA_TX_LOCK/QLA_TX_UNLOCK macros format qla_error_recovery() Modified: stable/9/sys/dev/qlxgbe/ql_hw.c stable/9/sys/dev/qlxgbe/ql_ioctl.c stable/9/sys/dev/qlxgbe/ql_os.c stable/9/sys/dev/qlxgbe/ql_os.h Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/dev/qlxgbe/ql_hw.c ============================================================================== --- stable/9/sys/dev/qlxgbe/ql_hw.c Mon May 8 22:41:13 2017 (r317991) +++ stable/9/sys/dev/qlxgbe/ql_hw.c Mon May 8 22:44:16 2017 (r317992) @@ -183,9 +183,9 @@ qla_sysctl_stop_pegs(SYSCTL_HANDLER_ARGS if (ret == 1) { ha = (qla_host_t *)arg1; - (void)QLA_LOCK(ha, __func__, 0); + QLA_LOCK(ha); qla_stop_pegs(ha); - QLA_UNLOCK(ha, __func__); + QLA_UNLOCK(ha); } return err; Modified: stable/9/sys/dev/qlxgbe/ql_ioctl.c ============================================================================== --- stable/9/sys/dev/qlxgbe/ql_ioctl.c Mon May 8 22:41:13 2017 (r317991) +++ stable/9/sys/dev/qlxgbe/ql_ioctl.c Mon May 8 22:44:16 2017 (r317992) @@ -233,10 +233,10 @@ ql_eioctl(struct cdev *dev, u_long cmd, break; } - (void)QLA_LOCK(ha, __func__, 0); + QLA_LOCK(ha); if (!ha->hw.mdump_done) ha->qla_initiate_recovery = 1; - QLA_UNLOCK(ha, __func__); + QLA_UNLOCK(ha); #define QLNX_DUMP_WAIT_SECS 30 @@ -254,9 +254,9 @@ ql_eioctl(struct cdev *dev, u_long cmd, break; } - (void)QLA_LOCK(ha, __func__, 0); + QLA_LOCK(ha); ha->hw.mdump_done = 0; - QLA_UNLOCK(ha, __func__); + QLA_UNLOCK(ha); if ((rval = copyout(ha->hw.mdump_template, fw_dump->minidump, ha->hw.mdump_template_size))) { Modified: stable/9/sys/dev/qlxgbe/ql_os.c ============================================================================== --- stable/9/sys/dev/qlxgbe/ql_os.c Mon May 8 22:41:13 2017 (r317991) +++ stable/9/sys/dev/qlxgbe/ql_os.c Mon May 8 22:44:16 2017 (r317992) @@ -519,9 +519,9 @@ qla_pci_detach(device_t dev) ifp = ha->ifp; - (void)QLA_LOCK(ha, __func__, 0); + QLA_LOCK(ha); qla_stop(ha); - QLA_UNLOCK(ha, __func__); + QLA_UNLOCK(ha); qla_release(ha); @@ -895,9 +895,9 @@ qla_init(void *arg) QL_DPRINT2(ha, (ha->pci_dev, "%s: enter\n", __func__)); - (void)QLA_LOCK(ha, __func__, 0); + QLA_LOCK(ha); qla_init_locked(ha); - QLA_UNLOCK(ha, __func__); + QLA_UNLOCK(ha); QL_DPRINT2(ha, (ha->pci_dev, "%s: exit\n", __func__)); } @@ -929,13 +929,9 @@ qla_set_multi(qla_host_t *ha, uint32_t a if_maddr_runlock(ifp); - //if (QLA_LOCK(ha, __func__, 1) == 0) { - // ret = ql_hw_set_multi(ha, mta, mcnt, add_multi); - // QLA_UNLOCK(ha, __func__); - //} - QLA_LOCK(ha, __func__, 1); + QLA_LOCK(ha); ret = ql_hw_set_multi(ha, mta, mcnt, add_multi); - QLA_UNLOCK(ha, __func__); + QLA_UNLOCK(ha); return (ret); } @@ -958,9 +954,9 @@ qla_ioctl(struct ifnet *ifp, u_long cmd, if (ifa->ifa_addr->sa_family == AF_INET) { ifp->if_flags |= IFF_UP; if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) { - (void)QLA_LOCK(ha, __func__, 0); + QLA_LOCK(ha); qla_init_locked(ha); - QLA_UNLOCK(ha, __func__); + QLA_UNLOCK(ha); } QL_DPRINT4(ha, (ha->pci_dev, "%s: SIOCSIFADDR (0x%lx) ipv4 [0x%08x]\n", @@ -980,10 +976,12 @@ qla_ioctl(struct ifnet *ifp, u_long cmd, if (ifr->ifr_mtu > QLA_MAX_MTU) { ret = EINVAL; } else { - (void) QLA_LOCK(ha, __func__, 0); + QLA_LOCK(ha); + ifp->if_mtu = ifr->ifr_mtu; ha->max_frame_size = ifp->if_mtu + ETHER_HDR_LEN + ETHER_CRC_LEN; + if ((ifp->if_drv_flags & IFF_DRV_RUNNING)) { ret = ql_set_max_mtu(ha, ha->max_frame_size, ha->hw.rcv_cntxt_id); @@ -995,7 +993,7 @@ qla_ioctl(struct ifnet *ifp, u_long cmd, ha->std_replenish = QL_STD_REPLENISH_THRES; - QLA_UNLOCK(ha, __func__); + QLA_UNLOCK(ha); if (ret) ret = EINVAL; @@ -1007,7 +1005,7 @@ qla_ioctl(struct ifnet *ifp, u_long cmd, QL_DPRINT4(ha, (ha->pci_dev, "%s: SIOCSIFFLAGS (0x%lx)\n", __func__, cmd)); - (void)QLA_LOCK(ha, __func__, 0); + QLA_LOCK(ha); if (ifp->if_flags & IFF_UP) { if ((ifp->if_drv_flags & IFF_DRV_RUNNING)) { @@ -1031,7 +1029,7 @@ qla_ioctl(struct ifnet *ifp, u_long cmd, ha->if_flags = ifp->if_flags; } - QLA_UNLOCK(ha, __func__); + QLA_UNLOCK(ha); break; case SIOCADDMULTI: @@ -1938,7 +1936,7 @@ qla_error_recovery(void *context, int pe struct ifnet *ifp = ha->ifp; int i = 0; - (void)QLA_LOCK(ha, __func__, 0); + QLA_LOCK(ha); if (ha->flags.qla_interface_up) { @@ -1964,7 +1962,7 @@ qla_error_recovery(void *context, int pe } } - QLA_UNLOCK(ha, __func__); + QLA_UNLOCK(ha); if ((ha->pci_func & 0x1) == 0) { @@ -1978,18 +1976,22 @@ qla_error_recovery(void *context, int pe ha->msg_from_peer = 0; - (void)QLA_LOCK(ha, __func__, 0); + QLA_LOCK(ha); + ql_minidump(ha); - QLA_UNLOCK(ha, __func__); + + QLA_UNLOCK(ha); (void) ql_init_hw(ha); - (void)QLA_LOCK(ha, __func__, 0); + QLA_LOCK(ha); + if (ha->flags.qla_interface_up) { - qla_free_xmt_bufs(ha); - qla_free_rcv_bufs(ha); + qla_free_xmt_bufs(ha); + qla_free_rcv_bufs(ha); } - QLA_UNLOCK(ha, __func__); + + QLA_UNLOCK(ha); qla_send_msg_to_peer(ha, QL_PEER_MSG_ACK); @@ -2009,39 +2011,43 @@ qla_error_recovery(void *context, int pe (void) ql_init_hw(ha); - (void)QLA_LOCK(ha, __func__, 0); + QLA_LOCK(ha); + if (ha->flags.qla_interface_up) { - qla_free_xmt_bufs(ha); - qla_free_rcv_bufs(ha); - } - QLA_UNLOCK(ha, __func__); + qla_free_xmt_bufs(ha); + qla_free_rcv_bufs(ha); + } + + QLA_UNLOCK(ha); } - (void)QLA_LOCK(ha, __func__, 0); + QLA_LOCK(ha); if (ha->flags.qla_interface_up) { - if (qla_alloc_xmt_bufs(ha) != 0) { - QLA_UNLOCK(ha, __func__); - return; - } - qla_confirm_9kb_enable(ha); - if (qla_alloc_rcv_bufs(ha) != 0) { - QLA_UNLOCK(ha, __func__); - return; - } + if (qla_alloc_xmt_bufs(ha) != 0) { + QLA_UNLOCK(ha); + return; + } + qla_confirm_9kb_enable(ha); - ha->flags.stop_rcv = 0; - if (ql_init_hw_if(ha) == 0) { - ifp = ha->ifp; - ifp->if_drv_flags |= IFF_DRV_RUNNING; - ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; - ha->flags.qla_watchdog_pause = 0; - } + if (qla_alloc_rcv_bufs(ha) != 0) { + QLA_UNLOCK(ha); + return; + } + + ha->flags.stop_rcv = 0; + + if (ql_init_hw_if(ha) == 0) { + ifp = ha->ifp; + ifp->if_drv_flags |= IFF_DRV_RUNNING; + ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; + ha->flags.qla_watchdog_pause = 0; + } } else ha->flags.qla_watchdog_pause = 0; - QLA_UNLOCK(ha, __func__); + QLA_UNLOCK(ha); } static void @@ -2049,8 +2055,8 @@ qla_async_event(void *context, int pendi { qla_host_t *ha = context; - (void)QLA_LOCK(ha, __func__, 0); + QLA_LOCK(ha); qla_hw_async_event(ha); - QLA_UNLOCK(ha, __func__); + QLA_UNLOCK(ha); } Modified: stable/9/sys/dev/qlxgbe/ql_os.h ============================================================================== --- stable/9/sys/dev/qlxgbe/ql_os.h Mon May 8 22:41:13 2017 (r317991) +++ stable/9/sys/dev/qlxgbe/ql_os.h Mon May 8 22:44:16 2017 (r317992) @@ -147,12 +147,9 @@ MALLOC_DECLARE(M_QLA83XXBUF); /* * Locks */ -#define QLA_LOCK(ha, str, no_delay) mtx_lock(&ha->hw_lock) -#define QLA_UNLOCK(ha, str) mtx_unlock(&ha->hw_lock) +#define QLA_LOCK(ha) mtx_lock(&ha->hw_lock) +#define QLA_UNLOCK(ha) mtx_unlock(&ha->hw_lock) -#define QLA_TX_LOCK(ha) mtx_lock(&ha->tx_lock); -#define QLA_TX_UNLOCK(ha) mtx_unlock(&ha->tx_lock); - /* * structure encapsulating a DMA buffer */ From owner-svn-src-stable@freebsd.org Mon May 8 23:57:56 2017 Return-Path: Delivered-To: svn-src-stable@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 29F47D64950; Mon, 8 May 2017 23:57:56 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 D89F21AD8; Mon, 8 May 2017 23:57:55 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v48NvsPo021941; Mon, 8 May 2017 23:57:54 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v48NvsQS021940; Mon, 8 May 2017 23:57:54 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201705082357.v48NvsQS021940@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Mon, 8 May 2017 23:57:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r317993 - stable/11/gnu/usr.bin/dtc X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 23:57:56 -0000 Author: gonzo Date: Mon May 8 23:57:54 2017 New Revision: 317993 URL: https://svnweb.freebsd.org/changeset/base/317993 Log: MFC r315010: [dtc] regenerate version file if upstream Makefile has been changed Keep version file in sync by adding dependency to upstream Makefile Modified: stable/11/gnu/usr.bin/dtc/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/gnu/usr.bin/dtc/Makefile ============================================================================== --- stable/11/gnu/usr.bin/dtc/Makefile Mon May 8 22:44:16 2017 (r317992) +++ stable/11/gnu/usr.bin/dtc/Makefile Mon May 8 23:57:54 2017 (r317993) @@ -34,7 +34,7 @@ OBJS+= dtc-parser.tab.o dtc-lexer.lex.o CLEANFILES+= dtc-parser.tab.o dtc-lexer.lex.o dtc-parser.tab.c \ dtc-parser.tab.h dtc-lexer.lex.c ${DTCVERSIONFILE} -${DTCVERSIONFILE}: +${DTCVERSIONFILE}: ${DTCDIR}/Makefile @echo '#define DTC_VERSION "DTC ${DTCVERSION}"' > ${DTCVERSIONFILE} dtc-parser.tab.o: dtc-parser.tab.c dtc-parser.tab.h From owner-svn-src-stable@freebsd.org Tue May 9 00:29:30 2017 Return-Path: Delivered-To: svn-src-stable@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 9217FD62006; Tue, 9 May 2017 00:29:30 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 3537C9D; Tue, 9 May 2017 00:29:30 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v490TTcj034047; Tue, 9 May 2017 00:29:29 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v490TTa9034046; Tue, 9 May 2017 00:29:29 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201705090029.v490TTa9034046@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Tue, 9 May 2017 00:29:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r317994 - stable/11/sys/boot/fdt X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 00:29:30 -0000 Author: gonzo Date: Tue May 9 00:29:29 2017 New Revision: 317994 URL: https://svnweb.freebsd.org/changeset/base/317994 Log: MFC r315019: [loader][fdt] Fix applying overlays without __local_fixups__ node Do not return error if __local_fixups__ node is missing in DTB overlay because local fixup data is optional. Reported by: Manuel Stuhn Modified: stable/11/sys/boot/fdt/fdt_overlay.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/boot/fdt/fdt_overlay.c ============================================================================== --- stable/11/sys/boot/fdt/fdt_overlay.c Mon May 8 23:57:54 2017 (r317993) +++ stable/11/sys/boot/fdt/fdt_overlay.c Tue May 9 00:29:29 2017 (r317994) @@ -358,21 +358,26 @@ static int fdt_overlay_do_local_fixups(void *main_fdtp, void *overlay_fdtp) { int overlay_local_fixups_o; - int len; + int len, rv; const char *fixups; uint32_t phandle_offset; overlay_local_fixups_o = fdt_path_offset(overlay_fdtp, "/__local_fixups__"); - if (overlay_local_fixups_o < 0) - return (-1); + if (overlay_local_fixups_o < 0) { + /* If not local fixups - do nothing */ + if (overlay_local_fixups_o == -FDT_ERR_NOTFOUND) + return (0); + return (overlay_local_fixups_o); + } phandle_offset = fdt_max_phandle(main_fdtp); fdt_increase_phandles(overlay_fdtp, phandle_offset); fixups = fdt_getprop_w(overlay_fdtp, overlay_local_fixups_o, "fixup", &len); if (fixups) { - if (fdt_do_local_fixup(overlay_fdtp, fixups, len, phandle_offset) < 0) - return (-1); + rv = fdt_do_local_fixup(overlay_fdtp, fixups, len, phandle_offset); + if (rv < 0) + return (rv); } return (0); From owner-svn-src-stable@freebsd.org Tue May 9 00:51:12 2017 Return-Path: Delivered-To: svn-src-stable@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 4E5CBD62ACB; Tue, 9 May 2017 00:51:12 +0000 (UTC) (envelope-from erj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 039B22FD; Tue, 9 May 2017 00:51:11 +0000 (UTC) (envelope-from erj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v490pBNY043137; Tue, 9 May 2017 00:51:11 GMT (envelope-from erj@FreeBSD.org) Received: (from erj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v490pBC5043136; Tue, 9 May 2017 00:51:11 GMT (envelope-from erj@FreeBSD.org) Message-Id: <201705090051.v490pBC5043136@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: erj set sender to erj@FreeBSD.org using -f From: Eric Joyner Date: Tue, 9 May 2017 00:51: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: r317995 - stable/10/sys/dev/ixgbe 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@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 00:51:12 -0000 Author: erj Date: Tue May 9 00:51:10 2017 New Revision: 317995 URL: https://svnweb.freebsd.org/changeset/base/317995 Log: ixv(4): Fix more tinderbox builds by adding missing declarations. Sponsored by: Intel Corporation Modified: stable/10/sys/dev/ixgbe/ixv_osdep.h Modified: stable/10/sys/dev/ixgbe/ixv_osdep.h ============================================================================== --- stable/10/sys/dev/ixgbe/ixv_osdep.h Tue May 9 00:29:29 2017 (r317994) +++ stable/10/sys/dev/ixgbe/ixv_osdep.h Tue May 9 00:51:10 2017 (r317995) @@ -162,6 +162,12 @@ struct ixgbe_osdep struct ixgbe_hw; /* These routines are needed by the shared code */ +extern u16 ixv_read_pci_cfg(struct ixgbe_hw *, u32); +#define IXGBE_READ_PCIE_WORD ixv_read_pci_cfg + +extern void ixv_write_pci_cfg(struct ixgbe_hw *, u32, u16); +#define IXGBE_WRITE_PCIE_WORD ixv_write_pci_cfg + #define IXGBE_WRITE_FLUSH(a) IXGBE_READ_REG(a, IXGBE_STATUS) extern u32 ixv_read_reg(struct ixgbe_hw *, u32); From owner-svn-src-stable@freebsd.org Tue May 9 01:08:47 2017 Return-Path: Delivered-To: svn-src-stable@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 4254BD62F6D; Tue, 9 May 2017 01:08:47 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ED535FD6; Tue, 9 May 2017 01:08:46 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4918jWC050465; Tue, 9 May 2017 01:08:45 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4918jNE050464; Tue, 9 May 2017 01:08:45 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201705090108.v4918jNE050464@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Tue, 9 May 2017 01:08:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r317997 - stable/11/usr.bin/proccontrol X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 01:08:47 -0000 Author: brooks Date: Tue May 9 01:08:45 2017 New Revision: 317997 URL: https://svnweb.freebsd.org/changeset/base/317997 Log: MFC r317706: Use MAN= rather than MK_MAN=no to not install a manpage. Modified: stable/11/usr.bin/proccontrol/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/proccontrol/Makefile ============================================================================== --- stable/11/usr.bin/proccontrol/Makefile Tue May 9 01:01:41 2017 (r317996) +++ stable/11/usr.bin/proccontrol/Makefile Tue May 9 01:08:45 2017 (r317997) @@ -2,6 +2,6 @@ PROG= proccontrol WARNS?= 6 -MK_MAN=no +MAN= .include From owner-svn-src-stable@freebsd.org Tue May 9 09:53:20 2017 Return-Path: Delivered-To: svn-src-stable@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 6411DD65D87; Tue, 9 May 2017 09:53:20 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 1FA3F7CC; Tue, 9 May 2017 09:53:20 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v499rJIX068757; Tue, 9 May 2017 09:53:19 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v499rI1t068754; Tue, 9 May 2017 09:53:18 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201705090953.v499rI1t068754@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Date: Tue, 9 May 2017 09:53:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318019 - in stable/11/sys/boot: common i386/libi386 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 09:53:20 -0000 Author: royger Date: Tue May 9 09:53:18 2017 New Revision: 318019 URL: https://svnweb.freebsd.org/changeset/base/318019 Log: MFC r316754: loader/multiboot: fix multiboot loading Sponsored by: Citrix Systems R&D Modified: stable/11/sys/boot/common/bootstrap.h stable/11/sys/boot/common/module.c stable/11/sys/boot/i386/libi386/multiboot.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/boot/common/bootstrap.h ============================================================================== --- stable/11/sys/boot/common/bootstrap.h Tue May 9 09:03:04 2017 (r318018) +++ stable/11/sys/boot/common/bootstrap.h Tue May 9 09:53:18 2017 (r318019) @@ -229,6 +229,7 @@ void file_discard(struct preloaded_file void file_addmetadata(struct preloaded_file *fp, int type, size_t size, void *p); int file_addmodule(struct preloaded_file *fp, char *modname, int version, struct kernel_module **newmp); +void file_removemetadata(struct preloaded_file *fp); /* MI module loaders */ #ifdef __elfN Modified: stable/11/sys/boot/common/module.c ============================================================================== --- stable/11/sys/boot/common/module.c Tue May 9 09:03:04 2017 (r318018) +++ stable/11/sys/boot/common/module.c Tue May 9 09:53:18 2017 (r318019) @@ -642,6 +642,22 @@ file_findmetadata(struct preloaded_file return(md); } +/* + * Remove all metadata from the file. + */ +void +file_removemetadata(struct preloaded_file *fp) +{ + struct file_metadata *md, *next; + + for (md = fp->f_metadata; md != NULL; md = next) + { + next = md->md_next; + free(md); + } + fp->f_metadata = NULL; +} + struct file_metadata * metadata_next(struct file_metadata *md, int type) { Modified: stable/11/sys/boot/i386/libi386/multiboot.c ============================================================================== --- stable/11/sys/boot/i386/libi386/multiboot.c Tue May 9 09:03:04 2017 (r318018) +++ stable/11/sys/boot/i386/libi386/multiboot.c Tue May 9 09:53:18 2017 (r318019) @@ -267,7 +267,39 @@ multiboot_exec(struct preloaded_file *fp * information is placed at the start of the second module and * the original modulep value is saved together with the other * metadata, so we can relocate everything. + * + * Native layout: + * fp->f_addr + fp->f_size + * +---------+----------------+------------+ + * | | | | + * | Kernel | Modules | Metadata | + * | | | | + * +---------+----------------+------------+ + * fp->f_addr modulep kernend + * + * Xen layout: + * + * Initial: + * fp->f_addr + fp->f_size + * +---------+----------+----------------+------------+ + * | | | | | + * | Kernel | Reserved | Modules | Metadata | + * | | | | dry run | + * +---------+----------+----------------+------------+ + * fp->f_addr + * + * After metadata polacement (ie: final): + * fp->f_addr + fp->f_size + * +-----------+---------+----------+----------------+ + * | | | | | + * | Kernel | Free | Metadata | Modules | + * | | | | | + * +-----------+---------+----------+----------------+ + * fp->f_addr modulep kernend + * \__________/ \__________________________/ + * Multiboot module 0 Multiboot module 1 */ + fp = file_findfile(NULL, "elf kernel"); if (fp == NULL) { printf("No FreeBSD kernel provided, aborting\n"); @@ -275,6 +307,13 @@ multiboot_exec(struct preloaded_file *fp goto error; } + if (fp->f_metadata != NULL) { + printf("FreeBSD kernel already contains metadata, aborting\n"); + error = EINVAL; + goto error; + } + + mb_mod = malloc(sizeof(struct multiboot_mod_list) * NUM_MODULES); if (mb_mod == NULL) { error = ENOMEM; @@ -312,6 +351,9 @@ multiboot_exec(struct preloaded_file *fp goto error; } + /* Clean the metadata added to the kernel in the bi_load64 dry run */ + file_removemetadata(fp); + /* * This is the position where the second multiboot module * will be placed. From owner-svn-src-stable@freebsd.org Tue May 9 13:44:55 2017 Return-Path: Delivered-To: svn-src-stable@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 55714D65DD8; Tue, 9 May 2017 13:44:55 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 34BA23CE; Tue, 9 May 2017 13:44:54 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49DirLR066560; Tue, 9 May 2017 13:44:53 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49DirC0066559; Tue, 9 May 2017 13:44:53 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705091344.v49DirC0066559@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 9 May 2017 13:44:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318028 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 13:44:55 -0000 Author: gjb Date: Tue May 9 13:44:53 2017 New Revision: 318028 URL: https://svnweb.freebsd.org/changeset/base/318028 Log: Prune stale entries from 11.0-RELEASE. Bump copyright year while here. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 12:56:21 2017 (r318027) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 13:44:53 2017 (r318028) @@ -25,8 +25,7 @@ - 2015 - 2016 + 2017 The &os; Documentation Project @@ -160,672 +159,51 @@ Userland Configuration Changes - The default &man.newsyslog.conf.5; now - includes files in the - /etc/newsyslog.conf.d/ and - /usr/local/etc/newsyslog.conf.d/ - directories by default for &man.newsyslog.8;. - - The &man.mailwrapper.8; utility has been - updated to use &man.mailer.conf.5; from the - LOCALBASE environment variable, which - defaults to /usr/local - if unset. - - The MK_ARM_EABI - &man.src.conf.5; option has been removed. - - The WITH_SYSTEM_COMPILER - &man.src.conf.5; option is enabled by default. - - The ntp suite - has been updated to version 4.2.8p8. - - The - /etc/ntp/leap-seconds - has been updated to version 3676752000. +   Userland Application Changes - When unable to load a kernel module with - &man.kldload.8;, a message informing to view output of - &man.dmesg.8; is now printed, opposed to the previous output - Exec format error.. - - Allow &man.pciconf.8; to identify PCI - devices that are attached to a driver to be identified by - their device name instead of just the selector. Additionally, - an optional device argument to the -l flag - to restrict the output to only listing details about a single - device. - - Support for displaying VPD for PCI - devices via &man.pciconf.8; has been added. - - The &man.ps.1; utility has been updated - to include a new keyword, tracer, which - displays the PID of the tracing - process. - - Support for adding empty partitions has - been added to the &man.mkimg.1; utility. - - The &man.primes.6; utility has been - updated to correctly enumerate prime numbers between - 4295098369 and - 3825123056546413050, which prior to this - change, it would be possible for returned values to be - incorrectly identified as prime numbers. - - The &man.mkimg.1; utility has been - updated to include three options used to print information - about &man.mkimg.1; itself: - - - - - - - - Option - Output - - - - - - --version - The current version of the &man.mkimg.1; - utility - - - - --formats - The disk image file formats supported by - &man.mkimg.1; - - - - --schemes - The partition schemes supported by - &man.mkimg.1; - - - - - - Userland &man.ctf.5; support in - &man.dtrace.1; has been added. With this change, - &man.dtrace.1; is able to resolve type info for function and - USDT probe arguments, and function return - values. - - The &man.elfdump.1; utility has been - updated to support capability mode provided by - &man.capsicum.4;. - - The - &man.fstyp.8; utility has been added, which is used to - determine the filesystem on a specified device. - - The libedit library - has been updated to support UTF-8, which - additionally provides unicode support to &man.sh.1;. - - The - &man.mkimg.1; utility has been updated to support the - MBR EFI partition - type. - - The &man.ptrace.2; system - call has been updated include support for Altivec registers on - &os;/&arch.powerpc;. - - A new device control utility, - &man.devctl.8; has been added, which allows making - administrative changes to individual devices, such as - attaching and detaching drivers, and enabling and disabling - devices. The &man.devctl.8; utility uses the new - &man.devctl.3; library. - - The &man.netstat.1; utility has been - updated to link against the &man.libxo.3; shared - library. - - A new flag, -c, has - been added to the &man.mkimg.1; utility, which allows - specifying the capacity of the target disk image. - - The - &man.uefisign.8; utility has been added. - - The &man.freebsd-update.8; utility has - been updated to prevent fetching updated binary patches when - a previous upgrade has not been thoroughly completed. - - A regression in the &man.libarchive.3; - library that would prevent a directory from being included in - the archive when --one-file-system is used - has been fixed. - - The - &man.ar.1; utility has been updated to set - ARCHIVE_EXTRACT_SECURE_SYMLINKS and - ARCHIVE_EXTRACT_SECURE_NODOTDOT to disallow - directory traversal when extracting an archive, similar to - &man.tar.1;. - - A race condition in &man.wc.1; that - would cause final results to be sent to &man.stderr.4; when - receiving the SIGINFO signal has been - fixed. - - The &man.chflags.1;, &man.chgrp.1;, - &man.chmod.1;, and &man.chown.8; utilities now affect symbolic - links when the -R flag is specified, as - documented in &man.symlink.7;. - - The &man.date.1; utility has been - updated to print the modification time of the file passed as - an argument to the -r flag, improving - compatibility with the GNU &man.date.1; - utility behavior. - - The &man.pw.8; utility has been updated - with a new flag, -R, that sets the root - directory within which the utility will operate. - - The &man.lockstat.1; utility has been - updated with several improvements: - - - - Spin locks are now reported as the amount of time - spinning, instead of loop iterations. - - - - Reader locks are now recognized as adaptive that can - spin on &os;. - - - - Lock aquisition events for successful reader try-lock - events are now reported. - - - - Spin and block events are now reported before lock - acquisition events. - - - - The &man.fstyp.8; utility has been - updated to be able to detect &man.zfs.8; and &man.geli.8; - filesystems. - - The &man.mkimg.1; utility has been - updated to include support for NTFS - filesystems in both MBR and - GPT partitioning schemes. - - The &man.quota.1; utility has been - updated to include support for IPv6. - - The &man.jexec.8; utility has been - updated to include a new flag, -l, which - ensures a clean environment in the target jail when used. - Additionally, &man.jexec.8; will run a shell within the target - jail when run no commands are specified. - - The &man.w.1; utility has been updated - to display the full IPv6 remote address of the host from which - a user is connected. - - The &man.jail.8; framework has been - updated to allow mounting &man.linprocfs.5; and - &man.linsysfs.5; within a jail. - - The &man.patch.1; utility has been - updated to include a new option to the -V - flag, none, which disables backup file - creation when applying a patch. - - The - &man.ar.1; utility now enables deterministic mode - (-D) by default. This behavior can be - disabled by specifying the -U flag. - - The &man.xargs.1; utility has been - updated to allow specifying 0 as an - argument to the -P (parallel mode) flag, - which allows creating as many concurrent processes as - possible. - - The &man.patch.1; utility has been - updated to remove the automatic checkout feature. - - A - new utility, &man.sesutil.8;, has been added, which is used - to manage &man.ses.4; devices. - - The &man.pciconf.8; utility has been - updated to use the PCI ID database from the misc/pciids package, if present, - falling back to the PCI ID database in the &os; base - system. - - By default the &man.ifconfig.8; utility - will set the default regulatory domain to FCC - on wireless interfaces. As a result, newly created wireless - interfaces with default settings will have less chances to - violate country-specific regulations. +   Contributed Software - &man.byacc.1; has been updated to - version 20140101. - - OpenSSH has - been updated to 7.2p2. - - SSHv1 support has been removed from - OpenSSH. - - Support for DSA is disabled by default in - OpenSSH. - - mdocml has - been updated to version 1.12.3. - - The binutils - suite of utilities has been updated to include upstream - patches that add new relocations for &arch.powerpc; - support. - - The - ELF Tool Chain has been updated to - upstream revision r3272. - - The texinfo - utility and info pages were removed from - the base system. The print/texinfo port should be - installed on systems where info pages are - needed. - - The ELF - object manipulation tools - addr2line, - elfcopy (strip), - nm, - readelf, - size, and - strings were switched to the - versions from the ELF Tool Chain project. - - The libedit library - has been updated to include UTF-8 support, - adding UTF-8 support to the &man.sh.1; - shell. - - The &man.xz.1; utility has been updated - to support multi-threaded compression. - - The - elftoolchain utilities have been - updated to version 3179. - - The &man.xz.1; utility has been updated - to version 5.2.2. - - The &man.nvi.1; utility has been updated - to version 2.1.3. - - The &man.wpa.supplicant.8; and - &man.hostapd.8; utilities have been updated to version - 2.4. - - The - &man.resolvconf.8; utility has been updated to version - 3.7.3. - - bmake has - been updated to version 20150606. - - sendmail has - been updated to 8.15.2. Starting with &os; 11.0 and - sendmail 8.15, sendmail uses uncompressed IPv6 addresses by - default, i.e., they will not contain ::. For - example, instead of ::1, it will be - 0:0:0:0:0:0:0:1. This permits a zero subnet to - have a more specific match, such as different map entries for - IPv6:0:0 versus IPv6:0. This change requires that - configuration data (including maps, files, classes, custom - ruleset, etc.) must use the same format, so make certain such - configuration data is upgrading. As a very simple check - search for patterns like 'IPv6:[0-9a-fA-F:]*::' and 'IPv6::'. - To return to the old behavior, set the m4 option - confUSE_COMPRESSED_IPV6_ADDRESSES or the cf - option UseCompressedIPv6Addresses. - - The &man.tcpdump.1; utility has been - updated to version 4.7.4. - - OpenSSL has - been updated to version 1.0.2h. - - The - &man.ssh.1; utility has been updated to re-implement hostname - canonicalization before locating the host in - known_hosts. - - The &man.libarchive.3; library has been - updated to properly skip a sparse file entry in a &man.tar.1; - file, which would previously produce errors. - - The apr - library used by &man.svnlite.1; has been updated to version - 1.5.2. - - The serf - library used by &man.svnlite.1; has been updated to version - 1.3.8. - - The &man.svnlite.1; utility has been - updated to version 1.8.14. - - The sqlite3 - library used by &man.svnlite.1; and &man.kerberos.8; has been - updated to version 3.12.1. - - Timezone data files have been updated to - version 2015f. - - The &man.acpi.4; subsystem has been - updated to version 20150818. - - The &man.unbound.8; utility has been - updated to version 1.5.4. - - &man.jemalloc.3; has been updated to - version 4.0.2. - - The &man.file.1; utility has been - updated to version 5.28. - - The &man.nc.1; utility has been updated - to the OpenBSD 5.8 version. - - Clang has - been updated to version 3.8.0. - - LLVM has - been updated to version 3.8.0. - - LLDB has - been updated to version 3.8.0. - - libc++ has - been updated to version 3.8.0. - - The - compiler_rt utility has been - updated to version 3.8.0. - - ACPICA has been - updated to version 20160527. - - OpenBSM has been - updated to version 1.2 alpha 4. - - libucl has - been updated to version 0.8.0. - - The NetBSD - Project's &man.libblacklist.3; library and applications - have been ported and integrated into the system. Packet - filtering support for the &man.pf.4; packet filtering systems - has been implemented. The blacklist - system provides the blacklistd - daemon, the helper script - blacklistd-helper to make changes - to the running packet filter system and the - blacklistctl control program. - A selection of system daemons, including: - fingerd, - ftpd, - rlogind, and - rshd have been modified to support - sending notifications to the blacklistd - daemon. - - Support for - the &man.ipfw.4; packet filter has been added to the - blacklistd-helper script. - - Support for - the &man.ipfilter.4; packet filter has been added to the - blacklistd-helper script. +   Installation and Configuration Tools - The &man.bsdinstall.8; partition editor - and &man.sade.8; utility have been updated to include native - ZFS support. - - The &os; installation utility, - &man.bsdinstall.8;, has been updated to set the - canmount &man.zfs.8; property to - off for the /var dataset, preventing the - contents of directories within /var from conflicting when - using multiple boot environments, such as that provided by - sysutils/beadm. - - The &man.bsdconfig.8; utility has been - updated to skip the initial &man.tzsetup.8; - UTC versus wall-clock time prompt when run - in a virtual machine, determined when the - kern.vm_guest &man.sysctl.8; is set to - 1. - - The &man.bsdinstall.8; utility has been - updated to use the new &man.dpv.3; library to display progress - when extracting the &os; distributions. - - Support for detecting and implementing - aligning partitions on 1Mb boundaries has been added to - &man.bsdinstall.8;. - - Support for detecting and implementing - a workaround for various laptops and motherboards that do not - boot properly from GPT-partitioned disks - has been added to &man.bsdinstall.8;. Additionally, the - active flag will be set on the partition - when needed. - - Support for selecting the partitioning - scheme when installing on the UFS - filesystem has been added to &man.bsdinstall.8;. +   <filename class="directory">/etc/rc.d</filename> Scripts - The &man.rc.8; subsystem has been - updated to allow configuring services in ${LOCALBASE}/etc/rc.conf.d/. - If LOCALBASE is unset, it defaults to - /usr/local. - - A new &man.rc.8; script, - growfs, has been added, which will resize - the root filesystem on boot if /firstboot - exists. - - The mrouted - &man.rc.8; script has been removed from the base system. An - equivalent script is available from the net/mrouted port. - - A new &man.rc.8; script, - iovctl, has been added, which allows - automatically starting the &man.iovctl.8; utility at - boot. - - The &man.service.8; utility has been - updated to honor entries within /etc/rc.conf.d/. - +   <filename class="directory">/etc/periodic</filename> Scripts - The daily &man.periodic.8; script - 110.clean-tmps has been updated to avoid - crossing filesystem mount boundaries when cleaning files in - /tmp. - - A new - &man.periodic.8; script, - 510.status-world-kernel, has been added, - which evaluates the running userland and kernel versions from - the &man.uname.1; -U and - -K arguments, and prints an error if the - system userland and kernel are not in sync. +   Runtime Libraries and API - The Blowfish &man.crypt.3; default - format has been changed to - $2b$. - - The &man.readline.3; library is now - statically linked in software within the base system, and the - shared library is no longer installed, allowing the Ports - Collection to use a modern version of the library. - - The &man.strptime.3; library has been - updated to add support for POSIX-2001 - features %U and - %W. - - The &man.dl.iterate.phdr.3; library has been - changed to always return the path name of the - ELF object in the - dlpi_name structure member. - - The &man.libxo.3; library has been - imported to the base system. - - A - userland library for Chelsio Terminator 5 based iWARP cards - has been added, allowing userland RDMA - applications to work over compatible - NICs. - - The &man.gpio.3; library has been added, - providing a wrapper around the &man.gpio.4; kernel - interface. - - The - &man.procctl.2; system call has been updated to include - a facility for non-&man.init.8; processes to be declared as - the reaper of child processes and their decendants. - - The futimens() and - utimensat() system calls have been - added. See &man.utimensat.2; for more information. - - The &man.elf.3; compile-time dependency - has been removed from dtri.o, which - allows adding DTrace probes to - userland applications and libraries without also linking - against &man.elf.3;. - - The &man.setmode.3; function has been - updated to consistently set errno on - failure. - - The &man.qsort.3; functions have been - updated to be able to handle 32-bit aligned data on 64-bit - platforms, also providing a significant improvement in 32-bit - workloads. - - Several standard include headers have - been updated to use of gcc - attributes, such as __result_use_check(), - __alloc_size(), and - __nonnull(). - - Support for file verification in - MAC has been added. - - The - libgomp library is now only built when - building GCC from the base system. An - up-to-date version is available in the Ports Collection as - devel/libiomp5-devel. - - The stdlib.h and - malloc.h headers have been updated to - make use of the gcc - alloc_align() attribute. - - The Blowfish &man.crypt.3; library - has been updated to support $2y$ hashes. - - The &man.execl.3; and &man.execlp.3; - library functions have been updated to use the - __sentinel gcc - attribute. +   ABI Compatibility - The &linux; compatibility version has - been updated to 2.6.18. The - compat.linux.osrelease &man.sysctl.8; is - evaluated when building the emulators/linux-c6 and related - ports. - - The stack protector has been upgraded to - the "strong" level, elevating the protection against buffer - overflows. While this significantly improves the security of - the system, extensive testing was done to ensure there are no - measurable side effects in performance or - functionality. +   @@ -839,246 +217,19 @@ Kernel Bug Fixes - A kernel bug that inhibited proper - functionality of the dev.cpu.0.freq - &man.sysctl.8; on &intel; processors with Turbo - Boost ™ enabled has been fixed. - - Support for - &man.dtrace.1; stack tracing has been fixed for - &os;/&arch.powerpc;, using the trapexit() - and asttrapexit() functions instead of - checking within addressed kernel space. - - A kernel panic triggered when destroying - a &man.vnet.9; &man.jail.8; configured with &man.gif.4; has - been fixed. - - A kernel panic triggered when destroying - a &man.vnet.9; &man.jail.8; configured with &man.gre.4; has - been fixed. - - A bug in &man.ipfw.4; that could - potentially lead to a kernel panic when using &man.dummynet.4; - at layer 2 has been fixed. - - The - kernel RPC has been updated to include - several enhancements: - - - - The 45 MiB limit on requests queued for - &man.nfsd.8; threads has been removed. - - - - Avoids unnecessary throttling by not deferring - accounting for completed requests. - - - - Fixes an integer overflow and signedness bugs. - - - - Support for - &man.dtrace.1; has been added for the - Book-E ™. - - The &man.kqueue.2; system call has been - updated to handle write events to files larger than 2 - gigabytes. +   Kernel Configuration - The IMAGACT_BINMISC - kernel configuration option has been enabled by default, - which enables application execution through emulators, such - as Qemu. - - The VT kernel - configuration file has been removed, and the &man.vt.4; - driver is included in the GENERIC kernel. - To enable &man.vt.4;, enter set kern.vty=vt - at the &man.loader.8; prompt during boot, or add - kern.vty=vt to &man.loader.conf.5; and - reboot the system. - - The &man.config.8; utility has been - updated to allow using a non-standard src/ tree, specified as an - argument to the -s flag. - - The - &os;/&arch.powerpc64; kernel now builds as - a position-independent executable, allowing the kernel to be - loaded into and run from any physical or virtual - address. - - - This change requires an update to &man.loader.8;. - The userland and kernel must be updated before rebooting the - system. - - - A new module for creating - rpi.dtb has been added for the Raspberry - Pi. - - The - rpi.dtb module is now installed to - /boot/dtb/ by - default for the Raspberry Pi system. - - Kernel support for Vector-Scalar eXtension - (VSX) found on POWER7 and POWER8 hardware - has been added. - - The &man.pmap.9; implementation for 64-bit - &powerpc; processors has been overhaulded to improve - concurrency. - - A new module for creating - the dtb module for AM335x systems has - been added. - - The - PAE_TABLES kernel configuration option has - been added for &os;/&arch.i386;, which instructs &man.pmap.9; - to use PAE format for page tables while - maintaining a 32-bit physical address size elsewhere in the - kernel. The use of this option can enhance application-level - security by enabling the creation of no execute - mappings on modern &arch.i386; processors. Unlike the - PAE option, PAE_TABLES - preserves kernel binary interface (KBI) - compatibility with non-PAE kernels, - allowing non-PAE kernel modules and drivers - to work with a PAE_TABLES-enabled kernel. - Additionally, system limits are tuned for 4GB maximum - RAM, avoiding kernel virtual address space - (KVA) exhaustion. - - The SIFTR kernel - configuration has been added, allowing building &man.siftr.4; - statically into the kernel. - - The &arch.arm; boot loader, - ubldr, is now relocatable. In addition, - ubldr.bin is now created during build - time, which is a stripped binary with an entry point of - 0, providing the ability to specify the - load address by running go - ${loadaddr} in - u-boot. - - The &man.nvd.4; and &man.nvme.4; drivers are - now included in the GENERIC kernel - configuration by default. - - A new kernel configuration option, - EM_MULTIQUEUE, has been added which enables - multi-queue support in the &man.em.4; driver. - - - Multi-queue support in the &man.em.4; driver is not - officially supported by &intel;. - - - The GENERIC kernel - configuration has been updated to include the - IPSEC option by default. - - Initial NUMA - affinity and policy configuration has been added. See - &man.numactl.1;, and &man.numa.getaffinity.2;, for usage - details. - - The &man.pms.4; driver has been added - to the GENERIC kernel configuration for - supported architectures. - - The - CUBIEBOARD2 kernel configuration has been - renamed to A20. - - Kernel - debugging symbols are now installed to /usr/lib/debug/boot/kernel/. - To retain the previous behavior, add - KERN_DEBUGDIR="" to - &man.src.conf.5;. - - &arch.arm64; has been switched over to using - INTRNG by default. +   System Tuning and Controls - The - &man.hwpmc.4; default and maximum callchain depths have been - increased. The default has been increased from 16 to 32, and - the maximum increased from 32 to 128. - - The kern.osrelease - and kern.osreldate are now configurable - &man.jail.8; parameters. - - The &man.devfs.5; device filesystem has - been changed to update timestamps for read/write operations - using seconds precision. A new &man.sysctl.8;, - vfs.devfs.dotimes has been added, which - when set to a non-zero value, enables default precision - timestamps for these operations. - - A new - &man.sysctl.8;, kern.racct.enable, has been - added, which when set to a non-zero value allows using - &man.rctl.8; with the GENERIC kernel. - A new kernel configuration option, - RACCT_DISABLED has also been added. - - The - GENERIC kernel configuration now includes - RACCT and RCTL by - default. - - - To enable RACCT and - RCTL on a system using the - GENERIC kernel configuration, add - kern.racct.enable=1 to - &man.loader.conf.5;, and reboot the system. - - - A new &man.sysctl.8;, - net.inet.tcp.hostcache.purgenow, has - been added, which when set to 1 during - runtime will flush all - net.inet.tcp.hostcache entries. - - A new &man.sysctl.8;, - hw.model, has been added, which displays - CPU model information. - - The &man.uart.4; driver has been - updated to allow tuning pulses per second captured in the - CTS line during runtime, whereas previously only the DCD line - could be used without rebuilding the kernel. +   @@ -1091,206 +242,19 @@ Device Drivers - Support for GPS ports has been added to - &man.uhso.4;. - - The &man.full.4; device has been added, - and the lindev(4) device has been removed. - Prior to this change, lindev(4) provided - only the /dev/full character device, - returning ENOSPC on write attempts. As - this device is not specific to &linux;, a native &os; version - has been added. - - Hardware context support has been - added to the drm/i915 driver, adding - support for Mesa 9.2 and - later. - - The &man.vt.4; driver has been updated, - replacing the bitmapped kern.vt.spclkeys - &man.sysctl.8; with individual - kern.vt.kbd_* variants. - - The &man.hpet.4; driver has been updated - to create a - /dev/hpetN - device, providing access to HPET from - userspace. - - The drm code has - been updated to match &linux; version 3.8.13. - - The &man.psm.4; driver has been updated - to include improved support for newer Synaptics ® - touchpads and the ClickPad ® mouse on newer - Lenovo ™ laptops. - - Support for the Freescale - PCI Root Complex device has been - added. - - The &man.cyapa.4; driver has been added, - supporting the Cypress APA I2C trackpad. - - The &man.isl.4; driver has been added, - supporting the Intersil I2C ISL29018 digital ambient light - sensor. +   Storage Drivers - The &man.mpr.4; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@freebsd.org Tue May 9 16:27:22 2017 Return-Path: Delivered-To: svn-src-stable@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 351B5D65A47; Tue, 9 May 2017 16:27:22 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 04D6B13B; Tue, 9 May 2017 16:27:21 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49GRLek032256; Tue, 9 May 2017 16:27:21 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49GRLNw032255; Tue, 9 May 2017 16:27:21 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201705091627.v49GRLNw032255@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Tue, 9 May 2017 16:27:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318029 - stable/11/lib/libc/regex X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 16:27:22 -0000 Author: brooks Date: Tue May 9 16:27:20 2017 New Revision: 318029 URL: https://svnweb.freebsd.org/changeset/base/318029 Log: MFC r317707: Correct an out-of-bounds read in regcomp when the RE is bad. When passed the invalid regular expression "a**", the error is eventually detected and seterr() is called. It sets p->error appropriatly and p->next and p->end to nuls which is a never used char nuls[10] which is zeros due to .bss initialization. Unfortunatly, p_ere_exp() and p_simp_re() both have fall through cases where they set the error, decrement p->next and access it which means a read from whatever .bss variable comes before nuls. Found with regex_test:repet_multi and CHERI bounds checking. Reviewed by: ngie, pfg, emaste Obtained from: CheriBSD Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D10541 Modified: stable/11/lib/libc/regex/regcomp.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/regex/regcomp.c ============================================================================== --- stable/11/lib/libc/regex/regcomp.c Tue May 9 13:44:53 2017 (r318028) +++ stable/11/lib/libc/regex/regcomp.c Tue May 9 16:27:20 2017 (r318029) @@ -444,6 +444,8 @@ p_ere_exp(struct parse *p) (void)REQUIRE(!MORE() || !isdigit((uch)PEEK()), REG_BADRPT); /* FALLTHROUGH */ default: + if (p->error != 0) + return; p->next--; wc = WGETNEXT(); ordinary(p, wc); @@ -651,6 +653,8 @@ p_simp_re(struct parse *p, (void)REQUIRE(starordinary, REG_BADRPT); /* FALLTHROUGH */ default: + if (p->error != 0) + return(0); /* Definitely not $... */ p->next--; wc = WGETNEXT(); ordinary(p, wc); From owner-svn-src-stable@freebsd.org Tue May 9 16:29:08 2017 Return-Path: Delivered-To: svn-src-stable@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 0A78AD65B2B; Tue, 9 May 2017 16:29:08 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CFF6535B; Tue, 9 May 2017 16:29:07 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49GT6G3032375; Tue, 9 May 2017 16:29:06 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49GT6Dn032374; Tue, 9 May 2017 16:29:06 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201705091629.v49GT6Dn032374@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Tue, 9 May 2017 16:29: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: r318030 - stable/10/lib/libc/regex 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@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 16:29:08 -0000 Author: brooks Date: Tue May 9 16:29:06 2017 New Revision: 318030 URL: https://svnweb.freebsd.org/changeset/base/318030 Log: MFC r317707: Correct an out-of-bounds read in regcomp when the RE is bad. When passed the invalid regular expression "a**", the error is eventually detected and seterr() is called. It sets p->error appropriatly and p->next and p->end to nuls which is a never used char nuls[10] which is zeros due to .bss initialization. Unfortunatly, p_ere_exp() and p_simp_re() both have fall through cases where they set the error, decrement p->next and access it which means a read from whatever .bss variable comes before nuls. Found with regex_test:repet_multi and CHERI bounds checking. Reviewed by: ngie, pfg, emaste Obtained from: CheriBSD Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D10541 Modified: stable/10/lib/libc/regex/regcomp.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/regex/regcomp.c ============================================================================== --- stable/10/lib/libc/regex/regcomp.c Tue May 9 16:27:20 2017 (r318029) +++ stable/10/lib/libc/regex/regcomp.c Tue May 9 16:29:06 2017 (r318030) @@ -444,6 +444,8 @@ p_ere_exp(struct parse *p) (void)REQUIRE(!MORE() || !isdigit((uch)PEEK()), REG_BADRPT); /* FALLTHROUGH */ default: + if (p->error != 0) + return; p->next--; wc = WGETNEXT(); ordinary(p, wc); @@ -651,6 +653,8 @@ p_simp_re(struct parse *p, (void)REQUIRE(starordinary, REG_BADRPT); /* FALLTHROUGH */ default: + if (p->error != 0) + return(0); /* Definitely not $... */ p->next--; wc = WGETNEXT(); ordinary(p, wc); From owner-svn-src-stable@freebsd.org Tue May 9 16:58:10 2017 Return-Path: Delivered-To: svn-src-stable@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 31AB0D653DB; Tue, 9 May 2017 16:58:10 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0C3431796; Tue, 9 May 2017 16:58:09 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49Gw9bF045220; Tue, 9 May 2017 16:58:09 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49Gw99B045219; Tue, 9 May 2017 16:58:09 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201705091658.v49Gw99B045219@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 9 May 2017 16:58:09 +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: r318031 - stable/10/contrib/libc++/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@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 16:58:10 -0000 Author: dim Date: Tue May 9 16:58:08 2017 New Revision: 318031 URL: https://svnweb.freebsd.org/changeset/base/318031 Log: MFC r317888 and two upstream prerequisites: Pull in r227097 from upstream libc++ trunk (by Marshall Clow): Fix PR21428. Buffer was one byte too small in octal formatting case. Add test Pull in r268009 from upstream libc++ trunk (by Eric Fiselier): Fix PR21428 for long. Buffer was one byte too small in octal formatting case. Rename previously added test Pull in r302362 from upstream libc++ trunk (by me): Ensure showbase does not overflow do_put buffers Summary: In https://bugs.freebsd.org/207918, Daniel McRobb describes how using std::showbase with ostreams can cause truncation of unsigned long long when output format is octal. In fact, this can even happen with unsigned int and unsigned long. To ensure this does not happen, add one additional character to the do_put buffers if std::showbase is on. Also add a test case. Reviewers: EricWF, mclow.lists Reviewed By: EricWF Subscribers: cfe-commits, emaste Differential Revision: https://reviews.llvm.org/D32670 PR: 207918 Modified: stable/10/contrib/libc++/include/locale Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/libc++/include/locale ============================================================================== --- stable/10/contrib/libc++/include/locale Tue May 9 16:29:06 2017 (r318030) +++ stable/10/contrib/libc++/include/locale Tue May 9 16:58:08 2017 (r318031) @@ -1555,7 +1555,8 @@ num_put<_CharT, _OutputIterator>::do_put this->__format_int(__fmt+1, __len, true, __iob.flags()); const unsigned __nbuf = (numeric_limits::digits / 3) + ((numeric_limits::digits % 3) != 0) - + 1; + + ((__iob.flags() & ios_base::showbase) != 0) + + 2; char __nar[__nbuf]; #ifdef _LIBCPP_LOCALE__L_EXTENSIONS int __nc = snprintf_l(__nar, sizeof(__nar), _LIBCPP_GET_C_LOCALE, __fmt, __v); @@ -1585,7 +1586,8 @@ num_put<_CharT, _OutputIterator>::do_put this->__format_int(__fmt+1, __len, true, __iob.flags()); const unsigned __nbuf = (numeric_limits::digits / 3) + ((numeric_limits::digits % 3) != 0) - + 1; + + ((__iob.flags() & ios_base::showbase) != 0) + + 2; char __nar[__nbuf]; #ifdef _LIBCPP_LOCALE__L_EXTENSIONS int __nc = snprintf_l(__nar, sizeof(__nar), _LIBCPP_GET_C_LOCALE, __fmt, __v); @@ -1615,6 +1617,7 @@ num_put<_CharT, _OutputIterator>::do_put this->__format_int(__fmt+1, __len, false, __iob.flags()); const unsigned __nbuf = (numeric_limits::digits / 3) + ((numeric_limits::digits % 3) != 0) + + ((__iob.flags() & ios_base::showbase) != 0) + 1; char __nar[__nbuf]; #ifdef _LIBCPP_LOCALE__L_EXTENSIONS @@ -1645,6 +1648,7 @@ num_put<_CharT, _OutputIterator>::do_put this->__format_int(__fmt+1, __len, false, __iob.flags()); const unsigned __nbuf = (numeric_limits::digits / 3) + ((numeric_limits::digits % 3) != 0) + + ((__iob.flags() & ios_base::showbase) != 0) + 1; char __nar[__nbuf]; #ifdef _LIBCPP_LOCALE__L_EXTENSIONS From owner-svn-src-stable@freebsd.org Tue May 9 17:01:26 2017 Return-Path: Delivered-To: svn-src-stable@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 81B5DD65667; Tue, 9 May 2017 17:01:26 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 44B2C1A63; Tue, 9 May 2017 17:01:26 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49H1PgW046828; Tue, 9 May 2017 17:01:25 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49H1PLM046827; Tue, 9 May 2017 17:01:25 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201705091701.v49H1PLM046827@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 9 May 2017 17:01:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318032 - stable/11/contrib/libc++/include X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 17:01:26 -0000 Author: dim Date: Tue May 9 17:01:25 2017 New Revision: 318032 URL: https://svnweb.freebsd.org/changeset/base/318032 Log: MFC r317888: Pull in r302362 from upstream libc++ trunk (by me): Ensure showbase does not overflow do_put buffers Summary: In https://bugs.freebsd.org/207918, Daniel McRobb describes how using std::showbase with ostreams can cause truncation of unsigned long long when output format is octal. In fact, this can even happen with unsigned int and unsigned long. To ensure this does not happen, add one additional character to the do_put buffers if std::showbase is on. Also add a test case. Reviewers: EricWF, mclow.lists Reviewed By: EricWF Subscribers: cfe-commits, emaste Differential Revision: https://reviews.llvm.org/D32670 PR: 207918 Modified: stable/11/contrib/libc++/include/locale Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/libc++/include/locale ============================================================================== --- stable/11/contrib/libc++/include/locale Tue May 9 16:58:08 2017 (r318031) +++ stable/11/contrib/libc++/include/locale Tue May 9 17:01:25 2017 (r318032) @@ -1399,6 +1399,7 @@ num_put<_CharT, _OutputIterator>::do_put this->__format_int(__fmt+1, __len, true, __iob.flags()); const unsigned __nbuf = (numeric_limits::digits / 3) + ((numeric_limits::digits % 3) != 0) + + ((__iob.flags() & ios_base::showbase) != 0) + 2; char __nar[__nbuf]; int __nc = __libcpp_snprintf_l(__nar, sizeof(__nar), _LIBCPP_GET_C_LOCALE, __fmt, __v); @@ -1425,6 +1426,7 @@ num_put<_CharT, _OutputIterator>::do_put this->__format_int(__fmt+1, __len, true, __iob.flags()); const unsigned __nbuf = (numeric_limits::digits / 3) + ((numeric_limits::digits % 3) != 0) + + ((__iob.flags() & ios_base::showbase) != 0) + 2; char __nar[__nbuf]; int __nc = __libcpp_snprintf_l(__nar, sizeof(__nar), _LIBCPP_GET_C_LOCALE, __fmt, __v); @@ -1451,6 +1453,7 @@ num_put<_CharT, _OutputIterator>::do_put this->__format_int(__fmt+1, __len, false, __iob.flags()); const unsigned __nbuf = (numeric_limits::digits / 3) + ((numeric_limits::digits % 3) != 0) + + ((__iob.flags() & ios_base::showbase) != 0) + 1; char __nar[__nbuf]; int __nc = __libcpp_snprintf_l(__nar, sizeof(__nar), _LIBCPP_GET_C_LOCALE, __fmt, __v); @@ -1477,6 +1480,7 @@ num_put<_CharT, _OutputIterator>::do_put this->__format_int(__fmt+1, __len, false, __iob.flags()); const unsigned __nbuf = (numeric_limits::digits / 3) + ((numeric_limits::digits % 3) != 0) + + ((__iob.flags() & ios_base::showbase) != 0) + 1; char __nar[__nbuf]; int __nc = __libcpp_snprintf_l(__nar, sizeof(__nar), _LIBCPP_GET_C_LOCALE, __fmt, __v); From owner-svn-src-stable@freebsd.org Tue May 9 17:21:27 2017 Return-Path: Delivered-To: svn-src-stable@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 9CC3DD65A82; Tue, 9 May 2017 17:21:27 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6CAEF7D2; Tue, 9 May 2017 17:21:27 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49HLQ7Q054379; Tue, 9 May 2017 17:21:26 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49HLQho054378; Tue, 9 May 2017 17:21:26 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705091721.v49HLQho054378@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 9 May 2017 17:21:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318034 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 17:21:27 -0000 Author: gjb Date: Tue May 9 17:21:26 2017 New Revision: 318034 URL: https://svnweb.freebsd.org/changeset/base/318034 Log: Document r317855, daemon(8) logging stdout/stderr to file or syslog(3). Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 17:21:25 2017 (r318033) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 17:21:26 2017 (r318034) @@ -165,7 +165,9 @@ Userland Application Changes -   + The &man.daemon.8; utility has been + updated to allow redirecting &man.stdout.4; and &man.stderr.4; + output to &man.syslog.3; and to a file. From owner-svn-src-stable@freebsd.org Tue May 9 17:21:26 2017 Return-Path: Delivered-To: svn-src-stable@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 B737CD65A7C; Tue, 9 May 2017 17:21:26 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 81CDC7CE; Tue, 9 May 2017 17:21:26 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49HLPKD054336; Tue, 9 May 2017 17:21:25 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49HLPTr054335; Tue, 9 May 2017 17:21:25 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705091721.v49HLPTr054335@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 9 May 2017 17:21:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318033 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 17:21:26 -0000 Author: gjb Date: Tue May 9 17:21:25 2017 New Revision: 318033 URL: https://svnweb.freebsd.org/changeset/base/318033 Log: Document r317857, 410.status-mfi periodic(8) script addition. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 17:01:25 2017 (r318032) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 17:21:25 2017 (r318033) @@ -191,7 +191,9 @@ <filename class="directory">/etc/periodic</filename> Scripts -   + The 410.status-mfi + &man.periodic.8; script has been added to monitor the status + of &man.mfi.4; volumes. From owner-svn-src-stable@freebsd.org Tue May 9 17:21:30 2017 Return-Path: Delivered-To: svn-src-stable@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 6C138D65AB1; Tue, 9 May 2017 17:21:30 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3412D7F4; Tue, 9 May 2017 17:21:30 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49HLTQa056431; Tue, 9 May 2017 17:21:29 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49HLTr4056427; Tue, 9 May 2017 17:21:29 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705091721.v49HLTr4056427@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 9 May 2017 17:21:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318037 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 17:21:30 -0000 Author: gjb Date: Tue May 9 17:21:28 2017 New Revision: 318037 URL: https://svnweb.freebsd.org/changeset/base/318037 Log: Document r317386, Use estimated RTT for receive buffer auto resizing instead of timestamps Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 17:21:28 2017 (r318036) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 17:21:28 2017 (r318037) @@ -352,6 +352,15 @@ This section describes changes that affect networking in &os;. + + General Network Changes + + The TCP stack has + been changed to use the estimated RTT + instead of timestamps for receive buffer auto resizing. + + Network Protocols From owner-svn-src-stable@freebsd.org Tue May 9 17:21:29 2017 Return-Path: Delivered-To: svn-src-stable@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 74BFBD65AA3; Tue, 9 May 2017 17:21:29 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3F2487E0; Tue, 9 May 2017 17:21:29 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49HLSbJ054830; Tue, 9 May 2017 17:21:28 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49HLS9e054813; Tue, 9 May 2017 17:21:28 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705091721.v49HLS9e054813@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 9 May 2017 17:21:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318036 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 17:21:29 -0000 Author: gjb Date: Tue May 9 17:21:28 2017 New Revision: 318036 URL: https://svnweb.freebsd.org/changeset/base/318036 Log: Document r317434, ipf(4) 'keep state' no longer assumes 'keep frags' Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 17:21:27 2017 (r318035) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 17:21:28 2017 (r318036) @@ -225,7 +225,10 @@ Kernel Bug Fixes -   + The &man.ipf.4; packet filter has been + updated to prevent "keep state" from incorrectly + implying "keep frags", matching the behavior + documented in &man.ipf.5;. From owner-svn-src-stable@freebsd.org Tue May 9 17:21:31 2017 Return-Path: Delivered-To: svn-src-stable@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 32B73D65ABC; Tue, 9 May 2017 17:21:31 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 040AA806; Tue, 9 May 2017 17:21:30 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49HLUa2056646; Tue, 9 May 2017 17:21:30 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49HLUKi056645; Tue, 9 May 2017 17:21:30 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705091721.v49HLUKi056645@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 9 May 2017 17:21:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318038 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 17:21:31 -0000 Author: gjb Date: Tue May 9 17:21:29 2017 New Revision: 318038 URL: https://svnweb.freebsd.org/changeset/base/318038 Log: Document r317045, ipfw_pmod kernel module addition. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 17:21:28 2017 (r318037) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 17:21:29 2017 (r318038) @@ -237,6 +237,19 @@   + + Kernel Modules + + The + ipfw_pmod kernel module has been added, + designed for modifying packets of any protocol. + + + At present, only TCP + MSS modification is implemented. + + + System Tuning and Controls From owner-svn-src-stable@freebsd.org Tue May 9 17:21:32 2017 Return-Path: Delivered-To: svn-src-stable@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 2428BD65ACE; Tue, 9 May 2017 17:21:32 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E5773823; Tue, 9 May 2017 17:21:31 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49HLU3b056690; Tue, 9 May 2017 17:21:30 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49HLU0p056689; Tue, 9 May 2017 17:21:30 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705091721.v49HLU0p056689@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 9 May 2017 17:21:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318039 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 17:21:32 -0000 Author: gjb Date: Tue May 9 17:21:30 2017 New Revision: 318039 URL: https://svnweb.freebsd.org/changeset/base/318039 Log: Document r316944, allow explicitly assigned IPv4 and IPv6 addresses to be used in jails. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 17:21:29 2017 (r318038) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 17:21:30 2017 (r318039) @@ -168,6 +168,12 @@ The &man.daemon.8; utility has been updated to allow redirecting &man.stdout.4; and &man.stderr.4; output to &man.syslog.3; and to a file. + + The &man.jail.8; utility has been + updated to allow explicitly-assigned IPv4 + and IPv6 addresses to be used within + a jail. From owner-svn-src-stable@freebsd.org Tue May 9 17:21:28 2017 Return-Path: Delivered-To: svn-src-stable@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 AFC85D65A8D; Tue, 9 May 2017 17:21:28 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7C3457D7; Tue, 9 May 2017 17:21:28 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49HLRQp054423; Tue, 9 May 2017 17:21:27 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49HLRJ0054421; Tue, 9 May 2017 17:21:27 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705091721.v49HLRJ0054421@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 9 May 2017 17:21:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318035 - in stable/11/release/doc: en_US.ISO8859-1/relnotes share/xml X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 17:21:28 -0000 Author: gjb Date: Tue May 9 17:21:27 2017 New Revision: 318035 URL: https://svnweb.freebsd.org/changeset/base/318035 Log: Document r317618, clock_nanosleep() addition. Update the 'Dell EMC' entity. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml stable/11/release/doc/share/xml/sponsor.ent Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 17:21:26 2017 (r318034) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 17:21:27 2017 (r318035) @@ -201,7 +201,11 @@ Runtime Libraries and API -   + The clock_nanosleep() + system call has been added. The + nanosleep() system call is now a wrapper + around clock_nanosleep(). Modified: stable/11/release/doc/share/xml/sponsor.ent ============================================================================== --- stable/11/release/doc/share/xml/sponsor.ent Tue May 9 17:21:26 2017 (r318034) +++ stable/11/release/doc/share/xml/sponsor.ent Tue May 9 17:21:27 2017 (r318035) @@ -21,9 +21,7 @@ - - - + From owner-svn-src-stable@freebsd.org Tue May 9 17:21:39 2017 Return-Path: Delivered-To: svn-src-stable@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 036B2D65B9C; Tue, 9 May 2017 17:21:39 +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 C54BD908; Tue, 9 May 2017 17:21:38 +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 v49HLbpR057036; Tue, 9 May 2017 17:21:37 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49HLbAu057035; Tue, 9 May 2017 17:21:37 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705091721.v49HLbAu057035@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 9 May 2017 17:21:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318047 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 17:21:39 -0000 Author: gjb Date: Tue May 9 17:21:37 2017 New Revision: 318047 URL: https://svnweb.freebsd.org/changeset/base/318047 Log: Document r316120, reevaluate absolute sleep times based on the RTC when the RTC is adjusted. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 17:21:36 2017 (r318046) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 17:21:37 2017 (r318047) @@ -301,7 +301,12 @@ System Tuning and Controls -   + When the system real time clock + (RTC) is adjusted, such as by + clock_settime(), sleeping threads are now + awakened and absolute sleep times are reevaluated based on the + new value of the RTC. From owner-svn-src-stable@freebsd.org Tue May 9 17:21:38 2017 Return-Path: Delivered-To: svn-src-stable@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 2AAACD65B89; Tue, 9 May 2017 17:21:38 +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 DD3AF8F5; Tue, 9 May 2017 17:21:37 +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 v49HLawt056993; Tue, 9 May 2017 17:21:36 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49HLaJt056992; Tue, 9 May 2017 17:21:36 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705091721.v49HLaJt056992@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 9 May 2017 17:21:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318046 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 17:21:38 -0000 Author: gjb Date: Tue May 9 17:21:36 2017 New Revision: 318046 URL: https://svnweb.freebsd.org/changeset/base/318046 Log: Document r316274, ipfw(4) named dynamic state support added. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 17:21:35 2017 (r318045) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 17:21:36 2017 (r318046) @@ -268,6 +268,10 @@ Kernel Modules + The + &man.ipfw.4; packet filter has been updated to add support for + named dynamic states. + The ipfw_nptv6 kernel module has been added, implementing Network Prefix Translation for From owner-svn-src-stable@freebsd.org Tue May 9 17:21:36 2017 Return-Path: Delivered-To: svn-src-stable@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 846B8D65B5C; Tue, 9 May 2017 17:21:36 +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 3AA468B5; Tue, 9 May 2017 17:21:36 +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 v49HLZAf056907; Tue, 9 May 2017 17:21:35 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49HLZfu056906; Tue, 9 May 2017 17:21:35 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705091721.v49HLZfu056906@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 9 May 2017 17:21:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318044 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 17:21:36 -0000 Author: gjb Date: Tue May 9 17:21:35 2017 New Revision: 318044 URL: https://svnweb.freebsd.org/changeset/base/318044 Log: Document r316423, clang, llvm, lld, lldb, compiler-rt and libc++ updated to 4.0.0, WITH_LDD_AS_LD knob addition. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 17:21:34 2017 (r318043) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 17:21:35 2017 (r318044) @@ -159,7 +159,10 @@ Userland Configuration Changes -   + The + WITH_LLD_AS_LD build knob has been added, + which installs LLD as + /usr/bin/ld if set. @@ -179,7 +182,23 @@ Contributed Software -   + Clang has + been updated to version 4.0.0. + + LLVM has + been updated to version 4.0.0. + + LLD has + been updated to version 4.0.0. + + LLDB has + been updated to version 4.0.0. + + compiler-rt + has been updated to version 4.0.0. + + libc++ has + been updated to version 4.0.0. From owner-svn-src-stable@freebsd.org Tue May 9 17:21:37 2017 Return-Path: Delivered-To: svn-src-stable@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 44322D65B6C; Tue, 9 May 2017 17:21:37 +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 1348F8D8; Tue, 9 May 2017 17:21:37 +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 v49HLa5H056950; Tue, 9 May 2017 17:21:36 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49HLaqX056949; Tue, 9 May 2017 17:21:36 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705091721.v49HLaqX056949@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 9 May 2017 17:21:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318045 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 17:21:37 -0000 Author: gjb Date: Tue May 9 17:21:35 2017 New Revision: 318045 URL: https://svnweb.freebsd.org/changeset/base/318045 Log: Document r316303, ACPICA update to version 20170303. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 17:21:35 2017 (r318044) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 17:21:35 2017 (r318045) @@ -182,6 +182,9 @@ Contributed Software + ACPICA has + been updated to version 20170303. + Clang has been updated to version 4.0.0. From owner-svn-src-stable@freebsd.org Tue May 9 17:21:33 2017 Return-Path: Delivered-To: svn-src-stable@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 3ED25D65AF9; Tue, 9 May 2017 17:21:33 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E6FEC847; Tue, 9 May 2017 17:21:32 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49HLV2l056733; Tue, 9 May 2017 17:21:31 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49HLVjh056732; Tue, 9 May 2017 17:21:31 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705091721.v49HLVjh056732@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 9 May 2017 17:21:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318040 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 17:21:33 -0000 Author: gjb Date: Tue May 9 17:21:31 2017 New Revision: 318040 URL: https://svnweb.freebsd.org/changeset/base/318040 Log: Document r316660, cfumass(4) addition. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 17:21:30 2017 (r318039) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 17:21:31 2017 (r318040) @@ -254,6 +254,11 @@ At present, only TCP MSS modification is implemented. + + The + &man.cfumass.4; device has been added, providing a storage + frontend to USB + OTG-capable hardware. From owner-svn-src-stable@freebsd.org Tue May 9 17:21:33 2017 Return-Path: Delivered-To: svn-src-stable@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 E5FBAD65B0F; Tue, 9 May 2017 17:21:33 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B319B85A; Tue, 9 May 2017 17:21:33 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49HLWQg056776; Tue, 9 May 2017 17:21:32 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49HLW03056775; Tue, 9 May 2017 17:21:32 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705091721.v49HLW03056775@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 9 May 2017 17:21:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318041 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 17:21:34 -0000 Author: gjb Date: Tue May 9 17:21:32 2017 New Revision: 318041 URL: https://svnweb.freebsd.org/changeset/base/318041 Log: Document r316446, ipfw_nat64 kernel module addition. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 17:21:31 2017 (r318040) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 17:21:32 2017 (r318041) @@ -246,6 +246,11 @@ Kernel Modules + The + ipfw_nat64 kernel module has been added, + implementing stateless and stateful + NAT64. + The ipfw_pmod kernel module has been added, designed for modifying packets of any protocol. From owner-svn-src-stable@freebsd.org Tue May 9 17:21:34 2017 Return-Path: Delivered-To: svn-src-stable@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 CCE40D65B24; Tue, 9 May 2017 17:21:34 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7FB7987C; Tue, 9 May 2017 17:21:34 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49HLXIq056819; Tue, 9 May 2017 17:21:33 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49HLXEa056818; Tue, 9 May 2017 17:21:33 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705091721.v49HLXEa056818@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 9 May 2017 17:21:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318042 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 17:21:35 -0000 Author: gjb Date: Tue May 9 17:21:33 2017 New Revision: 318042 URL: https://svnweb.freebsd.org/changeset/base/318042 Log: Re-order by svn revision. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 17:21:32 2017 (r318041) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 17:21:33 2017 (r318042) @@ -165,15 +165,15 @@ Userland Application Changes - The &man.daemon.8; utility has been - updated to allow redirecting &man.stdout.4; and &man.stderr.4; - output to &man.syslog.3; and to a file. - The &man.jail.8; utility has been updated to allow explicitly-assigned IPv4 and IPv6 addresses to be used within a jail. + + The &man.daemon.8; utility has been + updated to allow redirecting &man.stdout.4; and &man.stderr.4; + output to &man.syslog.3; and to a file. @@ -251,6 +251,11 @@ implementing stateless and stateful NAT64. + The + &man.cfumass.4; device has been added, providing a storage + frontend to USB + OTG-capable hardware. + The ipfw_pmod kernel module has been added, designed for modifying packets of any protocol. @@ -259,11 +264,6 @@ At present, only TCP MSS modification is implemented. - - The - &man.cfumass.4; device has been added, providing a storage - frontend to USB - OTG-capable hardware. From owner-svn-src-stable@freebsd.org Tue May 9 17:21:35 2017 Return-Path: Delivered-To: svn-src-stable@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 A83B3D65B53; Tue, 9 May 2017 17:21:35 +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 58C5C896; Tue, 9 May 2017 17:21:35 +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 v49HLYmF056863; Tue, 9 May 2017 17:21:34 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49HLYdK056862; Tue, 9 May 2017 17:21:34 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705091721.v49HLYdK056862@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 9 May 2017 17:21:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318043 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 17:21:35 -0000 Author: gjb Date: Tue May 9 17:21:34 2017 New Revision: 318043 URL: https://svnweb.freebsd.org/changeset/base/318043 Log: Document r316444, ipfw_nptv6 kernel module addition. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 17:21:33 2017 (r318042) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 17:21:34 2017 (r318043) @@ -246,6 +246,12 @@ Kernel Modules + The + ipfw_nptv6 kernel module has been added, + implementing Network Prefix Translation for + IPv6 as defined in RFC + 6296. + The ipfw_nat64 kernel module has been added, implementing stateless and stateful From owner-svn-src-stable@freebsd.org Tue May 9 17:21:42 2017 Return-Path: Delivered-To: svn-src-stable@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 6835FD65C02; Tue, 9 May 2017 17:21:42 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3591C979; Tue, 9 May 2017 17:21:42 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49HLfUE057209; Tue, 9 May 2017 17:21:41 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49HLfK1057208; Tue, 9 May 2017 17:21:41 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705091721.v49HLfK1057208@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 9 May 2017 17:21:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318051 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 17:21:42 -0000 Author: gjb Date: Tue May 9 17:21:41 2017 New Revision: 318051 URL: https://svnweb.freebsd.org/changeset/base/318051 Log: Document r315539, vfs.root_mount_always_wait tunable addition. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 17:21:40 2017 (r318050) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 17:21:41 2017 (r318051) @@ -315,6 +315,11 @@ System Tuning and Controls + The + vfs.root_mount_always_wait tunable has been + added, which forces the kernel to wait for root mount holds + even if the root device is already present. + When the system real time clock (RTC) is adjusted, such as by From owner-svn-src-stable@freebsd.org Tue May 9 17:21:39 2017 Return-Path: Delivered-To: svn-src-stable@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 C8453D65BB2; Tue, 9 May 2017 17:21:39 +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 98E6E929; Tue, 9 May 2017 17:21:39 +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 v49HLc7C057079; Tue, 9 May 2017 17:21:38 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49HLcoe057078; Tue, 9 May 2017 17:21:38 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705091721.v49HLcoe057078@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 9 May 2017 17:21:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318048 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 17:21:39 -0000 Author: gjb Date: Tue May 9 17:21:38 2017 New Revision: 318048 URL: https://svnweb.freebsd.org/changeset/base/318048 Log: Document r316098, getaddrinfo(1) utility added. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 17:21:37 2017 (r318047) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 17:21:38 2017 (r318048) @@ -168,6 +168,10 @@ Userland Application Changes + The &man.getaddrinfo.1; utility has been + added, ported from NetBSD. + The &man.jail.8; utility has been updated to allow explicitly-assigned IPv4 From owner-svn-src-stable@freebsd.org Tue May 9 17:21:41 2017 Return-Path: Delivered-To: svn-src-stable@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 ABC28D65BE4; Tue, 9 May 2017 17:21:41 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5DDD1960; Tue, 9 May 2017 17:21:41 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49HLeTa057165; Tue, 9 May 2017 17:21:40 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49HLeYc057164; Tue, 9 May 2017 17:21:40 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705091721.v49HLeYc057164@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 9 May 2017 17:21:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318050 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 17:21:42 -0000 Author: gjb Date: Tue May 9 17:21:40 2017 New Revision: 318050 URL: https://svnweb.freebsd.org/changeset/base/318050 Log: Document r316039, kvm_close(3) return accumulated close(2) error. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 17:21:39 2017 (r318049) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 17:21:40 2017 (r318050) @@ -263,6 +263,10 @@ Kernel Bug Fixes + The &man.kvm.close.3; function has been + updated to return the accumulated error from previous + &man.close.2; calls. + The &man.ipf.4; packet filter has been updated to prevent "keep state" from incorrectly implying "keep frags", matching the behavior From owner-svn-src-stable@freebsd.org Tue May 9 17:21:40 2017 Return-Path: Delivered-To: svn-src-stable@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 AB4E2D65BCE; Tue, 9 May 2017 17:21:40 +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 73900947; Tue, 9 May 2017 17:21:40 +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 v49HLdCm057122; Tue, 9 May 2017 17:21:39 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49HLdMT057121; Tue, 9 May 2017 17:21:39 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705091721.v49HLdMT057121@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 9 May 2017 17:21:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318049 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 17:21:40 -0000 Author: gjb Date: Tue May 9 17:21:39 2017 New Revision: 318049 URL: https://svnweb.freebsd.org/changeset/base/318049 Log: Document r316045, libthr(3) evaluation/removal in OLD_FILES. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 17:21:38 2017 (r318048) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 17:21:39 2017 (r318049) @@ -159,6 +159,12 @@ Userland Configuration Changes + The &man.libthr.3; library and related + files are now evaluated and removed by the + delete-old-libs target when upgrading the + system if WITHOUT_LIBTHR is + set in &man.src.conf.5;. + The WITH_LLD_AS_LD build knob has been added, which installs LLD as From owner-svn-src-stable@freebsd.org Tue May 9 17:21:44 2017 Return-Path: Delivered-To: svn-src-stable@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 229EED65C29; Tue, 9 May 2017 17:21:44 +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 DA1D29B5; Tue, 9 May 2017 17:21:43 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49HLg3h057295; Tue, 9 May 2017 17:21:42 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49HLgjF057294; Tue, 9 May 2017 17:21:42 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705091721.v49HLgjF057294@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 9 May 2017 17:21:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318053 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 17:21:44 -0000 Author: gjb Date: Tue May 9 17:21:42 2017 New Revision: 318053 URL: https://svnweb.freebsd.org/changeset/base/318053 Log: Document r315282, clang nullability attribute added. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 17:21:41 2017 (r318052) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 17:21:42 2017 (r318053) @@ -257,7 +257,9 @@ ABI Compatibility -   + The clang + nullability attribute has been added to the + C library headers. From owner-svn-src-stable@freebsd.org Tue May 9 17:21:45 2017 Return-Path: Delivered-To: svn-src-stable@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 D41C4D65C54; Tue, 9 May 2017 17:21:45 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A30359FE; Tue, 9 May 2017 17:21:45 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49HLiPO057383; Tue, 9 May 2017 17:21:44 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49HLiQH057382; Tue, 9 May 2017 17:21:44 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705091721.v49HLiQH057382@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 9 May 2017 17:21:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318055 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 17:21:46 -0000 Author: gjb Date: Tue May 9 17:21:44 2017 New Revision: 318055 URL: https://svnweb.freebsd.org/changeset/base/318055 Log: Document r313523, fix garbage IP addresses in UDP log_in_vain messages Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 17:21:43 2017 (r318054) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 17:21:44 2017 (r318055) @@ -468,6 +468,12 @@ General Network Changes + The network stack has been modified to fix + incorrect or invalid IP addresses if + multiple threads emit a UDP + log_in_vein message concurrently. + The TCP stack has been changed to use the estimated RTT From owner-svn-src-stable@freebsd.org Tue May 9 17:21:43 2017 Return-Path: Delivered-To: svn-src-stable@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 566A0D65C1C; Tue, 9 May 2017 17:21:43 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0A2D499E; Tue, 9 May 2017 17:21:42 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49HLgm8057252; Tue, 9 May 2017 17:21:42 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49HLgK1057251; Tue, 9 May 2017 17:21:42 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705091721.v49HLgK1057251@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 9 May 2017 17:21:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318052 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 17:21:43 -0000 Author: gjb Date: Tue May 9 17:21:41 2017 New Revision: 318052 URL: https://svnweb.freebsd.org/changeset/base/318052 Log: Document r315514: - IPSEC_FILTERTUNNEL deprecation - ipsec.ko and tcpmd5.ko additions - IPSEC_NAT_T removal - setkey(8) updates Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 17:21:41 2017 (r318051) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 17:21:41 2017 (r318052) @@ -174,6 +174,14 @@ Userland Application Changes + The + &man.setkey.8; utility has been modified to show the runtime + NAT-T configuration. The + -g and -t flags have + been added, which list only global and virtual policies, + respectively when used with the -D and + -P flags. + The &man.getaddrinfo.1; utility has been added, ported from NetBSD. @@ -276,12 +284,24 @@ Kernel Configuration -   + The + IPSEC_NAT_T kernel configuration option has + been removed. Support for NAT-T is now + enabled by default. + + The + IPSEC_FILTERTUNNEL kernel option has been + removed, which was deprecated by the + net.inet.ipsec.filtertunnel sysctl. Kernel Modules + The + ipsec and tcpmd5 kernel + modules have been added. + The &man.ipfw.4; packet filter has been updated to add support for named dynamic states. @@ -449,7 +469,10 @@ Network Protocols -   + Support for the + UDP_ENCAP_ESPINUDP_NON_IKE encapsulation + type has been removed. From owner-svn-src-stable@freebsd.org Tue May 9 17:21:50 2017 Return-Path: Delivered-To: svn-src-stable@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 84AF5D65CEC; Tue, 9 May 2017 17:21:50 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3BBBDAA4; Tue, 9 May 2017 17:21:50 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49HLn1X057601; Tue, 9 May 2017 17:21:49 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49HLnJH057599; Tue, 9 May 2017 17:21:49 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705091721.v49HLnJH057599@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 9 May 2017 17:21:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318060 - in stable/11/release/doc: en_US.ISO8859-1/relnotes share/xml X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 17:21:50 -0000 Author: gjb Date: Tue May 9 17:21:48 2017 New Revision: 318060 URL: https://svnweb.freebsd.org/changeset/base/318060 Log: Document r309377, bnxt(4) addition. Add Broadcom to the sponsors.ent file. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml stable/11/release/doc/share/xml/sponsor.ent Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 17:21:47 2017 (r318059) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 17:21:48 2017 (r318060) @@ -390,7 +390,10 @@ Network Drivers -   + The &man.bnxt.4; driver has been added, + providing support for Broadcom® NetXtreme-C™ and + NetXtreme-E™ devices. Modified: stable/11/release/doc/share/xml/sponsor.ent ============================================================================== --- stable/11/release/doc/share/xml/sponsor.ent Tue May 9 17:21:47 2017 (r318059) +++ stable/11/release/doc/share/xml/sponsor.ent Tue May 9 17:21:48 2017 (r318060) @@ -11,6 +11,8 @@ + + From owner-svn-src-stable@freebsd.org Tue May 9 17:21:52 2017 Return-Path: Delivered-To: svn-src-stable@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 E3EA5D65D42; Tue, 9 May 2017 17:21:52 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AE47FB06; Tue, 9 May 2017 17:21:52 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49HLp7c057731; Tue, 9 May 2017 17:21:51 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49HLpf5057730; Tue, 9 May 2017 17:21:51 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705091721.v49HLpf5057730@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 9 May 2017 17:21:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318063 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 17:21:53 -0000 Author: gjb Date: Tue May 9 17:21:51 2017 New Revision: 318063 URL: https://svnweb.freebsd.org/changeset/base/318063 Log: Document r308720, cron(8) {,/usr/local}/etc/cron.d support Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 17:21:50 2017 (r318062) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 17:21:51 2017 (r318063) @@ -179,6 +179,13 @@ Userland Application Changes + The + &man.cron.8; utility has been updated to add support for + including files within /etc/cron.d and /usr/local/etc/cron.d by + default. + The &man.syslogd.8; utility has been updated to add the include keyword which allows specifying a directory containing configuration files From owner-svn-src-stable@freebsd.org Tue May 9 17:21:47 2017 Return-Path: Delivered-To: svn-src-stable@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 B8FF6D65C96; Tue, 9 May 2017 17:21:47 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 77234A3D; Tue, 9 May 2017 17:21:47 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49HLkfR057471; Tue, 9 May 2017 17:21:46 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49HLk7X057470; Tue, 9 May 2017 17:21:46 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705091721.v49HLk7X057470@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 9 May 2017 17:21:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318057 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 17:21:48 -0000 Author: gjb Date: Tue May 9 17:21:46 2017 New Revision: 318057 URL: https://svnweb.freebsd.org/changeset/base/318057 Log: Document r312336, locales v30.0.3, unicode 9.0.0. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 17:21:45 2017 (r318056) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 17:21:46 2017 (r318057) @@ -205,6 +205,10 @@ Contributed Software + The CLDR locales have + been updated to version 30.0.3. The unicode locales have been + updated to version 9.0.0. + ACPICA has been updated to version 20170303. From owner-svn-src-stable@freebsd.org Tue May 9 17:21:45 2017 Return-Path: Delivered-To: svn-src-stable@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 01989D65C3C; Tue, 9 May 2017 17:21:45 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C08779D6; Tue, 9 May 2017 17:21:44 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49HLhD2057339; Tue, 9 May 2017 17:21:43 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49HLhil057338; Tue, 9 May 2017 17:21:43 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705091721.v49HLhil057338@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 9 May 2017 17:21:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318054 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 17:21:45 -0000 Author: gjb Date: Tue May 9 17:21:43 2017 New Revision: 318054 URL: https://svnweb.freebsd.org/changeset/base/318054 Log: Document r315274, sem_clockwait_np() addition. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 17:21:42 2017 (r318053) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 17:21:43 2017 (r318054) @@ -257,6 +257,12 @@ ABI Compatibility + The + sem_clockwait_np() library function has + been added, which allows the caller to specify the reference + clock and choose between absolute and relative mode. + The clang nullability attribute has been added to the C library headers. From owner-svn-src-stable@freebsd.org Tue May 9 17:21:46 2017 Return-Path: Delivered-To: svn-src-stable@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 BA6B1D65C68; Tue, 9 May 2017 17:21:46 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 809E6A19; Tue, 9 May 2017 17:21:46 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49HLjfc057426; Tue, 9 May 2017 17:21:45 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49HLj4c057425; Tue, 9 May 2017 17:21:45 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705091721.v49HLj4c057425@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 9 May 2017 17:21:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318056 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 17:21:47 -0000 Author: gjb Date: Tue May 9 17:21:45 2017 New Revision: 318056 URL: https://svnweb.freebsd.org/changeset/base/318056 Log: Document r313203, inetd(8) can be built without libwrap support. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 17:21:44 2017 (r318055) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 17:21:45 2017 (r318056) @@ -159,6 +159,11 @@ Userland Configuration Changes + The &man.inetd.8; utility can now be + built without libwrap support when + WITHOUT_TCP_WRAPPERS is set in + &man.src.conf.5;. + The &man.libthr.3; library and related files are now evaluated and removed by the delete-old-libs target when upgrading the From owner-svn-src-stable@freebsd.org Tue May 9 17:21:48 2017 Return-Path: Delivered-To: svn-src-stable@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 7DC74D65CAA; Tue, 9 May 2017 17:21:48 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4595DA5B; Tue, 9 May 2017 17:21:48 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49HLlJ9057514; Tue, 9 May 2017 17:21:47 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49HLl75057513; Tue, 9 May 2017 17:21:47 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705091721.v49HLl75057513@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 9 May 2017 17:21:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318058 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 17:21:48 -0000 Author: gjb Date: Tue May 9 17:21:47 2017 New Revision: 318058 URL: https://svnweb.freebsd.org/changeset/base/318058 Log: Document r311681, ip6_tryforward() addition. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 17:21:46 2017 (r318057) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 17:21:47 2017 (r318058) @@ -477,6 +477,11 @@ General Network Changes + The + network stack has been updated to include + ip6_tryforward(), providing performance + benefits as result of a reduced number of checks. + The network stack has been modified to fix incorrect or invalid IP addresses if From owner-svn-src-stable@freebsd.org Tue May 9 17:21:51 2017 Return-Path: Delivered-To: svn-src-stable@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 32A84D65D07; Tue, 9 May 2017 17:21:51 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F0C90ABB; Tue, 9 May 2017 17:21:50 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49HLnsi057644; Tue, 9 May 2017 17:21:49 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49HLnN7057643; Tue, 9 May 2017 17:21:49 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705091721.v49HLnN7057643@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 9 May 2017 17:21:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318061 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 17:21:52 -0000 Author: gjb Date: Tue May 9 17:21:49 2017 New Revision: 318061 URL: https://svnweb.freebsd.org/changeset/base/318061 Log: Document r309337, GARP retransmit capability. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 17:21:48 2017 (r318060) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 17:21:49 2017 (r318061) @@ -503,6 +503,13 @@ Network Protocols + Support for GARP + retransmit has been added. A new &man.sysctl.8;, + net.link.ether.inet.garp_rexmit_count, has + been added, which sets the maximum number of retransmissions + when set to a non-zero value. + Support for the UDP_ENCAP_ESPINUDP_NON_IKE encapsulation From owner-svn-src-stable@freebsd.org Tue May 9 17:21:49 2017 Return-Path: Delivered-To: svn-src-stable@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 5FAA7D65CBF; Tue, 9 May 2017 17:21:49 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1B5A6A78; Tue, 9 May 2017 17:21:49 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49HLmrB057557; Tue, 9 May 2017 17:21:48 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49HLmCS057556; Tue, 9 May 2017 17:21:48 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705091721.v49HLmCS057556@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 9 May 2017 17:21:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318059 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 17:21:49 -0000 Author: gjb Date: Tue May 9 17:21:47 2017 New Revision: 318059 URL: https://svnweb.freebsd.org/changeset/base/318059 Log: Document r310490, amd(8) updated to version 6.2. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 17:21:47 2017 (r318058) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 17:21:47 2017 (r318059) @@ -205,6 +205,9 @@ Contributed Software + The &man.amd.8; utility has been updated + to version 6.2. + The CLDR locales have been updated to version 30.0.3. The unicode locales have been updated to version 9.0.0. From owner-svn-src-stable@freebsd.org Tue May 9 17:21:52 2017 Return-Path: Delivered-To: svn-src-stable@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 219F6D65D17; Tue, 9 May 2017 17:21:52 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CA4ECAE6; Tue, 9 May 2017 17:21:51 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49HLoe1057688; Tue, 9 May 2017 17:21:50 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49HLoJw057687; Tue, 9 May 2017 17:21:50 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705091721.v49HLoJw057687@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 9 May 2017 17:21:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318062 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 17:21:52 -0000 Author: gjb Date: Tue May 9 17:21:50 2017 New Revision: 318062 URL: https://svnweb.freebsd.org/changeset/base/318062 Log: Document r308721, syslogd(8) 'include' keyword. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 17:21:49 2017 (r318061) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 17:21:50 2017 (r318062) @@ -179,6 +179,15 @@ Userland Application Changes + The &man.syslogd.8; utility has been + updated to add the include keyword which + allows specifying a directory containing configuration files + to be included in addition to &man.syslogd.8;. The default + &man.syslogd.8; has been updated to include /etc/syslog.d and /usr/local/etc/syslog.d by + default. + The &man.setkey.8; utility has been modified to show the runtime NAT-T configuration. The From owner-svn-src-stable@freebsd.org Tue May 9 17:21:53 2017 Return-Path: Delivered-To: svn-src-stable@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 E4586D65D5B; Tue, 9 May 2017 17:21:53 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A4A4EB28; Tue, 9 May 2017 17:21:53 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49HLq2A058488; Tue, 9 May 2017 17:21:52 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49HLqCV058487; Tue, 9 May 2017 17:21:52 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705091721.v49HLqCV058487@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 9 May 2017 17:21:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318064 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 17:21:54 -0000 Author: gjb Date: Tue May 9 17:21:52 2017 New Revision: 318064 URL: https://svnweb.freebsd.org/changeset/base/318064 Log: Add a sponsor entry for r308721 Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 17:21:51 2017 (r318063) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 17:21:52 2017 (r318064) @@ -186,11 +186,12 @@ class="directory">/usr/local/etc/cron.d by default. - The &man.syslogd.8; utility has been - updated to add the include keyword which - allows specifying a directory containing configuration files - to be included in addition to &man.syslogd.8;. The default - &man.syslogd.8; has been updated to include The + &man.syslogd.8; utility has been updated to add the + include keyword which allows specifying + a directory containing configuration files to be included in + addition to &man.syslogd.8;. The default &man.syslogd.8; has + been updated to include /etc/syslog.d and /usr/local/etc/syslog.d by default. From owner-svn-src-stable@freebsd.org Tue May 9 17:21:54 2017 Return-Path: Delivered-To: svn-src-stable@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 A9C5AD65D73; Tue, 9 May 2017 17:21:54 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 702AEB58; Tue, 9 May 2017 17:21:54 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49HLr6q058549; Tue, 9 May 2017 17:21:53 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49HLrOG058548; Tue, 9 May 2017 17:21:53 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705091721.v49HLrOG058548@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 9 May 2017 17:21:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318065 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 17:21:55 -0000 Author: gjb Date: Tue May 9 17:21:53 2017 New Revision: 318065 URL: https://svnweb.freebsd.org/changeset/base/318065 Log: Document r307632, EFI loader tftpfs support. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 17:21:52 2017 (r318064) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 17:21:53 2017 (r318065) @@ -481,7 +481,10 @@ Boot Loader Changes -   + The + EFI loader has been updated to support + TFTPFS, providing netboot support without + requiring an NFS server. From owner-svn-src-stable@freebsd.org Tue May 9 17:21:55 2017 Return-Path: Delivered-To: svn-src-stable@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 BB598D65D92; Tue, 9 May 2017 17:21:55 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 69667B7C; Tue, 9 May 2017 17:21:55 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49HLsiv058592; Tue, 9 May 2017 17:21:54 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49HLsMo058591; Tue, 9 May 2017 17:21:54 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705091721.v49HLsMo058591@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 9 May 2017 17:21:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318066 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 17:21:56 -0000 Author: gjb Date: Tue May 9 17:21:54 2017 New Revision: 318066 URL: https://svnweb.freebsd.org/changeset/base/318066 Log: Document r305436, Allwinner A13 support. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 17:21:53 2017 (r318065) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 17:21:54 2017 (r318066) @@ -437,7 +437,8 @@ ARM Support -   + Support for the Allwinner A13 board has + been added. From owner-svn-src-stable@freebsd.org Tue May 9 18:13:24 2017 Return-Path: Delivered-To: svn-src-stable@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 727F9D659AB; Tue, 9 May 2017 18:13:24 +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 440891697; Tue, 9 May 2017 18:13:24 +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 v49IDNMv079290; Tue, 9 May 2017 18:13:23 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49IDNvd079289; Tue, 9 May 2017 18:13:23 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201705091813.v49IDNvd079289@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 9 May 2017 18:13:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318069 - stable/11/usr.bin/xinstall X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 18:13:24 -0000 Author: bdrewery Date: Tue May 9 18:13:23 2017 New Revision: 318069 URL: https://svnweb.freebsd.org/changeset/base/318069 Log: MFC r303928: Trim out excessive / with -v when target directory ends with a trailing '/'. Modified: stable/11/usr.bin/xinstall/xinstall.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/xinstall/xinstall.c ============================================================================== --- stable/11/usr.bin/xinstall/xinstall.c Tue May 9 18:12:05 2017 (r318068) +++ stable/11/usr.bin/xinstall/xinstall.c Tue May 9 18:13:23 2017 (r318069) @@ -755,8 +755,9 @@ install(const char *from_name, const cha } /* Build the target path. */ if (flags & DIRECTORY) { - (void)snprintf(pathbuf, sizeof(pathbuf), "%s/%s", + (void)snprintf(pathbuf, sizeof(pathbuf), "%s%s%s", to_name, + to_name[strlen(to_name) - 1] == '/' ? "" : "/", (p = strrchr(from_name, '/')) ? ++p : from_name); to_name = pathbuf; } From owner-svn-src-stable@freebsd.org Tue May 9 18:14:46 2017 Return-Path: Delivered-To: svn-src-stable@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 AF96FD65A28; Tue, 9 May 2017 18:14:46 +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 808A51826; Tue, 9 May 2017 18:14:46 +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 v49IEj7P079378; Tue, 9 May 2017 18:14:45 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49IEjMI079377; Tue, 9 May 2017 18:14:45 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201705091814.v49IEjMI079377@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 9 May 2017 18:14:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318070 - stable/11/lib/libc/sys X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 18:14:46 -0000 Author: bdrewery Date: Tue May 9 18:14:45 2017 New Revision: 318070 URL: https://svnweb.freebsd.org/changeset/base/318070 Log: MFC r306771: Improve grammar. Modified: stable/11/lib/libc/sys/kqueue.2 Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/sys/kqueue.2 ============================================================================== --- stable/11/lib/libc/sys/kqueue.2 Tue May 9 18:13:23 2017 (r318069) +++ stable/11/lib/libc/sys/kqueue.2 Tue May 9 18:14:45 2017 (r318070) @@ -375,7 +375,7 @@ A file descriptor referencing the monito The closed file descriptor did not have write access. .It Dv NOTE_CLOSE_WRITE A file descriptor referencing the monitored file, was closed. -The closed file descriptor has write access. +The closed file descriptor had write access. .Pp This note, as well as .Dv NOTE_CLOSE , From owner-svn-src-stable@freebsd.org Tue May 9 18:15:31 2017 Return-Path: Delivered-To: svn-src-stable@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 625E1D65AA3; Tue, 9 May 2017 18:15:31 +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 313A51977; Tue, 9 May 2017 18:15:31 +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 v49IFUZS079455; Tue, 9 May 2017 18:15:30 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49IFUqs079453; Tue, 9 May 2017 18:15:30 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201705091815.v49IFUqs079453@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 9 May 2017 18:15: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: r318071 - stable/10/lib/libc/sys 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@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 18:15:31 -0000 Author: bdrewery Date: Tue May 9 18:15:29 2017 New Revision: 318071 URL: https://svnweb.freebsd.org/changeset/base/318071 Log: MFC r306771: Improve grammar. Modified: stable/10/lib/libc/sys/kqueue.2 Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/sys/kqueue.2 ============================================================================== --- stable/10/lib/libc/sys/kqueue.2 Tue May 9 18:14:45 2017 (r318070) +++ stable/10/lib/libc/sys/kqueue.2 Tue May 9 18:15:29 2017 (r318071) @@ -367,7 +367,7 @@ A file descriptor referencing the monito The closed file descriptor did not have write access. .It Dv NOTE_CLOSE_WRITE A file descriptor referencing the monitored file, was closed. -The closed file descriptor has write access. +The closed file descriptor had write access. .Pp This note, as well as .Dv NOTE_CLOSE , From owner-svn-src-stable@freebsd.org Tue May 9 18:17:04 2017 Return-Path: Delivered-To: svn-src-stable@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 B90BFD65B4E; Tue, 9 May 2017 18:17:04 +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 8A8CA1AF6; Tue, 9 May 2017 18:17:04 +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 v49IH3Lb079558; Tue, 9 May 2017 18:17:03 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49IH3I8079557; Tue, 9 May 2017 18:17:03 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201705091817.v49IH3I8079557@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 9 May 2017 18:17:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318072 - stable/11/share/man/man9 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 18:17:04 -0000 Author: bdrewery Date: Tue May 9 18:17:03 2017 New Revision: 318072 URL: https://svnweb.freebsd.org/changeset/base/318072 Log: MFC r306773: Add link for vrefl(9). Modified: stable/11/share/man/man9/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man9/Makefile ============================================================================== --- stable/11/share/man/man9/Makefile Tue May 9 18:15:29 2017 (r318071) +++ stable/11/share/man/man9/Makefile Tue May 9 18:17:03 2017 (r318072) @@ -1927,7 +1927,8 @@ MLINKS+=VOP_RDWR.9 VOP_READ.9 \ VOP_RDWR.9 VOP_WRITE.9 MLINKS+=VOP_REMOVE.9 VOP_RMDIR.9 MLINKS+=vnet.9 vimage.9 -MLINKS+=vref.9 VREF.9 +MLINKS+=vref.9 VREF.9 \ + vref.9 vrefl.9 MLINKS+=vrele.9 vput.9 \ vrele.9 vunref.9 MLINKS+=vslock.9 vsunlock.9 From owner-svn-src-stable@freebsd.org Tue May 9 18:19:43 2017 Return-Path: Delivered-To: svn-src-stable@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 4BD6BD65C0C; Tue, 9 May 2017 18:19:43 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1D6CA1C71; Tue, 9 May 2017 18:19:43 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49IJgMs079707; Tue, 9 May 2017 18:19:42 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49IJgt1079706; Tue, 9 May 2017 18:19:42 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705091819.v49IJgt1079706@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 9 May 2017 18:19:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318073 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 18:19:43 -0000 Author: gjb Date: Tue May 9 18:19:41 2017 New Revision: 318073 URL: https://svnweb.freebsd.org/changeset/base/318073 Log: Document r316957, tcsh(1) version 6.20.00. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 18:17:03 2017 (r318072) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 18:19:41 2017 (r318073) @@ -249,6 +249,9 @@ libc++ has been updated to version 4.0.0. + + &man.tcsh.1; has been updated to version + 6.20.00. From owner-svn-src-stable@freebsd.org Tue May 9 18:19:44 2017 Return-Path: Delivered-To: svn-src-stable@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 EC5B5D65C1A; Tue, 9 May 2017 18:19:44 +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 BE0391C7D; Tue, 9 May 2017 18:19:44 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49IJhtb079794; Tue, 9 May 2017 18:19:43 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49IJhPq079793; Tue, 9 May 2017 18:19:43 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705091819.v49IJhPq079793@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 9 May 2017 18:19:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318075 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 18:19:45 -0000 Author: gjb Date: Tue May 9 18:19:43 2017 New Revision: 318075 URL: https://svnweb.freebsd.org/changeset/base/318075 Log: Document r316349, tzdata version 2017b. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 18:19:42 2017 (r318074) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 18:19:43 2017 (r318075) @@ -232,6 +232,9 @@ ACPICA has been updated to version 20170303. + Timezone data files have been updated to + version 2017b. + &man.mandoc.1; has been updated to version 1.14. From owner-svn-src-stable@freebsd.org Tue May 9 18:19:44 2017 Return-Path: Delivered-To: svn-src-stable@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 241F9D65C14; Tue, 9 May 2017 18:19:44 +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 E9DAD1C78; Tue, 9 May 2017 18:19:43 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49IJg5g079751; Tue, 9 May 2017 18:19:43 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49IJgAn079750; Tue, 9 May 2017 18:19:42 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705091819.v49IJgAn079750@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 9 May 2017 18:19:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318074 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 18:19:44 -0000 Author: gjb Date: Tue May 9 18:19:42 2017 New Revision: 318074 URL: https://svnweb.freebsd.org/changeset/base/318074 Log: Document r316420, mandoc(1) version 1.14. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 18:19:41 2017 (r318073) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 18:19:42 2017 (r318074) @@ -232,6 +232,9 @@ ACPICA has been updated to version 20170303. + &man.mandoc.1; has been updated to + version 1.14. + Clang has been updated to version 4.0.0. From owner-svn-src-stable@freebsd.org Tue May 9 18:19:47 2017 Return-Path: Delivered-To: svn-src-stable@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 6FB0FD65C61; Tue, 9 May 2017 18:19:47 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 40EC41C9C; Tue, 9 May 2017 18:19:47 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49IJkL1079923; Tue, 9 May 2017 18:19:46 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49IJkW0079922; Tue, 9 May 2017 18:19:46 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705091819.v49IJkW0079922@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 9 May 2017 18:19:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318078 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 18:19:47 -0000 Author: gjb Date: Tue May 9 18:19:46 2017 New Revision: 318078 URL: https://svnweb.freebsd.org/changeset/base/318078 Log: Document r315995, DMA 2017-02-10 snapshot. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 18:19:45 2017 (r318077) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 18:19:46 2017 (r318078) @@ -229,6 +229,9 @@ been updated to version 30.0.3. The unicode locales have been updated to version 9.0.0. + &man.dma.8; has been updated to the + 2017-02-10 snapshot. + &man.ntpd.8; has been updated to version 4.2.8p10. From owner-svn-src-stable@freebsd.org Tue May 9 18:19:49 2017 Return-Path: Delivered-To: svn-src-stable@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 1DA53D65C8D; Tue, 9 May 2017 18:19:49 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DEBD11CCD; Tue, 9 May 2017 18:19:48 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49IJlVu080009; Tue, 9 May 2017 18:19:47 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49IJlcw080008; Tue, 9 May 2017 18:19:47 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705091819.v49IJlcw080008@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 9 May 2017 18:19:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318080 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 18:19:49 -0000 Author: gjb Date: Tue May 9 18:19:47 2017 New Revision: 318080 URL: https://svnweb.freebsd.org/changeset/base/318080 Log: Document r314278, libucl version 20170219. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 18:19:46 2017 (r318079) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 18:19:47 2017 (r318080) @@ -229,6 +229,9 @@ been updated to version 30.0.3. The unicode locales have been updated to version 9.0.0. + libucl has been + updated to version 20170219. + &man.libarchive.3; has been updated to version 3.3.1. From owner-svn-src-stable@freebsd.org Tue May 9 18:19:49 2017 Return-Path: Delivered-To: svn-src-stable@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 ED498D65CA1; Tue, 9 May 2017 18:19:49 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BAB3D1CE1; Tue, 9 May 2017 18:19:49 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49IJmQ3080053; Tue, 9 May 2017 18:19:48 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49IJm7l080052; Tue, 9 May 2017 18:19:48 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705091819.v49IJm7l080052@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 9 May 2017 18:19:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318081 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 18:19:50 -0000 Author: gjb Date: Tue May 9 18:19:48 2017 New Revision: 318081 URL: https://svnweb.freebsd.org/changeset/base/318081 Log: Document r313980, openresolv version 3.9.0. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 18:19:47 2017 (r318080) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 18:19:48 2017 (r318081) @@ -229,6 +229,9 @@ been updated to version 30.0.3. The unicode locales have been updated to version 9.0.0. + openresolv + has been updated to version 3.9.0. + libucl has been updated to version 20170219. From owner-svn-src-stable@freebsd.org Tue May 9 18:19:45 2017 Return-Path: Delivered-To: svn-src-stable@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 C1C42D65C2D; Tue, 9 May 2017 18:19:45 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 937071C7E; Tue, 9 May 2017 18:19:45 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49IJiQb079837; Tue, 9 May 2017 18:19:44 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49IJiQm079836; Tue, 9 May 2017 18:19:44 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705091819.v49IJiQm079836@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 9 May 2017 18:19:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318076 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 18:19:45 -0000 Author: gjb Date: Tue May 9 18:19:44 2017 New Revision: 318076 URL: https://svnweb.freebsd.org/changeset/base/318076 Log: Document r316337, libarchive version 3.3.1. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 18:19:43 2017 (r318075) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 18:19:44 2017 (r318076) @@ -232,6 +232,9 @@ ACPICA has been updated to version 20170303. + &man.libarchive.3; has been updated to + version 3.3.1. + Timezone data files have been updated to version 2017b. From owner-svn-src-stable@freebsd.org Tue May 9 18:19:53 2017 Return-Path: Delivered-To: svn-src-stable@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 2F58BD65CE5; Tue, 9 May 2017 18:19:53 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F39711D3E; Tue, 9 May 2017 18:19:52 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49IJqDC080226; Tue, 9 May 2017 18:19:52 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49IJq1m080225; Tue, 9 May 2017 18:19:52 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705091819.v49IJq1m080225@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 9 May 2017 18:19:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318085 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 18:19:53 -0000 Author: gjb Date: Tue May 9 18:19:51 2017 New Revision: 318085 URL: https://svnweb.freebsd.org/changeset/base/318085 Log: Document r312517, xz version 5.2.3. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 18:19:51 2017 (r318084) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 18:19:51 2017 (r318085) @@ -229,6 +229,9 @@ been updated to version 30.0.3. The unicode locales have been updated to version 9.0.0. + &man.xz.1; has been updated to version + 5.2.3. + &man.tcpdump.1; has been updated to version 4.9.0. From owner-svn-src-stable@freebsd.org Tue May 9 18:19:51 2017 Return-Path: Delivered-To: svn-src-stable@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 92439D65CCA; Tue, 9 May 2017 18:19:51 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6200E1D14; Tue, 9 May 2017 18:19:51 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49IJoJL080139; Tue, 9 May 2017 18:19:50 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49IJoZl080138; Tue, 9 May 2017 18:19:50 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705091819.v49IJoZl080138@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 9 May 2017 18:19:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318083 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 18:19:51 -0000 Author: gjb Date: Tue May 9 18:19:50 2017 New Revision: 318083 URL: https://svnweb.freebsd.org/changeset/base/318083 Log: Document r313680, NetBSD test suite 01.11.2017_23.20 snapshot. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 18:19:49 2017 (r318082) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 18:19:50 2017 (r318083) @@ -235,6 +235,9 @@ openresolv has been updated to version 3.9.0. + The NetBSD test suite has been updated + to the 01.11.2017_23.20 snapshot. + libucl has been updated to version 20170219. From owner-svn-src-stable@freebsd.org Tue May 9 18:19:48 2017 Return-Path: Delivered-To: svn-src-stable@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 6FF19D65C75; Tue, 9 May 2017 18:19:48 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2DEAA1CB4; Tue, 9 May 2017 18:19:48 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49IJls7079966; Tue, 9 May 2017 18:19:47 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49IJljH079965; Tue, 9 May 2017 18:19:47 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705091819.v49IJljH079965@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 9 May 2017 18:19:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318079 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 18:19:48 -0000 Author: gjb Date: Tue May 9 18:19:46 2017 New Revision: 318079 URL: https://svnweb.freebsd.org/changeset/base/318079 Log: Fix revision number for libarchive v3.3.1. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 18:19:46 2017 (r318078) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 18:19:46 2017 (r318079) @@ -229,6 +229,9 @@ been updated to version 30.0.3. The unicode locales have been updated to version 9.0.0. + &man.libarchive.3; has been updated to + version 3.3.1. + &man.dma.8; has been updated to the 2017-02-10 snapshot. @@ -238,9 +241,6 @@ ACPICA has been updated to version 20170303. - &man.libarchive.3; has been updated to - version 3.3.1. - Timezone data files have been updated to version 2017b. From owner-svn-src-stable@freebsd.org Tue May 9 18:19:46 2017 Return-Path: Delivered-To: svn-src-stable@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 9ADF1D65C39; Tue, 9 May 2017 18:19:46 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6B6F11C8C; Tue, 9 May 2017 18:19:46 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49IJj4b079880; Tue, 9 May 2017 18:19:45 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49IJjCp079879; Tue, 9 May 2017 18:19:45 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705091819.v49IJjCp079879@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 9 May 2017 18:19:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318077 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 18:19:46 -0000 Author: gjb Date: Tue May 9 18:19:45 2017 New Revision: 318077 URL: https://svnweb.freebsd.org/changeset/base/318077 Log: Document r316068, ntpd version 4.2.8p10. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 18:19:44 2017 (r318076) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 18:19:45 2017 (r318077) @@ -229,6 +229,9 @@ been updated to version 30.0.3. The unicode locales have been updated to version 9.0.0. + &man.ntpd.8; has been updated to version + 4.2.8p10. + ACPICA has been updated to version 20170303. From owner-svn-src-stable@freebsd.org Tue May 9 18:19:54 2017 Return-Path: Delivered-To: svn-src-stable@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 0133BD65D04; Tue, 9 May 2017 18:19:54 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C638F1D57; Tue, 9 May 2017 18:19:53 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49IJqR0080270; Tue, 9 May 2017 18:19:52 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49IJqZq080269; Tue, 9 May 2017 18:19:52 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705091819.v49IJqZq080269@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 9 May 2017 18:19:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318086 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 18:19:54 -0000 Author: gjb Date: Tue May 9 18:19:52 2017 New Revision: 318086 URL: https://svnweb.freebsd.org/changeset/base/318086 Log: Document r309847, file version 5.29. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 18:19:51 2017 (r318085) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 18:19:52 2017 (r318086) @@ -222,6 +222,8 @@ Contributed Software + &man.file.1; has been updated to version 5.29. + The &man.amd.8; utility has been updated to version 6.2. From owner-svn-src-stable@freebsd.org Tue May 9 18:19:55 2017 Return-Path: Delivered-To: svn-src-stable@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 ADEADD65D2F; Tue, 9 May 2017 18:19:55 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7B1F31D88; Tue, 9 May 2017 18:19:55 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49IJsK4080356; Tue, 9 May 2017 18:19:54 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49IJs8H080355; Tue, 9 May 2017 18:19:54 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705091819.v49IJs8H080355@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 9 May 2017 18:19:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318088 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 18:19:55 -0000 Author: gjb Date: Tue May 9 18:19:54 2017 New Revision: 318088 URL: https://svnweb.freebsd.org/changeset/base/318088 Log: Document r309511, Subversion 1.9.5. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 18:19:53 2017 (r318087) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 18:19:54 2017 (r318088) @@ -222,6 +222,9 @@ Contributed Software + Subversion + has been updated to version 1.9.5. + &man.file.1; has been updated to version 5.29. From owner-svn-src-stable@freebsd.org Tue May 9 18:19:50 2017 Return-Path: Delivered-To: svn-src-stable@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 BB195D65CB3; Tue, 9 May 2017 18:19:50 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 86D811CFA; Tue, 9 May 2017 18:19:50 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49IJnXB080096; Tue, 9 May 2017 18:19:49 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49IJnkV080095; Tue, 9 May 2017 18:19:49 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705091819.v49IJnkV080095@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 9 May 2017 18:19:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318082 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 18:19:50 -0000 Author: gjb Date: Tue May 9 18:19:49 2017 New Revision: 318082 URL: https://svnweb.freebsd.org/changeset/base/318082 Log: Document r313795, zlib 1.2.11. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 18:19:48 2017 (r318081) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 18:19:49 2017 (r318082) @@ -229,6 +229,9 @@ been updated to version 30.0.3. The unicode locales have been updated to version 9.0.0. + &man.zlib.3; has been updated to version + 1.2.11. + openresolv has been updated to version 3.9.0. From owner-svn-src-stable@freebsd.org Tue May 9 18:19:52 2017 Return-Path: Delivered-To: svn-src-stable@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 6BFAED65CDA; Tue, 9 May 2017 18:19:52 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 380B21D26; Tue, 9 May 2017 18:19:52 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49IJpKl080182; Tue, 9 May 2017 18:19:51 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49IJpLB080181; Tue, 9 May 2017 18:19:51 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705091819.v49IJpLB080181@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 9 May 2017 18:19:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318084 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 18:19:52 -0000 Author: gjb Date: Tue May 9 18:19:51 2017 New Revision: 318084 URL: https://svnweb.freebsd.org/changeset/base/318084 Log: Document r313537, tcpdump version 4.9.0. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 18:19:50 2017 (r318083) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 18:19:51 2017 (r318084) @@ -229,6 +229,9 @@ been updated to version 30.0.3. The unicode locales have been updated to version 9.0.0. + &man.tcpdump.1; has been updated to + version 4.9.0. + &man.zlib.3; has been updated to version 1.2.11. From owner-svn-src-stable@freebsd.org Tue May 9 18:19:55 2017 Return-Path: Delivered-To: svn-src-stable@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 F14D1D65D14; Tue, 9 May 2017 18:19:54 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B5DF11D73; Tue, 9 May 2017 18:19:54 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49IJr8n080313; Tue, 9 May 2017 18:19:53 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49IJr02080312; Tue, 9 May 2017 18:19:53 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705091819.v49IJr02080312@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 9 May 2017 18:19:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318087 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 18:19:55 -0000 Author: gjb Date: Tue May 9 18:19:53 2017 New Revision: 318087 URL: https://svnweb.freebsd.org/changeset/base/318087 Log: Add missing revision. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 18:19:52 2017 (r318086) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 18:19:53 2017 (r318087) @@ -222,7 +222,8 @@ Contributed Software - &man.file.1; has been updated to version 5.29. + &man.file.1; has been updated to version + 5.29. The &man.amd.8; utility has been updated to version 6.2. From owner-svn-src-stable@freebsd.org Tue May 9 18:19:56 2017 Return-Path: Delivered-To: svn-src-stable@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 805B7D65D4A; Tue, 9 May 2017 18:19:56 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4C3791DA8; Tue, 9 May 2017 18:19:56 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49IJtvn080399; Tue, 9 May 2017 18:19:55 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49IJth1080398; Tue, 9 May 2017 18:19:55 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705091819.v49IJth1080398@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 9 May 2017 18:19:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318089 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 18:19:56 -0000 Author: gjb Date: Tue May 9 18:19:55 2017 New Revision: 318089 URL: https://svnweb.freebsd.org/changeset/base/318089 Log: Document r307729, unbound 1.5.10. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 18:19:54 2017 (r318088) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 18:19:55 2017 (r318089) @@ -222,6 +222,9 @@ Contributed Software + &man.unbound.8; has been updated to + version 1.5.10. + Subversion has been updated to version 1.9.5. From owner-svn-src-stable@freebsd.org Tue May 9 18:46:51 2017 Return-Path: Delivered-To: svn-src-stable@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 4F489D65EE9; Tue, 9 May 2017 18:46:51 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 E67E6BC4; Tue, 9 May 2017 18:46:50 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49IkoL8092826; Tue, 9 May 2017 18:46:50 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49IknNp092818; Tue, 9 May 2017 18:46:49 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201705091846.v49IknNp092818@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Tue, 9 May 2017 18:46:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318093 - stable/11/usr.bin/dtc X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 18:46:51 -0000 Author: gonzo Date: Tue May 9 18:46:49 2017 New Revision: 318093 URL: https://svnweb.freebsd.org/changeset/base/318093 Log: MFC r306806, r313709, r317058, r317060 r306806 by emaste: Improvements to BSD-licensed DTC. - Numerous crash and bug fixes - Improved warning and error messages - Permit multiple labels on nodes and properties - Fix node@address references - Add support for /delete-node/ - Consume whitespace after a node - Read the next token before the second /memreserve/ - Fix parsing of whitespace - Clean up /delete-node/ and add support for /delete-property/ - Handle /delete-node/ specifying a unit address Obtained from: https://github.com/davidchisnall/dtc @df5ede4 r313709 by dim: Fix build of BSD dtc when NDEBUG is defined (MK_ASSERT_DEBUG=no): * Initialize correct parent in binary_operator's constructor. * Include explicitly, otherwise errno is undefined (without NDEBUG, this is accidentally 'fixed' by including ). Reported by: matteo r317058 by emaste: dtc: remove unused (since r306806) string.hh r317060 by emaste: dtc: update to upstream 227d6a3 - Report missing includes at the correct location. - Add initial support for the -@ option emitting a symbol table. - Add support for running tests with and without -@ - Add support for generating __fixups__ and __local_fixups__ - Attach the to-string transform to the node path. Deleted: stable/11/usr.bin/dtc/string.hh Modified: stable/11/usr.bin/dtc/checking.cc stable/11/usr.bin/dtc/checking.hh stable/11/usr.bin/dtc/dtb.cc stable/11/usr.bin/dtc/dtb.hh stable/11/usr.bin/dtc/dtc.1 stable/11/usr.bin/dtc/dtc.cc stable/11/usr.bin/dtc/fdt.cc stable/11/usr.bin/dtc/fdt.hh stable/11/usr.bin/dtc/input_buffer.cc stable/11/usr.bin/dtc/input_buffer.hh stable/11/usr.bin/dtc/string.cc stable/11/usr.bin/dtc/util.hh Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/dtc/checking.cc ============================================================================== --- stable/11/usr.bin/dtc/checking.cc Tue May 9 18:45:34 2017 (r318092) +++ stable/11/usr.bin/dtc/checking.cc Tue May 9 18:46:49 2017 (r318093) @@ -33,7 +33,7 @@ #include "checking.hh" #include - +using std::string; namespace dtc { @@ -44,6 +44,30 @@ namespace checking namespace { + struct deleted_node_checker : public checker + { + deleted_node_checker(const char *name) : checker(name) {} + virtual bool check_node(device_tree *, const node_ptr &n) + { + auto &deleted = n->deleted_child_nodes(); + if (deleted.empty()) + { + return true; + } + bool plural = deleted.size() > 1; + string errmsg("Attempts to delete "); + errmsg += plural ? "nodes" : "node"; + errmsg += " that "; + errmsg += plural ? "were" : "was"; + errmsg += " not added in merge: "; + for (auto &d : deleted) + { + errmsg += d; + } + report_error(errmsg.c_str()); + return false; + } + }; /** * Checker that verifies that every node that has children has * #address-cells and #size-cells properties. @@ -126,11 +150,11 @@ checker::report_error(const char *errmsg for (auto &p : path) { putc('/', stderr); - p.first.dump(); + puts(p.first.c_str()); if (!(p.second.empty())) { putc('@', stderr); - p.second.dump(); + puts(p.second.c_str()); } } fprintf(stderr, " [-W%s]\n", checker_name); @@ -167,7 +191,7 @@ property_size_checker::check(device_tree template void -check_manager::add_property_type_checker(const char *name, string prop) +check_manager::add_property_type_checker(const char *name, const string &prop) { checkers.insert(std::make_pair(string(name), new property_type_checker(name, prop))); @@ -175,7 +199,7 @@ check_manager::add_property_type_checker void check_manager::add_property_size_checker(const char *name, - string prop, + const string &prop, uint32_t size) { checkers.insert(std::make_pair(string(name), @@ -207,6 +231,8 @@ check_manager::check_manager() add_property_size_checker("type-phandle", string("phandle"), 4); disabled_checkers.insert(std::make_pair(string("cells-attributes"), new address_cells_checker("cells-attributes"))); + checkers.insert(std::make_pair(string("deleted-nodes"), + new deleted_node_checker("deleted-nodes"))); } bool @@ -225,7 +251,7 @@ check_manager::run_checks(device_tree *t } bool -check_manager::disable_checker(string name) +check_manager::disable_checker(const string &name) { auto checker = checkers.find(name); if (checker != checkers.end()) @@ -239,7 +265,7 @@ check_manager::disable_checker(string na } bool -check_manager::enable_checker(string name) +check_manager::enable_checker(const string &name) { auto checker = disabled_checkers.find(name); if (checker != disabled_checkers.end()) Modified: stable/11/usr.bin/dtc/checking.hh ============================================================================== --- stable/11/usr.bin/dtc/checking.hh Tue May 9 18:45:34 2017 (r318092) +++ stable/11/usr.bin/dtc/checking.hh Tue May 9 18:46:49 2017 (r318093) @@ -32,7 +32,7 @@ #ifndef _CHECKING_HH_ #define _CHECKING_HH_ -#include "string.hh" +#include #include "fdt.hh" namespace dtc @@ -58,7 +58,7 @@ class checker /** * The name of the checker. This is used for printing error messages * and for enabling / disabling specific checkers from the command - * line. + * line. */ const char *checker_name; /** @@ -118,18 +118,18 @@ class property_checker : public checker /** * The name of the property that this checker is looking for. */ - string key; + std::string key; public: /** * Implementation of the generic property-checking method that checks - * for a property with the name specified in the constructor + * for a property with the name specified in the constructor. */ virtual bool check_property(device_tree *tree, const node_ptr &n, property_ptr p); /** * Constructor. Takes the name of the checker and the name of the * property to check. */ - property_checker(const char* name, string property_name) + property_checker(const char* name, const std::string &property_name) : checker(name), key(property_name) {} /** * The check method, which subclasses should implement. @@ -147,7 +147,7 @@ struct property_type_checker : public pr * Constructor, takes the name of the checker and the name of the * property to check as arguments. */ - property_type_checker(const char* name, string property_name) : + property_type_checker(const char* name, const std::string &property_name) : property_checker(name, property_name) {} virtual bool check(device_tree *tree, const node_ptr &n, property_ptr p) = 0; }; @@ -158,7 +158,7 @@ struct property_type_checker : public pr template<> struct property_type_checker : public property_checker { - property_type_checker(const char* name, string property_name) : + property_type_checker(const char* name, const std::string &property_name) : property_checker(name, property_name) {} virtual bool check(device_tree *, const node_ptr &, property_ptr p) { @@ -173,7 +173,7 @@ struct property_type_checker struct property_type_checker : public property_checker { - property_type_checker(const char* name, string property_name) : + property_type_checker(const char* name, const std::string &property_name) : property_checker(name, property_name) {} virtual bool check(device_tree *, const node_ptr &, property_ptr p) { @@ -188,7 +188,7 @@ template<> struct property_type_checker : public property_checker { - property_type_checker(const char* name, string property_name) : + property_type_checker(const char* name, const std::string &property_name) : property_checker(name, property_name) {} virtual bool check(device_tree *, const node_ptr &, property_ptr p) { @@ -211,11 +211,11 @@ struct property_type_checker struct property_type_checker : public property_checker { - property_type_checker(const char* name, string property_name) : + property_type_checker(const char* name, const std::string &property_name) : property_checker(name, property_name) {} virtual bool check(device_tree *tree, const node_ptr &, property_ptr p) { - return (p->begin() + 1 == p->end()) && + return (p->begin() + 1 == p->end()) && (tree->referenced_node(*p->begin()) != 0); } }; @@ -234,7 +234,9 @@ struct property_size_checker : public pr * Constructor, takes the name of the checker, the name of the property * to check, and its expected size as arguments. */ - property_size_checker(const char* name, string property_name, uint32_t bytes) + property_size_checker(const char* name, + const std::string &property_name, + uint32_t bytes) : property_checker(name, property_name), size(bytes) {} /** * Check, validates that the property has the correct size. @@ -254,26 +256,26 @@ class check_manager * disabling checkers from the command line. When this manager runs, * it will only run the checkers from this map. */ - std::unordered_map checkers; + std::unordered_map checkers; /** * The disabled checkers. Moving checkers to this list disables them, * but allows them to be easily moved back. */ - std::unordered_map disabled_checkers; + std::unordered_map disabled_checkers; /** * Helper function for adding a property value checker. */ template - void add_property_type_checker(const char *name, string prop); + void add_property_type_checker(const char *name, const std::string &prop); /** * Helper function for adding a simple type checker. */ - void add_property_type_checker(const char *name, string prop); + void add_property_type_checker(const char *name, const std::string &prop); /** * Helper function for adding a property value checker. */ void add_property_size_checker(const char *name, - string prop, + const std::string &prop, uint32_t size); public: /** @@ -292,11 +294,11 @@ class check_manager /** * Disables the named checker. */ - bool disable_checker(string name); + bool disable_checker(const std::string &name); /** - * Enables the named checker. + * Enables the named checker. */ - bool enable_checker(string name); + bool enable_checker(const std::string &name); }; } // namespace checking Modified: stable/11/usr.bin/dtc/dtb.cc ============================================================================== --- stable/11/usr.bin/dtc/dtb.cc Tue May 9 18:45:34 2017 (r318092) +++ stable/11/usr.bin/dtc/dtb.cc Tue May 9 18:46:49 2017 (r318093) @@ -36,6 +36,7 @@ #include #include +using std::string; namespace dtc { @@ -51,9 +52,9 @@ void output_writer::write_data(byte_buff } void -binary_writer::write_string(string name) +binary_writer::write_string(const string &name) { - name.push_to_buffer(buffer); + push_string(buffer, name); // Trailing nul buffer.push_back(0); } @@ -98,15 +99,6 @@ binary_writer::size() } void -asm_writer::write_string(const char *c) -{ - while (*c) - { - buffer.push_back((uint8_t)*(c++)); - } -} - -void asm_writer::write_line(const char *c) { if (byte_count != 0) @@ -142,34 +134,44 @@ asm_writer::write_byte(uint8_t b) } void -asm_writer::write_label(string name) +asm_writer::write_label(const string &name) { write_line("\t.globl "); - name.push_to_buffer(buffer); + push_string(buffer, name); buffer.push_back('\n'); - name.push_to_buffer(buffer); + push_string(buffer, name); buffer.push_back(':'); buffer.push_back('\n'); buffer.push_back('_'); - name.push_to_buffer(buffer); + push_string(buffer, name); buffer.push_back(':'); buffer.push_back('\n'); } void -asm_writer::write_comment(string name) +asm_writer::write_comment(const string &name) { write_line("\t/* "); - name.push_to_buffer(buffer); + push_string(buffer, name); write_string(" */\n"); } void -asm_writer::write_string(string name) +asm_writer::write_string(const char *c) +{ + while (*c) + { + buffer.push_back((uint8_t)*(c++)); + } +} + + +void +asm_writer::write_string(const string &name) { write_line("\t.string \""); - name.push_to_buffer(buffer); + push_string(buffer, name); write_line("\"\n"); bytes_written += name.size() + 1; } @@ -231,8 +233,8 @@ asm_writer::size() void header::write(output_writer &out) { - out.write_label(string("dt_blob_start")); - out.write_label(string("dt_header")); + out.write_label("dt_blob_start"); + out.write_label("dt_header"); out.write_comment("magic"); out.write_data(magic); out.write_comment("totalsize"); @@ -275,7 +277,7 @@ header::read_dtb(input_buffer &input) input.consume_binary(size_dt_struct); } uint32_t -string_table::add_string(string str) +string_table::add_string(const string &str) { auto old = string_offsets.find(str); if (old == string_offsets.end()) @@ -296,13 +298,13 @@ string_table::add_string(string str) void string_table::write(dtb::output_writer &writer) { - writer.write_comment(string("Strings table.")); - writer.write_label(string("dt_strings_start")); + writer.write_comment("Strings table."); + writer.write_label("dt_strings_start"); for (auto &i : strings) { writer.write_string(i); } - writer.write_label(string("dt_strings_end")); + writer.write_label("dt_strings_end"); } } // namespace dtb Modified: stable/11/usr.bin/dtc/dtb.hh ============================================================================== --- stable/11/usr.bin/dtc/dtb.hh Tue May 9 18:45:34 2017 (r318092) +++ stable/11/usr.bin/dtc/dtb.hh Tue May 9 18:46:49 2017 (r318093) @@ -33,10 +33,13 @@ #ifndef _DTB_HH_ #define _DTB_HH_ #include -#include "string.hh" +#include #include +#include "input_buffer.hh" +#include "util.hh" + namespace dtc { /** @@ -121,16 +124,16 @@ struct output_writer * assembly output, where the labels become symbols that can be * resolved at link time. */ - virtual void write_label(string name) = 0; + virtual void write_label(const std::string &name) = 0; /** * Writes a comment into the output stream. Useful only when debugging * the output. */ - virtual void write_comment(string name) = 0; + virtual void write_comment(const std::string &name) = 0; /** * Writes a string. A nul terminator is implicitly added. */ - virtual void write_string(string name) = 0; + virtual void write_string(const std::string &name) = 0; /** * Writes a single 8-bit value. */ @@ -186,17 +189,17 @@ class binary_writer : public output_writ * The binary format does not support labels, so this method * does nothing. */ - virtual void write_label(string) {} + void write_label(const std::string &) override {} /** * Comments are ignored by the binary writer. */ - virtual void write_comment(string) {} - virtual void write_string(string name); - virtual void write_data(uint8_t v); - virtual void write_data(uint32_t v); - virtual void write_data(uint64_t v); - virtual void write_to_file(int fd); - virtual uint32_t size(); + void write_comment(const std::string&) override {} + void write_string(const std::string &name) override; + void write_data(uint8_t v) override; + void write_data(uint32_t v) override; + void write_data(uint64_t v) override; + void write_to_file(int fd) override; + uint32_t size() override; }; /** * Assembly writer. This class is responsible for writing the output in an @@ -224,11 +227,15 @@ class asm_writer : public output_writer uint32_t bytes_written; /** - * Writes a C string directly to the output as-is. This is mainly used - * for writing directives. + * Writes a string directly to the output as-is. This is the function that + * performs the real output. */ void write_string(const char *c); /** + * Write a string to the output. + */ + void write_string(const std::string &c) override; + /** * Writes the string, starting on a new line. */ void write_line(const char *c); @@ -239,14 +246,13 @@ class asm_writer : public output_writer void write_byte(uint8_t b); public: asm_writer() : byte_count(0), bytes_written(0) {} - virtual void write_label(string name); - virtual void write_comment(string name); - virtual void write_string(string name); - virtual void write_data(uint8_t v); - virtual void write_data(uint32_t v); - virtual void write_data(uint64_t v); - virtual void write_to_file(int fd); - virtual uint32_t size(); + void write_label(const std::string &name) override; + void write_comment(const std::string &name) override; + void write_data(uint8_t v) override; + void write_data(uint32_t v) override; + void write_data(uint64_t v) override; + void write_to_file(int fd) override; + uint32_t size() override; }; /** @@ -328,14 +334,14 @@ class string_table { /** * Map from strings to their offset. */ - std::map string_offsets; + std::map string_offsets; /** * The strings, in the order in which they should be written to the * output. The order must be stable - adding another string must not * change the offset of any that we have already referenced - and so we * simply write the strings in the order that they are passed. */ - std::vector strings; + std::vector strings; /** * The current size of the strings section. */ @@ -351,7 +357,7 @@ class string_table { * will return its existing offset, otherwise it will return a new * offset. */ - uint32_t add_string(string str); + uint32_t add_string(const std::string &str); /** * Writes the strings table to the specified output. */ Modified: stable/11/usr.bin/dtc/dtc.1 ============================================================================== --- stable/11/usr.bin/dtc/dtc.1 Tue May 9 18:45:34 2017 (r318092) +++ stable/11/usr.bin/dtc/dtc.1 Tue May 9 18:46:49 2017 (r318093) @@ -38,7 +38,7 @@ .Nd device tree compiler .Sh SYNOPSIS .Nm -.Op Fl fhsv +.Op Fl @fhsv .Op Fl b Ar boot_cpu_id .Op Fl d Ar dependency_file .Op Fl E Ar [no-]checker_name @@ -84,6 +84,8 @@ Enable or disable a specified checker. The argument is the name of the checker. The full list of checkers is given in .Sx CHECKERS . +.It Fl @ +Emit a __symbols__ node to allow plugins to be loaded. .It Fl f Force the tool to attempt to generate the output, even if the input had errors. .It Fl h @@ -237,6 +239,10 @@ Checks that all nodes with children have and .Va #size-cells properties. +.It deleted-nodes +Checks that all +.Va /delete-node/ +statements refer to nodes that are merged. .El .Sh EXAMPLES The command: Modified: stable/11/usr.bin/dtc/dtc.cc ============================================================================== --- stable/11/usr.bin/dtc/dtc.cc Tue May 9 18:45:34 2017 (r318092) +++ stable/11/usr.bin/dtc/dtc.cc Tue May 9 18:46:49 2017 (r318093) @@ -42,8 +42,10 @@ #include "fdt.hh" #include "checking.hh" +#include "util.hh" using namespace dtc; +using std::string; /** * The current major version of the tool. @@ -52,22 +54,22 @@ int version_major = 0; /** * The current minor version of the tool. */ -int version_minor = 4; +int version_minor = 5; /** * The current patch level of the tool. */ int version_patch = 0; -static void usage(const char* argv0) +static void usage(const string &argv0) { fprintf(stderr, "Usage:\n" - "\t%s\t[-fhsv] [-b boot_cpu_id] [-d dependency_file]" + "\t%s\t[-fhsv@] [-b boot_cpu_id] [-d dependency_file]" "[-E [no-]checker_name]\n" "\t\t[-H phandle_format] [-I input_format]" "[-O output_format]\n" "\t\t[-o output_file] [-R entries] [-S bytes] [-p bytes]" "[-V blob_version]\n" - "\t\t-W [no-]checker_name] input_file\n", basename((char*)argv0)); + "\t\t-W [no-]checker_name] input_file\n", basename(argv0).c_str()); } /** @@ -90,9 +92,8 @@ main(int argc, char **argv) const char *in_file = "-"; FILE *depfile = 0; bool debug_mode = false; - void (device_tree::*write_fn)(int) = &device_tree::write_binary; - void (device_tree::*read_fn)(const char*, FILE*) = - &device_tree::parse_dts; + auto write_fn = &device_tree::write_binary; + auto read_fn = &device_tree::parse_dts; uint32_t boot_cpu; bool boot_cpu_specified = false; bool keep_going = false; @@ -100,7 +101,7 @@ main(int argc, char **argv) clock_t c0 = clock(); class device_tree tree; fdt::checking::check_manager checks; - const char *options = "hqI:O:o:V:d:R:S:p:b:fi:svH:W:E:DP:"; + const char *options = "@hqI:O:o:V:d:R:S:p:b:fi:svH:W:E:DP:"; // Don't forget to update the man page if any more options are added. while ((ch = getopt(argc, argv, options)) != -1) @@ -113,14 +114,17 @@ main(int argc, char **argv) case 'v': version(argv[0]); return EXIT_SUCCESS; + case '@': + tree.write_symbols = true; + break; case 'I': { - string arg = string(optarg); - if (arg == string("dtb")) + string arg(optarg); + if (arg == "dtb") { read_fn = &device_tree::parse_dtb; } - else if (arg == string("dts")) + else if (arg == "dts") { read_fn = &device_tree::parse_dts; } @@ -133,16 +137,16 @@ main(int argc, char **argv) } case 'O': { - string arg = string(optarg); - if (arg == string("dtb")) + string arg(optarg); + if (arg == "dtb") { write_fn = &device_tree::write_binary; } - else if (arg == string("asm")) + else if (arg == "asm") { write_fn = &device_tree::write_asm; } - else if (arg == string("dts")) + else if (arg == "dts") { write_fn = &device_tree::write_dts; } @@ -168,7 +172,7 @@ main(int argc, char **argv) debug_mode = true; break; case 'V': - if (string(optarg) != string("17")) + if (string(optarg) != "17") { fprintf(stderr, "Unknown output format version: %s\n", optarg); return EXIT_FAILURE; @@ -180,7 +184,7 @@ main(int argc, char **argv) { fclose(depfile); } - if (string(optarg) == string("-")) + if (string(optarg) == "-") { depfile = stdout; } @@ -197,16 +201,16 @@ main(int argc, char **argv) } case 'H': { - string arg = string(optarg); - if (arg == string("both")) + string arg(optarg); + if (arg == "both") { tree.set_phandle_format(device_tree::BOTH); } - else if (arg == string("epapr")) + else if (arg == "epapr") { tree.set_phandle_format(device_tree::EPAPR); } - else if (arg == string("linux")) + else if (arg == "linux") { tree.set_phandle_format(device_tree::LINUX); } @@ -229,7 +233,7 @@ main(int argc, char **argv) case 'W': case 'E': { - string arg = string(optarg); + string arg(optarg); if ((arg.size() > 3) && (strncmp(optarg, "no-", 3) == 0)) { arg = string(optarg+3); @@ -307,7 +311,7 @@ main(int argc, char **argv) } if (!(tree.is_valid() || keep_going)) { - fprintf(stderr, "Failed to parse tree. Unhappy face!\n"); + fprintf(stderr, "Failed to parse tree.\n"); return EXIT_FAILURE; } clock_t c2 = clock(); Modified: stable/11/usr.bin/dtc/fdt.cc ============================================================================== --- stable/11/usr.bin/dtc/fdt.cc Tue May 9 18:45:34 2017 (r318092) +++ stable/11/usr.bin/dtc/fdt.cc Tue May 9 18:46:49 2017 (r318093) @@ -36,6 +36,7 @@ #include "dtb.hh" #include +#include #include #include @@ -48,6 +49,8 @@ #include #include +using std::string; + namespace dtc { @@ -78,7 +81,7 @@ property_value::push_to_buffer(byte_buff } else { - string_data.push_to_buffer(buffer, true); + push_string(buffer, string_data, true); // Trailing nul buffer.push_back(0); } @@ -166,13 +169,23 @@ property_value::resolve_type() type = BINARY; } +size_t +property_value::size() +{ + if (!byte_data.empty()) + { + return byte_data.size(); + } + return string_data.size() + 1; +} + void property_value::write_as_string(FILE *file) { putc('"', file); if (byte_data.empty()) { - string_data.print(file); + fputs(string_data.c_str(), file); } else { @@ -240,31 +253,32 @@ property_value::write_as_bytes(FILE *fil } void -property::parse_string(input_buffer &input) +property::parse_string(text_input_buffer &input) { property_value v; - assert(input[0] == '"'); + assert(*input == '"'); ++input; - const char *start = (const char*)input; - int length = 0; - while (char c = input[0]) + std::vector bytes; + bool isEscaped = false; + while (char c = *input) { - if (c == '"' && input[-1] != '\\') + if (c == '"' && !isEscaped) { input.consume('"'); break; } + isEscaped = (c == '\\'); + bytes.push_back(c); ++input; - ++length; } - v.string_data = string(start, length); + v.string_data = string(bytes.begin(), bytes.end()); values.push_back(v); } void -property::parse_cells(input_buffer &input, int cell_size) +property::parse_cells(text_input_buffer &input, int cell_size) { - assert(input[0] == '<'); + assert(*input == '<'); ++input; property_value v; input.next_token(); @@ -282,9 +296,16 @@ property::parse_cells(input_buffer &inpu return; } input.next_token(); - // FIXME: We should support full paths here, but we - // don't. - string referenced = string::parse_node_name(input); + string referenced; + if (!input.consume('{')) + { + referenced = input.parse_node_name(); + } + else + { + referenced = input.parse_to('}'); + input.consume('}'); + } if (referenced.empty()) { input.parse_error("Expected node name"); @@ -343,9 +364,9 @@ property::parse_cells(input_buffer &inpu } void -property::parse_bytes(input_buffer &input) +property::parse_bytes(text_input_buffer &input) { - assert(input[0] == '['); + assert(*input == '['); ++input; property_value v; input.next_token(); @@ -370,13 +391,13 @@ property::parse_bytes(input_buffer &inpu } void -property::parse_reference(input_buffer &input) +property::parse_reference(text_input_buffer &input) { - assert(input[0] == '&'); + assert(*input == '&'); ++input; input.next_token(); property_value v; - v.string_data = string::parse_node_name(input); + v.string_data = input.parse_node_name(); if (v.string_data.empty()) { input.parse_error("Expected node name"); @@ -400,7 +421,7 @@ property::property(input_buffer &structs } // Find the name input_buffer name_buffer = strings.buffer_from_offset(name_offset); - if (name_buffer.empty()) + if (name_buffer.finished()) { fprintf(stderr, "Property name offset %" PRIu32 " is past the end of the strings table\n", @@ -408,7 +429,7 @@ property::property(input_buffer &structs valid = false; return; } - key = string(name_buffer); + key = name_buffer.parse_to(0); // If we're empty, do not push anything as value. if (!length) @@ -429,7 +450,7 @@ property::property(input_buffer &structs values.push_back(v); } -void property::parse_define(input_buffer &input, define_map *defines) +void property::parse_define(text_input_buffer &input, define_map *defines) { input.consume('$'); if (!defines) @@ -438,7 +459,7 @@ void property::parse_define(input_buffer valid = false; return; } - string name = string::parse_property_name(input); + string name = input.parse_property_name(); define_map::iterator found; if ((name == string()) || ((found = defines->find(name)) == defines->end())) @@ -450,15 +471,15 @@ void property::parse_define(input_buffer values.push_back((*found).second->values[0]); } -property::property(input_buffer &input, - string k, - string l, +property::property(text_input_buffer &input, + string &&k, + string_set &&l, bool semicolonTerminated, - define_map *defines) : key(k), label(l), valid(true) + define_map *defines) : key(k), labels(l), valid(true) { do { input.next_token(); - switch (input[0]) + switch (*input) { case '$': { @@ -487,7 +508,7 @@ property::property(input_buffer &input, } if (!valid) return; input.next_token(); - if (input[0] != '<') + if (*input != '<') { input.parse_error("/bits/ directive is only valid on arrays"); valid = false; @@ -534,10 +555,14 @@ property::parse_dtb(input_buffer &struct } property_ptr -property::parse(input_buffer &input, string key, string label, +property::parse(text_input_buffer &input, string &&key, string_set &&label, bool semicolonTerminated, define_map *defines) { - property_ptr p(new property(input, key, label, semicolonTerminated, defines)); + property_ptr p(new property(input, + std::move(key), + std::move(label), + semicolonTerminated, + defines)); if (!p->valid) { p = nullptr; @@ -596,14 +621,16 @@ property::write_dts(FILE *file, int inde { putc('\t', file); } - if (label != string()) +#ifdef PRINT_LABELS + for (auto &l : labels) { - label.print(file); + fputs(l.c_str(), file); fputs(": ", file); } +#endif if (key != string()) { - key.print(file); + fputs(key.c_str(), file); } if (!values.empty()) { @@ -636,8 +663,23 @@ property::write_dts(FILE *file, int inde fputs(";\n", file); } +size_t +property::offset_of_value(property_value &val) +{ + size_t off = 0; + for (auto &v : values) + { + if (&v == &val) + { + return off; + } + off += v.size(); + } + return -1; +} + string -node::parse_name(input_buffer &input, bool &is_property, const char *error) +node::parse_name(text_input_buffer &input, bool &is_property, const char *error) { if (!valid) { @@ -646,9 +688,9 @@ node::parse_name(input_buffer &input, bo input.next_token(); if (is_property) { - return string::parse_property_name(input); + return input.parse_property_name(); } - string n = string::parse_node_or_property_name(input, is_property); + string n = input.parse_node_or_property_name(is_property); if (n.empty()) { if (n.empty()) @@ -672,25 +714,23 @@ node::visit(std::function f node::node(input_buffer &structs, input_buffer &strings) : valid(true) { - const char *name_start = (const char*)structs; - int name_length = 0; + std::vector bytes; while (structs[0] != '\0' && structs[0] != '@') { - name_length++; + bytes.push_back(structs[0]); ++structs; } - name = string(name_start, name_length); + name = string(bytes.begin(), bytes.end()); + bytes.clear(); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@freebsd.org Tue May 9 19:14:27 2017 Return-Path: Delivered-To: svn-src-stable@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 DF4C9D66704; Tue, 9 May 2017 19:14:27 +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 AE40E1149; Tue, 9 May 2017 19:14:27 +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 v49JEQS0004814; Tue, 9 May 2017 19:14:26 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49JEQoN004813; Tue, 9 May 2017 19:14:26 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201705091914.v49JEQoN004813@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 9 May 2017 19:14:26 +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: r318096 - stable/10/usr.bin/xinstall 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@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 19:14:28 -0000 Author: bdrewery Date: Tue May 9 19:14:26 2017 New Revision: 318096 URL: https://svnweb.freebsd.org/changeset/base/318096 Log: MFC r303450: Pull a copy of the input string before calling basename() and dirname(). Modified: stable/10/usr.bin/xinstall/xinstall.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/xinstall/xinstall.c ============================================================================== --- stable/10/usr.bin/xinstall/xinstall.c Tue May 9 19:01:57 2017 (r318095) +++ stable/10/usr.bin/xinstall/xinstall.c Tue May 9 19:14:26 2017 (r318096) @@ -669,7 +669,7 @@ makelink(const char *from_name, const ch } if (dolink & LN_RELATIVE) { - char *cp, *d, *s; + char *to_name_copy, *cp, *d, *s; /* Resolve pathnames. */ if (realpath(from_name, src) == NULL) @@ -679,7 +679,10 @@ makelink(const char *from_name, const ch * The last component of to_name may be a symlink, * so use realpath to resolve only the directory. */ - cp = dirname(to_name); + to_name_copy = strdup(to_name); + if (to_name_copy == NULL) + err(EX_OSERR, "%s: strdup", to_name); + cp = dirname(to_name_copy); if (realpath(cp, dst) == NULL) err(EX_OSERR, "%s: realpath", cp); /* .. and add the last component. */ @@ -687,9 +690,11 @@ makelink(const char *from_name, const ch if (strlcat(dst, "/", sizeof(dst)) > sizeof(dst)) errx(1, "resolved pathname too long"); } - cp = basename(to_name); + strcpy(to_name_copy, to_name); + cp = basename(to_name_copy); if (strlcat(dst, cp, sizeof(dst)) > sizeof(dst)) errx(1, "resolved pathname too long"); + free(to_name_copy); /* Trim common path components. */ for (s = src, d = dst; *s == *d; s++, d++) From owner-svn-src-stable@freebsd.org Tue May 9 19:15:12 2017 Return-Path: Delivered-To: svn-src-stable@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 E2542D66775; Tue, 9 May 2017 19:15:12 +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 AEBDE12EC; Tue, 9 May 2017 19:15:12 +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 v49JFBVj004896; Tue, 9 May 2017 19:15:11 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49JFBIw004895; Tue, 9 May 2017 19:15:11 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201705091915.v49JFBIw004895@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 9 May 2017 19:15:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318097 - stable/11/usr.bin/xinstall X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 19:15:13 -0000 Author: bdrewery Date: Tue May 9 19:15:11 2017 New Revision: 318097 URL: https://svnweb.freebsd.org/changeset/base/318097 Log: MFC r303450: Pull a copy of the input string before calling basename() and dirname(). Modified: stable/11/usr.bin/xinstall/xinstall.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/xinstall/xinstall.c ============================================================================== --- stable/11/usr.bin/xinstall/xinstall.c Tue May 9 19:14:26 2017 (r318096) +++ stable/11/usr.bin/xinstall/xinstall.c Tue May 9 19:15:11 2017 (r318097) @@ -667,7 +667,7 @@ makelink(const char *from_name, const ch } if (dolink & LN_RELATIVE) { - char *cp, *d, *s; + char *to_name_copy, *cp, *d, *s; if (*from_name != '/') { /* this is already a relative link */ @@ -685,7 +685,10 @@ makelink(const char *from_name, const ch * The last component of to_name may be a symlink, * so use realpath to resolve only the directory. */ - cp = dirname(to_name); + to_name_copy = strdup(to_name); + if (to_name_copy == NULL) + err(EX_OSERR, "%s: strdup", to_name); + cp = dirname(to_name_copy); if (realpath(cp, dst) == NULL) err(EX_OSERR, "%s: realpath", cp); /* .. and add the last component. */ @@ -693,9 +696,11 @@ makelink(const char *from_name, const ch if (strlcat(dst, "/", sizeof(dst)) > sizeof(dst)) errx(1, "resolved pathname too long"); } - cp = basename(to_name); + strcpy(to_name_copy, to_name); + cp = basename(to_name_copy); if (strlcat(dst, cp, sizeof(dst)) > sizeof(dst)) errx(1, "resolved pathname too long"); + free(to_name_copy); /* Trim common path components. */ for (s = src, d = dst; *s == *d; s++, d++) From owner-svn-src-stable@freebsd.org Tue May 9 19:42:37 2017 Return-Path: Delivered-To: svn-src-stable@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 CF498D641A1; Tue, 9 May 2017 19:42:37 +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 A0773D48; Tue, 9 May 2017 19:42:37 +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 v49JgaLu017308; Tue, 9 May 2017 19:42:36 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49JgaVp017306; Tue, 9 May 2017 19:42:36 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201705091942.v49JgaVp017306@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 9 May 2017 19:42:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318101 - in stable/11: lib/libbsnmp/libbsnmp tools/build/mk X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 19:42:37 -0000 Author: bdrewery Date: Tue May 9 19:42:36 2017 New Revision: 318101 URL: https://svnweb.freebsd.org/changeset/base/318101 Log: MFC r317415: Remove an incorrect MLINK for tree(3) introduced in r310728. Modified: stable/11/lib/libbsnmp/libbsnmp/Makefile stable/11/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libbsnmp/libbsnmp/Makefile ============================================================================== --- stable/11/lib/libbsnmp/libbsnmp/Makefile Tue May 9 19:23:14 2017 (r318100) +++ stable/11/lib/libbsnmp/libbsnmp/Makefile Tue May 9 19:42:36 2017 (r318101) @@ -72,7 +72,6 @@ MLINKS+= bsnmpagent.3 snmp_make_errresp. MLINKS+= bsnmpagent.3 snmp_op_t.3 MLINKS+= bsnmpagent.3 snmp_set.3 MLINKS+= bsnmpagent.3 snmp_trace.3 -MLINKS+= bsnmpagent.3 tree.3 MLINKS+= bsnmpagent.3 tree_size.3 MLINKS+= bsnmpclient.3 snmp_add_binding.3 Modified: stable/11/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/11/tools/build/mk/OptionalObsoleteFiles.inc Tue May 9 19:23:14 2017 (r318100) +++ stable/11/tools/build/mk/OptionalObsoleteFiles.inc Tue May 9 19:42:36 2017 (r318101) @@ -875,7 +875,6 @@ OLD_FILES+=usr/share/man/man3/snmp_trace OLD_FILES+=usr/share/man/man3/snmp_value_copy.3.gz OLD_FILES+=usr/share/man/man3/snmp_value_free.3.gz OLD_FILES+=usr/share/man/man3/snmp_value_parse.3.gz -OLD_FILES+=usr/share/man/man3/tree.3.gz OLD_FILES+=usr/share/man/man3/tree_size.3.gz # usr.sbin/bsnmpd/bsnmpd OLD_FILES+=usr/share/man/man3/FIND_OBJECT_INT.3.gz From owner-svn-src-stable@freebsd.org Tue May 9 19:54:35 2017 Return-Path: Delivered-To: svn-src-stable@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 3E6D2D64844; Tue, 9 May 2017 19:54:35 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 D3D316B1; Tue, 9 May 2017 19:54:34 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49JsYCd021739; Tue, 9 May 2017 19:54:34 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49JsXIG021732; Tue, 9 May 2017 19:54:33 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201705091954.v49JsXIG021732@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Tue, 9 May 2017 19:54:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318102 - in stable/11/contrib/dtc: . Documentation libfdt scripts X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 19:54:35 -0000 Author: gonzo Date: Tue May 9 19:54:33 2017 New Revision: 318102 URL: https://svnweb.freebsd.org/changeset/base/318102 Log: MFC r315009: Merge from vendor branch importing dtc 1.4.3 Major new feature in this import is FDT overlay support Added: stable/11/contrib/dtc/Documentation/dt-object-internal.txt - copied unchanged from r315009, head/contrib/dtc/Documentation/dt-object-internal.txt stable/11/contrib/dtc/README - copied unchanged from r315009, head/contrib/dtc/README stable/11/contrib/dtc/libfdt/fdt_addresses.c - copied unchanged from r315009, head/contrib/dtc/libfdt/fdt_addresses.c stable/11/contrib/dtc/libfdt/fdt_overlay.c - copied unchanged from r315009, head/contrib/dtc/libfdt/fdt_overlay.c stable/11/contrib/dtc/scripts/kup-dtc - copied unchanged from r315009, head/contrib/dtc/scripts/kup-dtc Modified: stable/11/contrib/dtc/Documentation/manual.txt stable/11/contrib/dtc/Makefile stable/11/contrib/dtc/checks.c stable/11/contrib/dtc/data.c stable/11/contrib/dtc/dtc-lexer.l stable/11/contrib/dtc/dtc-parser.y stable/11/contrib/dtc/dtc.c stable/11/contrib/dtc/dtc.h stable/11/contrib/dtc/fdtdump.c stable/11/contrib/dtc/fdtget.c stable/11/contrib/dtc/fdtput.c stable/11/contrib/dtc/flattree.c stable/11/contrib/dtc/fstree.c stable/11/contrib/dtc/libfdt/Makefile.libfdt stable/11/contrib/dtc/libfdt/fdt.c stable/11/contrib/dtc/libfdt/fdt_ro.c stable/11/contrib/dtc/libfdt/fdt_rw.c stable/11/contrib/dtc/libfdt/fdt_strerror.c stable/11/contrib/dtc/libfdt/fdt_wip.c stable/11/contrib/dtc/libfdt/libfdt.h stable/11/contrib/dtc/libfdt/libfdt_env.h stable/11/contrib/dtc/libfdt/libfdt_internal.h stable/11/contrib/dtc/libfdt/version.lds stable/11/contrib/dtc/livetree.c stable/11/contrib/dtc/srcpos.c stable/11/contrib/dtc/srcpos.h stable/11/contrib/dtc/treesource.c stable/11/contrib/dtc/util.c stable/11/contrib/dtc/util.h Directory Properties: stable/11/ (props changed) Copied: stable/11/contrib/dtc/Documentation/dt-object-internal.txt (from r315009, head/contrib/dtc/Documentation/dt-object-internal.txt) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/contrib/dtc/Documentation/dt-object-internal.txt Tue May 9 19:54:33 2017 (r318102, copy of r315009, head/contrib/dtc/Documentation/dt-object-internal.txt) @@ -0,0 +1,310 @@ +Device Tree Dynamic Object format internals +------------------------------------------- + +The Device Tree for most platforms is a static representation of +the hardware capabilities. This is insufficient for platforms +that need to dynamically insert Device Tree fragments into the +live tree. + +This document explains the the Device Tree object format and +modifications made to the Device Tree compiler, which make it possible. + +1. Simplified Problem Definition +-------------------------------- + +Assume we have a platform which boots using following simplified Device Tree. + +---- foo.dts ----------------------------------------------------------------- + /* FOO platform */ + / { + compatible = "corp,foo"; + + /* shared resources */ + res: res { + }; + + /* On chip peripherals */ + ocp: ocp { + /* peripherals that are always instantiated */ + peripheral1 { ... }; + }; + }; +---- foo.dts ----------------------------------------------------------------- + +We have a number of peripherals that after probing (using some undefined method) +should result in different Device Tree configuration. + +We cannot boot with this static tree because due to the configuration of the +foo platform there exist multiple conficting peripherals DT fragments. + +So for the bar peripheral we would have this: + +---- foo+bar.dts ------------------------------------------------------------- + /* FOO platform + bar peripheral */ + / { + compatible = "corp,foo"; + + /* shared resources */ + res: res { + }; + + /* On chip peripherals */ + ocp: ocp { + /* peripherals that are always instantiated */ + peripheral1 { ... }; + + /* bar peripheral */ + bar { + compatible = "corp,bar"; + ... /* various properties and child nodes */ + }; + }; + }; +---- foo+bar.dts ------------------------------------------------------------- + +While for the baz peripheral we would have this: + +---- foo+baz.dts ------------------------------------------------------------- + /* FOO platform + baz peripheral */ + / { + compatible = "corp,foo"; + + /* shared resources */ + res: res { + /* baz resources */ + baz_res: res_baz { ... }; + }; + + /* On chip peripherals */ + ocp: ocp { + /* peripherals that are always instantiated */ + peripheral1 { ... }; + + /* baz peripheral */ + baz { + compatible = "corp,baz"; + /* reference to another point in the tree */ + ref-to-res = <&baz_res>; + ... /* various properties and child nodes */ + }; + }; + }; +---- foo+baz.dts ------------------------------------------------------------- + +We note that the baz case is more complicated, since the baz peripheral needs to +reference another node in the DT tree. + +2. Device Tree Object Format Requirements +----------------------------------------- + +Since the Device Tree is used for booting a number of very different hardware +platforms it is imperative that we tread very carefully. + +2.a) No changes to the Device Tree binary format for the base tree. We cannot +modify the tree format at all and all the information we require should be +encoded using Device Tree itself. We can add nodes that can be safely ignored +by both bootloaders and the kernel. The plugin dtbs are optionally tagged +with a different magic number in the header but otherwise they're simple +blobs. + +2.b) Changes to the DTS source format should be absolutely minimal, and should +only be needed for the DT fragment definitions, and not the base boot DT. + +2.c) An explicit option should be used to instruct DTC to generate the required +information needed for object resolution. Platforms that don't use the +dynamic object format can safely ignore it. + +2.d) Finally, DT syntax changes should be kept to a minimum. It should be +possible to express everything using the existing DT syntax. + +3. Implementation +----------------- + +The basic unit of addressing in Device Tree is the phandle. Turns out it's +relatively simple to extend the way phandles are generated and referenced +so that it's possible to dynamically convert symbolic references (labels) +to phandle values. This is a valid assumption as long as the author uses +reference syntax and does not assign phandle values manually (which might +be a problem with decompiled source files). + +We can roughly divide the operation into two steps. + +3.a) Compilation of the base board DTS file using the '-@' option +generates a valid DT blob with an added __symbols__ node at the root node, +containing a list of all nodes that are marked with a label. + +Using the foo.dts file above the following node will be generated; + +$ dtc -@ -O dtb -o foo.dtb -b 0 foo.dts +$ fdtdump foo.dtb +... +/ { + ... + res { + ... + phandle = <0x00000001>; + ... + }; + ocp { + ... + phandle = <0x00000002>; + ... + }; + __symbols__ { + res="/res"; + ocp="/ocp"; + }; +}; + +Notice that all the nodes that had a label have been recorded, and that +phandles have been generated for them. + +This blob can be used to boot the board normally, the __symbols__ node will +be safely ignored both by the bootloader and the kernel (the only loss will +be a few bytes of memory and disk space). + +We generate a __symbols__ node to record nodes that had labels in the base +tree (or subsequent loaded overlays) so that they can be matched up with +references made to them in Device Tree objects. + +3.b) The Device Tree fragments must be compiled with the same option but they +must also have a tag (/plugin/) that allows undefined references to nodes +that are not present at compilation time to be recorded so that the runtime +loader can fix them. + +So the bar peripheral's DTS format would be of the form: + +/dts-v1/; +/plugin/; /* allow undefined references and record them */ +/ { + .... /* various properties for loader use; i.e. part id etc. */ + fragment@0 { + target = <&ocp>; + __overlay__ { + /* bar peripheral */ + bar { + compatible = "corp,bar"; + ... /* various properties and child nodes */ + } + }; + }; +}; + +Note that there's a target property that specifies the location where the +contents of the overlay node will be placed, and it references the node +in the foo.dts file. + +$ dtc -@ -O dtb -o bar.dtbo -b 0 bar.dts +$ fdtdump bar.dtbo +... +/ { + ... /* properties */ + fragment@0 { + target = <0xffffffff>; + __overlay__ { + bar { + compatible = "corp,bar"; + ... /* various properties and child nodes */ + } + }; + }; + __fixups__ { + ocp = "/fragment@0:target:0"; + }; +}; + +No __symbols__ node has been generated (no label in bar.dts). +Note that the target's ocp label is undefined, so the phandle +value is filled with the illegal value '0xffffffff', while a __fixups__ +node has been generated, which marks the location in the tree where +the label lookup should store the runtime phandle value of the ocp node. + +The format of the __fixups__ node entry is + + + + The &man.qlxgbe.4; firmware has been + updated to version 5.4.64. From owner-svn-src-stable@freebsd.org Tue May 9 20:40:22 2017 Return-Path: Delivered-To: svn-src-stable@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 79625D6579B; Tue, 9 May 2017 20:40:22 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4927F34A; Tue, 9 May 2017 20:40:22 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49KeLsA041645; Tue, 9 May 2017 20:40:21 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49KeLFh041644; Tue, 9 May 2017 20:40:21 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705092040.v49KeLFh041644@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 9 May 2017 20:40:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318112 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 20:40:22 -0000 Author: gjb Date: Tue May 9 20:40:21 2017 New Revision: 318112 URL: https://svnweb.freebsd.org/changeset/base/318112 Log: Document r308104, chromebook_platform(4) addition. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 20:40:20 2017 (r318111) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 20:40:21 2017 (r318112) @@ -440,7 +440,9 @@ Device Drivers -   + The &man.chromebook.platform.4; driver + has been added, providing support for various Chromebook + models. From owner-svn-src-stable@freebsd.org Tue May 9 20:40:21 2017 Return-Path: Delivered-To: svn-src-stable@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 9C400D65794; Tue, 9 May 2017 20:40:21 +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 6DD49341; Tue, 9 May 2017 20:40:21 +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 v49KeKqO041602; Tue, 9 May 2017 20:40:20 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49KeK0R041601; Tue, 9 May 2017 20:40:20 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705092040.v49KeK0R041601@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 9 May 2017 20:40:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318111 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 20:40:21 -0000 Author: gjb Date: Tue May 9 20:40:20 2017 New Revision: 318111 URL: https://svnweb.freebsd.org/changeset/base/318111 Log: Document r317116, qlnxe(4) addition. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 20:40:19 2017 (r318110) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 20:40:20 2017 (r318111) @@ -457,6 +457,10 @@ providing support for Broadcom® NetXtreme-C™ and NetXtreme-E™ devices. + The &man.qlnxe.4; driver has been added, + providing support for Cavium® Qlogic™ 45000 Series + adapters. + The &man.qlxgbe.4; firmware has been updated to version 5.4.64. From owner-svn-src-stable@freebsd.org Tue May 9 20:40:24 2017 Return-Path: Delivered-To: svn-src-stable@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 3747CD657C6; Tue, 9 May 2017 20:40:24 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 02184365; Tue, 9 May 2017 20:40:23 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49KeMML041731; Tue, 9 May 2017 20:40:22 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49KeM4c041730; Tue, 9 May 2017 20:40:22 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705092040.v49KeM4c041730@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 9 May 2017 20:40:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318114 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 20:40:24 -0000 Author: gjb Date: Tue May 9 20:40:22 2017 New Revision: 318114 URL: https://svnweb.freebsd.org/changeset/base/318114 Log: Document r308942, bytgpio(4) addition. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 20:40:21 2017 (r318113) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 20:40:22 2017 (r318114) @@ -440,6 +440,10 @@ Device Drivers + The &man.bytgpio.4; driver has been + added, providing support for Intel® Bay Trail™ + SoC GPIO controllers. + The &man.jedec.ts.4; driver has been added, providing support for thermal sensors on memory modules. The driver currently supports chips that are fully From owner-svn-src-stable@freebsd.org Tue May 9 20:40:23 2017 Return-Path: Delivered-To: svn-src-stable@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 41318D657B8; Tue, 9 May 2017 20:40:23 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 12CA9351; Tue, 9 May 2017 20:40:23 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49KeMrc041688; Tue, 9 May 2017 20:40:22 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49KeMVv041687; Tue, 9 May 2017 20:40:22 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705092040.v49KeMVv041687@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 9 May 2017 20:40:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318113 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 20:40:23 -0000 Author: gjb Date: Tue May 9 20:40:21 2017 New Revision: 318113 URL: https://svnweb.freebsd.org/changeset/base/318113 Log: Document r307768, jedec_ts(4) addition. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 20:40:21 2017 (r318112) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 20:40:21 2017 (r318113) @@ -440,6 +440,12 @@ Device Drivers + The &man.jedec.ts.4; driver has been + added, providing support for thermal sensors on memory + modules. The driver currently supports chips that are fully + compliant with the JEDEC + JC 42.4 specification. + The &man.chromebook.platform.4; driver has been added, providing support for various Chromebook models. From owner-svn-src-stable@freebsd.org Tue May 9 20:43:59 2017 Return-Path: Delivered-To: svn-src-stable@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 3BB38D65B98; Tue, 9 May 2017 20:43:59 +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 15EE9FCC; Tue, 9 May 2017 20:43:59 +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 v49KhwJf045418; Tue, 9 May 2017 20:43:58 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49Khvcb045414; Tue, 9 May 2017 20:43:57 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201705092043.v49Khvcb045414@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 9 May 2017 20:43:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318115 - in stable/11: sbin/zfsbootcfg targets/pseudo/clang targets/pseudo/userland targets/pseudo/userland/misc usr.bin/getaddrinfo X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 20:43:59 -0000 Author: bdrewery Date: Tue May 9 20:43:57 2017 New Revision: 318115 URL: https://svnweb.freebsd.org/changeset/base/318115 Log: DIRDEPS_BUILD: Connect new directories. This is a direct commit since MFCing these changes is impractical. Sponsored by: Dell EMC Isilon Added: stable/11/sbin/zfsbootcfg/Makefile.depend (contents, props changed) stable/11/usr.bin/getaddrinfo/Makefile.depend (contents, props changed) Modified: stable/11/targets/pseudo/clang/Makefile.depend stable/11/targets/pseudo/userland/Makefile.depend stable/11/targets/pseudo/userland/misc/Makefile.depend Added: stable/11/sbin/zfsbootcfg/Makefile.depend ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/sbin/zfsbootcfg/Makefile.depend Tue May 9 20:43:57 2017 (r318115) @@ -0,0 +1,32 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + cddl/lib/libavl \ + cddl/lib/libnvpair \ + cddl/lib/libumem \ + cddl/lib/libuutil \ + cddl/lib/libzfs \ + cddl/lib/libzfs_core \ + gnu/lib/csu \ + gnu/lib/libgcc \ + include \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + lib/libexpat \ + lib/libgeom \ + lib/libmd \ + lib/libsbuf \ + lib/libthr \ + lib/libutil \ + lib/libz \ + lib/msun \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif Modified: stable/11/targets/pseudo/clang/Makefile.depend ============================================================================== --- stable/11/targets/pseudo/clang/Makefile.depend Tue May 9 20:40:22 2017 (r318114) +++ stable/11/targets/pseudo/clang/Makefile.depend Tue May 9 20:43:57 2017 (r318115) @@ -27,19 +27,23 @@ DIRDEPS+= \ usr.bin/clang/llvm-bcanalyzer \ usr.bin/clang/llvm-cov \ usr.bin/clang/llvm-cxxdump \ + usr.bin/clang/llvm-cxxfilt \ usr.bin/clang/llvm-diff \ usr.bin/clang/llvm-dis \ usr.bin/clang/llvm-dwarfdump \ usr.bin/clang/llvm-extract \ usr.bin/clang/llvm-link \ usr.bin/clang/llvm-lto \ + usr.bin/clang/llvm-lto2 \ usr.bin/clang/llvm-mc \ + usr.bin/clang/llvm-modextract \ usr.bin/clang/llvm-nm \ usr.bin/clang/llvm-objdump \ usr.bin/clang/llvm-pdbdump \ usr.bin/clang/llvm-profdata \ usr.bin/clang/llvm-rtdyld \ usr.bin/clang/llvm-symbolizer \ + usr.bin/clang/llvm-xray \ usr.bin/clang/opt \ .endif Modified: stable/11/targets/pseudo/userland/Makefile.depend ============================================================================== --- stable/11/targets/pseudo/userland/Makefile.depend Tue May 9 20:40:22 2017 (r318114) +++ stable/11/targets/pseudo/userland/Makefile.depend Tue May 9 20:43:57 2017 (r318115) @@ -234,6 +234,7 @@ DIRDEPS+= \ usr.bin/ftp \ usr.bin/gcore \ usr.bin/gencat \ + usr.bin/getaddrinfo \ usr.bin/getconf \ usr.bin/getent \ usr.bin/getopt \ @@ -833,6 +834,8 @@ DIRDEPS.amd64= \ usr.sbin/camdd \ usr.sbin/cpucontrol \ usr.sbin/hyperv/tools \ + usr.sbin/hyperv/tools/kvp \ + usr.sbin/hyperv/tools/vss \ usr.sbin/kgmon \ usr.sbin/lptcontrol \ usr.sbin/mptable \ @@ -859,6 +862,8 @@ DIRDEPS.i386= \ usr.sbin/btxld \ usr.sbin/cpucontrol \ usr.sbin/hyperv/tools \ + usr.sbin/hyperv/tools/kvp \ + usr.sbin/hyperv/tools/vss \ usr.sbin/kgmon \ usr.sbin/kgzip \ usr.sbin/lptcontrol \ Modified: stable/11/targets/pseudo/userland/misc/Makefile.depend ============================================================================== --- stable/11/targets/pseudo/userland/misc/Makefile.depend Tue May 9 20:40:22 2017 (r318114) +++ stable/11/targets/pseudo/userland/misc/Makefile.depend Tue May 9 20:43:57 2017 (r318115) @@ -58,6 +58,9 @@ DIRDEPS.x86sys+= \ sys/boot/i386/zfsboot \ sys/boot/i386/zfsloader \ +DIRDEPS+= \ + sbin/zfsbootcfg \ + .endif DIRDEPS.amd64= \ Added: stable/11/usr.bin/getaddrinfo/Makefile.depend ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/usr.bin/getaddrinfo/Makefile.depend Tue May 9 20:43:57 2017 (r318115) @@ -0,0 +1,20 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + gnu/lib/csu \ + gnu/lib/libgcc \ + include \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + lib/libnetbsd \ + lib/libutil \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif From owner-svn-src-stable@freebsd.org Tue May 9 20:47:17 2017 Return-Path: Delivered-To: svn-src-stable@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 9F070D65CAC; Tue, 9 May 2017 20:47:17 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 707491369; Tue, 9 May 2017 20:47:17 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49KlGRH045645; Tue, 9 May 2017 20:47:16 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49KlGOP045643; Tue, 9 May 2017 20:47:16 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705092047.v49KlGOP045643@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 9 May 2017 20:47:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318117 - in stable/11/release/doc: en_US.ISO8859-1/relnotes share/xml X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 20:47:17 -0000 Author: gjb Date: Tue May 9 20:47:16 2017 New Revision: 318117 URL: https://svnweb.freebsd.org/changeset/base/318117 Log: Document r310009, jail_confwarn rc.conf(5) addition. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml stable/11/release/doc/share/xml/sponsor.ent Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 20:45:21 2017 (r318116) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 20:47:16 2017 (r318117) @@ -306,7 +306,10 @@ <filename class="directory">/etc/rc.d</filename> Scripts -   + The jail_confwarn + &man.rc.conf.5; entry has been added, which suppresses warning + about obsolete per-&man.jail.8; configurations. Modified: stable/11/release/doc/share/xml/sponsor.ent ============================================================================== --- stable/11/release/doc/share/xml/sponsor.ent Tue May 9 20:45:21 2017 (r318116) +++ stable/11/release/doc/share/xml/sponsor.ent Tue May 9 20:47:16 2017 (r318117) @@ -27,6 +27,7 @@ + From owner-svn-src-stable@freebsd.org Tue May 9 21:25:51 2017 Return-Path: Delivered-To: svn-src-stable@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 F25B6D66690; Tue, 9 May 2017 21:25:50 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 B39E7C06; Tue, 9 May 2017 21:25:50 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49LPnOq062612; Tue, 9 May 2017 21:25:49 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49LPnuL062609; Tue, 9 May 2017 21:25:49 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201705092125.v49LPnuL062609@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Tue, 9 May 2017 21:25:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318118 - stable/11/sys/arm/freescale/imx X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 21:25:51 -0000 Author: gonzo Date: Tue May 9 21:25:49 2017 New Revision: 318118 URL: https://svnweb.freebsd.org/changeset/base/318118 Log: MFC r310343-r310344 r310343: [iMX6] Fix build for SSI driver and add dependency for SDMA driver - Pass correct pointer to OF_getencprop - Check the size of "dmas" property - Add dependency on sdma driver Reviewed by: br Differential Revision: https://reviews.freebsd.org/D8873 r310344: [iMX6] Fix SDMA driver build - Place const modifiers where required - Make sure sdma device is attahched before consumers like SSI Reviewed by: br Differential Revision: https://reviews.freebsd.org/D8874 Modified: stable/11/sys/arm/freescale/imx/imx6_sdma.c stable/11/sys/arm/freescale/imx/imx6_sdma.h stable/11/sys/arm/freescale/imx/imx6_ssi.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/arm/freescale/imx/imx6_sdma.c ============================================================================== --- stable/11/sys/arm/freescale/imx/imx6_sdma.c Tue May 9 20:47:16 2017 (r318117) +++ stable/11/sys/arm/freescale/imx/imx6_sdma.c Tue May 9 21:25:49 2017 (r318118) @@ -352,7 +352,7 @@ sdma_configure(int chn, struct sdma_conf static int load_firmware(struct sdma_softc *sc) { - struct sdma_firmware_header *header; + const struct sdma_firmware_header *header; const struct firmware *fp; fp = firmware_get("sdma_fw"); @@ -361,14 +361,14 @@ load_firmware(struct sdma_softc *sc) return (-1); } - header = (struct sdma_firmware_header *)fp->data; + header = fp->data; if (header->magic != FW_HEADER_MAGIC) { device_printf(sc->dev, "Can't use firmware.\n"); return (-1); } sc->fw_header = header; - sc->fw_scripts = (void *)((char *)header + + sc->fw_scripts = (const void *)((const char *)header + header->script_addrs_start); return (0); @@ -378,14 +378,14 @@ static int boot_firmware(struct sdma_softc *sc) { struct sdma_buffer_descriptor *bd0; - uint32_t *ram_code; + const uint32_t *ram_code; int timeout; int ret; int chn; int sz; int i; - ram_code = (void *)((char *)sc->fw_header + + ram_code = (const void *)((const char *)sc->fw_header + sc->fw_header->ram_code_start); /* Make sure SDMA has not started yet */ @@ -515,4 +515,5 @@ static driver_t sdma_driver = { static devclass_t sdma_devclass; -DRIVER_MODULE(sdma, simplebus, sdma_driver, sdma_devclass, 0, 0); +EARLY_DRIVER_MODULE(sdma, simplebus, sdma_driver, sdma_devclass, 0, 0, + BUS_PASS_RESOURCE); Modified: stable/11/sys/arm/freescale/imx/imx6_sdma.h ============================================================================== --- stable/11/sys/arm/freescale/imx/imx6_sdma.h Tue May 9 20:47:16 2017 (r318117) +++ stable/11/sys/arm/freescale/imx/imx6_sdma.h Tue May 9 21:25:49 2017 (r318118) @@ -221,8 +221,8 @@ struct sdma_softc { uint32_t num_bd; uint32_t ccb_phys; uint32_t context_phys; - struct sdma_firmware_header *fw_header; - struct sdma_script_start_addrs *fw_scripts; + const struct sdma_firmware_header *fw_header; + const struct sdma_script_start_addrs *fw_scripts; }; struct sdma_conf { Modified: stable/11/sys/arm/freescale/imx/imx6_ssi.c ============================================================================== --- stable/11/sys/arm/freescale/imx/imx6_ssi.c Tue May 9 20:47:16 2017 (r318117) +++ stable/11/sys/arm/freescale/imx/imx6_ssi.c Tue May 9 21:25:49 2017 (r318118) @@ -67,6 +67,7 @@ __FBSDID("$FreeBSD$"); bus_space_write_4(_sc->bst, _sc->bsh, _reg, _val) #define SSI_NCHANNELS 1 +#define DMAS_TOTAL 8 /* i.MX6 SSI registers */ @@ -188,8 +189,8 @@ struct sc_info { struct sdma_conf *conf; struct ssi_rate *sr; struct sdma_softc *sdma_sc; - int sdma_ev_rx; - int sdma_ev_tx; + uint32_t sdma_ev_rx; + uint32_t sdma_ev_tx; int sdma_channel; }; @@ -438,7 +439,7 @@ find_sdma_controller(struct sc_info *sc) struct sdma_softc *sdma_sc; phandle_t node, sdma_node; device_t sdma_dev; - int dts_value[8]; + pcell_t dts_value[DMAS_TOTAL]; int len; if ((node = ofw_bus_get_node(sc->dev)) == -1) @@ -447,7 +448,14 @@ find_sdma_controller(struct sc_info *sc) if ((len = OF_getproplen(node, "dmas")) <= 0) return (ENXIO); - OF_getencprop(node, "dmas", &dts_value, len); + if (len != sizeof(dts_value)) { + device_printf(sc->dev, + "\"dmas\" property length is invalid: %d (expected %d)", + len, sizeof(dts_value)); + return (ENXIO); + } + + OF_getencprop(node, "dmas", dts_value, sizeof(dts_value)); sc->sdma_ev_rx = dts_value[1]; sc->sdma_ev_tx = dts_value[5]; @@ -851,4 +859,5 @@ static driver_t ssi_pcm_driver = { DRIVER_MODULE(ssi, simplebus, ssi_pcm_driver, pcm_devclass, 0, 0); MODULE_DEPEND(ssi, sound, SOUND_MINVER, SOUND_PREFVER, SOUND_MAXVER); +MODULE_DEPEND(ssi, sdma, 0, 0, 0); MODULE_VERSION(ssi, 1); From owner-svn-src-stable@freebsd.org Tue May 9 23:13:27 2017 Return-Path: Delivered-To: svn-src-stable@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 E0DC7D660C8; Tue, 9 May 2017 23:13:27 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ADE881DC0; Tue, 9 May 2017 23:13:27 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49NDQam007749; Tue, 9 May 2017 23:13:26 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49NDQYi007748; Tue, 9 May 2017 23:13:26 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705092313.v49NDQYi007748@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 9 May 2017 23:13:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318119 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 23:13:28 -0000 Author: gjb Date: Tue May 9 23:13:26 2017 New Revision: 318119 URL: https://svnweb.freebsd.org/changeset/base/318119 Log: Fix svn revision ordering. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 21:25:49 2017 (r318118) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue May 9 23:13:26 2017 (r318119) @@ -443,10 +443,6 @@ Device Drivers - The &man.bytgpio.4; driver has been - added, providing support for Intel® Bay Trail™ - SoC GPIO controllers. - The &man.jedec.ts.4; driver has been added, providing support for thermal sensors on memory modules. The driver currently supports chips that are fully @@ -456,6 +452,10 @@ The &man.chromebook.platform.4; driver has been added, providing support for various Chromebook models. + + The &man.bytgpio.4; driver has been + added, providing support for Intel® Bay Trail™ + SoC GPIO controllers. From owner-svn-src-stable@freebsd.org Tue May 9 23:28:43 2017 Return-Path: Delivered-To: svn-src-stable@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 5D00AD665BD; Tue, 9 May 2017 23:28:43 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2E476792; Tue, 9 May 2017 23:28:43 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49NSgV0012034; Tue, 9 May 2017 23:28:42 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49NSgkO012033; Tue, 9 May 2017 23:28:42 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705092328.v49NSgkO012033@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 9 May 2017 23:28:42 +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: r318120 - in stable: 10/release/doc/share/xml 11/release/doc/share/xml 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@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 23:28:43 -0000 Author: gjb Date: Tue May 9 23:28:42 2017 New Revision: 318120 URL: https://svnweb.freebsd.org/changeset/base/318120 Log: Document SA-17:04. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/share/xml/security.xml Changes in other areas also in this revision: Modified: stable/11/release/doc/share/xml/security.xml Modified: stable/10/release/doc/share/xml/security.xml ============================================================================== --- stable/10/release/doc/share/xml/security.xml Tue May 9 23:13:26 2017 (r318119) +++ stable/10/release/doc/share/xml/security.xml Tue May 9 23:28:42 2017 (r318120) @@ -199,6 +199,13 @@ 12 April 2017 Multiple vulnerabilities + + + FreeBSD-SA-17:04.ipfilter + 27 April 2017 + Fix fragment handling panic + From owner-svn-src-stable@freebsd.org Tue May 9 23:28:43 2017 Return-Path: Delivered-To: svn-src-stable@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 A26E2D665C1; Tue, 9 May 2017 23:28:43 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 715C7793; Tue, 9 May 2017 23:28:43 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49NSgiZ012040; Tue, 9 May 2017 23:28:42 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49NSgqY012039; Tue, 9 May 2017 23:28:42 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705092328.v49NSgqY012039@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 9 May 2017 23:28:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318120 - in stable: 10/release/doc/share/xml 11/release/doc/share/xml X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 23:28:43 -0000 Author: gjb Date: Tue May 9 23:28:42 2017 New Revision: 318120 URL: https://svnweb.freebsd.org/changeset/base/318120 Log: Document SA-17:04. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/share/xml/security.xml Changes in other areas also in this revision: Modified: stable/10/release/doc/share/xml/security.xml Modified: stable/11/release/doc/share/xml/security.xml ============================================================================== --- stable/11/release/doc/share/xml/security.xml Tue May 9 23:13:26 2017 (r318119) +++ stable/11/release/doc/share/xml/security.xml Tue May 9 23:28:42 2017 (r318120) @@ -83,6 +83,13 @@ 12 April 2017 Multiple vulnerabilities + + + FreeBSD-SA-17:04.ipfilter + 27 April 2017 + Fix fragment handling panic + From owner-svn-src-stable@freebsd.org Tue May 9 23:31:11 2017 Return-Path: Delivered-To: svn-src-stable@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 5CF3CD666FF; Tue, 9 May 2017 23:31:11 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3798FB86; Tue, 9 May 2017 23:31:11 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49NVATg013101; Tue, 9 May 2017 23:31:10 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49NV9an013096; Tue, 9 May 2017 23:31:09 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201705092331.v49NV9an013096@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Tue, 9 May 2017 23:31:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318121 - in stable/11/lib: libgssapi libiconv_modules/ISO2022 libutil X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 23:31:11 -0000 Author: pfg Date: Tue May 9 23:31:09 2017 New Revision: 318121 URL: https://svnweb.freebsd.org/changeset/base/318121 Log: MFC r317265: lib: initial use of reallocarray(3). Make some use of reallocarray, attempting to limit it to cases where the parameters are unsigned and there is some theoretical chance of overflow. Modified: stable/11/lib/libgssapi/gss_buffer_set.c stable/11/lib/libiconv_modules/ISO2022/citrus_iso2022.c stable/11/lib/libutil/gr_util.c stable/11/lib/libutil/login_cap.c stable/11/lib/libutil/pw_util.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libgssapi/gss_buffer_set.c ============================================================================== --- stable/11/lib/libgssapi/gss_buffer_set.c Tue May 9 23:28:42 2017 (r318120) +++ stable/11/lib/libgssapi/gss_buffer_set.c Tue May 9 23:31:09 2017 (r318121) @@ -76,8 +76,8 @@ gss_add_buffer_set_member(OM_uint32 * mi } set = *buffer_set; - set->elements = realloc(set->elements, - (set->count + 1) * sizeof(set->elements[0])); + set->elements = reallocarray(set->elements, set->count + 1, + sizeof(set->elements[0])); if (set->elements == NULL) { *minor_status = ENOMEM; return (GSS_S_FAILURE); Modified: stable/11/lib/libiconv_modules/ISO2022/citrus_iso2022.c ============================================================================== --- stable/11/lib/libiconv_modules/ISO2022/citrus_iso2022.c Tue May 9 23:28:42 2017 (r318120) +++ stable/11/lib/libiconv_modules/ISO2022/citrus_iso2022.c Tue May 9 23:31:09 2017 (r318121) @@ -259,8 +259,8 @@ get_recommend(_ISO2022EncodingInfo * __r if (!ei->recommend[i]) ei->recommend[i] = malloc(sizeof(_ISO2022Charset)); else { - p = realloc(ei->recommend[i], - sizeof(_ISO2022Charset) * (ei->recommendsize[i] + 1)); + p = reallocarray(ei->recommend[i], ei->recommendsize[i] + 1, + sizeof(_ISO2022Charset)); if (!p) return (_PARSEFAIL); ei->recommend[i] = p; Modified: stable/11/lib/libutil/gr_util.c ============================================================================== --- stable/11/lib/libutil/gr_util.c Tue May 9 23:28:42 2017 (r318120) +++ stable/11/lib/libutil/gr_util.c Tue May 9 23:31:09 2017 (r318121) @@ -205,7 +205,7 @@ gr_copy(int ffd, int tfd, const struct g if (eof) break; while ((size_t)(q - p) >= size) { - if ((tmp = realloc(buf, size * 2)) == NULL) { + if ((tmp = reallocarray(buf, 2, size)) == NULL) { warnx("group line too long"); goto err; } Modified: stable/11/lib/libutil/login_cap.c ============================================================================== --- stable/11/lib/libutil/login_cap.c Tue May 9 23:28:42 2017 (r318120) +++ stable/11/lib/libutil/login_cap.c Tue May 9 23:31:09 2017 (r318121) @@ -86,7 +86,7 @@ allocarray(size_t sz) if (sz <= internal_arraysz) p = internal_array; - else if ((p = realloc(internal_array, sz * sizeof(char*))) != NULL) { + else if ((p = reallocarray(internal_array, sz, sizeof(char*))) != NULL) { internal_arraysz = sz; internal_array = p; } Modified: stable/11/lib/libutil/pw_util.c ============================================================================== --- stable/11/lib/libutil/pw_util.c Tue May 9 23:28:42 2017 (r318120) +++ stable/11/lib/libutil/pw_util.c Tue May 9 23:31:09 2017 (r318121) @@ -468,7 +468,7 @@ pw_copy(int ffd, int tfd, const struct p if (eof) break; while ((size_t)(q - p) >= size) { - if ((tmp = realloc(buf, size * 2)) == NULL) { + if ((tmp = reallocarray(buf, 2, size)) == NULL) { warnx("passwd line too long"); goto err; } From owner-svn-src-stable@freebsd.org Wed May 10 01:29:00 2017 Return-Path: Delivered-To: svn-src-stable@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 098B1D65951; Wed, 10 May 2017 01:29:00 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CEFD5D8E; Wed, 10 May 2017 01:28:59 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4A1SwHQ060507; Wed, 10 May 2017 01:28:58 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4A1SwDo060506; Wed, 10 May 2017 01:28:58 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201705100128.v4A1SwDo060506@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Wed, 10 May 2017 01:28:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318127 - stable/11/sys/fs/nfsclient X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 01:29:00 -0000 Author: rmacklem Date: Wed May 10 01:28:58 2017 New Revision: 318127 URL: https://svnweb.freebsd.org/changeset/base/318127 Log: MFC: r317465 Fix handling of a NFSv4.1 callback reply from the session cache. The nfsv4_seqsession() call returns NFSERR_REPLYFROMCACHE when it has a reply in the session, due to a requestor retry. The code erroneously assumed a return of 0 for this case. This patch fixes this and adds a KASSERT(). This would be an extremely rare occurrence. It was found during code inspection during the pNFS server development. Modified: stable/11/sys/fs/nfsclient/nfs_clstate.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/fs/nfsclient/nfs_clstate.c ============================================================================== --- stable/11/sys/fs/nfsclient/nfs_clstate.c Wed May 10 01:01:20 2017 (r318126) +++ stable/11/sys/fs/nfsclient/nfs_clstate.c Wed May 10 01:28:58 2017 (r318127) @@ -3560,9 +3560,18 @@ nfscl_docb(struct nfsrv_descript *nd, NF tsep->nfsess_backslots); } NFSUNLOCKCLSTATE(); - if (error == 0) { + if (error == 0 || error == NFSERR_REPLYFROMCACHE) { gotseq_ok = 1; if (rep != NULL) { + /* + * Handle a reply for a retried + * callback. The reply will be + * re-inserted in the session cache + * by the nfsv4_seqsess_cacherep() call + * after out: + */ + KASSERT(error == NFSERR_REPLYFROMCACHE, + ("cbsequence: non-NULL rep")); NFSCL_DEBUG(4, "Got cbretry\n"); m_freem(nd->nd_mreq); nd->nd_mreq = rep; From owner-svn-src-stable@freebsd.org Wed May 10 01:39:23 2017 Return-Path: Delivered-To: svn-src-stable@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 044B2D65D32; Wed, 10 May 2017 01:39:23 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C80AD129C; Wed, 10 May 2017 01:39:22 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4A1dL0E064432; Wed, 10 May 2017 01:39:21 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4A1dLYP064431; Wed, 10 May 2017 01:39:21 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201705100139.v4A1dLYP064431@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Wed, 10 May 2017 01:39:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318128 - stable/10/sys/fs/nfsclient 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@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 01:39:23 -0000 Author: rmacklem Date: Wed May 10 01:39:21 2017 New Revision: 318128 URL: https://svnweb.freebsd.org/changeset/base/318128 Log: MFC: r317465 Fix handling of a NFSv4.1 callback reply from the session cache. The nfsv4_seqsession() call returns NFSERR_REPLYFROMCACHE when it has a reply in the session, due to a requestor retry. The code erroneously assumed a return of 0 for this case. This patch fixes this and adds a KASSERT(). This would be an extremely rare occurrence. It was found during code inspection during the pNFS server development. Modified: stable/10/sys/fs/nfsclient/nfs_clstate.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/nfsclient/nfs_clstate.c ============================================================================== --- stable/10/sys/fs/nfsclient/nfs_clstate.c Wed May 10 01:28:58 2017 (r318127) +++ stable/10/sys/fs/nfsclient/nfs_clstate.c Wed May 10 01:39:21 2017 (r318128) @@ -3560,9 +3560,18 @@ nfscl_docb(struct nfsrv_descript *nd, NF tsep->nfsess_backslots); } NFSUNLOCKCLSTATE(); - if (error == 0) { + if (error == 0 || error == NFSERR_REPLYFROMCACHE) { gotseq_ok = 1; if (rep != NULL) { + /* + * Handle a reply for a retried + * callback. The reply will be + * re-inserted in the session cache + * by the nfsv4_seqsess_cacherep() call + * after out: + */ + KASSERT(error == NFSERR_REPLYFROMCACHE, + ("cbsequence: non-NULL rep")); NFSCL_DEBUG(4, "Got cbretry\n"); m_freem(nd->nd_mreq); nd->nd_mreq = rep; From owner-svn-src-stable@freebsd.org Wed May 10 04:48:29 2017 Return-Path: Delivered-To: svn-src-stable@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 B2A1ED64BD8; Wed, 10 May 2017 04:48:29 +0000 (UTC) (envelope-from badger@FreeBSD.org) Received: from sasl.smtp.pobox.com (pb-smtp2.pobox.com [64.147.108.71]) (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 8B065CA6; Wed, 10 May 2017 04:48:28 +0000 (UTC) (envelope-from badger@FreeBSD.org) Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 6F05C792F6; Wed, 10 May 2017 00:48:11 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=subject:to :references:cc:from:message-id:date:mime-version:in-reply-to :content-type:content-transfer-encoding; s=sasl; bh=v651Vwp/CI68 +TslRpupSTywUx0=; b=pVLKIHWiTAQIUxNNRTNTKRlBQXNp+vJrBrsenOBte30j nMYRAWdQb0K2TeUkDvoLv+qPlTiF2v9sSPZenX12SU6Yt0JJucYLcYe2RlkLNRxX E+aw6ikYcAEDV++P+/rCmxA9dUUphlxyvBBnbNrKyXglZMIfIeV4KmYu4IT2wX4= Received: from pb-smtp2.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 67346792F5; Wed, 10 May 2017 00:48:11 -0400 (EDT) Received: from [192.168.1.103] (unknown [24.7.205.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pb-smtp2.pobox.com (Postfix) with ESMTPSA id 9DC20771DC; Tue, 9 May 2017 22:14:25 -0400 (EDT) Subject: Re: svn commit: r317529 - in stable: 10/sys/sys 11/sys/sys To: Slawa Olhovchenkov References: <201704272228.v3RMSoIg000680@repo.freebsd.org> <20170509203244.GA3182@zxy.spb.ru> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org From: Eric Badger Message-ID: <6dc19869-1d5e-cd7d-9dca-64379c482f3f@FreeBSD.org> Date: Tue, 9 May 2017 21:14:20 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20170509203244.GA3182@zxy.spb.ru> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Pobox-Relay-ID: 6514F1AA-3526-11E7-9A36-61520C78B957-46178211!pb-smtp2.pobox.com X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 04:48:29 -0000 On 05/09/2017 03:32 PM, Slawa Olhovchenkov wrote: > On Thu, Apr 27, 2017 at 10:28:50PM +0000, Eric Badger wrote: > >> Author: badger >> Date: Thu Apr 27 22:28:49 2017 >> New Revision: 317529 >> URL: https://svnweb.freebsd.org/changeset/base/317529 >> >> Log: >> Move td_sigqueue to the end of struct thread >> >> In order to preserve KBI in stable branches, replace the existing >> td_sigqueue slot with padding and move the expanded (as of r315949) >> td_sigqueue to the end of the struct. >> >> Reported by: jhb >> Suggested by: kib >> Reviewed by: jhb, kib, vangyzen >> Sponsored by: Dell EMC >> Differential Revision: https://reviews.freebsd.org/D10515 >> >> Modified: >> stable/10/sys/sys/proc.h > > Is this resolve only crash related to nvidia-driver? > Like virtualbox related crash still occur. > Yes, this was intended to address nvidia driver crashes. Is the virtual box problem the same as the one described here? https://lists.freebsd.org/pipermail/freebsd-stable/2017-March/087028.html From owner-svn-src-stable@freebsd.org Wed May 10 05:01:07 2017 Return-Path: Delivered-To: svn-src-stable@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 567B7D64FB6; Wed, 10 May 2017 05:01:07 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 325B513C1; Wed, 10 May 2017 05:01:07 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4A516Jh046365; Wed, 10 May 2017 05:01:06 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4A516eA046363; Wed, 10 May 2017 05:01:06 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201705100501.v4A516eA046363@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Wed, 10 May 2017 05:01:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318131 - stable/11/sbin/ipfw X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 05:01:07 -0000 Author: ae Date: Wed May 10 05:01:05 2017 New Revision: 318131 URL: https://svnweb.freebsd.org/changeset/base/318131 Log: MFC r317682: Add `ipfw table all destroy` support. PR: 212669 Modified: stable/11/sbin/ipfw/ipfw.8 stable/11/sbin/ipfw/tables.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/ipfw/ipfw.8 ============================================================================== --- stable/11/sbin/ipfw/ipfw.8 Wed May 10 03:47:22 2017 (r318130) +++ stable/11/sbin/ipfw/ipfw.8 Wed May 10 05:01:05 2017 (r318131) @@ -50,7 +50,9 @@ in-kernel NAT. .Nm .Oo Cm set Ar N Oc Cm table Ar name Cm create Ar create-options .Nm -.Oo Cm set Ar N Oc Cm table Ar name Cm destroy +.Oo Cm set Ar N Oc Cm table +.Brq Ar name | all +.Cm destroy .Nm .Oo Cm set Ar N Oc Cm table Ar name Cm modify Ar modify-options .Nm Modified: stable/11/sbin/ipfw/tables.c ============================================================================== --- stable/11/sbin/ipfw/tables.c Wed May 10 03:47:22 2017 (r318130) +++ stable/11/sbin/ipfw/tables.c Wed May 10 05:01:05 2017 (r318131) @@ -54,6 +54,7 @@ static int table_swap(ipfw_obj_header *o static int table_get_info(ipfw_obj_header *oh, ipfw_xtable_info *i); static int table_show_info(ipfw_xtable_info *i, void *arg); +static int table_destroy_one(ipfw_xtable_info *i, void *arg); static int table_flush_one(ipfw_xtable_info *i, void *arg); static int table_show_one(ipfw_xtable_info *i, void *arg); static int table_do_get_list(ipfw_xtable_info *i, ipfw_obj_header **poh); @@ -132,7 +133,7 @@ lookup_host (char *host, struct in_addr * This one handles all table-related commands * ipfw table NAME create ... * ipfw table NAME modify ... - * ipfw table NAME destroy + * ipfw table {NAME | all} destroy * ipfw table NAME swap NAME * ipfw table NAME lock * ipfw table NAME unlock @@ -200,6 +201,7 @@ ipfw_table_handler(int ac, char *av[]) case TOK_INFO: case TOK_DETAIL: case TOK_FLUSH: + case TOK_DESTROY: break; default: if (is_all != 0) @@ -223,13 +225,21 @@ ipfw_table_handler(int ac, char *av[]) table_modify(&oh, ac, av); break; case TOK_DESTROY: - if (table_destroy(&oh) == 0) - break; - if (errno != ESRCH) - err(EX_OSERR, "failed to destroy table %s", tablename); - /* ESRCH isn't fatal, warn if not quiet mode */ - if (co.do_quiet == 0) - warn("failed to destroy table %s", tablename); + if (is_all == 0) { + if (table_destroy(&oh) == 0) + break; + if (errno != ESRCH) + err(EX_OSERR, "failed to destroy table %s", + tablename); + /* ESRCH isn't fatal, warn if not quiet mode */ + if (co.do_quiet == 0) + warn("failed to destroy table %s", tablename); + } else { + error = tables_foreach(table_destroy_one, &oh, 1); + if (error != 0) + err(EX_OSERR, + "failed to destroy tables list"); + } break; case TOK_FLUSH: if (is_all == 0) { @@ -567,6 +577,22 @@ table_destroy(ipfw_obj_header *oh) return (0); } +static int +table_destroy_one(ipfw_xtable_info *i, void *arg) +{ + ipfw_obj_header *oh; + + oh = (ipfw_obj_header *)arg; + table_fill_ntlv(&oh->ntlv, i->tablename, i->set, 1); + if (table_destroy(oh) != 0) { + if (co.do_quiet == 0) + warn("failed to destroy table(%s) in set %u", + i->tablename, i->set); + return (-1); + } + return (0); +} + /* * Flushes given table specified by @oh->ntlv. * Returns 0 on success. From owner-svn-src-stable@freebsd.org Wed May 10 05:02:39 2017 Return-Path: Delivered-To: svn-src-stable@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 B3939D66196; Wed, 10 May 2017 05:02:39 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 639721831; Wed, 10 May 2017 05:02:39 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4A52cte050175; Wed, 10 May 2017 05:02:38 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4A52cT9050174; Wed, 10 May 2017 05:02:38 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201705100502.v4A52cT9050174@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Wed, 10 May 2017 05:02:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318132 - stable/11/sbin/ipfw X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 05:02:39 -0000 Author: ae Date: Wed May 10 05:02:38 2017 New Revision: 318132 URL: https://svnweb.freebsd.org/changeset/base/318132 Log: MFC r317663: Properly initialize ipfw_range_tlv variable to fix possible EINVAL in case when ipfw delete/zero/resetlog command issued for several rules in the loop. Also reorder some variables by size. PR: 218993 Modified: stable/11/sbin/ipfw/ipfw2.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/ipfw/ipfw2.c ============================================================================== --- stable/11/sbin/ipfw/ipfw2.c Wed May 10 05:01:05 2017 (r318131) +++ stable/11/sbin/ipfw/ipfw2.c Wed May 10 05:02:38 2017 (r318132) @@ -3187,15 +3187,14 @@ fill_flags_cmd(ipfw_insn *cmd, enum ipfw void ipfw_delete(char *av[]) { + ipfw_range_tlv rt; + char *sep; int i, j; int exitval = EX_OK; int do_set = 0; - char *sep; - ipfw_range_tlv rt; av++; NEED1("missing rule specification"); - memset(&rt, 0, sizeof(rt)); if ( *av && _substrcmp(*av, "set") == 0) { /* Do not allow using the following syntax: * ipfw set N delete set M @@ -3222,6 +3221,7 @@ ipfw_delete(char *av[]) } else if (co.do_pipe) { exitval = ipfw_delete_pipe(co.do_pipe, i); } else { + memset(&rt, 0, sizeof(rt)); if (do_set != 0) { rt.set = i & 31; rt.flags = IPFW_RCFLAG_SET; @@ -5157,18 +5157,17 @@ void ipfw_zero(int ac, char *av[], int optname) { ipfw_range_tlv rt; - uint32_t arg; - int failed = EX_OK; char const *errstr; char const *name = optname ? "RESETLOG" : "ZERO"; + uint32_t arg; + int failed = EX_OK; optname = optname ? IP_FW_XRESETLOG : IP_FW_XZERO; - memset(&rt, 0, sizeof(rt)); - av++; ac--; if (ac == 0) { /* clear all entries */ + memset(&rt, 0, sizeof(rt)); rt.flags = IPFW_RCFLAG_ALL; if (do_range_cmd(optname, &rt) < 0) err(EX_UNAVAILABLE, "setsockopt(IP_FW_X%s)", name); @@ -5186,6 +5185,7 @@ ipfw_zero(int ac, char *av[], int optnam if (errstr) errx(EX_DATAERR, "invalid rule number %s\n", *av); + memset(&rt, 0, sizeof(rt)); rt.start_rule = arg; rt.end_rule = arg; rt.flags |= IPFW_RCFLAG_RANGE; From owner-svn-src-stable@freebsd.org Wed May 10 05:04:18 2017 Return-Path: Delivered-To: svn-src-stable@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 3A9EAD66247; Wed, 10 May 2017 05:04:18 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0953119E3; Wed, 10 May 2017 05:04:17 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4A54HWQ050306; Wed, 10 May 2017 05:04:17 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4A54HVv050305; Wed, 10 May 2017 05:04:17 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201705100504.v4A54HVv050305@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Wed, 10 May 2017 05:04:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318133 - stable/11/sbin/ipfw X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 05:04:18 -0000 Author: ae Date: Wed May 10 05:04:16 2017 New Revision: 318133 URL: https://svnweb.freebsd.org/changeset/base/318133 Log: MFC r317667: In parse_range() validate both range values instead of checking the top value twice. PR: 202295 Modified: stable/11/sbin/ipfw/dummynet.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/ipfw/dummynet.c ============================================================================== --- stable/11/sbin/ipfw/dummynet.c Wed May 10 05:02:38 2017 (r318132) +++ stable/11/sbin/ipfw/dummynet.c Wed May 10 05:04:16 2017 (r318133) @@ -1881,7 +1881,7 @@ parse_range(int ac, char *av[], uint32_t av--; } if (v[1] < v[0] || - v[1] >= DN_MAX_ID-1 || + v[0] >= DN_MAX_ID-1 || v[1] >= DN_MAX_ID-1) { continue; /* invalid entry */ } From owner-svn-src-stable@freebsd.org Wed May 10 05:05:22 2017 Return-Path: Delivered-To: svn-src-stable@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 A7844D66313; Wed, 10 May 2017 05:05:22 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 77F421BAF; Wed, 10 May 2017 05:05:22 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4A55LlK050417; Wed, 10 May 2017 05:05:21 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4A55LU0050416; Wed, 10 May 2017 05:05:21 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201705100505.v4A55LU0050416@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Wed, 10 May 2017 05:05:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318134 - stable/11/sbin/ipfw X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 05:05:22 -0000 Author: ae Date: Wed May 10 05:05:21 2017 New Revision: 318134 URL: https://svnweb.freebsd.org/changeset/base/318134 Log: MFC r317666: Add sets support for ipfw table info/list/flush commands. PR: 212668 Modified: stable/11/sbin/ipfw/tables.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/ipfw/tables.c ============================================================================== --- stable/11/sbin/ipfw/tables.c Wed May 10 05:04:16 2017 (r318133) +++ stable/11/sbin/ipfw/tables.c Wed May 10 05:05:21 2017 (r318134) @@ -1654,18 +1654,19 @@ tables_foreach(table_cb_t *f, void *arg, } if (sort != 0) - qsort(olh + 1, olh->count, olh->objsize, tablename_cmp); + qsort(olh + 1, olh->count, olh->objsize, + tablename_cmp); info = (ipfw_xtable_info *)(olh + 1); for (i = 0; i < olh->count; i++) { - error = f(info, arg); /* Ignore errors for now */ - info = (ipfw_xtable_info *)((caddr_t)info + olh->objsize); + if (co.use_set == 0 || info->set == co.use_set - 1) + error = f(info, arg); + info = (ipfw_xtable_info *)((caddr_t)info + + olh->objsize); } - free(olh); break; } - return (0); } From owner-svn-src-stable@freebsd.org Wed May 10 08:36:40 2017 Return-Path: Delivered-To: svn-src-stable@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 79759D66B9C; Wed, 10 May 2017 08:36:40 +0000 (UTC) (envelope-from dimitry@andric.com) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3F4DA364; Wed, 10 May 2017 08:36:39 +0000 (UTC) (envelope-from dimitry@andric.com) Received: from [192.168.3.3] (unknown [77.95.97.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id EAD6E240C8; Wed, 10 May 2017 10:36:30 +0200 (CEST) From: Dimitry Andric Message-Id: <53D13D6B-05AE-42C3-9793-12B3CE090B2E@andric.com> Content-Type: multipart/signed; boundary="Apple-Mail=_BB9F355F-B877-4AB9-B82C-16F599158850"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: svn commit: r317529 - in stable: 10/sys/sys 11/sys/sys Date: Wed, 10 May 2017 10:36:25 +0200 In-Reply-To: <6dc19869-1d5e-cd7d-9dca-64379c482f3f@FreeBSD.org> Cc: Slawa Olhovchenkov , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org To: Eric Badger References: <201704272228.v3RMSoIg000680@repo.freebsd.org> <20170509203244.GA3182@zxy.spb.ru> <6dc19869-1d5e-cd7d-9dca-64379c482f3f@FreeBSD.org> X-Mailer: Apple Mail (2.3273) X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 08:36:40 -0000 --Apple-Mail=_BB9F355F-B877-4AB9-B82C-16F599158850 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 10 May 2017, at 04:14, Eric Badger wrote: >=20 > On 05/09/2017 03:32 PM, Slawa Olhovchenkov wrote: >> On Thu, Apr 27, 2017 at 10:28:50PM +0000, Eric Badger wrote: >>=20 >>> Author: badger >>> Date: Thu Apr 27 22:28:49 2017 >>> New Revision: 317529 >>> URL: https://svnweb.freebsd.org/changeset/base/317529 >>>=20 >>> Log: >>> Move td_sigqueue to the end of struct thread >>>=20 >>> In order to preserve KBI in stable branches, replace the existing >>> td_sigqueue slot with padding and move the expanded (as of r315949) >>> td_sigqueue to the end of the struct. >>>=20 >>> Reported by: jhb >>> Suggested by: kib >>> Reviewed by: jhb, kib, vangyzen >>> Sponsored by: Dell EMC >>> Differential Revision: https://reviews.freebsd.org/D10515 >>>=20 >>> Modified: >>> stable/10/sys/sys/proc.h >>=20 >> Is this resolve only crash related to nvidia-driver? >> Like virtualbox related crash still occur. >>=20 >=20 > Yes, this was intended to address nvidia driver crashes. Is the = virtual box problem the same as the one described here? >=20 > = https://lists.freebsd.org/pipermail/freebsd-stable/2017-March/087028.html Since the code that crashed was accessing curthread->td_critnest, I = think it is very likely. -Dimitry --Apple-Mail=_BB9F355F-B877-4AB9-B82C-16F599158850 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.30 iEYEARECAAYFAlkS0Q0ACgkQsF6jCi4glqMBhQCg1hFzj0j0etiuCSFGIEVPoqD/ /pYAn0NdcyYeKreFBBPYKzySst704/u1 =DRHF -----END PGP SIGNATURE----- --Apple-Mail=_BB9F355F-B877-4AB9-B82C-16F599158850-- From owner-svn-src-stable@freebsd.org Wed May 10 12:57:25 2017 Return-Path: Delivered-To: svn-src-stable@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 5E89CD66382; Wed, 10 May 2017 12:57:25 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (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 200A42C3; Wed, 10 May 2017 12:57:25 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1d8RBB-0009l3-3q; Wed, 10 May 2017 15:57:21 +0300 Date: Wed, 10 May 2017 15:57:21 +0300 From: Slawa Olhovchenkov To: Eric Badger Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: Re: svn commit: r317529 - in stable: 10/sys/sys 11/sys/sys Message-ID: <20170510125721.GE3165@zxy.spb.ru> References: <201704272228.v3RMSoIg000680@repo.freebsd.org> <20170509203244.GA3182@zxy.spb.ru> <6dc19869-1d5e-cd7d-9dca-64379c482f3f@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6dc19869-1d5e-cd7d-9dca-64379c482f3f@FreeBSD.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 12:57:25 -0000 On Tue, May 09, 2017 at 09:14:20PM -0500, Eric Badger wrote: > On 05/09/2017 03:32 PM, Slawa Olhovchenkov wrote: > > On Thu, Apr 27, 2017 at 10:28:50PM +0000, Eric Badger wrote: > > > >> Author: badger > >> Date: Thu Apr 27 22:28:49 2017 > >> New Revision: 317529 > >> URL: https://svnweb.freebsd.org/changeset/base/317529 > >> > >> Log: > >> Move td_sigqueue to the end of struct thread > >> > >> In order to preserve KBI in stable branches, replace the existing > >> td_sigqueue slot with padding and move the expanded (as of r315949) > >> td_sigqueue to the end of the struct. > >> > >> Reported by: jhb > >> Suggested by: kib > >> Reviewed by: jhb, kib, vangyzen > >> Sponsored by: Dell EMC > >> Differential Revision: https://reviews.freebsd.org/D10515 > >> > >> Modified: > >> stable/10/sys/sys/proc.h > > > > Is this resolve only crash related to nvidia-driver? > > Like virtualbox related crash still occur. > > > > Yes, this was intended to address nvidia driver crashes. Is the virtual > box problem the same as the one described here? > > https://lists.freebsd.org/pipermail/freebsd-stable/2017-March/087028.html I am use GENERIC and GENERIC kernel just reboot, w/o create crush dump. I mean need to add DDB and KDB to kernel config? From owner-svn-src-stable@freebsd.org Wed May 10 15:20:39 2017 Return-Path: Delivered-To: svn-src-stable@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 9F25FD66F77; Wed, 10 May 2017 15:20:39 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7A450169E; Wed, 10 May 2017 15:20:39 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4AFKcQL001625; Wed, 10 May 2017 15:20:38 GMT (envelope-from ken@FreeBSD.org) Received: (from ken@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4AFKc5r001623; Wed, 10 May 2017 15:20:38 GMT (envelope-from ken@FreeBSD.org) Message-Id: <201705101520.v4AFKc5r001623@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ken set sender to ken@FreeBSD.org using -f From: "Kenneth D. Merry" Date: Wed, 10 May 2017 15:20:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318139 - in stable/11: share/man/man4 sys/cam/scsi X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 15:20:39 -0000 Author: ken Date: Wed May 10 15:20:38 2017 New Revision: 318139 URL: https://svnweb.freebsd.org/changeset/base/318139 Log: MFC r317775: Fix error recovery behavior in the pass(4) driver. After FreeBSD SVN revision 236814, the pass(4) driver changed from only doing error recovery when the CAM_PASS_ERR_RECOVER flag was set on a CCB to sometimes doing error recovery if the passed in retry count was non-zero. Error recovery would happen if two conditions were met: 1. The error recovery action was simply a retry. (Which is most cases.) 2. The retry_count is non-zero. (Which happened a lot because of cut-and-pasted code.) This explains a bug I noticed in with camcontrol: # camcontrol tur da34 -v Unit is ready # camcontrol reset da34 Reset of 1:172:0 was successful At this point, there should be a Unit Attention: # camcontrol tur da34 -v Unit is ready No Unit Attention. Try it again: # camcontrol reset da34 Reset of 1:172:0 was successful Now set the retry_count to 0 for the TUR: # camcontrol tur da34 -v -C 0 Unit is not ready (pass42:mps1:0:172:0): TEST UNIT READY. CDB: 00 00 00 00 00 00 (pass42:mps1:0:172:0): CAM status: SCSI Status Error (pass42:mps1:0:172:0): SCSI status: Check Condition (pass42:mps1:0:172:0): SCSI sense: UNIT ATTENTION asc:29,2 (SCSI bus reset occurred) (pass42:mps1:0:172:0): Field Replaceable Unit: 2 There is the unit attention. camcontrol(8) has a default retry_count of 1, in case someone sets the -E flag without setting -C. The CAM_PASS_ERR_RECOVER behavior was only broken with the CAMIOCOMMAND ioctl, which is the synchronous pass(4) API. It has worked as intended (error recovery is only done when the flag is set) in the asynchronous API (CAMIOQUEUE ioctl). sys/cam/scsi/scsi_pass.c: In passsendccb(), when calling cam_periph_runccb(), only specify the error routine when CAM_PASS_ERR_RECOVER is set. share/man/man4/pass.4: Document that CAM_PASS_ERR_RECOVER is needed to enable error recovery. Reported by: Terry Kennedy PR: kern/218572 Sponsored by: Spectra Logic Modified: stable/11/share/man/man4/pass.4 stable/11/sys/cam/scsi/scsi_pass.c Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man4/pass.4 ============================================================================== --- stable/11/share/man/man4/pass.4 Wed May 10 14:54:32 2017 (r318138) +++ stable/11/share/man/man4/pass.4 Wed May 10 15:20:38 2017 (r318139) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 17, 2015 +.Dd May 3, 2017 .Dt PASS 4 .Os .Sh NAME @@ -85,6 +85,11 @@ Some examples of xpt-only CCBs are XPT_S XPT_DEV_MATCH, XPT_RESET_BUS, XPT_SCAN_LUN, XPT_ENG_INQ, and XPT_ENG_EXEC. These CCB types have various attributes that make it illogical or impossible to service them through the passthrough interface. +.Pp +If the user would like the kernel to do error recovery, the +.Dv CAM_PASS_ERR_RECOVER +flag must be set on the CCB, and the retry_count field set to the number +of retries. .It CAMGETPASSTHRU union ccb * This ioctl takes an XPT_GDEVLIST CCB, and returns the passthrough device corresponding to the device in question. @@ -160,6 +165,11 @@ available for userland use with the and .Dv CAMIOGET ioctls and will be preserved across calls. +.Pp +If the user would like the kernel to do error recovery, the +.Dv CAM_PASS_ERR_RECOVER +flag must be set on the CCB, and the retry_count field set to the number +of retries. .It CAMIOGET union ccb * Retrieve completed CAM CCBs queued via the .Dv CAMIOQUEUE Modified: stable/11/sys/cam/scsi/scsi_pass.c ============================================================================== --- stable/11/sys/cam/scsi/scsi_pass.c Wed May 10 14:54:32 2017 (r318138) +++ stable/11/sys/cam/scsi/scsi_pass.c Wed May 10 15:20:38 2017 (r318139) @@ -2213,9 +2213,9 @@ passsendccb(struct cam_periph *periph, u * that request. Otherwise, it's up to the user to perform any * error recovery. */ - cam_periph_runccb(ccb, passerror, /* cam_flags */ CAM_RETRY_SELTO, - /* sense_flags */ ((ccb->ccb_h.flags & CAM_PASS_ERR_RECOVER) ? - SF_RETRY_UA : SF_NO_RECOVERY) | SF_NO_PRINT, + cam_periph_runccb(ccb, (ccb->ccb_h.flags & CAM_PASS_ERR_RECOVER) ? + passerror : NULL, /* cam_flags */ CAM_RETRY_SELTO, + /* sense_flags */ SF_RETRY_UA | SF_NO_PRINT, softc->device_stats); cam_periph_unmapmem(ccb, &mapinfo); From owner-svn-src-stable@freebsd.org Wed May 10 15:20:41 2017 Return-Path: Delivered-To: svn-src-stable@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 1ECCDD66F7D; Wed, 10 May 2017 15:20:41 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E935216A7; Wed, 10 May 2017 15:20:40 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4AFKdPY001685; Wed, 10 May 2017 15:20:39 GMT (envelope-from ken@FreeBSD.org) Received: (from ken@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4AFKdtA001683; Wed, 10 May 2017 15:20:39 GMT (envelope-from ken@FreeBSD.org) Message-Id: <201705101520.v4AFKdtA001683@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ken set sender to ken@FreeBSD.org using -f From: "Kenneth D. Merry" Date: Wed, 10 May 2017 15:20: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: r318140 - 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@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 15:20:41 -0000 Author: ken Date: Wed May 10 15:20:39 2017 New Revision: 318140 URL: https://svnweb.freebsd.org/changeset/base/318140 Log: MFC r317775: Fix error recovery behavior in the pass(4) driver. After FreeBSD SVN revision 236814, the pass(4) driver changed from only doing error recovery when the CAM_PASS_ERR_RECOVER flag was set on a CCB to sometimes doing error recovery if the passed in retry count was non-zero. Error recovery would happen if two conditions were met: 1. The error recovery action was simply a retry. (Which is most cases.) 2. The retry_count is non-zero. (Which happened a lot because of cut-and-pasted code.) This explains a bug I noticed in with camcontrol: # camcontrol tur da34 -v Unit is ready # camcontrol reset da34 Reset of 1:172:0 was successful At this point, there should be a Unit Attention: # camcontrol tur da34 -v Unit is ready No Unit Attention. Try it again: # camcontrol reset da34 Reset of 1:172:0 was successful Now set the retry_count to 0 for the TUR: # camcontrol tur da34 -v -C 0 Unit is not ready (pass42:mps1:0:172:0): TEST UNIT READY. CDB: 00 00 00 00 00 00 (pass42:mps1:0:172:0): CAM status: SCSI Status Error (pass42:mps1:0:172:0): SCSI status: Check Condition (pass42:mps1:0:172:0): SCSI sense: UNIT ATTENTION asc:29,2 (SCSI bus reset occurred) (pass42:mps1:0:172:0): Field Replaceable Unit: 2 There is the unit attention. camcontrol(8) has a default retry_count of 1, in case someone sets the -E flag without setting -C. The CAM_PASS_ERR_RECOVER behavior was only broken with the CAMIOCOMMAND ioctl, which is the synchronous pass(4) API. It has worked as intended (error recovery is only done when the flag is set) in the asynchronous API (CAMIOQUEUE ioctl). sys/cam/scsi/scsi_pass.c: In passsendccb(), when calling cam_periph_runccb(), only specify the error routine when CAM_PASS_ERR_RECOVER is set. share/man/man4/pass.4: Document that CAM_PASS_ERR_RECOVER is needed to enable error recovery. Reported by: Terry Kennedy PR: kern/218572 Sponsored by: Spectra Logic Modified: stable/10/share/man/man4/pass.4 stable/10/sys/cam/scsi/scsi_pass.c Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/pass.4 ============================================================================== --- stable/10/share/man/man4/pass.4 Wed May 10 15:20:38 2017 (r318139) +++ stable/10/share/man/man4/pass.4 Wed May 10 15:20:39 2017 (r318140) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 17, 2015 +.Dd May 3, 2017 .Dt PASS 4 .Os .Sh NAME @@ -85,6 +85,11 @@ Some examples of xpt-only CCBs are XPT_S XPT_DEV_MATCH, XPT_RESET_BUS, XPT_SCAN_LUN, XPT_ENG_INQ, and XPT_ENG_EXEC. These CCB types have various attributes that make it illogical or impossible to service them through the passthrough interface. +.Pp +If the user would like the kernel to do error recovery, the +.Dv CAM_PASS_ERR_RECOVER +flag must be set on the CCB, and the retry_count field set to the number +of retries. .It CAMGETPASSTHRU union ccb * This ioctl takes an XPT_GDEVLIST CCB, and returns the passthrough device corresponding to the device in question. @@ -160,6 +165,11 @@ available for userland use with the and .Dv CAMIOGET ioctls and will be preserved across calls. +.Pp +If the user would like the kernel to do error recovery, the +.Dv CAM_PASS_ERR_RECOVER +flag must be set on the CCB, and the retry_count field set to the number +of retries. .It CAMIOGET union ccb * Retrieve completed CAM CCBs queued via the .Dv CAMIOQUEUE Modified: stable/10/sys/cam/scsi/scsi_pass.c ============================================================================== --- stable/10/sys/cam/scsi/scsi_pass.c Wed May 10 15:20:38 2017 (r318139) +++ stable/10/sys/cam/scsi/scsi_pass.c Wed May 10 15:20:39 2017 (r318140) @@ -2216,9 +2216,9 @@ passsendccb(struct cam_periph *periph, u * that request. Otherwise, it's up to the user to perform any * error recovery. */ - cam_periph_runccb(ccb, passerror, /* cam_flags */ CAM_RETRY_SELTO, - /* sense_flags */ ((ccb->ccb_h.flags & CAM_PASS_ERR_RECOVER) ? - SF_RETRY_UA : SF_NO_RECOVERY) | SF_NO_PRINT, + cam_periph_runccb(ccb, (ccb->ccb_h.flags & CAM_PASS_ERR_RECOVER) ? + passerror : NULL, /* cam_flags */ CAM_RETRY_SELTO, + /* sense_flags */ SF_RETRY_UA | SF_NO_PRINT, softc->device_stats); cam_periph_unmapmem(ccb, &mapinfo); From owner-svn-src-stable@freebsd.org Wed May 10 16:32:14 2017 Return-Path: Delivered-To: svn-src-stable@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 4C98BD66363; Wed, 10 May 2017 16:32:14 +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 27E641B4C; Wed, 10 May 2017 16:32:14 +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 v4AGWDbi031492; Wed, 10 May 2017 16:32:13 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4AGWDhx031491; Wed, 10 May 2017 16:32:13 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201705101632.v4AGWDhx031491@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 10 May 2017 16:32:13 +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: r318145 - in stable: 10/sys/geom/journal 11/sys/geom/journal 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@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 16:32:14 -0000 Author: jhb Date: Wed May 10 16:32:12 2017 New Revision: 318145 URL: https://svnweb.freebsd.org/changeset/base/318145 Log: MFC 313409: Defer startup of gjournal switcher kproc. Don't start switcher kproc until the first GEOM is created. Modified: stable/10/sys/geom/journal/g_journal.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/geom/journal/g_journal.c Directory Properties: stable/11/ (props changed) Modified: stable/10/sys/geom/journal/g_journal.c ============================================================================== --- stable/10/sys/geom/journal/g_journal.c Wed May 10 16:06:22 2017 (r318144) +++ stable/10/sys/geom/journal/g_journal.c Wed May 10 16:32:12 2017 (r318145) @@ -230,11 +230,14 @@ struct g_class g_journal_class = { static int g_journal_destroy(struct g_journal_softc *sc); static void g_journal_metadata_update(struct g_journal_softc *sc); +static void g_journal_start_switcher(struct g_class *mp); +static void g_journal_stop_switcher(void); static void g_journal_switch_wait(struct g_journal_softc *sc); #define GJ_SWITCHER_WORKING 0 #define GJ_SWITCHER_DIE 1 #define GJ_SWITCHER_DIED 2 +static struct proc *g_journal_switcher_proc = NULL; static int g_journal_switcher_state = GJ_SWITCHER_WORKING; static int g_journal_switcher_wokenup = 0; static int g_journal_sync_requested = 0; @@ -2386,6 +2389,10 @@ g_journal_create(struct g_class *mp, str sc->sc_jconsumer = cp; } + /* Start switcher kproc if needed. */ + if (g_journal_switcher_proc == NULL) + g_journal_start_switcher(mp); + if ((sc->sc_type & GJ_TYPE_COMPLETE) != GJ_TYPE_COMPLETE) { /* Journal is not complete yet. */ return (gp); @@ -2766,7 +2773,6 @@ static void g_journal_switcher(void *arg static void g_journal_init(struct g_class *mp) { - int error; /* Pick a conservative value if provided value sucks. */ if (g_journal_cache_divisor <= 0 || @@ -2786,9 +2792,6 @@ g_journal_init(struct g_class *mp) g_journal_lowmem, mp, EVENTHANDLER_PRI_FIRST); if (g_journal_event_lowmem == NULL) GJ_DEBUG(0, "Warning! Cannot register lowmem event."); - error = kproc_create(g_journal_switcher, mp, NULL, 0, 0, - "g_journal switcher"); - KASSERT(error == 0, ("Cannot create switcher thread.")); } static void @@ -2801,11 +2804,7 @@ g_journal_fini(struct g_class *mp) } if (g_journal_event_lowmem != NULL) EVENTHANDLER_DEREGISTER(vm_lowmem, g_journal_event_lowmem); - g_journal_switcher_state = GJ_SWITCHER_DIE; - wakeup(&g_journal_switcher_state); - while (g_journal_switcher_state != GJ_SWITCHER_DIED) - tsleep(&g_journal_switcher_state, PRIBIO, "jfini:wait", hz / 5); - GJ_DEBUG(1, "Switcher died."); + g_journal_stop_switcher(); } DECLARE_GEOM_CLASS(g_journal_class, g_journal); @@ -3011,9 +3010,34 @@ next: } } +static void +g_journal_start_switcher(struct g_class *mp) +{ + int error; + + g_topology_assert(); + MPASS(g_journal_switcher_proc == NULL); + g_journal_switcher_state = GJ_SWITCHER_WORKING; + error = kproc_create(g_journal_switcher, mp, &g_journal_switcher_proc, + 0, 0, "g_journal switcher"); + KASSERT(error == 0, ("Cannot create switcher thread.")); +} + +static void +g_journal_stop_switcher(void) +{ + g_topology_assert(); + MPASS(g_journal_switcher_proc != NULL); + g_journal_switcher_state = GJ_SWITCHER_DIE; + wakeup(&g_journal_switcher_state); + while (g_journal_switcher_state != GJ_SWITCHER_DIED) + tsleep(&g_journal_switcher_state, PRIBIO, "jfini:wait", hz / 5); + GJ_DEBUG(1, "Switcher died."); + g_journal_switcher_proc = NULL; +} + /* - * TODO: Switcher thread should be started on first geom creation and killed on - * last geom destruction. + * TODO: Kill switcher thread on last geom destruction? */ static void g_journal_switcher(void *arg) From owner-svn-src-stable@freebsd.org Wed May 10 16:32:14 2017 Return-Path: Delivered-To: svn-src-stable@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 8A617D66367; Wed, 10 May 2017 16:32:14 +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 5EE651B55; Wed, 10 May 2017 16:32:14 +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 v4AGWDNq031499; Wed, 10 May 2017 16:32:13 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4AGWDrk031498; Wed, 10 May 2017 16:32:13 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201705101632.v4AGWDrk031498@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 10 May 2017 16:32:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318145 - in stable: 10/sys/geom/journal 11/sys/geom/journal X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 16:32:14 -0000 Author: jhb Date: Wed May 10 16:32:12 2017 New Revision: 318145 URL: https://svnweb.freebsd.org/changeset/base/318145 Log: MFC 313409: Defer startup of gjournal switcher kproc. Don't start switcher kproc until the first GEOM is created. Modified: stable/11/sys/geom/journal/g_journal.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/geom/journal/g_journal.c Directory Properties: stable/10/ (props changed) Modified: stable/11/sys/geom/journal/g_journal.c ============================================================================== --- stable/11/sys/geom/journal/g_journal.c Wed May 10 16:06:22 2017 (r318144) +++ stable/11/sys/geom/journal/g_journal.c Wed May 10 16:32:12 2017 (r318145) @@ -227,11 +227,14 @@ struct g_class g_journal_class = { static int g_journal_destroy(struct g_journal_softc *sc); static void g_journal_metadata_update(struct g_journal_softc *sc); +static void g_journal_start_switcher(struct g_class *mp); +static void g_journal_stop_switcher(void); static void g_journal_switch_wait(struct g_journal_softc *sc); #define GJ_SWITCHER_WORKING 0 #define GJ_SWITCHER_DIE 1 #define GJ_SWITCHER_DIED 2 +static struct proc *g_journal_switcher_proc = NULL; static int g_journal_switcher_state = GJ_SWITCHER_WORKING; static int g_journal_switcher_wokenup = 0; static int g_journal_sync_requested = 0; @@ -2383,6 +2386,10 @@ g_journal_create(struct g_class *mp, str sc->sc_jconsumer = cp; } + /* Start switcher kproc if needed. */ + if (g_journal_switcher_proc == NULL) + g_journal_start_switcher(mp); + if ((sc->sc_type & GJ_TYPE_COMPLETE) != GJ_TYPE_COMPLETE) { /* Journal is not complete yet. */ return (gp); @@ -2759,7 +2766,6 @@ static void g_journal_switcher(void *arg static void g_journal_init(struct g_class *mp) { - int error; /* Pick a conservative value if provided value sucks. */ if (g_journal_cache_divisor <= 0 || @@ -2779,9 +2785,6 @@ g_journal_init(struct g_class *mp) g_journal_lowmem, mp, EVENTHANDLER_PRI_FIRST); if (g_journal_event_lowmem == NULL) GJ_DEBUG(0, "Warning! Cannot register lowmem event."); - error = kproc_create(g_journal_switcher, mp, NULL, 0, 0, - "g_journal switcher"); - KASSERT(error == 0, ("Cannot create switcher thread.")); } static void @@ -2794,11 +2797,7 @@ g_journal_fini(struct g_class *mp) } if (g_journal_event_lowmem != NULL) EVENTHANDLER_DEREGISTER(vm_lowmem, g_journal_event_lowmem); - g_journal_switcher_state = GJ_SWITCHER_DIE; - wakeup(&g_journal_switcher_state); - while (g_journal_switcher_state != GJ_SWITCHER_DIED) - tsleep(&g_journal_switcher_state, PRIBIO, "jfini:wait", hz / 5); - GJ_DEBUG(1, "Switcher died."); + g_journal_stop_switcher(); } DECLARE_GEOM_CLASS(g_journal_class, g_journal); @@ -2998,9 +2997,34 @@ next: } } +static void +g_journal_start_switcher(struct g_class *mp) +{ + int error; + + g_topology_assert(); + MPASS(g_journal_switcher_proc == NULL); + g_journal_switcher_state = GJ_SWITCHER_WORKING; + error = kproc_create(g_journal_switcher, mp, &g_journal_switcher_proc, + 0, 0, "g_journal switcher"); + KASSERT(error == 0, ("Cannot create switcher thread.")); +} + +static void +g_journal_stop_switcher(void) +{ + g_topology_assert(); + MPASS(g_journal_switcher_proc != NULL); + g_journal_switcher_state = GJ_SWITCHER_DIE; + wakeup(&g_journal_switcher_state); + while (g_journal_switcher_state != GJ_SWITCHER_DIED) + tsleep(&g_journal_switcher_state, PRIBIO, "jfini:wait", hz / 5); + GJ_DEBUG(1, "Switcher died."); + g_journal_switcher_proc = NULL; +} + /* - * TODO: Switcher thread should be started on first geom creation and killed on - * last geom destruction. + * TODO: Kill switcher thread on last geom destruction? */ static void g_journal_switcher(void *arg) From owner-svn-src-stable@freebsd.org Wed May 10 17:32:30 2017 Return-Path: Delivered-To: svn-src-stable@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 D839FD679CB; Wed, 10 May 2017 17:32:30 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A9ABA255; Wed, 10 May 2017 17:32:30 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4AHWTve057617; Wed, 10 May 2017 17:32:29 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4AHWTXw057616; Wed, 10 May 2017 17:32:29 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705101732.v4AHWTXw057616@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 10 May 2017 17:32:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318146 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 17:32:31 -0000 Author: gjb Date: Wed May 10 17:32:29 2017 New Revision: 318146 URL: https://svnweb.freebsd.org/changeset/base/318146 Log: Document r308914, zfsbootcfg(8) addition. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed May 10 16:32:12 2017 (r318145) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed May 10 17:32:29 2017 (r318146) @@ -196,6 +196,10 @@ class="directory">/usr/local/etc/syslog.d by default. + The &man.zfsbootcfg.8; utility has been + added, providing one-time &man.nextboot.8; options for + &man.zfsboot.8;. + The &man.setkey.8; utility has been modified to show the runtime NAT-T configuration. The From owner-svn-src-stable@freebsd.org Wed May 10 18:59:20 2017 Return-Path: Delivered-To: svn-src-stable@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 61582D6740D; Wed, 10 May 2017 18:59:20 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 30C0A1ABA; Wed, 10 May 2017 18:59:20 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4AIxJvM091506; Wed, 10 May 2017 18:59:19 GMT (envelope-from ken@FreeBSD.org) Received: (from ken@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4AIxIQ9091502; Wed, 10 May 2017 18:59:18 GMT (envelope-from ken@FreeBSD.org) Message-Id: <201705101859.v4AIxIQ9091502@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ken set sender to ken@FreeBSD.org using -f From: "Kenneth D. Merry" Date: Wed, 10 May 2017 18:59:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318148 - stable/11/sys/dev/isp X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 18:59:20 -0000 Author: ken Date: Wed May 10 18:59:18 2017 New Revision: 318148 URL: https://svnweb.freebsd.org/changeset/base/318148 Log: MFC r317740: Correct loop mode CRN resets to adhere to FCP-4 section 4.10 Prior to this change, the CRN (Command Reference Number) is reset on any firmware LIP, LOOP DOWN, or LOOP RESET event in violation of FCP-4 which specifies that the CRN should only be reset in response to a LIP Reset (LIPyx) primitive. FCP-4 also indicates PLOGI/LOGO and PRLI/PRLO ELS actions as conditions for resetting the CRN for the associated initiator port. These violations manifest themselves when the HBA is removed from the loop, or a target device is removed (especially during an outstanding command) without power cycling. If the HBA and and the target device determine upon re-establishing the loop that no PLOGI or PRLI is required, and the target does not issue a LIPxy to the initiator, the CRN for the target will have been improperly reset by the isp driver. As a result, the target port will silently ignore all FCP commands issued during the device probe (which will time out) preventing the device from attaching. This change corrects thie CRN reset behavior in response to loop state changes, also introduces CRN resets for the above mentioned ELS actions as encountered through async PDB change events. This change also adds cleanup of outstanding commands in isp_loop_dead() that was previously missing. sys/dev/isp/isp.c Add the last login state to debug output when syncing the pdb sys/dev/isp/isp_freebsd.c Replace binary statement setting aborted ccb status in isp_watchdog() with the XS_SETERR macro used elsewhere In isp_loop_dead(), abort or complete pending commands as done in isp_watchdog() In isp_async(), segregate the ISPASYNC_LOOP_RESET action from ISPASYNC_LIP, ISPASYNC_LOOP_DOWN, and ISPASYNC_LOOP_UP fallthroughs, and only reset the CRN in the RESET case. Also add checks to handle false LOOP RESET actions that do not have a proper associated LIP primitive, and log the primitive in the debug messages In isp_async(), remove the goto from ISP_ASYNC_DEV_STAYED, and only reset the CRN in the DEV_CHANGED action In isp_async(), when processing an ISPASYNC_CHANGE_PDB status, reset CRN(s) for the associated nphdl (or all ports) if the change reason is some form of ELS login/logout. Also remove assignment to fc since it is not used in the scope sys/dev/isp/ispmbox.h Add macro definition for the global N-Port handle, and correct a macro typo 'PDB24XX_AE_PRLI_DONJE' sys/dev/isp/ispvar.h Add macros FCP_AL_DA_ALL, FCP_AL_PA, and FCP_IS_DEST_ALPD for more legible code when determining if an AL_PD port matches the portid for a given struct fcparam* by value or by virtue of the AL_PD port being 0xFF Submitted by: Reid Linnemann Sponsored by: Spectra Logic Modified: stable/11/sys/dev/isp/isp.c stable/11/sys/dev/isp/isp_freebsd.c stable/11/sys/dev/isp/ispmbox.h stable/11/sys/dev/isp/ispvar.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/isp/isp.c ============================================================================== --- stable/11/sys/dev/isp/isp.c Wed May 10 18:33:40 2017 (r318147) +++ stable/11/sys/dev/isp/isp.c Wed May 10 18:59:18 2017 (r318148) @@ -2771,10 +2771,11 @@ isp_getpdb(ispsoftc_t *isp, int chan, ui pdb->portid = BITS2WORD_24XX(un.bill.pdb_portid_bits); ISP_MEMCPY(pdb->portname, un.bill.pdb_portname, 8); ISP_MEMCPY(pdb->nodename, un.bill.pdb_nodename, 8); - isp_prt(isp, ISP_LOGDEBUG1, - "Chan %d handle 0x%x Port 0x%06x flags 0x%x curstate %x", + isp_prt(isp, ISP_LOGDEBUG0, + "Chan %d handle 0x%x Port 0x%06x flags 0x%x curstate %x laststate %x", chan, id, pdb->portid, un.bill.pdb_flags, - un.bill.pdb_curstate); + un.bill.pdb_curstate, un.bill.pdb_laststate); + if (un.bill.pdb_curstate < PDB2400_STATE_PLOGI_DONE || un.bill.pdb_curstate > PDB2400_STATE_LOGGED_IN) { mbs.param[0] = MBOX_NOT_LOGGED_IN; return (mbs.param[0]); Modified: stable/11/sys/dev/isp/isp_freebsd.c ============================================================================== --- stable/11/sys/dev/isp/isp_freebsd.c Wed May 10 18:33:40 2017 (r318147) +++ stable/11/sys/dev/isp/isp_freebsd.c Wed May 10 18:59:18 2017 (r318148) @@ -2567,8 +2567,7 @@ isp_watchdog(void *arg) } isp_destroy_handle(isp, handle); isp_prt(isp, ISP_LOGERR, "%s: timeout for handle 0x%x", __func__, handle); - xs->ccb_h.status &= ~CAM_STATUS_MASK; - xs->ccb_h.status |= CAM_CMD_TIMEOUT; + XS_SETERR(xs, CAM_CMD_TIMEOUT); isp_done(xs); } else { if (ohandle != ISP_HANDLE_FREE) { @@ -2739,9 +2738,6 @@ isp_loop_dead(ispsoftc_t *isp, int chan) if (lp->state == FC_PORTDB_STATE_NIL) continue; - /* - * XXX: CLEAN UP AND COMPLETE ANY PENDING COMMANDS FIRST! - */ for (i = 0; i < isp->isp_maxcmds; i++) { struct ccb_scsiio *xs; @@ -2757,6 +2753,25 @@ isp_loop_dead(ispsoftc_t *isp, int chan) isp_prt(isp, ISP_LOGWARN, "command handle 0x%x for %d.%d.%jx orphaned by loop down timeout", isp->isp_xflist[i].handle, chan, XS_TGT(xs), (uintmax_t)XS_LUN(xs)); + + /* + * Just like in isp_watchdog, abort the outstanding + * command or immediately free its resources if it is + * not active + */ + if (isp_control(isp, ISPCTL_ABORT_CMD, xs) == 0) { + continue; + } + + if (XS_XFRLEN(xs)) { + ISP_DMAFREE(isp, xs, isp->isp_xflist[i].handle); + } + isp_destroy_handle(isp, isp->isp_xflist[i].handle); + isp_prt(isp, ISP_LOGWARN, "command handle 0x%x for %d.%d.%jx could not be aborted and was destroyed", + isp->isp_xflist[i].handle, chan, XS_TGT(xs), + (uintmax_t)XS_LUN(xs)); + XS_SETERR(xs, HBA_BUSRESET); + isp_done(xs); } isp_prt(isp, ISP_LOGCONFIG, prom3, chan, dbidx, lp->portid, "Loop Down Timeout"); @@ -3562,7 +3577,7 @@ isp_async(ispsoftc_t *isp, ispasync_t cm static const char prom[] = "Chan %d [%d] WWPN 0x%16jx PortID 0x%06x handle 0x%x %s %s"; char buf[64]; char *msg = NULL; - target_id_t tgt; + target_id_t tgt = 0; fcportdb_t *lp; struct isp_fc *fc; struct cam_path *tmppath; @@ -3639,30 +3654,50 @@ isp_async(ispsoftc_t *isp, ispasync_t cm } break; } + case ISPASYNC_LOOP_RESET: + { + uint16_t lipp; + fcparam *fcp; + va_start(ap, cmd); + bus = va_arg(ap, int); + va_end(ap); + + lipp = ISP_READ(isp, OUTMAILBOX1); + fcp = FCPARAM(isp, bus); + + isp_prt(isp, ISP_LOGINFO, "Chan %d LOOP Reset, LIP primitive %x", bus, lipp); + /* + * Per FCP-4, a Reset LIP should result in a CRN reset. Other + * LIPs and loop up/down events should never reset the CRN. For + * an as of yet unknown reason, 24xx series cards (and + * potentially others) can interrupt with a LIP Reset status + * when no LIP reset came down the wire. Additionally, the LIP + * primitive accompanying this status would not be a valid LIP + * Reset primitive, but some variation of an invalid AL_PA + * LIP. As a result, we have to verify the AL_PD in the LIP + * addresses our port before blindly resetting. + */ + if (FCP_IS_DEST_ALPD(fcp, (lipp & 0x00FF))) + isp_fcp_reset_crn(isp, bus, /*tgt*/0, /*tgt_set*/ 0); + isp_loop_changed(isp, bus); + break; + } case ISPASYNC_LIP: if (msg == NULL) msg = "LIP Received"; /* FALLTHROUGH */ - case ISPASYNC_LOOP_RESET: - if (msg == NULL) - msg = "LOOP Reset"; - /* FALLTHROUGH */ case ISPASYNC_LOOP_DOWN: if (msg == NULL) msg = "LOOP Down"; - va_start(ap, cmd); - bus = va_arg(ap, int); - va_end(ap); - isp_fcp_reset_crn(isp, bus, /*tgt*/0, /*tgt_set*/ 0); - isp_loop_changed(isp, bus); - isp_prt(isp, ISP_LOGINFO, "Chan %d %s", bus, msg); - break; + /* FALLTHROUGH */ case ISPASYNC_LOOP_UP: + if (msg == NULL) + msg = "LOOP Up"; va_start(ap, cmd); bus = va_arg(ap, int); va_end(ap); isp_loop_changed(isp, bus); - isp_prt(isp, ISP_LOGINFO, "Chan %d Loop UP", bus); + isp_prt(isp, ISP_LOGINFO, "Chan %d %s", bus, msg); break; case ISPASYNC_DEV_ARRIVED: va_start(ap, cmd); @@ -3692,6 +3727,7 @@ isp_async(ispsoftc_t *isp, ispasync_t cm } break; case ISPASYNC_DEV_CHANGED: + case ISPASYNC_DEV_STAYED: va_start(ap, cmd); bus = va_arg(ap, int); lp = va_arg(ap, fcportdb_t *); @@ -3699,18 +3735,23 @@ isp_async(ispsoftc_t *isp, ispasync_t cm fc = ISP_FC_PC(isp, bus); tgt = FC_PORTDB_TGT(isp, bus, lp); isp_gen_role_str(buf, sizeof (buf), lp->new_prli_word3); - isp_prt(isp, ISP_LOGCONFIG, prom, bus, tgt, lp->port_wwn, lp->new_portid, lp->handle, buf, "changed"); -changed: + if (cmd == ISPASYNC_DEV_CHANGED) + isp_prt(isp, ISP_LOGCONFIG, prom, bus, tgt, lp->port_wwn, lp->new_portid, lp->handle, buf, "changed"); + else + isp_prt(isp, ISP_LOGCONFIG, prom, bus, tgt, lp->port_wwn, lp->portid, lp->handle, buf, "stayed"); + if (lp->is_target != ((FCPARAM(isp, bus)->role & ISP_ROLE_INITIATOR) && (lp->new_prli_word3 & PRLI_WD3_TARGET_FUNCTION))) { lp->is_target = !lp->is_target; if (lp->is_target) { - isp_fcp_reset_crn(isp, bus, tgt, /*tgt_set*/ 1); + if (cmd == ISPASYNC_DEV_CHANGED) + isp_fcp_reset_crn(isp, bus, tgt, /*tgt_set*/ 1); isp_make_here(isp, lp, bus, tgt); } else { isp_make_gone(isp, lp, bus, tgt); - isp_fcp_reset_crn(isp, bus, tgt, /*tgt_set*/ 1); + if (cmd == ISPASYNC_DEV_CHANGED) + isp_fcp_reset_crn(isp, bus, tgt, /*tgt_set*/ 1); } } if (lp->is_initiator != @@ -3726,16 +3767,6 @@ changed: xpt_async(AC_CONTRACT, fc->path, &ac); } break; - case ISPASYNC_DEV_STAYED: - va_start(ap, cmd); - bus = va_arg(ap, int); - lp = va_arg(ap, fcportdb_t *); - va_end(ap); - fc = ISP_FC_PC(isp, bus); - tgt = FC_PORTDB_TGT(isp, bus, lp); - isp_gen_role_str(buf, sizeof (buf), lp->prli_word3); - isp_prt(isp, ISP_LOGCONFIG, prom, bus, tgt, lp->port_wwn, lp->portid, lp->handle, buf, "stayed"); - goto changed; case ISPASYNC_DEV_GONE: va_start(ap, cmd); bus = va_arg(ap, int); @@ -3781,10 +3812,45 @@ changed: va_end(ap); if (evt == ISPASYNC_CHANGE_PDB) { + int tgt_set = 0; msg = "Port Database Changed"; isp_prt(isp, ISP_LOGINFO, "Chan %d %s (nphdl 0x%x state 0x%x reason 0x%x)", bus, msg, nphdl, nlstate, reason); + /* + * Port database syncs are not sufficient for + * determining that logins or logouts are done on the + * loop, but this information is directly available from + * the reason code from the incoming mbox. We must reset + * the fcp crn on these events according to FCP-4 + */ + switch (reason) { + case PDB24XX_AE_IMPL_LOGO_1: + case PDB24XX_AE_IMPL_LOGO_2: + case PDB24XX_AE_IMPL_LOGO_3: + case PDB24XX_AE_PLOGI_RCVD: + case PDB24XX_AE_PRLI_RCVD: + case PDB24XX_AE_PRLO_RCVD: + case PDB24XX_AE_LOGO_RCVD: + case PDB24XX_AE_PLOGI_DONE: + case PDB24XX_AE_PRLI_DONE: + /* + * If the event is not global, twiddle tgt and + * tgt_set to nominate only the target + * associated with the nphdl. + */ + if (nphdl != PDB24XX_AE_GLOBAL) { + /* Break if we don't yet have the pdb */ + if (!isp_find_pdb_by_handle(isp, bus, nphdl, &lp)) + break; + tgt = FC_PORTDB_TGT(isp, bus, lp); + tgt_set = 1; + } + isp_fcp_reset_crn(isp, bus, tgt, tgt_set); + break; + default: + break; /* NOP */ + } } else if (evt == ISPASYNC_CHANGE_SNS) { msg = "Name Server Database Changed"; isp_prt(isp, ISP_LOGINFO, "Chan %d %s (PortID 0x%06x)", Modified: stable/11/sys/dev/isp/ispmbox.h ============================================================================== --- stable/11/sys/dev/isp/ispmbox.h Wed May 10 18:33:40 2017 (r318147) +++ stable/11/sys/dev/isp/ispmbox.h Wed May 10 18:59:18 2017 (r318148) @@ -1421,6 +1421,10 @@ typedef struct { /* * Port Database Changed Async Event information for 24XX cards */ +/* N-Port Handle */ +#define PDB24XX_AE_GLOBAL 0xFFFF + +/* Reason Codes */ #define PDB24XX_AE_OK 0x00 #define PDB24XX_AE_IMPL_LOGO_1 0x01 #define PDB24XX_AE_IMPL_LOGO_2 0x02 @@ -1440,7 +1444,7 @@ typedef struct { #define PDB24XX_AE_FLOGI_TIMO 0x10 #define PDB24XX_AE_ABX_LOGO 0x11 #define PDB24XX_AE_PLOGI_DONE 0x12 -#define PDB24XX_AE_PRLI_DONJE 0x13 +#define PDB24XX_AE_PRLI_DONE 0x13 #define PDB24XX_AE_OPN_1 0x14 #define PDB24XX_AE_OPN_2 0x15 #define PDB24XX_AE_TXERR 0x16 Modified: stable/11/sys/dev/isp/ispvar.h ============================================================================== --- stable/11/sys/dev/isp/ispvar.h Wed May 10 18:33:40 2017 (r318147) +++ stable/11/sys/dev/isp/ispvar.h Wed May 10 18:59:18 2017 (r318148) @@ -502,6 +502,10 @@ typedef struct { #define TOPO_IS_FABRIC(x) ((x) == TOPO_FL_PORT || (x) == TOPO_F_PORT) +#define FCP_AL_DA_ALL 0xFF +#define FCP_AL_PA(fcp) ((uint8_t)(fcp->isp_portid)) +#define FCP_IS_DEST_ALPD(fcp, alpd) (FCP_AL_PA((fcp)) == FCP_AL_DA_ALL || FCP_AL_PA((fcp)) == alpd) + /* * Soft Structure per host adapter */ From owner-svn-src-stable@freebsd.org Wed May 10 18:59:22 2017 Return-Path: Delivered-To: svn-src-stable@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 AEF24D67414; Wed, 10 May 2017 18:59:22 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7AF6E1ABB; Wed, 10 May 2017 18:59:22 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4AIxLn2091556; Wed, 10 May 2017 18:59:21 GMT (envelope-from ken@FreeBSD.org) Received: (from ken@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4AIxLta091552; Wed, 10 May 2017 18:59:21 GMT (envelope-from ken@FreeBSD.org) Message-Id: <201705101859.v4AIxLta091552@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ken set sender to ken@FreeBSD.org using -f From: "Kenneth D. Merry" Date: Wed, 10 May 2017 18:59:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318149 - stable/10/sys/dev/isp 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@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 18:59:22 -0000 Author: ken Date: Wed May 10 18:59:20 2017 New Revision: 318149 URL: https://svnweb.freebsd.org/changeset/base/318149 Log: MFC r317740: Correct loop mode CRN resets to adhere to FCP-4 section 4.10 Prior to this change, the CRN (Command Reference Number) is reset on any firmware LIP, LOOP DOWN, or LOOP RESET event in violation of FCP-4 which specifies that the CRN should only be reset in response to a LIP Reset (LIPyx) primitive. FCP-4 also indicates PLOGI/LOGO and PRLI/PRLO ELS actions as conditions for resetting the CRN for the associated initiator port. These violations manifest themselves when the HBA is removed from the loop, or a target device is removed (especially during an outstanding command) without power cycling. If the HBA and and the target device determine upon re-establishing the loop that no PLOGI or PRLI is required, and the target does not issue a LIPxy to the initiator, the CRN for the target will have been improperly reset by the isp driver. As a result, the target port will silently ignore all FCP commands issued during the device probe (which will time out) preventing the device from attaching. This change corrects thie CRN reset behavior in response to loop state changes, also introduces CRN resets for the above mentioned ELS actions as encountered through async PDB change events. This change also adds cleanup of outstanding commands in isp_loop_dead() that was previously missing. sys/dev/isp/isp.c Add the last login state to debug output when syncing the pdb sys/dev/isp/isp_freebsd.c Replace binary statement setting aborted ccb status in isp_watchdog() with the XS_SETERR macro used elsewhere In isp_loop_dead(), abort or complete pending commands as done in isp_watchdog() In isp_async(), segregate the ISPASYNC_LOOP_RESET action from ISPASYNC_LIP, ISPASYNC_LOOP_DOWN, and ISPASYNC_LOOP_UP fallthroughs, and only reset the CRN in the RESET case. Also add checks to handle false LOOP RESET actions that do not have a proper associated LIP primitive, and log the primitive in the debug messages In isp_async(), remove the goto from ISP_ASYNC_DEV_STAYED, and only reset the CRN in the DEV_CHANGED action In isp_async(), when processing an ISPASYNC_CHANGE_PDB status, reset CRN(s) for the associated nphdl (or all ports) if the change reason is some form of ELS login/logout. Also remove assignment to fc since it is not used in the scope sys/dev/isp/ispmbox.h Add macro definition for the global N-Port handle, and correct a macro typo 'PDB24XX_AE_PRLI_DONJE' sys/dev/isp/ispvar.h Add macros FCP_AL_DA_ALL, FCP_AL_PA, and FCP_IS_DEST_ALPD for more legible code when determining if an AL_PD port matches the portid for a given struct fcparam* by value or by virtue of the AL_PD port being 0xFF Submitted by: Reid Linnemann Sponsored by: Spectra Logic Modified: stable/10/sys/dev/isp/isp.c stable/10/sys/dev/isp/isp_freebsd.c stable/10/sys/dev/isp/ispmbox.h stable/10/sys/dev/isp/ispvar.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/isp/isp.c ============================================================================== --- stable/10/sys/dev/isp/isp.c Wed May 10 18:59:18 2017 (r318148) +++ stable/10/sys/dev/isp/isp.c Wed May 10 18:59:20 2017 (r318149) @@ -2771,10 +2771,11 @@ isp_getpdb(ispsoftc_t *isp, int chan, ui pdb->portid = BITS2WORD_24XX(un.bill.pdb_portid_bits); ISP_MEMCPY(pdb->portname, un.bill.pdb_portname, 8); ISP_MEMCPY(pdb->nodename, un.bill.pdb_nodename, 8); - isp_prt(isp, ISP_LOGDEBUG1, - "Chan %d handle 0x%x Port 0x%06x flags 0x%x curstate %x", + isp_prt(isp, ISP_LOGDEBUG0, + "Chan %d handle 0x%x Port 0x%06x flags 0x%x curstate %x laststate %x", chan, id, pdb->portid, un.bill.pdb_flags, - un.bill.pdb_curstate); + un.bill.pdb_curstate, un.bill.pdb_laststate); + if (un.bill.pdb_curstate < PDB2400_STATE_PLOGI_DONE || un.bill.pdb_curstate > PDB2400_STATE_LOGGED_IN) { mbs.param[0] = MBOX_NOT_LOGGED_IN; return (mbs.param[0]); Modified: stable/10/sys/dev/isp/isp_freebsd.c ============================================================================== --- stable/10/sys/dev/isp/isp_freebsd.c Wed May 10 18:59:18 2017 (r318148) +++ stable/10/sys/dev/isp/isp_freebsd.c Wed May 10 18:59:20 2017 (r318149) @@ -2567,8 +2567,7 @@ isp_watchdog(void *arg) } isp_destroy_handle(isp, handle); isp_prt(isp, ISP_LOGERR, "%s: timeout for handle 0x%x", __func__, handle); - xs->ccb_h.status &= ~CAM_STATUS_MASK; - xs->ccb_h.status |= CAM_CMD_TIMEOUT; + XS_SETERR(xs, CAM_CMD_TIMEOUT); isp_done(xs); } else { if (ohandle != ISP_HANDLE_FREE) { @@ -2739,9 +2738,6 @@ isp_loop_dead(ispsoftc_t *isp, int chan) if (lp->state == FC_PORTDB_STATE_NIL) continue; - /* - * XXX: CLEAN UP AND COMPLETE ANY PENDING COMMANDS FIRST! - */ for (i = 0; i < isp->isp_maxcmds; i++) { struct ccb_scsiio *xs; @@ -2757,6 +2753,25 @@ isp_loop_dead(ispsoftc_t *isp, int chan) isp_prt(isp, ISP_LOGWARN, "command handle 0x%x for %d.%d.%jx orphaned by loop down timeout", isp->isp_xflist[i].handle, chan, XS_TGT(xs), (uintmax_t)XS_LUN(xs)); + + /* + * Just like in isp_watchdog, abort the outstanding + * command or immediately free its resources if it is + * not active + */ + if (isp_control(isp, ISPCTL_ABORT_CMD, xs) == 0) { + continue; + } + + if (XS_XFRLEN(xs)) { + ISP_DMAFREE(isp, xs, isp->isp_xflist[i].handle); + } + isp_destroy_handle(isp, isp->isp_xflist[i].handle); + isp_prt(isp, ISP_LOGWARN, "command handle 0x%x for %d.%d.%jx could not be aborted and was destroyed", + isp->isp_xflist[i].handle, chan, XS_TGT(xs), + (uintmax_t)XS_LUN(xs)); + XS_SETERR(xs, HBA_BUSRESET); + isp_done(xs); } isp_prt(isp, ISP_LOGCONFIG, prom3, chan, dbidx, lp->portid, "Loop Down Timeout"); @@ -3561,7 +3576,7 @@ isp_async(ispsoftc_t *isp, ispasync_t cm static const char prom[] = "Chan %d [%d] WWPN 0x%16jx PortID 0x%06x handle 0x%x %s %s"; char buf[64]; char *msg = NULL; - target_id_t tgt; + target_id_t tgt = 0; fcportdb_t *lp; struct isp_fc *fc; struct cam_path *tmppath; @@ -3638,30 +3653,50 @@ isp_async(ispsoftc_t *isp, ispasync_t cm } break; } + case ISPASYNC_LOOP_RESET: + { + uint16_t lipp; + fcparam *fcp; + va_start(ap, cmd); + bus = va_arg(ap, int); + va_end(ap); + + lipp = ISP_READ(isp, OUTMAILBOX1); + fcp = FCPARAM(isp, bus); + + isp_prt(isp, ISP_LOGINFO, "Chan %d LOOP Reset, LIP primitive %x", bus, lipp); + /* + * Per FCP-4, a Reset LIP should result in a CRN reset. Other + * LIPs and loop up/down events should never reset the CRN. For + * an as of yet unknown reason, 24xx series cards (and + * potentially others) can interrupt with a LIP Reset status + * when no LIP reset came down the wire. Additionally, the LIP + * primitive accompanying this status would not be a valid LIP + * Reset primitive, but some variation of an invalid AL_PA + * LIP. As a result, we have to verify the AL_PD in the LIP + * addresses our port before blindly resetting. + */ + if (FCP_IS_DEST_ALPD(fcp, (lipp & 0x00FF))) + isp_fcp_reset_crn(isp, bus, /*tgt*/0, /*tgt_set*/ 0); + isp_loop_changed(isp, bus); + break; + } case ISPASYNC_LIP: if (msg == NULL) msg = "LIP Received"; /* FALLTHROUGH */ - case ISPASYNC_LOOP_RESET: - if (msg == NULL) - msg = "LOOP Reset"; - /* FALLTHROUGH */ case ISPASYNC_LOOP_DOWN: if (msg == NULL) msg = "LOOP Down"; - va_start(ap, cmd); - bus = va_arg(ap, int); - va_end(ap); - isp_fcp_reset_crn(isp, bus, /*tgt*/0, /*tgt_set*/ 0); - isp_loop_changed(isp, bus); - isp_prt(isp, ISP_LOGINFO, "Chan %d %s", bus, msg); - break; + /* FALLTHROUGH */ case ISPASYNC_LOOP_UP: + if (msg == NULL) + msg = "LOOP Up"; va_start(ap, cmd); bus = va_arg(ap, int); va_end(ap); isp_loop_changed(isp, bus); - isp_prt(isp, ISP_LOGINFO, "Chan %d Loop UP", bus); + isp_prt(isp, ISP_LOGINFO, "Chan %d %s", bus, msg); break; case ISPASYNC_DEV_ARRIVED: va_start(ap, cmd); @@ -3691,6 +3726,7 @@ isp_async(ispsoftc_t *isp, ispasync_t cm } break; case ISPASYNC_DEV_CHANGED: + case ISPASYNC_DEV_STAYED: va_start(ap, cmd); bus = va_arg(ap, int); lp = va_arg(ap, fcportdb_t *); @@ -3698,18 +3734,23 @@ isp_async(ispsoftc_t *isp, ispasync_t cm fc = ISP_FC_PC(isp, bus); tgt = FC_PORTDB_TGT(isp, bus, lp); isp_gen_role_str(buf, sizeof (buf), lp->new_prli_word3); - isp_prt(isp, ISP_LOGCONFIG, prom, bus, tgt, lp->port_wwn, lp->new_portid, lp->handle, buf, "changed"); -changed: + if (cmd == ISPASYNC_DEV_CHANGED) + isp_prt(isp, ISP_LOGCONFIG, prom, bus, tgt, lp->port_wwn, lp->new_portid, lp->handle, buf, "changed"); + else + isp_prt(isp, ISP_LOGCONFIG, prom, bus, tgt, lp->port_wwn, lp->portid, lp->handle, buf, "stayed"); + if (lp->is_target != ((FCPARAM(isp, bus)->role & ISP_ROLE_INITIATOR) && (lp->new_prli_word3 & PRLI_WD3_TARGET_FUNCTION))) { lp->is_target = !lp->is_target; if (lp->is_target) { - isp_fcp_reset_crn(isp, bus, tgt, /*tgt_set*/ 1); + if (cmd == ISPASYNC_DEV_CHANGED) + isp_fcp_reset_crn(isp, bus, tgt, /*tgt_set*/ 1); isp_make_here(isp, lp, bus, tgt); } else { isp_make_gone(isp, lp, bus, tgt); - isp_fcp_reset_crn(isp, bus, tgt, /*tgt_set*/ 1); + if (cmd == ISPASYNC_DEV_CHANGED) + isp_fcp_reset_crn(isp, bus, tgt, /*tgt_set*/ 1); } } if (lp->is_initiator != @@ -3725,16 +3766,6 @@ changed: xpt_async(AC_CONTRACT, fc->path, &ac); } break; - case ISPASYNC_DEV_STAYED: - va_start(ap, cmd); - bus = va_arg(ap, int); - lp = va_arg(ap, fcportdb_t *); - va_end(ap); - fc = ISP_FC_PC(isp, bus); - tgt = FC_PORTDB_TGT(isp, bus, lp); - isp_gen_role_str(buf, sizeof (buf), lp->prli_word3); - isp_prt(isp, ISP_LOGCONFIG, prom, bus, tgt, lp->port_wwn, lp->portid, lp->handle, buf, "stayed"); - goto changed; case ISPASYNC_DEV_GONE: va_start(ap, cmd); bus = va_arg(ap, int); @@ -3780,10 +3811,45 @@ changed: va_end(ap); if (evt == ISPASYNC_CHANGE_PDB) { + int tgt_set = 0; msg = "Port Database Changed"; isp_prt(isp, ISP_LOGINFO, "Chan %d %s (nphdl 0x%x state 0x%x reason 0x%x)", bus, msg, nphdl, nlstate, reason); + /* + * Port database syncs are not sufficient for + * determining that logins or logouts are done on the + * loop, but this information is directly available from + * the reason code from the incoming mbox. We must reset + * the fcp crn on these events according to FCP-4 + */ + switch (reason) { + case PDB24XX_AE_IMPL_LOGO_1: + case PDB24XX_AE_IMPL_LOGO_2: + case PDB24XX_AE_IMPL_LOGO_3: + case PDB24XX_AE_PLOGI_RCVD: + case PDB24XX_AE_PRLI_RCVD: + case PDB24XX_AE_PRLO_RCVD: + case PDB24XX_AE_LOGO_RCVD: + case PDB24XX_AE_PLOGI_DONE: + case PDB24XX_AE_PRLI_DONE: + /* + * If the event is not global, twiddle tgt and + * tgt_set to nominate only the target + * associated with the nphdl. + */ + if (nphdl != PDB24XX_AE_GLOBAL) { + /* Break if we don't yet have the pdb */ + if (!isp_find_pdb_by_handle(isp, bus, nphdl, &lp)) + break; + tgt = FC_PORTDB_TGT(isp, bus, lp); + tgt_set = 1; + } + isp_fcp_reset_crn(isp, bus, tgt, tgt_set); + break; + default: + break; /* NOP */ + } } else if (evt == ISPASYNC_CHANGE_SNS) { msg = "Name Server Database Changed"; isp_prt(isp, ISP_LOGINFO, "Chan %d %s (PortID 0x%06x)", Modified: stable/10/sys/dev/isp/ispmbox.h ============================================================================== --- stable/10/sys/dev/isp/ispmbox.h Wed May 10 18:59:18 2017 (r318148) +++ stable/10/sys/dev/isp/ispmbox.h Wed May 10 18:59:20 2017 (r318149) @@ -1421,6 +1421,10 @@ typedef struct { /* * Port Database Changed Async Event information for 24XX cards */ +/* N-Port Handle */ +#define PDB24XX_AE_GLOBAL 0xFFFF + +/* Reason Codes */ #define PDB24XX_AE_OK 0x00 #define PDB24XX_AE_IMPL_LOGO_1 0x01 #define PDB24XX_AE_IMPL_LOGO_2 0x02 @@ -1440,7 +1444,7 @@ typedef struct { #define PDB24XX_AE_FLOGI_TIMO 0x10 #define PDB24XX_AE_ABX_LOGO 0x11 #define PDB24XX_AE_PLOGI_DONE 0x12 -#define PDB24XX_AE_PRLI_DONJE 0x13 +#define PDB24XX_AE_PRLI_DONE 0x13 #define PDB24XX_AE_OPN_1 0x14 #define PDB24XX_AE_OPN_2 0x15 #define PDB24XX_AE_TXERR 0x16 Modified: stable/10/sys/dev/isp/ispvar.h ============================================================================== --- stable/10/sys/dev/isp/ispvar.h Wed May 10 18:59:18 2017 (r318148) +++ stable/10/sys/dev/isp/ispvar.h Wed May 10 18:59:20 2017 (r318149) @@ -502,6 +502,10 @@ typedef struct { #define TOPO_IS_FABRIC(x) ((x) == TOPO_FL_PORT || (x) == TOPO_F_PORT) +#define FCP_AL_DA_ALL 0xFF +#define FCP_AL_PA(fcp) ((uint8_t)(fcp->isp_portid)) +#define FCP_IS_DEST_ALPD(fcp, alpd) (FCP_AL_PA((fcp)) == FCP_AL_DA_ALL || FCP_AL_PA((fcp)) == alpd) + /* * Soft Structure per host adapter */ From owner-svn-src-stable@freebsd.org Wed May 10 20:12:24 2017 Return-Path: Delivered-To: svn-src-stable@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 84E36D5BE25; Wed, 10 May 2017 20:12:24 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 47D38BB3; Wed, 10 May 2017 20:12:24 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4AKCNN1024034; Wed, 10 May 2017 20:12:23 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4AKCND5024032; Wed, 10 May 2017 20:12:23 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201705102012.v4AKCND5024032@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Wed, 10 May 2017 20:12: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: r318151 - in stable/10/sys/dev: ic puc 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@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 20:12:24 -0000 Author: marius Date: Wed May 10 20:12:23 2017 New Revision: 318151 URL: https://svnweb.freebsd.org/changeset/base/318151 Log: MFC: r293642 - Add support for Advantech PCI-1602 Rev. B1 and PCI-1603 cards. [1] - Add a description of Advantech PCI-1602 Rev. A boards. [1] - Properly set up REG_ACR also for PCI-1602 Rev. A based on what the Advantech-supplied Linux driver does. - Additionally use the macros of to replace existing magic values and get rid of trivial comments. - Fix the style of some comments. PR: 205359 [1] Submitted by: Jan Mikkelsen (original patch) [1] Modified: stable/10/sys/dev/ic/ns16550.h stable/10/sys/dev/puc/pucdata.c Modified: stable/10/sys/dev/ic/ns16550.h ============================================================================== --- stable/10/sys/dev/ic/ns16550.h Wed May 10 19:41:52 2017 (r318150) +++ stable/10/sys/dev/ic/ns16550.h Wed May 10 20:12:23 2017 (r318151) @@ -205,6 +205,7 @@ * requires ACR[6]. */ #define com_icr 5 /* index control register (R/W) */ +#define REG_ICR com_icr /* * 16950 register #7. It is the same as com_scr except it has a different @@ -220,6 +221,7 @@ */ #define com_acr 0 /* additional control register (R/W) */ +#define REG_ACR com_acr #define ACR_ASE 0x80 /* ASR/RFL/TFL enable */ #define ACR_ICRE 0x40 /* ICR enable */ #define ACR_TLE 0x20 /* TTL/RTL enable */ Modified: stable/10/sys/dev/puc/pucdata.c ============================================================================== --- stable/10/sys/dev/puc/pucdata.c Wed May 10 19:41:52 2017 (r318150) +++ stable/10/sys/dev/puc/pucdata.c Wed May 10 20:12:23 2017 (r318151) @@ -42,12 +42,16 @@ __FBSDID("$FreeBSD$"); #include #include +#include + +#include #include #include #include #include +static puc_config_f puc_config_advantech; static puc_config_f puc_config_amc; static puc_config_f puc_config_diva; static puc_config_f puc_config_exar; @@ -691,10 +695,25 @@ const struct puc_cfg puc_pci_devices[] = .config_function = puc_config_exar_pcie }, + /* + * The Advantech PCI-1602 Rev. A use the first two ports of an Oxford + * Semiconductor OXuPCI954. Note these boards have a hardware bug in + * that they drive the RS-422/485 transmitters after power-on until a + * driver initalizes the UARTs. + */ { 0x13fe, 0x1600, 0x1602, 0x0002, - "Advantech PCI-1602", + "Advantech PCI-1602 Rev. A", DEFAULT_RCLK * 8, PUC_PORT_2S, 0x10, 0, 8, + .config_function = puc_config_advantech + }, + + /* Advantech PCI-1602 Rev. B1/PCI-1603 are also based on OXuPCI952. */ + { 0x13fe, 0xa102, 0x13fe, 0xa102, + "Advantech 2-port PCI (PCI-1602 Rev. B1/PCI-1603)", + DEFAULT_RCLK * 8, + PUC_PORT_2S, 0x10, 4, 0, + .config_function = puc_config_advantech }, { 0x1407, 0x0100, 0xffff, 0, @@ -1256,6 +1275,92 @@ const struct puc_cfg puc_pci_devices[] = }; static int +puc_config_advantech(struct puc_softc *sc, enum puc_cfg_cmd cmd, int port, + intptr_t *res __unused) +{ + const struct puc_cfg *cfg; + struct resource *cres; + struct puc_bar *bar; + device_t cdev, dev; + bus_size_t off; + int base, crtype, fixed, high, i, oxpcie; + uint8_t acr, func, mask; + + if (cmd != PUC_CFG_SETUP) + return (ENXIO); + + base = fixed = oxpcie = 0; + crtype = SYS_RES_IOPORT; + acr = mask = 0x0; + func = high = 1; + off = 0x60; + + cfg = sc->sc_cfg; + switch (cfg->subvendor) { + case 0x13fe: + switch (cfg->device) { + case 0xa102: + high = 0; + break; + default: + break; + } + default: + break; + } + if (fixed == 1) + goto setup; + + dev = sc->sc_dev; + cdev = pci_find_dbsf(pci_get_domain(dev), pci_get_bus(dev), + pci_get_slot(dev), func); + if (cdev == NULL) { + device_printf(dev, "could not find config function\n"); + return (ENXIO); + } + + i = PCIR_BAR(0); + cres = bus_alloc_resource_any(cdev, crtype, &i, RF_ACTIVE); + if (cres == NULL) { + device_printf(dev, "could not allocate config resource\n"); + return (ENXIO); + } + + if (oxpcie == 0) { + mask = bus_read_1(cres, off); + if (pci_get_function(dev) == 1) + base = 4; + } + + setup: + for (i = 0; i < sc->sc_nports; ++i) { + device_printf(dev, "port %d: ", i); + bar = puc_get_bar(sc, cfg->rid + i * cfg->d_rid); + if (bar == NULL) { + printf("could not get BAR\n"); + continue; + } + + if (fixed == 0) { + if ((mask & (1 << (base + i))) == 0) { + acr = 0; + printf("RS-232\n"); + } else { + acr = (high == 1 ? 0x18 : 0x10); + printf("RS-422/RS-485, active-%s auto-DTR\n", + high == 1 ? "high" : "low"); + } + } + + bus_write_1(bar->b_res, REG_SPR, REG_ACR); + bus_write_1(bar->b_res, REG_ICR, acr); + } + + bus_release_resource(cdev, crtype, rman_get_rid(cres), cres); + return (0); +} + +static int puc_config_amc(struct puc_softc *sc __unused, enum puc_cfg_cmd cmd, int port, intptr_t *res) { @@ -1360,24 +1465,17 @@ puc_config_quatech(struct puc_softc *sc, bar = puc_get_bar(sc, cfg->rid); if (bar == NULL) return (ENXIO); - /* Set DLAB in the LCR register of UART 0. */ - bus_write_1(bar->b_res, 3, 0x80); - /* Write 0 to the SPR register of UART 0. */ - bus_write_1(bar->b_res, 7, 0); - /* Read back the contents of the SPR register of UART 0. */ - v0 = bus_read_1(bar->b_res, 7); - /* Write a specific value to the SPR register of UART 0. */ - bus_write_1(bar->b_res, 7, 0x80 + -cfg->clock); - /* Read back the contents of the SPR register of UART 0. */ - v1 = bus_read_1(bar->b_res, 7); - /* Clear DLAB in the LCR register of UART 0. */ - bus_write_1(bar->b_res, 3, 0); - /* Save the two values read-back from the SPR register. */ + bus_write_1(bar->b_res, REG_LCR, LCR_DLAB); + bus_write_1(bar->b_res, REG_SPR, 0); + v0 = bus_read_1(bar->b_res, REG_SPR); + bus_write_1(bar->b_res, REG_SPR, 0x80 + -cfg->clock); + v1 = bus_read_1(bar->b_res, REG_SPR); + bus_write_1(bar->b_res, REG_LCR, 0); sc->sc_cfg_data = (v0 << 8) | v1; if (v0 == 0 && v1 == 0x80 + -cfg->clock) { /* * The SPR register echoed the two values written - * by us. This means that the SPAD jumper is set. + * by us. This means that the SPAD jumper is set. */ device_printf(sc->sc_dev, "warning: extra features " "not usable -- SPAD compatibility enabled\n"); @@ -1385,7 +1483,7 @@ puc_config_quatech(struct puc_softc *sc, } if (v0 != 0) { /* - * The first value doesn't match. This can only mean + * The first value doesn't match. This can only mean * that the SPAD jumper is not set and that a non- * standard fixed clock multiplier jumper is set. */ @@ -1399,8 +1497,8 @@ puc_config_quatech(struct puc_softc *sc, return (0); } /* - * The first value matched, but the second didn't. We know - * that the SPAD jumper is not set. We also know that the + * The first value matched, but the second didn't. We know + * that the SPAD jumper is not set. We also know that the * clock rate multiplier is software controlled *and* that * we just programmed it to the maximum allowed. */ @@ -1415,8 +1513,8 @@ puc_config_quatech(struct puc_softc *sc, /* * XXX With the SPAD jumper applied, there's no * easy way of knowing if there's also a clock - * rate multiplier jumper installed. Let's hope - * not... + * rate multiplier jumper installed. Let's hope + * not ... */ *res = DEFAULT_RCLK; } else if (v0 == 0) { @@ -1678,15 +1776,15 @@ puc_config_oxford_pcie(struct puc_softc case PUC_CFG_GET_NPORTS: /* * Check if we are being called from puc_bfe_attach() - * or puc_bfe_probe(). If puc_bfe_probe(), we cannot - * puc_get_bar(), so we return a value of 16. This has cosmetic - * side-effects at worst; in PUC_CFG_GET_DESC, - * (int)sc->sc_cfg_data will not contain the true number of - * ports in PUC_CFG_GET_DESC, but we are not implementing that - * call for this device family anyway. + * or puc_bfe_probe(). If puc_bfe_probe(), we cannot + * puc_get_bar(), so we return a value of 16. This has + * cosmetic side-effects at worst; in PUC_CFG_GET_DESC, + * sc->sc_cfg_data will not contain the true number of + * ports in PUC_CFG_GET_DESC, but we are not implementing + * that call for this device family anyway. * - * The check is for initialisation of sc->sc_bar[idx], which is - * only done in puc_bfe_attach(). + * The check is for initialization of sc->sc_bar[idx], + * which is only done in puc_bfe_attach(). */ idx = 0; do { From owner-svn-src-stable@freebsd.org Wed May 10 20:29:03 2017 Return-Path: Delivered-To: svn-src-stable@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 85EB6D6732D; Wed, 10 May 2017 20:29:03 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 605AB1487; Wed, 10 May 2017 20:29:03 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4AKT2o0028377; Wed, 10 May 2017 20:29:02 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4AKT2Si028374; Wed, 10 May 2017 20:29:02 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201705102029.v4AKT2Si028374@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Wed, 10 May 2017 20:29: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: r318152 - stable/10/usr.bin/sort 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@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 20:29:03 -0000 Author: marius Date: Wed May 10 20:29:01 2017 New Revision: 318152 URL: https://svnweb.freebsd.org/changeset/base/318152 Log: MFC: r310712 - Use correct offsets into the keys set array. As the elements of this zero-length array are dynamically sized at run-time based on the use of hints, compilers can't be expected to figure out these offsets on their own. [1] - Fix incorrect comparison in cmp_nans(). [2] PR: 204571 [1], 202301 [2] Submitted by: David Binderman [2] Modified: stable/10/usr.bin/sort/coll.c stable/10/usr.bin/sort/coll.h stable/10/usr.bin/sort/radixsort.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/sort/coll.c ============================================================================== --- stable/10/usr.bin/sort/coll.c Wed May 10 20:12:23 2017 (r318151) +++ stable/10/usr.bin/sort/coll.c Wed May 10 20:29:01 2017 (r318152) @@ -105,14 +105,29 @@ clean_keys_array(const struct bwstring * { if (ka) { - for (size_t i = 0; i < keys_num; ++i) - if (ka->key[i].k && ka->key[i].k != s) - bwsfree(ka->key[i].k); + for (size_t i = 0; i < keys_num; ++i) { + const struct key_value *kv; + + kv = get_key_from_keys_array(ka, i); + if (kv->k && kv->k != s) + bwsfree(kv->k); + } memset(ka, 0, keys_array_size()); } } /* + * Get pointer to a key value in the keys set + */ +struct key_value * +get_key_from_keys_array(struct keys_array *ka, size_t ind) +{ + + return ((struct key_value *)((caddr_t)ka->key + + ind * (sizeof(struct key_value) + key_hint_size()))); +} + +/* * Set value of a key in the keys set */ void @@ -122,7 +137,7 @@ set_key_on_keys_array(struct keys_array if (ka && keys_num > ind) { struct key_value *kv; - kv = &(ka->key[ind]); + kv = get_key_from_keys_array(ka, ind); if (kv->k && kv->k != s) bwsfree(kv->k); @@ -156,9 +171,9 @@ sort_list_item_size(struct sort_list_ite if (si->str) ret += bws_memsize(si->str); for (size_t i = 0; i < keys_num; ++i) { - struct key_value *kv; + const struct key_value *kv; - kv = &(si->ka.key[i]); + kv = get_key_from_keys_array(&si->ka, i); if (kv->k != si->str) ret += bws_memsize(kv->k); @@ -475,16 +490,19 @@ get_sort_func(struct sort_mods *sm) int key_coll(struct keys_array *ps1, struct keys_array *ps2, size_t offset) { + struct key_value *kv1, *kv2; struct sort_mods *sm; int res = 0; for (size_t i = 0; i < keys_num; ++i) { + kv1 = get_key_from_keys_array(ps1, i); + kv2 = get_key_from_keys_array(ps2, i); sm = &(keys[i].sm); if (sm->rflag) - res = sm->func(&(ps2->key[i]), &(ps1->key[i]), offset); + res = sm->func(kv2, kv1, offset); else - res = sm->func(&(ps1->key[i]), &(ps2->key[i]), offset); + res = sm->func(kv1, kv2, offset); if (res) break; @@ -1087,7 +1105,7 @@ cmp_nans(double d1, double d2) if (d1 < d2) return (-1); - if (d2 > d2) + if (d1 > d2) return (+1); return (0); } Modified: stable/10/usr.bin/sort/coll.h ============================================================================== --- stable/10/usr.bin/sort/coll.h Wed May 10 20:12:23 2017 (r318151) +++ stable/10/usr.bin/sort/coll.h Wed May 10 20:29:01 2017 (r318152) @@ -91,7 +91,7 @@ struct key_value { struct bwstring *k; /* key string */ struct key_hint hint[0]; /* key sort hint */ -}; +} __packed; /* * Set of keys container object. @@ -146,6 +146,7 @@ cmpcoll_t get_sort_func(struct sort_mods struct keys_array *keys_array_alloc(void); size_t keys_array_size(void); +struct key_value *get_key_from_keys_array(struct keys_array *ka, size_t ind); void set_key_on_keys_array(struct keys_array *ka, struct bwstring *s, size_t ind); void clean_keys_array(const struct bwstring *s, struct keys_array *ka); Modified: stable/10/usr.bin/sort/radixsort.c ============================================================================== --- stable/10/usr.bin/sort/radixsort.c Wed May 10 20:12:23 2017 (r318151) +++ stable/10/usr.bin/sort/radixsort.c Wed May 10 20:29:01 2017 (r318152) @@ -256,9 +256,11 @@ add_leaf(struct sort_level *sl, struct s static inline int get_wc_index(struct sort_list_item *sli, size_t level) { + const struct key_value *kv; const struct bwstring *bws; - bws = sli->ka.key[0].k; + kv = get_key_from_keys_array(&sli->ka, 0); + bws = kv->k; if ((BWSLEN(bws) > level)) return (unsigned char) BWS_GET(bws,level); From owner-svn-src-stable@freebsd.org Wed May 10 20:29:34 2017 Return-Path: Delivered-To: svn-src-stable@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 CA9D9D673B8; Wed, 10 May 2017 20:29:34 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 A5CFD1616; Wed, 10 May 2017 20:29:34 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4AKTXVB028473; Wed, 10 May 2017 20:29:33 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4AKTX3v028470; Wed, 10 May 2017 20:29:33 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201705102029.v4AKTX3v028470@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Wed, 10 May 2017 20:29:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318153 - stable/11/usr.bin/sort X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 20:29:34 -0000 Author: marius Date: Wed May 10 20:29:33 2017 New Revision: 318153 URL: https://svnweb.freebsd.org/changeset/base/318153 Log: MFC: r310712 - Use correct offsets into the keys set array. As the elements of this zero-length array are dynamically sized at run-time based on the use of hints, compilers can't be expected to figure out these offsets on their own. [1] - Fix incorrect comparison in cmp_nans(). [2] PR: 204571 [1], 202301 [2] Submitted by: David Binderman [2] Modified: stable/11/usr.bin/sort/coll.c stable/11/usr.bin/sort/coll.h stable/11/usr.bin/sort/radixsort.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/sort/coll.c ============================================================================== --- stable/11/usr.bin/sort/coll.c Wed May 10 20:29:01 2017 (r318152) +++ stable/11/usr.bin/sort/coll.c Wed May 10 20:29:33 2017 (r318153) @@ -105,14 +105,29 @@ clean_keys_array(const struct bwstring * { if (ka) { - for (size_t i = 0; i < keys_num; ++i) - if (ka->key[i].k && ka->key[i].k != s) - bwsfree(ka->key[i].k); + for (size_t i = 0; i < keys_num; ++i) { + const struct key_value *kv; + + kv = get_key_from_keys_array(ka, i); + if (kv->k && kv->k != s) + bwsfree(kv->k); + } memset(ka, 0, keys_array_size()); } } /* + * Get pointer to a key value in the keys set + */ +struct key_value * +get_key_from_keys_array(struct keys_array *ka, size_t ind) +{ + + return ((struct key_value *)((caddr_t)ka->key + + ind * (sizeof(struct key_value) + key_hint_size()))); +} + +/* * Set value of a key in the keys set */ void @@ -122,7 +137,7 @@ set_key_on_keys_array(struct keys_array if (ka && keys_num > ind) { struct key_value *kv; - kv = &(ka->key[ind]); + kv = get_key_from_keys_array(ka, ind); if (kv->k && kv->k != s) bwsfree(kv->k); @@ -156,9 +171,9 @@ sort_list_item_size(struct sort_list_ite if (si->str) ret += bws_memsize(si->str); for (size_t i = 0; i < keys_num; ++i) { - struct key_value *kv; + const struct key_value *kv; - kv = &(si->ka.key[i]); + kv = get_key_from_keys_array(&si->ka, i); if (kv->k != si->str) ret += bws_memsize(kv->k); @@ -475,16 +490,19 @@ get_sort_func(struct sort_mods *sm) int key_coll(struct keys_array *ps1, struct keys_array *ps2, size_t offset) { + struct key_value *kv1, *kv2; struct sort_mods *sm; int res = 0; for (size_t i = 0; i < keys_num; ++i) { + kv1 = get_key_from_keys_array(ps1, i); + kv2 = get_key_from_keys_array(ps2, i); sm = &(keys[i].sm); if (sm->rflag) - res = sm->func(&(ps2->key[i]), &(ps1->key[i]), offset); + res = sm->func(kv2, kv1, offset); else - res = sm->func(&(ps1->key[i]), &(ps2->key[i]), offset); + res = sm->func(kv1, kv2, offset); if (res) break; @@ -1087,7 +1105,7 @@ cmp_nans(double d1, double d2) if (d1 < d2) return (-1); - if (d2 > d2) + if (d1 > d2) return (+1); return (0); } Modified: stable/11/usr.bin/sort/coll.h ============================================================================== --- stable/11/usr.bin/sort/coll.h Wed May 10 20:29:01 2017 (r318152) +++ stable/11/usr.bin/sort/coll.h Wed May 10 20:29:33 2017 (r318153) @@ -91,7 +91,7 @@ struct key_value { struct bwstring *k; /* key string */ struct key_hint hint[0]; /* key sort hint */ -}; +} __packed; /* * Set of keys container object. @@ -146,6 +146,7 @@ cmpcoll_t get_sort_func(struct sort_mods struct keys_array *keys_array_alloc(void); size_t keys_array_size(void); +struct key_value *get_key_from_keys_array(struct keys_array *ka, size_t ind); void set_key_on_keys_array(struct keys_array *ka, struct bwstring *s, size_t ind); void clean_keys_array(const struct bwstring *s, struct keys_array *ka); Modified: stable/11/usr.bin/sort/radixsort.c ============================================================================== --- stable/11/usr.bin/sort/radixsort.c Wed May 10 20:29:01 2017 (r318152) +++ stable/11/usr.bin/sort/radixsort.c Wed May 10 20:29:33 2017 (r318153) @@ -243,9 +243,11 @@ add_leaf(struct sort_level *sl, struct s static inline int get_wc_index(struct sort_list_item *sli, size_t level) { + const struct key_value *kv; const struct bwstring *bws; - bws = sli->ka.key[0].k; + kv = get_key_from_keys_array(&sli->ka, 0); + bws = kv->k; if ((BWSLEN(bws) > level)) return (unsigned char) BWS_GET(bws,level); From owner-svn-src-stable@freebsd.org Wed May 10 20:47:00 2017 Return-Path: Delivered-To: svn-src-stable@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 CC376D678BE; Wed, 10 May 2017 20:47:00 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 8F8F61EB5; Wed, 10 May 2017 20:47:00 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4AKkxpn036767; Wed, 10 May 2017 20:46:59 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4AKkxhD036766; Wed, 10 May 2017 20:46:59 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201705102046.v4AKkxhD036766@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Wed, 10 May 2017 20:46: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: r318155 - stable/10/sys/netpfil/ipfw 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@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 20:47:00 -0000 Author: marius Date: Wed May 10 20:46:59 2017 New Revision: 318155 URL: https://svnweb.freebsd.org/changeset/base/318155 Log: MFC: r311817 In dummynet(4), random chunks of memory are casted to struct dn_*, potentially leading to fatal unaligned accesses on architectures with strict alignment requirements. This change fixes dummynet(4) as far as accesses to 64-bit members of struct dn_* are concerned, tripping up on sparc64 with accesses to 32-bit members happening to be correctly aligned there. In other words, this only fixes the tip of the iceberg; larger parts of dummynet(4) still need to be rewritten in order to properly work on all of !x86. In principle, considering the amount of code in dummynet(4) that needs this erroneous pattern corrected, an acceptable workaround would be to declare all struct dn_* packed, forcing compilers to do byte-accesses as a side-effect. However, given that the structs in question aren't laid out well either, this would break ABI/KBI. While at it, replace all existing bcopy(9) calls with memcpy(9) for performance reasons, as there is no need to check for overlap in these cases. PR: 189219 Modified: stable/10/sys/netpfil/ipfw/ip_dummynet.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netpfil/ipfw/ip_dummynet.c ============================================================================== --- stable/10/sys/netpfil/ipfw/ip_dummynet.c Wed May 10 20:46:55 2017 (r318154) +++ stable/10/sys/netpfil/ipfw/ip_dummynet.c Wed May 10 20:46:59 2017 (r318155) @@ -930,29 +930,35 @@ delete_schk(int i) static int copy_obj(char **start, char *end, void *_o, const char *msg, int i) { - struct dn_id *o = _o; + struct dn_id o; + union { + struct dn_link l; + struct dn_schk s; + } dn; int have = end - *start; - if (have < o->len || o->len == 0 || o->type == 0) { + memcpy(&o, _o, sizeof(o)); + if (have < o.len || o.len == 0 || o.type == 0) { D("(WARN) type %d %s %d have %d need %d", - o->type, msg, i, have, o->len); + o.type, msg, i, have, o.len); return 1; } - ND("type %d %s %d len %d", o->type, msg, i, o->len); - bcopy(_o, *start, o->len); - if (o->type == DN_LINK) { + ND("type %d %s %d len %d", o.type, msg, i, o.len); + if (o.type == DN_LINK) { + memcpy(&dn.l, _o, sizeof(dn.l)); /* Adjust burst parameter for link */ - struct dn_link *l = (struct dn_link *)*start; - l->burst = div64(l->burst, 8 * hz); - l->delay = l->delay * 1000 / hz; - } else if (o->type == DN_SCH) { - /* Set id->id to the number of instances */ - struct dn_schk *s = _o; - struct dn_id *id = (struct dn_id *)(*start); - id->id = (s->sch.flags & DN_HAVE_MASK) ? - dn_ht_entries(s->siht) : (s->siht ? 1 : 0); - } - *start += o->len; + dn.l.burst = div64(dn.l.burst, 8 * hz); + dn.l.delay = dn.l.delay * 1000 / hz; + memcpy(*start, &dn.l, sizeof(dn.l)); + } else if (o.type == DN_SCH) { + /* Set dn.s.sch.oid.id to the number of instances */ + memcpy(&dn.s, _o, sizeof(dn.s)); + dn.s.sch.oid.id = (dn.s.sch.flags & DN_HAVE_MASK) ? + dn_ht_entries(dn.s.siht) : (dn.s.siht ? 1 : 0); + memcpy(*start, &dn.s, sizeof(dn.s)); + } else + memcpy(*start, _o, o.len); + *start += o.len; return 0; } @@ -973,7 +979,7 @@ copy_obj_q(char **start, char *end, void return 1; } ND("type %d %s %d len %d", o->type, msg, i, len); - bcopy(_o, *start, len); + memcpy(*start, _o, len); ((struct dn_id*)(*start))->len = len; *start += len; return 0; @@ -1021,7 +1027,7 @@ copy_profile(struct copy_args *a, struct D("error have %d need %d", have, profile_len); return 1; } - bcopy(p, *a->start, profile_len); + memcpy(*a->start, p, profile_len); ((struct dn_id *)(*a->start))->len = profile_len; *a->start += profile_len; return 0; @@ -1583,6 +1589,9 @@ config_fs(struct dn_fs *nfs, struct dn_i { int i; struct dn_fsk *fs; +#ifdef NEW_AQM + struct dn_extra_parms *ep; +#endif if (nfs->oid.len != sizeof(*nfs)) { D("invalid flowset len %d", nfs->oid.len); @@ -1591,6 +1600,15 @@ config_fs(struct dn_fs *nfs, struct dn_i i = nfs->fs_nr; if (i <= 0 || i >= 3*DN_MAX_ID) return NULL; +#ifdef NEW_AQM + ep = NULL; + if (arg != NULL) { + ep = malloc(sizeof(*ep), M_TEMP, locked ? M_NOWAIT : M_WAITOK); + if (ep == NULL) + return (NULL); + memcpy(ep, arg, sizeof(*ep)); + } +#endif ND("flowset %d", i); /* XXX other sanity checks */ if (nfs->flags & DN_QSIZE_BYTES) { @@ -1629,12 +1647,15 @@ config_fs(struct dn_fs *nfs, struct dn_i if (bcmp(&fs->fs, nfs, sizeof(*nfs)) == 0) { ND("flowset %d unchanged", i); #ifdef NEW_AQM - /* reconfigure AQM as the parameters can be changed. - * we consider the flowsetis busy if it has scheduler instance(s) - */ - s = locate_scheduler(nfs->sched_nr); - config_aqm(fs, (struct dn_extra_parms *) arg, - s != NULL && s->siht != NULL); + if (ep != NULL) { + /* + * Reconfigure AQM as the parameters can be changed. + * We consider the flowset as busy if it has scheduler + * instance(s). + */ + s = locate_scheduler(nfs->sched_nr); + config_aqm(fs, ep, s != NULL && s->siht != NULL); + } #endif break; /* no change, nothing to do */ } @@ -1656,13 +1677,19 @@ config_fs(struct dn_fs *nfs, struct dn_i fs->fs = *nfs; /* copy configuration */ #ifdef NEW_AQM fs->aqmfp = NULL; - config_aqm(fs, (struct dn_extra_parms *) arg, s != NULL && s->siht != NULL); + if (ep != NULL) + config_aqm(fs, ep, s != NULL && + s->siht != NULL); #endif if (s != NULL) fsk_attach(fs, s); } while (0); if (!locked) DN_BH_WUNLOCK(); +#ifdef NEW_AQM + if (ep != NULL) + free(ep, M_TEMP); +#endif return fs; } @@ -1772,7 +1799,7 @@ again: /* run twice, for wfq and fifo */ D("cannot allocate profile"); goto error; //XXX } - bcopy(pf, s->profile, sizeof(*pf)); + memcpy(s->profile, pf, sizeof(*pf)); } } p.link_nr = 0; @@ -1794,7 +1821,7 @@ again: /* run twice, for wfq and fifo */ pf = malloc(sizeof(*pf), M_DUMMYNET, M_NOWAIT | M_ZERO); if (pf) /* XXX should issue a warning otherwise */ - bcopy(s->profile, pf, sizeof(*pf)); + memcpy(pf, s->profile, sizeof(*pf)); } /* remove from the hash */ dn_ht_find(dn_cfg.schedhash, i, DNHT_REMOVE, NULL); @@ -1916,7 +1943,7 @@ config_profile(struct dn_profile *pf, st olen = s->profile->oid.len; if (olen < pf->oid.len) olen = pf->oid.len; - bcopy(pf, s->profile, pf->oid.len); + memcpy(s->profile, pf, pf->oid.len); s->profile->oid.len = olen; } DN_BH_WUNLOCK(); @@ -1952,30 +1979,35 @@ dummynet_flush(void) int do_config(void *p, int l) { - struct dn_id *next, *o; - int err = 0, err2 = 0; - struct dn_id *arg = NULL; - uintptr_t *a; - - o = p; - if (o->id != DN_API_VERSION) { - D("invalid api version got %d need %d", - o->id, DN_API_VERSION); + struct dn_id o; + union { + struct dn_profile profile; + struct dn_fs fs; + struct dn_link link; + struct dn_sch sched; + } *dn; + struct dn_id *arg; + uintptr_t a; + int err, err2, off; + + memcpy(&o, p, sizeof(o)); + if (o.id != DN_API_VERSION) { + D("invalid api version got %d need %d", o.id, DN_API_VERSION); return EINVAL; } - for (; l >= sizeof(*o); o = next) { - struct dn_id *prev = arg; - if (o->len < sizeof(*o) || l < o->len) { - D("bad len o->len %d len %d", o->len, l); + arg = NULL; + dn = NULL; + for (off = 0; l >= sizeof(o); memcpy(&o, (char *)p + off, sizeof(o))) { + if (o.len < sizeof(o) || l < o.len) { + D("bad len o.len %d len %d", o.len, l); err = EINVAL; break; } - l -= o->len; - next = (struct dn_id *)((char *)o + o->len); + l -= o.len; err = 0; - switch (o->type) { + switch (o.type) { default: - D("cmd %d not implemented", o->type); + D("cmd %d not implemented", o.type); break; #ifdef EMULATE_SYSCTL @@ -1993,31 +2025,30 @@ do_config(void *p, int l) case DN_CMD_DELETE: /* the argument is in the first uintptr_t after o */ - a = (uintptr_t *)(o+1); - if (o->len < sizeof(*o) + sizeof(*a)) { + if (o.len < sizeof(o) + sizeof(a)) { err = EINVAL; break; } - switch (o->subtype) { + memcpy(&a, (char *)p + off + sizeof(o), sizeof(a)); + switch (o.subtype) { case DN_LINK: /* delete base and derived schedulers */ DN_BH_WLOCK(); - err = delete_schk(*a); - err2 = delete_schk(*a + DN_MAX_ID); + err = delete_schk(a); + err2 = delete_schk(a + DN_MAX_ID); DN_BH_WUNLOCK(); if (!err) err = err2; break; default: - D("invalid delete type %d", - o->subtype); + D("invalid delete type %d", o.subtype); err = EINVAL; break; case DN_FS: - err = (*a <1 || *a >= DN_MAX_ID) ? - EINVAL : delete_fs(*a, 0) ; + err = (a < 1 || a >= DN_MAX_ID) ? + EINVAL : delete_fs(a, 0) ; break; } break; @@ -2027,28 +2058,47 @@ do_config(void *p, int l) dummynet_flush(); DN_BH_WUNLOCK(); break; - case DN_TEXT: /* store argument the next block */ - prev = NULL; - arg = o; + case DN_TEXT: /* store argument of next block */ + if (arg != NULL) + free(arg, M_TEMP); + arg = malloc(o.len, M_TEMP, M_WAITOK); + memcpy(arg, (char *)p + off, o.len); break; case DN_LINK: - err = config_link((struct dn_link *)o, arg); + if (dn == NULL) + dn = malloc(sizeof(*dn), M_TEMP, M_WAITOK); + memcpy(&dn->link, (char *)p + off, sizeof(dn->link)); + err = config_link(&dn->link, arg); break; case DN_PROFILE: - err = config_profile((struct dn_profile *)o, arg); + if (dn == NULL) + dn = malloc(sizeof(*dn), M_TEMP, M_WAITOK); + memcpy(&dn->profile, (char *)p + off, + sizeof(dn->profile)); + err = config_profile(&dn->profile, arg); break; case DN_SCH: - err = config_sched((struct dn_sch *)o, arg); + if (dn == NULL) + dn = malloc(sizeof(*dn), M_TEMP, M_WAITOK); + memcpy(&dn->sched, (char *)p + off, + sizeof(dn->sched)); + err = config_sched(&dn->sched, arg); break; case DN_FS: - err = (NULL==config_fs((struct dn_fs *)o, arg, 0)); + if (dn == NULL) + dn = malloc(sizeof(*dn), M_TEMP, M_WAITOK); + memcpy(&dn->fs, (char *)p + off, sizeof(dn->fs)); + err = (NULL == config_fs(&dn->fs, arg, 0)); break; } - if (prev) - arg = NULL; if (err != 0) break; + off += o.len; } + if (arg != NULL) + free(arg, M_TEMP); + if (dn != NULL) + free(dn, M_TEMP); return err; } @@ -2260,7 +2310,7 @@ dummynet_get(struct sockopt *sopt, void a.type = cmd->subtype; if (compat == NULL) { - bcopy(cmd, start, sizeof(*cmd)); + memcpy(start, cmd, sizeof(*cmd)); ((struct dn_id*)(start))->len = sizeof(struct dn_id); buf = start + sizeof(*cmd); } else From owner-svn-src-stable@freebsd.org Wed May 10 20:46:56 2017 Return-Path: Delivered-To: svn-src-stable@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 E6336D678AB; Wed, 10 May 2017 20:46:56 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 AAB2D1EAF; Wed, 10 May 2017 20:46:56 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4AKktcn036704; Wed, 10 May 2017 20:46:55 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4AKktsa036703; Wed, 10 May 2017 20:46:55 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201705102046.v4AKktsa036703@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Wed, 10 May 2017 20:46:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318154 - stable/11/sys/netpfil/ipfw X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 20:46:57 -0000 Author: marius Date: Wed May 10 20:46:55 2017 New Revision: 318154 URL: https://svnweb.freebsd.org/changeset/base/318154 Log: MFC: r311817 In dummynet(4), random chunks of memory are casted to struct dn_*, potentially leading to fatal unaligned accesses on architectures with strict alignment requirements. This change fixes dummynet(4) as far as accesses to 64-bit members of struct dn_* are concerned, tripping up on sparc64 with accesses to 32-bit members happening to be correctly aligned there. In other words, this only fixes the tip of the iceberg; larger parts of dummynet(4) still need to be rewritten in order to properly work on all of !x86. In principle, considering the amount of code in dummynet(4) that needs this erroneous pattern corrected, an acceptable workaround would be to declare all struct dn_* packed, forcing compilers to do byte-accesses as a side-effect. However, given that the structs in question aren't laid out well either, this would break ABI/KBI. While at it, replace all existing bcopy(9) calls with memcpy(9) for performance reasons, as there is no need to check for overlap in these cases. PR: 189219 Modified: stable/11/sys/netpfil/ipfw/ip_dummynet.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netpfil/ipfw/ip_dummynet.c ============================================================================== --- stable/11/sys/netpfil/ipfw/ip_dummynet.c Wed May 10 20:29:33 2017 (r318153) +++ stable/11/sys/netpfil/ipfw/ip_dummynet.c Wed May 10 20:46:55 2017 (r318154) @@ -931,29 +931,35 @@ delete_schk(int i) static int copy_obj(char **start, char *end, void *_o, const char *msg, int i) { - struct dn_id *o = _o; + struct dn_id o; + union { + struct dn_link l; + struct dn_schk s; + } dn; int have = end - *start; - if (have < o->len || o->len == 0 || o->type == 0) { + memcpy(&o, _o, sizeof(o)); + if (have < o.len || o.len == 0 || o.type == 0) { D("(WARN) type %d %s %d have %d need %d", - o->type, msg, i, have, o->len); + o.type, msg, i, have, o.len); return 1; } - ND("type %d %s %d len %d", o->type, msg, i, o->len); - bcopy(_o, *start, o->len); - if (o->type == DN_LINK) { + ND("type %d %s %d len %d", o.type, msg, i, o.len); + if (o.type == DN_LINK) { + memcpy(&dn.l, _o, sizeof(dn.l)); /* Adjust burst parameter for link */ - struct dn_link *l = (struct dn_link *)*start; - l->burst = div64(l->burst, 8 * hz); - l->delay = l->delay * 1000 / hz; - } else if (o->type == DN_SCH) { - /* Set id->id to the number of instances */ - struct dn_schk *s = _o; - struct dn_id *id = (struct dn_id *)(*start); - id->id = (s->sch.flags & DN_HAVE_MASK) ? - dn_ht_entries(s->siht) : (s->siht ? 1 : 0); - } - *start += o->len; + dn.l.burst = div64(dn.l.burst, 8 * hz); + dn.l.delay = dn.l.delay * 1000 / hz; + memcpy(*start, &dn.l, sizeof(dn.l)); + } else if (o.type == DN_SCH) { + /* Set dn.s.sch.oid.id to the number of instances */ + memcpy(&dn.s, _o, sizeof(dn.s)); + dn.s.sch.oid.id = (dn.s.sch.flags & DN_HAVE_MASK) ? + dn_ht_entries(dn.s.siht) : (dn.s.siht ? 1 : 0); + memcpy(*start, &dn.s, sizeof(dn.s)); + } else + memcpy(*start, _o, o.len); + *start += o.len; return 0; } @@ -974,7 +980,7 @@ copy_obj_q(char **start, char *end, void return 1; } ND("type %d %s %d len %d", o->type, msg, i, len); - bcopy(_o, *start, len); + memcpy(*start, _o, len); ((struct dn_id*)(*start))->len = len; *start += len; return 0; @@ -1022,7 +1028,7 @@ copy_profile(struct copy_args *a, struct D("error have %d need %d", have, profile_len); return 1; } - bcopy(p, *a->start, profile_len); + memcpy(*a->start, p, profile_len); ((struct dn_id *)(*a->start))->len = profile_len; *a->start += profile_len; return 0; @@ -1584,6 +1590,9 @@ config_fs(struct dn_fs *nfs, struct dn_i { int i; struct dn_fsk *fs; +#ifdef NEW_AQM + struct dn_extra_parms *ep; +#endif if (nfs->oid.len != sizeof(*nfs)) { D("invalid flowset len %d", nfs->oid.len); @@ -1592,6 +1601,15 @@ config_fs(struct dn_fs *nfs, struct dn_i i = nfs->fs_nr; if (i <= 0 || i >= 3*DN_MAX_ID) return NULL; +#ifdef NEW_AQM + ep = NULL; + if (arg != NULL) { + ep = malloc(sizeof(*ep), M_TEMP, locked ? M_NOWAIT : M_WAITOK); + if (ep == NULL) + return (NULL); + memcpy(ep, arg, sizeof(*ep)); + } +#endif ND("flowset %d", i); /* XXX other sanity checks */ if (nfs->flags & DN_QSIZE_BYTES) { @@ -1630,12 +1648,15 @@ config_fs(struct dn_fs *nfs, struct dn_i if (bcmp(&fs->fs, nfs, sizeof(*nfs)) == 0) { ND("flowset %d unchanged", i); #ifdef NEW_AQM - /* reconfigure AQM as the parameters can be changed. - * we consider the flowsetis busy if it has scheduler instance(s) - */ - s = locate_scheduler(nfs->sched_nr); - config_aqm(fs, (struct dn_extra_parms *) arg, - s != NULL && s->siht != NULL); + if (ep != NULL) { + /* + * Reconfigure AQM as the parameters can be changed. + * We consider the flowset as busy if it has scheduler + * instance(s). + */ + s = locate_scheduler(nfs->sched_nr); + config_aqm(fs, ep, s != NULL && s->siht != NULL); + } #endif break; /* no change, nothing to do */ } @@ -1657,13 +1678,19 @@ config_fs(struct dn_fs *nfs, struct dn_i fs->fs = *nfs; /* copy configuration */ #ifdef NEW_AQM fs->aqmfp = NULL; - config_aqm(fs, (struct dn_extra_parms *) arg, s != NULL && s->siht != NULL); + if (ep != NULL) + config_aqm(fs, ep, s != NULL && + s->siht != NULL); #endif if (s != NULL) fsk_attach(fs, s); } while (0); if (!locked) DN_BH_WUNLOCK(); +#ifdef NEW_AQM + if (ep != NULL) + free(ep, M_TEMP); +#endif return fs; } @@ -1773,7 +1800,7 @@ again: /* run twice, for wfq and fifo */ D("cannot allocate profile"); goto error; //XXX } - bcopy(pf, s->profile, sizeof(*pf)); + memcpy(s->profile, pf, sizeof(*pf)); } } p.link_nr = 0; @@ -1795,7 +1822,7 @@ again: /* run twice, for wfq and fifo */ pf = malloc(sizeof(*pf), M_DUMMYNET, M_NOWAIT | M_ZERO); if (pf) /* XXX should issue a warning otherwise */ - bcopy(s->profile, pf, sizeof(*pf)); + memcpy(pf, s->profile, sizeof(*pf)); } /* remove from the hash */ dn_ht_find(dn_cfg.schedhash, i, DNHT_REMOVE, NULL); @@ -1917,7 +1944,7 @@ config_profile(struct dn_profile *pf, st olen = s->profile->oid.len; if (olen < pf->oid.len) olen = pf->oid.len; - bcopy(pf, s->profile, pf->oid.len); + memcpy(s->profile, pf, pf->oid.len); s->profile->oid.len = olen; } DN_BH_WUNLOCK(); @@ -1953,30 +1980,35 @@ dummynet_flush(void) int do_config(void *p, int l) { - struct dn_id *next, *o; - int err = 0, err2 = 0; - struct dn_id *arg = NULL; - uintptr_t *a; - - o = p; - if (o->id != DN_API_VERSION) { - D("invalid api version got %d need %d", - o->id, DN_API_VERSION); + struct dn_id o; + union { + struct dn_profile profile; + struct dn_fs fs; + struct dn_link link; + struct dn_sch sched; + } *dn; + struct dn_id *arg; + uintptr_t a; + int err, err2, off; + + memcpy(&o, p, sizeof(o)); + if (o.id != DN_API_VERSION) { + D("invalid api version got %d need %d", o.id, DN_API_VERSION); return EINVAL; } - for (; l >= sizeof(*o); o = next) { - struct dn_id *prev = arg; - if (o->len < sizeof(*o) || l < o->len) { - D("bad len o->len %d len %d", o->len, l); + arg = NULL; + dn = NULL; + for (off = 0; l >= sizeof(o); memcpy(&o, (char *)p + off, sizeof(o))) { + if (o.len < sizeof(o) || l < o.len) { + D("bad len o.len %d len %d", o.len, l); err = EINVAL; break; } - l -= o->len; - next = (struct dn_id *)((char *)o + o->len); + l -= o.len; err = 0; - switch (o->type) { + switch (o.type) { default: - D("cmd %d not implemented", o->type); + D("cmd %d not implemented", o.type); break; #ifdef EMULATE_SYSCTL @@ -1994,31 +2026,30 @@ do_config(void *p, int l) case DN_CMD_DELETE: /* the argument is in the first uintptr_t after o */ - a = (uintptr_t *)(o+1); - if (o->len < sizeof(*o) + sizeof(*a)) { + if (o.len < sizeof(o) + sizeof(a)) { err = EINVAL; break; } - switch (o->subtype) { + memcpy(&a, (char *)p + off + sizeof(o), sizeof(a)); + switch (o.subtype) { case DN_LINK: /* delete base and derived schedulers */ DN_BH_WLOCK(); - err = delete_schk(*a); - err2 = delete_schk(*a + DN_MAX_ID); + err = delete_schk(a); + err2 = delete_schk(a + DN_MAX_ID); DN_BH_WUNLOCK(); if (!err) err = err2; break; default: - D("invalid delete type %d", - o->subtype); + D("invalid delete type %d", o.subtype); err = EINVAL; break; case DN_FS: - err = (*a <1 || *a >= DN_MAX_ID) ? - EINVAL : delete_fs(*a, 0) ; + err = (a < 1 || a >= DN_MAX_ID) ? + EINVAL : delete_fs(a, 0) ; break; } break; @@ -2028,28 +2059,47 @@ do_config(void *p, int l) dummynet_flush(); DN_BH_WUNLOCK(); break; - case DN_TEXT: /* store argument the next block */ - prev = NULL; - arg = o; + case DN_TEXT: /* store argument of next block */ + if (arg != NULL) + free(arg, M_TEMP); + arg = malloc(o.len, M_TEMP, M_WAITOK); + memcpy(arg, (char *)p + off, o.len); break; case DN_LINK: - err = config_link((struct dn_link *)o, arg); + if (dn == NULL) + dn = malloc(sizeof(*dn), M_TEMP, M_WAITOK); + memcpy(&dn->link, (char *)p + off, sizeof(dn->link)); + err = config_link(&dn->link, arg); break; case DN_PROFILE: - err = config_profile((struct dn_profile *)o, arg); + if (dn == NULL) + dn = malloc(sizeof(*dn), M_TEMP, M_WAITOK); + memcpy(&dn->profile, (char *)p + off, + sizeof(dn->profile)); + err = config_profile(&dn->profile, arg); break; case DN_SCH: - err = config_sched((struct dn_sch *)o, arg); + if (dn == NULL) + dn = malloc(sizeof(*dn), M_TEMP, M_WAITOK); + memcpy(&dn->sched, (char *)p + off, + sizeof(dn->sched)); + err = config_sched(&dn->sched, arg); break; case DN_FS: - err = (NULL==config_fs((struct dn_fs *)o, arg, 0)); + if (dn == NULL) + dn = malloc(sizeof(*dn), M_TEMP, M_WAITOK); + memcpy(&dn->fs, (char *)p + off, sizeof(dn->fs)); + err = (NULL == config_fs(&dn->fs, arg, 0)); break; } - if (prev) - arg = NULL; if (err != 0) break; + off += o.len; } + if (arg != NULL) + free(arg, M_TEMP); + if (dn != NULL) + free(dn, M_TEMP); return err; } @@ -2261,7 +2311,7 @@ dummynet_get(struct sockopt *sopt, void a.type = cmd->subtype; if (compat == NULL) { - bcopy(cmd, start, sizeof(*cmd)); + memcpy(start, cmd, sizeof(*cmd)); ((struct dn_id*)(start))->len = sizeof(struct dn_id); buf = start + sizeof(*cmd); } else From owner-svn-src-stable@freebsd.org Wed May 10 20:53:14 2017 Return-Path: Delivered-To: svn-src-stable@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 A4A6DD67C43; Wed, 10 May 2017 20:53:14 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 74707907; Wed, 10 May 2017 20:53:14 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4AKrDQi040537; Wed, 10 May 2017 20:53:13 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4AKrD76040536; Wed, 10 May 2017 20:53:13 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201705102053.v4AKrD76040536@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Wed, 10 May 2017 20:53:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318156 - stable/11/sys/sparc64/conf X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 20:53:14 -0000 Author: marius Date: Wed May 10 20:53:13 2017 New Revision: 318156 URL: https://svnweb.freebsd.org/changeset/base/318156 Log: MFC: r305507 Disable vt(4) by default on sparc64 as creator_vt(4) and vt_ofwfb(4) have the serious problem of not actually attaching the hardware they are driving at the bus level. This causes creator(4) and machfb(4) to attach and drive the very same hardware in parallel when both syscons(4) and vt(4) as well as their associated hardware drivers are built into a kernel, i. e. GENERIC, at the same time. Also, syscons(4) and its drivers still are way superior to vt(4) and its equivalents; unlike the syscons(4) counterparts the vt(4) drivers don't provide hardware acceleration resulting in considerably slower screen drawing, creator_vt(4) doesn't provide a /dev/fb node as required by the Xorg sunffb(4) etc. In theory, vt_ofwfb(4) should be able to handle more devices than machfb(4). However, testing shows that it hardly works with any hardware machfb(4) isn't also able to drive, making vt(4) and vt_ofwfb(4) not favorable for the time being from that perspective either. Modified: stable/11/sys/sparc64/conf/GENERIC Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/sparc64/conf/GENERIC ============================================================================== --- stable/11/sys/sparc64/conf/GENERIC Wed May 10 20:46:59 2017 (r318155) +++ stable/11/sys/sparc64/conf/GENERIC Wed May 10 20:53:13 2017 (r318156) @@ -138,7 +138,7 @@ device splash # Splash screen and scre options KBD_INSTALL_CDEV # install a CDEV entry in /dev # vt is the new video console driver -device vt +#device vt # Builtin hardware device auxio # auxiliary I/O device From owner-svn-src-stable@freebsd.org Wed May 10 21:11:17 2017 Return-Path: Delivered-To: svn-src-stable@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 4233FD67FBC; Wed, 10 May 2017 21:11:17 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 1100410FA; Wed, 10 May 2017 21:11:16 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4ALBGga045511; Wed, 10 May 2017 21:11:16 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4ALBGTU045510; Wed, 10 May 2017 21:11:16 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201705102111.v4ALBGTU045510@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Wed, 10 May 2017 21:11: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: r318157 - stable/10/sys/dev/mmc 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@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 21:11:17 -0000 Author: marius Date: Wed May 10 21:11:15 2017 New Revision: 318157 URL: https://svnweb.freebsd.org/changeset/base/318157 Log: MFC: r292420 Make SYSCTL hw.mmc.debug tunable, since often you want to debug the bus probing during system startup. Modified: stable/10/sys/dev/mmc/mmc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/mmc/mmc.c ============================================================================== --- stable/10/sys/dev/mmc/mmc.c Wed May 10 20:53:13 2017 (r318156) +++ stable/10/sys/dev/mmc/mmc.c Wed May 10 21:11:15 2017 (r318157) @@ -118,7 +118,8 @@ struct mmc_ivars { static SYSCTL_NODE(_hw, OID_AUTO, mmc, CTLFLAG_RD, NULL, "mmc driver"); static int mmc_debug; -SYSCTL_INT(_hw_mmc, OID_AUTO, debug, CTLFLAG_RW, &mmc_debug, 0, "Debug level"); +TUNABLE_INT("hw.mmc.debug", &mmc_debug); +SYSCTL_INT(_hw_mmc, OID_AUTO, debug, CTLFLAG_RWTUN, &mmc_debug, 0, "Debug level"); /* bus entry points */ static int mmc_acquire_bus(device_t busdev, device_t dev); From owner-svn-src-stable@freebsd.org Wed May 10 21:42:14 2017 Return-Path: Delivered-To: svn-src-stable@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 921D0D67918; Wed, 10 May 2017 21:42:14 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 5FA1B8FE; Wed, 10 May 2017 21:42:14 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4ALgDiq060805; Wed, 10 May 2017 21:42:13 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4ALgCs7060797; Wed, 10 May 2017 21:42:12 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201705102142.v4ALgCs7060797@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Wed, 10 May 2017 21:42:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318158 - in stable/11/sys: dev/bhnd/cores/chipc dev/fdt dev/nand geom modules/geom modules/geom/geom_flashmap powerpc/mikrotik sys X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 21:42:14 -0000 Author: marius Date: Wed May 10 21:42:12 2017 New Revision: 318158 URL: https://svnweb.freebsd.org/changeset/base/318158 Log: MFC: r314097 - Allow different slicers for different flash types to be registered with geom_flashmap(4) and teach it about MMC for slicing enhanced user data area partitions. The FDT slicer still is the default for CFI, NAND and SPI flash on FDT-enabled platforms. - In addition to a device_t, also pass the name of the GEOM provider in question to the slicers as a single device may provide more than one provider. - Build a geom_flashmap.ko. - Use MODULE_VERSION() so other modules can depend on geom_flashmap(4). - Remove redundant/superfluous GEOM routines that either do nothing or provide/just call default GEOM (slice) functionality. - Trim/adjust includes Added: stable/11/sys/modules/geom/geom_flashmap/ - copied from r314097, head/sys/modules/geom/geom_flashmap/ Modified: stable/11/sys/dev/bhnd/cores/chipc/chipc_slicer.c stable/11/sys/dev/bhnd/cores/chipc/chipc_slicer.h stable/11/sys/dev/fdt/fdt_slicer.c stable/11/sys/dev/nand/nfc_rb.c stable/11/sys/geom/geom_flashmap.c stable/11/sys/modules/geom/Makefile stable/11/sys/powerpc/mikrotik/platform_rb.c stable/11/sys/sys/slicer.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/bhnd/cores/chipc/chipc_slicer.c ============================================================================== --- stable/11/sys/dev/bhnd/cores/chipc/chipc_slicer.c Wed May 10 21:11:15 2017 (r318157) +++ stable/11/sys/dev/bhnd/cores/chipc/chipc_slicer.c Wed May 10 21:42:12 2017 (r318158) @@ -63,10 +63,12 @@ chipc_register_slicer(chipc_flash flash_ switch (flash_type) { case CHIPC_SFLASH_AT: case CHIPC_SFLASH_ST: - flash_register_slicer(chipc_slicer_spi); + flash_register_slicer(chipc_slicer_spi, FLASH_SLICES_TYPE_SPI, + TRUE); break; case CHIPC_PFLASH_CFI: - flash_register_slicer(chipc_slicer_cfi); + flash_register_slicer(chipc_slicer_cfi, FLASH_SLICES_TYPE_CFI, + TRUE); break; default: /* Unsupported */ @@ -75,7 +77,8 @@ chipc_register_slicer(chipc_flash flash_ } int -chipc_slicer_cfi(device_t dev, struct flash_slice *slices, int *nslices) +chipc_slicer_cfi(device_t dev, const char *provider __unused, + struct flash_slice *slices, int *nslices) { struct cfi_softc *sc; device_t parent; @@ -100,7 +103,8 @@ chipc_slicer_cfi(device_t dev, struct fl } int -chipc_slicer_spi(device_t dev, struct flash_slice *slices, int *nslices) +chipc_slicer_spi(device_t dev, const char *provider __unused, + struct flash_slice *slices, int *nslices) { struct chipc_spi_softc *sc; device_t chipc, spi, spibus; Modified: stable/11/sys/dev/bhnd/cores/chipc/chipc_slicer.h ============================================================================== --- stable/11/sys/dev/bhnd/cores/chipc/chipc_slicer.h Wed May 10 21:11:15 2017 (r318157) +++ stable/11/sys/dev/bhnd/cores/chipc/chipc_slicer.h Wed May 10 21:42:12 2017 (r318158) @@ -41,9 +41,9 @@ #define NVRAM_MAGIC 0x48534C46 void chipc_register_slicer(chipc_flash flash_type); -int chipc_slicer_spi(device_t dev, struct flash_slice *slices, - int *nslices); -int chipc_slicer_cfi(device_t dev, struct flash_slice *slices, - int *nslices); +int chipc_slicer_spi(device_t dev, const char *provider, + struct flash_slice *slices, int *nslices); +int chipc_slicer_cfi(device_t dev, const char *provider, + struct flash_slice *slices, int *nslices); #endif /* _BHND_CORES_CHIPC_CHIPC_SLICER_H_ */ Modified: stable/11/sys/dev/fdt/fdt_slicer.c ============================================================================== --- stable/11/sys/dev/fdt/fdt_slicer.c Wed May 10 21:11:15 2017 (r318157) +++ stable/11/sys/dev/fdt/fdt_slicer.c Wed May 10 21:42:12 2017 (r318158) @@ -30,10 +30,11 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include +#include +#include #ifdef DEBUG #define debugf(fmt, args...) do { printf("%s(): ", __func__); \ @@ -42,8 +43,13 @@ __FBSDID("$FreeBSD$"); #define debugf(fmt, args...) #endif -int -fdt_flash_fill_slices(device_t dev, struct flash_slice *slices, int *slices_num) +static int fdt_flash_fill_slices(device_t dev, const char *provider, + struct flash_slice *slices, int *slices_num); +static void fdt_slicer_init(void); + +static int +fdt_flash_fill_slices(device_t dev, const char *provider __unused, + struct flash_slice *slices, int *slices_num) { char *slice_name; phandle_t dt_node, dt_child; @@ -90,8 +96,8 @@ fdt_flash_fill_slices(device_t dev, stru (void **)&slice_name); if (name_len <= 0) { /* Use node name if no label defined */ - name_len = OF_getprop_alloc(dt_child, "name", sizeof(char), - (void **)&slice_name); + name_len = OF_getprop_alloc(dt_child, "name", + sizeof(char), (void **)&slice_name); if (name_len <= 0) { debugf("slice i=%d with no name\n", i); slice_name = NULL; @@ -110,3 +116,23 @@ fdt_flash_fill_slices(device_t dev, stru *slices_num = i; return (0); } + +static void +fdt_slicer_init(void) +{ + + flash_register_slicer(fdt_flash_fill_slices, FLASH_SLICES_TYPE_NAND, + FALSE); + flash_register_slicer(fdt_flash_fill_slices, FLASH_SLICES_TYPE_CFI, + FALSE); + flash_register_slicer(fdt_flash_fill_slices, FLASH_SLICES_TYPE_SPI, + FALSE); +} + +/* + * Must be initialized after GEOM classes (SI_SUB_DRIVERS/SI_ORDER_FIRST), + * i. e. after g_init() is called, due to the use of the GEOM topology_lock + * in flash_register_slicer(). However, must be before SI_SUB_CONFIGURE. + */ +SYSINIT(fdt_slicer_rootconf, SI_SUB_DRIVERS, SI_ORDER_SECOND, fdt_slicer_init, + NULL); Modified: stable/11/sys/dev/nand/nfc_rb.c ============================================================================== --- stable/11/sys/dev/nand/nfc_rb.c Wed May 10 21:11:15 2017 (r318157) +++ stable/11/sys/dev/nand/nfc_rb.c Wed May 10 21:42:12 2017 (r318158) @@ -36,6 +36,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include + +#include #include @@ -106,6 +109,40 @@ static const struct nand_ecc_data rb_ecc }; #endif +/* Slicer operates on the NAND controller, so we have to find the chip. */ +static int +rb_nand_slicer(device_t dev, const char *provider __unused, + struct flash_slice *slices, int *nslices) +{ + struct nand_chip *chip; + device_t *children; + int n; + + if (device_get_children(dev, &children, &n) != 0) { + panic("Slicer called on controller with no child!"); + } + dev = children[0]; + free(children, M_TEMP); + + if (device_get_children(dev, &children, &n) != 0) { + panic("Slicer called on controller with nandbus but no child!"); + } + dev = children[0]; + free(children, M_TEMP); + + chip = device_get_softc(dev); + *nslices = 2; + slices[0].base = 0; + slices[0].size = 4 * 1024 * 1024; + slices[0].label = "boot"; + + slices[1].base = 4 * 1024 * 1024; + slices[1].size = chip->ndisk->d_mediasize - slices[0].size; + slices[1].label = "rootfs"; + + return (0); +} + static int rb_nand_probe(device_t dev) { @@ -175,6 +212,8 @@ rb_nand_attach(device_t dev) return (ENXIO); } + flash_register_slicer(rb_nand_slicer, FLASH_SLICES_TYPE_NAND, TRUE); + nand_init(&sc->nand_dev, dev, NAND_ECC_SOFT, 0, 0, NULL, NULL); err = nandbus_create(dev); Modified: stable/11/sys/geom/geom_flashmap.c ============================================================================== --- stable/11/sys/geom/geom_flashmap.c Wed May 10 21:11:15 2017 (r318157) +++ stable/11/sys/geom/geom_flashmap.c Wed May 10 21:42:12 2017 (r318158) @@ -29,13 +29,9 @@ __FBSDID("$FreeBSD$"); #include -#include #include #include -#include #include -#include -#include #include #include #include @@ -43,9 +39,10 @@ __FBSDID("$FreeBSD$"); #include #include #include + #include -#define FLASHMAP_CLASS_NAME "Flashmap" +#define FLASHMAP_CLASS_NAME "Flashmap" struct g_flashmap_slice { off_t sl_start; @@ -57,21 +54,24 @@ struct g_flashmap_slice { STAILQ_HEAD(g_flashmap_head, g_flashmap_slice); -static void g_flashmap_print(struct g_flashmap_slice *); -static int g_flashmap_modify(struct g_geom *, const char *, - int, struct g_flashmap_head *); -static int g_flashmap_start(struct bio *); -static int g_flashmap_ioctl(struct g_provider *, u_long, void *, - int, struct thread *); -static void g_flashmap_dumpconf(struct sbuf *, const char *, - struct g_geom *, struct g_consumer *, struct g_provider *); -static struct g_geom *g_flashmap_taste(struct g_class *, - struct g_provider *, int); -static void g_flashmap_config(struct gctl_req *, struct g_class *, - const char *); -static int g_flashmap_load(device_t, struct g_flashmap_head *); -static int (*flash_fill_slices)(device_t, struct flash_slice *, int *) = - fdt_flash_fill_slices; +static struct { + const char *type; + flash_slicer_t slicer; +} g_flashmap_slicers[] = { + { "NAND::device", NULL }, + { "CFI::device", NULL }, + { "SPI::device", NULL }, + { "MMC::device", NULL } +}; + +static g_ioctl_t g_flashmap_ioctl; +static g_taste_t g_flashmap_taste; + +static int g_flashmap_load(device_t dev, struct g_provider *pp, + flash_slicer_t slicer, struct g_flashmap_head *head); +static int g_flashmap_modify(struct g_geom *gp, const char *devname, + int secsize, struct g_flashmap_head *slices); +static void g_flashmap_print(struct g_flashmap_slice *slice); MALLOC_DECLARE(M_FLASHMAP); MALLOC_DEFINE(M_FLASHMAP, "geom_flashmap", "GEOM flash memory slicer class"); @@ -104,7 +104,7 @@ g_flashmap_modify(struct g_geom *gp, con error = g_slice_config(gp, i++, G_SLICE_CONFIG_CHECK, slice->sl_start, slice->sl_end - slice->sl_start + 1, - secsize, "%ss.%s", gp->name, slice->sl_name); + secsize, FLASH_SLICES_FMT, gp->name, slice->sl_name); if (error) return (error); @@ -125,23 +125,6 @@ g_flashmap_modify(struct g_geom *gp, con } static int -g_flashmap_start(struct bio *bp) -{ - - return (0); -} - -static void -g_flashmap_dumpconf(struct sbuf *sb, const char *indent, struct g_geom *gp, - struct g_consumer *cp __unused, struct g_provider *pp) -{ - struct g_slicer *gsp; - - gsp = gp->softc; - g_slice_dumpconf(sb, indent, gp, cp, pp); -} - -static int g_flashmap_ioctl(struct g_provider *pp, u_long cmd, void *data, int fflag, struct thread *td) { @@ -161,16 +144,16 @@ g_flashmap_ioctl(struct g_provider *pp, return (gp->ioctl(cp->provider, cmd, data, fflag, td)); } - static struct g_geom * g_flashmap_taste(struct g_class *mp, struct g_provider *pp, int flags) { - struct g_geom *gp = NULL; + struct g_geom *gp; struct g_consumer *cp; struct g_flashmap_head head; struct g_flashmap_slice *slice, *slice_temp; + flash_slicer_t slicer; device_t dev; - int nslices, size; + int i, size; g_trace(G_T_TOPOLOGY, "flashmap_taste(%s,%s)", mp->name, pp->name); g_topology_assert(); @@ -179,27 +162,26 @@ g_flashmap_taste(struct g_class *mp, str strcmp(pp->geom->class->name, G_DISK_CLASS_NAME) != 0) return (NULL); - gp = g_slice_new(mp, FLASH_SLICES_MAX_NUM, pp, &cp, NULL, 0, - g_flashmap_start); + gp = g_slice_new(mp, FLASH_SLICES_MAX_NUM, pp, &cp, NULL, 0, NULL); if (gp == NULL) return (NULL); STAILQ_INIT(&head); do { - size = sizeof(device_t); - if (g_io_getattr("NAND::device", cp, &size, &dev)) { + slicer = NULL; + for (i = 0; i < nitems(g_flashmap_slicers); i++) { size = sizeof(device_t); - if (g_io_getattr("CFI::device", cp, &size, &dev)) { - size = sizeof(device_t); - if (g_io_getattr("SPI::device", cp, &size, - &dev)) - break; + if (g_io_getattr(g_flashmap_slicers[i].type, cp, + &size, &dev) == 0) { + slicer = g_flashmap_slicers[i].slicer; + break; } } + if (slicer == NULL) + break; - nslices = g_flashmap_load(dev, &head); - if (nslices == 0) + if (g_flashmap_load(dev, pp, slicer, &head) == 0) break; g_flashmap_modify(gp, cp->provider->name, @@ -208,9 +190,8 @@ g_flashmap_taste(struct g_class *mp, str g_access(cp, -1, 0, 0); - STAILQ_FOREACH_SAFE(slice, &head, sl_link, slice_temp) { + STAILQ_FOREACH_SAFE(slice, &head, sl_link, slice_temp) free(slice, M_FLASHMAP); - } if (LIST_EMPTY(&gp->provider)) { g_slice_spoiled(cp); @@ -219,25 +200,17 @@ g_flashmap_taste(struct g_class *mp, str return (gp); } -static void -g_flashmap_config(struct gctl_req *req, struct g_class *mp, const char *verb) -{ - - gctl_error(req, "unknown config verb"); -} - static int -g_flashmap_load(device_t dev, struct g_flashmap_head *head) +g_flashmap_load(device_t dev, struct g_provider *pp, flash_slicer_t slicer, + struct g_flashmap_head *head) { struct flash_slice *slices; struct g_flashmap_slice *slice; - uint32_t i, buf_size; - int nslices = 0; + int i, nslices = 0; - buf_size = sizeof(struct flash_slice) * FLASH_SLICES_MAX_NUM; - slices = malloc(buf_size, M_FLASHMAP, M_WAITOK | M_ZERO); - if (flash_fill_slices && - flash_fill_slices(dev, slices, &nslices) == 0) { + slices = malloc(sizeof(struct flash_slice) * FLASH_SLICES_MAX_NUM, + M_FLASHMAP, M_WAITOK | M_ZERO); + if (slicer(dev, pp->name, slices, &nslices) == 0) { for (i = 0; i < nslices; i++) { slice = malloc(sizeof(struct g_flashmap_slice), M_FLASHMAP, M_WAITOK); @@ -254,19 +227,21 @@ g_flashmap_load(device_t dev, struct g_f return (nslices); } -void flash_register_slicer(int (*slicer)(device_t, struct flash_slice *, int *)) +void flash_register_slicer(flash_slicer_t slicer, u_int type, bool force) { - flash_fill_slices = slicer; + g_topology_lock(); + if (g_flashmap_slicers[type].slicer == NULL || force == TRUE) + g_flashmap_slicers[type].slicer = slicer; + g_topology_unlock(); } static struct g_class g_flashmap_class = { .name = FLASHMAP_CLASS_NAME, .version = G_VERSION, .taste = g_flashmap_taste, - .dumpconf = g_flashmap_dumpconf, .ioctl = g_flashmap_ioctl, - .ctlreq = g_flashmap_config, }; DECLARE_GEOM_CLASS(g_flashmap_class, g_flashmap); +MODULE_VERSION(g_flashmap, 0); Modified: stable/11/sys/modules/geom/Makefile ============================================================================== --- stable/11/sys/modules/geom/Makefile Wed May 10 21:11:15 2017 (r318157) +++ stable/11/sys/modules/geom/Makefile Wed May 10 21:42:12 2017 (r318158) @@ -7,6 +7,7 @@ SUBDIR= geom_bde \ geom_cache \ geom_concat \ geom_eli \ + geom_flashmap \ geom_gate \ geom_journal \ geom_label \ Modified: stable/11/sys/powerpc/mikrotik/platform_rb.c ============================================================================== --- stable/11/sys/powerpc/mikrotik/platform_rb.c Wed May 10 21:11:15 2017 (r318157) +++ stable/11/sys/powerpc/mikrotik/platform_rb.c Wed May 10 21:42:12 2017 (r318158) @@ -32,15 +32,12 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include -#include #include -#include #include @@ -59,39 +56,6 @@ DEFINE_CLASS_1(rb, rb_platform, rb_metho PLATFORM_DEF(rb_platform); -/* Slicer operates on the NAND controller, so we have to find the chip. */ -static int -rb_nand_slicer(device_t dev, struct flash_slice *slices, int *nslices) -{ - struct nand_chip *chip; - device_t *children; - int n; - - if (device_get_children(dev, &children, &n) != 0) { - panic("Slicer called on controller with no child!"); - } - dev = children[0]; - free(children, M_TEMP); - - if (device_get_children(dev, &children, &n) != 0) { - panic("Slicer called on controller with nandbus but no child!"); - } - dev = children[0]; - free(children, M_TEMP); - - chip = device_get_softc(dev); - *nslices = 2; - slices[0].base = 0; - slices[0].size = 4 * 1024 * 1024; - slices[0].label = "boot"; - - slices[1].base = 4 * 1024 * 1024; - slices[1].size = chip->ndisk->d_mediasize - slices[0].size; - slices[1].label = "rootfs"; - - return (0); -} - static int rb_probe(platform_t plat) { @@ -117,7 +81,5 @@ rb_attach(platform_t plat) if (error) return (error); - flash_register_slicer(rb_nand_slicer); - return (0); } Modified: stable/11/sys/sys/slicer.h ============================================================================== --- stable/11/sys/sys/slicer.h Wed May 10 21:11:15 2017 (r318157) +++ stable/11/sys/sys/slicer.h Wed May 10 21:42:12 2017 (r318158) @@ -27,26 +27,38 @@ */ #ifndef _FLASH_SLICER_H_ -#define _FLASH_SLICER_H_ +#define _FLASH_SLICER_H_ #include -#define FLASH_SLICES_MAX_NUM 8 -#define FLASH_SLICES_MAX_NAME_LEN (32 + 1) +#define FLASH_SLICES_MAX_NUM 8 +#define FLASH_SLICES_MAX_NAME_LEN (32 + 1) #define FLASH_SLICES_FLAG_NONE 0 #define FLASH_SLICES_FLAG_RO 1 /* Read only */ +#define FLASH_SLICES_FMT "%ss.%s" + struct flash_slice { off_t base; off_t size; - char *label; + const char *label; unsigned int flags; }; #ifdef _KERNEL -int fdt_flash_fill_slices(device_t, struct flash_slice *, int *) __weak_symbol; -void flash_register_slicer(int (*)(device_t, struct flash_slice *, int *)); + +typedef int (*flash_slicer_t)(device_t dev, const char *provider, + struct flash_slice *slices, int *slices_num); + +#define FLASH_SLICES_TYPE_NAND 0 +#define FLASH_SLICES_TYPE_CFI 1 +#define FLASH_SLICES_TYPE_SPI 2 +#define FLASH_SLICES_TYPE_MMC 3 + +/* Use NULL for deregistering a slicer */ +void flash_register_slicer(flash_slicer_t slicer, u_int type, bool force); + #endif /* _KERNEL */ #endif /* _FLASH_SLICER_H_ */ From owner-svn-src-stable@freebsd.org Wed May 10 21:42:18 2017 Return-Path: Delivered-To: svn-src-stable@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 691E9D67946; Wed, 10 May 2017 21:42:18 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 41B6794B; Wed, 10 May 2017 21:42:18 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4ALgHqh060855; Wed, 10 May 2017 21:42:17 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4ALgGQH060851; Wed, 10 May 2017 21:42:16 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201705102142.v4ALgGQH060851@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Wed, 10 May 2017 21:42: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: r318159 - in stable/10/sys: dev/fdt geom modules/geom modules/geom/geom_flashmap sys 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@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 21:42:18 -0000 Author: marius Date: Wed May 10 21:42:16 2017 New Revision: 318159 URL: https://svnweb.freebsd.org/changeset/base/318159 Log: MFC: r287013 (partial), r294616, r314097 (partial) - Allow overriding the FDT slicer with a custom slicer. - Teach the flashmap code about SPI flash. - Allow different slicers for different flash types to be registered with geom_flashmap(4) and teach it about MMC for slicing enhanced user data area partitions. The FDT slicer still is the default for CFI, NAND and SPI flash on FDT-enabled platforms. - In addition to a device_t, also pass the name of the GEOM provider in question to the slicers as a single device may provide more than one provider. - Build a geom_flashmap.ko. - Use MODULE_VERSION() so other modules can depend on geom_flashmap(4). - Remove redundant/superfluous GEOM routines that either do nothing or provide/just call default GEOM (slice) functionality. - Trim/adjust includes Added: stable/10/sys/modules/geom/geom_flashmap/ - copied from r314097, head/sys/modules/geom/geom_flashmap/ Modified: stable/10/sys/dev/fdt/fdt_slicer.c stable/10/sys/geom/geom_flashmap.c stable/10/sys/modules/geom/Makefile stable/10/sys/sys/slicer.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/fdt/fdt_slicer.c ============================================================================== --- stable/10/sys/dev/fdt/fdt_slicer.c Wed May 10 21:42:12 2017 (r318158) +++ stable/10/sys/dev/fdt/fdt_slicer.c Wed May 10 21:42:16 2017 (r318159) @@ -30,10 +30,11 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include +#include +#include #ifdef DEBUG #define debugf(fmt, args...) do { printf("%s(): ", __func__); \ @@ -42,8 +43,13 @@ __FBSDID("$FreeBSD$"); #define debugf(fmt, args...) #endif -int -flash_fill_slices(device_t dev, struct flash_slice *slices, int *slices_num) +static int fdt_flash_fill_slices(device_t dev, const char *provider, + struct flash_slice *slices, int *slices_num); +static void fdt_slicer_init(void); + +static int +fdt_flash_fill_slices(device_t dev, const char *provider __unused, + struct flash_slice *slices, int *slices_num) { char *slice_name; phandle_t dt_node, dt_child; @@ -90,8 +96,8 @@ flash_fill_slices(device_t dev, struct f (void **)&slice_name); if (name_len <= 0) { /* Use node name if no label defined */ - name_len = OF_getprop_alloc(dt_child, "name", sizeof(char), - (void **)&slice_name); + name_len = OF_getprop_alloc(dt_child, "name", + sizeof(char), (void **)&slice_name); if (name_len <= 0) { debugf("slice i=%d with no name\n", i); slice_name = NULL; @@ -110,3 +116,23 @@ flash_fill_slices(device_t dev, struct f *slices_num = i; return (0); } + +static void +fdt_slicer_init(void) +{ + + flash_register_slicer(fdt_flash_fill_slices, FLASH_SLICES_TYPE_NAND, + FALSE); + flash_register_slicer(fdt_flash_fill_slices, FLASH_SLICES_TYPE_CFI, + FALSE); + flash_register_slicer(fdt_flash_fill_slices, FLASH_SLICES_TYPE_SPI, + FALSE); +} + +/* + * Must be initialized after GEOM classes (SI_SUB_DRIVERS/SI_ORDER_FIRST), + * i. e. after g_init() is called, due to the use of the GEOM topology_lock + * in flash_register_slicer(). However, must be before SI_SUB_CONFIGURE. + */ +SYSINIT(fdt_slicer_rootconf, SI_SUB_DRIVERS, SI_ORDER_SECOND, fdt_slicer_init, + NULL); Modified: stable/10/sys/geom/geom_flashmap.c ============================================================================== --- stable/10/sys/geom/geom_flashmap.c Wed May 10 21:42:12 2017 (r318158) +++ stable/10/sys/geom/geom_flashmap.c Wed May 10 21:42:16 2017 (r318159) @@ -29,13 +29,9 @@ __FBSDID("$FreeBSD$"); #include -#include #include #include -#include #include -#include -#include #include #include #include @@ -43,9 +39,10 @@ __FBSDID("$FreeBSD$"); #include #include #include + #include -#define FLASHMAP_CLASS_NAME "Flashmap" +#define FLASHMAP_CLASS_NAME "Flashmap" struct g_flashmap_slice { off_t sl_start; @@ -57,19 +54,24 @@ struct g_flashmap_slice { STAILQ_HEAD(g_flashmap_head, g_flashmap_slice); -static void g_flashmap_print(struct g_flashmap_slice *); -static int g_flashmap_modify(struct g_geom *, const char *, - int, struct g_flashmap_head *); -static int g_flashmap_start(struct bio *); -static int g_flashmap_ioctl(struct g_provider *, u_long, void *, - int, struct thread *); -static void g_flashmap_dumpconf(struct sbuf *, const char *, - struct g_geom *, struct g_consumer *, struct g_provider *); -static struct g_geom *g_flashmap_taste(struct g_class *, - struct g_provider *, int); -static void g_flashmap_config(struct gctl_req *, struct g_class *, - const char *); -static int g_flashmap_load(device_t, struct g_flashmap_head *); +static struct { + const char *type; + flash_slicer_t slicer; +} g_flashmap_slicers[] = { + { "NAND::device", NULL }, + { "CFI::device", NULL }, + { "SPI::device", NULL }, + { "MMC::device", NULL } +}; + +static g_ioctl_t g_flashmap_ioctl; +static g_taste_t g_flashmap_taste; + +static int g_flashmap_load(device_t dev, struct g_provider *pp, + flash_slicer_t slicer, struct g_flashmap_head *head); +static int g_flashmap_modify(struct g_geom *gp, const char *devname, + int secsize, struct g_flashmap_head *slices); +static void g_flashmap_print(struct g_flashmap_slice *slice); MALLOC_DECLARE(M_FLASHMAP); MALLOC_DEFINE(M_FLASHMAP, "geom_flashmap", "GEOM flash memory slicer class"); @@ -102,7 +104,7 @@ g_flashmap_modify(struct g_geom *gp, con error = g_slice_config(gp, i++, G_SLICE_CONFIG_CHECK, slice->sl_start, slice->sl_end - slice->sl_start + 1, - secsize, "%ss.%s", gp->name, slice->sl_name); + secsize, FLASH_SLICES_FMT, gp->name, slice->sl_name); if (error) return (error); @@ -123,23 +125,6 @@ g_flashmap_modify(struct g_geom *gp, con } static int -g_flashmap_start(struct bio *bp) -{ - - return (0); -} - -static void -g_flashmap_dumpconf(struct sbuf *sb, const char *indent, struct g_geom *gp, - struct g_consumer *cp __unused, struct g_provider *pp) -{ - struct g_slicer *gsp; - - gsp = gp->softc; - g_slice_dumpconf(sb, indent, gp, cp, pp); -} - -static int g_flashmap_ioctl(struct g_provider *pp, u_long cmd, void *data, int fflag, struct thread *td) { @@ -159,16 +144,16 @@ g_flashmap_ioctl(struct g_provider *pp, return (gp->ioctl(cp->provider, cmd, data, fflag, td)); } - static struct g_geom * g_flashmap_taste(struct g_class *mp, struct g_provider *pp, int flags) { - struct g_geom *gp = NULL; + struct g_geom *gp; struct g_consumer *cp; struct g_flashmap_head head; struct g_flashmap_slice *slice, *slice_temp; + flash_slicer_t slicer; device_t dev; - int nslices, size; + int i, size; g_trace(G_T_TOPOLOGY, "flashmap_taste(%s,%s)", mp->name, pp->name); g_topology_assert(); @@ -177,23 +162,26 @@ g_flashmap_taste(struct g_class *mp, str strcmp(pp->geom->class->name, G_DISK_CLASS_NAME) != 0) return (NULL); - gp = g_slice_new(mp, FLASH_SLICES_MAX_NUM, pp, &cp, NULL, 0, - g_flashmap_start); + gp = g_slice_new(mp, FLASH_SLICES_MAX_NUM, pp, &cp, NULL, 0, NULL); if (gp == NULL) return (NULL); STAILQ_INIT(&head); do { - size = sizeof(device_t); - if (g_io_getattr("NAND::device", cp, &size, &dev)) { + slicer = NULL; + for (i = 0; i < nitems(g_flashmap_slicers); i++) { size = sizeof(device_t); - if (g_io_getattr("CFI::device", cp, &size, &dev)) + if (g_io_getattr(g_flashmap_slicers[i].type, cp, + &size, &dev) == 0) { + slicer = g_flashmap_slicers[i].slicer; break; + } } + if (slicer == NULL) + break; - nslices = g_flashmap_load(dev, &head); - if (nslices == 0) + if (g_flashmap_load(dev, pp, slicer, &head) == 0) break; g_flashmap_modify(gp, cp->provider->name, @@ -202,9 +190,8 @@ g_flashmap_taste(struct g_class *mp, str g_access(cp, -1, 0, 0); - STAILQ_FOREACH_SAFE(slice, &head, sl_link, slice_temp) { + STAILQ_FOREACH_SAFE(slice, &head, sl_link, slice_temp) free(slice, M_FLASHMAP); - } if (LIST_EMPTY(&gp->provider)) { g_slice_spoiled(cp); @@ -213,24 +200,17 @@ g_flashmap_taste(struct g_class *mp, str return (gp); } -static void -g_flashmap_config(struct gctl_req *req, struct g_class *mp, const char *verb) -{ - - gctl_error(req, "unknown config verb"); -} - static int -g_flashmap_load(device_t dev, struct g_flashmap_head *head) +g_flashmap_load(device_t dev, struct g_provider *pp, flash_slicer_t slicer, + struct g_flashmap_head *head) { struct flash_slice *slices; struct g_flashmap_slice *slice; - uint32_t i, buf_size; - int nslices = 0; + int i, nslices = 0; - buf_size = sizeof(struct flash_slice) * FLASH_SLICES_MAX_NUM; - slices = malloc(buf_size, M_FLASHMAP, M_WAITOK | M_ZERO); - if (flash_fill_slices(dev, slices, &nslices) == 0) { + slices = malloc(sizeof(struct flash_slice) * FLASH_SLICES_MAX_NUM, + M_FLASHMAP, M_WAITOK | M_ZERO); + if (slicer(dev, pp->name, slices, &nslices) == 0) { for (i = 0; i < nslices; i++) { slice = malloc(sizeof(struct g_flashmap_slice), M_FLASHMAP, M_WAITOK); @@ -247,13 +227,21 @@ g_flashmap_load(device_t dev, struct g_f return (nslices); } +void flash_register_slicer(flash_slicer_t slicer, u_int type, bool force) +{ + + g_topology_lock(); + if (g_flashmap_slicers[type].slicer == NULL || force == TRUE) + g_flashmap_slicers[type].slicer = slicer; + g_topology_unlock(); +} + static struct g_class g_flashmap_class = { .name = FLASHMAP_CLASS_NAME, .version = G_VERSION, .taste = g_flashmap_taste, - .dumpconf = g_flashmap_dumpconf, .ioctl = g_flashmap_ioctl, - .ctlreq = g_flashmap_config, }; DECLARE_GEOM_CLASS(g_flashmap_class, g_flashmap); +MODULE_VERSION(g_flashmap, 0); Modified: stable/10/sys/modules/geom/Makefile ============================================================================== --- stable/10/sys/modules/geom/Makefile Wed May 10 21:42:12 2017 (r318158) +++ stable/10/sys/modules/geom/Makefile Wed May 10 21:42:16 2017 (r318159) @@ -7,6 +7,7 @@ SUBDIR= geom_bde \ geom_cache \ geom_concat \ geom_eli \ + geom_flashmap \ geom_fox \ geom_gate \ geom_journal \ Modified: stable/10/sys/sys/slicer.h ============================================================================== --- stable/10/sys/sys/slicer.h Wed May 10 21:42:12 2017 (r318158) +++ stable/10/sys/sys/slicer.h Wed May 10 21:42:16 2017 (r318159) @@ -27,25 +27,38 @@ */ #ifndef _FLASH_SLICER_H_ -#define _FLASH_SLICER_H_ +#define _FLASH_SLICER_H_ #include -#define FLASH_SLICES_MAX_NUM 8 -#define FLASH_SLICES_MAX_NAME_LEN (32 + 1) +#define FLASH_SLICES_MAX_NUM 8 +#define FLASH_SLICES_MAX_NAME_LEN (32 + 1) #define FLASH_SLICES_FLAG_NONE 0 #define FLASH_SLICES_FLAG_RO 1 /* Read only */ +#define FLASH_SLICES_FMT "%ss.%s" + struct flash_slice { off_t base; off_t size; - char *label; + const char *label; unsigned int flags; }; #ifdef _KERNEL -int flash_fill_slices(device_t, struct flash_slice *, int *); + +typedef int (*flash_slicer_t)(device_t dev, const char *provider, + struct flash_slice *slices, int *slices_num); + +#define FLASH_SLICES_TYPE_NAND 0 +#define FLASH_SLICES_TYPE_CFI 1 +#define FLASH_SLICES_TYPE_SPI 2 +#define FLASH_SLICES_TYPE_MMC 3 + +/* Use NULL for deregistering a slicer */ +void flash_register_slicer(flash_slicer_t slicer, u_int type, bool force); + #endif /* _KERNEL */ #endif /* _FLASH_SLICER_H_ */ From owner-svn-src-stable@freebsd.org Wed May 10 23:09:21 2017 Return-Path: Delivered-To: svn-src-stable@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 CA776D6756F; Wed, 10 May 2017 23:09:21 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 93D36684; Wed, 10 May 2017 23:09:21 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4AN9KMM095094; Wed, 10 May 2017 23:09:20 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4AN9Hfe095064; Wed, 10 May 2017 23:09:17 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201705102309.v4AN9Hfe095064@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 10 May 2017 23:09: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: r318164 - in stable: 10/sys/amd64/linux 10/sys/amd64/linux32 10/sys/compat/freebsd32 10/sys/compat/svr4 10/sys/i386/ibcs2 10/sys/i386/linux 10/sys/kern 10/sys/sys 11/sys/amd64/linux 11/... 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@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 23:09:21 -0000 Author: jhb Date: Wed May 10 23:09:17 2017 New Revision: 318164 URL: https://svnweb.freebsd.org/changeset/base/318164 Log: MFC 313564: Drop the "created from" line from files generated by makesyscalls.sh. This information is less useful when the generated files are included in source control along with the source. If needed it can be reconstructed from the $FreeBSD$ tag in the generated file. Removing this information from the generated output permits committing the generated files along with the change to the system call master list without having inconsistent metadata in the generated files. Regenerate the affected files along with the MFC. Modified: stable/10/sys/amd64/linux/linux_proto.h stable/10/sys/amd64/linux/linux_syscall.h stable/10/sys/amd64/linux/linux_syscalls.c stable/10/sys/amd64/linux/linux_sysent.c stable/10/sys/amd64/linux32/linux32_proto.h stable/10/sys/amd64/linux32/linux32_syscall.h stable/10/sys/amd64/linux32/linux32_syscalls.c stable/10/sys/amd64/linux32/linux32_sysent.c stable/10/sys/compat/freebsd32/freebsd32_proto.h stable/10/sys/compat/freebsd32/freebsd32_syscall.h stable/10/sys/compat/freebsd32/freebsd32_syscalls.c stable/10/sys/compat/freebsd32/freebsd32_sysent.c stable/10/sys/compat/svr4/svr4_proto.h stable/10/sys/compat/svr4/svr4_syscall.h stable/10/sys/compat/svr4/svr4_syscallnames.c stable/10/sys/compat/svr4/svr4_sysent.c stable/10/sys/i386/ibcs2/ibcs2_proto.h stable/10/sys/i386/ibcs2/ibcs2_syscall.h stable/10/sys/i386/ibcs2/ibcs2_sysent.c stable/10/sys/i386/linux/linux_proto.h stable/10/sys/i386/linux/linux_syscall.h stable/10/sys/i386/linux/linux_syscalls.c stable/10/sys/i386/linux/linux_sysent.c stable/10/sys/kern/init_sysent.c stable/10/sys/kern/makesyscalls.sh stable/10/sys/kern/syscalls.c stable/10/sys/sys/syscall.h stable/10/sys/sys/syscall.mk stable/10/sys/sys/sysproto.h Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/amd64/linux/linux_proto.h stable/11/sys/amd64/linux/linux_syscall.h stable/11/sys/amd64/linux/linux_syscalls.c stable/11/sys/amd64/linux/linux_sysent.c stable/11/sys/amd64/linux32/linux32_proto.h stable/11/sys/amd64/linux32/linux32_syscall.h stable/11/sys/amd64/linux32/linux32_syscalls.c stable/11/sys/amd64/linux32/linux32_sysent.c stable/11/sys/compat/cloudabi32/cloudabi32_proto.h stable/11/sys/compat/cloudabi32/cloudabi32_syscall.h stable/11/sys/compat/cloudabi32/cloudabi32_syscalls.c stable/11/sys/compat/cloudabi32/cloudabi32_sysent.c stable/11/sys/compat/cloudabi64/cloudabi64_proto.h stable/11/sys/compat/cloudabi64/cloudabi64_syscall.h stable/11/sys/compat/cloudabi64/cloudabi64_syscalls.c stable/11/sys/compat/cloudabi64/cloudabi64_sysent.c stable/11/sys/compat/freebsd32/freebsd32_proto.h stable/11/sys/compat/freebsd32/freebsd32_syscall.h stable/11/sys/compat/freebsd32/freebsd32_syscalls.c stable/11/sys/compat/freebsd32/freebsd32_sysent.c stable/11/sys/compat/svr4/svr4_proto.h stable/11/sys/compat/svr4/svr4_syscall.h stable/11/sys/compat/svr4/svr4_syscallnames.c stable/11/sys/compat/svr4/svr4_sysent.c stable/11/sys/i386/ibcs2/ibcs2_proto.h stable/11/sys/i386/ibcs2/ibcs2_syscall.h stable/11/sys/i386/ibcs2/ibcs2_sysent.c stable/11/sys/i386/linux/linux_proto.h stable/11/sys/i386/linux/linux_syscall.h stable/11/sys/i386/linux/linux_syscalls.c stable/11/sys/i386/linux/linux_sysent.c stable/11/sys/kern/init_sysent.c stable/11/sys/kern/makesyscalls.sh stable/11/sys/kern/syscalls.c stable/11/sys/sys/syscall.h stable/11/sys/sys/syscall.mk stable/11/sys/sys/sysproto.h Directory Properties: stable/11/ (props changed) Modified: stable/10/sys/amd64/linux/linux_proto.h ============================================================================== --- stable/10/sys/amd64/linux/linux_proto.h Wed May 10 22:45:05 2017 (r318163) +++ stable/10/sys/amd64/linux/linux_proto.h Wed May 10 23:09:17 2017 (r318164) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/10/sys/amd64/linux/syscalls.master 302962 2016-07-17 15:07:33Z dchagin */ #ifndef _LINUX_SYSPROTO_H_ Modified: stable/10/sys/amd64/linux/linux_syscall.h ============================================================================== --- stable/10/sys/amd64/linux/linux_syscall.h Wed May 10 22:45:05 2017 (r318163) +++ stable/10/sys/amd64/linux/linux_syscall.h Wed May 10 23:09:17 2017 (r318164) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/10/sys/amd64/linux/syscalls.master 302962 2016-07-17 15:07:33Z dchagin */ #define LINUX_SYS_read 0 Modified: stable/10/sys/amd64/linux/linux_syscalls.c ============================================================================== --- stable/10/sys/amd64/linux/linux_syscalls.c Wed May 10 22:45:05 2017 (r318163) +++ stable/10/sys/amd64/linux/linux_syscalls.c Wed May 10 23:09:17 2017 (r318164) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/10/sys/amd64/linux/syscalls.master 302962 2016-07-17 15:07:33Z dchagin */ const char *linux_syscallnames[] = { Modified: stable/10/sys/amd64/linux/linux_sysent.c ============================================================================== --- stable/10/sys/amd64/linux/linux_sysent.c Wed May 10 22:45:05 2017 (r318163) +++ stable/10/sys/amd64/linux/linux_sysent.c Wed May 10 23:09:17 2017 (r318164) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/10/sys/amd64/linux/syscalls.master 302962 2016-07-17 15:07:33Z dchagin */ #include Modified: stable/10/sys/amd64/linux32/linux32_proto.h ============================================================================== --- stable/10/sys/amd64/linux32/linux32_proto.h Wed May 10 22:45:05 2017 (r318163) +++ stable/10/sys/amd64/linux32/linux32_proto.h Wed May 10 23:09:17 2017 (r318164) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/10/sys/amd64/linux32/syscalls.master 302962 2016-07-17 15:07:33Z dchagin */ #ifndef _LINUX32_SYSPROTO_H_ Modified: stable/10/sys/amd64/linux32/linux32_syscall.h ============================================================================== --- stable/10/sys/amd64/linux32/linux32_syscall.h Wed May 10 22:45:05 2017 (r318163) +++ stable/10/sys/amd64/linux32/linux32_syscall.h Wed May 10 23:09:17 2017 (r318164) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/10/sys/amd64/linux32/syscalls.master 302962 2016-07-17 15:07:33Z dchagin */ #define LINUX32_SYS_linux_exit 1 Modified: stable/10/sys/amd64/linux32/linux32_syscalls.c ============================================================================== --- stable/10/sys/amd64/linux32/linux32_syscalls.c Wed May 10 22:45:05 2017 (r318163) +++ stable/10/sys/amd64/linux32/linux32_syscalls.c Wed May 10 23:09:17 2017 (r318164) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/10/sys/amd64/linux32/syscalls.master 302962 2016-07-17 15:07:33Z dchagin */ const char *linux32_syscallnames[] = { Modified: stable/10/sys/amd64/linux32/linux32_sysent.c ============================================================================== --- stable/10/sys/amd64/linux32/linux32_sysent.c Wed May 10 22:45:05 2017 (r318163) +++ stable/10/sys/amd64/linux32/linux32_sysent.c Wed May 10 23:09:17 2017 (r318164) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/10/sys/amd64/linux32/syscalls.master 302962 2016-07-17 15:07:33Z dchagin */ #include "opt_compat.h" Modified: stable/10/sys/compat/freebsd32/freebsd32_proto.h ============================================================================== --- stable/10/sys/compat/freebsd32/freebsd32_proto.h Wed May 10 22:45:05 2017 (r318163) +++ stable/10/sys/compat/freebsd32/freebsd32_proto.h Wed May 10 23:09:17 2017 (r318164) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/10/sys/compat/freebsd32/syscalls.master 293474 2016-01-09 14:20:23Z dchagin */ #ifndef _FREEBSD32_SYSPROTO_H_ Modified: stable/10/sys/compat/freebsd32/freebsd32_syscall.h ============================================================================== --- stable/10/sys/compat/freebsd32/freebsd32_syscall.h Wed May 10 22:45:05 2017 (r318163) +++ stable/10/sys/compat/freebsd32/freebsd32_syscall.h Wed May 10 23:09:17 2017 (r318164) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/10/sys/compat/freebsd32/syscalls.master 293474 2016-01-09 14:20:23Z dchagin */ #define FREEBSD32_SYS_syscall 0 Modified: stable/10/sys/compat/freebsd32/freebsd32_syscalls.c ============================================================================== --- stable/10/sys/compat/freebsd32/freebsd32_syscalls.c Wed May 10 22:45:05 2017 (r318163) +++ stable/10/sys/compat/freebsd32/freebsd32_syscalls.c Wed May 10 23:09:17 2017 (r318164) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/10/sys/compat/freebsd32/syscalls.master 293474 2016-01-09 14:20:23Z dchagin */ const char *freebsd32_syscallnames[] = { Modified: stable/10/sys/compat/freebsd32/freebsd32_sysent.c ============================================================================== --- stable/10/sys/compat/freebsd32/freebsd32_sysent.c Wed May 10 22:45:05 2017 (r318163) +++ stable/10/sys/compat/freebsd32/freebsd32_sysent.c Wed May 10 23:09:17 2017 (r318164) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/10/sys/compat/freebsd32/syscalls.master 293474 2016-01-09 14:20:23Z dchagin */ #include "opt_compat.h" Modified: stable/10/sys/compat/svr4/svr4_proto.h ============================================================================== --- stable/10/sys/compat/svr4/svr4_proto.h Wed May 10 22:45:05 2017 (r318163) +++ stable/10/sys/compat/svr4/svr4_proto.h Wed May 10 23:09:17 2017 (r318164) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/svr4/syscalls.master 227691 2011-11-19 06:35:15Z ed */ #ifndef _SVR4_SYSPROTO_H_ @@ -12,8 +11,10 @@ #include #include #include +#include #include #include +#include #include Modified: stable/10/sys/compat/svr4/svr4_syscall.h ============================================================================== --- stable/10/sys/compat/svr4/svr4_syscall.h Wed May 10 22:45:05 2017 (r318163) +++ stable/10/sys/compat/svr4/svr4_syscall.h Wed May 10 23:09:17 2017 (r318164) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/svr4/syscalls.master 227691 2011-11-19 06:35:15Z ed */ #define SVR4_SYS_exit 1 Modified: stable/10/sys/compat/svr4/svr4_syscallnames.c ============================================================================== --- stable/10/sys/compat/svr4/svr4_syscallnames.c Wed May 10 22:45:05 2017 (r318163) +++ stable/10/sys/compat/svr4/svr4_syscallnames.c Wed May 10 23:09:17 2017 (r318164) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/svr4/syscalls.master 227691 2011-11-19 06:35:15Z ed */ const char *svr4_syscallnames[] = { Modified: stable/10/sys/compat/svr4/svr4_sysent.c ============================================================================== --- stable/10/sys/compat/svr4/svr4_sysent.c Wed May 10 22:45:05 2017 (r318163) +++ stable/10/sys/compat/svr4/svr4_sysent.c Wed May 10 23:09:17 2017 (r318164) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/svr4/syscalls.master 227691 2011-11-19 06:35:15Z ed */ #include Modified: stable/10/sys/i386/ibcs2/ibcs2_proto.h ============================================================================== --- stable/10/sys/i386/ibcs2/ibcs2_proto.h Wed May 10 22:45:05 2017 (r318163) +++ stable/10/sys/i386/ibcs2/ibcs2_proto.h Wed May 10 23:09:17 2017 (r318164) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/i386/ibcs2/syscalls.master 227691 2011-11-19 06:35:15Z ed */ #ifndef _IBCS2_SYSPROTO_H_ @@ -12,8 +11,10 @@ #include #include #include +#include #include #include +#include #include Modified: stable/10/sys/i386/ibcs2/ibcs2_syscall.h ============================================================================== --- stable/10/sys/i386/ibcs2/ibcs2_syscall.h Wed May 10 22:45:05 2017 (r318163) +++ stable/10/sys/i386/ibcs2/ibcs2_syscall.h Wed May 10 23:09:17 2017 (r318164) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/i386/ibcs2/syscalls.master 227691 2011-11-19 06:35:15Z ed */ #define IBCS2_SYS_syscall 0 Modified: stable/10/sys/i386/ibcs2/ibcs2_sysent.c ============================================================================== --- stable/10/sys/i386/ibcs2/ibcs2_sysent.c Wed May 10 22:45:05 2017 (r318163) +++ stable/10/sys/i386/ibcs2/ibcs2_sysent.c Wed May 10 23:09:17 2017 (r318164) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/i386/ibcs2/syscalls.master 227691 2011-11-19 06:35:15Z ed */ #include Modified: stable/10/sys/i386/linux/linux_proto.h ============================================================================== --- stable/10/sys/i386/linux/linux_proto.h Wed May 10 22:45:05 2017 (r318163) +++ stable/10/sys/i386/linux/linux_proto.h Wed May 10 23:09:17 2017 (r318164) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/10/sys/i386/linux/syscalls.master 302962 2016-07-17 15:07:33Z dchagin */ #ifndef _LINUX_SYSPROTO_H_ Modified: stable/10/sys/i386/linux/linux_syscall.h ============================================================================== --- stable/10/sys/i386/linux/linux_syscall.h Wed May 10 22:45:05 2017 (r318163) +++ stable/10/sys/i386/linux/linux_syscall.h Wed May 10 23:09:17 2017 (r318164) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/10/sys/i386/linux/syscalls.master 302962 2016-07-17 15:07:33Z dchagin */ #define LINUX_SYS_linux_exit 1 Modified: stable/10/sys/i386/linux/linux_syscalls.c ============================================================================== --- stable/10/sys/i386/linux/linux_syscalls.c Wed May 10 22:45:05 2017 (r318163) +++ stable/10/sys/i386/linux/linux_syscalls.c Wed May 10 23:09:17 2017 (r318164) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/10/sys/i386/linux/syscalls.master 302962 2016-07-17 15:07:33Z dchagin */ const char *linux_syscallnames[] = { Modified: stable/10/sys/i386/linux/linux_sysent.c ============================================================================== --- stable/10/sys/i386/linux/linux_sysent.c Wed May 10 22:45:05 2017 (r318163) +++ stable/10/sys/i386/linux/linux_sysent.c Wed May 10 23:09:17 2017 (r318164) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/10/sys/i386/linux/syscalls.master 302962 2016-07-17 15:07:33Z dchagin */ #include Modified: stable/10/sys/kern/init_sysent.c ============================================================================== --- stable/10/sys/kern/init_sysent.c Wed May 10 22:45:05 2017 (r318163) +++ stable/10/sys/kern/init_sysent.c Wed May 10 23:09:17 2017 (r318164) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/10/sys/kern/syscalls.master 293474 2016-01-09 14:20:23Z dchagin */ #include "opt_compat.h" Modified: stable/10/sys/kern/makesyscalls.sh ============================================================================== --- stable/10/sys/kern/makesyscalls.sh Wed May 10 22:45:05 2017 (r318163) +++ stable/10/sys/kern/makesyscalls.sh Wed May 10 23:09:17 2017 (r318164) @@ -113,10 +113,12 @@ sed -e ' printf "/*\n * System call switch table.\n *\n" > syssw printf " * DO NOT EDIT-- this file is automatically generated.\n" > syssw printf " * $%s$\n", "FreeBSD" > syssw + printf " */\n\n" > syssw printf "/*\n * System call prototypes.\n *\n" > sysarg printf " * DO NOT EDIT-- this file is automatically generated.\n" > sysarg printf " * $%s$\n", "FreeBSD" > sysarg + printf " */\n\n" > sysarg printf "\n#ifdef %s\n\n", compat > syscompat printf "\n#ifdef %s\n\n", compat4 > syscompat4 @@ -126,11 +128,14 @@ sed -e ' printf "/*\n * System call names.\n *\n" > sysnames printf " * DO NOT EDIT-- this file is automatically generated.\n" > sysnames printf " * $%s$\n", "FreeBSD" > sysnames + printf " */\n\n" > sysnames printf "/*\n * System call numbers.\n *\n" > syshdr printf " * DO NOT EDIT-- this file is automatically generated.\n" > syshdr printf " * $%s$\n", "FreeBSD" > syshdr - printf "# FreeBSD system call names.\n" > sysmk + printf " */\n\n" > syshdr + + printf "# FreeBSD system call object files.\n" > sysmk printf "# DO NOT EDIT-- this file is automatically generated.\n" > sysmk printf "# $%s$\n", "FreeBSD" > sysmk @@ -139,15 +144,9 @@ sed -e ' printf " * $%s$\n", "FreeBSD" > systrace } NR == 1 { - gsub("[$]FreeBSD: ", "FreeBSD: ", $0) - gsub(" [$]", "", $0) - - printf " * created from%s\n */\n\n", $0 > syssw - printf "\n/* The casts are bogus but will do for now. */\n" > sysent printf "struct sysent %s[] = {\n",switchname > sysent - printf " * created from%s\n */\n\n", $0 > sysarg printf "#ifndef %s\n", sysproto_h > sysarg printf "#define\t%s\n\n", sysproto_h > sysarg printf "#include \n" > sysarg @@ -170,12 +169,9 @@ sed -e ' printf "#define\tPADR_(t)\t0\n" > sysarg printf "#endif\n\n" > sysarg - printf " * created from%s\n */\n\n", $0 > sysnames printf "const char *%s[] = {\n", namesname > sysnames - printf " * created from%s\n */\n\n", $0 > syshdr - - printf "# created from%s\nMIASM = ", $0 > sysmk + printf "MIASM = " > sysmk printf " * This file is part of the DTrace syscall provider.\n */\n\n" > systrace printf "static void\nsystrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)\n{\n" > systrace Modified: stable/10/sys/kern/syscalls.c ============================================================================== --- stable/10/sys/kern/syscalls.c Wed May 10 22:45:05 2017 (r318163) +++ stable/10/sys/kern/syscalls.c Wed May 10 23:09:17 2017 (r318164) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/10/sys/kern/syscalls.master 293474 2016-01-09 14:20:23Z dchagin */ const char *syscallnames[] = { Modified: stable/10/sys/sys/syscall.h ============================================================================== --- stable/10/sys/sys/syscall.h Wed May 10 22:45:05 2017 (r318163) +++ stable/10/sys/sys/syscall.h Wed May 10 23:09:17 2017 (r318164) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/10/sys/kern/syscalls.master 293474 2016-01-09 14:20:23Z dchagin */ #define SYS_syscall 0 Modified: stable/10/sys/sys/syscall.mk ============================================================================== --- stable/10/sys/sys/syscall.mk Wed May 10 22:45:05 2017 (r318163) +++ stable/10/sys/sys/syscall.mk Wed May 10 23:09:17 2017 (r318164) @@ -1,7 +1,6 @@ -# FreeBSD system call names. +# FreeBSD system call object files. # DO NOT EDIT-- this file is automatically generated. # $FreeBSD$ -# created from FreeBSD: stable/10/sys/kern/syscalls.master 293474 2016-01-09 14:20:23Z dchagin MIASM = \ syscall.o \ exit.o \ Modified: stable/10/sys/sys/sysproto.h ============================================================================== --- stable/10/sys/sys/sysproto.h Wed May 10 22:45:05 2017 (r318163) +++ stable/10/sys/sys/sysproto.h Wed May 10 23:09:17 2017 (r318164) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/10/sys/kern/syscalls.master 293474 2016-01-09 14:20:23Z dchagin */ #ifndef _SYS_SYSPROTO_H_ From owner-svn-src-stable@freebsd.org Wed May 10 23:09:25 2017 Return-Path: Delivered-To: svn-src-stable@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 BB5DCD6758A; Wed, 10 May 2017 23:09:25 +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 887BD688; Wed, 10 May 2017 23:09:25 +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 v4AN9OWj095137; Wed, 10 May 2017 23:09:24 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4AN9KKw095099; Wed, 10 May 2017 23:09:20 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201705102309.v4AN9KKw095099@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 10 May 2017 23:09:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318164 - in stable: 10/sys/amd64/linux 10/sys/amd64/linux32 10/sys/compat/freebsd32 10/sys/compat/svr4 10/sys/i386/ibcs2 10/sys/i386/linux 10/sys/kern 10/sys/sys 11/sys/amd64/linux 11/... X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 23:09:25 -0000 Author: jhb Date: Wed May 10 23:09:17 2017 New Revision: 318164 URL: https://svnweb.freebsd.org/changeset/base/318164 Log: MFC 313564: Drop the "created from" line from files generated by makesyscalls.sh. This information is less useful when the generated files are included in source control along with the source. If needed it can be reconstructed from the $FreeBSD$ tag in the generated file. Removing this information from the generated output permits committing the generated files along with the change to the system call master list without having inconsistent metadata in the generated files. Regenerate the affected files along with the MFC. Modified: stable/11/sys/amd64/linux/linux_proto.h stable/11/sys/amd64/linux/linux_syscall.h stable/11/sys/amd64/linux/linux_syscalls.c stable/11/sys/amd64/linux/linux_sysent.c stable/11/sys/amd64/linux32/linux32_proto.h stable/11/sys/amd64/linux32/linux32_syscall.h stable/11/sys/amd64/linux32/linux32_syscalls.c stable/11/sys/amd64/linux32/linux32_sysent.c stable/11/sys/compat/cloudabi32/cloudabi32_proto.h stable/11/sys/compat/cloudabi32/cloudabi32_syscall.h stable/11/sys/compat/cloudabi32/cloudabi32_syscalls.c stable/11/sys/compat/cloudabi32/cloudabi32_sysent.c stable/11/sys/compat/cloudabi64/cloudabi64_proto.h stable/11/sys/compat/cloudabi64/cloudabi64_syscall.h stable/11/sys/compat/cloudabi64/cloudabi64_syscalls.c stable/11/sys/compat/cloudabi64/cloudabi64_sysent.c stable/11/sys/compat/freebsd32/freebsd32_proto.h stable/11/sys/compat/freebsd32/freebsd32_syscall.h stable/11/sys/compat/freebsd32/freebsd32_syscalls.c stable/11/sys/compat/freebsd32/freebsd32_sysent.c stable/11/sys/compat/svr4/svr4_proto.h stable/11/sys/compat/svr4/svr4_syscall.h stable/11/sys/compat/svr4/svr4_syscallnames.c stable/11/sys/compat/svr4/svr4_sysent.c stable/11/sys/i386/ibcs2/ibcs2_proto.h stable/11/sys/i386/ibcs2/ibcs2_syscall.h stable/11/sys/i386/ibcs2/ibcs2_sysent.c stable/11/sys/i386/linux/linux_proto.h stable/11/sys/i386/linux/linux_syscall.h stable/11/sys/i386/linux/linux_syscalls.c stable/11/sys/i386/linux/linux_sysent.c stable/11/sys/kern/init_sysent.c stable/11/sys/kern/makesyscalls.sh stable/11/sys/kern/syscalls.c stable/11/sys/sys/syscall.h stable/11/sys/sys/syscall.mk stable/11/sys/sys/sysproto.h Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/amd64/linux/linux_proto.h stable/10/sys/amd64/linux/linux_syscall.h stable/10/sys/amd64/linux/linux_syscalls.c stable/10/sys/amd64/linux/linux_sysent.c stable/10/sys/amd64/linux32/linux32_proto.h stable/10/sys/amd64/linux32/linux32_syscall.h stable/10/sys/amd64/linux32/linux32_syscalls.c stable/10/sys/amd64/linux32/linux32_sysent.c stable/10/sys/compat/freebsd32/freebsd32_proto.h stable/10/sys/compat/freebsd32/freebsd32_syscall.h stable/10/sys/compat/freebsd32/freebsd32_syscalls.c stable/10/sys/compat/freebsd32/freebsd32_sysent.c stable/10/sys/compat/svr4/svr4_proto.h stable/10/sys/compat/svr4/svr4_syscall.h stable/10/sys/compat/svr4/svr4_syscallnames.c stable/10/sys/compat/svr4/svr4_sysent.c stable/10/sys/i386/ibcs2/ibcs2_proto.h stable/10/sys/i386/ibcs2/ibcs2_syscall.h stable/10/sys/i386/ibcs2/ibcs2_sysent.c stable/10/sys/i386/linux/linux_proto.h stable/10/sys/i386/linux/linux_syscall.h stable/10/sys/i386/linux/linux_syscalls.c stable/10/sys/i386/linux/linux_sysent.c stable/10/sys/kern/init_sysent.c stable/10/sys/kern/makesyscalls.sh stable/10/sys/kern/syscalls.c stable/10/sys/sys/syscall.h stable/10/sys/sys/syscall.mk stable/10/sys/sys/sysproto.h Directory Properties: stable/10/ (props changed) Modified: stable/11/sys/amd64/linux/linux_proto.h ============================================================================== --- stable/11/sys/amd64/linux/linux_proto.h Wed May 10 22:45:05 2017 (r318163) +++ stable/11/sys/amd64/linux/linux_proto.h Wed May 10 23:09:17 2017 (r318164) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/11/sys/amd64/linux/syscalls.master 316290 2017-03-30 19:56:41Z dchagin */ #ifndef _LINUX_SYSPROTO_H_ Modified: stable/11/sys/amd64/linux/linux_syscall.h ============================================================================== --- stable/11/sys/amd64/linux/linux_syscall.h Wed May 10 22:45:05 2017 (r318163) +++ stable/11/sys/amd64/linux/linux_syscall.h Wed May 10 23:09:17 2017 (r318164) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/11/sys/amd64/linux/syscalls.master 316290 2017-03-30 19:56:41Z dchagin */ #define LINUX_SYS_read 0 Modified: stable/11/sys/amd64/linux/linux_syscalls.c ============================================================================== --- stable/11/sys/amd64/linux/linux_syscalls.c Wed May 10 22:45:05 2017 (r318163) +++ stable/11/sys/amd64/linux/linux_syscalls.c Wed May 10 23:09:17 2017 (r318164) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/11/sys/amd64/linux/syscalls.master 316290 2017-03-30 19:56:41Z dchagin */ const char *linux_syscallnames[] = { Modified: stable/11/sys/amd64/linux/linux_sysent.c ============================================================================== --- stable/11/sys/amd64/linux/linux_sysent.c Wed May 10 22:45:05 2017 (r318163) +++ stable/11/sys/amd64/linux/linux_sysent.c Wed May 10 23:09:17 2017 (r318164) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/11/sys/amd64/linux/syscalls.master 316290 2017-03-30 19:56:41Z dchagin */ #include Modified: stable/11/sys/amd64/linux32/linux32_proto.h ============================================================================== --- stable/11/sys/amd64/linux32/linux32_proto.h Wed May 10 22:45:05 2017 (r318163) +++ stable/11/sys/amd64/linux32/linux32_proto.h Wed May 10 23:09:17 2017 (r318164) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/11/sys/amd64/linux32/syscalls.master 316290 2017-03-30 19:56:41Z dchagin */ #ifndef _LINUX32_SYSPROTO_H_ Modified: stable/11/sys/amd64/linux32/linux32_syscall.h ============================================================================== --- stable/11/sys/amd64/linux32/linux32_syscall.h Wed May 10 22:45:05 2017 (r318163) +++ stable/11/sys/amd64/linux32/linux32_syscall.h Wed May 10 23:09:17 2017 (r318164) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/11/sys/amd64/linux32/syscalls.master 316290 2017-03-30 19:56:41Z dchagin */ #define LINUX32_SYS_linux_exit 1 Modified: stable/11/sys/amd64/linux32/linux32_syscalls.c ============================================================================== --- stable/11/sys/amd64/linux32/linux32_syscalls.c Wed May 10 22:45:05 2017 (r318163) +++ stable/11/sys/amd64/linux32/linux32_syscalls.c Wed May 10 23:09:17 2017 (r318164) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/11/sys/amd64/linux32/syscalls.master 316290 2017-03-30 19:56:41Z dchagin */ const char *linux32_syscallnames[] = { Modified: stable/11/sys/amd64/linux32/linux32_sysent.c ============================================================================== --- stable/11/sys/amd64/linux32/linux32_sysent.c Wed May 10 22:45:05 2017 (r318163) +++ stable/11/sys/amd64/linux32/linux32_sysent.c Wed May 10 23:09:17 2017 (r318164) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/11/sys/amd64/linux32/syscalls.master 316290 2017-03-30 19:56:41Z dchagin */ #include "opt_compat.h" Modified: stable/11/sys/compat/cloudabi32/cloudabi32_proto.h ============================================================================== --- stable/11/sys/compat/cloudabi32/cloudabi32_proto.h Wed May 10 22:45:05 2017 (r318163) +++ stable/11/sys/compat/cloudabi32/cloudabi32_proto.h Wed May 10 23:09:17 2017 (r318164) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/contrib/cloudabi/syscalls32.master 312353 2017-01-17 22:03:08Z ed */ #ifndef _CLOUDABI32_SYSPROTO_H_ Modified: stable/11/sys/compat/cloudabi32/cloudabi32_syscall.h ============================================================================== --- stable/11/sys/compat/cloudabi32/cloudabi32_syscall.h Wed May 10 22:45:05 2017 (r318163) +++ stable/11/sys/compat/cloudabi32/cloudabi32_syscall.h Wed May 10 23:09:17 2017 (r318164) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/contrib/cloudabi/syscalls32.master 312353 2017-01-17 22:03:08Z ed */ #define CLOUDABI32_SYS_cloudabi_sys_clock_res_get 0 Modified: stable/11/sys/compat/cloudabi32/cloudabi32_syscalls.c ============================================================================== --- stable/11/sys/compat/cloudabi32/cloudabi32_syscalls.c Wed May 10 22:45:05 2017 (r318163) +++ stable/11/sys/compat/cloudabi32/cloudabi32_syscalls.c Wed May 10 23:09:17 2017 (r318164) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/contrib/cloudabi/syscalls32.master 312353 2017-01-17 22:03:08Z ed */ const char *cloudabi32_syscallnames[] = { Modified: stable/11/sys/compat/cloudabi32/cloudabi32_sysent.c ============================================================================== --- stable/11/sys/compat/cloudabi32/cloudabi32_sysent.c Wed May 10 22:45:05 2017 (r318163) +++ stable/11/sys/compat/cloudabi32/cloudabi32_sysent.c Wed May 10 23:09:17 2017 (r318164) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/contrib/cloudabi/syscalls32.master 312353 2017-01-17 22:03:08Z ed */ #include Modified: stable/11/sys/compat/cloudabi64/cloudabi64_proto.h ============================================================================== --- stable/11/sys/compat/cloudabi64/cloudabi64_proto.h Wed May 10 22:45:05 2017 (r318163) +++ stable/11/sys/compat/cloudabi64/cloudabi64_proto.h Wed May 10 23:09:17 2017 (r318164) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/contrib/cloudabi/syscalls64.master 312353 2017-01-17 22:03:08Z ed */ #ifndef _CLOUDABI64_SYSPROTO_H_ Modified: stable/11/sys/compat/cloudabi64/cloudabi64_syscall.h ============================================================================== --- stable/11/sys/compat/cloudabi64/cloudabi64_syscall.h Wed May 10 22:45:05 2017 (r318163) +++ stable/11/sys/compat/cloudabi64/cloudabi64_syscall.h Wed May 10 23:09:17 2017 (r318164) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/contrib/cloudabi/syscalls64.master 312353 2017-01-17 22:03:08Z ed */ #define CLOUDABI64_SYS_cloudabi_sys_clock_res_get 0 Modified: stable/11/sys/compat/cloudabi64/cloudabi64_syscalls.c ============================================================================== --- stable/11/sys/compat/cloudabi64/cloudabi64_syscalls.c Wed May 10 22:45:05 2017 (r318163) +++ stable/11/sys/compat/cloudabi64/cloudabi64_syscalls.c Wed May 10 23:09:17 2017 (r318164) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/contrib/cloudabi/syscalls64.master 312353 2017-01-17 22:03:08Z ed */ const char *cloudabi64_syscallnames[] = { Modified: stable/11/sys/compat/cloudabi64/cloudabi64_sysent.c ============================================================================== --- stable/11/sys/compat/cloudabi64/cloudabi64_sysent.c Wed May 10 22:45:05 2017 (r318163) +++ stable/11/sys/compat/cloudabi64/cloudabi64_sysent.c Wed May 10 23:09:17 2017 (r318164) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/contrib/cloudabi/syscalls64.master 312353 2017-01-17 22:03:08Z ed */ #include Modified: stable/11/sys/compat/freebsd32/freebsd32_proto.h ============================================================================== --- stable/11/sys/compat/freebsd32/freebsd32_proto.h Wed May 10 22:45:05 2017 (r318163) +++ stable/11/sys/compat/freebsd32/freebsd32_proto.h Wed May 10 23:09:17 2017 (r318164) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/11/sys/compat/freebsd32/syscalls.master 313450 2017-02-08 18:32:35Z jhb */ #ifndef _FREEBSD32_SYSPROTO_H_ Modified: stable/11/sys/compat/freebsd32/freebsd32_syscall.h ============================================================================== --- stable/11/sys/compat/freebsd32/freebsd32_syscall.h Wed May 10 22:45:05 2017 (r318163) +++ stable/11/sys/compat/freebsd32/freebsd32_syscall.h Wed May 10 23:09:17 2017 (r318164) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/11/sys/compat/freebsd32/syscalls.master 313450 2017-02-08 18:32:35Z jhb */ #define FREEBSD32_SYS_syscall 0 Modified: stable/11/sys/compat/freebsd32/freebsd32_syscalls.c ============================================================================== --- stable/11/sys/compat/freebsd32/freebsd32_syscalls.c Wed May 10 22:45:05 2017 (r318163) +++ stable/11/sys/compat/freebsd32/freebsd32_syscalls.c Wed May 10 23:09:17 2017 (r318164) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/11/sys/compat/freebsd32/syscalls.master 313450 2017-02-08 18:32:35Z jhb */ const char *freebsd32_syscallnames[] = { Modified: stable/11/sys/compat/freebsd32/freebsd32_sysent.c ============================================================================== --- stable/11/sys/compat/freebsd32/freebsd32_sysent.c Wed May 10 22:45:05 2017 (r318163) +++ stable/11/sys/compat/freebsd32/freebsd32_sysent.c Wed May 10 23:09:17 2017 (r318164) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/11/sys/compat/freebsd32/syscalls.master 313450 2017-02-08 18:32:35Z jhb */ #include "opt_compat.h" Modified: stable/11/sys/compat/svr4/svr4_proto.h ============================================================================== --- stable/11/sys/compat/svr4/svr4_proto.h Wed May 10 22:45:05 2017 (r318163) +++ stable/11/sys/compat/svr4/svr4_proto.h Wed May 10 23:09:17 2017 (r318164) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/svr4/syscalls.master 302096 2016-06-23 00:29:03Z brooks */ #ifndef _SVR4_SYSPROTO_H_ Modified: stable/11/sys/compat/svr4/svr4_syscall.h ============================================================================== --- stable/11/sys/compat/svr4/svr4_syscall.h Wed May 10 22:45:05 2017 (r318163) +++ stable/11/sys/compat/svr4/svr4_syscall.h Wed May 10 23:09:17 2017 (r318164) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/svr4/syscalls.master 302096 2016-06-23 00:29:03Z brooks */ #define SVR4_SYS_exit 1 Modified: stable/11/sys/compat/svr4/svr4_syscallnames.c ============================================================================== --- stable/11/sys/compat/svr4/svr4_syscallnames.c Wed May 10 22:45:05 2017 (r318163) +++ stable/11/sys/compat/svr4/svr4_syscallnames.c Wed May 10 23:09:17 2017 (r318164) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/svr4/syscalls.master 302096 2016-06-23 00:29:03Z brooks */ const char *svr4_syscallnames[] = { Modified: stable/11/sys/compat/svr4/svr4_sysent.c ============================================================================== --- stable/11/sys/compat/svr4/svr4_sysent.c Wed May 10 22:45:05 2017 (r318163) +++ stable/11/sys/compat/svr4/svr4_sysent.c Wed May 10 23:09:17 2017 (r318164) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/svr4/syscalls.master 302096 2016-06-23 00:29:03Z brooks */ #include Modified: stable/11/sys/i386/ibcs2/ibcs2_proto.h ============================================================================== --- stable/11/sys/i386/ibcs2/ibcs2_proto.h Wed May 10 22:45:05 2017 (r318163) +++ stable/11/sys/i386/ibcs2/ibcs2_proto.h Wed May 10 23:09:17 2017 (r318164) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/i386/ibcs2/syscalls.master 227691 2011-11-19 06:35:15Z ed */ #ifndef _IBCS2_SYSPROTO_H_ @@ -12,8 +11,10 @@ #include #include #include +#include #include #include +#include #include @@ -351,6 +352,12 @@ int ibcs2_isc(struct thread *, struct ib #endif /* COMPAT_FREEBSD7 */ + +#ifdef COMPAT_FREEBSD10 + + +#endif /* COMPAT_FREEBSD10 */ + #define IBCS2_SYS_AUE_ibcs2_read AUE_NULL #define IBCS2_SYS_AUE_ibcs2_open AUE_OPEN_RWTC #define IBCS2_SYS_AUE_ibcs2_wait AUE_WAIT4 Modified: stable/11/sys/i386/ibcs2/ibcs2_syscall.h ============================================================================== --- stable/11/sys/i386/ibcs2/ibcs2_syscall.h Wed May 10 22:45:05 2017 (r318163) +++ stable/11/sys/i386/ibcs2/ibcs2_syscall.h Wed May 10 23:09:17 2017 (r318164) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/i386/ibcs2/syscalls.master 227691 2011-11-19 06:35:15Z ed */ #define IBCS2_SYS_syscall 0 Modified: stable/11/sys/i386/ibcs2/ibcs2_sysent.c ============================================================================== --- stable/11/sys/i386/ibcs2/ibcs2_sysent.c Wed May 10 22:45:05 2017 (r318163) +++ stable/11/sys/i386/ibcs2/ibcs2_sysent.c Wed May 10 23:09:17 2017 (r318164) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/i386/ibcs2/syscalls.master 227691 2011-11-19 06:35:15Z ed */ #include Modified: stable/11/sys/i386/linux/linux_proto.h ============================================================================== --- stable/11/sys/i386/linux/linux_proto.h Wed May 10 22:45:05 2017 (r318163) +++ stable/11/sys/i386/linux/linux_proto.h Wed May 10 23:09:17 2017 (r318164) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/11/sys/i386/linux/syscalls.master 316290 2017-03-30 19:56:41Z dchagin */ #ifndef _LINUX_SYSPROTO_H_ Modified: stable/11/sys/i386/linux/linux_syscall.h ============================================================================== --- stable/11/sys/i386/linux/linux_syscall.h Wed May 10 22:45:05 2017 (r318163) +++ stable/11/sys/i386/linux/linux_syscall.h Wed May 10 23:09:17 2017 (r318164) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/11/sys/i386/linux/syscalls.master 316290 2017-03-30 19:56:41Z dchagin */ #define LINUX_SYS_linux_exit 1 Modified: stable/11/sys/i386/linux/linux_syscalls.c ============================================================================== --- stable/11/sys/i386/linux/linux_syscalls.c Wed May 10 22:45:05 2017 (r318163) +++ stable/11/sys/i386/linux/linux_syscalls.c Wed May 10 23:09:17 2017 (r318164) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/11/sys/i386/linux/syscalls.master 316290 2017-03-30 19:56:41Z dchagin */ const char *linux_syscallnames[] = { Modified: stable/11/sys/i386/linux/linux_sysent.c ============================================================================== --- stable/11/sys/i386/linux/linux_sysent.c Wed May 10 22:45:05 2017 (r318163) +++ stable/11/sys/i386/linux/linux_sysent.c Wed May 10 23:09:17 2017 (r318164) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/11/sys/i386/linux/syscalls.master 316290 2017-03-30 19:56:41Z dchagin */ #include Modified: stable/11/sys/kern/init_sysent.c ============================================================================== --- stable/11/sys/kern/init_sysent.c Wed May 10 22:45:05 2017 (r318163) +++ stable/11/sys/kern/init_sysent.c Wed May 10 23:09:17 2017 (r318164) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/11/sys/kern/syscalls.master 313450 2017-02-08 18:32:35Z jhb */ #include "opt_compat.h" Modified: stable/11/sys/kern/makesyscalls.sh ============================================================================== --- stable/11/sys/kern/makesyscalls.sh Wed May 10 22:45:05 2017 (r318163) +++ stable/11/sys/kern/makesyscalls.sh Wed May 10 23:09:17 2017 (r318164) @@ -119,10 +119,12 @@ sed -e ' printf "/*\n * System call switch table.\n *\n" > syssw printf " * DO NOT EDIT-- this file is automatically generated.\n" > syssw printf " * $%s$\n", "FreeBSD" > syssw + printf " */\n\n" > syssw printf "/*\n * System call prototypes.\n *\n" > sysarg printf " * DO NOT EDIT-- this file is automatically generated.\n" > sysarg printf " * $%s$\n", "FreeBSD" > sysarg + printf " */\n\n" > sysarg printf "\n#ifdef %s\n\n", compat > syscompat printf "\n#ifdef %s\n\n", compat4 > syscompat4 @@ -133,10 +135,13 @@ sed -e ' printf "/*\n * System call names.\n *\n" > sysnames printf " * DO NOT EDIT-- this file is automatically generated.\n" > sysnames printf " * $%s$\n", "FreeBSD" > sysnames + printf " */\n\n" > sysnames printf "/*\n * System call numbers.\n *\n" > syshdr printf " * DO NOT EDIT-- this file is automatically generated.\n" > syshdr printf " * $%s$\n", "FreeBSD" > syshdr + printf " */\n\n" > syshdr + printf "# FreeBSD system call object files.\n" > sysmk printf "# DO NOT EDIT-- this file is automatically generated.\n" > sysmk printf "# $%s$\n", "FreeBSD" > sysmk @@ -146,15 +151,9 @@ sed -e ' printf " * $%s$\n", "FreeBSD" > systrace } NR == 1 { - gsub("[$]FreeBSD: ", "FreeBSD: ", $0) - gsub(" [$]", "", $0) - - printf " * created from%s\n */\n\n", $0 > syssw - printf "\n/* The casts are bogus but will do for now. */\n" > sysent printf "struct sysent %s[] = {\n",switchname > sysent - printf " * created from%s\n */\n\n", $0 > sysarg printf "#ifndef %s\n", sysproto_h > sysarg printf "#define\t%s\n\n", sysproto_h > sysarg printf "#include \n" > sysarg @@ -177,12 +176,9 @@ sed -e ' printf "#define\tPADR_(t)\t0\n" > sysarg printf "#endif\n\n" > sysarg - printf " * created from%s\n */\n\n", $0 > sysnames printf "const char *%s[] = {\n", namesname > sysnames - printf " * created from%s\n */\n\n", $0 > syshdr - - printf "# created from%s\nMIASM = ", $0 > sysmk + printf "MIASM = " > sysmk printf " * This file is part of the DTrace syscall provider.\n */\n\n" > systrace printf "static void\nsystrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)\n{\n" > systrace Modified: stable/11/sys/kern/syscalls.c ============================================================================== --- stable/11/sys/kern/syscalls.c Wed May 10 22:45:05 2017 (r318163) +++ stable/11/sys/kern/syscalls.c Wed May 10 23:09:17 2017 (r318164) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/11/sys/kern/syscalls.master 313450 2017-02-08 18:32:35Z jhb */ const char *syscallnames[] = { Modified: stable/11/sys/sys/syscall.h ============================================================================== --- stable/11/sys/sys/syscall.h Wed May 10 22:45:05 2017 (r318163) +++ stable/11/sys/sys/syscall.h Wed May 10 23:09:17 2017 (r318164) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/11/sys/kern/syscalls.master 313450 2017-02-08 18:32:35Z jhb */ #define SYS_syscall 0 Modified: stable/11/sys/sys/syscall.mk ============================================================================== --- stable/11/sys/sys/syscall.mk Wed May 10 22:45:05 2017 (r318163) +++ stable/11/sys/sys/syscall.mk Wed May 10 23:09:17 2017 (r318164) @@ -1,7 +1,6 @@ # FreeBSD system call object files. # DO NOT EDIT-- this file is automatically generated. # $FreeBSD$ -# created from FreeBSD: stable/11/sys/kern/syscalls.master 313450 2017-02-08 18:32:35Z jhb MIASM = \ syscall.o \ exit.o \ Modified: stable/11/sys/sys/sysproto.h ============================================================================== --- stable/11/sys/sys/sysproto.h Wed May 10 22:45:05 2017 (r318163) +++ stable/11/sys/sys/sysproto.h Wed May 10 23:09:17 2017 (r318164) @@ -3,7 +3,6 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/11/sys/kern/syscalls.master 313450 2017-02-08 18:32:35Z jhb */ #ifndef _SYS_SYSPROTO_H_ From owner-svn-src-stable@freebsd.org Wed May 10 23:14:11 2017 Return-Path: Delivered-To: svn-src-stable@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 3F759D67825; Wed, 10 May 2017 23:14:11 +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 0E74DCCD; Wed, 10 May 2017 23:14:10 +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 v4ANEADn099378; Wed, 10 May 2017 23:14:10 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4ANEA1K099377; Wed, 10 May 2017 23:14:10 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201705102314.v4ANEA1K099377@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 10 May 2017 23:14: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: r318165 - in stable: 10/share/mk 11/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@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 23:14:11 -0000 Author: jhb Date: Wed May 10 23:14:09 2017 New Revision: 318165 URL: https://svnweb.freebsd.org/changeset/base/318165 Log: MFC 314894: Fix a couple of typos and reword some sentences in bsd.README. Modified: stable/10/share/mk/bsd.README Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/share/mk/bsd.README Directory Properties: stable/11/ (props changed) Modified: stable/10/share/mk/bsd.README ============================================================================== --- stable/10/share/mk/bsd.README Wed May 10 23:09:17 2017 (r318164) +++ stable/10/share/mk/bsd.README Wed May 10 23:14:09 2017 (r318165) @@ -253,7 +253,7 @@ PROG_CXX If defined, the name of the pro of PROG if PROG is also set. PROGS When used with , allow building multiple -PROGS_CXX PROG and PROGS_CXX in one Makefile. To define +PROGS_CXX PROG and PROG_CXX in one Makefile. To define individual variables for each program the VAR.prog syntax should be used. For example: @@ -470,7 +470,7 @@ SRCS List of source files to build the versions of make.) SHLIB_LDSCRIPT Template file to generate shared library linker script. - Unless used, a simple symlink is created to the real + If not defined, a simple symlink is created to the real shared object. LIBRARIES_ONLY Do not build or install files other than the library. From owner-svn-src-stable@freebsd.org Wed May 10 23:14:11 2017 Return-Path: Delivered-To: svn-src-stable@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 8A447D67829; Wed, 10 May 2017 23:14:11 +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 419E1CCE; Wed, 10 May 2017 23:14:11 +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 v4ANEALK099384; Wed, 10 May 2017 23:14:10 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4ANEA1j099383; Wed, 10 May 2017 23:14:10 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201705102314.v4ANEA1j099383@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 10 May 2017 23:14:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318165 - in stable: 10/share/mk 11/share/mk X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 23:14:11 -0000 Author: jhb Date: Wed May 10 23:14:09 2017 New Revision: 318165 URL: https://svnweb.freebsd.org/changeset/base/318165 Log: MFC 314894: Fix a couple of typos and reword some sentences in bsd.README. Modified: stable/11/share/mk/bsd.README Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/share/mk/bsd.README Directory Properties: stable/10/ (props changed) Modified: stable/11/share/mk/bsd.README ============================================================================== --- stable/11/share/mk/bsd.README Wed May 10 23:09:17 2017 (r318164) +++ stable/11/share/mk/bsd.README Wed May 10 23:14:09 2017 (r318165) @@ -127,7 +127,7 @@ ACFLAGS.${SRC} CFLAGS.${SRC} Flags dependent on source file name. CFLAGS.${COMPILER_TYPE} - Flags dependent on compiler added to CXXFLAGS. + Flags dependent on compiler added to CFLAGS. CFLAGS.${MACHINE_ARCH} Architectural flags added to CFLAGS. CFLAGS_NO_SIMD Add this to CFLAGS for programs that don't want any SIMD @@ -311,7 +311,7 @@ LDFLAGS Additional loader flags. Passed LIBADD Additional libraries. This is for base system libraries and is only valid inside of the /usr/src tree. - Rather than use LDADD=-lname use LIBADD=name. + Use LIBADD=name instead of LDADD=-lname. LINKS The list of binary links; should be full pathnames, the linked-to file coming first, followed by the linked @@ -335,7 +335,7 @@ PROG_CXX If defined, the name of the pro of PROG if PROG is also set. PROGS When used with , allow building multiple -PROGS_CXX PROG and PROGS_CXX in one Makefile. To define +PROGS_CXX PROG and PROG_CXX in one Makefile. To define individual variables for each program the VAR.prog syntax should be used. For example: @@ -511,7 +511,7 @@ LIB The name of the library to build. LIBADD Additional libraries. This is for base system libraries and is only valid inside of the /usr/src tree. - Rather than use LDADD=-lname use LIBADD=name. + Use LIBADD=name instead of LDADD=-lname. LIBDIR Target directory for libraries. @@ -540,7 +540,7 @@ SHLIB Like LIB but only builds a shared SHLIB_CXX Like LIB_CXX but only builds a shared library. SHLIB_LDSCRIPT Template file to generate shared library linker script. - Unless used, a simple symlink is created to the real + If not defined, a simple symlink is created to the real shared object. SRCS List of source files to build the library. Suffix types From owner-svn-src-stable@freebsd.org Thu May 11 00:27:28 2017 Return-Path: Delivered-To: svn-src-stable@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 26648D67BE3; Thu, 11 May 2017 00:27:28 +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 E159310B5; Thu, 11 May 2017 00:27:27 +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 v4B0RQp8027996; Thu, 11 May 2017 00:27:26 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4B0RQRB027995; Thu, 11 May 2017 00:27:26 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201705110027.v4B0RQRB027995@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 11 May 2017 00:27:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318168 - stable/11/sys/kern X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 May 2017 00:27:28 -0000 Author: jhb Date: Thu May 11 00:27:26 2017 New Revision: 318168 URL: https://svnweb.freebsd.org/changeset/base/318168 Log: MFC 315323: Use UMA_ALIGN_PTR instead of sizeof(void *) for zone alignment. uma_zcreate()'s alignment argument is supposed to be sizeof(foo) - 1, and uma.h provides a set of helper macros for common types. Passing sizeof(void *) results in all of the members being misaligned triggering unaligned access faults on certain architectures (notably MIPS). Modified: stable/11/sys/kern/vfs_lookup.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/vfs_lookup.c ============================================================================== --- stable/11/sys/kern/vfs_lookup.c Thu May 11 00:23:51 2017 (r318167) +++ stable/11/sys/kern/vfs_lookup.c Thu May 11 00:27:26 2017 (r318168) @@ -153,7 +153,7 @@ nameiinit(void *dummy __unused) namei_zone = uma_zcreate("NAMEI", MAXPATHLEN, NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); nt_zone = uma_zcreate("rentr", sizeof(struct nameicap_tracker), - NULL, NULL, NULL, NULL, sizeof(void *), 0); + NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); getnewvnode("crossmp", NULL, &crossmp_vnodeops, &vp_crossmp); } SYSINIT(vfs, SI_SUB_VFS, SI_ORDER_SECOND, nameiinit, NULL); From owner-svn-src-stable@freebsd.org Thu May 11 03:37:07 2017 Return-Path: Delivered-To: svn-src-stable@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 8612AD684B5; Thu, 11 May 2017 03:37:07 +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 57C0BBEB; Thu, 11 May 2017 03:37:07 +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 v4B3b62R005355; Thu, 11 May 2017 03:37:06 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4B3b6mM005354; Thu, 11 May 2017 03:37:06 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201705110337.v4B3b6mM005354@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 11 May 2017 03:37:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318169 - in stable: 10/sys/vm 11/sys/vm X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 May 2017 03:37:07 -0000 Author: jhb Date: Thu May 11 03:37:05 2017 New Revision: 318169 URL: https://svnweb.freebsd.org/changeset/base/318169 Log: MFC 316493: Assert that the align parameter to uma_zcreate() is valid. Modified: stable/11/sys/vm/uma_core.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/vm/uma_core.c Directory Properties: stable/10/ (props changed) Modified: stable/11/sys/vm/uma_core.c ============================================================================== --- stable/11/sys/vm/uma_core.c Thu May 11 00:27:26 2017 (r318168) +++ stable/11/sys/vm/uma_core.c Thu May 11 03:37:05 2017 (r318169) @@ -1888,6 +1888,9 @@ uma_zcreate(const char *name, size_t siz uma_zone_t res; bool locked; + KASSERT(powerof2(align + 1), ("invalid zone alignment %d for \"%s\"", + align, name)); + /* This stuff is essential for the zone ctor */ memset(&args, 0, sizeof(args)); args.name = name; From owner-svn-src-stable@freebsd.org Thu May 11 03:37:07 2017 Return-Path: Delivered-To: svn-src-stable@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 5F386D684B1; Thu, 11 May 2017 03:37:07 +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 2E555BE7; Thu, 11 May 2017 03:37:07 +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 v4B3b6VO005349; Thu, 11 May 2017 03:37:06 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4B3b6Pg005348; Thu, 11 May 2017 03:37:06 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201705110337.v4B3b6Pg005348@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 11 May 2017 03:37: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: r318169 - in stable: 10/sys/vm 11/sys/vm 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@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 May 2017 03:37:07 -0000 Author: jhb Date: Thu May 11 03:37:05 2017 New Revision: 318169 URL: https://svnweb.freebsd.org/changeset/base/318169 Log: MFC 316493: Assert that the align parameter to uma_zcreate() is valid. Modified: stable/10/sys/vm/uma_core.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/vm/uma_core.c Directory Properties: stable/11/ (props changed) Modified: stable/10/sys/vm/uma_core.c ============================================================================== --- stable/10/sys/vm/uma_core.c Thu May 11 00:27:26 2017 (r318168) +++ stable/10/sys/vm/uma_core.c Thu May 11 03:37:05 2017 (r318169) @@ -1937,6 +1937,9 @@ uma_zcreate(const char *name, size_t siz uma_zone_t res; bool locked; + KASSERT(powerof2(align + 1), ("invalid zone alignment %d for \"%s\"", + align, name)); + /* This stuff is essential for the zone ctor */ memset(&args, 0, sizeof(args)); args.name = name; From owner-svn-src-stable@freebsd.org Thu May 11 03:41:56 2017 Return-Path: Delivered-To: svn-src-stable@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 8A0F6D68A19; Thu, 11 May 2017 03:41:56 +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 5A2E71278; Thu, 11 May 2017 03:41:56 +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 v4B3ft0w007005; Thu, 11 May 2017 03:41:55 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4B3ftup007004; Thu, 11 May 2017 03:41:55 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201705110341.v4B3ftup007004@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 11 May 2017 03:41:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318170 - stable/11/sys/conf X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 May 2017 03:41:56 -0000 Author: jhb Date: Thu May 11 03:41:55 2017 New Revision: 318170 URL: https://svnweb.freebsd.org/changeset/base/318170 Log: MFC 316512,316537: Use correct linker emulations for armeb and riscv. Modified: stable/11/sys/conf/kern.mk Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/conf/kern.mk ============================================================================== --- stable/11/sys/conf/kern.mk Thu May 11 03:37:05 2017 (r318169) +++ stable/11/sys/conf/kern.mk Thu May 11 03:41:55 2017 (r318170) @@ -238,7 +238,7 @@ CFLAGS+= -std=${CSTD} LD_EMULATION_aarch64=aarch64elf LD_EMULATION_amd64=elf_x86_64_fbsd LD_EMULATION_arm=armelf_fbsd -LD_EMULATION_armeb=armelf_fbsd +LD_EMULATION_armeb=armelfb_fbsd LD_EMULATION_armv6=armelf_fbsd LD_EMULATION_i386=elf_i386_fbsd LD_EMULATION_mips= elf32btsmip_fbsd @@ -249,6 +249,6 @@ LD_EMULATION_mipsn32= elf32btsmipn32_fbs LD_EMULATION_mipsn32el= elf32btsmipn32_fbsd # I don't think this is a thing that works LD_EMULATION_powerpc= elf32ppc_fbsd LD_EMULATION_powerpc64= elf64ppc_fbsd -LD_EMULATION_riscv= elf64riscv +LD_EMULATION_riscv64= elf64lriscv LD_EMULATION_sparc64= elf64_sparc_fbsd LD_EMULATION=${LD_EMULATION_${MACHINE_ARCH}} From owner-svn-src-stable@freebsd.org Thu May 11 04:29:22 2017 Return-Path: Delivered-To: svn-src-stable@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 11699D6812E; Thu, 11 May 2017 04:29:22 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C6D9BCD1; Thu, 11 May 2017 04:29:21 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4B4TKdU025424; Thu, 11 May 2017 04:29:20 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4B4TKeu025423; Thu, 11 May 2017 04:29:20 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201705110429.v4B4TKeu025423@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 11 May 2017 04:29: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: r318172 - in stable: 10/sys/kern 11/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@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 May 2017 04:29:22 -0000 Author: jhb Date: Thu May 11 04:29:20 2017 New Revision: 318172 URL: https://svnweb.freebsd.org/changeset/base/318172 Log: MFC 313999: Consolidate statements to initialize files. Previously, the first lines of various generated files from system call tables were generated in two sections. Some of the initialization was done in BEGIN, and the rest was done when the first line was encountered. The main reason for this split before r313564 was that most of the initialization done in the second section depended on the $FreeBSD$ tag extracted from the system call table. Now that the $FreeBSD$ tag is no longer used, consolidate all of the file initialization in the BEGIN section. This change was tested by confirming that the content of generated files did not change. Modified: stable/10/sys/kern/makesyscalls.sh Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/kern/makesyscalls.sh Directory Properties: stable/11/ (props changed) Modified: stable/10/sys/kern/makesyscalls.sh ============================================================================== --- stable/10/sys/kern/makesyscalls.sh Thu May 11 03:47:58 2017 (r318171) +++ stable/10/sys/kern/makesyscalls.sh Thu May 11 04:29:20 2017 (r318172) @@ -110,6 +110,9 @@ sed -e ' split(capenabled_string, capenabled, ","); + printf "\n/* The casts are bogus but will do for now. */\n" > sysent + printf "struct sysent %s[] = {\n",switchname > sysent + printf "/*\n * System call switch table.\n *\n" > syssw printf " * DO NOT EDIT-- this file is automatically generated.\n" > syssw printf " * $%s$\n", "FreeBSD" > syssw @@ -119,34 +122,6 @@ sed -e ' printf " * DO NOT EDIT-- this file is automatically generated.\n" > sysarg printf " * $%s$\n", "FreeBSD" > sysarg printf " */\n\n" > sysarg - - printf "\n#ifdef %s\n\n", compat > syscompat - printf "\n#ifdef %s\n\n", compat4 > syscompat4 - printf "\n#ifdef %s\n\n", compat6 > syscompat6 - printf "\n#ifdef %s\n\n", compat7 > syscompat7 - - printf "/*\n * System call names.\n *\n" > sysnames - printf " * DO NOT EDIT-- this file is automatically generated.\n" > sysnames - printf " * $%s$\n", "FreeBSD" > sysnames - printf " */\n\n" > sysnames - - printf "/*\n * System call numbers.\n *\n" > syshdr - printf " * DO NOT EDIT-- this file is automatically generated.\n" > syshdr - printf " * $%s$\n", "FreeBSD" > syshdr - printf " */\n\n" > syshdr - - printf "# FreeBSD system call object files.\n" > sysmk - printf "# DO NOT EDIT-- this file is automatically generated.\n" > sysmk - printf "# $%s$\n", "FreeBSD" > sysmk - - printf "/*\n * System call argument to DTrace register array converstion.\n *\n" > systrace - printf " * DO NOT EDIT-- this file is automatically generated.\n" > systrace - printf " * $%s$\n", "FreeBSD" > systrace - } - NR == 1 { - printf "\n/* The casts are bogus but will do for now. */\n" > sysent - printf "struct sysent %s[] = {\n",switchname > sysent - printf "#ifndef %s\n", sysproto_h > sysarg printf "#define\t%s\n\n", sysproto_h > sysarg printf "#include \n" > sysarg @@ -169,10 +144,30 @@ sed -e ' printf "#define\tPADR_(t)\t0\n" > sysarg printf "#endif\n\n" > sysarg + printf "\n#ifdef %s\n\n", compat > syscompat + printf "\n#ifdef %s\n\n", compat4 > syscompat4 + printf "\n#ifdef %s\n\n", compat6 > syscompat6 + printf "\n#ifdef %s\n\n", compat7 > syscompat7 + + printf "/*\n * System call names.\n *\n" > sysnames + printf " * DO NOT EDIT-- this file is automatically generated.\n" > sysnames + printf " * $%s$\n", "FreeBSD" > sysnames + printf " */\n\n" > sysnames printf "const char *%s[] = {\n", namesname > sysnames + printf "/*\n * System call numbers.\n *\n" > syshdr + printf " * DO NOT EDIT-- this file is automatically generated.\n" > syshdr + printf " * $%s$\n", "FreeBSD" > syshdr + printf " */\n\n" > syshdr + + printf "# FreeBSD system call object files.\n" > sysmk + printf "# DO NOT EDIT-- this file is automatically generated.\n" > sysmk + printf "# $%s$\n", "FreeBSD" > sysmk printf "MIASM = " > sysmk + printf "/*\n * System call argument to DTrace register array converstion.\n *\n" > systrace + printf " * DO NOT EDIT-- this file is automatically generated.\n" > systrace + printf " * $%s$\n", "FreeBSD" > systrace printf " * This file is part of the DTrace syscall provider.\n */\n\n" > systrace printf "static void\nsystrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)\n{\n" > systrace printf "\tint64_t *iarg = (int64_t *) uarg;\n" > systrace @@ -183,7 +178,8 @@ sed -e ' printf "static void\nsystrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)\n{\n\tconst char *p = NULL;\n" > systraceret printf "\tswitch (sysnum) {\n" > systraceret - + } + NR == 1 { next } NF == 0 || $1 ~ /^;/ { From owner-svn-src-stable@freebsd.org Thu May 11 04:29:22 2017 Return-Path: Delivered-To: svn-src-stable@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 47151D68133; Thu, 11 May 2017 04:29:22 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0872ECD2; Thu, 11 May 2017 04:29:21 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4B4TL9p025430; Thu, 11 May 2017 04:29:21 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4B4TLCh025429; Thu, 11 May 2017 04:29:21 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201705110429.v4B4TLCh025429@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 11 May 2017 04:29:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318172 - in stable: 10/sys/kern 11/sys/kern X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 May 2017 04:29:22 -0000 Author: jhb Date: Thu May 11 04:29:20 2017 New Revision: 318172 URL: https://svnweb.freebsd.org/changeset/base/318172 Log: MFC 313999: Consolidate statements to initialize files. Previously, the first lines of various generated files from system call tables were generated in two sections. Some of the initialization was done in BEGIN, and the rest was done when the first line was encountered. The main reason for this split before r313564 was that most of the initialization done in the second section depended on the $FreeBSD$ tag extracted from the system call table. Now that the $FreeBSD$ tag is no longer used, consolidate all of the file initialization in the BEGIN section. This change was tested by confirming that the content of generated files did not change. Modified: stable/11/sys/kern/makesyscalls.sh Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/kern/makesyscalls.sh Directory Properties: stable/10/ (props changed) Modified: stable/11/sys/kern/makesyscalls.sh ============================================================================== --- stable/11/sys/kern/makesyscalls.sh Thu May 11 03:47:58 2017 (r318171) +++ stable/11/sys/kern/makesyscalls.sh Thu May 11 04:29:20 2017 (r318172) @@ -116,6 +116,9 @@ sed -e ' split(capenabled_string, capenabled, ","); + printf "\n/* The casts are bogus but will do for now. */\n" > sysent + printf "struct sysent %s[] = {\n",switchname > sysent + printf "/*\n * System call switch table.\n *\n" > syssw printf " * DO NOT EDIT-- this file is automatically generated.\n" > syssw printf " * $%s$\n", "FreeBSD" > syssw @@ -125,35 +128,6 @@ sed -e ' printf " * DO NOT EDIT-- this file is automatically generated.\n" > sysarg printf " * $%s$\n", "FreeBSD" > sysarg printf " */\n\n" > sysarg - - printf "\n#ifdef %s\n\n", compat > syscompat - printf "\n#ifdef %s\n\n", compat4 > syscompat4 - printf "\n#ifdef %s\n\n", compat6 > syscompat6 - printf "\n#ifdef %s\n\n", compat7 > syscompat7 - printf "\n#ifdef %s\n\n", compat10 > syscompat10 - - printf "/*\n * System call names.\n *\n" > sysnames - printf " * DO NOT EDIT-- this file is automatically generated.\n" > sysnames - printf " * $%s$\n", "FreeBSD" > sysnames - printf " */\n\n" > sysnames - - printf "/*\n * System call numbers.\n *\n" > syshdr - printf " * DO NOT EDIT-- this file is automatically generated.\n" > syshdr - printf " * $%s$\n", "FreeBSD" > syshdr - printf " */\n\n" > syshdr - - printf "# FreeBSD system call object files.\n" > sysmk - printf "# DO NOT EDIT-- this file is automatically generated.\n" > sysmk - printf "# $%s$\n", "FreeBSD" > sysmk - - printf "/*\n * System call argument to DTrace register array converstion.\n *\n" > systrace - printf " * DO NOT EDIT-- this file is automatically generated.\n" > systrace - printf " * $%s$\n", "FreeBSD" > systrace - } - NR == 1 { - printf "\n/* The casts are bogus but will do for now. */\n" > sysent - printf "struct sysent %s[] = {\n",switchname > sysent - printf "#ifndef %s\n", sysproto_h > sysarg printf "#define\t%s\n\n", sysproto_h > sysarg printf "#include \n" > sysarg @@ -176,10 +150,31 @@ sed -e ' printf "#define\tPADR_(t)\t0\n" > sysarg printf "#endif\n\n" > sysarg + printf "\n#ifdef %s\n\n", compat > syscompat + printf "\n#ifdef %s\n\n", compat4 > syscompat4 + printf "\n#ifdef %s\n\n", compat6 > syscompat6 + printf "\n#ifdef %s\n\n", compat7 > syscompat7 + printf "\n#ifdef %s\n\n", compat10 > syscompat10 + + printf "/*\n * System call names.\n *\n" > sysnames + printf " * DO NOT EDIT-- this file is automatically generated.\n" > sysnames + printf " * $%s$\n", "FreeBSD" > sysnames + printf " */\n\n" > sysnames printf "const char *%s[] = {\n", namesname > sysnames + printf "/*\n * System call numbers.\n *\n" > syshdr + printf " * DO NOT EDIT-- this file is automatically generated.\n" > syshdr + printf " * $%s$\n", "FreeBSD" > syshdr + printf " */\n\n" > syshdr + + printf "# FreeBSD system call object files.\n" > sysmk + printf "# DO NOT EDIT-- this file is automatically generated.\n" > sysmk + printf "# $%s$\n", "FreeBSD" > sysmk printf "MIASM = " > sysmk + printf "/*\n * System call argument to DTrace register array converstion.\n *\n" > systrace + printf " * DO NOT EDIT-- this file is automatically generated.\n" > systrace + printf " * $%s$\n", "FreeBSD" > systrace printf " * This file is part of the DTrace syscall provider.\n */\n\n" > systrace printf "static void\nsystrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)\n{\n" > systrace printf "\tint64_t *iarg = (int64_t *) uarg;\n" > systrace @@ -190,7 +185,8 @@ sed -e ' printf "static void\nsystrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)\n{\n\tconst char *p = NULL;\n" > systraceret printf "\tswitch (sysnum) {\n" > systraceret - + } + NR == 1 { next } NF == 0 || $1 ~ /^;/ { From owner-svn-src-stable@freebsd.org Thu May 11 09:36:53 2017 Return-Path: Delivered-To: svn-src-stable@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 19908D66142; Thu, 11 May 2017 09:36:53 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CF0781FEE; Thu, 11 May 2017 09:36:52 +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 v4B9apcs051388; Thu, 11 May 2017 09:36:51 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4B9apD9051387; Thu, 11 May 2017 09:36:51 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201705110936.v4B9apD9051387@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 11 May 2017 09:36:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318183 - stable/11/sys/kern X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 May 2017 09:36:53 -0000 Author: kib Date: Thu May 11 09:36:51 2017 New Revision: 318183 URL: https://svnweb.freebsd.org/changeset/base/318183 Log: MFC r317523: Add asserts to verify stability of struct proc and struct thread layouts. Modified: stable/11/sys/kern/kern_thread.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/kern_thread.c ============================================================================== --- stable/11/sys/kern/kern_thread.c Thu May 11 08:39:55 2017 (r318182) +++ stable/11/sys/kern/kern_thread.c Thu May 11 09:36:51 2017 (r318183) @@ -64,6 +64,57 @@ __FBSDID("$FreeBSD$"); #include #include +/* + * Asserts below verify the stability of struct thread and struct proc + * layout, as exposed by KBI to modules. On head, the KBI is allowed + * to drift, change to the structures must be accompanied by the + * assert update. + * + * On the stable branches after KBI freeze, conditions must not be + * violated. Typically new fields are moved to the end of the + * structures. + */ +#ifdef __amd64__ +_Static_assert(offsetof(struct thread, td_flags) == 0xe4, + "struct thread KBI td_flags"); +_Static_assert(offsetof(struct thread, td_pflags) == 0xec, + "struct thread KBI td_pflags"); +_Static_assert(offsetof(struct thread, td_frame) == 0x418, + "struct thread KBI td_frame"); +_Static_assert(offsetof(struct thread, td_emuldata) == 0x4c0, + "struct thread KBI td_emuldata"); +_Static_assert(offsetof(struct proc, p_flag) == 0xb0, + "struct proc KBI p_flag"); +_Static_assert(offsetof(struct proc, p_pid) == 0xbc, + "struct proc KBI p_pid"); +_Static_assert(offsetof(struct proc, p_filemon) == 0x3d0, + "struct proc KBI p_filemon"); +_Static_assert(offsetof(struct proc, p_comm) == 0x3e0, + "struct proc KBI p_comm"); +_Static_assert(offsetof(struct proc, p_emuldata) == 0x4b0, + "struct proc KBI p_emuldata"); +#endif +#ifdef __i386__ +_Static_assert(offsetof(struct thread, td_flags) == 0x8c, + "struct thread KBI td_flags"); +_Static_assert(offsetof(struct thread, td_pflags) == 0x94, + "struct thread KBI td_pflags"); +_Static_assert(offsetof(struct thread, td_frame) == 0x2c0, + "struct thread KBI td_frame"); +_Static_assert(offsetof(struct thread, td_emuldata) == 0x30c, + "struct thread KBI td_emuldata"); +_Static_assert(offsetof(struct proc, p_flag) == 0x68, + "struct proc KBI p_flag"); +_Static_assert(offsetof(struct proc, p_pid) == 0x74, + "struct proc KBI p_pid"); +_Static_assert(offsetof(struct proc, p_filemon) == 0x278, + "struct proc KBI p_filemon"); +_Static_assert(offsetof(struct proc, p_comm) == 0x284, + "struct proc KBI p_comm"); +_Static_assert(offsetof(struct proc, p_emuldata) == 0x304, + "struct proc KBI p_emuldata"); +#endif + SDT_PROVIDER_DECLARE(proc); SDT_PROBE_DEFINE(proc, , , lwp__exit); From owner-svn-src-stable@freebsd.org Thu May 11 13:49:06 2017 Return-Path: Delivered-To: svn-src-stable@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 74F05D67904; Thu, 11 May 2017 13:49:06 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 413FB166; Thu, 11 May 2017 13:49:06 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4BDn5NN053232; Thu, 11 May 2017 13:49:05 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4BDn5Hh053231; Thu, 11 May 2017 13:49:05 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201705111349.v4BDn5Hh053231@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 11 May 2017 13:49:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318186 - stable/11/share/man/man4 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 May 2017 13:49:06 -0000 Author: hselasky Date: Thu May 11 13:49:05 2017 New Revision: 318186 URL: https://svnweb.freebsd.org/changeset/base/318186 Log: MFC r317584: Correct manual page link to usbdi(9). Modified: stable/11/share/man/man4/usb.4 Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man4/usb.4 ============================================================================== --- stable/11/share/man/man4/usb.4 Thu May 11 13:46:30 2017 (r318185) +++ stable/11/share/man/man4/usb.4 Thu May 11 13:49:05 2017 (r318186) @@ -144,7 +144,7 @@ specifications can be found at: .D1 Pa http://www.usb.org/developers/docs/ .Pp .Xr libusb 3 , -.Xr usbdi 4 , +.Xr usbdi 9 , .Xr aue 4 , .Xr axe 4 , .Xr axge 4 , From owner-svn-src-stable@freebsd.org Thu May 11 13:50:17 2017 Return-Path: Delivered-To: svn-src-stable@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 BDA6FD679A6; Thu, 11 May 2017 13:50:17 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8D28E2FD; Thu, 11 May 2017 13:50:17 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4BDoGs3053356; Thu, 11 May 2017 13:50:16 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4BDoGEg053355; Thu, 11 May 2017 13:50:16 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201705111350.v4BDoGEg053355@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 11 May 2017 13:50:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318187 - stable/10/share/man/man4 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@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 May 2017 13:50:17 -0000 Author: hselasky Date: Thu May 11 13:50:16 2017 New Revision: 318187 URL: https://svnweb.freebsd.org/changeset/base/318187 Log: MFC r317584: Correct manual page link to usbdi(9). Modified: stable/10/share/man/man4/usb.4 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/usb.4 ============================================================================== --- stable/10/share/man/man4/usb.4 Thu May 11 13:49:05 2017 (r318186) +++ stable/10/share/man/man4/usb.4 Thu May 11 13:50:16 2017 (r318187) @@ -144,7 +144,7 @@ specifications can be found at: .D1 Pa http://www.usb.org/developers/docs/ .Pp .Xr libusb 3 , -.Xr usbdi 4 , +.Xr usbdi 9 , .Xr aue 4 , .Xr axe 4 , .Xr axge 4 , From owner-svn-src-stable@freebsd.org Thu May 11 17:26:36 2017 Return-Path: Delivered-To: svn-src-stable@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 F0442D687EB; Thu, 11 May 2017 17:26:35 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CD2661BA2; Thu, 11 May 2017 17:26:35 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4BHQYhn043795; Thu, 11 May 2017 17:26:34 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4BHQYcg043791; Thu, 11 May 2017 17:26:34 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201705111726.v4BHQYcg043791@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 11 May 2017 17:26: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: r318192 - in stable: 10/sys/kern 10/sys/sys 10/usr.bin/gcore 11/sys/kern 11/sys/sys 11/usr.bin/gcore 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@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 May 2017 17:26:36 -0000 Author: jhb Date: Thu May 11 17:26:34 2017 New Revision: 318192 URL: https://svnweb.freebsd.org/changeset/base/318192 Log: MFC 313407,313449: Copy ELF machine/flags from binaries to core dumps. 313407: Copy the e_machine and e_flags fields from the binary into an ELF core dump. In the kernel, cache the machine and flags fields from ELF header to use in the ELF header of a core dump. For gcore, the copy these fields over from the ELF header in the binary. This matters for platforms which encode ABI information in the flags field (such as o32 vs n32 on MIPS). 313449: Trim trailing whitespace (mostly introduced in r313407). Sponsored by: DARPA / AFRL Modified: stable/10/sys/kern/imgact_elf.c stable/10/sys/kern/kern_fork.c stable/10/sys/sys/proc.h stable/10/usr.bin/gcore/elfcore.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/kern/imgact_elf.c stable/11/sys/kern/kern_fork.c stable/11/sys/sys/proc.h stable/11/usr.bin/gcore/elfcore.c Directory Properties: stable/11/ (props changed) Modified: stable/10/sys/kern/imgact_elf.c ============================================================================== --- stable/10/sys/kern/imgact_elf.c Thu May 11 17:03:45 2017 (r318191) +++ stable/10/sys/kern/imgact_elf.c Thu May 11 17:26:34 2017 (r318192) @@ -1041,6 +1041,8 @@ __CONCAT(exec_, __elfN(imgact))(struct i imgp->interpreted = 0; imgp->reloc_base = addr; imgp->proc->p_osrel = osrel; + imgp->proc->p_elf_machine = hdr->e_machine; + imgp->proc->p_elf_flags = hdr->e_flags; ret: free(interp_buf, M_TEMP); @@ -1616,15 +1618,11 @@ __elfN(puthdr)(struct thread *td, void * ehdr->e_ident[EI_ABIVERSION] = 0; ehdr->e_ident[EI_PAD] = 0; ehdr->e_type = ET_CORE; -#if defined(COMPAT_FREEBSD32) && __ELF_WORD_SIZE == 32 - ehdr->e_machine = ELF_ARCH32; -#else - ehdr->e_machine = ELF_ARCH; -#endif + ehdr->e_machine = td->td_proc->p_elf_machine; ehdr->e_version = EV_CURRENT; ehdr->e_entry = 0; ehdr->e_phoff = sizeof(Elf_Ehdr); - ehdr->e_flags = 0; + ehdr->e_flags = td->td_proc->p_elf_flags; ehdr->e_ehsize = sizeof(Elf_Ehdr); ehdr->e_phentsize = sizeof(Elf_Phdr); ehdr->e_phnum = numsegs + 1; Modified: stable/10/sys/kern/kern_fork.c ============================================================================== --- stable/10/sys/kern/kern_fork.c Thu May 11 17:03:45 2017 (r318191) +++ stable/10/sys/kern/kern_fork.c Thu May 11 17:26:34 2017 (r318192) @@ -404,6 +404,8 @@ do_fork(struct thread *td, int flags, st bcopy(&p1->p_startcopy, &p2->p_startcopy, __rangeof(struct proc, p_startcopy, p_endcopy)); + p2->p_elf_machine = p1->p_elf_machine; + p2->p_elf_flags = p1->p_elf_flags; pargs_hold(p2->p_args); PROC_UNLOCK(p1); Modified: stable/10/sys/sys/proc.h ============================================================================== --- stable/10/sys/sys/proc.h Thu May 11 17:03:45 2017 (r318191) +++ stable/10/sys/sys/proc.h Thu May 11 17:26:34 2017 (r318192) @@ -580,6 +580,7 @@ struct proc { rlim_t p_cpulimit; /* (c) Current CPU limit in seconds. */ signed char p_nice; /* (c) Process "nice" value. */ int p_fibnum; /* in this routing domain XXX MRT */ + /* End area that is copied on creation. */ #define p_endcopy p_xstat @@ -623,6 +624,8 @@ struct proc { struct pgrp *p_pgrp; /* (c + e) Pointer to process group. */ struct filemon *p_filemon; /* (c) filemon-specific data. */ u_int p_ptevents; /* (c) ptrace() event mask. */ + uint16_t p_elf_machine; /* (x) ELF machine type */ + uint64_t p_elf_flags; /* (x) ELF flags */ }; #define p_session p_pgrp->pg_session Modified: stable/10/usr.bin/gcore/elfcore.c ============================================================================== --- stable/10/usr.bin/gcore/elfcore.c Thu May 11 17:03:45 2017 (r318191) +++ stable/10/usr.bin/gcore/elfcore.c Thu May 11 17:26:34 2017 (r318192) @@ -114,8 +114,8 @@ static void *elf_note_procstat_psstrings static void *elf_note_procstat_rlimit(void *, size_t *); static void *elf_note_procstat_umask(void *, size_t *); static void *elf_note_procstat_vmmap(void *, size_t *); -static void elf_puthdr(pid_t, vm_map_entry_t, void *, size_t, size_t, size_t, - int); +static void elf_puthdr(int, pid_t, vm_map_entry_t, void *, size_t, size_t, + size_t, int); static void elf_putnote(int, notefunc_t, void *, struct sbuf *); static void elf_putnotes(pid_t, struct sbuf *, size_t *); static void freemap(vm_map_entry_t); @@ -175,7 +175,7 @@ elf_detach(void) * Write an ELF coredump for the given pid to the given fd. */ static void -elf_coredump(int efd __unused, int fd, pid_t pid) +elf_coredump(int efd, int fd, pid_t pid) { vm_map_entry_t map; struct sseg_closure seginfo; @@ -225,7 +225,7 @@ elf_coredump(int efd __unused, int fd, p hdr = sbuf_data(sb); segoff = sbuf_len(sb); /* Fill in the header. */ - elf_puthdr(pid, map, hdr, hdrsize, notesz, segoff, seginfo.count); + elf_puthdr(efd, pid, map, hdr, hdrsize, notesz, segoff, seginfo.count); n = write(fd, hdr, segoff); if (n == -1) @@ -412,12 +412,19 @@ elf_putnote(int type, notefunc_t notefun * Generate the ELF coredump header. */ static void -elf_puthdr(pid_t pid, vm_map_entry_t map, void *hdr, size_t hdrsize, +elf_puthdr(int efd, pid_t pid, vm_map_entry_t map, void *hdr, size_t hdrsize, size_t notesz, size_t segoff, int numsegs) { - Elf_Ehdr *ehdr; + Elf_Ehdr *ehdr, binhdr; Elf_Phdr *phdr; struct phdr_closure phc; + ssize_t cnt; + + cnt = read(efd, &binhdr, sizeof(binhdr)); + if (cnt < 0) + err(1, "Failed to re-read ELF header"); + else if (cnt != sizeof(binhdr)) + errx(1, "Failed to re-read ELF header"); ehdr = (Elf_Ehdr *)hdr; phdr = (Elf_Phdr *)((char *)hdr + sizeof(Elf_Ehdr)); @@ -433,11 +440,11 @@ elf_puthdr(pid_t pid, vm_map_entry_t map ehdr->e_ident[EI_ABIVERSION] = 0; ehdr->e_ident[EI_PAD] = 0; ehdr->e_type = ET_CORE; - ehdr->e_machine = ELF_ARCH; + ehdr->e_machine = binhdr.e_machine; ehdr->e_version = EV_CURRENT; ehdr->e_entry = 0; ehdr->e_phoff = sizeof(Elf_Ehdr); - ehdr->e_flags = 0; + ehdr->e_flags = binhdr.e_flags; ehdr->e_ehsize = sizeof(Elf_Ehdr); ehdr->e_phentsize = sizeof(Elf_Phdr); ehdr->e_phnum = numsegs + 1; From owner-svn-src-stable@freebsd.org Thu May 11 17:26:36 2017 Return-Path: Delivered-To: svn-src-stable@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 83C76D687EF; Thu, 11 May 2017 17:26:36 +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 611011BA3; Thu, 11 May 2017 17:26:36 +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 v4BHQZRO043805; Thu, 11 May 2017 17:26:35 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4BHQZdQ043801; Thu, 11 May 2017 17:26:35 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201705111726.v4BHQZdQ043801@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 11 May 2017 17:26:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318192 - in stable: 10/sys/kern 10/sys/sys 10/usr.bin/gcore 11/sys/kern 11/sys/sys 11/usr.bin/gcore X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 May 2017 17:26:36 -0000 Author: jhb Date: Thu May 11 17:26:34 2017 New Revision: 318192 URL: https://svnweb.freebsd.org/changeset/base/318192 Log: MFC 313407,313449: Copy ELF machine/flags from binaries to core dumps. 313407: Copy the e_machine and e_flags fields from the binary into an ELF core dump. In the kernel, cache the machine and flags fields from ELF header to use in the ELF header of a core dump. For gcore, the copy these fields over from the ELF header in the binary. This matters for platforms which encode ABI information in the flags field (such as o32 vs n32 on MIPS). 313449: Trim trailing whitespace (mostly introduced in r313407). Sponsored by: DARPA / AFRL Modified: stable/11/sys/kern/imgact_elf.c stable/11/sys/kern/kern_fork.c stable/11/sys/sys/proc.h stable/11/usr.bin/gcore/elfcore.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/kern/imgact_elf.c stable/10/sys/kern/kern_fork.c stable/10/sys/sys/proc.h stable/10/usr.bin/gcore/elfcore.c Directory Properties: stable/10/ (props changed) Modified: stable/11/sys/kern/imgact_elf.c ============================================================================== --- stable/11/sys/kern/imgact_elf.c Thu May 11 17:03:45 2017 (r318191) +++ stable/11/sys/kern/imgact_elf.c Thu May 11 17:26:34 2017 (r318192) @@ -1079,6 +1079,8 @@ __CONCAT(exec_, __elfN(imgact))(struct i imgp->interpreted = 0; imgp->reloc_base = addr; imgp->proc->p_osrel = osrel; + imgp->proc->p_elf_machine = hdr->e_machine; + imgp->proc->p_elf_flags = hdr->e_flags; ret: free(interp_buf, M_TEMP); @@ -1682,15 +1684,11 @@ __elfN(puthdr)(struct thread *td, void * ehdr->e_ident[EI_ABIVERSION] = 0; ehdr->e_ident[EI_PAD] = 0; ehdr->e_type = ET_CORE; -#if defined(COMPAT_FREEBSD32) && __ELF_WORD_SIZE == 32 - ehdr->e_machine = ELF_ARCH32; -#else - ehdr->e_machine = ELF_ARCH; -#endif + ehdr->e_machine = td->td_proc->p_elf_machine; ehdr->e_version = EV_CURRENT; ehdr->e_entry = 0; ehdr->e_phoff = sizeof(Elf_Ehdr); - ehdr->e_flags = 0; + ehdr->e_flags = td->td_proc->p_elf_flags; ehdr->e_ehsize = sizeof(Elf_Ehdr); ehdr->e_phentsize = sizeof(Elf_Phdr); ehdr->e_phnum = numsegs + 1; Modified: stable/11/sys/kern/kern_fork.c ============================================================================== --- stable/11/sys/kern/kern_fork.c Thu May 11 17:03:45 2017 (r318191) +++ stable/11/sys/kern/kern_fork.c Thu May 11 17:26:34 2017 (r318192) @@ -408,6 +408,8 @@ do_fork(struct thread *td, struct fork_r bcopy(&p1->p_startcopy, &p2->p_startcopy, __rangeof(struct proc, p_startcopy, p_endcopy)); + p2->p_elf_machine = p1->p_elf_machine; + p2->p_elf_flags = p1->p_elf_flags; pargs_hold(p2->p_args); PROC_UNLOCK(p1); Modified: stable/11/sys/sys/proc.h ============================================================================== --- stable/11/sys/sys/proc.h Thu May 11 17:03:45 2017 (r318191) +++ stable/11/sys/sys/proc.h Thu May 11 17:26:34 2017 (r318192) @@ -316,7 +316,7 @@ struct thread { } td_state; /* (t) thread state */ union { register_t tdu_retval[2]; - off_t tdu_off; + off_t tdu_off; } td_uretoff; /* (k) Syscall aux returns. */ #define td_retval td_uretoff.tdu_retval u_int td_cowgen; /* (k) Generation of COW pointers. */ @@ -626,8 +626,10 @@ struct proc { our subtree. */ u_int p_xexit; /* (c) Exit code. */ u_int p_xsig; /* (c) Stop/kill sig. */ + /* End area that is copied on creation. */ -#define p_endcopy p_xsig +#define p_endcopy p_pgrp + struct pgrp *p_pgrp; /* (c + e) Pointer to process group. */ struct knlist *p_klist; /* (c) Knotes attached to this proc. */ int p_numthreads; /* (c) Number of threads. */ @@ -657,6 +659,8 @@ struct proc { LIST_ENTRY(proc) p_orphan; /* (e) List of orphan processes. */ LIST_HEAD(, proc) p_orphans; /* (e) Pointer to list of orphans. */ u_int p_ptevents; /* (c) ptrace() event mask. */ + uint16_t p_elf_machine; /* (x) ELF machine type */ + uint64_t p_elf_flags; /* (x) ELF flags */ }; #define p_session p_pgrp->pg_session Modified: stable/11/usr.bin/gcore/elfcore.c ============================================================================== --- stable/11/usr.bin/gcore/elfcore.c Thu May 11 17:03:45 2017 (r318191) +++ stable/11/usr.bin/gcore/elfcore.c Thu May 11 17:26:34 2017 (r318192) @@ -117,8 +117,8 @@ static void *elf_note_procstat_psstrings static void *elf_note_procstat_rlimit(void *, size_t *); static void *elf_note_procstat_umask(void *, size_t *); static void *elf_note_procstat_vmmap(void *, size_t *); -static void elf_puthdr(pid_t, vm_map_entry_t, void *, size_t, size_t, size_t, - int); +static void elf_puthdr(int, pid_t, vm_map_entry_t, void *, size_t, size_t, + size_t, int); static void elf_putnote(int, notefunc_t, void *, struct sbuf *); static void elf_putnotes(pid_t, struct sbuf *, size_t *); static void freemap(vm_map_entry_t); @@ -178,7 +178,7 @@ elf_detach(void) * Write an ELF coredump for the given pid to the given fd. */ static void -elf_coredump(int efd __unused, int fd, pid_t pid) +elf_coredump(int efd, int fd, pid_t pid) { vm_map_entry_t map; struct sseg_closure seginfo; @@ -228,7 +228,7 @@ elf_coredump(int efd __unused, int fd, p hdr = sbuf_data(sb); segoff = sbuf_len(sb); /* Fill in the header. */ - elf_puthdr(pid, map, hdr, hdrsize, notesz, segoff, seginfo.count); + elf_puthdr(efd, pid, map, hdr, hdrsize, notesz, segoff, seginfo.count); n = write(fd, hdr, segoff); if (n == -1) @@ -418,12 +418,19 @@ elf_putnote(int type, notefunc_t notefun * Generate the ELF coredump header. */ static void -elf_puthdr(pid_t pid, vm_map_entry_t map, void *hdr, size_t hdrsize, +elf_puthdr(int efd, pid_t pid, vm_map_entry_t map, void *hdr, size_t hdrsize, size_t notesz, size_t segoff, int numsegs) { - Elf_Ehdr *ehdr; + Elf_Ehdr *ehdr, binhdr; Elf_Phdr *phdr; struct phdr_closure phc; + ssize_t cnt; + + cnt = read(efd, &binhdr, sizeof(binhdr)); + if (cnt < 0) + err(1, "Failed to re-read ELF header"); + else if (cnt != sizeof(binhdr)) + errx(1, "Failed to re-read ELF header"); ehdr = (Elf_Ehdr *)hdr; phdr = (Elf_Phdr *)((char *)hdr + sizeof(Elf_Ehdr)); @@ -439,11 +446,11 @@ elf_puthdr(pid_t pid, vm_map_entry_t map ehdr->e_ident[EI_ABIVERSION] = 0; ehdr->e_ident[EI_PAD] = 0; ehdr->e_type = ET_CORE; - ehdr->e_machine = ELF_ARCH; + ehdr->e_machine = binhdr.e_machine; ehdr->e_version = EV_CURRENT; ehdr->e_entry = 0; ehdr->e_phoff = sizeof(Elf_Ehdr); - ehdr->e_flags = 0; + ehdr->e_flags = binhdr.e_flags; ehdr->e_ehsize = sizeof(Elf_Ehdr); ehdr->e_phentsize = sizeof(Elf_Phdr); ehdr->e_phnum = numsegs + 1; From owner-svn-src-stable@freebsd.org Thu May 11 18:14:53 2017 Return-Path: Delivered-To: svn-src-stable@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 A93D7D6876C; Thu, 11 May 2017 18:14:53 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7F87F1AA7; Thu, 11 May 2017 18:14:53 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id 21FAF10A82E; Thu, 11 May 2017 14:14:46 -0400 (EDT) From: John Baldwin To: src-committers@freebsd.org Cc: svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: Re: svn commit: r318164 - in stable: 10/sys/amd64/linux 10/sys/amd64/linux32 10/sys/compat/freebsd32 10/sys/compat/svr4 10/sys/i386/ibcs2 10/sys/i386/linux 10/sys/kern 10/sys/sys 11/sys/amd64/linux 11/... Date: Thu, 11 May 2017 10:14:14 -0700 Message-ID: <3324258.D1zICZA8ov@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-STABLE; KDE/4.14.10; amd64; ; ) In-Reply-To: <201705102309.v4AN9KKw095099@repo.freebsd.org> References: <201705102309.v4AN9KKw095099@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Thu, 11 May 2017 14:14:46 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 May 2017 18:14:53 -0000 On Wednesday, May 10, 2017 11:09:20 PM John Baldwin wrote: > Author: jhb > Date: Wed May 10 23:09:17 2017 > New Revision: 318164 > URL: https://svnweb.freebsd.org/changeset/base/318164 > > Log: > MFC 313564: > Drop the "created from" line from files generated by makesyscalls.sh. > > This information is less useful when the generated files are included in > source control along with the source. If needed it can be reconstructed > from the $FreeBSD$ tag in the generated file. Removing this information > from the generated output permits committing the generated files along > with the change to the system call master list without having inconsistent > metadata in the generated files. > > Regenerate the affected files along with the MFC. After this commit, I think we should include regenerated files when MFC'ing changes going forward so that stable/ branches are never in an inconsistent state. -- John Baldwin From owner-svn-src-stable@freebsd.org Thu May 11 20:01:21 2017 Return-Path: Delivered-To: svn-src-stable@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 D4AF2D69FB7; Thu, 11 May 2017 20:01:21 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8B1561A30; Thu, 11 May 2017 20:01:21 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4BK1KYN011123; Thu, 11 May 2017 20:01:20 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4BK1K8A011122; Thu, 11 May 2017 20:01:20 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201705112001.v4BK1K8A011122@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 11 May 2017 20:01:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318195 - stable/11 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 May 2017 20:01:21 -0000 Author: mav Date: Thu May 11 20:01:20 2017 New Revision: 318195 URL: https://svnweb.freebsd.org/changeset/base/318195 Log: Record as merged revisions that were reverted in head: r307392, r308781, r310023, r310104. Modified: Directory Properties: stable/11/ (props changed) From owner-svn-src-stable@freebsd.org Thu May 11 20:30:46 2017 Return-Path: Delivered-To: svn-src-stable@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 39474D6866F; Thu, 11 May 2017 20:30:46 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 0AF16A6B; Thu, 11 May 2017 20:30:45 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4BKUj9E020097; Thu, 11 May 2017 20:30:45 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4BKUjOs020096; Thu, 11 May 2017 20:30:45 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201705112030.v4BKUjOs020096@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Thu, 11 May 2017 20:30:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318196 - stable/11/sys/tools/fdt X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 May 2017 20:30:46 -0000 Author: gonzo Date: Thu May 11 20:30:44 2017 New Revision: 318196 URL: https://svnweb.freebsd.org/changeset/base/318196 Log: MFC r315031: [fdt] Make DTBs generated by make_dtb.sh overlay-ready Generate symbols node when compiling dts files so they can be modified during boot-time by applying overlays. Modified: stable/11/sys/tools/fdt/make_dtb.sh Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/tools/fdt/make_dtb.sh ============================================================================== --- stable/11/sys/tools/fdt/make_dtb.sh Thu May 11 20:01:20 2017 (r318195) +++ stable/11/sys/tools/fdt/make_dtb.sh Thu May 11 20:30:44 2017 (r318196) @@ -20,5 +20,5 @@ for d in ${dts}; do dtb=${dtb_path}/`basename $d .dts`.dtb echo "converting $d -> $dtb" cpp -P -x assembler-with-cpp -I $S/gnu/dts/include -I $S/boot/fdt/dts/${MACHINE} -I $S/gnu/dts/${MACHINE} -include $d /dev/null | - dtc -O dtb -o $dtb -b 0 -p 1024 -i $S/boot/fdt/dts/${MACHINE} -i $S/gnu/dts/${MACHINE} + dtc -@ -O dtb -o $dtb -b 0 -p 1024 -i $S/boot/fdt/dts/${MACHINE} -i $S/gnu/dts/${MACHINE} done From owner-svn-src-stable@freebsd.org Thu May 11 20:55:14 2017 Return-Path: Delivered-To: svn-src-stable@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 64D73D68F1F; Thu, 11 May 2017 20:55:14 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 2DFDE18B2; Thu, 11 May 2017 20:55:14 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4BKtDIW032336; Thu, 11 May 2017 20:55:13 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4BKtBKp032320; Thu, 11 May 2017 20:55:11 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201705112055.v4BKtBKp032320@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Thu, 11 May 2017 20:55:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318197 - in stable/11: . etc/mtree include sys/arm/allwinner sys/arm/amlogic/aml8726 sys/arm/at91 sys/arm/broadcom/bcm2835 sys/arm/lpc sys/arm/nvidia sys/arm/ti sys/conf sys/dev/mmc sy... X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 May 2017 20:55:14 -0000 Author: marius Date: Thu May 11 20:55:11 2017 New Revision: 318197 URL: https://svnweb.freebsd.org/changeset/base/318197 Log: MFC: r312939, r313250, r314811 (partial), r314887 (partial), r315760, r315845, 315430, r317981, r315466 o Fix some overly long lines, whitespace and other bugs according to style(9) as well as spelling etc. in mmc(4), mmcsd(4) and sdhci(4). o In the mmc(4) bridges and sdhci(4) (bus) front-ends: - Remove redundant assignments of the default bus_generic_print_child device method, - use DEVMETHOD_END, - use NULL instead of 0 for pointers. o Trim/adjust includes. o Add and use a MMC_DECLARE_BRIDGE macro for declaring mmc(4) bridges as kernel drivers and their dependency onto mmc(4). o Add support for eMMC "partitions". Besides the user data area, i. e. the default partition, eMMC v4.41 and later devices can additionally provide up to: 1 enhanced user data area partition 2 boot partitions 1 RPMB (Replay Protected Memory Block) partition 4 general purpose partitions (optionally with a enhanced or extended attribute) Besides simply subdividing eMMC devices, some Intel NUCs having UEFI code in the boot partitions etc., another use case for the partition support is the activation of pseudo-SLC mode, which manufacturers of eMMC chips typically associate with the enhanced user data area and/ or the enhanced attribute of general purpose partitions. CAVEAT EMPTOR: Partitioning eMMC devices is a one-time operation. o Now that properly issuing CMD6 is crucial (so data isn't written to the wrong partition for example), make a step into the direction of correctly handling the timeout for these commands in the MMC layer. Also, do a SEND_STATUS when CMD6 is invoked with an R1B response as recommended by relevant specifications. o Add an IOCTL interface to mmcsd(4); this is sufficiently compatible with Linux so that the GNU mmc-utils can be ported to and used with FreeBSD (note that due to the remaining deficiencies outlined above SANITIZE operations issued by/with `mmc` currently most likely will fail). These latter have been added to ports as sysutils/mmc-utils. Among others, the `mmc` tool of mmc-utils allows for partitioning eMMC devices (tested working). o For devices following the eMMC specification v4.41 or later, year 0 is 2013 rather than 1997; so correct this for assembling the device ID string properly. o Let mmcsd.ko depend on mmc.ko. Additionally, bump MMC_VERSION as at least for some of the above a matching pair is required. o In the ACPI front-end of sdhci(4) describe the Intel eMMC and SDXC controllers as such in order to match the PCI one. Additionally, in the entry for the 80860F14 SDXC controller remove the eMMC-only SDHCI_QUIRK_INTEL_POWER_UP_RESET. Added: stable/11/sys/dev/mmc/mmc_ioctl.h - copied unchanged from r315430, head/sys/dev/mmc/mmc_ioctl.h stable/11/sys/dev/mmc/mmc_private.h - copied unchanged from r315430, head/sys/dev/mmc/mmc_private.h stable/11/sys/dev/mmc/mmc_subr.c - copied unchanged from r315430, head/sys/dev/mmc/mmc_subr.c stable/11/sys/dev/mmc/mmc_subr.h - copied unchanged from r315430, head/sys/dev/mmc/mmc_subr.h Modified: stable/11/UPDATING stable/11/etc/mtree/BSD.include.dist stable/11/include/Makefile stable/11/sys/arm/allwinner/a10_mmc.c stable/11/sys/arm/amlogic/aml8726/aml8726_mmc.c stable/11/sys/arm/amlogic/aml8726/aml8726_sdxc-m8.c stable/11/sys/arm/at91/at91_mci.c stable/11/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c stable/11/sys/arm/lpc/lpc_mmc.c stable/11/sys/arm/nvidia/tegra_sdhci.c stable/11/sys/arm/ti/ti_sdhci.c stable/11/sys/conf/files stable/11/sys/dev/mmc/bridge.h stable/11/sys/dev/mmc/host/dwmmc.c stable/11/sys/dev/mmc/mmc.c stable/11/sys/dev/mmc/mmcbr_if.m stable/11/sys/dev/mmc/mmcbrvar.h stable/11/sys/dev/mmc/mmcreg.h stable/11/sys/dev/mmc/mmcsd.c stable/11/sys/dev/mmc/mmcvar.h stable/11/sys/dev/sdhci/fsl_sdhci.c stable/11/sys/dev/sdhci/sdhci.c stable/11/sys/dev/sdhci/sdhci.h stable/11/sys/dev/sdhci/sdhci_acpi.c stable/11/sys/dev/sdhci/sdhci_fdt.c stable/11/sys/dev/sdhci/sdhci_if.m stable/11/sys/dev/sdhci/sdhci_pci.c stable/11/sys/modules/mmc/Makefile stable/11/sys/sys/param.h Directory Properties: stable/11/ (props changed) Modified: stable/11/UPDATING ============================================================================== --- stable/11/UPDATING Thu May 11 20:30:44 2017 (r318196) +++ stable/11/UPDATING Thu May 11 20:55:11 2017 (r318197) @@ -16,6 +16,13 @@ from older versions of FreeBSD, try WITH the tip of head, and then rebuild without this option. The bootstrap process from older version of current across the gcc/clang cutover is a bit fragile. +20170511: + The mmcsd.ko module now additionally depends on geom_flashmap.ko. + Also, mmc.ko and mmcsd.ko need to be a matching pair built from the + same source (previously, the dependency of mmcsd.ko on mmc.ko was + missing, but mmcsd.ko now will refuse to load if it is incompatible + with mmc.ko). + 20170414: Binds and sends to the loopback addresses, IPv6 and IPv4, will now use any explicitly assigned loopback address available in the jail Modified: stable/11/etc/mtree/BSD.include.dist ============================================================================== --- stable/11/etc/mtree/BSD.include.dist Thu May 11 20:30:44 2017 (r318196) +++ stable/11/etc/mtree/BSD.include.dist Thu May 11 20:55:11 2017 (r318197) @@ -130,6 +130,8 @@ .. mfi .. + mmc + .. mpt mpilib .. Modified: stable/11/include/Makefile ============================================================================== --- stable/11/include/Makefile Thu May 11 20:30:44 2017 (r318196) +++ stable/11/include/Makefile Thu May 11 20:55:11 2017 (r318197) @@ -45,7 +45,7 @@ LDIRS= bsm cam geom net net80211 netgrap LSUBDIRS= cam/ata cam/nvme cam/scsi \ dev/acpica dev/agp dev/an dev/bktr dev/ciss dev/filemon dev/firewire \ dev/hwpmc dev/hyperv \ - dev/ic dev/iicbus dev/io dev/lmc dev/mfi dev/nvme \ + dev/ic dev/iicbus dev/io dev/lmc dev/mfi dev/mmc dev/nvme \ dev/ofw dev/pbio dev/pci ${_dev_powermac_nvram} dev/ppbus dev/smbus \ dev/speaker dev/utopia dev/vkbd dev/wi \ fs/devfs fs/fdescfs fs/msdosfs fs/nandfs fs/nfs fs/nullfs \ Modified: stable/11/sys/arm/allwinner/a10_mmc.c ============================================================================== --- stable/11/sys/arm/allwinner/a10_mmc.c Thu May 11 20:30:44 2017 (r318196) +++ stable/11/sys/arm/allwinner/a10_mmc.c Thu May 11 20:55:11 2017 (r318197) @@ -45,7 +45,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include @@ -897,7 +896,6 @@ static device_method_t a10_mmc_methods[] /* Bus interface */ DEVMETHOD(bus_read_ivar, a10_mmc_read_ivar), DEVMETHOD(bus_write_ivar, a10_mmc_write_ivar), - DEVMETHOD(bus_print_child, bus_generic_print_child), /* MMC bridge interface */ DEVMETHOD(mmcbr_update_ios, a10_mmc_update_ios), @@ -917,6 +915,6 @@ static driver_t a10_mmc_driver = { sizeof(struct a10_mmc_softc), }; -DRIVER_MODULE(a10_mmc, simplebus, a10_mmc_driver, a10_mmc_devclass, 0, 0); -DRIVER_MODULE(mmc, a10_mmc, mmc_driver, mmc_devclass, NULL, NULL); -MODULE_DEPEND(a10_mmc, mmc, 1, 1, 1); +DRIVER_MODULE(a10_mmc, simplebus, a10_mmc_driver, a10_mmc_devclass, NULL, + NULL); +MMC_DECLARE_BRIDGE(a10_mmc); Modified: stable/11/sys/arm/amlogic/aml8726/aml8726_mmc.c ============================================================================== --- stable/11/sys/arm/amlogic/aml8726/aml8726_mmc.c Thu May 11 20:30:44 2017 (r318196) +++ stable/11/sys/arm/amlogic/aml8726/aml8726_mmc.c Thu May 11 20:55:11 2017 (r318197) @@ -33,7 +33,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include @@ -52,7 +51,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include @@ -1096,7 +1094,6 @@ static driver_t aml8726_mmc_driver = { static devclass_t aml8726_mmc_devclass; DRIVER_MODULE(aml8726_mmc, simplebus, aml8726_mmc_driver, - aml8726_mmc_devclass, 0, 0); + aml8726_mmc_devclass, NULL, NULL); MODULE_DEPEND(aml8726_mmc, aml8726_gpio, 1, 1, 1); -DRIVER_MODULE(mmc, aml8726_mmc, mmc_driver, mmc_devclass, NULL, NULL); -MODULE_DEPEND(aml8726_mmc, mmc, 1, 1, 1); +MMC_DECLARE_BRIDGE(aml8726_mmc); Modified: stable/11/sys/arm/amlogic/aml8726/aml8726_sdxc-m8.c ============================================================================== --- stable/11/sys/arm/amlogic/aml8726/aml8726_sdxc-m8.c Thu May 11 20:30:44 2017 (r318196) +++ stable/11/sys/arm/amlogic/aml8726/aml8726_sdxc-m8.c Thu May 11 20:55:11 2017 (r318197) @@ -33,7 +33,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include @@ -1375,7 +1374,6 @@ static driver_t aml8726_sdxc_driver = { static devclass_t aml8726_sdxc_devclass; DRIVER_MODULE(aml8726_sdxc, simplebus, aml8726_sdxc_driver, - aml8726_sdxc_devclass, 0, 0); + aml8726_sdxc_devclass, NULL, NULL); MODULE_DEPEND(aml8726_sdxc, aml8726_gpio, 1, 1, 1); -DRIVER_MODULE(mmc, aml8726_sdxc, mmc_driver, mmc_devclass, NULL, NULL); -MODULE_DEPEND(aml8726_sdxc, mmc, 1, 1, 1); +MMC_DECLARE_BRIDGE(aml8726_sdxc); Modified: stable/11/sys/arm/at91/at91_mci.c ============================================================================== --- stable/11/sys/arm/at91/at91_mci.c Thu May 11 20:30:44 2017 (r318196) +++ stable/11/sys/arm/at91/at91_mci.c Thu May 11 20:55:11 2017 (r318197) @@ -32,23 +32,16 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include -#include #include #include -#include #include #include #include #include -#include #include #include #include -#include -#include -#include #include #include @@ -59,7 +52,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #ifdef FDT @@ -1409,5 +1401,5 @@ DRIVER_MODULE(at91_mci, simplebus, at91_ DRIVER_MODULE(at91_mci, atmelarm, at91_mci_driver, at91_mci_devclass, NULL, NULL); #endif -DRIVER_MODULE(mmc, at91_mci, mmc_driver, mmc_devclass, NULL, NULL); -MODULE_DEPEND(at91_mci, mmc, 1, 1, 1); + +MMC_DECLARE_BRIDGE(at91_mci); Modified: stable/11/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c ============================================================================== --- stable/11/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Thu May 11 20:30:44 2017 (r318196) +++ stable/11/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Thu May 11 20:55:11 2017 (r318197) @@ -47,9 +47,10 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include + +#include "mmcbr_if.h" #include "sdhci_if.h" #include "bcm2835_dma.h" @@ -643,7 +644,6 @@ static device_method_t bcm_sdhci_methods /* Bus interface */ DEVMETHOD(bus_read_ivar, sdhci_generic_read_ivar), DEVMETHOD(bus_write_ivar, sdhci_generic_write_ivar), - DEVMETHOD(bus_print_child, bus_generic_print_child), /* MMC bridge interface */ DEVMETHOD(mmcbr_update_ios, sdhci_generic_update_ios), @@ -666,7 +666,7 @@ static device_method_t bcm_sdhci_methods DEVMETHOD(sdhci_write_4, bcm_sdhci_write_4), DEVMETHOD(sdhci_write_multi_4, bcm_sdhci_write_multi_4), - { 0, 0 } + DEVMETHOD_END }; static devclass_t bcm_sdhci_devclass; @@ -677,7 +677,7 @@ static driver_t bcm_sdhci_driver = { sizeof(struct bcm_sdhci_softc), }; -DRIVER_MODULE(sdhci_bcm, simplebus, bcm_sdhci_driver, bcm_sdhci_devclass, 0, 0); +DRIVER_MODULE(sdhci_bcm, simplebus, bcm_sdhci_driver, bcm_sdhci_devclass, + NULL, NULL); MODULE_DEPEND(sdhci_bcm, sdhci, 1, 1, 1); -DRIVER_MODULE(mmc, sdhci_bcm, mmc_driver, mmc_devclass, NULL, NULL); -MODULE_DEPEND(sdhci_bcm, mmc, 1, 1, 1); +MMC_DECLARE_BRIDGE(sdhci_bcm); Modified: stable/11/sys/arm/lpc/lpc_mmc.c ============================================================================== --- stable/11/sys/arm/lpc/lpc_mmc.c Thu May 11 20:30:44 2017 (r318196) +++ stable/11/sys/arm/lpc/lpc_mmc.c Thu May 11 20:55:11 2017 (r318197) @@ -29,24 +29,14 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include -#include -#include #include -#include #include #include #include #include -#include #include #include -#include -#include -#include - -#include #include #include @@ -56,7 +46,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include @@ -752,7 +741,6 @@ static device_method_t lpc_mmc_methods[] /* Bus interface */ DEVMETHOD(bus_read_ivar, lpc_mmc_read_ivar), DEVMETHOD(bus_write_ivar, lpc_mmc_write_ivar), - DEVMETHOD(bus_print_child, bus_generic_print_child), /* MMC bridge interface */ DEVMETHOD(mmcbr_update_ios, lpc_mmc_update_ios), @@ -761,7 +749,7 @@ static device_method_t lpc_mmc_methods[] DEVMETHOD(mmcbr_acquire_host, lpc_mmc_acquire_host), DEVMETHOD(mmcbr_release_host, lpc_mmc_release_host), - { 0, 0 } + DEVMETHOD_END }; static devclass_t lpc_mmc_devclass; @@ -772,6 +760,5 @@ static driver_t lpc_mmc_driver = { sizeof(struct lpc_mmc_softc), }; -DRIVER_MODULE(lpcmmc, simplebus, lpc_mmc_driver, lpc_mmc_devclass, 0, 0); -DRIVER_MODULE(mmc, lpcmmc, mmc_driver, mmc_devclass, NULL, NULL); -MODULE_DEPEND(lpcmmc, mmc, 1, 1, 1); +DRIVER_MODULE(lpcmmc, simplebus, lpc_mmc_driver, lpc_mmc_devclass, NULL, NULL); +MMC_DECLARE_BRIDGE(lpcmmc); Modified: stable/11/sys/arm/nvidia/tegra_sdhci.c ============================================================================== --- stable/11/sys/arm/nvidia/tegra_sdhci.c Thu May 11 20:30:44 2017 (r318196) +++ stable/11/sys/arm/nvidia/tegra_sdhci.c Thu May 11 20:55:11 2017 (r318197) @@ -35,7 +35,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -45,7 +44,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include @@ -55,7 +53,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -457,5 +454,4 @@ static DEFINE_CLASS_0(sdhci, tegra_sdhci DRIVER_MODULE(sdhci_tegra, simplebus, tegra_sdhci_driver, tegra_sdhci_devclass, NULL, NULL); MODULE_DEPEND(sdhci_tegra, sdhci, 1, 1, 1); -DRIVER_MODULE(mmc, sdhci, mmc_driver, mmc_devclass, NULL, NULL); -MODULE_DEPEND(sdhci_tegra, mmc, 1, 1, 1); +MMC_DECLARE_BRIDGE(sdhci); Modified: stable/11/sys/arm/ti/ti_sdhci.c ============================================================================== --- stable/11/sys/arm/ti/ti_sdhci.c Thu May 11 20:30:44 2017 (r318196) +++ stable/11/sys/arm/ti/ti_sdhci.c Thu May 11 20:55:11 2017 (r318197) @@ -606,6 +606,11 @@ ti_sdhci_attach(device_t dev) * before waiting to see them de-asserted. */ sc->slot.quirks |= SDHCI_QUIRK_WAITFOR_RESET_ASSERTED; + + /* + * The controller waits for busy responses. + */ + sc->slot.quirks |= SDHCI_QUIRK_WAIT_WHILE_BUSY; /* * DMA is not really broken, I just haven't implemented it yet. @@ -692,7 +697,6 @@ static device_method_t ti_sdhci_methods[ /* Bus interface */ DEVMETHOD(bus_read_ivar, sdhci_generic_read_ivar), DEVMETHOD(bus_write_ivar, sdhci_generic_write_ivar), - DEVMETHOD(bus_print_child, bus_generic_print_child), /* MMC bridge interface */ DEVMETHOD(mmcbr_update_ios, ti_sdhci_update_ios), @@ -723,7 +727,7 @@ static driver_t ti_sdhci_driver = { sizeof(struct ti_sdhci_softc), }; -DRIVER_MODULE(sdhci_ti, simplebus, ti_sdhci_driver, ti_sdhci_devclass, 0, 0); +DRIVER_MODULE(sdhci_ti, simplebus, ti_sdhci_driver, ti_sdhci_devclass, NULL, + NULL); MODULE_DEPEND(sdhci_ti, sdhci, 1, 1, 1); -DRIVER_MODULE(mmc, sdhci_ti, mmc_driver, mmc_devclass, NULL, NULL); -MODULE_DEPEND(sdhci_ti, mmc, 1, 1, 1); +MMC_DECLARE_BRIDGE(sdhci_ti); Modified: stable/11/sys/conf/files ============================================================================== --- stable/11/sys/conf/files Thu May 11 20:30:44 2017 (r318196) +++ stable/11/sys/conf/files Thu May 11 20:55:11 2017 (r318197) @@ -2169,6 +2169,7 @@ dev/mlx/mlx.c optional mlx dev/mlx/mlx_disk.c optional mlx dev/mlx/mlx_pci.c optional mlx pci dev/mly/mly.c optional mly +dev/mmc/mmc_subr.c optional mmc | mmcsd dev/mmc/mmc.c optional mmc dev/mmc/mmcbr_if.m standard dev/mmc/mmcbus_if.m standard @@ -3209,7 +3210,7 @@ geom/geom_disk.c standard geom/geom_dump.c standard geom/geom_event.c standard geom/geom_fox.c optional geom_fox -geom/geom_flashmap.c optional fdt cfi | fdt nand | fdt mx25l +geom/geom_flashmap.c optional fdt cfi | fdt nand | fdt mx25l | mmcsd geom/geom_io.c standard geom/geom_kern.c standard geom/geom_map.c optional geom_map Modified: stable/11/sys/dev/mmc/bridge.h ============================================================================== --- stable/11/sys/dev/mmc/bridge.h Thu May 11 20:30:44 2017 (r318196) +++ stable/11/sys/dev/mmc/bridge.h Thu May 11 20:55:11 2017 (r318197) @@ -52,7 +52,7 @@ */ #ifndef DEV_MMC_BRIDGE_H -#define DEV_MMC_BRIDGE_H +#define DEV_MMC_BRIDGE_H #include @@ -60,7 +60,7 @@ * This file defines interfaces for the mmc bridge. The names chosen * are similar to or the same as the names used in Linux to allow for * easy porting of what Linux calls mmc host drivers. I use the - * FreeBSD terminology of bridge and bus for consistancy with other + * FreeBSD terminology of bridge and bus for consistency with other * drivers in the system. This file corresponds roughly to the Linux * linux/mmc/host.h file. * @@ -73,10 +73,9 @@ * to be added to the mmcbus file). * * Attached to the mmc bridge is an mmcbus. The mmcbus is described - * in dev/mmc/bus.h. + * in dev/mmc/mmcbus_if.m. */ - /* * mmc_ios is a structure that is used to store the state of the mmc/sd * bus configuration. This include the bus' clock speed, its voltage, @@ -112,7 +111,7 @@ enum mmc_bus_timing { struct mmc_ios { uint32_t clock; /* Speed of the clock in Hz to move data */ - enum mmc_vdd vdd; /* Voltage to apply to the power pins/ */ + enum mmc_vdd vdd; /* Voltage to apply to the power pins */ enum mmc_bus_mode bus_mode; enum mmc_chip_select chip_select; enum mmc_bus_width bus_width; @@ -130,9 +129,11 @@ struct mmc_host { uint32_t host_ocr; uint32_t ocr; uint32_t caps; -#define MMC_CAP_4_BIT_DATA (1 << 0) /* Can do 4-bit data transfers */ -#define MMC_CAP_8_BIT_DATA (1 << 1) /* Can do 8-bit data transfers */ -#define MMC_CAP_HSPEED (1 << 2) /* Can do High Speed transfers */ +#define MMC_CAP_4_BIT_DATA (1 << 0) /* Can do 4-bit data transfers */ +#define MMC_CAP_8_BIT_DATA (1 << 1) /* Can do 8-bit data transfers */ +#define MMC_CAP_HSPEED (1 << 2) /* Can do High Speed transfers */ +#define MMC_CAP_BOOT_NOACC (1 << 4) /* Cannot access boot partitions */ +#define MMC_CAP_WAIT_WHILE_BUSY (1 << 5) /* Host waits for busy responses */ enum mmc_card_mode mode; struct mmc_ios ios; /* Current state of the host */ }; @@ -140,4 +141,12 @@ struct mmc_host { extern driver_t mmc_driver; extern devclass_t mmc_devclass; +#define MMC_VERSION 2 + +#define MMC_DECLARE_BRIDGE(name) \ + DRIVER_MODULE(mmc, name, mmc_driver, mmc_devclass, NULL, NULL); \ + MODULE_DEPEND(name, mmc, MMC_VERSION, MMC_VERSION, MMC_VERSION); +#define MMC_DEPEND(name) \ + MODULE_DEPEND(name, mmc, MMC_VERSION, MMC_VERSION, MMC_VERSION); + #endif /* DEV_MMC_BRIDGE_H */ Modified: stable/11/sys/dev/mmc/host/dwmmc.c ============================================================================== --- stable/11/sys/dev/mmc/host/dwmmc.c Thu May 11 20:30:44 2017 (r318196) +++ stable/11/sys/dev/mmc/host/dwmmc.c Thu May 11 20:55:11 2017 (r318197) @@ -43,11 +43,8 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include -#include #include -#include #include #include @@ -1182,7 +1179,6 @@ driver_t dwmmc_driver = { static devclass_t dwmmc_devclass; -DRIVER_MODULE(dwmmc, simplebus, dwmmc_driver, dwmmc_devclass, 0, 0); -DRIVER_MODULE(dwmmc, ofwbus, dwmmc_driver, dwmmc_devclass, 0, 0); -DRIVER_MODULE(mmc, dwmmc, mmc_driver, mmc_devclass, NULL, NULL); -MODULE_DEPEND(dwmmc, mmc, 1, 1, 1); +DRIVER_MODULE(dwmmc, simplebus, dwmmc_driver, dwmmc_devclass, NULL, NULL); +DRIVER_MODULE(dwmmc, ofwbus, dwmmc_driver, dwmmc_devclass, NULL, NULL); +MMC_DECLARE_BRIDGE(dwmmc); Modified: stable/11/sys/dev/mmc/mmc.c ============================================================================== --- stable/11/sys/dev/mmc/mmc.c Thu May 11 20:30:44 2017 (r318196) +++ stable/11/sys/dev/mmc/mmc.c Thu May 11 20:55:11 2017 (r318197) @@ -65,25 +65,16 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include +#include #include #include #include + #include "mmcbr_if.h" #include "mmcbus_if.h" -struct mmc_softc { - device_t dev; - struct mtx sc_mtx; - struct intr_config_hook config_intrhook; - device_t owner; - uint32_t last_rca; - int squelched; /* suppress reporting of (expected) errors */ - int log_count; - struct timeval log_time; -}; - -#define LOG_PPS 5 /* Log no more than 5 errors per second. */ - /* * Per-card data */ @@ -91,7 +82,7 @@ struct mmc_ivars { uint32_t raw_cid[4]; /* Raw bits of the CID */ uint32_t raw_csd[4]; /* Raw bits of the CSD */ uint32_t raw_scr[2]; /* Raw bits of the SCR */ - uint8_t raw_ext_csd[512]; /* Raw bits of the EXT_CSD */ + uint8_t raw_ext_csd[MMC_EXTCSD_SIZE]; /* Raw bits of the EXT_CSD */ uint32_t raw_sd_status[16]; /* Raw bits of the SD_STATUS */ uint16_t rca; enum mmc_card_mode mode; @@ -107,18 +98,20 @@ struct mmc_ivars { uint32_t tran_speed; /* Max speed in normal mode */ uint32_t hs_tran_speed; /* Max speed in high speed mode */ uint32_t erase_sector; /* Card native erase sector size */ + uint32_t cmd6_time; /* Generic switch timeout [us] */ char card_id_string[64];/* Formatted CID info (serial, MFG, etc) */ char card_sn_string[16];/* Formatted serial # for disk->d_ident */ }; -#define CMD_RETRIES 3 +#define CMD_RETRIES 3 #define CARD_ID_FREQUENCY 400000 /* Spec requires 400kHz max during ID phase. */ static SYSCTL_NODE(_hw, OID_AUTO, mmc, CTLFLAG_RD, NULL, "mmc driver"); static int mmc_debug; -SYSCTL_INT(_hw_mmc, OID_AUTO, debug, CTLFLAG_RWTUN, &mmc_debug, 0, "Debug level"); +SYSCTL_INT(_hw_mmc, OID_AUTO, debug, CTLFLAG_RWTUN, &mmc_debug, 0, + "Debug level"); /* bus entry points */ static int mmc_acquire_bus(device_t busdev, device_t dev); @@ -137,14 +130,14 @@ static int mmc_wait_for_request(device_t static int mmc_write_ivar(device_t bus, device_t child, int which, uintptr_t value); -#define MMC_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) +#define MMC_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) #define MMC_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx) -#define MMC_LOCK_INIT(_sc) \ - mtx_init(&_sc->sc_mtx, device_get_nameunit(_sc->dev), \ +#define MMC_LOCK_INIT(_sc) \ + mtx_init(&(_sc)->sc_mtx, device_get_nameunit((_sc)->dev), \ "mmc", MTX_DEF) -#define MMC_LOCK_DESTROY(_sc) mtx_destroy(&_sc->sc_mtx); -#define MMC_ASSERT_LOCKED(_sc) mtx_assert(&_sc->sc_mtx, MA_OWNED); -#define MMC_ASSERT_UNLOCKED(_sc) mtx_assert(&_sc->sc_mtx, MA_NOTOWNED); +#define MMC_LOCK_DESTROY(_sc) mtx_destroy(&(_sc)->sc_mtx); +#define MMC_ASSERT_LOCKED(_sc) mtx_assert(&(_sc)->sc_mtx, MA_OWNED); +#define MMC_ASSERT_UNLOCKED(_sc) mtx_assert(&(_sc)->sc_mtx, MA_NOTOWNED); static int mmc_all_send_cid(struct mmc_softc *sc, uint32_t *rawcid); static void mmc_app_decode_scr(uint32_t *raw_scr, struct mmc_scr *scr); @@ -155,7 +148,8 @@ static int mmc_app_sd_status(struct mmc_ static int mmc_app_send_scr(struct mmc_softc *sc, uint16_t rca, uint32_t *rawscr); static int mmc_calculate_clock(struct mmc_softc *sc); -static void mmc_decode_cid_mmc(uint32_t *raw_cid, struct mmc_cid *cid); +static void mmc_decode_cid_mmc(uint32_t *raw_cid, struct mmc_cid *cid, + bool is_4_41p); static void mmc_decode_cid_sd(uint32_t *raw_cid, struct mmc_cid *cid); static void mmc_decode_csd_mmc(uint32_t *raw_csd, struct mmc_csd *csd); static void mmc_decode_csd_sd(uint32_t *raw_csd, struct mmc_csd *csd); @@ -181,25 +175,17 @@ static uint32_t mmc_select_vdd(struct mm static int mmc_send_app_op_cond(struct mmc_softc *sc, uint32_t ocr, uint32_t *rocr); static int mmc_send_csd(struct mmc_softc *sc, uint16_t rca, uint32_t *rawcsd); -static int mmc_send_ext_csd(struct mmc_softc *sc, uint8_t *rawextcsd); static int mmc_send_if_cond(struct mmc_softc *sc, uint8_t vhs); static int mmc_send_op_cond(struct mmc_softc *sc, uint32_t ocr, uint32_t *rocr); static int mmc_send_relative_addr(struct mmc_softc *sc, uint32_t *resp); -static int mmc_send_status(struct mmc_softc *sc, uint16_t rca, - uint32_t *status); static int mmc_set_blocklen(struct mmc_softc *sc, uint32_t len); -static int mmc_set_card_bus_width(struct mmc_softc *sc, uint16_t rca, - int width); +static int mmc_set_card_bus_width(struct mmc_softc *sc, + struct mmc_ivars *ivar); static int mmc_set_relative_addr(struct mmc_softc *sc, uint16_t resp); -static int mmc_set_timing(struct mmc_softc *sc, int timing); -static int mmc_switch(struct mmc_softc *sc, uint8_t set, uint8_t index, - uint8_t value); +static int mmc_set_timing(struct mmc_softc *sc, struct mmc_ivars *ivar, + int timing); static int mmc_test_bus_width(struct mmc_softc *sc); -static int mmc_wait_for_app_cmd(struct mmc_softc *sc, uint32_t rca, - struct mmc_command *cmd, int retries); -static int mmc_wait_for_cmd(struct mmc_softc *sc, struct mmc_command *cmd, - int retries); static int mmc_wait_for_command(struct mmc_softc *sc, uint32_t opcode, uint32_t arg, uint32_t flags, uint32_t *resp, int retries); static int mmc_wait_for_req(struct mmc_softc *sc, struct mmc_request *req); @@ -259,7 +245,7 @@ mmc_suspend(device_t dev) err = bus_generic_suspend(dev); if (err) - return (err); + return (err); mmc_power_down(sc); return (0); } @@ -298,19 +284,19 @@ mmc_acquire_bus(device_t busdev, device_ * unselect unless the bus code itself wants the mmc * bus, and constantly reselecting causes problems. */ - rca = mmc_get_rca(dev); + ivar = device_get_ivars(dev); + rca = ivar->rca; if (sc->last_rca != rca) { mmc_select_card(sc, rca); sc->last_rca = rca; /* Prepare bus width for the new card. */ - ivar = device_get_ivars(dev); if (bootverbose || mmc_debug) { device_printf(busdev, "setting bus width to %d bits\n", (ivar->bus_width == bus_width_4) ? 4 : (ivar->bus_width == bus_width_8) ? 8 : 1); } - mmc_set_card_bus_width(sc, rca, ivar->bus_width); + mmc_set_card_bus_width(sc, ivar); mmcbr_set_bus_width(busdev, ivar->bus_width); mmcbr_update_ios(busdev); } @@ -407,7 +393,8 @@ mmc_wait_for_req(struct mmc_softc *sc, s } static int -mmc_wait_for_request(device_t brdev, device_t reqdev, struct mmc_request *req) +mmc_wait_for_request(device_t brdev, device_t reqdev __unused, + struct mmc_request *req) { struct mmc_softc *sc = device_get_softc(brdev); @@ -415,74 +402,6 @@ mmc_wait_for_request(device_t brdev, dev } static int -mmc_wait_for_cmd(struct mmc_softc *sc, struct mmc_command *cmd, int retries) -{ - struct mmc_request mreq; - int err; - - do { - memset(&mreq, 0, sizeof(mreq)); - memset(cmd->resp, 0, sizeof(cmd->resp)); - cmd->retries = 0; /* Retries done here, not in hardware. */ - cmd->mrq = &mreq; - mreq.cmd = cmd; - if (mmc_wait_for_req(sc, &mreq) != 0) - err = MMC_ERR_FAILED; - else - err = cmd->error; - } while (err != MMC_ERR_NONE && retries-- > 0); - - if (err != MMC_ERR_NONE && sc->squelched == 0) { - if (ppsratecheck(&sc->log_time, &sc->log_count, LOG_PPS)) { - device_printf(sc->dev, "CMD%d failed, RESULT: %d\n", - cmd->opcode, err); - } - } - - return (err); -} - -static int -mmc_wait_for_app_cmd(struct mmc_softc *sc, uint32_t rca, - struct mmc_command *cmd, int retries) -{ - struct mmc_command appcmd; - int err; - - /* Squelch error reporting at lower levels, we report below. */ - sc->squelched++; - do { - memset(&appcmd, 0, sizeof(appcmd)); - appcmd.opcode = MMC_APP_CMD; - appcmd.arg = rca << 16; - appcmd.flags = MMC_RSP_R1 | MMC_CMD_AC; - appcmd.data = NULL; - if (mmc_wait_for_cmd(sc, &appcmd, 0) != 0) - err = MMC_ERR_FAILED; - else - err = appcmd.error; - if (err == MMC_ERR_NONE) { - if (!(appcmd.resp[0] & R1_APP_CMD)) - err = MMC_ERR_FAILED; - else if (mmc_wait_for_cmd(sc, cmd, 0) != 0) - err = MMC_ERR_FAILED; - else - err = cmd->error; - } - } while (err != MMC_ERR_NONE && retries-- > 0); - sc->squelched--; - - if (err != MMC_ERR_NONE && sc->squelched == 0) { - if (ppsratecheck(&sc->log_time, &sc->log_count, LOG_PPS)) { - device_printf(sc->dev, "ACMD%d failed, RESULT: %d\n", - cmd->opcode, err); - } - } - - return (err); -} - -static int mmc_wait_for_command(struct mmc_softc *sc, uint32_t opcode, uint32_t arg, uint32_t flags, uint32_t *resp, int retries) { @@ -494,7 +413,7 @@ mmc_wait_for_command(struct mmc_softc *s cmd.arg = arg; cmd.flags = flags; cmd.data = NULL; - err = mmc_wait_for_cmd(sc, &cmd, retries); + err = mmc_wait_for_cmd(sc->dev, sc->dev, &cmd, retries); if (err) return (err); if (resp) { @@ -522,7 +441,7 @@ mmc_idle_cards(struct mmc_softc *sc) cmd.arg = 0; cmd.flags = MMC_RSP_NONE | MMC_CMD_BC; cmd.data = NULL; - mmc_wait_for_cmd(sc, &cmd, CMD_RETRIES); + mmc_wait_for_cmd(sc->dev, sc->dev, &cmd, CMD_RETRIES); mmc_ms_delay(1); mmcbr_set_chip_select(dev, cs_dontcare); @@ -543,7 +462,8 @@ mmc_send_app_op_cond(struct mmc_softc *s cmd.data = NULL; for (i = 0; i < 1000; i++) { - err = mmc_wait_for_app_cmd(sc, 0, &cmd, CMD_RETRIES); + err = mmc_wait_for_app_cmd(sc->dev, sc->dev, 0, &cmd, + CMD_RETRIES); if (err != MMC_ERR_NONE) break; if ((cmd.resp[0] & MMC_OCR_CARD_BUSY) || @@ -570,7 +490,7 @@ mmc_send_op_cond(struct mmc_softc *sc, u cmd.data = NULL; for (i = 0; i < 1000; i++) { - err = mmc_wait_for_cmd(sc, &cmd, CMD_RETRIES); + err = mmc_wait_for_cmd(sc->dev, sc->dev, &cmd, CMD_RETRIES); if (err != MMC_ERR_NONE) break; if ((cmd.resp[0] & MMC_OCR_CARD_BUSY) || @@ -596,7 +516,7 @@ mmc_send_if_cond(struct mmc_softc *sc, u cmd.flags = MMC_RSP_R7 | MMC_CMD_BCR; cmd.data = NULL; - err = mmc_wait_for_cmd(sc, &cmd, CMD_RETRIES); + err = mmc_wait_for_cmd(sc->dev, sc->dev, &cmd, CMD_RETRIES); return (err); } @@ -647,24 +567,6 @@ mmc_select_card(struct mmc_softc *sc, ui } static int -mmc_switch(struct mmc_softc *sc, uint8_t set, uint8_t index, uint8_t value) -{ - struct mmc_command cmd; - int err; - - memset(&cmd, 0, sizeof(cmd)); - cmd.opcode = MMC_SWITCH_FUNC; - cmd.arg = (MMC_SWITCH_FUNC_WR << 24) | - (index << 16) | - (value << 8) | - set; - cmd.flags = MMC_RSP_R1B | MMC_CMD_AC; - cmd.data = NULL; - err = mmc_wait_for_cmd(sc, &cmd, CMD_RETRIES); - return (err); -} - -static int mmc_sd_switch(struct mmc_softc *sc, uint8_t mode, uint8_t grp, uint8_t value, uint8_t *res) { @@ -688,12 +590,12 @@ mmc_sd_switch(struct mmc_softc *sc, uint data.len = 64; data.flags = MMC_DATA_READ; - err = mmc_wait_for_cmd(sc, &cmd, CMD_RETRIES); + err = mmc_wait_for_cmd(sc->dev, sc->dev, &cmd, CMD_RETRIES); return (err); } static int -mmc_set_card_bus_width(struct mmc_softc *sc, uint16_t rca, int width) +mmc_set_card_bus_width(struct mmc_softc *sc, struct mmc_ivars *ivar) { struct mmc_command cmd; int err; @@ -704,13 +606,14 @@ mmc_set_card_bus_width(struct mmc_softc cmd.opcode = ACMD_SET_CLR_CARD_DETECT; cmd.flags = MMC_RSP_R1 | MMC_CMD_AC; cmd.arg = SD_CLR_CARD_DETECT; - err = mmc_wait_for_app_cmd(sc, rca, &cmd, CMD_RETRIES); + err = mmc_wait_for_app_cmd(sc->dev, sc->dev, ivar->rca, &cmd, + CMD_RETRIES); if (err != 0) return (err); memset(&cmd, 0, sizeof(cmd)); cmd.opcode = ACMD_SET_BUS_WIDTH; cmd.flags = MMC_RSP_R1 | MMC_CMD_AC; - switch (width) { + switch (ivar->bus_width) { case bus_width_1: cmd.arg = SD_BUS_WIDTH_1; break; @@ -720,9 +623,10 @@ mmc_set_card_bus_width(struct mmc_softc default: return (MMC_ERR_INVALID); } - err = mmc_wait_for_app_cmd(sc, rca, &cmd, CMD_RETRIES); + err = mmc_wait_for_app_cmd(sc->dev, sc->dev, ivar->rca, &cmd, + CMD_RETRIES); } else { - switch (width) { + switch (ivar->bus_width) { case bus_width_1: value = EXT_CSD_BUS_WIDTH_1; break; @@ -735,18 +639,19 @@ mmc_set_card_bus_width(struct mmc_softc default: return (MMC_ERR_INVALID); } - err = mmc_switch(sc, EXT_CSD_CMD_SET_NORMAL, EXT_CSD_BUS_WIDTH, - value); + err = mmc_switch(sc->dev, sc->dev, ivar->rca, + EXT_CSD_CMD_SET_NORMAL, EXT_CSD_BUS_WIDTH, value, + ivar->cmd6_time, true); } return (err); } static int -mmc_set_timing(struct mmc_softc *sc, int timing) +mmc_set_timing(struct mmc_softc *sc, struct mmc_ivars *ivar, int timing) { - int err; - uint8_t value; u_char switch_res[64]; + uint8_t value; + int err; switch (timing) { case bus_timing_normal: @@ -758,26 +663,52 @@ mmc_set_timing(struct mmc_softc *sc, int default: return (MMC_ERR_INVALID); } - if (mmcbr_get_mode(sc->dev) == mode_sd) + if (mmcbr_get_mode(sc->dev) == mode_sd) { err = mmc_sd_switch(sc, SD_SWITCH_MODE_SET, SD_SWITCH_GROUP1, value, switch_res); - else - err = mmc_switch(sc, EXT_CSD_CMD_SET_NORMAL, - EXT_CSD_HS_TIMING, value); + if (err != MMC_ERR_NONE) + return (err); + if ((switch_res[16] & 0xf) != value) + return (MMC_ERR_FAILED); + mmcbr_set_timing(sc->dev, timing); + mmcbr_update_ios(sc->dev); + } else { + err = mmc_switch(sc->dev, sc->dev, ivar->rca, + EXT_CSD_CMD_SET_NORMAL, EXT_CSD_HS_TIMING, value, + ivar->cmd6_time, false); + if (err != MMC_ERR_NONE) + return (err); + mmcbr_set_timing(sc->dev, timing); + mmcbr_update_ios(sc->dev); + err = mmc_switch_status(sc->dev, sc->dev, ivar->rca, + ivar->cmd6_time); + } return (err); } +static const uint8_t p8[8] = { + 0x55, 0xAA, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +}; + +static const uint8_t p8ok[8] = { + 0xAA, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +}; + +static const uint8_t p4[4] = { + 0x5A, 0x00, 0x00, 0x00 +}; + +static const uint8_t p4ok[4] = { + 0xA5, 0x00, 0x00, 0x00 +}; + static int mmc_test_bus_width(struct mmc_softc *sc) { struct mmc_command cmd; struct mmc_data data; - int err; uint8_t buf[8]; - uint8_t p8[8] = { 0x55, 0xAA, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; - uint8_t p8ok[8] = { 0xAA, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; - uint8_t p4[4] = { 0x5A, 0x00, 0x00, 0x00, }; - uint8_t p4ok[4] = { 0xA5, 0x00, 0x00, 0x00, }; + int err; if (mmcbr_get_caps(sc->dev) & MMC_CAP_8_BIT_DATA) { mmcbr_set_bus_width(sc->dev, bus_width_8); @@ -791,10 +722,10 @@ mmc_test_bus_width(struct mmc_softc *sc) cmd.flags = MMC_RSP_R1 | MMC_CMD_ADTC; cmd.data = &data; - data.data = p8; + data.data = __DECONST(void *, p8); data.len = 8; data.flags = MMC_DATA_WRITE; - mmc_wait_for_cmd(sc, &cmd, 0); + mmc_wait_for_cmd(sc->dev, sc->dev, &cmd, 0); memset(&cmd, 0, sizeof(cmd)); memset(&data, 0, sizeof(data)); @@ -806,7 +737,7 @@ mmc_test_bus_width(struct mmc_softc *sc) data.data = buf; data.len = 8; data.flags = MMC_DATA_READ; - err = mmc_wait_for_cmd(sc, &cmd, 0); + err = mmc_wait_for_cmd(sc->dev, sc->dev, &cmd, 0); sc->squelched--; mmcbr_set_bus_width(sc->dev, bus_width_1); @@ -828,10 +759,10 @@ mmc_test_bus_width(struct mmc_softc *sc) cmd.flags = MMC_RSP_R1 | MMC_CMD_ADTC; cmd.data = &data; - data.data = p4; + data.data = __DECONST(void *, p4); data.len = 4; data.flags = MMC_DATA_WRITE; - mmc_wait_for_cmd(sc, &cmd, 0); + mmc_wait_for_cmd(sc->dev, sc->dev, &cmd, 0); memset(&cmd, 0, sizeof(cmd)); memset(&data, 0, sizeof(data)); @@ -843,7 +774,7 @@ mmc_test_bus_width(struct mmc_softc *sc) data.data = buf; data.len = 4; data.flags = MMC_DATA_READ; - err = mmc_wait_for_cmd(sc, &cmd, 0); + err = mmc_wait_for_cmd(sc->dev, sc->dev, &cmd, 0); sc->squelched--; mmcbr_set_bus_width(sc->dev, bus_width_1); @@ -861,6 +792,7 @@ mmc_get_bits(uint32_t *bits, int bit_len const int i = (bit_len / 32) - (start / 32) - 1; const int shift = start & 31; uint32_t retval = bits[i] >> shift; + if (size + shift > 32) retval |= bits[i - 1] << (32 - shift); return (retval & ((1llu << size) - 1)); @@ -885,7 +817,7 @@ mmc_decode_cid_sd(uint32_t *raw_cid, str } static void -mmc_decode_cid_mmc(uint32_t *raw_cid, struct mmc_cid *cid) +mmc_decode_cid_mmc(uint32_t *raw_cid, struct mmc_cid *cid, bool is_4_41p) { int i; @@ -899,7 +831,11 @@ mmc_decode_cid_mmc(uint32_t *raw_cid, st cid->prv = mmc_get_bits(raw_cid, 128, 48, 8); cid->psn = mmc_get_bits(raw_cid, 128, 16, 32); cid->mdt_month = mmc_get_bits(raw_cid, 128, 12, 4); - cid->mdt_year = mmc_get_bits(raw_cid, 128, 8, 4) + 1997; + cid->mdt_year = mmc_get_bits(raw_cid, 128, 8, 4); + if (is_4_41p) + cid->mdt_year += 2013; + else + cid->mdt_year += 1997; } static void @@ -980,10 +916,14 @@ mmc_decode_csd_sd(uint32_t *raw_csd, str csd->write_blk_misalign = mmc_get_bits(raw_csd, 128, 78, 1); csd->read_blk_misalign = mmc_get_bits(raw_csd, 128, 77, 1); csd->dsr_imp = mmc_get_bits(raw_csd, 128, 76, 1); - csd->vdd_r_curr_min = cur_min[mmc_get_bits(raw_csd, 128, 59, 3)]; - csd->vdd_r_curr_max = cur_max[mmc_get_bits(raw_csd, 128, 56, 3)]; - csd->vdd_w_curr_min = cur_min[mmc_get_bits(raw_csd, 128, 53, 3)]; - csd->vdd_w_curr_max = cur_max[mmc_get_bits(raw_csd, 128, 50, 3)]; + csd->vdd_r_curr_min = + cur_min[mmc_get_bits(raw_csd, 128, 59, 3)]; + csd->vdd_r_curr_max = + cur_max[mmc_get_bits(raw_csd, 128, 56, 3)]; + csd->vdd_w_curr_min = + cur_min[mmc_get_bits(raw_csd, 128, 53, 3)]; + csd->vdd_w_curr_max = + cur_max[mmc_get_bits(raw_csd, 128, 50, 3)]; m = mmc_get_bits(raw_csd, 128, 62, 12); e = mmc_get_bits(raw_csd, 128, 47, 3); csd->capacity = ((1 + m) << (e + 2)) * csd->read_bl_len; @@ -1008,8 +948,8 @@ mmc_decode_csd_sd(uint32_t *raw_csd, str csd->write_blk_misalign = mmc_get_bits(raw_csd, 128, 78, 1); csd->read_blk_misalign = mmc_get_bits(raw_csd, 128, 77, 1); csd->dsr_imp = mmc_get_bits(raw_csd, 128, 76, 1); - csd->capacity = ((uint64_t)mmc_get_bits(raw_csd, 128, 48, 22) + 1) * - 512 * 1024; + csd->capacity = ((uint64_t)mmc_get_bits(raw_csd, 128, 48, 22) + + 1) * 512 * 1024; csd->erase_blk_en = mmc_get_bits(raw_csd, 128, 46, 1); csd->erase_sector = mmc_get_bits(raw_csd, 128, 39, 7) + 1; csd->wp_grp_size = mmc_get_bits(raw_csd, 128, 32, 7); @@ -1107,7 +1047,7 @@ mmc_all_send_cid(struct mmc_softc *sc, u cmd.arg = 0; cmd.flags = MMC_RSP_R2 | MMC_CMD_BCR; cmd.data = NULL; - err = mmc_wait_for_cmd(sc, &cmd, CMD_RETRIES); + err = mmc_wait_for_cmd(sc->dev, sc->dev, &cmd, CMD_RETRIES); memcpy(rawcid, cmd.resp, 4 * sizeof(uint32_t)); return (err); } @@ -1123,7 +1063,7 @@ mmc_send_csd(struct mmc_softc *sc, uint1 cmd.arg = rca << 16; cmd.flags = MMC_RSP_R2 | MMC_CMD_BCR; cmd.data = NULL; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@freebsd.org Thu May 11 21:01:05 2017 Return-Path: Delivered-To: svn-src-stable@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 489CCD69159; Thu, 11 May 2017 21:01:05 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 DC13E1BF4; Thu, 11 May 2017 21:01:04 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4BL14vb033446; Thu, 11 May 2017 21:01:04 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4BL12n5033434; Thu, 11 May 2017 21:01:02 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201705112101.v4BL12n5033434@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Thu, 11 May 2017 21:01: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: r318198 - in stable/10: . etc/mtree include sys/arm/at91 sys/arm/broadcom/bcm2835 sys/arm/freescale/imx sys/arm/lpc sys/arm/ti sys/conf sys/dev/mmc sys/dev/sdhci sys/modules sys/modules... 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@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 May 2017 21:01:05 -0000 Author: marius Date: Thu May 11 21:01:02 2017 New Revision: 318198 URL: https://svnweb.freebsd.org/changeset/base/318198 Log: MFC: r292180 (partial), r297127 (partial), r311911, r311923, r312939, r313250, r313712, r314811 (partial), r314887 (partial), r315430, r317981, r315466 o Move the DRIVER_MODULE() statements that declare mmc(4) to be a child of the various bridge drivers out of dev/mmc.c and into the bridge drivers. o Add ACPI platform support for SDHCI driver. o Fix some overly long lines, whitespace and other bugs according to style(9) as well as spelling etc. in mmc(4), mmcsd(4) and sdhci(4). o In the mmc(4) bridges and sdhci(4) (bus) front-ends: - Remove redundant assignments of the default bus_generic_print_child device method, - use DEVMETHOD_END, - use NULL instead of 0 for pointers. o Trim/adjust includes. o Add and use a MMC_DECLARE_BRIDGE macro for declaring mmc(4) bridges as kernel drivers and their dependency onto mmc(4). o Add support for eMMC "partitions". Besides the user data area, i. e. the default partition, eMMC v4.41 and later devices can additionally provide up to: 1 enhanced user data area partition 2 boot partitions 1 RPMB (Replay Protected Memory Block) partition 4 general purpose partitions (optionally with a enhanced or extended attribute) Besides simply subdividing eMMC devices, some Intel NUCs having UEFI code in the boot partitions etc., another use case for the partition support is the activation of pseudo-SLC mode, which manufacturers of eMMC chips typically associate with the enhanced user data area and/ or the enhanced attribute of general purpose partitions. CAVEAT EMPTOR: Partitioning eMMC devices is a one-time operation. o Now that properly issuing CMD6 is crucial (so data isn't written to the wrong partition for example), make a step into the direction of correctly handling the timeout for these commands in the MMC layer. Also, do a SEND_STATUS when CMD6 is invoked with an R1B response as recommended by relevant specifications. o Add an IOCTL interface to mmcsd(4); this is sufficiently compatible with Linux so that the GNU mmc-utils can be ported to and used with FreeBSD (note that due to the remaining deficiencies outlined above SANITIZE operations issued by/with `mmc` currently most likely will fail). These latter have been added to ports as sysutils/mmc-utils. Among others, the `mmc` tool of mmc-utils allows for partitioning eMMC devices (tested working). o For devices following the eMMC specification v4.41 or later, year 0 is 2013 rather than 1997; so correct this for assembling the device ID string properly. o Let mmcsd.ko depend on mmc.ko. Additionally, bump MMC_VERSION as at least for some of the above a matching pair is required. Added: stable/10/sys/dev/mmc/mmc_ioctl.h - copied unchanged from r315430, head/sys/dev/mmc/mmc_ioctl.h stable/10/sys/dev/mmc/mmc_private.h - copied unchanged from r315430, head/sys/dev/mmc/mmc_private.h stable/10/sys/dev/mmc/mmc_subr.c - copied unchanged from r315430, head/sys/dev/mmc/mmc_subr.c stable/10/sys/dev/mmc/mmc_subr.h - copied unchanged from r315430, head/sys/dev/mmc/mmc_subr.h stable/10/sys/dev/sdhci/sdhci_acpi.c - copied, changed from r311911, head/sys/dev/sdhci/sdhci_acpi.c stable/10/sys/modules/sdhci_acpi/ - copied from r311911, head/sys/modules/sdhci_acpi/ Modified: stable/10/UPDATING stable/10/etc/mtree/BSD.include.dist stable/10/include/Makefile stable/10/sys/arm/at91/at91_mci.c stable/10/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c stable/10/sys/arm/freescale/imx/imx_sdhci.c stable/10/sys/arm/lpc/lpc_mmc.c stable/10/sys/arm/ti/ti_sdhci.c stable/10/sys/conf/files stable/10/sys/dev/mmc/bridge.h stable/10/sys/dev/mmc/mmc.c stable/10/sys/dev/mmc/mmcbr_if.m stable/10/sys/dev/mmc/mmcbrvar.h stable/10/sys/dev/mmc/mmcreg.h stable/10/sys/dev/mmc/mmcsd.c stable/10/sys/dev/mmc/mmcvar.h stable/10/sys/dev/sdhci/sdhci.c stable/10/sys/dev/sdhci/sdhci.h stable/10/sys/dev/sdhci/sdhci_fdt.c stable/10/sys/dev/sdhci/sdhci_if.m stable/10/sys/dev/sdhci/sdhci_pci.c stable/10/sys/modules/Makefile stable/10/sys/modules/mmc/Makefile stable/10/sys/modules/sdhci_acpi/Makefile stable/10/sys/powerpc/mpc85xx/fsl_sdhc.c stable/10/sys/sys/param.h Directory Properties: stable/10/ (props changed) Modified: stable/10/UPDATING ============================================================================== --- stable/10/UPDATING Thu May 11 20:55:11 2017 (r318197) +++ stable/10/UPDATING Thu May 11 21:01:02 2017 (r318198) @@ -16,6 +16,13 @@ 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. +20170511: + The mmcsd.ko module now additionally depends on geom_flashmap.ko. + Also, mmc.ko and mmcsd.ko need to be a matching pair built from the + same source (previously, the dependency of mmcsd.ko on mmc.ko was + missing, but mmcsd.ko now will refuse to load if it is incompatible + with mmc.ko). + 20170413: As of r316810 for ipfilter, keep frags is no longer assumed when keep state is specified in a rule. r316810 aligns ipfilter with Modified: stable/10/etc/mtree/BSD.include.dist ============================================================================== --- stable/10/etc/mtree/BSD.include.dist Thu May 11 20:55:11 2017 (r318197) +++ stable/10/etc/mtree/BSD.include.dist Thu May 11 21:01:02 2017 (r318198) @@ -132,6 +132,8 @@ .. mfi .. + mmc + .. mpt mpilib .. Modified: stable/10/include/Makefile ============================================================================== --- stable/10/include/Makefile Thu May 11 20:55:11 2017 (r318197) +++ stable/10/include/Makefile Thu May 11 21:01:02 2017 (r318198) @@ -45,7 +45,8 @@ LDIRS= bsm cam geom net net80211 netatal LSUBDIRS= cam/ata cam/scsi \ dev/acpica dev/agp dev/an dev/bktr dev/ciss dev/filemon dev/firewire \ dev/hwpmc dev/hyperv \ - dev/ic dev/iicbus ${_dev_ieee488} dev/io dev/lmc dev/mfi dev/nvme \ + dev/ic dev/iicbus ${_dev_ieee488} dev/io dev/lmc dev/mfi dev/mmc \ + dev/nvme \ dev/ofw dev/pbio dev/pci ${_dev_powermac_nvram} dev/ppbus dev/smbus \ dev/speaker dev/utopia dev/vkbd dev/wi \ fs/devfs fs/fdescfs fs/msdosfs fs/nandfs fs/nfs fs/nullfs \ Modified: stable/10/sys/arm/at91/at91_mci.c ============================================================================== --- stable/10/sys/arm/at91/at91_mci.c Thu May 11 20:55:11 2017 (r318197) +++ stable/10/sys/arm/at91/at91_mci.c Thu May 11 21:01:02 2017 (r318198) @@ -32,23 +32,16 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include -#include #include #include -#include #include #include #include #include -#include #include #include #include -#include -#include -#include #include #include @@ -61,7 +54,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #ifdef FDT @@ -1410,3 +1402,5 @@ DRIVER_MODULE(at91_mci, simplebus, at91_ DRIVER_MODULE(at91_mci, atmelarm, at91_mci_driver, at91_mci_devclass, NULL, NULL); #endif + +MMC_DECLARE_BRIDGE(at91_mci); Modified: stable/10/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c ============================================================================== --- stable/10/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Thu May 11 20:55:11 2017 (r318197) +++ stable/10/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Thu May 11 21:01:02 2017 (r318198) @@ -47,9 +47,10 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include + +#include "mmcbr_if.h" #include "sdhci_if.h" #include "bcm2835_dma.h" @@ -637,7 +638,6 @@ static device_method_t bcm_sdhci_methods /* Bus interface */ DEVMETHOD(bus_read_ivar, sdhci_generic_read_ivar), DEVMETHOD(bus_write_ivar, sdhci_generic_write_ivar), - DEVMETHOD(bus_print_child, bus_generic_print_child), /* MMC bridge interface */ DEVMETHOD(mmcbr_update_ios, sdhci_generic_update_ios), @@ -660,7 +660,7 @@ static device_method_t bcm_sdhci_methods DEVMETHOD(sdhci_write_4, bcm_sdhci_write_4), DEVMETHOD(sdhci_write_multi_4, bcm_sdhci_write_multi_4), - { 0, 0 } + DEVMETHOD_END }; static devclass_t bcm_sdhci_devclass; @@ -671,5 +671,7 @@ static driver_t bcm_sdhci_driver = { sizeof(struct bcm_sdhci_softc), }; -DRIVER_MODULE(sdhci_bcm, simplebus, bcm_sdhci_driver, bcm_sdhci_devclass, 0, 0); +DRIVER_MODULE(sdhci_bcm, simplebus, bcm_sdhci_driver, bcm_sdhci_devclass, + NULL, NULL); MODULE_DEPEND(sdhci_bcm, sdhci, 1, 1, 1); +MMC_DECLARE_BRIDGE(sdhci_bcm); Modified: stable/10/sys/arm/freescale/imx/imx_sdhci.c ============================================================================== --- stable/10/sys/arm/freescale/imx/imx_sdhci.c Thu May 11 20:55:11 2017 (r318197) +++ stable/10/sys/arm/freescale/imx/imx_sdhci.c Thu May 11 21:01:02 2017 (r318198) @@ -835,4 +835,5 @@ static driver_t imx_sdhci_driver = { DRIVER_MODULE(sdhci_imx, simplebus, imx_sdhci_driver, imx_sdhci_devclass, 0, 0); MODULE_DEPEND(sdhci_imx, sdhci, 1, 1, 1); - +DRIVER_MODULE(mmc, sdhci_imx, mmc_driver, mmc_devclass, NULL, NULL); +MODULE_DEPEND(sdhci_imx, mmc, 1, 1, 1); Modified: stable/10/sys/arm/lpc/lpc_mmc.c ============================================================================== --- stable/10/sys/arm/lpc/lpc_mmc.c Thu May 11 20:55:11 2017 (r318197) +++ stable/10/sys/arm/lpc/lpc_mmc.c Thu May 11 21:01:02 2017 (r318198) @@ -29,24 +29,14 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include -#include -#include #include -#include #include #include #include #include -#include #include #include -#include -#include -#include - -#include #include #include @@ -58,7 +48,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include @@ -754,7 +743,6 @@ static device_method_t lpc_mmc_methods[] /* Bus interface */ DEVMETHOD(bus_read_ivar, lpc_mmc_read_ivar), DEVMETHOD(bus_write_ivar, lpc_mmc_write_ivar), - DEVMETHOD(bus_print_child, bus_generic_print_child), /* MMC bridge interface */ DEVMETHOD(mmcbr_update_ios, lpc_mmc_update_ios), @@ -763,7 +751,7 @@ static device_method_t lpc_mmc_methods[] DEVMETHOD(mmcbr_acquire_host, lpc_mmc_acquire_host), DEVMETHOD(mmcbr_release_host, lpc_mmc_release_host), - { 0, 0 } + DEVMETHOD_END }; static devclass_t lpc_mmc_devclass; @@ -774,4 +762,5 @@ static driver_t lpc_mmc_driver = { sizeof(struct lpc_mmc_softc), }; -DRIVER_MODULE(lpcmmc, simplebus, lpc_mmc_driver, lpc_mmc_devclass, 0, 0); +DRIVER_MODULE(lpcmmc, simplebus, lpc_mmc_driver, lpc_mmc_devclass, NULL, NULL); +MMC_DECLARE_BRIDGE(lpcmmc); Modified: stable/10/sys/arm/ti/ti_sdhci.c ============================================================================== --- stable/10/sys/arm/ti/ti_sdhci.c Thu May 11 20:55:11 2017 (r318197) +++ stable/10/sys/arm/ti/ti_sdhci.c Thu May 11 21:01:02 2017 (r318198) @@ -599,6 +599,11 @@ ti_sdhci_attach(device_t dev) * before waiting to see them de-asserted. */ sc->slot.quirks |= SDHCI_QUIRK_WAITFOR_RESET_ASSERTED; + + /* + * The controller waits for busy responses. + */ + sc->slot.quirks |= SDHCI_QUIRK_WAIT_WHILE_BUSY; /* * DMA is not really broken, I just haven't implemented it yet. @@ -685,7 +690,6 @@ static device_method_t ti_sdhci_methods[ /* Bus interface */ DEVMETHOD(bus_read_ivar, sdhci_generic_read_ivar), DEVMETHOD(bus_write_ivar, sdhci_generic_write_ivar), - DEVMETHOD(bus_print_child, bus_generic_print_child), /* MMC bridge interface */ DEVMETHOD(mmcbr_update_ios, ti_sdhci_update_ios), @@ -715,5 +719,7 @@ static driver_t ti_sdhci_driver = { sizeof(struct ti_sdhci_softc), }; -DRIVER_MODULE(sdhci_ti, simplebus, ti_sdhci_driver, ti_sdhci_devclass, 0, 0); +DRIVER_MODULE(sdhci_ti, simplebus, ti_sdhci_driver, ti_sdhci_devclass, NULL, + NULL); MODULE_DEPEND(sdhci_ti, sdhci, 1, 1, 1); +MMC_DECLARE_BRIDGE(sdhci_ti); Modified: stable/10/sys/conf/files ============================================================================== --- stable/10/sys/conf/files Thu May 11 20:55:11 2017 (r318197) +++ stable/10/sys/conf/files Thu May 11 21:01:02 2017 (r318198) @@ -1899,6 +1899,7 @@ dev/mlx/mlx.c optional mlx dev/mlx/mlx_disk.c optional mlx dev/mlx/mlx_pci.c optional mlx pci dev/mly/mly.c optional mly +dev/mmc/mmc_subr.c optional mmc | mmcsd dev/mmc/mmc.c optional mmc dev/mmc/mmcbr_if.m standard dev/mmc/mmcbus_if.m standard @@ -2288,6 +2289,7 @@ dev/scd/scd.c optional scd isa dev/scd/scd_isa.c optional scd isa dev/sdhci/sdhci.c optional sdhci dev/sdhci/sdhci_if.m optional sdhci +dev/sdhci/sdhci_acpi.c optional sdhci acpi dev/sdhci/sdhci_pci.c optional sdhci pci dev/sf/if_sf.c optional sf pci dev/sge/if_sge.c optional sge pci @@ -2898,7 +2900,7 @@ geom/geom_disk.c standard geom/geom_dump.c standard geom/geom_event.c standard geom/geom_fox.c optional geom_fox -geom/geom_flashmap.c optional fdt cfi | fdt nand +geom/geom_flashmap.c optional fdt cfi | fdt nand | mmcsd geom/geom_io.c standard geom/geom_kern.c standard geom/geom_map.c optional geom_map Modified: stable/10/sys/dev/mmc/bridge.h ============================================================================== --- stable/10/sys/dev/mmc/bridge.h Thu May 11 20:55:11 2017 (r318197) +++ stable/10/sys/dev/mmc/bridge.h Thu May 11 21:01:02 2017 (r318198) @@ -52,13 +52,15 @@ */ #ifndef DEV_MMC_BRIDGE_H -#define DEV_MMC_BRIDGE_H +#define DEV_MMC_BRIDGE_H + +#include /* * This file defines interfaces for the mmc bridge. The names chosen * are similar to or the same as the names used in Linux to allow for * easy porting of what Linux calls mmc host drivers. I use the - * FreeBSD terminology of bridge and bus for consistancy with other + * FreeBSD terminology of bridge and bus for consistency with other * drivers in the system. This file corresponds roughly to the Linux * linux/mmc/host.h file. * @@ -71,10 +73,9 @@ * to be added to the mmcbus file). * * Attached to the mmc bridge is an mmcbus. The mmcbus is described - * in dev/mmc/bus.h. + * in dev/mmc/mmcbus_if.m. */ - /* * mmc_ios is a structure that is used to store the state of the mmc/sd * bus configuration. This include the bus' clock speed, its voltage, @@ -110,7 +111,7 @@ enum mmc_bus_timing { struct mmc_ios { uint32_t clock; /* Speed of the clock in Hz to move data */ - enum mmc_vdd vdd; /* Voltage to apply to the power pins/ */ + enum mmc_vdd vdd; /* Voltage to apply to the power pins */ enum mmc_bus_mode bus_mode; enum mmc_chip_select chip_select; enum mmc_bus_width bus_width; @@ -128,11 +129,24 @@ struct mmc_host { uint32_t host_ocr; uint32_t ocr; uint32_t caps; -#define MMC_CAP_4_BIT_DATA (1 << 0) /* Can do 4-bit data transfers */ -#define MMC_CAP_8_BIT_DATA (1 << 1) /* Can do 8-bit data transfers */ -#define MMC_CAP_HSPEED (1 << 2) /* Can do High Speed transfers */ +#define MMC_CAP_4_BIT_DATA (1 << 0) /* Can do 4-bit data transfers */ +#define MMC_CAP_8_BIT_DATA (1 << 1) /* Can do 8-bit data transfers */ +#define MMC_CAP_HSPEED (1 << 2) /* Can do High Speed transfers */ +#define MMC_CAP_BOOT_NOACC (1 << 4) /* Cannot access boot partitions */ +#define MMC_CAP_WAIT_WHILE_BUSY (1 << 5) /* Host waits for busy responses */ enum mmc_card_mode mode; struct mmc_ios ios; /* Current state of the host */ }; +extern driver_t mmc_driver; +extern devclass_t mmc_devclass; + +#define MMC_VERSION 2 + +#define MMC_DECLARE_BRIDGE(name) \ + DRIVER_MODULE(mmc, name, mmc_driver, mmc_devclass, NULL, NULL); \ + MODULE_DEPEND(name, mmc, MMC_VERSION, MMC_VERSION, MMC_VERSION); +#define MMC_DEPEND(name) \ + MODULE_DEPEND(name, mmc, MMC_VERSION, MMC_VERSION, MMC_VERSION); + #endif /* DEV_MMC_BRIDGE_H */ Modified: stable/10/sys/dev/mmc/mmc.c ============================================================================== --- stable/10/sys/dev/mmc/mmc.c Thu May 11 20:55:11 2017 (r318197) +++ stable/10/sys/dev/mmc/mmc.c Thu May 11 21:01:02 2017 (r318198) @@ -65,25 +65,16 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include +#include #include #include #include + #include "mmcbr_if.h" #include "mmcbus_if.h" -struct mmc_softc { - device_t dev; - struct mtx sc_mtx; - struct intr_config_hook config_intrhook; - device_t owner; - uint32_t last_rca; - int squelched; /* suppress reporting of (expected) errors */ - int log_count; - struct timeval log_time; -}; - -#define LOG_PPS 5 /* Log no more than 5 errors per second. */ - /* * Per-card data */ @@ -91,7 +82,7 @@ struct mmc_ivars { uint32_t raw_cid[4]; /* Raw bits of the CID */ uint32_t raw_csd[4]; /* Raw bits of the CSD */ uint32_t raw_scr[2]; /* Raw bits of the SCR */ - uint8_t raw_ext_csd[512]; /* Raw bits of the EXT_CSD */ + uint8_t raw_ext_csd[MMC_EXTCSD_SIZE]; /* Raw bits of the EXT_CSD */ uint32_t raw_sd_status[16]; /* Raw bits of the SD_STATUS */ uint16_t rca; enum mmc_card_mode mode; @@ -107,11 +98,12 @@ struct mmc_ivars { uint32_t tran_speed; /* Max speed in normal mode */ uint32_t hs_tran_speed; /* Max speed in high speed mode */ uint32_t erase_sector; /* Card native erase sector size */ + uint32_t cmd6_time; /* Generic switch timeout [us] */ char card_id_string[64];/* Formatted CID info (serial, MFG, etc) */ char card_sn_string[16];/* Formatted serial # for disk->d_ident */ }; -#define CMD_RETRIES 3 +#define CMD_RETRIES 3 #define CARD_ID_FREQUENCY 400000 /* Spec requires 400kHz max during ID phase. */ @@ -119,7 +111,8 @@ static SYSCTL_NODE(_hw, OID_AUTO, mmc, C static int mmc_debug; TUNABLE_INT("hw.mmc.debug", &mmc_debug); -SYSCTL_INT(_hw_mmc, OID_AUTO, debug, CTLFLAG_RWTUN, &mmc_debug, 0, "Debug level"); +SYSCTL_INT(_hw_mmc, OID_AUTO, debug, CTLFLAG_RWTUN, &mmc_debug, 0, + "Debug level"); /* bus entry points */ static int mmc_acquire_bus(device_t busdev, device_t dev); @@ -138,14 +131,14 @@ static int mmc_wait_for_request(device_t static int mmc_write_ivar(device_t bus, device_t child, int which, uintptr_t value); -#define MMC_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) +#define MMC_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) #define MMC_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx) -#define MMC_LOCK_INIT(_sc) \ - mtx_init(&_sc->sc_mtx, device_get_nameunit(_sc->dev), \ +#define MMC_LOCK_INIT(_sc) \ + mtx_init(&(_sc)->sc_mtx, device_get_nameunit((_sc)->dev), \ "mmc", MTX_DEF) -#define MMC_LOCK_DESTROY(_sc) mtx_destroy(&_sc->sc_mtx); -#define MMC_ASSERT_LOCKED(_sc) mtx_assert(&_sc->sc_mtx, MA_OWNED); -#define MMC_ASSERT_UNLOCKED(_sc) mtx_assert(&_sc->sc_mtx, MA_NOTOWNED); +#define MMC_LOCK_DESTROY(_sc) mtx_destroy(&(_sc)->sc_mtx); +#define MMC_ASSERT_LOCKED(_sc) mtx_assert(&(_sc)->sc_mtx, MA_OWNED); +#define MMC_ASSERT_UNLOCKED(_sc) mtx_assert(&(_sc)->sc_mtx, MA_NOTOWNED); static int mmc_all_send_cid(struct mmc_softc *sc, uint32_t *rawcid); static void mmc_app_decode_scr(uint32_t *raw_scr, struct mmc_scr *scr); @@ -156,7 +149,8 @@ static int mmc_app_sd_status(struct mmc_ static int mmc_app_send_scr(struct mmc_softc *sc, uint16_t rca, uint32_t *rawscr); static int mmc_calculate_clock(struct mmc_softc *sc); -static void mmc_decode_cid_mmc(uint32_t *raw_cid, struct mmc_cid *cid); +static void mmc_decode_cid_mmc(uint32_t *raw_cid, struct mmc_cid *cid, + bool is_4_41p); static void mmc_decode_cid_sd(uint32_t *raw_cid, struct mmc_cid *cid); static void mmc_decode_csd_mmc(uint32_t *raw_csd, struct mmc_csd *csd); static void mmc_decode_csd_sd(uint32_t *raw_csd, struct mmc_csd *csd); @@ -182,25 +176,17 @@ static uint32_t mmc_select_vdd(struct mm static int mmc_send_app_op_cond(struct mmc_softc *sc, uint32_t ocr, uint32_t *rocr); static int mmc_send_csd(struct mmc_softc *sc, uint16_t rca, uint32_t *rawcsd); -static int mmc_send_ext_csd(struct mmc_softc *sc, uint8_t *rawextcsd); static int mmc_send_if_cond(struct mmc_softc *sc, uint8_t vhs); static int mmc_send_op_cond(struct mmc_softc *sc, uint32_t ocr, uint32_t *rocr); static int mmc_send_relative_addr(struct mmc_softc *sc, uint32_t *resp); -static int mmc_send_status(struct mmc_softc *sc, uint16_t rca, - uint32_t *status); static int mmc_set_blocklen(struct mmc_softc *sc, uint32_t len); -static int mmc_set_card_bus_width(struct mmc_softc *sc, uint16_t rca, - int width); +static int mmc_set_card_bus_width(struct mmc_softc *sc, + struct mmc_ivars *ivar); static int mmc_set_relative_addr(struct mmc_softc *sc, uint16_t resp); -static int mmc_set_timing(struct mmc_softc *sc, int timing); -static int mmc_switch(struct mmc_softc *sc, uint8_t set, uint8_t index, - uint8_t value); +static int mmc_set_timing(struct mmc_softc *sc, struct mmc_ivars *ivar, + int timing); static int mmc_test_bus_width(struct mmc_softc *sc); -static int mmc_wait_for_app_cmd(struct mmc_softc *sc, uint32_t rca, - struct mmc_command *cmd, int retries); -static int mmc_wait_for_cmd(struct mmc_softc *sc, struct mmc_command *cmd, - int retries); static int mmc_wait_for_command(struct mmc_softc *sc, uint32_t opcode, uint32_t arg, uint32_t flags, uint32_t *resp, int retries); static int mmc_wait_for_req(struct mmc_softc *sc, struct mmc_request *req); @@ -260,7 +246,7 @@ mmc_suspend(device_t dev) err = bus_generic_suspend(dev); if (err) - return (err); + return (err); mmc_power_down(sc); return (0); } @@ -299,19 +285,19 @@ mmc_acquire_bus(device_t busdev, device_ * unselect unless the bus code itself wants the mmc * bus, and constantly reselecting causes problems. */ - rca = mmc_get_rca(dev); + ivar = device_get_ivars(dev); + rca = ivar->rca; if (sc->last_rca != rca) { mmc_select_card(sc, rca); sc->last_rca = rca; /* Prepare bus width for the new card. */ - ivar = device_get_ivars(dev); if (bootverbose || mmc_debug) { device_printf(busdev, "setting bus width to %d bits\n", (ivar->bus_width == bus_width_4) ? 4 : (ivar->bus_width == bus_width_8) ? 8 : 1); } - mmc_set_card_bus_width(sc, rca, ivar->bus_width); + mmc_set_card_bus_width(sc, ivar); mmcbr_set_bus_width(busdev, ivar->bus_width); mmcbr_update_ios(busdev); } @@ -408,7 +394,8 @@ mmc_wait_for_req(struct mmc_softc *sc, s } static int -mmc_wait_for_request(device_t brdev, device_t reqdev, struct mmc_request *req) +mmc_wait_for_request(device_t brdev, device_t reqdev __unused, + struct mmc_request *req) { struct mmc_softc *sc = device_get_softc(brdev); @@ -416,74 +403,6 @@ mmc_wait_for_request(device_t brdev, dev } static int -mmc_wait_for_cmd(struct mmc_softc *sc, struct mmc_command *cmd, int retries) -{ - struct mmc_request mreq; - int err; - - do { - memset(&mreq, 0, sizeof(mreq)); - memset(cmd->resp, 0, sizeof(cmd->resp)); - cmd->retries = 0; /* Retries done here, not in hardware. */ - cmd->mrq = &mreq; - mreq.cmd = cmd; - if (mmc_wait_for_req(sc, &mreq) != 0) - err = MMC_ERR_FAILED; - else - err = cmd->error; - } while (err != MMC_ERR_NONE && retries-- > 0); - - if (err != MMC_ERR_NONE && sc->squelched == 0) { - if (ppsratecheck(&sc->log_time, &sc->log_count, LOG_PPS)) { - device_printf(sc->dev, "CMD%d failed, RESULT: %d\n", - cmd->opcode, err); - } - } - - return (err); -} - -static int -mmc_wait_for_app_cmd(struct mmc_softc *sc, uint32_t rca, - struct mmc_command *cmd, int retries) -{ - struct mmc_command appcmd; - int err; - - /* Squelch error reporting at lower levels, we report below. */ - sc->squelched++; - do { - memset(&appcmd, 0, sizeof(appcmd)); - appcmd.opcode = MMC_APP_CMD; - appcmd.arg = rca << 16; - appcmd.flags = MMC_RSP_R1 | MMC_CMD_AC; - appcmd.data = NULL; - if (mmc_wait_for_cmd(sc, &appcmd, 0) != 0) - err = MMC_ERR_FAILED; - else - err = appcmd.error; - if (err == MMC_ERR_NONE) { - if (!(appcmd.resp[0] & R1_APP_CMD)) - err = MMC_ERR_FAILED; - else if (mmc_wait_for_cmd(sc, cmd, 0) != 0) - err = MMC_ERR_FAILED; - else - err = cmd->error; - } - } while (err != MMC_ERR_NONE && retries-- > 0); - sc->squelched--; - - if (err != MMC_ERR_NONE && sc->squelched == 0) { - if (ppsratecheck(&sc->log_time, &sc->log_count, LOG_PPS)) { - device_printf(sc->dev, "ACMD%d failed, RESULT: %d\n", - cmd->opcode, err); - } - } - - return (err); -} - -static int mmc_wait_for_command(struct mmc_softc *sc, uint32_t opcode, uint32_t arg, uint32_t flags, uint32_t *resp, int retries) { @@ -495,7 +414,7 @@ mmc_wait_for_command(struct mmc_softc *s cmd.arg = arg; cmd.flags = flags; cmd.data = NULL; - err = mmc_wait_for_cmd(sc, &cmd, retries); + err = mmc_wait_for_cmd(sc->dev, sc->dev, &cmd, retries); if (err) return (err); if (resp) { @@ -523,7 +442,7 @@ mmc_idle_cards(struct mmc_softc *sc) cmd.arg = 0; cmd.flags = MMC_RSP_NONE | MMC_CMD_BC; cmd.data = NULL; - mmc_wait_for_cmd(sc, &cmd, CMD_RETRIES); + mmc_wait_for_cmd(sc->dev, sc->dev, &cmd, CMD_RETRIES); mmc_ms_delay(1); mmcbr_set_chip_select(dev, cs_dontcare); @@ -544,7 +463,8 @@ mmc_send_app_op_cond(struct mmc_softc *s cmd.data = NULL; for (i = 0; i < 1000; i++) { - err = mmc_wait_for_app_cmd(sc, 0, &cmd, CMD_RETRIES); + err = mmc_wait_for_app_cmd(sc->dev, sc->dev, 0, &cmd, + CMD_RETRIES); if (err != MMC_ERR_NONE) break; if ((cmd.resp[0] & MMC_OCR_CARD_BUSY) || @@ -571,7 +491,7 @@ mmc_send_op_cond(struct mmc_softc *sc, u cmd.data = NULL; for (i = 0; i < 1000; i++) { - err = mmc_wait_for_cmd(sc, &cmd, CMD_RETRIES); + err = mmc_wait_for_cmd(sc->dev, sc->dev, &cmd, CMD_RETRIES); if (err != MMC_ERR_NONE) break; if ((cmd.resp[0] & MMC_OCR_CARD_BUSY) || @@ -597,7 +517,7 @@ mmc_send_if_cond(struct mmc_softc *sc, u cmd.flags = MMC_RSP_R7 | MMC_CMD_BCR; cmd.data = NULL; - err = mmc_wait_for_cmd(sc, &cmd, CMD_RETRIES); + err = mmc_wait_for_cmd(sc->dev, sc->dev, &cmd, CMD_RETRIES); return (err); } @@ -648,24 +568,6 @@ mmc_select_card(struct mmc_softc *sc, ui } static int -mmc_switch(struct mmc_softc *sc, uint8_t set, uint8_t index, uint8_t value) -{ - struct mmc_command cmd; - int err; - - memset(&cmd, 0, sizeof(cmd)); - cmd.opcode = MMC_SWITCH_FUNC; - cmd.arg = (MMC_SWITCH_FUNC_WR << 24) | - (index << 16) | - (value << 8) | - set; - cmd.flags = MMC_RSP_R1B | MMC_CMD_AC; - cmd.data = NULL; - err = mmc_wait_for_cmd(sc, &cmd, CMD_RETRIES); - return (err); -} - -static int mmc_sd_switch(struct mmc_softc *sc, uint8_t mode, uint8_t grp, uint8_t value, uint8_t *res) { @@ -689,12 +591,12 @@ mmc_sd_switch(struct mmc_softc *sc, uint data.len = 64; data.flags = MMC_DATA_READ; - err = mmc_wait_for_cmd(sc, &cmd, CMD_RETRIES); + err = mmc_wait_for_cmd(sc->dev, sc->dev, &cmd, CMD_RETRIES); return (err); } static int -mmc_set_card_bus_width(struct mmc_softc *sc, uint16_t rca, int width) +mmc_set_card_bus_width(struct mmc_softc *sc, struct mmc_ivars *ivar) { struct mmc_command cmd; int err; @@ -705,13 +607,14 @@ mmc_set_card_bus_width(struct mmc_softc cmd.opcode = ACMD_SET_CLR_CARD_DETECT; cmd.flags = MMC_RSP_R1 | MMC_CMD_AC; cmd.arg = SD_CLR_CARD_DETECT; - err = mmc_wait_for_app_cmd(sc, rca, &cmd, CMD_RETRIES); + err = mmc_wait_for_app_cmd(sc->dev, sc->dev, ivar->rca, &cmd, + CMD_RETRIES); if (err != 0) return (err); memset(&cmd, 0, sizeof(cmd)); cmd.opcode = ACMD_SET_BUS_WIDTH; cmd.flags = MMC_RSP_R1 | MMC_CMD_AC; - switch (width) { + switch (ivar->bus_width) { case bus_width_1: cmd.arg = SD_BUS_WIDTH_1; break; @@ -721,9 +624,10 @@ mmc_set_card_bus_width(struct mmc_softc default: return (MMC_ERR_INVALID); } - err = mmc_wait_for_app_cmd(sc, rca, &cmd, CMD_RETRIES); + err = mmc_wait_for_app_cmd(sc->dev, sc->dev, ivar->rca, &cmd, + CMD_RETRIES); } else { - switch (width) { + switch (ivar->bus_width) { case bus_width_1: value = EXT_CSD_BUS_WIDTH_1; break; @@ -736,18 +640,19 @@ mmc_set_card_bus_width(struct mmc_softc default: return (MMC_ERR_INVALID); } - err = mmc_switch(sc, EXT_CSD_CMD_SET_NORMAL, EXT_CSD_BUS_WIDTH, - value); + err = mmc_switch(sc->dev, sc->dev, ivar->rca, + EXT_CSD_CMD_SET_NORMAL, EXT_CSD_BUS_WIDTH, value, + ivar->cmd6_time, true); } return (err); } static int -mmc_set_timing(struct mmc_softc *sc, int timing) +mmc_set_timing(struct mmc_softc *sc, struct mmc_ivars *ivar, int timing) { - int err; - uint8_t value; u_char switch_res[64]; + uint8_t value; + int err; switch (timing) { case bus_timing_normal: @@ -759,26 +664,52 @@ mmc_set_timing(struct mmc_softc *sc, int default: return (MMC_ERR_INVALID); } - if (mmcbr_get_mode(sc->dev) == mode_sd) + if (mmcbr_get_mode(sc->dev) == mode_sd) { err = mmc_sd_switch(sc, SD_SWITCH_MODE_SET, SD_SWITCH_GROUP1, value, switch_res); - else - err = mmc_switch(sc, EXT_CSD_CMD_SET_NORMAL, - EXT_CSD_HS_TIMING, value); + if (err != MMC_ERR_NONE) + return (err); + if ((switch_res[16] & 0xf) != value) + return (MMC_ERR_FAILED); + mmcbr_set_timing(sc->dev, timing); + mmcbr_update_ios(sc->dev); + } else { + err = mmc_switch(sc->dev, sc->dev, ivar->rca, + EXT_CSD_CMD_SET_NORMAL, EXT_CSD_HS_TIMING, value, + ivar->cmd6_time, false); + if (err != MMC_ERR_NONE) + return (err); + mmcbr_set_timing(sc->dev, timing); + mmcbr_update_ios(sc->dev); + err = mmc_switch_status(sc->dev, sc->dev, ivar->rca, + ivar->cmd6_time); + } return (err); } +static const uint8_t p8[8] = { + 0x55, 0xAA, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +}; + +static const uint8_t p8ok[8] = { + 0xAA, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +}; + +static const uint8_t p4[4] = { + 0x5A, 0x00, 0x00, 0x00 +}; + +static const uint8_t p4ok[4] = { + 0xA5, 0x00, 0x00, 0x00 +}; + static int mmc_test_bus_width(struct mmc_softc *sc) { struct mmc_command cmd; struct mmc_data data; - int err; uint8_t buf[8]; - uint8_t p8[8] = { 0x55, 0xAA, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; - uint8_t p8ok[8] = { 0xAA, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; - uint8_t p4[4] = { 0x5A, 0x00, 0x00, 0x00, }; - uint8_t p4ok[4] = { 0xA5, 0x00, 0x00, 0x00, }; + int err; if (mmcbr_get_caps(sc->dev) & MMC_CAP_8_BIT_DATA) { mmcbr_set_bus_width(sc->dev, bus_width_8); @@ -792,10 +723,10 @@ mmc_test_bus_width(struct mmc_softc *sc) cmd.flags = MMC_RSP_R1 | MMC_CMD_ADTC; cmd.data = &data; - data.data = p8; + data.data = __DECONST(void *, p8); data.len = 8; data.flags = MMC_DATA_WRITE; - mmc_wait_for_cmd(sc, &cmd, 0); + mmc_wait_for_cmd(sc->dev, sc->dev, &cmd, 0); memset(&cmd, 0, sizeof(cmd)); memset(&data, 0, sizeof(data)); @@ -807,7 +738,7 @@ mmc_test_bus_width(struct mmc_softc *sc) data.data = buf; data.len = 8; data.flags = MMC_DATA_READ; - err = mmc_wait_for_cmd(sc, &cmd, 0); + err = mmc_wait_for_cmd(sc->dev, sc->dev, &cmd, 0); sc->squelched--; mmcbr_set_bus_width(sc->dev, bus_width_1); @@ -829,10 +760,10 @@ mmc_test_bus_width(struct mmc_softc *sc) cmd.flags = MMC_RSP_R1 | MMC_CMD_ADTC; cmd.data = &data; - data.data = p4; + data.data = __DECONST(void *, p4); data.len = 4; data.flags = MMC_DATA_WRITE; - mmc_wait_for_cmd(sc, &cmd, 0); + mmc_wait_for_cmd(sc->dev, sc->dev, &cmd, 0); memset(&cmd, 0, sizeof(cmd)); memset(&data, 0, sizeof(data)); @@ -844,7 +775,7 @@ mmc_test_bus_width(struct mmc_softc *sc) data.data = buf; data.len = 4; data.flags = MMC_DATA_READ; - err = mmc_wait_for_cmd(sc, &cmd, 0); + err = mmc_wait_for_cmd(sc->dev, sc->dev, &cmd, 0); sc->squelched--; mmcbr_set_bus_width(sc->dev, bus_width_1); @@ -862,6 +793,7 @@ mmc_get_bits(uint32_t *bits, int bit_len const int i = (bit_len / 32) - (start / 32) - 1; const int shift = start & 31; uint32_t retval = bits[i] >> shift; + if (size + shift > 32) retval |= bits[i - 1] << (32 - shift); return (retval & ((1llu << size) - 1)); @@ -886,7 +818,7 @@ mmc_decode_cid_sd(uint32_t *raw_cid, str } static void -mmc_decode_cid_mmc(uint32_t *raw_cid, struct mmc_cid *cid) +mmc_decode_cid_mmc(uint32_t *raw_cid, struct mmc_cid *cid, bool is_4_41p) { int i; @@ -900,7 +832,11 @@ mmc_decode_cid_mmc(uint32_t *raw_cid, st cid->prv = mmc_get_bits(raw_cid, 128, 48, 8); cid->psn = mmc_get_bits(raw_cid, 128, 16, 32); cid->mdt_month = mmc_get_bits(raw_cid, 128, 12, 4); - cid->mdt_year = mmc_get_bits(raw_cid, 128, 8, 4) + 1997; + cid->mdt_year = mmc_get_bits(raw_cid, 128, 8, 4); + if (is_4_41p) + cid->mdt_year += 2013; + else + cid->mdt_year += 1997; } static void @@ -981,10 +917,14 @@ mmc_decode_csd_sd(uint32_t *raw_csd, str csd->write_blk_misalign = mmc_get_bits(raw_csd, 128, 78, 1); csd->read_blk_misalign = mmc_get_bits(raw_csd, 128, 77, 1); csd->dsr_imp = mmc_get_bits(raw_csd, 128, 76, 1); - csd->vdd_r_curr_min = cur_min[mmc_get_bits(raw_csd, 128, 59, 3)]; - csd->vdd_r_curr_max = cur_max[mmc_get_bits(raw_csd, 128, 56, 3)]; - csd->vdd_w_curr_min = cur_min[mmc_get_bits(raw_csd, 128, 53, 3)]; - csd->vdd_w_curr_max = cur_max[mmc_get_bits(raw_csd, 128, 50, 3)]; + csd->vdd_r_curr_min = + cur_min[mmc_get_bits(raw_csd, 128, 59, 3)]; + csd->vdd_r_curr_max = + cur_max[mmc_get_bits(raw_csd, 128, 56, 3)]; + csd->vdd_w_curr_min = + cur_min[mmc_get_bits(raw_csd, 128, 53, 3)]; + csd->vdd_w_curr_max = + cur_max[mmc_get_bits(raw_csd, 128, 50, 3)]; m = mmc_get_bits(raw_csd, 128, 62, 12); e = mmc_get_bits(raw_csd, 128, 47, 3); csd->capacity = ((1 + m) << (e + 2)) * csd->read_bl_len; @@ -1009,8 +949,8 @@ mmc_decode_csd_sd(uint32_t *raw_csd, str csd->write_blk_misalign = mmc_get_bits(raw_csd, 128, 78, 1); csd->read_blk_misalign = mmc_get_bits(raw_csd, 128, 77, 1); csd->dsr_imp = mmc_get_bits(raw_csd, 128, 76, 1); - csd->capacity = ((uint64_t)mmc_get_bits(raw_csd, 128, 48, 22) + 1) * - 512 * 1024; + csd->capacity = ((uint64_t)mmc_get_bits(raw_csd, 128, 48, 22) + + 1) * 512 * 1024; csd->erase_blk_en = mmc_get_bits(raw_csd, 128, 46, 1); csd->erase_sector = mmc_get_bits(raw_csd, 128, 39, 7) + 1; csd->wp_grp_size = mmc_get_bits(raw_csd, 128, 32, 7); @@ -1108,7 +1048,7 @@ mmc_all_send_cid(struct mmc_softc *sc, u cmd.arg = 0; cmd.flags = MMC_RSP_R2 | MMC_CMD_BCR; cmd.data = NULL; - err = mmc_wait_for_cmd(sc, &cmd, CMD_RETRIES); + err = mmc_wait_for_cmd(sc->dev, sc->dev, &cmd, CMD_RETRIES); memcpy(rawcid, cmd.resp, 4 * sizeof(uint32_t)); return (err); } @@ -1124,7 +1064,7 @@ mmc_send_csd(struct mmc_softc *sc, uint1 cmd.arg = rca << 16; cmd.flags = MMC_RSP_R2 | MMC_CMD_BCR; cmd.data = NULL; - err = mmc_wait_for_cmd(sc, &cmd, CMD_RETRIES); + err = mmc_wait_for_cmd(sc->dev, sc->dev, &cmd, CMD_RETRIES); memcpy(rawcsd, cmd.resp, 4 * sizeof(uint32_t)); return (err); } @@ -1149,42 +1089,18 @@ mmc_app_send_scr(struct mmc_softc *sc, u data.len = 8; data.flags = MMC_DATA_READ; - err = mmc_wait_for_app_cmd(sc, rca, &cmd, CMD_RETRIES); + err = mmc_wait_for_app_cmd(sc->dev, sc->dev, rca, &cmd, CMD_RETRIES); rawscr[0] = be32toh(rawscr[0]); rawscr[1] = be32toh(rawscr[1]); return (err); } static int -mmc_send_ext_csd(struct mmc_softc *sc, uint8_t *rawextcsd) -{ - int err; - struct mmc_command cmd; - struct mmc_data data; - - memset(&cmd, 0, sizeof(cmd)); - memset(&data, 0, sizeof(data)); - - memset(rawextcsd, 0, 512); - cmd.opcode = MMC_SEND_EXT_CSD; - cmd.flags = MMC_RSP_R1 | MMC_CMD_ADTC; - cmd.arg = 0; - cmd.data = &data; - - data.data = rawextcsd; - data.len = 512; - data.flags = MMC_DATA_READ; - - err = mmc_wait_for_cmd(sc, &cmd, CMD_RETRIES); - return (err); -} - -static int mmc_app_sd_status(struct mmc_softc *sc, uint16_t rca, uint32_t *rawsdstatus) { - int err, i; struct mmc_command cmd; struct mmc_data data; + int err, i; memset(&cmd, 0, sizeof(cmd)); memset(&data, 0, sizeof(data)); @@ -1199,7 +1115,7 @@ mmc_app_sd_status(struct mmc_softc *sc, data.len = 64; data.flags = MMC_DATA_READ; - err = mmc_wait_for_app_cmd(sc, rca, &cmd, CMD_RETRIES); + err = mmc_wait_for_app_cmd(sc->dev, sc->dev, rca, &cmd, CMD_RETRIES); for (i = 0; i < 16; i++) rawsdstatus[i] = be32toh(rawsdstatus[i]); return (err); @@ -1216,7 +1132,7 @@ mmc_set_relative_addr(struct mmc_softc * cmd.arg = resp << 16; cmd.flags = MMC_RSP_R6 | MMC_CMD_BCR; cmd.data = NULL; - err = mmc_wait_for_cmd(sc, &cmd, CMD_RETRIES); + err = mmc_wait_for_cmd(sc->dev, sc->dev, &cmd, CMD_RETRIES); return (err); } @@ -1231,28 +1147,12 @@ mmc_send_relative_addr(struct mmc_softc cmd.arg = 0; cmd.flags = MMC_RSP_R6 | MMC_CMD_BCR; cmd.data = NULL; - err = mmc_wait_for_cmd(sc, &cmd, CMD_RETRIES); + err = mmc_wait_for_cmd(sc->dev, sc->dev, &cmd, CMD_RETRIES); *resp = cmd.resp[0]; return (err); } static int -mmc_send_status(struct mmc_softc *sc, uint16_t rca, uint32_t *status) -{ - struct mmc_command cmd; - int err; - - memset(&cmd, 0, sizeof(cmd)); - cmd.opcode = MMC_SEND_STATUS; - cmd.arg = rca << 16; - cmd.flags = MMC_RSP_R1 | MMC_CMD_AC; - cmd.data = NULL; - err = mmc_wait_for_cmd(sc, &cmd, CMD_RETRIES); - *status = cmd.resp[0]; - return (err); -} - -static int mmc_set_blocklen(struct mmc_softc *sc, uint32_t len) { struct mmc_command cmd; @@ -1263,13 +1163,14 @@ mmc_set_blocklen(struct mmc_softc *sc, u cmd.arg = len; cmd.flags = MMC_RSP_R1 | MMC_CMD_AC; cmd.data = NULL; - err = mmc_wait_for_cmd(sc, &cmd, CMD_RETRIES); + err = mmc_wait_for_cmd(sc->dev, sc->dev, &cmd, CMD_RETRIES); return (err); } static void mmc_log_card(device_t dev, struct mmc_ivars *ivar, int newcard) { + device_printf(dev, "Card at relative address 0x%04x%s:\n", ivar->rca, newcard ? " added" : ""); device_printf(dev, " card: %s\n", ivar->card_id_string); @@ -1287,13 +1188,14 @@ mmc_log_card(device_t dev, struct mmc_iv static void mmc_discover_cards(struct mmc_softc *sc) { + u_char switch_res[64]; + uint32_t raw_cid[4]; struct mmc_ivars *ivar = NULL; device_t *devlist; - int err, i, devcount, newcard; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@freebsd.org Thu May 11 21:13:03 2017 Return-Path: Delivered-To: svn-src-stable@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 7EF53D6973F; Thu, 11 May 2017 21:13:03 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 3F499195; Thu, 11 May 2017 21:13:03 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4BLD2W7041934; Thu, 11 May 2017 21:13:02 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4BLD2XP041932; Thu, 11 May 2017 21:13:02 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201705112113.v4BLD2XP041932@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Thu, 11 May 2017 21:13:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318199 - stable/11/sys/dev/sdhci X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 May 2017 21:13:03 -0000 Author: marius Date: Thu May 11 21:13:01 2017 New Revision: 318199 URL: https://svnweb.freebsd.org/changeset/base/318199 Log: MFC: r315431 - Adds macros for the content of SDHCI_ADMA_ERR and SDHCI_HOST_CONTROL2 registers. - Add slot type capability bits. These bits should allow recognizing removable card slots, embedded cards and shared buses (shared bus supposedly is always comprised of non-removable cards). - Dump CAPABILITIES2, ADMA_ERR, HOST_CONTROL2 and ADMA_ADDRESS_LO registers in sdhci_dumpregs(). - The drive type support flags in the CAPABILITIES2 register are for drive types A,C,D, drive type B is the default setting (value 0) of the drive strength field in the SDHCI_HOST_CONTROL2 register. Obtained from: DragonFlyBSD (9e3c8f63, 455bd1b1) Modified: stable/11/sys/dev/sdhci/sdhci.c stable/11/sys/dev/sdhci/sdhci.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/sdhci/sdhci.c ============================================================================== --- stable/11/sys/dev/sdhci/sdhci.c Thu May 11 21:01:02 2017 (r318198) +++ stable/11/sys/dev/sdhci/sdhci.c Thu May 11 21:13:01 2017 (r318199) @@ -157,10 +157,14 @@ sdhci_dumpregs(struct sdhci_slot *slot) RD1(slot, SDHCI_TIMEOUT_CONTROL), RD4(slot, SDHCI_INT_STATUS)); slot_printf(slot, "Int enab: 0x%08x | Sig enab: 0x%08x\n", RD4(slot, SDHCI_INT_ENABLE), RD4(slot, SDHCI_SIGNAL_ENABLE)); - slot_printf(slot, "AC12 err: 0x%08x | Slot int: 0x%08x\n", - RD2(slot, SDHCI_ACMD12_ERR), RD2(slot, SDHCI_SLOT_INT_STATUS)); - slot_printf(slot, "Caps: 0x%08x | Max curr: 0x%08x\n", - RD4(slot, SDHCI_CAPABILITIES), RD4(slot, SDHCI_MAX_CURRENT)); + slot_printf(slot, "AC12 err: 0x%08x | Host ctl2: 0x%08x\n", + RD2(slot, SDHCI_ACMD12_ERR), RD2(slot, SDHCI_HOST_CONTROL2)); + slot_printf(slot, "Caps: 0x%08x | Caps2: 0x%08x\n", + RD4(slot, SDHCI_CAPABILITIES), RD4(slot, SDHCI_CAPABILITIES2)); + slot_printf(slot, "Max curr: 0x%08x | ADMA err: 0x%08x\n", + RD4(slot, SDHCI_MAX_CURRENT), RD1(slot, SDHCI_ADMA_ERR)); + slot_printf(slot, "ADMA addr: 0x%08x | Slot int: 0x%08x\n", + RD4(slot, SDHCI_ADMA_ADDRESS_LO), RD2(slot, SDHCI_SLOT_INT_STATUS)); slot_printf(slot, "===========================================\n"); Modified: stable/11/sys/dev/sdhci/sdhci.h ============================================================================== --- stable/11/sys/dev/sdhci/sdhci.h Thu May 11 21:01:02 2017 (r318198) +++ stable/11/sys/dev/sdhci/sdhci.h Thu May 11 21:13:01 2017 (r318199) @@ -219,7 +219,24 @@ SDHCI_INT_DATA_END_BIT) #define SDHCI_ACMD12_ERR 0x3C + #define SDHCI_HOST_CONTROL2 0x3E +#define SDHCI_CTRL2_PRESET_VALUE 0x8000 +#define SDHCI_CTRL2_ASYNC_INTR 0x4000 +#define SDHCI_CTRL2_SAMPLING_CLOCK 0x0080 +#define SDHCI_CTRL2_EXEC_TUNING 0x0040 +#define SDHCI_CTRL2_DRIVER_TYPE_MASK 0x0030 +#define SDHCI_CTRL2_DRIVER_TYPE_B 0x0000 +#define SDHCI_CTRL2_DRIVER_TYPE_A 0x0010 +#define SDHCI_CTRL2_DRIVER_TYPE_C 0x0020 +#define SDHCI_CTRL2_DRIVER_TYPE_D 0x0030 +#define SDHCI_CTRL2_S18_ENABLE 0x0008 +#define SDHCI_CTRL2_UHS_MASK 0x0007 +#define SDHCI_CTRL2_UHS_SDR12 0x0000 +#define SDHCI_CTRL2_UHS_SDR25 0x0001 +#define SDHCI_CTRL2_UHS_SDR50 0x0002 +#define SDHCI_CTRL2_UHS_SDR104 0x0003 +#define SDHCI_CTRL2_UHS_DDR50 0x0004 #define SDHCI_CAPABILITIES 0x40 #define SDHCI_TIMEOUT_CLK_MASK 0x0000003F @@ -240,14 +257,18 @@ #define SDHCI_CAN_VDD_180 0x04000000 #define SDHCI_CAN_DO_64BIT 0x10000000 #define SDHCI_CAN_ASYNC_INTR 0x20000000 +#define SDHCI_SLOTTYPE_MASK 0xC0000000 +#define SDHCI_SLOTTYPE_REMOVABLE 0x00000000 +#define SDHCI_SLOTTYPE_EMBEDDED 0x40000000 +#define SDHCI_SLOTTYPE_SHARED 0x80000000 #define SDHCI_CAPABILITIES2 0x44 #define SDHCI_CAN_SDR50 0x00000001 #define SDHCI_CAN_SDR104 0x00000002 #define SDHCI_CAN_DDR50 0x00000004 #define SDHCI_CAN_DRIVE_TYPE_A 0x00000010 -#define SDHCI_CAN_DRIVE_TYPE_B 0x00000020 -#define SDHCI_CAN_DRIVE_TYPE_C 0x00000040 +#define SDHCI_CAN_DRIVE_TYPE_C 0x00000020 +#define SDHCI_CAN_DRIVE_TYPE_D 0x00000040 #define SDHCI_RETUNE_CNT_MASK 0x00000F00 #define SDHCI_RETUNE_CNT_SHIFT 8 #define SDHCI_TUNE_SDR50 0x00002000 @@ -259,9 +280,17 @@ #define SDHCI_MAX_CURRENT 0x48 #define SDHCI_FORCE_AUTO_EVENT 0x50 #define SDHCI_FORCE_INTR_EVENT 0x52 + #define SDHCI_ADMA_ERR 0x54 -#define SDHCI_ADMA_ADDRESS_LOW 0x58 +#define SDHCI_ADMA_ERR_LENGTH 0x04 +#define SDHCI_ADMA_ERR_STATE_MASK 0x03 +#define SDHCI_ADMA_ERR_STATE_STOP 0x00 +#define SDHCI_ADMA_ERR_STATE_FDS 0x01 +#define SDHCI_ADMA_ERR_STATE_TFR 0x03 + +#define SDHCI_ADMA_ADDRESS_LO 0x58 #define SDHCI_ADMA_ADDRESS_HI 0x5C + #define SDHCI_PRESET_VALUE 0x60 #define SDHCI_SHARED_BUS_CTRL 0xE0 @@ -275,6 +304,7 @@ #define SDHCI_SPEC_100 0 #define SDHCI_SPEC_200 1 #define SDHCI_SPEC_300 2 +#define SDHCI_SPEC_400 3 SYSCTL_DECL(_hw_sdhci); From owner-svn-src-stable@freebsd.org Thu May 11 21:13:07 2017 Return-Path: Delivered-To: svn-src-stable@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 DC79BD69767; Thu, 11 May 2017 21:13:07 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 9F7E319D; Thu, 11 May 2017 21:13:07 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4BLD6dD041982; Thu, 11 May 2017 21:13:06 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4BLD64e041980; Thu, 11 May 2017 21:13:06 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201705112113.v4BLD64e041980@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Thu, 11 May 2017 21:13: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: r318200 - stable/10/sys/dev/sdhci 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@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 May 2017 21:13:08 -0000 Author: marius Date: Thu May 11 21:13:06 2017 New Revision: 318200 URL: https://svnweb.freebsd.org/changeset/base/318200 Log: MFC: r315431 - Adds macros for the content of SDHCI_ADMA_ERR and SDHCI_HOST_CONTROL2 registers. - Add slot type capability bits. These bits should allow recognizing removable card slots, embedded cards and shared buses (shared bus supposedly is always comprised of non-removable cards). - Dump CAPABILITIES2, ADMA_ERR, HOST_CONTROL2 and ADMA_ADDRESS_LO registers in sdhci_dumpregs(). - The drive type support flags in the CAPABILITIES2 register are for drive types A,C,D, drive type B is the default setting (value 0) of the drive strength field in the SDHCI_HOST_CONTROL2 register. Obtained from: DragonFlyBSD (9e3c8f63, 455bd1b1) Modified: stable/10/sys/dev/sdhci/sdhci.c stable/10/sys/dev/sdhci/sdhci.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sdhci/sdhci.c ============================================================================== --- stable/10/sys/dev/sdhci/sdhci.c Thu May 11 21:13:01 2017 (r318199) +++ stable/10/sys/dev/sdhci/sdhci.c Thu May 11 21:13:06 2017 (r318200) @@ -158,10 +158,14 @@ sdhci_dumpregs(struct sdhci_slot *slot) RD1(slot, SDHCI_TIMEOUT_CONTROL), RD4(slot, SDHCI_INT_STATUS)); slot_printf(slot, "Int enab: 0x%08x | Sig enab: 0x%08x\n", RD4(slot, SDHCI_INT_ENABLE), RD4(slot, SDHCI_SIGNAL_ENABLE)); - slot_printf(slot, "AC12 err: 0x%08x | Slot int: 0x%08x\n", - RD2(slot, SDHCI_ACMD12_ERR), RD2(slot, SDHCI_SLOT_INT_STATUS)); - slot_printf(slot, "Caps: 0x%08x | Max curr: 0x%08x\n", - RD4(slot, SDHCI_CAPABILITIES), RD4(slot, SDHCI_MAX_CURRENT)); + slot_printf(slot, "AC12 err: 0x%08x | Host ctl2: 0x%08x\n", + RD2(slot, SDHCI_ACMD12_ERR), RD2(slot, SDHCI_HOST_CONTROL2)); + slot_printf(slot, "Caps: 0x%08x | Caps2: 0x%08x\n", + RD4(slot, SDHCI_CAPABILITIES), RD4(slot, SDHCI_CAPABILITIES2)); + slot_printf(slot, "Max curr: 0x%08x | ADMA err: 0x%08x\n", + RD4(slot, SDHCI_MAX_CURRENT), RD1(slot, SDHCI_ADMA_ERR)); + slot_printf(slot, "ADMA addr: 0x%08x | Slot int: 0x%08x\n", + RD4(slot, SDHCI_ADMA_ADDRESS_LO), RD2(slot, SDHCI_SLOT_INT_STATUS)); slot_printf(slot, "===========================================\n"); Modified: stable/10/sys/dev/sdhci/sdhci.h ============================================================================== --- stable/10/sys/dev/sdhci/sdhci.h Thu May 11 21:13:01 2017 (r318199) +++ stable/10/sys/dev/sdhci/sdhci.h Thu May 11 21:13:06 2017 (r318200) @@ -219,7 +219,24 @@ SDHCI_INT_DATA_END_BIT) #define SDHCI_ACMD12_ERR 0x3C + #define SDHCI_HOST_CONTROL2 0x3E +#define SDHCI_CTRL2_PRESET_VALUE 0x8000 +#define SDHCI_CTRL2_ASYNC_INTR 0x4000 +#define SDHCI_CTRL2_SAMPLING_CLOCK 0x0080 +#define SDHCI_CTRL2_EXEC_TUNING 0x0040 +#define SDHCI_CTRL2_DRIVER_TYPE_MASK 0x0030 +#define SDHCI_CTRL2_DRIVER_TYPE_B 0x0000 +#define SDHCI_CTRL2_DRIVER_TYPE_A 0x0010 +#define SDHCI_CTRL2_DRIVER_TYPE_C 0x0020 +#define SDHCI_CTRL2_DRIVER_TYPE_D 0x0030 +#define SDHCI_CTRL2_S18_ENABLE 0x0008 +#define SDHCI_CTRL2_UHS_MASK 0x0007 +#define SDHCI_CTRL2_UHS_SDR12 0x0000 +#define SDHCI_CTRL2_UHS_SDR25 0x0001 +#define SDHCI_CTRL2_UHS_SDR50 0x0002 +#define SDHCI_CTRL2_UHS_SDR104 0x0003 +#define SDHCI_CTRL2_UHS_DDR50 0x0004 #define SDHCI_CAPABILITIES 0x40 #define SDHCI_TIMEOUT_CLK_MASK 0x0000003F @@ -240,14 +257,18 @@ #define SDHCI_CAN_VDD_180 0x04000000 #define SDHCI_CAN_DO_64BIT 0x10000000 #define SDHCI_CAN_ASYNC_INTR 0x20000000 +#define SDHCI_SLOTTYPE_MASK 0xC0000000 +#define SDHCI_SLOTTYPE_REMOVABLE 0x00000000 +#define SDHCI_SLOTTYPE_EMBEDDED 0x40000000 +#define SDHCI_SLOTTYPE_SHARED 0x80000000 #define SDHCI_CAPABILITIES2 0x44 #define SDHCI_CAN_SDR50 0x00000001 #define SDHCI_CAN_SDR104 0x00000002 #define SDHCI_CAN_DDR50 0x00000004 #define SDHCI_CAN_DRIVE_TYPE_A 0x00000010 -#define SDHCI_CAN_DRIVE_TYPE_B 0x00000020 -#define SDHCI_CAN_DRIVE_TYPE_C 0x00000040 +#define SDHCI_CAN_DRIVE_TYPE_C 0x00000020 +#define SDHCI_CAN_DRIVE_TYPE_D 0x00000040 #define SDHCI_RETUNE_CNT_MASK 0x00000F00 #define SDHCI_RETUNE_CNT_SHIFT 8 #define SDHCI_TUNE_SDR50 0x00002000 @@ -259,9 +280,17 @@ #define SDHCI_MAX_CURRENT 0x48 #define SDHCI_FORCE_AUTO_EVENT 0x50 #define SDHCI_FORCE_INTR_EVENT 0x52 + #define SDHCI_ADMA_ERR 0x54 -#define SDHCI_ADMA_ADDRESS_LOW 0x58 +#define SDHCI_ADMA_ERR_LENGTH 0x04 +#define SDHCI_ADMA_ERR_STATE_MASK 0x03 +#define SDHCI_ADMA_ERR_STATE_STOP 0x00 +#define SDHCI_ADMA_ERR_STATE_FDS 0x01 +#define SDHCI_ADMA_ERR_STATE_TFR 0x03 + +#define SDHCI_ADMA_ADDRESS_LO 0x58 #define SDHCI_ADMA_ADDRESS_HI 0x5C + #define SDHCI_PRESET_VALUE 0x60 #define SDHCI_SHARED_BUS_CTRL 0xE0 @@ -275,6 +304,7 @@ #define SDHCI_SPEC_100 0 #define SDHCI_SPEC_200 1 #define SDHCI_SPEC_300 2 +#define SDHCI_SPEC_400 3 SYSCTL_DECL(_hw_sdhci); From owner-svn-src-stable@freebsd.org Thu May 11 23:49:55 2017 Return-Path: Delivered-To: svn-src-stable@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 48174D69A84; Thu, 11 May 2017 23:49:55 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 111AAD22; Thu, 11 May 2017 23:49:54 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4BNns43004529; Thu, 11 May 2017 23:49:54 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4BNnrI6004528; Thu, 11 May 2017 23:49:53 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705112349.v4BNnrI6004528@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 11 May 2017 23:49:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318201 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 May 2017 23:49:55 -0000 Author: gjb Date: Thu May 11 23:49:53 2017 New Revision: 318201 URL: https://svnweb.freebsd.org/changeset/base/318201 Log: Clarify the syslogd(8) 'include' directive is specified in syslog.conf(5). Submitted by: jilles Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu May 11 21:13:06 2017 (r318200) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu May 11 23:49:53 2017 (r318201) @@ -190,8 +190,8 @@ &man.syslogd.8; utility has been updated to add the include keyword which allows specifying a directory containing configuration files to be included in - addition to &man.syslogd.8;. The default &man.syslogd.8; has - been updated to include /etc/syslog.d and /usr/local/etc/syslog.d by default. From owner-svn-src-stable@freebsd.org Fri May 12 02:12:05 2017 Return-Path: Delivered-To: svn-src-stable@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 83F8AD67EA7; Fri, 12 May 2017 02:12:05 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 55936CA4; Fri, 12 May 2017 02:12:05 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4C2C4ed064987; Fri, 12 May 2017 02:12:04 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4C2C4hm064986; Fri, 12 May 2017 02:12:04 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201705120212.v4C2C4hm064986@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Fri, 12 May 2017 02:12: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: r318203 - in stable: 10/contrib/ipfilter/tools 11/contrib/ipfilter/tools 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@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2017 02:12:05 -0000 Author: cy Date: Fri May 12 02:12:03 2017 New Revision: 318203 URL: https://svnweb.freebsd.org/changeset/base/318203 Log: Ifdef out a redundant if statement when INET6 is disabled. Modified: stable/10/contrib/ipfilter/tools/ippool.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/contrib/ipfilter/tools/ippool.c Directory Properties: stable/11/ (props changed) Modified: stable/10/contrib/ipfilter/tools/ippool.c ============================================================================== --- stable/10/contrib/ipfilter/tools/ippool.c Fri May 12 01:09:24 2017 (r318202) +++ stable/10/contrib/ipfilter/tools/ippool.c Fri May 12 02:12:03 2017 (r318203) @@ -1050,7 +1050,9 @@ setnodeaddr(int type, int role, void *pt if (type == IPLT_POOL) { ip_pool_node_t *node = ptr; +#ifdef USE_INET6 if (node->ipn_addr.adf_family == AF_INET) +#endif node->ipn_addr.adf_len = offsetof(addrfamily_t, adf_addr) + sizeof(struct in_addr); From owner-svn-src-stable@freebsd.org Fri May 12 02:12:05 2017 Return-Path: Delivered-To: svn-src-stable@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 57DD9D67E9F; Fri, 12 May 2017 02:12:05 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2782DCA3; Fri, 12 May 2017 02:12:05 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4C2C43k064981; Fri, 12 May 2017 02:12:04 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4C2C44G064980; Fri, 12 May 2017 02:12:04 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201705120212.v4C2C44G064980@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Fri, 12 May 2017 02:12:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318203 - in stable: 10/contrib/ipfilter/tools 11/contrib/ipfilter/tools X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2017 02:12:05 -0000 Author: cy Date: Fri May 12 02:12:03 2017 New Revision: 318203 URL: https://svnweb.freebsd.org/changeset/base/318203 Log: Ifdef out a redundant if statement when INET6 is disabled. Modified: stable/11/contrib/ipfilter/tools/ippool.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/contrib/ipfilter/tools/ippool.c Directory Properties: stable/10/ (props changed) Modified: stable/11/contrib/ipfilter/tools/ippool.c ============================================================================== --- stable/11/contrib/ipfilter/tools/ippool.c Fri May 12 01:09:24 2017 (r318202) +++ stable/11/contrib/ipfilter/tools/ippool.c Fri May 12 02:12:03 2017 (r318203) @@ -1047,7 +1047,9 @@ setnodeaddr(int type, int role, void *pt if (type == IPLT_POOL) { ip_pool_node_t *node = ptr; +#ifdef USE_INET6 if (node->ipn_addr.adf_family == AF_INET) +#endif node->ipn_addr.adf_len = offsetof(addrfamily_t, adf_addr) + sizeof(struct in_addr); From owner-svn-src-stable@freebsd.org Fri May 12 02:12:40 2017 Return-Path: Delivered-To: svn-src-stable@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 C4948D67FB8; Fri, 12 May 2017 02:12:40 +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 8632AF8C; Fri, 12 May 2017 02:12:40 +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 v4C2Cd10065070; Fri, 12 May 2017 02:12:39 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4C2CdcK065065; Fri, 12 May 2017 02:12:39 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705120212.v4C2CdcK065065@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 12 May 2017 02:12:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318204 - stable/11/share/man/man4 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2017 02:12:40 -0000 Author: gjb Date: Fri May 12 02:12:38 2017 New Revision: 318204 URL: https://svnweb.freebsd.org/changeset/base/318204 Log: MFC r318109: Correct "first appeared in" entries for various drivers that exist in stable/11. Sponsored by: The FreeBSD Foundation Modified: stable/11/share/man/man4/bnxt.4 stable/11/share/man/man4/bytgpio.4 stable/11/share/man/man4/cxgbev.4 stable/11/share/man/man4/jedec_ts.4 stable/11/share/man/man4/qlnxe.4 Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man4/bnxt.4 ============================================================================== --- stable/11/share/man/man4/bnxt.4 Fri May 12 02:12:03 2017 (r318203) +++ stable/11/share/man/man4/bnxt.4 Fri May 12 02:12:38 2017 (r318204) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 12, 2016 +.Dd May 9, 2017 .Dt BNXT 4 .Os .Sh NAME @@ -212,7 +212,7 @@ As of this writing, the system must be r The .Nm device driver first appeared in -.Fx 12.0 . +.Fx 11.1 . .Sh AUTHORS The .Nm Modified: stable/11/share/man/man4/bytgpio.4 ============================================================================== --- stable/11/share/man/man4/bytgpio.4 Fri May 12 02:12:03 2017 (r318203) +++ stable/11/share/man/man4/bytgpio.4 Fri May 12 02:12:38 2017 (r318204) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 20, 2016 +.Dd May 9, 2017 .Dt BYTGPIO 4 .Os .Sh NAME @@ -49,7 +49,7 @@ on boards schematics: GPIO_S0_SCnn, GPIO The .Nm manual page first appeared in -.Fx 12.0 . +.Fx 11.1 . .Sh AUTHORS This driver and man page was written by .An Oleksandr Tymoshenko Aq Mt gonzo@FreeBSD.org . Modified: stable/11/share/man/man4/cxgbev.4 ============================================================================== --- stable/11/share/man/man4/cxgbev.4 Fri May 12 02:12:03 2017 (r318203) +++ stable/11/share/man/man4/cxgbev.4 Fri May 12 02:12:38 2017 (r318204) @@ -31,7 +31,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 22, 2016 +.Dd May 9, 2017 .Dt CXGBEV 4 .Os .Sh NAME @@ -312,7 +312,7 @@ The device driver first appeared in .Fx 11.1 and -.Fx 12.0 . +.Fx 11.1 . .Sh AUTHORS .An -nosplit The Modified: stable/11/share/man/man4/jedec_ts.4 ============================================================================== --- stable/11/share/man/man4/jedec_ts.4 Fri May 12 02:12:03 2017 (r318203) +++ stable/11/share/man/man4/jedec_ts.4 Fri May 12 02:12:38 2017 (r318204) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 13, 2016 +.Dd May 9, 2017 .Dt JEDEC_TS 4 .Os .Sh NAME @@ -121,7 +121,7 @@ dev.jedec_ts.1.temp: 40.7500C The .Nm driver first appeared in -.Fx 12.0 . +.Fx 11.1 . .Sh AUTHORS .An -nosplit The Modified: stable/11/share/man/man4/qlnxe.4 ============================================================================== --- stable/11/share/man/man4/qlnxe.4 Fri May 12 02:12:03 2017 (r318203) +++ stable/11/share/man/man4/qlnxe.4 Fri May 12 02:12:38 2017 (r318204) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 24, 2017 +.Dd May 9, 2017 .Dt QLNXE 4 .Os .Sh NAME @@ -80,7 +80,7 @@ or by E-mail at The .Nm device driver first appeared in -.Fx 12.0 . +.Fx 11.1 . .Sh AUTHORS .An -nosplit The From owner-svn-src-stable@freebsd.org Fri May 12 02:26:40 2017 Return-Path: Delivered-To: svn-src-stable@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 AE740D6846C; Fri, 12 May 2017 02:26:40 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7E09116C8; Fri, 12 May 2017 02:26:40 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4C2QdoK069585; Fri, 12 May 2017 02:26:39 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4C2Qdln069584; Fri, 12 May 2017 02:26:39 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201705120226.v4C2Qdln069584@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Fri, 12 May 2017 02:26:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318205 - in stable: 10/contrib/ipfilter/tools 11/contrib/ipfilter/tools X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2017 02:26:40 -0000 Author: cy Date: Fri May 12 02:26:39 2017 New Revision: 318205 URL: https://svnweb.freebsd.org/changeset/base/318205 Log: Revert r318203: Neglected to put "MFC 318203:" in the log. Pointy hat to: cy Modified: stable/11/contrib/ipfilter/tools/ippool.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/contrib/ipfilter/tools/ippool.c Directory Properties: stable/10/ (props changed) Modified: stable/11/contrib/ipfilter/tools/ippool.c ============================================================================== --- stable/11/contrib/ipfilter/tools/ippool.c Fri May 12 02:12:38 2017 (r318204) +++ stable/11/contrib/ipfilter/tools/ippool.c Fri May 12 02:26:39 2017 (r318205) @@ -1047,9 +1047,7 @@ setnodeaddr(int type, int role, void *pt if (type == IPLT_POOL) { ip_pool_node_t *node = ptr; -#ifdef USE_INET6 if (node->ipn_addr.adf_family == AF_INET) -#endif node->ipn_addr.adf_len = offsetof(addrfamily_t, adf_addr) + sizeof(struct in_addr); From owner-svn-src-stable@freebsd.org Fri May 12 02:26:40 2017 Return-Path: Delivered-To: svn-src-stable@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 DA6CDD68473; Fri, 12 May 2017 02:26:40 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ABD8216C9; Fri, 12 May 2017 02:26:40 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4C2Qdsu069591; Fri, 12 May 2017 02:26:39 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4C2QdLC069590; Fri, 12 May 2017 02:26:39 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201705120226.v4C2QdLC069590@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Fri, 12 May 2017 02:26: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: r318205 - in stable: 10/contrib/ipfilter/tools 11/contrib/ipfilter/tools 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@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2017 02:26:41 -0000 Author: cy Date: Fri May 12 02:26:39 2017 New Revision: 318205 URL: https://svnweb.freebsd.org/changeset/base/318205 Log: Revert r318203: Neglected to put "MFC 318203:" in the log. Pointy hat to: cy Modified: stable/10/contrib/ipfilter/tools/ippool.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/contrib/ipfilter/tools/ippool.c Directory Properties: stable/11/ (props changed) Modified: stable/10/contrib/ipfilter/tools/ippool.c ============================================================================== --- stable/10/contrib/ipfilter/tools/ippool.c Fri May 12 02:12:38 2017 (r318204) +++ stable/10/contrib/ipfilter/tools/ippool.c Fri May 12 02:26:39 2017 (r318205) @@ -1050,9 +1050,7 @@ setnodeaddr(int type, int role, void *pt if (type == IPLT_POOL) { ip_pool_node_t *node = ptr; -#ifdef USE_INET6 if (node->ipn_addr.adf_family == AF_INET) -#endif node->ipn_addr.adf_len = offsetof(addrfamily_t, adf_addr) + sizeof(struct in_addr); From owner-svn-src-stable@freebsd.org Fri May 12 02:32:02 2017 Return-Path: Delivered-To: svn-src-stable@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 6D906D6879E; Fri, 12 May 2017 02:32:02 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3EDBB1C30; Fri, 12 May 2017 02:32:02 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4C2W1Yt072811; Fri, 12 May 2017 02:32:01 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4C2W1ga072810; Fri, 12 May 2017 02:32:01 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201705120232.v4C2W1ga072810@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Fri, 12 May 2017 02:32:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318206 - in stable: 10/contrib/ipfilter/tools 11/contrib/ipfilter/tools X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2017 02:32:02 -0000 Author: cy Date: Fri May 12 02:32:01 2017 New Revision: 318206 URL: https://svnweb.freebsd.org/changeset/base/318206 Log: MFC 317830: Ifdef out a redundant if statement when INET6 is disabled. Modified: stable/11/contrib/ipfilter/tools/ippool.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/contrib/ipfilter/tools/ippool.c Directory Properties: stable/10/ (props changed) Modified: stable/11/contrib/ipfilter/tools/ippool.c ============================================================================== --- stable/11/contrib/ipfilter/tools/ippool.c Fri May 12 02:26:39 2017 (r318205) +++ stable/11/contrib/ipfilter/tools/ippool.c Fri May 12 02:32:01 2017 (r318206) @@ -1047,7 +1047,9 @@ setnodeaddr(int type, int role, void *pt if (type == IPLT_POOL) { ip_pool_node_t *node = ptr; +#ifdef USE_INET6 if (node->ipn_addr.adf_family == AF_INET) +#endif node->ipn_addr.adf_len = offsetof(addrfamily_t, adf_addr) + sizeof(struct in_addr); From owner-svn-src-stable@freebsd.org Fri May 12 02:32:02 2017 Return-Path: Delivered-To: svn-src-stable@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 AF231D687A2; Fri, 12 May 2017 02:32:02 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7EB421C31; Fri, 12 May 2017 02:32:02 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4C2W1TL072817; Fri, 12 May 2017 02:32:01 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4C2W1dI072816; Fri, 12 May 2017 02:32:01 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201705120232.v4C2W1dI072816@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Fri, 12 May 2017 02:32: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: r318206 - in stable: 10/contrib/ipfilter/tools 11/contrib/ipfilter/tools 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@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2017 02:32:02 -0000 Author: cy Date: Fri May 12 02:32:01 2017 New Revision: 318206 URL: https://svnweb.freebsd.org/changeset/base/318206 Log: MFC 317830: Ifdef out a redundant if statement when INET6 is disabled. Modified: stable/10/contrib/ipfilter/tools/ippool.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/contrib/ipfilter/tools/ippool.c Directory Properties: stable/11/ (props changed) Modified: stable/10/contrib/ipfilter/tools/ippool.c ============================================================================== --- stable/10/contrib/ipfilter/tools/ippool.c Fri May 12 02:26:39 2017 (r318205) +++ stable/10/contrib/ipfilter/tools/ippool.c Fri May 12 02:32:01 2017 (r318206) @@ -1050,7 +1050,9 @@ setnodeaddr(int type, int role, void *pt if (type == IPLT_POOL) { ip_pool_node_t *node = ptr; +#ifdef USE_INET6 if (node->ipn_addr.adf_family == AF_INET) +#endif node->ipn_addr.adf_len = offsetof(addrfamily_t, adf_addr) + sizeof(struct in_addr); From owner-svn-src-stable@freebsd.org Fri May 12 03:06:47 2017 Return-Path: Delivered-To: svn-src-stable@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 59EFBD69002; Fri, 12 May 2017 03:06:47 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 01BCB143E; Fri, 12 May 2017 03:06:46 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4C36jRt087284; Fri, 12 May 2017 03:06:45 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4C36jqr087283; Fri, 12 May 2017 03:06:45 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201705120306.v4C36jqr087283@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Fri, 12 May 2017 03:06:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318207 - stable/11/sys/amd64/pci X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2017 03:06:47 -0000 Author: sephe Date: Fri May 12 03:06:45 2017 New Revision: 318207 URL: https://svnweb.freebsd.org/changeset/base/318207 Log: MFC 317786 pcicfg: Fix direct calls of pci_cfg{read,write} on systems w/o PCI host bridge. Reported by: dexuan@ Reviewed by: jhb@ Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D10564 Modified: stable/11/sys/amd64/pci/pci_cfgreg.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/pci/pci_cfgreg.c ============================================================================== --- stable/11/sys/amd64/pci/pci_cfgreg.c Fri May 12 02:32:01 2017 (r318206) +++ stable/11/sys/amd64/pci/pci_cfgreg.c Fri May 12 03:06:45 2017 (r318207) @@ -64,6 +64,7 @@ static vm_offset_t pcie_base; static int pcie_minbus, pcie_maxbus; static uint32_t pcie_badslots; static struct mtx pcicfg_mtx; +MTX_SYSINIT(pcicfg_mtx, &pcicfg_mtx, "pcicfg_mtx", MTX_SPIN); static int mcfg_enable = 1; SYSCTL_INT(_hw_pci, OID_AUTO, mcfg, CTLFLAG_RDTUN, &mcfg_enable, 0, "Enable support for PCI-e memory mapped config access"); @@ -74,15 +75,9 @@ SYSCTL_INT(_hw_pci, OID_AUTO, mcfg, CTLF int pci_cfgregopen(void) { - static int once = 0; uint64_t pciebar; uint16_t did, vid; - if (!once) { - mtx_init(&pcicfg_mtx, "pcicfg", NULL, MTX_SPIN); - once = 1; - } - if (cfgmech != CFGMECH_NONE) return (1); cfgmech = CFGMECH_1; @@ -138,6 +133,9 @@ pci_cfgregread(int bus, int slot, int fu { uint32_t line; + if (cfgmech == CFGMECH_NONE) + return (0xffffffff); + /* * Some BIOS writers seem to want to ignore the spec and put * 0 in the intline rather than 255 to indicate none. Some use @@ -162,6 +160,9 @@ void pci_cfgregwrite(int bus, int slot, int func, int reg, u_int32_t data, int bytes) { + if (cfgmech == CFGMECH_NONE) + return; + if (cfgmech == CFGMECH_PCIE && (bus >= pcie_minbus && bus <= pcie_maxbus) && (bus != 0 || !(1 << slot & pcie_badslots))) From owner-svn-src-stable@freebsd.org Fri May 12 03:44:21 2017 Return-Path: Delivered-To: svn-src-stable@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 75D07D69988; Fri, 12 May 2017 03:44:21 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 2D755899; Fri, 12 May 2017 03:44:21 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4C3iKWm003548; Fri, 12 May 2017 03:44:20 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4C3iKok003547; Fri, 12 May 2017 03:44:20 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201705120344.v4C3iKok003547@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Fri, 12 May 2017 03:44: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: r318208 - stable/10/sys/amd64/pci 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@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2017 03:44:21 -0000 Author: sephe Date: Fri May 12 03:44:20 2017 New Revision: 318208 URL: https://svnweb.freebsd.org/changeset/base/318208 Log: MFC 317786 pcicfg: Fix direct calls of pci_cfg{read,write} on systems w/o PCI host bridge. Reported by: dexuan@ Reviewed by: jhb@ Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D10564 Modified: stable/10/sys/amd64/pci/pci_cfgreg.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/pci/pci_cfgreg.c ============================================================================== --- stable/10/sys/amd64/pci/pci_cfgreg.c Fri May 12 03:06:45 2017 (r318207) +++ stable/10/sys/amd64/pci/pci_cfgreg.c Fri May 12 03:44:20 2017 (r318208) @@ -64,6 +64,7 @@ static vm_offset_t pcie_base; static int pcie_minbus, pcie_maxbus; static uint32_t pcie_badslots; static struct mtx pcicfg_mtx; +MTX_SYSINIT(pcicfg_mtx, &pcicfg_mtx, "pcicfg_mtx", MTX_SPIN); static int mcfg_enable = 1; TUNABLE_INT("hw.pci.mcfg", &mcfg_enable); SYSCTL_INT(_hw_pci, OID_AUTO, mcfg, CTLFLAG_RDTUN, &mcfg_enable, 0, @@ -75,15 +76,9 @@ SYSCTL_INT(_hw_pci, OID_AUTO, mcfg, CTLF int pci_cfgregopen(void) { - static int once = 0; uint64_t pciebar; uint16_t did, vid; - if (!once) { - mtx_init(&pcicfg_mtx, "pcicfg", NULL, MTX_SPIN); - once = 1; - } - if (cfgmech != CFGMECH_NONE) return (1); cfgmech = CFGMECH_1; @@ -139,6 +134,9 @@ pci_cfgregread(int bus, int slot, int fu { uint32_t line; + if (cfgmech == CFGMECH_NONE) + return (0xffffffff); + /* * Some BIOS writers seem to want to ignore the spec and put * 0 in the intline rather than 255 to indicate none. Some use @@ -163,6 +161,9 @@ void pci_cfgregwrite(int bus, int slot, int func, int reg, u_int32_t data, int bytes) { + if (cfgmech == CFGMECH_NONE) + return; + if (cfgmech == CFGMECH_PCIE && (bus >= pcie_minbus && bus <= pcie_maxbus) && (bus != 0 || !(1 << slot & pcie_badslots))) From owner-svn-src-stable@freebsd.org Fri May 12 11:41:00 2017 Return-Path: Delivered-To: svn-src-stable@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 26B48D69416; Fri, 12 May 2017 11:41:00 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EA21512D1; Fri, 12 May 2017 11:40:59 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4CBew0U095519; Fri, 12 May 2017 11:40:58 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4CBew7P095518; Fri, 12 May 2017 11:40:58 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201705121140.v4CBew7P095518@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Fri, 12 May 2017 11:40:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318237 - stable/11/sys/net X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2017 11:41:00 -0000 Author: bz Date: Fri May 12 11:40:58 2017 New Revision: 318237 URL: https://svnweb.freebsd.org/changeset/base/318237 Log: MFC r318015: Adjust a comment. Modified: stable/11/sys/net/iflib.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/net/iflib.c ============================================================================== --- stable/11/sys/net/iflib.c Fri May 12 09:32:30 2017 (r318236) +++ stable/11/sys/net/iflib.c Fri May 12 11:40:58 2017 (r318237) @@ -4633,7 +4633,6 @@ iflib_msix_init(if_ctx_t ctx) /* * bar == -1 => "trust me I know what I'm doing" - * https://www.youtube.com/watch?v=nnwWKkNau4I * Some drivers are for hardware that is so shoddily * documented that no one knows which bars are which * so the developer has to map all bars. This hack From owner-svn-src-stable@freebsd.org Fri May 12 14:38:10 2017 Return-Path: Delivered-To: svn-src-stable@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 999B1D692D5; Fri, 12 May 2017 14:38:10 +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 65897901; Fri, 12 May 2017 14:38:10 +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 v4CEc9OR069155; Fri, 12 May 2017 14:38:09 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4CEc9F6069154; Fri, 12 May 2017 14:38:09 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201705121438.v4CEc9F6069154@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Fri, 12 May 2017 14:38:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318238 - stable/11/usr.bin/csplit X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2017 14:38:10 -0000 Author: jilles Date: Fri May 12 14:38:09 2017 New Revision: 318238 URL: https://svnweb.freebsd.org/changeset/base/318238 Log: MFC r317709: csplit: Fix check of fputs() return value, making csplit work again. As of r295638, fputs() returns the number of bytes written (if not more than INT_MAX). This broke csplit completely, since csplit assumed success only for the return value 0. PR: 213510 Relnotes: yes Modified: stable/11/usr.bin/csplit/csplit.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/csplit/csplit.c ============================================================================== --- stable/11/usr.bin/csplit/csplit.c Fri May 12 11:40:58 2017 (r318237) +++ stable/11/usr.bin/csplit/csplit.c Fri May 12 14:38:09 2017 (r318238) @@ -195,7 +195,7 @@ main(int argc, char *argv[]) /* Copy the rest into a new file. */ if (!feof(infile)) { ofp = newfile(); - while ((p = get_line()) != NULL && fputs(p, ofp) == 0) + while ((p = get_line()) != NULL && fputs(p, ofp) != EOF) ; if (!sflag) printf("%jd\n", (intmax_t)ftello(ofp)); @@ -392,7 +392,7 @@ do_rexp(const char *expr) /* Read and output lines until we get a match. */ first = 1; while ((p = get_line()) != NULL) { - if (fputs(p, ofp) != 0) + if (fputs(p, ofp) == EOF) break; if (!first && regexec(&cre, p, 0, NULL, 0) == 0) break; @@ -453,7 +453,7 @@ do_lineno(const char *expr) while (lineno + 1 != lastline) { if ((p = get_line()) == NULL) errx(1, "%ld: out of range", lastline); - if (fputs(p, ofp) != 0) + if (fputs(p, ofp) == EOF) break; } if (!sflag) From owner-svn-src-stable@freebsd.org Fri May 12 15:00:09 2017 Return-Path: Delivered-To: svn-src-stable@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 2FC21D697A5; Fri, 12 May 2017 15:00:09 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 015E9116F; Fri, 12 May 2017 15:00:08 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4CF08Ve077459; Fri, 12 May 2017 15:00:08 GMT (envelope-from lidl@FreeBSD.org) Received: (from lidl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4CF061w077447; Fri, 12 May 2017 15:00:06 GMT (envelope-from lidl@FreeBSD.org) Message-Id: <201705121500.v4CF061w077447@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lidl set sender to lidl@FreeBSD.org using -f From: Kurt Lidl Date: Fri, 12 May 2017 15:00:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318239 - in stable/11/contrib/blacklist: . bin etc/rc.d lib libexec port X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2017 15:00:09 -0000 Author: lidl Date: Fri May 12 15:00:06 2017 New Revision: 318239 URL: https://svnweb.freebsd.org/changeset/base/318239 Log: MFC r317802: Merge latest version of blacklist sources from NetBSD (@ 20170503) Sponsored by: The FreeBSD Foundation Replaced: stable/11/contrib/blacklist/port/config.h - copied unchanged from r317802, head/contrib/blacklist/port/config.h Modified: stable/11/contrib/blacklist/README stable/11/contrib/blacklist/bin/blacklistctl.8 stable/11/contrib/blacklist/bin/blacklistctl.c stable/11/contrib/blacklist/bin/blacklistd.c stable/11/contrib/blacklist/bin/blacklistd.conf.5 stable/11/contrib/blacklist/etc/rc.d/blacklistd stable/11/contrib/blacklist/lib/bl.c stable/11/contrib/blacklist/lib/libblacklist.3 stable/11/contrib/blacklist/libexec/blacklistd-helper stable/11/contrib/blacklist/port/Makefile.am stable/11/contrib/blacklist/port/sockaddr_snprintf.c Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/blacklist/README ============================================================================== --- stable/11/contrib/blacklist/README Fri May 12 14:38:09 2017 (r318238) +++ stable/11/contrib/blacklist/README Fri May 12 15:00:06 2017 (r318239) @@ -1,4 +1,4 @@ -# $NetBSD: README,v 1.7 2015/01/26 00:34:50 christos Exp $ +# $NetBSD: README,v 1.8 2017/04/13 17:59:34 christos Exp $ This package contains library that can be used by network daemons to communicate with a packet filter via a daemon to enforce opening and @@ -98,6 +98,16 @@ group "internal" on $int_if { ... } +You can use 'blacklistctl dump -a' to list all the current entries +in the database; the ones that have nfail / where urrent +>= otal, should have an id assosiated with them; this means that +there is a packet filter rule added for that entry. For npf, you +can examine the packet filter dynamic rule entries using 'npfctl +rule list'. The number of current entries can exceed +the total. This happens because entering packet filter rules is +asynchronous; there could be other connection before the rule +becomes activated. + Enjoy, christos Modified: stable/11/contrib/blacklist/bin/blacklistctl.8 ============================================================================== --- stable/11/contrib/blacklist/bin/blacklistctl.8 Fri May 12 14:38:09 2017 (r318238) +++ stable/11/contrib/blacklist/bin/blacklistctl.8 Fri May 12 15:00:06 2017 (r318239) @@ -1,4 +1,4 @@ -.\" $NetBSD: blacklistctl.8,v 1.7 2015/04/30 06:20:43 riz Exp $ +.\" $NetBSD: blacklistctl.8,v 1.9 2016/06/08 12:48:37 wiz Exp $ .\" .\" Copyright (c) 2015 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -77,7 +77,8 @@ it to make sure that there is only one r .Nm first appeared in .Nx 7 . -.Fx support for +.Fx +support for .Nm was implemented in .Fx 11 . Modified: stable/11/contrib/blacklist/bin/blacklistctl.c ============================================================================== --- stable/11/contrib/blacklist/bin/blacklistctl.c Fri May 12 14:38:09 2017 (r318238) +++ stable/11/contrib/blacklist/bin/blacklistctl.c Fri May 12 15:00:06 2017 (r318239) @@ -1,4 +1,4 @@ -/* $NetBSD: blacklistctl.c,v 1.20 2016/04/04 15:52:56 christos Exp $ */ +/* $NetBSD: blacklistctl.c,v 1.21 2016/11/02 03:15:07 jnemeth Exp $ */ /*- * Copyright (c) 2015 The NetBSD Foundation, Inc. @@ -33,7 +33,7 @@ #endif #include -__RCSID("$NetBSD: blacklistctl.c,v 1.20 2016/04/04 15:52:56 christos Exp $"); +__RCSID("$NetBSD: blacklistctl.c,v 1.21 2016/11/02 03:15:07 jnemeth Exp $"); #include #include Modified: stable/11/contrib/blacklist/bin/blacklistd.c ============================================================================== --- stable/11/contrib/blacklist/bin/blacklistd.c Fri May 12 14:38:09 2017 (r318238) +++ stable/11/contrib/blacklist/bin/blacklistd.c Fri May 12 15:00:06 2017 (r318239) @@ -1,4 +1,4 @@ -/* $NetBSD: blacklistd.c,v 1.35 2016/09/26 19:43:43 christos Exp $ */ +/* $NetBSD: blacklistd.c,v 1.37 2017/02/18 00:26:16 christos Exp $ */ /*- * Copyright (c) 2015 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ #include "config.h" #endif #include -__RCSID("$NetBSD: blacklistd.c,v 1.35 2016/09/26 19:43:43 christos Exp $"); +__RCSID("$NetBSD: blacklistd.c,v 1.37 2017/02/18 00:26:16 christos Exp $"); #include #include @@ -403,12 +403,14 @@ int main(int argc, char *argv[]) { int c, tout, flags, flush, restore, ret; - const char *spath, *blsock; + const char *spath, **blsock; + size_t nblsock, maxblsock; setprogname(argv[0]); spath = NULL; - blsock = _PATH_BLSOCK; + blsock = NULL; + maxblsock = nblsock = 0; flush = 0; restore = 0; tout = 0; @@ -440,7 +442,17 @@ main(int argc, char *argv[]) restore++; break; case 's': - blsock = optarg; + if (nblsock >= maxblsock) { + maxblsock += 10; + void *p = realloc(blsock, + sizeof(*blsock) * maxblsock); + if (p == NULL) + err(EXIT_FAILURE, + "Can't allocate memory for %zu sockets", + maxblsock); + blsock = p; + } + blsock[nblsock++] = optarg; break; case 't': tout = atoi(optarg) * 1000; @@ -487,9 +499,11 @@ main(int argc, char *argv[]) size_t nfd = 0; size_t maxfd = 0; - if (spath == NULL) - addfd(&pfd, &bl, &nfd, &maxfd, blsock); - else { + for (size_t i = 0; i < nblsock; i++) + addfd(&pfd, &bl, &nfd, &maxfd, blsock[i]); + free(blsock); + + if (spath) { FILE *fp = fopen(spath, "r"); char *line; if (fp == NULL) @@ -499,6 +513,8 @@ main(int argc, char *argv[]) addfd(&pfd, &bl, &nfd, &maxfd, line); fclose(fp); } + if (nfd == 0) + addfd(&pfd, &bl, &nfd, &maxfd, _PATH_BLSOCK); state = state_open(dbfile, flags, 0600); if (state == NULL) Modified: stable/11/contrib/blacklist/bin/blacklistd.conf.5 ============================================================================== --- stable/11/contrib/blacklist/bin/blacklistd.conf.5 Fri May 12 14:38:09 2017 (r318238) +++ stable/11/contrib/blacklist/bin/blacklistd.conf.5 Fri May 12 15:00:06 2017 (r318239) @@ -1,4 +1,4 @@ -.\" $NetBSD: blacklistd.conf.5,v 1.3 2015/04/30 06:20:43 riz Exp $ +.\" $NetBSD: blacklistd.conf.5,v 1.5 2016/06/08 12:48:37 wiz Exp $ .\" .\" Copyright (c) 2015 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -218,7 +218,8 @@ bnx0:ssh * * * * 3 6h .Nm first appeared in .Nx 7 . -.Fx support for +.Fx +support for .Nm was implemented in .Fx 11 . Modified: stable/11/contrib/blacklist/etc/rc.d/blacklistd ============================================================================== --- stable/11/contrib/blacklist/etc/rc.d/blacklistd Fri May 12 14:38:09 2017 (r318238) +++ stable/11/contrib/blacklist/etc/rc.d/blacklistd Fri May 12 15:00:06 2017 (r318239) @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: blacklistd,v 1.1 2015/01/22 17:49:41 christos Exp $ +# $NetBSD: blacklistd,v 1.2 2016/10/17 22:47:16 christos Exp $ # # PROVIDE: blacklistd @@ -18,7 +18,7 @@ start_precmd="${name}_precmd" extra_commands="reload" _sockfile="/var/run/${name}.sockets" -_sockname="blsock" +_sockname="blacklistd.sock" blacklistd_precmd() { Modified: stable/11/contrib/blacklist/lib/bl.c ============================================================================== --- stable/11/contrib/blacklist/lib/bl.c Fri May 12 14:38:09 2017 (r318238) +++ stable/11/contrib/blacklist/lib/bl.c Fri May 12 15:00:06 2017 (r318239) @@ -1,4 +1,4 @@ -/* $NetBSD: bl.c,v 1.27 2015/12/30 16:42:48 christos Exp $ */ +/* $NetBSD: bl.c,v 1.28 2016/07/29 17:13:09 christos Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -33,7 +33,7 @@ #endif #include -__RCSID("$NetBSD: bl.c,v 1.27 2015/12/30 16:42:48 christos Exp $"); +__RCSID("$NetBSD: bl.c,v 1.28 2016/07/29 17:13:09 christos Exp $"); #include #include Modified: stable/11/contrib/blacklist/lib/libblacklist.3 ============================================================================== --- stable/11/contrib/blacklist/lib/libblacklist.3 Fri May 12 14:38:09 2017 (r318238) +++ stable/11/contrib/blacklist/lib/libblacklist.3 Fri May 12 15:00:06 2017 (r318239) @@ -1,4 +1,4 @@ -.\" $NetBSD: libblacklist.3,v 1.3 2015/01/25 23:09:28 wiz Exp $ +.\" $NetBSD: libblacklist.3,v 1.7 2017/02/04 23:33:56 wiz Exp $ .\" .\" Copyright (c) 2015 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -36,7 +36,7 @@ .Nm blacklist_r , .Nm blacklist , .Nm blacklist_sa -.Nm blacklist_sa_r , +.Nm blacklist_sa_r .Nd Blacklistd notification library .Sh LIBRARY .Lb libblacklist @@ -62,7 +62,7 @@ block or release port access to prevent .Pp The function .Fn blacklist_open -creates a the necessary state to communicate with +creates the necessary state to communicate with .Xr blacklistd 8 and returns a pointer to it, or .Dv NULL @@ -106,18 +106,25 @@ All functions log errors to .Xr syslogd 8 . .Sh RETURN VALUES The function -.Fn bl_open +.Fn blacklist_open returns a cookie on success and .Dv NULL -on failure setting errno to an appropriate value. -.Pp -The -.Fn bl_send -function returns +on failure setting +.Dv errno +to an appropriate value. +.Pp +The functions +.Fn blacklist , +.Fn blacklist_sa , +and +.Fn blacklist_sa_r +return .Dv 0 on success and -.Dv -1 -on failure setting errno to an appropriate value. +.Dv \-1 +on failure setting +.Dv errno +to an appropriate value. .Sh SEE ALSO .Xr blacklistd.conf 5 , .Xr blacklistd 8 Modified: stable/11/contrib/blacklist/libexec/blacklistd-helper ============================================================================== --- stable/11/contrib/blacklist/libexec/blacklistd-helper Fri May 12 14:38:09 2017 (r318238) +++ stable/11/contrib/blacklist/libexec/blacklistd-helper Fri May 12 15:00:06 2017 (r318239) @@ -19,8 +19,8 @@ fi if [ -z "$pf" ]; then for f in npf pf ipf; do if [ -f "/etc/$f.conf" ]; then - pf="$f" - break + pf="$f" + break fi done fi Modified: stable/11/contrib/blacklist/port/Makefile.am ============================================================================== --- stable/11/contrib/blacklist/port/Makefile.am Fri May 12 14:38:09 2017 (r318238) +++ stable/11/contrib/blacklist/port/Makefile.am Fri May 12 15:00:06 2017 (r318239) @@ -1,11 +1,11 @@ # ACLOCAL_AMFLAGS = -I m4 lib_LTLIBRARIES = libblacklist.la -include_HEADERS = blacklist.h +include_HEADERS = ../include/blacklist.h bin_PROGRAMS = blacklistd blacklistctl srvtest cltest -VPATH = ../bin:../lib:../test +VPATH = ../bin:../lib:../test:../include AM_CPPFLAGS = -I../include -DDOT="." AM_CFLAGS = @WARNINGS@ Copied: stable/11/contrib/blacklist/port/config.h (from r317802, head/contrib/blacklist/port/config.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/contrib/blacklist/port/config.h Fri May 12 15:00:06 2017 (r318239, copy of r317802, head/contrib/blacklist/port/config.h) @@ -0,0 +1,3 @@ +#if defined(__FreeBSD__) +#include "port.h" +#endif Modified: stable/11/contrib/blacklist/port/sockaddr_snprintf.c ============================================================================== --- stable/11/contrib/blacklist/port/sockaddr_snprintf.c Fri May 12 14:38:09 2017 (r318238) +++ stable/11/contrib/blacklist/port/sockaddr_snprintf.c Fri May 12 15:00:06 2017 (r318239) @@ -1,4 +1,4 @@ -/* $NetBSD: sockaddr_snprintf.c,v 1.10 2016/04/05 12:28:57 christos Exp $ */ +/* $NetBSD: sockaddr_snprintf.c,v 1.11 2016/06/01 22:57:51 christos Exp $ */ /*- * Copyright (c) 2004 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: sockaddr_snprintf.c,v 1.10 2016/04/05 12:28:57 christos Exp $"); +__RCSID("$NetBSD: sockaddr_snprintf.c,v 1.11 2016/06/01 22:57:51 christos Exp $"); #endif /* LIBC_SCCS and not lint */ #include @@ -219,7 +219,7 @@ sockaddr_snprintf(char * const sbuf, con case AF_LINK: sdl = ((const struct sockaddr_dl *)(const void *)sa); (void)strlcpy(addr = abuf, link_ntoa(sdl), sizeof(abuf)); - if ((w = strchr(addr, ':')) != 0) { + if ((w = strchr(addr, ':')) != NULL) { *w++ = '\0'; addr = w; } From owner-svn-src-stable@freebsd.org Fri May 12 15:03:10 2017 Return-Path: Delivered-To: svn-src-stable@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 EC4FCD6993F; Fri, 12 May 2017 15:03:10 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A40541604; Fri, 12 May 2017 15:03:10 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4CF39pl081312; Fri, 12 May 2017 15:03:09 GMT (envelope-from lidl@FreeBSD.org) Received: (from lidl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4CF39gr081310; Fri, 12 May 2017 15:03:09 GMT (envelope-from lidl@FreeBSD.org) Message-Id: <201705121503.v4CF39gr081310@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lidl set sender to lidl@FreeBSD.org using -f From: Kurt Lidl Date: Fri, 12 May 2017 15:03:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318240 - stable/11/libexec/ftpd X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2017 15:03:11 -0000 Author: lidl Date: Fri May 12 15:03:09 2017 New Revision: 318240 URL: https://svnweb.freebsd.org/changeset/base/318240 Log: MFC r317862: Improve blacklist support before upgrading libblacklist The locally declared enum of blacklistd actions needs to be hidden when the soon to be committed changes to libblacklist are brought into the tree. Fix the type of the "msg" parameter to match the library. There should be no functional changes. Sponsored by: The FreeBSD Foundation Modified: stable/11/libexec/ftpd/blacklist.c stable/11/libexec/ftpd/blacklist_client.h Directory Properties: stable/11/ (props changed) Modified: stable/11/libexec/ftpd/blacklist.c ============================================================================== --- stable/11/libexec/ftpd/blacklist.c Fri May 12 15:00:06 2017 (r318239) +++ stable/11/libexec/ftpd/blacklist.c Fri May 12 15:03:09 2017 (r318240) @@ -33,8 +33,8 @@ #include #include -#include "blacklist_client.h" #include +#include "blacklist_client.h" static struct blacklist *blstate; extern int use_blacklist; @@ -48,7 +48,7 @@ blacklist_init(void) } void -blacklist_notify(int action, int fd, char *msg) +blacklist_notify(int action, int fd, const char *msg) { if (blstate == NULL) Modified: stable/11/libexec/ftpd/blacklist_client.h ============================================================================== --- stable/11/libexec/ftpd/blacklist_client.h Fri May 12 15:00:06 2017 (r318239) +++ stable/11/libexec/ftpd/blacklist_client.h Fri May 12 15:03:09 2017 (r318240) @@ -31,14 +31,16 @@ #ifndef BLACKLIST_CLIENT_H #define BLACKLIST_CLIENT_H +#ifndef BLACKLIST_API_ENUM enum { BLACKLIST_AUTH_OK = 0, BLACKLIST_AUTH_FAIL }; +#endif #ifdef USE_BLACKLIST void blacklist_init(void); -void blacklist_notify(int, int, char *); +void blacklist_notify(int, int, const char *); #define BLACKLIST_INIT() blacklist_init() #define BLACKLIST_NOTIFY(x, y, z) blacklist_notify(x, y, z) From owner-svn-src-stable@freebsd.org Fri May 12 15:08:25 2017 Return-Path: Delivered-To: svn-src-stable@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 4BB44D69A07; Fri, 12 May 2017 15:08:25 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 104921885; Fri, 12 May 2017 15:08:24 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4CF8Ovu081698; Fri, 12 May 2017 15:08:24 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4CF8OD1081697; Fri, 12 May 2017 15:08:24 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705121508.v4CF8OD1081697@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 12 May 2017 15:08:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318241 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2017 15:08:25 -0000 Author: gjb Date: Fri May 12 15:08:23 2017 New Revision: 318241 URL: https://svnweb.freebsd.org/changeset/base/318241 Log: Document r318239, blacklistd updated to 20170503 snapshot. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri May 12 15:03:09 2017 (r318240) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri May 12 15:08:23 2017 (r318241) @@ -298,6 +298,10 @@ &man.tcsh.1; has been updated to version 6.20.00. + + &man.blacklistd.8; has been updated to the + 20170503 snapshot. From owner-svn-src-stable@freebsd.org Fri May 12 17:40:36 2017 Return-Path: Delivered-To: svn-src-stable@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 D2DCCD69213; Fri, 12 May 2017 17:40:36 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A3657FE3; Fri, 12 May 2017 17:40:36 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4CHeZA2044724; Fri, 12 May 2017 17:40:35 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4CHeYaG044714; Fri, 12 May 2017 17:40:34 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201705121740.v4CHeYaG044714@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Fri, 12 May 2017 17:40:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318244 - in stable/11: lib/libc/sys sys/compat/freebsd32 sys/kern sys/sys X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2017 17:40:36 -0000 Author: brooks Date: Fri May 12 17:40:34 2017 New Revision: 318244 URL: https://svnweb.freebsd.org/changeset/base/318244 Log: MFC r317845-r317846 r317845: Provide a freebsd32 implementation of sigqueue() The previous misuse of sys_sigqueue() was sending random register or stack garbage to 64-bit targets. The freebsd32 implementation preserves the sival_int member of value when signaling a 64-bit process. Document the mixed ABI implementation of union sigval and the incompability of sival_ptr with pointer integrity schemes. Reviewed by: kib, wblock Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D10605 r317846: Regen post r317845. MFC with: r317845 Sponsored by: DARPA, AFRL Modified: stable/11/lib/libc/sys/sigqueue.2 stable/11/sys/compat/freebsd32/freebsd32_misc.c stable/11/sys/compat/freebsd32/freebsd32_proto.h stable/11/sys/compat/freebsd32/freebsd32_syscall.h stable/11/sys/compat/freebsd32/freebsd32_syscalls.c stable/11/sys/compat/freebsd32/freebsd32_sysent.c stable/11/sys/compat/freebsd32/freebsd32_systrace_args.c stable/11/sys/compat/freebsd32/syscalls.master stable/11/sys/kern/kern_sig.c stable/11/sys/sys/syscallsubr.h Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/sys/sigqueue.2 ============================================================================== --- stable/11/lib/libc/sys/sigqueue.2 Fri May 12 15:34:59 2017 (r318243) +++ stable/11/lib/libc/sys/sigqueue.2 Fri May 12 17:40:34 2017 (r318244) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 10, 2012 +.Dd May 5, 2017 .Dt SIGQUEUE 2 .Os .Sh NAME @@ -129,7 +129,6 @@ does not exist. .Xr kill 2 , .Xr sigaction 2 , .Xr sigpending 2 , -.Xr sigqueue 2 , .Xr sigsuspend 2 , .Xr sigtimedwait 2 , .Xr sigwait 2 , @@ -147,3 +146,18 @@ Support for .Tn POSIX realtime signal queue first appeared in .Fx 7.0 . +.Sh CAVEATS +When using +.Nm +to send signals to a process which might have a different ABI +(for instance, one is 32-bit and the other 64-bit), +the +.Va sival_int +member of +.Fa value +can be delivered reliably, but the +.Va sival_ptr +may be truncated in endian dependent ways and must not be relied on. +Further, many pointer integrity schemes disallow sending pointers to other +processes, and this technique should not be used in programs intended to +be portable. Modified: stable/11/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- stable/11/sys/compat/freebsd32/freebsd32_misc.c Fri May 12 15:34:59 2017 (r318243) +++ stable/11/sys/compat/freebsd32/freebsd32_misc.c Fri May 12 17:40:34 2017 (r318244) @@ -2477,6 +2477,32 @@ siginfo_to_siginfo32(const siginfo_t *sr dst->si_overrun = src->si_overrun; } +#ifndef _FREEBSD32_SYSPROTO_H_ +struct freebsd32_sigqueue_args { + pid_t pid; + int signum; + /* union sigval32 */ int value; +}; +#endif +int +freebsd32_sigqueue(struct thread *td, struct freebsd32_sigqueue_args *uap) +{ + union sigval sv; + + /* + * On 32-bit ABIs, sival_int and sival_ptr are the same. + * On 64-bit little-endian ABIs, the low bits are the same. + * In 64-bit big-endian ABIs, sival_int overlaps with + * sival_ptr's HIGH bits. We choose to support sival_int + * rather than sival_ptr in this case as it seems to be + * more common. + */ + bzero(&sv, sizeof(sv)); + sv.sival_int = uap->value; + + return (kern_sigqueue(td, uap->pid, uap->signum, &sv)); +} + int freebsd32_sigtimedwait(struct thread *td, struct freebsd32_sigtimedwait_args *uap) { Modified: stable/11/sys/compat/freebsd32/freebsd32_proto.h ============================================================================== --- stable/11/sys/compat/freebsd32/freebsd32_proto.h Fri May 12 15:34:59 2017 (r318243) +++ stable/11/sys/compat/freebsd32/freebsd32_proto.h Fri May 12 17:40:34 2017 (r318244) @@ -382,6 +382,11 @@ struct freebsd32_thr_new_args { char param_l_[PADL_(struct thr_param32 *)]; struct thr_param32 * param; char param_r_[PADR_(struct thr_param32 *)]; char param_size_l_[PADL_(int)]; int param_size; char param_size_r_[PADR_(int)]; }; +struct freebsd32_sigqueue_args { + char pid_l_[PADL_(pid_t)]; pid_t pid; char pid_r_[PADR_(pid_t)]; + char signum_l_[PADL_(int)]; int signum; char signum_r_[PADR_(int)]; + char value_l_[PADL_(int)]; int value; char value_r_[PADR_(int)]; +}; struct freebsd32_kmq_open_args { char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)]; @@ -764,6 +769,7 @@ int freebsd32_ksem_timedwait(struct thre int freebsd32_thr_suspend(struct thread *, struct freebsd32_thr_suspend_args *); int freebsd32_umtx_op(struct thread *, struct freebsd32_umtx_op_args *); int freebsd32_thr_new(struct thread *, struct freebsd32_thr_new_args *); +int freebsd32_sigqueue(struct thread *, struct freebsd32_sigqueue_args *); int freebsd32_kmq_open(struct thread *, struct freebsd32_kmq_open_args *); int freebsd32_kmq_setattr(struct thread *, struct freebsd32_kmq_setattr_args *); int freebsd32_kmq_timedreceive(struct thread *, struct freebsd32_kmq_timedreceive_args *); @@ -1230,6 +1236,7 @@ int freebsd10_freebsd32_pipe(struct thre #define FREEBSD32_SYS_AUE_freebsd32_thr_suspend AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_umtx_op AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_thr_new AUE_NULL +#define FREEBSD32_SYS_AUE_freebsd32_sigqueue AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_kmq_open AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_kmq_setattr AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_kmq_timedreceive AUE_NULL Modified: stable/11/sys/compat/freebsd32/freebsd32_syscall.h ============================================================================== --- stable/11/sys/compat/freebsd32/freebsd32_syscall.h Fri May 12 15:34:59 2017 (r318243) +++ stable/11/sys/compat/freebsd32/freebsd32_syscall.h Fri May 12 17:40:34 2017 (r318244) @@ -358,7 +358,7 @@ #define FREEBSD32_SYS_auditctl 453 #define FREEBSD32_SYS_freebsd32_umtx_op 454 #define FREEBSD32_SYS_freebsd32_thr_new 455 -#define FREEBSD32_SYS_sigqueue 456 +#define FREEBSD32_SYS_freebsd32_sigqueue 456 #define FREEBSD32_SYS_freebsd32_kmq_open 457 #define FREEBSD32_SYS_freebsd32_kmq_setattr 458 #define FREEBSD32_SYS_freebsd32_kmq_timedreceive 459 Modified: stable/11/sys/compat/freebsd32/freebsd32_syscalls.c ============================================================================== --- stable/11/sys/compat/freebsd32/freebsd32_syscalls.c Fri May 12 15:34:59 2017 (r318243) +++ stable/11/sys/compat/freebsd32/freebsd32_syscalls.c Fri May 12 17:40:34 2017 (r318244) @@ -465,7 +465,7 @@ const char *freebsd32_syscallnames[] = { "auditctl", /* 453 = auditctl */ "freebsd32_umtx_op", /* 454 = freebsd32_umtx_op */ "freebsd32_thr_new", /* 455 = freebsd32_thr_new */ - "sigqueue", /* 456 = sigqueue */ + "freebsd32_sigqueue", /* 456 = freebsd32_sigqueue */ "freebsd32_kmq_open", /* 457 = freebsd32_kmq_open */ "freebsd32_kmq_setattr", /* 458 = freebsd32_kmq_setattr */ "freebsd32_kmq_timedreceive", /* 459 = freebsd32_kmq_timedreceive */ Modified: stable/11/sys/compat/freebsd32/freebsd32_sysent.c ============================================================================== --- stable/11/sys/compat/freebsd32/freebsd32_sysent.c Fri May 12 15:34:59 2017 (r318243) +++ stable/11/sys/compat/freebsd32/freebsd32_sysent.c Fri May 12 17:40:34 2017 (r318244) @@ -508,7 +508,7 @@ struct sysent freebsd32_sysent[] = { { AS(auditctl_args), (sy_call_t *)sys_auditctl, AUE_AUDITCTL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 453 = auditctl */ { AS(freebsd32_umtx_op_args), (sy_call_t *)freebsd32_umtx_op, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 454 = freebsd32_umtx_op */ { AS(freebsd32_thr_new_args), (sy_call_t *)freebsd32_thr_new, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 455 = freebsd32_thr_new */ - { AS(sigqueue_args), (sy_call_t *)sys_sigqueue, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 456 = sigqueue */ + { AS(freebsd32_sigqueue_args), (sy_call_t *)freebsd32_sigqueue, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 456 = freebsd32_sigqueue */ { AS(freebsd32_kmq_open_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 457 = freebsd32_kmq_open */ { AS(freebsd32_kmq_setattr_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_ABSENT }, /* 458 = freebsd32_kmq_setattr */ { AS(freebsd32_kmq_timedreceive_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_ABSENT }, /* 459 = freebsd32_kmq_timedreceive */ Modified: stable/11/sys/compat/freebsd32/freebsd32_systrace_args.c ============================================================================== --- stable/11/sys/compat/freebsd32/freebsd32_systrace_args.c Fri May 12 15:34:59 2017 (r318243) +++ stable/11/sys/compat/freebsd32/freebsd32_systrace_args.c Fri May 12 17:40:34 2017 (r318244) @@ -2364,12 +2364,12 @@ systrace_args(int sysnum, void *params, *n_args = 2; break; } - /* sigqueue */ + /* freebsd32_sigqueue */ case 456: { - struct sigqueue_args *p = params; + struct freebsd32_sigqueue_args *p = params; iarg[0] = p->pid; /* pid_t */ iarg[1] = p->signum; /* int */ - uarg[2] = (intptr_t) p->value; /* void * */ + iarg[2] = p->value; /* int */ *n_args = 3; break; } @@ -7155,7 +7155,7 @@ systrace_entry_setargdesc(int sysnum, in break; }; break; - /* sigqueue */ + /* freebsd32_sigqueue */ case 456: switch(ndx) { case 0: @@ -7165,7 +7165,7 @@ systrace_entry_setargdesc(int sysnum, in p = "int"; break; case 2: - p = "void *"; + p = "int"; break; default: break; @@ -10335,7 +10335,7 @@ systrace_return_setargdesc(int sysnum, i if (ndx == 0 || ndx == 1) p = "int"; break; - /* sigqueue */ + /* freebsd32_sigqueue */ case 456: if (ndx == 0 || ndx == 1) p = "int"; Modified: stable/11/sys/compat/freebsd32/syscalls.master ============================================================================== --- stable/11/sys/compat/freebsd32/syscalls.master Fri May 12 15:34:59 2017 (r318243) +++ stable/11/sys/compat/freebsd32/syscalls.master Fri May 12 17:40:34 2017 (r318244) @@ -820,8 +820,8 @@ 455 AUE_NULL STD { int freebsd32_thr_new( \ struct thr_param32 *param, \ int param_size); } -456 AUE_NULL NOPROTO { int sigqueue(pid_t pid, int signum, \ - void *value); } +456 AUE_NULL STD { int freebsd32_sigqueue(pid_t pid, \ + int signum, int value); } 457 AUE_NULL NOSTD { int freebsd32_kmq_open( \ const char *path, int flags, mode_t mode, \ const struct mq_attr32 *attr); } Modified: stable/11/sys/kern/kern_sig.c ============================================================================== --- stable/11/sys/kern/kern_sig.c Fri May 12 15:34:59 2017 (r318243) +++ stable/11/sys/kern/kern_sig.c Fri May 12 17:40:34 2017 (r318244) @@ -1862,33 +1862,43 @@ struct sigqueue_args { int sys_sigqueue(struct thread *td, struct sigqueue_args *uap) { + union sigval sv; + + sv.sival_ptr = uap->value; + + return (kern_sigqueue(td, uap->pid, uap->signum, &sv)); +} + +int +kern_sigqueue(struct thread *td, pid_t pid, int signum, union sigval *value) +{ ksiginfo_t ksi; struct proc *p; int error; - if ((u_int)uap->signum > _SIG_MAXSIG) + if ((u_int)signum > _SIG_MAXSIG) return (EINVAL); /* * Specification says sigqueue can only send signal to * single process. */ - if (uap->pid <= 0) + if (pid <= 0) return (EINVAL); - if ((p = pfind(uap->pid)) == NULL) { - if ((p = zpfind(uap->pid)) == NULL) + if ((p = pfind(pid)) == NULL) { + if ((p = zpfind(pid)) == NULL) return (ESRCH); } - error = p_cansignal(td, p, uap->signum); - if (error == 0 && uap->signum != 0) { + error = p_cansignal(td, p, signum); + if (error == 0 && signum != 0) { ksiginfo_init(&ksi); ksi.ksi_flags = KSI_SIGQ; - ksi.ksi_signo = uap->signum; + ksi.ksi_signo = signum; ksi.ksi_code = SI_QUEUE; ksi.ksi_pid = td->td_proc->p_pid; ksi.ksi_uid = td->td_ucred->cr_ruid; - ksi.ksi_value.sival_ptr = uap->value; + ksi.ksi_value = *value; error = pksignal(p, ksi.ksi_signo, &ksi); } PROC_UNLOCK(p); Modified: stable/11/sys/sys/syscallsubr.h ============================================================================== --- stable/11/sys/sys/syscallsubr.h Fri May 12 15:34:59 2017 (r318243) +++ stable/11/sys/sys/syscallsubr.h Fri May 12 17:40:34 2017 (r318244) @@ -252,6 +252,8 @@ int kern_sigprocmask(struct thread *td, int kern_sigsuspend(struct thread *td, sigset_t mask); int kern_sigtimedwait(struct thread *td, sigset_t waitset, struct ksiginfo *ksi, struct timespec *timeout); +int kern_sigqueue(struct thread *td, pid_t pid, int signum, + union sigval *value); int kern_socket(struct thread *td, int domain, int type, int protocol); int kern_statat(struct thread *td, int flag, int fd, char *path, enum uio_seg pathseg, struct stat *sbp, From owner-svn-src-stable@freebsd.org Fri May 12 18:01:06 2017 Return-Path: Delivered-To: svn-src-stable@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 D15E4D697DB; Fri, 12 May 2017 18:01: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 968F61C43; Fri, 12 May 2017 18:01:06 +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 v4CI15hp053132; Fri, 12 May 2017 18:01:05 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4CI15pr053131; Fri, 12 May 2017 18:01:05 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201705121801.v4CI15pr053131@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 12 May 2017 18:01:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318245 - stable/11/sys/opencrypto X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2017 18:01:06 -0000 Author: jhb Date: Fri May 12 18:01:05 2017 New Revision: 318245 URL: https://svnweb.freebsd.org/changeset/base/318245 Log: MFC 316510: Don't leak a session and lock if a GMAC key has an invalid length. Modified: stable/11/sys/opencrypto/cryptosoft.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/opencrypto/cryptosoft.c ============================================================================== --- stable/11/sys/opencrypto/cryptosoft.c Fri May 12 17:40:34 2017 (r318244) +++ stable/11/sys/opencrypto/cryptosoft.c Fri May 12 18:01:05 2017 (r318245) @@ -930,8 +930,11 @@ swcr_newsession(device_t dev, u_int32_t axf = &auth_hash_nist_gmac_aes_256; auth4common: len = cri->cri_klen / 8; - if (len != 16 && len != 24 && len != 32) + if (len != 16 && len != 24 && len != 32) { + swcr_freesession_locked(dev, i); + rw_runlock(&swcr_sessions_lock); return EINVAL; + } (*swd)->sw_ictx = malloc(axf->ctxsize, M_CRYPTO_DATA, M_NOWAIT); From owner-svn-src-stable@freebsd.org Fri May 12 18:06:15 2017 Return-Path: Delivered-To: svn-src-stable@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 4D449D69A87; Fri, 12 May 2017 18:06:15 +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 2A18E91; Fri, 12 May 2017 18:06:15 +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 v4CI6E94057207; Fri, 12 May 2017 18:06:14 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4CI6Em2057205; Fri, 12 May 2017 18:06:14 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201705121806.v4CI6Em2057205@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 12 May 2017 18:06:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318247 - in stable/11: . tools/build/mk X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2017 18:06:15 -0000 Author: jhb Date: Fri May 12 18:06:13 2017 New Revision: 318247 URL: https://svnweb.freebsd.org/changeset/base/318247 Log: MFC 317412,317413: Fixes for info file removal. 317412: Add info files for GCC 4.2 to the list of info files to remove. This would only affect upgrades from older versions of non-clang platforms. 317413: Remove info files from optional old files. Info files are now all removed unconditionally after the removal of texinfo. Modified: stable/11/ObsoleteFiles.inc stable/11/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/11/ (props changed) Modified: stable/11/ObsoleteFiles.inc ============================================================================== --- stable/11/ObsoleteFiles.inc Fri May 12 18:02:57 2017 (r318246) +++ stable/11/ObsoleteFiles.inc Fri May 12 18:06:13 2017 (r318247) @@ -1942,8 +1942,12 @@ OLD_FILES+=usr/share/info/am-utils.info. OLD_FILES+=usr/share/info/as.info.gz OLD_FILES+=usr/share/info/binutils.info.gz OLD_FILES+=usr/share/info/com_err.info.gz +OLD_FILES+=usr/share/info/cpp.info.gz +OLD_FILES+=usr/share/info/cppinternals.info.gz OLD_FILES+=usr/share/info/diff.info.gz OLD_FILES+=usr/share/info/dir +OLD_FILES+=usr/share/info/gcc.info.gz +OLD_FILES+=usr/share/info/gccint.info.gz OLD_FILES+=usr/share/info/gdb.info.gz OLD_FILES+=usr/share/info/gdbint.info.gz OLD_FILES+=usr/share/info/gperf.info.gz Modified: stable/11/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/11/tools/build/mk/OptionalObsoleteFiles.inc Fri May 12 18:02:57 2017 (r318246) +++ stable/11/tools/build/mk/OptionalObsoleteFiles.inc Fri May 12 18:06:13 2017 (r318247) @@ -66,7 +66,6 @@ OLD_FILES+=usr/sbin/hlfsd OLD_FILES+=usr/sbin/mk-amd-map OLD_FILES+=usr/sbin/wire-test OLD_FILES+=usr/share/examples/etc/amd.map -OLD_FILES+=usr/share/info/am-utils.info.gz OLD_FILES+=usr/share/man/man1/pawd.1.gz OLD_FILES+=usr/share/man/man5/amd.conf.5.gz OLD_FILES+=usr/share/man/man8/amd.8.gz @@ -2341,11 +2340,6 @@ OLD_LIBS+=usr/lib32/libgomp.so.1 OLD_FILES+=usr/lib32/libgomp_p.a OLD_FILES+=usr/libexec/cc1 OLD_FILES+=usr/libexec/cc1plus -OLD_FILES+=usr/share/info/cpp.info.gz -OLD_FILES+=usr/share/info/cppinternals.info.gz -OLD_FILES+=usr/share/info/gcc.info.gz -OLD_FILES+=usr/share/info/gccint.info.gz -OLD_FILES+=usr/share/info/gperf.info.gz OLD_FILES+=usr/share/man/man1/g++.1.gz OLD_FILES+=usr/share/man/man1/gcc.1.gz OLD_FILES+=usr/share/man/man1/gcov.1.gz @@ -2364,9 +2358,6 @@ OLD_FILES+=usr/bin/gdb OLD_FILES+=usr/bin/gdbserver OLD_FILES+=usr/bin/gdbtui OLD_FILES+=usr/bin/kgdb -OLD_FILES+=usr/share/info/gdb.info.gz -OLD_FILES+=usr/share/info/gdbint.info.gz -OLD_FILES+=usr/share/info/stabs.info.gz OLD_FILES+=usr/share/man/man1/gdb.1.gz OLD_FILES+=usr/share/man/man1/gdbserver.1.gz OLD_FILES+=usr/share/man/man1/kgdb.1.gz @@ -2816,7 +2807,6 @@ OLD_FILES+=usr/share/groff_font/devutf8/ OLD_FILES+=usr/share/groff_font/devutf8/S OLD_DIRS+=usr/share/groff_font/devutf8 OLD_DIRS+=usr/share/groff_font -OLD_FILES+=usr/share/info/groff.info.gz OLD_FILES+=usr/share/man/man1/addftinfo.1.gz OLD_FILES+=usr/share/man/man1/afmtodit.1.gz OLD_FILES+=usr/share/man/man1/eqn.1.gz @@ -3587,7 +3577,6 @@ OLD_FILES+=usr/libexec/kpasswdd OLD_FILES+=usr/sbin/kstash OLD_FILES+=usr/sbin/ktutil OLD_FILES+=usr/sbin/iprop-log -OLD_FILES+=usr/share/info/heimdal.info.gz OLD_FILES+=usr/share/man/man1/kdestroy.1.gz OLD_FILES+=usr/share/man/man1/kf.1.gz OLD_FILES+=usr/share/man/man1/kinit.1.gz From owner-svn-src-stable@freebsd.org Fri May 12 18:10:31 2017 Return-Path: Delivered-To: svn-src-stable@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 9F27FD69B68; Fri, 12 May 2017 18:10:31 +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 4FD7A207; Fri, 12 May 2017 18:10:31 +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 v4CIAUe0057445; Fri, 12 May 2017 18:10:30 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4CIAUTl057444; Fri, 12 May 2017 18:10:30 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201705121810.v4CIAUTl057444@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 12 May 2017 18:10:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318248 - stable/11 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2017 18:10:31 -0000 Author: jhb Date: Fri May 12 18:10:30 2017 New Revision: 318248 URL: https://svnweb.freebsd.org/changeset/base/318248 Log: Record mergeinfo for merge of r315086. Modified: Directory Properties: stable/11/ (props changed) From owner-svn-src-stable@freebsd.org Fri May 12 18:37:11 2017 Return-Path: Delivered-To: svn-src-stable@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 631E6D690E2; Fri, 12 May 2017 18:37:11 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 347E3EE; Fri, 12 May 2017 18:37:11 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4CIbA1O069811; Fri, 12 May 2017 18:37:10 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4CIb9GS069800; Fri, 12 May 2017 18:37:09 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705121837.v4CIb9GS069800@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 12 May 2017 18:37:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318249 - stable/11/release/packages X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2017 18:37:11 -0000 Author: gjb Date: Fri May 12 18:37:08 2017 New Revision: 318249 URL: https://svnweb.freebsd.org/changeset/base/318249 Log: MFC r308945: Set the 'vital' flag on the runtime and jail packages. The default pkg(8) from pkg.freebsd.org requires libjail.so, so mark the jail package as vital along with the runtime package to avoid errors when libjail.so is removed. This is a no-op for systems with WITHOUT_JAIL in src.conf(5) and pkg(8) built from the Ports Collection. In order to make this work without marking packages such as the jail-lib32, for example, the jail.ucl file needed to be split out into separate files similarly to the runtime-*.ucl files. Sponsored by: The FreeBSD Foundation Added: stable/11/release/packages/jail-debug.ucl - copied unchanged from r308945, head/release/packages/jail-debug.ucl stable/11/release/packages/jail-development.ucl - copied unchanged from r308945, head/release/packages/jail-development.ucl stable/11/release/packages/jail-lib32-debug.ucl - copied unchanged from r308945, head/release/packages/jail-lib32-debug.ucl stable/11/release/packages/jail-lib32-development.ucl - copied unchanged from r308945, head/release/packages/jail-lib32-development.ucl stable/11/release/packages/jail-lib32-profile.ucl - copied unchanged from r308945, head/release/packages/jail-lib32-profile.ucl stable/11/release/packages/jail-lib32.ucl - copied unchanged from r308945, head/release/packages/jail-lib32.ucl stable/11/release/packages/jail-profile.ucl - copied unchanged from r308945, head/release/packages/jail-profile.ucl Modified: stable/11/release/packages/Makefile.package stable/11/release/packages/generate-ucl.sh stable/11/release/packages/jail.ucl stable/11/release/packages/runtime.ucl Directory Properties: stable/11/ (props changed) Modified: stable/11/release/packages/Makefile.package ============================================================================== --- stable/11/release/packages/Makefile.package Fri May 12 18:10:30 2017 (r318248) +++ stable/11/release/packages/Makefile.package Fri May 12 18:37:08 2017 (r318249) @@ -40,6 +40,13 @@ hast_COMMENT= Highly Available Storage hast_DESC= Highly Available Storage daemon jail_COMMENT= Jail Utilities jail_DESC= Jail Utilities +jail-debug_DESCR= Debugging Symbols +jail-development_DESCR=Development Files +jail-profile_DESCR= Profiling Libraries +jail-lib32_DESCR= 32-bit Libraries +jail-lib32-debug_DESCR=32-bit Debugging Symbols +jail-lib32-development_DESCR=32-bit Development Files +jail-lib32-profile_DESCR=32-bit Profiling Libraries kernel_COMMENT= FreeBSD Kernel kernel_DESC= FreeBSD Kernel manuals_COMMENT= Manual Pages Modified: stable/11/release/packages/generate-ucl.sh ============================================================================== --- stable/11/release/packages/generate-ucl.sh Fri May 12 18:10:30 2017 (r318248) +++ stable/11/release/packages/generate-ucl.sh Fri May 12 18:37:08 2017 (r318249) @@ -48,6 +48,12 @@ main() { pkgdeps="runtime" _descr="$(make -C ${srctree}/release/packages -f Makefile.package -V ${outname}_DESCR)" ;; + jail_*) + outname="${origname}" + uclfile="${outname##*}${uclfile}" + pkgdeps="runtime" + _descr="$(make -C ${srctree}/release/packages -f Makefile.package -V ${outname}_DESCR)" + ;; *_lib32_development) outname="${outname%%_lib32_development}" _descr="32-bit Libraries, Development Files" Copied: stable/11/release/packages/jail-debug.ucl (from r308945, head/release/packages/jail-debug.ucl) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/release/packages/jail-debug.ucl Fri May 12 18:37:08 2017 (r318249, copy of r308945, head/release/packages/jail-debug.ucl) @@ -0,0 +1,24 @@ +# +# $FreeBSD$ +# + +name = "FreeBSD-%PKGNAME%" +origin = "base" +version = "%VERSION%" +comment = "%COMMENT%" +categories = [ base ] +maintainer = "re@FreeBSD.org" +www = "https://www.FreeBSD.org" +prefix = "/" +licenselogic = "single" +licenses = [ BSD2CLAUSE ] +desc = <