From owner-svn-src-all@freebsd.org Sun May 7 00:26:59 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-all@freebsd.org Sun May 7 01:31:44 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-all@freebsd.org Sun May 7 01:28:54 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-all@freebsd.org Sun May 7 07:51:37 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-all@freebsd.org Sun May 7 07:54:22 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-all@freebsd.org Sun May 7 07:56:00 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-all@freebsd.org Sun May 7 08:00:35 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-all@freebsd.org Sun May 7 08:01:31 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-all@freebsd.org Sun May 7 08:02:30 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-all@freebsd.org Sun May 7 09:19:44 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5156FD605CF; Sun, 7 May 2017 09:19:44 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0697ADBC; Sun, 7 May 2017 09:19:43 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v479Jgqq050358; Sun, 7 May 2017 09:19:42 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v479Jg5v050357; Sun, 7 May 2017 09:19:42 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201705070919.v479Jg5v050357@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 7 May 2017 09:19:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317901 - head/usr.bin/resizewin X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 May 2017 09:19:44 -0000 Author: trasz Date: Sun May 7 09:19:42 2017 New Revision: 317901 URL: https://svnweb.freebsd.org/changeset/base/317901 Log: Improve error reporting in resizewin(1). Reviewed by: cem (earlier version) MFC after: 2 weeks Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D10624 Modified: head/usr.bin/resizewin/resizewin.c Modified: head/usr.bin/resizewin/resizewin.c ============================================================================== --- head/usr.bin/resizewin/resizewin.c Sun May 7 08:02:28 2017 (r317900) +++ head/usr.bin/resizewin/resizewin.c Sun May 7 09:19:42 2017 (r317901) @@ -31,6 +31,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -87,8 +88,7 @@ main(__unused int argc, __unused char ** gettimeofday(&now, NULL); timersub(&now, &then, &now); if (now.tv_sec >= 2) { - fprintf(stderr, "\n\n\nTimeout reading from terminal\n"); - fprintf(stderr, "Read %d bytes, %s\n", cnt, data); + warnx("timeout reading from terminal"); err = 1; goto out; } @@ -104,7 +104,7 @@ main(__unused int argc, __unused char ** cnt++; if (cnt == sizeof(data) - 2) { - fprintf(stderr, "Response too long\n"); + warnx("response too long"); err = 1; goto out; } @@ -113,7 +113,7 @@ main(__unused int argc, __unused char ** /* Parse */ if (sscanf(data, "\033[%hu;%huR", &w.ws_row, &w.ws_col) != 2) { err = 1; - fprintf(stderr, "Unable to parse response\n"); + warnx("unable to parse response"); goto out; } From owner-svn-src-all@freebsd.org Sun May 7 11:10:00 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-all@freebsd.org Sun May 7 11:11:52 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-all@freebsd.org Sun May 7 11:44:27 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1108CD6221A; Sun, 7 May 2017 11:44:27 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AA121EE2; Sun, 7 May 2017 11:44:26 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v47BiPxv012066; Sun, 7 May 2017 11:44:25 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v47BiPB4012065; Sun, 7 May 2017 11:44:25 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201705071144.v47BiPB4012065@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 7 May 2017 11:44:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317904 - head/bin/stty X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 May 2017 11:44:27 -0000 Author: trasz Date: Sun May 7 11:44:25 2017 New Revision: 317904 URL: https://svnweb.freebsd.org/changeset/base/317904 Log: .Xr resizewin from stty(1) man page. MFC after: 2 weeks Sponsored by: DARPA, AFRL Modified: head/bin/stty/stty.1 Modified: head/bin/stty/stty.1 ============================================================================== --- head/bin/stty/stty.1 Sun May 7 11:11:51 2017 (r317903) +++ head/bin/stty/stty.1 Sun May 7 11:44:25 2017 (r317904) @@ -588,6 +588,7 @@ Same as the control character .Sh EXIT STATUS .Ex -std .Sh SEE ALSO +.Xr resizewin 1 , .Xr termios 4 .Sh STANDARDS The From owner-svn-src-all@freebsd.org Sun May 7 12:08:43 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 569D8D62E08; Sun, 7 May 2017 12:08:43 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DB139D08; Sun, 7 May 2017 12:08:42 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v47C8fWG020446; Sun, 7 May 2017 12:08:41 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v47C8f8n020445; Sun, 7 May 2017 12:08:41 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201705071208.v47C8f8n020445@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 7 May 2017 12:08:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317905 - head/usr.bin/resizewin X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 May 2017 12:08:43 -0000 Author: trasz Date: Sun May 7 12:08:41 2017 New Revision: 317905 URL: https://svnweb.freebsd.org/changeset/base/317905 Log: Rename a variable, hopefully fixing build after r317901. MFC after: 2 weeks Sponsored by: DARPA, AFRL Modified: head/usr.bin/resizewin/resizewin.c Modified: head/usr.bin/resizewin/resizewin.c ============================================================================== --- head/usr.bin/resizewin/resizewin.c Sun May 7 11:44:25 2017 (r317904) +++ head/usr.bin/resizewin/resizewin.c Sun May 7 12:08:41 2017 (r317905) @@ -52,11 +52,11 @@ main(__unused int argc, __unused char ** { struct termios old, new; struct winsize w; - int ret, fd, cnt, err; + int ret, fd, cnt, error; char data[20]; struct timeval then, now; - err = 0; + error = 0; if ((fd = open("/dev/tty", O_RDWR | O_NONBLOCK)) == -1) exit(1); @@ -72,7 +72,7 @@ main(__unused int argc, __unused char ** exit(1); if (write(fd, query, sizeof(query)) != sizeof(query)) { - err = 1; + error = 1; goto out; } @@ -89,14 +89,14 @@ main(__unused int argc, __unused char ** timersub(&now, &then, &now); if (now.tv_sec >= 2) { warnx("timeout reading from terminal"); - err = 1; + error = 1; goto out; } usleep(20000); continue; } - err = 1; + error = 1; goto out; } if (data[cnt] == 'R') @@ -105,25 +105,25 @@ main(__unused int argc, __unused char ** cnt++; if (cnt == sizeof(data) - 2) { warnx("response too long"); - err = 1; + error = 1; goto out; } } /* Parse */ if (sscanf(data, "\033[%hu;%huR", &w.ws_row, &w.ws_col) != 2) { - err = 1; + error = 1; warnx("unable to parse response"); goto out; } /* Finally, what we want */ if (ioctl(fd, TIOCSWINSZ, &w) == -1) - err = 1; + error = 1; out: /* Restore echo */ tcsetattr(fd, TCSANOW, &old); close(fd); - exit(err); + exit(error); } From owner-svn-src-all@freebsd.org Sun May 7 12:12:47 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0DAE9D62FC4; Sun, 7 May 2017 12:12:47 +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 D1D271E2D; Sun, 7 May 2017 12:12: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 v47CCjUo024343; Sun, 7 May 2017 12:12:45 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v47CCj85024342; Sun, 7 May 2017 12:12:45 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201705071212.v47CCj85024342@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 12:12:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317906 - head/sys/rpc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 May 2017 12:12:47 -0000 Author: rmacklem Date: Sun May 7 12:12:45 2017 New Revision: 317906 URL: https://svnweb.freebsd.org/changeset/base/317906 Log: Fix the client side krpc from doing TCP reconnects for ERESTART from sosend(). When sosend() replies ERESTART in the client side krpc, it indicates that the RPC message hasn't yet been sent and that the send queue is full or locked while a signal is posted for the process. Without this patch, this would result in a RPC_CANTSEND reply from clnt_vc_call(), which would cause clnt_reconnect_call() to create a new TCP transport connection. For most NFS servers, this wasn't a serious problem, although it did imply retries of outstanding RPCs, which could possibly have missed the DRC. For an NFSv4.1 mount to AmazonEFS, this caused a serious problem, since AmazonEFS often didn't retain the NFSv4.1 session and would reply with NFS4ERR_BAD_SESSION. This implies to the client a crash/reboot which requires open/lock state recovery. Three options were considered to fix this: - Return the ERESTART all the way up to the system call boundary and then have the system call redone. This is fraught with risk, due to convoluted code paths, asynchronous I/O RPCs etc. cperciva@ worked on this, but it is still a work in prgress and may not be feasible. - Set SB_NOINTR for the socket buffer. This fixes the problem, but makes the sosend() completely non interruptible, which kib@ considered inappropriate. It also would break forced dismount when a thread was blocked in sosend(). - Modify the retry loop in clnt_vc_call(), so that it loops for this case for up to 15sec. Testing showed that the sosend() usually succeeded by the 2nd retry. The extreme case observed was 111 loop iterations, or about 100msec of delay. This third alternative is what is implemented in this patch, since the change is: - localized - straightforward - forced dismount is not broken by it. This patch has been tested by cperciva@ extensively against AmazonEFS. Reported by: cperciva Tested by: cperciva MFC after: 2 weeks Modified: head/sys/rpc/clnt_vc.c Modified: head/sys/rpc/clnt_vc.c ============================================================================== --- head/sys/rpc/clnt_vc.c Sun May 7 12:08:41 2017 (r317905) +++ head/sys/rpc/clnt_vc.c Sun May 7 12:12:45 2017 (r317906) @@ -57,6 +57,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -107,6 +108,8 @@ static struct clnt_ops clnt_vc_ops = { static void clnt_vc_upcallsdone(struct ct_data *); +static int fake_wchan; + /* * Create a client handle for a connection. * Default options are set, which the user can change using clnt_control()'s. @@ -298,7 +301,7 @@ clnt_vc_call( uint32_t xid; struct mbuf *mreq = NULL, *results; struct ct_request *cr; - int error; + int error, trycnt; cr = malloc(sizeof(struct ct_request), M_RPC, M_WAITOK); @@ -328,8 +331,20 @@ clnt_vc_call( timeout = ct->ct_wait; /* use default timeout */ } + /* + * After 15sec of looping, allow it to return RPC_CANTSEND, which will + * cause the clnt_reconnect layer to create a new TCP connection. + */ + trycnt = 15 * hz; call_again: mtx_assert(&ct->ct_lock, MA_OWNED); + if (ct->ct_closing || ct->ct_closed) { + ct->ct_threads--; + wakeup(ct); + mtx_unlock(&ct->ct_lock); + free(cr, M_RPC); + return (RPC_CANTSEND); + } ct->ct_xid++; xid = ct->ct_xid; @@ -397,13 +412,16 @@ call_again: */ error = sosend(ct->ct_socket, NULL, NULL, mreq, NULL, 0, curthread); mreq = NULL; - if (error == EMSGSIZE) { + if (error == EMSGSIZE || (error == ERESTART && + (ct->ct_waitflag & PCATCH) == 0 && trycnt-- > 0)) { SOCKBUF_LOCK(&ct->ct_socket->so_snd); sbwait(&ct->ct_socket->so_snd); SOCKBUF_UNLOCK(&ct->ct_socket->so_snd); AUTH_VALIDATE(auth, xid, NULL, NULL); mtx_lock(&ct->ct_lock); TAILQ_REMOVE(&ct->ct_pending, cr, cr_link); + /* Sleep for 1 clock tick before trying the sosend() again. */ + msleep(&fake_wchan, &ct->ct_lock, 0, "rpclpsnd", 1); goto call_again; } From owner-svn-src-all@freebsd.org Sun May 7 14:33:59 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DE1C9D6299E; Sun, 7 May 2017 14:33:59 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 331CDBD6; Sun, 7 May 2017 14:33:59 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v47EXwoZ080885; Sun, 7 May 2017 14:33:58 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v47EXwtT080884; Sun, 7 May 2017 14:33:58 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201705071433.v47EXwtT080884@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Sun, 7 May 2017 14:33:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317907 - head/sys/netpfil/pf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 May 2017 14:34:00 -0000 Author: kp Date: Sun May 7 14:33:58 2017 New Revision: 317907 URL: https://svnweb.freebsd.org/changeset/base/317907 Log: pf: Fix vnet initialisation When running the vnet init code (pf_load_vnet()) we used to iterate over all vnets, marking them as unhooked. This is incorrect and leads to panics if pf is unloaded, as the unload code does not unregister the pfil hooks (because the vnet is marked as unhooked). There's no need or reason to touch other vnets during initialisation. Their pf_load_vnet() function will be triggered, which handles all required initialisation. Reviewed by: zec, gnn Differential Revision: https://reviews.freebsd.org/D10592 Modified: head/sys/netpfil/pf/pf_ioctl.c Modified: head/sys/netpfil/pf/pf_ioctl.c ============================================================================== --- head/sys/netpfil/pf/pf_ioctl.c Sun May 7 12:12:45 2017 (r317906) +++ head/sys/netpfil/pf/pf_ioctl.c Sun May 7 14:33:58 2017 (r317907) @@ -3712,17 +3712,8 @@ dehook_pf(void) static void pf_load_vnet(void) { - VNET_ITERATOR_DECL(vnet_iter); - - VNET_LIST_RLOCK(); - VNET_FOREACH(vnet_iter) { - CURVNET_SET(vnet_iter); - V_pf_pfil_hooked = 0; - TAILQ_INIT(&V_pf_tags); - TAILQ_INIT(&V_pf_qids); - CURVNET_RESTORE(); - } - VNET_LIST_RUNLOCK(); + TAILQ_INIT(&V_pf_tags); + TAILQ_INIT(&V_pf_qids); pfattach_vnet(); V_pf_vnet_active = 1; From owner-svn-src-all@freebsd.org Sun May 7 14:59:47 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4A751D61008; Sun, 7 May 2017 14:59:47 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 12E2917A8; Sun, 7 May 2017 14:59:46 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v47ExkH4089160; Sun, 7 May 2017 14:59:46 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v47ExkdP089159; Sun, 7 May 2017 14:59:46 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201705071459.v47ExkdP089159@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 14:59:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317908 - head/sys/ufs/ffs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 May 2017 14:59:47 -0000 Author: kib Date: Sun May 7 14:59:45 2017 New Revision: 317908 URL: https://svnweb.freebsd.org/changeset/base/317908 Log: Remove spl() calls from UFS code. Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/ufs/ffs/ffs_rawread.c Modified: head/sys/ufs/ffs/ffs_rawread.c ============================================================================== --- head/sys/ufs/ffs/ffs_rawread.c Sun May 7 14:33:58 2017 (r317907) +++ head/sys/ufs/ffs/ffs_rawread.c Sun May 7 14:59:45 2017 (r317908) @@ -270,7 +270,6 @@ ffs_rawread_main(struct vnode *vp, int error, nerror; struct buf *bp, *nbp, *tbp; u_int iolen; - int spl; caddr_t udata; long resid; off_t offset; @@ -330,10 +329,7 @@ ffs_rawread_main(struct vnode *vp, } } - spl = splbio(); bwait(bp, PRIBIO, "rawrd"); - splx(spl); - vunmapbuf(bp); iolen = bp->b_bcount - bp->b_resid; @@ -400,9 +396,7 @@ ffs_rawread_main(struct vnode *vp, relpbuf(bp, &ffsrawbufcnt); } if (nbp != NULL) { /* Run down readahead buffer */ - spl = splbio(); bwait(nbp, PRIBIO, "rawrd"); - splx(spl); vunmapbuf(nbp); pbrelvp(nbp); relpbuf(nbp, &ffsrawbufcnt); From owner-svn-src-all@freebsd.org Sun May 7 15:02:19 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E76B7D6123D; Sun, 7 May 2017 15:02:19 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x242.google.com (mail-pf0-x242.google.com [IPv6:2607:f8b0:400e:c00::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2D31D8C8; Sun, 7 May 2017 15:02:19 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x242.google.com with SMTP id v14so6728764pfd.3; Sun, 07 May 2017 08:02:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=KMKyTueRgFyRz+zEUZHZBCOD3gm77lGEab7DC3zhSLQ=; b=ldLbB32y7lCeW+nJN8+hVYVIDeNtU19O8fNFPTcunYi8ScnXl06tDyM1fNVjC3pXXp UuL6K10a9hrLUYWCLLdvQ115haGcASjj5opIRX6erCwu/By5jSZlQtmQUZN1eoY4Kmrn rlVaIW/aIcmDhHpfvQ35QT7OLzZvsxaEAh1rvMY1L2j4Xn9ZiyQL+0rePmXPn7YBk1gA uUlD5ORlEbjm+YkHsGlV0vhmEpGoZV21BzUElUZkYgr62pmi/g6VJgFRlO6uePW1n+g1 eC9/tbP13rWSBRPbE5iVwihAamdGLxd2ZLKTpJgmyjGXbx4TH3Pt78XM57aBeYRl2QI2 n+Pw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=KMKyTueRgFyRz+zEUZHZBCOD3gm77lGEab7DC3zhSLQ=; b=q1M5EYZeUIxSXlHpTltXoUSIKc0s0gQG0uW1+MB7VcoHqwI6vPNRQHaU2YULvvYqcP 9YDBQM47LmZ1+jmTpWp4nofTEsgFr5ELcVaJb2/QWsHJEFo4FcYiiJo86K6R5SVGLFSr J7C+FSeYHY9SJT/KJCunmEE0nw/8KsiFrXFRTLwrWhteiZ5AHvLNGKBuGK1hNt/kU0pe eHgz6WL+yF6on2Wh+FqQVr2YitYXQOWEUrPnaCOaizaPr+K7f6kIv2HDsEFF9zPeUB8p HZDGpXGWuKzCowQ4ANDDRw3U/koQdmnZ8W69vIJuSo+wyjoHZFreaaoY6wYqee5a8OV9 B2UA== X-Gm-Message-State: AN3rC/5f9v7NExw+rK3leEZYaTZ8CkpQo/31vxzVnAIoKM9bxdfM5c/P v7/Be1nyr8RYqQ== X-Received: by 10.99.173.6 with SMTP id g6mr13703430pgf.75.1494169338658; Sun, 07 May 2017 08:02:18 -0700 (PDT) Received: from [192.168.20.13] (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id r73sm20856948pfa.65.2017.05.07.08.02.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 07 May 2017 08:02:17 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r317884 - head/sys/compat/linprocfs From: Ngie Cooper X-Mailer: iPhone Mail (14E304) In-Reply-To: Date: Sun, 7 May 2017 08:02:17 -0700 Cc: Konstantin Belousov , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <201705061737.v46Hb1Aq067178@repo.freebsd.org> <20170506175528.GZ1622@kib.kiev.ua> To: mmokhi@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 May 2017 15:02:20 -0000 > On May 6, 2017, at 11:43, Mahdi Mokhtari wrote: >=20 > Also I think it worths saying, I've tested this running on a X86. > It was not panic'd and printed data as expected. > So you mean it's possible to panic on "some" cases because of CPUID suppor= t? You'll get a hardware trap if/when the CPU doesn't support the instruction, w= hich will result in a panic. Cheers, -Ngie= From owner-svn-src-all@freebsd.org Sun May 7 16:19:26 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 88CAFD62E3C; Sun, 7 May 2017 16:19:26 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-wr0-f174.google.com (mail-wr0-f174.google.com [209.85.128.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B8AA1DC3; Sun, 7 May 2017 16:19:25 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-wr0-f174.google.com with SMTP id z52so27100352wrc.2; Sun, 07 May 2017 09:19:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=GyWHWkoUOtjdB7hHRokcLdGM9kJJlpedL1zDaek0wF8=; b=RSpE4kVKGRndOgiRXepsEFNszdPUWZyeLb3/a6WqePcDNa0tgbmF/b8GVR8LRNDmpD G98KqbBI2ZUBOIjNMXbJ+5n+JggYEwUn/db4HLSgyb54/P9tEuI38TqGTMI9hfmEtBPY WFHuBZorSp/FEouKZO5pjXvPT2lwJpL429cznB+hv2KmqIvLOAWbIvCatiEzjVQaPy0o sYdB6ObQfQ38OR3dFuoKrf5YXaY/Uk0V3AkPlwT63vIZnh/I+eTkRgkfe41Z/ar/ezFD yE59+U/YQo7hB9bu209Yi6V9Y/GXpN3ZlQGBgW4YiqnRPcETrpoGbS7xR3fPHSyDNcfq Wqew== X-Gm-Message-State: AN3rC/7RUDRh4ZdOm/hQF/n+qX5w5Pg4fwKc+csuO7VSgSPQN2Cnp10M X772EVDaHI4+iL2CidQ= X-Received: by 10.223.176.84 with SMTP id g20mr39256699wra.172.1494173957616; Sun, 07 May 2017 09:19:17 -0700 (PDT) Received: from mail-wm0-f44.google.com (mail-wm0-f44.google.com. [74.125.82.44]) by smtp.gmail.com with ESMTPSA id z90sm18512937wrc.36.2017.05.07.09.19.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 07 May 2017 09:19:17 -0700 (PDT) Received: by mail-wm0-f44.google.com with SMTP id m123so42091650wma.0; Sun, 07 May 2017 09:19:17 -0700 (PDT) X-Received: by 10.80.186.201 with SMTP id x67mr2983965ede.46.1494173957327; Sun, 07 May 2017 09:19:17 -0700 (PDT) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.80.169.4 with HTTP; Sun, 7 May 2017 09:19:16 -0700 (PDT) In-Reply-To: <201705070919.v479Jg5v050357@repo.freebsd.org> References: <201705070919.v479Jg5v050357@repo.freebsd.org> From: Conrad Meyer Date: Sun, 7 May 2017 09:19:16 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r317901 - head/usr.bin/resizewin To: Edward Tomasz Napierala Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 May 2017 16:19:26 -0000 On Sun, May 7, 2017 at 2:19 AM, Edward Tomasz Napierala wrote: > Author: trasz > Date: Sun May 7 09:19:42 2017 > New Revision: 317901 > URL: https://svnweb.freebsd.org/changeset/base/317901 > > Log: > Improve error reporting in resizewin(1). > > Reviewed by: cem (earlier version) Also reviewed by: Daniel O'Connor (the original author) :-). Best, Conrad From owner-svn-src-all@freebsd.org Sun May 7 17:21:24 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 63135D62FFE; Sun, 7 May 2017 17:21:24 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 11F7D1F8A; Sun, 7 May 2017 17:21:24 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v47HLNbl049019; Sun, 7 May 2017 17:21:23 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v47HLNWB049018; Sun, 7 May 2017 17:21:23 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201705071721.v47HLNWB049018@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 7 May 2017 17:21:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317909 - head/usr.bin/resizewin X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 May 2017 17:21:24 -0000 Author: trasz Date: Sun May 7 17:21:22 2017 New Revision: 317909 URL: https://svnweb.freebsd.org/changeset/base/317909 Log: Make resizewin(1) discard the terminal queues, to lower the chance for "unable to parse response" error which happens when youre typing too fast for the machine you're running it on. Reviewed by: cem, Daniel O'Connor MFC after: 2 weeks Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D10624 Modified: head/usr.bin/resizewin/resizewin.c Modified: head/usr.bin/resizewin/resizewin.c ============================================================================== --- head/usr.bin/resizewin/resizewin.c Sun May 7 14:59:45 2017 (r317908) +++ head/usr.bin/resizewin/resizewin.c Sun May 7 17:21:22 2017 (r317909) @@ -52,7 +52,7 @@ main(__unused int argc, __unused char ** { struct termios old, new; struct winsize w; - int ret, fd, cnt, error; + int ret, fd, cnt, error, what; char data[20]; struct timeval then, now; @@ -71,6 +71,12 @@ main(__unused int argc, __unused char ** if (tcsetattr(fd, TCSANOW, &new) == -1) exit(1); + /* Discard input received so far */ + what = FREAD | FWRITE; + error = ioctl(fd, TIOCFLUSH, &what); + if (error != 0) + warn("ioctl"); + if (write(fd, query, sizeof(query)) != sizeof(query)) { error = 1; goto out; From owner-svn-src-all@freebsd.org Sun May 7 18:01:51 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 94577D62ACB; Sun, 7 May 2017 18:01:51 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B70EF1372; Sun, 7 May 2017 18:01:50 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id v47I1iDL041344 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 7 May 2017 21:01:44 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v47I1iDL041344 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v47I1hc9041343; Sun, 7 May 2017 21:01:43 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 7 May 2017 21:01:43 +0300 From: Konstantin Belousov To: Edward Tomasz Napierala Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r317909 - head/usr.bin/resizewin Message-ID: <20170507180143.GA1622@kib.kiev.ua> References: <201705071721.v47HLNWB049018@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201705071721.v47HLNWB049018@repo.freebsd.org> User-Agent: Mutt/1.8.2 (2017-04-18) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 May 2017 18:01:51 -0000 On Sun, May 07, 2017 at 05:21:23PM +0000, Edward Tomasz Napierala wrote: > Author: trasz > Date: Sun May 7 17:21:22 2017 > New Revision: 317909 > URL: https://svnweb.freebsd.org/changeset/base/317909 > > Log: > Make resizewin(1) discard the terminal queues, to lower the chance > for "unable to parse response" error which happens when youre typing > too fast for the machine you're running it on. > > Reviewed by: cem, Daniel O'Connor > MFC after: 2 weeks > Sponsored by: DARPA, AFRL > Differential Revision: https://reviews.freebsd.org/D10624 > > Modified: > head/usr.bin/resizewin/resizewin.c > > Modified: head/usr.bin/resizewin/resizewin.c > ============================================================================== > --- head/usr.bin/resizewin/resizewin.c Sun May 7 14:59:45 2017 (r317908) > +++ head/usr.bin/resizewin/resizewin.c Sun May 7 17:21:22 2017 (r317909) > @@ -52,7 +52,7 @@ main(__unused int argc, __unused char ** > { > struct termios old, new; > struct winsize w; > - int ret, fd, cnt, error; > + int ret, fd, cnt, error, what; > char data[20]; > struct timeval then, now; > > @@ -71,6 +71,12 @@ main(__unused int argc, __unused char ** > if (tcsetattr(fd, TCSANOW, &new) == -1) > exit(1); > > + /* Discard input received so far */ > + what = FREAD | FWRITE; > + error = ioctl(fd, TIOCFLUSH, &what); This is correctly spelled tcflush(fd, TCIOFLUSH); > + if (error != 0) > + warn("ioctl"); > + > if (write(fd, query, sizeof(query)) != sizeof(query)) { > error = 1; > goto out; From owner-svn-src-all@freebsd.org Sun May 7 18:28:13 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CC933D62310; Sun, 7 May 2017 18:28:13 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mailout.stack.nl (mailout05.stack.nl [IPv6:2001:610:1108:5010::202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mailout.stack.nl", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 3F6579BD; Sun, 7 May 2017 18:28:13 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mailout.stack.nl (Postfix) with ESMTP id B1C3C63; Sun, 7 May 2017 20:28:02 +0200 (CEST) Received: by snail.stack.nl (Postfix, from userid 1677) id 9C55E28497; Sun, 7 May 2017 20:28:02 +0200 (CEST) Date: Sun, 7 May 2017 20:28:02 +0200 From: Jilles Tjoelker To: Konstantin Belousov Cc: Edward Tomasz Napierala , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r317909 - head/usr.bin/resizewin Message-ID: <20170507182802.GA5248@stack.nl> References: <201705071721.v47HLNWB049018@repo.freebsd.org> <20170507180143.GA1622@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170507180143.GA1622@kib.kiev.ua> User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 May 2017 18:28:14 -0000 On Sun, May 07, 2017 at 09:01:43PM +0300, Konstantin Belousov wrote: > On Sun, May 07, 2017 at 05:21:23PM +0000, Edward Tomasz Napierala wrote: > > Author: trasz > > Date: Sun May 7 17:21:22 2017 > > New Revision: 317909 > > URL: https://svnweb.freebsd.org/changeset/base/317909 > > Log: > > Make resizewin(1) discard the terminal queues, to lower the chance > > for "unable to parse response" error which happens when youre typing > > too fast for the machine you're running it on. > > Reviewed by: cem, Daniel O'Connor > > MFC after: 2 weeks > > Sponsored by: DARPA, AFRL > > Differential Revision: https://reviews.freebsd.org/D10624 > > Modified: > > head/usr.bin/resizewin/resizewin.c > > > > Modified: head/usr.bin/resizewin/resizewin.c > > ============================================================================== > > --- head/usr.bin/resizewin/resizewin.c Sun May 7 14:59:45 2017 (r317908) > > +++ head/usr.bin/resizewin/resizewin.c Sun May 7 17:21:22 2017 (r317909) > > @@ -52,7 +52,7 @@ main(__unused int argc, __unused char ** > > { > > struct termios old, new; > > struct winsize w; > > - int ret, fd, cnt, error; > > + int ret, fd, cnt, error, what; > > char data[20]; > > struct timeval then, now; > > > > @@ -71,6 +71,12 @@ main(__unused int argc, __unused char ** > > if (tcsetattr(fd, TCSANOW, &new) == -1) > > exit(1); > > > > + /* Discard input received so far */ > > + what = FREAD | FWRITE; > > + error = ioctl(fd, TIOCFLUSH, &what); > This is correctly spelled tcflush(fd, TCIOFLUSH); Alternatively, the above TCSANOW could be changed to TCSAFLUSH. The effect is slightly different in that pending output is drained instead of discarded. In any case, the TIOCFLUSH ioctl is non-standard and should not be used directly. -- Jilles Tjoelker From owner-svn-src-all@freebsd.org Sun May 7 19:01:09 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D7C03D62D94; Sun, 7 May 2017 19:01:09 +0000 (UTC) (envelope-from bjk@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 95DBB1B08; Sun, 7 May 2017 19:01:09 +0000 (UTC) (envelope-from bjk@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v47J18iU088757; Sun, 7 May 2017 19:01:08 GMT (envelope-from bjk@FreeBSD.org) Received: (from bjk@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v47J18Mt088756; Sun, 7 May 2017 19:01:08 GMT (envelope-from bjk@FreeBSD.org) Message-Id: <201705071901.v47J18Mt088756@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bjk set sender to bjk@FreeBSD.org using -f From: Benjamin Kaduk Date: Sun, 7 May 2017 19:01:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317910 - head/share/man/man9 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 May 2017 19:01:10 -0000 Author: bjk (doc committer) Date: Sun May 7 19:01:08 2017 New Revision: 317910 URL: https://svnweb.freebsd.org/changeset/base/317910 Log: Bring VOP_GETPAGES.9 more up-to-date Attempt to catch up to the KPI changes from r292373, and perform some other tidying while in the area. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D10579 Modified: head/share/man/man9/VOP_GETPAGES.9 Modified: head/share/man/man9/VOP_GETPAGES.9 ============================================================================== --- head/share/man/man9/VOP_GETPAGES.9 Sun May 7 17:21:22 2017 (r317909) +++ head/share/man/man9/VOP_GETPAGES.9 Sun May 7 19:01:08 2017 (r317910) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 16, 2015 +.Dd May 7, 2017 .Dt VOP_GETPAGES 9 .Os .Sh NAME @@ -41,9 +41,21 @@ .In sys/vnode.h .In vm/vm.h .Ft int -.Fn VOP_GETPAGES "struct vnode *vp" "vm_page_t *ma" "int count" "int *rbehind" "int *rahead" +.Fo VOP_GETPAGES +.Fa "struct vnode *vp" +.Fa "vm_page_t *ma" +.Fa "int count" +.Fa "int *rbehind" +.Fa "int *rahead" +.Fc .Ft int -.Fn VOP_PUTPAGES "struct vnode *vp" "vm_page_t *ma" "int count" "int sync" "int *rtvals" +.Fo VOP_PUTPAGES +.Fa "struct vnode *vp" +.Fa "vm_page_t *ma" +.Fa "int bytecount" +.Fa "int flags" +.Fa "int *rtvals" +.Fc .Sh DESCRIPTION The .Fn VOP_GETPAGES @@ -70,10 +82,32 @@ The file to access. Pointer to the first element of an array of pages representing a contiguous region of the file to be read or written. .It Fa count -The number of bytes that should be read into the pages of the array. -.It Fa sync +The length of the +.Fa ma +array. +.It Fa bytecount +The number of bytes that should be written from the pages of the array. +.It Fa flags +A bitfield of flags affecting the function operation. +If .Dv VM_PAGER_PUT_SYNC -if the write should be synchronous. +is set, the write should be synchronous; control must not be returned +to the caller until after the write is finished. +If +.Dv VM_PAGER_PUT_INVAL +is set, the pages are to be invalidated after being written. +If +.Dv VM_PAGER_PUT_NOREUSE +is set, the I/O performed should set the IO_NOREUSE flag, to indicate +to the filesystem that pages should be marked for fast reuse if needed. +This could occur via a call to +.Xr vm_page_deactivate_noreuse 9 , +which puts such pages onto the head of the inactive queue. +If +.Dv VM_PAGER_CLUSTER_OK +is set, writes may be performed asynchronously, so that related writes +can be coalesced for efficiency, e.g., +using the clustering mechanism of the buffer cache. .It Fa rtvals An array of VM system result codes indicating the status of each page written by @@ -127,32 +161,33 @@ The page was not handled by this request .Pp The .Fn VOP_GETPAGES -method is expected to release any pages in +method must populate and validate all requested pages in order to +return success. +It is expected to release any pages in .Fa ma that it does not successfully handle, by calling .Xr vm_page_free 9 . When it succeeds, .Fn VOP_GETPAGES must set the valid bits appropriately. +Upon entry to +.Fn VOP_GETPAGES , +all pages in +.Fa ma +are busied exclusively. +Upon successful return, the pages must all be busied exclusively +as well, but pages may be unbusied during processing. +The filesystem is responsible for activating paged-out pages, but this +does not necessarily need to be done within .Fn VOP_GETPAGES -must keep -.Fa reqpage -busy. -It must unbusy all other successfully handled pages and put them -on appropriate page queue(s). -For example, -.Fn VOP_GETPAGES -may either activate a page (if its wanted bit is set) -or deactivate it (otherwise), and finally call -.Xr vm_page_xunbusy 9 -to arouse any threads currently waiting for the page to be faulted in. +depending on the architecture of the particular filesystem. .Sh RETURN VALUES -If it successfully reads -.Fa ma[reqpage] , +If it successfully reads all pages in +.Fa ma , .Fn VOP_GETPAGES returns .Dv VM_PAGER_OK ; -otherwise, +otherwise, it returns .Dv VM_PAGER_ERROR . By convention, the return value of .Fn VOP_PUTPAGES From owner-svn-src-all@freebsd.org Sun May 7 19:47:51 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-all@freebsd.org Sun May 7 19:49:48 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 656BBD6211B; Sun, 7 May 2017 19:49:48 +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 0896528B; Sun, 7 May 2017 19:49:47 +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 v47Jnko4009303; Sun, 7 May 2017 19:49:46 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v47Jnk9r009300; Sun, 7 May 2017 19:49:46 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201705071949.v47Jnk9r009300@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sun, 7 May 2017 19:49:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317912 - in head/bin/sh: . tests/builtins X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 May 2017 19:49:48 -0000 Author: jilles Date: Sun May 7 19:49:46 2017 New Revision: 317912 URL: https://svnweb.freebsd.org/changeset/base/317912 Log: sh: Fix INTOFF leak after a builtin with different locale settings. After executing a builtin with different locale settings such as LC_ALL=C true SIGINT handling was left disabled indefinitely. MFC after: 1 week Added: head/bin/sh/tests/builtins/locale2.0 (contents, props changed) Modified: head/bin/sh/tests/builtins/Makefile head/bin/sh/var.c Modified: head/bin/sh/tests/builtins/Makefile ============================================================================== --- head/bin/sh/tests/builtins/Makefile Sun May 7 19:47:50 2017 (r317911) +++ head/bin/sh/tests/builtins/Makefile Sun May 7 19:49:46 2017 (r317912) @@ -120,6 +120,7 @@ ${PACKAGE}FILES+= local7.0 .if ${MK_NLS} != "no" ${PACKAGE}FILES+= locale1.0 .endif +${PACKAGE}FILES+= locale2.0 ${PACKAGE}FILES+= printf1.0 ${PACKAGE}FILES+= printf2.0 ${PACKAGE}FILES+= printf3.0 Added: head/bin/sh/tests/builtins/locale2.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/sh/tests/builtins/locale2.0 Sun May 7 19:49:46 2017 (r317912) @@ -0,0 +1,5 @@ +# $FreeBSD$ + +$SH -c 'LC_ALL=C true; kill -INT $$; echo continued' +r=$? +[ "$r" -gt 128 ] && [ "$(kill -l "$r")" = INT ] Modified: head/bin/sh/var.c ============================================================================== --- head/bin/sh/var.c Sun May 7 19:47:50 2017 (r317911) +++ head/bin/sh/var.c Sun May 7 19:49:46 2017 (r317912) @@ -513,7 +513,7 @@ bltinunsetlocale(void) if (localevar(cmdenviron->args[i])) { setlocale(LC_ALL, ""); updatecharset(); - return; + break; } } INTON; From owner-svn-src-all@freebsd.org Sun May 7 19:52:58 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 28D87D6231C; Sun, 7 May 2017 19:52:58 +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 D24A315D1; Sun, 7 May 2017 19:52:57 +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 v47JquMQ013078; Sun, 7 May 2017 19:52:56 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v47JquQF013077; Sun, 7 May 2017 19:52:56 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201705071952.v47JquQF013077@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sun, 7 May 2017 19:52:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317913 - head/lib/libc/gen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 May 2017 19:52:58 -0000 Author: jilles Date: Sun May 7 19:52:56 2017 New Revision: 317913 URL: https://svnweb.freebsd.org/changeset/base/317913 Log: glob: Fix comment about collapsing asterisks after r317749. After r317749, collapsing adjacent asterisks is still required, but for a different reason. Modified: head/lib/libc/gen/glob.c Modified: head/lib/libc/gen/glob.c ============================================================================== --- head/lib/libc/gen/glob.c Sun May 7 19:49:46 2017 (r317912) +++ head/lib/libc/gen/glob.c Sun May 7 19:52:56 2017 (r317913) @@ -581,7 +581,8 @@ glob0(const Char *pattern, glob_t *pglob case STAR: pglob->gl_flags |= GLOB_MAGCHAR; /* collapse adjacent stars to one, - * to avoid exponential behavior + * to ensure "**" at the end continues to match the + * empty string */ if (bufnext == patbuf || bufnext[-1] != M_ALL) *bufnext++ = M_ALL; From owner-svn-src-all@freebsd.org Sun May 7 19:57:46 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-all@freebsd.org Sun May 7 19:59:39 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4AC5ED624E4; Sun, 7 May 2017 19:59:39 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 0A8E212A7; Sun, 7 May 2017 19:59:38 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v47JxbqQ013420; Sun, 7 May 2017 19:59:37 GMT (envelope-from n_hibma@FreeBSD.org) Received: (from n_hibma@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v47Jxbid013419; Sun, 7 May 2017 19:59:37 GMT (envelope-from n_hibma@FreeBSD.org) Message-Id: <201705071959.v47Jxbid013419@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: n_hibma set sender to n_hibma@FreeBSD.org using -f From: Nick Hibma Date: Sun, 7 May 2017 19:59:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317915 - head/sbin/dhclient X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 May 2017 19:59:39 -0000 Author: n_hibma Date: Sun May 7 19:59:37 2017 New Revision: 317915 URL: https://svnweb.freebsd.org/changeset/base/317915 Log: Fix handling of large DHCP expiry values. They would overflow a signed 32-bit time_t on 32 bit architectures. This was taken care of, but a compiler optimisation makes this behave erratically. This could be resolved by adding a -fwrapv flag, but instead we can check the value before adding the current timestamp to it. In the lease file values are still wrong though: option dhcp-rebinding-time -644245096; PR: 218980 Reported by: Bob Eager MFC after: 2 weeks Modified: head/sbin/dhclient/dhclient.c Modified: head/sbin/dhclient/dhclient.c ============================================================================== --- head/sbin/dhclient/dhclient.c Sun May 7 19:57:45 2017 (r317914) +++ head/sbin/dhclient/dhclient.c Sun May 7 19:59:37 2017 (r317915) @@ -108,7 +108,11 @@ struct pidfh *pidfile; */ #define ASSERT_STATE(state_is, state_shouldbe) {} -#define TIME_MAX 2147483647 +/* + * We need to check that the expiry, renewal and rebind times are not beyond + * the end of time (~2038 when a 32-bit time_t is being used). + */ +#define TIME_MAX ((((time_t) 1 << (sizeof(time_t) * CHAR_BIT - 2)) - 1) * 2 + 1) int log_priority; int no_daemon; @@ -766,15 +770,17 @@ dhcpack(struct packet *packet) else ip->client->new->expiry = default_lease_time; /* A number that looks negative here is really just very large, - because the lease expiry offset is unsigned. */ - if (ip->client->new->expiry < 0) - ip->client->new->expiry = TIME_MAX; + because the lease expiry offset is unsigned. Also make sure that + the addition of cur_time below does not overflow (a 32 bit) time_t. */ + if (ip->client->new->expiry < 0 || + ip->client->new->expiry > TIME_MAX - cur_time) + ip->client->new->expiry = TIME_MAX - cur_time; /* XXX should be fixed by resetting the client state */ if (ip->client->new->expiry < 60) ip->client->new->expiry = 60; /* Unless overridden in the config, take the server-provided renewal - * time if there is one; otherwise figure it out according to the spec. + * time if there is one. Otherwise figure it out according to the spec. * Also make sure the renewal time does not exceed the expiry time. */ if (ip->client->config->default_actions[DHO_DHCP_RENEWAL_TIME] == @@ -786,7 +792,8 @@ dhcpack(struct packet *packet) ip->client->new->options[DHO_DHCP_RENEWAL_TIME].data); else ip->client->new->renewal = ip->client->new->expiry / 2; - if (ip->client->new->renewal > ip->client->new->expiry / 2) + if (ip->client->new->renewal < 0 || + ip->client->new->renewal > ip->client->new->expiry / 2) ip->client->new->renewal = ip->client->new->expiry / 2; /* Same deal with the rebind time. */ @@ -798,20 +805,15 @@ dhcpack(struct packet *packet) ip->client->new->rebind = getULong( ip->client->new->options[DHO_DHCP_REBINDING_TIME].data); else - ip->client->new->rebind = ip->client->new->renewal * 7 / 4; - if (ip->client->new->rebind > ip->client->new->renewal * 7 / 4) - ip->client->new->rebind = ip->client->new->renewal * 7 / 4; - - ip->client->new->expiry += cur_time; - /* Lease lengths can never be negative. */ - if (ip->client->new->expiry < cur_time) - ip->client->new->expiry = TIME_MAX; - ip->client->new->renewal += cur_time; - if (ip->client->new->renewal < cur_time) - ip->client->new->renewal = TIME_MAX; - ip->client->new->rebind += cur_time; - if (ip->client->new->rebind < cur_time) - ip->client->new->rebind = TIME_MAX; + ip->client->new->rebind = ip->client->new->renewal / 4 * 7; + if (ip->client->new->rebind < 0 || + ip->client->new->rebind > ip->client->new->renewal / 4 * 7) + ip->client->new->rebind = ip->client->new->renewal / 4 * 7; + + /* Convert the time offsets into seconds-since-the-epoch */ + ip->client->new->expiry += cur_time; + ip->client->new->renewal += cur_time; + ip->client->new->rebind += cur_time; bind_lease(ip); } From owner-svn-src-all@freebsd.org Sun May 7 20:11:59 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-all@freebsd.org Sun May 7 20:22:01 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-all@freebsd.org Sun May 7 20:32:09 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-all@freebsd.org Sun May 7 20:42:03 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-all@freebsd.org Sun May 7 20:50:34 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-all@freebsd.org Sun May 7 20:57:15 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-all@freebsd.org Sun May 7 21:06:25 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-all@freebsd.org Sun May 7 21:11:29 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C32ACD62792; Sun, 7 May 2017 21:11:29 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 67F0916DE; Sun, 7 May 2017 21:11:29 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v47LBSW4045541; Sun, 7 May 2017 21:11:28 GMT (envelope-from n_hibma@FreeBSD.org) Received: (from n_hibma@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v47LBSl6045540; Sun, 7 May 2017 21:11:28 GMT (envelope-from n_hibma@FreeBSD.org) Message-Id: <201705072111.v47LBSl6045540@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: n_hibma set sender to n_hibma@FreeBSD.org using -f From: Nick Hibma Date: Sun, 7 May 2017 21:11:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317923 - head/sbin/dhclient X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 May 2017 21:11:30 -0000 Author: n_hibma Date: Sun May 7 21:11:28 2017 New Revision: 317923 URL: https://svnweb.freebsd.org/changeset/base/317923 Log: Fix the output of very large rebind, renew and lease time options in lease file. Some routers set very large values for rebind time (Netgear) and these are erroneously reported as negative in the leasefile. This was due to a wrong printf format specification of %ld for an unsigned long on 32-bit platforms. Modified: head/sbin/dhclient/options.c Modified: head/sbin/dhclient/options.c ============================================================================== --- head/sbin/dhclient/options.c Sun May 7 21:06:23 2017 (r317922) +++ head/sbin/dhclient/options.c Sun May 7 21:11:28 2017 (r317923) @@ -783,7 +783,7 @@ pretty_print_option(unsigned int code, u dp += 4; break; case 'L': - opcount = snprintf(op, opleft, "%ld", + opcount = snprintf(op, opleft, "%lu", (unsigned long)getULong(dp)); if (opcount >= opleft || opcount == -1) goto toobig; @@ -799,7 +799,7 @@ pretty_print_option(unsigned int code, u dp += 2; break; case 'S': - opcount = snprintf(op, opleft, "%d", + opcount = snprintf(op, opleft, "%u", getUShort(dp)); if (opcount >= opleft || opcount == -1) goto toobig; From owner-svn-src-all@freebsd.org Sun May 7 21:22:48 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-all@freebsd.org Sun May 7 21:32:56 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-all@freebsd.org Sun May 7 21:42:03 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-all@freebsd.org Sun May 7 21:57:48 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-all@freebsd.org Sun May 7 22:04:13 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DB44DD63CBD; Sun, 7 May 2017 22:04:13 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8D46B1A22; Sun, 7 May 2017 22:04:13 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v47M4Cuc070217; Sun, 7 May 2017 22:04:12 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v47M4C4V070215; Sun, 7 May 2017 22:04:12 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201705072204.v47M4C4V070215@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Sun, 7 May 2017 22:04:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317928 - head/sys/contrib/octeon-sdk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 May 2017 22:04:14 -0000 Author: jhibbits Date: Sun May 7 22:04:12 2017 New Revision: 317928 URL: https://svnweb.freebsd.org/changeset/base/317928 Log: Add necessary bits to get FreeBSD booting on the Unifi Security Gateway Summary: The Ubiquiti Unifi Security Gateway is virtually identical to the EdgeRouter Lite, with a smaller PCB and apparently a different board identifier. Simply adding the new board identifier alongside the ERL identifier, FreeBSD boots successfully, and can access the needed peripherals (tested with USB booting, and basic pings on one ethernet interface) Reviewed By: adrian MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D10639 Modified: head/sys/contrib/octeon-sdk/cvmx-app-init.h head/sys/contrib/octeon-sdk/cvmx-helper-board.c Modified: head/sys/contrib/octeon-sdk/cvmx-app-init.h ============================================================================== --- head/sys/contrib/octeon-sdk/cvmx-app-init.h Sun May 7 21:57:46 2017 (r317927) +++ head/sys/contrib/octeon-sdk/cvmx-app-init.h Sun May 7 22:04:12 2017 (r317928) @@ -311,6 +311,7 @@ enum cvmx_board_types_enum { #endif #if defined(OCTEON_VENDOR_UBIQUITI) CVMX_BOARD_TYPE_CUST_UBIQUITI_E100=20002, + CVMX_BOARD_TYPE_CUST_UBIQUITI_USG= 20004, #endif #if defined(OCTEON_VENDOR_RADISYS) CVMX_BOARD_TYPE_CUST_RADISYS_RSYS4GBE=20002, @@ -457,6 +458,7 @@ static inline const char *cvmx_board_typ #endif #if defined(OCTEON_VENDOR_UBIQUITI) ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_UBIQUITI_E100) + ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_UBIQUITI_USG) #endif #if defined(OCTEON_VENDOR_RADISYS) ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_RADISYS_RSYS4GBE) Modified: head/sys/contrib/octeon-sdk/cvmx-helper-board.c ============================================================================== --- head/sys/contrib/octeon-sdk/cvmx-helper-board.c Sun May 7 21:57:46 2017 (r317927) +++ head/sys/contrib/octeon-sdk/cvmx-helper-board.c Sun May 7 22:04:12 2017 (r317928) @@ -598,6 +598,7 @@ int cvmx_helper_board_get_mii_address(in #endif #if defined(OCTEON_VENDOR_UBIQUITI) case CVMX_BOARD_TYPE_CUST_UBIQUITI_E100: + case CVMX_BOARD_TYPE_CUST_UBIQUITI_USG: if (ipd_port > 2) return -1; return (7 - ipd_port); @@ -1499,7 +1500,8 @@ int __cvmx_helper_board_hardware_enable( } } #if defined(OCTEON_VENDOR_UBIQUITI) - else if (cvmx_sysinfo_get()->board_type == CVMX_BOARD_TYPE_CUST_UBIQUITI_E100) + else if (cvmx_sysinfo_get()->board_type == CVMX_BOARD_TYPE_CUST_UBIQUITI_E100 || + cvmx_sysinfo_get()->board_type == CVMX_BOARD_TYPE_CUST_UBIQUITI_USG) { /* Configure ASX cloks for all ports on interface 0. */ if (interface == 0) @@ -1590,6 +1592,7 @@ cvmx_helper_board_usb_clock_types_t __cv #endif #if defined(OCTEON_VENDOR_UBIQUITI) case CVMX_BOARD_TYPE_CUST_UBIQUITI_E100: + case CVMX_BOARD_TYPE_CUST_UBIQUITI_USG: #endif #if defined(OCTEON_BOARD_CAPK_0100ND) case CVMX_BOARD_TYPE_CN3010_EVB_HS5: From owner-svn-src-all@freebsd.org Sun May 7 22:10:56 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-all@freebsd.org Sun May 7 22:18:06 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-all@freebsd.org Mon May 8 00:45:07 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 36874D5F479; Mon, 8 May 2017 00:45:07 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E40AB19EC; Mon, 8 May 2017 00:45: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 v480j5rp035070; Mon, 8 May 2017 00:45:05 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v480j5f0035069; Mon, 8 May 2017 00:45:05 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201705080045.v480j5f0035069@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 00:45:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317931 - head/sbin/mount_nfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 00:45:07 -0000 Author: rmacklem Date: Mon May 8 00:45:05 2017 New Revision: 317931 URL: https://svnweb.freebsd.org/changeset/base/317931 Log: Fix mount_nfs so that it doesn't create mounttab entries for NFSv4 mounts. The NFSv4 protocol doesn't use the Mount protocol, so it doesn't make sense to add an entry for an NFSv4 mount to /var/db/mounttab. Also, r308871 modified umount so that it doesn't remove any entry created by mount_nfs. Reported on freebsd-current@. Reported by: clbuisson@orange.fr MFC after: 2 weeks Modified: head/sbin/mount_nfs/mount_nfs.c Modified: head/sbin/mount_nfs/mount_nfs.c ============================================================================== --- head/sbin/mount_nfs/mount_nfs.c Sun May 7 22:18:05 2017 (r317930) +++ head/sbin/mount_nfs/mount_nfs.c Mon May 8 00:45:05 2017 (r317931) @@ -636,7 +636,7 @@ getnfsargs(char *spec, struct iovec **io build_iovec(iov, iovlen, "hostname", nam, (size_t)-1); /* Add mounted file system to PATH_MOUNTTAB */ - if (!add_mtab(hostp, spec)) + if (mountmode != V4 && !add_mtab(hostp, spec)) warnx("can't update %s for %s:%s", PATH_MOUNTTAB, hostp, spec); return (1); } From owner-svn-src-all@freebsd.org Mon May 8 01:29:41 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-all@freebsd.org Mon May 8 08:16:06 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A3328D63DAB; Mon, 8 May 2017 08:16:06 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: from mail-wr0-x231.google.com (mail-wr0-x231.google.com [IPv6:2a00:1450:400c:c0c::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 13B2E15F5; Mon, 8 May 2017 08:16:06 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: by mail-wr0-x231.google.com with SMTP id z52so37020512wrc.2; Mon, 08 May 2017 01:16:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-disposition:in-reply-to:user-agent; bh=vgPMF7aUfWKsdXPj6XsXeaV1uO93OTuq5xodeiGq+aA=; b=FAuepmoV/QmHvLbGnwx8hgN2I1BWxKxqGoflM3yKYIArPf97QqTejhV746dTyXk5Qw N25QHsgehjMOYJun10r4bayXQ+b0Yf3mW7FMcT//3sH5ivsUB0Zs6qYjBJJJl5ZJIfsJ cLX6unQiVFxl1ficiPUbg2mlE4JZxqw4KbFvVRwL078Ur6oU+tW2+7UEoR6ox3pFrJa+ BTz47OXRd/mM9HgC/cqcyor2HWC4UsgkY6QCAPcSNnx4eJ6CPh3PisD7idFIC7gddhMI FTbV8ZC/NopFRchxlETsXtNWGQe7FrugDvMpY0qu8/mh1SqdpWYUJ68+8gCIRKyBldfq L5Zw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to:user-agent; bh=vgPMF7aUfWKsdXPj6XsXeaV1uO93OTuq5xodeiGq+aA=; b=B4/f36CnKUombq1CQdW/t6DQjK74sLW6Qi3H/I5zYaLJHlQLTni5mZn/ByLhCy/TYl QMon4ybeLv8OQvzgUjGdcfqUE2BSOh5rBu4BjbOOLvUhCJE1q3qRxS+E26GK3uHdLMo+ 32Brbk2SayVULgD/r9Ia7CSwUB6I38jUKZcx8ADBl65vGxmIcj8od8YtW9KLVrq1EGY0 7PzYCnEivXAl6enH2ue/WrnQsiPlaE5dyOOWhbKWZRhlc1A7qVjj+zkhnre6gNP+F7hJ SU50PVXC+KBj9hJuEOcFJw1BZvvCuyHVb3cDolU+xWC2Gmn7/LfLP5tFmIbp1yI1JddX VuZg== X-Gm-Message-State: AN3rC/5w8R1smPQfLSRQubrCEH9lE7DmtCYK7gq0mCMnbuYy+Y1IZEzQ vJieGAhFyR86WX5S X-Received: by 10.223.135.213 with SMTP id c21mr45742461wrc.10.1494231363799; Mon, 08 May 2017 01:16:03 -0700 (PDT) Received: from brick (cpc92310-cmbg19-2-0-cust934.5-4.cable.virginm.net. [82.9.227.167]) by smtp.gmail.com with ESMTPSA id o97sm14437145wrc.48.2017.05.08.01.16.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 08 May 2017 01:16:03 -0700 (PDT) Sender: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Date: Mon, 8 May 2017 09:16:01 +0100 From: Edward Tomasz Napierala To: Conrad Meyer Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r317901 - head/usr.bin/resizewin Message-ID: <20170508081601.GA1437@brick> Mail-Followup-To: Conrad Meyer , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201705070919.v479Jg5v050357@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.8.2 (2017-04-18) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 08:16:06 -0000 On 0507T0919, Conrad Meyer wrote: > On Sun, May 7, 2017 at 2:19 AM, Edward Tomasz Napierala > wrote: > > Author: trasz > > Date: Sun May 7 09:19:42 2017 > > New Revision: 317901 > > URL: https://svnweb.freebsd.org/changeset/base/317901 > > > > Log: > > Improve error reporting in resizewin(1). > > > > Reviewed by: cem (earlier version) > > Also reviewed by: Daniel O'Connor (the original author) :-). Right, sorry; I somehow hadn't noticed one of the the 'accepted' checkboxes. From owner-svn-src-all@freebsd.org Mon May 8 08:34:51 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B5BC1D621DE; Mon, 8 May 2017 08:34:51 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7C6DB3F1; Mon, 8 May 2017 08:34:51 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v488YoqI026409; Mon, 8 May 2017 08:34:50 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v488YonF026408; Mon, 8 May 2017 08:34:50 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201705080834.v488YonF026408@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 8 May 2017 08:34:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317933 - head/usr.bin/resizewin X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 08:34:52 -0000 Author: trasz Date: Mon May 8 08:34:50 2017 New Revision: 317933 URL: https://svnweb.freebsd.org/changeset/base/317933 Log: Use tcflush(3) instead of (nonstandard) TIOCFLUSH. Reported by: kib MFC after: 2 weeks Sponsored by: DARPA, AFRL Modified: head/usr.bin/resizewin/resizewin.c Modified: head/usr.bin/resizewin/resizewin.c ============================================================================== --- head/usr.bin/resizewin/resizewin.c Mon May 8 01:29:40 2017 (r317932) +++ head/usr.bin/resizewin/resizewin.c Mon May 8 08:34:50 2017 (r317933) @@ -52,7 +52,7 @@ main(__unused int argc, __unused char ** { struct termios old, new; struct winsize w; - int ret, fd, cnt, error, what; + int ret, fd, cnt, error; char data[20]; struct timeval then, now; @@ -72,10 +72,9 @@ main(__unused int argc, __unused char ** exit(1); /* Discard input received so far */ - what = FREAD | FWRITE; - error = ioctl(fd, TIOCFLUSH, &what); + error = tcflush(fd, TCIOFLUSH); if (error != 0) - warn("ioctl"); + warn("tcflush"); if (write(fd, query, sizeof(query)) != sizeof(query)) { error = 1; From owner-svn-src-all@freebsd.org Mon May 8 08:36:57 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C93A4D6231E; Mon, 8 May 2017 08:36:57 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: from mail-wm0-x22d.google.com (mail-wm0-x22d.google.com [IPv6:2a00:1450:400c:c09::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4329A12C2; Mon, 8 May 2017 08:36:57 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: by mail-wm0-x22d.google.com with SMTP id u65so75964637wmu.1; Mon, 08 May 2017 01:36:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-disposition:in-reply-to:user-agent; bh=6SWSqDUSfZj0yHEZuC17pzVo4sMggYyh2GQUu+Ae8sc=; b=Z9udk75vcqAA/VuEZCMmnwQjfl6Ke7qXAwNkHwqP8N+xrYKvqnbVMzRA16o5taq3sQ mBtjxozB+cWFJraMoLkoT/JolUZofGXO/fhzhmyTIjfQjTFNJ5BS7HE/+GFaH8JfbBhw qf9tyozgPcca28wYpsMKD2s9oC/w8XIfOy/eBfzpiNtCnDPpOkc5igPXfSSMX57xVCi6 wcWq+HGrQe7MALTu9oOC+Q3SWkhVgQHYeNV33x35/MaXX/hAGDY0G8+10BYScATxSd8V 09o6YNnIAuUV07WnPrNpetXqWanldDC8HqhYWWHG5X8yeTFy0pgo4OsPL7zGvBeRM1Ni AvZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to:user-agent; bh=6SWSqDUSfZj0yHEZuC17pzVo4sMggYyh2GQUu+Ae8sc=; b=Nj1d2VAznBVvS4u6dQDeeJ6LL1Ks9WNrZwSytypz4S8hRRyxnRIuQGY+C2OjwTNlDe z9xyZ/w4GQDL9vQYT393OshDSsWaWHDQn7UX4m8YtLoUdyXu3ST5WTc/XmKELhwWBDYn CTZhsna/T8lzyWLMcWgG6Pt++CQyZ2w07uDmEsIX8VfC5+p+fgCll4v0GGCBXhdO6Lfb Ss4viX3drp2nJ1NndCwOw2aYYsvL5tp40R6hJcLTAm4j8EWicGhrq1btUq7ojr2DvvMK oyAfhCAdEs/w1NYvt2S8w5CEQ6vOnKiCQOHkwj9L5gIx1yfIgf3wsNvgTARJLzswN7eD T3yA== X-Gm-Message-State: AODbwcCGr/HZb5Ec1IMWR1HXZGSANIcjHZHdo2rQ2fZoUDqzMU3F/ULX yJ438qqV8iRWjiHh X-Received: by 10.28.46.143 with SMTP id u137mr11316832wmu.56.1494232615575; Mon, 08 May 2017 01:36:55 -0700 (PDT) Received: from brick (cpc92310-cmbg19-2-0-cust934.5-4.cable.virginm.net. [82.9.227.167]) by smtp.gmail.com with ESMTPSA id 133sm12213296wms.22.2017.05.08.01.36.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 08 May 2017 01:36:55 -0700 (PDT) Sender: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Date: Mon, 8 May 2017 09:36:52 +0100 From: Edward Tomasz Napierala To: Jilles Tjoelker Cc: Konstantin Belousov , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r317909 - head/usr.bin/resizewin Message-ID: <20170508083652.GB1437@brick> Mail-Followup-To: Jilles Tjoelker , Konstantin Belousov , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201705071721.v47HLNWB049018@repo.freebsd.org> <20170507180143.GA1622@kib.kiev.ua> <20170507182802.GA5248@stack.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170507182802.GA5248@stack.nl> User-Agent: Mutt/1.8.2 (2017-04-18) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 08:36:57 -0000 On 0507T2028, Jilles Tjoelker wrote: > On Sun, May 07, 2017 at 09:01:43PM +0300, Konstantin Belousov wrote: > > On Sun, May 07, 2017 at 05:21:23PM +0000, Edward Tomasz Napierala wrote: > > > Author: trasz > > > Date: Sun May 7 17:21:22 2017 > > > New Revision: 317909 > > > URL: https://svnweb.freebsd.org/changeset/base/317909 > > > > Log: > > > Make resizewin(1) discard the terminal queues, to lower the chance > > > for "unable to parse response" error which happens when youre typing > > > too fast for the machine you're running it on. > > > > Reviewed by: cem, Daniel O'Connor > > > MFC after: 2 weeks > > > Sponsored by: DARPA, AFRL > > > Differential Revision: https://reviews.freebsd.org/D10624 > > > > Modified: > > > head/usr.bin/resizewin/resizewin.c > > > > > > Modified: head/usr.bin/resizewin/resizewin.c > > > ============================================================================== > > > --- head/usr.bin/resizewin/resizewin.c Sun May 7 14:59:45 2017 (r317908) > > > +++ head/usr.bin/resizewin/resizewin.c Sun May 7 17:21:22 2017 (r317909) > > > @@ -52,7 +52,7 @@ main(__unused int argc, __unused char ** > > > { > > > struct termios old, new; > > > struct winsize w; > > > - int ret, fd, cnt, error; > > > + int ret, fd, cnt, error, what; > > > char data[20]; > > > struct timeval then, now; > > > > > > @@ -71,6 +71,12 @@ main(__unused int argc, __unused char ** > > > if (tcsetattr(fd, TCSANOW, &new) == -1) > > > exit(1); > > > > > > + /* Discard input received so far */ > > > + what = FREAD | FWRITE; > > > + error = ioctl(fd, TIOCFLUSH, &what); > > This is correctly spelled tcflush(fd, TCIOFLUSH); > > Alternatively, the above TCSANOW could be changed to TCSAFLUSH. The > effect is slightly different in that pending output is drained instead > of discarded. > > In any case, the TIOCFLUSH ioctl is non-standard and should not be used > directly. I've changed it to use tcflush(3), as suggested by kib@, as it keeps the current (tested) behaviour. I'll try to investigate TCSANOW as well, thanks! From owner-svn-src-all@freebsd.org Mon May 8 08:58:53 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5529BD62DC1; Mon, 8 May 2017 08:58:53 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1639A14E2; Mon, 8 May 2017 08:58:52 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v488wq6F035059; Mon, 8 May 2017 08:58:52 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v488wpCF035057; Mon, 8 May 2017 08:58:51 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201705080858.v488wpCF035057@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 8 May 2017 08:58:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317934 - head/usr.bin/resizewin X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 08:58:53 -0000 Author: trasz Date: Mon May 8 08:58:51 2017 New Revision: 317934 URL: https://svnweb.freebsd.org/changeset/base/317934 Log: Add resizewin -z. It makes resizewin not do anything if the terminal size is already set to something other than zero. It's supposed to be called from eg /etc/profile - it's not neccessary to query terminal size when logging in over the network, because the protocol used already takes care of this, but it's neccessary when logging over a serial line. Reviewed by: cem, Daniel O'Connor MFC after: 2 weeks Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D10637 Modified: head/usr.bin/resizewin/resizewin.1 head/usr.bin/resizewin/resizewin.c Modified: head/usr.bin/resizewin/resizewin.1 ============================================================================== --- head/usr.bin/resizewin/resizewin.1 Mon May 8 08:34:50 2017 (r317933) +++ head/usr.bin/resizewin/resizewin.1 Mon May 8 08:58:51 2017 (r317934) @@ -27,17 +27,27 @@ .\" .\" $FreeBSD$ .\" -.Dd July 9, 2016 +.Dd May 8, 2017 .Dt RESIZEWIN 1 .Os .Sh NAME .Nm resizewin .Nd update the kernel window size for the current TTY +.Sh SYNOPSIS +.Nm +.Op Fl z .Sh DESCRIPTION Query the terminal emulator window size with the .Dv TIOCSWINSZ ioctl and set the window size known by the kernel to the new values. The terminal is assumed to be VT100/ANSI compatible. +.Pp +The following options are available: +.Bl -tag -width ".Fl z" +.It Fl z +Do nothing unless the current kernel terminal size is zero. +.El +.Pp .Nm is functionally similar to .Xr resize 1 , Modified: head/usr.bin/resizewin/resizewin.c ============================================================================== --- head/usr.bin/resizewin/resizewin.c Mon May 8 08:34:50 2017 (r317933) +++ head/usr.bin/resizewin/resizewin.c Mon May 8 08:58:51 2017 (r317934) @@ -47,20 +47,50 @@ static const char query[] = "\033[999;999H" /* Move cursor */ "\033[6n" /* Get cursor position */ "\0338"; /* Restore cursor position */ + +static void +usage(void) +{ + + fprintf(stderr, "usage: resizewin [-z]\n"); + exit(1); +} + int -main(__unused int argc, __unused char **argv) +main(int argc, char **argv) { struct termios old, new; struct winsize w; - int ret, fd, cnt, error; + int ret, fd, ch, cnt, error, zflag; char data[20]; struct timeval then, now; error = 0; + zflag = 0; + while ((ch = getopt(argc, argv, "z")) != -1) { + switch (ch) { + case 'z': + zflag = 1; + break; + case '?': + default: + usage(); + } + } + argc -= optind; + if (argc != 0) + usage(); if ((fd = open("/dev/tty", O_RDWR | O_NONBLOCK)) == -1) exit(1); + if (zflag) { + if (ioctl(fd, TIOCGWINSZ, &w) == -1) + exit(1); + if (w.ws_row != 0 && w.ws_col != 0) + exit(0); + } + /* Disable echo */ if (tcgetattr(fd, &old) == -1) exit(1); From owner-svn-src-all@freebsd.org Mon May 8 09:14:43 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 25F63D6339B; Mon, 8 May 2017 09:14:43 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AFE901C31; Mon, 8 May 2017 09:14:42 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v489Efo3043125; Mon, 8 May 2017 09:14:41 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v489Ef4o043124; Mon, 8 May 2017 09:14:41 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201705080914.v489Ef4o043124@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 8 May 2017 09:14:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317935 - head/usr.bin/resizewin X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 09:14:43 -0000 Author: trasz Date: Mon May 8 09:14:41 2017 New Revision: 317935 URL: https://svnweb.freebsd.org/changeset/base/317935 Log: Sort variable declarations; no functional changes. MFC after: 2 weeks Sponsored by: DARPA, AFRL Modified: head/usr.bin/resizewin/resizewin.c Modified: head/usr.bin/resizewin/resizewin.c ============================================================================== --- head/usr.bin/resizewin/resizewin.c Mon May 8 08:58:51 2017 (r317934) +++ head/usr.bin/resizewin/resizewin.c Mon May 8 09:14:41 2017 (r317935) @@ -61,9 +61,9 @@ main(int argc, char **argv) { struct termios old, new; struct winsize w; - int ret, fd, ch, cnt, error, zflag; - char data[20]; struct timeval then, now; + char data[20]; + int ch, cnt, error, fd, ret, zflag; error = 0; zflag = 0; From owner-svn-src-all@freebsd.org Mon May 8 10:51:32 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-all@freebsd.org Mon May 8 13:09:29 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8AFF6D620C8; Mon, 8 May 2017 13:09:29 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 25CCB105D; Mon, 8 May 2017 13:09:29 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v48D9SC7040553; Mon, 8 May 2017 13:09:28 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v48D9SOE040551; Mon, 8 May 2017 13:09:28 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201705081309.v48D9SOE040551@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 13:09:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317937 - in head/usr.sbin/makefs: . cd9660 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 13:09:29 -0000 Author: emaste Date: Mon May 8 13:09:27 2017 New Revision: 317937 URL: https://svnweb.freebsd.org/changeset/base/317937 Log: makefs: use size_t as appropriate to clean up warnings Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/makefs/cd9660/cd9660_eltorito.c head/usr.sbin/makefs/ffs.c Modified: head/usr.sbin/makefs/cd9660/cd9660_eltorito.c ============================================================================== --- head/usr.sbin/makefs/cd9660/cd9660_eltorito.c Mon May 8 10:51:30 2017 (r317936) +++ head/usr.sbin/makefs/cd9660/cd9660_eltorito.c Mon May 8 13:09:27 2017 (r317937) @@ -224,7 +224,7 @@ cd9660_boot_setup_validation_entry(char boot_catalog_validation_entry *ve; int16_t checksum; unsigned char *csptr; - int i; + size_t i; entry = cd9660_init_boot_catalog_entry(); ve = &entry->entry_data.VE; Modified: head/usr.sbin/makefs/ffs.c ============================================================================== --- head/usr.sbin/makefs/ffs.c Mon May 8 10:51:30 2017 (r317936) +++ head/usr.sbin/makefs/ffs.c Mon May 8 13:09:27 2017 (r317937) @@ -621,7 +621,7 @@ ffs_size_dir(fsnode *root, fsinfo_t *fso if (node->type == S_IFREG) ADDSIZE(node->inode->st.st_size); if (node->type == S_IFLNK) { - int slen; + size_t slen; slen = strlen(node->symlink) + 1; if (slen >= (ffs_opts->version == 1 ? @@ -644,7 +644,7 @@ static void * ffs_build_dinode1(struct ufs1_dinode *dinp, dirbuf_t *dbufp, fsnode *cur, fsnode *root, fsinfo_t *fsopts) { - int slen; + size_t slen; void *membuf; struct stat *st = stampst.st_ino != 0 ? &stampst : &cur->inode->st; @@ -692,7 +692,7 @@ static void * ffs_build_dinode2(struct ufs2_dinode *dinp, dirbuf_t *dbufp, fsnode *cur, fsnode *root, fsinfo_t *fsopts) { - int slen; + size_t slen; void *membuf; struct stat *st = stampst.st_ino != 0 ? &stampst : &cur->inode->st; From owner-svn-src-all@freebsd.org Mon May 8 14:17:11 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E6854D63362; Mon, 8 May 2017 14:17:11 +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 A4E481E14; Mon, 8 May 2017 14:17:11 +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 v48EHAZx068861; Mon, 8 May 2017 14:17:10 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v48EHAnq068860; Mon, 8 May 2017 14:17:10 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201705081417.v48EHAnq068860@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 14:17:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317938 - head/share/man/man7 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 14:17:12 -0000 Author: emaste Date: Mon May 8 14:17:10 2017 New Revision: 317938 URL: https://svnweb.freebsd.org/changeset/base/317938 Log: arch(7): correct initial versions for alpha and pc98 Submitted by: imp Modified: head/share/man/man7/arch.7 Modified: head/share/man/man7/arch.7 ============================================================================== --- head/share/man/man7/arch.7 Mon May 8 13:09:27 2017 (r317937) +++ head/share/man/man7/arch.7 Mon May 8 14:17:10 2017 (r317938) @@ -90,7 +90,7 @@ architectures, the final release. .Pp .Bl -column -offset indent "Sy Architecture" "Sy Initial Release" "Sy Final Release" .It Sy Architecture Ta Sy Initial Release Ta Sy Final Release -.It alpha Ta 1.0 Ta 6.4 +.It alpha Ta 3.x Ta 6.4 .It amd64 Ta 5.1 .It arm Ta 6.0 .It armeb Ta 8.0 @@ -107,7 +107,7 @@ architectures, the final release. .It mips64el Ta 9.0 .It mips64elhf Ta 12.0 .It mips64hf Ta 12.0 -.It pc98 Ta 5.0 Ta 11.x +.It pc98 Ta 2.2 Ta 11.x .It powerpc Ta 6.0 .It powerpcspe Ta 12.0 .It powerpc64 Ta 6.0 From owner-svn-src-all@freebsd.org Mon May 8 14:33:40 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 171ACD637D0; Mon, 8 May 2017 14:33:40 +0000 (UTC) (envelope-from dbaio@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 6A9EEBD7; Mon, 8 May 2017 14:33:39 +0000 (UTC) (envelope-from dbaio@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v48EXcn4076648; Mon, 8 May 2017 14:33:38 GMT (envelope-from dbaio@FreeBSD.org) Received: (from dbaio@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v48EXcQ0076646; Mon, 8 May 2017 14:33:38 GMT (envelope-from dbaio@FreeBSD.org) Message-Id: <201705081433.v48EXcQ0076646@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dbaio set sender to dbaio@FreeBSD.org using -f From: "Danilo G. Baio" Date: Mon, 8 May 2017 14:33:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317939 - in head: share/misc usr.bin/calendar/calendars X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 14:33:40 -0000 Author: dbaio (ports committer) Date: Mon May 8 14:33:38 2017 New Revision: 317939 URL: https://svnweb.freebsd.org/changeset/base/317939 Log: Add myself (dbaio) as a new ports committer Approved by: garga (mentor) Differential Revision: https://reviews.freebsd.org/D10633 Modified: head/share/misc/committers-ports.dot head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/share/misc/committers-ports.dot ============================================================================== --- head/share/misc/committers-ports.dot Mon May 8 14:17:10 2017 (r317938) +++ head/share/misc/committers-ports.dot Mon May 8 14:33:38 2017 (r317939) @@ -84,6 +84,7 @@ daichi [label="Daichi Goto\ndaichi@FreeB danfe [label="Alexey Dokuchaev\ndanfe@FreeBSD.org\n2004/08/20"] danilo [label="Danilo E. Gondolfo\ndanilo@FreeBSD.org\n2013/09/23"] db [label="Diane Bruce\ndb@FreeBSD.org\n2007/01/18"] +dbaio [label="Danilo G. Baio\ndbaio@FreeBSD.org\n2017/05/03"] dbn [label="David Naylor\ndbn@FreeBSD.org\n2013/01/14"] decke [label="Bernhard Froehlich\ndecke@FreeBSD.org\n2010/03/21"] delphij [label="Xin Li\ndelphij@FreeBSD.org\n2006/05/01"] @@ -402,6 +403,7 @@ gabor -> scheidell garga -> acm garga -> alepulver +garga -> dbaio garga -> mandree garga -> mm garga -> rnoland Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Mon May 8 14:17:10 2017 (r317938) +++ head/usr.bin/calendar/calendars/calendar.freebsd Mon May 8 14:33:38 2017 (r317939) @@ -145,6 +145,7 @@ 04/29 Adam Weinberger born in Berkeley, California, United States, 1980 04/29 Eric Anholt born in Portland, Oregon, United States, 1983 05/01 Randall Stewart born in Spokane, Washington, United States, 1959 +05/02 Danilo G. Baio born in Maringa, Parana, Brazil, 1986 05/02 Wojciech A. Koszek born in Czestochowa, Poland, 1987 05/03 Brian Dean born in Elkins, West Virginia, United States, 1966 05/03 Patrick Kelsey born in Freehold, New Jersey, United States, 1976 From owner-svn-src-all@freebsd.org Mon May 8 14:48:39 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-all@freebsd.org Mon May 8 14:48:40 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-all@freebsd.org Mon May 8 15:51:30 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CBA47D62FE9; Mon, 8 May 2017 15:51:30 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A72EB81A; Mon, 8 May 2017 15:51:30 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v48FpTl2006853; Mon, 8 May 2017 15:51:29 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v48FpT5G006849; Mon, 8 May 2017 15:51:29 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201705081551.v48FpT5G006849@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Mon, 8 May 2017 15:51:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317942 - in head/usr.bin/csplit: . tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 15:51:31 -0000 Author: cem Date: Mon May 8 15:51:29 2017 New Revision: 317942 URL: https://svnweb.freebsd.org/changeset/base/317942 Log: csplit(1): Fix extraneous output in edge case When the input to csplit contains fewer lines than the number of matches specified, extra output was mistakenly included in some output files. Fix the bug and add a simple ATF regression test. PR: 219024 Submitted by: J.R. Oldroyd Added: head/usr.bin/csplit/tests/ head/usr.bin/csplit/tests/Makefile (contents, props changed) head/usr.bin/csplit/tests/csplit_test.sh (contents, props changed) Modified: head/usr.bin/csplit/Makefile head/usr.bin/csplit/csplit.c Modified: head/usr.bin/csplit/Makefile ============================================================================== --- head/usr.bin/csplit/Makefile Mon May 8 14:48:39 2017 (r317941) +++ head/usr.bin/csplit/Makefile Mon May 8 15:51:29 2017 (r317942) @@ -1,5 +1,11 @@ # $FreeBSD$ +.include + PROG= csplit +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include Modified: head/usr.bin/csplit/csplit.c ============================================================================== --- head/usr.bin/csplit/csplit.c Mon May 8 14:48:39 2017 (r317941) +++ head/usr.bin/csplit/csplit.c Mon May 8 15:51:29 2017 (r317942) @@ -399,8 +399,10 @@ do_rexp(const char *expr) first = 0; } - if (p == NULL) + if (p == NULL) { + toomuch(NULL, 0); errx(1, "%s: no match", re); + } if (ofs <= 0) { /* Added: head/usr.bin/csplit/tests/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/csplit/tests/Makefile Mon May 8 15:51:29 2017 (r317942) @@ -0,0 +1,7 @@ +# $FreeBSD$ + +PACKAGE= tests + +ATF_TESTS_SH= csplit_test + +.include Added: head/usr.bin/csplit/tests/csplit_test.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/csplit/tests/csplit_test.sh Mon May 8 15:51:29 2017 (r317942) @@ -0,0 +1,60 @@ +# Copyright (c) 2017 Conrad Meyer +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ + +atf_test_case lines_lt_count +lines_lt_count_head() +{ + atf_set "descr" \ + "Test an edge case where input has fewer lines than count" +} +lines_lt_count_body() +{ + cat > expectfile00 << HERE +one +two +HERE + cat > expectfile01 << HERE +xxx 1 +three +four +HERE + cat > expectfile02 << HERE +xxx 2 +five +six +HERE + echo -e "one\ntwo\nxxx 1\nthree\nfour\nxxx 2\nfive\nsix" | \ + csplit -k - '/xxx/' '{10}' + + atf_check cmp expectfile00 xx00 + atf_check cmp expectfile01 xx01 + atf_check cmp expectfile02 xx02 +} + +atf_init_test_cases() +{ + atf_add_test_case lines_lt_count +} From owner-svn-src-all@freebsd.org Mon May 8 16:06:22 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-all@freebsd.org Mon May 8 16:34:41 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BD2A9D635B6; Mon, 8 May 2017 16:34: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 351731962; Mon, 8 May 2017 16:34: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 v48GYem0026239; Mon, 8 May 2017 16:34:40 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v48GYdVg026237; Mon, 8 May 2017 16:34:39 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201705081634.v48GYdVg026237@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 16:34:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317944 - head/usr.sbin/makefs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 16:34:42 -0000 Author: emaste Date: Mon May 8 16:34:39 2017 New Revision: 317944 URL: https://svnweb.freebsd.org/changeset/base/317944 Log: makefs: cast snprintf return value to size_t to clear warning Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/makefs/ffs.c head/usr.sbin/makefs/walk.c Modified: head/usr.sbin/makefs/ffs.c ============================================================================== --- head/usr.sbin/makefs/ffs.c Mon May 8 16:06:20 2017 (r317943) +++ head/usr.sbin/makefs/ffs.c Mon May 8 16:34:39 2017 (r317944) @@ -846,8 +846,8 @@ ffs_populate_dir(const char *dir, fsnode for (cur = root; cur != NULL; cur = cur->next) { if (cur->child == NULL) continue; - if (snprintf(path, sizeof(path), "%s/%s", dir, cur->name) - >= sizeof(path)) + if ((size_t)snprintf(path, sizeof(path), "%s/%s", dir, + cur->name) >= sizeof(path)) errx(1, "Pathname too long."); if (! ffs_populate_dir(path, cur->child, fsopts)) return (0); Modified: head/usr.sbin/makefs/walk.c ============================================================================== --- head/usr.sbin/makefs/walk.c Mon May 8 16:06:20 2017 (r317943) +++ head/usr.sbin/makefs/walk.c Mon May 8 16:34:39 2017 (r317944) @@ -84,7 +84,7 @@ walk_dir(const char *root, const char *d assert(root != NULL); assert(dir != NULL); - len = snprintf(path, sizeof(path), "%s/%s", root, dir); + len = (size_t)snprintf(path, sizeof(path), "%s/%s", root, dir); if (len >= (int)sizeof(path)) errx(1, "Pathname too long."); if (debug & DEBUG_WALK_DIR) From owner-svn-src-all@freebsd.org Mon May 8 16:57:35 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 16923D63BCD; Mon, 8 May 2017 16:57:35 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BC1A7254; Mon, 8 May 2017 16:57:34 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v48GvXji034532; Mon, 8 May 2017 16:57:33 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v48GvXdI034531; Mon, 8 May 2017 16:57:33 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201705081657.v48GvXdI034531@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 16:57:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317945 - head/usr.sbin/makefs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 16:57:35 -0000 Author: emaste Date: Mon May 8 16:57:33 2017 New Revision: 317945 URL: https://svnweb.freebsd.org/changeset/base/317945 Log: makefs: further size_t warning cleanup (missing from r317944) Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/makefs/walk.c Modified: head/usr.sbin/makefs/walk.c ============================================================================== --- head/usr.sbin/makefs/walk.c Mon May 8 16:34:39 2017 (r317944) +++ head/usr.sbin/makefs/walk.c Mon May 8 16:57:33 2017 (r317945) @@ -79,13 +79,14 @@ walk_dir(const char *root, const char *d char path[MAXPATHLEN + 1]; struct stat stbuf; char *name, *rp; - int dot, len; + size_t len; + int dot; assert(root != NULL); assert(dir != NULL); - len = (size_t)snprintf(path, sizeof(path), "%s/%s", root, dir); - if (len >= (int)sizeof(path)) + len = snprintf(path, sizeof(path), "%s/%s", root, dir); + if (len >= sizeof(path)) errx(1, "Pathname too long."); if (debug & DEBUG_WALK_DIR) printf("walk_dir: %s %p\n", path, parent); @@ -119,8 +120,8 @@ walk_dir(const char *root, const char *d } if (debug & DEBUG_WALK_DIR_NODE) printf("scanning %s/%s/%s\n", root, dir, name); - if (snprintf(path + len, sizeof(path) - len, "/%s", name) >= - (int)sizeof(path) - len) + if ((size_t)snprintf(path + len, sizeof(path) - len, "/%s", + name) >= sizeof(path) - len) errx(1, "Pathname too long."); if (lstat(path, &stbuf) == -1) err(1, "Can't lstat `%s'", path); @@ -396,8 +397,8 @@ apply_specdir(const char *dir, NODE *spe if (strcmp(curnode->name, curfsnode->name) == 0) break; } - if (snprintf(path, sizeof(path), "%s/%s", - dir, curnode->name) >= sizeof(path)) + if ((size_t)snprintf(path, sizeof(path), "%s/%s", dir, + curnode->name) >= sizeof(path)) errx(1, "Pathname too long."); if (curfsnode == NULL) { /* need new entry */ struct stat stbuf; From owner-svn-src-all@freebsd.org Mon May 8 17:02:03 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-all@freebsd.org Mon May 8 17:02:05 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-all@freebsd.org Mon May 8 17:13:02 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2DF74D634C7; Mon, 8 May 2017 17:13:02 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C3E32813; Mon, 8 May 2017 17:13:01 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v48HD0VH042536; Mon, 8 May 2017 17:13:00 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v48HD09K042535; Mon, 8 May 2017 17:13:00 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705081713.v48HD09K042535@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 8 May 2017 17:13:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317949 - head/etc/mtree X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 17:13:02 -0000 Author: ngie Date: Mon May 8 17:13:00 2017 New Revision: 317949 URL: https://svnweb.freebsd.org/changeset/base/317949 Log: Fix the build after r317942 by adding usr.bin/csplit to BSD.tests.dist Pointyhat to: cem MFC with: r317942 Sponsored by: Dell EMC Isilon Modified: head/etc/mtree/BSD.tests.dist Modified: head/etc/mtree/BSD.tests.dist ============================================================================== --- head/etc/mtree/BSD.tests.dist Mon May 8 17:12:57 2017 (r317948) +++ head/etc/mtree/BSD.tests.dist Mon May 8 17:13:00 2017 (r317949) @@ -612,6 +612,8 @@ .. comm .. + csplit + .. cut .. diff From owner-svn-src-all@freebsd.org Mon May 8 17:13:02 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C245DD634CA; Mon, 8 May 2017 17:13:02 +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 E5CC9814; Mon, 8 May 2017 17:13:01 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v48HD11M042548; Mon, 8 May 2017 17:13:01 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v48HCwdf042467; Mon, 8 May 2017 17:12:58 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201705081712.v48HCwdf042467@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 17:12:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r317948 - in vendor/llvm/dist: docs examples/Kaleidoscope/BuildingAJIT/Chapter1 examples/Kaleidoscope/BuildingAJIT/Chapter2 examples/Kaleidoscope/BuildingAJIT/Chapter3 examples/Kaleidos... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 17:13:02 -0000 Author: dim Date: Mon May 8 17:12:57 2017 New Revision: 317948 URL: https://svnweb.freebsd.org/changeset/base/317948 Log: Vendor import of llvm trunk r302418: https://llvm.org/svn/llvm-project/llvm/trunk@302418 Added: vendor/llvm/dist/include/llvm/CodeGen/MIRPrinter.h (contents, props changed) vendor/llvm/dist/include/llvm/DebugInfo/PDB/Native/DbiModuleList.h (contents, props changed) vendor/llvm/dist/lib/DebugInfo/PDB/Native/DbiModuleList.cpp (contents, props changed) vendor/llvm/dist/lib/Target/Hexagon/HexagonDepIICHVX.td vendor/llvm/dist/lib/Target/Hexagon/HexagonDepIICScalar.td vendor/llvm/dist/lib/Target/Hexagon/HexagonDepTimingClasses.h (contents, props changed) vendor/llvm/dist/test/Analysis/ScalarEvolution/ZeroStep.ll vendor/llvm/dist/test/CodeGen/AArch64/fadd-combines.ll vendor/llvm/dist/test/CodeGen/AMDGPU/scratch-simple.ll vendor/llvm/dist/test/CodeGen/AMDGPU/waitcnt-looptest.ll vendor/llvm/dist/test/CodeGen/ARM/acle-intrinsics-v5.ll vendor/llvm/dist/test/CodeGen/ARM/acle-intrinsics.ll vendor/llvm/dist/test/CodeGen/ARM/alloca-align.ll vendor/llvm/dist/test/CodeGen/Hexagon/branch-folder-hoist-kills.mir vendor/llvm/dist/test/CodeGen/Hexagon/rdf-cover-use.ll vendor/llvm/dist/test/CodeGen/MIR/X86/auto-successor.mir vendor/llvm/dist/test/CodeGen/MIR/X86/branch-probabilities.mir vendor/llvm/dist/test/CodeGen/PowerPC/restore-r30.ll vendor/llvm/dist/test/CodeGen/SystemZ/copy-physreg-128.ll vendor/llvm/dist/test/CodeGen/X86/GlobalISel/gep.ll vendor/llvm/dist/test/CodeGen/X86/GlobalISel/legalize-gep.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/legalize-mul-scalar.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/legalize-mul-v128.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/legalize-mul-v256.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/legalize-mul-v512.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/mul-scalar.ll vendor/llvm/dist/test/CodeGen/X86/GlobalISel/mul-vec.ll vendor/llvm/dist/test/CodeGen/X86/GlobalISel/regbankselect-AVX2.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/regbankselect-AVX512.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-gep.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-mul-scalar.mir vendor/llvm/dist/test/CodeGen/X86/GlobalISel/select-mul-vec.mir vendor/llvm/dist/test/CodeGen/X86/avx2-schedule.ll vendor/llvm/dist/test/CodeGen/X86/build-vector-128.ll vendor/llvm/dist/test/CodeGen/X86/build-vector-256.ll vendor/llvm/dist/test/CodeGen/X86/build-vector-512.ll vendor/llvm/dist/test/CodeGen/X86/ms-inline-asm-avx512.ll vendor/llvm/dist/test/CodeGen/X86/pr32907.ll vendor/llvm/dist/test/CodeGen/X86/regcall-no-plt.ll vendor/llvm/dist/test/CodeGen/X86/xray-custom-log.ll vendor/llvm/dist/test/CodeGen/X86/xray-loop-detection.ll vendor/llvm/dist/test/DebugInfo/COFF/synthetic.ll vendor/llvm/dist/test/DebugInfo/Inputs/dwarfdump-decompression-error.elf-x86-64 (contents, props changed) vendor/llvm/dist/test/DebugInfo/dwarfdump-decompression-error.test vendor/llvm/dist/test/Linker/metadata-global.ll vendor/llvm/dist/test/MC/AArch64/crc.s (contents, props changed) vendor/llvm/dist/test/MC/ARM/ltorg-range.s (contents, props changed) vendor/llvm/dist/test/MC/AsmParser/altmacro_string.s (contents, props changed) vendor/llvm/dist/test/MC/AsmParser/negative_altmacro_string.s (contents, props changed) vendor/llvm/dist/test/ObjectYAML/wasm/name_section.yaml vendor/llvm/dist/test/Transforms/ArgumentPromotion/pr32917.ll vendor/llvm/dist/test/Transforms/LoopIdiom/unsafe.ll vendor/llvm/dist/test/tools/llvm-objdump/WebAssembly/ vendor/llvm/dist/test/tools/llvm-objdump/WebAssembly/symbol-table.test vendor/llvm/dist/test/tools/llvm-readobj/Inputs/resources/ vendor/llvm/dist/test/tools/llvm-readobj/Inputs/resources/cursor_small.bmp (contents, props changed) vendor/llvm/dist/test/tools/llvm-readobj/Inputs/resources/okay_small.bmp (contents, props changed) vendor/llvm/dist/test/tools/llvm-readobj/Inputs/resources/test_resource.obj.coff (contents, props changed) vendor/llvm/dist/test/tools/llvm-readobj/Inputs/resources/test_resource.rc vendor/llvm/dist/test/tools/llvm-readobj/Inputs/resources/test_resource.res (contents, props changed) Deleted: vendor/llvm/dist/lib/CodeGen/MIRPrinter.h vendor/llvm/dist/lib/Target/AArch64/AArch64AddressTypePromotion.cpp vendor/llvm/dist/test/CodeGen/AMDGPU/local-stack-slot-bug.ll vendor/llvm/dist/test/CodeGen/ARM/sat-arith.ll vendor/llvm/dist/test/CodeGen/MIR/Generic/branch-probabilities.ll vendor/llvm/dist/test/MC/AArch64/cyclone-crc.s vendor/llvm/dist/test/Transforms/InstCombine/2005-06-16-SetCCOrSetCCMiscompile.ll Modified: vendor/llvm/dist/docs/Lexicon.rst vendor/llvm/dist/docs/MIRLangRef.rst vendor/llvm/dist/examples/Kaleidoscope/BuildingAJIT/Chapter1/toy.cpp vendor/llvm/dist/examples/Kaleidoscope/BuildingAJIT/Chapter2/toy.cpp vendor/llvm/dist/examples/Kaleidoscope/BuildingAJIT/Chapter3/toy.cpp vendor/llvm/dist/examples/Kaleidoscope/Chapter6/toy.cpp vendor/llvm/dist/examples/Kaleidoscope/Chapter7/toy.cpp vendor/llvm/dist/examples/Kaleidoscope/Chapter8/toy.cpp vendor/llvm/dist/include/llvm/ADT/APInt.h vendor/llvm/dist/include/llvm/ADT/BitVector.h vendor/llvm/dist/include/llvm/ADT/SmallBitVector.h vendor/llvm/dist/include/llvm/Analysis/LoopInfoImpl.h vendor/llvm/dist/include/llvm/Analysis/ProfileSummaryInfo.h vendor/llvm/dist/include/llvm/Analysis/ScalarEvolution.h vendor/llvm/dist/include/llvm/Analysis/TargetLibraryInfo.def vendor/llvm/dist/include/llvm/CodeGen/AsmPrinter.h vendor/llvm/dist/include/llvm/CodeGen/FastISel.h vendor/llvm/dist/include/llvm/CodeGen/FunctionLoweringInfo.h vendor/llvm/dist/include/llvm/CodeGen/GlobalISel/IRTranslator.h vendor/llvm/dist/include/llvm/CodeGen/GlobalISel/MachineIRBuilder.h vendor/llvm/dist/include/llvm/CodeGen/GlobalISel/RegBankSelect.h vendor/llvm/dist/include/llvm/CodeGen/GlobalISel/RegisterBankInfo.h vendor/llvm/dist/include/llvm/CodeGen/MachineFrameInfo.h vendor/llvm/dist/include/llvm/CodeGen/MachineModuleInfo.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/TypeDatabase.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFContext.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFFormValue.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/Native/DbiModuleDescriptor.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/Native/DbiStream.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/Native/NativeCompilandSymbol.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/Native/NativeEnumModules.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/Native/RawTypes.h vendor/llvm/dist/include/llvm/DebugInfo/PDB/Native/TpiStream.h vendor/llvm/dist/include/llvm/ExecutionEngine/Orc/RPCSerialization.h vendor/llvm/dist/include/llvm/ExecutionEngine/RuntimeDyldChecker.h vendor/llvm/dist/include/llvm/IR/Attributes.h vendor/llvm/dist/include/llvm/IR/BasicBlock.h vendor/llvm/dist/include/llvm/IR/CFG.h vendor/llvm/dist/include/llvm/IR/CallSite.h vendor/llvm/dist/include/llvm/IR/CallingConv.h vendor/llvm/dist/include/llvm/IR/ConstantRange.h vendor/llvm/dist/include/llvm/IR/DataLayout.h vendor/llvm/dist/include/llvm/IR/DebugInfo.h vendor/llvm/dist/include/llvm/IR/Dominators.h vendor/llvm/dist/include/llvm/IR/Function.h vendor/llvm/dist/include/llvm/IR/InlineAsm.h vendor/llvm/dist/include/llvm/IR/InstIterator.h vendor/llvm/dist/include/llvm/IR/InstrTypes.h vendor/llvm/dist/include/llvm/IR/Intrinsics.td vendor/llvm/dist/include/llvm/IR/IntrinsicsARM.td vendor/llvm/dist/include/llvm/IR/ModuleSummaryIndex.h vendor/llvm/dist/include/llvm/IR/ModuleSummaryIndexYAML.h vendor/llvm/dist/include/llvm/MC/ConstantPools.h vendor/llvm/dist/include/llvm/Object/COFF.h vendor/llvm/dist/include/llvm/Object/Wasm.h vendor/llvm/dist/include/llvm/ObjectYAML/WasmYAML.h vendor/llvm/dist/include/llvm/Support/AArch64TargetParser.def vendor/llvm/dist/include/llvm/Support/BinaryStreamArray.h vendor/llvm/dist/include/llvm/Support/COFF.h vendor/llvm/dist/include/llvm/Support/KnownBits.h vendor/llvm/dist/include/llvm/Support/MathExtras.h vendor/llvm/dist/include/llvm/Target/GlobalISel/SelectionDAGCompat.td vendor/llvm/dist/include/llvm/Target/Target.td vendor/llvm/dist/include/llvm/Target/TargetOpcodes.def vendor/llvm/dist/include/llvm/Transforms/Instrumentation.h vendor/llvm/dist/include/llvm/Transforms/Scalar/Float2Int.h vendor/llvm/dist/lib/Analysis/ConstantFolding.cpp vendor/llvm/dist/lib/Analysis/InstructionSimplify.cpp vendor/llvm/dist/lib/Analysis/LazyValueInfo.cpp vendor/llvm/dist/lib/Analysis/Lint.cpp vendor/llvm/dist/lib/Analysis/ModuleSummaryAnalysis.cpp vendor/llvm/dist/lib/Analysis/ScalarEvolution.cpp vendor/llvm/dist/lib/Analysis/TargetLibraryInfo.cpp vendor/llvm/dist/lib/Analysis/ValueTracking.cpp vendor/llvm/dist/lib/Bitcode/Reader/BitcodeReader.cpp vendor/llvm/dist/lib/Bitcode/Writer/BitcodeWriter.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/AsmPrinter.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp vendor/llvm/dist/lib/CodeGen/BranchFolding.cpp vendor/llvm/dist/lib/CodeGen/GlobalISel/IRTranslator.cpp vendor/llvm/dist/lib/CodeGen/GlobalISel/InstructionSelect.cpp vendor/llvm/dist/lib/CodeGen/GlobalISel/Legalizer.cpp vendor/llvm/dist/lib/CodeGen/GlobalISel/RegBankSelect.cpp vendor/llvm/dist/lib/CodeGen/GlobalISel/RegisterBankInfo.cpp vendor/llvm/dist/lib/CodeGen/MIRParser/MIParser.cpp vendor/llvm/dist/lib/CodeGen/MIRPrinter.cpp vendor/llvm/dist/lib/CodeGen/MIRPrintingPass.cpp vendor/llvm/dist/lib/CodeGen/MachineFrameInfo.cpp vendor/llvm/dist/lib/CodeGen/MachineVerifier.cpp vendor/llvm/dist/lib/CodeGen/PrologEpilogInserter.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/DAGCombiner.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/FastISel.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/ResourcePriorityQueue.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAG.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/TargetLowering.cpp vendor/llvm/dist/lib/CodeGen/XRayInstrumentation.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/TypeDatabase.cpp vendor/llvm/dist/lib/DebugInfo/DWARF/DWARFContext.cpp vendor/llvm/dist/lib/DebugInfo/DWARF/DWARFFormValue.cpp vendor/llvm/dist/lib/DebugInfo/PDB/CMakeLists.txt vendor/llvm/dist/lib/DebugInfo/PDB/Native/DbiStream.cpp vendor/llvm/dist/lib/DebugInfo/PDB/Native/NativeCompilandSymbol.cpp vendor/llvm/dist/lib/DebugInfo/PDB/Native/NativeEnumModules.cpp vendor/llvm/dist/lib/DebugInfo/PDB/Native/NativeExeSymbol.cpp vendor/llvm/dist/lib/DebugInfo/PDB/Native/TpiStream.cpp vendor/llvm/dist/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp vendor/llvm/dist/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldCheckerImpl.h vendor/llvm/dist/lib/Fuzzer/FuzzerLoop.cpp vendor/llvm/dist/lib/IR/ConstantRange.cpp vendor/llvm/dist/lib/IR/DataLayout.cpp vendor/llvm/dist/lib/IR/DebugInfo.cpp vendor/llvm/dist/lib/IR/Instruction.cpp vendor/llvm/dist/lib/IR/ModuleSummaryIndex.cpp vendor/llvm/dist/lib/LTO/LTO.cpp vendor/llvm/dist/lib/LTO/ThinLTOCodeGenerator.cpp vendor/llvm/dist/lib/MC/ConstantPools.cpp vendor/llvm/dist/lib/MC/MCParser/AsmParser.cpp vendor/llvm/dist/lib/Object/COFFObjectFile.cpp vendor/llvm/dist/lib/Object/WasmObjectFile.cpp vendor/llvm/dist/lib/ObjectYAML/WasmYAML.cpp vendor/llvm/dist/lib/Passes/PassBuilder.cpp vendor/llvm/dist/lib/Support/APInt.cpp vendor/llvm/dist/lib/Support/TargetParser.cpp vendor/llvm/dist/lib/Support/Unix/DynamicLibrary.inc vendor/llvm/dist/lib/Support/Unix/Path.inc vendor/llvm/dist/lib/Target/AArch64/AArch64.h vendor/llvm/dist/lib/Target/AArch64/AArch64.td vendor/llvm/dist/lib/Target/AArch64/AArch64ISelLowering.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64InstrInfo.td vendor/llvm/dist/lib/Target/AArch64/AArch64RegisterBankInfo.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64RegisterBankInfo.h vendor/llvm/dist/lib/Target/AArch64/AArch64TargetMachine.cpp vendor/llvm/dist/lib/Target/AArch64/CMakeLists.txt vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUISelLowering.cpp vendor/llvm/dist/lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp vendor/llvm/dist/lib/Target/AMDGPU/AMDGPURegisterBankInfo.h vendor/llvm/dist/lib/Target/AMDGPU/SIFrameLowering.cpp vendor/llvm/dist/lib/Target/AMDGPU/SIISelLowering.cpp vendor/llvm/dist/lib/Target/AMDGPU/SIInsertWaitcnts.cpp vendor/llvm/dist/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp vendor/llvm/dist/lib/Target/ARM/ARMBaseRegisterInfo.cpp vendor/llvm/dist/lib/Target/ARM/ARMISelLowering.cpp vendor/llvm/dist/lib/Target/ARM/ARMISelLowering.h vendor/llvm/dist/lib/Target/ARM/ARMInstrInfo.td vendor/llvm/dist/lib/Target/ARM/ARMInstrNEON.td vendor/llvm/dist/lib/Target/ARM/ARMInstrThumb2.td vendor/llvm/dist/lib/Target/ARM/ARMRegisterBankInfo.cpp vendor/llvm/dist/lib/Target/ARM/ARMRegisterBankInfo.h vendor/llvm/dist/lib/Target/ARM/MCTargetDesc/ARMTargetStreamer.cpp vendor/llvm/dist/lib/Target/BPF/MCTargetDesc/BPFAsmBackend.cpp vendor/llvm/dist/lib/Target/Hexagon/Disassembler/HexagonDisassembler.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonDepITypes.h vendor/llvm/dist/lib/Target/Hexagon/HexagonDepITypes.td vendor/llvm/dist/lib/Target/Hexagon/HexagonDepInstrFormats.td vendor/llvm/dist/lib/Target/Hexagon/HexagonDepInstrInfo.td vendor/llvm/dist/lib/Target/Hexagon/HexagonIICHVX.td vendor/llvm/dist/lib/Target/Hexagon/HexagonIICScalar.td vendor/llvm/dist/lib/Target/Hexagon/HexagonInstrFormats.td vendor/llvm/dist/lib/Target/Hexagon/HexagonInstrFormatsV4.td vendor/llvm/dist/lib/Target/Hexagon/HexagonInstrFormatsV60.td vendor/llvm/dist/lib/Target/Hexagon/HexagonInstrInfo.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonInstrInfo.h vendor/llvm/dist/lib/Target/Hexagon/HexagonMachineScheduler.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonPatterns.td vendor/llvm/dist/lib/Target/Hexagon/HexagonPseudo.td vendor/llvm/dist/lib/Target/Hexagon/HexagonRegisterInfo.td vendor/llvm/dist/lib/Target/Hexagon/HexagonSchedule.td vendor/llvm/dist/lib/Target/Hexagon/HexagonScheduleV4.td vendor/llvm/dist/lib/Target/Hexagon/HexagonScheduleV55.td vendor/llvm/dist/lib/Target/Hexagon/HexagonScheduleV60.td vendor/llvm/dist/lib/Target/Hexagon/HexagonScheduleV62.td vendor/llvm/dist/lib/Target/Hexagon/HexagonSubtarget.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonSubtarget.h vendor/llvm/dist/lib/Target/Hexagon/HexagonVLIWPacketizer.cpp vendor/llvm/dist/lib/Target/Hexagon/MCTargetDesc/HexagonBaseInfo.h vendor/llvm/dist/lib/Target/Hexagon/MCTargetDesc/HexagonMCCodeEmitter.cpp vendor/llvm/dist/lib/Target/Hexagon/MCTargetDesc/HexagonShuffler.cpp vendor/llvm/dist/lib/Target/Hexagon/RDFLiveness.cpp vendor/llvm/dist/lib/Target/Hexagon/RDFRegisters.cpp vendor/llvm/dist/lib/Target/Hexagon/RDFRegisters.h vendor/llvm/dist/lib/Target/Mips/MipsAsmPrinter.cpp vendor/llvm/dist/lib/Target/NVPTX/NVPTXISelLowering.cpp vendor/llvm/dist/lib/Target/NVPTX/NVPTXInstrInfo.td vendor/llvm/dist/lib/Target/PowerPC/PPCFrameLowering.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCISelLowering.cpp vendor/llvm/dist/lib/Target/Sparc/SparcISelLowering.cpp vendor/llvm/dist/lib/Target/SystemZ/SystemZInstrInfo.cpp vendor/llvm/dist/lib/Target/X86/AsmParser/X86AsmParser.cpp vendor/llvm/dist/lib/Target/X86/AsmParser/X86Operand.h vendor/llvm/dist/lib/Target/X86/X86AsmPrinter.h vendor/llvm/dist/lib/Target/X86/X86FrameLowering.cpp vendor/llvm/dist/lib/Target/X86/X86ISelLowering.cpp vendor/llvm/dist/lib/Target/X86/X86InstrAVX512.td vendor/llvm/dist/lib/Target/X86/X86InstrInfo.td vendor/llvm/dist/lib/Target/X86/X86InstrSSE.td vendor/llvm/dist/lib/Target/X86/X86InstructionSelector.cpp vendor/llvm/dist/lib/Target/X86/X86LegalizerInfo.cpp vendor/llvm/dist/lib/Target/X86/X86LegalizerInfo.h vendor/llvm/dist/lib/Target/X86/X86MCInstLower.cpp vendor/llvm/dist/lib/Target/X86/X86OptimizeLEAs.cpp vendor/llvm/dist/lib/Target/X86/X86RegisterBankInfo.cpp vendor/llvm/dist/lib/Target/X86/X86RegisterBankInfo.h vendor/llvm/dist/lib/Target/X86/X86Subtarget.cpp vendor/llvm/dist/lib/Target/X86/X86TargetTransformInfo.cpp vendor/llvm/dist/lib/Target/XCore/XCoreISelLowering.cpp vendor/llvm/dist/lib/Transforms/IPO/ArgumentPromotion.cpp vendor/llvm/dist/lib/Transforms/IPO/FunctionImport.cpp vendor/llvm/dist/lib/Transforms/IPO/LowerTypeTests.cpp vendor/llvm/dist/lib/Transforms/IPO/WholeProgramDevirt.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineAddSub.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineCalls.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineCompares.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstructionCombining.cpp vendor/llvm/dist/lib/Transforms/Instrumentation/IndirectCallPromotion.cpp vendor/llvm/dist/lib/Transforms/Instrumentation/SanitizerCoverage.cpp vendor/llvm/dist/lib/Transforms/Scalar/Float2Int.cpp vendor/llvm/dist/lib/Transforms/Scalar/JumpThreading.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopIdiomRecognize.cpp vendor/llvm/dist/lib/Transforms/Scalar/NewGVN.cpp vendor/llvm/dist/lib/Transforms/Scalar/TailRecursionElimination.cpp vendor/llvm/dist/lib/Transforms/Utils/BuildLibCalls.cpp vendor/llvm/dist/lib/Transforms/Utils/SimplifyCFG.cpp vendor/llvm/dist/lib/Transforms/Utils/ValueMapper.cpp vendor/llvm/dist/lib/Transforms/Vectorize/LoopVectorize.cpp vendor/llvm/dist/test/Analysis/CostModel/X86/bitreverse.ll vendor/llvm/dist/test/Analysis/CostModel/X86/ctbits-cost.ll vendor/llvm/dist/test/CodeGen/AArch64/GlobalISel/arm64-irtranslator.ll vendor/llvm/dist/test/CodeGen/AArch64/GlobalISel/debug-insts.ll vendor/llvm/dist/test/CodeGen/AArch64/GlobalISel/select-dbg-value.mir vendor/llvm/dist/test/CodeGen/AArch64/loh.mir vendor/llvm/dist/test/CodeGen/AArch64/machine-copy-remove.mir vendor/llvm/dist/test/CodeGen/AArch64/machine-sink-zr.mir vendor/llvm/dist/test/CodeGen/AArch64/regcoal-physreg.mir vendor/llvm/dist/test/CodeGen/AArch64/xray-attribute-instrumentation.ll vendor/llvm/dist/test/CodeGen/AArch64/xray-tail-call-sled.ll vendor/llvm/dist/test/CodeGen/AMDGPU/detect-dead-lanes.mir vendor/llvm/dist/test/CodeGen/AMDGPU/fmuladd.f32.ll vendor/llvm/dist/test/CodeGen/AMDGPU/inserted-wait-states.mir vendor/llvm/dist/test/CodeGen/AMDGPU/invert-br-undef-vcc.mir vendor/llvm/dist/test/CodeGen/AMDGPU/lds-size.ll vendor/llvm/dist/test/CodeGen/AMDGPU/liveness.mir vendor/llvm/dist/test/CodeGen/AMDGPU/optimize-if-exec-masking.mir vendor/llvm/dist/test/CodeGen/AMDGPU/rename-independent-subregs.mir vendor/llvm/dist/test/CodeGen/AMDGPU/si-fix-sgpr-copies.mir vendor/llvm/dist/test/CodeGen/AMDGPU/subreg-intervals.mir vendor/llvm/dist/test/CodeGen/AMDGPU/vccz-corrupt-bug-workaround.mir vendor/llvm/dist/test/CodeGen/ARM/ARMLoadStoreDBG.mir vendor/llvm/dist/test/CodeGen/ARM/cmp1-peephole-thumb.mir vendor/llvm/dist/test/CodeGen/ARM/cmp2-peephole-thumb.mir vendor/llvm/dist/test/CodeGen/ARM/dbg-range-extension.mir vendor/llvm/dist/test/CodeGen/ARM/vabs.ll vendor/llvm/dist/test/CodeGen/ARM/xray-armv6-attribute-instrumentation.ll vendor/llvm/dist/test/CodeGen/ARM/xray-armv7-attribute-instrumentation.ll vendor/llvm/dist/test/CodeGen/BPF/dwarfdump.ll vendor/llvm/dist/test/CodeGen/Hexagon/swp-matmul-bitext.ll vendor/llvm/dist/test/CodeGen/MIR/X86/successor-basic-blocks.mir vendor/llvm/dist/test/CodeGen/X86/2014-08-29-CompactUnwind.ll vendor/llvm/dist/test/CodeGen/X86/GlobalISel/regbankselect-X86_64.mir vendor/llvm/dist/test/CodeGen/X86/addcarry.ll vendor/llvm/dist/test/CodeGen/X86/avx-isa-check.ll vendor/llvm/dist/test/CodeGen/X86/avx1-logical-load-folding.ll vendor/llvm/dist/test/CodeGen/X86/avx512vl-arith.ll vendor/llvm/dist/test/CodeGen/X86/branchfolding-undef.mir vendor/llvm/dist/test/CodeGen/X86/combine-abs.ll vendor/llvm/dist/test/CodeGen/X86/commuted-blend-mask.ll vendor/llvm/dist/test/CodeGen/X86/ctpop-combine.ll vendor/llvm/dist/test/CodeGen/X86/dbg-baseptr.ll vendor/llvm/dist/test/CodeGen/X86/eflags-copy-expansion.mir vendor/llvm/dist/test/CodeGen/X86/frame-lowering-debug-intrinsic.ll vendor/llvm/dist/test/CodeGen/X86/implicit-null-checks.mir vendor/llvm/dist/test/CodeGen/X86/invalid-liveness.mir vendor/llvm/dist/test/CodeGen/X86/machine-region-info.mir vendor/llvm/dist/test/CodeGen/X86/pr27681.mir vendor/llvm/dist/test/CodeGen/X86/pre-coalesce.mir vendor/llvm/dist/test/CodeGen/X86/shuffle-vs-trunc-512.ll vendor/llvm/dist/test/CodeGen/X86/stack-folding-int-avx512.ll vendor/llvm/dist/test/CodeGen/X86/vec_partial.ll vendor/llvm/dist/test/CodeGen/X86/vec_reassociate.ll vendor/llvm/dist/test/CodeGen/X86/vector-lzcnt-512.ll vendor/llvm/dist/test/CodeGen/X86/vector-shuffle-variable-128.ll vendor/llvm/dist/test/CodeGen/X86/win64_eh_leaf.ll vendor/llvm/dist/test/CodeGen/X86/xray-attribute-instrumentation.ll vendor/llvm/dist/test/CodeGen/X86/xray-tail-call-sled.ll vendor/llvm/dist/test/MC/AArch64/basic-a64-instructions.s vendor/llvm/dist/test/MC/AArch64/directive-arch-negative.s vendor/llvm/dist/test/MC/ARM/negative-immediates-fail.s vendor/llvm/dist/test/MC/ARM/negative-immediates-thumb1-fail.s vendor/llvm/dist/test/MC/ARM/negative-immediates.s vendor/llvm/dist/test/MC/Disassembler/AArch64/basic-a64-instructions.txt vendor/llvm/dist/test/Other/new-pm-defaults.ll vendor/llvm/dist/test/Transforms/CodeExtractor/PartialInlineOptRemark.ll vendor/llvm/dist/test/Transforms/Inline/inline-hot-callsite.ll vendor/llvm/dist/test/Transforms/Inline/prof-update.ll vendor/llvm/dist/test/Transforms/InstCombine/AddOverFlow.ll vendor/llvm/dist/test/Transforms/InstCombine/and-or-icmps.ll vendor/llvm/dist/test/Transforms/InstCombine/debuginfo-dce.ll vendor/llvm/dist/test/Transforms/InstCombine/demand_shrink_nsw.ll vendor/llvm/dist/test/Transforms/InstCombine/or.ll vendor/llvm/dist/test/Transforms/InstCombine/strlen-1.ll vendor/llvm/dist/test/Transforms/InstSimplify/AndOrXor.ll vendor/llvm/dist/test/Transforms/InstSimplify/compare.ll vendor/llvm/dist/test/Transforms/InstSimplify/icmp-ranges.ll vendor/llvm/dist/test/Transforms/InstSimplify/shufflevector.ll vendor/llvm/dist/test/Transforms/LoopRotate/dbgvalue.ll vendor/llvm/dist/test/Transforms/SampleProfile/Inputs/indirect-call.prof vendor/llvm/dist/test/Transforms/SampleProfile/indirect-call.ll vendor/llvm/dist/test/Unit/lit.cfg vendor/llvm/dist/test/tools/llvm-readobj/resources.test vendor/llvm/dist/tools/llvm-link/llvm-link.cpp vendor/llvm/dist/tools/llvm-lto/llvm-lto.cpp vendor/llvm/dist/tools/llvm-pdbdump/Analyze.cpp vendor/llvm/dist/tools/llvm-pdbdump/LLVMOutputStyle.cpp vendor/llvm/dist/tools/llvm-pdbdump/LLVMOutputStyle.h vendor/llvm/dist/tools/llvm-pdbdump/StreamUtil.cpp vendor/llvm/dist/tools/llvm-pdbdump/YAMLOutputStyle.cpp vendor/llvm/dist/tools/llvm-readobj/COFFDumper.cpp vendor/llvm/dist/tools/llvm-rtdyld/llvm-rtdyld.cpp vendor/llvm/dist/tools/obj2yaml/wasm2yaml.cpp vendor/llvm/dist/tools/yaml2obj/yaml2wasm.cpp vendor/llvm/dist/unittests/ADT/APIntTest.cpp vendor/llvm/dist/unittests/ADT/BitVectorTest.cpp vendor/llvm/dist/unittests/Analysis/TargetLibraryInfoTest.cpp vendor/llvm/dist/unittests/Support/TargetParserTest.cpp vendor/llvm/dist/utils/release/test-release.sh vendor/llvm/dist/utils/unittest/googletest/README.LLVM vendor/llvm/dist/utils/unittest/googletest/include/gtest/internal/gtest-port-arch.h vendor/llvm/dist/utils/unittest/googletest/include/gtest/internal/gtest-port.h Modified: vendor/llvm/dist/docs/Lexicon.rst ============================================================================== --- vendor/llvm/dist/docs/Lexicon.rst Mon May 8 17:02:03 2017 (r317947) +++ vendor/llvm/dist/docs/Lexicon.rst Mon May 8 17:12:57 2017 (r317948) @@ -38,6 +38,13 @@ B **BB Vectorization** Basic-Block Vectorization +**BDCE** + Bit-tracking dead code elimination. Some bit-wise instructions (shifts, + ands, ors, etc.) "kill" some of their input bits -- that is, they make it + such that those bits can be either zero or one without affecting control or + data flow of a program. The BDCE pass removes instructions that only + compute these dead bits. + **BURS** Bottom Up Rewriting System --- A method of instruction selection for code generation. An example is the `BURG Modified: vendor/llvm/dist/docs/MIRLangRef.rst ============================================================================== --- vendor/llvm/dist/docs/MIRLangRef.rst Mon May 8 17:02:03 2017 (r317947) +++ vendor/llvm/dist/docs/MIRLangRef.rst Mon May 8 17:12:57 2017 (r317948) @@ -78,6 +78,8 @@ Simplifying MIR files The MIR code coming out of ``-stop-after``/``-stop-before`` is very verbose; Tests are more accessible and future proof when simplified: +- Use the ``-simplify-mir`` option with llc. + - Machine function attributes often have default values or the test works just as well with default values. Typical candidates for this are: `alignment:`, `exposesReturnsTwice`, `legalized`, `regBankSelected`, `selected`. Modified: vendor/llvm/dist/examples/Kaleidoscope/BuildingAJIT/Chapter1/toy.cpp ============================================================================== --- vendor/llvm/dist/examples/Kaleidoscope/BuildingAJIT/Chapter1/toy.cpp Mon May 8 17:02:03 2017 (r317947) +++ vendor/llvm/dist/examples/Kaleidoscope/BuildingAJIT/Chapter1/toy.cpp Mon May 8 17:12:57 2017 (r317948) @@ -1092,7 +1092,7 @@ Function *FunctionAST::codegen() { TheFunction->eraseFromParent(); if (P.isBinaryOp()) - BinopPrecedence.erase(Proto->getOperatorName()); + BinopPrecedence.erase(P.getOperatorName()); return nullptr; } Modified: vendor/llvm/dist/examples/Kaleidoscope/BuildingAJIT/Chapter2/toy.cpp ============================================================================== --- vendor/llvm/dist/examples/Kaleidoscope/BuildingAJIT/Chapter2/toy.cpp Mon May 8 17:02:03 2017 (r317947) +++ vendor/llvm/dist/examples/Kaleidoscope/BuildingAJIT/Chapter2/toy.cpp Mon May 8 17:12:57 2017 (r317948) @@ -1092,7 +1092,7 @@ Function *FunctionAST::codegen() { TheFunction->eraseFromParent(); if (P.isBinaryOp()) - BinopPrecedence.erase(Proto->getOperatorName()); + BinopPrecedence.erase(P.getOperatorName()); return nullptr; } Modified: vendor/llvm/dist/examples/Kaleidoscope/BuildingAJIT/Chapter3/toy.cpp ============================================================================== --- vendor/llvm/dist/examples/Kaleidoscope/BuildingAJIT/Chapter3/toy.cpp Mon May 8 17:02:03 2017 (r317947) +++ vendor/llvm/dist/examples/Kaleidoscope/BuildingAJIT/Chapter3/toy.cpp Mon May 8 17:12:57 2017 (r317948) @@ -1092,7 +1092,7 @@ Function *FunctionAST::codegen() { TheFunction->eraseFromParent(); if (P.isBinaryOp()) - BinopPrecedence.erase(Proto->getOperatorName()); + BinopPrecedence.erase(P.getOperatorName()); return nullptr; } Modified: vendor/llvm/dist/examples/Kaleidoscope/Chapter6/toy.cpp ============================================================================== --- vendor/llvm/dist/examples/Kaleidoscope/Chapter6/toy.cpp Mon May 8 17:02:03 2017 (r317947) +++ vendor/llvm/dist/examples/Kaleidoscope/Chapter6/toy.cpp Mon May 8 17:12:57 2017 (r317948) @@ -932,7 +932,7 @@ Function *FunctionAST::codegen() { TheFunction->eraseFromParent(); if (P.isBinaryOp()) - BinopPrecedence.erase(Proto->getOperatorName()); + BinopPrecedence.erase(P.getOperatorName()); return nullptr; } Modified: vendor/llvm/dist/examples/Kaleidoscope/Chapter7/toy.cpp ============================================================================== --- vendor/llvm/dist/examples/Kaleidoscope/Chapter7/toy.cpp Mon May 8 17:02:03 2017 (r317947) +++ vendor/llvm/dist/examples/Kaleidoscope/Chapter7/toy.cpp Mon May 8 17:12:57 2017 (r317948) @@ -1099,7 +1099,7 @@ Function *FunctionAST::codegen() { TheFunction->eraseFromParent(); if (P.isBinaryOp()) - BinopPrecedence.erase(Proto->getOperatorName()); + BinopPrecedence.erase(P.getOperatorName()); return nullptr; } Modified: vendor/llvm/dist/examples/Kaleidoscope/Chapter8/toy.cpp ============================================================================== --- vendor/llvm/dist/examples/Kaleidoscope/Chapter8/toy.cpp Mon May 8 17:02:03 2017 (r317947) +++ vendor/llvm/dist/examples/Kaleidoscope/Chapter8/toy.cpp Mon May 8 17:12:57 2017 (r317948) @@ -1097,7 +1097,7 @@ Function *FunctionAST::codegen() { TheFunction->eraseFromParent(); if (P.isBinaryOp()) - BinopPrecedence.erase(Proto->getOperatorName()); + BinopPrecedence.erase(P.getOperatorName()); return nullptr; } Modified: vendor/llvm/dist/include/llvm/ADT/APInt.h ============================================================================== --- vendor/llvm/dist/include/llvm/ADT/APInt.h Mon May 8 17:02:03 2017 (r317947) +++ vendor/llvm/dist/include/llvm/ADT/APInt.h Mon May 8 17:12:57 2017 (r317948) @@ -842,6 +842,7 @@ public: /// /// \returns *this APInt &operator*=(const APInt &RHS); + APInt &operator*=(uint64_t RHS); /// \brief Addition assignment operator. /// @@ -2043,6 +2044,16 @@ inline APInt operator-(uint64_t LHS, API return b; } +inline APInt operator*(APInt a, uint64_t RHS) { + a *= RHS; + return a; +} + +inline APInt operator*(uint64_t LHS, APInt b) { + b *= LHS; + return b; +} + namespace APIntOps { Modified: vendor/llvm/dist/include/llvm/ADT/BitVector.h ============================================================================== --- vendor/llvm/dist/include/llvm/ADT/BitVector.h Mon May 8 17:02:03 2017 (r317947) +++ vendor/llvm/dist/include/llvm/ADT/BitVector.h Mon May 8 17:12:57 2017 (r317948) @@ -217,7 +217,7 @@ public: unsigned BitPos = Prev % BITWORD_SIZE; BitWord Copy = Bits[WordPos]; // Mask off previous bits. - Copy &= ~0UL << BitPos; + Copy &= maskTrailingZeros(BitPos); if (Copy != 0) return WordPos * BITWORD_SIZE + countTrailingZeros(Copy); @@ -229,7 +229,7 @@ public: return -1; } - /// find_next_unset - Returns the index of the next usnet bit following the + /// find_next_unset - Returns the index of the next unset bit following the /// "Prev" bit. Returns -1 if all remaining bits are set. int find_next_unset(unsigned Prev) const { ++Prev; @@ -253,7 +253,34 @@ public: return -1; } - /// clear - Clear all bits. + /// find_prev - Returns the index of the first set bit that precedes the + /// the bit at \p PriorTo. Returns -1 if all previous bits are unset. + int find_prev(unsigned PriorTo) { + if (PriorTo == 0) + return -1; + + --PriorTo; + + unsigned WordPos = PriorTo / BITWORD_SIZE; + unsigned BitPos = PriorTo % BITWORD_SIZE; + BitWord Copy = Bits[WordPos]; + // Mask off next bits. + Copy &= maskTrailingOnes(BitPos + 1); + + if (Copy != 0) + return (WordPos + 1) * BITWORD_SIZE - countLeadingZeros(Copy) - 1; + + // Check previous words. + for (unsigned i = 1; i <= WordPos; ++i) { + unsigned Index = WordPos - i; + if (Bits[Index] == 0) + continue; + return (Index + 1) * BITWORD_SIZE - countLeadingZeros(Bits[Index]) - 1; + } + return -1; + } + + /// clear - Removes all bits from the bitvector. Does not change capacity. void clear() { Size = 0; } Modified: vendor/llvm/dist/include/llvm/ADT/SmallBitVector.h ============================================================================== --- vendor/llvm/dist/include/llvm/ADT/SmallBitVector.h Mon May 8 17:02:03 2017 (r317947) +++ vendor/llvm/dist/include/llvm/ADT/SmallBitVector.h Mon May 8 17:12:57 2017 (r317948) @@ -278,6 +278,24 @@ public: return getPointer()->find_next_unset(Prev); } + /// find_prev - Returns the index of the first set bit that precedes the + /// the bit at \p PriorTo. Returns -1 if all previous bits are unset. + int find_prev(unsigned PriorTo) const { + if (isSmall()) { + if (PriorTo == 0) + return -1; + + --PriorTo; + uintptr_t Bits = getSmallBits(); + Bits &= maskTrailingOnes(PriorTo + 1); + if (Bits == 0) + return -1; + + return NumBaseBits - countLeadingZeros(Bits) - 1; + } + return getPointer()->find_prev(PriorTo); + } + /// Clear all bits. void clear() { if (!isSmall()) Modified: vendor/llvm/dist/include/llvm/Analysis/LoopInfoImpl.h ============================================================================== --- vendor/llvm/dist/include/llvm/Analysis/LoopInfoImpl.h Mon May 8 17:02:03 2017 (r317947) +++ vendor/llvm/dist/include/llvm/Analysis/LoopInfoImpl.h Mon May 8 17:12:57 2017 (r317948) @@ -220,8 +220,8 @@ void LoopBase::verifyLoop BI = df_ext_begin(getHeader(), VisitSet), BE = df_ext_end(getHeader(), VisitSet); - // Keep track of the number of BBs visited. - unsigned NumVisited = 0; + // Keep track of the BBs visited. + SmallPtrSet VisitedBBs; // Check the individual blocks. for ( ; BI != BE; ++BI) { @@ -259,10 +259,18 @@ void LoopBase::verifyLoop assert(BB != &getHeader()->getParent()->front() && "Loop contains function entry block!"); - NumVisited++; + VisitedBBs.insert(BB); } - assert(NumVisited == getNumBlocks() && "Unreachable block in loop"); + if (VisitedBBs.size() != getNumBlocks()) { + dbgs() << "The following blocks are unreachable in the loop: "; + for (auto BB : Blocks) { + if (!VisitedBBs.count(BB)) { + dbgs() << *BB << "\n"; + } + } + assert(false && "Unreachable block in loop"); + } // Check the subloops. for (iterator I = begin(), E = end(); I != E; ++I) Modified: vendor/llvm/dist/include/llvm/Analysis/ProfileSummaryInfo.h ============================================================================== --- vendor/llvm/dist/include/llvm/Analysis/ProfileSummaryInfo.h Mon May 8 17:02:03 2017 (r317947) +++ vendor/llvm/dist/include/llvm/Analysis/ProfileSummaryInfo.h Mon May 8 17:12:57 2017 (r317948) @@ -54,6 +54,18 @@ public: ProfileSummaryInfo(Module &M) : M(M) {} ProfileSummaryInfo(ProfileSummaryInfo &&Arg) : M(Arg.M), Summary(std::move(Arg.Summary)) {} + + /// Handle the invalidation of this information. + /// + /// When used as a result of \c ProfileSummaryAnalysis this method will be + /// called when the module this was computed for changes. Since profile + /// summary is immutable after it is annotated on the module, we return false + /// here. + bool invalidate(Module &, const PreservedAnalyses &, + ModuleAnalysisManager::Invalidator &) { + return false; + } + /// Returns the profile count for \p CallInst. static Optional getProfileCount(const Instruction *CallInst, BlockFrequencyInfo *BFI); Modified: vendor/llvm/dist/include/llvm/Analysis/ScalarEvolution.h ============================================================================== --- vendor/llvm/dist/include/llvm/Analysis/ScalarEvolution.h Mon May 8 17:02:03 2017 (r317947) +++ vendor/llvm/dist/include/llvm/Analysis/ScalarEvolution.h Mon May 8 17:12:57 2017 (r317948) @@ -782,13 +782,13 @@ private: /// Set the memoized range for the given SCEV. const ConstantRange &setRange(const SCEV *S, RangeSignHint Hint, - const ConstantRange &CR) { + ConstantRange &&CR) { DenseMap &Cache = Hint == HINT_RANGE_UNSIGNED ? UnsignedRanges : SignedRanges; - auto Pair = Cache.insert({S, CR}); + auto Pair = Cache.try_emplace(S, std::move(CR)); if (!Pair.second) - Pair.first->second = CR; + Pair.first->second = std::move(CR); return Pair.first->second; } @@ -816,6 +816,10 @@ private: /// Helper function called from createNodeForPHI. const SCEV *createAddRecFromPHI(PHINode *PN); + /// A helper function for createAddRecFromPHI to handle simple cases. + const SCEV *createSimpleAffineAddRec(PHINode *PN, Value *BEValueV, + Value *StartValueV); + /// Helper function called from createNodeForPHI. const SCEV *createNodeFromSelectLikePHI(PHINode *PN); @@ -1565,7 +1569,7 @@ public: /// delinearization). void findArrayDimensions(SmallVectorImpl &Terms, SmallVectorImpl &Sizes, - const SCEV *ElementSize) const; + const SCEV *ElementSize); void print(raw_ostream &OS) const; void verify() const; Modified: vendor/llvm/dist/include/llvm/Analysis/TargetLibraryInfo.def ============================================================================== --- vendor/llvm/dist/include/llvm/Analysis/TargetLibraryInfo.def Mon May 8 17:02:03 2017 (r317947) +++ vendor/llvm/dist/include/llvm/Analysis/TargetLibraryInfo.def Mon May 8 17:12:57 2017 (r317948) @@ -1115,6 +1115,9 @@ TLI_DEFINE_STRING_INTERNAL("vsprintf") /// int vsscanf(const char *s, const char *format, va_list arg); TLI_DEFINE_ENUM_INTERNAL(vsscanf) TLI_DEFINE_STRING_INTERNAL("vsscanf") +/// size_t wcslen (const wchar_t* wcs); +TLI_DEFINE_ENUM_INTERNAL(wcslen) +TLI_DEFINE_STRING_INTERNAL("wcslen") /// ssize_t write(int fildes, const void *buf, size_t nbyte); TLI_DEFINE_ENUM_INTERNAL(write) TLI_DEFINE_STRING_INTERNAL("write") Modified: vendor/llvm/dist/include/llvm/CodeGen/AsmPrinter.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/AsmPrinter.h Mon May 8 17:02:03 2017 (r317947) +++ vendor/llvm/dist/include/llvm/CodeGen/AsmPrinter.h Mon May 8 17:12:57 2017 (r317948) @@ -226,6 +226,7 @@ public: FUNCTION_EXIT = 1, TAIL_CALL = 2, LOG_ARGS_ENTER = 3, + CUSTOM_EVENT = 4, }; // The table will contain these structs that point to the sled, the function @@ -242,7 +243,7 @@ public: }; // All the sleds to be emitted. - std::vector Sleds; + SmallVector Sleds; // Helper function to record a given XRay sled. void recordSled(MCSymbol *Sled, const MachineInstr &MI, SledKind Kind); Modified: vendor/llvm/dist/include/llvm/CodeGen/FastISel.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/FastISel.h Mon May 8 17:02:03 2017 (r317947) +++ vendor/llvm/dist/include/llvm/CodeGen/FastISel.h Mon May 8 17:12:57 2017 (r317948) @@ -506,6 +506,7 @@ protected: bool selectCast(const User *I, unsigned Opcode); bool selectExtractValue(const User *I); bool selectInsertValue(const User *I); + bool selectXRayCustomEvent(const CallInst *II); private: /// \brief Handle PHI nodes in successor blocks. Modified: vendor/llvm/dist/include/llvm/CodeGen/FunctionLoweringInfo.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/FunctionLoweringInfo.h Mon May 8 17:02:03 2017 (r317947) +++ vendor/llvm/dist/include/llvm/CodeGen/FunctionLoweringInfo.h Mon May 8 17:12:57 2017 (r317948) @@ -249,7 +249,7 @@ public: void AddLiveOutRegInfo(unsigned Reg, unsigned NumSignBits, const KnownBits &Known) { // Only install this information if it tells us something. - if (NumSignBits == 1 && Known.Zero == 0 && Known.One == 0) + if (NumSignBits == 1 && Known.isUnknown()) return; LiveOutRegInfo.grow(Reg); Modified: vendor/llvm/dist/include/llvm/CodeGen/GlobalISel/IRTranslator.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/GlobalISel/IRTranslator.h Mon May 8 17:02:03 2017 (r317947) +++ vendor/llvm/dist/include/llvm/CodeGen/GlobalISel/IRTranslator.h Mon May 8 17:12:57 2017 (r317948) @@ -78,7 +78,7 @@ private: /// this function. DenseMap FrameIndices; - /// Methods for translating form LLVM IR to MachineInstr. + /// \name Methods for translating form LLVM IR to MachineInstr. /// \see ::translate for general information on the translate methods. /// @{ Modified: vendor/llvm/dist/include/llvm/CodeGen/GlobalISel/MachineIRBuilder.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/GlobalISel/MachineIRBuilder.h Mon May 8 17:02:03 2017 (r317947) +++ vendor/llvm/dist/include/llvm/CodeGen/GlobalISel/MachineIRBuilder.h Mon May 8 17:12:57 2017 (r317948) @@ -45,7 +45,7 @@ class MachineIRBuilder { /// Debug location to be set to any instruction we create. DebugLoc DL; - /// Fields describing the insertion point. + /// \name Fields describing the insertion point. /// @{ MachineBasicBlock *MBB; MachineBasicBlock::iterator II; @@ -84,7 +84,7 @@ public: void setInsertPt(MachineBasicBlock &MBB, MachineBasicBlock::iterator II); /// @} - /// Setters for the insertion point. + /// \name Setters for the insertion point. /// @{ /// Set the MachineFunction where to build instructions. void setMF(MachineFunction &); @@ -98,7 +98,7 @@ public: void setInstr(MachineInstr &MI); /// @} - /// Control where instructions we create are recorded (typically for + /// \name Control where instructions we create are recorded (typically for /// visiting again later during legalization). /// @{ void recordInsertions(std::function InsertedInstr); Modified: vendor/llvm/dist/include/llvm/CodeGen/GlobalISel/RegBankSelect.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/GlobalISel/RegBankSelect.h Mon May 8 17:02:03 2017 (r317947) +++ vendor/llvm/dist/include/llvm/CodeGen/GlobalISel/RegBankSelect.h Mon May 8 17:12:57 2017 (r317948) @@ -309,7 +309,7 @@ public: Impossible }; - /// Convenient types for a list of insertion points. + /// \name Convenient types for a list of insertion points. /// @{ typedef SmallVector, 2> InsertionPoints; typedef InsertionPoints::iterator insertpt_iterator; @@ -341,7 +341,7 @@ public: const TargetRegisterInfo &TRI, Pass &P, RepairingKind Kind = RepairingKind::Insert); - /// Getters. + /// \name Getters. /// @{ RepairingKind getKind() const { return Kind; } unsigned getOpIdx() const { return OpIdx; } @@ -349,7 +349,7 @@ public: bool hasSplit() { return HasSplit; } /// @} - /// Overloaded methods to add an insertion point. + /// \name Overloaded methods to add an insertion point. /// @{ /// Add a MBBInsertionPoint to the list of InsertPoints. void addInsertPoint(MachineBasicBlock &MBB, bool Beginning); @@ -362,7 +362,7 @@ public: void addInsertPoint(InsertPoint &Point); /// @} - /// Accessors related to the insertion points. + /// \name Accessors related to the insertion points. /// @{ insertpt_iterator begin() { return InsertPoints.begin(); } insertpt_iterator end() { return InsertPoints.end(); } @@ -561,7 +561,7 @@ private: /// Find the best mapping for \p MI from \p PossibleMappings. /// \return a reference on the best mapping in \p PossibleMappings. - RegisterBankInfo::InstructionMapping & + const RegisterBankInfo::InstructionMapping & findBestMapping(MachineInstr &MI, RegisterBankInfo::InstructionMappings &PossibleMappings, SmallVectorImpl &RepairPts); Modified: vendor/llvm/dist/include/llvm/CodeGen/GlobalISel/RegisterBankInfo.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/GlobalISel/RegisterBankInfo.h Mon May 8 17:02:03 2017 (r317947) +++ vendor/llvm/dist/include/llvm/CodeGen/GlobalISel/RegisterBankInfo.h Mon May 8 17:12:57 2017 (r317948) @@ -264,7 +264,7 @@ public: /// Convenient type to represent the alternatives for mapping an /// instruction. /// \todo When we move to TableGen this should be an array ref. - typedef SmallVector InstructionMappings; + typedef SmallVector InstructionMappings; /// Helper class used to get/create the virtual registers that will be used /// to replace the MachineOperand when applying a mapping. @@ -310,7 +310,7 @@ public: OperandsMapper(MachineInstr &MI, const InstructionMapping &InstrMapping, MachineRegisterInfo &MRI); - /// Getters. + /// \name Getters. /// @{ /// The MachineInstr being remapped. MachineInstr &getMI() const { return MI; } @@ -378,15 +378,23 @@ protected: /// Keep dynamically allocated PartialMapping in a separate map. /// This shouldn't be needed when everything gets TableGen'ed. - mutable DenseMap> MapOfPartialMappings; + mutable DenseMap> + MapOfPartialMappings; /// Keep dynamically allocated ValueMapping in a separate map. /// This shouldn't be needed when everything gets TableGen'ed. - mutable DenseMap > MapOfValueMappings; + mutable DenseMap> + MapOfValueMappings; /// Keep dynamically allocated array of ValueMapping in a separate map. /// This shouldn't be needed when everything gets TableGen'ed. - mutable DenseMap> MapOfOperandsMappings; + mutable DenseMap> + MapOfOperandsMappings; + + /// Keep dynamically allocated InstructionMapping in a separate map. + /// This shouldn't be needed when everything gets TableGen'ed. + mutable DenseMap> + MapOfInstructionMappings; /// Create a RegisterBankInfo that can accomodate up to \p NumRegBanks /// RegisterBank instances. @@ -425,14 +433,14 @@ protected: /// register, a register class, or a register bank. /// In other words, this method will likely fail to find a mapping for /// any generic opcode that has not been lowered by target specific code. - InstructionMapping getInstrMappingImpl(const MachineInstr &MI) const; + const InstructionMapping &getInstrMappingImpl(const MachineInstr &MI) const; /// Get the uniquely generated PartialMapping for the /// given arguments. const PartialMapping &getPartialMapping(unsigned StartIdx, unsigned Length, const RegisterBank &RegBank) const; - /// Methods to get a uniquely generated ValueMapping. + /// \name Methods to get a uniquely generated ValueMapping. /// @{ /// The most common ValueMapping consists of a single PartialMapping. @@ -445,7 +453,7 @@ protected: unsigned NumBreakDowns) const; /// @} - /// Methods to get a uniquely generated array of ValueMapping. + /// \name Methods to get a uniquely generated array of ValueMapping. /// @{ /// Get the uniquely generated array of ValueMapping for the @@ -478,6 +486,33 @@ protected: std::initializer_list OpdsMapping) const; /// @} + /// \name Methods to get a uniquely generated InstructionMapping. + /// @{ + +private: + /// Method to get a uniquely generated InstructionMapping. + const InstructionMapping & + getInstructionMappingImpl(bool IsInvalid, unsigned ID = InvalidMappingID, + unsigned Cost = 0, + const ValueMapping *OperandsMapping = nullptr, + unsigned NumOperands = 0) const; + +public: + /// Method to get a uniquely generated InstructionMapping. + const InstructionMapping & + getInstructionMapping(unsigned ID, unsigned Cost, + const ValueMapping *OperandsMapping, + unsigned NumOperands) const { + return getInstructionMappingImpl(/*IsInvalid*/ false, ID, Cost, + OperandsMapping, NumOperands); + } + + /// Method to get a uniquely generated invalid InstructionMapping. + const InstructionMapping &getInvalidInstructionMapping() const { + return getInstructionMappingImpl(/*IsInvalid*/ true); + } + /// @} + /// Get the register bank for the \p OpIdx-th operand of \p MI form /// the encoding constraints, if any. /// @@ -603,7 +638,8 @@ public: /// /// \note If returnedVal does not verify MI, this would probably mean /// that the target does not support that instruction. - virtual InstructionMapping getInstrMapping(const MachineInstr &MI) const; + virtual const InstructionMapping & + getInstrMapping(const MachineInstr &MI) const; /// Get the alternative mappings for \p MI. /// Alternative in the sense different from getInstrMapping. Added: vendor/llvm/dist/include/llvm/CodeGen/MIRPrinter.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/llvm/dist/include/llvm/CodeGen/MIRPrinter.h Mon May 8 17:12:57 2017 (r317948) @@ -0,0 +1,46 @@ +//===- MIRPrinter.h - MIR serialization format printer --------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file declares the functions that print out the LLVM IR and the machine +// functions using the MIR serialization format. +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_LIB_CODEGEN_MIRPRINTER_H +#define LLVM_LIB_CODEGEN_MIRPRINTER_H + +namespace llvm { + +class MachineBasicBlock; +class MachineFunction; +class Module; +class raw_ostream; +template class SmallVectorImpl; + +/// Print LLVM IR using the MIR serialization format to the given output stream. +void printMIR(raw_ostream &OS, const Module &M); + +/// Print a machine function using the MIR serialization format to the given +/// output stream. +void printMIR(raw_ostream &OS, const MachineFunction &MF); + +/// Determine a possible list of successors of a basic block based on the +/// basic block machine operand being used inside the block. This should give +/// you the correct list of successor blocks in most cases except for things +/// like jump tables where the basic block references can't easily be found. +/// The MIRPRinter will skip printing successors if they match the result of +/// this funciton and the parser will use this function to construct a list if +/// it is missing. +void guessSuccessors(const MachineBasicBlock &MBB, + SmallVectorImpl &Successors, + bool &IsFallthrough); + +} // end namespace llvm + +#endif Modified: vendor/llvm/dist/include/llvm/CodeGen/MachineFrameInfo.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/MachineFrameInfo.h Mon May 8 17:02:03 2017 (r317947) +++ vendor/llvm/dist/include/llvm/CodeGen/MachineFrameInfo.h Mon May 8 17:12:57 2017 (r317948) @@ -520,6 +520,14 @@ public: bool hasTailCall() const { return HasTailCall; } void setHasTailCall() { HasTailCall = true; } + /// Computes the maximum size of a callframe and the AdjustsStack property. + /// This only works for targets defining + /// TargetInstrInfo::getCallFrameSetupOpcode(), getCallFrameDestroyOpcode(), + /// and getFrameSize(). + /// This is usually computed by the prologue epilogue inserter but some + /// targets may call this to compute it earlier. + void computeMaxCallFrameSize(const MachineFunction &MF); + /// Return the maximum size of a call frame that must be /// allocated for an outgoing function call. This is only available if /// CallFrameSetup/Destroy pseudo instructions are used by the target, and Modified: vendor/llvm/dist/include/llvm/CodeGen/MachineModuleInfo.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/MachineModuleInfo.h Mon May 8 17:02:03 2017 (r317947) +++ vendor/llvm/dist/include/llvm/CodeGen/MachineModuleInfo.h Mon May 8 17:12:57 2017 (r317948) @@ -116,7 +116,7 @@ class MachineModuleInfo : public Immutab // TODO: Ideally, what we'd like is to have a switch that allows emitting // synchronous (precise at call-sites only) CFA into .eh_frame. However, - // even under this switch, we'd like .debug_frame to be precise when using. + // even under this switch, we'd like .debug_frame to be precise when using // -g. At this moment, there's no way to specify that some CFI directives // go into .eh_frame only, while others go into .debug_frame only. Modified: vendor/llvm/dist/include/llvm/DebugInfo/CodeView/TypeDatabase.h ============================================================================== --- vendor/llvm/dist/include/llvm/DebugInfo/CodeView/TypeDatabase.h Mon May 8 17:02:03 2017 (r317947) +++ vendor/llvm/dist/include/llvm/DebugInfo/CodeView/TypeDatabase.h Mon May 8 17:12:57 2017 (r317948) @@ -21,7 +21,7 @@ namespace llvm { namespace codeview { class TypeDatabase { public: - TypeDatabase() : TypeNameStorage(Allocator) {} + explicit TypeDatabase(uint32_t ExpectedSize); /// Gets the type index for the next type record. TypeIndex getNextTypeIndex() const; Modified: vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFContext.h ============================================================================== --- vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFContext.h Mon May 8 17:02:03 2017 (r317947) +++ vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFContext.h Mon May 8 17:12:57 2017 (r317948) @@ -310,6 +310,11 @@ class DWARFContextInMemory : public DWAR StringRef *MapSectionToMember(StringRef Name); + /// If Sec is compressed section, decompresses and updates its contents + /// provided by Data. Otherwise leaves it unchanged. + Error maybeDecompress(const object::SectionRef &Sec, StringRef Name, + StringRef &Data); + public: DWARFContextInMemory(const object::ObjectFile &Obj, const LoadedObjectInfo *L = nullptr); Modified: vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFFormValue.h ============================================================================== --- vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFFormValue.h Mon May 8 17:02:03 2017 (r317947) +++ vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFFormValue.h Mon May 8 17:12:57 2017 (r317948) @@ -39,20 +39,18 @@ public: private: struct ValueType { - ValueType() { - uval = 0; - } + ValueType() { uval = 0; } union { uint64_t uval; int64_t sval; - const char* cstr; + const char *cstr; }; - const uint8_t* data = nullptr; + const uint8_t *data = nullptr; }; - dwarf::Form Form; // Form for this value. - ValueType Value; // Contains all data for the form. + dwarf::Form Form; // Form for this value. + ValueType Value; // Contains all data for the form. const DWARFUnit *U = nullptr; // Remember the DWARFUnit at extract time. public: @@ -84,7 +82,7 @@ public: const DWARFUnit *U); bool isInlinedCStr() const { - return Value.data != nullptr && Value.data == (const uint8_t*)Value.cstr; + return Value.data != nullptr && Value.data == (const uint8_t *)Value.cstr; } /// getAsFoo functions below return the extracted value as Foo if only @@ -135,45 +133,45 @@ public: uint8_t AddrSize, llvm::dwarf::DwarfFormat Format); - /// Skip a form in \p debug_info_data at offset specified by \p offset_ptr. + /// Skip a form in \p DebugInfoData at offset specified by \p OffsetPtr. /// /// Skips the bytes for this form in the debug info and updates the offset. /// - /// \param debug_info_data the .debug_info data to use to skip the value. - /// \param offset_ptr a reference to the offset that will be updated. + /// \param DebugInfoData the .debug_info data to use to skip the value. + /// \param OffsetPtr a reference to the offset that will be updated. /// \param U the DWARFUnit to use when skipping the form in case the form /// size differs according to data in the DWARFUnit. /// \returns true on success, false if the form was not skipped. - bool skipValue(DataExtractor debug_info_data, uint32_t *offset_ptr, + bool skipValue(DataExtractor DebugInfoData, uint32_t *OffsetPtr, const DWARFUnit *U) const; - /// Skip a form in \p debug_info_data at offset specified by \p offset_ptr. + /// Skip a form in \p DebugInfoData at offset specified by \p OffsetPtr. /// /// Skips the bytes for this form in the debug info and updates the offset. /// - /// \param form the DW_FORM enumeration that indicates the form to skip. - /// \param debug_info_data the .debug_info data to use to skip the value. - /// \param offset_ptr a reference to the offset that will be updated. + /// \param Form the DW_FORM enumeration that indicates the form to skip. + /// \param DebugInfoData the .debug_info data to use to skip the value. + /// \param OffsetPtr a reference to the offset that will be updated. /// \param U the DWARFUnit to use when skipping the form in case the form /// size differs according to data in the DWARFUnit. /// \returns true on success, false if the form was not skipped. - static bool skipValue(dwarf::Form form, DataExtractor debug_info_data, - uint32_t *offset_ptr, const DWARFUnit *U); + static bool skipValue(dwarf::Form Form, DataExtractor DebugInfoData, + uint32_t *OffsetPtr, const DWARFUnit *U); - /// Skip a form in \p debug_info_data at offset specified by \p offset_ptr. + /// Skip a form in \p DebugInfoData at offset specified by \p OffsetPtr. /// /// Skips the bytes for this form in the debug info and updates the offset. /// - /// \param form the DW_FORM enumeration that indicates the form to skip. - /// \param debug_info_data the .debug_info data to use to skip the value. - /// \param offset_ptr a reference to the offset that will be updated. + /// \param Form the DW_FORM enumeration that indicates the form to skip. + /// \param DebugInfoData the .debug_info data to use to skip the value. + /// \param OffsetPtr a reference to the offset that will be updated. /// \param Version DWARF version number. /// \param AddrSize size of an address in bytes. /// \param Format enum value from llvm::dwarf::DwarfFormat. /// \returns true on success, false if the form was not skipped. - static bool skipValue(dwarf::Form form, DataExtractor debug_info_data, - uint32_t *offset_ptr, uint16_t Version, - uint8_t AddrSize, llvm::dwarf::DwarfFormat Format); + static bool skipValue(dwarf::Form Form, DataExtractor DebugInfoData, + uint32_t *OffsetPtr, uint16_t Version, uint8_t AddrSize, + llvm::dwarf::DwarfFormat Format); private: void dumpString(raw_ostream &OS) const; @@ -181,149 +179,146 @@ private: namespace dwarf { - /// Take an optional DWARFFormValue and try to extract a string value from it. - /// - /// \param V and optional DWARFFormValue to attempt to extract the value from. - /// \returns an optional value that contains a value if the form value - /// was valid and was a string. - inline Optional toString(const Optional& V) { - if (V) - return V->getAsCString(); - return None; - } - - /// Take an optional DWARFFormValue and extract a string value from it. - /// - /// \param V and optional DWARFFormValue to attempt to extract the value from. - /// \param Default the default value to return in case of failure. - /// \returns the string value or Default if the V doesn't have a value or the - /// form value's encoding wasn't a string. - inline const char* - toString(const Optional& V, const char *Default) { - return toString(V).getValueOr(Default); - } - - /// Take an optional DWARFFormValue and try to extract an unsigned constant. - /// - /// \param V and optional DWARFFormValue to attempt to extract the value from. - /// \returns an optional value that contains a value if the form value - /// was valid and has a unsigned constant form. - inline Optional toUnsigned(const Optional& V) { - if (V) - return V->getAsUnsignedConstant(); - return None; - } - - /// Take an optional DWARFFormValue and extract a unsigned constant. - /// - /// \param V and optional DWARFFormValue to attempt to extract the value from. - /// \param Default the default value to return in case of failure. - /// \returns the extracted unsigned value or Default if the V doesn't have a - /// value or the form value's encoding wasn't an unsigned constant form. - inline uint64_t - toUnsigned(const Optional& V, uint64_t Default) { - return toUnsigned(V).getValueOr(Default); - } - - /// Take an optional DWARFFormValue and try to extract an reference. - /// - /// \param V and optional DWARFFormValue to attempt to extract the value from. - /// \returns an optional value that contains a value if the form value - /// was valid and has a reference form. - inline Optional toReference(const Optional& V) { - if (V) - return V->getAsReference(); - return None; - } - - /// Take an optional DWARFFormValue and extract a reference. - /// - /// \param V and optional DWARFFormValue to attempt to extract the value from. - /// \param Default the default value to return in case of failure. - /// \returns the extracted reference value or Default if the V doesn't have a - /// value or the form value's encoding wasn't a reference form. - inline uint64_t - toReference(const Optional& V, uint64_t Default) { - return toReference(V).getValueOr(Default); - } - - /// Take an optional DWARFFormValue and try to extract an signed constant. - /// - /// \param V and optional DWARFFormValue to attempt to extract the value from. - /// \returns an optional value that contains a value if the form value - /// was valid and has a signed constant form. - inline Optional toSigned(const Optional& V) { - if (V) - return V->getAsSignedConstant(); - return None; - } - - /// Take an optional DWARFFormValue and extract a signed integer. - /// - /// \param V and optional DWARFFormValue to attempt to extract the value from. - /// \param Default the default value to return in case of failure. - /// \returns the extracted signed integer value or Default if the V doesn't - /// have a value or the form value's encoding wasn't a signed integer form. - inline int64_t - toSigned(const Optional& V, int64_t Default) { - return toSigned(V).getValueOr(Default); - } - - /// Take an optional DWARFFormValue and try to extract an address. - /// - /// \param V and optional DWARFFormValue to attempt to extract the value from. - /// \returns an optional value that contains a value if the form value - /// was valid and has a address form. - inline Optional toAddress(const Optional& V) { - if (V) - return V->getAsAddress(); - return None; - } - - /// Take an optional DWARFFormValue and extract a address. - /// - /// \param V and optional DWARFFormValue to attempt to extract the value from. - /// \param Default the default value to return in case of failure. - /// \returns the extracted address value or Default if the V doesn't have a - /// value or the form value's encoding wasn't an address form. - inline uint64_t - toAddress(const Optional& V, uint64_t Default) { - return toAddress(V).getValueOr(Default); - } - - /// Take an optional DWARFFormValue and try to extract an section offset. - /// - /// \param V and optional DWARFFormValue to attempt to extract the value from. - /// \returns an optional value that contains a value if the form value - /// was valid and has a section offset form. - inline Optional toSectionOffset(const Optional& V) { - if (V) - return V->getAsSectionOffset(); - return None; - } - - /// Take an optional DWARFFormValue and extract a section offset. - /// - /// \param V and optional DWARFFormValue to attempt to extract the value from. - /// \param Default the default value to return in case of failure. - /// \returns the extracted section offset value or Default if the V doesn't - /// have a value or the form value's encoding wasn't a section offset form. - inline uint64_t - toSectionOffset(const Optional& V, uint64_t Default) { - return toSectionOffset(V).getValueOr(Default); - } - - /// Take an optional DWARFFormValue and try to extract block data. - /// - /// \param V and optional DWARFFormValue to attempt to extract the value from. - /// \returns an optional value that contains a value if the form value - /// was valid and has a block form. - inline Optional> - toBlock(const Optional& V) { - if (V) - return V->getAsBlock(); - return None; - } +/// Take an optional DWARFFormValue and try to extract a string value from it. +/// +/// \param V and optional DWARFFormValue to attempt to extract the value from. +/// \returns an optional value that contains a value if the form value +/// was valid and was a string. +inline Optional toString(const Optional &V) { + if (V) + return V->getAsCString(); + return None; +} + +/// Take an optional DWARFFormValue and extract a string value from it. +/// +/// \param V and optional DWARFFormValue to attempt to extract the value from. +/// \param Default the default value to return in case of failure. +/// \returns the string value or Default if the V doesn't have a value or the +/// form value's encoding wasn't a string. +inline const char *toString(const Optional &V, + const char *Default) { + return toString(V).getValueOr(Default); +} + +/// Take an optional DWARFFormValue and try to extract an unsigned constant. +/// +/// \param V and optional DWARFFormValue to attempt to extract the value from. +/// \returns an optional value that contains a value if the form value +/// was valid and has a unsigned constant form. +inline Optional toUnsigned(const Optional &V) { + if (V) + return V->getAsUnsignedConstant(); + return None; +} + +/// Take an optional DWARFFormValue and extract a unsigned constant. +/// +/// \param V and optional DWARFFormValue to attempt to extract the value from. +/// \param Default the default value to return in case of failure. +/// \returns the extracted unsigned value or Default if the V doesn't have a +/// value or the form value's encoding wasn't an unsigned constant form. +inline uint64_t toUnsigned(const Optional &V, + uint64_t Default) { + return toUnsigned(V).getValueOr(Default); +} + +/// Take an optional DWARFFormValue and try to extract an reference. +/// +/// \param V and optional DWARFFormValue to attempt to extract the value from. +/// \returns an optional value that contains a value if the form value +/// was valid and has a reference form. +inline Optional toReference(const Optional &V) { + if (V) + return V->getAsReference(); + return None; +} + +/// Take an optional DWARFFormValue and extract a reference. +/// +/// \param V and optional DWARFFormValue to attempt to extract the value from. +/// \param Default the default value to return in case of failure. +/// \returns the extracted reference value or Default if the V doesn't have a +/// value or the form value's encoding wasn't a reference form. +inline uint64_t toReference(const Optional &V, + uint64_t Default) { + return toReference(V).getValueOr(Default); +} + +/// Take an optional DWARFFormValue and try to extract an signed constant. +/// +/// \param V and optional DWARFFormValue to attempt to extract the value from. +/// \returns an optional value that contains a value if the form value +/// was valid and has a signed constant form. +inline Optional toSigned(const Optional &V) { + if (V) + return V->getAsSignedConstant(); + return None; +} + +/// Take an optional DWARFFormValue and extract a signed integer. +/// +/// \param V and optional DWARFFormValue to attempt to extract the value from. +/// \param Default the default value to return in case of failure. +/// \returns the extracted signed integer value or Default if the V doesn't +/// have a value or the form value's encoding wasn't a signed integer form. +inline int64_t toSigned(const Optional &V, int64_t Default) { + return toSigned(V).getValueOr(Default); +} + +/// Take an optional DWARFFormValue and try to extract an address. +/// +/// \param V and optional DWARFFormValue to attempt to extract the value from. +/// \returns an optional value that contains a value if the form value +/// was valid and has a address form. +inline Optional toAddress(const Optional &V) { + if (V) + return V->getAsAddress(); + return None; +} + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon May 8 17:13:07 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0FCFCD634E5; Mon, 8 May 2017 17:13:07 +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 9001D850; Mon, 8 May 2017 17:13:06 +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 v48HD50V042594; Mon, 8 May 2017 17:13:05 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v48HD5vw042593; Mon, 8 May 2017 17:13:05 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201705081713.v48HD5vw042593@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 17:13:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r317950 - vendor/llvm/llvm-trunk-r302418 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 17:13:07 -0000 Author: dim Date: Mon May 8 17:13:05 2017 New Revision: 317950 URL: https://svnweb.freebsd.org/changeset/base/317950 Log: Tag llvm trunk r302418. Added: vendor/llvm/llvm-trunk-r302418/ - copied from r317949, vendor/llvm/dist/ From owner-svn-src-all@freebsd.org Mon May 8 17:13:37 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 96138D6362C; Mon, 8 May 2017 17:13:37 +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 3304AA47; Mon, 8 May 2017 17:13:37 +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 v48HDa6k042911; Mon, 8 May 2017 17:13:36 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v48HDYuG042894; Mon, 8 May 2017 17:13:34 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201705081713.v48HDYuG042894@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 17:13:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r317955 - in vendor/libc++/dist: . docs docs/DesignDocs include include/experimental include/support/win32 lib src src/experimental/filesystem src/support/runtime test/libcxx/algorithms... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 17:13:37 -0000 Author: dim Date: Mon May 8 17:13:34 2017 New Revision: 317955 URL: https://svnweb.freebsd.org/changeset/base/317955 Log: Vendor import of libc++ trunk r302418: https://llvm.org/svn/llvm-project/libcxx/trunk@302418 Added: vendor/libc++/dist/docs/DesignDocs/AvailabilityMarkup.rst vendor/libc++/dist/install-appveyor-reqs.cmd vendor/libc++/dist/src/support/runtime/exception_pointer_msvc.ipp vendor/libc++/dist/test/libcxx/experimental/containers/sequences/dynarray/lit.local.cfg vendor/libc++/dist/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/minmax_showbase.pass.cpp (contents, props changed) vendor/libc++/dist/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/lit.local.cfg vendor/libc++/dist/test/std/thread/thread.mutex/thread.mutex.requirements/thread.shared_mutex.requirements/lit.local.cfg vendor/libc++/dist/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/lit.local.cfg vendor/libc++/dist/test/support/test.workarounds/c1xx_broken_is_trivially_copyable.pass.cpp (contents, props changed) Modified: vendor/libc++/dist/CMakeLists.txt vendor/libc++/dist/appveyor.yml vendor/libc++/dist/docs/index.rst vendor/libc++/dist/include/__config vendor/libc++/dist/include/__locale vendor/libc++/dist/include/__threading_support vendor/libc++/dist/include/exception vendor/libc++/dist/include/experimental/dynarray vendor/libc++/dist/include/experimental/optional vendor/libc++/dist/include/functional vendor/libc++/dist/include/future vendor/libc++/dist/include/istream vendor/libc++/dist/include/locale vendor/libc++/dist/include/memory vendor/libc++/dist/include/new vendor/libc++/dist/include/ostream vendor/libc++/dist/include/random vendor/libc++/dist/include/shared_mutex vendor/libc++/dist/include/streambuf vendor/libc++/dist/include/support/win32/locale_win32.h vendor/libc++/dist/include/typeinfo vendor/libc++/dist/lib/CMakeLists.txt vendor/libc++/dist/src/exception.cpp vendor/libc++/dist/src/experimental/filesystem/operations.cpp vendor/libc++/dist/src/locale.cpp vendor/libc++/dist/src/memory.cpp vendor/libc++/dist/test/libcxx/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle.cxx1z.pass.cpp vendor/libc++/dist/test/libcxx/containers/sequences/list/list.cons/db_copy.pass.cpp vendor/libc++/dist/test/libcxx/containers/sequences/list/list.cons/db_move.pass.cpp vendor/libc++/dist/test/libcxx/containers/sequences/list/list.modifiers/emplace_db1.pass.cpp vendor/libc++/dist/test/libcxx/containers/sequences/list/list.modifiers/erase_iter_db1.pass.cpp vendor/libc++/dist/test/libcxx/containers/sequences/list/list.modifiers/erase_iter_db2.pass.cpp vendor/libc++/dist/test/libcxx/containers/sequences/list/list.modifiers/erase_iter_iter_db1.pass.cpp vendor/libc++/dist/test/libcxx/containers/sequences/list/list.modifiers/erase_iter_iter_db2.pass.cpp vendor/libc++/dist/test/libcxx/containers/sequences/list/list.modifiers/erase_iter_iter_db3.pass.cpp vendor/libc++/dist/test/libcxx/containers/sequences/list/list.modifiers/erase_iter_iter_db4.pass.cpp vendor/libc++/dist/test/libcxx/containers/sequences/list/list.modifiers/insert_iter_iter_iter_db1.pass.cpp vendor/libc++/dist/test/libcxx/containers/sequences/list/list.modifiers/insert_iter_rvalue_db1.pass.cpp vendor/libc++/dist/test/libcxx/containers/sequences/list/list.modifiers/insert_iter_size_value_db1.pass.cpp vendor/libc++/dist/test/libcxx/containers/sequences/list/list.modifiers/insert_iter_value_db1.pass.cpp vendor/libc++/dist/test/libcxx/containers/sequences/list/list.modifiers/pop_back_db1.pass.cpp vendor/libc++/dist/test/libcxx/containers/sequences/list/list.ops/db_splice_pos_list.pass.cpp vendor/libc++/dist/test/libcxx/containers/sequences/list/list.ops/db_splice_pos_list_iter.pass.cpp vendor/libc++/dist/test/libcxx/containers/sequences/list/list.ops/db_splice_pos_list_iter_iter.pass.cpp vendor/libc++/dist/test/libcxx/debug/containers/db_associative_container_tests.pass.cpp vendor/libc++/dist/test/libcxx/debug/containers/db_sequence_container_iterators.pass.cpp vendor/libc++/dist/test/libcxx/debug/containers/db_string.pass.cpp vendor/libc++/dist/test/libcxx/debug/containers/db_unord_container_tests.pass.cpp vendor/libc++/dist/test/libcxx/debug/debug_abort.pass.cpp vendor/libc++/dist/test/libcxx/debug/debug_throw.pass.cpp vendor/libc++/dist/test/libcxx/debug/debug_throw_register.pass.cpp vendor/libc++/dist/test/libcxx/depr/depr.function.objects/depr.adaptors.cxx1z.pass.cpp vendor/libc++/dist/test/libcxx/experimental/containers/sequences/dynarray/dynarray.cons/default.pass.cpp vendor/libc++/dist/test/libcxx/experimental/containers/sequences/dynarray/dynarray.cons/default_throws_bad_alloc.pass.cpp vendor/libc++/dist/test/libcxx/experimental/containers/sequences/dynarray/dynarray.data/default.pass.cpp vendor/libc++/dist/test/libcxx/experimental/containers/sequences/dynarray/dynarray.mutate/default.pass.cpp vendor/libc++/dist/test/libcxx/experimental/containers/sequences/dynarray/dynarray.overview/at.pass.cpp vendor/libc++/dist/test/libcxx/experimental/containers/sequences/dynarray/dynarray.overview/begin_end.pass.cpp vendor/libc++/dist/test/libcxx/experimental/containers/sequences/dynarray/dynarray.overview/capacity.pass.cpp vendor/libc++/dist/test/libcxx/experimental/containers/sequences/dynarray/dynarray.overview/front_back.pass.cpp vendor/libc++/dist/test/libcxx/experimental/containers/sequences/dynarray/dynarray.overview/indexing.pass.cpp vendor/libc++/dist/test/libcxx/experimental/containers/sequences/dynarray/dynarray.zero/default.pass.cpp vendor/libc++/dist/test/libcxx/language.support/support.dynamic/alloc.errors/new.badlength/bad_array_length.pass.cpp vendor/libc++/dist/test/libcxx/language.support/support.dynamic/new_faligned_allocation.sh.cpp vendor/libc++/dist/test/libcxx/thread/futures/futures.promise/set_exception.pass.cpp vendor/libc++/dist/test/libcxx/thread/futures/futures.promise/set_exception_at_thread_exit.pass.cpp vendor/libc++/dist/test/std/algorithms/alg.modifying.operations/alg.remove/remove_copy_if.pass.cpp vendor/libc++/dist/test/std/algorithms/alg.nonmodifying/alg.count/count_if.pass.cpp vendor/libc++/dist/test/std/algorithms/alg.nonmodifying/alg.find/find_if.pass.cpp vendor/libc++/dist/test/std/algorithms/alg.nonmodifying/alg.find/find_if_not.pass.cpp vendor/libc++/dist/test/std/containers/sequences/vector.bool/emplace_back.pass.cpp vendor/libc++/dist/test/std/containers/sequences/vector.bool/vector_bool.pass.cpp vendor/libc++/dist/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.members/overflow.pass.cpp vendor/libc++/dist/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/generic_category.pass.cpp vendor/libc++/dist/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/system_category.pass.cpp vendor/libc++/dist/test/std/experimental/any/any.class/any.assign/copy.pass.cpp vendor/libc++/dist/test/std/experimental/any/any.class/any.assign/move.pass.cpp vendor/libc++/dist/test/std/experimental/any/any.class/any.assign/value.pass.cpp vendor/libc++/dist/test/std/experimental/any/any.class/any.cons/copy.pass.cpp vendor/libc++/dist/test/std/experimental/any/any.class/any.cons/move.pass.cpp vendor/libc++/dist/test/std/experimental/any/any.class/any.cons/value.pass.cpp vendor/libc++/dist/test/std/experimental/any/any.class/any.modifiers/clear.pass.cpp vendor/libc++/dist/test/std/experimental/any/any.class/any.modifiers/swap.pass.cpp vendor/libc++/dist/test/std/experimental/any/any.nonmembers/any.cast/any_cast_reference.pass.cpp vendor/libc++/dist/test/std/experimental/any/any.nonmembers/any.cast/not_copy_constructible.fail.cpp vendor/libc++/dist/test/std/experimental/any/any.nonmembers/swap.pass.cpp vendor/libc++/dist/test/std/experimental/optional/optional.bad_optional_access/default.pass.cpp vendor/libc++/dist/test/std/experimental/optional/optional.bad_optional_access/derive.pass.cpp vendor/libc++/dist/test/std/experimental/optional/optional.object/optional.object.observe/value.pass.cpp vendor/libc++/dist/test/std/experimental/optional/optional.object/optional.object.observe/value_const.pass.cpp vendor/libc++/dist/test/std/input.output/file.streams/fstreams/fstream.assign/member_swap.pass.cpp vendor/libc++/dist/test/std/input.output/file.streams/fstreams/fstream.assign/nonmember_swap.pass.cpp vendor/libc++/dist/test/std/input.output/file.streams/fstreams/ofstream.assign/member_swap.pass.cpp vendor/libc++/dist/test/std/input.output/file.streams/fstreams/ofstream.assign/nonmember_swap.pass.cpp vendor/libc++/dist/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/pointer.pass.cpp vendor/libc++/dist/test/std/input.output/iostream.format/input.streams/istream.unformatted/get.pass.cpp vendor/libc++/dist/test/std/input.output/iostream.format/input.streams/istream.unformatted/get_chart.pass.cpp vendor/libc++/dist/test/std/input.output/iostream.format/input.streams/istream.unformatted/ignore_0xff.pass.cpp vendor/libc++/dist/test/std/input.output/iostream.format/input.streams/istream.unformatted/read.pass.cpp vendor/libc++/dist/test/std/input.output/iostream.format/input.streams/istream.unformatted/readsome.pass.cpp vendor/libc++/dist/test/std/input.output/iostream.format/input.streams/istream.unformatted/seekg.pass.cpp vendor/libc++/dist/test/std/input.output/iostream.format/input.streams/istream.unformatted/seekg_off.pass.cpp vendor/libc++/dist/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/minus1.pass.cpp vendor/libc++/dist/test/std/iterators/stream.iterators/istream.iterator/types.pass.cpp vendor/libc++/dist/test/std/iterators/stream.iterators/ostream.iterator/types.pass.cpp vendor/libc++/dist/test/std/iterators/stream.iterators/ostreambuf.iterator/types.pass.cpp vendor/libc++/dist/test/std/language.support/support.dynamic/new.delete/new.delete.array/delete_align_val_t_replace.pass.cpp vendor/libc++/dist/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t.pass.cpp vendor/libc++/dist/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_nothrow.pass.cpp vendor/libc++/dist/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_nothrow_replace.pass.cpp vendor/libc++/dist/test/std/language.support/support.dynamic/new.delete/new.delete.array/sized_delete_array_fsizeddeallocation.sh.cpp vendor/libc++/dist/test/std/language.support/support.dynamic/new.delete/new.delete.single/delete_align_val_t_replace.pass.cpp vendor/libc++/dist/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t.pass.cpp vendor/libc++/dist/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_nothrow.pass.cpp vendor/libc++/dist/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_nothrow_replace.pass.cpp vendor/libc++/dist/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete_fsizeddeallocation.sh.cpp vendor/libc++/dist/test/std/language.support/support.exception/except.nested/assign.pass.cpp vendor/libc++/dist/test/std/language.support/support.exception/except.nested/ctor_copy.pass.cpp vendor/libc++/dist/test/std/language.support/support.exception/except.nested/ctor_default.pass.cpp vendor/libc++/dist/test/std/language.support/support.exception/except.nested/rethrow_if_nested.pass.cpp vendor/libc++/dist/test/std/language.support/support.exception/except.nested/rethrow_nested.pass.cpp vendor/libc++/dist/test/std/language.support/support.exception/except.nested/throw_with_nested.pass.cpp vendor/libc++/dist/test/std/language.support/support.exception/propagation/current_exception.pass.cpp vendor/libc++/dist/test/std/language.support/support.exception/propagation/exception_ptr.pass.cpp vendor/libc++/dist/test/std/language.support/support.exception/propagation/make_exception_ptr.pass.cpp vendor/libc++/dist/test/std/language.support/support.exception/propagation/rethrow_exception.pass.cpp vendor/libc++/dist/test/std/language.support/support.exception/uncaught/uncaught_exceptions.pass.cpp vendor/libc++/dist/test/std/language.support/support.types/byte.pass.cpp vendor/libc++/dist/test/std/language.support/support.types/byteops/lshift.assign.fail.cpp vendor/libc++/dist/test/std/language.support/support.types/byteops/lshift.assign.pass.cpp vendor/libc++/dist/test/std/language.support/support.types/byteops/lshift.fail.cpp vendor/libc++/dist/test/std/language.support/support.types/byteops/lshift.pass.cpp vendor/libc++/dist/test/std/language.support/support.types/byteops/rshift.assign.fail.cpp vendor/libc++/dist/test/std/language.support/support.types/byteops/rshift.assign.pass.cpp vendor/libc++/dist/test/std/language.support/support.types/byteops/rshift.fail.cpp vendor/libc++/dist/test/std/language.support/support.types/byteops/rshift.pass.cpp vendor/libc++/dist/test/std/language.support/support.types/byteops/to_integer.fail.cpp vendor/libc++/dist/test/std/language.support/support.types/byteops/to_integer.pass.cpp vendor/libc++/dist/test/std/localization/locale.categories/category.ctype/ctype_base.pass.cpp vendor/libc++/dist/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_1.pass.cpp vendor/libc++/dist/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_many.pass.cpp vendor/libc++/dist/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_1.pass.cpp vendor/libc++/dist/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_many.pass.cpp vendor/libc++/dist/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_ru_RU.pass.cpp vendor/libc++/dist/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_ru_RU.pass.cpp vendor/libc++/dist/test/std/localization/locale.categories/category.monetary/locale.moneypunct/types.pass.cpp vendor/libc++/dist/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_double.pass.cpp vendor/libc++/dist/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_float.pass.cpp vendor/libc++/dist/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_long_double.pass.cpp vendor/libc++/dist/test/std/localization/locales/locale/locale.cons/locale_char_pointer_cat.pass.cpp vendor/libc++/dist/test/std/localization/locales/locale/locale.cons/locale_locale_cat.pass.cpp vendor/libc++/dist/test/std/localization/locales/locale/locale.cons/locale_string_cat.pass.cpp vendor/libc++/dist/test/std/localization/locales/locale/locale.types/locale.category/category.pass.cpp vendor/libc++/dist/test/std/numerics/complex.number/complex.ops/stream_input.pass.cpp vendor/libc++/dist/test/std/numerics/rand/rand.device/ctor.pass.cpp vendor/libc++/dist/test/std/numerics/rand/rand.device/eval.pass.cpp vendor/libc++/dist/test/std/re/re.alg/re.alg.match/awk.pass.cpp vendor/libc++/dist/test/std/re/re.traits/translate_nocase.pass.cpp vendor/libc++/dist/test/std/strings/basic.string/string.capacity/over_max_size.pass.cpp vendor/libc++/dist/test/std/strings/string.conversions/stof.pass.cpp vendor/libc++/dist/test/std/strings/string.conversions/stol.pass.cpp vendor/libc++/dist/test/std/strings/string.conversions/stoll.pass.cpp vendor/libc++/dist/test/std/strings/string.conversions/stoul.pass.cpp vendor/libc++/dist/test/std/strings/string.conversions/stoull.pass.cpp vendor/libc++/dist/test/std/thread/futures/futures.future_error/what.pass.cpp vendor/libc++/dist/test/std/thread/thread.mutex/thread.lock/thread.lock.guard/mutex.pass.cpp vendor/libc++/dist/test/std/thread/thread.mutex/thread.lock/thread.lock.scoped/mutex.pass.cpp vendor/libc++/dist/test/std/thread/thread.threads/thread.thread.this/sleep_for.pass.cpp vendor/libc++/dist/test/std/utilities/any/any.class/any.assign/copy.pass.cpp vendor/libc++/dist/test/std/utilities/any/any.class/any.assign/move.pass.cpp vendor/libc++/dist/test/std/utilities/any/any.class/any.assign/value.pass.cpp vendor/libc++/dist/test/std/utilities/any/any.class/any.cons/copy.pass.cpp vendor/libc++/dist/test/std/utilities/any/any.class/any.cons/in_place_type.pass.cpp vendor/libc++/dist/test/std/utilities/any/any.class/any.cons/move.pass.cpp vendor/libc++/dist/test/std/utilities/any/any.class/any.cons/value.pass.cpp vendor/libc++/dist/test/std/utilities/any/any.class/any.modifiers/emplace.pass.cpp vendor/libc++/dist/test/std/utilities/any/any.class/any.modifiers/reset.pass.cpp vendor/libc++/dist/test/std/utilities/any/any.class/any.modifiers/swap.pass.cpp vendor/libc++/dist/test/std/utilities/any/any.nonmembers/any.cast/any_cast_pointer.pass.cpp vendor/libc++/dist/test/std/utilities/any/any.nonmembers/any.cast/any_cast_reference.pass.cpp vendor/libc++/dist/test/std/utilities/any/any.nonmembers/make_any.pass.cpp vendor/libc++/dist/test/std/utilities/any/any.nonmembers/swap.pass.cpp vendor/libc++/dist/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_compare_exchange_strong.pass.cpp vendor/libc++/dist/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_compare_exchange_strong_explicit.pass.cpp vendor/libc++/dist/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_compare_exchange_weak.pass.cpp vendor/libc++/dist/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_compare_exchange_weak_explicit.pass.cpp vendor/libc++/dist/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_exchange.pass.cpp vendor/libc++/dist/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_exchange_explicit.pass.cpp vendor/libc++/dist/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_load.pass.cpp vendor/libc++/dist/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_load_explicit.pass.cpp vendor/libc++/dist/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_store.pass.cpp vendor/libc++/dist/test/std/utilities/memory/util.smartptr/util.smartptr.shared.atomic/atomic_store_explicit.pass.cpp vendor/libc++/dist/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.ownerless/owner_less.pass.cpp vendor/libc++/dist/test/std/utilities/meta/meta.unary/meta.unary.cat/is_function.pass.cpp vendor/libc++/dist/test/std/utilities/meta/meta.unary/meta.unary.cat/member_function_pointer.pass.cpp vendor/libc++/dist/test/std/utilities/optional/optional.bad_optional_access/default.pass.cpp vendor/libc++/dist/test/std/utilities/optional/optional.object/optional.object.ctor/U.pass.cpp vendor/libc++/dist/test/std/utilities/optional/optional.object/optional.object.ctor/const_T.pass.cpp vendor/libc++/dist/test/std/utilities/optional/optional.object/optional.object.ctor/copy.fail.cpp vendor/libc++/dist/test/std/utilities/optional/optional.object/optional.object.ctor/move.fail.cpp vendor/libc++/dist/test/std/utilities/optional/optional.object/optional.object.ctor/move.pass.cpp vendor/libc++/dist/test/std/utilities/optional/optional.object/optional.object.ctor/rvalue_T.pass.cpp vendor/libc++/dist/test/std/utilities/optional/optional.object/optional.object.observe/value.pass.cpp vendor/libc++/dist/test/std/utilities/optional/optional.object/optional.object.observe/value_const.pass.cpp vendor/libc++/dist/test/std/utilities/optional/optional.object/optional.object.observe/value_const_rvalue.pass.cpp vendor/libc++/dist/test/std/utilities/optional/optional.object/optional.object.observe/value_rvalue.pass.cpp vendor/libc++/dist/test/std/utilities/template.bitset/bitset.cons/char_ptr_ctor.pass.cpp vendor/libc++/dist/test/std/utilities/template.bitset/bitset.cons/default.pass.cpp vendor/libc++/dist/test/std/utilities/template.bitset/bitset.cons/string_ctor.pass.cpp vendor/libc++/dist/test/std/utilities/template.bitset/bitset.cons/ull_ctor.pass.cpp vendor/libc++/dist/test/std/utilities/template.bitset/bitset.hash/bitset.pass.cpp vendor/libc++/dist/test/std/utilities/template.bitset/bitset.members/count.pass.cpp vendor/libc++/dist/test/std/utilities/template.bitset/bitset.members/flip_all.pass.cpp vendor/libc++/dist/test/std/utilities/template.bitset/bitset.members/flip_one.pass.cpp vendor/libc++/dist/test/std/utilities/template.bitset/bitset.members/index.pass.cpp vendor/libc++/dist/test/std/utilities/template.bitset/bitset.members/index_const.pass.cpp vendor/libc++/dist/test/std/utilities/template.bitset/bitset.members/left_shift.pass.cpp vendor/libc++/dist/test/std/utilities/template.bitset/bitset.members/left_shift_eq.pass.cpp vendor/libc++/dist/test/std/utilities/template.bitset/bitset.members/not_all.pass.cpp vendor/libc++/dist/test/std/utilities/template.bitset/bitset.members/op_and_eq.pass.cpp vendor/libc++/dist/test/std/utilities/template.bitset/bitset.members/op_eq_eq.pass.cpp vendor/libc++/dist/test/std/utilities/template.bitset/bitset.members/op_or_eq.pass.cpp vendor/libc++/dist/test/std/utilities/template.bitset/bitset.members/op_xor_eq.pass.cpp vendor/libc++/dist/test/std/utilities/template.bitset/bitset.members/reset_all.pass.cpp vendor/libc++/dist/test/std/utilities/template.bitset/bitset.members/right_shift.pass.cpp vendor/libc++/dist/test/std/utilities/template.bitset/bitset.members/right_shift_eq.pass.cpp vendor/libc++/dist/test/std/utilities/template.bitset/bitset.members/set_all.pass.cpp vendor/libc++/dist/test/std/utilities/template.bitset/bitset.members/test.pass.cpp vendor/libc++/dist/test/std/utilities/template.bitset/bitset.members/to_string.pass.cpp vendor/libc++/dist/test/std/utilities/template.bitset/bitset.operators/op_and.pass.cpp vendor/libc++/dist/test/std/utilities/template.bitset/bitset.operators/op_not.pass.cpp vendor/libc++/dist/test/std/utilities/template.bitset/bitset.operators/op_or.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.clock/time.clock.hires/consistency.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.clock/time.clock.steady/consistency.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.clock/time.clock.system/consistency.pass.cpp vendor/libc++/dist/test/std/utilities/variant/variant.bad_variant_access/bad_variant_access.pass.cpp vendor/libc++/dist/test/std/utilities/variant/variant.get/get_index.pass.cpp vendor/libc++/dist/test/std/utilities/variant/variant.get/get_type.pass.cpp vendor/libc++/dist/test/std/utilities/variant/variant.variant/variant.assign/T.pass.cpp vendor/libc++/dist/test/std/utilities/variant/variant.variant/variant.assign/copy.pass.cpp vendor/libc++/dist/test/std/utilities/variant/variant.variant/variant.assign/move.pass.cpp vendor/libc++/dist/test/std/utilities/variant/variant.variant/variant.ctor/copy.pass.cpp vendor/libc++/dist/test/std/utilities/variant/variant.variant/variant.ctor/default.pass.cpp vendor/libc++/dist/test/std/utilities/variant/variant.variant/variant.ctor/in_place_index_args.pass.cpp vendor/libc++/dist/test/std/utilities/variant/variant.variant/variant.ctor/in_place_type_args.pass.cpp vendor/libc++/dist/test/std/utilities/variant/variant.variant/variant.ctor/move.pass.cpp vendor/libc++/dist/test/std/utilities/variant/variant.variant/variant.mod/emplace_index_args.pass.cpp vendor/libc++/dist/test/std/utilities/variant/variant.variant/variant.mod/emplace_index_init_list_args.pass.cpp vendor/libc++/dist/test/std/utilities/variant/variant.variant/variant.mod/emplace_type_args.pass.cpp vendor/libc++/dist/test/std/utilities/variant/variant.variant/variant.mod/emplace_type_init_list_args.pass.cpp vendor/libc++/dist/test/std/utilities/variant/variant.variant/variant.swap/swap.pass.cpp vendor/libc++/dist/test/std/utilities/variant/variant.visit/visit.pass.cpp vendor/libc++/dist/test/support/msvc_stdlib_force_include.hpp vendor/libc++/dist/test/support/test_macros.h vendor/libc++/dist/test/support/test_workarounds.h vendor/libc++/dist/utils/libcxx/test/config.py vendor/libc++/dist/utils/libcxx/test/target_info.py Modified: vendor/libc++/dist/CMakeLists.txt ============================================================================== --- vendor/libc++/dist/CMakeLists.txt Mon May 8 17:13:29 2017 (r317954) +++ vendor/libc++/dist/CMakeLists.txt Mon May 8 17:13:34 2017 (r317955) @@ -344,7 +344,11 @@ set(LIBCXX_COMPILER ${CMAKE_CXX_COMPI set(LIBCXX_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}) set(LIBCXX_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}) set(LIBCXX_BINARY_INCLUDE_DIR "${LIBCXX_BINARY_DIR}/include/c++build") -set(LIBCXX_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LIBCXX_LIBDIR_SUFFIX}) +if (LLVM_LIBRARY_OUTPUT_INTDIR) + set(LIBCXX_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}) +else() + set(LIBCXX_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LIBCXX_LIBDIR_SUFFIX}) +endif() file(MAKE_DIRECTORY "${LIBCXX_BINARY_INCLUDE_DIR}") set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${LIBCXX_LIBRARY_DIR}) @@ -627,7 +631,12 @@ endif() # Create the lit.site.cfg file even when LIBCXX_INCLUDE_TESTS is OFF or # LLVM_FOUND is OFF. This allows users to run the tests manually using # LIT without requiring a full LLVM checkout. -add_subdirectory(test) +# +# However, since some submission systems strip test/ subdirectories, check for +# it before adding it. +if(IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/test") + add_subdirectory(test) +endif() if (LIBCXX_INCLUDE_TESTS) add_subdirectory(lib/abi) endif() Modified: vendor/libc++/dist/appveyor.yml ============================================================================== --- vendor/libc++/dist/appveyor.yml Mon May 8 17:13:29 2017 (r317954) +++ vendor/libc++/dist/appveyor.yml Mon May 8 17:13:34 2017 (r317955) @@ -2,65 +2,34 @@ version: '{build}' shallow_clone: true -os: - - Visual Studio 2015 - build: verbosity: detailed -branches: - only: - - master - configuration: - Debug environment: matrix: - - COMPILER: Clang-CL 4.0 + - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 + CLANG_VERSION: ToT + MSVC_SETUP_PATH: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat + MSVC_SETUP_ARG: x86 + APPVEYOR_SAVE_CACHE_ON_ERROR: true + - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 + CLANG_VERSION: 4 + MSVC_SETUP_PATH: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat + MSVC_SETUP_ARG: x86_amd64 + APPVEYOR_SAVE_CACHE_ON_ERROR: true install: ############################################################################ # All external dependencies are installed in C:\projects\deps ############################################################################ - - mkdir C:\projects\deps - - cd C:\projects\deps - - ############################################################################ - # Install Ninja - ############################################################################ - - set NINJA_URL="https://github.com/ninja-build/ninja/releases/download/v1.6.0/ninja-win.zip" - - appveyor DownloadFile %NINJA_URL% -FileName ninja.zip - - 7z x ninja.zip -oC:\projects\deps\ninja > nul - - set PATH=C:\projects\deps\ninja;%PATH% - - ninja --version - - ############################################################################ - # Install a recent CMake - ############################################################################ - - set CMAKE_URL="https://cmake.org/files/v3.7/cmake-3.7.2-win64-x64.zip" - - appveyor DownloadFile %CMAKE_URL% -FileName cmake.zip - - 7z x cmake.zip -oC:\projects\deps > nul - - move C:\projects\deps\cmake-* C:\projects\deps\cmake # Move to a version-agnostic directory - - set PATH=C:\projects\deps\cmake\bin;%PATH% - - cmake --version - - ############################################################################ - # Setup the path to Clang-cl - ############################################################################ - - set PATH="C:\Program Files\LLVM\bin";%PATH% - - clang-cl -v - - ############################################################################ - # Setup the cached copy of LLVM - ############################################################################ - - if exist llvm (git -C llvm pull --rebase=true --ff-only) - - if not exist llvm (git clone --depth=1 http://llvm.org/git/llvm.git) - + - call "%APPVEYOR_BUILD_FOLDER%\\install-appveyor-reqs.cmd" before_build: - - call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64 - - cd C:\projects\libcxx + - call "%MSVC_SETUP_PATH%" %MSVC_SETUP_ARG% + - cd %APPVEYOR_BUILD_FOLDER% build_script: - md C:\projects\build-libcxx @@ -74,8 +43,8 @@ build_script: -DCMAKE_C_COMPILER=clang-cl.exe -DCMAKE_CXX_COMPILER=clang-cl.exe "-DCMAKE_BUILD_TYPE=%configuration%" "-DLLVM_PATH=C:\projects\deps\llvm" -DLIBCXX_ENABLE_EXPERIMENTAL_LIBRARY=OFF - -DLLVM_LIT_ARGS="-sv --no-progress-bar --show-xfail --show-unsupported" - C:\projects\libcxx + -DLLVM_LIT_ARGS="-sv --show-xfail --show-unsupported" + %APPVEYOR_BUILD_FOLDER% ############################################################################# # Build Step @@ -94,4 +63,6 @@ artifacts: name: logs cache: - - C:\projects\deps\llvm + - C:\projects\deps\ninja + - C:\projects\deps\cmake + - C:\projects\deps\llvm-installer.exe Added: vendor/libc++/dist/docs/DesignDocs/AvailabilityMarkup.rst ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libc++/dist/docs/DesignDocs/AvailabilityMarkup.rst Mon May 8 17:13:34 2017 (r317955) @@ -0,0 +1,114 @@ +=================== +Availability Markup +=================== + +.. contents:: + :local: + +Overview +======== + +Libc++ is used as a system library on macOS and iOS (amongst others). In order +for users to be able to compile a binary that is intended to be deployed to an +older version of the platform, clang provides the +`availability attribute `_ +that can be placed on declarations to describe the lifecycle of a symbol in the +library. + +Design +====== + +When a new feature is introduced that requires dylib support, a macro should be +created in include/__config to mark this feature as unavailable for all the +systems. For example:: + + // Define availability macros. + #if defined(_LIBCPP_USE_AVAILABILITY_APPLE) + #define _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS __attribute__((unavailable)) + #else if defined(_LIBCPP_USE_AVAILABILITY_SOME_OTHER_VENDOR) + #define _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS __attribute__((unavailable)) + #else + #define _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS + #endif + +When the library is updated by the platform vendor, the markup can be updated. +For example:: + + #define _LIBCPP_AVAILABILITY_SHARED_MUTEX \ + __attribute__((availability(macosx,strict,introduced=10.12))) \ + __attribute__((availability(ios,strict,introduced=10.0))) \ + __attribute__((availability(tvos,strict,introduced=10.0))) \ + __attribute__((availability(watchos,strict,introduced=3.0))) + +In the source code, the macro can be added on a class if the full class requires +type info from the library for example:: + + _LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL + class _LIBCPP_EXCEPTION_ABI _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS bad_optional_access + : public std::logic_error { + +or on a particular symbol: + + _LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_SIZED_NEW_DELETE void operator delete(void* __p, std::size_t __sz) _NOEXCEPT; + + +Testing +======= + +Some parameters can be passed to lit to run the test-suite and exercising the +availability. + +* The `platform` parameter controls the deployement target. For example lit can + be invoked with `--param=platform=macosx10.8`. Default is the current host. +* The `use_system_cxx_lib` parameter indicates to use another library than the + just built one. Invoking lit with `--param=use_system_cxx_lib=true` will run + the test-suite against the host system library. Alternatively a path to the + directory containing a specific prebuilt libc++ can be used, for example: + `--param=use_system_cxx_lib=/path/to/macOS/10.8/`. +* The `with_availability` boolean parameter enables the availability markup. + +Tests can be marked as XFAIL based on multiple features made available by lit: + + +* if either `use_system_cxx_lib` or `with_availability` is passed to lit, + assuming `--param=platform=macosx10.8` is passed as well the following + features will be available: + + - availability + - availability=x86_64 + - availability=macosx + - availability=x86_64-macosx + - availability=x86_64-apple-macosx10.8 + - availability=macosx10.8 + + This feature is used to XFAIL a test that *is* using a class of a method marked + as unavailable *and* that is expected to *fail* if deployed on an older system. + +* if `use_system_cxx_lib` is passed to lit, the following features will also + be available: + + - with_system_cxx_lib + - with_system_cxx_lib=x86_64 + - with_system_cxx_lib=macosx + - with_system_cxx_lib=x86_64-macosx + - with_system_cxx_lib=x86_64-apple-macosx10.8 + - with_system_cxx_lib=macosx10.8 + + This feature is used to XFAIL a test that is *not* using a class of a method + marked as unavailable *but* that is expected to fail if deployed on an older + system. For example if we know that it exhibits a but in the libc on a + particular system version. + +* if `with_availability` is passed to lit, the following features will also + be available: + + - availability_markup + - availability_markup=x86_64 + - availability_markup=macosx + - availability_markup=x86_64-macosx + - availability_markup=x86_64-apple-macosx10.8 + - availability_markup=macosx10.8 + + This feature is used to XFAIL a test that *is* using a class of a method + marked as unavailable *but* that is expected to *pass* if deployed on an older + system. For example if it is using a symbol in a statically evaluated context. Modified: vendor/libc++/dist/docs/index.rst ============================================================================== --- vendor/libc++/dist/docs/index.rst Mon May 8 17:13:29 2017 (r317954) +++ vendor/libc++/dist/docs/index.rst Mon May 8 17:13:34 2017 (r317955) @@ -128,6 +128,7 @@ Design Documents .. toctree:: :maxdepth: 1 + DesignDocs/AvailabilityMarkup DesignDocs/DebugMode DesignDocs/CapturingConfigInfo DesignDocs/ABIVersioning @@ -145,7 +146,7 @@ Build Bots and Test Coverage * `LLVM Buildbot Builders `_ * `Apple Jenkins Builders `_ -* `EricWF's Nightly Builders `_ +* `Windows Appveyor Builders `_ * `Code Coverage Results `_ Getting Involved Modified: vendor/libc++/dist/include/__config ============================================================================== --- vendor/libc++/dist/include/__config Mon May 8 17:13:29 2017 (r317954) +++ vendor/libc++/dist/include/__config Mon May 8 17:13:34 2017 (r317955) @@ -314,7 +314,7 @@ typedef __char32_t char32_t; #define _LIBCPP_NO_EXCEPTIONS #endif -#if !(__has_feature(cxx_rtti)) +#if !(__has_feature(cxx_rtti)) && !defined(_LIBCPP_NO_RTTI) #define _LIBCPP_NO_RTTI #endif @@ -1089,6 +1089,13 @@ _LIBCPP_FUNC_VIS extern "C" void __sanit # define _LIBCPP_DIAGNOSE_ERROR(...) #endif +#if __has_attribute(fallthough) || _GNUC_VER >= 700 +// Use a function like macro to imply that it must be followed by a semicolon +#define _LIBCPP_FALLTHROUGH() __attribute__((__fallthrough__)) +#else +#define _LIBCPP_FALLTHROUGH() ((void)0) +#endif + #if defined(_LIBCPP_ABI_MICROSOFT) && \ (defined(_LIBCPP_COMPILER_MSVC) || __has_declspec_attribute(empty_bases)) # define _LIBCPP_DECLSPEC_EMPTY_BASES __declspec(empty_bases) @@ -1113,4 +1120,77 @@ _LIBCPP_FUNC_VIS extern "C" void __sanit #endif // __cplusplus +// Decide whether to use availability macros. +#if !defined(_LIBCPP_BUILDING_LIBRARY) && \ + !defined(_LIBCPP_DISABLE_AVAILABILITY) && \ + __has_feature(attribute_availability_with_strict) && \ + __has_feature(attribute_availability_in_templates) +#ifdef __APPLE__ +#define _LIBCPP_USE_AVAILABILITY_APPLE +#endif +#endif + +// Define availability macros. +#if defined(_LIBCPP_USE_AVAILABILITY_APPLE) +#define _LIBCPP_AVAILABILITY_SHARED_MUTEX \ + __attribute__((availability(macosx,strict,introduced=10.12))) \ + __attribute__((availability(ios,strict,introduced=10.0))) \ + __attribute__((availability(tvos,strict,introduced=10.0))) \ + __attribute__((availability(watchos,strict,introduced=3.0))) +#define _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS __attribute__((unavailable)) +#define _LIBCPP_AVAILABILITY_BAD_ARRAY_LENGTH __attribute__((unavailable)) +#define _LIBCPP_AVAILABILITY_UNCAUGHT_EXCEPTIONS \ + __attribute__((availability(macosx,strict,introduced=10.12))) \ + __attribute__((availability(ios,strict,introduced=10.0))) \ + __attribute__((availability(tvos,strict,introduced=10.0))) \ + __attribute__((availability(watchos,strict,introduced=3.0))) +#define _LIBCPP_AVAILABILITY_SIZED_NEW_DELETE \ + __attribute__((availability(macosx,strict,introduced=10.12))) \ + __attribute__((availability(ios,strict,introduced=10.0))) \ + __attribute__((availability(tvos,strict,introduced=10.0))) \ + __attribute__((availability(watchos,strict,introduced=3.0))) +#define _LIBCPP_AVAILABILITY_FUTURE_ERROR \ + __attribute__((availability(ios,strict,introduced=6.0))) +#define _LIBCPP_AVAILABILITY_TYPEINFO_VTABLE \ + __attribute__((availability(macosx,strict,introduced=10.9))) \ + __attribute__((availability(ios,strict,introduced=7.0))) +#define _LIBCPP_AVAILABILITY_LOCALE_CATEGORY \ + __attribute__((availability(macosx,strict,introduced=10.9))) \ + __attribute__((availability(ios,strict,introduced=7.0))) +#define _LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR \ + __attribute__((availability(macosx,strict,introduced=10.9))) \ + __attribute__((availability(ios,strict,introduced=7.0))) +#else +#define _LIBCPP_AVAILABILITY_SHARED_MUTEX +#define _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS +#define _LIBCPP_AVAILABILITY_BAD_ARRAY_LENGTH +#define _LIBCPP_AVAILABILITY_UNCAUGHT_EXCEPTIONS +#define _LIBCPP_AVAILABILITY_SIZED_NEW_DELETE +#define _LIBCPP_AVAILABILITY_FUTURE_ERROR +#define _LIBCPP_AVAILABILITY_TYPEINFO_VTABLE +#define _LIBCPP_AVAILABILITY_LOCALE_CATEGORY +#define _LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR +#endif + +// Define availability that depends on _LIBCPP_NO_EXCEPTIONS. +#ifdef _LIBCPP_NO_EXCEPTIONS +#define _LIBCPP_AVAILABILITY_DYNARRAY +#define _LIBCPP_AVAILABILITY_FUTURE +#else +#define _LIBCPP_AVAILABILITY_DYNARRAY _LIBCPP_AVAILABILITY_BAD_ARRAY_LENGTH +#define _LIBCPP_AVAILABILITY_FUTURE _LIBCPP_AVAILABILITY_FUTURE_ERROR +#endif + +// Availability of stream API in the dylib got dropped and re-added. The +// extern template should effectively be available at: +// availability(macosx,introduced=10.9) +// availability(ios,introduced=7.0) +#if defined(_LIBCPP_USE_AVAILABILITY_APPLE) && \ + ((defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && \ + __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ <= 1090) || \ + (defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && \ + __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ <= 70000)) +#define _LIBCPP_AVAILABILITY_NO_STREAMS_EXTERN_TEMPLATE +#endif + #endif // _LIBCPP_CONFIG Modified: vendor/libc++/dist/include/__locale ============================================================================== --- vendor/libc++/dist/include/__locale Mon May 8 17:13:29 2017 (r317954) +++ vendor/libc++/dist/include/__locale Mon May 8 17:13:34 2017 (r317955) @@ -69,6 +69,7 @@ public: class _LIBCPP_TYPE_VIS id; typedef int category; + _LIBCPP_AVAILABILITY_LOCALE_CATEGORY static const category // values assigned here are for exposition only none = 0, collate = LC_COLLATE_MASK, Modified: vendor/libc++/dist/include/__threading_support ============================================================================== --- vendor/libc++/dist/include/__threading_support Mon May 8 17:13:29 2017 (r317954) +++ vendor/libc++/dist/include/__threading_support Mon May 8 17:13:34 2017 (r317955) @@ -474,7 +474,10 @@ int __libcpp_condvar_timedwait(__libcpp_ timeout_ms.count() > 0 ? timeout_ms.count() : 0, 0)) - return GetLastError(); + { + auto __ec = GetLastError(); + return __ec == ERROR_TIMEOUT ? ETIMEDOUT : __ec; + } return 0; } Modified: vendor/libc++/dist/include/exception ============================================================================== --- vendor/libc++/dist/include/exception Mon May 8 17:13:29 2017 (r317954) +++ vendor/libc++/dist/include/exception Mon May 8 17:13:34 2017 (r317955) @@ -127,30 +127,33 @@ _LIBCPP_FUNC_VIS terminate_handler get_t _LIBCPP_NORETURN _LIBCPP_FUNC_VIS void terminate() _NOEXCEPT; _LIBCPP_FUNC_VIS bool uncaught_exception() _NOEXCEPT; -_LIBCPP_FUNC_VIS int uncaught_exceptions() _NOEXCEPT; +_LIBCPP_FUNC_VIS _LIBCPP_AVAILABILITY_UNCAUGHT_EXCEPTIONS int uncaught_exceptions() _NOEXCEPT; class _LIBCPP_TYPE_VIS exception_ptr; _LIBCPP_FUNC_VIS exception_ptr current_exception() _NOEXCEPT; _LIBCPP_NORETURN _LIBCPP_FUNC_VIS void rethrow_exception(exception_ptr); +#ifndef _LIBCPP_ABI_MICROSOFT + class _LIBCPP_TYPE_VIS exception_ptr { void* __ptr_; public: _LIBCPP_INLINE_VISIBILITY exception_ptr() _NOEXCEPT : __ptr_() {} _LIBCPP_INLINE_VISIBILITY exception_ptr(nullptr_t) _NOEXCEPT : __ptr_() {} + exception_ptr(const exception_ptr&) _NOEXCEPT; exception_ptr& operator=(const exception_ptr&) _NOEXCEPT; ~exception_ptr() _NOEXCEPT; - _LIBCPP_INLINE_VISIBILITY - _LIBCPP_EXPLICIT - operator bool() const _NOEXCEPT {return __ptr_ != nullptr;} + _LIBCPP_INLINE_VISIBILITY _LIBCPP_EXPLICIT operator bool() const _NOEXCEPT + {return __ptr_ != nullptr;} friend _LIBCPP_INLINE_VISIBILITY bool operator==(const exception_ptr& __x, const exception_ptr& __y) _NOEXCEPT {return __x.__ptr_ == __y.__ptr_;} + friend _LIBCPP_INLINE_VISIBILITY bool operator!=(const exception_ptr& __x, const exception_ptr& __y) _NOEXCEPT {return !(__x == __y);} @@ -178,6 +181,54 @@ make_exception_ptr(_Ep __e) _NOEXCEPT #endif } +#else // _LIBCPP_ABI_MICROSOFT + +class _LIBCPP_TYPE_VIS exception_ptr +{ +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wunused-private-field" +#endif + void* __ptr1_; + void* __ptr2_; +#if defined(__clang__) +#pragma clang diagnostic pop +#endif +public: + exception_ptr() _NOEXCEPT; + exception_ptr(nullptr_t) _NOEXCEPT; + exception_ptr(const exception_ptr& __other) _NOEXCEPT; + exception_ptr& operator=(const exception_ptr& __other) _NOEXCEPT; + exception_ptr& operator=(nullptr_t) _NOEXCEPT; + ~exception_ptr() _NOEXCEPT; + _LIBCPP_EXPLICIT operator bool() const _NOEXCEPT; +}; + +_LIBCPP_FUNC_VIS +bool operator==(const exception_ptr& __x, const exception_ptr& __y) _NOEXCEPT; + +inline _LIBCPP_INLINE_VISIBILITY +bool operator!=(const exception_ptr& __x, const exception_ptr& __y) _NOEXCEPT + {return !(__x == __y);} + +_LIBCPP_FUNC_VIS void swap(exception_ptr&, exception_ptr&) _NOEXCEPT; + +_LIBCPP_FUNC_VIS exception_ptr __copy_exception_ptr(void *__except, const void* __ptr); +_LIBCPP_FUNC_VIS exception_ptr current_exception() _NOEXCEPT; +_LIBCPP_NORETURN _LIBCPP_FUNC_VIS void rethrow_exception(exception_ptr p); + +// This is a built-in template function which automagically extracts the required +// information. +template void *__GetExceptionInfo(_E); + +template +exception_ptr +make_exception_ptr(_Ep __e) _NOEXCEPT +{ + return __copy_exception_ptr(_VSTD::addressof(__e), __GetExceptionInfo(__e)); +} + +#endif // _LIBCPP_ABI_MICROSOFT // nested_exception class _LIBCPP_EXCEPTION_ABI nested_exception Modified: vendor/libc++/dist/include/experimental/dynarray ============================================================================== --- vendor/libc++/dist/include/experimental/dynarray Mon May 8 17:13:29 2017 (r317954) +++ vendor/libc++/dist/include/experimental/dynarray Mon May 8 17:13:34 2017 (r317955) @@ -110,7 +110,7 @@ public: namespace std { namespace experimental { inline namespace __array_extensions_v1 { template -struct _LIBCPP_TEMPLATE_VIS dynarray +struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_DYNARRAY dynarray { public: // types: Modified: vendor/libc++/dist/include/experimental/optional ============================================================================== --- vendor/libc++/dist/include/experimental/optional Mon May 8 17:13:29 2017 (r317954) +++ vendor/libc++/dist/include/experimental/optional Mon May 8 17:13:34 2017 (r317955) @@ -145,7 +145,7 @@ namespace std { namespace experimental { #include _LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL -class _LIBCPP_EXCEPTION_ABI bad_optional_access +class _LIBCPP_EXCEPTION_ABI _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS bad_optional_access : public std::logic_error { public: @@ -523,6 +523,9 @@ public: constexpr explicit operator bool() const noexcept {return this->__engaged_;} _LIBCPP_NORETURN _LIBCPP_INLINE_VISIBILITY +#ifndef _LIBCPP_NO_EXCEPTIONS +_LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS +#endif constexpr void __throw_bad_optional_access() const { #ifndef _LIBCPP_NO_EXCEPTIONS @@ -532,7 +535,7 @@ public: #endif } - _LIBCPP_INLINE_VISIBILITY + _LIBCPP_INLINE_VISIBILITY _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS constexpr value_type const& value() const { if (!this->__engaged_) @@ -540,7 +543,7 @@ public: return this->__val_; } - _LIBCPP_INLINE_VISIBILITY + _LIBCPP_INLINE_VISIBILITY _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS value_type& value() { if (!this->__engaged_) Modified: vendor/libc++/dist/include/functional ============================================================================== --- vendor/libc++/dist/include/functional Mon May 8 17:13:29 2017 (r317954) +++ vendor/libc++/dist/include/functional Mon May 8 17:13:34 2017 (r317955) @@ -2224,7 +2224,7 @@ typename __bind_return<_Fp, _BoundArgs, __apply_functor(_Fp& __f, _BoundArgs& __bound_args, __tuple_indices<_Indx...>, _Args&& __args) { - return __invoke(__f, __mu(_VSTD::get<_Indx>(__bound_args), __args)...); + return _VSTD::__invoke(__f, _VSTD::__mu(_VSTD::get<_Indx>(__bound_args), __args)...); } template @@ -2257,7 +2257,7 @@ public: typename __bind_return<_Fd, _Td, tuple<_Args&&...> >::type operator()(_Args&& ...__args) { - return __apply_functor(__f_, __bound_args_, __indices(), + return _VSTD::__apply_functor(__f_, __bound_args_, __indices(), tuple<_Args&&...>(_VSTD::forward<_Args>(__args)...)); } @@ -2266,7 +2266,7 @@ public: typename __bind_return >::type operator()(_Args&& ...__args) const { - return __apply_functor(__f_, __bound_args_, __indices(), + return _VSTD::__apply_functor(__f_, __bound_args_, __indices(), tuple<_Args&&...>(_VSTD::forward<_Args>(__args)...)); } }; Modified: vendor/libc++/dist/include/future ============================================================================== --- vendor/libc++/dist/include/future Mon May 8 17:13:29 2017 (r317954) +++ vendor/libc++/dist/include/future Mon May 8 17:13:34 2017 (r317955) @@ -499,7 +499,7 @@ make_error_condition(future_errc __e) _N return error_condition(static_cast(__e), future_category()); } -class _LIBCPP_EXCEPTION_ABI future_error +class _LIBCPP_EXCEPTION_ABI _LIBCPP_AVAILABILITY_FUTURE_ERROR future_error : public logic_error { error_code __ec_; @@ -515,6 +515,9 @@ public: }; _LIBCPP_NORETURN inline _LIBCPP_ALWAYS_INLINE +#ifndef _LIBCPP_NO_EXCEPTIONS +_LIBCPP_AVAILABILITY_FUTURE_ERROR +#endif void __throw_future_error(future_errc _Ev) { #ifndef _LIBCPP_NO_EXCEPTIONS @@ -525,7 +528,7 @@ void __throw_future_error(future_errc _E #endif } -class _LIBCPP_TYPE_VIS __assoc_sub_state +class _LIBCPP_TYPE_VIS _LIBCPP_AVAILABILITY_FUTURE __assoc_sub_state : public __shared_count { protected: @@ -612,7 +615,7 @@ __assoc_sub_state::wait_for(const chrono } template -class __assoc_state +class _LIBCPP_AVAILABILITY_FUTURE __assoc_state : public __assoc_sub_state { typedef __assoc_sub_state base; @@ -652,6 +655,7 @@ __assoc_state<_Rp>::__on_zero_shared() _ template template +_LIBCPP_AVAILABILITY_FUTURE void #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES __assoc_state<_Rp>::set_value(_Arg&& __arg) @@ -707,7 +711,7 @@ __assoc_state<_Rp>::copy() } template -class __assoc_state<_Rp&> +class _LIBCPP_AVAILABILITY_FUTURE __assoc_state<_Rp&> : public __assoc_sub_state { typedef __assoc_sub_state base; @@ -767,7 +771,7 @@ __assoc_state<_Rp&>::copy() } template -class __assoc_state_alloc +class _LIBCPP_AVAILABILITY_FUTURE __assoc_state_alloc : public __assoc_state<_Rp> { typedef __assoc_state<_Rp> base; @@ -795,7 +799,7 @@ __assoc_state_alloc<_Rp, _Alloc>::__on_z } template -class __assoc_state_alloc<_Rp&, _Alloc> +class _LIBCPP_AVAILABILITY_FUTURE __assoc_state_alloc<_Rp&, _Alloc> : public __assoc_state<_Rp&> { typedef __assoc_state<_Rp&> base; @@ -821,7 +825,7 @@ __assoc_state_alloc<_Rp&, _Alloc>::__on_ } template -class __assoc_sub_state_alloc +class _LIBCPP_AVAILABILITY_FUTURE __assoc_sub_state_alloc : public __assoc_sub_state { typedef __assoc_sub_state base; @@ -847,7 +851,7 @@ __assoc_sub_state_alloc<_Alloc>::__on_ze } template -class __deferred_assoc_state +class _LIBCPP_AVAILABILITY_FUTURE __deferred_assoc_state : public __assoc_state<_Rp> { typedef __assoc_state<_Rp> base; @@ -894,7 +898,7 @@ __deferred_assoc_state<_Rp, _Fp>::__exec } template -class __deferred_assoc_state +class _LIBCPP_AVAILABILITY_FUTURE __deferred_assoc_state : public __assoc_sub_state { typedef __assoc_sub_state base; @@ -942,7 +946,7 @@ __deferred_assoc_state::__exe } template -class __async_assoc_state +class _LIBCPP_AVAILABILITY_FUTURE __async_assoc_state : public __assoc_state<_Rp> { typedef __assoc_state<_Rp> base; @@ -997,7 +1001,7 @@ __async_assoc_state<_Rp, _Fp>::__on_zero } template -class __async_assoc_state +class _LIBCPP_AVAILABILITY_FUTURE __async_assoc_state : public __assoc_sub_state { typedef __assoc_sub_state base; @@ -1076,7 +1080,7 @@ __make_async_assoc_state(_Fp __f); #endif template -class _LIBCPP_TEMPLATE_VIS future +class _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FUTURE future { __assoc_state<_Rp>* __state_; @@ -1179,7 +1183,7 @@ future<_Rp>::get() } template -class _LIBCPP_TEMPLATE_VIS future<_Rp&> +class _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FUTURE future<_Rp&> { __assoc_state<_Rp&>* __state_; @@ -1277,7 +1281,7 @@ future<_Rp&>::get() } template <> -class _LIBCPP_TYPE_VIS future +class _LIBCPP_TYPE_VIS _LIBCPP_AVAILABILITY_FUTURE future { __assoc_sub_state* __state_; @@ -1360,7 +1364,7 @@ swap(future<_Rp>& __x, future<_Rp>& __y) template class packaged_task; template -class _LIBCPP_TEMPLATE_VIS promise +class _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FUTURE promise { __assoc_state<_Rp>* __state_; @@ -1527,7 +1531,7 @@ promise<_Rp>::set_exception_at_thread_ex // promise template -class _LIBCPP_TEMPLATE_VIS promise<_Rp&> +class _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FUTURE promise<_Rp&> { __assoc_state<_Rp&>* __state_; @@ -1663,7 +1667,7 @@ promise<_Rp&>::set_exception_at_thread_e // promise template <> -class _LIBCPP_TYPE_VIS promise +class _LIBCPP_TYPE_VIS _LIBCPP_AVAILABILITY_FUTURE promise { __assoc_sub_state* __state_; @@ -1749,7 +1753,7 @@ template template class __packaged_task_base; template -class __packaged_task_base<_Rp(_ArgTypes...)> +class _LIBCPP_AVAILABILITY_FUTURE __packaged_task_base<_Rp(_ArgTypes...)> { __packaged_task_base(const __packaged_task_base&); __packaged_task_base& operator=(const __packaged_task_base&); @@ -1767,7 +1771,7 @@ public: template class __packaged_task_func; template -class __packaged_task_func<_Fp, _Alloc, _Rp(_ArgTypes...)> +class _LIBCPP_AVAILABILITY_FUTURE __packaged_task_func<_Fp, _Alloc, _Rp(_ArgTypes...)> : public __packaged_task_base<_Rp(_ArgTypes...)> { __compressed_pair<_Fp, _Alloc> __f_; @@ -1825,7 +1829,7 @@ __packaged_task_func<_Fp, _Alloc, _Rp(_A template class __packaged_task_function; template -class __packaged_task_function<_Rp(_ArgTypes...)> +class _LIBCPP_AVAILABILITY_FUTURE __packaged_task_function<_Rp(_ArgTypes...)> { typedef __packaged_task_base<_Rp(_ArgTypes...)> __base; typename aligned_storage<3*sizeof(void*)>::type __buf_; @@ -2000,7 +2004,7 @@ __packaged_task_function<_Rp(_ArgTypes.. } template -class _LIBCPP_TEMPLATE_VIS packaged_task<_Rp(_ArgTypes...)> +class _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FUTURE packaged_task<_Rp(_ArgTypes...)> { public: typedef _Rp result_type; // extension @@ -2129,7 +2133,7 @@ packaged_task<_Rp(_ArgTypes...)>::reset( } template -class _LIBCPP_TEMPLATE_VIS packaged_task +class _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FUTURE packaged_task { public: typedef void result_type; // extension @@ -2517,7 +2521,7 @@ shared_future<_Rp&>::operator=(const sha } template <> -class _LIBCPP_TYPE_VIS shared_future +class _LIBCPP_TYPE_VIS _LIBCPP_AVAILABILITY_FUTURE shared_future { __assoc_sub_state* __state_; Modified: vendor/libc++/dist/include/istream ============================================================================== --- vendor/libc++/dist/include/istream Mon May 8 17:13:29 2017 (r317954) +++ vendor/libc++/dist/include/istream Mon May 8 17:13:34 2017 (r317955) @@ -1675,9 +1675,11 @@ operator>>(basic_istream<_CharT, _Traits return __is; } +#ifndef _LIBCPP_AVAILABILITY_NO_STREAMS_EXTERN_TEMPLATE _LIBCPP_EXTERN_TEMPLATE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_istream) _LIBCPP_EXTERN_TEMPLATE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_istream) _LIBCPP_EXTERN_TEMPLATE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_iostream) +#endif _LIBCPP_END_NAMESPACE_STD Modified: vendor/libc++/dist/include/locale ============================================================================== --- vendor/libc++/dist/include/locale Mon May 8 17:13:29 2017 (r317954) +++ vendor/libc++/dist/include/locale Mon May 8 17:13:34 2017 (r317955) @@ -1402,6 +1402,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); @@ -1428,6 +1429,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); @@ -1454,6 +1456,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); @@ -1480,6 +1483,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); @@ -1685,6 +1689,22 @@ protected: ~__time_get_c_storage() {} }; +template <> _LIBCPP_FUNC_VIS const string* __time_get_c_storage::__weeks() const; +template <> _LIBCPP_FUNC_VIS const string* __time_get_c_storage::__months() const; +template <> _LIBCPP_FUNC_VIS const string* __time_get_c_storage::__am_pm() const; +template <> _LIBCPP_FUNC_VIS const string& __time_get_c_storage::__c() const; +template <> _LIBCPP_FUNC_VIS const string& __time_get_c_storage::__r() const; +template <> _LIBCPP_FUNC_VIS const string& __time_get_c_storage::__x() const; +template <> _LIBCPP_FUNC_VIS const string& __time_get_c_storage::__X() const; + +template <> _LIBCPP_FUNC_VIS const wstring* __time_get_c_storage::__weeks() const; +template <> _LIBCPP_FUNC_VIS const wstring* __time_get_c_storage::__months() const; +template <> _LIBCPP_FUNC_VIS const wstring* __time_get_c_storage::__am_pm() const; +template <> _LIBCPP_FUNC_VIS const wstring& __time_get_c_storage::__c() const; +template <> _LIBCPP_FUNC_VIS const wstring& __time_get_c_storage::__r() const; +template <> _LIBCPP_FUNC_VIS const wstring& __time_get_c_storage::__x() const; +template <> _LIBCPP_FUNC_VIS const wstring& __time_get_c_storage::__X() const; + template > class _LIBCPP_TEMPLATE_VIS time_get : public locale::facet, @@ -2825,7 +2845,7 @@ money_get<_CharT, _InputIterator>::__do_ return false; } } - // drop through + _LIBCPP_FALLTHROUGH(); case money_base::none: if (__p != 3) { Modified: vendor/libc++/dist/include/memory ============================================================================== --- vendor/libc++/dist/include/memory Mon May 8 17:13:29 2017 (r317954) +++ vendor/libc++/dist/include/memory Mon May 8 17:13:34 2017 (r317955) @@ -3559,7 +3559,7 @@ template ::__get_deleter(const type_info& __t) const _NOEXCEPT { - return __t == typeid(_Dp) ? _VSTD::addressof(__data_.first().second()) : 0; + return __t == typeid(_Dp) ? _VSTD::addressof(__data_.first().second()) : nullptr; } #endif // _LIBCPP_NO_RTTI @@ -5293,7 +5293,8 @@ private: friend _LIBCPP_FUNC_VIS __sp_mut& __get_sp_mut(const void*); }; -_LIBCPP_FUNC_VIS __sp_mut& __get_sp_mut(const void*); +_LIBCPP_FUNC_VIS _LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR +__sp_mut& __get_sp_mut(const void*); template inline _LIBCPP_INLINE_VISIBILITY @@ -5304,6 +5305,7 @@ atomic_is_lock_free(const shared_ptr<_Tp } template +_LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR shared_ptr<_Tp> atomic_load(const shared_ptr<_Tp>* __p) { @@ -5316,6 +5318,7 @@ atomic_load(const shared_ptr<_Tp>* __p) template inline _LIBCPP_INLINE_VISIBILITY +_LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR shared_ptr<_Tp> atomic_load_explicit(const shared_ptr<_Tp>* __p, memory_order) { @@ -5323,6 +5326,7 @@ atomic_load_explicit(const shared_ptr<_T } template +_LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR void atomic_store(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r) { @@ -5334,6 +5338,7 @@ atomic_store(shared_ptr<_Tp>* __p, share template inline _LIBCPP_INLINE_VISIBILITY +_LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR void atomic_store_explicit(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r, memory_order) { @@ -5341,6 +5346,7 @@ atomic_store_explicit(shared_ptr<_Tp>* _ } template +_LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR shared_ptr<_Tp> atomic_exchange(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r) { @@ -5353,6 +5359,7 @@ atomic_exchange(shared_ptr<_Tp>* __p, sh template inline _LIBCPP_INLINE_VISIBILITY +_LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR shared_ptr<_Tp> atomic_exchange_explicit(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r, memory_order) { @@ -5360,6 +5367,7 @@ atomic_exchange_explicit(shared_ptr<_Tp> } template +_LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR bool atomic_compare_exchange_strong(shared_ptr<_Tp>* __p, shared_ptr<_Tp>* __v, shared_ptr<_Tp> __w) { @@ -5381,6 +5389,7 @@ atomic_compare_exchange_strong(shared_pt template inline _LIBCPP_INLINE_VISIBILITY +_LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR bool atomic_compare_exchange_weak(shared_ptr<_Tp>* __p, shared_ptr<_Tp>* __v, shared_ptr<_Tp> __w) { @@ -5389,6 +5398,7 @@ atomic_compare_exchange_weak(shared_ptr< template inline _LIBCPP_INLINE_VISIBILITY +_LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR bool atomic_compare_exchange_strong_explicit(shared_ptr<_Tp>* __p, shared_ptr<_Tp>* __v, shared_ptr<_Tp> __w, memory_order, memory_order) @@ -5398,6 +5408,7 @@ atomic_compare_exchange_strong_explicit( template inline _LIBCPP_INLINE_VISIBILITY +_LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR bool atomic_compare_exchange_weak_explicit(shared_ptr<_Tp>* __p, shared_ptr<_Tp>* __v, shared_ptr<_Tp> __w, memory_order, memory_order) Modified: vendor/libc++/dist/include/new ============================================================================== --- vendor/libc++/dist/include/new Mon May 8 17:13:29 2017 (r317954) +++ vendor/libc++/dist/include/new Mon May 8 17:13:34 2017 (r317955) @@ -146,9 +146,8 @@ _LIBCPP_NORETURN _LIBCPP_FUNC_VIS void _ #if defined(_LIBCPP_BUILDING_LIBRARY) || (_LIBCPP_STD_VER > 11) -class _LIBCPP_EXCEPTION_ABI bad_array_length - : public bad_alloc -{ +class _LIBCPP_EXCEPTION_ABI _LIBCPP_AVAILABILITY_BAD_ARRAY_LENGTH + bad_array_length : public bad_alloc { public: bad_array_length() _NOEXCEPT; virtual ~bad_array_length() _NOEXCEPT; @@ -182,7 +181,7 @@ _LIBCPP_OVERRIDABLE_FUNC_VIS void* opera _LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete(void* __p) _NOEXCEPT; _LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete(void* __p, const std::nothrow_t&) _NOEXCEPT; #ifndef _LIBCPP_HAS_NO_SIZED_DEALLOCATION -_LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete(void* __p, std::size_t __sz) _NOEXCEPT; +_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_SIZED_NEW_DELETE void operator delete(void* __p, std::size_t __sz) _NOEXCEPT; #endif _LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new[](std::size_t __sz) _THROW_BAD_ALLOC; @@ -190,7 +189,7 @@ _LIBCPP_OVERRIDABLE_FUNC_VIS void* opera _LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete[](void* __p) _NOEXCEPT; _LIBCPP_OVERRIDABLE_FUNC_VIS void operator delete[](void* __p, const std::nothrow_t&) _NOEXCEPT; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon May 8 17:13:21 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 13046D6358F; Mon, 8 May 2017 17:13:21 +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 B3A0D932; Mon, 8 May 2017 17:13:20 +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 v48HDJCs042726; Mon, 8 May 2017 17:13:19 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v48HDJ3T042725; Mon, 8 May 2017 17:13:19 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201705081713.v48HDJ3T042725@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 17:13:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r317952 - vendor/clang/clang-trunk-r302418 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 17:13:21 -0000 Author: dim Date: Mon May 8 17:13:19 2017 New Revision: 317952 URL: https://svnweb.freebsd.org/changeset/base/317952 Log: Tag clang trunk r302418. Added: vendor/clang/clang-trunk-r302418/ - copied from r317951, vendor/clang/dist/ From owner-svn-src-all@freebsd.org Mon May 8 17:13:31 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 753CFD635F7; Mon, 8 May 2017 17:13:31 +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 E34689EA; Mon, 8 May 2017 17:13:30 +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 v48HDTle042846; Mon, 8 May 2017 17:13:29 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v48HDTgR042845; Mon, 8 May 2017 17:13:29 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201705081713.v48HDTgR042845@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 17:13:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r317954 - vendor/compiler-rt/compiler-rt-trunk-r302418 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 17:13:31 -0000 Author: dim Date: Mon May 8 17:13:29 2017 New Revision: 317954 URL: https://svnweb.freebsd.org/changeset/base/317954 Log: Tag compiler-rt trunk r302418. Added: vendor/compiler-rt/compiler-rt-trunk-r302418/ - copied from r317953, vendor/compiler-rt/dist/ From owner-svn-src-all@freebsd.org Mon May 8 17:13:16 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A9B91D63533; Mon, 8 May 2017 17:13:16 +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 577748EA; Mon, 8 May 2017 17:13:16 +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 v48HDFI2042679; Mon, 8 May 2017 17:13:15 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v48HDBaA042642; Mon, 8 May 2017 17:13:11 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201705081713.v48HDBaA042642@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 17:13:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r317951 - in vendor/clang/dist: docs include/clang/AST include/clang/ASTMatchers include/clang/Basic include/clang/Driver include/clang/Frontend include/clang/Lex include/clang/Sema inc... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 17:13:17 -0000 Author: dim Date: Mon May 8 17:13:11 2017 New Revision: 317951 URL: https://svnweb.freebsd.org/changeset/base/317951 Log: Vendor import of clang trunk r302418: https://llvm.org/svn/llvm-project/cfe/trunk@302418 Added: vendor/clang/dist/lib/Headers/lwpintrin.h (contents, props changed) vendor/clang/dist/test/CodeGen/aarch64-args.cpp (contents, props changed) vendor/clang/dist/test/CodeGen/lwp-builtins.c (contents, props changed) vendor/clang/dist/test/FixIt/fixit-availability.c (contents, props changed) vendor/clang/dist/test/FixIt/fixit-availability.mm vendor/clang/dist/test/Index/KeepGoingWithLotsOfErrors.mm vendor/clang/dist/test/Modules/Inputs/preprocess/file2.h (contents, props changed) vendor/clang/dist/test/OpenMP/varargs.cpp (contents, props changed) vendor/clang/dist/test/SemaCXX/warn-zero-nullptr.cpp (contents, props changed) Modified: vendor/clang/dist/docs/LanguageExtensions.rst vendor/clang/dist/docs/LibASTMatchersReference.html vendor/clang/dist/docs/SanitizerCoverage.rst vendor/clang/dist/docs/ThreadSafetyAnalysis.rst vendor/clang/dist/include/clang/AST/ODRHash.h vendor/clang/dist/include/clang/ASTMatchers/ASTMatchers.h vendor/clang/dist/include/clang/Basic/Attr.td vendor/clang/dist/include/clang/Basic/AttrDocs.td vendor/clang/dist/include/clang/Basic/BuiltinsARM.def vendor/clang/dist/include/clang/Basic/BuiltinsX86.def vendor/clang/dist/include/clang/Basic/BuiltinsX86_64.def vendor/clang/dist/include/clang/Basic/DiagnosticLexKinds.td vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td vendor/clang/dist/include/clang/Driver/CC1Options.td vendor/clang/dist/include/clang/Driver/Distro.h vendor/clang/dist/include/clang/Driver/Multilib.h vendor/clang/dist/include/clang/Driver/Options.td vendor/clang/dist/include/clang/Frontend/CodeGenOptions.def vendor/clang/dist/include/clang/Frontend/FrontendAction.h vendor/clang/dist/include/clang/Lex/HeaderSearch.h vendor/clang/dist/include/clang/Lex/Lexer.h vendor/clang/dist/include/clang/Lex/ModuleMap.h vendor/clang/dist/include/clang/Lex/Preprocessor.h vendor/clang/dist/include/clang/Sema/Sema.h vendor/clang/dist/include/clang/Tooling/FixIt.h vendor/clang/dist/lib/ASTMatchers/Dynamic/Registry.cpp vendor/clang/dist/lib/Basic/Diagnostic.cpp vendor/clang/dist/lib/Basic/DiagnosticIDs.cpp vendor/clang/dist/lib/Basic/Targets.cpp vendor/clang/dist/lib/CodeGen/BackendUtil.cpp vendor/clang/dist/lib/CodeGen/CGBlocks.cpp vendor/clang/dist/lib/CodeGen/CGBuiltin.cpp vendor/clang/dist/lib/CodeGen/CodeGenFunction.cpp vendor/clang/dist/lib/CodeGen/CodeGenFunction.h vendor/clang/dist/lib/CodeGen/TargetInfo.cpp vendor/clang/dist/lib/Driver/Distro.cpp vendor/clang/dist/lib/Driver/Multilib.cpp vendor/clang/dist/lib/Driver/SanitizerArgs.cpp vendor/clang/dist/lib/Driver/ToolChains/CrossWindows.cpp vendor/clang/dist/lib/Driver/ToolChains/Gnu.cpp vendor/clang/dist/lib/Format/FormatToken.h vendor/clang/dist/lib/Format/FormatTokenLexer.cpp vendor/clang/dist/lib/Frontend/CompilerInvocation.cpp vendor/clang/dist/lib/Frontend/FrontendAction.cpp vendor/clang/dist/lib/Frontend/FrontendActions.cpp vendor/clang/dist/lib/Frontend/PrintPreprocessedOutput.cpp vendor/clang/dist/lib/Frontend/Rewrite/FrontendActions.cpp vendor/clang/dist/lib/Frontend/Rewrite/InclusionRewriter.cpp vendor/clang/dist/lib/Headers/CMakeLists.txt vendor/clang/dist/lib/Headers/arm_acle.h vendor/clang/dist/lib/Headers/x86intrin.h vendor/clang/dist/lib/Index/IndexDecl.cpp vendor/clang/dist/lib/Lex/HeaderSearch.cpp vendor/clang/dist/lib/Lex/Lexer.cpp vendor/clang/dist/lib/Lex/ModuleMap.cpp vendor/clang/dist/lib/Lex/PPDirectives.cpp vendor/clang/dist/lib/Lex/PPLexerChange.cpp vendor/clang/dist/lib/Lex/PPMacroExpansion.cpp vendor/clang/dist/lib/Lex/Pragma.cpp vendor/clang/dist/lib/Lex/Preprocessor.cpp vendor/clang/dist/lib/Lex/TokenLexer.cpp vendor/clang/dist/lib/Parse/ParseDeclCXX.cpp vendor/clang/dist/lib/Sema/Sema.cpp vendor/clang/dist/lib/Sema/SemaChecking.cpp vendor/clang/dist/lib/Sema/SemaDecl.cpp vendor/clang/dist/lib/Sema/SemaDeclAttr.cpp vendor/clang/dist/lib/Sema/SemaDeclObjC.cpp vendor/clang/dist/lib/Sema/SemaExpr.cpp vendor/clang/dist/lib/Sema/SemaStmt.cpp vendor/clang/dist/lib/Tooling/JSONCompilationDatabase.cpp vendor/clang/dist/test/CodeGen/arm_acle.c vendor/clang/dist/test/CodeGen/mozilla-ms-inline-asm.c vendor/clang/dist/test/CodeGen/ms-inline-asm-64.c vendor/clang/dist/test/CodeGen/ms-inline-asm-avx512.c vendor/clang/dist/test/CodeGen/ms-inline-asm.c vendor/clang/dist/test/CodeGen/ms-inline-asm.cpp vendor/clang/dist/test/CodeGen/thinlto_backend.ll vendor/clang/dist/test/CodeGenCXX/ms-inline-asm-fields.cpp vendor/clang/dist/test/CodeGenObjC/arc-foreach.m vendor/clang/dist/test/CodeGenOpenCL/kernel-attributes.cl vendor/clang/dist/test/Driver/android-ndk-standalone.cpp vendor/clang/dist/test/Driver/darwin-version.c vendor/clang/dist/test/Driver/fsanitize-coverage.c vendor/clang/dist/test/Driver/windows-cross.c vendor/clang/dist/test/Index/Core/index-source.cpp vendor/clang/dist/test/Misc/pragma-attribute-supported-attributes-list.test vendor/clang/dist/test/Modules/Inputs/preprocess/module.modulemap vendor/clang/dist/test/Modules/preprocess-module.cpp vendor/clang/dist/test/Parser/MicrosoftExtensions.cpp vendor/clang/dist/test/Parser/ms-square-bracket-attributes.mm vendor/clang/dist/test/Preprocessor/aarch64-target-features.c vendor/clang/dist/test/Preprocessor/macro_paste_commaext.c vendor/clang/dist/test/Preprocessor/pragma_module.c vendor/clang/dist/test/Preprocessor/stringize_space.c vendor/clang/dist/test/Sema/arm-interrupt-attr.c vendor/clang/dist/test/Sema/attr-availability.c vendor/clang/dist/test/SemaCXX/ms-uuid.cpp vendor/clang/dist/test/SemaCXX/varargs.cpp vendor/clang/dist/test/SemaObjC/x86-method-vector-values.m vendor/clang/dist/test/SemaOpenCL/invalid-kernel-attrs.cl vendor/clang/dist/test/SemaOpenCL/sampler_t.cl vendor/clang/dist/unittests/ASTMatchers/ASTMatchersNodeTest.cpp vendor/clang/dist/unittests/Format/FormatTestJS.cpp Modified: vendor/clang/dist/docs/LanguageExtensions.rst ============================================================================== --- vendor/clang/dist/docs/LanguageExtensions.rst Mon May 8 17:13:05 2017 (r317950) +++ vendor/clang/dist/docs/LanguageExtensions.rst Mon May 8 17:13:11 2017 (r317951) @@ -780,14 +780,14 @@ Use ``__has_feature(cxx_variadic_templat ``__has_extension(cxx_variadic_templates)`` to determine if support for variadic templates is enabled. -C++1y +C++14 ----- -The features listed below are part of the committee draft for the C++1y -standard. As a result, all these features are enabled with the ``-std=c++1y`` -or ``-std=gnu++1y`` option when compiling C++ code. +The features listed below are part of the C++14 standard. As a result, all +these features are enabled with the ``-std=C++14`` or ``-std=gnu++14`` option +when compiling C++ code. -C++1y binary literals +C++14 binary literals ^^^^^^^^^^^^^^^^^^^^^ Use ``__has_feature(cxx_binary_literals)`` or @@ -795,37 +795,37 @@ Use ``__has_feature(cxx_binary_literals) binary literals (for instance, ``0b10010``) are recognized. Clang supports this feature as an extension in all language modes. -C++1y contextual conversions +C++14 contextual conversions ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Use ``__has_feature(cxx_contextual_conversions)`` or -``__has_extension(cxx_contextual_conversions)`` to determine if the C++1y rules +``__has_extension(cxx_contextual_conversions)`` to determine if the C++14 rules are used when performing an implicit conversion for an array bound in a *new-expression*, the operand of a *delete-expression*, an integral constant expression, or a condition in a ``switch`` statement. -C++1y decltype(auto) +C++14 decltype(auto) ^^^^^^^^^^^^^^^^^^^^ Use ``__has_feature(cxx_decltype_auto)`` or ``__has_extension(cxx_decltype_auto)`` to determine if support for the ``decltype(auto)`` placeholder type is enabled. -C++1y default initializers for aggregates +C++14 default initializers for aggregates ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Use ``__has_feature(cxx_aggregate_nsdmi)`` or ``__has_extension(cxx_aggregate_nsdmi)`` to determine if support for default initializers in aggregate members is enabled. -C++1y digit separators +C++14 digit separators ^^^^^^^^^^^^^^^^^^^^^^ Use ``__cpp_digit_separators`` to determine if support for digit separators using single quotes (for instance, ``10'000``) is enabled. At this time, there is no corresponding ``__has_feature`` name -C++1y generalized lambda capture +C++14 generalized lambda capture ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Use ``__has_feature(cxx_init_captures)`` or @@ -833,7 +833,7 @@ Use ``__has_feature(cxx_init_captures)`` lambda captures with explicit initializers is enabled (for instance, ``[n(0)] { return ++n; }``). -C++1y generic lambdas +C++14 generic lambdas ^^^^^^^^^^^^^^^^^^^^^ Use ``__has_feature(cxx_generic_lambdas)`` or @@ -841,7 +841,7 @@ Use ``__has_feature(cxx_generic_lambdas) (polymorphic) lambdas is enabled (for instance, ``[] (auto x) { return x + 1; }``). -C++1y relaxed constexpr +C++14 relaxed constexpr ^^^^^^^^^^^^^^^^^^^^^^^ Use ``__has_feature(cxx_relaxed_constexpr)`` or @@ -849,7 +849,7 @@ Use ``__has_feature(cxx_relaxed_constexp declarations, local variable modification, and control flow constructs are permitted in ``constexpr`` functions. -C++1y return type deduction +C++14 return type deduction ^^^^^^^^^^^^^^^^^^^^^^^^^^^ Use ``__has_feature(cxx_return_type_deduction)`` or @@ -857,7 +857,7 @@ Use ``__has_feature(cxx_return_type_dedu for return type deduction for functions (using ``auto`` as a return type) is enabled. -C++1y runtime-sized arrays +C++14 runtime-sized arrays ^^^^^^^^^^^^^^^^^^^^^^^^^^ Use ``__has_feature(cxx_runtime_array)`` or @@ -866,7 +866,7 @@ for arrays of runtime bound (a restricte is enabled. Clang's implementation of this feature is incomplete. -C++1y variable templates +C++14 variable templates ^^^^^^^^^^^^^^^^^^^^^^^^ Use ``__has_feature(cxx_variable_templates)`` or Modified: vendor/clang/dist/docs/LibASTMatchersReference.html ============================================================================== --- vendor/clang/dist/docs/LibASTMatchersReference.html Mon May 8 17:13:05 2017 (r317950) +++ vendor/clang/dist/docs/LibASTMatchersReference.html Mon May 8 17:13:11 2017 (r317951) @@ -924,6 +924,19 @@ in +Matcher<Stmt>cxxStdInitializerListExprMatcher<CXXStdInitializerListExpr>... +
Matches C++ initializer list expressions.
+
+Given
+  std::vector<int> a({ 1, 2, 3 });
+  std::vector<int> b = { 4, 5 };
+  int c[] = { 6, 7 };
+  std::pair<int, int> d = { 8, 9 };
+cxxStdInitializerListExpr()
+  matches "{ 1, 2, 3 }" and "{ 4, 5 }"
+
+ + Matcher<Stmt>cxxTemporaryObjectExprMatcher<CXXTemporaryObjectExpr>...
Matches functional cast expressions having N != 1 arguments
 
@@ -1160,7 +1173,7 @@ Example matches [&](){return 5;}
 
Matches nodes where temporaries are materialized.
 
 Example: Given
-  struct T {void func()};
+  struct T {void func();};
   T f();
   void g(T);
 materializeTemporaryExpr() matches 'f()' in these statements
@@ -5233,7 +5246,7 @@ Example matches y in x(y)
 
Matches on the receiver of an ObjectiveC Message expression.
 
 Example
-matcher = objCMessageExpr(hasRecieverType(asString("UIWebView *")));
+matcher = objCMessageExpr(hasReceiverType(asString("UIWebView *")));
 matches the [webView ...] message invocation.
   NSString *webViewJavaScript = ...
   UIWebView *webView = ...

Modified: vendor/clang/dist/docs/SanitizerCoverage.rst
==============================================================================
--- vendor/clang/dist/docs/SanitizerCoverage.rst	Mon May  8 17:13:05 2017	(r317950)
+++ vendor/clang/dist/docs/SanitizerCoverage.rst	Mon May  8 17:13:11 2017	(r317951)
@@ -144,8 +144,9 @@ Use these flags together with ``trace-pc
 like this: ``-fsanitize-coverage=func,trace-pc-guard``.
 
 When ``edge`` or ``bb`` is used, some of the edges/blocks may still be left
-uninstrumented if such instrumentation is considered redundant.
-**TODO**: add a user-visible option to disable the optimization.
+uninstrumented (pruned) if such instrumentation is considered redundant.
+Use ``no-prune`` (e.g. ``-fsanitize-coverage=bb,no-prune,trace-pc-guard``)
+to disable pruning. This could be useful for better coverage visualization.
 
 
 Edge coverage

Modified: vendor/clang/dist/docs/ThreadSafetyAnalysis.rst
==============================================================================
--- vendor/clang/dist/docs/ThreadSafetyAnalysis.rst	Mon May  8 17:13:05 2017	(r317950)
+++ vendor/clang/dist/docs/ThreadSafetyAnalysis.rst	Mon May  8 17:13:11 2017	(r317951)
@@ -764,8 +764,6 @@ implementation.
   #define THREAD_ANNOTATION_ATTRIBUTE__(x)   // no-op
   #endif
 
-  #define THREAD_ANNOTATION_ATTRIBUTE__(x)   __attribute__((x))
-
   #define CAPABILITY(x) \
     THREAD_ANNOTATION_ATTRIBUTE__(capability(x))
 

Modified: vendor/clang/dist/include/clang/AST/ODRHash.h
==============================================================================
--- vendor/clang/dist/include/clang/AST/ODRHash.h	Mon May  8 17:13:05 2017	(r317950)
+++ vendor/clang/dist/include/clang/AST/ODRHash.h	Mon May  8 17:13:11 2017	(r317951)
@@ -25,7 +25,7 @@ namespace clang {
 
 class Decl;
 class IdentifierInfo;
-class NestedNameSpecifer;
+class NestedNameSpecifier;
 class Stmt;
 class TemplateParameterList;
 

Modified: vendor/clang/dist/include/clang/ASTMatchers/ASTMatchers.h
==============================================================================
--- vendor/clang/dist/include/clang/ASTMatchers/ASTMatchers.h	Mon May  8 17:13:05 2017	(r317950)
+++ vendor/clang/dist/include/clang/ASTMatchers/ASTMatchers.h	Mon May  8 17:13:11 2017	(r317951)
@@ -1223,6 +1223,20 @@ AST_MATCHER_P(InitListExpr, hasSyntactic
           InnerMatcher.matches(*SyntForm, Finder, Builder));
 }
 
+/// \brief Matches C++ initializer list expressions.
+///
+/// Given
+/// \code
+///   std::vector a({ 1, 2, 3 });
+///   std::vector b = { 4, 5 };
+///   int c[] = { 6, 7 };
+///   std::pair d = { 8, 9 };
+/// \endcode
+/// cxxStdInitializerListExpr()
+///   matches "{ 1, 2, 3 }" and "{ 4, 5 }"
+const internal::VariadicDynCastAllOfMatcher cxxStdInitializerListExpr;
+
 /// \brief Matches implicit initializers of init list expressions.
 ///
 /// Given

Modified: vendor/clang/dist/include/clang/Basic/Attr.td
==============================================================================
--- vendor/clang/dist/include/clang/Basic/Attr.td	Mon May  8 17:13:05 2017	(r317950)
+++ vendor/clang/dist/include/clang/Basic/Attr.td	Mon May  8 17:13:11 2017	(r317951)
@@ -864,6 +864,13 @@ def OpenCLUnrollHint : InheritableAttr {
   let Documentation = [OpenCLUnrollHintDocs];
 }
 
+def OpenCLIntelReqdSubGroupSize: InheritableAttr {
+  let Spellings = [GNU<"intel_reqd_sub_group_size">];
+  let Args = [UnsignedArgument<"SubGroupSize">];
+  let Subjects = SubjectList<[Function], ErrorDiag>;
+  let Documentation = [OpenCLIntelReqdSubGroupSizeDocs];
+}
+
 // This attribute is both a type attribute, and a declaration attribute (for
 // parameter variables).
 def OpenCLAccess : Attr {

Modified: vendor/clang/dist/include/clang/Basic/AttrDocs.td
==============================================================================
--- vendor/clang/dist/include/clang/Basic/AttrDocs.td	Mon May  8 17:13:05 2017	(r317950)
+++ vendor/clang/dist/include/clang/Basic/AttrDocs.td	Mon May  8 17:13:11 2017	(r317951)
@@ -2216,6 +2216,21 @@ s6.11.5 for details.
   }];
 }
 
+def OpenCLIntelReqdSubGroupSizeDocs : Documentation {
+  let Category = DocCatStmt;
+  let Heading = "__attribute__((intel_reqd_sub_group_size))";
+  let Content = [{
+The optional attribute intel_reqd_sub_group_size can be used to indicate that
+the kernel must be compiled and executed with the specified subgroup size. When
+this attribute is present, get_max_sub_group_size() is guaranteed to return the
+specified integer value. This is important for the correctness of many subgroup
+algorithms, and in some cases may be used by the compiler to generate more optimal
+code. See `cl_intel_required_subgroup_size
+`
+for details.
+  }];
+}
+
 def OpenCLAccessDocs : Documentation {
   let Category = DocCatStmt;
   let Heading = "__read_only, __write_only, __read_write (read_only, write_only, read_write)";

Modified: vendor/clang/dist/include/clang/Basic/BuiltinsARM.def
==============================================================================
--- vendor/clang/dist/include/clang/Basic/BuiltinsARM.def	Mon May  8 17:13:05 2017	(r317950)
+++ vendor/clang/dist/include/clang/Basic/BuiltinsARM.def	Mon May  8 17:13:11 2017	(r317951)
@@ -25,11 +25,93 @@
 // In libgcc
 BUILTIN(__clear_cache, "vv*v*", "i")
 
+// 16-bit multiplications
+BUILTIN(__builtin_arm_smulbb, "iii", "nc")
+BUILTIN(__builtin_arm_smulbt, "iii", "nc")
+BUILTIN(__builtin_arm_smultb, "iii", "nc")
+BUILTIN(__builtin_arm_smultt, "iii", "nc")
+BUILTIN(__builtin_arm_smulwb, "iii", "nc")
+BUILTIN(__builtin_arm_smulwt, "iii", "nc")
+
 // Saturating arithmetic
 BUILTIN(__builtin_arm_qadd, "iii", "nc")
 BUILTIN(__builtin_arm_qsub, "iii", "nc")
 BUILTIN(__builtin_arm_ssat, "iiUi", "nc")
-BUILTIN(__builtin_arm_usat, "UiUiUi", "nc")
+BUILTIN(__builtin_arm_usat, "UiiUi", "nc")
+
+BUILTIN(__builtin_arm_smlabb, "iiii", "nc")
+BUILTIN(__builtin_arm_smlabt, "iiii", "nc")
+BUILTIN(__builtin_arm_smlatb, "iiii", "nc")
+BUILTIN(__builtin_arm_smlatt, "iiii", "nc")
+BUILTIN(__builtin_arm_smlawb, "iiii", "nc")
+BUILTIN(__builtin_arm_smlawt, "iiii", "nc")
+
+BUILTIN(__builtin_arm_ssat16, "iii", "nc")
+BUILTIN(__builtin_arm_usat16, "iii", "nc")
+
+BUILTIN(__builtin_arm_sxtab16, "iii", "nc")
+BUILTIN(__builtin_arm_sxtb16, "ii", "nc")
+BUILTIN(__builtin_arm_uxtab16, "iii", "nc")
+BUILTIN(__builtin_arm_uxtb16, "ii", "nc")
+
+BUILTIN(__builtin_arm_sel, "iii", "nc")
+
+BUILTIN(__builtin_arm_qadd8, "iii", "nc")
+BUILTIN(__builtin_arm_qsub8, "iii", "nc")
+BUILTIN(__builtin_arm_sadd8, "iii", "nc")
+BUILTIN(__builtin_arm_shadd8, "iii", "nc")
+BUILTIN(__builtin_arm_shsub8, "iii", "nc")
+BUILTIN(__builtin_arm_ssub8, "iii", "nc")
+BUILTIN(__builtin_arm_uadd8, "UiUiUi", "nc")
+BUILTIN(__builtin_arm_uhadd8, "UiUiUi", "nc")
+BUILTIN(__builtin_arm_uhsub8, "UiUiUi", "nc")
+BUILTIN(__builtin_arm_uqadd8, "UiUiUi", "nc")
+BUILTIN(__builtin_arm_uqsub8, "UiUiUi", "nc")
+BUILTIN(__builtin_arm_usub8, "UiUiUi", "nc")
+
+// Sum of 8-bit absolute differences
+BUILTIN(__builtin_arm_usad8, "UiUiUi", "nc")
+BUILTIN(__builtin_arm_usada8, "UiUiUiUi", "nc")
+
+// Parallel 16-bit addition and subtraction
+BUILTIN(__builtin_arm_qadd16, "iii", "nc")
+BUILTIN(__builtin_arm_qasx, "iii", "nc")
+BUILTIN(__builtin_arm_qsax, "iii", "nc")
+BUILTIN(__builtin_arm_qsub16, "iii", "nc")
+BUILTIN(__builtin_arm_sadd16, "iii", "nc")
+BUILTIN(__builtin_arm_sasx, "iii", "nc")
+BUILTIN(__builtin_arm_shadd16, "iii", "nc")
+BUILTIN(__builtin_arm_shasx, "iii", "nc")
+BUILTIN(__builtin_arm_shsax, "iii", "nc")
+BUILTIN(__builtin_arm_shsub16, "iii", "nc")
+BUILTIN(__builtin_arm_ssax, "iii", "nc")
+BUILTIN(__builtin_arm_ssub16, "iii", "nc")
+BUILTIN(__builtin_arm_uadd16, "UiUiUi", "nc")
+BUILTIN(__builtin_arm_uasx, "UiUiUi", "nc")
+BUILTIN(__builtin_arm_uhadd16, "UiUiUi", "nc")
+BUILTIN(__builtin_arm_uhasx, "UiUiUi", "nc")
+BUILTIN(__builtin_arm_uhsax, "UiUiUi", "nc")
+BUILTIN(__builtin_arm_uhsub16, "UiUiUi", "nc")
+BUILTIN(__builtin_arm_uqadd16, "UiUiUi", "nc")
+BUILTIN(__builtin_arm_uqasx, "UiUiUi", "nc")
+BUILTIN(__builtin_arm_uqsax, "UiUiUi", "nc")
+BUILTIN(__builtin_arm_uqsub16, "UiUiUi", "nc")
+BUILTIN(__builtin_arm_usax, "UiUiUi", "nc")
+BUILTIN(__builtin_arm_usub16, "UiUiUi", "nc")
+
+// Parallel 16-bit multiplication
+BUILTIN(__builtin_arm_smlad, "iiii", "nc")
+BUILTIN(__builtin_arm_smladx, "iiii", "nc")
+BUILTIN(__builtin_arm_smlald, "LLiiiLLi", "nc")
+BUILTIN(__builtin_arm_smlaldx, "LLiiiLLi", "nc")
+BUILTIN(__builtin_arm_smlsd, "iiii", "nc")
+BUILTIN(__builtin_arm_smlsdx, "iiii", "nc")
+BUILTIN(__builtin_arm_smlsld, "LLiiiLLi", "nc")
+BUILTIN(__builtin_arm_smlsldx, "LLiiiLLi", "nc")
+BUILTIN(__builtin_arm_smuad, "iii", "nc")
+BUILTIN(__builtin_arm_smuadx, "iii", "nc")
+BUILTIN(__builtin_arm_smusd, "iii", "nc")
+BUILTIN(__builtin_arm_smusdx, "iii", "nc")
 
 // Bit manipulation
 BUILTIN(__builtin_arm_rbit, "UiUi", "nc")

Modified: vendor/clang/dist/include/clang/Basic/BuiltinsX86.def
==============================================================================
--- vendor/clang/dist/include/clang/Basic/BuiltinsX86.def	Mon May  8 17:13:05 2017	(r317950)
+++ vendor/clang/dist/include/clang/Basic/BuiltinsX86.def	Mon May  8 17:13:11 2017	(r317951)
@@ -668,6 +668,12 @@ TARGET_BUILTIN(__builtin_ia32_pext_si, "
 // TBM
 TARGET_BUILTIN(__builtin_ia32_bextri_u32, "UiUiIUi", "", "tbm")
 
+// LWP
+TARGET_BUILTIN(__builtin_ia32_llwpcb, "vv*", "", "lwp")
+TARGET_BUILTIN(__builtin_ia32_slwpcb, "v*", "", "lwp")
+TARGET_BUILTIN(__builtin_ia32_lwpins32, "UcUiUiUi", "", "lwp")
+TARGET_BUILTIN(__builtin_ia32_lwpval32, "vUiUiUi", "", "lwp")
+
 // SHA
 TARGET_BUILTIN(__builtin_ia32_sha1rnds4, "V4iV4iV4iIc", "", "sha")
 TARGET_BUILTIN(__builtin_ia32_sha1nexte, "V4iV4iV4i", "", "sha")

Modified: vendor/clang/dist/include/clang/Basic/BuiltinsX86_64.def
==============================================================================
--- vendor/clang/dist/include/clang/Basic/BuiltinsX86_64.def	Mon May  8 17:13:05 2017	(r317950)
+++ vendor/clang/dist/include/clang/Basic/BuiltinsX86_64.def	Mon May  8 17:13:11 2017	(r317951)
@@ -69,6 +69,8 @@ TARGET_BUILTIN(__builtin_ia32_bzhi_di, "
 TARGET_BUILTIN(__builtin_ia32_pdep_di, "ULLiULLiULLi", "", "bmi2")
 TARGET_BUILTIN(__builtin_ia32_pext_di, "ULLiULLiULLi", "", "bmi2")
 TARGET_BUILTIN(__builtin_ia32_bextri_u64, "ULLiULLiIULLi", "", "tbm")
+TARGET_BUILTIN(__builtin_ia32_lwpins64, "UcULLiUiUi", "", "lwp")
+TARGET_BUILTIN(__builtin_ia32_lwpval64, "vULLiUiUi", "", "lwp")
 TARGET_BUILTIN(__builtin_ia32_pbroadcastq512_gpr_mask, "V8LLiLLiV8LLiUc", "", "avx512f")
 TARGET_BUILTIN(__builtin_ia32_pbroadcastq128_gpr_mask, "V2LLiULLiV2LLiUc","","avx512vl")
 TARGET_BUILTIN(__builtin_ia32_pbroadcastq256_gpr_mask, "V4LLiULLiV4LLiUc","","avx512vl")

Modified: vendor/clang/dist/include/clang/Basic/DiagnosticLexKinds.td
==============================================================================
--- vendor/clang/dist/include/clang/Basic/DiagnosticLexKinds.td	Mon May  8 17:13:05 2017	(r317950)
+++ vendor/clang/dist/include/clang/Basic/DiagnosticLexKinds.td	Mon May  8 17:13:11 2017	(r317951)
@@ -475,8 +475,6 @@ def warn_pragma_pop_macro_no_push : Warn
 def warn_pragma_message : Warning<"%0">,
    InGroup, DefaultWarnNoWerror;
 def err_pragma_message : Error<"%0">;
-def err_pragma_module_import_expected_module_name : Error<
-  "expected %select{identifier in|'.' or end of directive after}0 module name">;
 def warn_pragma_ignored : Warning<"unknown pragma ignored">,
    InGroup, DefaultIgnore;
 def ext_stdc_pragma_ignored : ExtWarn<"unknown pragma in STDC namespace">,
@@ -511,6 +509,22 @@ def warn_pragma_debug_unexpected_command
   "unexpected debug command '%0'">, InGroup;
 def warn_pragma_debug_missing_argument : Warning<
   "missing argument to debug command '%0'">, InGroup;
+// #pragma module
+def err_pp_expected_module_name : Error<
+  "expected %select{identifier after '.' in |}0module name">;
+def err_pp_module_begin_wrong_module : Error<
+  "must specify '-fmodule-name=%0' to enter %select{|submodule of }1"
+  "this module%select{ (current module is %3)|}2">;
+def err_pp_module_begin_no_module_map : Error<
+  "no module map available for module %0">;
+def err_pp_module_begin_no_submodule : Error<
+  "submodule %0.%1 not declared in module map">;
+def err_pp_module_begin_without_module_end : Error<
+  "no matching '#pragma clang module end' for this "
+  "'#pragma clang module begin'">;
+def err_pp_module_end_without_module_begin : Error<
+  "no matching '#pragma clang module begin' for this "
+  "'#pragma clang module end'">;
 
 def err_defined_macro_name : Error<"'defined' cannot be used as a macro name">;
 def err_paste_at_start : Error<

Modified: vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td
==============================================================================
--- vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td	Mon May  8 17:13:05 2017	(r317950)
+++ vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td	Mon May  8 17:13:11 2017	(r317951)
@@ -730,6 +730,9 @@ def err_super_in_lambda_unsupported : Er
 def warn_pragma_unused_undeclared_var : Warning<
   "undeclared variable %0 used as an argument for '#pragma unused'">,
   InGroup;
+def warn_atl_uuid_deprecated : Warning<
+  "specifying 'uuid' as an ATL attribute is deprecated; use __declspec instead">,
+  InGroup;
 def warn_pragma_unused_expected_var_arg : Warning<
   "only variables can be arguments to '#pragma unused'">,
   InGroup;
@@ -2088,7 +2091,7 @@ def err_enum_invalid_underlying : Error<
   "non-integral type %0 is an invalid underlying type">;
 def err_enumerator_too_large : Error<
   "enumerator value is not representable in the underlying type %0">;
-def ext_enumerator_too_large : ExtWarn<
+def ext_enumerator_too_large : Extension<
   "enumerator value is not representable in the underlying type %0">,
   InGroup;
 def err_enumerator_wrapped : Error<
@@ -2868,7 +2871,8 @@ def warn_partial_availability : Warning<
 def note_partial_availability_silence : Note<
   "explicitly redeclare %0 to silence this warning">;
 def note_unguarded_available_silence : Note<
-  "enclose %0 in an @available check to silence this warning">;
+  "enclose %0 in %select{an @available|a __builtin_available}1 check to silence"
+  " this warning">;
 def warn_partial_message : Warning<"%0 is partial: %1">,
     InGroup, DefaultIgnore;
 def warn_partial_fwdclass_message : Warning<
@@ -4759,7 +4763,7 @@ def ext_forward_ref_enum : Extension<
   "ISO C forbids forward references to 'enum' types">;
 def err_forward_ref_enum : Error<
   "ISO C++ forbids forward references to 'enum' types">;
-def ext_ms_forward_ref_enum : Extension<
+def ext_ms_forward_ref_enum : ExtWarn<
   "forward references to 'enum' types are a Microsoft extension">,
   InGroup;
 def ext_forward_ref_enum_def : Extension<
@@ -7920,7 +7924,11 @@ def warn_empty_switch_body : Warning<
 def note_empty_body_on_separate_line : Note<
   "put the semicolon on a separate line to silence this warning">;
 
-def err_va_start_used_in_non_variadic_function : Error<
+def err_va_start_captured_stmt : Error<
+  "'va_start' cannot be used in a captured statement">;
+def err_va_start_outside_function : Error<
+  "'va_start' cannot be used outside a function">;
+def err_va_start_fixed_function : Error<
   "'va_start' used in function with fixed args">;
 def err_va_start_used_in_wrong_abi_function : Error<
   "'va_start' used in %select{System V|Win64}0 ABI function">;
@@ -8297,6 +8305,8 @@ def err_sampler_argument_required : Erro
   "sampler_t variable required - got %0">;
 def err_wrong_sampler_addressspace: Error<
   "sampler type cannot be used with the __local and __global address space qualifiers">;
+def err_opencl_nonconst_global_sampler : Error<
+  "global sampler requires a const or constant address space qualifier">;
 def err_opencl_cast_non_zero_to_event_t : Error<
   "cannot cast non-zero value '%0' to 'event_t'">;
 def err_opencl_global_invalid_addr_space : Error<
@@ -8971,6 +8981,9 @@ def warn_nullability_lost : Warning<
   "implicit conversion from nullable pointer %0 to non-nullable pointer "
   "type %1">,
   InGroup, DefaultIgnore;
+def warn_zero_as_null_pointer_constant : Warning<
+  "zero as null pointer constant">,
+  InGroup>, DefaultIgnore;
 
 def err_nullability_cs_multilevel : Error<
   "nullability keyword %0 cannot be applied to multi-level pointer type %1">;

Modified: vendor/clang/dist/include/clang/Driver/CC1Options.td
==============================================================================
--- vendor/clang/dist/include/clang/Driver/CC1Options.td	Mon May  8 17:13:05 2017	(r317950)
+++ vendor/clang/dist/include/clang/Driver/CC1Options.td	Mon May  8 17:13:11 2017	(r317951)
@@ -297,6 +297,9 @@ def fsanitize_coverage_trace_pc
 def fsanitize_coverage_trace_pc_guard
     : Flag<["-"], "fsanitize-coverage-trace-pc-guard">,
       HelpText<"Enable PC tracing with guard in sanitizer coverage">;
+def fsanitize_coverage_no_prune
+    : Flag<["-"], "fsanitize-coverage-no-prune">,
+      HelpText<"Disable coverage pruning (i.e. instrument all blocks/edges)">;
 def fprofile_instrument_EQ : Joined<["-"], "fprofile-instrument=">,
     HelpText<"Enable PGO instrumentation. The accepted value is clang, llvm, "
              "or none">;

Modified: vendor/clang/dist/include/clang/Driver/Distro.h
==============================================================================
--- vendor/clang/dist/include/clang/Driver/Distro.h	Mon May  8 17:13:05 2017	(r317950)
+++ vendor/clang/dist/include/clang/Driver/Distro.h	Mon May  8 17:13:11 2017	(r317951)
@@ -57,6 +57,7 @@ public:
     UbuntuXenial,
     UbuntuYakkety,
     UbuntuZesty,
+    UbuntuArtful,
     UnknownDistro
   };
 
@@ -110,9 +111,9 @@ public:
   }
 
   bool IsUbuntu() const {
-    return DistroVal >= UbuntuHardy && DistroVal <= UbuntuZesty;
+    return DistroVal >= UbuntuHardy && DistroVal <= UbuntuArtful;
   }
- 
+
   /// @}
 };
 

Modified: vendor/clang/dist/include/clang/Driver/Multilib.h
==============================================================================
--- vendor/clang/dist/include/clang/Driver/Multilib.h	Mon May  8 17:13:05 2017	(r317950)
+++ vendor/clang/dist/include/clang/Driver/Multilib.h	Mon May  8 17:13:11 2017	(r317951)
@@ -70,13 +70,21 @@ public:
   /// All elements begin with either '+' or '-'
   const flags_list &flags() const { return Flags; }
   flags_list &flags() { return Flags; }
+
   /// Add a flag to the flags list
+  /// \p Flag must be a flag accepted by the driver with its leading '-' removed,
+  ///     and replaced with either:
+  ///       '-' which contraindicates using this multilib with that flag
+  ///     or:
+  ///       '+' which promotes using this multilib in the presence of that flag
+  ///     otherwise '-print-multi-lib' will not emit them correctly.
   Multilib &flag(StringRef F) {
     assert(F.front() == '+' || F.front() == '-');
     Flags.push_back(F);
     return *this;
   }
 
+  LLVM_DUMP_METHOD void dump() const;
   /// \brief print summary of the Multilib
   void print(raw_ostream &OS) const;
 
@@ -150,6 +158,7 @@ public:
 
   unsigned size() const { return Multilibs.size(); }
 
+  LLVM_DUMP_METHOD void dump() const;
   void print(raw_ostream &OS) const;
 
   MultilibSet &setIncludeDirsCallback(IncludeDirsFunc F) {

Modified: vendor/clang/dist/include/clang/Driver/Options.td
==============================================================================
--- vendor/clang/dist/include/clang/Driver/Options.td	Mon May  8 17:13:05 2017	(r317950)
+++ vendor/clang/dist/include/clang/Driver/Options.td	Mon May  8 17:13:11 2017	(r317951)
@@ -1688,6 +1688,8 @@ def mllvm : Separate<["-"], "mllvm">, Fl
   HelpText<"Additional arguments to forward to LLVM's option processing">;
 def mmacosx_version_min_EQ : Joined<["-"], "mmacosx-version-min=">,
   Group, HelpText<"Set Mac OS X deployment target">;
+def mmacos_version_min_EQ : Joined<["-"], "mmacos-version-min=">,
+  Group, Alias;
 def mms_bitfields : Flag<["-"], "mms-bitfields">, Group, Flags<[CC1Option]>,
   HelpText<"Set the default structure layout to be compatible with the Microsoft compiler standard">;
 def mno_ms_bitfields : Flag<["-"], "mno-ms-bitfields">, Group,
@@ -1750,6 +1752,7 @@ def mno_bmi : Flag<["-"], "mno-bmi">, Gr
 def mno_bmi2 : Flag<["-"], "mno-bmi2">, Group;
 def mno_popcnt : Flag<["-"], "mno-popcnt">, Group;
 def mno_tbm : Flag<["-"], "mno-tbm">, Group;
+def mno_lwp : Flag<["-"], "mno-lwp">, Group;
 def mno_fma4 : Flag<["-"], "mno-fma4">, Group;
 def mno_fma : Flag<["-"], "mno-fma">, Group;
 def mno_xop : Flag<["-"], "mno-xop">, Group;
@@ -1949,6 +1952,7 @@ def mbmi : Flag<["-"], "mbmi">, Group, Group;
 def mpopcnt : Flag<["-"], "mpopcnt">, Group;
 def mtbm : Flag<["-"], "mtbm">, Group;
+def mlwp : Flag<["-"], "mlwp">, Group;
 def mfma4 : Flag<["-"], "mfma4">, Group;
 def mfma : Flag<["-"], "mfma">, Group;
 def mxop : Flag<["-"], "mxop">, Group;

Modified: vendor/clang/dist/include/clang/Frontend/CodeGenOptions.def
==============================================================================
--- vendor/clang/dist/include/clang/Frontend/CodeGenOptions.def	Mon May  8 17:13:05 2017	(r317950)
+++ vendor/clang/dist/include/clang/Frontend/CodeGenOptions.def	Mon May  8 17:13:11 2017	(r317951)
@@ -160,6 +160,7 @@ CODEGENOPT(SanitizeCoverageTracePC, 1, 0
                                           ///< in sanitizer coverage.
 CODEGENOPT(SanitizeCoverageTracePCGuard, 1, 0) ///< Enable PC tracing with guard
                                                ///< in sanitizer coverage.
+CODEGENOPT(SanitizeCoverageNoPrune, 1, 0) ///< Disable coverage pruning.
 CODEGENOPT(SanitizeStats     , 1, 0) ///< Collect statistics for sanitizers.
 CODEGENOPT(SimplifyLibCalls  , 1, 1) ///< Set when -fbuiltin is enabled.
 CODEGENOPT(SoftFloat         , 1, 0) ///< -soft-float.

Modified: vendor/clang/dist/include/clang/Frontend/FrontendAction.h
==============================================================================
--- vendor/clang/dist/include/clang/Frontend/FrontendAction.h	Mon May  8 17:13:05 2017	(r317950)
+++ vendor/clang/dist/include/clang/Frontend/FrontendAction.h	Mon May  8 17:13:11 2017	(r317951)
@@ -146,6 +146,8 @@ public:
     return *CurrentASTUnit;
   }
 
+  Module *getCurrentModule() const;
+
   std::unique_ptr takeCurrentASTUnit() {
     return std::move(CurrentASTUnit);
   }

Modified: vendor/clang/dist/include/clang/Lex/HeaderSearch.h
==============================================================================
--- vendor/clang/dist/include/clang/Lex/HeaderSearch.h	Mon May  8 17:13:05 2017	(r317950)
+++ vendor/clang/dist/include/clang/Lex/HeaderSearch.h	Mon May  8 17:13:11 2017	(r317951)
@@ -538,9 +538,15 @@ public:
   ///
   /// \param File The module map file.
   /// \param IsSystem Whether this file is in a system header directory.
+  /// \param ID If the module map file is already mapped (perhaps as part of
+  ///        processing a preprocessed module), the ID of the file.
+  /// \param Offset [inout] An offset within ID to start parsing. On exit,
+  ///        filled by the end of the parsed contents (either EOF or the
+  ///        location of an end-of-module-map pragma).
   ///
   /// \returns true if an error occurred, false otherwise.
-  bool loadModuleMapFile(const FileEntry *File, bool IsSystem);
+  bool loadModuleMapFile(const FileEntry *File, bool IsSystem,
+                         FileID ID = FileID(), unsigned *Offset = nullptr);
 
   /// \brief Collect the set of all known, top-level modules.
   ///
@@ -686,7 +692,9 @@ private:
 
   LoadModuleMapResult loadModuleMapFileImpl(const FileEntry *File,
                                             bool IsSystem,
-                                            const DirectoryEntry *Dir);
+                                            const DirectoryEntry *Dir,
+                                            FileID ID = FileID(),
+                                            unsigned *Offset = nullptr);
 
   /// \brief Try to load the module map file in the given directory.
   ///

Modified: vendor/clang/dist/include/clang/Lex/Lexer.h
==============================================================================
--- vendor/clang/dist/include/clang/Lex/Lexer.h	Mon May  8 17:13:05 2017	(r317950)
+++ vendor/clang/dist/include/clang/Lex/Lexer.h	Mon May  8 17:13:11 2017	(r317951)
@@ -478,6 +478,11 @@ public:
     return getCharAndSizeSlowNoWarn(Ptr, Size, LangOpts);
   }
 
+  /// Returns the leading whitespace for line that corresponds to the given
+  /// location \p Loc.
+  static StringRef getIndentationForLine(SourceLocation Loc,
+                                         const SourceManager &SM);
+
   //===--------------------------------------------------------------------===//
   // Internal implementation interfaces.
 private:

Modified: vendor/clang/dist/include/clang/Lex/ModuleMap.h
==============================================================================
--- vendor/clang/dist/include/clang/Lex/ModuleMap.h	Mon May  8 17:13:05 2017	(r317950)
+++ vendor/clang/dist/include/clang/Lex/ModuleMap.h	Mon May  8 17:13:11 2017	(r317951)
@@ -546,14 +546,20 @@ public:
   /// \param HomeDir The directory in which relative paths within this module
   ///        map file will be resolved.
   ///
+  /// \param ID The FileID of the file to process, if we've already entered it.
+  ///
+  /// \param Offset [inout] On input the offset at which to start parsing. On
+  ///        output, the offset at which the module map terminated.
+  ///
   /// \param ExternModuleLoc The location of the "extern module" declaration
   ///        that caused us to load this module map file, if any.
   ///
   /// \returns true if an error occurred, false otherwise.
   bool parseModuleMapFile(const FileEntry *File, bool IsSystem,
-                          const DirectoryEntry *HomeDir,
+                          const DirectoryEntry *HomeDir, FileID ID = FileID(),
+                          unsigned *Offset = nullptr,
                           SourceLocation ExternModuleLoc = SourceLocation());
-    
+
   /// \brief Dump the contents of the module map, for debugging purposes.
   void dump();
   

Modified: vendor/clang/dist/include/clang/Lex/Preprocessor.h
==============================================================================
--- vendor/clang/dist/include/clang/Lex/Preprocessor.h	Mon May  8 17:13:05 2017	(r317950)
+++ vendor/clang/dist/include/clang/Lex/Preprocessor.h	Mon May  8 17:13:11 2017	(r317951)
@@ -324,7 +324,7 @@ class Preprocessor {
 
   /// \brief If the current lexer is for a submodule that is being built, this
   /// is that submodule.
-  Module *CurSubmodule;
+  Module *CurLexerSubmodule;
 
   /// \brief Keeps track of the stack of files currently
   /// \#included, and macros currently being expanded from, not counting
@@ -507,16 +507,19 @@ class Preprocessor {
 
   /// \brief Information about a submodule that we're currently building.
   struct BuildingSubmoduleInfo {
-    BuildingSubmoduleInfo(Module *M, SourceLocation ImportLoc,
+    BuildingSubmoduleInfo(Module *M, SourceLocation ImportLoc, bool IsPragma,
                           SubmoduleState *OuterSubmoduleState,
                           unsigned OuterPendingModuleMacroNames)
-        : M(M), ImportLoc(ImportLoc), OuterSubmoduleState(OuterSubmoduleState),
+        : M(M), ImportLoc(ImportLoc), IsPragma(IsPragma),
+          OuterSubmoduleState(OuterSubmoduleState),
           OuterPendingModuleMacroNames(OuterPendingModuleMacroNames) {}
 
     /// The module that we are building.
     Module *M;
     /// The location at which the module was included.
     SourceLocation ImportLoc;
+    /// Whether we entered this submodule via a pragma.
+    bool IsPragma;
     /// The previous SubmoduleState.
     SubmoduleState *OuterSubmoduleState;
     /// The number of pending module macro names when we started building this.
@@ -773,8 +776,9 @@ public:
   /// expansions going on at the time.
   PreprocessorLexer *getCurrentFileLexer() const;
 
-  /// \brief Return the submodule owning the file being lexed.
-  Module *getCurrentSubmodule() const { return CurSubmodule; }
+  /// \brief Return the submodule owning the file being lexed. This may not be
+  /// the current module if we have changed modules since entering the file.
+  Module *getCurrentLexerSubmodule() const { return CurLexerSubmodule; }
 
   /// \brief Returns the FileID for the preprocessor predefines.
   FileID getPredefinesFileID() const { return PredefinesFileID; }
@@ -1726,13 +1730,16 @@ public:
   bool CheckMacroName(Token &MacroNameTok, MacroUse isDefineUndef,
                       bool *ShadowFlag = nullptr);
 
-private:
+  void EnterSubmodule(Module *M, SourceLocation ImportLoc, bool ForPragma);
+  Module *LeaveSubmodule(bool ForPragma);
 
+private:
   void PushIncludeMacroStack() {
     assert(CurLexerKind != CLK_CachingLexer && "cannot push a caching lexer");
-    IncludeMacroStack.emplace_back(
-        CurLexerKind, CurSubmodule, std::move(CurLexer), std::move(CurPTHLexer),
-        CurPPLexer, std::move(CurTokenLexer), CurDirLookup);
+    IncludeMacroStack.emplace_back(CurLexerKind, CurLexerSubmodule,
+                                   std::move(CurLexer), std::move(CurPTHLexer),
+                                   CurPPLexer, std::move(CurTokenLexer),
+                                   CurDirLookup);
     CurPPLexer = nullptr;
   }
 
@@ -1742,16 +1749,13 @@ private:
     CurPPLexer = IncludeMacroStack.back().ThePPLexer;
     CurTokenLexer = std::move(IncludeMacroStack.back().TheTokenLexer);
     CurDirLookup  = IncludeMacroStack.back().TheDirLookup;
-    CurSubmodule = IncludeMacroStack.back().TheSubmodule;
+    CurLexerSubmodule = IncludeMacroStack.back().TheSubmodule;
     CurLexerKind = IncludeMacroStack.back().CurLexerKind;
     IncludeMacroStack.pop_back();
   }
 
   void PropagateLineStartLeadingSpaceInfo(Token &Result);
 
-  void EnterSubmodule(Module *M, SourceLocation ImportLoc);
-  void LeaveSubmodule();
-
   /// Determine whether we need to create module macros for #defines in the
   /// current context.
   bool needModuleMacros() const;
@@ -1967,7 +1971,6 @@ public:
   void HandlePragmaPoison();
   void HandlePragmaSystemHeader(Token &SysHeaderTok);
   void HandlePragmaDependency(Token &DependencyTok);
-  void HandlePragmaModuleImport(Token &Tok);
   void HandlePragmaPushMacro(Token &Tok);
   void HandlePragmaPopMacro(Token &Tok);
   void HandlePragmaIncludeAlias(Token &Tok);

Modified: vendor/clang/dist/include/clang/Sema/Sema.h
==============================================================================
--- vendor/clang/dist/include/clang/Sema/Sema.h	Mon May  8 17:13:05 2017	(r317950)
+++ vendor/clang/dist/include/clang/Sema/Sema.h	Mon May  8 17:13:11 2017	(r317951)
@@ -3766,6 +3766,9 @@ public:
   void diagnoseNullableToNonnullConversion(QualType DstType, QualType SrcType,
                                            SourceLocation Loc);
 
+  /// Warn when implicitly casting 0 to nullptr.
+  void diagnoseZeroToNullptrConversion(CastKind Kind, const Expr *E);
+
   ParsingDeclState PushParsingDeclaration(sema::DelayedDiagnosticPool &pool) {
     return DelayedDiagnostics.push(pool);
   }

Modified: vendor/clang/dist/include/clang/Tooling/FixIt.h
==============================================================================
--- vendor/clang/dist/include/clang/Tooling/FixIt.h	Mon May  8 17:13:05 2017	(r317950)
+++ vendor/clang/dist/include/clang/Tooling/FixIt.h	Mon May  8 17:13:11 2017	(r317951)
@@ -65,6 +65,13 @@ FixItHint createReplacement(const D &Des
                                       getText(Source, Context));
 }
 
+// \brief Returns a FixItHint to replace \p Destination by \p Source.
+template 
+FixItHint createReplacement(const D &Destination, StringRef Source) {
+  return FixItHint::CreateReplacement(internal::getSourceRange(Destination),
+                                      Source);
+}
+
 } // end namespace fixit
 } // end namespace tooling
 } // end namespace clang

Modified: vendor/clang/dist/lib/ASTMatchers/Dynamic/Registry.cpp
==============================================================================
--- vendor/clang/dist/lib/ASTMatchers/Dynamic/Registry.cpp	Mon May  8 17:13:05 2017	(r317950)
+++ vendor/clang/dist/lib/ASTMatchers/Dynamic/Registry.cpp	Mon May  8 17:13:11 2017	(r317951)
@@ -153,6 +153,7 @@ RegistryMaps::RegistryMaps() {
   REGISTER_MATCHER(cxxRecordDecl);
   REGISTER_MATCHER(cxxReinterpretCastExpr);
   REGISTER_MATCHER(cxxStaticCastExpr);
+  REGISTER_MATCHER(cxxStdInitializerListExpr);
   REGISTER_MATCHER(cxxTemporaryObjectExpr);
   REGISTER_MATCHER(cxxThisExpr);
   REGISTER_MATCHER(cxxThrowExpr);

Modified: vendor/clang/dist/lib/Basic/Diagnostic.cpp
==============================================================================
--- vendor/clang/dist/lib/Basic/Diagnostic.cpp	Mon May  8 17:13:05 2017	(r317950)
+++ vendor/clang/dist/lib/Basic/Diagnostic.cpp	Mon May  8 17:13:11 2017	(r317951)
@@ -146,10 +146,9 @@ void DiagnosticsEngine::SetDelayedDiagno
 }
 
 void DiagnosticsEngine::ReportDelayed() {
-  Report(DelayedDiagID) << DelayedDiagArg1 << DelayedDiagArg2;
+  unsigned ID = DelayedDiagID;
   DelayedDiagID = 0;
-  DelayedDiagArg1.clear();
-  DelayedDiagArg2.clear();
+  Report(ID) << DelayedDiagArg1 << DelayedDiagArg2;
 }
 
 void DiagnosticsEngine::DiagStateMap::appendFirst(
@@ -420,11 +419,10 @@ bool DiagnosticsEngine::EmitCurrentDiagn
   }
 
   // Clear out the current diagnostic object.
-  unsigned DiagID = CurDiagID;
   Clear();
 
   // If there was a delayed diagnostic, emit it now.
-  if (!Force && DelayedDiagID && DelayedDiagID != DiagID)
+  if (!Force && DelayedDiagID)
     ReportDelayed();
 
   return Emitted;

Modified: vendor/clang/dist/lib/Basic/DiagnosticIDs.cpp
==============================================================================
--- vendor/clang/dist/lib/Basic/DiagnosticIDs.cpp	Mon May  8 17:13:05 2017	(r317950)
+++ vendor/clang/dist/lib/Basic/DiagnosticIDs.cpp	Mon May  8 17:13:11 2017	(r317951)
@@ -666,6 +666,10 @@ bool DiagnosticIDs::ProcessDiag(Diagnost
     }
   }
 
+  // Make sure we set FatalErrorOccurred to ensure that the notes from the
+  // diagnostic that caused `fatal_too_many_errors` won't be emitted.
+  if (Diag.CurDiagID == diag::fatal_too_many_errors)
+    Diag.FatalErrorOccurred = true;
   // Finally, report it.
   EmitDiag(Diag, DiagLevel);
   return true;

Modified: vendor/clang/dist/lib/Basic/Targets.cpp
==============================================================================
--- vendor/clang/dist/lib/Basic/Targets.cpp	Mon May  8 17:13:05 2017	(r317950)
+++ vendor/clang/dist/lib/Basic/Targets.cpp	Mon May  8 17:13:11 2017	(r317951)
@@ -2591,6 +2591,7 @@ class X86TargetInfo : public TargetInfo 
   bool HasRDSEED = false;
   bool HasADX = false;
   bool HasTBM = false;
+  bool HasLWP = false;
   bool HasFMA = false;
   bool HasF16C = false;
   bool HasAVX512CD = false;
@@ -3363,6 +3364,7 @@ bool X86TargetInfo::initFeatureMap(
   case CK_BDVER1:
     // xop implies avx, sse4a and fma4.
     setFeatureEnabledImpl(Features, "xop", true);
+    setFeatureEnabledImpl(Features, "lwp", true);
     setFeatureEnabledImpl(Features, "lzcnt", true);
     setFeatureEnabledImpl(Features, "aes", true);
     setFeatureEnabledImpl(Features, "pclmul", true);
@@ -3634,6 +3636,8 @@ bool X86TargetInfo::handleTargetFeatures
       HasADX = true;
     } else if (Feature == "+tbm") {
       HasTBM = true;
+    } else if (Feature == "+lwp") {
+      HasLWP = true;
     } else if (Feature == "+fma") {
       HasFMA = true;
     } else if (Feature == "+f16c") {
@@ -3949,6 +3953,9 @@ void X86TargetInfo::getTargetDefines(con
   if (HasTBM)
     Builder.defineMacro("__TBM__");
 
+  if (HasLWP)
+    Builder.defineMacro("__LWP__");
+
   if (HasMWAITX)
     Builder.defineMacro("__MWAITX__");
 
@@ -4132,6 +4139,7 @@ bool X86TargetInfo::hasFeature(StringRef
       .Case("sse4.2", SSELevel >= SSE42)
       .Case("sse4a", XOPLevel >= SSE4A)
       .Case("tbm", HasTBM)
+      .Case("lwp", HasLWP)
       .Case("x86", true)
       .Case("x86_32", getTriple().getArch() == llvm::Triple::x86)
       .Case("x86_64", getTriple().getArch() == llvm::Triple::x86_64)
@@ -5443,6 +5451,7 @@ public:
         .Case("softfloat", SoftFloat)
         .Case("thumb", isThumb())
         .Case("neon", (FPU & NeonFPU) && !SoftFloat)
+        .Case("vfp", FPU && !SoftFloat)
         .Case("hwdiv", HWDiv & HWDivThumb)
         .Case("hwdiv-arm", HWDiv & HWDivARM)
         .Default(false);

Modified: vendor/clang/dist/lib/CodeGen/BackendUtil.cpp
==============================================================================
--- vendor/clang/dist/lib/CodeGen/BackendUtil.cpp	Mon May  8 17:13:05 2017	(r317950)
+++ vendor/clang/dist/lib/CodeGen/BackendUtil.cpp	Mon May  8 17:13:11 2017	(r317951)
@@ -185,6 +185,7 @@ static void addSanitizerCoveragePass(con
   Opts.Use8bitCounters = CGOpts.SanitizeCoverage8bitCounters;
   Opts.TracePC = CGOpts.SanitizeCoverageTracePC;
   Opts.TracePCGuard = CGOpts.SanitizeCoverageTracePCGuard;
+  Opts.NoPrune = CGOpts.SanitizeCoverageNoPrune;
   PM.add(createSanitizerCoverageModulePass(Opts));
 }
 
@@ -974,10 +975,14 @@ static void runThinLTOBackend(ModuleSumm
   // via a WriteIndexesThinBackend.
   FunctionImporter::ImportMapTy ImportList;
   for (auto &GlobalList : *CombinedIndex) {
+    // Ignore entries for undefined references.
+    if (GlobalList.second.SummaryList.empty())
+      continue;
+
     auto GUID = GlobalList.first;
-    assert(GlobalList.second.size() == 1 &&
+    assert(GlobalList.second.SummaryList.size() == 1 &&
            "Expected individual combined index to have one summary per GUID");
-    auto &Summary = GlobalList.second[0];
+    auto &Summary = GlobalList.second.SummaryList[0];
     // Skip the summaries for the importing module. These are included to
     // e.g. record required linkage changes.
     if (Summary->modulePath() == M->getModuleIdentifier())

Modified: vendor/clang/dist/lib/CodeGen/CGBlocks.cpp
==============================================================================
--- vendor/clang/dist/lib/CodeGen/CGBlocks.cpp	Mon May  8 17:13:05 2017	(r317950)
+++ vendor/clang/dist/lib/CodeGen/CGBlocks.cpp	Mon May  8 17:13:11 2017	(r317951)
@@ -623,9 +623,13 @@ static void enterBlockScope(CodeGenFunct
     // For const-qualified captures, emit clang.arc.use to ensure the captured
     // object doesn't get released while we are still depending on its validity
     // within the block.
-    if (VT.isConstQualified() && VT.getObjCLifetime() == Qualifiers::OCL_Strong)
+    if (VT.isConstQualified() &&
+        VT.getObjCLifetime() == Qualifiers::OCL_Strong &&
+        CGF.CGM.getCodeGenOpts().OptimizationLevel != 0) {
+      assert(CGF.CGM.getLangOpts().ObjCAutoRefCount &&
+             "expected ObjC ARC to be enabled");
       destroyer = CodeGenFunction::emitARCIntrinsicUse;
-    else if (dtorKind == QualType::DK_objc_strong_lifetime) {
+    } else if (dtorKind == QualType::DK_objc_strong_lifetime) {
       destroyer = CodeGenFunction::destroyARCStrongImprecise;
     } else {
       destroyer = CGF.getDestroyer(dtorKind);

Modified: vendor/clang/dist/lib/CodeGen/CGBuiltin.cpp
==============================================================================
--- vendor/clang/dist/lib/CodeGen/CGBuiltin.cpp	Mon May  8 17:13:05 2017	(r317950)
+++ vendor/clang/dist/lib/CodeGen/CGBuiltin.cpp	Mon May  8 17:13:11 2017	(r317951)
@@ -2751,7 +2751,7 @@ RValue CodeGenFunction::EmitBuiltinExpr(
 
     // Push a clang.arc.use cleanup for each object in RetainableOperands. The
     // cleanup will cause the use to appear after the final log call, keeping
-    // the object valid while it’s held in the log buffer.  Note that if there’s
+    // the object valid while it's held in the log buffer.  Note that if there's
     // a release cleanup on the object, it will already be active; since
     // cleanups are emitted in reverse order, the use will occur before the
     // object is released.

Modified: vendor/clang/dist/lib/CodeGen/CodeGenFunction.cpp
==============================================================================
--- vendor/clang/dist/lib/CodeGen/CodeGenFunction.cpp	Mon May  8 17:13:05 2017	(r317950)
+++ vendor/clang/dist/lib/CodeGen/CodeGenFunction.cpp	Mon May  8 17:13:11 2017	(r317951)
@@ -658,34 +658,42 @@ void CodeGenFunction::EmitOpenCLKernelMe
   GenOpenCLArgMetadata(FD, Fn, CGM, Context, Builder, getContext());
 
   if (const VecTypeHintAttr *A = FD->getAttr()) {
-    QualType hintQTy = A->getTypeHint();
-    const ExtVectorType *hintEltQTy = hintQTy->getAs();
-    bool isSignedInteger =
-        hintQTy->isSignedIntegerType() ||
-        (hintEltQTy && hintEltQTy->getElementType()->isSignedIntegerType());
-    llvm::Metadata *attrMDArgs[] = {
+    QualType HintQTy = A->getTypeHint();
+    const ExtVectorType *HintEltQTy = HintQTy->getAs();
+    bool IsSignedInteger =
+        HintQTy->isSignedIntegerType() ||
+        (HintEltQTy && HintEltQTy->getElementType()->isSignedIntegerType());
+    llvm::Metadata *AttrMDArgs[] = {
         llvm::ConstantAsMetadata::get(llvm::UndefValue::get(
             CGM.getTypes().ConvertType(A->getTypeHint()))),
         llvm::ConstantAsMetadata::get(llvm::ConstantInt::get(
             llvm::IntegerType::get(Context, 32),
-            llvm::APInt(32, (uint64_t)(isSignedInteger ? 1 : 0))))};
-    Fn->setMetadata("vec_type_hint", llvm::MDNode::get(Context, attrMDArgs));
+            llvm::APInt(32, (uint64_t)(IsSignedInteger ? 1 : 0))))};
+    Fn->setMetadata("vec_type_hint", llvm::MDNode::get(Context, AttrMDArgs));
   }
 
   if (const WorkGroupSizeHintAttr *A = FD->getAttr()) {
-    llvm::Metadata *attrMDArgs[] = {
+    llvm::Metadata *AttrMDArgs[] = {
         llvm::ConstantAsMetadata::get(Builder.getInt32(A->getXDim())),
         llvm::ConstantAsMetadata::get(Builder.getInt32(A->getYDim())),
         llvm::ConstantAsMetadata::get(Builder.getInt32(A->getZDim()))};
-    Fn->setMetadata("work_group_size_hint", llvm::MDNode::get(Context, attrMDArgs));
+    Fn->setMetadata("work_group_size_hint", llvm::MDNode::get(Context, AttrMDArgs));
   }
 
   if (const ReqdWorkGroupSizeAttr *A = FD->getAttr()) {
-    llvm::Metadata *attrMDArgs[] = {
+    llvm::Metadata *AttrMDArgs[] = {
         llvm::ConstantAsMetadata::get(Builder.getInt32(A->getXDim())),
         llvm::ConstantAsMetadata::get(Builder.getInt32(A->getYDim())),
         llvm::ConstantAsMetadata::get(Builder.getInt32(A->getZDim()))};
-    Fn->setMetadata("reqd_work_group_size", llvm::MDNode::get(Context, attrMDArgs));
+    Fn->setMetadata("reqd_work_group_size", llvm::MDNode::get(Context, AttrMDArgs));
+  }
+
+  if (const OpenCLIntelReqdSubGroupSizeAttr *A =
+          FD->getAttr()) {
+    llvm::Metadata *AttrMDArgs[] = {
+        llvm::ConstantAsMetadata::get(Builder.getInt32(A->getSubGroupSize()))};
+    Fn->setMetadata("intel_reqd_sub_group_size",
+                    llvm::MDNode::get(Context, AttrMDArgs));
   }
 }
 

Modified: vendor/clang/dist/lib/CodeGen/CodeGenFunction.h
==============================================================================
--- vendor/clang/dist/lib/CodeGen/CodeGenFunction.h	Mon May  8 17:13:05 2017	(r317950)

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

From owner-svn-src-all@freebsd.org  Mon May  8 17:13:26 2017
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 152F5D635B6;
 Mon,  8 May 2017 17:13: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 B2862995;
 Mon,  8 May 2017 17:13:25 +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 v48HDO5b042799;
 Mon, 8 May 2017 17:13:24 GMT (envelope-from dim@FreeBSD.org)
Received: (from dim@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id v48HDMAm042774;
 Mon, 8 May 2017 17:13:22 GMT (envelope-from dim@FreeBSD.org)
Message-Id: <201705081713.v48HDMAm042774@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 17:13:22 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-vendor@freebsd.org
Subject: svn commit: r317953 - in vendor/compiler-rt/dist: include/xray
 lib/asan lib/builtins lib/cfi lib/scudo lib/ubsan lib/xray
 test/asan/TestCases/Linux test/builtins/Unit
 test/sanitizer_common/TestCase...
X-SVN-Group: vendor
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.23
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Mon, 08 May 2017 17:13:26 -0000

Author: dim
Date: Mon May  8 17:13:22 2017
New Revision: 317953
URL: https://svnweb.freebsd.org/changeset/base/317953

Log:
  Vendor import of compiler-rt trunk r302418:
  https://llvm.org/svn/llvm-project/compiler-rt/trunk@302418

Added:
  vendor/compiler-rt/dist/lib/scudo/scudo_tls_android.cpp   (contents, props changed)
  vendor/compiler-rt/dist/lib/scudo/scudo_tls_android.inc   (contents, props changed)
  vendor/compiler-rt/dist/lib/scudo/scudo_tls_context_android.inc   (contents, props changed)
  vendor/compiler-rt/dist/lib/scudo/scudo_tls_context_linux.inc   (contents, props changed)
  vendor/compiler-rt/dist/lib/scudo/scudo_tls_linux.inc   (contents, props changed)
  vendor/compiler-rt/dist/lib/ubsan/ubsan_diag_standalone.cc   (contents, props changed)
  vendor/compiler-rt/dist/test/asan/TestCases/Linux/longjmp_chk.c   (contents, props changed)
  vendor/compiler-rt/dist/test/sanitizer_common/TestCases/sanitizer_coverage_no_prune.cc   (contents, props changed)
  vendor/compiler-rt/dist/test/ubsan/TestCases/Misc/Linux/print_stack_trace.cc   (contents, props changed)
  vendor/compiler-rt/dist/test/ubsan/TestCases/Misc/bool.m
  vendor/compiler-rt/dist/test/xray/TestCases/Linux/coverage-sample.cc   (contents, props changed)
  vendor/compiler-rt/dist/test/xray/TestCases/Linux/func-id-utils.cc   (contents, props changed)
Deleted:
  vendor/compiler-rt/dist/lib/scudo/scudo_tls_linux.h
Modified:
  vendor/compiler-rt/dist/include/xray/xray_interface.h
  vendor/compiler-rt/dist/lib/asan/asan_interceptors.cc
  vendor/compiler-rt/dist/lib/asan/asan_interceptors.h
  vendor/compiler-rt/dist/lib/builtins/CMakeLists.txt
  vendor/compiler-rt/dist/lib/builtins/emutls.c
  vendor/compiler-rt/dist/lib/builtins/int_types.h
  vendor/compiler-rt/dist/lib/cfi/cfi_blacklist.txt
  vendor/compiler-rt/dist/lib/scudo/CMakeLists.txt
  vendor/compiler-rt/dist/lib/scudo/scudo_allocator.cpp
  vendor/compiler-rt/dist/lib/scudo/scudo_allocator.h
  vendor/compiler-rt/dist/lib/scudo/scudo_tls.h
  vendor/compiler-rt/dist/lib/scudo/scudo_tls_linux.cpp
  vendor/compiler-rt/dist/lib/ubsan/CMakeLists.txt
  vendor/compiler-rt/dist/lib/ubsan/ubsan_handlers.cc
  vendor/compiler-rt/dist/lib/xray/xray_init.cc
  vendor/compiler-rt/dist/lib/xray/xray_interface.cc
  vendor/compiler-rt/dist/lib/xray/xray_interface_internal.h
  vendor/compiler-rt/dist/test/builtins/Unit/divxc3_test.c
  vendor/compiler-rt/dist/test/builtins/Unit/fixunstfti_test.c
  vendor/compiler-rt/dist/test/builtins/Unit/fixunsxfti_test.c
  vendor/compiler-rt/dist/test/builtins/Unit/fixxfti_test.c
  vendor/compiler-rt/dist/test/builtins/Unit/floattixf_test.c
  vendor/compiler-rt/dist/test/builtins/Unit/floatuntixf_test.c
  vendor/compiler-rt/dist/test/builtins/Unit/mulxc3_test.c

Modified: vendor/compiler-rt/dist/include/xray/xray_interface.h
==============================================================================
--- vendor/compiler-rt/dist/include/xray/xray_interface.h	Mon May  8 17:13:19 2017	(r317952)
+++ vendor/compiler-rt/dist/include/xray/xray_interface.h	Mon May  8 17:13:22 2017	(r317953)
@@ -15,10 +15,11 @@
 #define XRAY_XRAY_INTERFACE_H
 
 #include 
+#include 
 
 extern "C" {
 
-// Synchronize this with AsmPrinter::SledKind in LLVM.
+/// Synchronize this with AsmPrinter::SledKind in LLVM.
 enum XRayEntryType {
   ENTRY = 0,
   EXIT = 1,
@@ -26,32 +27,43 @@ enum XRayEntryType {
   LOG_ARGS_ENTRY = 3,
 };
 
-// Provide a function to invoke for when instrumentation points are hit. This is
-// a user-visible control surface that overrides the default implementation. The
-// function provided should take the following arguments:
-//
-//   - function id: an identifier that indicates the id of a function; this id
-//                  is generated by xray; the mapping between the function id
-//                  and the actual function pointer is available through
-//                  __xray_table.
-//   - entry type: identifies what kind of instrumentation point was encountered
-//                 (function entry, function exit, etc.). See the enum
-//                 XRayEntryType for more details.
-//
-// The user handler must handle correctly spurious calls after this handler is
-// removed or replaced with another handler, because it would be too costly for
-// XRay runtime to avoid spurious calls.
-// To prevent circular calling, the handler function itself and all its
-// direct&indirect callees must not be instrumented with XRay, which can be
-// achieved by marking them all with: __attribute__((xray_never_instrument))
-//
-// Returns 1 on success, 0 on error.
+/// Provide a function to invoke for when instrumentation points are hit. This
+/// is a user-visible control surface that overrides the default implementation.
+/// The function provided should take the following arguments:
+///
+///   - function id: an identifier that indicates the id of a function; this id
+///                  is generated by xray; the mapping between the function id
+///                  and the actual function pointer is available through
+///                  __xray_table.
+///   - entry type: identifies what kind of instrumentation point was
+///                 encountered (function entry, function exit, etc.). See the
+///                 enum XRayEntryType for more details.
+///
+/// The user handler must handle correctly spurious calls after this handler is
+/// removed or replaced with another handler, because it would be too costly for
+/// XRay runtime to avoid spurious calls.
+/// To prevent circular calling, the handler function itself and all its
+/// direct&indirect callees must not be instrumented with XRay, which can be
+/// achieved by marking them all with: __attribute__((xray_never_instrument))
+///
+/// Returns 1 on success, 0 on error.
 extern int __xray_set_handler(void (*entry)(int32_t, XRayEntryType));
 
-// This removes whatever the currently provided handler is. Returns 1 on
-// success, 0 on error.
+/// This removes whatever the currently provided handler is. Returns 1 on
+/// success, 0 on error.
 extern int __xray_remove_handler();
 
+/// Use XRay to log the first argument of each (instrumented) function call.
+/// When this function exits, all threads will have observed the effect and
+/// start logging their subsequent affected function calls (if patched).
+///
+/// Returns 1 on success, 0 on error.
+extern int __xray_set_handler_arg1(void (*)(int32_t, XRayEntryType, uint64_t));
+
+/// Disables the XRay handler used to log first arguments of function calls.
+/// Returns 1 on success, 0 on error.
+extern int __xray_remove_handler_arg1();
+
 enum XRayPatchingStatus {
   NOT_INITIALIZED = 0,
   SUCCESS = 1,
@@ -59,24 +71,31 @@ enum XRayPatchingStatus {
   FAILED = 3,
 };
 
-// This tells XRay to patch the instrumentation points. See XRayPatchingStatus
-// for possible result values.
+/// This tells XRay to patch the instrumentation points. See XRayPatchingStatus
+/// for possible result values.
 extern XRayPatchingStatus __xray_patch();
 
-// Reverses the effect of __xray_patch(). See XRayPatchingStatus for possible
-// result values.
+/// Reverses the effect of __xray_patch(). See XRayPatchingStatus for possible
+/// result values.
 extern XRayPatchingStatus __xray_unpatch();
 
-// Use XRay to log the first argument of each (instrumented) function call.
-// When this function exits, all threads will have observed the effect and
-// start logging their subsequent affected function calls (if patched).
-//
-// Returns 1 on success, 0 on error.
-extern int __xray_set_handler_arg1(void (*)(int32_t, XRayEntryType, uint64_t));
+/// This patches a specific function id. See XRayPatchingStatus for possible
+/// result values.
+extern XRayPatchingStatus __xray_patch_function(int32_t FuncId);
+
+/// This unpatches a specific function id. See XRayPatchingStatus for possible
+/// result values.
+extern XRayPatchingStatus __xray_unpatch_function(int32_t FuncId);
+
+/// This function returns the address of the function provided a valid function
+/// id. We return 0 if we encounter any error, even if 0 may be a valid function
+/// address.
+extern uintptr_t __xray_function_address(int32_t FuncId);
+
+/// This function returns the maximum valid function id. Returns 0 if we
+/// encounter errors (when there are no instrumented functions, etc.).
+extern size_t __xray_max_function_id();
 
-// Disables the XRay handler used to log first arguments of function calls.
-// Returns 1 on success, 0 on error.
-extern int __xray_remove_handler_arg1();
 }
 
 #endif

Modified: vendor/compiler-rt/dist/lib/asan/asan_interceptors.cc
==============================================================================
--- vendor/compiler-rt/dist/lib/asan/asan_interceptors.cc	Mon May  8 17:13:19 2017	(r317952)
+++ vendor/compiler-rt/dist/lib/asan/asan_interceptors.cc	Mon May  8 17:13:22 2017	(r317953)
@@ -443,6 +443,13 @@ INTERCEPTOR(void, _longjmp, void *env, i
 }
 #endif
 
+#if ASAN_INTERCEPT___LONGJMP_CHK
+INTERCEPTOR(void, __longjmp_chk, void *env, int val) {
+  __asan_handle_no_return();
+  REAL(__longjmp_chk)(env, val);
+}
+#endif
+
 #if ASAN_INTERCEPT_SIGLONGJMP
 INTERCEPTOR(void, siglongjmp, void *env, int val) {
   __asan_handle_no_return();
@@ -758,6 +765,9 @@ void InitializeAsanInterceptors() {
 #if ASAN_INTERCEPT__LONGJMP
   ASAN_INTERCEPT_FUNC(_longjmp);
 #endif
+#if ASAN_INTERCEPT___LONGJMP_CHK
+  ASAN_INTERCEPT_FUNC(__longjmp_chk);
+#endif
 #if ASAN_INTERCEPT_SIGLONGJMP
   ASAN_INTERCEPT_FUNC(siglongjmp);
 #endif

Modified: vendor/compiler-rt/dist/lib/asan/asan_interceptors.h
==============================================================================
--- vendor/compiler-rt/dist/lib/asan/asan_interceptors.h	Mon May  8 17:13:19 2017	(r317952)
+++ vendor/compiler-rt/dist/lib/asan/asan_interceptors.h	Mon May  8 17:13:22 2017	(r317953)
@@ -58,6 +58,12 @@
 # define ASAN_INTERCEPT_SIGLONGJMP 0
 #endif
 
+#if SANITIZER_LINUX && !SANITIZER_ANDROID
+# define ASAN_INTERCEPT___LONGJMP_CHK 1
+#else
+# define ASAN_INTERCEPT___LONGJMP_CHK 0
+#endif
+
 // Android bug: https://code.google.com/p/android/issues/detail?id=61799
 #if ASAN_HAS_EXCEPTIONS && !SANITIZER_WINDOWS && \
     !(SANITIZER_ANDROID && defined(__i386))

Modified: vendor/compiler-rt/dist/lib/builtins/CMakeLists.txt
==============================================================================
--- vendor/compiler-rt/dist/lib/builtins/CMakeLists.txt	Mon May  8 17:13:19 2017	(r317952)
+++ vendor/compiler-rt/dist/lib/builtins/CMakeLists.txt	Mon May  8 17:13:22 2017	(r317953)
@@ -167,6 +167,26 @@ set(GENERIC_SOURCES
   umodti3.c
   emutls.c)
 
+set(GENERIC_TF_SOURCES
+  comparetf2.c
+  extenddftf2.c
+  extendsftf2.c
+  fixtfdi.c
+  fixtfsi.c
+  fixtfti.c
+  fixunstfdi.c
+  fixunstfsi.c
+  fixunstfti.c
+  floatditf.c
+  floatsitf.c
+  floattitf.c
+  floatunditf.c
+  floatunsitf.c
+  floatuntitf.c
+  multc3.c
+  trunctfdf2.c
+  trunctfsf2.c)
+
 option(COMPILER_RT_EXCLUDE_ATOMIC_BUILTIN
   "Skip the atomic builtin (this may be needed if system headers are unavailable)"
   Off)
@@ -390,7 +410,8 @@ if(MINGW)
       udivmoddi4.c
       udivmodsi4.c
       udivsi3.c
-      umoddi3.c)
+      umoddi3.c
+      emutls.c)
 elseif(NOT WIN32)
   # TODO the EABI sources should only be added to EABI targets
   set(arm_SOURCES
@@ -404,24 +425,7 @@ elseif(NOT WIN32)
 endif()
 
 set(aarch64_SOURCES
-  comparetf2.c
-  extenddftf2.c
-  extendsftf2.c
-  fixtfdi.c
-  fixtfsi.c
-  fixtfti.c
-  fixunstfdi.c
-  fixunstfsi.c
-  fixunstfti.c
-  floatditf.c
-  floatsitf.c
-  floattitf.c
-  floatunditf.c
-  floatunsitf.c
-  floatuntitf.c
-  multc3.c
-  trunctfdf2.c
-  trunctfsf2.c
+  ${GENERIC_TF_SOURCES}
   ${GENERIC_SOURCES})
 
 set(armhf_SOURCES ${arm_SOURCES})
@@ -437,8 +441,10 @@ set(armv7em_SOURCES ${arm_SOURCES})
 
 set(mips_SOURCES ${GENERIC_SOURCES})
 set(mipsel_SOURCES ${mips_SOURCES})
-set(mips64_SOURCES ${mips_SOURCES})
-set(mips64el_SOURCES ${mips_SOURCES})
+set(mips64_SOURCES ${GENERIC_TF_SOURCES}
+                   ${mips_SOURCES})
+set(mips64el_SOURCES ${GENERIC_TF_SOURCES}
+                     ${mips_SOURCES})
 
 set(wasm32_SOURCES ${GENERIC_SOURCES})
 set(wasm64_SOURCES ${GENERIC_SOURCES})

Modified: vendor/compiler-rt/dist/lib/builtins/emutls.c
==============================================================================
--- vendor/compiler-rt/dist/lib/builtins/emutls.c	Mon May  8 17:13:19 2017	(r317952)
+++ vendor/compiler-rt/dist/lib/builtins/emutls.c	Mon May  8 17:13:22 2017	(r317953)
@@ -98,7 +98,7 @@ static __inline emutls_address_array* em
 
 #else
 
-#include 
+#include 
 #include 
 #include 
 #include 

Modified: vendor/compiler-rt/dist/lib/builtins/int_types.h
==============================================================================
--- vendor/compiler-rt/dist/lib/builtins/int_types.h	Mon May  8 17:13:19 2017	(r317952)
+++ vendor/compiler-rt/dist/lib/builtins/int_types.h	Mon May  8 17:13:22 2017	(r317953)
@@ -60,9 +60,7 @@ typedef union
     }s;
 } udwords;
 
-/* MIPS64 issue: PR 20098 */
-#if (defined(__LP64__) || defined(__wasm__)) && \
-    !(defined(__mips__) && defined(__clang__))
+#if (defined(__LP64__) || defined(__wasm__) || defined(__mips64))
 #define CRT_HAS_128BIT
 #endif
 

Modified: vendor/compiler-rt/dist/lib/cfi/cfi_blacklist.txt
==============================================================================
--- vendor/compiler-rt/dist/lib/cfi/cfi_blacklist.txt	Mon May  8 17:13:19 2017	(r317952)
+++ vendor/compiler-rt/dist/lib/cfi/cfi_blacklist.txt	Mon May  8 17:13:22 2017	(r317953)
@@ -24,3 +24,8 @@ fun:_ZNSt3__19addressof*
 # Windows C++ stdlib headers that contain bad unrelated casts.
 src:*xmemory0
 src:*xstddef
+
+# std::_Sp_counted_ptr_inplace::_Sp_counted_ptr_inplace() (libstdc++).
+# This ctor is used by std::make_shared and needs to cast to uninitialized T*
+# in order to call std::allocator_traits::construct.
+fun:_ZNSt23_Sp_counted_ptr_inplace*

Modified: vendor/compiler-rt/dist/lib/scudo/CMakeLists.txt
==============================================================================
--- vendor/compiler-rt/dist/lib/scudo/CMakeLists.txt	Mon May  8 17:13:19 2017	(r317952)
+++ vendor/compiler-rt/dist/lib/scudo/CMakeLists.txt	Mon May  8 17:13:22 2017	(r317953)
@@ -14,6 +14,7 @@ set(SCUDO_SOURCES
   scudo_interceptors.cpp
   scudo_new_delete.cpp
   scudo_termination.cpp
+  scudo_tls_android.cpp
   scudo_tls_linux.cpp
   scudo_utils.cpp)
 

Modified: vendor/compiler-rt/dist/lib/scudo/scudo_allocator.cpp
==============================================================================
--- vendor/compiler-rt/dist/lib/scudo/scudo_allocator.cpp	Mon May  8 17:13:19 2017	(r317952)
+++ vendor/compiler-rt/dist/lib/scudo/scudo_allocator.cpp	Mon May  8 17:13:22 2017	(r317953)
@@ -368,11 +368,12 @@ struct ScudoAllocator {
     void *Ptr;
     uptr Salt;
     uptr AllocationAlignment = FromPrimary ? MinAlignment : Alignment;
-    ScudoThreadContext *ThreadContext = getThreadContext();
+    ScudoThreadContext *ThreadContext = getThreadContextAndLock();
     if (LIKELY(ThreadContext)) {
       Salt = getPrng(ThreadContext)->getNext();
       Ptr = BackendAllocator.Allocate(getAllocatorCache(ThreadContext),
                                       NeededSize, AllocationAlignment);
+      ThreadContext->unlock();
     } else {
       SpinMutexLock l(&FallbackMutex);
       Salt = FallbackPrng.getNext();
@@ -434,9 +435,10 @@ struct ScudoAllocator {
     if (BypassQuarantine) {
       Chunk->eraseHeader();
       void *Ptr = Chunk->getAllocBeg(Header);
-      ScudoThreadContext *ThreadContext = getThreadContext();
+      ScudoThreadContext *ThreadContext = getThreadContextAndLock();
       if (LIKELY(ThreadContext)) {
         getBackendAllocator().Deallocate(getAllocatorCache(ThreadContext), Ptr);
+        ThreadContext->unlock();
       } else {
         SpinMutexLock Lock(&FallbackMutex);
         getBackendAllocator().Deallocate(&FallbackAllocatorCache, Ptr);
@@ -445,12 +447,13 @@ struct ScudoAllocator {
       UnpackedHeader NewHeader = *Header;
       NewHeader.State = ChunkQuarantine;
       Chunk->compareExchangeHeader(&NewHeader, Header);
-      ScudoThreadContext *ThreadContext = getThreadContext();
+      ScudoThreadContext *ThreadContext = getThreadContextAndLock();
       if (LIKELY(ThreadContext)) {
         AllocatorQuarantine.Put(getQuarantineCache(ThreadContext),
                                 QuarantineCallback(
                                     getAllocatorCache(ThreadContext)),
                                 Chunk, Size);
+        ThreadContext->unlock();
       } else {
         SpinMutexLock l(&FallbackMutex);
         AllocatorQuarantine.Put(&FallbackQuarantineCache,

Modified: vendor/compiler-rt/dist/lib/scudo/scudo_allocator.h
==============================================================================
--- vendor/compiler-rt/dist/lib/scudo/scudo_allocator.h	Mon May  8 17:13:19 2017	(r317952)
+++ vendor/compiler-rt/dist/lib/scudo/scudo_allocator.h	Mon May  8 17:13:22 2017	(r317953)
@@ -72,7 +72,13 @@ const uptr AlignedChunkHeaderSize =
 
 #if SANITIZER_CAN_USE_ALLOCATOR64
 const uptr AllocatorSpace = ~0ULL;
-const uptr AllocatorSize = 0x40000000000ULL;  // 4TB.
+# if defined(__aarch64__) && SANITIZER_ANDROID
+const uptr AllocatorSize = 0x4000000000ULL;  // 256G.
+# elif defined(__aarch64__)
+const uptr AllocatorSize = 0x10000000000ULL;  // 1T.
+# else
+const uptr AllocatorSize = 0x40000000000ULL;  // 4T.
+# endif
 typedef DefaultSizeClassMap SizeClassMap;
 struct AP {
   static const uptr kSpaceBeg = AllocatorSpace;

Modified: vendor/compiler-rt/dist/lib/scudo/scudo_tls.h
==============================================================================
--- vendor/compiler-rt/dist/lib/scudo/scudo_tls.h	Mon May  8 17:13:19 2017	(r317952)
+++ vendor/compiler-rt/dist/lib/scudo/scudo_tls.h	Mon May  8 17:13:22 2017	(r317953)
@@ -19,10 +19,16 @@
 #include "scudo_allocator.h"
 #include "scudo_utils.h"
 
+#include "sanitizer_common/sanitizer_linux.h"
+#include "sanitizer_common/sanitizer_platform.h"
+
 namespace __scudo {
 
-struct ALIGNED(64) ScudoThreadContext {
- public:
+// Platform specific base thread context definitions.
+#include "scudo_tls_context_android.inc"
+#include "scudo_tls_context_linux.inc"
+
+struct ALIGNED(64) ScudoThreadContext : public ScudoThreadContextPlatform {
   AllocatorCache Cache;
   Xorshift128Plus Prng;
   uptr QuarantineCachePlaceHolder[4];
@@ -32,8 +38,9 @@ struct ALIGNED(64) ScudoThreadContext {
 
 void initThread();
 
-// Fastpath functions are defined in the following platform specific headers.
-#include "scudo_tls_linux.h"
+// Platform specific dastpath functions definitions.
+#include "scudo_tls_android.inc"
+#include "scudo_tls_linux.inc"
 
 }  // namespace __scudo
 

Added: vendor/compiler-rt/dist/lib/scudo/scudo_tls_android.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/compiler-rt/dist/lib/scudo/scudo_tls_android.cpp	Mon May  8 17:13:22 2017	(r317953)
@@ -0,0 +1,95 @@
+//===-- scudo_tls_android.cpp -----------------------------------*- C++ -*-===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+///
+/// Scudo thread local structure implementation for Android.
+///
+//===----------------------------------------------------------------------===//
+
+#include "sanitizer_common/sanitizer_platform.h"
+
+#if SANITIZER_LINUX && SANITIZER_ANDROID
+
+#include "scudo_tls.h"
+
+#include 
+
+namespace __scudo {
+
+static pthread_once_t GlobalInitialized = PTHREAD_ONCE_INIT;
+static pthread_key_t PThreadKey;
+
+static atomic_uint32_t ThreadContextCurrentIndex;
+static ScudoThreadContext *ThreadContexts;
+static uptr NumberOfContexts;
+
+// sysconf(_SC_NPROCESSORS_{CONF,ONLN}) cannot be used as they allocate memory.
+static uptr getNumberOfCPUs() {
+  cpu_set_t CPUs;
+  CHECK_EQ(sched_getaffinity(0, sizeof(cpu_set_t), &CPUs), 0);
+  return CPU_COUNT(&CPUs);
+}
+
+static void initOnce() {
+  // Hack: TLS_SLOT_TSAN was introduced in N. To be able to use it on M for
+  // testing, we create an unused key. Since the key_data array follows the tls
+  // array, it basically gives us the extra entry we need.
+  // TODO(kostyak): remove and restrict to N and above.
+  CHECK_EQ(pthread_key_create(&PThreadKey, NULL), 0);
+  initScudo();
+  NumberOfContexts = getNumberOfCPUs();
+  ThreadContexts = reinterpret_cast(
+      MmapOrDie(sizeof(ScudoThreadContext) * NumberOfContexts, __func__));
+  for (int i = 0; i < NumberOfContexts; i++)
+    ThreadContexts[i].init();
+}
+
+void initThread() {
+  pthread_once(&GlobalInitialized, initOnce);
+  // Initial context assignment is done in a plain round-robin fashion.
+  u32 Index = atomic_fetch_add(&ThreadContextCurrentIndex, 1,
+                               memory_order_relaxed);
+  ScudoThreadContext *ThreadContext =
+      &ThreadContexts[Index % NumberOfContexts];
+  *get_android_tls_ptr() = reinterpret_cast(ThreadContext);
+}
+
+ScudoThreadContext *getThreadContextAndLockSlow() {
+  ScudoThreadContext *ThreadContext;
+  // Go through all the contexts and find the first unlocked one. 
+  for (u32 i = 0; i < NumberOfContexts; i++) {
+    ThreadContext = &ThreadContexts[i];
+    if (ThreadContext->tryLock()) {
+      *get_android_tls_ptr() = reinterpret_cast(ThreadContext);
+      return ThreadContext;
+    }
+  }
+  // No luck, find the one with the lowest precedence, and slow lock it.
+  u64 Precedence = UINT64_MAX;
+  for (u32 i = 0; i < NumberOfContexts; i++) {
+    u64 SlowLockPrecedence = ThreadContexts[i].getSlowLockPrecedence();
+    if (SlowLockPrecedence && SlowLockPrecedence < Precedence) {
+      ThreadContext = &ThreadContexts[i];
+      Precedence = SlowLockPrecedence;
+    }
+  }
+  if (LIKELY(Precedence != UINT64_MAX)) {
+    ThreadContext->lock();
+    *get_android_tls_ptr() = reinterpret_cast(ThreadContext);
+    return ThreadContext;
+  }
+  // Last resort (can this happen?), stick with the current one.
+  ThreadContext =
+      reinterpret_cast(*get_android_tls_ptr());
+  ThreadContext->lock();
+  return ThreadContext;
+}
+
+}  // namespace __scudo
+
+#endif  // SANITIZER_LINUX && SANITIZER_ANDROID

Added: vendor/compiler-rt/dist/lib/scudo/scudo_tls_android.inc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/compiler-rt/dist/lib/scudo/scudo_tls_android.inc	Mon May  8 17:13:22 2017	(r317953)
@@ -0,0 +1,44 @@
+//===-- scudo_tls_android.inc -----------------------------------*- C++ -*-===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+///
+/// Scudo thread local structure fastpath functions implementation for Android.
+///
+//===----------------------------------------------------------------------===//
+
+#ifndef SCUDO_TLS_ANDROID_H_
+#define SCUDO_TLS_ANDROID_H_
+
+#ifndef SCUDO_TLS_H_
+# error "This file must be included inside scudo_tls.h."
+#endif  // SCUDO_TLS_H_
+
+#if SANITIZER_LINUX && SANITIZER_ANDROID
+
+ALWAYS_INLINE void initThreadMaybe() {
+  if (LIKELY(*get_android_tls_ptr()))
+    return;
+  initThread();
+}
+
+ScudoThreadContext *getThreadContextAndLockSlow();
+
+ALWAYS_INLINE ScudoThreadContext *getThreadContextAndLock() {
+  ScudoThreadContext *ThreadContext =
+      reinterpret_cast(*get_android_tls_ptr());
+  CHECK(ThreadContext);
+  // Try to lock the currently associated context.
+  if (ThreadContext->tryLock())
+    return ThreadContext;
+  // If it failed, go the slow path.
+  return getThreadContextAndLockSlow();
+}
+
+#endif  // SANITIZER_LINUX && SANITIZER_ANDROID
+
+#endif  // SCUDO_TLS_ANDROID_H_

Added: vendor/compiler-rt/dist/lib/scudo/scudo_tls_context_android.inc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/compiler-rt/dist/lib/scudo/scudo_tls_context_android.inc	Mon May  8 17:13:22 2017	(r317953)
@@ -0,0 +1,54 @@
+//===-- scudo_tls_context_android.inc ---------------------------*- C++ -*-===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+///
+/// Android specific base thread context definition.
+///
+//===----------------------------------------------------------------------===//
+
+#ifndef SCUDO_TLS_CONTEXT_ANDROID_INC_
+#define SCUDO_TLS_CONTEXT_ANDROID_INC_
+
+#ifndef SCUDO_TLS_H_
+# error "This file must be included inside scudo_tls.h."
+#endif  // SCUDO_TLS_H_
+
+#if SANITIZER_LINUX && SANITIZER_ANDROID
+
+struct ScudoThreadContextPlatform {
+  INLINE bool tryLock() {
+    if (Mutex.TryLock()) {
+      atomic_store_relaxed(&SlowLockPrecedence, 0);
+      return true;
+    }
+    if (atomic_load_relaxed(&SlowLockPrecedence) == 0)
+      atomic_store_relaxed(&SlowLockPrecedence, NanoTime());
+    return false;
+  }
+
+  INLINE void lock() {
+    Mutex.Lock();
+    atomic_store_relaxed(&SlowLockPrecedence, 0);
+  }
+
+  INLINE void unlock() {
+    Mutex.Unlock();
+  }
+
+  INLINE u64 getSlowLockPrecedence() {
+    return atomic_load_relaxed(&SlowLockPrecedence);
+  }
+
+ private:
+  StaticSpinMutex Mutex;
+  atomic_uint64_t SlowLockPrecedence;
+};
+
+#endif  // SANITIZER_LINUX && SANITIZER_ANDROID
+
+#endif  // SCUDO_TLS_CONTEXT_ANDROID_INC_

Added: vendor/compiler-rt/dist/lib/scudo/scudo_tls_context_linux.inc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/compiler-rt/dist/lib/scudo/scudo_tls_context_linux.inc	Mon May  8 17:13:22 2017	(r317953)
@@ -0,0 +1,29 @@
+//===-- scudo_tls_context_linux.inc -----------------------------*- C++ -*-===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+///
+/// Linux specific base thread context definition.
+///
+//===----------------------------------------------------------------------===//
+
+#ifndef SCUDO_TLS_CONTEXT_LINUX_INC_
+#define SCUDO_TLS_CONTEXT_LINUX_INC_
+
+#ifndef SCUDO_TLS_H_
+# error "This file must be included inside scudo_tls.h."
+#endif  // SCUDO_TLS_H_
+
+#if SANITIZER_LINUX && !SANITIZER_ANDROID
+
+struct ScudoThreadContextPlatform {
+  ALWAYS_INLINE void unlock() {}
+};
+
+#endif  // SANITIZER_LINUX && !SANITIZER_ANDROID
+
+#endif  // SCUDO_TLS_CONTEXT_LINUX_INC_

Modified: vendor/compiler-rt/dist/lib/scudo/scudo_tls_linux.cpp
==============================================================================
--- vendor/compiler-rt/dist/lib/scudo/scudo_tls_linux.cpp	Mon May  8 17:13:19 2017	(r317952)
+++ vendor/compiler-rt/dist/lib/scudo/scudo_tls_linux.cpp	Mon May  8 17:13:22 2017	(r317953)
@@ -14,7 +14,7 @@
 
 #include "sanitizer_common/sanitizer_platform.h"
 
-#if SANITIZER_LINUX
+#if SANITIZER_LINUX && !SANITIZER_ANDROID
 
 #include "scudo_tls.h"
 
@@ -26,8 +26,10 @@ namespace __scudo {
 static pthread_once_t GlobalInitialized = PTHREAD_ONCE_INIT;
 static pthread_key_t PThreadKey;
 
-thread_local ThreadState ScudoThreadState = ThreadNotInitialized;
-thread_local ScudoThreadContext ThreadLocalContext;
+__attribute__((tls_model("initial-exec")))
+THREADLOCAL ThreadState ScudoThreadState = ThreadNotInitialized;
+__attribute__((tls_model("initial-exec")))
+THREADLOCAL ScudoThreadContext ThreadLocalContext;
 
 static void teardownThread(void *Ptr) {
   uptr Iteration = reinterpret_cast(Ptr);
@@ -59,4 +61,4 @@ void initThread() {
 
 }  // namespace __scudo
 
-#endif  // SANITIZER_LINUX
+#endif  // SANITIZER_LINUX && !SANITIZER_ANDROID

Added: vendor/compiler-rt/dist/lib/scudo/scudo_tls_linux.inc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/compiler-rt/dist/lib/scudo/scudo_tls_linux.inc	Mon May  8 17:13:22 2017	(r317953)
@@ -0,0 +1,48 @@
+//===-- scudo_tls_linux.inc -------------------------------------*- C++ -*-===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+///
+/// Scudo thread local structure fastpath functions implementation for platforms
+/// supporting thread_local.
+///
+//===----------------------------------------------------------------------===//
+
+#ifndef SCUDO_TLS_LINUX_H_
+#define SCUDO_TLS_LINUX_H_
+
+#ifndef SCUDO_TLS_H_
+# error "This file must be included inside scudo_tls.h."
+#endif  // SCUDO_TLS_H_
+
+#if SANITIZER_LINUX && !SANITIZER_ANDROID
+
+enum ThreadState : u8 {
+  ThreadNotInitialized = 0,
+  ThreadInitialized,
+  ThreadTornDown,
+};
+__attribute__((tls_model("initial-exec")))
+extern THREADLOCAL ThreadState ScudoThreadState;
+__attribute__((tls_model("initial-exec")))
+extern THREADLOCAL ScudoThreadContext ThreadLocalContext;
+
+ALWAYS_INLINE void initThreadMaybe() {
+  if (LIKELY(ScudoThreadState != ThreadNotInitialized))
+    return;
+  initThread();
+}
+
+ALWAYS_INLINE ScudoThreadContext *getThreadContextAndLock() {
+  if (UNLIKELY(ScudoThreadState == ThreadTornDown))
+    return nullptr;
+  return &ThreadLocalContext;
+}
+
+#endif  // SANITIZER_LINUX && !SANITIZER_ANDROID
+
+#endif  // SCUDO_TLS_LINUX_H_

Modified: vendor/compiler-rt/dist/lib/ubsan/CMakeLists.txt
==============================================================================
--- vendor/compiler-rt/dist/lib/ubsan/CMakeLists.txt	Mon May  8 17:13:19 2017	(r317952)
+++ vendor/compiler-rt/dist/lib/ubsan/CMakeLists.txt	Mon May  8 17:13:22 2017	(r317953)
@@ -9,6 +9,7 @@ set(UBSAN_SOURCES
   )
 
 set(UBSAN_STANDALONE_SOURCES
+  ubsan_diag_standalone.cc
   ubsan_init_standalone.cc
   )
 

Added: vendor/compiler-rt/dist/lib/ubsan/ubsan_diag_standalone.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/compiler-rt/dist/lib/ubsan/ubsan_diag_standalone.cc	Mon May  8 17:13:22 2017	(r317953)
@@ -0,0 +1,37 @@
+//===-- ubsan_diag_standalone.cc ------------------------------------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// Diagnostic reporting for the standalone UBSan runtime.
+//
+//===----------------------------------------------------------------------===//
+
+#include "ubsan_platform.h"
+#if CAN_SANITIZE_UB
+#include "ubsan_diag.h"
+
+using namespace __ubsan;
+
+extern "C" {
+SANITIZER_INTERFACE_ATTRIBUTE
+void __sanitizer_print_stack_trace() {
+  uptr top = 0;
+  uptr bottom = 0;
+  bool request_fast_unwind = common_flags()->fast_unwind_on_fatal;
+  if (request_fast_unwind)
+    __sanitizer::GetThreadStackTopAndBottom(false, &top, &bottom);
+
+  GET_REPORT_OPTIONS(false);
+  BufferedStackTrace stack;
+  stack.Unwind(kStackTraceMax, Opts.pc, Opts.bp, nullptr, top, bottom,
+               request_fast_unwind);
+  stack.Print();
+}
+} // extern "C"
+
+#endif  // CAN_SANITIZE_UB

Modified: vendor/compiler-rt/dist/lib/ubsan/ubsan_handlers.cc
==============================================================================
--- vendor/compiler-rt/dist/lib/ubsan/ubsan_handlers.cc	Mon May  8 17:13:19 2017	(r317952)
+++ vendor/compiler-rt/dist/lib/ubsan/ubsan_handlers.cc	Mon May  8 17:13:22 2017	(r317953)
@@ -410,7 +410,8 @@ static void handleLoadInvalidValue(Inval
   SourceLocation Loc = Data->Loc.acquire();
   // This check could be more precise if we used different handlers for
   // -fsanitize=bool and -fsanitize=enum.
-  bool IsBool = (0 == internal_strcmp(Data->Type.getTypeName(), "'bool'"));
+  bool IsBool = (0 == internal_strcmp(Data->Type.getTypeName(), "'bool'")) ||
+                (0 == internal_strncmp(Data->Type.getTypeName(), "'BOOL'", 6));
   ErrorType ET =
       IsBool ? ErrorType::InvalidBoolLoad : ErrorType::InvalidEnumLoad;
 

Modified: vendor/compiler-rt/dist/lib/xray/xray_init.cc
==============================================================================
--- vendor/compiler-rt/dist/lib/xray/xray_init.cc	Mon May  8 17:13:19 2017	(r317952)
+++ vendor/compiler-rt/dist/lib/xray/xray_init.cc	Mon May  8 17:13:22 2017	(r317953)
@@ -25,6 +25,8 @@ extern "C" {
 void __xray_init();
 extern const XRaySledEntry __start_xray_instr_map[] __attribute__((weak));
 extern const XRaySledEntry __stop_xray_instr_map[] __attribute__((weak));
+extern const XRayFunctionSledIndex __start_xray_fn_idx[] __attribute__((weak));
+extern const XRayFunctionSledIndex __stop_xray_fn_idx[] __attribute__((weak));
 }
 
 using namespace __xray;
@@ -55,6 +57,8 @@ void __xray_init() XRAY_NEVER_INSTRUMENT
     __sanitizer::SpinMutexLock Guard(&XRayInstrMapMutex);
     XRayInstrMap.Sleds = __start_xray_instr_map;
     XRayInstrMap.Entries = __stop_xray_instr_map - __start_xray_instr_map;
+    XRayInstrMap.SledsIndex = __start_xray_fn_idx;
+    XRayInstrMap.Functions = __stop_xray_fn_idx - __start_xray_fn_idx;
   }
   __sanitizer::atomic_store(&XRayInitialized, true,
                             __sanitizer::memory_order_release);

Modified: vendor/compiler-rt/dist/lib/xray/xray_interface.cc
==============================================================================
--- vendor/compiler-rt/dist/lib/xray/xray_interface.cc	Mon May  8 17:13:19 2017	(r317952)
+++ vendor/compiler-rt/dist/lib/xray/xray_interface.cc	Mon May  8 17:13:22 2017	(r317953)
@@ -132,12 +132,48 @@ CleanupInvoker scopeCleanup(Fu
   return CleanupInvoker{Fn};
 }
 
+inline bool patchSled(const XRaySledEntry &Sled, bool Enable,
+                      int32_t FuncId) XRAY_NEVER_INSTRUMENT {
+  // While we're here, we should patch the nop sled. To do that we mprotect
+  // the page containing the function to be writeable.
+  const uint64_t PageSize = GetPageSizeCached();
+  void *PageAlignedAddr =
+      reinterpret_cast(Sled.Address & ~(PageSize - 1));
+  std::size_t MProtectLen = (Sled.Address + cSledLength) -
+                            reinterpret_cast(PageAlignedAddr);
+  MProtectHelper Protector(PageAlignedAddr, MProtectLen);
+  if (Protector.MakeWriteable() == -1) {
+    printf("Failed mprotect: %d\n", errno);
+    return XRayPatchingStatus::FAILED;
+  }
+
+  bool Success = false;
+  switch (Sled.Kind) {
+  case XRayEntryType::ENTRY:
+    Success = patchFunctionEntry(Enable, FuncId, Sled, __xray_FunctionEntry);
+    break;
+  case XRayEntryType::EXIT:
+    Success = patchFunctionExit(Enable, FuncId, Sled);
+    break;
+  case XRayEntryType::TAIL:
+    Success = patchFunctionTailExit(Enable, FuncId, Sled);
+    break;
+  case XRayEntryType::LOG_ARGS_ENTRY:
+    Success = patchFunctionEntry(Enable, FuncId, Sled, __xray_ArgLoggerEntry);
+    break;
+  default:
+    Report("Unsupported sled kind '%d' @%04x\n", Sled.Address, int(Sled.Kind));
+    return false;
+  }
+  return Success;
+}
+
 // controlPatching implements the common internals of the patching/unpatching
 // implementation. |Enable| defines whether we're enabling or disabling the
 // runtime XRay instrumentation.
 XRayPatchingStatus controlPatching(bool Enable) XRAY_NEVER_INSTRUMENT {
   if (!__sanitizer::atomic_load(&XRayInitialized,
-                               __sanitizer::memory_order_acquire))
+                                __sanitizer::memory_order_acquire))
     return XRayPatchingStatus::NOT_INITIALIZED; // Not initialized.
 
   uint8_t NotPatching = false;
@@ -179,38 +215,7 @@ XRayPatchingStatus controlPatching(bool 
       ++FuncId;
       CurFun = F;
     }
-
-    // While we're here, we should patch the nop sled. To do that we mprotect
-    // the page containing the function to be writeable.
-    void *PageAlignedAddr =
-        reinterpret_cast(Sled.Address & ~(PageSize - 1));
-    std::size_t MProtectLen = (Sled.Address + cSledLength) -
-                              reinterpret_cast(PageAlignedAddr);
-    MProtectHelper Protector(PageAlignedAddr, MProtectLen);
-    if (Protector.MakeWriteable() == -1) {
-      printf("Failed mprotect: %d\n", errno);
-      return XRayPatchingStatus::FAILED;
-    }
-
-    bool Success = false;
-    switch (Sled.Kind) {
-    case XRayEntryType::ENTRY:
-      Success = patchFunctionEntry(Enable, FuncId, Sled, __xray_FunctionEntry);
-      break;
-    case XRayEntryType::EXIT:
-      Success = patchFunctionExit(Enable, FuncId, Sled);
-      break;
-    case XRayEntryType::TAIL:
-      Success = patchFunctionTailExit(Enable, FuncId, Sled);
-      break;
-    case XRayEntryType::LOG_ARGS_ENTRY:
-      Success = patchFunctionEntry(Enable, FuncId, Sled, __xray_ArgLoggerEntry);
-      break;
-    default:
-      Report("Unsupported sled kind: %d\n", int(Sled.Kind));
-      continue;
-    }
-    (void)Success;
+    patchSled(Sled, Enable, FuncId);
   }
   __sanitizer::atomic_store(&XRayPatching, false,
                             __sanitizer::memory_order_release);
@@ -226,6 +231,64 @@ XRayPatchingStatus __xray_unpatch() XRAY
   return controlPatching(false);
 }
 
+XRayPatchingStatus patchFunction(int32_t FuncId,
+                                 bool Enable) XRAY_NEVER_INSTRUMENT {
+  if (!__sanitizer::atomic_load(&XRayInitialized,
+                                __sanitizer::memory_order_acquire))
+    return XRayPatchingStatus::NOT_INITIALIZED; // Not initialized.
+
+  uint8_t NotPatching = false;
+  if (!__sanitizer::atomic_compare_exchange_strong(
+          &XRayPatching, &NotPatching, true, __sanitizer::memory_order_acq_rel))
+    return XRayPatchingStatus::ONGOING; // Already patching.
+
+  // Next, we look for the function index.
+  XRaySledMap InstrMap;
+  {
+    __sanitizer::SpinMutexLock Guard(&XRayInstrMapMutex);
+    InstrMap = XRayInstrMap;
+  }
+
+  // If we don't have an index, we can't patch individual functions.
+  if (InstrMap.Functions == 0)
+    return XRayPatchingStatus::NOT_INITIALIZED;
+
+  // FuncId must be a positive number, less than the number of functions
+  // instrumented.
+  if (FuncId <= 0 || static_cast(FuncId) > InstrMap.Functions) {
+    Report("Invalid function id provided: %d\n", FuncId);
+    return XRayPatchingStatus::FAILED;
+  }
+
+  // Now we patch ths sleds for this specific function.
+  auto SledRange = InstrMap.SledsIndex[FuncId - 1];
+  auto *f = SledRange.Begin;
+  auto *e = SledRange.End;
+
+  bool SucceedOnce = false;
+  while (f != e)
+    SucceedOnce |= patchSled(*f++, Enable, FuncId);
+
+  __sanitizer::atomic_store(&XRayPatching, false,
+                            __sanitizer::memory_order_release);
+
+  if (!SucceedOnce) {
+    Report("Failed patching any sled for function '%d'.", FuncId);
+    return XRayPatchingStatus::FAILED;
+  }
+
+  return XRayPatchingStatus::SUCCESS;
+}
+
+XRayPatchingStatus __xray_patch_function(int32_t FuncId) XRAY_NEVER_INSTRUMENT {
+  return patchFunction(FuncId, true);
+}
+
+XRayPatchingStatus
+__xray_unpatch_function(int32_t FuncId) XRAY_NEVER_INSTRUMENT {
+  return patchFunction(FuncId, false);
+}
+
 int __xray_set_handler_arg1(void (*Handler)(int32_t, XRayEntryType, uint64_t)) {
   if (!__sanitizer::atomic_load(&XRayInitialized,
                                 __sanitizer::memory_order_acquire))
@@ -239,3 +302,15 @@ int __xray_set_handler_arg1(void (*Handl
   return 1;
 }
 int __xray_remove_handler_arg1() { return __xray_set_handler_arg1(nullptr); }
+
+uintptr_t __xray_function_address(int32_t FuncId) XRAY_NEVER_INSTRUMENT {
+  __sanitizer::SpinMutexLock Guard(&XRayInstrMapMutex);
+  if (FuncId <= 0 || static_cast(FuncId) > XRayInstrMap.Functions)
+    return 0;
+  return XRayInstrMap.SledsIndex[FuncId - 1].Begin->Address;
+}
+
+size_t __xray_max_function_id() XRAY_NEVER_INSTRUMENT {
+  __sanitizer::SpinMutexLock Guard(&XRayInstrMapMutex);
+  return XRayInstrMap.Functions;
+}

Modified: vendor/compiler-rt/dist/lib/xray/xray_interface_internal.h
==============================================================================
--- vendor/compiler-rt/dist/lib/xray/xray_interface_internal.h	Mon May  8 17:13:19 2017	(r317952)
+++ vendor/compiler-rt/dist/lib/xray/xray_interface_internal.h	Mon May  8 17:13:22 2017	(r317953)
@@ -39,6 +39,11 @@ struct XRaySledEntry {
 #error "Unsupported word size."
 #endif
 };
+
+struct XRayFunctionSledIndex {
+  const XRaySledEntry* Begin;
+  const XRaySledEntry* End;
+};
 }
 
 namespace __xray {
@@ -46,6 +51,8 @@ namespace __xray {
 struct XRaySledMap {
   const XRaySledEntry *Sleds;
   size_t Entries;
+  const XRayFunctionSledIndex *SledsIndex;
+  size_t Functions;
 };
 
 bool patchFunctionEntry(bool Enable, uint32_t FuncId,

Added: vendor/compiler-rt/dist/test/asan/TestCases/Linux/longjmp_chk.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/compiler-rt/dist/test/asan/TestCases/Linux/longjmp_chk.c	Mon May  8 17:13:22 2017	(r317953)
@@ -0,0 +1,51 @@
+// Verify that use of longjmp() in a _FORTIFY_SOURCE'd library (without ASAN)
+// is correctly intercepted such that the stack is unpoisoned.
+// Note: it is essential that the external library is not built with ASAN,
+// otherwise it would be able to unpoison the stack before use.
+//
+// RUN: %clang -DIS_LIBRARY -D_FORTIFY_SOURCE=2 -O2 %s -c -o %t.o
+// RUN: %clang_asan -O2 %s %t.o -o %t
+// RUN: %run %t
+
+#ifdef IS_LIBRARY
+/* the library */
+#include 
+#include 
+#include 
+
+static jmp_buf jenv;
+
+void external_callme(void (*callback)(void)) {
+  if (setjmp(jenv) == 0) {
+    callback();
+  }

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

From owner-svn-src-all@freebsd.org  Mon May  8 17:13:42 2017
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id AAE34D6366E;
 Mon,  8 May 2017 17:13:42 +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 53C75AA8;
 Mon,  8 May 2017 17:13:42 +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 v48HDfHR042959;
 Mon, 8 May 2017 17:13:41 GMT (envelope-from dim@FreeBSD.org)
Received: (from dim@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id v48HDffn042958;
 Mon, 8 May 2017 17:13:41 GMT (envelope-from dim@FreeBSD.org)
Message-Id: <201705081713.v48HDffn042958@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 17:13:41 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-vendor@freebsd.org
Subject: svn commit: r317956 - vendor/libc++/libc++-trunk-r302418
X-SVN-Group: vendor
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.23
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Mon, 08 May 2017 17:13:42 -0000

Author: dim
Date: Mon May  8 17:13:41 2017
New Revision: 317956
URL: https://svnweb.freebsd.org/changeset/base/317956

Log:
  Tag libc++ trunk r302418.

Added:
  vendor/libc++/libc++-trunk-r302418/
     - copied from r317955, vendor/libc++/dist/

From owner-svn-src-all@freebsd.org  Mon May  8 17:13:47 2017
Return-Path: 
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 96B1ED63692;
 Mon,  8 May 2017 17:13:47 +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 4A716B09;
 Mon,  8 May 2017 17:13:47 +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 v48HDkKY043026;
 Mon, 8 May 2017 17:13:46 GMT (envelope-from dim@FreeBSD.org)
Received: (from dim@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id v48HDiRV043006;
 Mon, 8 May 2017 17:13:44 GMT (envelope-from dim@FreeBSD.org)
Message-Id: <201705081713.v48HDiRV043006@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 17:13:44 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-vendor@freebsd.org
Subject: svn commit: r317957 - in vendor/lld/dist: . COFF ELF include/lld/Core
 include/lld/Support lib/Core test/ELF test/ELF/Inputs test/ELF/linkerscript
 test/ELF/linkerscript/Inputs test/ELF/lto test/ELF/...
X-SVN-Group: vendor
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.23
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
 user" and " projects" \)" 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Mon, 08 May 2017 17:13:47 -0000

Author: dim
Date: Mon May  8 17:13:44 2017
New Revision: 317957
URL: https://svnweb.freebsd.org/changeset/base/317957

Log:
  Vendor import of lld trunk r302418:
  https://llvm.org/svn/llvm-project/lld/trunk@302418

Added:
  vendor/lld/dist/include/lld/Core/TaskGroup.h   (contents, props changed)
  vendor/lld/dist/lib/Core/TaskGroup.cpp   (contents, props changed)
  vendor/lld/dist/test/ELF/Inputs/i386-static-tls-model1.s   (contents, props changed)
  vendor/lld/dist/test/ELF/Inputs/i386-static-tls-model2.s   (contents, props changed)
  vendor/lld/dist/test/ELF/Inputs/i386-static-tls-model3.s   (contents, props changed)
  vendor/lld/dist/test/ELF/Inputs/i386-static-tls-model4.s   (contents, props changed)
  vendor/lld/dist/test/ELF/i386-static-tls-model.s   (contents, props changed)
  vendor/lld/dist/test/ELF/linkerscript/Inputs/compress-debug-sections.s   (contents, props changed)
  vendor/lld/dist/test/ELF/linkerscript/compress-debug-sections.s   (contents, props changed)
  vendor/lld/dist/test/ELF/lto/Inputs/duplicated-name.ll
  vendor/lld/dist/test/ELF/lto/duplicated-name.ll
Deleted:
  vendor/lld/dist/include/lld/Support/
Modified:
  vendor/lld/dist/CMakeLists.txt
  vendor/lld/dist/COFF/Chunks.h
  vendor/lld/dist/COFF/ICF.cpp
  vendor/lld/dist/COFF/PDB.cpp
  vendor/lld/dist/ELF/Config.h
  vendor/lld/dist/ELF/Driver.cpp
  vendor/lld/dist/ELF/InputFiles.cpp
  vendor/lld/dist/ELF/InputFiles.h
  vendor/lld/dist/ELF/LinkerScript.cpp
  vendor/lld/dist/ELF/LinkerScript.h
  vendor/lld/dist/ELF/Options.td
  vendor/lld/dist/ELF/OutputSections.cpp
  vendor/lld/dist/ELF/Relocations.cpp
  vendor/lld/dist/ELF/SymbolTable.cpp
  vendor/lld/dist/ELF/Symbols.cpp
  vendor/lld/dist/ELF/SyntheticSections.cpp
  vendor/lld/dist/ELF/Target.cpp
  vendor/lld/dist/ELF/Target.h
  vendor/lld/dist/ELF/Writer.cpp
  vendor/lld/dist/ELF/Writer.h
  vendor/lld/dist/include/lld/Core/Parallel.h
  vendor/lld/dist/lib/Core/CMakeLists.txt
  vendor/lld/dist/test/ELF/defsym.s
  vendor/lld/dist/test/ELF/i386-tls-ie-shared.s
  vendor/lld/dist/test/ELF/lto/archive-no-index.ll
  vendor/lld/dist/test/ELF/lto/thin-archivecollision.ll
  vendor/lld/dist/test/ELF/tls-dynamic-i686.s
  vendor/lld/dist/test/ELF/tls-offset.s
  vendor/lld/dist/test/ELF/tls-opt-iele-i686-nopic.s
  vendor/lld/dist/unittests/CoreTests/CMakeLists.txt

Modified: vendor/lld/dist/CMakeLists.txt
==============================================================================
--- vendor/lld/dist/CMakeLists.txt	Mon May  8 17:13:41 2017	(r317956)
+++ vendor/lld/dist/CMakeLists.txt	Mon May  8 17:13:44 2017	(r317957)
@@ -221,3 +221,4 @@ endif()
 add_subdirectory(docs)
 add_subdirectory(COFF)
 add_subdirectory(ELF)
+

Modified: vendor/lld/dist/COFF/Chunks.h
==============================================================================
--- vendor/lld/dist/COFF/Chunks.h	Mon May  8 17:13:41 2017	(r317956)
+++ vendor/lld/dist/COFF/Chunks.h	Mon May  8 17:13:44 2017	(r317957)
@@ -201,7 +201,7 @@ private:
 
   // Used for ICF (Identical COMDAT Folding)
   void replace(SectionChunk *Other);
-  uint32_t Color[2] = {0, 0};
+  uint32_t Class[2] = {0, 0};
 
   // Sym points to a section symbol if this is a COMDAT chunk.
   DefinedRegular *Sym = nullptr;

Modified: vendor/lld/dist/COFF/ICF.cpp
==============================================================================
--- vendor/lld/dist/COFF/ICF.cpp	Mon May  8 17:13:41 2017	(r317956)
+++ vendor/lld/dist/COFF/ICF.cpp	Mon May  8 17:13:44 2017	(r317957)
@@ -49,10 +49,10 @@ private:
 
   size_t findBoundary(size_t Begin, size_t End);
 
-  void forEachColorRange(size_t Begin, size_t End,
+  void forEachClassRange(size_t Begin, size_t End,
                          std::function Fn);
 
-  void forEachColor(std::function Fn);
+  void forEachClass(std::function Fn);
 
   std::vector Chunks;
   int Cnt = 0;
@@ -85,7 +85,7 @@ bool ICF::isEligible(SectionChunk *C) {
   return C->isCOMDAT() && C->isLive() && Global && Executable && !Writable;
 }
 
-// Split a range into smaller ranges by recoloring sections
+// Split an equivalence class into smaller classes.
 void ICF::segregate(size_t Begin, size_t End, bool Constant) {
   while (Begin < End) {
     // Divide [Begin, End) into two. Let Mid be the start index of the
@@ -101,7 +101,7 @@ void ICF::segregate(size_t Begin, size_t
     // Split [Begin, End) into [Begin, Mid) and [Mid, End).
     uint32_t Id = NextId++;
     for (size_t I = Begin; I < Mid; ++I)
-      Chunks[I]->Color[(Cnt + 1) % 2] = Id;
+      Chunks[I]->Class[(Cnt + 1) % 2] = Id;
 
     // If we created a group, we need to iterate the main loop again.
     if (Mid != End)
@@ -130,7 +130,7 @@ bool ICF::equalsConstant(const SectionCh
     if (auto *D1 = dyn_cast(B1))
       if (auto *D2 = dyn_cast(B2))
         return D1->getValue() == D2->getValue() &&
-               D1->getChunk()->Color[Cnt % 2] == D2->getChunk()->Color[Cnt % 2];
+               D1->getChunk()->Class[Cnt % 2] == D2->getChunk()->Class[Cnt % 2];
     return false;
   };
   if (!std::equal(A->Relocs.begin(), A->Relocs.end(), B->Relocs.begin(), Eq))
@@ -155,7 +155,7 @@ bool ICF::equalsVariable(const SectionCh
       return true;
     if (auto *D1 = dyn_cast(B1))
       if (auto *D2 = dyn_cast(B2))
-        return D1->getChunk()->Color[Cnt % 2] == D2->getChunk()->Color[Cnt % 2];
+        return D1->getChunk()->Class[Cnt % 2] == D2->getChunk()->Class[Cnt % 2];
     return false;
   };
   return std::equal(A->Relocs.begin(), A->Relocs.end(), B->Relocs.begin(), Eq);
@@ -163,12 +163,12 @@ bool ICF::equalsVariable(const SectionCh
 
 size_t ICF::findBoundary(size_t Begin, size_t End) {
   for (size_t I = Begin + 1; I < End; ++I)
-    if (Chunks[Begin]->Color[Cnt % 2] != Chunks[I]->Color[Cnt % 2])
+    if (Chunks[Begin]->Class[Cnt % 2] != Chunks[I]->Class[Cnt % 2])
       return I;
   return End;
 }
 
-void ICF::forEachColorRange(size_t Begin, size_t End,
+void ICF::forEachClassRange(size_t Begin, size_t End,
                             std::function Fn) {
   if (Begin > 0)
     Begin = findBoundary(Begin - 1, End);
@@ -180,12 +180,12 @@ void ICF::forEachColorRange(size_t Begin
   }
 }
 
-// Call Fn on each color group.
-void ICF::forEachColor(std::function Fn) {
+// Call Fn on each class group.
+void ICF::forEachClass(std::function Fn) {
   // If the number of sections are too small to use threading,
   // call Fn sequentially.
   if (Chunks.size() < 1024) {
-    forEachColorRange(0, Chunks.size(), Fn);
+    forEachClassRange(0, Chunks.size(), Fn);
     return;
   }
 
@@ -193,9 +193,9 @@ void ICF::forEachColor(std::function
       continue;
 
     if (isEligible(SC)) {
-      // Set MSB to 1 to avoid collisions with non-hash colors.
-      SC->Color[0] = getHash(SC) | (1 << 31);
+      // Set MSB to 1 to avoid collisions with non-hash classs.
+      SC->Class[0] = getHash(SC) | (1 << 31);
       Chunks.push_back(SC);
     } else {
-      SC->Color[0] = NextId++;
+      SC->Class[0] = NextId++;
     }
   }
 
@@ -224,25 +224,25 @@ void ICF::run(const std::vector
   // the same group are consecutive in the vector.
   std::stable_sort(Chunks.begin(), Chunks.end(),
                    [](SectionChunk *A, SectionChunk *B) {
-                     return A->Color[0] < B->Color[0];
+                     return A->Class[0] < B->Class[0];
                    });
 
   // Compare static contents and assign unique IDs for each static content.
-  forEachColor([&](size_t Begin, size_t End) { segregate(Begin, End, true); });
+  forEachClass([&](size_t Begin, size_t End) { segregate(Begin, End, true); });
   ++Cnt;
 
   // Split groups by comparing relocations until convergence is obtained.
   do {
     Repeat = false;
-    forEachColor(
+    forEachClass(
         [&](size_t Begin, size_t End) { segregate(Begin, End, false); });
     ++Cnt;
   } while (Repeat);
 
   log("ICF needed " + Twine(Cnt) + " iterations");
 
-  // Merge sections in the same colors.
-  forEachColor([&](size_t Begin, size_t End) {
+  // Merge sections in the same classs.
+  forEachClass([&](size_t Begin, size_t End) {
     if (End - Begin == 1)
       return;
 

Modified: vendor/lld/dist/COFF/PDB.cpp
==============================================================================
--- vendor/lld/dist/COFF/PDB.cpp	Mon May  8 17:13:41 2017	(r317956)
+++ vendor/lld/dist/COFF/PDB.cpp	Mon May  8 17:13:44 2017	(r317957)
@@ -133,7 +133,7 @@ static void dumpDebugT(ScopedPrinter &W,
   if (Data.empty())
     return;
 
-  TypeDatabase TDB;
+  TypeDatabase TDB(0);
   TypeDumpVisitor TDV(TDB, &W, false);
   // Use a default implementation that does not follow type servers and instead
   // just dumps the contents of the TypeServer2 record.
@@ -154,7 +154,7 @@ static void dumpDebugS(ScopedPrinter &W,
   if (auto EC = Reader.readArray(Symbols, Reader.getLength()))
     fatal(EC, "StreamReader.readArray failed");
 
-  TypeDatabase TDB;
+  TypeDatabase TDB(0);
   CVSymbolDumper SymbolDumper(W, TDB, nullptr, false);
   if (auto EC = SymbolDumper.dump(Symbols))
     fatal(EC, "CVSymbolDumper::dump failed");

Modified: vendor/lld/dist/ELF/Config.h
==============================================================================
--- vendor/lld/dist/ELF/Config.h	Mon May  8 17:13:41 2017	(r317956)
+++ vendor/lld/dist/ELF/Config.h	Mon May  8 17:13:44 2017	(r317957)
@@ -73,6 +73,7 @@ struct VersionDefinition {
 // Most fields are initialized by the driver.
 struct Configuration {
   InputFile *FirstElf = nullptr;
+  bool HasStaticTlsModel = false;
   uint8_t OSABI = 0;
   llvm::CachePruningPolicy ThinLTOCachePolicy;
   llvm::StringMap SectionStartMap;
@@ -99,7 +100,6 @@ struct Configuration {
   std::vector VersionScriptLocals;
   std::vector BuildIdVector;
   bool AllowMultipleDefinition;
-  bool ArchiveWithoutSymbolsSeen = false;
   bool AsNeeded = false;
   bool Bsymbolic;
   bool BsymbolicFunctions;

Modified: vendor/lld/dist/ELF/Driver.cpp
==============================================================================
--- vendor/lld/dist/ELF/Driver.cpp	Mon May  8 17:13:41 2017	(r317956)
+++ vendor/lld/dist/ELF/Driver.cpp	Mon May  8 17:13:44 2017	(r317957)
@@ -123,13 +123,13 @@ static std::tuple
-static getArchiveMembers(MemoryBufferRef MB) {
+std::vector> static getArchiveMembers(
+    MemoryBufferRef MB) {
   std::unique_ptr File =
       check(Archive::create(MB),
             MB.getBufferIdentifier() + ": failed to parse archive");
 
-  std::vector V;
+  std::vector> V;
   Error Err = Error::success();
   for (const ErrorOr &COrErr : File->children(Err)) {
     Archive::Child C =
@@ -139,7 +139,7 @@ static getArchiveMembers(MemoryBufferRef
         check(C.getMemoryBufferRef(),
               MB.getBufferIdentifier() +
                   ": could not get the buffer for a child of the archive");
-    V.push_back(MBRef);
+    V.push_back(std::make_pair(MBRef, C.getChildOffset()));
   }
   if (Err)
     fatal(MB.getBufferIdentifier() + ": Archive::children failed: " +
@@ -152,8 +152,7 @@ static getArchiveMembers(MemoryBufferRef
   return V;
 }
 
-// Opens and parses a file. Path has to be resolved already.
-// Newly created memory buffers are owned by this driver.
+// Opens a file and create a file object. Path has to be resolved already.
 void LinkerDriver::addFile(StringRef Path, bool WithLOption) {
   using namespace sys::fs;
 
@@ -171,14 +170,31 @@ void LinkerDriver::addFile(StringRef Pat
   case file_magic::unknown:
     readLinkerScript(MBRef);
     return;
-  case file_magic::archive:
+  case file_magic::archive: {
+    // Handle -whole-archive.
     if (InWholeArchive) {
-      for (MemoryBufferRef MB : getArchiveMembers(MBRef))
-        Files.push_back(createObjectFile(MB, Path));
+      for (const auto &P : getArchiveMembers(MBRef))
+        Files.push_back(createObjectFile(P.first, Path, P.second));
       return;
     }
-    Files.push_back(make(MBRef));
+
+    std::unique_ptr File =
+        check(Archive::create(MBRef), Path + ": failed to parse archive");
+
+    // If an archive file has no symbol table, it is likely that a user
+    // is attempting LTO and using a default ar command that doesn't
+    // understand the LLVM bitcode file. It is a pretty common error, so
+    // we'll handle it as if it had a symbol table.
+    if (!File->hasSymbolTable()) {
+      for (const auto &P : getArchiveMembers(MBRef))
+        Files.push_back(make(P.first, Path, P.second));
+      return;
+    }
+
+    // Handle the regular case.
+    Files.push_back(make(std::move(File)));
     return;
+  }
   case file_magic::elf_shared_object:
     if (Config->Relocatable) {
       error("attempted static link of dynamic object " + Path);
@@ -199,7 +215,7 @@ void LinkerDriver::addFile(StringRef Pat
     return;
   default:
     if (InLib)
-      Files.push_back(make(MBRef));
+      Files.push_back(make(MBRef, "", 0));
     else
       Files.push_back(createObjectFile(MBRef));
   }

Modified: vendor/lld/dist/ELF/InputFiles.cpp
==============================================================================
--- vendor/lld/dist/ELF/InputFiles.cpp	Mon May  8 17:13:41 2017	(r317956)
+++ vendor/lld/dist/ELF/InputFiles.cpp	Mon May  8 17:13:44 2017	(r317957)
@@ -596,17 +596,13 @@ SymbolBody *elf::ObjectFile::creat
   }
 }
 
-template  void ArchiveFile::parse() {
-  File = check(Archive::create(MB),
-               MB.getBufferIdentifier() + ": failed to parse archive");
+ArchiveFile::ArchiveFile(std::unique_ptr &&File)
+    : InputFile(ArchiveKind, File->getMemoryBufferRef()),
+      File(std::move(File)) {}
 
-  // Read the symbol table to construct Lazy objects.
-  for (const Archive::Symbol &Sym : File->symbols()) {
+template  void ArchiveFile::parse() {
+  for (const Archive::Symbol &Sym : File->symbols())
     Symtab::X->addLazyArchive(this, Sym);
-  }
-
-  if (File->symbols().begin() == File->symbols().end())
-    Config->ArchiveWithoutSymbolsSeen = true;
 }
 
 // Returns a buffer pointing to a member file containing a given symbol.
@@ -981,6 +977,13 @@ MemoryBufferRef LazyObjectFile::getBuffe
   return MB;
 }
 
+InputFile *LazyObjectFile::fetch() {
+  MemoryBufferRef MBRef = getBuffer();
+  if (MBRef.getBuffer().empty())
+    return nullptr;
+  return createObjectFile(MBRef, ArchiveName, OffsetInArchive);
+}
+
 template  void LazyObjectFile::parse() {
   for (StringRef Sym : getSymbols())
     Symtab::X->addLazyObject(Sym, *this);

Modified: vendor/lld/dist/ELF/InputFiles.h
==============================================================================
--- vendor/lld/dist/ELF/InputFiles.h	Mon May  8 17:13:41 2017	(r317956)
+++ vendor/lld/dist/ELF/InputFiles.h	Mon May  8 17:13:44 2017	(r317957)
@@ -219,7 +219,11 @@ private:
 // archive file semantics.
 class LazyObjectFile : public InputFile {
 public:
-  explicit LazyObjectFile(MemoryBufferRef M) : InputFile(LazyObjectKind, M) {}
+  LazyObjectFile(MemoryBufferRef M, StringRef ArchiveName,
+                 uint64_t OffsetInArchive)
+      : InputFile(LazyObjectKind, M), OffsetInArchive(OffsetInArchive) {
+    this->ArchiveName = ArchiveName;
+  }
 
   static bool classof(const InputFile *F) {
     return F->kind() == LazyObjectKind;
@@ -227,6 +231,7 @@ public:
 
   template  void parse();
   MemoryBufferRef getBuffer();
+  InputFile *fetch();
 
 private:
   std::vector getSymbols();
@@ -234,12 +239,13 @@ private:
   std::vector getBitcodeSymbols();
 
   bool Seen = false;
+  uint64_t OffsetInArchive;
 };
 
 // An ArchiveFile object represents a .a file.
 class ArchiveFile : public InputFile {
 public:
-  explicit ArchiveFile(MemoryBufferRef M) : InputFile(ArchiveKind, M) {}
+  explicit ArchiveFile(std::unique_ptr &&File);
   static bool classof(const InputFile *F) { return F->kind() == ArchiveKind; }
   template  void parse();
 

Modified: vendor/lld/dist/ELF/LinkerScript.cpp
==============================================================================
--- vendor/lld/dist/ELF/LinkerScript.cpp	Mon May  8 17:13:41 2017	(r317956)
+++ vendor/lld/dist/ELF/LinkerScript.cpp	Mon May  8 17:13:44 2017	(r317957)
@@ -406,27 +406,22 @@ void LinkerScript::processCommands(Outpu
       }
 
       // Add input sections to an output section.
-      unsigned Pos = 0;
-      for (InputSectionBase *S : V) {
-        // The actual offset will be computed during
-        // assignAddresses. For now, use the index as a very crude
-        // approximation so that it is at least easy for other code to
-        // know the section order.
-        cast(S)->OutSecOff = Pos++;
+      for (InputSectionBase *S : V)
         Factory.addInputSec(S, Cmd->Name, Cmd->Sec);
+      if (OutputSection *Sec = Cmd->Sec) {
+        assert(Sec->SectionIndex == INT_MAX);
+        Sec->SectionIndex = I;
       }
     }
   }
   CurOutSec = nullptr;
 }
 
-void LinkerScript::fabricateDefaultCommands(bool AllocateHeader) {
+void LinkerScript::fabricateDefaultCommands() {
   std::vector Commands;
 
   // Define start address
-  uint64_t StartAddr = Config->ImageBase;
-  if (AllocateHeader)
-    StartAddr += elf::getHeaderSize();
+  uint64_t StartAddr = Config->ImageBase + elf::getHeaderSize();
 
   // The Sections with -T
have been sorted in order of ascending // address. We must lower StartAddr if the lowest -T
as @@ -488,6 +483,11 @@ void LinkerScript::addOrphanSections(Out } else { auto *Cmd = cast(*I); Factory.addInputSec(S, Name, Cmd->Sec); + if (OutputSection *Sec = Cmd->Sec) { + unsigned Index = std::distance(Opt.Commands.begin(), I); + assert(Sec->SectionIndex == INT_MAX || Sec->SectionIndex == Index); + Sec->SectionIndex = Index; + } auto *ISD = make(""); ISD->Sections.push_back(S); Cmd->Commands.push_back(ISD); @@ -495,17 +495,22 @@ void LinkerScript::addOrphanSections(Out } } -static bool isTbss(OutputSection *Sec) { - return (Sec->Flags & SHF_TLS) && Sec->Type == SHT_NOBITS; +uint64_t LinkerScript::advance(uint64_t Size, unsigned Align) { + bool IsTbss = (CurOutSec->Flags & SHF_TLS) && CurOutSec->Type == SHT_NOBITS; + uint64_t Start = IsTbss ? Dot + ThreadBssOffset : Dot; + Start = alignTo(Start, Align); + uint64_t End = Start + Size; + + if (IsTbss) + ThreadBssOffset = End - Dot; + else + Dot = End; + return End; } void LinkerScript::output(InputSection *S) { - bool IsTbss = isTbss(CurOutSec); - - uint64_t Pos = IsTbss ? Dot + ThreadBssOffset : Dot; - Pos = alignTo(Pos, S->Alignment); - S->OutSecOff = Pos - CurOutSec->Addr; - Pos += S->getSize(); + uint64_t Pos = advance(S->getSize(), S->Alignment); + S->OutSecOff = Pos - S->getSize() - CurOutSec->Addr; // Update output section size after adding each section. This is so that // SIZEOF works correctly in the case below: @@ -524,11 +529,6 @@ void LinkerScript::output(InputSection * " bytes"); } } - - if (IsTbss) - ThreadBssOffset = Pos - Dot; - else - Dot = Pos; } void LinkerScript::switchTo(OutputSection *Sec) { @@ -536,9 +536,7 @@ void LinkerScript::switchTo(OutputSectio return; CurOutSec = Sec; - - Dot = alignTo(Dot, CurOutSec->Alignment); - CurOutSec->Addr = isTbss(CurOutSec) ? Dot + ThreadBssOffset : Dot; + CurOutSec->Addr = advance(0, CurOutSec->Alignment); // If neither AT nor AT> is specified for an allocatable section, the linker // will set the LMA such that the difference between VMA and LMA for the @@ -643,6 +641,11 @@ void LinkerScript::assignOffsets(OutputS Dot = CurMemRegion->Offset; switchTo(Sec); + // We do not support custom layout for compressed debug sectons. + // At this point we already know their size and have compressed content. + if (CurOutSec->Flags & SHF_COMPRESSED) + return; + for (BaseCommand *C : Cmd->Commands) process(*C); } @@ -678,8 +681,9 @@ void LinkerScript::adjustSectionsBeforeS // consequeces and gives us a section to put the symbol in. uint64_t Flags = SHF_ALLOC; uint32_t Type = SHT_PROGBITS; - for (BaseCommand *Base : Opt.Commands) { - auto *Cmd = dyn_cast(Base); + + for (int I = 0, E = Opt.Commands.size(); I != E; ++I) { + auto *Cmd = dyn_cast(Opt.Commands[I]); if (!Cmd) continue; if (OutputSection *Sec = Cmd->Sec) { @@ -692,6 +696,7 @@ void LinkerScript::adjustSectionsBeforeS continue; auto *OutSec = make(Cmd->Name, Type, Flags); + OutSec->SectionIndex = I; OutputSections->push_back(OutSec); Cmd->Sec = OutSec; } @@ -894,6 +899,48 @@ void LinkerScript::synchronize() { } } +static bool allocateHeaders(std::vector &Phdrs, + ArrayRef OutputSections, + uint64_t Min) { + auto FirstPTLoad = + std::find_if(Phdrs.begin(), Phdrs.end(), + [](const PhdrEntry &E) { return E.p_type == PT_LOAD; }); + if (FirstPTLoad == Phdrs.end()) + return false; + + uint64_t HeaderSize = getHeaderSize(); + if (HeaderSize <= Min || Script->hasPhdrsCommands()) { + Min = alignDown(Min - HeaderSize, Config->MaxPageSize); + Out::ElfHeader->Addr = Min; + Out::ProgramHeaders->Addr = Min + Out::ElfHeader->Size; + return true; + } + + assert(FirstPTLoad->First == Out::ElfHeader); + OutputSection *ActualFirst = nullptr; + for (OutputSection *Sec : OutputSections) { + if (Sec->FirstInPtLoad == Out::ElfHeader) { + ActualFirst = Sec; + break; + } + } + if (ActualFirst) { + for (OutputSection *Sec : OutputSections) + if (Sec->FirstInPtLoad == Out::ElfHeader) + Sec->FirstInPtLoad = ActualFirst; + FirstPTLoad->First = ActualFirst; + } else { + Phdrs.erase(FirstPTLoad); + } + + auto PhdrI = std::find_if(Phdrs.begin(), Phdrs.end(), [](const PhdrEntry &E) { + return E.p_type == PT_PHDR; + }); + if (PhdrI != Phdrs.end()) + Phdrs.erase(PhdrI); + return false; +} + void LinkerScript::assignAddresses(std::vector &Phdrs) { // Assign addresses as instructed by linker script SECTIONS sub-commands. Dot = 0; @@ -994,12 +1041,17 @@ static void writeInt(uint8_t *Buf, uint6 llvm_unreachable("unsupported Size argument"); } -void LinkerScript::writeDataBytes(StringRef Name, uint8_t *Buf) { - int I = getSectionIndex(Name); - if (I == INT_MAX) +void LinkerScript::writeDataBytes(OutputSection *Sec, uint8_t *Buf) { + auto I = std::find_if(Opt.Commands.begin(), Opt.Commands.end(), + [=](BaseCommand *Base) { + if (auto *Cmd = dyn_cast(Base)) + if (Cmd->Sec == Sec) + return true; + return false; + }); + if (I == Opt.Commands.end()) return; - - auto *Cmd = dyn_cast(Opt.Commands[I]); + auto *Cmd = cast(*I); for (BaseCommand *Base : Cmd->Commands) if (auto *Data = dyn_cast(Base)) writeInt(Buf + Data->Offset, Data->Expression().getValue(), Data->Size); @@ -1013,18 +1065,6 @@ bool LinkerScript::hasLMA(StringRef Name return false; } -// Returns the index of the given section name in linker script -// SECTIONS commands. Sections are laid out as the same order as they -// were in the script. If a given name did not appear in the script, -// it returns INT_MAX, so that it will be laid out at end of file. -int LinkerScript::getSectionIndex(StringRef Name) { - for (int I = 0, E = Opt.Commands.size(); I != E; ++I) - if (auto *Cmd = dyn_cast(Opt.Commands[I])) - if (Cmd->Name == Name) - return I; - return INT_MAX; -} - ExprValue LinkerScript::getSymbolValue(const Twine &Loc, StringRef S) { if (S == ".") return {CurOutSec, Dot - CurOutSec->Addr}; Modified: vendor/lld/dist/ELF/LinkerScript.h ============================================================================== --- vendor/lld/dist/ELF/LinkerScript.h Mon May 8 17:13:41 2017 (r317956) +++ vendor/lld/dist/ELF/LinkerScript.h Mon May 8 17:13:44 2017 (r317957) @@ -228,6 +228,7 @@ protected: MemoryRegion *findMemoryRegion(OutputSectionCommand *Cmd); void switchTo(OutputSection *Sec); + uint64_t advance(uint64_t Size, unsigned Align); void output(InputSection *Sec); void process(BaseCommand &Base); @@ -252,7 +253,7 @@ public: bool isDefined(StringRef S); std::vector *OutputSections; - void fabricateDefaultCommands(bool AllocateHeader); + void fabricateDefaultCommands(); void addOrphanSections(OutputSectionFactory &Factory); void removeEmptyCommands(); void adjustSectionsBeforeSorting(); @@ -269,9 +270,8 @@ public: void processNonSectionCommands(); void synchronize(); void assignAddresses(std::vector &Phdrs); - int getSectionIndex(StringRef Name); - void writeDataBytes(StringRef Name, uint8_t *Buf); + void writeDataBytes(OutputSection *Sec, uint8_t *Buf); void addSymbol(SymbolAssignment *Cmd); void processCommands(OutputSectionFactory &Factory); Modified: vendor/lld/dist/ELF/Options.td ============================================================================== --- vendor/lld/dist/ELF/Options.td Mon May 8 17:13:41 2017 (r317956) +++ vendor/lld/dist/ELF/Options.td Mon May 8 17:13:44 2017 (r317957) @@ -290,6 +290,7 @@ def alias_L__library_path: J<"library-pa def alias_define_common_d: Flag<["-"], "d">, Alias; def alias_define_common_dc: F<"dc">, Alias; def alias_define_common_dp: F<"dp">, Alias; +def alias_defsym: S<"defsym">, Alias; def alias_discard_all_x: Flag<["-"], "x">, Alias; def alias_discard_locals_X: Flag<["-"], "X">, Alias; def alias_dynamic_list: J<"dynamic-list=">, Alias; Modified: vendor/lld/dist/ELF/OutputSections.cpp ============================================================================== --- vendor/lld/dist/ELF/OutputSections.cpp Mon May 8 17:13:41 2017 (r317956) +++ vendor/lld/dist/ELF/OutputSections.cpp Mon May 8 17:13:44 2017 (r317957) @@ -68,7 +68,8 @@ void OutputSection::writeHeaderTo(typena OutputSection::OutputSection(StringRef Name, uint32_t Type, uint64_t Flags) : SectionBase(Output, Name, Flags, /*Entsize*/ 0, /*Alignment*/ 1, Type, /*Info*/ 0, - /*Link*/ 0) {} + /*Link*/ 0), + SectionIndex(INT_MAX) {} static bool compareByFilePosition(InputSection *A, InputSection *B) { // Synthetic doesn't have link order dependecy, stable_sort will keep it last @@ -139,12 +140,24 @@ template void OutputSection this->Info = S->OutSec->SectionIndex; } +static uint64_t updateOffset(uint64_t Off, InputSection *S) { + Off = alignTo(Off, S->Alignment); + S->OutSecOff = Off; + return Off + S->getSize(); +} + void OutputSection::addSection(InputSection *S) { assert(S->Live); Sections.push_back(S); S->OutSec = this; this->updateAlignment(S->Alignment); + // The actual offsets will be computed by assignAddresses. For now, use + // crude approximation so that it is at least easy for other code to know the + // section order. It is also used to calculate the output section size early + // for compressed debug sections. + this->Size = updateOffset(Size, S); + // If this section contains a table of fixed-size entries, sh_entsize // holds the element size. Consequently, if this contains two or more // input sections, all of them must have the same sh_entsize. However, @@ -159,11 +172,8 @@ void OutputSection::addSection(InputSect // and scan relocations to setup sections' offsets. void OutputSection::assignOffsets() { uint64_t Off = 0; - for (InputSection *S : Sections) { - Off = alignTo(Off, S->Alignment); - S->OutSecOff = Off; - Off += S->getSize(); - } + for (InputSection *S : Sections) + Off = updateOffset(Off, S); this->Size = Off; } @@ -305,7 +315,7 @@ template void OutputSection // Linker scripts may have BYTE()-family commands with which you // can write arbitrary bytes to the output. Process them if any. - Script->writeDataBytes(Name, Buf); + Script->writeDataBytes(this, Buf); } static uint64_t getOutFlags(InputSectionBase *S) { Modified: vendor/lld/dist/ELF/Relocations.cpp ============================================================================== --- vendor/lld/dist/ELF/Relocations.cpp Mon May 8 17:13:41 2017 (r317956) +++ vendor/lld/dist/ELF/Relocations.cpp Mon May 8 17:13:44 2017 (r317957) @@ -233,7 +233,7 @@ handleTlsRelocation(uint32_t Type, Symbo } // Local-Dynamic relocs can be relaxed to Local-Exec. - if (Target->isTlsLocalDynamicRel(Type) && !Config->Shared) { + if (isRelExprOneOf(Expr) && !Config->Shared) { C.Relocations.push_back( {R_RELAX_TLS_LD_TO_LE, Type, Offset, Addend, &Body}); return 1; @@ -282,7 +282,8 @@ handleTlsRelocation(uint32_t Type, Symbo // Initial-Exec relocs can be relaxed to Local-Exec if the symbol is locally // defined. - if (Target->isTlsInitialExecRel(Type) && !Config->Shared && !IsPreemptible) { + if (isRelExprOneOf(Expr) && + !Config->Shared && !IsPreemptible) { C.Relocations.push_back( {R_RELAX_TLS_IE_TO_LE, Type, Offset, Addend, &Body}); return 1; @@ -694,17 +695,6 @@ static void reportUndefined(SymbolBody & warn(Msg); } else { error(Msg); - - if (Config->ArchiveWithoutSymbolsSeen) { - message("At least one archive listed no symbols in its index." - " This can happen when creating archives with a version" - " of ar that does not understand the object files in" - " the archive. For example, if you are using LLVM" - " bitcode objects (such as created by -flto), you may" - " need to use llvm-ar or GNU ar with a plugin."); - // Reset to false so that we print the message only once. - Config->ArchiveWithoutSymbolsSeen = false; - } } } Modified: vendor/lld/dist/ELF/SymbolTable.cpp ============================================================================== --- vendor/lld/dist/ELF/SymbolTable.cpp Mon May 8 17:13:41 2017 (r317956) +++ vendor/lld/dist/ELF/SymbolTable.cpp Mon May 8 17:13:44 2017 (r317957) @@ -540,13 +540,10 @@ void SymbolTable::addLazyObject(St return; // See comment for addLazyArchive above. - if (S->isWeak()) { + if (S->isWeak()) replaceBody(S, Name, Obj, S->body()->Type); - } else { - MemoryBufferRef MBRef = Obj.getBuffer(); - if (!MBRef.getBuffer().empty()) - addFile(createObjectFile(MBRef)); - } + else if (InputFile *F = Obj.fetch()) + addFile(F); } // Process undefined (-u) flags by loading lazy symbols named by those flags. Modified: vendor/lld/dist/ELF/Symbols.cpp ============================================================================== --- vendor/lld/dist/ELF/Symbols.cpp Mon May 8 17:13:41 2017 (r317956) +++ vendor/lld/dist/ELF/Symbols.cpp Mon May 8 17:13:44 2017 (r317957) @@ -327,12 +327,7 @@ InputFile *LazyArchive::fetch() { return createObjectFile(MBInfo.first, file()->getName(), MBInfo.second); } -InputFile *LazyObject::fetch() { - MemoryBufferRef MBRef = file()->getBuffer(); - if (MBRef.getBuffer().empty()) - return nullptr; - return createObjectFile(MBRef); -} +InputFile *LazyObject::fetch() { return file()->fetch(); } uint8_t Symbol::computeBinding() const { if (Config->Relocatable) Modified: vendor/lld/dist/ELF/SyntheticSections.cpp ============================================================================== --- vendor/lld/dist/ELF/SyntheticSections.cpp Mon May 8 17:13:41 2017 (r317956) +++ vendor/lld/dist/ELF/SyntheticSections.cpp Mon May 8 17:13:44 2017 (r317957) @@ -1038,6 +1038,15 @@ template void DynamicSectio if (!Config->SoName.empty()) add({DT_SONAME, In::DynStrTab->addString(Config->SoName)}); + if (!Config->Shared && !Config->Relocatable) + add({DT_DEBUG, (uint64_t)0}); +} + +// Add remaining entries to complete .dynamic contents. +template void DynamicSection::finalizeContents() { + if (this->Size) + return; // Already finalized. + // Set DT_FLAGS and DT_FLAGS_1. uint32_t DtFlags = 0; uint32_t DtFlags1 = 0; @@ -1055,21 +1064,14 @@ template void DynamicSectio DtFlags |= DF_ORIGIN; DtFlags1 |= DF_1_ORIGIN; } + if (Config->HasStaticTlsModel) + DtFlags |= DF_STATIC_TLS; if (DtFlags) add({DT_FLAGS, DtFlags}); if (DtFlags1) add({DT_FLAGS_1, DtFlags1}); - if (!Config->Shared && !Config->Relocatable) - add({DT_DEBUG, (uint64_t)0}); -} - -// Add remaining entries to complete .dynamic contents. -template void DynamicSection::finalizeContents() { - if (this->Size) - return; // Already finalized. - this->Link = In::DynStrTab->OutSec->SectionIndex; if (In::RelaDyn->OutSec->Size > 0) { bool IsRela = Config->IsRela; Modified: vendor/lld/dist/ELF/Target.cpp ============================================================================== --- vendor/lld/dist/ELF/Target.cpp Mon May 8 17:13:41 2017 (r317956) +++ vendor/lld/dist/ELF/Target.cpp Mon May 8 17:13:44 2017 (r317957) @@ -124,8 +124,6 @@ public: int64_t getImplicitAddend(const uint8_t *Buf, uint32_t Type) const override; void writeGotPltHeader(uint8_t *Buf) const override; uint32_t getDynRel(uint32_t Type) const override; - bool isTlsLocalDynamicRel(uint32_t Type) const override; - bool isTlsInitialExecRel(uint32_t Type) const override; void writeGotPlt(uint8_t *Buf, const SymbolBody &S) const override; void writeIgotPlt(uint8_t *Buf, const SymbolBody &S) const override; void writePltHeader(uint8_t *Buf) const override; @@ -147,8 +145,6 @@ public: RelExpr getRelExpr(uint32_t Type, const SymbolBody &S, const uint8_t *Loc) const override; bool isPicRel(uint32_t Type) const override; - bool isTlsLocalDynamicRel(uint32_t Type) const override; - bool isTlsInitialExecRel(uint32_t Type) const override; void writeGotPltHeader(uint8_t *Buf) const override; void writeGotPlt(uint8_t *Buf, const SymbolBody &S) const override; void writePltHeader(uint8_t *Buf) const override; @@ -193,7 +189,6 @@ public: RelExpr getRelExpr(uint32_t Type, const SymbolBody &S, const uint8_t *Loc) const override; bool isPicRel(uint32_t Type) const override; - bool isTlsInitialExecRel(uint32_t Type) const override; void writeGotPlt(uint8_t *Buf, const SymbolBody &S) const override; void writePltHeader(uint8_t *Buf) const override; void writePlt(uint8_t *Buf, uint64_t GotPltEntryAddr, uint64_t PltEntryAddr, @@ -303,10 +298,6 @@ bool TargetInfo::needsThunk(RelExpr Expr return false; } -bool TargetInfo::isTlsInitialExecRel(uint32_t Type) const { return false; } - -bool TargetInfo::isTlsLocalDynamicRel(uint32_t Type) const { return false; } - void TargetInfo::writeIgotPlt(uint8_t *Buf, const SymbolBody &S) const { writeGotPlt(Buf, S); } @@ -360,6 +351,15 @@ X86TargetInfo::X86TargetInfo() { RelExpr X86TargetInfo::getRelExpr(uint32_t Type, const SymbolBody &S, const uint8_t *Loc) const { + // There are 4 different TLS variable models with varying degrees of + // flexibility and performance. LocalExec and InitialExec models are fast but + // less-flexible models. They cannot be used for dlopen(). If they are in use, + // we set DF_STATIC_TLS in the ELF header so that the runtime can reject such + // DSOs. + if (Type == R_386_TLS_LE || Type == R_386_TLS_LE_32 || Type == R_386_TLS_IE || + Type == R_386_TLS_GOTIE) + Config->HasStaticTlsModel = true; + switch (Type) { case R_386_8: case R_386_16: @@ -451,14 +451,6 @@ uint32_t X86TargetInfo::getDynRel(uint32 return Type; } -bool X86TargetInfo::isTlsLocalDynamicRel(uint32_t Type) const { - return Type == R_386_TLS_LDO_32 || Type == R_386_TLS_LDM; -} - -bool X86TargetInfo::isTlsInitialExecRel(uint32_t Type) const { - return Type == R_386_TLS_IE || Type == R_386_TLS_GOTIE; -} - void X86TargetInfo::writePltHeader(uint8_t *Buf) const { if (Config->Pic) { const uint8_t V[] = { @@ -772,17 +764,6 @@ bool X86_64TargetInfo::isPicRel(ui } template -bool X86_64TargetInfo::isTlsInitialExecRel(uint32_t Type) const { - return Type == R_X86_64_GOTTPOFF; -} - -template -bool X86_64TargetInfo::isTlsLocalDynamicRel(uint32_t Type) const { - return Type == R_X86_64_DTPOFF32 || Type == R_X86_64_DTPOFF64 || - Type == R_X86_64_TLSLD; -} - -template void X86_64TargetInfo::relaxTlsGdToLe(uint8_t *Loc, uint32_t Type, uint64_t Val) const { // Convert @@ -1383,11 +1364,6 @@ bool AArch64TargetInfo::usesOnlyLowPageB } } -bool AArch64TargetInfo::isTlsInitialExecRel(uint32_t Type) const { - return Type == R_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21 || - Type == R_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC; -} - bool AArch64TargetInfo::isPicRel(uint32_t Type) const { return Type == R_AARCH64_ABS32 || Type == R_AARCH64_ABS64; } Modified: vendor/lld/dist/ELF/Target.h ============================================================================== --- vendor/lld/dist/ELF/Target.h Mon May 8 17:13:41 2017 (r317956) +++ vendor/lld/dist/ELF/Target.h Mon May 8 17:13:44 2017 (r317957) @@ -23,8 +23,6 @@ class SymbolBody; class TargetInfo { public: - virtual bool isTlsInitialExecRel(uint32_t Type) const; - virtual bool isTlsLocalDynamicRel(uint32_t Type) const; virtual bool isPicRel(uint32_t Type) const { return true; } virtual uint32_t getDynRel(uint32_t Type) const { return Type; } virtual void writeGotPltHeader(uint8_t *Buf) const {} Modified: vendor/lld/dist/ELF/Writer.cpp ============================================================================== --- vendor/lld/dist/ELF/Writer.cpp Mon May 8 17:13:41 2017 (r317956) +++ vendor/lld/dist/ELF/Writer.cpp Mon May 8 17:13:44 2017 (r317957) @@ -62,7 +62,6 @@ private: void assignFileOffsets(); void assignFileOffsetsBinary(); void setPhdrs(); - void fixHeaders(); void fixSectionAlignments(); void fixPredefinedSymbols(); void openFile(); @@ -86,7 +85,6 @@ private: uint64_t FileSize; uint64_t SectionHeaderOff; - bool AllocateHeader = true; }; } // anonymous namespace @@ -252,7 +250,7 @@ template void Writer: } else { if (!Script->Opt.HasSections) { fixSectionAlignments(); - Script->fabricateDefaultCommands(AllocateHeader); + Script->fabricateDefaultCommands(); } Script->synchronize(); Script->assignAddresses(Phdrs); @@ -747,15 +745,12 @@ static bool compareSectionsNonScript(con // Output section ordering is determined by this function. template static bool compareSections(const OutputSection *A, const OutputSection *B) { - // For now, put sections mentioned in a linker script first. - int AIndex = Script->getSectionIndex(A->Name); - int BIndex = Script->getSectionIndex(B->Name); - bool AInScript = AIndex != INT_MAX; - bool BInScript = BIndex != INT_MAX; - if (AInScript != BInScript) - return AInScript; - // If both are in the script, use that order. - if (AInScript) + // For now, put sections mentioned in a linker script + // first. Sections not on linker script will have a SectionIndex of + // INT_MAX. + int AIndex = A->SectionIndex; + int BIndex = B->SectionIndex; + if (AIndex != BIndex) return AIndex < BIndex; return compareSectionsNonScript(A, B); @@ -1021,9 +1016,8 @@ template void Writer: auto I = OutputSections.begin(); auto E = OutputSections.end(); auto NonScriptI = - std::find_if(OutputSections.begin(), E, [](OutputSection *S) { - return Script->getSectionIndex(S->Name) == INT_MAX; - }); + std::find_if(OutputSections.begin(), E, + [](OutputSection *S) { return S->SectionIndex == INT_MAX; }); while (NonScriptI != E) { auto BestPos = std::max_element( I, NonScriptI, [&](OutputSection *&A, OutputSection *&B) { @@ -1176,7 +1170,7 @@ template void Writer: if (!Config->Relocatable && !Config->OFormatBinary) { Phdrs = Script->hasPhdrsCommands() ? Script->createPhdrs() : createPhdrs(); addPtArmExid(Phdrs); - fixHeaders(); + Out::ProgramHeaders->Size = sizeof(Elf_Phdr) * Phdrs.size(); } // Dynamic section must be the last one in this list and dynamic @@ -1321,6 +1315,11 @@ template std::vectoradd(Out::ElfHeader); + Load->add(Out::ProgramHeaders); + for (OutputSection *Sec : OutputSections) { if (!(Sec->Flags & SHF_ALLOC)) break; @@ -1447,64 +1446,6 @@ template void Writer: } } -bool elf::allocateHeaders(std::vector &Phdrs, - ArrayRef OutputSections, - uint64_t Min) { - auto FirstPTLoad = - std::find_if(Phdrs.begin(), Phdrs.end(), - [](const PhdrEntry &E) { return E.p_type == PT_LOAD; }); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon May 8 17:13:52 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2D09FD636DF; Mon, 8 May 2017 17:13:52 +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 C1E15B86; Mon, 8 May 2017 17:13:51 +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 v48HDoM3043075; Mon, 8 May 2017 17:13:50 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v48HDo49043074; Mon, 8 May 2017 17:13:50 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201705081713.v48HDo49043074@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 17:13:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r317958 - vendor/lld/lld-trunk-r302418 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 17:13:52 -0000 Author: dim Date: Mon May 8 17:13:50 2017 New Revision: 317958 URL: https://svnweb.freebsd.org/changeset/base/317958 Log: Tag lld trunk r302418. Added: vendor/lld/lld-trunk-r302418/ - copied from r317957, vendor/lld/dist/ From owner-svn-src-all@freebsd.org Mon May 8 17:14:02 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 92A66D6379E; Mon, 8 May 2017 17:14:02 +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 44537CCF; Mon, 8 May 2017 17:14:02 +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 v48HE1Lv043199; Mon, 8 May 2017 17:14:01 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v48HE1dg043198; Mon, 8 May 2017 17:14:01 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201705081714.v48HE1dg043198@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 17:14:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r317960 - vendor/lldb/lldb-trunk-r302418 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 17:14:02 -0000 Author: dim Date: Mon May 8 17:14:01 2017 New Revision: 317960 URL: https://svnweb.freebsd.org/changeset/base/317960 Log: Tag lldb trunk r302418. Added: vendor/lldb/lldb-trunk-r302418/ - copied from r317959, vendor/lldb/dist/ From owner-svn-src-all@freebsd.org Mon May 8 17:13:58 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0ED96D63758; Mon, 8 May 2017 17:13:58 +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 C7C40C4A; Mon, 8 May 2017 17:13:57 +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 v48HDuXR043147; Mon, 8 May 2017 17:13:56 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v48HDsFW043121; Mon, 8 May 2017 17:13:54 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201705081713.v48HDsFW043121@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 17:13:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r317959 - in vendor/lldb/dist: include/lldb/API include/lldb/Core include/lldb/Expression include/lldb/Host include/lldb/Host/common include/lldb/Target include/lldb/Utility packages/Py... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 17:13:58 -0000 Author: dim Date: Mon May 8 17:13:54 2017 New Revision: 317959 URL: https://svnweb.freebsd.org/changeset/base/317959 Log: Vendor import of lldb trunk r302418: https://llvm.org/svn/llvm-project/lldb/trunk@302418 Added: vendor/lldb/dist/unittests/Host/MainLoopTest.cpp (contents, props changed) Modified: vendor/lldb/dist/include/lldb/API/SBAddress.h vendor/lldb/dist/include/lldb/API/SBInstruction.h vendor/lldb/dist/include/lldb/API/SBInstructionList.h vendor/lldb/dist/include/lldb/Core/Disassembler.h vendor/lldb/dist/include/lldb/Expression/Expression.h vendor/lldb/dist/include/lldb/Host/MainLoop.h vendor/lldb/dist/include/lldb/Host/common/UDPSocket.h vendor/lldb/dist/include/lldb/Target/ThreadPlanCallFunction.h vendor/lldb/dist/include/lldb/Target/ThreadPlanCallUserExpression.h vendor/lldb/dist/include/lldb/Utility/TaskPool.h vendor/lldb/dist/packages/Python/lldbsuite/test/expression_command/multiline/TestMultilineExpressions.py vendor/lldb/dist/packages/Python/lldbsuite/test/functionalities/breakpoint/step_over_breakpoint/TestStepOverBreakpoint.py vendor/lldb/dist/packages/Python/lldbsuite/test/functionalities/return-value/TestReturnValue.py vendor/lldb/dist/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteHostInfo.py vendor/lldb/dist/scripts/interface/SBInstruction.i vendor/lldb/dist/scripts/interface/SBInstructionList.i vendor/lldb/dist/source/API/SBAddress.cpp vendor/lldb/dist/source/API/SBInstruction.cpp vendor/lldb/dist/source/API/SBInstructionList.cpp vendor/lldb/dist/source/API/SBProcess.cpp vendor/lldb/dist/source/Core/Disassembler.cpp vendor/lldb/dist/source/Host/common/Editline.cpp vendor/lldb/dist/source/Host/common/MainLoop.cpp vendor/lldb/dist/source/Host/common/UDPSocket.cpp vendor/lldb/dist/source/Plugins/ABI/SysV-arm64/ABISysV_arm64.cpp vendor/lldb/dist/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOS.cpp vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp vendor/lldb/dist/source/Target/ThreadPlanCallUserExpression.cpp vendor/lldb/dist/source/Utility/TaskPool.cpp vendor/lldb/dist/unittests/Host/CMakeLists.txt vendor/lldb/dist/unittests/Utility/TaskPoolTest.cpp vendor/lldb/dist/www/lldb-gdb.html Modified: vendor/lldb/dist/include/lldb/API/SBAddress.h ============================================================================== --- vendor/lldb/dist/include/lldb/API/SBAddress.h Mon May 8 17:13:50 2017 (r317958) +++ vendor/lldb/dist/include/lldb/API/SBAddress.h Mon May 8 17:13:54 2017 (r317959) @@ -103,6 +103,8 @@ protected: const lldb_private::Address *operator->() const; + friend bool operator==(const SBAddress &lhs, const SBAddress &rhs); + lldb_private::Address *get(); lldb_private::Address &ref(); @@ -117,6 +119,8 @@ private: std::unique_ptr m_opaque_ap; }; +bool operator==(const SBAddress &lhs, const SBAddress &rhs); + } // namespace lldb #endif // LLDB_SBAddress_h_ Modified: vendor/lldb/dist/include/lldb/API/SBInstruction.h ============================================================================== --- vendor/lldb/dist/include/lldb/API/SBInstruction.h Mon May 8 17:13:50 2017 (r317958) +++ vendor/lldb/dist/include/lldb/API/SBInstruction.h Mon May 8 17:13:54 2017 (r317959) @@ -53,6 +53,8 @@ public: bool HasDelaySlot(); + bool CanSetBreakpoint(); + void Print(FILE *out); bool GetDescription(lldb::SBStream &description); Modified: vendor/lldb/dist/include/lldb/API/SBInstructionList.h ============================================================================== --- vendor/lldb/dist/include/lldb/API/SBInstructionList.h Mon May 8 17:13:50 2017 (r317958) +++ vendor/lldb/dist/include/lldb/API/SBInstructionList.h Mon May 8 17:13:54 2017 (r317959) @@ -32,6 +32,15 @@ public: lldb::SBInstruction GetInstructionAtIndex(uint32_t idx); + // ---------------------------------------------------------------------- + // Returns the number of instructions between the start and end address. + // If canSetBreakpoint is true then the count will be the number of + // instructions on which a breakpoint can be set. + // ---------------------------------------------------------------------- + size_t GetInstructionsCount(const SBAddress &start, + const SBAddress &end, + bool canSetBreakpoint = false); + void Clear(); void AppendInstruction(lldb::SBInstruction inst); Modified: vendor/lldb/dist/include/lldb/Core/Disassembler.h ============================================================================== --- vendor/lldb/dist/include/lldb/Core/Disassembler.h Mon May 8 17:13:50 2017 (r317958) +++ vendor/lldb/dist/include/lldb/Core/Disassembler.h Mon May 8 17:13:54 2017 (r317959) @@ -173,6 +173,8 @@ public: virtual bool HasDelaySlot(); + bool CanSetBreakpoint (); + virtual size_t Decode(const Disassembler &disassembler, const DataExtractor &data, lldb::offset_t data_offset) = 0; Modified: vendor/lldb/dist/include/lldb/Expression/Expression.h ============================================================================== --- vendor/lldb/dist/include/lldb/Expression/Expression.h Mon May 8 17:13:50 2017 (r317958) +++ vendor/lldb/dist/include/lldb/Expression/Expression.h Mon May 8 17:13:54 2017 (r317959) @@ -99,6 +99,16 @@ public: //------------------------------------------------------------------ lldb::addr_t StartAddress() { return m_jit_start_addr; } + //------------------------------------------------------------------ + /// Called to notify the expression that it is about to be executed. + //------------------------------------------------------------------ + virtual void WillStartExecuting() {} + + //------------------------------------------------------------------ + /// Called to notify the expression that its execution has finished. + //------------------------------------------------------------------ + virtual void DidFinishExecuting() {} + virtual ExpressionTypeSystemHelper *GetTypeSystemHelper() { return nullptr; } protected: Modified: vendor/lldb/dist/include/lldb/Host/MainLoop.h ============================================================================== --- vendor/lldb/dist/include/lldb/Host/MainLoop.h Mon May 8 17:13:50 2017 (r317958) +++ vendor/lldb/dist/include/lldb/Host/MainLoop.h Mon May 8 17:13:54 2017 (r317959) @@ -42,6 +42,7 @@ private: public: typedef std::unique_ptr SignalHandleUP; + MainLoop(); ~MainLoop() override; ReadHandleUP RegisterReadObject(const lldb::IOObjectSP &object_sp, @@ -71,6 +72,9 @@ protected: void UnregisterSignal(int signo); private: + void ProcessReadObject(IOObject::WaitableHandle handle); + void ProcessSignal(int signo); + class SignalHandle { public: ~SignalHandle() { m_mainloop.UnregisterSignal(m_signo); } @@ -97,6 +101,9 @@ private: llvm::DenseMap m_read_fds; llvm::DenseMap m_signals; +#if HAVE_SYS_EVENT_H + int m_kqueue; +#endif bool m_terminate_request : 1; }; Modified: vendor/lldb/dist/include/lldb/Host/common/UDPSocket.h ============================================================================== --- vendor/lldb/dist/include/lldb/Host/common/UDPSocket.h Mon May 8 17:13:50 2017 (r317958) +++ vendor/lldb/dist/include/lldb/Host/common/UDPSocket.h Mon May 8 17:13:54 2017 (r317959) @@ -21,15 +21,13 @@ public: Socket *&socket); private: - UDPSocket(NativeSocket socket, const UDPSocket &listen_socket); + UDPSocket(NativeSocket socket); size_t Send(const void *buf, const size_t num_bytes) override; Error Connect(llvm::StringRef name) override; Error Listen(llvm::StringRef name, int backlog) override; Error Accept(Socket *&socket) override; - Error CreateSocket(); - SocketAddress m_sockaddr; }; } Modified: vendor/lldb/dist/include/lldb/Target/ThreadPlanCallFunction.h ============================================================================== --- vendor/lldb/dist/include/lldb/Target/ThreadPlanCallFunction.h Mon May 8 17:13:50 2017 (r317958) +++ vendor/lldb/dist/include/lldb/Target/ThreadPlanCallFunction.h Mon May 8 17:13:54 2017 (r317959) @@ -117,7 +117,7 @@ protected: lldb::addr_t &start_load_addr, lldb::addr_t &function_load_addr); - void DoTakedown(bool success); + virtual void DoTakedown(bool success); void SetBreakpoints(); Modified: vendor/lldb/dist/include/lldb/Target/ThreadPlanCallUserExpression.h ============================================================================== --- vendor/lldb/dist/include/lldb/Target/ThreadPlanCallUserExpression.h Mon May 8 17:13:50 2017 (r317958) +++ vendor/lldb/dist/include/lldb/Target/ThreadPlanCallUserExpression.h Mon May 8 17:13:54 2017 (r317959) @@ -35,6 +35,8 @@ public: void GetDescription(Stream *s, lldb::DescriptionLevel level) override; + void DidPush() override; + void WillPop() override; lldb::StopInfoSP GetRealStopInfo() override; @@ -48,6 +50,7 @@ public: } protected: + void DoTakedown(bool success) override; private: lldb::UserExpressionSP m_user_expression_sp; // This is currently just used to ensure the Modified: vendor/lldb/dist/include/lldb/Utility/TaskPool.h ============================================================================== --- vendor/lldb/dist/include/lldb/Utility/TaskPool.h Mon May 8 17:13:50 2017 (r317958) +++ vendor/lldb/dist/include/lldb/Utility/TaskPool.h Mon May 8 17:13:54 2017 (r317959) @@ -53,50 +53,6 @@ private: static void AddTaskImpl(std::function &&task_fn); }; -// Wrapper class around the global TaskPool implementation to make it possible -// to create a set of -// tasks and then wait for the tasks to be completed by the -// WaitForNextCompletedTask call. This -// class should be used when WaitForNextCompletedTask is needed because this -// class add no other -// extra functionality to the TaskPool class and it have a very minor -// performance overhead. -template // The return type of the tasks what will be added to this - // task runner - class TaskRunner { -public: - // Add a task to the task runner what will also add the task to the global - // TaskPool. The - // function doesn't return the std::future for the task because it will be - // supplied by the - // WaitForNextCompletedTask after the task is completed. - template void AddTask(F &&f, Args &&... args); - - // Wait for the next task in this task runner to finish and then return the - // std::future what - // belongs to the finished task. If there is no task in this task runner - // (neither pending nor - // comleted) then this function will return an invalid future. Usually this - // function should be - // called in a loop processing the results of the tasks until it returns an - // invalid std::future - // what means that all task in this task runner is completed. - std::future WaitForNextCompletedTask(); - - // Convenience method to wait for all task in this TaskRunner to finish. Do - // NOT use this class - // just because of this method. Use TaskPool instead and wait for each - // std::future returned by - // AddTask in a loop. - void WaitForAllTasks(); - -private: - std::list> m_ready; - std::list> m_pending; - std::mutex m_mutex; - std::condition_variable m_cv; -}; - template std::future::type> TaskPool::AddTask(F &&f, Args &&... args) { @@ -126,64 +82,10 @@ template <> struct TaskPool::RunTaskImpl static void Run() {} }; -template -template -void TaskRunner::AddTask(F &&f, Args &&... args) { - std::unique_lock lock(m_mutex); - auto it = m_pending.emplace(m_pending.end()); - *it = std::move(TaskPool::AddTask( - [this, it](F f, Args... args) { - T &&r = f(std::forward(args)...); - - std::unique_lock lock(this->m_mutex); - this->m_ready.splice(this->m_ready.end(), this->m_pending, it); - lock.unlock(); - - this->m_cv.notify_one(); - return r; - }, - std::forward(f), std::forward(args)...)); -} - -template <> -template -void TaskRunner::AddTask(F &&f, Args &&... args) { - std::unique_lock lock(m_mutex); - auto it = m_pending.emplace(m_pending.end()); - *it = std::move(TaskPool::AddTask( - [this, it](F f, Args... args) { - f(std::forward(args)...); - - std::unique_lock lock(this->m_mutex); - this->m_ready.emplace_back(std::move(*it)); - this->m_pending.erase(it); - lock.unlock(); - - this->m_cv.notify_one(); - }, - std::forward(f), std::forward(args)...)); -} - -template std::future TaskRunner::WaitForNextCompletedTask() { - std::unique_lock lock(m_mutex); - if (m_ready.empty() && m_pending.empty()) - return std::future(); // No more tasks - - if (m_ready.empty()) - m_cv.wait(lock, [this]() { return !this->m_ready.empty(); }); - - std::future res = std::move(m_ready.front()); - m_ready.pop_front(); - - lock.unlock(); - res.wait(); - - return std::move(res); -} - -template void TaskRunner::WaitForAllTasks() { - while (WaitForNextCompletedTask().valid()) - ; -} +// Run 'func' on every value from begin .. end-1. Each worker will grab +// 'batch_size' numbers at a time to work on, so for very fast functions, batch +// should be large enough to avoid too much cache line contention. +void TaskMapOverInt(size_t begin, size_t end, + std::function const &func); #endif // #ifndef utility_TaskPool_h_ Modified: vendor/lldb/dist/packages/Python/lldbsuite/test/expression_command/multiline/TestMultilineExpressions.py ============================================================================== --- vendor/lldb/dist/packages/Python/lldbsuite/test/expression_command/multiline/TestMultilineExpressions.py Mon May 8 17:13:50 2017 (r317958) +++ vendor/lldb/dist/packages/Python/lldbsuite/test/expression_command/multiline/TestMultilineExpressions.py Mon May 8 17:13:54 2017 (r317959) @@ -12,6 +12,7 @@ from lldbsuite.test import lldbutil class MultilineExpressionsTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) + NO_DEBUG_INFO_TESTCASE = True def setUp(self): # Call super's setUp(). @@ -60,3 +61,30 @@ class MultilineExpressionsTestCase(TestB child.expect_exact(prompt) self.expect(child.before, exe=False, patterns=['= 5']) + + @skipIfRemote + @expectedFailureAll( + oslist=["windows"], + bugnumber="llvm.org/pr22274: need a pexpect replacement for windows") + def test_empty_list(self): + """Test printing an empty list of expressions""" + import pexpect + prompt = "(lldb) " + + # So that the child gets torn down after the test + self.child = pexpect.spawn( + "%s %s" % + (lldbtest_config.lldbExec, self.lldbOption)) + child = self.child + + # Turn on logging for what the child sends back. + if self.TraceOn(): + child.logfile_read = sys.stdout + + # We expect a prompt, then send "print" to start a list of expressions, + # then an empty line. We expect a prompt back. + child.expect_exact(prompt) + child.sendline("print") + child.expect_exact('1:') + child.sendline("") + child.expect_exact(prompt) Modified: vendor/lldb/dist/packages/Python/lldbsuite/test/functionalities/breakpoint/step_over_breakpoint/TestStepOverBreakpoint.py ============================================================================== --- vendor/lldb/dist/packages/Python/lldbsuite/test/functionalities/breakpoint/step_over_breakpoint/TestStepOverBreakpoint.py Mon May 8 17:13:50 2017 (r317958) +++ vendor/lldb/dist/packages/Python/lldbsuite/test/functionalities/breakpoint/step_over_breakpoint/TestStepOverBreakpoint.py Mon May 8 17:13:54 2017 (r317959) @@ -62,12 +62,11 @@ class StepOverBreakpointsTestCase(TestBa instructions = function.GetInstructions(self.target) addr_1 = self.breakpoint1.GetLocationAtIndex(0).GetAddress() addr_4 = self.breakpoint4.GetLocationAtIndex(0).GetAddress() - for i in range(instructions.GetSize()) : - addr = instructions.GetInstructionAtIndex(i).GetAddress() - if (addr == addr_1) : index_1 = i - if (addr == addr_4) : index_4 = i - steps_expected = index_4 - index_1 + # if third argument is true then the count will be the number of + # instructions on which a breakpoint can be set. + # start = addr_1, end = addr_4, canSetBreakpoint = True + steps_expected = instructions.GetInstructionsCount(addr_1, addr_4, True) step_count = 0 # Step from breakpoint_1 to breakpoint_4 while True: Modified: vendor/lldb/dist/packages/Python/lldbsuite/test/functionalities/return-value/TestReturnValue.py ============================================================================== --- vendor/lldb/dist/packages/Python/lldbsuite/test/functionalities/return-value/TestReturnValue.py Mon May 8 17:13:50 2017 (r317958) +++ vendor/lldb/dist/packages/Python/lldbsuite/test/functionalities/return-value/TestReturnValue.py Mon May 8 17:13:54 2017 (r317959) @@ -171,17 +171,45 @@ class ReturnValueTestCase(TestBase): #self.return_and_test_struct_value ("return_one_int_one_double_packed") self.return_and_test_struct_value("return_one_int_one_long") - # icc and gcc don't support this extension. - if self.getCompiler().endswith('clang'): - self.return_and_test_struct_value("return_vector_size_float32_8") - self.return_and_test_struct_value("return_vector_size_float32_16") - self.return_and_test_struct_value("return_vector_size_float32_32") - self.return_and_test_struct_value( - "return_ext_vector_size_float32_2") - self.return_and_test_struct_value( - "return_ext_vector_size_float32_4") - self.return_and_test_struct_value( - "return_ext_vector_size_float32_8") + @expectedFailureAll(oslist=["freebsd"], archs=["i386"]) + @expectedFailureAll(oslist=["macosx"], archs=["i386"], bugnumber="") + @expectedFailureAll( + oslist=["linux"], + compiler="clang", + compiler_version=[ + "<=", + "3.6"], + archs=["i386"]) + @expectedFailureAll( + bugnumber="llvm.org/pr25785", + hostoslist=["windows"], + compiler="gcc", + archs=["i386"], + triple='.*-android') + @expectedFailureAll(compiler=["gcc"], archs=["x86_64", "i386"]) + @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24778") + def test_vector_values(self): + self.build() + exe = os.path.join(os.getcwd(), "a.out") + error = lldb.SBError() + + self.target = self.dbg.CreateTarget(exe) + self.assertTrue(self.target, VALID_TARGET) + + main_bktp = self.target.BreakpointCreateByName("main", exe) + self.assertTrue(main_bktp, VALID_BREAKPOINT) + + self.process = self.target.LaunchSimple( + None, None, self.get_process_working_directory()) + self.assertEqual(len(lldbutil.get_threads_stopped_at_breakpoint( + self.process, main_bktp)), 1) + + self.return_and_test_struct_value("return_vector_size_float32_8") + self.return_and_test_struct_value("return_vector_size_float32_16") + self.return_and_test_struct_value("return_vector_size_float32_32") + self.return_and_test_struct_value("return_ext_vector_size_float32_2") + self.return_and_test_struct_value("return_ext_vector_size_float32_4") + self.return_and_test_struct_value("return_ext_vector_size_float32_8") def return_and_test_struct_value(self, func_name): """Pass in the name of the function to return from - takes in value, returns value.""" Modified: vendor/lldb/dist/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteHostInfo.py ============================================================================== --- vendor/lldb/dist/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteHostInfo.py Mon May 8 17:13:50 2017 (r317958) +++ vendor/lldb/dist/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteHostInfo.py Mon May 8 17:13:54 2017 (r317959) @@ -14,6 +14,7 @@ class TestGdbRemoteHostInfo(GdbRemoteTes mydir = TestBase.compute_mydir(__file__) KNOWN_HOST_INFO_KEYS = set([ + "arch", "cputype", "cpusubtype", "distribution_id", Modified: vendor/lldb/dist/scripts/interface/SBInstruction.i ============================================================================== --- vendor/lldb/dist/scripts/interface/SBInstruction.i Mon May 8 17:13:50 2017 (r317958) +++ vendor/lldb/dist/scripts/interface/SBInstruction.i Mon May 8 17:13:54 2017 (r317959) @@ -54,6 +54,9 @@ public: bool HasDelaySlot (); + bool + CanSetBreakpoint (); + void Print (FILE *out); Modified: vendor/lldb/dist/scripts/interface/SBInstructionList.i ============================================================================== --- vendor/lldb/dist/scripts/interface/SBInstructionList.i Mon May 8 17:13:50 2017 (r317958) +++ vendor/lldb/dist/scripts/interface/SBInstructionList.i Mon May 8 17:13:54 2017 (r317959) @@ -44,6 +44,9 @@ public: lldb::SBInstruction GetInstructionAtIndex (uint32_t idx); + size_t GetInstructionsCount(const SBAddress &start, const SBAddress &end, + bool canSetBreakpoint); + void Clear (); Modified: vendor/lldb/dist/source/API/SBAddress.cpp ============================================================================== --- vendor/lldb/dist/source/API/SBAddress.cpp Mon May 8 17:13:50 2017 (r317958) +++ vendor/lldb/dist/source/API/SBAddress.cpp Mon May 8 17:13:54 2017 (r317959) @@ -55,6 +55,12 @@ const SBAddress &SBAddress::operator=(co return *this; } +bool lldb::operator==(const SBAddress &lhs, const SBAddress &rhs) { + if (lhs.IsValid() && rhs.IsValid()) + return lhs.ref() == rhs.ref(); + return false; +} + bool SBAddress::IsValid() const { return m_opaque_ap.get() != NULL && m_opaque_ap->IsValid(); } Modified: vendor/lldb/dist/source/API/SBInstruction.cpp ============================================================================== --- vendor/lldb/dist/source/API/SBInstruction.cpp Mon May 8 17:13:50 2017 (r317958) +++ vendor/lldb/dist/source/API/SBInstruction.cpp Mon May 8 17:13:54 2017 (r317959) @@ -176,6 +176,13 @@ bool SBInstruction::HasDelaySlot() { return false; } +bool SBInstruction::CanSetBreakpoint () { + lldb::InstructionSP inst_sp(GetOpaque()); + if (inst_sp) + return inst_sp->CanSetBreakpoint(); + return false; +} + lldb::InstructionSP SBInstruction::GetOpaque() { if (m_opaque_sp) return m_opaque_sp->GetSP(); Modified: vendor/lldb/dist/source/API/SBInstructionList.cpp ============================================================================== --- vendor/lldb/dist/source/API/SBInstructionList.cpp Mon May 8 17:13:50 2017 (r317958) +++ vendor/lldb/dist/source/API/SBInstructionList.cpp Mon May 8 17:13:54 2017 (r317959) @@ -9,6 +9,7 @@ #include "lldb/API/SBInstructionList.h" #include "lldb/API/SBInstruction.h" +#include "lldb/API/SBAddress.h" #include "lldb/API/SBStream.h" #include "lldb/Core/Disassembler.h" #include "lldb/Core/Module.h" @@ -49,6 +50,31 @@ SBInstruction SBInstructionList::GetInst return inst; } +size_t SBInstructionList::GetInstructionsCount(const SBAddress &start, + const SBAddress &end, + bool canSetBreakpoint) { + size_t num_instructions = GetSize(); + size_t i = 0; + SBAddress addr; + size_t lower_index = 0; + size_t upper_index = 0; + size_t instructions_to_skip = 0; + for (i = 0; i < num_instructions; ++i) { + addr = GetInstructionAtIndex(i).GetAddress(); + if (start == addr) + lower_index = i; + if (end == addr) + upper_index = i; + } + if (canSetBreakpoint) + for (i = lower_index; i <= upper_index; ++i) { + SBInstruction insn = GetInstructionAtIndex(i); + if (!insn.CanSetBreakpoint()) + ++instructions_to_skip; + } + return upper_index - lower_index - instructions_to_skip; +} + void SBInstructionList::Clear() { m_opaque_sp.reset(); } void SBInstructionList::AppendInstruction(SBInstruction insn) {} Modified: vendor/lldb/dist/source/API/SBProcess.cpp ============================================================================== --- vendor/lldb/dist/source/API/SBProcess.cpp Mon May 8 17:13:50 2017 (r317958) +++ vendor/lldb/dist/source/API/SBProcess.cpp Mon May 8 17:13:54 2017 (r317959) @@ -1157,22 +1157,34 @@ uint32_t SBProcess::LoadImage(lldb::SBFi uint32_t SBProcess::LoadImage(const lldb::SBFileSpec &sb_local_image_spec, const lldb::SBFileSpec &sb_remote_image_spec, lldb::SBError &sb_error) { + Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); ProcessSP process_sp(GetSP()); if (process_sp) { Process::StopLocker stop_locker; if (stop_locker.TryLock(&process_sp->GetRunLock())) { + if (log) + log->Printf("SBProcess(%p)::LoadImage() => calling Platform::LoadImage" + "for: %s", + static_cast(process_sp.get()), + sb_local_image_spec.GetFilename()); + std::lock_guard guard( - process_sp->GetTarget().GetAPIMutex()); + process_sp->GetTarget().GetAPIMutex()); PlatformSP platform_sp = process_sp->GetTarget().GetPlatform(); return platform_sp->LoadImage(process_sp.get(), *sb_local_image_spec, *sb_remote_image_spec, sb_error.ref()); } else { - Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); if (log) log->Printf("SBProcess(%p)::LoadImage() => error: process is running", static_cast(process_sp.get())); sb_error.SetErrorString("process is running"); } + } else { + if (log) + log->Printf("SBProcess(%p)::LoadImage() => error: called with invalid" + " process", + static_cast(process_sp.get())); + sb_error.SetErrorString("process is invalid"); } return LLDB_INVALID_IMAGE_TOKEN; } Modified: vendor/lldb/dist/source/Core/Disassembler.cpp ============================================================================== --- vendor/lldb/dist/source/Core/Disassembler.cpp Mon May 8 17:13:50 2017 (r317958) +++ vendor/lldb/dist/source/Core/Disassembler.cpp Mon May 8 17:13:54 2017 (r317959) @@ -759,6 +759,10 @@ bool Instruction::DumpEmulation(const Ar return false; } +bool Instruction::CanSetBreakpoint () { + return !HasDelaySlot(); +} + bool Instruction::HasDelaySlot() { // Default is false. return false; Modified: vendor/lldb/dist/source/Host/common/Editline.cpp ============================================================================== --- vendor/lldb/dist/source/Host/common/Editline.cpp Mon May 8 17:13:50 2017 (r317958) +++ vendor/lldb/dist/source/Host/common/Editline.cpp Mon May 8 17:13:54 2017 (r317959) @@ -367,7 +367,7 @@ void Editline::MoveCursor(CursorLocation if (to == CursorLocation::EditingCursor) { toColumn = editline_cursor_position - (editline_cursor_row * m_terminal_width) + 1; - } else if (to == CursorLocation::BlockEnd) { + } else if (to == CursorLocation::BlockEnd && !m_input_lines.empty()) { toColumn = ((m_input_lines[m_input_lines.size() - 1].length() + GetPromptWidth()) % 80) + Modified: vendor/lldb/dist/source/Host/common/MainLoop.cpp ============================================================================== --- vendor/lldb/dist/source/Host/common/MainLoop.cpp Mon May 8 17:13:50 2017 (r317958) +++ vendor/lldb/dist/source/Host/common/MainLoop.cpp Mon May 8 17:13:54 2017 (r317959) @@ -18,6 +18,11 @@ #include #include +// Multiplexing is implemented using kqueue on systems that support it (BSD +// variants including OSX). On linux we use ppoll, while android uses pselect +// (ppoll is present but not implemented properly). On windows we use WSApoll +// (which does not support signals). + #if HAVE_SYS_EVENT_H #include #elif defined(LLVM_ON_WIN32) @@ -65,92 +70,72 @@ static void SignalHandler(int signo, sig class MainLoop::RunImpl { public: - // TODO: Use llvm::Expected - static std::unique_ptr Create(MainLoop &loop, Error &error); - ~RunImpl(); + RunImpl(MainLoop &loop); + ~RunImpl() = default; Error Poll(); - - template void ForEachReadFD(F &&f); - template void ForEachSignal(F &&f); + void ProcessEvents(); private: MainLoop &loop; #if HAVE_SYS_EVENT_H - int queue_id; std::vector in_events; struct kevent out_events[4]; int num_events = -1; - RunImpl(MainLoop &loop, int queue_id) : loop(loop), queue_id(queue_id) { - in_events.reserve(loop.m_read_fds.size() + loop.m_signals.size()); - } #else - std::vector signals; #ifdef FORCE_PSELECT fd_set read_fd_set; #else std::vector read_fds; #endif - RunImpl(MainLoop &loop) : loop(loop) { - signals.reserve(loop.m_signals.size()); - } - sigset_t get_sigmask(); #endif }; #if HAVE_SYS_EVENT_H -MainLoop::RunImpl::~RunImpl() { - int r = close(queue_id); - assert(r == 0); - (void)r; -} -std::unique_ptr MainLoop::RunImpl::Create(MainLoop &loop, Error &error) -{ - error.Clear(); - int queue_id = kqueue(); - if(queue_id < 0) { - error = Error(errno, eErrorTypePOSIX); - return nullptr; - } - return std::unique_ptr(new RunImpl(loop, queue_id)); +MainLoop::RunImpl::RunImpl(MainLoop &loop) : loop(loop) { + in_events.reserve(loop.m_read_fds.size()); } Error MainLoop::RunImpl::Poll() { - in_events.resize(loop.m_read_fds.size() + loop.m_signals.size()); + in_events.resize(loop.m_read_fds.size()); unsigned i = 0; for (auto &fd : loop.m_read_fds) EV_SET(&in_events[i++], fd.first, EVFILT_READ, EV_ADD, 0, 0, 0); - for (const auto &sig : loop.m_signals) - EV_SET(&in_events[i++], sig.first, EVFILT_SIGNAL, EV_ADD, 0, 0, 0); - - num_events = kevent(queue_id, in_events.data(), in_events.size(), out_events, - llvm::array_lengthof(out_events), nullptr); + num_events = kevent(loop.m_kqueue, in_events.data(), in_events.size(), + out_events, llvm::array_lengthof(out_events), nullptr); if (num_events < 0) return Error("kevent() failed with error %d\n", num_events); return Error(); } -template void MainLoop::RunImpl::ForEachReadFD(F &&f) { +void MainLoop::RunImpl::ProcessEvents() { assert(num_events >= 0); for (int i = 0; i < num_events; ++i) { - f(out_events[i].ident); if (loop.m_terminate_request) return; + switch (out_events[i].filter) { + case EVFILT_READ: + loop.ProcessReadObject(out_events[i].ident); + break; + case EVFILT_SIGNAL: + loop.ProcessSignal(out_events[i].ident); + break; + default: + llvm_unreachable("Unknown event"); + } } } -template void MainLoop::RunImpl::ForEachSignal(F && f) {} #else -MainLoop::RunImpl::~RunImpl() {} -std::unique_ptr MainLoop::RunImpl::Create(MainLoop &loop, Error &error) -{ - error.Clear(); - return std::unique_ptr(new RunImpl(loop)); +MainLoop::RunImpl::RunImpl(MainLoop &loop) : loop(loop) { +#ifndef FORCE_PSELECT + read_fds.reserve(loop.m_read_fds.size()); +#endif } sigset_t MainLoop::RunImpl::get_sigmask() { @@ -162,18 +147,14 @@ sigset_t MainLoop::RunImpl::get_sigmask( assert(ret == 0); (void) ret; - for (const auto &sig : loop.m_signals) { - signals.push_back(sig.first); + for (const auto &sig : loop.m_signals) sigdelset(&sigmask, sig.first); - } return sigmask; #endif } #ifdef FORCE_PSELECT Error MainLoop::RunImpl::Poll() { - signals.clear(); - FD_ZERO(&read_fd_set); int nfds = 0; for (const auto &fd : loop.m_read_fds) { @@ -188,20 +169,8 @@ Error MainLoop::RunImpl::Poll() { return Error(); } - -template void MainLoop::RunImpl::ForEachReadFD(F &&f) { - for (const auto &fd : loop.m_read_fds) { - if(!FD_ISSET(fd.first, &read_fd_set)) - continue; - - f(fd.first); - if (loop.m_terminate_request) - return; - } -} #else Error MainLoop::RunImpl::Poll() { - signals.clear(); read_fds.clear(); sigset_t sigmask = get_sigmask(); @@ -220,33 +189,47 @@ Error MainLoop::RunImpl::Poll() { return Error(); } +#endif -template void MainLoop::RunImpl::ForEachReadFD(F &&f) { +void MainLoop::RunImpl::ProcessEvents() { +#ifdef FORCE_PSELECT + for (const auto &fd : loop.m_read_fds) { + if (!FD_ISSET(fd.first, &read_fd_set)) + continue; + IOObject::WaitableHandle handle = fd.first; +#else for (const auto &fd : read_fds) { if ((fd.revents & POLLIN) == 0) continue; - - f(fd.fd); + IOObject::WaitableHandle handle = fd.fd; +#endif if (loop.m_terminate_request) return; - } -} -#endif -template void MainLoop::RunImpl::ForEachSignal(F &&f) { - for (int sig : signals) { - if (g_signal_flags[sig] == 0) - continue; // No signal - g_signal_flags[sig] = 0; - f(sig); + loop.ProcessReadObject(handle); + } + for (const auto &entry : loop.m_signals) { if (loop.m_terminate_request) return; + if (g_signal_flags[entry.first] == 0) + continue; // No signal + g_signal_flags[entry.first] = 0; + loop.ProcessSignal(entry.first); } } #endif +MainLoop::MainLoop() { +#if HAVE_SYS_EVENT_H + m_kqueue = kqueue(); + assert(m_kqueue >= 0); +#endif +} MainLoop::~MainLoop() { +#if HAVE_SYS_EVENT_H + close(m_kqueue); +#endif assert(m_read_fds.size() == 0); assert(m_signals.size() == 0); } @@ -298,24 +281,30 @@ MainLoop::RegisterSignal(int signo, cons new_action.sa_flags = SA_SIGINFO; sigemptyset(&new_action.sa_mask); sigaddset(&new_action.sa_mask, signo); - sigset_t old_set; - if (int ret = pthread_sigmask(SIG_BLOCK, &new_action.sa_mask, &old_set)) { - error.SetErrorStringWithFormat("pthread_sigmask failed with error %d\n", - ret); - return nullptr; - } - info.was_blocked = sigismember(&old_set, signo); - if (sigaction(signo, &new_action, &info.old_action) == -1) { - error.SetErrorToErrno(); - if (!info.was_blocked) - pthread_sigmask(SIG_UNBLOCK, &new_action.sa_mask, nullptr); - return nullptr; - } + g_signal_flags[signo] = 0; + + // Even if using kqueue, the signal handler will still be invoked, so it's + // important to replace it with our "bening" handler. + int ret = sigaction(signo, &new_action, &info.old_action); + assert(ret == 0 && "sigaction failed"); + +#if HAVE_SYS_EVENT_H + struct kevent ev; + EV_SET(&ev, signo, EVFILT_SIGNAL, EV_ADD, 0, 0, 0); + ret = kevent(m_kqueue, &ev, 1, nullptr, 0, nullptr); + assert(ret == 0); +#endif + // If we're using kqueue, the signal needs to be unblocked in order to recieve + // it. If using pselect/ppoll, we need to block it, and later unblock it as a + // part of the system call. + ret = pthread_sigmask(HAVE_SYS_EVENT_H ? SIG_UNBLOCK : SIG_BLOCK, + &new_action.sa_mask, &old_set); + assert(ret == 0 && "pthread_sigmask failed"); + info.was_blocked = sigismember(&old_set, signo); m_signals.insert({signo, info}); - g_signal_flags[signo] = 0; return SignalHandleUP(new SignalHandle(*this, signo)); #endif @@ -331,7 +320,6 @@ void MainLoop::UnregisterSignal(int sign #if SIGNAL_POLLING_UNSUPPORTED Error("Signal polling is not supported on this platform."); #else - // We undo the actions of RegisterSignal on a best-effort basis. auto it = m_signals.find(signo); assert(it != m_signals.end()); @@ -340,8 +328,17 @@ void MainLoop::UnregisterSignal(int sign sigset_t set; sigemptyset(&set); sigaddset(&set, signo); - pthread_sigmask(it->second.was_blocked ? SIG_BLOCK : SIG_UNBLOCK, &set, - nullptr); + int ret = pthread_sigmask(it->second.was_blocked ? SIG_BLOCK : SIG_UNBLOCK, + &set, nullptr); + assert(ret == 0); + (void)ret; + +#if HAVE_SYS_EVENT_H + struct kevent ev; + EV_SET(&ev, signo, EVFILT_SIGNAL, EV_DELETE, 0, 0, 0); + ret = kevent(m_kqueue, &ev, 1, nullptr, 0, nullptr); + assert(ret == 0); +#endif m_signals.erase(it); #endif @@ -351,32 +348,31 @@ Error MainLoop::Run() { m_terminate_request = false; Error error; - auto impl = RunImpl::Create(*this, error); - if (!impl) - return error; + RunImpl impl(*this); // run until termination or until we run out of things to listen to while (!m_terminate_request && (!m_read_fds.empty() || !m_signals.empty())) { - error = impl->Poll(); + error = impl.Poll(); if (error.Fail()) return error; - impl->ForEachSignal([&](int sig) { - auto it = m_signals.find(sig); - if (it != m_signals.end()) - it->second.callback(*this); // Do the work - }); - if (m_terminate_request) - return Error(); + impl.ProcessEvents(); - impl->ForEachReadFD([&](int fd) { - auto it = m_read_fds.find(fd); - if (it != m_read_fds.end()) - it->second(*this); // Do the work - }); if (m_terminate_request) return Error(); } return Error(); } + +void MainLoop::ProcessSignal(int signo) { + auto it = m_signals.find(signo); + if (it != m_signals.end()) + it->second.callback(*this); // Do the work +} + +void MainLoop::ProcessReadObject(IOObject::WaitableHandle handle) { + auto it = m_read_fds.find(handle); + if (it != m_read_fds.end()) + it->second(*this); // Do the work +} Modified: vendor/lldb/dist/source/Host/common/UDPSocket.cpp ============================================================================== --- vendor/lldb/dist/source/Host/common/UDPSocket.cpp Mon May 8 17:13:50 2017 (r317958) +++ vendor/lldb/dist/source/Host/common/UDPSocket.cpp Mon May 8 17:13:54 2017 (r317959) @@ -28,31 +28,41 @@ const int kDomain = AF_INET; const int kType = SOCK_DGRAM; static const char *g_not_supported_error = "Not supported"; -} // namespace - -UDPSocket::UDPSocket(bool should_close, bool child_processes_inherit) - : Socket(ProtocolUdp, should_close, child_processes_inherit) {} +} -UDPSocket::UDPSocket(NativeSocket socket, const UDPSocket &listen_socket) - : Socket(ProtocolUdp, listen_socket.m_should_close_fd, - listen_socket.m_child_processes_inherit) { +UDPSocket::UDPSocket(NativeSocket socket) : Socket(ProtocolUdp, true, true) { m_socket = socket; } +UDPSocket::UDPSocket(bool should_close, bool child_processes_inherit) + : Socket(ProtocolUdp, should_close, child_processes_inherit) {} + size_t UDPSocket::Send(const void *buf, const size_t num_bytes) { return ::sendto(m_socket, static_cast(buf), num_bytes, 0, m_sockaddr, m_sockaddr.GetLength()); } Error UDPSocket::Connect(llvm::StringRef name) { + return Error("%s", g_not_supported_error); +} + +Error UDPSocket::Listen(llvm::StringRef name, int backlog) { + return Error("%s", g_not_supported_error); +} + +Error UDPSocket::Accept(Socket *&socket) { + return Error("%s", g_not_supported_error); +} + +Error UDPSocket::Connect(llvm::StringRef name, bool child_processes_inherit, + Socket *&socket) { + std::unique_ptr final_socket; + Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_CONNECTION)); if (log) log->Printf("UDPSocket::%s (host/port = %s)", __FUNCTION__, name.data()); Error error; - if (error.Fail()) - return error; - std::string host_str; std::string port_str; int32_t port = INT32_MIN; @@ -84,11 +94,12 @@ Error UDPSocket::Connect(llvm::StringRef for (struct addrinfo *service_info_ptr = service_info_list; service_info_ptr != nullptr; service_info_ptr = service_info_ptr->ai_next) { - m_socket = Socket::CreateSocket( + auto send_fd = CreateSocket( service_info_ptr->ai_family, service_info_ptr->ai_socktype, - service_info_ptr->ai_protocol, m_child_processes_inherit, error); + service_info_ptr->ai_protocol, child_processes_inherit, error); if (error.Success()) { - m_sockaddr = service_info_ptr; + final_socket.reset(new UDPSocket(send_fd)); + final_socket->m_sockaddr = service_info_ptr; break; } else continue; @@ -96,17 +107,16 @@ Error UDPSocket::Connect(llvm::StringRef ::freeaddrinfo(service_info_list); - if (IsValid()) + if (!final_socket) return error; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon May 8 17:16:03 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 95E3DD63AC9; Mon, 8 May 2017 17:16:03 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x244.google.com (mail-pf0-x244.google.com [IPv6:2607:f8b0:400e:c00::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5DE6C189E; Mon, 8 May 2017 17:16:03 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x244.google.com with SMTP id u26so10599266pfd.2; Mon, 08 May 2017 10:16:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=Xcv6V+rcC712ZqIvvqhbyMN6LeJyiJFu+dlVzkAC1D8=; b=HjonhlSp84Kp33zBZ+nr/MzPAwKNDzvsXmJ6/r4YNwnEA2TMmzQQk2eVJrlpGwRZHi 5QMCfA0/YNrgR8ZkK52baeALlS8BpwPcNyHehMn4YlXL1yxgBdgV60QfC2PgmOLJxjsf ErjYwn1CXdpo7VsvbqZOawEgB2Le2SnxpNo8SKQKOndNBZutGuXfrMw4qHkS+3V+Wuvt 6O0uFrVwCGIkkl454p/cC09SQNtRdxglMwlWwoexDHLjL1hGPvPqfkAcJLHLybJs6yZk 5+H2/gzXf1yQZ5oCUcl31rfqX6aaqUdQl23nDsPxcsZFVu7v8DkCPF6FEIC4Fl/O6sW+ T7SQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=Xcv6V+rcC712ZqIvvqhbyMN6LeJyiJFu+dlVzkAC1D8=; b=d+5XnlUR/YO500wzejXxZkd2Xw5i9Xyn+HFIo6STFDgJo+HqFazX+aXn9R3qIx5lYh K9NoCTWCMdWkd3CKGqDVchbR9MWuxeOiVFDtXJsQAFXTWBdBovWCes4wzxzSjcJzfwDo Og38sRwBOSQP3p/heDHPa/3hH9LNrrybM9HI2uAj0bIlVv1f6tlRYdf/xZ+gLmc75y3w xhO5RMlSX4VrEmYRSdN/IlTZsCmyqKae2tqoAwnkPMmN1e3dtWa/5JKuFgHFxio5TVOF nXwSUyZf/oLkusQAbTU2bzy/ushwUIYVKLrXHtt9kIdwUCvFYJJ0EW6ft01S+kYzO6KF P2EQ== X-Gm-Message-State: AN3rC/6ngHXS60PXF+t5yyYZw8hrAncXcoTo0qZq3jRXzAUCAfaOoPk/ /DBI1uB4zxhsj7b8FWE= X-Received: by 10.98.13.220 with SMTP id 89mr18684546pfn.112.1494263762670; Mon, 08 May 2017 10:16:02 -0700 (PDT) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id e185sm25492938pfa.115.2017.05.08.10.16.01 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 08 May 2017 10:16:01 -0700 (PDT) Subject: Re: svn commit: r317942 - in head/usr.bin/csplit: . tests Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_53994C2F-0C87-4C8D-A633-C6C01FE01CE0"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <201705081551.v48FpT5G006849@repo.freebsd.org> Date: Mon, 8 May 2017 10:16:03 -0700 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <37A0D7B2-D610-4318-9D05-D9304BEF1078@gmail.com> References: <201705081551.v48FpT5G006849@repo.freebsd.org> To: Conrad Meyer X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 17:16:03 -0000 --Apple-Mail=_53994C2F-0C87-4C8D-A633-C6C01FE01CE0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On May 8, 2017, at 08:51, Conrad Meyer wrote: >=20 > Author: cem > Date: Mon May 8 15:51:29 2017 > New Revision: 317942 > URL: https://svnweb.freebsd.org/changeset/base/317942 >=20 > Log: > csplit(1): Fix extraneous output in edge case >=20 > When the input to csplit contains fewer lines than the number of = matches > specified, extra output was mistakenly included in some output files. >=20 > Fix the bug and add a simple ATF regression test. >=20 > PR: 219024 > Submitted by: J.R. Oldroyd >=20 > Added: > head/usr.bin/csplit/tests/ > head/usr.bin/csplit/tests/Makefile (contents, props changed) > head/usr.bin/csplit/tests/csplit_test.sh (contents, props changed) > Modified: > head/usr.bin/csplit/Makefile > head/usr.bin/csplit/csplit.c Conrad, Please add new directory entries to etc/mtree/BSD.tests.dist and = do a full buildworld/installworld cycle next time to avoid build = breakage (this isn=E2=80=99t the first time this has happened). Fixed up = in r317949. Thanks, -Ngie --Apple-Mail=_53994C2F-0C87-4C8D-A633-C6C01FE01CE0 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJZEKfUAAoJEPWDqSZpMIYVYVoQAJrUNGEqghQSTqjGcl9q70+2 7evbxwPpESYx+bAv5i3Ka/Vyv/ncB64VZNm6qGndW9l3rjrdLAL+/bTDqDJagEK6 ddvzIlO9iGDpUs1r4LaxNohVWSxfmNdqSpV051CNso4MA6j6ONDChWfqg71SEXH+ GrrEHz8U0gybLsgRGyo4sOXXRgdIqmPtWtCnapGRhSnyP9+vqPcCwopHi/PMTIt+ XYPy0VKRZWuP7rQkoTRf2uwx5JR++q859o8gMpk1PtxqKbmZ9TCKf6ZwpvrWpp4o 2ZDXeLTlOZzjf7Qs/6MFM+XYBETfPa1NYGOeM1D+pF8rgzMAcA7eUyUwaG9OgRdY ODijxVYQUQFdYEGOKSuh5BGDPY8kyb6lAoMVyWd4kYdiPrlusyXUVCeBiTAfeulv ay4fXTGBrjr9qEekeGsFDVz7YG+IoGb4bc13UiyOfLfxeVLvcNzO2V/3u0+GzXA/ 0ZuBzyEk9W7vItdCswT1MKfF2GZP+dr1rTRgUAD7gnWeWmxQTeuy8Q8ZnSqLJZYe xKRSF4sF/c3MhnZF3EzKV+I+WeeKUu1/P0s+iwQ4qSJdyrXckT+KAGCjJi+jmM3H 3zRKmKcNZ2cEXVCF05AdWXvNuZqf4io2bPoZb75WeZhMsQDM+7EKlCCuSu73MAie asaFArFnzUhiN7gGwF8i =I9UT -----END PGP SIGNATURE----- --Apple-Mail=_53994C2F-0C87-4C8D-A633-C6C01FE01CE0-- From owner-svn-src-all@freebsd.org Mon May 8 17:21:57 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-all@freebsd.org Mon May 8 17:21:59 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-all@freebsd.org Mon May 8 17:55:51 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-all@freebsd.org Mon May 8 17:55:52 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-all@freebsd.org Mon May 8 18:25:00 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 910A7D635C7; Mon, 8 May 2017 18:25:00 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg0-x242.google.com (mail-pg0-x242.google.com [IPv6:2607:f8b0:400e:c05::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1A55C1714; Mon, 8 May 2017 18:24:59 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x242.google.com with SMTP id 64so4146869pgb.3; Mon, 08 May 2017 11:24:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=NWu9gstc4AQcpdHYN78k1A4dOSSzwDZkL4fvI8YafpM=; b=qrXUslF26mpn3IHzgu7FBzbzhdwreJgwhSZDBo8kONZYIkV+FBHAlXtAeb2fFpHqry iid0CdU1qbCiIuPIDcGMjnAdGVKW+Nl6dY76swMRhg7fCWev6RmL0g4SHryiZtO1614O Ip9CokRKDGRn7iR+tGv60nkBmIWhsYlaL+eQjcK5DKi26rx+3xitqv3JpdlI+ZBhD7Ci NiCBEwPqKFlr7YMZnaZiMEQqyfwuX70FzjnSHPYYWHM+xl3tefbgkDB0H/YMGIk5Id7g EVL2DVXYDFckibcUKMLoDiGcTuNMj/sWOXYKHalrmv/TbY8k8JotTxTBI+WTXPTyzIa5 O81A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=NWu9gstc4AQcpdHYN78k1A4dOSSzwDZkL4fvI8YafpM=; b=Ka3pgEQH44Elamw9CuCXNovDruNQ3lCoMjlbnmlEIeQh9loG1uWbddkOy+fT+cifBM GvA/IWlG5SAPZpNgOMT2HiFcbgXP+l1K2WwoLqeaRXeVTuO+2MieYh7+RVBNt9G8RQ8I 2nTMDuER97Vp147hR3nn93EZWPAc+E+jw0hwHdfnQ8W74smqxOCZGbKd5Fu4M1U4NZs5 e1CcCT9BKqrYdGtyrGedo4Rj41GMVVNJjf/rElbhai1sZk1EuXPsu3nAcW549moeYww/ ulrfiqcQR/pOm1kz5ppP1+nEAG+xkoDQacWqtaHFgf5oqnI3jttxiK/tsabFJTcpyeZm Ih0A== X-Gm-Message-State: AN3rC/60z3ThrAyQJ6uix7RENdbSm11eR0LTmGg5PjusKF7sF0lxSuIe 4FFwAR2M6qWUVNp+Xi8= X-Received: by 10.99.146.92 with SMTP id s28mr20033568pgn.144.1494267897939; Mon, 08 May 2017 11:24:57 -0700 (PDT) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id s3sm27934989pgn.29.2017.05.08.11.24.56 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 08 May 2017 11:24:57 -0700 (PDT) Subject: Re: svn commit: r317744 - in head/usr.sbin/makefs: . ffs Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_790DA4CE-5C46-4C97-9116-BE7BC0E2E194"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <201705031421.v43ELIP9093367@repo.freebsd.org> Date: Mon, 8 May 2017 11:24:56 -0700 Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: References: <201705031421.v43ELIP9093367@repo.freebsd.org> To: Ed Maste X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 18:25:00 -0000 --Apple-Mail=_790DA4CE-5C46-4C97-9116-BE7BC0E2E194 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On May 3, 2017, at 07:21, Ed Maste wrote: >=20 > Author: emaste > Date: Wed May 3 14:21:18 2017 > New Revision: 317744 > URL: https://svnweb.freebsd.org/changeset/base/317744 >=20 > Log: > makefs: make buf generic >=20 > it has nothing to do with ffs and will eventually be moved. > gc sectorsize. >=20 > NetBSD versions: > ffs.c 1.58 > ffs/buf.c 1.14 1.18 > ffs/buf.h 1.8 >=20 > Obtained from: NetBSD > Sponsored by: The FreeBSD Foundation This commit broke building releases and a number of tests: = https://ci.freebsd.org/job/FreeBSD-head-amd64-test/3003/ . Thanks, -Ngie --Apple-Mail=_790DA4CE-5C46-4C97-9116-BE7BC0E2E194 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJZELf4AAoJEPWDqSZpMIYVY5MP/0pkXzahf43VAUVGJOlHLH/f E4hh2PWkHa0e8NtWYVmW7CWfVVb2LOiaMnkqjDNJNOzqIOVZZsqeGReGixIQ5Xig gVm+Zk52cRSTBbnDrZ/4+mrzZ+sc/QBVWADofGZEpeC1eyrVANU+/1SrhtSN55ah VafpBrnDO1rscGK98ITiFN9J0GAGCLBJeA8zijhBqW/eZ96jhvTkPdQuPcr+WSuY E7kzZTQZQ+jfysFcGkrWFZgNA4bLF1Qxif/YwdwuMyep1zwmyGg3Z2Q9Hb8ShvhZ WCVQBMjZLtdU+xzXq335u8zkd+ZLsbcDo8VRTzflFBmQwxD4vXtFQliS2qcU7GAI SquzU9VVwnC5xprWljanHxMI75iCVZMSxQHnoV/SXVR7QAG+6dBAIzdY4/7z3cr3 DRFzdshyIIF3N4AN8Yot5IibN0YJJELu5D7vUSX3pIeh4C0AA5AFpSEbv/0PDy+K js/rY0rFkKj3BbELCy4xEn10lncZDrdtJ5+npXbRh+gvAvd6HXQvqMeUuf0qG5q4 DlURV/HMQBmpffupdTK9zzm0wIOL3hX8drW7a/yS0r1kFFoZEv2mmVAYM9Xoq2Tk kyKcNJb0ZRsWbOYXT7iluu5AgtQe6z1PCwCzfADBVc7umAZsl722J2/aSRU2ieha my7GSL2a/ZNj0D5LhKEB =SAXf -----END PGP SIGNATURE----- --Apple-Mail=_790DA4CE-5C46-4C97-9116-BE7BC0E2E194-- From owner-svn-src-all@freebsd.org Mon May 8 18:30:56 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-all@freebsd.org Mon May 8 18:30:58 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-all@freebsd.org Mon May 8 18:42:40 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7E1B9D63110; Mon, 8 May 2017 18:42:40 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2EA5087C; Mon, 8 May 2017 18:42:40 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v48IgdWx081942; Mon, 8 May 2017 18:42:39 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v48IgdHp081940; Mon, 8 May 2017 18:42:39 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705081842.v48IgdHp081940@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 8 May 2017 18:42:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317967 - in head/usr.sbin/makefs: . ffs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 18:42:40 -0000 Author: ngie Date: Mon May 8 18:42:38 2017 New Revision: 317967 URL: https://svnweb.freebsd.org/changeset/base/317967 Log: Restore `sectorsize` global to unbreak makefs after r317744 This also unbreaks the fstyp tests. Reported by: Alastair Hogge , Jenkins Sponsored by: Dell EMC Isilon Modified: head/usr.sbin/makefs/ffs.c head/usr.sbin/makefs/ffs/buf.c Modified: head/usr.sbin/makefs/ffs.c ============================================================================== --- head/usr.sbin/makefs/ffs.c Mon May 8 18:30:56 2017 (r317966) +++ head/usr.sbin/makefs/ffs.c Mon May 8 18:42:38 2017 (r317967) @@ -143,7 +143,7 @@ static void *ffs_build_dinode2(struct u fsnode *, fsinfo_t *); - +int sectorsize; /* XXX: for buf.c::getblk() */ /* publicly visible functions */ void @@ -426,6 +426,8 @@ ffs_validate(const char *dir, fsnode *ro printf("ffs_validate: dir %s; %lld bytes, %lld inodes\n", dir, (long long)fsopts->size, (long long)fsopts->inodes); } + sectorsize = fsopts->sectorsize; /* XXX - see earlier */ + /* now check calculated sizes vs requested sizes */ if (fsopts->maxsize > 0 && fsopts->size > fsopts->maxsize) { errx(1, "`%s' size of %lld is larger than the maxsize of %lld.", Modified: head/usr.sbin/makefs/ffs/buf.c ============================================================================== --- head/usr.sbin/makefs/ffs/buf.c Mon May 8 18:30:56 2017 (r317966) +++ head/usr.sbin/makefs/ffs/buf.c Mon May 8 18:42:38 2017 (r317967) @@ -52,6 +52,8 @@ __FBSDID("$FreeBSD$"); #include "makefs.h" #include "buf.h" +extern int sectorsize; /* XXX: from ffs.c & mkfs.c */ + static TAILQ_HEAD(buftailhead,buf) buftail; int @@ -60,7 +62,6 @@ bread(struct vnode *vp, daddr_t blkno, i { off_t offset; ssize_t rv; - fsinfo_t *fs = vp->fs; assert (bpp != NULL); @@ -68,7 +69,7 @@ bread(struct vnode *vp, daddr_t blkno, i printf("%s: blkno %lld size %d\n", __func__, (long long)blkno, size); *bpp = getblk(vp, blkno, size, 0, 0, 0); - offset = (*bpp)->b_blkno * fs->sectorsize; + offset = (*bpp)->b_blkno * sectorsize; /* XXX */ if (debug & DEBUG_BUF_BREAD) printf("%s: blkno %lld offset %lld bcount %ld\n", __func__, (long long)(*bpp)->b_blkno, (long long) offset, @@ -125,10 +126,9 @@ bwrite(struct buf *bp) { off_t offset; ssize_t rv; - fsinfo_t *fs = bp->b_fs; assert (bp != NULL); - offset = bp->b_blkno * fs->sectorsize; + offset = bp->b_blkno * sectorsize; /* XXX */ if (debug & DEBUG_BUF_BWRITE) printf("bwrite: blkno %lld offset %lld bcount %ld\n", (long long)bp->b_blkno, (long long) offset, From owner-svn-src-all@freebsd.org Mon May 8 18:46:24 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F1836D631AF; Mon, 8 May 2017 18:46:23 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x241.google.com (mail-pf0-x241.google.com [IPv6:2607:f8b0:400e:c00::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 396C61B6C; Mon, 8 May 2017 18:46:23 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x241.google.com with SMTP id b23so10865323pfc.0; Mon, 08 May 2017 11:46:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=3uECp90TNKm0HPK0uhTnAs8ovWXKore6dYASp0jq8EQ=; b=Rnj/IkXpgFifgphdoC0wxR8Ajp9vt9q/lLIAX2sXOLrYRnkOW+hxsg0BgQkv2Txl7F Jfwmyw0jYFTPaBUgDDPWAt/RmnZ//6q+zUNWAtNrlxoCKQONt3gLCcIcmgeqgHgJXuVP C7pqtXuDsPZmtEtDVDShd5GXnSWtDaG4AdNiZRjVLjyqLC2Fv7ooGLn8hwujgTZpV+Vf 0O29I945drDwstNpeqYloJbASErOYAe5nGntY6v1mFt6ADyKM8K3Et2Byt/AlWGL2JfY 9p3RzEFJQQaY3NwVUQWnMfygSg/o4g5nl6zJel0M3qh/raNykOtd34KuuYlxZLxwQOke ljww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=3uECp90TNKm0HPK0uhTnAs8ovWXKore6dYASp0jq8EQ=; b=N57pZYiHxfnWDfFrFvnxt+1JY2pDw0HIt5yqeWDUtcI6fB4/KZBlYXKWze+Fqxismv BLP1USnVWMj1xWalSN/CaQF7BmbKEN6FuSyNr9rIhxmZPzjWyniUzcuHdLzZ5U8RC7Ft k9smeX7lzvTdunHqhP3c37wkluD93yoIL0O9r7Ry6NperrypCm/oOOSvYp0TVLvc9VAd qhuh1HCn8sEFYXLjiuQwdW03MsCtcGaQPjEE+O1l/A3RMRc2e8q0dlCbrO2Uzsye2Vvr DCN5gpnd73CUGpM0V4+X+1yBiqAlSzVDreL0ibb5/V1sTIQca6xFJKKvglH6pxdcNCAN Rh4g== X-Gm-Message-State: AN3rC/6RH5vSOK5RZ267koGOxSg0jvBTAsCDxhmmRegi/SM/FYHXyhrx +zvAwNOOSEGK3jqYiRw= X-Received: by 10.98.5.132 with SMTP id 126mr32566932pff.229.1494269182549; Mon, 08 May 2017 11:46:22 -0700 (PDT) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id y190sm7140642pgd.25.2017.05.08.11.46.21 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 08 May 2017 11:46:21 -0700 (PDT) Subject: Re: svn commit: r317744 - in head/usr.sbin/makefs: . ffs Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_65F4EF10-5AC1-4235-8142-3D979B8A4690"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: Date: Mon, 8 May 2017 11:46:20 -0700 Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <980BBC93-4004-4036-BEF4-3C58DB23BED6@gmail.com> References: <201705031421.v43ELIP9093367@repo.freebsd.org> To: Ed Maste X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 18:46:24 -0000 --Apple-Mail=_65F4EF10-5AC1-4235-8142-3D979B8A4690 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On May 8, 2017, at 11:24, Ngie Cooper (yaneurabeya) = wrote: >=20 >>=20 >> On May 3, 2017, at 07:21, Ed Maste wrote: >>=20 >> Author: emaste >> Date: Wed May 3 14:21:18 2017 >> New Revision: 317744 >> URL: https://svnweb.freebsd.org/changeset/base/317744 >>=20 >> Log: >> makefs: make buf generic >>=20 >> it has nothing to do with ffs and will eventually be moved. >> gc sectorsize. >>=20 >> NetBSD versions: >> ffs.c 1.58 >> ffs/buf.c 1.14 1.18 >> ffs/buf.h 1.8 >>=20 >> Obtained from: NetBSD >> Sponsored by: The FreeBSD Foundation >=20 > This commit broke building releases and a number of tests: = https://ci.freebsd.org/job/FreeBSD-head-amd64-test/3003/ . > Thanks, > -Ngie I reverted the `sectorsize` portion of this change in r317967 to = unbreak the makefs and the fstyp tests. It seems that ffs_validate(..) = isn=E2=80=99t called in all cases properly, or the structure isn=E2=80=99t= being initialized properly. Thanks, -Ngie --Apple-Mail=_65F4EF10-5AC1-4235-8142-3D979B8A4690 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJZELz8AAoJEPWDqSZpMIYVaJcP/0ld1ywAg6eep0NNGE7V4NLV kryVUzEJ9H0FHrAu88FL0P2kXeSohnNdUzQbDSv1djUr6MJA5QF6fYgaXyqh9s9z u09BEWdg6AyuKrCtM61EowrDu45m9p/sbNnnydt6ZQ18gCc5r8win3mI/boik6Cb Xyj12EHO8oNS1fIwLZOZlobbfAygivQ8HqDkT8FTrqxFdtHuyq3I+1bOdI/FnIG4 oBMHdwfrzb5PhHYQC8MYGza6ILoEF5+h0JUKdoYUcyraqsbBtiwoMkuQSJARofOp nK9SyMHj5nubc+lnofJLeNYDRKW5OAgoRa1iPbET7S14dNEBK/vEP9MhxYbqeBPd s/Lgt/4tW5dsE4OfOCYCHXCQdC5oYGz5VFg9d+rBUeJdk2kh8VdOjsDQN27zIwp9 2osVwZkRgTOytvCDqFHc1rHxKHE/+5yzxf1pu6Es++0lejNLZ5TeFz5gXGDe7Ilj /lneJFqxOGekoCN/GY3WaKys8E1SREA4qqJR8CP+bx7QSqoPxQFaN5x6e1WI/Y0R 1gXEtaSLA4UjrNHyCARPpzOU/GNGdt6qlUnmLVWIqN9w2NJPkb84BKWNWOOAw9vs CmtApFNKTmhKAXLZ4bk/9LwSju2t49FyuZnUOYcsxO/edMuNnagl40HMN1lzQGsm loaJVFbH726Pvo9U6Htr =RI4W -----END PGP SIGNATURE----- --Apple-Mail=_65F4EF10-5AC1-4235-8142-3D979B8A4690-- From owner-svn-src-all@freebsd.org Mon May 8 18:51:15 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 63BE1D6346E; Mon, 8 May 2017 18:51: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 EFE84DC0; Mon, 8 May 2017 18:51: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 v48IpDP0083698; Mon, 8 May 2017 18:51:13 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v48IpDVg083697; Mon, 8 May 2017 18:51:13 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201705081851.v48IpDVg083697@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 8 May 2017 18:51:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317968 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 18:51:15 -0000 Author: jhb Date: Mon May 8 18:51:13 2017 New Revision: 317968 URL: https://svnweb.freebsd.org/changeset/base/317968 Log: Honor WITHOUT_LIB32 on mips64. The closing paren for the list of architectures that should enable LIB32 by default was in the wrong place resulting in LIB32 always be enabled on mips64 regardless of WITH_LIB32/WITHOUT_LIB32. Submitted by: Alex Richardson Obtained from: CheriBSD Sponsored by: DARPA / AFRL Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Mon May 8 18:42:38 2017 (r317967) +++ head/Makefile.inc1 Mon May 8 18:51:13 2017 (r317968) @@ -628,7 +628,7 @@ XCFLAGS+= ${BFLAGS} .endif .if ${MK_LIB32} != "no" && (${TARGET_ARCH} == "amd64" || \ - ${TARGET_ARCH} == "powerpc64") || ${TARGET_ARCH:Mmips64*} != "" + ${TARGET_ARCH} == "powerpc64" || ${TARGET_ARCH:Mmips64*} != "") LIBCOMPAT= 32 .include "Makefile.libcompat" .elif ${MK_LIBSOFT} != "no" && ${TARGET_ARCH} == "armv6" From owner-svn-src-all@freebsd.org Mon May 8 19:23:00 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-all@freebsd.org Mon May 8 19:50:36 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-all@freebsd.org Mon May 8 19:57:17 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-all@freebsd.org Mon May 8 19:57:45 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-all@freebsd.org Mon May 8 20:09:25 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-all@freebsd.org Mon May 8 20:21:12 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-all@freebsd.org Mon May 8 20:30:32 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-all@freebsd.org Mon May 8 20:37:21 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 35AC2D63126; Mon, 8 May 2017 20:37:21 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 00CB618A2; Mon, 8 May 2017 20:37:20 +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 6F2DD10A7B9; Mon, 8 May 2017 16:37:19 -0400 (EDT) From: John Baldwin To: Konstantin Belousov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r317809 - head/share/man/man7 Date: Mon, 08 May 2017 13:37:15 -0700 Message-ID: <3467458.2hyvxKbuPT@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-STABLE; KDE/4.14.10; amd64; ; ) In-Reply-To: <201705042131.v44LVokb076951@repo.freebsd.org> References: <201705042131.v44LVokb076951@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Mon, 08 May 2017 16:37:19 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 20:37:21 -0000 On Thursday, May 04, 2017 09:31:50 PM Konstantin Belousov wrote: > Author: kib > Date: Thu May 4 21:31:50 2017 > New Revision: 317809 > URL: https://svnweb.freebsd.org/changeset/base/317809 > > Log: > Provide introduction for the arch(7) manpage. > > Start with some words about linear address space and its layout, then > explain pointers models and ABIs, providing explanation to the > structure of the tables. > > Reviewed by: emaste, imp > 'Future-proof' cheri wording by: brooks > Sponsored by: The FreeBSD Foundation > MFC after: 2 weeks > Differential revision: https://reviews.freebsd.org/D10596 Note that mips n32 is neither ILP32 or LP64, it P32L64. (Similar to x32 for x86 if we were to ever add that.) Thus, we support 3 ABIs rather than just 2. -- John Baldwin From owner-svn-src-all@freebsd.org Mon May 8 20:37:25 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CD457D6314F; Mon, 8 May 2017 20:37:25 +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 5763A18D6; Mon, 8 May 2017 20:37:24 +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 4585010A82D; Mon, 8 May 2017 16:37:22 -0400 (EDT) From: John Baldwin To: Ed Maste Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r317938 - head/share/man/man7 Date: Mon, 08 May 2017 13:23:17 -0700 Message-ID: <13002182.nX2mUsr8JK@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-STABLE; KDE/4.14.10; amd64; ; ) In-Reply-To: <201705081417.v48EHAnq068860@repo.freebsd.org> References: <201705081417.v48EHAnq068860@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Mon, 08 May 2017 16:37:22 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 20:37:26 -0000 On Monday, May 08, 2017 02:17:10 PM Ed Maste wrote: > Author: emaste > Date: Mon May 8 14:17:10 2017 > New Revision: 317938 > URL: https://svnweb.freebsd.org/changeset/base/317938 > > Log: > arch(7): correct initial versions for alpha and pc98 > > Submitted by: imp > > Modified: > head/share/man/man7/arch.7 > > Modified: head/share/man/man7/arch.7 > ============================================================================== > --- head/share/man/man7/arch.7 Mon May 8 13:09:27 2017 (r317937) > +++ head/share/man/man7/arch.7 Mon May 8 14:17:10 2017 (r317938) > @@ -90,7 +90,7 @@ architectures, the final release. > .Pp > .Bl -column -offset indent "Sy Architecture" "Sy Initial Release" "Sy Final Release" > .It Sy Architecture Ta Sy Initial Release Ta Sy Final Release > -.It alpha Ta 1.0 Ta 6.4 > +.It alpha Ta 3.x Ta 6.4 3.2 for alpha? Alpha is mentioned explicitly in the release notes for 3.2, 3.3, and 3.4, and the commit to add "multi-architecture" support to src/release/Makefile was MFC'd stable/3 in between 3.1 and 3.2. -- John Baldwin From owner-svn-src-all@freebsd.org Mon May 8 20:44:14 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 893D8D63411; Mon, 8 May 2017 20:44:14 +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 1CE8A1A66; Mon, 8 May 2017 20:44:14 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v48KiDiv044995; Mon, 8 May 2017 20:44:13 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v48KiDZN044994; Mon, 8 May 2017 20:44:13 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201705082044.v48KiDZN044994@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Mon, 8 May 2017 20:44:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317979 - head/targets/pseudo/userland X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 20:44:14 -0000 Author: bdrewery Date: Mon May 8 20:44:12 2017 New Revision: 317979 URL: https://svnweb.freebsd.org/changeset/base/317979 Log: Remove MK_MANDOCDB option missed in r315057 Modified: head/targets/pseudo/userland/Makefile.depend Modified: head/targets/pseudo/userland/Makefile.depend ============================================================================== --- head/targets/pseudo/userland/Makefile.depend Mon May 8 20:30:30 2017 (r317978) +++ head/targets/pseudo/userland/Makefile.depend Mon May 8 20:44:12 2017 (r317979) @@ -2,14 +2,9 @@ # This file is not autogenerated - take care! -.if !defined(MK_MANDOCDB) .include -.endif DIRDEPS= -.if ${MK_MANDOCDB} == "no" -DIRDEPS+= usr.bin/makewhatis -.endif DIRDEPS+= \ bin/cat \ bin/chflags \ From owner-svn-src-all@freebsd.org Mon May 8 20:44:22 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7ACE3D63443; Mon, 8 May 2017 20:44:22 +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 348191AF3; Mon, 8 May 2017 20:44:22 +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 v48KiL42045043; Mon, 8 May 2017 20:44:21 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v48KiLw3045042; Mon, 8 May 2017 20:44:21 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201705082044.v48KiLw3045042@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Mon, 8 May 2017 20:44:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317980 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 20:44:22 -0000 Author: bdrewery Date: Mon May 8 20:44:21 2017 New Revision: 317980 URL: https://svnweb.freebsd.org/changeset/base/317980 Log: Fix syntax error in parse_path after r316952. Also fix bad whitespace in sort_unique after r314809. The parse_path syntax error came up in DIRDEPS_BUILD as the following and emptied out all Makefile.depend files due to it: # python share/mk/meta2deps.py File "share/mk/meta2deps.py", line 538 rdir = os.path.realpath(dir) ^ IndentationError: unexpected indent Sponsored by: Dell EMC Isilon Modified: head/share/mk/meta2deps.py Modified: head/share/mk/meta2deps.py ============================================================================== --- head/share/mk/meta2deps.py Mon May 8 20:44:12 2017 (r317979) +++ head/share/mk/meta2deps.py Mon May 8 20:44:21 2017 (r317980) @@ -143,7 +143,7 @@ def sort_unique(list, cmp=None, key=None for e in list: if e == le: continue - le = e + le = e nl.append(e) return nl @@ -535,7 +535,7 @@ class MetaFile: # to the src dir, we may need to add dependencies for each rdir = dir dir = abspath(dir, cwd, self.last_dir, self.debug, self.debug_out) - rdir = os.path.realpath(dir) + rdir = os.path.realpath(dir) if rdir == dir: rdir = None # now put path back together From owner-svn-src-all@freebsd.org Mon May 8 20:52:16 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C3F29D636DB; Mon, 8 May 2017 20:52:16 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2C5CB1B7C; Mon, 8 May 2017 20:52:15 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id v48KqAqn097578 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 8 May 2017 23:52:10 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v48KqAqn097578 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v48KqAAN097577; Mon, 8 May 2017 23:52:10 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 8 May 2017 23:52:10 +0300 From: Konstantin Belousov To: John Baldwin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r317809 - head/share/man/man7 Message-ID: <20170508205210.GF1622@kib.kiev.ua> References: <201705042131.v44LVokb076951@repo.freebsd.org> <3467458.2hyvxKbuPT@ralph.baldwin.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3467458.2hyvxKbuPT@ralph.baldwin.cx> User-Agent: Mutt/1.8.2 (2017-04-18) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 20:52:16 -0000 On Mon, May 08, 2017 at 01:37:15PM -0700, John Baldwin wrote: > On Thursday, May 04, 2017 09:31:50 PM Konstantin Belousov wrote: > > Author: kib > > Date: Thu May 4 21:31:50 2017 > > New Revision: 317809 > > URL: https://svnweb.freebsd.org/changeset/base/317809 > > > > Log: > > Provide introduction for the arch(7) manpage. > > > > Start with some words about linear address space and its layout, then > > explain pointers models and ABIs, providing explanation to the > > structure of the tables. > > > > Reviewed by: emaste, imp > > 'Future-proof' cheri wording by: brooks > > Sponsored by: The FreeBSD Foundation > > MFC after: 2 weeks > > Differential revision: https://reviews.freebsd.org/D10596 > > Note that mips n32 is neither ILP32 or LP64, it P32L64. (Similar to x32 > for x86 if we were to ever add that.) Thus, we support 3 ABIs rather > than just 2. I trust your information about MIPS n32, but x32 uses ILP32 model. In particular, sizeof(long) == 4, according to the AMD64 ABI Draft 0.99.8, which includes both LP64 and ILP32 (x32) ABI description. From owner-svn-src-all@freebsd.org Mon May 8 20:58:34 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 05BAED63987; Mon, 8 May 2017 20:58: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 A635D18DB; Mon, 8 May 2017 20:58:33 +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 v48KwWOu049270; Mon, 8 May 2017 20:58:32 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v48KwWWq049269; Mon, 8 May 2017 20:58:32 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201705082058.v48KwWWq049269@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Mon, 8 May 2017 20:58:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317981 - head/sys/modules/mmcsd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 20:58:34 -0000 Author: marius Date: Mon May 8 20:58:32 2017 New Revision: 317981 URL: https://svnweb.freebsd.org/changeset/base/317981 Log: Revise r315430; there's no need to build mmc_subr.c into both mmc.ko and mmcsd.ko. Modified: head/sys/modules/mmcsd/Makefile Modified: head/sys/modules/mmcsd/Makefile ============================================================================== --- head/sys/modules/mmcsd/Makefile Mon May 8 20:44:21 2017 (r317980) +++ head/sys/modules/mmcsd/Makefile Mon May 8 20:58:32 2017 (r317981) @@ -3,6 +3,6 @@ .PATH: ${SRCTOP}/sys/dev/mmc KMOD= mmcsd -SRCS= bus_if.h device_if.h mmc_subr.c mmcbr_if.h mmcbus_if.h mmcsd.c +SRCS= bus_if.h device_if.h mmcbr_if.h mmcbus_if.h mmcsd.c .include From owner-svn-src-all@freebsd.org Mon May 8 21:08:41 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4C048D63CD0; Mon, 8 May 2017 21:08:41 +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 BFBCF826; Mon, 8 May 2017 21:08:40 +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 v48L8d0o053455; Mon, 8 May 2017 21:08:39 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v48L8dV7053453; Mon, 8 May 2017 21:08:39 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201705082108.v48L8dV7053453@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Mon, 8 May 2017 21:08:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317982 - in head/sys: kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 21:08:41 -0000 Author: marius Date: Mon May 8 21:08:39 2017 New Revision: 317982 URL: https://svnweb.freebsd.org/changeset/base/317982 Log: - Also outside of the KOBJOPLOOKUP macro - which in turn is used by the code auto-generated for *.m - kobj_lookup_method(9) is useful; for example in back-ends or base class device drivers in order to determine whether a default method has been overridden. Thus, allow for the kobj_method_t pointer argument - used by KOBJOPLOOKUP in order to update the cache entry - of kobj_lookup_method(9), to be NULL. Actually, that pointer is redundant as it's just set to the same kobj_method_t that the kobj_lookup_method(9) function returns in the first place, but probably it serves to reduce the number of instructions generated for KOBJOPLOOKUP. - For the same reason, move updating kobj_lookup_{hits,misses} (if KOBJ_STATS is defined) from kobj_lookup_method(9) to KOBJOPLOOKUP. As a side-effect, this gets rid of the convoluted approach of always incrementing kobj_lookup_hits in KOBJOPLOOKUP and then in case of a cache miss, decrementing it in kobj_lookup_method(9) again. Modified: head/sys/kern/subr_kobj.c head/sys/sys/kobj.h Modified: head/sys/kern/subr_kobj.c ============================================================================== --- head/sys/kern/subr_kobj.c Mon May 8 20:58:32 2017 (r317981) +++ head/sys/kern/subr_kobj.c Mon May 8 21:08:39 2017 (r317982) @@ -213,19 +213,11 @@ kobj_lookup_method(kobj_class_t cls, { kobj_method_t *ce; -#ifdef KOBJ_STATS - /* - * Correct for the 'hit' assumption in KOBJOPLOOKUP and record - * a 'miss'. - */ - kobj_lookup_hits--; - kobj_lookup_misses++; -#endif - ce = kobj_lookup_method_mi(cls, desc); if (!ce) ce = &desc->deflt; - *cep = ce; + if (cep) + *cep = ce; return ce; } Modified: head/sys/sys/kobj.h ============================================================================== --- head/sys/sys/kobj.h Mon May 8 20:58:32 2017 (r317981) +++ head/sys/sys/kobj.h Mon May 8 21:08:39 2017 (r317982) @@ -226,10 +226,12 @@ extern u_int kobj_lookup_misses; kobj_method_t **_cep = \ &OPS->cache[_desc->id & (KOBJ_CACHE_SIZE-1)]; \ kobj_method_t *_ce = *_cep; \ - kobj_lookup_hits++; /* assume hit */ \ - if (_ce->desc != _desc) \ + if (_ce->desc != _desc) { \ _ce = kobj_lookup_method(OPS->cls, \ _cep, _desc); \ + kobj_lookup_misses++; \ + } else \ + kobj_lookup_hits++; \ _m = _ce->func; \ } while(0) #else From owner-svn-src-all@freebsd.org Mon May 8 21:29:31 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-all@freebsd.org Mon May 8 21:40:44 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-all@freebsd.org Mon May 8 21:49:57 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-all@freebsd.org Mon May 8 21:58:31 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-all@freebsd.org Mon May 8 22:18:01 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AF5AFD64D2E; Mon, 8 May 2017 22:18:01 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EBC0C1E2C; Mon, 8 May 2017 22:18:00 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id v48MHpMS016458 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 9 May 2017 01:17:51 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v48MHpMS016458 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v48MHpbL016457; Tue, 9 May 2017 01:17:51 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 9 May 2017 01:17:51 +0300 From: Konstantin Belousov To: John Baldwin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r317809 - head/share/man/man7 Message-ID: <20170508221750.GG1622@kib.kiev.ua> References: <201705042131.v44LVokb076951@repo.freebsd.org> <3467458.2hyvxKbuPT@ralph.baldwin.cx> <20170508205210.GF1622@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170508205210.GF1622@kib.kiev.ua> User-Agent: Mutt/1.8.2 (2017-04-18) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 22:18:02 -0000 On Mon, May 08, 2017 at 11:52:10PM +0300, Konstantin Belousov wrote: > On Mon, May 08, 2017 at 01:37:15PM -0700, John Baldwin wrote: > > On Thursday, May 04, 2017 09:31:50 PM Konstantin Belousov wrote: > > > Author: kib > > > Date: Thu May 4 21:31:50 2017 > > > New Revision: 317809 > > > URL: https://svnweb.freebsd.org/changeset/base/317809 > > > > > > Log: > > > Provide introduction for the arch(7) manpage. > > > > > > Start with some words about linear address space and its layout, then > > > explain pointers models and ABIs, providing explanation to the > > > structure of the tables. > > > > > > Reviewed by: emaste, imp > > > 'Future-proof' cheri wording by: brooks > > > Sponsored by: The FreeBSD Foundation > > > MFC after: 2 weeks > > > Differential revision: https://reviews.freebsd.org/D10596 > > > > Note that mips n32 is neither ILP32 or LP64, it P32L64. (Similar to x32 > > for x86 if we were to ever add that.) Thus, we support 3 ABIs rather > > than just 2. > > I trust your information about MIPS n32, but x32 uses ILP32 model. In fact, from all documents that I can found about n32, it seems that long == pointer == 32bit. This is mentioned in the MIPSpro N32 ABI Handbook and in the MIPS Tech document MD00305 'MIPS ABIs Described'. The only strange thing for n32 is that register_t is 64bit, and vm_paddr_t is similar to PAE. > In particular, sizeof(long) == 4, according to the AMD64 ABI Draft 0.99.8, > which includes both LP64 and ILP32 (x32) ABI description. > From owner-svn-src-all@freebsd.org Mon May 8 22:23:03 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-all@freebsd.org Mon May 8 22:24:08 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-all@freebsd.org Mon May 8 22:35:17 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-all@freebsd.org Mon May 8 22:37:39 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-all@freebsd.org Mon May 8 22:41:15 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-all@freebsd.org Mon May 8 22:44:18 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-all@freebsd.org Mon May 8 22:53:51 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CBEE8D63ADE; Mon, 8 May 2017 22:53:51 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io0-x22f.google.com (mail-io0-x22f.google.com [IPv6:2607:f8b0:4001:c06::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5C3BE6D8; Mon, 8 May 2017 22:53:51 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-io0-x22f.google.com with SMTP id p24so60135331ioi.0; Mon, 08 May 2017 15:53:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=Dgz/grd6pcYcNtpKlj0A9pOwouS9Nw56EdmC8BP/dMQ=; b=RSFN22jHKg1t3mEtk8rctyXXXeo+qYc9UnQrzJo0DFYwycnsfLOESCnuL2C5cy/q/b rs+WYcn94hG05YNkbpqG9yHbw35jpR8Xup9Skp3YnvZ2/1br7J29S1MeuJLFDpJkWwup gK3IYltkF9Pj5/PgJGh430OrZSGwVLe98e3Q4MKKKvpyhljc+p+HS53fVsOEm0DDstKR 0ppepsFMO2KXkjR9z1RqNsaI7TlYtut4V6kdJ4TH9AcTEQtZGNjq5wD2p09+MkjM13XF Xt8qnPdINXGaoC8bdYFE9nbi8SgJ6CvUYX1xvNp6smWHSZgkj7WD8mRLkPv3QwpgMhqv 6B3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=Dgz/grd6pcYcNtpKlj0A9pOwouS9Nw56EdmC8BP/dMQ=; b=i4Or/R78Nfd4vy5ntAa2nC8oQ6MfMp+kfl5SiUojU9I3WaG11/0KHx3fOz7mAaZUFM wCQPV2br2GHtshvVGPEpY3t97q3M0Pyejui27sEeSD8/1ROD6UD7V2BzP4x+0PlXEPY2 SA6038S1M/KdQVrk54Wf2Ki7wmq38y6nohm63lxPoi6OoJrxIeTmaV+mEZxGrYdk3/cz XWsrUVGLEw5Hri66w8OV2lOQkdhEMc95UmB6HloyuoNjEZ9YPqoIKfg5dp6Kh7wIvxoD guNyenKIZ95eOv3GMzZmFD8AyhVagWrntk16r+muYgC5AhgPG96FQLHp0Rg/UO41XSrL KtHw== X-Gm-Message-State: AN3rC/49l5xFA+sHBpOomJj3EbpK1smAsaHXyv42gUdI4aKZlyeavLYV KULWX8o1MfpVrU4hthGOQxwaW+HQXTUa X-Received: by 10.107.170.16 with SMTP id t16mr29817344ioe.113.1494284030185; Mon, 08 May 2017 15:53:50 -0700 (PDT) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.30.136 with HTTP; Mon, 8 May 2017 15:53:29 -0700 (PDT) In-Reply-To: <201705081842.v48IgdHp081940@repo.freebsd.org> References: <201705081842.v48IgdHp081940@repo.freebsd.org> From: Ed Maste Date: Mon, 8 May 2017 18:53:29 -0400 X-Google-Sender-Auth: hH4pao0731QtFd2Y3Y0DYRr5F-k Message-ID: Subject: Re: svn commit: r317967 - in head/usr.sbin/makefs: . ffs To: Ngie Cooper Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 22:53:52 -0000 On 8 May 2017 at 14:42, Ngie Cooper wrote: > Author: ngie > Date: Mon May 8 18:42:38 2017 > New Revision: 317967 > URL: https://svnweb.freebsd.org/changeset/base/317967 > > Log: > Restore `sectorsize` global to unbreak makefs after r317744 > > This also unbreaks the fstyp tests. Sorry about that and thank you for reverting that piece. I suppose it must have been fixed by further WIP in my branch, and I missed it while trying to commit independent changes. From owner-svn-src-all@freebsd.org Mon May 8 23:57:56 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-all@freebsd.org Tue May 9 00:29:30 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue May 9 00:51:12 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue May 9 01:01:43 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3CB17D62CB0; Tue, 9 May 2017 01:01:43 +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 B66C912C7; Tue, 9 May 2017 01:01:42 +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 v4911f4M049464; Tue, 9 May 2017 01:01:41 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4911f5a049462; Tue, 9 May 2017 01:01:41 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201705090101.v4911f5a049462@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Tue, 9 May 2017 01:01:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317996 - head/sys/dev/qlxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 01:01:43 -0000 Author: davidcs Date: Tue May 9 01:01:41 2017 New Revision: 317996 URL: https://svnweb.freebsd.org/changeset/base/317996 Log: Fix bug where MTX_DEF lock was held while taskqueue_drain() was invoked. Check IFF_DRV_RUNNING flag is set prior to calling ql_hw_set_multi() MFC after:3 days Modified: head/sys/dev/qlxgbe/ql_isr.c head/sys/dev/qlxgbe/ql_os.c Modified: head/sys/dev/qlxgbe/ql_isr.c ============================================================================== --- head/sys/dev/qlxgbe/ql_isr.c Tue May 9 00:51:10 2017 (r317995) +++ head/sys/dev/qlxgbe/ql_isr.c Tue May 9 01:01:41 2017 (r317996) @@ -987,7 +987,8 @@ ql_isr(void *arg) fp = &ha->tx_fp[idx]; - if (fp->fp_taskqueue != NULL) + if ((fp->fp_taskqueue != NULL) && + (ifp->if_drv_flags & IFF_DRV_RUNNING)) taskqueue_enqueue(fp->fp_taskqueue, &fp->fp_task); return; Modified: head/sys/dev/qlxgbe/ql_os.c ============================================================================== --- head/sys/dev/qlxgbe/ql_os.c Tue May 9 00:51:10 2017 (r317995) +++ head/sys/dev/qlxgbe/ql_os.c Tue May 9 01:01:41 2017 (r317996) @@ -925,7 +925,9 @@ qla_set_multi(qla_host_t *ha, uint32_t a if_maddr_runlock(ifp); QLA_LOCK(ha); - ret = ql_hw_set_multi(ha, mta, mcnt, add_multi); + if (ifp->if_drv_flags & IFF_DRV_RUNNING) { + ret = ql_hw_set_multi(ha, mta, mcnt, add_multi); + } QLA_UNLOCK(ha); return (ret); @@ -1031,20 +1033,16 @@ qla_ioctl(struct ifnet *ifp, u_long cmd, QL_DPRINT4(ha, (ha->pci_dev, "%s: %s (0x%lx)\n", __func__, "SIOCADDMULTI", cmd)); - if (ifp->if_drv_flags & IFF_DRV_RUNNING) { - if (qla_set_multi(ha, 1)) - ret = EINVAL; - } + if (qla_set_multi(ha, 1)) + ret = EINVAL; break; case SIOCDELMULTI: QL_DPRINT4(ha, (ha->pci_dev, "%s: %s (0x%lx)\n", __func__, "SIOCDELMULTI", cmd)); - if (ifp->if_drv_flags & IFF_DRV_RUNNING) { - if (qla_set_multi(ha, 0)) - ret = EINVAL; - } + if (qla_set_multi(ha, 0)) + ret = EINVAL; break; case SIOCSIFMEDIA: @@ -1529,9 +1527,9 @@ qla_stop(qla_host_t *ha) ha->flags.qla_interface_up = 0; + QLA_UNLOCK(ha); qla_drain_fp_taskqueues(ha); - - ql_hw_stop_rcv(ha); + QLA_LOCK(ha); ql_del_hw_if(ha); @@ -1922,8 +1920,6 @@ qla_error_recovery(void *context, int pe ha->hw.imd_compl = 1; qla_mdelay(__func__, 300); - ql_hw_stop_rcv(ha); - ifp->if_drv_flags &= ~(IFF_DRV_OACTIVE | IFF_DRV_RUNNING); for (i = 0; i < ha->hw.num_sds_rings; i++) { @@ -1943,6 +1939,8 @@ qla_error_recovery(void *context, int pe QLA_UNLOCK(ha); + qla_drain_fp_taskqueues(ha); + if ((ha->pci_func & 0x1) == 0) { if (!ha->msg_from_peer) { From owner-svn-src-all@freebsd.org Tue May 9 01:08:47 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue May 9 01:48:03 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E62B4D64ED3; Tue, 9 May 2017 01:48:03 +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 9953A893; Tue, 9 May 2017 01:48:03 +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 v491m2Xu067185; Tue, 9 May 2017 01:48:02 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v491m2Po067184; Tue, 9 May 2017 01:48:02 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201705090148.v491m2Po067184@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 01:48:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317998 - head/secure/lib/libssh X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 01:48:04 -0000 Author: bdrewery Date: Tue May 9 01:48:02 2017 New Revision: 317998 URL: https://svnweb.freebsd.org/changeset/base/317998 Log: Fix invalid .o SRCS from r314527. MFC after: 1 week Sponsored by: Dell EMC Isilon Modified: head/secure/lib/libssh/Makefile Modified: head/secure/lib/libssh/Makefile ============================================================================== --- head/secure/lib/libssh/Makefile Tue May 9 01:08:45 2017 (r317997) +++ head/secure/lib/libssh/Makefile Tue May 9 01:48:02 2017 (r317998) @@ -13,7 +13,7 @@ SRCS+= authfd.c authfile.c bufaux.c bufb compat.c crc32.c deattack.c fatal.c hostfile.c \ log.c match.c md-sha256.c moduli.c nchan.c packet.c opacket.c \ readpass.c rsa.c ttymodes.c xmalloc.c addrmatch.c \ - atomicio.c key.c dispatch.c mac.c uidswap.c uuencode.c misc.c utf8.o \ + atomicio.c key.c dispatch.c mac.c uidswap.c uuencode.c misc.c utf8.c \ monitor_fdpass.c rijndael.c ssh-dss.c ssh-ecdsa.c ssh-rsa.c dh.c \ msg.c progressmeter.c dns.c entropy.c umac.c umac128.c \ ssh-pkcs11.c smult_curve25519_ref.c \ @@ -23,7 +23,7 @@ SRCS+= authfd.c authfile.c bufaux.c bufb kex.c kexdh.c kexgex.c kexecdh.c kexc25519.c \ kexdhc.c kexgexc.c kexecdhc.c kexc25519c.c \ kexdhs.c kexgexs.c kexecdhs.c kexc25519s.c \ - platform-pledge.c platform-tracing.o + platform-pledge.c platform-tracing.c PACKAGE= ssh # gss-genr.c should be in $SRCS but causes linking problems, so it is From owner-svn-src-all@freebsd.org Tue May 9 01:48:16 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CC289D64EF1; Tue, 9 May 2017 01:48:16 +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 76C0C948; Tue, 9 May 2017 01:48:16 +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 v491mF5i067241; Tue, 9 May 2017 01:48:15 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v491mEdb067232; Tue, 9 May 2017 01:48:14 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201705090148.v491mEdb067232@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 01:48:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317999 - in head: lib/libzstd sbin/decryptcore share/doc/pjdfstest targets/pseudo/clang targets/pseudo/userland targets/pseudo/userland/share usr.bin/getaddrinfo usr.bin/zstd usr.sbin/... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 01:48:17 -0000 Author: bdrewery Date: Tue May 9 01:48:14 2017 New Revision: 317999 URL: https://svnweb.freebsd.org/changeset/base/317999 Log: DIRDEPS_BUILD: Connect new directories. Sponsored by: Dell EMC Isilon Added: head/lib/libzstd/Makefile.depend (contents, props changed) head/sbin/decryptcore/Makefile.depend (contents, props changed) head/share/doc/pjdfstest/Makefile.depend (contents, props changed) head/usr.bin/getaddrinfo/Makefile.depend (contents, props changed) head/usr.bin/zstd/Makefile.depend (contents, props changed) head/usr.sbin/prometheus_sysctl_exporter/Makefile.depend (contents, props changed) Modified: head/targets/pseudo/clang/Makefile.depend head/targets/pseudo/userland/Makefile.depend head/targets/pseudo/userland/share/Makefile.depend Added: head/lib/libzstd/Makefile.depend ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libzstd/Makefile.depend Tue May 9 01:48:14 2017 (r317999) @@ -0,0 +1,19 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + gnu/lib/csu \ + gnu/lib/libgcc \ + include \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + lib/libthr \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif Added: head/sbin/decryptcore/Makefile.depend ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sbin/decryptcore/Makefile.depend Tue May 9 01:48:14 2017 (r317999) @@ -0,0 +1,21 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + gnu/lib/csu \ + gnu/lib/libgcc \ + include \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + lib/libpjdlog \ + lib/libutil \ + secure/lib/libcrypto \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif Added: head/share/doc/pjdfstest/Makefile.depend ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/doc/pjdfstest/Makefile.depend Tue May 9 01:48:14 2017 (r317999) @@ -0,0 +1,11 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif Modified: head/targets/pseudo/clang/Makefile.depend ============================================================================== --- head/targets/pseudo/clang/Makefile.depend Tue May 9 01:48:02 2017 (r317998) +++ head/targets/pseudo/clang/Makefile.depend Tue May 9 01:48:14 2017 (r317999) @@ -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: head/targets/pseudo/userland/Makefile.depend ============================================================================== --- head/targets/pseudo/userland/Makefile.depend Tue May 9 01:48:02 2017 (r317998) +++ head/targets/pseudo/userland/Makefile.depend Tue May 9 01:48:14 2017 (r317999) @@ -54,6 +54,7 @@ DIRDEPS+= \ sbin/clri \ sbin/comcontrol \ sbin/conscontrol \ + sbin/decryptcore \ sbin/ddb \ sbin/devd \ sbin/devfs \ @@ -229,6 +230,7 @@ DIRDEPS+= \ usr.bin/ftp \ usr.bin/gcore \ usr.bin/gencat \ + usr.bin/getaddrinfo \ usr.bin/getconf \ usr.bin/getent \ usr.bin/getopt \ @@ -432,6 +434,7 @@ DIRDEPS+= \ usr.bin/ypcat \ usr.bin/ypmatch \ usr.bin/ypwhich \ + usr.bin/zstd \ usr.sbin/IPXrouted \ usr.sbin/ac \ usr.sbin/accton \ @@ -707,6 +710,7 @@ DIRDEPS+= \ usr.sbin/praliases \ usr.sbin/praudit \ usr.sbin/procctl \ + usr.sbin/prometheus_sysctl_exporter \ usr.sbin/pstat \ usr.sbin/pw \ usr.sbin/pwd_mkdb \ @@ -801,6 +805,11 @@ DIRDEPS+= \ ${DEP_RELDIR}/secure \ ${DEP_RELDIR}/share \ + +.if ${MK_EFI} != "no" +DIRDEPS+= usr.sbin/efidp +.endif + .if ${MK_NAND} != "no" DIRDEPS+= \ sbin/nandfs \ @@ -828,6 +837,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 \ @@ -853,6 +864,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: head/targets/pseudo/userland/share/Makefile.depend ============================================================================== --- head/targets/pseudo/userland/share/Makefile.depend Tue May 9 01:48:02 2017 (r317998) +++ head/targets/pseudo/userland/share/Makefile.depend Tue May 9 01:48:14 2017 (r317999) @@ -13,6 +13,7 @@ DIRDEPS = \ share/doc/legal/intel_iwi \ share/doc/legal/intel_iwn \ share/doc/legal/intel_wpi \ + share/doc/legal/realtek \ share/doc/llvm/clang \ share/doc/papers/beyond4.3 \ share/doc/papers/bufbio \ @@ -29,6 +30,7 @@ DIRDEPS = \ share/doc/papers/relengr \ share/doc/papers/sysperf \ share/doc/papers/timecounter \ + share/doc/pjdfstest \ share/doc/psd/01.cacm \ share/doc/psd/02.implement \ share/doc/psd/03.iosys \ Added: head/usr.bin/getaddrinfo/Makefile.depend ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/getaddrinfo/Makefile.depend Tue May 9 01:48:14 2017 (r317999) @@ -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 Added: head/usr.bin/zstd/Makefile.depend ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/zstd/Makefile.depend Tue May 9 01:48:14 2017 (r317999) @@ -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/libthr \ + lib/libzstd \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif Added: head/usr.sbin/prometheus_sysctl_exporter/Makefile.depend ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/prometheus_sysctl_exporter/Makefile.depend Tue May 9 01:48:14 2017 (r317999) @@ -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/libz \ + lib/msun \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif From owner-svn-src-all@freebsd.org Tue May 9 01:48:28 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D603ED64F42; Tue, 9 May 2017 01:48:28 +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 8588E9ED; Tue, 9 May 2017 01:48:28 +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 v491mRgX067322; Tue, 9 May 2017 01:48:27 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v491mOVc067288; Tue, 9 May 2017 01:48:24 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201705090148.v491mOVc067288@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 01:48:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318000 - in head: bin/dd lib/libbsnmp/libbsnmp lib/libsysdecode libexec/dma/dma-mbox-create rescue/rescue sbin/dumpon sbin/hastctl sbin/hastd sys/boot/i386/loader sys/boot/i386/zfsload... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 01:48:29 -0000 Author: bdrewery Date: Tue May 9 01:48:23 2017 New Revision: 318000 URL: https://svnweb.freebsd.org/changeset/base/318000 Log: DIRDEPS_BUILD: Update dependencies. Sponsored by: Dell EMC Isilon Modified: head/bin/dd/Makefile.depend head/lib/libbsnmp/libbsnmp/Makefile.depend head/lib/libsysdecode/Makefile.depend head/libexec/dma/dma-mbox-create/Makefile.depend head/rescue/rescue/Makefile.depend head/sbin/dumpon/Makefile.depend head/sbin/hastctl/Makefile.depend head/sbin/hastd/Makefile.depend head/sys/boot/i386/loader/Makefile.depend head/sys/boot/i386/zfsloader/Makefile.depend head/usr.bin/fold/Makefile.depend head/usr.bin/grep/Makefile.depend head/usr.bin/hexdump/Makefile.depend head/usr.bin/iconv/Makefile.depend head/usr.bin/ident/Makefile.depend head/usr.bin/ktrdump/Makefile.depend head/usr.bin/lam/Makefile.depend head/usr.bin/last/Makefile.depend head/usr.bin/ministat/Makefile.depend head/usr.bin/pom/Makefile.depend head/usr.sbin/amd/amq/Makefile.depend head/usr.sbin/amd/fixmount/Makefile.depend head/usr.sbin/amd/fsinfo/Makefile.depend head/usr.sbin/amd/hlfsd/Makefile.depend head/usr.sbin/amd/libamu/Makefile.depend head/usr.sbin/amd/mk-amd-map/Makefile.depend head/usr.sbin/amd/pawd/Makefile.depend head/usr.sbin/amd/wire-test/Makefile.depend head/usr.sbin/arp/Makefile.depend head/usr.sbin/bhyve/Makefile.depend head/usr.sbin/bsnmpd/tools/libbsnmptools/Makefile.depend head/usr.sbin/rpc.statd/Makefile.depend head/usr.sbin/traceroute/Makefile.depend Modified: head/bin/dd/Makefile.depend ============================================================================== --- head/bin/dd/Makefile.depend Tue May 9 01:48:14 2017 (r317999) +++ head/bin/dd/Makefile.depend Tue May 9 01:48:23 2017 (r318000) @@ -8,6 +8,7 @@ DIRDEPS = \ include/xlocale \ lib/${CSU_DIR} \ lib/libc \ + lib/libcapsicum \ lib/libcompiler_rt \ Modified: head/lib/libbsnmp/libbsnmp/Makefile.depend ============================================================================== --- head/lib/libbsnmp/libbsnmp/Makefile.depend Tue May 9 01:48:14 2017 (r317999) +++ head/lib/libbsnmp/libbsnmp/Makefile.depend Tue May 9 01:48:23 2017 (r318000) @@ -5,6 +5,7 @@ DIRDEPS = \ gnu/lib/csu \ gnu/lib/libgcc \ include \ + include/arpa \ include/xlocale \ lib/${CSU_DIR} \ lib/libc \ Modified: head/lib/libsysdecode/Makefile.depend ============================================================================== --- head/lib/libsysdecode/Makefile.depend Tue May 9 01:48:14 2017 (r317999) +++ head/lib/libsysdecode/Makefile.depend Tue May 9 01:48:23 2017 (r318000) @@ -3,13 +3,128 @@ DIRDEPS = \ gnu/lib/csu \ + gnu/lib/libdialog \ gnu/lib/libgcc \ + gnu/lib/libgomp \ + gnu/lib/libregex \ + gnu/lib/libssp \ + gnu/lib/libstdc++ \ + gnu/lib/libsupc++ \ include \ + include/arpa \ + include/gssapi \ + include/protocols \ include/rpc \ + include/rpcsvc \ include/xlocale \ + kerberos5/lib/libasn1 \ + kerberos5/lib/libgssapi_krb5 \ + kerberos5/lib/libhdb \ + kerberos5/lib/libheimbase \ + kerberos5/lib/libheimntlm \ + kerberos5/lib/libhx509 \ + kerberos5/lib/libkadm5clnt \ + kerberos5/lib/libkafs5 \ + kerberos5/lib/libkdc \ + kerberos5/lib/libkrb5 \ + kerberos5/lib/libroken \ + kerberos5/lib/libwind \ lib/${CSU_DIR} \ + lib/atf/libatf-c \ + lib/lib80211 \ + lib/libalias/libalias \ + lib/libarchive \ + lib/libbegemot \ + lib/libblacklist \ + lib/libblocksruntime \ + lib/libbluetooth \ + lib/libbsdstat \ + lib/libbsm \ + lib/libbsnmp/libbsnmp \ + lib/libbz2 \ lib/libc \ + lib/libc++ \ + lib/libcalendar \ + lib/libcam \ + lib/libcapsicum \ + lib/libcasper/libcasper \ + lib/libcasper/services/cap_dns \ + lib/libcasper/services/cap_grp \ + lib/libcasper/services/cap_pwd \ + lib/libcasper/services/cap_random \ + lib/libcasper/services/cap_sysctl \ + lib/libcom_err \ lib/libcompiler_rt \ + lib/libcuse \ + lib/libdevctl \ + lib/libdevdctl \ + lib/libdevinfo \ + lib/libdevstat \ + lib/libdpv \ + lib/libdwarf \ + lib/libedit \ + lib/libedit/edit/readline \ + lib/libefivar \ + lib/libelf \ + lib/libelftc \ + lib/libevent \ + lib/libexecinfo \ + lib/libexpat \ + lib/libfetch \ + lib/libfigpar \ + lib/libgeom \ + lib/libgpio \ + lib/libjail \ + lib/libkvm \ + lib/liblzma \ + lib/libmagic \ + lib/libmd \ + lib/libmemstat \ + lib/libmilter \ + lib/libmp \ + lib/libmt \ + lib/libnetgraph \ + lib/libngatm \ + lib/libopie \ + lib/libpam/libpam \ + lib/libpcap \ + lib/libpmc \ + lib/libproc \ + lib/libprocstat \ + lib/libradius \ + lib/librtld_db \ + lib/libsdp \ + lib/libsqlite3 \ + lib/libstand \ + lib/libstdthreads \ + lib/libtacplus \ + lib/libthread_db \ + lib/libucl \ + lib/libufs \ + lib/libugidfw \ + lib/libulog \ + lib/libusb \ + lib/libusbhid \ + lib/libutil \ + lib/libvgl \ + lib/libvmmapi \ + lib/libwrap \ + lib/libxo \ + lib/libypclnt \ + lib/libz \ + lib/libzstd \ + lib/msun \ + lib/ncurses/formw \ + lib/ncurses/menuw \ + lib/ncurses/ncursesw \ + lib/ncurses/panelw \ + secure/lib/libcrypto \ + secure/lib/libssl \ + usr.bin/lex \ + usr.sbin/bsnmpd/modules \ + usr.sbin/bsnmpd/modules/snmp_bridge \ + usr.sbin/bsnmpd/modules/snmp_mibII \ + usr.sbin/bsnmpd/modules/snmp_netgraph \ .include Modified: head/libexec/dma/dma-mbox-create/Makefile.depend ============================================================================== --- head/libexec/dma/dma-mbox-create/Makefile.depend Tue May 9 01:48:14 2017 (r317999) +++ head/libexec/dma/dma-mbox-create/Makefile.depend Tue May 9 01:48:23 2017 (r318000) @@ -9,6 +9,7 @@ DIRDEPS = \ include/xlocale \ lib/${CSU_DIR} \ lib/libc \ + lib/libcapsicum \ lib/libcompiler_rt \ secure/lib/libcrypto \ secure/lib/libssl \ Modified: head/rescue/rescue/Makefile.depend ============================================================================== --- head/rescue/rescue/Makefile.depend Tue May 9 01:48:14 2017 (r317999) +++ head/rescue/rescue/Makefile.depend Tue May 9 01:48:23 2017 (r318000) @@ -39,13 +39,13 @@ DIRDEPS = \ lib/liblzma \ lib/libmd \ lib/libmt \ - lib/libnetgraph \ lib/libsbuf \ lib/libthr \ lib/libufs \ lib/libutil \ lib/libxo \ lib/libz \ + lib/libzstd \ lib/msun \ lib/ncurses/ncursesw \ rescue/librescue \ Modified: head/sbin/dumpon/Makefile.depend ============================================================================== --- head/sbin/dumpon/Makefile.depend Tue May 9 01:48:14 2017 (r317999) +++ head/sbin/dumpon/Makefile.depend Tue May 9 01:48:23 2017 (r318000) @@ -9,6 +9,7 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ + secure/lib/libcrypto \ .include Modified: head/sbin/hastctl/Makefile.depend ============================================================================== --- head/sbin/hastctl/Makefile.depend Tue May 9 01:48:14 2017 (r317999) +++ head/sbin/hastctl/Makefile.depend Tue May 9 01:48:23 2017 (r318000) @@ -10,8 +10,8 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ + lib/libmd \ lib/libutil \ - secure/lib/libcrypto \ usr.bin/yacc.host \ Modified: head/sbin/hastd/Makefile.depend ============================================================================== --- head/sbin/hastd/Makefile.depend Tue May 9 01:48:14 2017 (r317999) +++ head/sbin/hastd/Makefile.depend Tue May 9 01:48:23 2017 (r318000) @@ -12,10 +12,10 @@ DIRDEPS = \ lib/libcompiler_rt \ lib/libexpat \ lib/libgeom \ + lib/libmd \ lib/libsbuf \ lib/libthr \ lib/libutil \ - secure/lib/libcrypto \ usr.bin/yacc.host \ Modified: head/sys/boot/i386/loader/Makefile.depend ============================================================================== --- head/sys/boot/i386/loader/Makefile.depend Tue May 9 01:48:14 2017 (r317999) +++ head/sys/boot/i386/loader/Makefile.depend Tue May 9 01:48:23 2017 (r318000) @@ -4,7 +4,6 @@ DIRDEPS = \ include \ include/xlocale \ - lib/libstand \ sys/boot/ficl32 \ sys/boot/geli \ sys/boot/i386/btx/btx \ Modified: head/sys/boot/i386/zfsloader/Makefile.depend ============================================================================== --- head/sys/boot/i386/zfsloader/Makefile.depend Tue May 9 01:48:14 2017 (r317999) +++ head/sys/boot/i386/zfsloader/Makefile.depend Tue May 9 01:48:23 2017 (r318000) @@ -4,7 +4,6 @@ DIRDEPS = \ include \ include/xlocale \ - lib/libstand \ sys/boot/ficl32 \ sys/boot/geli \ sys/boot/i386/btx/btx \ Modified: head/usr.bin/fold/Makefile.depend ============================================================================== --- head/usr.bin/fold/Makefile.depend Tue May 9 01:48:14 2017 (r317999) +++ head/usr.bin/fold/Makefile.depend Tue May 9 01:48:23 2017 (r318000) @@ -8,7 +8,6 @@ DIRDEPS = \ include/xlocale \ lib/${CSU_DIR} \ lib/libc \ - lib/libcapsicum \ lib/libcompiler_rt \ Modified: head/usr.bin/grep/Makefile.depend ============================================================================== --- head/usr.bin/grep/Makefile.depend Tue May 9 01:48:14 2017 (r317999) +++ head/usr.bin/grep/Makefile.depend Tue May 9 01:48:23 2017 (r318000) @@ -4,7 +4,6 @@ DIRDEPS = \ gnu/lib/csu \ gnu/lib/libgcc \ - gnu/lib/libregex \ include \ include/xlocale \ lib/${CSU_DIR} \ Modified: head/usr.bin/hexdump/Makefile.depend ============================================================================== --- head/usr.bin/hexdump/Makefile.depend Tue May 9 01:48:14 2017 (r317999) +++ head/usr.bin/hexdump/Makefile.depend Tue May 9 01:48:23 2017 (r318000) @@ -8,6 +8,7 @@ DIRDEPS = \ include/xlocale \ lib/${CSU_DIR} \ lib/libc \ + lib/libcapsicum \ lib/libcompiler_rt \ Modified: head/usr.bin/iconv/Makefile.depend ============================================================================== --- head/usr.bin/iconv/Makefile.depend Tue May 9 01:48:14 2017 (r317999) +++ head/usr.bin/iconv/Makefile.depend Tue May 9 01:48:23 2017 (r318000) @@ -8,6 +8,7 @@ DIRDEPS = \ include/xlocale \ lib/${CSU_DIR} \ lib/libc \ + lib/libcapsicum \ lib/libcompiler_rt \ Modified: head/usr.bin/ident/Makefile.depend ============================================================================== --- head/usr.bin/ident/Makefile.depend Tue May 9 01:48:14 2017 (r317999) +++ head/usr.bin/ident/Makefile.depend Tue May 9 01:48:23 2017 (r318000) @@ -8,6 +8,7 @@ DIRDEPS = \ include/xlocale \ lib/${CSU_DIR} \ lib/libc \ + lib/libcapsicum \ lib/libcompiler_rt \ lib/libsbuf \ Modified: head/usr.bin/ktrdump/Makefile.depend ============================================================================== --- head/usr.bin/ktrdump/Makefile.depend Tue May 9 01:48:14 2017 (r317999) +++ head/usr.bin/ktrdump/Makefile.depend Tue May 9 01:48:23 2017 (r318000) @@ -8,6 +8,7 @@ DIRDEPS = \ include/xlocale \ lib/${CSU_DIR} \ lib/libc \ + lib/libcapsicum \ lib/libcompiler_rt \ lib/libelf \ lib/libkvm \ Modified: head/usr.bin/lam/Makefile.depend ============================================================================== --- head/usr.bin/lam/Makefile.depend Tue May 9 01:48:14 2017 (r317999) +++ head/usr.bin/lam/Makefile.depend Tue May 9 01:48:23 2017 (r318000) @@ -8,6 +8,7 @@ DIRDEPS = \ include/xlocale \ lib/${CSU_DIR} \ lib/libc \ + lib/libcapsicum \ lib/libcompiler_rt \ Modified: head/usr.bin/last/Makefile.depend ============================================================================== --- head/usr.bin/last/Makefile.depend Tue May 9 01:48:14 2017 (r317999) +++ head/usr.bin/last/Makefile.depend Tue May 9 01:48:23 2017 (r318000) @@ -8,6 +8,7 @@ DIRDEPS = \ include/xlocale \ lib/${CSU_DIR} \ lib/libc \ + lib/libcapsicum \ lib/libcompiler_rt \ Modified: head/usr.bin/ministat/Makefile.depend ============================================================================== --- head/usr.bin/ministat/Makefile.depend Tue May 9 01:48:14 2017 (r317999) +++ head/usr.bin/ministat/Makefile.depend Tue May 9 01:48:23 2017 (r318000) @@ -8,6 +8,7 @@ DIRDEPS = \ include/xlocale \ lib/${CSU_DIR} \ lib/libc \ + lib/libcapsicum \ lib/libcompiler_rt \ lib/msun \ Modified: head/usr.bin/pom/Makefile.depend ============================================================================== --- head/usr.bin/pom/Makefile.depend Tue May 9 01:48:14 2017 (r317999) +++ head/usr.bin/pom/Makefile.depend Tue May 9 01:48:23 2017 (r318000) @@ -8,6 +8,7 @@ DIRDEPS = \ include/xlocale \ lib/${CSU_DIR} \ lib/libc \ + lib/libcapsicum \ lib/libcompiler_rt \ lib/msun \ Modified: head/usr.sbin/amd/amq/Makefile.depend ============================================================================== --- head/usr.sbin/amd/amq/Makefile.depend Tue May 9 01:48:14 2017 (r317999) +++ head/usr.sbin/amd/amq/Makefile.depend Tue May 9 01:48:23 2017 (r318000) @@ -12,7 +12,6 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ - lib/libwrap \ usr.sbin/amd/include \ usr.sbin/amd/libamu \ Modified: head/usr.sbin/amd/fixmount/Makefile.depend ============================================================================== --- head/usr.sbin/amd/fixmount/Makefile.depend Tue May 9 01:48:14 2017 (r317999) +++ head/usr.sbin/amd/fixmount/Makefile.depend Tue May 9 01:48:23 2017 (r318000) @@ -13,7 +13,6 @@ DIRDEPS = \ lib/libc \ lib/libcompiler_rt \ lib/librpcsvc \ - lib/libwrap \ usr.sbin/amd/include \ usr.sbin/amd/libamu \ Modified: head/usr.sbin/amd/fsinfo/Makefile.depend ============================================================================== --- head/usr.sbin/amd/fsinfo/Makefile.depend Tue May 9 01:48:14 2017 (r317999) +++ head/usr.sbin/amd/fsinfo/Makefile.depend Tue May 9 01:48:23 2017 (r318000) @@ -12,7 +12,6 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ - lib/libwrap \ usr.bin/yacc.host \ usr.sbin/amd/include \ usr.sbin/amd/libamu \ Modified: head/usr.sbin/amd/hlfsd/Makefile.depend ============================================================================== --- head/usr.sbin/amd/hlfsd/Makefile.depend Tue May 9 01:48:14 2017 (r317999) +++ head/usr.sbin/amd/hlfsd/Makefile.depend Tue May 9 01:48:23 2017 (r318000) @@ -12,7 +12,6 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ - lib/libwrap \ usr.sbin/amd/include \ usr.sbin/amd/libamu \ Modified: head/usr.sbin/amd/libamu/Makefile.depend ============================================================================== --- head/usr.sbin/amd/libamu/Makefile.depend Tue May 9 01:48:14 2017 (r317999) +++ head/usr.sbin/amd/libamu/Makefile.depend Tue May 9 01:48:23 2017 (r318000) @@ -7,7 +7,6 @@ DIRDEPS = \ include/rpc \ include/rpcsvc \ include/xlocale \ - lib/libwrap \ usr.sbin/amd/include \ Modified: head/usr.sbin/amd/mk-amd-map/Makefile.depend ============================================================================== --- head/usr.sbin/amd/mk-amd-map/Makefile.depend Tue May 9 01:48:14 2017 (r317999) +++ head/usr.sbin/amd/mk-amd-map/Makefile.depend Tue May 9 01:48:23 2017 (r318000) @@ -12,7 +12,6 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ - lib/libwrap \ usr.sbin/amd/include \ usr.sbin/amd/libamu \ Modified: head/usr.sbin/amd/pawd/Makefile.depend ============================================================================== --- head/usr.sbin/amd/pawd/Makefile.depend Tue May 9 01:48:14 2017 (r317999) +++ head/usr.sbin/amd/pawd/Makefile.depend Tue May 9 01:48:23 2017 (r318000) @@ -12,7 +12,6 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ - lib/libwrap \ usr.sbin/amd/include \ usr.sbin/amd/libamu \ Modified: head/usr.sbin/amd/wire-test/Makefile.depend ============================================================================== --- head/usr.sbin/amd/wire-test/Makefile.depend Tue May 9 01:48:14 2017 (r317999) +++ head/usr.sbin/amd/wire-test/Makefile.depend Tue May 9 01:48:23 2017 (r318000) @@ -12,7 +12,6 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ - lib/libwrap \ usr.sbin/amd/include \ usr.sbin/amd/libamu \ Modified: head/usr.sbin/arp/Makefile.depend ============================================================================== --- head/usr.sbin/arp/Makefile.depend Tue May 9 01:48:14 2017 (r317999) +++ head/usr.sbin/arp/Makefile.depend Tue May 9 01:48:23 2017 (r318000) @@ -10,6 +10,8 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ + lib/libutil \ + lib/libxo \ .include Modified: head/usr.sbin/bhyve/Makefile.depend ============================================================================== --- head/usr.sbin/bhyve/Makefile.depend Tue May 9 01:48:14 2017 (r317999) +++ head/usr.sbin/bhyve/Makefile.depend Tue May 9 01:48:23 2017 (r318000) @@ -9,6 +9,7 @@ DIRDEPS = \ include/xlocale \ lib/${CSU_DIR} \ lib/libc \ + lib/libcapsicum \ lib/libcompiler_rt \ lib/libmd \ lib/libthr \ Modified: head/usr.sbin/bsnmpd/tools/libbsnmptools/Makefile.depend ============================================================================== --- head/usr.sbin/bsnmpd/tools/libbsnmptools/Makefile.depend Tue May 9 01:48:14 2017 (r317999) +++ head/usr.sbin/bsnmpd/tools/libbsnmptools/Makefile.depend Tue May 9 01:48:23 2017 (r318000) @@ -2,15 +2,10 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ - gnu/lib/libgcc \ include \ include/arpa \ include/xlocale \ - lib/${CSU_DIR} \ lib/libbsnmp/libbsnmp \ - lib/libc \ - lib/libcompiler_rt \ .include Modified: head/usr.sbin/rpc.statd/Makefile.depend ============================================================================== --- head/usr.sbin/rpc.statd/Makefile.depend Tue May 9 01:48:14 2017 (r317999) +++ head/usr.sbin/rpc.statd/Makefile.depend Tue May 9 01:48:23 2017 (r318000) @@ -7,7 +7,6 @@ DIRDEPS = \ include \ include/arpa \ include/rpc \ - include/rpcsvc \ include/xlocale \ lib/${CSU_DIR} \ lib/libc \ Modified: head/usr.sbin/traceroute/Makefile.depend ============================================================================== --- head/usr.sbin/traceroute/Makefile.depend Tue May 9 01:48:14 2017 (r317999) +++ head/usr.sbin/traceroute/Makefile.depend Tue May 9 01:48:23 2017 (r318000) @@ -9,8 +9,12 @@ DIRDEPS = \ include/xlocale \ lib/${CSU_DIR} \ lib/libc \ + lib/libcapsicum \ + lib/libcasper/libcasper \ + lib/libcasper/services/cap_dns \ lib/libcompiler_rt \ lib/libipsec \ + lib/libnv \ .include From owner-svn-src-all@freebsd.org Tue May 9 02:38:26 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4D08FD64C54; Tue, 9 May 2017 02:38:26 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1F9BB1ADE; Tue, 9 May 2017 02:38:26 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v492cPwB087509; Tue, 9 May 2017 02:38:25 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v492cNq7087492; Tue, 9 May 2017 02:38:23 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201705090238.v492cNq7087492@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 9 May 2017 02:38:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318001 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 02:38:26 -0000 Author: adrian Date: Tue May 9 02:38:23 2017 New Revision: 318001 URL: https://svnweb.freebsd.org/changeset/base/318001 Log: [iwm] include opt_iwm.h and opt_wlan.h consistently in all files. Modified: head/sys/dev/iwm/if_iwm.c head/sys/dev/iwm/if_iwm_7000.c head/sys/dev/iwm/if_iwm_8000.c head/sys/dev/iwm/if_iwm_binding.c head/sys/dev/iwm/if_iwm_fw.c head/sys/dev/iwm/if_iwm_led.c head/sys/dev/iwm/if_iwm_mac_ctxt.c head/sys/dev/iwm/if_iwm_notif_wait.c head/sys/dev/iwm/if_iwm_pcie_trans.c head/sys/dev/iwm/if_iwm_phy_ctxt.c head/sys/dev/iwm/if_iwm_phy_db.c head/sys/dev/iwm/if_iwm_power.c head/sys/dev/iwm/if_iwm_scan.c head/sys/dev/iwm/if_iwm_time_event.c head/sys/dev/iwm/if_iwm_util.c Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Tue May 9 01:48:23 2017 (r318000) +++ head/sys/dev/iwm/if_iwm.c Tue May 9 02:38:23 2017 (r318001) @@ -106,6 +106,7 @@ __FBSDID("$FreeBSD$"); #include "opt_wlan.h" +#include "opt_iwm.h" #include #include Modified: head/sys/dev/iwm/if_iwm_7000.c ============================================================================== --- head/sys/dev/iwm/if_iwm_7000.c Tue May 9 01:48:23 2017 (r318000) +++ head/sys/dev/iwm/if_iwm_7000.c Tue May 9 02:38:23 2017 (r318001) @@ -72,6 +72,9 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_wlan.h" +#include "opt_iwm.h" + #include #include "if_iwm_config.h" Modified: head/sys/dev/iwm/if_iwm_8000.c ============================================================================== --- head/sys/dev/iwm/if_iwm_8000.c Tue May 9 01:48:23 2017 (r318000) +++ head/sys/dev/iwm/if_iwm_8000.c Tue May 9 02:38:23 2017 (r318001) @@ -71,6 +71,9 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_wlan.h" +#include "opt_iwm.h" + #include #include "if_iwm_config.h" Modified: head/sys/dev/iwm/if_iwm_binding.c ============================================================================== --- head/sys/dev/iwm/if_iwm_binding.c Tue May 9 01:48:23 2017 (r318000) +++ head/sys/dev/iwm/if_iwm_binding.c Tue May 9 02:38:23 2017 (r318001) @@ -106,6 +106,7 @@ __FBSDID("$FreeBSD$"); #include "opt_wlan.h" +#include "opt_iwm.h" #include #include Modified: head/sys/dev/iwm/if_iwm_fw.c ============================================================================== --- head/sys/dev/iwm/if_iwm_fw.c Tue May 9 01:48:23 2017 (r318000) +++ head/sys/dev/iwm/if_iwm_fw.c Tue May 9 02:38:23 2017 (r318001) @@ -74,6 +74,7 @@ __FBSDID("$FreeBSD$"); #include "opt_wlan.h" +#include "opt_iwm.h" #include #include Modified: head/sys/dev/iwm/if_iwm_led.c ============================================================================== --- head/sys/dev/iwm/if_iwm_led.c Tue May 9 01:48:23 2017 (r318000) +++ head/sys/dev/iwm/if_iwm_led.c Tue May 9 02:38:23 2017 (r318001) @@ -89,6 +89,9 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_wlan.h" +#include "opt_iwm.h" + #include #include #include Modified: head/sys/dev/iwm/if_iwm_mac_ctxt.c ============================================================================== --- head/sys/dev/iwm/if_iwm_mac_ctxt.c Tue May 9 01:48:23 2017 (r318000) +++ head/sys/dev/iwm/if_iwm_mac_ctxt.c Tue May 9 02:38:23 2017 (r318001) @@ -106,6 +106,7 @@ __FBSDID("$FreeBSD$"); #include "opt_wlan.h" +#include "opt_iwm.h" #include #include Modified: head/sys/dev/iwm/if_iwm_notif_wait.c ============================================================================== --- head/sys/dev/iwm/if_iwm_notif_wait.c Tue May 9 01:48:23 2017 (r318000) +++ head/sys/dev/iwm/if_iwm_notif_wait.c Tue May 9 02:38:23 2017 (r318001) @@ -70,6 +70,7 @@ __FBSDID("$FreeBSD$"); #include "opt_wlan.h" +#include "opt_iwm.h" #include #include Modified: head/sys/dev/iwm/if_iwm_pcie_trans.c ============================================================================== --- head/sys/dev/iwm/if_iwm_pcie_trans.c Tue May 9 01:48:23 2017 (r318000) +++ head/sys/dev/iwm/if_iwm_pcie_trans.c Tue May 9 02:38:23 2017 (r318001) @@ -106,6 +106,7 @@ __FBSDID("$FreeBSD$"); #include "opt_wlan.h" +#include "opt_iwm.h" #include #include Modified: head/sys/dev/iwm/if_iwm_phy_ctxt.c ============================================================================== --- head/sys/dev/iwm/if_iwm_phy_ctxt.c Tue May 9 01:48:23 2017 (r318000) +++ head/sys/dev/iwm/if_iwm_phy_ctxt.c Tue May 9 02:38:23 2017 (r318001) @@ -106,6 +106,7 @@ __FBSDID("$FreeBSD$"); #include "opt_wlan.h" +#include "opt_iwm.h" #include #include Modified: head/sys/dev/iwm/if_iwm_phy_db.c ============================================================================== --- head/sys/dev/iwm/if_iwm_phy_db.c Tue May 9 01:48:23 2017 (r318000) +++ head/sys/dev/iwm/if_iwm_phy_db.c Tue May 9 02:38:23 2017 (r318001) @@ -106,6 +106,7 @@ __FBSDID("$FreeBSD$"); #include "opt_wlan.h" +#include "opt_iwm.h" #include #include Modified: head/sys/dev/iwm/if_iwm_power.c ============================================================================== --- head/sys/dev/iwm/if_iwm_power.c Tue May 9 01:48:23 2017 (r318000) +++ head/sys/dev/iwm/if_iwm_power.c Tue May 9 02:38:23 2017 (r318001) @@ -90,6 +90,7 @@ __FBSDID("$FreeBSD$"); #include "opt_wlan.h" +#include "opt_iwm.h" #include #include Modified: head/sys/dev/iwm/if_iwm_scan.c ============================================================================== --- head/sys/dev/iwm/if_iwm_scan.c Tue May 9 01:48:23 2017 (r318000) +++ head/sys/dev/iwm/if_iwm_scan.c Tue May 9 02:38:23 2017 (r318001) @@ -106,6 +106,7 @@ __FBSDID("$FreeBSD$"); #include "opt_wlan.h" +#include "opt_iwm.h" #include #include Modified: head/sys/dev/iwm/if_iwm_time_event.c ============================================================================== --- head/sys/dev/iwm/if_iwm_time_event.c Tue May 9 01:48:23 2017 (r318000) +++ head/sys/dev/iwm/if_iwm_time_event.c Tue May 9 02:38:23 2017 (r318001) @@ -106,6 +106,7 @@ __FBSDID("$FreeBSD$"); #include "opt_wlan.h" +#include "opt_iwm.h" #include #include Modified: head/sys/dev/iwm/if_iwm_util.c ============================================================================== --- head/sys/dev/iwm/if_iwm_util.c Tue May 9 01:48:23 2017 (r318000) +++ head/sys/dev/iwm/if_iwm_util.c Tue May 9 02:38:23 2017 (r318001) @@ -106,6 +106,7 @@ __FBSDID("$FreeBSD$"); #include "opt_wlan.h" +#include "opt_iwm.h" #include #include From owner-svn-src-all@freebsd.org Tue May 9 02:41:35 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5DE32D64E5F; Tue, 9 May 2017 02:41:35 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 10A3419AA; Tue, 9 May 2017 02:41:34 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v492fYnl091369; Tue, 9 May 2017 02:41:34 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v492fXVN091367; Tue, 9 May 2017 02:41:33 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201705090241.v492fXVN091367@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 9 May 2017 02:41:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318002 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 02:41:35 -0000 Author: adrian Date: Tue May 9 02:41:33 2017 New Revision: 318002 URL: https://svnweb.freebsd.org/changeset/base/318002 Log: [iwm] iwm_{read,write}_prph() don't grab the nic lock in iwm themselves. * Fix a couple of cases where the nic lock ended up not being grabbed during an iwm_read_prph() or iwm_write_prph(). Obtained from: dragonflybsd.git 6c5470f2db219c61e362c981fea969d97e1b8293 Modified: head/sys/dev/iwm/if_iwm.c head/sys/dev/iwm/if_iwm_pcie_trans.c Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Tue May 9 02:38:23 2017 (r318001) +++ head/sys/dev/iwm/if_iwm.c Tue May 9 02:41:33 2017 (r318002) @@ -1294,9 +1294,9 @@ iwm_stop_device(struct iwm_softc *sc) /* stop tx and rx. tx and rx bits, as usual, are from if_iwn */ - iwm_write_prph(sc, IWM_SCD_TXFACT, 0); - if (iwm_nic_lock(sc)) { + iwm_write_prph(sc, IWM_SCD_TXFACT, 0); + /* Stop each Tx DMA channel */ for (chnl = 0; chnl < IWM_FH_TCSR_CHNL_NUM; chnl++) { IWM_WRITE(sc, @@ -1324,8 +1324,10 @@ iwm_stop_device(struct iwm_softc *sc) if (sc->cfg->device_family == IWM_DEVICE_FAMILY_7000) { /* Power-down device's busmaster DMA clocks */ - iwm_write_prph(sc, IWM_APMG_CLK_DIS_REG, - IWM_APMG_CLK_VAL_DMA_CLK_RQT); + if (iwm_nic_lock(sc)) { + iwm_write_prph(sc, IWM_APMG_CLK_DIS_REG, + IWM_APMG_CLK_VAL_DMA_CLK_RQT); + } DELAY(5); } @@ -1622,8 +1624,6 @@ iwm_trans_pcie_fw_alive(struct iwm_softc iwm_ict_reset(sc); - iwm_nic_unlock(sc); - sc->scd_base_addr = iwm_read_prph(sc, IWM_SCD_SRAM_BASE_ADDR); if (scd_base_addr != 0 && scd_base_addr != sc->scd_base_addr) { @@ -1632,6 +1632,8 @@ iwm_trans_pcie_fw_alive(struct iwm_softc __func__, sc->scd_base_addr, scd_base_addr); } + iwm_nic_unlock(sc); + /* reset context data, TX status and translation data */ error = iwm_write_mem(sc, sc->scd_base_addr + IWM_SCD_CONTEXT_MEM_LOWER_BOUND, @@ -2591,9 +2593,11 @@ iwm_pcie_load_given_ucode(struct iwm_sof if (image->is_dual_cpus) { /* set CPU2 header address */ - iwm_write_prph(sc, - IWM_LMPM_SECURE_UCODE_LOAD_CPU2_HDR_ADDR, - IWM_LMPM_SECURE_CPU2_HDR_MEM_SPACE); + if (iwm_nic_lock(sc)) { + iwm_write_prph(sc, + IWM_LMPM_SECURE_UCODE_LOAD_CPU2_HDR_ADDR, + IWM_LMPM_SECURE_CPU2_HDR_MEM_SPACE); + } /* load to FW the binary sections of CPU2 */ ret = iwm_pcie_load_cpu_sections(sc, image, 2, @@ -2622,7 +2626,10 @@ iwm_pcie_load_given_ucode_8000(struct iw /* configure the ucode to be ready to get the secured image */ /* release CPU reset */ - iwm_write_prph(sc, IWM_RELEASE_CPU_RESET, IWM_RELEASE_CPU_RESET_BIT); + if (iwm_nic_lock(sc)) { + iwm_write_prph(sc, IWM_RELEASE_CPU_RESET, + IWM_RELEASE_CPU_RESET_BIT); + } /* load to FW the binary Secured sections of CPU1 */ ret = iwm_pcie_load_cpu_sections_8000(sc, image, 1, @@ -2876,10 +2883,14 @@ iwm_mvm_load_ucode_wait_alive(struct iwm IWM_LOCK(sc); if (error) { if (sc->cfg->device_family == IWM_DEVICE_FAMILY_8000) { + uint32_t a = 0x5a5a5a5a, b = 0x5a5a5a5a; + if (iwm_nic_lock(sc)) { + a = iwm_read_prph(sc, IWM_SB_CPU_1_STATUS); + b = iwm_read_prph(sc, IWM_SB_CPU_2_STATUS); + } device_printf(sc->sc_dev, "SecBoot CPU1 Status: 0x%x, CPU2 Status: 0x%x\n", - iwm_read_prph(sc, IWM_SB_CPU_1_STATUS), - iwm_read_prph(sc, IWM_SB_CPU_2_STATUS)); + a, b); } sc->cur_ucode = old_type; return error; Modified: head/sys/dev/iwm/if_iwm_pcie_trans.c ============================================================================== --- head/sys/dev/iwm/if_iwm_pcie_trans.c Tue May 9 02:38:23 2017 (r318001) +++ head/sys/dev/iwm/if_iwm_pcie_trans.c Tue May 9 02:41:33 2017 (r318002) @@ -499,11 +499,15 @@ iwm_apm_init(struct iwm_softc *sc) * just to discard the value. But that's the way the hardware * seems to like it. */ - iwm_read_prph(sc, IWM_OSC_CLK); - iwm_read_prph(sc, IWM_OSC_CLK); + if (iwm_nic_lock(sc)) { + iwm_read_prph(sc, IWM_OSC_CLK); + iwm_read_prph(sc, IWM_OSC_CLK); + } iwm_set_bits_prph(sc, IWM_OSC_CLK, IWM_OSC_CLK_FORCE_CONTROL); - iwm_read_prph(sc, IWM_OSC_CLK); - iwm_read_prph(sc, IWM_OSC_CLK); + if (iwm_nic_lock(sc)) { + iwm_read_prph(sc, IWM_OSC_CLK); + iwm_read_prph(sc, IWM_OSC_CLK); + } } /* @@ -514,8 +518,10 @@ iwm_apm_init(struct iwm_softc *sc) * set by default in "CLK_CTRL_REG" after reset. */ if (sc->cfg->device_family == IWM_DEVICE_FAMILY_7000) { - iwm_write_prph(sc, IWM_APMG_CLK_EN_REG, - IWM_APMG_CLK_VAL_DMA_CLK_RQT); + if (iwm_nic_lock(sc)) { + iwm_write_prph(sc, IWM_APMG_CLK_EN_REG, + IWM_APMG_CLK_VAL_DMA_CLK_RQT); + } DELAY(20); /* Disable L1-Active */ @@ -523,8 +529,10 @@ iwm_apm_init(struct iwm_softc *sc) IWM_APMG_PCIDEV_STT_VAL_L1_ACT_DIS); /* Clear the interrupt in APMG if the NIC is in RFKILL */ - iwm_write_prph(sc, IWM_APMG_RTC_INT_STT_REG, - IWM_APMG_RTC_INT_STT_RFKILL); + if (iwm_nic_lock(sc)) { + iwm_write_prph(sc, IWM_APMG_RTC_INT_STT_REG, + IWM_APMG_RTC_INT_STT_RFKILL); + } } out: if (error) @@ -626,12 +634,12 @@ iwm_pcie_set_cmd_in_flight(struct iwm_so IWM_SETBITS(sc, IWM_CSR_GP_CNTRL, IWM_CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ); - ret = iwm_poll_bit(sc, IWM_CSR_GP_CNTRL, + ret = iwm_poll_bit(sc, IWM_CSR_GP_CNTRL, IWM_CSR_GP_CNTRL_REG_VAL_MAC_ACCESS_EN, (IWM_CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY | IWM_CSR_GP_CNTRL_REG_FLAG_GOING_TO_SLEEP), 15000); - if (ret == 0) { + if (ret == 0) { IWM_CLRBITS(sc, IWM_CSR_GP_CNTRL, IWM_CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ); device_printf(sc->sc_dev, From owner-svn-src-all@freebsd.org Tue May 9 02:42:55 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A29A0D64051; Tue, 9 May 2017 02:42:55 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 479441EB2; Tue, 9 May 2017 02:42:55 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v492gsau091459; Tue, 9 May 2017 02:42:54 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v492gsWF091457; Tue, 9 May 2017 02:42:54 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201705090242.v492gsWF091457@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 9 May 2017 02:42:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318003 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 02:42:55 -0000 Author: adrian Date: Tue May 9 02:42:53 2017 New Revision: 318003 URL: https://svnweb.freebsd.org/changeset/base/318003 Log: [iwm] Add iwm_nic_unlock() calls missing from previous commit. Obtained from: dragonflybsd.git f88ab372284e63c4c13da93e9026a203b9b4cdc5 Modified: head/sys/dev/iwm/if_iwm.c head/sys/dev/iwm/if_iwm_pcie_trans.c Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Tue May 9 02:41:33 2017 (r318002) +++ head/sys/dev/iwm/if_iwm.c Tue May 9 02:42:53 2017 (r318003) @@ -1327,6 +1327,7 @@ iwm_stop_device(struct iwm_softc *sc) if (iwm_nic_lock(sc)) { iwm_write_prph(sc, IWM_APMG_CLK_DIS_REG, IWM_APMG_CLK_VAL_DMA_CLK_RQT); + iwm_nic_unlock(sc); } DELAY(5); } @@ -2597,6 +2598,7 @@ iwm_pcie_load_given_ucode(struct iwm_sof iwm_write_prph(sc, IWM_LMPM_SECURE_UCODE_LOAD_CPU2_HDR_ADDR, IWM_LMPM_SECURE_CPU2_HDR_MEM_SPACE); + iwm_nic_unlock(sc); } /* load to FW the binary sections of CPU2 */ @@ -2629,6 +2631,7 @@ iwm_pcie_load_given_ucode_8000(struct iw if (iwm_nic_lock(sc)) { iwm_write_prph(sc, IWM_RELEASE_CPU_RESET, IWM_RELEASE_CPU_RESET_BIT); + iwm_nic_unlock(sc); } /* load to FW the binary Secured sections of CPU1 */ @@ -2887,6 +2890,7 @@ iwm_mvm_load_ucode_wait_alive(struct iwm if (iwm_nic_lock(sc)) { a = iwm_read_prph(sc, IWM_SB_CPU_1_STATUS); b = iwm_read_prph(sc, IWM_SB_CPU_2_STATUS); + iwm_nic_unlock(sc); } device_printf(sc->sc_dev, "SecBoot CPU1 Status: 0x%x, CPU2 Status: 0x%x\n", Modified: head/sys/dev/iwm/if_iwm_pcie_trans.c ============================================================================== --- head/sys/dev/iwm/if_iwm_pcie_trans.c Tue May 9 02:41:33 2017 (r318002) +++ head/sys/dev/iwm/if_iwm_pcie_trans.c Tue May 9 02:42:53 2017 (r318003) @@ -502,11 +502,13 @@ iwm_apm_init(struct iwm_softc *sc) if (iwm_nic_lock(sc)) { iwm_read_prph(sc, IWM_OSC_CLK); iwm_read_prph(sc, IWM_OSC_CLK); + iwm_nic_unlock(sc); } iwm_set_bits_prph(sc, IWM_OSC_CLK, IWM_OSC_CLK_FORCE_CONTROL); if (iwm_nic_lock(sc)) { iwm_read_prph(sc, IWM_OSC_CLK); iwm_read_prph(sc, IWM_OSC_CLK); + iwm_nic_unlock(sc); } } @@ -521,6 +523,7 @@ iwm_apm_init(struct iwm_softc *sc) if (iwm_nic_lock(sc)) { iwm_write_prph(sc, IWM_APMG_CLK_EN_REG, IWM_APMG_CLK_VAL_DMA_CLK_RQT); + iwm_nic_unlock(sc); } DELAY(20); @@ -532,6 +535,7 @@ iwm_apm_init(struct iwm_softc *sc) if (iwm_nic_lock(sc)) { iwm_write_prph(sc, IWM_APMG_RTC_INT_STT_REG, IWM_APMG_RTC_INT_STT_RFKILL); + iwm_nic_unlock(sc); } } out: From owner-svn-src-all@freebsd.org Tue May 9 04:11:54 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D6164D65B6D; Tue, 9 May 2017 04:11:54 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9E99A17AC; Tue, 9 May 2017 04:11:54 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v494BrgI028735; Tue, 9 May 2017 04:11:53 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v494BrVD028734; Tue, 9 May 2017 04:11:53 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705090411.v494BrVD028734@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 9 May 2017 04:11:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318004 - head/contrib/netbsd-tests/usr.bin/grep X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 04:11:55 -0000 Author: ngie Date: Tue May 9 04:11:53 2017 New Revision: 318004 URL: https://svnweb.freebsd.org/changeset/base/318004 Log: Remove expected failure that no longer fails with gnu grep in base Reported by: Jenkins Submitted by: Kyle Evans Sponsored by: Dell EMC Isilon Modified: head/contrib/netbsd-tests/usr.bin/grep/t_grep.sh Modified: head/contrib/netbsd-tests/usr.bin/grep/t_grep.sh ============================================================================== --- head/contrib/netbsd-tests/usr.bin/grep/t_grep.sh Tue May 9 02:42:53 2017 (r318003) +++ head/contrib/netbsd-tests/usr.bin/grep/t_grep.sh Tue May 9 04:11:53 2017 (r318004) @@ -399,11 +399,6 @@ wflag_emptypat_head() } wflag_emptypat_body() { - grep_type - if [ $? -eq $GREP_TYPE_GNU_FREEBSD ]; then - atf_expect_fail "this test does not pass with GNU grep in base" - fi - printf "" > test1 printf "\n" > test2 printf "qaz" > test3 From owner-svn-src-all@freebsd.org Tue May 9 04:15:09 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6A0E5D65C29; Tue, 9 May 2017 04:15:09 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1D7A6D60; Tue, 9 May 2017 04:15:09 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v494F8LU028890; Tue, 9 May 2017 04:15:08 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v494F7Wi028884; Tue, 9 May 2017 04:15:07 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201705090415.v494F7Wi028884@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 9 May 2017 04:15:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318005 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 04:15:09 -0000 Author: adrian Date: Tue May 9 04:15:07 2017 New Revision: 318005 URL: https://svnweb.freebsd.org/changeset/base/318005 Log: [iwm] Add basic powermanagement support via ifconfig wlan0 powersave. * The DEVICE_POWER_FLAGS_CAM_MSK flag was removed in the upstream iwlwifi in Linux commit ceef91c89480dd18bb3ac51e91280a233d0ca41f. * Add sc_ps_disabled flag to struct iwm_softc, which corresponds to mvm->ps_disabled in struct iwl_mvm in Linux iwlwifi. * Adds a hw.iwm.power_scheme tunable which corresponds to the power_scheme module parameter in Linux iwlwifi. Set this to 1 for completely disabling power management, 2 (default) for balanced powermanagement, and 3 for lowerpower mode (which does dtim period skipping). * Imports the constants.h file from iwlwifi as if_iwm_constants.h. * This doesn't allow changing the powermanagement setting while connected, also one can only choose between enabled and disabled powersaving with ifconfig (so switching between balanced and low-power mode requires rebooting to change the tunable). * After any changes to powermanagement (i.e. "ifconfig wlan0 powersave" to enable powermanagement, or "ifconfig wlan0 -powersave" for disabling powermanagement), one has to disconnect and reconnect to the accespoint for the change to take effect. Obtained from: dragonflybsd.git d7002a7990d077c92585978ea998474af50f91e0 Added: head/sys/dev/iwm/if_iwm_constants.h (contents, props changed) Modified: head/sys/dev/iwm/if_iwm.c head/sys/dev/iwm/if_iwm_power.c head/sys/dev/iwm/if_iwm_power.h head/sys/dev/iwm/if_iwmreg.h head/sys/dev/iwm/if_iwmvar.h Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Tue May 9 04:11:53 2017 (r318004) +++ head/sys/dev/iwm/if_iwm.c Tue May 9 04:15:07 2017 (r318005) @@ -4171,6 +4171,12 @@ iwm_auth(struct ieee80211vap *vap, struc "%s: failed to add MAC\n", __func__); goto out; } + if ((error = iwm_mvm_power_update_mac(sc)) != 0) { + device_printf(sc->sc_dev, + "%s: failed to update power management\n", + __func__); + goto out; + } if ((error = iwm_mvm_phy_ctxt_changed(sc, &sc->sc_phyctxt[0], in->in_ni.ni_chan, 1, 1)) != 0) { device_printf(sc->sc_dev, @@ -4582,8 +4588,8 @@ iwm_newstate(struct ieee80211vap *vap, e } in = IWM_NODE(vap->iv_bss); - iwm_mvm_power_mac_update_mode(sc, in); iwm_mvm_enable_beacon_filter(sc, in); + iwm_mvm_power_update_mac(sc); iwm_mvm_update_quotas(sc, in); iwm_setrates(sc, in); @@ -4871,6 +4877,7 @@ iwm_init_hw(struct iwm_softc *sc) * image just loaded */ iwm_stop_device(sc); + sc->sc_ps_disabled = FALSE; if ((error = iwm_start_hw(sc)) != 0) { device_printf(sc->sc_dev, "could not initialize hardware\n"); return error; @@ -6122,6 +6129,7 @@ iwm_attach(device_t dev) IEEE80211_C_STA | IEEE80211_C_WPA | /* WPA/RSN */ IEEE80211_C_WME | + IEEE80211_C_PMGT | IEEE80211_C_SHSLOT | /* short slot time supported */ IEEE80211_C_SHPREAMBLE /* short preamble supported */ // IEEE80211_C_BGSCAN /* capable of bg scanning */ Added: head/sys/dev/iwm/if_iwm_constants.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/iwm/if_iwm_constants.h Tue May 9 04:15:07 2017 (r318005) @@ -0,0 +1,154 @@ +/*- + * Based on BSD-licensed source modules in the Linux iwlwifi driver, + * which were used as the reference documentation for this implementation. + * + ****************************************************************************** + * + * This file is provided under a dual BSD/GPLv2 license. When using or + * redistributing this file, you may do so under either license. + * + * GPL LICENSE SUMMARY + * + * Copyright(c) 2013 - 2014 Intel Corporation. All rights reserved. + * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH + * Copyright(c) 2015 Intel Deutschland GmbH + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of version 2 of the GNU General Public License as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, + * USA + * + * The full GNU General Public License is included in this distribution + * in the file called COPYING. + * + * Contact Information: + * Intel Linux Wireless + * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 + * + * BSD LICENSE + * + * Copyright(c) 2013 - 2014 Intel Corporation. All rights reserved. + * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH + * Copyright(c) 2015 Intel Deutschland GmbH + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name Intel Corporation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + *****************************************************************************/ + +/* $FreeBSD$ */ + +#ifndef __IF_IWM_CONSTANTS_H +#define __IF_IWM_CONSTANTS_H + +/* */ + +#define IWM_MVM_DEFAULT_PS_TX_DATA_TIMEOUT (100 * 1000) +#define IWM_MVM_DEFAULT_PS_RX_DATA_TIMEOUT (100 * 1000) +#define IWM_MVM_WOWLAN_PS_TX_DATA_TIMEOUT (10 * 1000) +#define IWM_MVM_WOWLAN_PS_RX_DATA_TIMEOUT (10 * 1000) +#define IWM_MVM_SHORT_PS_TX_DATA_TIMEOUT (2 * 1024) /* defined in TU */ +#define IWM_MVM_SHORT_PS_RX_DATA_TIMEOUT (40 * 1024) /* defined in TU */ +#define IWM_MVM_P2P_LOWLATENCY_PS_ENABLE 0 +#define IWM_MVM_UAPSD_RX_DATA_TIMEOUT (50 * 1000) +#define IWM_MVM_UAPSD_TX_DATA_TIMEOUT (50 * 1000) +#ifdef notyet +/* XXX Find corresponding values from net80211 */ +#define IWM_MVM_UAPSD_QUEUES (IEEE80211_WMM_IE_STA_QOSINFO_AC_VO |\ + IEEE80211_WMM_IE_STA_QOSINFO_AC_VI |\ + IEEE80211_WMM_IE_STA_QOSINFO_AC_BK |\ + IEEE80211_WMM_IE_STA_QOSINFO_AC_BE) +#endif +#define IWM_MVM_PS_HEAVY_TX_THLD_PACKETS 20 +#define IWM_MVM_PS_HEAVY_RX_THLD_PACKETS 8 +#define IWM_MVM_PS_SNOOZE_HEAVY_TX_THLD_PACKETS 30 +#define IWM_MVM_PS_SNOOZE_HEAVY_RX_THLD_PACKETS 20 +#define IWM_MVM_PS_HEAVY_TX_THLD_PERCENT 50 +#define IWM_MVM_PS_HEAVY_RX_THLD_PERCENT 50 +#define IWM_MVM_PS_SNOOZE_INTERVAL 25 +#define IWM_MVM_PS_SNOOZE_WINDOW 50 +#define IWM_MVM_WOWLAN_PS_SNOOZE_WINDOW 25 +#define IWM_MVM_LOWLAT_QUOTA_MIN_PERCENT 64 +#define IWM_MVM_BT_COEX_EN_RED_TXP_THRESH 62 +#define IWM_MVM_BT_COEX_DIS_RED_TXP_THRESH 65 +#define IWM_MVM_BT_COEX_SYNC2SCO 1 +#define IWM_MVM_BT_COEX_CORUNNING 0 +#define IWM_MVM_BT_COEX_MPLUT 1 +#define IWM_MVM_BT_COEX_RRC 1 +#define IWM_MVM_BT_COEX_TTC 1 +#define IWM_MVM_BT_COEX_MPLUT_REG0 0x22002200 +#define IWM_MVM_BT_COEX_MPLUT_REG1 0x11118451 +#define IWM_MVM_BT_COEX_ANTENNA_COUPLING_THRS 30 +#define IWM_MVM_FW_MCAST_FILTER_PASS_ALL 0 +#define IWM_MVM_FW_BCAST_FILTER_PASS_ALL 0 +#define IWM_MVM_QUOTA_THRESHOLD 4 +#define IWM_MVM_RS_RSSI_BASED_INIT_RATE 0 +#define IWM_MVM_RS_80_20_FAR_RANGE_TWEAK 1 +#define IWM_MVM_TOF_IS_RESPONDER 0 +#define IWM_MVM_SW_TX_CSUM_OFFLOAD 0 +#define IWM_MVM_HW_CSUM_DISABLE 0 +#define IWM_MVM_COLLECT_FW_ERR_DUMP 1 +#define IWM_MVM_RS_NUM_TRY_BEFORE_ANT_TOGGLE 1 +#define IWM_MVM_RS_HT_VHT_RETRIES_PER_RATE 2 +#define IWM_MVM_RS_HT_VHT_RETRIES_PER_RATE_TW 1 +#define IWM_MVM_RS_INITIAL_MIMO_NUM_RATES 3 +#define IWM_MVM_RS_INITIAL_SISO_NUM_RATES 3 +#define IWM_MVM_RS_INITIAL_LEGACY_NUM_RATES 2 +#define IWM_MVM_RS_INITIAL_LEGACY_RETRIES 2 +#define IWM_MVM_RS_SECONDARY_LEGACY_RETRIES 1 +#define IWM_MVM_RS_SECONDARY_LEGACY_NUM_RATES 16 +#define IWM_MVM_RS_SECONDARY_SISO_NUM_RATES 3 +#define IWM_MVM_RS_SECONDARY_SISO_RETRIES 1 +#define IWM_MVM_RS_RATE_MIN_FAILURE_TH 3 +#define IWM_MVM_RS_RATE_MIN_SUCCESS_TH 8 +#define IWM_MVM_RS_STAY_IN_COLUMN_TIMEOUT 5 /* Seconds */ +#define IWM_MVM_RS_IDLE_TIMEOUT 5 /* Seconds */ +#define IWM_MVM_RS_MISSED_RATE_MAX 15 +#define IWM_MVM_RS_LEGACY_FAILURE_LIMIT 160 +#define IWM_MVM_RS_LEGACY_SUCCESS_LIMIT 480 +#define IWM_MVM_RS_LEGACY_TABLE_COUNT 160 +#define IWM_MVM_RS_NON_LEGACY_FAILURE_LIMIT 400 +#define IWM_MVM_RS_NON_LEGACY_SUCCESS_LIMIT 4500 +#define IWM_MVM_RS_NON_LEGACY_TABLE_COUNT 1500 +#define IWM_MVM_RS_SR_FORCE_DECREASE 15 /* percent */ +#define IWM_MVM_RS_SR_NO_DECREASE 85 /* percent */ +#define IWM_MVM_RS_AGG_TIME_LIMIT 4000 /* 4 msecs. valid 100-8000 */ +#define IWM_MVM_RS_AGG_DISABLE_START 3 +#define IWM_MVM_RS_TPC_SR_FORCE_INCREASE 75 /* percent */ +#define IWM_MVM_RS_TPC_SR_NO_INCREASE 85 /* percent */ +#define IWM_MVM_RS_TPC_TX_POWER_STEP 3 + +#endif /* __IF_IWM_CONSTANTS_H */ Modified: head/sys/dev/iwm/if_iwm_power.c ============================================================================== --- head/sys/dev/iwm/if_iwm_power.c Tue May 9 04:11:53 2017 (r318004) +++ head/sys/dev/iwm/if_iwm_power.c Tue May 9 04:15:07 2017 (r318005) @@ -138,9 +138,14 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include +static int iwm_power_scheme = IWM_POWER_SCHEME_BPS; + +TUNABLE_INT("hw.iwm.power_scheme", &iwm_power_scheme); + /* * BEGIN mvm/power.c */ @@ -154,7 +159,7 @@ iwm_mvm_beacon_filter_send_cmd(struct iw int ret; ret = iwm_mvm_send_cmd_pdu(sc, IWM_REPLY_BEACON_FILTERING_CMD, - IWM_CMD_SYNC, sizeof(struct iwm_beacon_filter_cmd), cmd); + 0, sizeof(struct iwm_beacon_filter_cmd), cmd); if (!ret) { IWM_DPRINTF(sc, IWM_DEBUG_PWRSAVE | IWM_DEBUG_CMD, @@ -201,24 +206,6 @@ iwm_mvm_beacon_filter_set_cqm_params(str cmd->ba_enable_beacon_abort = htole32(sc->sc_bf.ba_enabled); } -static int -iwm_mvm_update_beacon_abort(struct iwm_softc *sc, struct iwm_node *in, - int enable) -{ - struct iwm_beacon_filter_cmd cmd = { - IWM_BF_CMD_CONFIG_DEFAULTS, - .bf_enable_beacon_filter = htole32(1), - .ba_enable_beacon_abort = htole32(enable), - }; - - if (!sc->sc_bf.bf_enabled) - return 0; - - sc->sc_bf.ba_enabled = enable; - iwm_mvm_beacon_filter_set_cqm_params(sc, in, &cmd); - return iwm_mvm_beacon_filter_send_cmd(sc, &cmd); -} - static void iwm_mvm_power_log(struct iwm_softc *sc, struct iwm_mac_power_cmd *cmd) { @@ -234,6 +221,60 @@ iwm_mvm_power_log(struct iwm_softc *sc, "Disable power management\n"); return; } + + IWM_DPRINTF(sc, IWM_DEBUG_PWRSAVE | IWM_DEBUG_CMD, + "Rx timeout = %u usec\n", le32toh(cmd->rx_data_timeout)); + IWM_DPRINTF(sc, IWM_DEBUG_PWRSAVE | IWM_DEBUG_CMD, + "Tx timeout = %u usec\n", le32toh(cmd->tx_data_timeout)); + if (cmd->flags & htole16(IWM_POWER_FLAGS_SKIP_OVER_DTIM_MSK)) + IWM_DPRINTF(sc, IWM_DEBUG_PWRSAVE | IWM_DEBUG_CMD, + "DTIM periods to skip = %u\n", cmd->skip_dtim_periods); +} + +static boolean_t +iwm_mvm_power_is_radar(struct iwm_softc *sc) +{ + struct ieee80211com *ic = &sc->sc_ic; + struct ieee80211_channel *chan; + boolean_t radar_detect = FALSE; + + chan = ic->ic_bsschan; + if (chan == IEEE80211_CHAN_ANYC || + (chan->ic_flags & IEEE80211_CHAN_DFS) != 0) { + radar_detect = TRUE; + } + + return radar_detect; +} + +static void +iwm_mvm_power_config_skip_dtim(struct iwm_softc *sc, + struct iwm_mac_power_cmd *cmd) +{ + struct ieee80211com *ic = &sc->sc_ic; + struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps); + int dtimper = vap->iv_dtim_period ?: 1; + int skip; + + /* disable, in case we're supposed to override */ + cmd->skip_dtim_periods = 0; + cmd->flags &= ~htole16(IWM_POWER_FLAGS_SKIP_OVER_DTIM_MSK); + + if (iwm_mvm_power_is_radar(sc)) + return; + + if (dtimper >= 10) + return; + + /* TODO: check that multicast wake lock is off */ + + if (iwm_power_scheme != IWM_POWER_SCHEME_LP) + return; + skip = 2; + + /* the firmware really expects "look at every X DTIMs", so add 1 */ + cmd->skip_dtim_periods = 1 + skip; + cmd->flags |= htole16(IWM_POWER_FLAGS_SKIP_OVER_DTIM_MSK); } static void @@ -258,45 +299,49 @@ iwm_mvm_power_build_cmd(struct iwm_softc */ dtimper_msec = dtimper * ni->ni_intval; keep_alive - = MAX(3 * dtimper_msec, 1000 * IWM_POWER_KEEP_ALIVE_PERIOD_SEC); + = imax(3 * dtimper_msec, 1000 * IWM_POWER_KEEP_ALIVE_PERIOD_SEC); keep_alive = roundup(keep_alive, 1000) / 1000; cmd->keep_alive_seconds = htole16(keep_alive); + + if (sc->sc_ps_disabled) + return; + + cmd->flags |= htole16(IWM_POWER_FLAGS_POWER_SAVE_ENA_MSK); + cmd->flags |= htole16(IWM_POWER_FLAGS_POWER_MANAGEMENT_ENA_MSK); + + iwm_mvm_power_config_skip_dtim(sc, cmd); + + cmd->rx_data_timeout = + htole32(IWM_MVM_DEFAULT_PS_RX_DATA_TIMEOUT); + cmd->tx_data_timeout = + htole32(IWM_MVM_DEFAULT_PS_TX_DATA_TIMEOUT); } -int -iwm_mvm_power_mac_update_mode(struct iwm_softc *sc, struct iwm_node *in) +static int +iwm_mvm_power_send_cmd(struct iwm_softc *sc, struct iwm_node *in) { - int ret; - int ba_enable; - struct iwm_mac_power_cmd cmd; - - memset(&cmd, 0, sizeof(cmd)); + struct iwm_mac_power_cmd cmd = {}; iwm_mvm_power_build_cmd(sc, in, &cmd); iwm_mvm_power_log(sc, &cmd); - if ((ret = iwm_mvm_send_cmd_pdu(sc, IWM_MAC_PM_POWER_TABLE, - IWM_CMD_SYNC, sizeof(cmd), &cmd)) != 0) - return ret; - - ba_enable = !!(cmd.flags & - htole16(IWM_POWER_FLAGS_POWER_MANAGEMENT_ENA_MSK)); - return iwm_mvm_update_beacon_abort(sc, in, ba_enable); + return iwm_mvm_send_cmd_pdu(sc, IWM_MAC_PM_POWER_TABLE, 0, + sizeof(cmd), &cmd); } -int -iwm_mvm_power_update_device(struct iwm_softc *sc) +static int +_iwm_mvm_enable_beacon_filter(struct iwm_softc *sc, struct iwm_node *in, + struct iwm_beacon_filter_cmd *cmd) { - struct iwm_device_power_cmd cmd = { - .flags = htole16(IWM_DEVICE_POWER_FLAGS_POWER_SAVE_ENA_MSK), - }; + int ret; - cmd.flags |= htole16(IWM_DEVICE_POWER_FLAGS_CAM_MSK); - IWM_DPRINTF(sc, IWM_DEBUG_PWRSAVE | IWM_DEBUG_CMD, - "Sending device power command with flags = 0x%X\n", cmd.flags); + iwm_mvm_beacon_filter_set_cqm_params(sc, in, cmd); + ret = iwm_mvm_beacon_filter_send_cmd(sc, cmd); - return iwm_mvm_send_cmd_pdu(sc, - IWM_POWER_TABLE_CMD, IWM_CMD_SYNC, sizeof(cmd), &cmd); + if (!ret) + sc->sc_bf.bf_enabled = 1; + + return ret; } int @@ -306,15 +351,8 @@ iwm_mvm_enable_beacon_filter(struct iwm_ IWM_BF_CMD_CONFIG_DEFAULTS, .bf_enable_beacon_filter = htole32(1), }; - int ret; - - iwm_mvm_beacon_filter_set_cqm_params(sc, in, &cmd); - ret = iwm_mvm_beacon_filter_send_cmd(sc, &cmd); - if (ret == 0) - sc->sc_bf.bf_enabled = 1; - - return ret; + return _iwm_mvm_enable_beacon_filter(sc, in, &cmd); } int @@ -329,3 +367,105 @@ iwm_mvm_disable_beacon_filter(struct iwm return ret; } + +static int +iwm_mvm_power_set_ps(struct iwm_softc *sc) +{ + struct ieee80211vap *vap = TAILQ_FIRST(&sc->sc_ic.ic_vaps); + boolean_t disable_ps; + int ret; + + /* disable PS if CAM */ + disable_ps = (iwm_power_scheme == IWM_POWER_SCHEME_CAM); + /* ...or if any of the vifs require PS to be off */ + if (vap != NULL && (vap->iv_flags & IEEE80211_F_PMGTON) == 0) + disable_ps = TRUE; + + /* update device power state if it has changed */ + if (sc->sc_ps_disabled != disable_ps) { + boolean_t old_ps_disabled = sc->sc_ps_disabled; + + sc->sc_ps_disabled = disable_ps; + ret = iwm_mvm_power_update_device(sc); + if (ret) { + sc->sc_ps_disabled = old_ps_disabled; + return ret; + } + } + + return 0; +} + +static int +iwm_mvm_power_set_ba(struct iwm_softc *sc, struct iwm_node *in) +{ + struct iwm_beacon_filter_cmd cmd = { + IWM_BF_CMD_CONFIG_DEFAULTS, + .bf_enable_beacon_filter = htole32(1), + }; + + if (!sc->sc_bf.bf_enabled) + return 0; + + sc->sc_bf.ba_enabled = !sc->sc_ps_disabled; + + return _iwm_mvm_enable_beacon_filter(sc, in, &cmd); +} + +int +iwm_mvm_power_update_ps(struct iwm_softc *sc) +{ + struct ieee80211vap *vap = TAILQ_FIRST(&sc->sc_ic.ic_vaps); + int ret; + + ret = iwm_mvm_power_set_ps(sc); + if (ret) + return ret; + + if (vap != NULL) + return iwm_mvm_power_set_ba(sc, IWM_NODE(vap->iv_bss)); + + return 0; +} + +int +iwm_mvm_power_update_mac(struct iwm_softc *sc) +{ + struct ieee80211vap *vap = TAILQ_FIRST(&sc->sc_ic.ic_vaps); + int ret; + + ret = iwm_mvm_power_set_ps(sc); + if (ret) + return ret; + + if (vap != NULL) { + ret = iwm_mvm_power_send_cmd(sc, IWM_NODE(vap->iv_bss)); + if (ret) + return ret; + } + + if (vap != NULL) + return iwm_mvm_power_set_ba(sc, IWM_NODE(vap->iv_bss)); + + return 0; +} + +int +iwm_mvm_power_update_device(struct iwm_softc *sc) +{ + struct iwm_device_power_cmd cmd = { + .flags = 0, + }; + + if (iwm_power_scheme == IWM_POWER_SCHEME_CAM) + sc->sc_ps_disabled = TRUE; + + if (!sc->sc_ps_disabled) + cmd.flags |= htole16(IWM_DEVICE_POWER_FLAGS_POWER_SAVE_ENA_MSK); + + IWM_DPRINTF(sc, IWM_DEBUG_PWRSAVE | IWM_DEBUG_CMD, + "Sending device power command with flags = 0x%X\n", cmd.flags); + + return iwm_mvm_send_cmd_pdu(sc, + IWM_POWER_TABLE_CMD, 0, sizeof(cmd), &cmd); +} Modified: head/sys/dev/iwm/if_iwm_power.h ============================================================================== --- head/sys/dev/iwm/if_iwm_power.h Tue May 9 04:11:53 2017 (r318004) +++ head/sys/dev/iwm/if_iwm_power.h Tue May 9 04:15:07 2017 (r318005) @@ -90,9 +90,9 @@ #ifndef __IF_IWM_POWER_H__ #define __IF_IWM_POWER_H__ -extern int iwm_mvm_power_mac_update_mode(struct iwm_softc *sc, - struct iwm_node *in); extern int iwm_mvm_power_update_device(struct iwm_softc *sc); +extern int iwm_mvm_power_update_mac(struct iwm_softc *sc); +extern int iwm_mvm_power_update_ps(struct iwm_softc *sc); extern int iwm_mvm_enable_beacon_filter(struct iwm_softc *sc, struct iwm_node *in); extern int iwm_mvm_disable_beacon_filter(struct iwm_softc *sc); Modified: head/sys/dev/iwm/if_iwmreg.h ============================================================================== --- head/sys/dev/iwm/if_iwmreg.h Tue May 9 04:11:53 2017 (r318004) +++ head/sys/dev/iwm/if_iwmreg.h Tue May 9 04:15:07 2017 (r318005) @@ -3620,17 +3620,11 @@ struct iwm_powertable_cmd { /** * enum iwm_device_power_flags - masks for device power command flags - * @DEVIC_POWER_FLAGS_POWER_SAVE_ENA_MSK: '1' Allow to save power by turning off - * receiver and transmitter. '0' - does not allow. This flag should be - * always set to '1' unless one need to disable actual power down for debug - * purposes. - * @IWM_DEVICE_POWER_FLAGS_CAM_MSK: '1' CAM (Continuous Active Mode) is set, meaning - * that power management is disabled. '0' Power management is enabled, one - * of power schemes is applied. -*/ + * @IWM_DEVICE_POWER_FLAGS_POWER_SAVE_ENA_MSK: '1' Allow to save power by turning off + * receiver and transmitter. '0' - does not allow. + */ enum iwm_device_power_flags { IWM_DEVICE_POWER_FLAGS_POWER_SAVE_ENA_MSK = (1 << 0), - IWM_DEVICE_POWER_FLAGS_CAM_MSK = (1 << 13), }; /** @@ -6043,6 +6037,12 @@ struct iwm_cmd_header_wide { uint8_t version; } __packed; +/** + * enum iwm_power_scheme + * @IWM_POWER_LEVEL_CAM - Continuously Active Mode + * @IWM_POWER_LEVEL_BPS - Balanced Power Save (default) + * @IWM_POWER_LEVEL_LP - Low Power + */ enum iwm_power_scheme { IWM_POWER_SCHEME_CAM = 1, IWM_POWER_SCHEME_BPS, Modified: head/sys/dev/iwm/if_iwmvar.h ============================================================================== --- head/sys/dev/iwm/if_iwmvar.h Tue May 9 04:11:53 2017 (r318004) +++ head/sys/dev/iwm/if_iwmvar.h Tue May 9 04:15:07 2017 (r318005) @@ -538,6 +538,9 @@ struct iwm_softc { uint16_t num_of_pages_in_last_blk; boolean_t last_ebs_successful; + + /* Indicate if device power save is allowed */ + boolean_t sc_ps_disabled; }; #define IWM_LOCK_INIT(_sc) \ From owner-svn-src-all@freebsd.org Tue May 9 04:54:31 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 297A9D64597; Tue, 9 May 2017 04:54:31 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E72D0FC; Tue, 9 May 2017 04:54:30 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v494sTIX044810; Tue, 9 May 2017 04:54:29 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v494sTiR044809; Tue, 9 May 2017 04:54:29 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705090454.v494sTiR044809@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 9 May 2017 04:54:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318006 - head/sys/tests/framework X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 04:54:31 -0000 Author: ngie Date: Tue May 9 04:54:29 2017 New Revision: 318006 URL: https://svnweb.freebsd.org/changeset/base/318006 Log: style(9): sort headers and remove duplicates MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/sys/tests/framework/kern_testfrwk.c Modified: head/sys/tests/framework/kern_testfrwk.c ============================================================================== --- head/sys/tests/framework/kern_testfrwk.c Tue May 9 04:15:07 2017 (r318005) +++ head/sys/tests/framework/kern_testfrwk.c Tue May 9 04:54:29 2017 (r318006) @@ -27,22 +27,20 @@ #include __FBSDID("$FreeBSD$"); -#include -#include #include #include #include #include -#include #include #include #include #include +#include #include #include +#include #include #include -#include #include #include #ifdef SMP From owner-svn-src-all@freebsd.org Tue May 9 04:56:16 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 205B8D646D4; Tue, 9 May 2017 04:56:16 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 90E0CD5C; Tue, 9 May 2017 04:56:15 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v494uE1F044933; Tue, 9 May 2017 04:56:14 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v494uEuH044932; Tue, 9 May 2017 04:56:14 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705090456.v494uEuH044932@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 9 May 2017 04:56:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318007 - head/sys/modules/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 04:56:16 -0000 Author: ngie Date: Tue May 9 04:56:14 2017 New Revision: 318007 URL: https://svnweb.freebsd.org/changeset/base/318007 Log: Add intermediary Makefile for compiling all items in the directory MFC after: 3 weeks Sponsored by: Dell EMC Isilon Added: head/sys/modules/tests/Makefile (contents, props changed) Added: head/sys/modules/tests/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/tests/Makefile Tue May 9 04:56:14 2017 (r318007) @@ -0,0 +1,7 @@ +# $FreeBSD$ + +SUBDIR+= framework +SUBDIR+= .WAIT +SUBDIR+= callout_test + +.include From owner-svn-src-all@freebsd.org Tue May 9 04:59:06 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 925CAD647DC; Tue, 9 May 2017 04:59:06 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 490971946; Tue, 9 May 2017 04:59:06 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v494x5KQ045076; Tue, 9 May 2017 04:59:05 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v494x5dl045075; Tue, 9 May 2017 04:59:05 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705090459.v494x5dl045075@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 9 May 2017 04:59:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318008 - head/sys/modules X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 04:59:06 -0000 Author: ngie Date: Tue May 9 04:59:05 2017 New Revision: 318008 URL: https://svnweb.freebsd.org/changeset/base/318008 Log: Only compile tests/ if MK_TESTS != no or ALL_MODULES is defined MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/sys/modules/Makefile Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Tue May 9 04:56:14 2017 (r318007) +++ head/sys/modules/Makefile Tue May 9 04:59:05 2017 (r318008) @@ -356,8 +356,6 @@ SUBDIR= \ sysvipc \ tcp \ ${_ti} \ - tests/framework \ - tests/callout_test \ tl \ tmpfs \ ${_toecore} \ @@ -516,6 +514,10 @@ _rtwnfw= rtwnfw _cxgbe= cxgbe .endif +.if ${MK_TESTS} != "no" || defined(ALL_MODULES) +SUBDIR+= tests +.endif + .if ${MK_ZFS} != "no" || defined(ALL_MODULES) SUBDIR+= zfs .endif From owner-svn-src-all@freebsd.org Tue May 9 05:03:37 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 27703D64C04; Tue, 9 May 2017 05:03:37 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A8E0CC4A; Tue, 9 May 2017 05:03:36 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4953Zq9049093; Tue, 9 May 2017 05:03:35 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4953ZWQ049092; Tue, 9 May 2017 05:03:35 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705090503.v4953ZWQ049092@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 9 May 2017 05:03:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318009 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 05:03:37 -0000 Author: ngie Date: Tue May 9 05:03:35 2017 New Revision: 318009 URL: https://svnweb.freebsd.org/changeset/base/318009 Log: Add MK_TESTS to kern.opts.mk to support r31800 MFC after: 3 weeks MFC with: r318008 Pointyhat to: ngie Sponsored by: Dell EMC Isilon Modified: head/sys/conf/kern.opts.mk Modified: head/sys/conf/kern.opts.mk ============================================================================== --- head/sys/conf/kern.opts.mk Tue May 9 04:59:05 2017 (r318008) +++ head/sys/conf/kern.opts.mk Tue May 9 05:03:35 2017 (r318009) @@ -41,6 +41,7 @@ __DEFAULT_YES_OPTIONS = \ PF \ SOURCELESS_HOST \ SOURCELESS_UCODE \ + TESTS \ USB_GADGET_EXAMPLES \ ZFS From owner-svn-src-all@freebsd.org Tue May 9 05:06:20 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7C32FD64CDF; Tue, 9 May 2017 05:06:20 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mout.gmx.net", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CD43118A2; Tue, 9 May 2017 05:06:19 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from freyja.zeit4.iv.bundesimmobilien.de ([87.138.105.249]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0Md3Eg-1dQ2AC45x4-00IHYK; Tue, 09 May 2017 07:06:11 +0200 Date: Tue, 9 May 2017 07:06:02 +0200 From: "O. Hartmann" To: Ngie Cooper Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r318008 - head/sys/modules Message-ID: <20170509070602.22e979b0@freyja.zeit4.iv.bundesimmobilien.de> In-Reply-To: <201705090459.v494x5dl045075@repo.freebsd.org> References: <201705090459.v494x5dl045075@repo.freebsd.org> Organization: Walstatt X-Mailer: Claws Mail 3.15.0 (GTK+ 2.24.31; amd64-portbld-freebsd12.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:lyq5onSlu7jPoDk+VxCOuo4a3M4q288hsVYhCTCpLO3Zu+mG4wv eKiZUuAc3ns+2/ZxnY7rC1nppM69NKqyZeyhB2x4Rjos+41KhAWH6alh+nNtESLIqzcKezo h4WN+kiUmBMSgdSRaAcUko0COo+FlXegSu8ZUNfFnyghenVegKDJDohBQrPhGGnCzmtQhw/ MNnzVklQWxA8jSTtDrqPQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:Lhh93Ct1gDc=:VjUHFor1MteJb8YVnrj0l/ k9w/LC9xGJm8er+D0Lg/pkVkwGvHOH/gt6fA/BBdR6W8xdKNwu8VNepHiQ5exfJSl60MyO/q9 +oHqj6IIzhohyIOBBIZhqCWf8EcFdFClKfv5pWAkyrmKlF6lytjyvg0ZdJbvXAiOWSjuCaO/d qrWJIPV6qKos88PIeh5UtVQAiF7f0tgt01wWy0vk3gEjvAhjHYSYdHnK6OF5blYkDNenxEOF5 lO1qbcdLOoJVEDImKfBzr77h+fmXz6/3hAnwxGFCHt0lquxr8vlF27m0N8g6uZcPPWz3iVt9s ShNj72ng4VizTJJywM2bgLqybly5WL7fbRp8upyqqsv9xRG9dwYy/T/hue+NLjQsHARUPuLv2 pu8+kWH0VR8m7L86Hwh3QQjsuYk3hpJNjF/wyS46tlK6wP1viWkOOvV9Aw3kWWki2JvyrZeOc lNou5Jpm+pkNlv90Lw6IVt7xtGk/+R9j+aZgDy3wXj9cEpet4us5V1tw9dQczAf+2iInfURE3 83zhalEVIB/YRGjSZuuredcgp0ZJnRMwoyT7BJzBBOBfOu1vjYJ76RVclQt08+gaEyOdKpdPH MwZHdmJWHpHwAmjceHEcWjX3Y4A/lHwJEHp3dEu5T5dWgqDJPeN7VSyoHlz7+9duaJbg2s081 nL9z2clGC7Hx6x2BZLN5LynECxqTSxWJuvvn9ttTDBVDKyeLjR5FU99zEyWdWNNTX6I/7F1OB pWsbTYcGFmpeJwN+lv30a8MRxH9qN7a7wDrWqDaoUt2o9Rh5RaxjwumoiDlc9Bi64hg7AP3Zi ow2dth5 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 05:06:20 -0000 On Tue, 9 May 2017 04:59:05 +0000 (UTC) Ngie Cooper wrote: > Author: ngie > Date: Tue May 9 04:59:05 2017 > New Revision: 318008 > URL: https://svnweb.freebsd.org/changeset/base/318008 > > Log: > Only compile tests/ if MK_TESTS != no or ALL_MODULES is defined > > MFC after: 3 weeks > Sponsored by: Dell EMC Isilon > > Modified: > head/sys/modules/Makefile > > Modified: head/sys/modules/Makefile > ============================================================================== > --- head/sys/modules/Makefile Tue May 9 04:56:14 2017 (r318007) > +++ head/sys/modules/Makefile Tue May 9 04:59:05 2017 (r318008) > @@ -356,8 +356,6 @@ SUBDIR= \ > sysvipc \ > tcp \ > ${_ti} \ > - tests/framework \ > - tests/callout_test \ > tl \ > tmpfs \ > ${_toecore} \ > @@ -516,6 +514,10 @@ _rtwnfw= rtwnfw > _cxgbe= cxgbe > .endif > > +.if ${MK_TESTS} != "no" || defined(ALL_MODULES) > +SUBDIR+= tests > +.endif > + > .if ${MK_ZFS} != "no" || defined(ALL_MODULES) > SUBDIR+= zfs > .endif > _______________________________________________ > svn-src-head@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" Ooopsie ... ;-) Something went wrong after I sucked in this commit just a few seconds ago, compiling kernel failed: [...] usr/src/sys" WITH_EXTRA_TCP_STACKS="YES" make obj make[3]: "/usr/src/sys/modules/Makefile" line 517: Malformed conditional (${MK_TESTS} != "no" || defined(ALL_MODULES)) make[3]: Fatal errors encountered -- cannot continue make[3]: stopped in /usr/src/sys/modules .ERROR_TARGET='' .ERROR_META_FILE='' .MAKE.LEVEL='3' MAKEFILE='' .MAKE.MODE='meta missing-filemon=yes missing-meta=yes silent=yes verbose' .CURDIR='/usr/src/sys/modules' .MAKE='make' .OBJDIR='/usr/obj/usr/src/sys/FREYJA/modules/usr/src/sys/modules' .TARGETS='obj' DESTDIR='' From owner-svn-src-all@freebsd.org Tue May 9 05:08:49 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C116FD64E45; Tue, 9 May 2017 05:08:49 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 377BF1568; Tue, 9 May 2017 05:08:49 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4958mTe049301; Tue, 9 May 2017 05:08:48 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4958mKe049300; Tue, 9 May 2017 05:08:48 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705090508.v4958mKe049300@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 9 May 2017 05:08:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318010 - head/sys/tests/callout_test X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 05:08:49 -0000 Author: ngie Date: Tue May 9 05:08:47 2017 New Revision: 318010 URL: https://svnweb.freebsd.org/changeset/base/318010 Log: style(9): sort headers MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/sys/tests/callout_test/callout_test.c Modified: head/sys/tests/callout_test/callout_test.c ============================================================================== --- head/sys/tests/callout_test/callout_test.c Tue May 9 05:03:35 2017 (r318009) +++ head/sys/tests/callout_test/callout_test.c Tue May 9 05:08:47 2017 (r318010) @@ -27,23 +27,23 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include +#include +#include #include #include #include +#include +#include #include #include #include #include -#include +#include #include -#include #include -#include -#include -#include -#include #include #include #include From owner-svn-src-all@freebsd.org Tue May 9 05:09:37 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BE366D64ECB; Tue, 9 May 2017 05:09:37 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x241.google.com (mail-pf0-x241.google.com [IPv6:2607:f8b0:400e:c00::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4EE20188B; Tue, 9 May 2017 05:09:37 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x241.google.com with SMTP id b23so12366724pfc.0; Mon, 08 May 2017 22:09:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=lj9mz0t8eC1Nhq04c1pOjeDaPnJZ3A+gYe7es7gStlk=; b=htX6tEY+Aqt2awnxPSqF4DNSAWWY1lxUBgnD33Ok5Nm34oTWMoZzMjWXdX2tNgwBXc RRxugZzvyk19j23/SGacqfK4jttQIlxIVeBsFdawynAykuYp49k4B8EUW5ILAx61YYmD f1odHsCDwEYV5Kqvj9Hc1r6A8ZvVrWU2jYkd00x2WbnG0uk3DNS4HQB0dpQS/DuwxPXf whp1w+pxA+2rEkziiCh70uv/Mhqzzk+a48b5EqmZmanf9XwFga1f+Wf3mqinbojz3aRM 7ds7H/ZFTGFglsRLC9KO/f8NfzVRqb0rtDgnR6aOfBVgxC7pjbJncakFW145grww0jso f3HA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=lj9mz0t8eC1Nhq04c1pOjeDaPnJZ3A+gYe7es7gStlk=; b=uZELTpC052j0a7A/oRm/HKz8Tce9tWX5AIEGzOxMVccR/b9hbMgOyTRrrqMQ+C0Jmr kfJGRl7aEjNdCoDelm72mEuk//PkmvJagc1ScJfcKvo32lqpPGm4Nr2+1u+M5/7SiGck HDy8nYsEOH+A8aYzt/cb7vVg4LDPbFIfjukd5+NGGdU7Mi6IpY0wXSu7xbxfTQau50p4 jvIsFIEh70Z+hxErKZHRQ6oZheEuyrHdYK/ip040XFDMzSSjWs9oK5OgpJ+qxLzE2cdd 4TAcqwO9JISEwgCpb7xG9HhLgkrFac9cC+hqrLMymwQPZY577cll/ZbOktZD2Wd7dq2B 9ydQ== X-Gm-Message-State: AN3rC/4n+Lzr+j8pVUdsEGUZIHiaGeTrPMBIV+NzJX1mq1QOnKdnV1UI GL2f3LwtezNaXt+3auY= X-Received: by 10.99.108.6 with SMTP id h6mr21878405pgc.188.1494306576520; Mon, 08 May 2017 22:09:36 -0700 (PDT) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id u67sm18299574pgb.24.2017.05.08.22.09.35 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 08 May 2017 22:09:35 -0700 (PDT) Subject: Re: svn commit: r318008 - head/sys/modules Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_AB9B0B4B-4CED-4088-B5D5-98DF3C582613"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <20170509070602.22e979b0@freyja.zeit4.iv.bundesimmobilien.de> Date: Mon, 8 May 2017 22:09:34 -0700 Cc: Ngie Cooper , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <939F76F2-0B90-4BE1-BD3C-3E371E943810@gmail.com> References: <201705090459.v494x5dl045075@repo.freebsd.org> <20170509070602.22e979b0@freyja.zeit4.iv.bundesimmobilien.de> To: "O. Hartmann" X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 05:09:37 -0000 --Apple-Mail=_AB9B0B4B-4CED-4088-B5D5-98DF3C582613 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On May 8, 2017, at 22:06, O. Hartmann wrote: >=20 > On Tue, 9 May 2017 04:59:05 +0000 (UTC) > Ngie Cooper wrote: =E2=80=A6 > Ooopsie ... ;-) >=20 > Something went wrong after I sucked in this commit just a few seconds = ago, > compiling kernel failed: You=E2=80=99re fast. Fixed in r318009 5 minutes ago. -Ngie --Apple-Mail=_AB9B0B4B-4CED-4088-B5D5-98DF3C582613 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJZEU8PAAoJEPWDqSZpMIYVh5AP/jD2+ezYRhuUKuEXic7sXIbY U05I3QU9UxdzhZJluNfCCHl1LoCeTd1fHMG0tb1QJaH+96Kiu7d5Dpa9BziltDMu Sux5/vxLito9tq9thaNT5O5WazoZrzoXSmDH1A6OXddsbMWAP1bzQQs6zg7g8RJD 8+p4rArX3K8/Emlacl9XBKEoqILw8iqdiieB3DbnmWLTjKZ1Sf2c7K73ui/zLCYN rBYsjmhN7oKUO7P7uAvkR+fpYFI3bODrqeyzJtMCyTLnPQxbD/xVQ0yGhT24vfeL nlIRkmLTDKYV+Dfo4zXmnm0n+H7YZeIR3TMl0z+fxdX7eZdXkauUsUM4nQmumJ+x R2tZcEAiOLxzwqgrbHihsiAlgk3bjkT4zNSZQGXd7zzv0H8xke6BcyU2DcCgLVzF UvIH5jQzmJCs1j7HBNrDD5u3t/4yGmBqoT370zUXvocbGg89wh/uxfa61nyjySNW q8Dr1kJOWrM9PSLuVufSpD2Lj841Tgvupwl7azWjtnqRQt2Jb/GHkn8itMH0nfhH 7ZwdTjNX/NrYd8MduVgg33e3iz2hgkEGSweK+oBrIZFX3J15YGvaNufK0fcnV2Gv L6MwbnNFfPcln5aAEGnzGYbHc9naDNKtmUI7ggqDR6N4ZEIwbq9MCID9HIgpOpS3 1B0dJ2R01MKFGRAp4IcI =xpPe -----END PGP SIGNATURE----- --Apple-Mail=_AB9B0B4B-4CED-4088-B5D5-98DF3C582613-- From owner-svn-src-all@freebsd.org Tue May 9 05:22:52 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9673DD632F6; Tue, 9 May 2017 05:22:52 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4A0011A8; Tue, 9 May 2017 05:22:52 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v495Mp5J057057; Tue, 9 May 2017 05:22:51 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v495MpXJ057056; Tue, 9 May 2017 05:22:51 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705090522.v495MpXJ057056@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 9 May 2017 05:22:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318011 - head/sys/modules/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 05:22:52 -0000 Author: ngie Date: Tue May 9 05:22:51 2017 New Revision: 318011 URL: https://svnweb.freebsd.org/changeset/base/318011 Log: Mark this Makefile SUBDIR_PARALLEL I inserted the necessary SUBDIR+= .WAIT in the previous commit MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/sys/modules/tests/Makefile Modified: head/sys/modules/tests/Makefile ============================================================================== --- head/sys/modules/tests/Makefile Tue May 9 05:08:47 2017 (r318010) +++ head/sys/modules/tests/Makefile Tue May 9 05:22:51 2017 (r318011) @@ -4,4 +4,6 @@ SUBDIR+= framework SUBDIR+= .WAIT SUBDIR+= callout_test +SUBDIR_PARALLEL= + .include From owner-svn-src-all@freebsd.org Tue May 9 05:31:40 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BC799D63402; Tue, 9 May 2017 05:31:40 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 68A6AB37; Tue, 9 May 2017 05:31:40 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v495VdrR057415; Tue, 9 May 2017 05:31:39 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v495Vdw3057411; Tue, 9 May 2017 05:31:39 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201705090531.v495Vdw3057411@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 9 May 2017 05:31:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318012 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 05:31:41 -0000 Author: adrian Date: Tue May 9 05:31:38 2017 New Revision: 318012 URL: https://svnweb.freebsd.org/changeset/base/318012 Log: [iwm] Allow listening on both chains/atennas to get diversity. This might improve throughput slightly when far from the accesspoint, apparently by allowing the firmware to listen on either of the two antennas (if there are two, i.e. on 7260/7265/8260), whichever has a better reception. Obtained from: dragonflybsd.git 3b7fc5aac51f81062da0a2c8fdac23e683fbd548 Modified: head/sys/dev/iwm/if_iwm_phy_ctxt.c head/sys/dev/iwm/if_iwm_util.c head/sys/dev/iwm/if_iwm_util.h Modified: head/sys/dev/iwm/if_iwm_phy_ctxt.c ============================================================================== --- head/sys/dev/iwm/if_iwm_phy_ctxt.c Tue May 9 05:22:51 2017 (r318011) +++ head/sys/dev/iwm/if_iwm_phy_ctxt.c Tue May 9 05:31:38 2017 (r318012) @@ -218,6 +218,18 @@ iwm_mvm_phy_ctxt_cmd_data(struct iwm_sof idle_cnt = chains_static; active_cnt = chains_dynamic; + /* In scenarios where we only ever use a single-stream rates, + * i.e. legacy 11b/g/a associations, single-stream APs or even + * static SMPS, enable both chains to get diversity, improving + * the case where we're far enough from the AP that attenuation + * between the two antennas is sufficiently different to impact + * performance. + */ + if (active_cnt == 1 && iwm_mvm_rx_diversity_allowed(sc)) { + idle_cnt = 2; + active_cnt = 2; + } + cmd->rxchain_info = htole32(iwm_mvm_get_valid_rx_ant(sc) << IWM_PHY_RX_CHAIN_VALID_POS); cmd->rxchain_info |= htole32(idle_cnt << IWM_PHY_RX_CHAIN_CNT_POS); Modified: head/sys/dev/iwm/if_iwm_util.c ============================================================================== --- head/sys/dev/iwm/if_iwm_util.c Tue May 9 05:22:51 2017 (r318011) +++ head/sys/dev/iwm/if_iwm_util.c Tue May 9 05:31:38 2017 (r318012) @@ -153,6 +153,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -487,3 +488,17 @@ iwm_dma_contig_free(struct iwm_dma_info dma->tag = NULL; } } + +boolean_t +iwm_mvm_rx_diversity_allowed(struct iwm_softc *sc) +{ + if (num_of_ant(iwm_mvm_get_valid_rx_ant(sc)) == 1) + return FALSE; + + /* + * XXX Also return FALSE when SMPS (Spatial Multiplexing Powersave) + * is used on any vap (in the future). + */ + + return TRUE; +} Modified: head/sys/dev/iwm/if_iwm_util.h ============================================================================== --- head/sys/dev/iwm/if_iwm_util.h Tue May 9 05:22:51 2017 (r318011) +++ head/sys/dev/iwm/if_iwm_util.h Tue May 9 05:31:38 2017 (r318012) @@ -120,6 +120,8 @@ extern int iwm_dma_contig_alloc(bus_dma_ bus_size_t size, bus_size_t alignment); extern void iwm_dma_contig_free(struct iwm_dma_info *); +extern boolean_t iwm_mvm_rx_diversity_allowed(struct iwm_softc *sc); + extern uint8_t iwm_ridx2rate(struct ieee80211_rateset *rs, int ridx); static inline uint8_t From owner-svn-src-all@freebsd.org Tue May 9 05:32:37 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A6509D63610; Tue, 9 May 2017 05:32:37 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 14796EE3; Tue, 9 May 2017 05:32:36 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v495Wagm061164; Tue, 9 May 2017 05:32:36 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v495WZ3b061160; Tue, 9 May 2017 05:32:35 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201705090532.v495WZ3b061160@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 9 May 2017 05:32:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318013 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 05:32:37 -0000 Author: adrian Date: Tue May 9 05:32:35 2017 New Revision: 318013 URL: https://svnweb.freebsd.org/changeset/base/318013 Log: [iwm] Move in_phyctxt from struct iwm_node to phy_ctxt in struct iwm_vap. * This better matches how things are organized in Linux's iwlwifi. Obtained from: dragonflybsd.git 0cf16dd2e0e09a3e5140e50222ac2e69bcdb19a2 Modified: head/sys/dev/iwm/if_iwm.c head/sys/dev/iwm/if_iwm_binding.c head/sys/dev/iwm/if_iwm_binding.h head/sys/dev/iwm/if_iwmvar.h Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Tue May 9 05:31:38 2017 (r318012) +++ head/sys/dev/iwm/if_iwm.c Tue May 9 05:32:35 2017 (r318013) @@ -355,7 +355,7 @@ static int iwm_mvm_add_int_sta_common(st struct iwm_int_sta *, const uint8_t *, uint16_t, uint16_t); static int iwm_mvm_add_aux_sta(struct iwm_softc *); -static int iwm_mvm_update_quotas(struct iwm_softc *, struct iwm_node *); +static int iwm_mvm_update_quotas(struct iwm_softc *, struct iwm_vap *); static int iwm_auth(struct ieee80211vap *, struct iwm_softc *); static int iwm_assoc(struct ieee80211vap *, struct iwm_softc *); static int iwm_release(struct iwm_softc *, struct iwm_node *); @@ -1286,6 +1286,7 @@ iwm_stop_device(struct iwm_softc *sc) */ if (vap) { struct iwm_vap *iv = IWM_VAP(vap); + iv->phy_ctxt = NULL; iv->is_uploaded = 0; } @@ -4014,7 +4015,7 @@ iwm_mvm_add_aux_sta(struct iwm_softc *sc */ static int -iwm_mvm_update_quotas(struct iwm_softc *sc, struct iwm_node *in) +iwm_mvm_update_quotas(struct iwm_softc *sc, struct iwm_vap *ivp) { struct iwm_time_quota_cmd cmd; int i, idx, ret, num_active_macs, quota, quota_rem; @@ -4025,10 +4026,10 @@ iwm_mvm_update_quotas(struct iwm_softc * memset(&cmd, 0, sizeof(cmd)); /* currently, PHY ID == binding ID */ - if (in) { - id = in->in_phyctxt->id; + if (ivp) { + id = ivp->phy_ctxt->id; KASSERT(id < IWM_MAX_BINDINGS, ("invalid id")); - colors[id] = in->in_phyctxt->color; + colors[id] = ivp->phy_ctxt->color; if (1) n_ifs[id] = 1; @@ -4153,9 +4154,9 @@ iwm_auth(struct ieee80211vap *vap, struc "%s: failed update phy ctxt\n", __func__); goto out; } - in->in_phyctxt = &sc->sc_phyctxt[0]; + iv->phy_ctxt = &sc->sc_phyctxt[0]; - if ((error = iwm_mvm_binding_update(sc, in)) != 0) { + if ((error = iwm_mvm_binding_update(sc, iv)) != 0) { device_printf(sc->sc_dev, "%s: binding update cmd\n", __func__); goto out; @@ -4184,9 +4185,9 @@ iwm_auth(struct ieee80211vap *vap, struc error = ETIMEDOUT; goto out; } - in->in_phyctxt = &sc->sc_phyctxt[0]; + iv->phy_ctxt = &sc->sc_phyctxt[0]; - if ((error = iwm_mvm_binding_add_vif(sc, in)) != 0) { + if ((error = iwm_mvm_binding_add_vif(sc, iv)) != 0) { device_printf(sc->sc_dev, "%s: binding add cmd\n", __func__); goto out; @@ -4590,7 +4591,7 @@ iwm_newstate(struct ieee80211vap *vap, e in = IWM_NODE(vap->iv_bss); iwm_mvm_enable_beacon_filter(sc, in); iwm_mvm_power_update_mac(sc); - iwm_mvm_update_quotas(sc, in); + iwm_mvm_update_quotas(sc, ivp); iwm_setrates(sc, in); cmd.data[0] = &in->in_lq; @@ -5761,7 +5762,6 @@ iwm_intr(void *arg) device_printf(sc->sc_dev, "%s: controller panicked, iv_state = %d; " "restarting\n", __func__, vap->iv_state); - /* XXX TODO: turn this into a callout/taskqueue */ ieee80211_restart_all(ic); return; } Modified: head/sys/dev/iwm/if_iwm_binding.c ============================================================================== --- head/sys/dev/iwm/if_iwm_binding.c Tue May 9 05:31:38 2017 (r318012) +++ head/sys/dev/iwm/if_iwm_binding.c Tue May 9 05:32:35 2017 (r318013) @@ -162,10 +162,10 @@ __FBSDID("$FreeBSD$"); */ int -iwm_mvm_binding_cmd(struct iwm_softc *sc, struct iwm_node *in, uint32_t action) +iwm_mvm_binding_cmd(struct iwm_softc *sc, struct iwm_vap *ivp, uint32_t action) { struct iwm_binding_cmd cmd; - struct iwm_mvm_phy_ctxt *phyctxt = in->in_phyctxt; + struct iwm_mvm_phy_ctxt *phyctxt = ivp->phy_ctxt; int i, ret; uint32_t status; @@ -204,13 +204,13 @@ iwm_mvm_binding_cmd(struct iwm_softc *sc } int -iwm_mvm_binding_update(struct iwm_softc *sc, struct iwm_node *in) +iwm_mvm_binding_update(struct iwm_softc *sc, struct iwm_vap *ivp) { - return iwm_mvm_binding_cmd(sc, in, IWM_FW_CTXT_ACTION_MODIFY); + return iwm_mvm_binding_cmd(sc, ivp, IWM_FW_CTXT_ACTION_MODIFY); } int -iwm_mvm_binding_add_vif(struct iwm_softc *sc, struct iwm_node *in) +iwm_mvm_binding_add_vif(struct iwm_softc *sc, struct iwm_vap *ivp) { - return iwm_mvm_binding_cmd(sc, in, IWM_FW_CTXT_ACTION_ADD); + return iwm_mvm_binding_cmd(sc, ivp, IWM_FW_CTXT_ACTION_ADD); } Modified: head/sys/dev/iwm/if_iwm_binding.h ============================================================================== --- head/sys/dev/iwm/if_iwm_binding.h Tue May 9 05:31:38 2017 (r318012) +++ head/sys/dev/iwm/if_iwm_binding.h Tue May 9 05:32:35 2017 (r318013) @@ -105,9 +105,9 @@ #ifndef __IF_IWM_BINDING_H__ #define __IF_IWM_BINDING_H__ -extern int iwm_mvm_binding_cmd(struct iwm_softc *sc, struct iwm_node *in, +extern int iwm_mvm_binding_cmd(struct iwm_softc *sc, struct iwm_vap *ivp, uint32_t action); -extern int iwm_mvm_binding_update(struct iwm_softc *sc, struct iwm_node *in); -extern int iwm_mvm_binding_add_vif(struct iwm_softc *sc, struct iwm_node *in); +extern int iwm_mvm_binding_update(struct iwm_softc *sc, struct iwm_vap *ivp); +extern int iwm_mvm_binding_add_vif(struct iwm_softc *sc, struct iwm_vap *ivp); #endif /* __IF_IWM_BINDING_H__ */ Modified: head/sys/dev/iwm/if_iwmvar.h ============================================================================== --- head/sys/dev/iwm/if_iwmvar.h Tue May 9 05:31:38 2017 (r318012) +++ head/sys/dev/iwm/if_iwmvar.h Tue May 9 05:32:35 2017 (r318013) @@ -373,12 +373,13 @@ struct iwm_vap { int (*iv_newstate)(struct ieee80211vap *, enum ieee80211_state, int); + + struct iwm_mvm_phy_ctxt *phy_ctxt; }; #define IWM_VAP(_vap) ((struct iwm_vap *)(_vap)) struct iwm_node { struct ieee80211_node in_ni; - struct iwm_mvm_phy_ctxt *in_phyctxt; /* status "bits" */ int in_assoc; From owner-svn-src-all@freebsd.org Tue May 9 08:08:30 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 90556D65BA8; Tue, 9 May 2017 08:08:30 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3B62A1E62; Tue, 9 May 2017 08:08:30 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4988T4M023307; Tue, 9 May 2017 08:08:29 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4988TG7023305; Tue, 9 May 2017 08:08:29 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705090808.v4988TG7023305@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Tue, 9 May 2017 08:08:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318014 - head/sys/dev/cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 08:08:30 -0000 Author: np Date: Tue May 9 08:08:28 2017 New Revision: 318014 URL: https://svnweb.freebsd.org/changeset/base/318014 Log: cxgbe(4): Fixes related to the knob that controls link autonegotiation. - Do not leak the adapter lock in sysctl_autoneg. - Accept only 0 or 1 as valid settings for autonegotiation. - A fixed speed must be requested by the driver when autonegotiation is disabled otherwise the firmware will reject the l1cfg command. Use the top speed supported by the port for now. MFC after: 3 days Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/adapter.h head/sys/dev/cxgbe/t4_main.c Modified: head/sys/dev/cxgbe/adapter.h ============================================================================== --- head/sys/dev/cxgbe/adapter.h Tue May 9 05:32:35 2017 (r318013) +++ head/sys/dev/cxgbe/adapter.h Tue May 9 08:08:28 2017 (r318014) @@ -1086,6 +1086,24 @@ port_top_speed(const struct port_info *p } static inline int +port_top_speed_raw(const struct port_info *pi) +{ + + if (pi->link_cfg.supported & FW_PORT_CAP_SPEED_100G) + return (FW_PORT_CAP_SPEED_100G); + if (pi->link_cfg.supported & FW_PORT_CAP_SPEED_40G) + return (FW_PORT_CAP_SPEED_40G); + if (pi->link_cfg.supported & FW_PORT_CAP_SPEED_25G) + return (FW_PORT_CAP_SPEED_25G); + if (pi->link_cfg.supported & FW_PORT_CAP_SPEED_10G) + return (FW_PORT_CAP_SPEED_10G); + if (pi->link_cfg.supported & FW_PORT_CAP_SPEED_1G) + return (FW_PORT_CAP_SPEED_1G); + + return (0); +} + +static inline int tx_resume_threshold(struct sge_eq *eq) { Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Tue May 9 05:32:35 2017 (r318013) +++ head/sys/dev/cxgbe/t4_main.c Tue May 9 08:08:28 2017 (r318014) @@ -995,6 +995,7 @@ t4_attach(device_t dev) lc->autoneg = t4_autoneg ? AUTONEG_ENABLE : AUTONEG_DISABLE; } + lc->requested_speed = port_top_speed_raw(pi); rc = -t4_link_l1cfg(sc, sc->mbox, pi->tx_chan, lc); if (rc != 0) { @@ -5883,7 +5884,12 @@ sysctl_autoneg(SYSCTL_HANDLER_ARGS) if ((lc->supported & FW_PORT_CAP_ANEG) == 0) return (ENOTSUP); - val = val ? AUTONEG_ENABLE : AUTONEG_DISABLE; + if (val == 0) + val = AUTONEG_DISABLE; + else if (val == 1) + val = AUTONEG_ENABLE; + else + return (EINVAL); if (lc->autoneg == val) return (0); /* no change */ @@ -5896,6 +5902,7 @@ sysctl_autoneg(SYSCTL_HANDLER_ARGS) rc = -t4_link_l1cfg(sc, sc->mbox, pi->tx_chan, lc); if (rc != 0) lc->autoneg = old; + end_synchronized_op(sc, 0); return (rc); } From owner-svn-src-all@freebsd.org Tue May 9 08:29:57 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 28BCCD64294; Tue, 9 May 2017 08:29:57 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C473C1C08; Tue, 9 May 2017 08:29:56 +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 v498TtuV031888; Tue, 9 May 2017 08:29:55 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v498TtXb031887; Tue, 9 May 2017 08:29:55 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201705090829.v498TtXb031887@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Tue, 9 May 2017 08:29:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318015 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 08:29:57 -0000 Author: bz Date: Tue May 9 08:29:55 2017 New Revision: 318015 URL: https://svnweb.freebsd.org/changeset/base/318015 Log: Adjust a comment. MFC after: 3 days Modified: head/sys/net/iflib.c Modified: head/sys/net/iflib.c ============================================================================== --- head/sys/net/iflib.c Tue May 9 08:08:28 2017 (r318014) +++ head/sys/net/iflib.c Tue May 9 08:29:55 2017 (r318015) @@ -5214,7 +5214,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-all@freebsd.org Tue May 9 08:31:35 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EFDDED6440D; Tue, 9 May 2017 08:31:35 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 92F0514BB; Tue, 9 May 2017 08:31:35 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v498VYxo033429; Tue, 9 May 2017 08:31:34 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v498VY6a033428; Tue, 9 May 2017 08:31:34 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201705090831.v498VY6a033428@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 9 May 2017 08:31:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318016 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 08:31:36 -0000 Author: trasz Date: Tue May 9 08:31:34 2017 New Revision: 318016 URL: https://svnweb.freebsd.org/changeset/base/318016 Log: Fix mistake introduced to uart(4) man page in r317463. MFC after: 2 weeks Modified: head/share/man/man4/uart.4 Modified: head/share/man/man4/uart.4 ============================================================================== --- head/share/man/man4/uart.4 Tue May 9 08:29:55 2017 (r318015) +++ head/share/man/man4/uart.4 Tue May 9 08:31:34 2017 (r318016) @@ -233,7 +233,7 @@ for callin ports .It Pa /dev/ttyu?.lock corresponding callin initial-state and lock-state devices .Pp -.It Pa /dev/cuau* +.It Pa /dev/cuau? for callout ports .It Pa /dev/cuau?.init .It Pa /dev/cuau?.lock From owner-svn-src-all@freebsd.org Tue May 9 08:36:13 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 80848D64668; Tue, 9 May 2017 08:36:13 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B3C7A62C; Tue, 9 May 2017 08:36:12 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v498aB2n035798; Tue, 9 May 2017 08:36:11 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v498a9JJ035778; Tue, 9 May 2017 08:36:09 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201705090836.v498a9JJ035778@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 9 May 2017 08:36:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318017 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 08:36:13 -0000 Author: trasz Date: Tue May 9 08:36:09 2017 New Revision: 318017 URL: https://svnweb.freebsd.org/changeset/base/318017 Log: Fix device paths for USB serial adapters: the formatting strings contain "%u", differently from eg uart(4) which uses "%r". Suggested by: bde@ MFC after: 2 weeks Modified: head/share/man/man4/u3g.4 head/share/man/man4/uark.4 head/share/man/man4/ubsa.4 head/share/man/man4/ubser.4 head/share/man/man4/uchcom.4 head/share/man/man4/ucom.4 head/share/man/man4/ucycom.4 head/share/man/man4/uftdi.4 head/share/man/man4/uipaq.4 head/share/man/man4/umcs.4 head/share/man/man4/umct.4 head/share/man/man4/umodem.4 head/share/man/man4/umoscom.4 head/share/man/man4/uplcom.4 head/share/man/man4/uslcom.4 head/share/man/man4/uvisor.4 head/share/man/man4/uvscom.4 Modified: head/share/man/man4/u3g.4 ============================================================================== --- head/share/man/man4/u3g.4 Tue May 9 08:31:34 2017 (r318016) +++ head/share/man/man4/u3g.4 Tue May 9 08:36:09 2017 (r318017) @@ -98,17 +98,17 @@ See and .Xr usb_quirk 4 . .Sh FILES -.Bl -tag -width "/dev/ttyU?.?.init" -compact -.It Pa /dev/ttyU?.? +.Bl -tag -width "/dev/ttyU*.*.init" -compact +.It Pa /dev/ttyU*.* for callin ports -.It Pa /dev/ttyU?.?.init -.It Pa /dev/ttyU?.?.lock +.It Pa /dev/ttyU*.*.init +.It Pa /dev/ttyU*.*.lock corresponding callin initial-state and lock-state devices .Pp -.It Pa /dev/cuaU?.? +.It Pa /dev/cuaU*.* for callout ports -.It Pa /dev/cuaU?.?.init -.It Pa /dev/cuaU?.?.lock +.It Pa /dev/cuaU*.*.init +.It Pa /dev/cuaU*.*.lock corresponding callout initial-state and lock-state devices .El .Sh SEE ALSO Modified: head/share/man/man4/uark.4 ============================================================================== --- head/share/man/man4/uark.4 Tue May 9 08:31:34 2017 (r318016) +++ head/share/man/man4/uark.4 Tue May 9 08:36:09 2017 (r318017) @@ -58,17 +58,17 @@ KQ-U8A Data Cable Skymaster USB to RS232 .El .Sh FILES -.Bl -tag -width "/dev/ttyU?.init" -compact -.It Pa /dev/ttyU? +.Bl -tag -width "/dev/ttyU*.init" -compact +.It Pa /dev/ttyU* for callin ports -.It Pa /dev/ttyU?.init -.It Pa /dev/ttyU?.lock +.It Pa /dev/ttyU*.init +.It Pa /dev/ttyU*.lock corresponding callin initial-state and lock-state devices .Pp -.It Pa /dev/cuaU? +.It Pa /dev/cuaU* for callout ports -.It Pa /dev/cuaU?.init -.It Pa /dev/cuaU?.lock +.It Pa /dev/cuaU*.init +.It Pa /dev/cuaU*.lock corresponding callout initial-state and lock-state devices .El .Sh SEE ALSO Modified: head/share/man/man4/ubsa.4 ============================================================================== --- head/share/man/man4/ubsa.4 Tue May 9 08:31:34 2017 (r318016) +++ head/share/man/man4/ubsa.4 Tue May 9 08:36:09 2017 (r318017) @@ -82,17 +82,17 @@ GoHubs GoCOM232 Peracom single port serial adapter .El .Sh FILES -.Bl -tag -width "/dev/ttyU?.init" -compact -.It Pa /dev/ttyU? +.Bl -tag -width "/dev/ttyU*.init" -compact +.It Pa /dev/ttyU* for callin ports -.It Pa /dev/ttyU?.init -.It Pa /dev/ttyU?.lock +.It Pa /dev/ttyU*.init +.It Pa /dev/ttyU*.lock corresponding callin initial-state and lock-state devices .Pp -.It Pa /dev/cuaU? +.It Pa /dev/cuaU* for callout ports -.It Pa /dev/cuaU?.init -.It Pa /dev/cuaU?.lock +.It Pa /dev/cuaU*.init +.It Pa /dev/cuaU*.lock corresponding callout initial-state and lock-state devices .El .Sh SEE ALSO Modified: head/share/man/man4/ubser.4 ============================================================================== --- head/share/man/man4/ubser.4 Tue May 9 08:31:34 2017 (r318016) +++ head/share/man/man4/ubser.4 Tue May 9 08:36:09 2017 (r318017) @@ -55,17 +55,17 @@ The .Nm driver provides support for the BWCT console management serial adapters. .Sh FILES -.Bl -tag -width "/dev/ttyU?.?.init" -compact -.It Pa /dev/ttyU?.? +.Bl -tag -width "/dev/ttyU*.*.init" -compact +.It Pa /dev/ttyU*.* for callin ports -.It Pa /dev/ttyU?.?.init -.It Pa /dev/ttyU?.?.lock +.It Pa /dev/ttyU*.*.init +.It Pa /dev/ttyU*.*.lock corresponding callin initial-state and lock-state devices .Pp -.It Pa /dev/cuaU?.? +.It Pa /dev/cuaU*.* for callout ports -.It Pa /dev/cuaU?.?.init -.It Pa /dev/cuaU?.?.lock +.It Pa /dev/cuaU*.*.init +.It Pa /dev/cuaU*.*.lock corresponding callout initial-state and lock-state devices .El .Sh SEE ALSO Modified: head/share/man/man4/uchcom.4 ============================================================================== --- head/share/man/man4/uchcom.4 Tue May 9 08:31:34 2017 (r318016) +++ head/share/man/man4/uchcom.4 Tue May 9 08:36:09 2017 (r318017) @@ -71,17 +71,17 @@ driver supports the following adapters: HL USB-RS232 .El .Sh FILES -.Bl -tag -width "/dev/ttyU?.init" -compact -.It Pa /dev/ttyU? +.Bl -tag -width "/dev/ttyU*.init" -compact +.It Pa /dev/ttyU* for callin ports -.It Pa /dev/ttyU?.init -.It Pa /dev/ttyU?.lock +.It Pa /dev/ttyU*.init +.It Pa /dev/ttyU*.lock corresponding callin initial-state and lock-state devices .Pp -.It Pa /dev/cuaU? +.It Pa /dev/cuaU* for callout ports -.It Pa /dev/cuaU?.init -.It Pa /dev/cuaU?.lock +.It Pa /dev/cuaU*.init +.It Pa /dev/cuaU*.lock corresponding callout initial-state and lock-state devices .El .Sh SEE ALSO Modified: head/share/man/man4/ucom.4 ============================================================================== --- head/share/man/man4/ucom.4 Tue May 9 08:31:34 2017 (r318016) +++ head/share/man/man4/ucom.4 Tue May 9 08:36:09 2017 (r318017) @@ -92,17 +92,17 @@ Capture pulses on the CTS line. Capture pulses on the DCD line. .El .Sh FILES -.Bl -tag -width "/dev/ttyU?.init" -compact -.It Pa /dev/ttyU? +.Bl -tag -width "/dev/ttyU*.init" -compact +.It Pa /dev/ttyU* for callin ports -.It Pa /dev/ttyU?.init -.It Pa /dev/ttyU?.lock +.It Pa /dev/ttyU*.init +.It Pa /dev/ttyU*.lock corresponding callin initial-state and lock-state devices .Pp -.It Pa /dev/cuaU? +.It Pa /dev/cuaU* for callout ports -.It Pa /dev/cuaU?.init -.It Pa /dev/cuaU?.lock +.It Pa /dev/cuaU*.init +.It Pa /dev/cuaU*.lock corresponding callout initial-state and lock-state devices .El .Sh SEE ALSO Modified: head/share/man/man4/ucycom.4 ============================================================================== --- head/share/man/man4/ucycom.4 Tue May 9 08:31:34 2017 (r318016) +++ head/share/man/man4/ucycom.4 Tue May 9 08:36:09 2017 (r318017) @@ -72,17 +72,17 @@ Cypress USB to RS232 bridge chips: DeLorme Earthmate USB GPS receiver .El .Sh FILES -.Bl -tag -width "/dev/ttyU?.init" -compact -.It Pa /dev/ttyU? +.Bl -tag -width "/dev/ttyU*.init" -compact +.It Pa /dev/ttyU* for callin ports -.It Pa /dev/ttyU?.init -.It Pa /dev/ttyU?.lock +.It Pa /dev/ttyU*.init +.It Pa /dev/ttyU*.lock corresponding callin initial-state and lock-state devices .Pp -.It Pa /dev/cuaU? +.It Pa /dev/cuaU* for callout ports -.It Pa /dev/cuaU?.init -.It Pa /dev/cuaU?.lock +.It Pa /dev/cuaU*.init +.It Pa /dev/cuaU*.lock corresponding callout initial-state and lock-state devices .El .Sh SEE ALSO Modified: head/share/man/man4/uftdi.4 ============================================================================== --- head/share/man/man4/uftdi.4 Tue May 9 08:31:34 2017 (r318016) +++ head/share/man/man4/uftdi.4 Tue May 9 08:36:09 2017 (r318017) @@ -243,17 +243,17 @@ Buffalo PC-OP-RS / Kurouto-shikou KURO-R Prologix GPIB-USB Controller .El .Sh FILES -.Bl -tag -width "/dev/ttyU?.init" -compact -.It Pa /dev/ttyU? +.Bl -tag -width "/dev/ttyU*.init" -compact +.It Pa /dev/ttyU* for callin ports -.It Pa /dev/ttyU?.init -.It Pa /dev/ttyU?.lock +.It Pa /dev/ttyU*.init +.It Pa /dev/ttyU*.lock corresponding callin initial-state and lock-state devices .Pp -.It Pa /dev/cuaU? +.It Pa /dev/cuaU* for callout ports -.It Pa /dev/cuaU?.init -.It Pa /dev/cuaU?.lock +.It Pa /dev/cuaU*.init +.It Pa /dev/cuaU*.lock corresponding callout initial-state and lock-state devices .El .Sh SEE ALSO Modified: head/share/man/man4/uipaq.4 ============================================================================== --- head/share/man/man4/uipaq.4 Tue May 9 08:31:34 2017 (r318016) +++ head/share/man/man4/uipaq.4 Tue May 9 08:36:09 2017 (r318017) @@ -80,17 +80,17 @@ The device is accessed through the driver which makes it behave like a .Xr tty 4 . .Sh FILES -.Bl -tag -width "/dev/ttyU?.init" -compact -.It Pa /dev/ttyU? +.Bl -tag -width "/dev/ttyU*.init" -compact +.It Pa /dev/ttyU* for callin ports -.It Pa /dev/ttyU?.init -.It Pa /dev/ttyU?.lock +.It Pa /dev/ttyU*.init +.It Pa /dev/ttyU*.lock corresponding callin initial-state and lock-state devices .Pp -.It Pa /dev/cuaU? +.It Pa /dev/cuaU* for callout ports -.It Pa /dev/cuaU?.init -.It Pa /dev/cuaU?.lock +.It Pa /dev/cuaU*.init +.It Pa /dev/cuaU*.lock corresponding callout initial-state and lock-state devices .El .Sh SEE ALSO Modified: head/share/man/man4/umcs.4 ============================================================================== --- head/share/man/man4/umcs.4 Tue May 9 08:31:34 2017 (r318016) +++ head/share/man/man4/umcs.4 Tue May 9 08:36:09 2017 (r318017) @@ -81,17 +81,17 @@ ST Lab U-360 two-port serial USB adapter ST Lab U-400 four-port serial USB adapter .El .Sh FILES -.Bl -tag -width "/dev/ttyU?.?.init" -compact -.It Pa /dev/ttyU?.? +.Bl -tag -width "/dev/ttyU*.*.init" -compact +.It Pa /dev/ttyU*.* for callin ports -.It Pa /dev/ttyU?.?.init -.It Pa /dev/ttyU?.?.lock +.It Pa /dev/ttyU*.*.init +.It Pa /dev/ttyU*.*.lock corresponding callin initial-state and lock-state devices .Pp -.It Pa /dev/cuaU?.? +.It Pa /dev/cuaU*.* for callout ports -.It Pa /dev/cuaU?.?.init -.It Pa /dev/cuaU?.?.lock +.It Pa /dev/cuaU*.*.init +.It Pa /dev/cuaU*.*.lock corresponding callout initial-state and lock-state devices .El .Sh SEE ALSO Modified: head/share/man/man4/umct.4 ============================================================================== --- head/share/man/man4/umct.4 Tue May 9 08:31:34 2017 (r318016) +++ head/share/man/man4/umct.4 Tue May 9 08:36:09 2017 (r318017) @@ -79,17 +79,17 @@ Magic Control Technology USB-232 Sitecom USB-232 .El .Sh FILES -.Bl -tag -width "/dev/ttyU?.init" -compact -.It Pa /dev/ttyU? +.Bl -tag -width "/dev/ttyU*.init" -compact +.It Pa /dev/ttyU* for callin ports -.It Pa /dev/ttyU?.init -.It Pa /dev/ttyU?.lock +.It Pa /dev/ttyU*.init +.It Pa /dev/ttyU*.lock corresponding callin initial-state and lock-state devices .Pp -.It Pa /dev/cuaU? +.It Pa /dev/cuaU* for callout ports -.It Pa /dev/cuaU?.init -.It Pa /dev/cuaU?.lock +.It Pa /dev/cuaU*.init +.It Pa /dev/cuaU*.lock corresponding callout initial-state and lock-state devices .El .Sh SEE ALSO Modified: head/share/man/man4/umodem.4 ============================================================================== --- head/share/man/man4/umodem.4 Tue May 9 08:31:34 2017 (r318016) +++ head/share/man/man4/umodem.4 Tue May 9 08:36:09 2017 (r318017) @@ -96,17 +96,17 @@ Sony Ericsson W810i phone Sonim XP5300 Force .El .Sh FILES -.Bl -tag -width "/dev/ttyU?.init" -compact -.It Pa /dev/ttyU? +.Bl -tag -width "/dev/ttyU*.init" -compact +.It Pa /dev/ttyU* for callin ports -.It Pa /dev/ttyU?.init -.It Pa /dev/ttyU?.lock +.It Pa /dev/ttyU*.init +.It Pa /dev/ttyU*.lock corresponding callin initial-state and lock-state devices .Pp -.It Pa /dev/cuaU? +.It Pa /dev/cuaU* for callout ports -.It Pa /dev/cuaU?.init -.It Pa /dev/cuaU?.lock +.It Pa /dev/cuaU*.init +.It Pa /dev/cuaU*.lock corresponding callout initial-state and lock-state devices .El .Sh SEE ALSO Modified: head/share/man/man4/umoscom.4 ============================================================================== --- head/share/man/man4/umoscom.4 Tue May 9 08:31:34 2017 (r318016) +++ head/share/man/man4/umoscom.4 Tue May 9 08:36:09 2017 (r318017) @@ -57,17 +57,17 @@ The device is accessed through the driver which makes it behave like a .Xr tty 4 . .Sh FILES -.Bl -tag -width "/dev/ttyU?.init" -compact -.It Pa /dev/ttyU? +.Bl -tag -width "/dev/ttyU*.init" -compact +.It Pa /dev/ttyU* for callin ports -.It Pa /dev/ttyU?.init -.It Pa /dev/ttyU?.lock +.It Pa /dev/ttyU*.init +.It Pa /dev/ttyU*.lock corresponding callin initial-state and lock-state devices .Pp -.It Pa /dev/cuaU? +.It Pa /dev/cuaU* for callout ports -.It Pa /dev/cuaU?.init -.It Pa /dev/cuaU?.lock +.It Pa /dev/cuaU*.init +.It Pa /dev/cuaU*.lock corresponding callout initial-state and lock-state devices .El .Sh SEE ALSO Modified: head/share/man/man4/uplcom.4 ============================================================================== --- head/share/man/man4/uplcom.4 Tue May 9 08:31:34 2017 (r318016) +++ head/share/man/man4/uplcom.4 Tue May 9 08:36:09 2017 (r318017) @@ -181,17 +181,17 @@ YC-Cable USB-Serial Adapter Zeagle N2iTion3 Diving Computer .El .Sh FILES -.Bl -tag -width "/dev/ttyU?.init" -compact -.It Pa /dev/ttyU? +.Bl -tag -width "/dev/ttyU*.init" -compact +.It Pa /dev/ttyU* for callin ports -.It Pa /dev/ttyU?.init -.It Pa /dev/ttyU?.lock +.It Pa /dev/ttyU*.init +.It Pa /dev/ttyU*.lock corresponding callin initial-state and lock-state devices .Pp -.It Pa /dev/cuaU? +.It Pa /dev/cuaU* for callout ports -.It Pa /dev/cuaU?.init -.It Pa /dev/cuaU?.lock +.It Pa /dev/cuaU*.init +.It Pa /dev/cuaU*.lock corresponding callout initial-state and lock-state devices .El .Sh SEE ALSO Modified: head/share/man/man4/uslcom.4 ============================================================================== --- head/share/man/man4/uslcom.4 Tue May 9 08:31:34 2017 (r318016) +++ head/share/man/man4/uslcom.4 Tue May 9 08:36:09 2017 (r318017) @@ -193,17 +193,17 @@ WMR RIGblaster Plug&Play and RIGtalk RT1 Zephyr Bioharness .El .Sh FILES -.Bl -tag -width "/dev/ttyU?.init" -compact -.It Pa /dev/ttyU? +.Bl -tag -width "/dev/ttyU*.init" -compact +.It Pa /dev/ttyU* for callin ports -.It Pa /dev/ttyU?.init -.It Pa /dev/ttyU?.lock +.It Pa /dev/ttyU*.init +.It Pa /dev/ttyU*.lock corresponding callin initial-state and lock-state devices .Pp -.It Pa /dev/cuaU? +.It Pa /dev/cuaU* for callout ports -.It Pa /dev/cuaU?.init -.It Pa /dev/cuaU?.lock +.It Pa /dev/cuaU*.init +.It Pa /dev/cuaU*.lock corresponding callout initial-state and lock-state devices .El .Sh SEE ALSO Modified: head/share/man/man4/uvisor.4 ============================================================================== --- head/share/man/man4/uvisor.4 Tue May 9 08:31:34 2017 (r318016) +++ head/share/man/man4/uvisor.4 Tue May 9 08:36:09 2017 (r318017) @@ -119,17 +119,17 @@ Sony Clie S360 Sony Clie TJ37 .El .Sh FILES -.Bl -tag -width "/dev/ttyU?.init" -compact -.It Pa /dev/ttyU? +.Bl -tag -width "/dev/ttyU*.init" -compact +.It Pa /dev/ttyU* for callin ports -.It Pa /dev/ttyU?.init -.It Pa /dev/ttyU?.lock +.It Pa /dev/ttyU*.init +.It Pa /dev/ttyU*.lock corresponding callin initial-state and lock-state devices .Pp -.It Pa /dev/cuaU? +.It Pa /dev/cuaU* for callout ports -.It Pa /dev/cuaU?.init -.It Pa /dev/cuaU?.lock +.It Pa /dev/cuaU*.init +.It Pa /dev/cuaU*.lock corresponding callout initial-state and lock-state devices .El .Sh SEE ALSO Modified: head/share/man/man4/uvscom.4 ============================================================================== --- head/share/man/man4/uvscom.4 Tue May 9 08:31:34 2017 (r318016) +++ head/share/man/man4/uvscom.4 Tue May 9 08:36:09 2017 (r318017) @@ -78,17 +78,17 @@ The device is accessed through the driver which makes it behave like a .Xr tty 4 . .Sh FILES -.Bl -tag -width "/dev/ttyU?.init" -compact -.It Pa /dev/ttyU? +.Bl -tag -width "/dev/ttyU*.init" -compact +.It Pa /dev/ttyU* for callin ports -.It Pa /dev/ttyU?.init -.It Pa /dev/ttyU?.lock +.It Pa /dev/ttyU*.init +.It Pa /dev/ttyU*.lock corresponding callin initial-state and lock-state devices .Pp -.It Pa /dev/cuaU? +.It Pa /dev/cuaU* for callout ports -.It Pa /dev/cuaU?.init -.It Pa /dev/cuaU?.lock +.It Pa /dev/cuaU*.init +.It Pa /dev/cuaU*.lock corresponding callout initial-state and lock-state devices .Sh SEE ALSO .Xr tty 4 , From owner-svn-src-all@freebsd.org Tue May 9 09:10:01 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6B59AD6523E; Tue, 9 May 2017 09:10:01 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2FD4C185D; Tue, 9 May 2017 09:10:01 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 185B56DCD; Tue, 9 May 2017 09:09:13 +0000 (UTC) Date: Tue, 9 May 2017 09:09:13 +0000 From: Alexey Dokuchaev To: "Bjoern A. Zeeb" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r318015 - head/sys/net Message-ID: <20170509090913.GA38187@FreeBSD.org> References: <201705090829.v498TtXb031887@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201705090829.v498TtXb031887@repo.freebsd.org> User-Agent: Mutt/1.7.1 (2016-10-04) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 09:10:01 -0000 On Tue, May 09, 2017 at 08:29:55AM +0000, Bjoern A. Zeeb wrote: > New Revision: 318015 > URL: https://svnweb.freebsd.org/changeset/base/318015 > > Log: > Adjust a comment. > > Modified: > head/sys/net/iflib.c > > Modified: head/sys/net/iflib.c > ============================================================================== > --- head/sys/net/iflib.c Tue May 9 08:08:28 2017 (r318014) > +++ head/sys/net/iflib.c Tue May 9 08:29:55 2017 (r318015) > @@ -5214,7 +5214,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 Commit message does not explain why this adjustment was necessary. At least a light hint what was wrong with that URL would be appropriate. ./danfe From owner-svn-src-all@freebsd.org Tue May 9 09:53:20 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue May 9 10:09:18 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5D2ADD631D2; Tue, 9 May 2017 10:09:18 +0000 (UTC) (envelope-from royger@gmail.com) Received: from mail-qk0-x22e.google.com (mail-qk0-x22e.google.com [IPv6:2607:f8b0:400d:c09::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 00C891FD1; Tue, 9 May 2017 10:09:17 +0000 (UTC) (envelope-from royger@gmail.com) Received: by mail-qk0-x22e.google.com with SMTP id a72so58089493qkj.2; Tue, 09 May 2017 03:09:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=pVrFE1xF34rK4krEsRGJ9Xao9emvlBrs+R2VvBT6NoQ=; b=cDPkZGd68S61rlreR3ucUGq9bHR8qbr9WRs+l4HT23tTW9iBVobyaNYSJc20rsDFjb jiWdt63Cft6h5SCaSn9Hon1R/d5Wlnhbqrx59//o3YbyXo6HXK7ofIdZrn554S0ybZzk kBbF3PfukL1k9C+FTIyG3f+7aNqJXNoJRdg3yIsEvaact7hGclNK8ZfvXwRMOjWvZnKs DRW5SXi+enF+663na4A2+wwujWVcAE9L6RvA/Pfz+j7mK3FFwwIvtLtMtn/g7eAV03Lt 3H3LRo9djJKSl4zAKC+1jJF92dpyPufCLvr45RtbiAT2YhVltT9z9B98dijbedvmOtos u2ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=pVrFE1xF34rK4krEsRGJ9Xao9emvlBrs+R2VvBT6NoQ=; b=Jcy5gnKsW6mkBxYxQW1XFMf+KMc44SFP+eT9PfZh+RypAk5h3njpAPL9T7OVRaJiBD Iy3o3q+LylRzMZkRbDmRrnIxajcMm45nZZbICSZ8JDNV1n+aaTNXDKrrAGAZuyImeihB KYyPwjs2/nYa8NDg3aULd5R7+85nAxdRk/Sb3owGiyY/QSturp49YxVcrD0XxrOi6K7I C92n2ohOnVgdLCff+5ah1NyNOIcBLk0AOncBHvop0NH6kj1b8NOeEO6F/AJUWYJgdAFF 0IJ0qIliuKF3YgQraacb/6BCdOoQT1jBCgCLV99MPUuEaR3nqQ2xMbdsdYwgErdklLeA Bc5A== X-Gm-Message-State: AN3rC/4s7p60M1USDcQ6mOH2hvJXRpMVPmyt8EDJKnl9n0RMLUkXytcB UtyB19WYU03AGGTk X-Received: by 10.80.146.51 with SMTP id i48mr25038295eda.48.1494324556951; Tue, 09 May 2017 03:09:16 -0700 (PDT) Received: from localhost (default-46-102-197-194.interdsl.co.uk. [46.102.197.194]) by smtp.gmail.com with ESMTPSA id z27sm4924832edb.54.2017.05.09.03.09.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 May 2017 03:09:16 -0700 (PDT) Sender: =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= Date: Tue, 9 May 2017 11:09:12 +0100 From: Roger Pau =?iso-8859-1?Q?Monn=E9?= To: Colin Percival Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r301198 - head/sys/dev/xen/netfront Message-ID: <20170509100912.h3ylwugahvfi5cc2@dhcp-3-128.uk.xensource.com> References: <201606021116.u52BGajD047287@repo.freebsd.org> <0100015bccba6abc-4c3b1487-25e3-4640-8221-885341ece829-000000@email.amazonses.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <0100015bccba6abc-4c3b1487-25e3-4640-8221-885341ece829-000000@email.amazonses.com> User-Agent: NeoMutt/20170428 (1.8.2) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 10:09:18 -0000 On Wed, May 03, 2017 at 05:13:40AM +0000, Colin Percival wrote: > On 06/02/16 04:16, Roger Pau Monné wrote: > > Author: royger > > Date: Thu Jun 2 11:16:35 2016 > > New Revision: 301198 > > URL: https://svnweb.freebsd.org/changeset/base/301198 > > I think this commit is responsible for panics I'm seeing in EC2 on T2 family > instances. Every time a DHCP request is made, we call into xn_ifinit_locked > (not sure why -- something to do with making the interface promiscuous?) and > hit this code > > > @@ -1760,7 +1715,7 @@ xn_ifinit_locked(struct netfront_info *n > > xn_alloc_rx_buffers(rxq); > > rxq->ring.sring->rsp_event = rxq->ring.rsp_cons + 1; > > if (RING_HAS_UNCONSUMED_RESPONSES(&rxq->ring)) > > - taskqueue_enqueue(rxq->tq, &rxq->intrtask); > > + xn_rxeof(rxq); > > XN_RX_UNLOCK(rxq); > > } > > but under high traffic volumes I think a separate thread can already be > running in xn_rxeof, having dropped the RX lock while it passes a packet > up the stack. This would result in two different threads trying to process > the same set of responses from the ring, with (unsurprisingly) bad results. Hm, right, xn_rxeof drops the lock while pushing the packet up the stack. There's a "XXX" comment on top of that, could you try to remove the lock dripping and see what happens? I'm not sure there's any reason to drop the lock here, I very much doubt if_input is going to sleep. > I'm not 100% sure that this is what's causing the panic, but it's definitely > happening under high traffic conditions immediately after xn_ifinit_locked is > called, so I think my speculation is well-founded. > > There are a few things I don't understand here: > 1. Why DHCP requests are resulting in calls into xn_ifinit_locked. Maybe DHCP flaps the interface up and down? TBH I have no idea. Enabling/disabling certain features (CSUM, TSO) will also cause the interface to reconnect, which might cause incoming packets to get stuck in the RX ring. > 2. Why the calls into xn_ifinit_locked are only happening on T2 instances > and not on any of the other EC2 instances I've tried. Maybe T2 instances are on a more noisy environment? That I'm afraid I have no idea. > 3. Why xn_ifinit_locked is consuming ring responses. There might be pending RX packets on the ring, so netfront consumes them and signals netback. In the unlikely event that the RX ring was full when xn_ifinit_locked is called, not doing this would mean the RX queue would get stuck forever, since there's no guarantee netfront will receive event channel notifications. > so I'm not sure what the solution is, but hopefully someone who knows this > code better will be able to help... My first try would be to disable dropping the lock in xn_rxeof, I think that is utterly incorrect. That should prevent multiple consumers from pocking at the ring at the same time. Roger. From owner-svn-src-all@freebsd.org Tue May 9 11:05:34 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1E38BD6544A; Tue, 9 May 2017 11:05:34 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 AA27C1736; Tue, 9 May 2017 11:05:33 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49B5W7V097954; Tue, 9 May 2017 11:05:32 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49B5WAp097952; Tue, 9 May 2017 11:05:32 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201705091105.v49B5WAp097952@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Tue, 9 May 2017 11:05:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318021 - in head/sys/arm: arm include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 11:05:34 -0000 Author: mmel Date: Tue May 9 11:05:32 2017 New Revision: 318021 URL: https://svnweb.freebsd.org/changeset/base/318021 Log: Introduce pmap_remap_vm_attr(), it allows to remap one VM memattr class to another. This function is intent to be used as workaround for various SoC bugs, mainly access ordering/sequencing related bugs in crossbar fabric. Inspired by: https://reviews.freebsd.org/D10218 MFC after: 2 weeks Modified: head/sys/arm/arm/pmap-v6.c head/sys/arm/include/pmap-v6.h Modified: head/sys/arm/arm/pmap-v6.c ============================================================================== --- head/sys/arm/arm/pmap-v6.c Tue May 9 10:42:23 2017 (r318020) +++ head/sys/arm/arm/pmap-v6.c Tue May 9 11:05:32 2017 (r318021) @@ -498,6 +498,25 @@ pmap_set_tex(void) } /* + * Remap one vm_meattr class to another one. This can be useful as + * workaround for SOC errata, e.g. if devices must be accessed using + * SO memory class. + */ +void +pmap_remap_vm_attr(vm_memattr_t old_attr, vm_memattr_t new_attr) +{ + int old_idx, new_idx; + + /* Map VM memattrs to indexes to tex_class table. */ + old_idx = pte2_attr_tab[(int)old_attr]; + new_idx = pte2_attr_tab[(int)new_attr]; + + /* Replace TEX attribute and apply it. */ + tex_class[old_idx] = tex_class[new_idx]; + pmap_set_tex(); +} + +/* * KERNBASE must be multiple of NPT2_IN_PG * PTE1_SIZE. In other words, * KERNBASE is mapped by first L2 page table in L2 page table page. It * meets same constrain due to PT2MAP being placed just under KERNBASE. Modified: head/sys/arm/include/pmap-v6.h ============================================================================== --- head/sys/arm/include/pmap-v6.h Tue May 9 10:42:23 2017 (r318020) +++ head/sys/arm/include/pmap-v6.h Tue May 9 11:05:32 2017 (r318021) @@ -188,6 +188,7 @@ vm_offset_t pmap_preboot_reserve_pages(u vm_offset_t pmap_preboot_get_vpages(u_int); void pmap_preboot_map_attr(vm_paddr_t, vm_offset_t, vm_size_t, vm_prot_t, vm_memattr_t); +void pmap_remap_vm_attr(vm_memattr_t old_attr, vm_memattr_t new_attr); #endif /* _KERNEL */ #endif /* !_MACHINE_PMAP_V6_H_ */ From owner-svn-src-all@freebsd.org Tue May 9 11:44:37 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C6E67D65E0F; Tue, 9 May 2017 11:44:37 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from fry.fubar.geek.nz (fry.fubar.geek.nz [139.59.165.16]) by mx1.freebsd.org (Postfix) with ESMTP id 8A5221DA3; Tue, 9 May 2017 11:44:36 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from [10.0.0.68] (host81-149-102-120.in-addr.btopenworld.com [81.149.102.120]) by fry.fubar.geek.nz (Postfix) with ESMTPSA id 3CDF54E76E; Tue, 9 May 2017 11:34:12 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: svn commit: r318021 - in head/sys/arm: arm include From: Andrew Turner In-Reply-To: <201705091105.v49B5WAp097952@repo.freebsd.org> Date: Tue, 9 May 2017 12:34:10 +0100 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <85745E3A-3260-43C7-B134-85BFED786D55@fubar.geek.nz> References: <201705091105.v49B5WAp097952@repo.freebsd.org> To: Michal Meloun X-Mailer: Apple Mail (2.3273) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 11:44:37 -0000 > On 9 May 2017, at 12:05, Michal Meloun wrote: >=20 > Author: mmel > Date: Tue May 9 11:05:32 2017 > New Revision: 318021 > URL: https://svnweb.freebsd.org/changeset/base/318021 >=20 > Log: > Introduce pmap_remap_vm_attr(), > it allows to remap one VM memattr class to another. >=20 > This function is intent to be used as workaround for various SoC = bugs, > mainly access ordering/sequencing related bugs in crossbar fabric. This seems quite heavy handed to change the attribute for all memory of = a given type. Other architectures have pmap_change_attr to change the = attribute on a specific range of memory. Andrew From owner-svn-src-all@freebsd.org Tue May 9 12:14:02 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1E675D63FFA; Tue, 9 May 2017 12:14:02 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 B67F6936; Tue, 9 May 2017 12:14:01 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49CE0Jj027101; Tue, 9 May 2017 12:14:00 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49CE05T027096; Tue, 9 May 2017 12:14:00 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201705091214.v49CE05T027096@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Tue, 9 May 2017 12:14:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318024 - in head: contrib/gcc contrib/gcc/config/arm sys/arm/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 12:14:02 -0000 Author: mmel Date: Tue May 9 12:14:00 2017 New Revision: 318024 URL: https://svnweb.freebsd.org/changeset/base/318024 Log: Fix _Unwind_Backtrace symbol version for ARM. In real GNU libgcc, _Unwind_Backtrace is published with GCC_3.3 version for all architectures but ARM. For ARM it's publishes with GCC_4.3.0 version. This exception is not implement in your version of libggc, thus we export _Unwind_Backtrace with bad version. To maintain backward compatibility, publish _Unwind_Backtrace twice, once as compatible symbol with GCC_3.3 version, and once as default symbol with GCC_4.3.0 version. While I'm in, fix typo in GCC_4.2.0 to GCC_4.3.0 inheritance declaration. MFC after: 2 weeks Modified: head/contrib/gcc/config/arm/libgcc-bpabi.ver head/contrib/gcc/config/arm/libunwind-arm.S head/contrib/gcc/libgcc-std.ver head/sys/arm/conf/std.armv6 Modified: head/contrib/gcc/config/arm/libgcc-bpabi.ver ============================================================================== --- head/contrib/gcc/config/arm/libgcc-bpabi.ver Tue May 9 12:08:54 2017 (r318023) +++ head/contrib/gcc/config/arm/libgcc-bpabi.ver Tue May 9 12:14:00 2017 (r318024) @@ -81,3 +81,11 @@ GCC_3.5 { # GNU-specific entry point. __gnu_unwind_frame } + +%exclude { + _Unwind_Backtrace +} + +GCC_4.3.0 { + _Unwind_Backtrace +} Modified: head/contrib/gcc/config/arm/libunwind-arm.S ============================================================================== --- head/contrib/gcc/config/arm/libunwind-arm.S Tue May 9 12:08:54 2017 (r318023) +++ head/contrib/gcc/config/arm/libunwind-arm.S Tue May 9 12:14:00 2017 (r318024) @@ -133,4 +133,22 @@ UNWIND_WRAPPER _Unwind_Resume_or_Rethrow UNWIND_WRAPPER _Unwind_ForcedUnwind 3 UNWIND_WRAPPER _Unwind_Backtrace 2 +/* + * Originally, we incorrectly export _Unwind_Backtrace symbol + * with GCC_3.3 version, but real GCC libgcc export it as GCC_4.3.0. + * To maintain backward compatibility, export it with both versions where + * GCC_4.3.0 is default one. + * + * The workaround is complicated by next two issues: + * - old GNU ld cannot handle two (or more) symbol versions + * targeting same function. + * - the .weakref crashes clang 4.0 + */ + .globl SYM(_Unwind_Backtrace33) + TYPE(_Unwind_Backtrace33) +SYM(_Unwind_Backtrace33): + b _Unwind_Backtrace + + .symver SYM(_Unwind_Backtrace33),_Unwind_Backtrace@GCC_3.3 + #endif /* ndef __symbian__ */ Modified: head/contrib/gcc/libgcc-std.ver ============================================================================== --- head/contrib/gcc/libgcc-std.ver Tue May 9 12:08:54 2017 (r318023) +++ head/contrib/gcc/libgcc-std.ver Tue May 9 12:14:00 2017 (r318024) @@ -275,7 +275,7 @@ GCC_4.2.0 { _Unwind_GetIPInfo } -%inherit GCC_4.3 GCC_4.2.0 +%inherit GCC_4.3.0 GCC_4.2.0 GCC_4.3.0 { # byte swapping routines __bswapsi2 Modified: head/sys/arm/conf/std.armv6 ============================================================================== --- head/sys/arm/conf/std.armv6 Tue May 9 12:08:54 2017 (r318023) +++ head/sys/arm/conf/std.armv6 Tue May 9 12:14:00 2017 (r318024) @@ -68,10 +68,10 @@ options USB_DEBUG # Enable usb debug s # Optional extras, never enabled by default: #options BOOTVERBOSE #options DEBUG # May result in extreme spewage -#options KTR -#options KTR_COMPILE=KTR_ALL -#options KTR_ENTRIES=16384 -#options KTR_MASK=(KTR_SPARE2) +options KTR +options KTR_COMPILE=KTR_ALL +options KTR_ENTRIES=163840 +options KTR_MASK=(KTR_SPARE3) #options KTR_VERBOSE=0 #options USB_REQ_DEBUG #options USB_VERBOSE From owner-svn-src-all@freebsd.org Tue May 9 12:32:33 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DBB35D6462D; Tue, 9 May 2017 12:32:33 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 41AC31C1A; Tue, 9 May 2017 12:32:33 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49CWWeR035574; Tue, 9 May 2017 12:32:32 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49CWWe9035573; Tue, 9 May 2017 12:32:32 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201705091232.v49CWWe9035573@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Tue, 9 May 2017 12:32:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318025 - head/sys/arm/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 12:32:34 -0000 Author: mmel Date: Tue May 9 12:32:31 2017 New Revision: 318025 URL: https://svnweb.freebsd.org/changeset/base/318025 Log: Revert accidentally changed std.armv6 in r318024. MFC with: r318024 MFC after: 2 weeks Modified: head/sys/arm/conf/std.armv6 Modified: head/sys/arm/conf/std.armv6 ============================================================================== --- head/sys/arm/conf/std.armv6 Tue May 9 12:14:00 2017 (r318024) +++ head/sys/arm/conf/std.armv6 Tue May 9 12:32:31 2017 (r318025) @@ -68,10 +68,10 @@ options USB_DEBUG # Enable usb debug s # Optional extras, never enabled by default: #options BOOTVERBOSE #options DEBUG # May result in extreme spewage -options KTR -options KTR_COMPILE=KTR_ALL -options KTR_ENTRIES=163840 -options KTR_MASK=(KTR_SPARE3) +#options KTR +#options KTR_COMPILE=KTR_ALL +#options KTR_ENTRIES=16384 +#options KTR_MASK=(KTR_SPARE2) #options KTR_VERBOSE=0 #options USB_REQ_DEBUG #options USB_VERBOSE From owner-svn-src-all@freebsd.org Tue May 9 12:40:30 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D8EF0D64822; Tue, 9 May 2017 12:40:30 +0000 (UTC) (envelope-from melounmichal@gmail.com) Received: from mail-wr0-x243.google.com (mail-wr0-x243.google.com [IPv6:2a00:1450:400c:c0c::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5D1DD1811; Tue, 9 May 2017 12:40:30 +0000 (UTC) (envelope-from melounmichal@gmail.com) Received: by mail-wr0-x243.google.com with SMTP id w50so13423733wrc.0; Tue, 09 May 2017 05:40:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:reply-to:subject:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=8XhwPgEAjDqG+SMjMMGRMzj+7VkuQFdXQP/t2ClmDXU=; b=GAjh88nuZoPOx040vvW/9gsFuoaTnobB1b1qcPtDl2LUN7Mu0Hs3fn5pXe/m2U5AbP wTALv3n2JW5UiDT3L1MWZFlJO+pWBqgGUGJSXzgfdBydqx0QYKrRBTcLq4GJC9++r6A4 RQZ5DkQkA7JhDC7eIilxiVK24mzWhth9T4ULYg/sxgG+7wrRyBkw3rOfpZfjuW6LNtuW +2EIYrqoorqcW0TxgYUrDgkjCAm4tFpVMWcFQYdNrqCn3066XX1A0XosibX/uPNY16LY SBmrPY1GhG9XgZtsZMQyy87a7SWmKdibOIyq7pq4lBcDBrKt6v8T65q30gyZSXOznWr3 m/qA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:reply-to:subject:to:cc:references :message-id:date:user-agent:mime-version:in-reply-to :content-transfer-encoding:content-language; bh=8XhwPgEAjDqG+SMjMMGRMzj+7VkuQFdXQP/t2ClmDXU=; b=tP6CHqG73dVvB62uy7MYXoEzCp2zUxAeQnIJA7GDPya0yr7+I51gvIITqP04rSADqt o3dWgMGpPPESaZUl2BiCTmiJ4QfbV11LACNVWfZtfHwquBmIqD/4GwyqK6aDV914P5Qg CF76/I96HtQaj8o40zy3aVkDYyB5X0Aboo0vvKk7zS+1Niveos2Rv0ANHLLv9GXN/4Ug z6OqKAilouw8mdbrbhvj7dzbyBR2bq++70ltyT2WLygkE9KLTTFD3RG8ASe1TJzA7sm9 8XHvaeIMQ6YH7cn2FKoQpYfk5h7i71FQWS78hk6d8Ce7BJOfjduN0Dfa2+rqik5MWe2S w4Cg== X-Gm-Message-State: AODbwcCkjZxSm2t4s4VaW57JqrLiGuE7IEzltd9ajGBNl1lVzsrgJ3eg yH7/2pr4N8XovQLOPbkRpA== X-Received: by 10.28.58.16 with SMTP id h16mr1639380wma.131.1494333628431; Tue, 09 May 2017 05:40:28 -0700 (PDT) Received: from [88.208.79.100] (halouny.humusoft.cz. [88.208.79.100]) by smtp.gmail.com with ESMTPSA id g25sm23515693wra.1.2017.05.09.05.40.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 May 2017 05:40:27 -0700 (PDT) From: Michal Meloun X-Google-Original-From: Michal Meloun Reply-To: mmel@freebsd.org Subject: Re: svn commit: r318021 - in head/sys/arm: arm include To: Andrew Turner Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201705091105.v49B5WAp097952@repo.freebsd.org> <85745E3A-3260-43C7-B134-85BFED786D55@fubar.geek.nz> Message-ID: <8fe20c26-3c0c-98ce-227b-740491253047@freebsd.org> Date: Tue, 9 May 2017 14:40:29 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 MIME-Version: 1.0 In-Reply-To: <85745E3A-3260-43C7-B134-85BFED786D55@fubar.geek.nz> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 12:40:31 -0000 On 09.05.2017 13:34, Andrew Turner wrote: >> On 9 May 2017, at 12:05, Michal Meloun wrote: >> >> Author: mmel >> Date: Tue May 9 11:05:32 2017 >> New Revision: 318021 >> URL: https://svnweb.freebsd.org/changeset/base/318021 >> >> Log: >> Introduce pmap_remap_vm_attr(), >> it allows to remap one VM memattr class to another. >> >> This function is intent to be used as workaround for various SoC bugs, >> mainly access ordering/sequencing related bugs in crossbar fabric. > This seems quite heavy handed to change the attribute for all memory of a given type. Yes, exactly. See comment in D10218 - /* * Workaround for Marvell Armada38X family HW issue * between Cortex-A9 CPUs and on-chip devices that may * cause hang on heavy load. * To avoid that, map all registers including PCIe IO * as strongly ordered instead of device memory. */ > Other architectures have pmap_change_attr to change the attribute on a specific range of memory. Right. Problem is that I don't known any method how we can change memory attribute for live memory in SMP system, without hitting undefined behavior. Michal From owner-svn-src-all@freebsd.org Tue May 9 12:51:44 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2159ED64DA0; Tue, 9 May 2017 12:51:44 +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 DF5B3C68; Tue, 9 May 2017 12:51:43 +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 v49Cpg8D041453; Tue, 9 May 2017 12:51:42 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49Cpg0l041452; Tue, 9 May 2017 12:51:42 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201705091251.v49Cpg0l041452@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 9 May 2017 12:51:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318026 - head/sys/compat/linuxkpi/common/src X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 12:51:44 -0000 Author: hselasky Date: Tue May 9 12:51:42 2017 New Revision: 318026 URL: https://svnweb.freebsd.org/changeset/base/318026 Log: Fix init order in the LinuxKPI for RCU support. CPU_FOREACH() is not available until SI_SUB_CPU at SI_ORDER_ANY when the LinuxKPI is loaded as part of the kernel. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/src/linux_rcu.c Modified: head/sys/compat/linuxkpi/common/src/linux_rcu.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_rcu.c Tue May 9 12:32:31 2017 (r318025) +++ head/sys/compat/linuxkpi/common/src/linux_rcu.c Tue May 9 12:51:42 2017 (r318026) @@ -119,7 +119,7 @@ linux_rcu_runtime_init(void *arg __unuse TAILQ_INIT(&record->ts_head); } } -SYSINIT(linux_rcu_runtime, SI_SUB_LOCK, SI_ORDER_SECOND, linux_rcu_runtime_init, NULL); +SYSINIT(linux_rcu_runtime, SI_SUB_CPU, SI_ORDER_ANY, linux_rcu_runtime_init, NULL); static void linux_rcu_runtime_uninit(void *arg __unused) From owner-svn-src-all@freebsd.org Tue May 9 13:44:55 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue May 9 15:09:09 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 26299D65561; Tue, 9 May 2017 15:09:09 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from fry.fubar.geek.nz (fry.fubar.geek.nz [139.59.165.16]) by mx1.freebsd.org (Postfix) with ESMTP id E9FA5935; Tue, 9 May 2017 15:09:08 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from dhcp-10-248-107-222.eduroam.wireless.private.cam.ac.uk (global-5-142.nat-2.net.cam.ac.uk [131.111.5.142]) by fry.fubar.geek.nz (Postfix) with ESMTPSA id 0EC7C4E77F; Tue, 9 May 2017 15:09:07 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: svn commit: r318021 - in head/sys/arm: arm include From: Andrew Turner In-Reply-To: <8fe20c26-3c0c-98ce-227b-740491253047@freebsd.org> Date: Tue, 9 May 2017 16:09:06 +0100 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <201705091105.v49B5WAp097952@repo.freebsd.org> <85745E3A-3260-43C7-B134-85BFED786D55@fubar.geek.nz> <8fe20c26-3c0c-98ce-227b-740491253047@freebsd.org> To: mmel@freebsd.org X-Mailer: Apple Mail (2.3273) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 15:09:09 -0000 > On 9 May 2017, at 13:40, Michal Meloun wrote: >=20 >=20 >=20 > On 09.05.2017 13:34, Andrew Turner wrote: >>> On 9 May 2017, at 12:05, Michal Meloun wrote: >>>=20 >>> Author: mmel >>> Date: Tue May 9 11:05:32 2017 >>> New Revision: 318021 >>> URL: https://svnweb.freebsd.org/changeset/base/318021 >>>=20 >>> Log: >>> Introduce pmap_remap_vm_attr(), >>> it allows to remap one VM memattr class to another. >>>=20 >>> This function is intent to be used as workaround for various SoC = bugs, >>> mainly access ordering/sequencing related bugs in crossbar fabric. >> This seems quite heavy handed to change the attribute for all memory = of a given type. > Yes, exactly. See comment in D10218 - > /* > * Workaround for Marvell Armada38X family HW issue > * between Cortex-A9 CPUs and on-chip devices that may > * cause hang on heavy load. > * To avoid that, map all registers including PCIe IO > * as strongly ordered instead of device memory. > */ I don=E2=80=99t think it=E2=80=99s been answered if this is just for = PCIe, or all devices. >=20 >> Other architectures have pmap_change_attr to change the attribute on = a specific range of memory. > Right. Problem is that I don't known any method how we can change=20 > memory attribute for live memory in SMP system, > without hitting undefined behavior. I would expect drivers to change the attributes early, before they = access the memory. We could also use smp_rendezvous to ensure nothing = else is running, this will have a performance code, however I would not = expect pmap_change_attr to be used in the fast path. Andrew From owner-svn-src-all@freebsd.org Tue May 9 16:27:22 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue May 9 16:29:08 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue May 9 16:58:10 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue May 9 17:01:26 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue May 9 17:21:26 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue May 9 17:21:27 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue May 9 17:21:29 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue May 9 17:21:28 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue May 9 17:21:31 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue May 9 17:21:33 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue May 9 17:21:30 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue May 9 17:21:35 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue May 9 17:21:33 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue May 9 17:21:34 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 17:21:34 -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-all@freebsd.org Tue May 9 17:21:39 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue May 9 17:21:36 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue May 9 17:21:40 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue May 9 17:21:32 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue May 9 17:21:38 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue May 9 17:21:45 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue May 9 17:21:37 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue May 9 17:21:39 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue May 9 17:21:42 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue May 9 17:21:41 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue May 9 17:21:48 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue May 9 17:21:45 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue May 9 17:21:43 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue May 9 17:21:44 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue May 9 17:21:47 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue May 9 17:21:46 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue May 9 17:21:51 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue May 9 17:21:49 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue May 9 17:21:53 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue May 9 17:21:50 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue May 9 17:21:52 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue May 9 17:21:54 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue May 9 17:21:52 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue May 9 17:21:55 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue May 9 17:35:18 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D4FA4D65EA4; Tue, 9 May 2017 17:35:18 +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 ACBD21DA2; Tue, 9 May 2017 17:35:18 +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 v49HZH6p063053; Tue, 9 May 2017 17:35:17 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49HZH4E063046; Tue, 9 May 2017 17:35:17 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201705091735.v49HZH4E063046@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 9 May 2017 17:35:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318067 - in head/sys/mips: include mips X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 17:35:18 -0000 Author: jhb Date: Tue May 9 17:35:16 2017 New Revision: 318067 URL: https://svnweb.freebsd.org/changeset/base/318067 Log: Add initial support for the floating point implementation register. - Save the current FIR in the global 'cpuinfo' structure in a new 'fpu_id' member. - Decode flags in the FIR when displaying other CPU flags during boot. - Use the existing "dummy" slot in the floating point register structure to export the FIR in process core dumps and via ptrace(). Note that while the FIR register is not volatile, this practice of storing the FIR in the floating-point register set is used in other OS's. Reviewed by: kan MFC after: 1 month Sponsored by: DARPA / AFRL Differential Revision: https://reviews.freebsd.org/D10617 Modified: head/sys/mips/include/cpuinfo.h head/sys/mips/include/frame.h head/sys/mips/include/md_var.h head/sys/mips/include/regnum.h head/sys/mips/mips/cpu.c head/sys/mips/mips/pm_machdep.c head/sys/mips/mips/swtch.S Modified: head/sys/mips/include/cpuinfo.h ============================================================================== --- head/sys/mips/include/cpuinfo.h Tue May 9 17:21:54 2017 (r318066) +++ head/sys/mips/include/cpuinfo.h Tue May 9 17:35:16 2017 (r318067) @@ -75,6 +75,7 @@ struct mips_cpuinfo { u_int8_t dc_nways; u_int16_t dc_nsets; } l2; + u_int32_t fpu_id; }; extern struct mips_cpuinfo cpuinfo; Modified: head/sys/mips/include/frame.h ============================================================================== --- head/sys/mips/include/frame.h Tue May 9 17:21:54 2017 (r318066) +++ head/sys/mips/include/frame.h Tue May 9 17:35:16 2017 (r318067) @@ -134,7 +134,7 @@ struct trapframe { f_register_t f30; f_register_t f31; register_t fsr; - register_t fdummy; + register_t fir; }; #endif /* !_MACHINE_FRAME_H_ */ Modified: head/sys/mips/include/md_var.h ============================================================================== --- head/sys/mips/include/md_var.h Tue May 9 17:21:54 2017 (r318066) +++ head/sys/mips/include/md_var.h Tue May 9 17:35:16 2017 (r318067) @@ -52,6 +52,7 @@ extern int vm_page_dump_size; extern vm_offset_t kstack0; extern vm_offset_t kernel_kseg0_end; +uint32_t MipsFPID(void); void MipsSaveCurFPState(struct thread *); void fork_trampoline(void); uintptr_t MipsEmulateBranch(struct trapframe *, uintptr_t, int, uintptr_t); Modified: head/sys/mips/include/regnum.h ============================================================================== --- head/sys/mips/include/regnum.h Tue May 9 17:21:54 2017 (r318066) +++ head/sys/mips/include/regnum.h Tue May 9 17:35:16 2017 (r318067) @@ -160,7 +160,7 @@ #define F30 (FPBASE+30) #define F31 (FPBASE+31) #define FSR (FPBASE+32) -#define FSR_DUMMY (FPBASE+33) /* For 8 byte alignment */ +#define FIR (FPBASE+33) #define NUMFPREGS 34 @@ -204,5 +204,6 @@ #define F30_NUM (30) #define F31_NUM (31) #define FSR_NUM (32) +#define FIR_NUM (33) #endif /* !_MACHINE_REGNUM_H_ */ Modified: head/sys/mips/mips/cpu.c ============================================================================== --- head/sys/mips/mips/cpu.c Tue May 9 17:21:54 2017 (r318066) +++ head/sys/mips/mips/cpu.c Tue May 9 17:35:16 2017 (r318067) @@ -184,6 +184,10 @@ mips_get_identity(struct mips_cpuinfo *c cfg3 = mips_rd_config3(); } + /* Save FP implementation revision if FP is present. */ + if (cfg1 & MIPS_CONFIG1_FP) + cpuinfo->fpu_id = MipsFPID(); + /* Check to see if UserLocal register is implemented. */ if (cfg3 & MIPS_CONFIG3_ULR) { /* UserLocal register is implemented, enable it. */ @@ -474,6 +478,19 @@ cpu_identify(void) printf(" Config1=0x%b\n", cfg1, "\20\7COP2\6MDMX\5PerfCount\4WatchRegs\3MIPS16\2EJTAG\1FPU"); + if (cpuinfo.fpu_id != 0) + printf(" FPU ID=0x%b\n", cpuinfo.fpu_id, + "\020" + "\020S" + "\021D" + "\022PS" + "\0233D" + "\024W" + "\025L" + "\026F64" + "\0272008" + "\034UFRP"); + /* If config register selection 2 does not exist, exit. */ if (!(cfg1 & MIPS_CONFIG_CM)) return; Modified: head/sys/mips/mips/pm_machdep.c ============================================================================== --- head/sys/mips/mips/pm_machdep.c Tue May 9 17:21:54 2017 (r318066) +++ head/sys/mips/mips/pm_machdep.c Tue May 9 17:35:16 2017 (r318067) @@ -60,6 +60,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -378,7 +379,8 @@ fill_fpregs(struct thread *td, struct fp { if (td == PCPU_GET(fpcurthread)) MipsSaveCurFPState(td); - memcpy(fpregs, &td->td_frame->f0, sizeof(struct fpreg)); + memcpy(fpregs, &td->td_frame->f0, sizeof(struct fpreg)); + fpregs->r_regs[FIR_NUM] = cpuinfo.fpu_id; return 0; } Modified: head/sys/mips/mips/swtch.S ============================================================================== --- head/sys/mips/mips/swtch.S Tue May 9 17:21:54 2017 (r318066) +++ head/sys/mips/mips/swtch.S Tue May 9 17:35:16 2017 (r318067) @@ -526,6 +526,44 @@ END(MipsSwitchFPState) /*---------------------------------------------------------------------------- * + * MipsFPID -- + * + * Read and return the floating point implementation register. + * + * uint32_t + * MipsFPID(void) + * + * Results: + * Floating point implementation register. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------------- + */ +LEAF(MipsFPID) + .set push + .set hardfloat + mfc0 t1, MIPS_COP_0_STATUS # Save the status register. + HAZARD_DELAY +#if defined(__mips_n64) + or t0, t1, MIPS_SR_COP_1_BIT | MIPS_SR_FR +#else + or t0, t1, MIPS_SR_COP_1_BIT +#endif + mtc0 t0, MIPS_COP_0_STATUS # Enable the coprocessor + HAZARD_DELAY + ITLBNOPFIX + cfc1 v0, MIPS_FPU_ID + mtc0 t1, MIPS_COP_0_STATUS # Restore the status register. + ITLBNOPFIX + j ra + nop + .set pop +END(MipsFPID) + +/*---------------------------------------------------------------------------- + * * MipsSaveCurFPState -- * * Save the current floating point coprocessor state. From owner-svn-src-all@freebsd.org Tue May 9 18:05:14 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 038A6D6567D; Tue, 9 May 2017 18:05:14 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D7975F05; Tue, 9 May 2017 18:05:13 +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 E9FAE10A82D; Tue, 9 May 2017 14:05:12 -0400 (EDT) From: John Baldwin To: Konstantin Belousov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r317809 - head/share/man/man7 Date: Tue, 09 May 2017 10:28:51 -0700 Message-ID: <1914546.2HFVuP4Uap@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-STABLE; KDE/4.14.10; amd64; ; ) In-Reply-To: <20170508221750.GG1622@kib.kiev.ua> References: <201705042131.v44LVokb076951@repo.freebsd.org> <20170508205210.GF1622@kib.kiev.ua> <20170508221750.GG1622@kib.kiev.ua> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Tue, 09 May 2017 14:05:13 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 18:05:14 -0000 On Tuesday, May 09, 2017 01:17:51 AM Konstantin Belousov wrote: > On Mon, May 08, 2017 at 11:52:10PM +0300, Konstantin Belousov wrote: > > On Mon, May 08, 2017 at 01:37:15PM -0700, John Baldwin wrote: > > > On Thursday, May 04, 2017 09:31:50 PM Konstantin Belousov wrote: > > > > Author: kib > > > > Date: Thu May 4 21:31:50 2017 > > > > New Revision: 317809 > > > > URL: https://svnweb.freebsd.org/changeset/base/317809 > > > > > > > > Log: > > > > Provide introduction for the arch(7) manpage. > > > > > > > > Start with some words about linear address space and its layout, then > > > > explain pointers models and ABIs, providing explanation to the > > > > structure of the tables. > > > > > > > > Reviewed by: emaste, imp > > > > 'Future-proof' cheri wording by: brooks > > > > Sponsored by: The FreeBSD Foundation > > > > MFC after: 2 weeks > > > > Differential revision: https://reviews.freebsd.org/D10596 > > > > > > Note that mips n32 is neither ILP32 or LP64, it P32L64. (Similar to x32 > > > for x86 if we were to ever add that.) Thus, we support 3 ABIs rather > > > than just 2. > > > > I trust your information about MIPS n32, but x32 uses ILP32 model. > In fact, from all documents that I can found about n32, it seems that > long == pointer == 32bit. This is mentioned in the MIPSpro N32 ABI Handbook > and in the MIPS Tech document MD00305 'MIPS ABIs Described'. Interesting, my apologies then. > The only strange thing for n32 is that register_t is 64bit, and vm_paddr_t > is similar to PAE. x32 would match as well. -- John Baldwin From owner-svn-src-all@freebsd.org Tue May 9 18:12:07 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 31CA5D65901; Tue, 9 May 2017 18:12:07 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 0201C132D; Tue, 9 May 2017 18:12:06 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49IC5SG079205; Tue, 9 May 2017 18:12:05 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49IC50b079203; Tue, 9 May 2017 18:12:05 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201705091812.v49IC50b079203@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Tue, 9 May 2017 18:12:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318068 - in head/sys: arm/conf modules/dtb/mv X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 18:12:07 -0000 Author: loos Date: Tue May 9 18:12:05 2017 New Revision: 318068 URL: https://svnweb.freebsd.org/changeset/base/318068 Log: Disable the build of the static/embedded DTB for the ARMADA38X kernel. Build the supported DTBs as part of modules build. MFC after: 2 weeks Sponsored by: Rubicon Communications, LLC (Netgate) Added: head/sys/modules/dtb/mv/ head/sys/modules/dtb/mv/Makefile (contents, props changed) Modified: head/sys/arm/conf/ARMADA38X Modified: head/sys/arm/conf/ARMADA38X ============================================================================== --- head/sys/arm/conf/ARMADA38X Tue May 9 17:35:16 2017 (r318067) +++ head/sys/arm/conf/ARMADA38X Tue May 9 18:12:05 2017 (r318068) @@ -12,6 +12,7 @@ ident ARMADA38X options SOC_MV_ARMADA38X makeoptions WERROR="-Werror" +makeoptions MODULES_EXTRA="dtb/mv" options MD_ROOT #makeoptions MFS_IMAGE=/path/to/miniroot @@ -78,7 +79,5 @@ device cryptodev # L2 Cache device pl310 -#FDT +# FDT options FDT -options FDT_DTB_STATIC -makeoptions FDT_DTS_FILE=armada-388-gp.dts Added: head/sys/modules/dtb/mv/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/dtb/mv/Makefile Tue May 9 18:12:05 2017 (r318068) @@ -0,0 +1,7 @@ +# $FreeBSD$ +# All the dts files for Marvell systems we support. +DTS= \ + armada-388-clearfog.dts \ + armada-388-gp.dts + +.include From owner-svn-src-all@freebsd.org Tue May 9 18:13:24 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue May 9 18:14:46 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue May 9 18:15:31 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue May 9 18:17:04 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue May 9 18:19:43 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue May 9 18:19:44 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue May 9 18:19:44 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue May 9 18:19:45 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue May 9 18:19:50 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue May 9 18:19:46 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue May 9 18:19:56 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue May 9 18:19:54 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue May 9 18:19:49 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue May 9 18:19:54 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue May 9 18:19:53 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue May 9 18:19:51 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue May 9 18:19:49 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue May 9 18:19:52 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue May 9 18:19:47 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue May 9 18:19:48 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue May 9 18:19:55 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue May 9 18:28:43 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B1E0BD65762; Tue, 9 May 2017 18:28:43 +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 8EF37B84; Tue, 9 May 2017 18:28:43 +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 v49ISg7C084476; Tue, 9 May 2017 18:28:42 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49ISgOv084474; Tue, 9 May 2017 18:28:42 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201705091828.v49ISgOv084474@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 9 May 2017 18:28:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318090 - head/sys/opencrypto X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 18:28:43 -0000 Author: jhb Date: Tue May 9 18:28:42 2017 New Revision: 318090 URL: https://svnweb.freebsd.org/changeset/base/318090 Log: Use const with some read-only buffers in opencrypto APIs. - Mark the source buffer for a copyback operation as const in the kernel API. - Use const with input-only buffers in crypto ioctl structures used with /dev/crypto. MFC after: 1 month Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D10517 Modified: head/sys/opencrypto/criov.c head/sys/opencrypto/cryptodev.h Modified: head/sys/opencrypto/criov.c ============================================================================== --- head/sys/opencrypto/criov.c Tue May 9 18:19:55 2017 (r318089) +++ head/sys/opencrypto/criov.c Tue May 9 18:28:42 2017 (r318090) @@ -79,7 +79,7 @@ cuio_copydata(struct uio* uio, int off, } void -cuio_copyback(struct uio* uio, int off, int len, caddr_t cp) +cuio_copyback(struct uio* uio, int off, int len, c_caddr_t cp) { struct iovec *iov = uio->uio_iov; int iol = uio->uio_iovcnt; @@ -155,7 +155,7 @@ cuio_apply(struct uio *uio, int off, int } void -crypto_copyback(int flags, caddr_t buf, int off, int size, caddr_t in) +crypto_copyback(int flags, caddr_t buf, int off, int size, c_caddr_t in) { if ((flags & CRYPTO_F_IMBUF) != 0) Modified: head/sys/opencrypto/cryptodev.h ============================================================================== --- head/sys/opencrypto/cryptodev.h Tue May 9 18:19:55 2017 (r318089) +++ head/sys/opencrypto/cryptodev.h Tue May 9 18:28:42 2017 (r318090) @@ -211,9 +211,9 @@ struct session_op { u_int32_t mac; /* ie. CRYPTO_MD5_HMAC */ u_int32_t keylen; /* cipher key */ - caddr_t key; + c_caddr_t key; int mackeylen; /* mac key */ - caddr_t mackey; + c_caddr_t mackey; u_int32_t ses; /* returns: session # */ }; @@ -223,9 +223,9 @@ struct session2_op { u_int32_t mac; /* ie. CRYPTO_MD5_HMAC */ u_int32_t keylen; /* cipher key */ - caddr_t key; + c_caddr_t key; int mackeylen; /* mac key */ - caddr_t mackey; + c_caddr_t mackey; u_int32_t ses; /* returns: session # */ int crid; /* driver id + flags (rw) */ @@ -240,9 +240,10 @@ struct crypt_op { u_int16_t flags; #define COP_F_BATCH 0x0008 /* Batch op if possible */ u_int len; - caddr_t src, dst; /* become iov[] inside kernel */ + c_caddr_t src; /* become iov[] inside kernel */ + caddr_t dst; caddr_t mac; /* must be big enough for chosen MAC */ - caddr_t iv; + c_caddr_t iv; }; /* op and flags the same as crypt_op */ @@ -253,10 +254,11 @@ struct crypt_aead { u_int len; u_int aadlen; u_int ivlen; - caddr_t src, dst; /* become iov[] inside kernel */ - caddr_t aad; /* additional authenticated data */ + c_caddr_t src; /* become iov[] inside kernel */ + caddr_t dst; + c_caddr_t aad; /* additional authenticated data */ caddr_t tag; /* must fit for chosen TAG length */ - caddr_t iv; + c_caddr_t iv; }; /* @@ -503,7 +505,7 @@ extern int crypto_devallowsoft; /* only */ struct uio; extern void cuio_copydata(struct uio* uio, int off, int len, caddr_t cp); -extern void cuio_copyback(struct uio* uio, int off, int len, caddr_t cp); +extern void cuio_copyback(struct uio* uio, int off, int len, c_caddr_t cp); extern int cuio_getptr(struct uio *uio, int loc, int *off); extern int cuio_apply(struct uio *uio, int off, int len, int (*f)(void *, void *, u_int), void *arg); @@ -514,7 +516,7 @@ extern int crypto_mbuftoiov(struct mbuf int *cnt, int *allocated); extern void crypto_copyback(int flags, caddr_t buf, int off, int size, - caddr_t in); + c_caddr_t in); extern void crypto_copydata(int flags, caddr_t buf, int off, int size, caddr_t out); extern int crypto_apply(int flags, caddr_t buf, int off, int len, From owner-svn-src-all@freebsd.org Tue May 9 18:33:43 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5658FD659DF; Tue, 9 May 2017 18:33:43 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 04F3391; Tue, 9 May 2017 18:33:42 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49IXgRY088221; Tue, 9 May 2017 18:33:42 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49IXfxq088218; Tue, 9 May 2017 18:33:41 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705091833.v49IXfxq088218@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Tue, 9 May 2017 18:33:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318091 - head/sys/dev/cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 18:33:43 -0000 Author: np Date: Tue May 9 18:33:41 2017 New Revision: 318091 URL: https://svnweb.freebsd.org/changeset/base/318091 Log: cxgbe(4): Do not assume that if_qflush is always followed by inteface-down. MFC after: 3 days Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/adapter.h head/sys/dev/cxgbe/t4_main.c head/sys/dev/cxgbe/t4_sge.c Modified: head/sys/dev/cxgbe/adapter.h ============================================================================== --- head/sys/dev/cxgbe/adapter.h Tue May 9 18:28:42 2017 (r318090) +++ head/sys/dev/cxgbe/adapter.h Tue May 9 18:33:41 2017 (r318091) @@ -399,6 +399,7 @@ enum { EQ_TYPEMASK = 0x3, /* 2 lsbits hold the type (see above) */ EQ_ALLOCATED = (1 << 2), /* firmware resources allocated */ EQ_ENABLED = (1 << 3), /* open for business */ + EQ_QFLUSH = (1 << 4), /* if_qflush in progress */ }; /* Listed in order of preference. Update t4_sysctls too if you change these */ Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Tue May 9 18:28:42 2017 (r318090) +++ head/sys/dev/cxgbe/t4_main.c Tue May 9 18:33:41 2017 (r318091) @@ -1869,12 +1869,15 @@ cxgbe_qflush(struct ifnet *ifp) if (vi->flags & VI_INIT_DONE) { for_each_txq(vi, i, txq) { TXQ_LOCK(txq); - txq->eq.flags &= ~EQ_ENABLED; + txq->eq.flags |= EQ_QFLUSH; TXQ_UNLOCK(txq); while (!mp_ring_is_idle(txq->r)) { mp_ring_check_drainage(txq->r, 0); pause("qflush", 1); } + TXQ_LOCK(txq); + txq->eq.flags &= ~EQ_QFLUSH; + TXQ_UNLOCK(txq); } } if_qflush(ifp); Modified: head/sys/dev/cxgbe/t4_sge.c ============================================================================== --- head/sys/dev/cxgbe/t4_sge.c Tue May 9 18:28:42 2017 (r318090) +++ head/sys/dev/cxgbe/t4_sge.c Tue May 9 18:33:41 2017 (r318091) @@ -2452,6 +2452,13 @@ cannot_use_txpkts(struct mbuf *m) return (needs_tso(m)); } +static inline int +discard_tx(struct sge_eq *eq) +{ + + return ((eq->flags & (EQ_ENABLED | EQ_QFLUSH)) != EQ_ENABLED); +} + /* * r->items[cidx] to r->items[pidx], with a wraparound at r->size, are ready to * be consumed. Return the actual number consumed. 0 indicates a stall. @@ -2477,7 +2484,7 @@ eth_tx(struct mp_ring *r, u_int cidx, u_ total = 0; TXQ_LOCK(txq); - if (__predict_false((eq->flags & EQ_ENABLED) == 0)) { + if (__predict_false(discard_tx(eq))) { while (cidx != pidx) { m0 = r->items[cidx]; m_freem(m0); From owner-svn-src-all@freebsd.org Tue May 9 18:45:36 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3BF88D65DA8; Tue, 9 May 2017 18:45:36 +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 DBAE6939; Tue, 9 May 2017 18:45:35 +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 v49IjYoY092730; Tue, 9 May 2017 18:45:34 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49IjYxC092729; Tue, 9 May 2017 18:45:34 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201705091845.v49IjYxC092729@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:45:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318092 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 18:45:36 -0000 Author: bdrewery Date: Tue May 9 18:45:34 2017 New Revision: 318092 URL: https://svnweb.freebsd.org/changeset/base/318092 Log: PROGS+META_MODE: Avoid rebuilding common sources when recursing. This could be seen in lib/libkvm/tests where kvm_test_common.o was a common dependency, but one of the recursed progs had a special CFLAGS+= -I that changed the build command. This would cause all recursed builds to rebuild while fighting over the meta file and object file. Reported by: Mark Millard MFC after: 1 week Sponsored by: Dell EMC Isilon Modified: head/share/mk/bsd.progs.mk Modified: head/share/mk/bsd.progs.mk ============================================================================== --- head/share/mk/bsd.progs.mk Tue May 9 18:33:41 2017 (r318091) +++ head/share/mk/bsd.progs.mk Tue May 9 18:45:34 2017 (r318092) @@ -87,11 +87,7 @@ $v = # handle being called [bsd.]progs.mk .include -.if !empty(PROGS) && !defined(_RECURSING_PROGS) && !defined(PROG) -# tell progs.mk we might want to install things -PROGS_TARGETS+= checkdpadd clean cleandepend cleandir depend install - -# Find common sources among the PROGS and depend on them before building +# Find common sources among the PROGS to depend on them before building # anything. This allows parallelization without them each fighting over # the same objects. _PROGS_COMMON_SRCS= @@ -110,6 +106,20 @@ _PROGS_COMMON_OBJS= ${_PROGS_COMMON_SRCS .if !empty(_PROGS_COMMON_SRCS:N*.[dhly]) _PROGS_COMMON_OBJS+= ${_PROGS_COMMON_SRCS:N*.[dhly]:R:S/$/.o/g} .endif +.endif + +# When recursing, ensure common sources are not rebuilt in META_MODE. +.if defined(_RECURSING_PROGS) && !empty(_PROGS_COMMON_OBJS) && \ + !empty(.MAKE.MODE:Mmeta) +${_PROGS_COMMON_OBJS}: .NOMETA +.endif + +.if !empty(PROGS) && !defined(_RECURSING_PROGS) && !defined(PROG) +# tell progs.mk we might want to install things +PROGS_TARGETS+= checkdpadd clean cleandepend cleandir depend install + +# Ensure common objects are built before recursing. +.if !empty(_PROGS_COMMON_OBJS) ${PROGS}: ${_PROGS_COMMON_OBJS} .endif From owner-svn-src-all@freebsd.org Tue May 9 18:46:51 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue May 9 18:54:37 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4AEC7D661A5; Tue, 9 May 2017 18:54:37 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 12C8112B; Tue, 9 May 2017 18:54:37 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49IsaIo096738; Tue, 9 May 2017 18:54:36 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49IsaGW096737; Tue, 9 May 2017 18:54:36 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705091854.v49IsaGW096737@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 9 May 2017 18:54:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318094 - head/tests/sys/aio X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 18:54:37 -0000 Author: ngie Date: Tue May 9 18:54:35 2017 New Revision: 318094 URL: https://svnweb.freebsd.org/changeset/base/318094 Log: style(9): clean up trailing whitespace MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/tests/sys/aio/local.h Modified: head/tests/sys/aio/local.h ============================================================================== --- head/tests/sys/aio/local.h Tue May 9 18:46:49 2017 (r318093) +++ head/tests/sys/aio/local.h Tue May 9 18:54:35 2017 (r318094) @@ -52,7 +52,7 @@ } else if (_unsafe == 0) \ atf_tc_skip("Unsafe AIO is disabled"); \ } while (0) - + #define PLAIN_REQUIRE_UNSAFE_AIO(_exit_code) do { \ size_t _len; \ int _unsafe; \ From owner-svn-src-all@freebsd.org Tue May 9 19:01:58 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F3289D6635F; Tue, 9 May 2017 19:01:58 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 B3EA57F7; Tue, 9 May 2017 19:01:58 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49J1vJE000680; Tue, 9 May 2017 19:01:57 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49J1vuZ000678; Tue, 9 May 2017 19:01:57 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201705091901.v49J1vuZ000678@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Tue, 9 May 2017 19:01:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318095 - head/sys/dev/sdhci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 19:01:59 -0000 Author: loos Date: Tue May 9 19:01:57 2017 New Revision: 318095 URL: https://svnweb.freebsd.org/changeset/base/318095 Log: Add a new SDHCI quirk, SDHCI_QUIRK_BROKEN_AUTO_STOP, to workaround controllers that do not support or have broken ACMD12 implementations. Reviewed by: jmcneill Obtained from: NetBSD MFC after: 2 weeks Sponsored by: Rubicon Communications, LLC (Netgate) Differential Revision: https://reviews.freebsd.org/D10602 Modified: head/sys/dev/sdhci/sdhci.c head/sys/dev/sdhci/sdhci.h Modified: head/sys/dev/sdhci/sdhci.c ============================================================================== --- head/sys/dev/sdhci/sdhci.c Tue May 9 18:54:35 2017 (r318094) +++ head/sys/dev/sdhci/sdhci.c Tue May 9 19:01:57 2017 (r318095) @@ -1060,7 +1060,7 @@ sdhci_set_transfer_mode(struct sdhci_slo mode |= SDHCI_TRNS_MULTI; if (data->flags & MMC_DATA_READ) mode |= SDHCI_TRNS_READ; - if (slot->req->stop) + if (slot->req->stop && !(slot->quirks & SDHCI_QUIRK_BROKEN_AUTO_STOP)) mode |= SDHCI_TRNS_ACMD12; if (slot->flags & SDHCI_USE_DMA) mode |= SDHCI_TRNS_DMA; @@ -1305,7 +1305,8 @@ sdhci_finish_data(struct sdhci_slot *slo slot->intmask |= SDHCI_INT_RESPONSE); } /* Unload rest of data from DMA buffer. */ - if (!slot->data_done && (slot->flags & SDHCI_USE_DMA)) { + if (!slot->data_done && (slot->flags & SDHCI_USE_DMA) && + slot->curcmd->data != NULL) { if (data->flags & MMC_DATA_READ) { left = data->len - slot->offset; bus_dmamap_sync(slot->dmatag, slot->dmamap, @@ -1343,17 +1344,18 @@ sdhci_start(struct sdhci_slot *slot) sdhci_start_command(slot, req->cmd); return; } -/* We don't need this until using Auto-CMD12 feature - if (!(slot->flags & STOP_STARTED) && req->stop) { + if ((slot->quirks & SDHCI_QUIRK_BROKEN_AUTO_STOP) && + !(slot->flags & STOP_STARTED) && req->stop) { slot->flags |= STOP_STARTED; sdhci_start_command(slot, req->stop); return; } -*/ if (sdhci_debug > 1) slot_printf(slot, "result: %d\n", req->cmd->error); if (!req->cmd->error && - (slot->quirks & SDHCI_QUIRK_RESET_AFTER_REQUEST)) { + ((slot->curcmd == req->stop && + (slot->quirks & SDHCI_QUIRK_BROKEN_AUTO_STOP)) || + (slot->quirks & SDHCI_QUIRK_RESET_AFTER_REQUEST))) { sdhci_reset(slot, SDHCI_RESET_CMD); sdhci_reset(slot, SDHCI_RESET_DATA); } Modified: head/sys/dev/sdhci/sdhci.h ============================================================================== --- head/sys/dev/sdhci/sdhci.h Tue May 9 18:54:35 2017 (r318094) +++ head/sys/dev/sdhci/sdhci.h Tue May 9 19:01:57 2017 (r318095) @@ -87,6 +87,8 @@ #define SDHCI_QUIRK_CAPS_BIT63_FOR_MMC_HS400 (1 << 26) /* Controller support for SDHCI_CTRL2_PRESET_VALUE is broken. */ #define SDHCI_QUIRK_PRESET_VALUE_BROKEN (1 << 27) +/* Controller does not support or the support for ACMD12 is broken. */ +#define SDHCI_QUIRK_BROKEN_AUTO_STOP (1 << 28) /* * Controller registers From owner-svn-src-all@freebsd.org Tue May 9 19:14:27 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue May 9 19:15:12 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue May 9 19:16:20 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 360E1D667E2; Tue, 9 May 2017 19:16:20 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E0BEC1483; Tue, 9 May 2017 19:16:19 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49JGIlC004983; Tue, 9 May 2017 19:16:18 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49JGIgd004982; Tue, 9 May 2017 19:16:18 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705091916.v49JGIgd004982@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 9 May 2017 19:16:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318098 - head/tests/sys/aio X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 19:16:20 -0000 Author: ngie Date: Tue May 9 19:16:18 2017 New Revision: 318098 URL: https://svnweb.freebsd.org/changeset/base/318098 Log: Refactor ATF_REQUIRE_UNSAFE_AIO and PLAIN_REQUIRE_UNSAFE_AIO This is being done to reduce duplication between the two macros. MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/tests/sys/aio/local.h Modified: head/tests/sys/aio/local.h ============================================================================== --- head/tests/sys/aio/local.h Tue May 9 19:15:11 2017 (r318097) +++ head/tests/sys/aio/local.h Tue May 9 19:16:18 2017 (r318098) @@ -39,36 +39,49 @@ #include -#define ATF_REQUIRE_UNSAFE_AIO() do { \ - size_t _len; \ - int _unsafe; \ - \ - _len = sizeof(_unsafe); \ - if (sysctlbyname("vfs.aio.enable_unsafe", &_unsafe, &_len, NULL,\ - 0) < 0) { \ - if (errno != ENOENT) \ - atf_libc_error(errno, \ - "Failed to read vfs.aio.enable_unsafe"); \ - } else if (_unsafe == 0) \ - atf_tc_skip("Unsafe AIO is disabled"); \ +static const char *sysctl_oid_name = "vfs.aio.enable_unsafe"; + +static int +is_unsafe_aio_enabled(void) +{ + size_t len; + int unsafe; + + len = sizeof(unsafe); + if (sysctlbyname(sysctl_oid_name, &unsafe, &len, NULL, 0) < 0) { + if (errno == ENOENT) + return (-1); + return (0); + } + return (unsafe == 0 ? 0 : 1); +} + +#define ATF_REQUIRE_UNSAFE_AIO() do { \ + switch (is_unsafe_aio_enabled()) { \ + case -1: \ + atf_libc_error(errno, "Failed to read %s", sysctl_oid_name); \ + break; \ + case 0: \ + atf_tc_skip("Unsafe AIO is disabled"); \ + break; \ + default: \ + break; \ + } \ } while (0) -#define PLAIN_REQUIRE_UNSAFE_AIO(_exit_code) do { \ - size_t _len; \ - int _unsafe; \ - \ - _len = sizeof(_unsafe); \ - if (sysctlbyname("vfs.aio.enable_unsafe", &_unsafe, &_len, NULL,\ - 0) < 0) { \ - if (errno != ENOENT) { \ - printf("Failed to read vfs.aio.enable_unsafe: %s\n",\ - strerror(errno)); \ - _exit(1); \ - } \ - } else if (_unsafe == 0) { \ - printf("Unsafe AIO is disabled"); \ - _exit(_exit_code); \ - } \ +#define PLAIN_REQUIRE_UNSAFE_AIO(_exit_code) do { \ + switch (is_unsafe_aio_enabled()) { \ + case -1: \ + printf("Failed to read %s", sysctl_oid_name); \ + _exit(_exit_code); \ + break; \ + case 0: \ + printf("Unsafe AIO is disabled\n"); \ + _exit(_exit_code); \ + break; \ + default: \ + break; \ + } \ } while (0) #endif /* !_AIO_TEST_LOCAL_H_ */ From owner-svn-src-all@freebsd.org Tue May 9 19:20:04 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2AD56D6699D; Tue, 9 May 2017 19:20:04 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F0E93180F; Tue, 9 May 2017 19:20:03 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49JK3ME005317; Tue, 9 May 2017 19:20:03 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49JK30F005316; Tue, 9 May 2017 19:20:03 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705091920.v49JK30F005316@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 9 May 2017 19:20:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318099 - head/tests/sys/aio X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 19:20:04 -0000 Author: ngie Date: Tue May 9 19:20:02 2017 New Revision: 318099 URL: https://svnweb.freebsd.org/changeset/base/318099 Log: Print out when unsafe AIO is enabled to debugging purposes MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/tests/sys/aio/local.h Modified: head/tests/sys/aio/local.h ============================================================================== --- head/tests/sys/aio/local.h Tue May 9 19:16:18 2017 (r318098) +++ head/tests/sys/aio/local.h Tue May 9 19:20:02 2017 (r318099) @@ -65,6 +65,7 @@ is_unsafe_aio_enabled(void) atf_tc_skip("Unsafe AIO is disabled"); \ break; \ default: \ + printf("Unsafe AIO is enabled\n"); \ break; \ } \ } while (0) @@ -80,6 +81,7 @@ is_unsafe_aio_enabled(void) _exit(_exit_code); \ break; \ default: \ + printf("Unsafe AIO is enabled\n"); \ break; \ } \ } while (0) From owner-svn-src-all@freebsd.org Tue May 9 19:23:15 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C56D5D66B08; Tue, 9 May 2017 19:23:15 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9459B1C4B; Tue, 9 May 2017 19:23:15 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49JNEmj009483; Tue, 9 May 2017 19:23:14 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49JNEmI009482; Tue, 9 May 2017 19:23:14 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705091923.v49JNEmI009482@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 9 May 2017 19:23:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318100 - head/tests/sys/aio X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 19:23:15 -0000 Author: ngie Date: Tue May 9 19:23:14 2017 New Revision: 318100 URL: https://svnweb.freebsd.org/changeset/base/318100 Log: style(9): move function definition curly braces to column 0 MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/tests/sys/aio/aio_test.c Modified: head/tests/sys/aio/aio_test.c ============================================================================== --- head/tests/sys/aio/aio_test.c Tue May 9 19:20:02 2017 (r318099) +++ head/tests/sys/aio/aio_test.c Tue May 9 19:23:14 2017 (r318100) @@ -187,7 +187,8 @@ aio_context_init(struct aio_context *ac, } static ssize_t -poll(struct aiocb *aio) { +poll(struct aiocb *aio) +{ int error; while ((error = aio_error(aio)) == EINPROGRESS && !aio_timedout) @@ -204,7 +205,8 @@ poll(struct aiocb *aio) { } static ssize_t -suspend(struct aiocb *aio) { +suspend(struct aiocb *aio) +{ const struct aiocb *const iocbs[] = {aio}; int error; @@ -216,7 +218,8 @@ suspend(struct aiocb *aio) { } static ssize_t -waitcomplete(struct aiocb *aio) { +waitcomplete(struct aiocb *aio) +{ struct aiocb *aiop; ssize_t ret; From owner-svn-src-all@freebsd.org Tue May 9 19:42:37 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue May 9 19:54:35 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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 + + From owner-svn-src-all@freebsd.org Tue May 9 20:40:21 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue May 9 20:40:23 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue May 9 20:40:24 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue May 9 20:40:22 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue May 9 20:43:59 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue May 9 20:45:22 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A9FD2D65C2C; Tue, 9 May 2017 20:45:22 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 610DD112A; Tue, 9 May 2017 20:45:22 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v49KjLxm045535; Tue, 9 May 2017 20:45:21 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49KjLQi045534; Tue, 9 May 2017 20:45:21 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201705092045.v49KjLQi045534@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 9 May 2017 20:45:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318116 - head/usr.bin/resizewin X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 20:45:22 -0000 Author: trasz Date: Tue May 9 20:45:21 2017 New Revision: 318116 URL: https://svnweb.freebsd.org/changeset/base/318116 Log: Random updates to resizewin(1) man page. Reviewed by: cem, Daniel O'Connor MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D10640 Modified: head/usr.bin/resizewin/resizewin.1 Modified: head/usr.bin/resizewin/resizewin.1 ============================================================================== --- head/usr.bin/resizewin/resizewin.1 Tue May 9 20:43:57 2017 (r318115) +++ head/usr.bin/resizewin/resizewin.1 Tue May 9 20:45:21 2017 (r318116) @@ -27,27 +27,38 @@ .\" .\" $FreeBSD$ .\" -.Dd May 8, 2017 +.Dd May 9, 2017 .Dt RESIZEWIN 1 .Os .Sh NAME .Nm resizewin -.Nd update the kernel window size for the current TTY +.Nd update terminal size .Sh SYNOPSIS .Nm .Op Fl z .Sh DESCRIPTION -Query the terminal emulator window size with the +The +.Nm +utility +queries the terminal emulator for the current window size and updates +the size known to the kernel using the .Dv TIOCSWINSZ -ioctl and set the window size known by the kernel to the new values. -The terminal is assumed to be VT100/ANSI compatible. +ioctl. .Pp The following options are available: .Bl -tag -width ".Fl z" .It Fl z Do nothing unless the current kernel terminal size is zero. +This is useful when run from user's profile (shell startup) scripts: +querying the window size is required for serial lines, but not when +logging in over the network, as protocols like TELNET or SSH already +handle the terminal size by themselves. .El .Pp +After a terminal window has been resized, running +.Nm +updates the kernel's window size to match the new size. +.Pp .Nm is functionally similar to .Xr resize 1 , @@ -56,21 +67,18 @@ which is part of the distribution. However, .Nm -only works with VT100/ANSI-compatible terminals and does -not emit commands to set environment variables. +only works with VT100/ANSI-compatible terminals and directly sets +the terminal size instead of emitting commands to set environment variables. .Pp -After a terminal window has been resized, running -.Nm -updates the kernel's window size to match the new size. -.Pp -Note that virtually all modern terninals support VT100/ANSI escape -sequences, including xterm, konsole, gnome-terminal iTerm, +The terminal is assumed to be VT100/ANSI compatible. +The VT100/ANSI escape sequences are supported by virtually all modern +terminals; this include xterm, konsole, gnome-terminal, iTerm, Terminal.app, and PuTTY. .Sh SEE ALSO -.Xr resize 1 , -.Xr stty 1 +.Xr stty 1 , +.Xr tty 4 .Sh HISTORY The .Nm command first appeared in -.Fx 11 . +.Fx 11.0 . From owner-svn-src-all@freebsd.org Tue May 9 20:47:17 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue May 9 21:25:50 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue May 9 23:13:27 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue May 9 23:28:43 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue May 9 23:28:43 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue May 9 23:30:57 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F0C9BD666A9 for ; Tue, 9 May 2017 23:30:57 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from pmta2.delivery6.ore.mailhop.org (pmta2.delivery6.ore.mailhop.org [54.200.129.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D5F91A74 for ; Tue, 9 May 2017 23:30:57 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: 43738c9c-350f-11e7-8c46-c35e37f62db1 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 73.78.92.27 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [73.78.92.27]) by outbound2.ore.mailhop.org (Halon) with ESMTPSA id 43738c9c-350f-11e7-8c46-c35e37f62db1; Tue, 09 May 2017 23:28:53 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id v49NTlL8002313; Tue, 9 May 2017 17:29:47 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1494372587.59865.9.camel@freebsd.org> Subject: Re: svn commit: r318017 - head/share/man/man4 From: Ian Lepore To: Edward Tomasz Napierala , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Tue, 09 May 2017 17:29:47 -0600 In-Reply-To: <201705090836.v498a9JJ035778@repo.freebsd.org> References: <201705090836.v498a9JJ035778@repo.freebsd.org> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 23:30:58 -0000 On Tue, 2017-05-09 at 08:36 +0000, Edward Tomasz Napierala wrote: > Author: trasz > Date: Tue May  9 08:36:09 2017 > New Revision: 318017 > URL: https://svnweb.freebsd.org/changeset/base/318017 > > Log: >   Fix device paths for USB serial adapters: the formatting strings >   contain "%u", differently from eg uart(4) which uses "%r". >    What is %r and where is it documented? -- Ian From owner-svn-src-all@freebsd.org Tue May 9 23:31:11 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue May 9 23:39:30 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0F1D9D669A6 for ; Tue, 9 May 2017 23:39:30 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x234.google.com (mail-it0-x234.google.com [IPv6:2607:f8b0:4001:c0b::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CDF3C1083 for ; Tue, 9 May 2017 23:39:29 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x234.google.com with SMTP id c15so15458126ith.0 for ; Tue, 09 May 2017 16:39:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=TM4N0GPA34R+/vLn2bQiTOB+AMB2jhrUKSuzYFvAuzk=; b=fXZmz1wI1xA8ekRmyrFJwA+jrdQ1pTQjquRndBv+fqlmItRHv2g9VncRVwEGplO3Rv Y+sagxumQhAHJxxUIg3PCs37pOc3QhM4Qmhwemst02o19cVRsdxeDpnb47N43nyJraYb QWC7SylbYkuJ9DzkXdbWHuu3x2en2yZyyig0Y0tbLVau2IlefCcO6bOhLDtOcddvesw5 kot8zyJRCNub2j8HALH7WXNfwPaBnNflYfVyEGPauMAyNvFRfUcXucfRP/USzPx0pa1Y pJhy6AqGrJXHtDokt3wHOehsNLODS++7z9MQXH5vRmWG4AVlfXug2kvdzWsqMMwZ0gTH RTfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=TM4N0GPA34R+/vLn2bQiTOB+AMB2jhrUKSuzYFvAuzk=; b=tjV6wUW/+h9WLuzTvv8Tj6Xek5IMZ8jbx6k6dLy8BJ2DGLENvAM5Fn1WWvsxnjUZ1Z vKcCyrHN0wtEM/KnPnWuEufkdmnPmQy79n56/9EGAj4KezXGyfgHwGBdDVJkMyYPmXjc 7DHZQ10WXp6jPSUvmKuL6jMF1vJeaxJyc7hxCsSAjzY5EB7Mq2cD1o5Vht87ljNy0cSq TRjCbmcWA+dI8ShlYSAe8Phk7AAETFZhj39Txvs570e+uTikHr3iR6bKJLJ/se5WXGtC RY78a9uDS0l+jKqSIxW26CQHZRJ3biA4RjY/etKud9MVUTpcpZWChNDCFoteGkjD/TKD PGjQ== X-Gm-Message-State: AODbwcBQ0KxSYOe3bZZQHc7IrwmLLY/gjyEqYkaudABqMde5AyCdSK3r f+yHl593a3YYv6ckmAh+5IIWW9EICQ== X-Received: by 10.36.181.1 with SMTP id v1mr2947613ite.103.1494373168900; Tue, 09 May 2017 16:39:28 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.126.6 with HTTP; Tue, 9 May 2017 16:39:28 -0700 (PDT) X-Originating-IP: [2603:300b:6:5100:d47:7464:7e21:6b87] In-Reply-To: <1494372587.59865.9.camel@freebsd.org> References: <201705090836.v498a9JJ035778@repo.freebsd.org> <1494372587.59865.9.camel@freebsd.org> From: Warner Losh Date: Tue, 9 May 2017 17:39:28 -0600 X-Google-Sender-Auth: gB-KnWWI0J9UiFl0Pbl25KTP1os Message-ID: Subject: Re: svn commit: r318017 - head/share/man/man4 To: Ian Lepore Cc: Edward Tomasz Napierala , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 23:39:30 -0000 It's the passed in radix. In this case it is 32: len = vsnrprintf(dev->si_name, sizeof(dev->si_name), 32, fmt, ap); so we get things like ttya following tty9. It should be in printf(9), but isn't. Warner On Tue, May 9, 2017 at 5:29 PM, Ian Lepore wrote: > On Tue, 2017-05-09 at 08:36 +0000, Edward Tomasz Napierala wrote: >> Author: trasz >> Date: Tue May 9 08:36:09 2017 >> New Revision: 318017 >> URL: https://svnweb.freebsd.org/changeset/base/318017 >> >> Log: >> Fix device paths for USB serial adapters: the formatting strings >> contain "%u", differently from eg uart(4) which uses "%r". >> > > What is %r and where is it documented? > > -- Ian > > From owner-svn-src-all@freebsd.org Tue May 9 23:58:08 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C6205D66F1A; Tue, 9 May 2017 23:58:08 +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 97F9B19D4; Tue, 9 May 2017 23:58:08 +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 v49Nw7Ce024212; Tue, 9 May 2017 23:58:07 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v49Nw7uj024210; Tue, 9 May 2017 23:58:07 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201705092358.v49Nw7uj024210@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 23:58:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318122 - in head: . share/man/man7 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2017 23:58:08 -0000 Author: bdrewery Date: Tue May 9 23:58:07 2017 New Revision: 318122 URL: https://svnweb.freebsd.org/changeset/base/318122 Log: Add a -DNO_LIBS to skip building the libraries phase as well. This is useful for cases where -DWORLDFAST is useful. Sponsored by: Dell EMC Isilon Modified: head/Makefile.inc1 head/share/man/man7/build.7 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Tue May 9 23:31:09 2017 (r318121) +++ head/Makefile.inc1 Tue May 9 23:58:07 2017 (r318122) @@ -849,7 +849,9 @@ WMAKE_TGTS+= _build-tools _cross-tools WMAKE_TGTS+= _compiler-metadata WMAKE_TGTS+= _includes .endif +.if !defined(NO_LIBS) WMAKE_TGTS+= _libraries +.endif WMAKE_TGTS+= everything .if defined(LIBCOMPAT) && empty(SUBDIR_OVERRIDE) WMAKE_TGTS+= build${libcompat} Modified: head/share/man/man7/build.7 ============================================================================== --- head/share/man/man7/build.7 Tue May 9 23:31:09 2017 (r318121) +++ head/share/man/man7/build.7 Tue May 9 23:58:07 2017 (r318122) @@ -605,6 +605,8 @@ If set, the update process does not upda documentation as part of the .Dq make update target. +.It Va NO_LIBS +If set, the libraries phase will be skipped. .It Va NO_OBJ If set, no object directories will be created. This should only be used if object directories were created in a From owner-svn-src-all@freebsd.org Wed May 10 00:02:25 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EB627D64038; Wed, 10 May 2017 00:02:25 +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 BB8931E13; Wed, 10 May 2017 00:02:25 +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 v4A02OgY028230; Wed, 10 May 2017 00:02:24 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4A02OhC028229; Wed, 10 May 2017 00:02:24 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201705100002.v4A02OhC028229@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 10 May 2017 00:02:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318123 - head/share/man/man7 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 00:02:26 -0000 Author: bdrewery Date: Wed May 10 00:02:24 2017 New Revision: 318123 URL: https://svnweb.freebsd.org/changeset/base/318123 Log: SUBDIR_OVERRIDE: Note how to restore historical behavior pre-r289725. Sponsored by: Dell EMC Isilon Modified: head/share/man/man7/build.7 Modified: head/share/man/man7/build.7 ============================================================================== --- head/share/man/man7/build.7 Tue May 9 23:58:07 2017 (r318122) +++ head/share/man/man7/build.7 Wed May 10 00:02:24 2017 (r318123) @@ -499,6 +499,11 @@ If combined with .Cm buildworld then all libraries and includes, and some of the build tools will still build as well. +Specifying +.Cm -DNO_LIBS , +and +.Cm -DWORLDFAST +will only build the specified directory as was done historically. When combined with .Cm buildworld it is necesarry to override From owner-svn-src-all@freebsd.org Wed May 10 00:14:57 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 24F57D64617; Wed, 10 May 2017 00:14:57 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EB57FB67; Wed, 10 May 2017 00:14:56 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4A0EuGR032198; Wed, 10 May 2017 00:14:56 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4A0Et2W032197; Wed, 10 May 2017 00:14:55 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705100014.v4A0Et2W032197@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 10 May 2017 00:14:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318124 - head/sys/netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 00:14:57 -0000 Author: np Date: Wed May 10 00:14:55 2017 New Revision: 318124 URL: https://svnweb.freebsd.org/changeset/base/318124 Log: ip6_output runs with the inp lock held, just like ip_output. Modified: head/sys/netinet6/ip6_output.c Modified: head/sys/netinet6/ip6_output.c ============================================================================== --- head/sys/netinet6/ip6_output.c Wed May 10 00:02:24 2017 (r318123) +++ head/sys/netinet6/ip6_output.c Wed May 10 00:14:55 2017 (r318124) @@ -325,6 +325,7 @@ ip6_output(struct mbuf *m0, struct ip6_p uint32_t id; if (inp != NULL) { + INP_LOCK_ASSERT(inp); M_SETFIB(m, inp->inp_inc.inc_fibnum); if ((flags & IP_NODEFAULTFLOWID) == 0) { /* unconditionally set flowid */ From owner-svn-src-all@freebsd.org Wed May 10 00:42:29 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CCCDAD64E0D; Wed, 10 May 2017 00:42:29 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9C0B1185F; Wed, 10 May 2017 00:42:29 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4A0gSFS044200; Wed, 10 May 2017 00:42:28 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4A0gSvW044199; Wed, 10 May 2017 00:42:28 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705100042.v4A0gSvW044199@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 10 May 2017 00:42:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318125 - head/sys/dev/cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 00:42:29 -0000 Author: np Date: Wed May 10 00:42:28 2017 New Revision: 318125 URL: https://svnweb.freebsd.org/changeset/base/318125 Log: Adjust whitespace and fix a comment. No functional change. MFC after: 3 days Modified: head/sys/dev/cxgbe/adapter.h Modified: head/sys/dev/cxgbe/adapter.h ============================================================================== --- head/sys/dev/cxgbe/adapter.h Wed May 10 00:14:55 2017 (r318124) +++ head/sys/dev/cxgbe/adapter.h Wed May 10 00:42:28 2017 (r318125) @@ -204,11 +204,11 @@ struct vi_info { int first_intr; /* These need to be int as they are used in sysctl */ - int ntxq; /* # of tx queues */ - int first_txq; /* index of first tx queue */ - int rsrv_noflowq; /* Reserve queue 0 for non-flowid packets */ - int nrxq; /* # of rx queues */ - int first_rxq; /* index of first rx queue */ + int ntxq; /* # of tx queues */ + int first_txq; /* index of first tx queue */ + int rsrv_noflowq; /* Reserve queue 0 for non-flowid packets */ + int nrxq; /* # of rx queues */ + int first_rxq; /* index of first rx queue */ int nofldtxq; /* # of offload tx queues */ int first_ofld_txq; /* index of first offload tx queue */ int nofldrxq; /* # of offload rx queues */ @@ -705,7 +705,7 @@ struct sge_nm_txq { struct sge { int nrxq; /* total # of Ethernet rx queues */ - int ntxq; /* total # of Ethernet tx tx queues */ + int ntxq; /* total # of Ethernet tx queues */ int nofldrxq; /* total # of TOE rx queues */ int nofldtxq; /* total # of TOE tx queues */ int nnmrxq; /* total # of netmap rx queues */ From owner-svn-src-all@freebsd.org Wed May 10 00:47:49 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DDC9FD64F5C; Wed, 10 May 2017 00:47:49 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail107.syd.optusnet.com.au (mail107.syd.optusnet.com.au [211.29.132.53]) by mx1.freebsd.org (Postfix) with ESMTP id A643D1A57; Wed, 10 May 2017 00:47:49 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from besplex.bde.org (c122-106-153-191.carlnfd1.nsw.optusnet.com.au [122.106.153.191]) by mail107.syd.optusnet.com.au (Postfix) with ESMTPS id 4EB3DD444EE; Wed, 10 May 2017 10:47:41 +1000 (AEST) Date: Wed, 10 May 2017 10:47:36 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Ian Lepore cc: Edward Tomasz Napierala , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r318017 - head/share/man/man4 In-Reply-To: <1494372587.59865.9.camel@freebsd.org> Message-ID: <20170510095816.X5705@besplex.bde.org> References: <201705090836.v498a9JJ035778@repo.freebsd.org> <1494372587.59865.9.camel@freebsd.org> MIME-Version: 1.0 X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=VbSHBBh9 c=1 sm=1 tr=0 a=Tj3pCpwHnMupdyZSltBt7Q==:117 a=Tj3pCpwHnMupdyZSltBt7Q==:17 a=nlC_4_pT8q9DhB4Ho9EA:9 a=6I5d2MoRAAAA:8 a=n3V31rENc5Mu-Ry0EfMA:9 a=45ClL6m2LaAA:10 a=IjZwj45LgO3ly-622nXo:22 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 00:47:50 -0000 On Tue, 9 May 2017, Ian Lepore wrote: > On Tue, 2017-05-09 at 08:36 +0000, Edward Tomasz Napierala wrote: >> Author: trasz >> Date: Tue May=A0=A09 08:36:09 2017 >> New Revision: 318017 >> URL: https://svnweb.freebsd.org/changeset/base/318017 >> >> Log: >> =A0 Fix device paths for USB serial adapters: the formatting strings >> =A0 contain "%u", differently from eg uart(4) which uses "%r". >> =A0=A0 > > What is %r and where is it documented? In the source code. It was a ddb internal (but supported by -fformat-extensions, except IIRC for %jr (1)), but is now used by makedev(). For ddb, %r means to use ddb's radix. All output in ddb must go through db_printf(). db_printf() calls kvprintf() with ddb's radix as an arg. Unlike printf(3), kvprintf(9) supports arbitrary radixes and special formats like signed hex (%y format). kvprintf() is of course undocumented. %y is another ddb internal, like %r except it is not so useful or used outside of ddb. make_dev() supports a dumbed down version of %r. %r for make_dev() always means radix 32. This is implemented by calling vnsrprintf(9) with a hard-coded 32 as an arg since kvprintf() is unsuitable. vnsrprintf() is of course undocumented. %r implies %d. I think the strange-looking %dr works too, but the normal-looking %rd might not. db mostly use %...lr, but never a bare %lr, so use of %r is a bit hard to grep for. ddb rarely uses the long long abomination or intmax_t (it assumes that plain long is long enough, as was correct in C90), and never uses %...jr or %...yr, but I think these work except for (1). It might be a bug to hard-code hex or decimal formats instead of using %r (this is sometimes done for addresses, when the user's radix is not usually wanted, but is still too hard-coded). (1) kvprintf() handles extensions like %r and %y[r] in a general way that should work if %d or %x[r] works. But -fformat-extensions doesn't support %r or %y for intmax_t, so these formats are unusable and unused in practice= =2E The serial driver man pages are still deficient in not documenting what '?' and '*' mean. '?' is not a general wild card, but means specifically base 32 with 1 digit. This naming scheme was familar since it was used by ptys, to go up to 1024 with only 2 digits. It is still documented in pty(4) with enough details as 2 digits but not full range ([l-sL-S][0-9a-v]). I'm not sure if the first digit is restricted by the implementation or just by convention. Bruce From owner-svn-src-all@freebsd.org Wed May 10 01:01:21 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F31EBD653FF; Wed, 10 May 2017 01:01:21 +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 CE8FD82; Wed, 10 May 2017 01:01:21 +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 v4A11KRJ051952; Wed, 10 May 2017 01:01:20 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4A11KEw051951; Wed, 10 May 2017 01:01:20 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201705100101.v4A11KEw051951@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Wed, 10 May 2017 01:01:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318126 - head/sys/dev/qlnx/qlnxe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 01:01:22 -0000 Author: davidcs Date: Wed May 10 01:01:20 2017 New Revision: 318126 URL: https://svnweb.freebsd.org/changeset/base/318126 Log: llh_func_filter needs to be configured for 100G MFC after:3 days Modified: head/sys/dev/qlnx/qlnxe/ecore_dev.c Modified: head/sys/dev/qlnx/qlnxe/ecore_dev.c ============================================================================== --- head/sys/dev/qlnx/qlnxe/ecore_dev.c Wed May 10 00:42:28 2017 (r318125) +++ head/sys/dev/qlnx/qlnxe/ecore_dev.c Wed May 10 01:01:20 2017 (r318126) @@ -1986,6 +1986,15 @@ static enum _ecore_status_t ecore_hw_ini } } #endif + /* Add an LLH filter with the primary MAC address. */ + if (p_hwfn->p_dev->num_hwfns > 1 && IS_LEAD_HWFN(p_hwfn)) { + rc = ecore_llh_add_mac_filter(p_hwfn, p_ptt, + p_hwfn->hw_info.hw_mac_addr); + if (rc != ECORE_SUCCESS) + DP_NOTICE(p_hwfn, false, + "Failed to add an LLH filter with the primary MAC\n"); + } + if (b_hw_start) { /* enable interrupts */ rc = ecore_int_igu_enable(p_hwfn, p_ptt, int_mode); @@ -2473,6 +2482,11 @@ enum _ecore_status_t ecore_hw_stop(struc rc2 = ECORE_UNKNOWN_ERROR; } } + + /* remove the LLH filter with the primary MAC addres */ + if (p_hwfn->p_dev->num_hwfns > 1 && IS_LEAD_HWFN(p_hwfn)) + ecore_llh_remove_mac_filter(p_hwfn, p_ptt, + p_hwfn->hw_info.hw_mac_addr); } /* hwfn loop */ if (IS_PF(p_dev)) { @@ -4569,7 +4583,7 @@ enum _ecore_status_t ecore_llh_add_mac_f } DP_VERBOSE(p_hwfn, ECORE_MSG_HW, - "MAC: %02hhx:%02hhx:%02hhx:%02hhx:%02hhx:%02hhx is added at %d\n", + "MAC: %02hhx:%02hhx:%02hhx:%02hhx:%02hhx:%02hhx is added at LLH entry %d\n", p_filter[0], p_filter[1], p_filter[2], p_filter[3], p_filter[4], p_filter[5], entry_num); @@ -4651,7 +4665,7 @@ void ecore_llh_remove_mac_filter(struct } DP_VERBOSE(p_hwfn, ECORE_MSG_HW, - "MAC: %02hhx:%02hhx:%02hhx:%02hhx:%02hhx:%02hhx was removed from %d\n", + "MAC: %02hhx:%02hhx:%02hhx:%02hhx:%02hhx:%02hhx was removed from LLH entry %d\n", p_filter[0], p_filter[1], p_filter[2], p_filter[3], p_filter[4], p_filter[5], entry_num); } @@ -4760,37 +4774,37 @@ ecore_llh_add_protocol_filter(struct eco switch (type) { case ECORE_LLH_FILTER_ETHERTYPE: DP_VERBOSE(p_hwfn, ECORE_MSG_HW, - "ETH type %x is added at %d\n", + "ETH type %x is added at LLH entry %d\n", source_port_or_eth_type, entry_num); break; case ECORE_LLH_FILTER_TCP_SRC_PORT: DP_VERBOSE(p_hwfn, ECORE_MSG_HW, - "TCP src port %x is added at %d\n", + "TCP src port %x is added at LLH entry %d\n", source_port_or_eth_type, entry_num); break; case ECORE_LLH_FILTER_UDP_SRC_PORT: DP_VERBOSE(p_hwfn, ECORE_MSG_HW, - "UDP src port %x is added at %d\n", + "UDP src port %x is added at LLH entry %d\n", source_port_or_eth_type, entry_num); break; case ECORE_LLH_FILTER_TCP_DEST_PORT: DP_VERBOSE(p_hwfn, ECORE_MSG_HW, - "TCP dst port %x is added at %d\n", + "TCP dst port %x is added at LLH entry %d\n", dest_port, entry_num); break; case ECORE_LLH_FILTER_UDP_DEST_PORT: DP_VERBOSE(p_hwfn, ECORE_MSG_HW, - "UDP dst port %x is added at %d\n", + "UDP dst port %x is added at LLH entry %d\n", dest_port, entry_num); break; case ECORE_LLH_FILTER_TCP_SRC_AND_DEST_PORT: DP_VERBOSE(p_hwfn, ECORE_MSG_HW, - "TCP src/dst ports %x/%x are added at %d\n", + "TCP src/dst ports %x/%x are added at LLH entry %d\n", source_port_or_eth_type, dest_port, entry_num); break; case ECORE_LLH_FILTER_UDP_SRC_AND_DEST_PORT: DP_VERBOSE(p_hwfn, ECORE_MSG_HW, - "UDP src/dst ports %x/%x are added at %d\n", + "UDP src/dst ports %x/%x are added at LLH entry %d\n", source_port_or_eth_type, dest_port, entry_num); break; } @@ -4917,7 +4931,7 @@ ecore_llh_remove_protocol_filter(struct } DP_VERBOSE(p_hwfn, ECORE_MSG_HW, - "Protocol filter [type %d, source_port_or_eth_type 0x%x, dest_port 0x%x] was removed from %d\n", + "Protocol filter [type %d, source_port_or_eth_type 0x%x, dest_port 0x%x] was removed from LLH entry %d\n", type, source_port_or_eth_type, dest_port, entry_num); } From owner-svn-src-all@freebsd.org Wed May 10 01:29:00 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@freebsd.org Wed May 10 01:39:23 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@freebsd.org Wed May 10 03:20:22 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 41E3BD654CC; Wed, 10 May 2017 03:20:22 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 13AF21D6B; Wed, 10 May 2017 03:20:22 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4A3KLxW005741; Wed, 10 May 2017 03:20:21 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4A3KLwn005740; Wed, 10 May 2017 03:20:21 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201705100320.v4A3KLwn005740@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Wed, 10 May 2017 03:20:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318129 - head/sys/cddl/dev/fbt/powerpc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 03:20:22 -0000 Author: jhibbits Date: Wed May 10 03:20:20 2017 New Revision: 318129 URL: https://svnweb.freebsd.org/changeset/base/318129 Log: Fix check for fbt_excluded() in powerpc fbt_excluded() returns 1 if the symbol is to be excluded. Every other arch has this correct, powerpc was the only broken one MFC after: 1 week Modified: head/sys/cddl/dev/fbt/powerpc/fbt_isa.c Modified: head/sys/cddl/dev/fbt/powerpc/fbt_isa.c ============================================================================== --- head/sys/cddl/dev/fbt/powerpc/fbt_isa.c Wed May 10 01:39:21 2017 (r318128) +++ head/sys/cddl/dev/fbt/powerpc/fbt_isa.c Wed May 10 03:20:20 2017 (r318129) @@ -127,7 +127,7 @@ fbt_provide_module_function(linker_file_ return (0); #endif - if (fbt_excluded(name) == 0) + if (fbt_excluded(name)) return (0); instr = (uint32_t *) symval->value; From owner-svn-src-all@freebsd.org Wed May 10 03:47:23 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D90EBD65A9C; Wed, 10 May 2017 03:47:23 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A9200DF2; Wed, 10 May 2017 03:47:23 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4A3lMUj017858; Wed, 10 May 2017 03:47:22 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4A3lMl1017857; Wed, 10 May 2017 03:47:22 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201705100347.v4A3lMl1017857@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Wed, 10 May 2017 03:47:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318130 - head/sys/cddl/dev/fbt/powerpc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 03:47:24 -0000 Author: jhibbits Date: Wed May 10 03:47:22 2017 New Revision: 318130 URL: https://svnweb.freebsd.org/changeset/base/318130 Log: Fix the encoded instruction for FBT traps on powerpc r314370 changed EXC_DTRACE to a different instruction, but neglected to make the same change to fbt, so dtrace didn't actually pick it up, resulting in entering KDB instead of trapping for dtrace. MFC after: 1 week Modified: head/sys/cddl/dev/fbt/powerpc/fbt_isa.c Modified: head/sys/cddl/dev/fbt/powerpc/fbt_isa.c ============================================================================== --- head/sys/cddl/dev/fbt/powerpc/fbt_isa.c Wed May 10 03:20:20 2017 (r318129) +++ head/sys/cddl/dev/fbt/powerpc/fbt_isa.c Wed May 10 03:47:22 2017 (r318130) @@ -37,7 +37,7 @@ #include "fbt.h" -#define FBT_PATCHVAL 0x7c810808 +#define FBT_PATCHVAL 0x7ffff808 #define FBT_MFLR_R0 0x7c0802a6 #define FBT_MTLR_R0 0x7c0803a6 #define FBT_BLR 0x4e800020 From owner-svn-src-all@freebsd.org Wed May 10 04:48:29 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@freebsd.org Wed May 10 05:01:07 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@freebsd.org Wed May 10 05:02:39 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@freebsd.org Wed May 10 05:04:18 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@freebsd.org Wed May 10 05:05:22 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@freebsd.org Wed May 10 05:07:42 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A5E5ED6644E; Wed, 10 May 2017 05:07:42 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 5D17E1E0C; Wed, 10 May 2017 05:07:42 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4A57fpc050553; Wed, 10 May 2017 05:07:41 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4A57fbi050552; Wed, 10 May 2017 05:07:41 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201705100507.v4A57fbi050552@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Wed, 10 May 2017 05:07:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318135 - head/contrib/binutils/gas/config X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 05:07:42 -0000 Author: mmel Date: Wed May 10 05:07:41 2017 New Revision: 318135 URL: https://svnweb.freebsd.org/changeset/base/318135 Log: Fix parsing of 'vmov Q.F32,Q.F32' instruction. parse_qfloat_immediate() accidentaly parses register with size qualifier as immediate constant (It takes '.' substring as valid floating point constant). Due to this, slightly reorder cases in parse_neon_mov() and move parsing of vmov with immediate constant to last place. MFC after: 2 weeks Modified: head/contrib/binutils/gas/config/tc-arm.c Modified: head/contrib/binutils/gas/config/tc-arm.c ============================================================================== --- head/contrib/binutils/gas/config/tc-arm.c Wed May 10 05:05:21 2017 (r318134) +++ head/contrib/binutils/gas/config/tc-arm.c Wed May 10 05:07:41 2017 (r318135) @@ -5211,12 +5211,6 @@ parse_neon_mov (char **str, int *which_o inst.operands[i].present = 1; } } - else if (parse_qfloat_immediate (&ptr, &inst.operands[i].imm) == SUCCESS) - /* Case 2: VMOV.
, # - Case 3: VMOV.
, # - Case 10: VMOV.F32 , # - Case 11: VMOV.F64
, # */ - inst.operands[i].immisfloat = 1; else if ((val = arm_typed_reg_parse (&ptr, REG_TYPE_NSDQ, &rtype, &optype)) != FAIL) { @@ -5253,9 +5247,15 @@ parse_neon_mov (char **str, int *which_o inst.operands[i].reg = val; inst.operands[i].isreg = 1; - inst.operands[i++].present = 1; + inst.operands[i].present = 1; } } + else if (parse_qfloat_immediate (&ptr, &inst.operands[i].imm) == SUCCESS) + /* Case 2: VMOV.
, # + Case 3: VMOV.
, # + Case 10: VMOV.F32 , # + Case 11: VMOV.F64
, # */ + inst.operands[i].immisfloat = 1; else if (parse_big_immediate (&ptr, i) == SUCCESS) /* Case 2: VMOV.
, # Case 3: VMOV.
, # */ @@ -5337,7 +5337,7 @@ parse_neon_mov (char **str, int *which_o inst.operands[i].isvec = 1; inst.operands[i].issingle = 1; inst.operands[i].vectype = optype; - inst.operands[i++].present = 1; + inst.operands[i].present = 1; } } else From owner-svn-src-all@freebsd.org Wed May 10 05:28:16 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4349ED66993; Wed, 10 May 2017 05:28:16 +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 05AF3A06; Wed, 10 May 2017 05:28:15 +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 v4A5SFlh058517; Wed, 10 May 2017 05:28:15 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4A5SEb9058509; Wed, 10 May 2017 05:28:14 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201705100528.v4A5SEb9058509@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Wed, 10 May 2017 05:28:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318136 - in head/sys: conf dev/acpica dev/hyperv/vmbus modules/hyperv/vmbus X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 05:28:16 -0000 Author: sephe Date: Wed May 10 05:28:14 2017 New Revision: 318136 URL: https://svnweb.freebsd.org/changeset/base/318136 Log: hyperv/vmbus: Reorganize vmbus device tree For GEN1 Hyper-V, vmbus is attached to pcib0, which contains the resources for PCI passthrough and SR-IOV. There is no acpi_syscontainer0 on GEN1 Hyper-V. For GEN2 Hyper-V, vmbus is attached to acpi_syscontainer0, which contains the resources for PCI passthrough and SR-IOV. There is no pcib0 on GEN2 Hyper-V. The ACPI VMBUS device now only holds its _CRS, which is empty as of this commit; its existence is mainly for upward compatibility. Device tree structure is suggested by jhb@. Tested-by: dexuan@ Collabrated-wth: dexuan@ MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D10565 Added: head/sys/dev/acpica/acpi_container.c (contents, props changed) head/sys/dev/hyperv/vmbus/vmbus_res.c (contents, props changed) Modified: head/sys/conf/files head/sys/conf/files.amd64 head/sys/conf/files.i386 head/sys/dev/acpica/acpi_pcib_acpi.c head/sys/dev/hyperv/vmbus/vmbus.c head/sys/modules/hyperv/vmbus/Makefile Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Wed May 10 05:07:41 2017 (r318135) +++ head/sys/conf/files Wed May 10 05:28:14 2017 (r318136) @@ -673,6 +673,7 @@ dev/acpica/acpi_perf.c optional acpi dev/acpica/acpi_powerres.c optional acpi dev/acpica/acpi_quirk.c optional acpi dev/acpica/acpi_resource.c optional acpi +dev/acpica/acpi_container.c optional acpi dev/acpica/acpi_smbat.c optional acpi dev/acpica/acpi_thermal.c optional acpi dev/acpica/acpi_throttle.c optional acpi Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Wed May 10 05:07:41 2017 (r318135) +++ head/sys/conf/files.amd64 Wed May 10 05:28:14 2017 (r318136) @@ -323,6 +323,7 @@ dev/hyperv/vmbus/vmbus_br.c optional dev/hyperv/vmbus/vmbus_chan.c optional hyperv dev/hyperv/vmbus/vmbus_et.c optional hyperv dev/hyperv/vmbus/vmbus_if.m optional hyperv +dev/hyperv/vmbus/vmbus_res.c optional hyperv dev/hyperv/vmbus/vmbus_xact.c optional hyperv dev/hyperv/vmbus/amd64/hyperv_machdep.c optional hyperv dev/hyperv/vmbus/amd64/vmbus_vector.S optional hyperv Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Wed May 10 05:07:41 2017 (r318135) +++ head/sys/conf/files.i386 Wed May 10 05:28:14 2017 (r318136) @@ -244,6 +244,7 @@ dev/hyperv/vmbus/vmbus_br.c optional dev/hyperv/vmbus/vmbus_chan.c optional hyperv dev/hyperv/vmbus/vmbus_et.c optional hyperv dev/hyperv/vmbus/vmbus_if.m optional hyperv +dev/hyperv/vmbus/vmbus_res.c optional hyperv dev/hyperv/vmbus/vmbus_xact.c optional hyperv dev/hyperv/vmbus/i386/hyperv_machdep.c optional hyperv dev/hyperv/vmbus/i386/vmbus_vector.S optional hyperv Added: head/sys/dev/acpica/acpi_container.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/acpica/acpi_container.c Wed May 10 05:28:14 2017 (r318136) @@ -0,0 +1,166 @@ +/*- + * Copyright (c) 2017 Microsoft Corp. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice unmodified, this list of conditions, and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include + +#include +#include + +#include "pcib_if.h" + +ACPI_MODULE_NAME("CONTAINER") + +static int acpi_syscont_probe(device_t); +static int acpi_syscont_attach(device_t); +static int acpi_syscont_detach(device_t); +static int acpi_syscont_alloc_msi(device_t, device_t, + int count, int maxcount, int *irqs); +static int acpi_syscont_release_msi(device_t bus, device_t dev, + int count, int *irqs); +static int acpi_syscont_alloc_msix(device_t bus, device_t dev, + int *irq); +static int acpi_syscont_release_msix(device_t bus, device_t dev, + int irq); +static int acpi_syscont_map_msi(device_t bus, device_t dev, + int irq, uint64_t *addr, uint32_t *data); + +static device_method_t acpi_syscont_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, acpi_syscont_probe), + DEVMETHOD(device_attach, acpi_syscont_attach), + DEVMETHOD(device_detach, acpi_syscont_detach), + + /* Bus interface */ + DEVMETHOD(bus_add_child, bus_generic_add_child), + DEVMETHOD(bus_print_child, bus_generic_print_child), + DEVMETHOD(bus_alloc_resource, bus_generic_alloc_resource), + DEVMETHOD(bus_release_resource, bus_generic_release_resource), + DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), + DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), + DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), + DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), +#if __FreeBSD_version >= 1100000 + DEVMETHOD(bus_get_cpus, bus_generic_get_cpus), +#endif + + /* pcib interface */ + DEVMETHOD(pcib_alloc_msi, acpi_syscont_alloc_msi), + DEVMETHOD(pcib_release_msi, acpi_syscont_release_msi), + DEVMETHOD(pcib_alloc_msix, acpi_syscont_alloc_msix), + DEVMETHOD(pcib_release_msix, acpi_syscont_release_msix), + DEVMETHOD(pcib_map_msi, acpi_syscont_map_msi), + + DEVMETHOD_END +}; + +static driver_t acpi_syscont_driver = { + "acpi_syscontainer", + acpi_syscont_methods, + 0, +}; + +static devclass_t acpi_syscont_devclass; + +DRIVER_MODULE(acpi_syscontainer, acpi, acpi_syscont_driver, + acpi_syscont_devclass, NULL, NULL); +MODULE_DEPEND(acpi_syscontainer, acpi, 1, 1, 1); + +static int +acpi_syscont_probe(device_t dev) +{ + static char *syscont_ids[] = { "ACPI0004", "PNP0A05", "PNP0A06", NULL }; + + if (acpi_disabled("syscontainer") || + ACPI_ID_PROBE(device_get_parent(dev), dev, syscont_ids) == NULL) + return (ENXIO); + + device_set_desc(dev, "System Container"); + return (BUS_PROBE_DEFAULT); +} + +static int +acpi_syscont_attach(device_t dev) +{ + + bus_generic_probe(dev); + return (bus_generic_attach(dev)); +} + +static int +acpi_syscont_detach(device_t dev) +{ + + return (bus_generic_detach(dev)); +} + +static int +acpi_syscont_alloc_msi(device_t bus, device_t dev, int count, int maxcount, + int *irqs) +{ + device_t parent = device_get_parent(bus); + + return (PCIB_ALLOC_MSI(device_get_parent(parent), dev, count, maxcount, + irqs)); +} + +static int +acpi_syscont_release_msi(device_t bus, device_t dev, int count, int *irqs) +{ + device_t parent = device_get_parent(bus); + + return (PCIB_RELEASE_MSI(device_get_parent(parent), dev, count, irqs)); +} + +static int +acpi_syscont_alloc_msix(device_t bus, device_t dev, int *irq) +{ + device_t parent = device_get_parent(bus); + + return (PCIB_ALLOC_MSIX(device_get_parent(parent), dev, irq)); +} + +static int +acpi_syscont_release_msix(device_t bus, device_t dev, int irq) +{ + device_t parent = device_get_parent(bus); + + return (PCIB_RELEASE_MSIX(device_get_parent(parent), dev, irq)); +} + +static int +acpi_syscont_map_msi(device_t bus, device_t dev, int irq, uint64_t *addr, + uint32_t *data) +{ + device_t parent = device_get_parent(bus); + + return (PCIB_MAP_MSI(device_get_parent(parent), dev, irq, addr, data)); +} Modified: head/sys/dev/acpica/acpi_pcib_acpi.c ============================================================================== --- head/sys/dev/acpica/acpi_pcib_acpi.c Wed May 10 05:07:41 2017 (r318135) +++ head/sys/dev/acpica/acpi_pcib_acpi.c Wed May 10 05:28:14 2017 (r318136) @@ -537,6 +537,7 @@ acpi_pcib_acpi_attach(device_t dev) acpi_pcib_fetch_prt(dev, &sc->ap_prt); + bus_generic_probe(dev); if (device_add_child(dev, "pci", -1) == NULL) { device_printf(device_get_parent(dev), "couldn't attach pci bus\n"); #if defined(NEW_PCIB) && defined(PCI_RES_BUS) Modified: head/sys/dev/hyperv/vmbus/vmbus.c ============================================================================== --- head/sys/dev/hyperv/vmbus/vmbus.c Wed May 10 05:07:41 2017 (r318135) +++ head/sys/dev/hyperv/vmbus/vmbus.c Wed May 10 05:28:14 2017 (r318136) @@ -71,6 +71,7 @@ struct vmbus_msghc { struct hypercall_postmsg_in mh_inprm_save; }; +static void vmbus_identify(driver_t *, device_t); static int vmbus_probe(device_t); static int vmbus_attach(device_t); static int vmbus_detach(device_t); @@ -144,6 +145,7 @@ vmbus_chanmsg_handlers[VMBUS_CHANMSG_TYP static device_method_t vmbus_methods[] = { /* Device interface */ + DEVMETHOD(device_identify, vmbus_identify), DEVMETHOD(device_probe, vmbus_probe), DEVMETHOD(device_attach, vmbus_attach), DEVMETHOD(device_detach, vmbus_detach), @@ -190,7 +192,10 @@ static driver_t vmbus_driver = { static devclass_t vmbus_devclass; -DRIVER_MODULE(vmbus, acpi, vmbus_driver, vmbus_devclass, NULL, NULL); +DRIVER_MODULE(vmbus, pcib, vmbus_driver, vmbus_devclass, NULL, NULL); +DRIVER_MODULE(vmbus, acpi_syscontainer, vmbus_driver, vmbus_devclass, + NULL, NULL); + MODULE_DEPEND(vmbus, acpi, 1, 1, 1); MODULE_DEPEND(vmbus, pci, 1, 1, 1); MODULE_VERSION(vmbus, 1); @@ -1066,43 +1071,41 @@ vmbus_alloc_resource(device_t dev, devic return (res); } -static device_t -get_nexus(device_t vmbus) -{ - device_t acpi = device_get_parent(vmbus); - device_t nexus = device_get_parent(acpi); - return (nexus); -} - static int vmbus_alloc_msi(device_t bus, device_t dev, int count, int maxcount, int *irqs) { - return (PCIB_ALLOC_MSI(get_nexus(bus), dev, count, maxcount, irqs)); + + return (PCIB_ALLOC_MSI(device_get_parent(bus), dev, count, maxcount, + irqs)); } static int vmbus_release_msi(device_t bus, device_t dev, int count, int *irqs) { - return (PCIB_RELEASE_MSI(get_nexus(bus), dev, count, irqs)); + + return (PCIB_RELEASE_MSI(device_get_parent(bus), dev, count, irqs)); } static int vmbus_alloc_msix(device_t bus, device_t dev, int *irq) { - return (PCIB_ALLOC_MSIX(get_nexus(bus), dev, irq)); + + return (PCIB_ALLOC_MSIX(device_get_parent(bus), dev, irq)); } static int vmbus_release_msix(device_t bus, device_t dev, int irq) { - return (PCIB_RELEASE_MSIX(get_nexus(bus), dev, irq)); + + return (PCIB_RELEASE_MSIX(device_get_parent(bus), dev, irq)); } static int vmbus_map_msi(device_t bus, device_t dev, int irq, uint64_t *addr, uint32_t *data) { - return (PCIB_MAP_MSI(get_nexus(bus), dev, irq, addr, data)); + + return (PCIB_MAP_MSI(device_get_parent(bus), dev, irq, addr, data)); } static uint32_t @@ -1216,36 +1219,44 @@ vmbus_get_crs(device_t dev, device_t vmb static void vmbus_get_mmio_res_pass(device_t dev, enum parse_pass pass) { - device_t acpi0, pcib0 = NULL; - device_t *children; - int i, count; - - /* Try to find _CRS on VMBus device */ - vmbus_get_crs(dev, dev, pass); - - /* Try to find _CRS on VMBus device's parent */ - acpi0 = device_get_parent(dev); - vmbus_get_crs(acpi0, dev, pass); + device_t acpi0, parent; - /* Try to locate pcib0 and find _CRS on it */ - if (device_get_children(acpi0, &children, &count) != 0) - return; + parent = device_get_parent(dev); - for (i = 0; i < count; i++) { - if (!device_is_attached(children[i])) - continue; + acpi0 = device_get_parent(parent); + if (strcmp("acpi0", device_get_nameunit(acpi0)) == 0) { + device_t *children; + int count; - if (strcmp("pcib0", device_get_nameunit(children[i]))) - continue; + /* + * Try to locate VMBUS resources and find _CRS on them. + */ + if (device_get_children(acpi0, &children, &count) == 0) { + int i; - pcib0 = children[i]; - break; - } + for (i = 0; i < count; ++i) { + if (!device_is_attached(children[i])) + continue; + + if (strcmp("vmbus_res", + device_get_name(children[i])) == 0) + vmbus_get_crs(children[i], dev, pass); + } + free(children, M_TEMP); + } - if (pcib0) - vmbus_get_crs(pcib0, dev, pass); + /* + * Try to find _CRS on acpi. + */ + vmbus_get_crs(acpi0, dev, pass); + } else { + device_printf(dev, "not grandchild of acpi\n"); + } - free(children, M_TEMP); + /* + * Try to find _CRS on parent. + */ + vmbus_get_crs(parent, dev, pass); } static void @@ -1275,18 +1286,25 @@ vmbus_free_mmio_res(device_t dev) } #endif /* NEW_PCIB */ +static void +vmbus_identify(driver_t *driver, device_t parent) +{ + + if (device_get_unit(parent) != 0 || vm_guest != VM_GUEST_HV || + (hyperv_features & CPUID_HV_MSR_SYNIC) == 0) + return; + device_add_child(parent, "vmbus", -1); +} + static int vmbus_probe(device_t dev) { - char *id[] = { "VMBUS", NULL }; - if (ACPI_ID_PROBE(device_get_parent(dev), dev, id) == NULL || - device_get_unit(dev) != 0 || vm_guest != VM_GUEST_HV || + if (device_get_unit(dev) != 0 || vm_guest != VM_GUEST_HV || (hyperv_features & CPUID_HV_MSR_SYNIC) == 0) return (ENXIO); device_set_desc(dev, "Hyper-V Vmbus"); - return (BUS_PROBE_DEFAULT); } Added: head/sys/dev/hyperv/vmbus/vmbus_res.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/hyperv/vmbus/vmbus_res.c Wed May 10 05:28:14 2017 (r318136) @@ -0,0 +1,98 @@ +/*- + * Copyright (c) 2017 Microsoft Corp. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice unmodified, this list of conditions, and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include + +#include +#include + +#include + +#include "acpi_if.h" +#include "bus_if.h" + +static int vmbus_res_probe(device_t); +static int vmbus_res_attach(device_t); +static int vmbus_res_detach(device_t); + +static device_method_t vmbus_res_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, vmbus_res_probe), + DEVMETHOD(device_attach, vmbus_res_attach), + DEVMETHOD(device_detach, vmbus_res_detach), + DEVMETHOD(device_shutdown, bus_generic_shutdown), + DEVMETHOD(device_suspend, bus_generic_suspend), + DEVMETHOD(device_resume, bus_generic_resume), + + DEVMETHOD_END +}; + +static driver_t vmbus_res_driver = { + "vmbus_res", + vmbus_res_methods, + 1 +}; + +static devclass_t vmbus_res_devclass; + +DRIVER_MODULE(vmbus_res, acpi, vmbus_res_driver, vmbus_res_devclass, + NULL, NULL); +MODULE_DEPEND(vmbus_res, acpi, 1, 1, 1); +MODULE_VERSION(vmbus_res, 1); + +static int +vmbus_res_probe(device_t dev) +{ + char *id[] = { "VMBUS", NULL }; + + if (ACPI_ID_PROBE(device_get_parent(dev), dev, id) == NULL || + device_get_unit(dev) != 0 || vm_guest != VM_GUEST_HV || + (hyperv_features & CPUID_HV_MSR_SYNIC) == 0) + return (ENXIO); + + device_set_desc(dev, "Hyper-V Vmbus Resource"); + return (BUS_PROBE_DEFAULT); +} + +static int +vmbus_res_attach(device_t dev __unused) +{ + + return (0); +} + +static int +vmbus_res_detach(device_t dev __unused) +{ + + return (0); +} Modified: head/sys/modules/hyperv/vmbus/Makefile ============================================================================== --- head/sys/modules/hyperv/vmbus/Makefile Wed May 10 05:07:41 2017 (r318135) +++ head/sys/modules/hyperv/vmbus/Makefile Wed May 10 05:28:14 2017 (r318136) @@ -12,6 +12,7 @@ SRCS= hyperv.c \ vmbus_chan.c \ vmbus_et.c \ vmbus_if.c \ + vmbus_res.c \ vmbus_xact.c SRCS+= acpi_if.h bus_if.h device_if.h opt_acpi.h pci_if.h pcib_if.h vmbus_if.h From owner-svn-src-all@freebsd.org Wed May 10 06:18:55 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 62C5CD654D7; Wed, 10 May 2017 06:18:55 +0000 (UTC) (envelope-from melounmichal@gmail.com) Received: from mail-wr0-x22d.google.com (mail-wr0-x22d.google.com [IPv6:2a00:1450:400c:c0c::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 049371E76; Wed, 10 May 2017 06:18:55 +0000 (UTC) (envelope-from melounmichal@gmail.com) Received: by mail-wr0-x22d.google.com with SMTP id z52so28407348wrc.2; Tue, 09 May 2017 23:18:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:reply-to:subject:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=rlaJ5nahoC1q4tss2HXr4OLwUVFktswol17qtqc9eaw=; b=JQLp3tfGxgP4zzBl/oQzgQCglpe1fRVF4jsxe9X+JCAeuippZ+aYLjJs7tebQh/Y5k rMgUU9Qz0shKkhaSNIYCMkUjvlnlQI3h7xaofhcPlxjThqoT7+PB2nn4yzBoVCBduppJ B4nHoHtIRe4FEu5FfT72bxoQPs6YF1foYcM8Wscg6Utq0Unrc3caVaoIBMMQNlTSQXb6 2z0LLLUgYbIB6+iE0zNiFZAhLbR6VnJXYqTuvCLfDdawfXf89MHqfDtTNcRLuaqaPxEx FLtd7CiOFRnACKHWCPo9pQABgpTzAlQSBlYlC531TewGNZAKYUcsygjtzAFBF1p46Otd Y9/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:reply-to:subject:to:cc:references :message-id:date:user-agent:mime-version:in-reply-to :content-transfer-encoding:content-language; bh=rlaJ5nahoC1q4tss2HXr4OLwUVFktswol17qtqc9eaw=; b=Hb3hWinvZ9XA77VsDqdl5uVRWj4RgtrYzxATNzN/yxwUsrhGxVs0eV9z+LL0UQqKo6 gq6/WYyacIAUG8wwJisFYtTZ81duYme1L/RJlPyCfT6SIVUqJuCklA0YuXAXG2e4vIFU a2byWVJzpswHGJWvWVQOp6rbEP3Gd9B7+OFws0cLzyDIeTH0UUQLUwbn9WVObl0uzhcF r6AsaahxYj7PXvj0/dZ9jliYkvErXILxXJ0X+/fOe+ANs4ri6er53maXbIUxhRvMu0ux cD6RBbV044n7asSP3LLaUxv4bpUC6jSYoEsXINyb0bTTrilwBN1iBK7OxYPQzXBLB7dJ /5fg== X-Gm-Message-State: AODbwcCmxz0ClUt7mqCa9PdCkdk18pIdCMWeKHyNihYIvcI7pdmmQbOR JnN7mO8zVvjsJEd5Aj/M9Q== X-Received: by 10.28.152.133 with SMTP id a127mr3029472wme.115.1494397132415; Tue, 09 May 2017 23:18:52 -0700 (PDT) Received: from [88.208.79.100] (halouny.humusoft.cz. [88.208.79.100]) by smtp.gmail.com with ESMTPSA id c37sm2102514wra.16.2017.05.09.23.18.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 May 2017 23:18:51 -0700 (PDT) From: Michal Meloun X-Google-Original-From: Michal Meloun Reply-To: mmel@freebsd.org Subject: Re: svn commit: r318021 - in head/sys/arm: arm include To: Andrew Turner Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201705091105.v49B5WAp097952@repo.freebsd.org> <85745E3A-3260-43C7-B134-85BFED786D55@fubar.geek.nz> <8fe20c26-3c0c-98ce-227b-740491253047@freebsd.org> Message-ID: <46e9d14a-87d4-589d-8a1d-97800cdae0cf@freebsd.org> Date: Wed, 10 May 2017 08:18:52 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Content-Language: en-US X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 06:18:55 -0000 On 09.05.2017 17:09, Andrew Turner wrote: >> On 9 May 2017, at 13:40, Michal Meloun wrote: >> >> >> >> On 09.05.2017 13:34, Andrew Turner wrote: >>>> On 9 May 2017, at 12:05, Michal Meloun wrote: >>>> >>>> Author: mmel >>>> Date: Tue May 9 11:05:32 2017 >>>> New Revision: 318021 >>>> URL: https://svnweb.freebsd.org/changeset/base/318021 >>>> >>>> Log: >>>> Introduce pmap_remap_vm_attr(), >>>> it allows to remap one VM memattr class to another. >>>> >>>> This function is intent to be used as workaround for various SoC bugs, >>>> mainly access ordering/sequencing related bugs in crossbar fabric. >>> This seems quite heavy handed to change the attribute for all memory of a given type. >> Yes, exactly. See comment in D10218 - >> /* >> * Workaround for Marvell Armada38X family HW issue >> * between Cortex-A9 CPUs and on-chip devices that may >> * cause hang on heavy load. >> * To avoid that, map all registers including PCIe IO >> * as strongly ordered instead of device memory. >> */ > I don’t think it’s been answered if this is just for PCIe, or all devices. Well, I have not access to Armada errata, so I can't give you more exact answer. But this kind of bugs (ordering/sequencing problems in crossbar fabric) are not that uncommon, I think that some early versions of NPX QorIQ have exactly same problem (all devices must be mapped as SO), i.MX6 can hangs if devices are not mapped with shared flag... > >>> Other architectures have pmap_change_attr to change the attribute on a specific range of memory. >> Right. Problem is that I don't known any method how we can change >> memory attribute for live memory in SMP system, >> without hitting undefined behavior. > I would expect drivers to change the attributes early, before they access the memory. So then why driver does not request right type of memory at allocation? But yes, current situation around pmap_mapdev(), bus_space_map(), bus_activate_resource() and bus_map_resource() is not an optimal. At least for systems where devices must be mapped with different attributes - e.g. normal devices, PCI config space, memory mapped PCI I/O bars, normal/prefetchable memory bars. I think that we needs more *common* VM_MEMATTR_ classes. > We could also use smp_rendezvous to ensure nothing else is running, this will have a performance code, however I would not expect pmap_change_attr to be used in the fast path. > pmap_change_attr() must work very early, so smp_rendezvous() can be problematic. But, for me, the problematic part is cache - mainly transition from cached to uncached memory. I'm not sure, if I known always working sequence of mapping/cache operations witch ensure this transition in architecturally clean way. Next think is that pmap_change_attr() is used very rarely and probably only as workaround for limited bus_activate_resource() functionality. Michal From owner-svn-src-all@freebsd.org Wed May 10 08:35:00 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 35AA0D66B16; Wed, 10 May 2017 08:35:00 +0000 (UTC) (envelope-from royger@gmail.com) Received: from mail-wr0-x241.google.com (mail-wr0-x241.google.com [IPv6:2a00:1450:400c:c0c::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B1D5D1AC; Wed, 10 May 2017 08:34:59 +0000 (UTC) (envelope-from royger@gmail.com) Received: by mail-wr0-x241.google.com with SMTP id w50so6286307wrc.0; Wed, 10 May 2017 01:34:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=XVlnfQKNNJAVWKgZ5uBqvGxw9ZXCI//h8obNzN6634Q=; b=iM5SPV8e3vIVBZz8ambtQfZK+BtSBAPrF5u6G7koxbaB14meoXwoW2SxE0NX3QvXfa SYIkjxOK3NOzyo66unTRB3Eb90oichEjsoCThRdUNEhhm2oaUZ5oNTJVMKKLoyLXxdqy XGufbV/WV0suJbNYcPUe7lTDug9ZINbk4DbHE+j/4DCalVF/kE7+cN5eORu9O4rdNIAE Vss+BQK0JYxMBeP+bf35bdCGLYXxbszMhtBLNLWxM7PAIpzxj1UbmLwCarbW0m8ApRxP RPmzHMxO4W9CeC9md+Xqmyg2OMNRTIaErU+7m/a53qCY/9nRr4rvvw7NcOT+mO+RjLV9 cCXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=XVlnfQKNNJAVWKgZ5uBqvGxw9ZXCI//h8obNzN6634Q=; b=A7dklT82ZBFx9T4j+1ji0Y1/AH1ZAeppiKkkT/ZH2jHgksyn5HkS7l6skFdBNvsYs5 BmPYV0VQqO1RQWNjwDiLGTq4vnwz+jO5wSxsJzgsIm7fotlIF8Eo/haAQ9C6oYH1rHEY Kf/Jtz9k8SQRyKkR2aHRMKOcztgAxIU6RyongvgjuzsWLJ+WERD93Gt0s0XxpTmDVc3J gbiM3XuZWQ9lfjKcQ+pp0liBnXg0187ehTi7feN3niUYtWT3gn4ZSXbxsTKjAljeRKvI jUIwNlWeqkGWAB7eRtZtXbJun0IrCdkx1JLH8roY5ilFwq5h8Ck4VQ2CJiP8dlldIo28 CmJg== X-Gm-Message-State: AODbwcDVemroEq6xl3JonvtOm8GxlcrflbiMxPMsuw+P6WBrdygblcuR 2btC0iBivDEthQ== X-Received: by 10.80.174.99 with SMTP id c90mr3302064edd.136.1494405297760; Wed, 10 May 2017 01:34:57 -0700 (PDT) Received: from localhost (default-46-102-197-194.interdsl.co.uk. [46.102.197.194]) by smtp.gmail.com with ESMTPSA id x26sm850694edx.60.2017.05.10.01.34.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 10 May 2017 01:34:56 -0700 (PDT) Sender: =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= Date: Wed, 10 May 2017 09:34:52 +0100 From: Roger Pau =?iso-8859-1?Q?Monn=E9?= To: Colin Percival Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r301198 - head/sys/dev/xen/netfront Message-ID: <20170510083452.tmhumxatf356miv6@dhcp-3-128.uk.xensource.com> References: <201606021116.u52BGajD047287@repo.freebsd.org> <0100015bccba6abc-4c3b1487-25e3-4640-8221-885341ece829-000000@email.amazonses.com> <20170509100912.h3ylwugahvfi5cc2@dhcp-3-128.uk.xensource.com> <0100015beeed2f38-6246d7db-7f23-4b8a-ba50-b97ec0953457-000000@email.amazonses.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <0100015beeed2f38-6246d7db-7f23-4b8a-ba50-b97ec0953457-000000@email.amazonses.com> User-Agent: NeoMutt/20170428 (1.8.2) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 08:35:00 -0000 On Tue, May 09, 2017 at 08:36:13PM +0000, Colin Percival wrote: > On 05/09/17 03:09, Roger Pau Monn� wrote: > > On Wed, May 03, 2017 at 05:13:40AM +0000, Colin Percival wrote: > >> On 06/02/16 04:16, Roger Pau Monn� wrote: > >>> Author: royger > >>> Date: Thu Jun 2 11:16:35 2016 > >>> New Revision: 301198 > >>> URL: https://svnweb.freebsd.org/changeset/base/301198 > >> > >> I think this commit is responsible for panics I'm seeing in EC2 on T2 family > >> instances. [...] > >> but under high traffic volumes I think a separate thread can already be > >> running in xn_rxeof, having dropped the RX lock while it passes a packet > >> up the stack. This would result in two different threads trying to process > >> the same set of responses from the ring, with (unsurprisingly) bad results. > > > > Hm, right, xn_rxeof drops the lock while pushing the packet up the stack. > > There's a "XXX" comment on top of that, could you try to remove the lock > > dripping and see what happens? > > > > I'm not sure there's any reason to drop the lock here, I very much doubt > > if_input is going to sleep. > > Judging by > $ grep -R -B 1 -A 1 if_input /usr/src/sys/dev > I'm pretty sure that we do indeed need to drop the lock. If it's possible > to enter if_input while holding locks, there are a *lot* of network interface > drivers which are dropping locks unnecessarily... > > >> 3. Why xn_ifinit_locked is consuming ring responses. > > > > There might be pending RX packets on the ring, so netfront consumes them and > > signals netback. In the unlikely event that the RX ring was full when > > xn_ifinit_locked is called, not doing this would mean the RX queue would get > > stuck forever, since there's no guarantee netfront will receive event channel > > notifications. > > In that case, I'm guessing it would be safe to skip this if another thread is > already running xn_rxeof and chewing through the packets on the ring? It > would be easy to set a flag in xn_rxeof before we drop locks. Hm, I think it would be better to fix xn_rxeof so that netfront doesn't drop the lock while poking at the ring, what about the following patch? It should also prevent needlessly dropping and acquiring the lock for each packet netfront pushes up the stack. NB: I've only compile-tested this. ---8<--- diff --git a/sys/dev/xen/netfront/netfront.c b/sys/dev/xen/netfront/netfront.c index 99ccdaaf5000..482b9e948fde 100644 --- a/sys/dev/xen/netfront/netfront.c +++ b/sys/dev/xen/netfront/netfront.c @@ -1161,17 +1161,18 @@ xn_rxeof(struct netfront_rxq *rxq) struct mbufq mbufq_rxq, mbufq_errq; int err, work_to_do; - do { - XN_RX_LOCK_ASSERT(rxq); - if (!netfront_carrier_ok(np)) - return; + XN_RX_LOCK_ASSERT(rxq); + + if (!netfront_carrier_ok(np)) + return; - /* XXX: there should be some sane limit. */ - mbufq_init(&mbufq_errq, INT_MAX); - mbufq_init(&mbufq_rxq, INT_MAX); + /* XXX: there should be some sane limit. */ + mbufq_init(&mbufq_errq, INT_MAX); + mbufq_init(&mbufq_rxq, INT_MAX); - ifp = np->xn_ifp; + ifp = np->xn_ifp; + do { rp = rxq->ring.sring->rsp_prod; rmb(); /* Ensure we see queued responses up to 'rp'. */ @@ -1191,7 +1192,7 @@ xn_rxeof(struct netfront_rxq *rxq) } m->m_pkthdr.rcvif = ifp; - if ( rx->flags & NETRXF_data_validated ) { + if (rx->flags & NETRXF_data_validated) { /* * According to mbuf(9) the correct way to tell * the stack that the checksum of an inbound @@ -1214,50 +1215,45 @@ xn_rxeof(struct netfront_rxq *rxq) } (void )mbufq_enqueue(&mbufq_rxq, m); - rxq->ring.rsp_cons = i; } - mbufq_drain(&mbufq_errq); + rxq->ring.rsp_cons = i; - /* - * Process all the mbufs after the remapping is complete. - * Break the mbuf chain first though. - */ - while ((m = mbufq_dequeue(&mbufq_rxq)) != NULL) { - if_inc_counter(ifp, IFCOUNTER_IPACKETS, 1); + xn_alloc_rx_buffers(rxq); - /* XXX: Do we really need to drop the rx lock? */ - XN_RX_UNLOCK(rxq); + RING_FINAL_CHECK_FOR_RESPONSES(&rxq->ring, work_to_do); + } while (work_to_do); + + XN_RX_UNLOCK(rxq); + mbufq_drain(&mbufq_errq); + /* + * Process all the mbufs after the remapping is complete. + * Break the mbuf chain first though. + */ + while ((m = mbufq_dequeue(&mbufq_rxq)) != NULL) { + if_inc_counter(ifp, IFCOUNTER_IPACKETS, 1); #if (defined(INET) || defined(INET6)) - /* Use LRO if possible */ - if ((ifp->if_capenable & IFCAP_LRO) == 0 || - lro->lro_cnt == 0 || tcp_lro_rx(lro, m, 0)) { - /* - * If LRO fails, pass up to the stack - * directly. - */ - (*ifp->if_input)(ifp, m); - } -#else + /* Use LRO if possible */ + if ((ifp->if_capenable & IFCAP_LRO) == 0 || + lro->lro_cnt == 0 || tcp_lro_rx(lro, m, 0)) { + /* + * If LRO fails, pass up to the stack + * directly. + */ (*ifp->if_input)(ifp, m); -#endif - - XN_RX_LOCK(rxq); } - - rxq->ring.rsp_cons = i; +#else + (*ifp->if_input)(ifp, m); +#endif + } #if (defined(INET) || defined(INET6)) - /* - * Flush any outstanding LRO work - */ - tcp_lro_flush_all(lro); + /* + * Flush any outstanding LRO work + */ + tcp_lro_flush_all(lro); #endif - - xn_alloc_rx_buffers(rxq); - - RING_FINAL_CHECK_FOR_RESPONSES(&rxq->ring, work_to_do); - } while (work_to_do); + XN_RX_LOCK(rxq); } static void From owner-svn-src-all@freebsd.org Wed May 10 08:36:40 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@freebsd.org Wed May 10 08:46:16 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B1F98D66F3B; Wed, 10 May 2017 08:46:16 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6B32FB86; Wed, 10 May 2017 08:46:16 +0000 (UTC) (envelope-from dim@FreeBSD.org) 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 00DBF240CB; Wed, 10 May 2017 10:46:13 +0200 (CEST) From: Dimitry Andric Message-Id: <1D188CE2-2860-4204-BD34-F5C4DD6BAFEA@FreeBSD.org> Content-Type: multipart/signed; boundary="Apple-Mail=_9BDC38ED-CC7A-48B6-ADC9-79495770E915"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: svn commit: r318017 - head/share/man/man4 Date: Wed, 10 May 2017 10:46:12 +0200 In-Reply-To: <20170510095816.X5705@besplex.bde.org> Cc: Ian Lepore , Edward Tomasz Napierala , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org To: Bruce Evans References: <201705090836.v498a9JJ035778@repo.freebsd.org> <1494372587.59865.9.camel@freebsd.org> <20170510095816.X5705@besplex.bde.org> X-Mailer: Apple Mail (2.3273) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 08:46:16 -0000 --Apple-Mail=_9BDC38ED-CC7A-48B6-ADC9-79495770E915 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii On 10 May 2017, at 02:47, Bruce Evans wrote: > > On Tue, 9 May 2017, Ian Lepore wrote: > >> On Tue, 2017-05-09 at 08:36 +0000, Edward Tomasz Napierala wrote: >>> Author: trasz >>> Date: Tue May 9 08:36:09 2017 >>> New Revision: 318017 >>> URL: https://svnweb.freebsd.org/changeset/base/318017 >>> >>> Log: >>> Fix device paths for USB serial adapters: the formatting strings >>> contain "%u", differently from eg uart(4) which uses "%r". >>> >> >> What is %r and where is it documented? > > In the source code. > > It was a ddb internal (but supported by -fformat-extensions, except IIRC > for %jr (1)), but is now used by makedev(). In clang, it is supported with __attribute__((__freebsd_kprintf__)) (since r280031). The format checker assumes the argument is a plain int, just like our patched gcc does. -Dimitry --Apple-Mail=_9BDC38ED-CC7A-48B6-ADC9-79495770E915 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 iEYEARECAAYFAlkS01QACgkQsF6jCi4glqPiowCcCmfJ8wkuiktcFxGngM1Akuq1 7ycAn1OSrLoH/u8QHOzXRp2oSiZpT/aa =+jGj -----END PGP SIGNATURE----- --Apple-Mail=_9BDC38ED-CC7A-48B6-ADC9-79495770E915-- From owner-svn-src-all@freebsd.org Wed May 10 09:36:35 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EB86CD6346D; Wed, 10 May 2017 09:36:35 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AEC6D1BB5; Wed, 10 May 2017 09:36:35 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4A9aYlP061798; Wed, 10 May 2017 09:36:34 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4A9aYrH061796; Wed, 10 May 2017 09:36:34 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201705100936.v4A9aYrH061796@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Wed, 10 May 2017 09:36:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318137 - head/usr.bin/mkimg X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 09:36:36 -0000 Author: manu Date: Wed May 10 09:36:34 2017 New Revision: 318137 URL: https://svnweb.freebsd.org/changeset/base/318137 Log: mkimg: Add -C argument to specify maximum capacity Add a -C option to specify a maximum capacity for the final image file. It is useful to control the size of the generated image for sdcard or when we will add dynamic size partition. Add --capacity which is a shorthand to define min and max capacity at the same time. Reviewed by: bapt, marcel, wblock (manpages) Sponsored by: Gandi.net Differential Revision: https://reviews.freebsd.org/D10509 Modified: head/usr.bin/mkimg/mkimg.1 head/usr.bin/mkimg/mkimg.c Modified: head/usr.bin/mkimg/mkimg.1 ============================================================================== --- head/usr.bin/mkimg/mkimg.1 Wed May 10 05:28:14 2017 (r318136) +++ head/usr.bin/mkimg/mkimg.1 Wed May 10 09:36:34 2017 (r318137) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 7, 2015 +.Dd April 26, 2017 .Dt MKIMG 1 .Os .Sh NAME @@ -37,7 +37,9 @@ .Op Fl S Ar secsz .Op Fl T Ar tracksz .Op Fl b Ar bootcode -.Op Fl c Ar capacity +.Op Fl c Ar min_capacity +.Op Fl C Ar max_capacity +.Op Fl -capacity Ar capacity .Op Fl f Ar format .Op Fl o Ar outfile .Op Fl a Ar active @@ -125,6 +127,18 @@ given capacity, then the disk image will given. .Pp The +.Fl C +option specifies a maximum capacity for the disk image. +If the combined sizes of the given partitions exceed the size given with +.Fl C , +image creation fails. +.Pp +The +.Fl -capacity +option is a shorthand to specify the minimum and maximum capacity at the +same time. +.Pp +The .Fl v option increases the level of output that the .Nm Modified: head/usr.bin/mkimg/mkimg.c ============================================================================== --- head/usr.bin/mkimg/mkimg.c Wed May 10 05:28:14 2017 (r318136) +++ head/usr.bin/mkimg/mkimg.c Wed May 10 09:36:34 2017 (r318137) @@ -27,6 +27,7 @@ #include __FBSDID("$FreeBSD$"); +#include #include #include #include @@ -46,18 +47,21 @@ __FBSDID("$FreeBSD$"); #include "mkimg.h" #include "scheme.h" -#define LONGOPT_FORMATS 0x01000001 -#define LONGOPT_SCHEMES 0x01000002 -#define LONGOPT_VERSION 0x01000003 +#define LONGOPT_FORMATS 0x01000001 +#define LONGOPT_SCHEMES 0x01000002 +#define LONGOPT_VERSION 0x01000003 +#define LONGOPT_CAPACITY 0x01000004 static struct option longopts[] = { { "formats", no_argument, NULL, LONGOPT_FORMATS }, { "schemes", no_argument, NULL, LONGOPT_SCHEMES }, { "version", no_argument, NULL, LONGOPT_VERSION }, + { "capacity", required_argument, NULL, LONGOPT_CAPACITY }, { NULL, 0, NULL, 0 } }; -static uint64_t capacity; +static uint64_t min_capacity = 0; +static uint64_t max_capacity = 0; struct partlisthead partlist = TAILQ_HEAD_INITIALIZER(partlist); u_int nparts = 0; @@ -148,7 +152,8 @@ usage(const char *why) fputc('\n', stderr); fprintf(stderr, "\t-a \t- mark num'th partion as active\n"); fprintf(stderr, "\t-b \t- file containing boot code\n"); - fprintf(stderr, "\t-c \t- capacity (in bytes) of the disk\n"); + fprintf(stderr, "\t-c \t- minimum capacity (in bytes) of the disk\n"); + fprintf(stderr, "\t-C \t- maximum capacity (in bytes) of the disk\n"); fprintf(stderr, "\t-f \n"); fprintf(stderr, "\t-o \t- file to write image into\n"); fprintf(stderr, "\t-p \n"); @@ -378,12 +383,17 @@ mkimg_chs(lba_t lba, u_int maxcyl, u_int static int capacity_resize(lba_t end) { - lba_t capsz; + lba_t min_capsz, max_capsz; - capsz = (capacity + secsz - 1) / secsz; - if (end >= capsz) + min_capsz = (min_capacity + secsz - 1) / secsz; + max_capsz = (max_capacity + secsz - 1) / secsz; + + if (max_capsz != 0 && end > max_capsz) + return (ENOSPC); + if (end >= min_capsz) return (0); - return (image_set_size(capsz)); + + return (image_set_size(min_capsz)); } static void @@ -470,7 +480,7 @@ main(int argc, char *argv[]) bcfd = -1; outfd = 1; /* Write to stdout by default */ - while ((c = getopt_long(argc, argv, "a:b:c:f:o:p:s:vyH:P:S:T:", + while ((c = getopt_long(argc, argv, "a:b:c:C:f:o:p:s:vyH:P:S:T:", longopts, NULL)) != -1) { switch (c) { case 'a': /* ACTIVE PARTITION, if supported */ @@ -485,10 +495,15 @@ main(int argc, char *argv[]) if (bcfd == -1) err(EX_UNAVAILABLE, "%s", optarg); break; - case 'c': /* CAPACITY */ - error = parse_uint64(&capacity, 1, INT64_MAX, optarg); + case 'c': /* MINIMUM CAPACITY */ + error = parse_uint64(&min_capacity, 1, INT64_MAX, optarg); if (error) - errc(EX_DATAERR, error, "capacity in bytes"); + errc(EX_DATAERR, error, "minimum capacity in bytes"); + break; + case 'C': /* MAXIMUM CAPACITY */ + error = parse_uint64(&max_capacity, 1, INT64_MAX, optarg); + if (error) + errc(EX_DATAERR, error, "maximum capacity in bytes"); break; case 'f': /* OUTPUT FORMAT */ if (format_selected() != NULL) @@ -559,6 +574,12 @@ main(int argc, char *argv[]) print_version(); exit(EX_OK); /*NOTREACHED*/ + case LONGOPT_CAPACITY: + error = parse_uint64(&min_capacity, 1, INT64_MAX, optarg); + if (error) + errc(EX_DATAERR, error, "capacity in bytes"); + max_capacity = min_capacity; + break; default: usage("unknown option"); } @@ -568,8 +589,10 @@ main(int argc, char *argv[]) usage("trailing arguments"); if (scheme_selected() == NULL && nparts > 0) usage("no scheme"); - if (nparts == 0 && capacity == 0) + if (nparts == 0 && min_capacity == 0) usage("no partitions"); + if (max_capacity != 0 && min_capacity > max_capacity) + usage("minimum capacity cannot be larger than the maximum one"); if (secsz > blksz) { if (blksz != 0) From owner-svn-src-all@freebsd.org Wed May 10 12:57:25 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@freebsd.org Wed May 10 14:54:33 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A4DE2D66592; Wed, 10 May 2017 14:54:33 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 71B7938A; Wed, 10 May 2017 14:54:33 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4AEsWqv092773; Wed, 10 May 2017 14:54:32 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4AEsWWf092772; Wed, 10 May 2017 14:54:32 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201705101454.v4AEsWWf092772@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Wed, 10 May 2017 14:54:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318138 - head/usr.bin/resizewin X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 14:54:33 -0000 Author: trasz Date: Wed May 10 14:54:32 2017 New Revision: 318138 URL: https://svnweb.freebsd.org/changeset/base/318138 Log: Revert to pre-r318116 wording to not give the false impression that setting the kernels' idea of terminal size is somehow an alternative to environment variables. Reported by: kib MFC after: 2 weeks Sponsored by: DARPA, AFRL Modified: head/usr.bin/resizewin/resizewin.1 Modified: head/usr.bin/resizewin/resizewin.1 ============================================================================== --- head/usr.bin/resizewin/resizewin.1 Wed May 10 09:36:34 2017 (r318137) +++ head/usr.bin/resizewin/resizewin.1 Wed May 10 14:54:32 2017 (r318138) @@ -67,8 +67,8 @@ which is part of the distribution. However, .Nm -only works with VT100/ANSI-compatible terminals and directly sets -the terminal size instead of emitting commands to set environment variables. +only works with VT100/ANSI-compatible terminals and does not emit +commands to set environment variables. .Pp The terminal is assumed to be VT100/ANSI compatible. The VT100/ANSI escape sequences are supported by virtually all modern From owner-svn-src-all@freebsd.org Wed May 10 15:20:39 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@freebsd.org Wed May 10 15:20:41 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@freebsd.org Wed May 10 15:27:38 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4053ED66365; Wed, 10 May 2017 15:27:38 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 123401D87; Wed, 10 May 2017 15:27:38 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4AFRbcc005470; Wed, 10 May 2017 15:27:37 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4AFRbbu005469; Wed, 10 May 2017 15:27:37 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201705101527.v4AFRbbu005469@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Wed, 10 May 2017 15:27:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318141 - head/usr.bin/mkuzip X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 15:27:38 -0000 Author: asomers Date: Wed May 10 15:27:36 2017 New Revision: 318141 URL: https://svnweb.freebsd.org/changeset/base/318141 Log: strcpy => strlcpy Reported by: Coverity CID: 1352771 MFC after: 3 weeks Sponsored by: Spectra Logic Corp Modified: head/usr.bin/mkuzip/mkuzip.c Modified: head/usr.bin/mkuzip/mkuzip.c ============================================================================== --- head/usr.bin/mkuzip/mkuzip.c Wed May 10 15:20:39 2017 (r318140) +++ head/usr.bin/mkuzip/mkuzip.c Wed May 10 15:27:36 2017 (r318141) @@ -192,7 +192,8 @@ int main(int argc, char **argv) /* Not reached */ } - strcpy(hdr.magic, cfs.handler->magic); + assert(strlcpy(hdr.magic, cfs.handler->magic, sizeof(hdr.magic)) + < sizeof(hdr.magic)); if (cfs.en_dedup != 0) { hdr.magic[CLOOP_OFS_VERSN] = CLOOP_MAJVER_3; From owner-svn-src-all@freebsd.org Wed May 10 15:32:30 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B6647D66603 for ; Wed, 10 May 2017 15:32:30 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x22a.google.com (mail-io0-x22a.google.com [IPv6:2607:f8b0:4001:c06::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7B886327 for ; Wed, 10 May 2017 15:32:30 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x22a.google.com with SMTP id p24so3862516ioi.0 for ; Wed, 10 May 2017 08:32:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=PLxXlreCVKO/0OoVWBxVoVlHyksVtRHF/85WE7jXr3w=; b=A7yuYF5N2cGXqhJY8A+VaKg/Xz6TMol6FNiYZYvVbLMhySCyrWmQLVfgb4CtntlII4 XQwq/LUeXQbGei0ENENZPbWgBGBSukZmN4JW3E/L0Ym+2bjMWRcZBCPZxlzqIQD6VD0s YQUnd1wKIeo2fUJMlCzZ5moAZY3rXwqQD9XMtEM6egwmCi4i6WN6k/eoH5DHLeZCbEvR flFts1upZv82I3lSO+Rjj0ZdiYmyQw6Z/g9TYEmivjT6MkZIKXDpDZLXCZHEKw4H8JBT D2KfXMobH7jbkC6QMI+/8JB8ktw5T9h5WZY2/AM2bMQvS36eG3Wm51NLBTcMnXuvdvge Cf1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=PLxXlreCVKO/0OoVWBxVoVlHyksVtRHF/85WE7jXr3w=; b=qXAomN+be/6/GE4Ye64ceShOk37iRP5cTEzNQ+ZVctdPAdyEICnfxuxp4AgANZ4OJY HVwv2xjN0HQYjOJLTNKDjqXnGukX2VB+kXeImf2KgHwhGj3d7hPLt1KGBMi0XRKe+w31 b5YQ/AlzKr4IBjgTvZTpU3CDIucE+Z4UOe0JsL2LhojNaBvNurjPZWcSxRRaAYoYTxe7 IEm9zuAal5P927C1MBDfaSlOL+aK/OAf5mtj83gpDSluTBHOPPs8O+SWGDKRSZd3HCnL Ct3EA1hZ6KvOul07Rh1TLJQDd9pKumFPpxjuu73KhB/FNHfSBiQHBp/mCy5y0AZnsZ7L oSjg== X-Gm-Message-State: AODbwcCbIKLCyfwjoIlKbq+Q+CBXIQazVFHIF+G4kVbBWo+cQk3gRWY+ sRmznjeBZ49uoUykKqNpcanYbBB2/Q== X-Received: by 10.107.188.69 with SMTP id m66mr4545269iof.148.1494430349730; Wed, 10 May 2017 08:32:29 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.126.6 with HTTP; Wed, 10 May 2017 08:32:29 -0700 (PDT) X-Originating-IP: [2603:300b:6:5100:55:e5ab:afa:6971] In-Reply-To: <201705101527.v4AFRbbu005469@repo.freebsd.org> References: <201705101527.v4AFRbbu005469@repo.freebsd.org> From: Warner Losh Date: Wed, 10 May 2017 09:32:29 -0600 X-Google-Sender-Auth: B_8tofRDESDKIpNWDQ631QtX_Mw Message-ID: Subject: Re: svn commit: r318141 - head/usr.bin/mkuzip To: Alan Somers Cc: src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 15:32:30 -0000 Doesn't assert get compiled out, which would cause strlcpy to never happen? Warner On Wed, May 10, 2017 at 9:27 AM, Alan Somers wrote: > Author: asomers > Date: Wed May 10 15:27:36 2017 > New Revision: 318141 > URL: https://svnweb.freebsd.org/changeset/base/318141 > > Log: > strcpy => strlcpy > > Reported by: Coverity > CID: 1352771 > MFC after: 3 weeks > Sponsored by: Spectra Logic Corp > > Modified: > head/usr.bin/mkuzip/mkuzip.c > > Modified: head/usr.bin/mkuzip/mkuzip.c > ============================================================================== > --- head/usr.bin/mkuzip/mkuzip.c Wed May 10 15:20:39 2017 (r318140) > +++ head/usr.bin/mkuzip/mkuzip.c Wed May 10 15:27:36 2017 (r318141) > @@ -192,7 +192,8 @@ int main(int argc, char **argv) > /* Not reached */ > } > > - strcpy(hdr.magic, cfs.handler->magic); > + assert(strlcpy(hdr.magic, cfs.handler->magic, sizeof(hdr.magic)) > + < sizeof(hdr.magic)); > > if (cfs.en_dedup != 0) { > hdr.magic[CLOOP_OFS_VERSN] = CLOOP_MAJVER_3; > From owner-svn-src-all@freebsd.org Wed May 10 15:35:42 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 79D68D66792; Wed, 10 May 2017 15:35:42 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4BE0177A; Wed, 10 May 2017 15:35:42 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4AFZfeH009451; Wed, 10 May 2017 15:35:41 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4AFZfOR009450; Wed, 10 May 2017 15:35:41 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201705101535.v4AFZfOR009450@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Wed, 10 May 2017 15:35:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318142 - head/lib/libstand X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 15:35:42 -0000 Author: tsoome Date: Wed May 10 15:35:41 2017 New Revision: 318142 URL: https://svnweb.freebsd.org/changeset/base/318142 Log: libstand: NULL pointer dereference in rarp readether argument is missing & operator. CID: 1374944 Reported by: Coverity, cem Reviewed by: cem Differential Revision: https://reviews.freebsd.org/D10663 Modified: head/lib/libstand/rarp.c Modified: head/lib/libstand/rarp.c ============================================================================== --- head/lib/libstand/rarp.c Wed May 10 15:27:36 2017 (r318141) +++ head/lib/libstand/rarp.c Wed May 10 15:35:41 2017 (r318142) @@ -155,7 +155,7 @@ rarprecv(struct iodesc *d, void **pkt, v printf("rarprecv: "); #endif - n = readether(d, ptr, (void **)&ap, tleft, &etype); + n = readether(d, &ptr, (void **)&ap, tleft, &etype); errno = 0; /* XXX */ if (n == -1 || n < sizeof(struct ether_arp)) { #ifdef RARP_DEBUG From owner-svn-src-all@freebsd.org Wed May 10 15:38:07 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7B17BD66872; Wed, 10 May 2017 15:38:07 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 480F0920; Wed, 10 May 2017 15:38:07 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4AFc6Dk009589; Wed, 10 May 2017 15:38:06 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4AFc6c8009588; Wed, 10 May 2017 15:38:06 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201705101538.v4AFc6c8009588@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Wed, 10 May 2017 15:38:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318143 - head/usr.sbin/pw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 15:38:07 -0000 Author: asomers Date: Wed May 10 15:38:06 2017 New Revision: 318143 URL: https://svnweb.freebsd.org/changeset/base/318143 Log: strcpy => strlcpy Reported by: Coverity CID: 1006715 MFC after: 3 weeks Sponsored by: Spectra Logic Corp Modified: head/usr.sbin/pw/pw_user.c Modified: head/usr.sbin/pw/pw_user.c ============================================================================== --- head/usr.sbin/pw/pw_user.c Wed May 10 15:35:41 2017 (r318142) +++ head/usr.sbin/pw/pw_user.c Wed May 10 15:38:06 2017 (r318143) @@ -33,6 +33,7 @@ static const char rcsid[] = #include #include +#include #include #include #include @@ -501,7 +502,8 @@ pw_pwcrypt(char *password) cryptpw = crypt(password, salt); if (cryptpw == NULL) errx(EX_CONFIG, "crypt(3) failure"); - return strcpy(buf, cryptpw); + assert(strlcpy(buf, cryptpw, sizeof(buf)) < sizeof(buf)); + return (buf); } static char * From owner-svn-src-all@freebsd.org Wed May 10 15:40:30 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CE455D66957; Wed, 10 May 2017 15:40:30 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-yb0-x234.google.com (mail-yb0-x234.google.com [IPv6:2607:f8b0:4002:c09::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8C008A95; Wed, 10 May 2017 15:40:30 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-yb0-x234.google.com with SMTP id 8so8985484ybw.1; Wed, 10 May 2017 08:40:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=TII6qmWLolAjU/hzBG+SwsRa56jyoSx6OmYSPvDnZSw=; b=eWYQ0NGFlKofduqObRkDlnPjV0eAKQRmKmlIzWHPyzy8xkvt1LQXTy5YXVdZ7ZWoNJ ciXl1SiFPr26Mnc666jmVJVpX6hqxtwrUm68JZK8bq8+1Cfx7f8th6Y72qM8bEYn3fi3 AnMZoLY85yGdaV4XMtI7c/lVqCpegIhe8y+ghOvtEuBpTqPgutyj2O51pbFCsNuG0e// khoQZVDvhTe2Mbl788Z6rbnubK0GEGyMhA4pDwQbLPMfqTwrUcoxQXrCJgp0woff+DKy Jq5YYUUYlN/8kXa5MxUovytSJ1obeScVBNG/GnjpVZqL+Q3zBVDzt74l7SnWr6VvHLZo l32A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=TII6qmWLolAjU/hzBG+SwsRa56jyoSx6OmYSPvDnZSw=; b=fK4tleFomDZBebCam/x8DCzWO0Scf8wrQHd5YaW3oihCGiYyZxFs9kCXYEiq8nfQri NZo9XwBRxcvOgn92v7H3CyuH4LeHlbUHGD8+2xzIpGOfWRJJhvXpeA/hS4QexPYwW/mM O7cEdjo+irOyqRYgoiOqDo94klDvEeP2s8KvOTIQ0udumTopbqoOOhBtDA56LRzhIK2r Op0ckg/g/nvzobnmaCgnZPhfaBqH5OXGgmhZYA3nTohUm8AD9ysNM9zNo1IQZ7JDDDSA JSrRmnBfVXB3JJOxSygUCTW/te59k2VlQpzQm8iU+juAUviO54qBTFi8lzmfEsiTIKZ8 gsGA== X-Gm-Message-State: AODbwcDem0rn031G8CdbQUYLVUXUaerrI1EUR+3oW/eQed0DkWCsKchF Iy+un5oPsWylMQyk7r3Sw0PeQKCUEQ== X-Received: by 10.37.220.15 with SMTP id y15mr5261134ybe.16.1494430829165; Wed, 10 May 2017 08:40:29 -0700 (PDT) MIME-Version: 1.0 Sender: asomers@gmail.com Received: by 10.129.20.214 with HTTP; Wed, 10 May 2017 08:40:28 -0700 (PDT) In-Reply-To: References: <201705101527.v4AFRbbu005469@repo.freebsd.org> From: Alan Somers Date: Wed, 10 May 2017 09:40:28 -0600 X-Google-Sender-Auth: fyMpEvAtUS1LRyuxDgvpHDs6-K8 Message-ID: Subject: Re: svn commit: r318141 - head/usr.bin/mkuzip To: Warner Losh Cc: src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 15:40:30 -0000 Hmm. I thought that assert(e) would get turned into e when -DNDEBUG. But looking at the header, you're right. I'll fix it soon. Good catch. -Alan On Wed, May 10, 2017 at 9:32 AM, Warner Losh wrote: > Doesn't assert get compiled out, which would cause strlcpy to never happen? > > Warner > > On Wed, May 10, 2017 at 9:27 AM, Alan Somers wrote: >> Author: asomers >> Date: Wed May 10 15:27:36 2017 >> New Revision: 318141 >> URL: https://svnweb.freebsd.org/changeset/base/318141 >> >> Log: >> strcpy => strlcpy >> >> Reported by: Coverity >> CID: 1352771 >> MFC after: 3 weeks >> Sponsored by: Spectra Logic Corp >> >> Modified: >> head/usr.bin/mkuzip/mkuzip.c >> >> Modified: head/usr.bin/mkuzip/mkuzip.c >> ============================================================================== >> --- head/usr.bin/mkuzip/mkuzip.c Wed May 10 15:20:39 2017 (r318140) >> +++ head/usr.bin/mkuzip/mkuzip.c Wed May 10 15:27:36 2017 (r318141) >> @@ -192,7 +192,8 @@ int main(int argc, char **argv) >> /* Not reached */ >> } >> >> - strcpy(hdr.magic, cfs.handler->magic); >> + assert(strlcpy(hdr.magic, cfs.handler->magic, sizeof(hdr.magic)) >> + < sizeof(hdr.magic)); >> >> if (cfs.en_dedup != 0) { >> hdr.magic[CLOOP_OFS_VERSN] = CLOOP_MAJVER_3; >> From owner-svn-src-all@freebsd.org Wed May 10 15:44:41 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7CE75D66BE1; Wed, 10 May 2017 15:44:41 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5AD09FB2; Wed, 10 May 2017 15:44:41 +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 C06E310A7DB; Wed, 10 May 2017 11:44:39 -0400 (EDT) From: John Baldwin To: Colin Percival Cc: Roger Pau =?ISO-8859-1?Q?Monn=E9?= , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r301198 - head/sys/dev/xen/netfront Date: Tue, 09 May 2017 13:59:24 -0700 Message-ID: <1571628.UQhQsSBvqn@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-STABLE; KDE/4.14.10; amd64; ; ) In-Reply-To: <0100015beeed2f38-6246d7db-7f23-4b8a-ba50-b97ec0953457-000000@email.amazonses.com> References: <201606021116.u52BGajD047287@repo.freebsd.org> <20170509100912.h3ylwugahvfi5cc2@dhcp-3-128.uk.xensource.com> <0100015beeed2f38-6246d7db-7f23-4b8a-ba50-b97ec0953457-000000@email.amazonses.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Wed, 10 May 2017 11:44:39 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 15:44:41 -0000 On Tuesday, May 09, 2017 08:36:13 PM Colin Percival wrote: > On 05/09/17 03:09, Roger Pau Monn=EF=BF=BD wrote: > > On Wed, May 03, 2017 at 05:13:40AM +0000, Colin Percival wrote: > >> On 06/02/16 04:16, Roger Pau Monn=EF=BF=BD wrote: > >>> Author: royger > >>> Date: Thu Jun 2 11:16:35 2016 > >>> New Revision: 301198 > >>> URL: https://svnweb.freebsd.org/changeset/base/301198 > >> > >> I think this commit is responsible for panics I'm seeing in EC2 on= T2 family > >> instances. [...] > >> but under high traffic volumes I think a separate thread can alrea= dy be > >> running in xn_rxeof, having dropped the RX lock while it passes a = packet > >> up the stack. This would result in two different threads trying t= o process > >> the same set of responses from the ring, with (unsurprisingly) bad= results. > >=20 > > Hm, right, xn_rxeof drops the lock while pushing the packet up the = stack. > > There's a "XXX" comment on top of that, could you try to remove the= lock > > dripping and see what happens? > >=20 > > I'm not sure there's any reason to drop the lock here, I very much = doubt > > if_input is going to sleep. >=20 > Judging by > $ grep -R -B 1 -A 1 if_input /usr/src/sys/dev > I'm pretty sure that we do indeed need to drop the lock. If it's pos= sible > to enter if_input while holding locks, there are a *lot* of network i= nterface > drivers which are dropping locks unnecessarily... It depends on how the locks are used. If a NIC driver uses a single lo= ck for both TX and RX, then it needs to drop the lock as on the TX side, if_transmit/if_start will be invoked with various network stack locks h= eld. However, if a driver uses separate locks for RX and TX and doesn't acqu= ire the RX lock while holding a TX lock, then it should be safe to hold the= lock across if_input. A lot of the older 100Mbps PCI NIC drivers only use a single lock and t= hus need to drop the lock. Many multiqueue NIC drivers use separate locks however and probably don't need to drop them around if_input. --=20 John Baldwin From owner-svn-src-all@freebsd.org Wed May 10 16:06:23 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D9892D6774E; Wed, 10 May 2017 16:06:23 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 907301C5; Wed, 10 May 2017 16:06:23 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4AG6MXM021692; Wed, 10 May 2017 16:06:22 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4AG6M4i021690; Wed, 10 May 2017 16:06:22 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201705101606.v4AG6M4i021690@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Wed, 10 May 2017 16:06:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318144 - in head: usr.bin/mkuzip usr.sbin/pw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 16:06:24 -0000 Author: asomers Date: Wed May 10 16:06:22 2017 New Revision: 318144 URL: https://svnweb.freebsd.org/changeset/base/318144 Log: Don't depend on assert(3) getting evaluated Reported by: imp MFC after: 3 weeks X-MFC-With: 318141, 318143 Sponsored by: Spectra Logic Corp Modified: head/usr.bin/mkuzip/mkuzip.c head/usr.sbin/pw/pw_user.c Modified: head/usr.bin/mkuzip/mkuzip.c ============================================================================== --- head/usr.bin/mkuzip/mkuzip.c Wed May 10 15:38:06 2017 (r318143) +++ head/usr.bin/mkuzip/mkuzip.c Wed May 10 16:06:22 2017 (r318144) @@ -108,7 +108,7 @@ int main(int argc, char **argv) struct mkuz_conveyor *cvp; void *c_ctx; struct mkuz_blk_info *chit; - size_t ncpusz, ncpu; + size_t ncpusz, ncpu, magiclen; double st, et; st = getdtime(); @@ -192,8 +192,8 @@ int main(int argc, char **argv) /* Not reached */ } - assert(strlcpy(hdr.magic, cfs.handler->magic, sizeof(hdr.magic)) - < sizeof(hdr.magic)); + magiclen = strlcpy(hdr.magic, cfs.handler->magic, sizeof(hdr.magic)); + assert(magiclen < sizeof(hdr.magic)); if (cfs.en_dedup != 0) { hdr.magic[CLOOP_OFS_VERSN] = CLOOP_MAJVER_3; Modified: head/usr.sbin/pw/pw_user.c ============================================================================== --- head/usr.sbin/pw/pw_user.c Wed May 10 15:38:06 2017 (r318143) +++ head/usr.sbin/pw/pw_user.c Wed May 10 16:06:22 2017 (r318144) @@ -491,6 +491,7 @@ pw_pwcrypt(char *password) char salt[SALTSIZE + 1]; char *cryptpw; static char buf[256]; + size_t pwlen; /* * Calculate a salt value @@ -502,7 +503,8 @@ pw_pwcrypt(char *password) cryptpw = crypt(password, salt); if (cryptpw == NULL) errx(EX_CONFIG, "crypt(3) failure"); - assert(strlcpy(buf, cryptpw, sizeof(buf)) < sizeof(buf)); + pwlen = strlcpy(buf, cryptpw, sizeof(buf)); + assert(pwlen < sizeof(buf)); return (buf); } From owner-svn-src-all@freebsd.org Wed May 10 16:19:22 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E711AD67DC0 for ; Wed, 10 May 2017 16:19:22 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x22e.google.com (mail-io0-x22e.google.com [IPv6:2607:f8b0:4001:c06::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id ABFCD104C for ; Wed, 10 May 2017 16:19:22 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x22e.google.com with SMTP id f102so4760181ioi.2 for ; Wed, 10 May 2017 09:19:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=Plz3j3o2jbzr68ypodhMd1WDucBNgM0ZuUAYt3DiwCY=; b=Adlc8uXPOng0TYppRgxVPTTe3oNnsun+eF6Vb2xMts68Fis0wpVHb++pKtqpO+cHii nOlJ2DyAGkBG+FmZBSnYkKjZZF0pnKV/k+RChzTXccGTEq4+HCx7zvHorWyIXG6HvAJo rftN3CR3XM11wRNdQZFhx2IMqECjj2qh+zoJrJtehuyo68V8ftjdnU560rQWd4f6imNC Ps5b9rLcrOdILStLaiTTyPPRCzA4M876dZ7VIKoLfX0wtFL3c+iLFrVCTh70F4pQ5Nwf fbgnEArtvenGTCRSOvI8cgAoFmRCu3q3Z7gEv0YDJgsJ0C2Y0MVXIpnSJOfajCiIOcfi WIkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=Plz3j3o2jbzr68ypodhMd1WDucBNgM0ZuUAYt3DiwCY=; b=f9/3wLjX5+2eMA8fV2lj79I0yxuhQOSZrYPJHL2mhqOsyfLKoPYD6SVMrW3Tqv51nN qXmEtQ+BNgkXoB2s7UbKATfL+riMhpbiy3jmzaaY8EtQXUPGujrWnU4fWyjfjHKpxgZY 1wmOlNOMQbv6N+YmwRB8KgneLJzVLceXXtPYCqwstl/Qf/43U1xXYBw8Jc7YIn9JxDK2 QUm4YbYmGAz5/0kHG52+WowES1eO5et0aDxFk19CQ3DKl9R6LYWn2MOEwhD6A48FL7sK ZE2gCpEZg5k5LsDV56QojVjaixx1NUOIUK1lIxtyFHggPgfJc5ooRmLCysrkBAVwF5Xk zYrQ== X-Gm-Message-State: AODbwcAe6eBlgZkVUXbjLIktfyXaqlVnYZtdEV0X9H/tibtAm68nisvu il6N9sR18QBIVbReQYRYrY5xCSUAHQ== X-Received: by 10.107.85.4 with SMTP id j4mr4276510iob.218.1494433161879; Wed, 10 May 2017 09:19:21 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.126.6 with HTTP; Wed, 10 May 2017 09:19:21 -0700 (PDT) X-Originating-IP: [2603:300b:6:5100:4c5d:3029:c8d8:ae82] In-Reply-To: <201705101538.v4AFc6c8009588@repo.freebsd.org> References: <201705101538.v4AFc6c8009588@repo.freebsd.org> From: Warner Losh Date: Wed, 10 May 2017 10:19:21 -0600 X-Google-Sender-Auth: -V71iAmEdinxClIJq3wbJomaV00 Message-ID: Subject: Re: svn commit: r318143 - head/usr.sbin/pw To: Alan Somers Cc: src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 16:19:23 -0000 Again, this is wrong. -DNDEBUG makes this a nop. Warner. On Wed, May 10, 2017 at 9:38 AM, Alan Somers wrote: > Author: asomers > Date: Wed May 10 15:38:06 2017 > New Revision: 318143 > URL: https://svnweb.freebsd.org/changeset/base/318143 > > Log: > strcpy => strlcpy > > Reported by: Coverity > CID: 1006715 > MFC after: 3 weeks > Sponsored by: Spectra Logic Corp > > Modified: > head/usr.sbin/pw/pw_user.c > > Modified: head/usr.sbin/pw/pw_user.c > ============================================================================== > --- head/usr.sbin/pw/pw_user.c Wed May 10 15:35:41 2017 (r318142) > +++ head/usr.sbin/pw/pw_user.c Wed May 10 15:38:06 2017 (r318143) > @@ -33,6 +33,7 @@ static const char rcsid[] = > #include > #include > > +#include > #include > #include > #include > @@ -501,7 +502,8 @@ pw_pwcrypt(char *password) > cryptpw = crypt(password, salt); > if (cryptpw == NULL) > errx(EX_CONFIG, "crypt(3) failure"); > - return strcpy(buf, cryptpw); > + assert(strlcpy(buf, cryptpw, sizeof(buf)) < sizeof(buf)); > + return (buf); > } > > static char * > From owner-svn-src-all@freebsd.org Wed May 10 16:23:32 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 62284D67FEF for ; Wed, 10 May 2017 16:23:32 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x236.google.com (mail-io0-x236.google.com [IPv6:2607:f8b0:4001:c06::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 274191574 for ; Wed, 10 May 2017 16:23:32 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x236.google.com with SMTP id o12so4857679iod.3 for ; Wed, 10 May 2017 09:23:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=xlF6aVHF1YKY8cBF3LIMC8z+kuQR8yWZnAa3+H0OPsA=; b=e3tRXNWItzTC7i/I7fT/L/0vDS3Z5mdDkvzMDuBZxrq+3I9Hom4HdRdnKOzlQi8EBv fPM1VVBB74JuWEasjG1MVD1RYl0SCSjimzvAb4QHwovBcgacHDyNkuLfI5QfClNZSs6C uZAEYyR8l8qJisxZYuhTLsW6TGWM2w80jK77rSlbzkF70SFXdhcedFisI3k+BE1I//8j YGpj7/DcampJTBfz3pHQ2LvdNP6fnLTvRf9GsEdOB+4isfJ1tquLj7ACBa3rTbwjzlXA O9wzlyWU9YcuBdpIqGo1bbq31PcciP3h3pP2VHBx2ocMvFnUp8tLhdDLdFLCtiiYwa61 jFxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=xlF6aVHF1YKY8cBF3LIMC8z+kuQR8yWZnAa3+H0OPsA=; b=C1i1mTrlpZQJ5hQbLl6C0bBiiboPizigLogMOi303RlPU7J70b4iG9V+vjZy994I/q +7KMKTwReMusMO+1ZbaCuCcCyFTCOWJJapqK332xES2PlC4nZC6hItLTs02jn+IP63Qv MVuAZdd4q4fWiWEPi+Qczs5YPreC3xX33Rv4HQxV2BPEYIAM2xWOOxl17KyUNdKeq4tm 9Egu8MDwFiOJwfk02gJ78Ssaj65moIpJNhHtS43znHWN/eIJWs2Tql9Hwp83fh/QoWlV TSf4W8QdCWjvc/aGUkKy2atZU9Ev/Ir5xHy5CTtdOb3LFc99Q9gq5ljf8sMSD0h34VtJ AYGg== X-Gm-Message-State: AODbwcAIgVUS5IIl3qRcYKskbGaheDDJ8ngNzCeYuWYGrGRvJ0+P05UU qi7T0roe1Ur1vdNZlXk59n6FE2W/Ig== X-Received: by 10.107.85.4 with SMTP id j4mr4297048iob.218.1494433411299; Wed, 10 May 2017 09:23:31 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.126.6 with HTTP; Wed, 10 May 2017 09:23:30 -0700 (PDT) X-Originating-IP: [2603:300b:6:5100:4c5d:3029:c8d8:ae82] In-Reply-To: <201705101606.v4AG6M4i021690@repo.freebsd.org> References: <201705101606.v4AG6M4i021690@repo.freebsd.org> From: Warner Losh Date: Wed, 10 May 2017 10:23:30 -0600 X-Google-Sender-Auth: 2svVExrqBxPpN4WqFW6FhBCHT20 Message-ID: Subject: Re: svn commit: r318144 - in head: usr.bin/mkuzip usr.sbin/pw To: Alan Somers Cc: src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 16:23:32 -0000 On Wed, May 10, 2017 at 10:06 AM, Alan Somers wrote: > Author: asomers > Date: Wed May 10 16:06:22 2017 > New Revision: 318144 > URL: https://svnweb.freebsd.org/changeset/base/318144 > > Log: > Don't depend on assert(3) getting evaluated Thanks! You can ignore my other grump. I unwisely didn't read all my inbox. Warner > Reported by: imp > MFC after: 3 weeks > X-MFC-With: 318141, 318143 > Sponsored by: Spectra Logic Corp > > Modified: > head/usr.bin/mkuzip/mkuzip.c > head/usr.sbin/pw/pw_user.c > > Modified: head/usr.bin/mkuzip/mkuzip.c > ============================================================================== > --- head/usr.bin/mkuzip/mkuzip.c Wed May 10 15:38:06 2017 (r318143) > +++ head/usr.bin/mkuzip/mkuzip.c Wed May 10 16:06:22 2017 (r318144) > @@ -108,7 +108,7 @@ int main(int argc, char **argv) > struct mkuz_conveyor *cvp; > void *c_ctx; > struct mkuz_blk_info *chit; > - size_t ncpusz, ncpu; > + size_t ncpusz, ncpu, magiclen; > double st, et; > > st = getdtime(); > @@ -192,8 +192,8 @@ int main(int argc, char **argv) > /* Not reached */ > } > > - assert(strlcpy(hdr.magic, cfs.handler->magic, sizeof(hdr.magic)) > - < sizeof(hdr.magic)); > + magiclen = strlcpy(hdr.magic, cfs.handler->magic, sizeof(hdr.magic)); > + assert(magiclen < sizeof(hdr.magic)); > > if (cfs.en_dedup != 0) { > hdr.magic[CLOOP_OFS_VERSN] = CLOOP_MAJVER_3; > > Modified: head/usr.sbin/pw/pw_user.c > ============================================================================== > --- head/usr.sbin/pw/pw_user.c Wed May 10 15:38:06 2017 (r318143) > +++ head/usr.sbin/pw/pw_user.c Wed May 10 16:06:22 2017 (r318144) > @@ -491,6 +491,7 @@ pw_pwcrypt(char *password) > char salt[SALTSIZE + 1]; > char *cryptpw; > static char buf[256]; > + size_t pwlen; > > /* > * Calculate a salt value > @@ -502,7 +503,8 @@ pw_pwcrypt(char *password) > cryptpw = crypt(password, salt); > if (cryptpw == NULL) > errx(EX_CONFIG, "crypt(3) failure"); > - assert(strlcpy(buf, cryptpw, sizeof(buf)) < sizeof(buf)); > + pwlen = strlcpy(buf, cryptpw, sizeof(buf)); > + assert(pwlen < sizeof(buf)); > return (buf); > } > > From owner-svn-src-all@freebsd.org Wed May 10 16:27:04 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 28CCBD660A7; Wed, 10 May 2017 16:27:04 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-wr0-f179.google.com (mail-wr0-f179.google.com [209.85.128.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B8EC9170B; Wed, 10 May 2017 16:27:03 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-wr0-f179.google.com with SMTP id l9so712688wre.1; Wed, 10 May 2017 09:27:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=77Su0Lvqgqyrv33J+IoEMw3flivEAJmA7iHsls6kadM=; b=j9lXG2pmtNxWcNIIiCpTKI0wzt5GtFtlPcnah7FFVKrqiByvAkhhJMGnv5+RZVY8B7 QOH2l+Wnkv7WcunBOnyBk5vbZSkyYjZ4L5QqAbT5QEaObc5BKtz/H/BLI+B3rLEAxU49 TscWyexGLkJTCPt3ymd4PXozBgDVWoZE8MFeTugcLe+ugPuvauChELQAXgE/AsaY5Bwq NuPH1SkLKwqONxBhsSRqNUYAf3i/QsFoDcwaSQjkwrQDY22bPn7t2dVaEQPmEAV2xouI q5DNnPPi5U6dEbCPMKDAkWHOgKSAiocdrsFJ5VmXXBqdlCYA91nRDl9uRVYFg7kAeC5p qVsQ== X-Gm-Message-State: AODbwcCqXhqlGEsHF4KlMHMV6xEURmDODZ+z2TrvWrdAfMdvSn9uirOs 9c65GiBDACytoskzPQU= X-Received: by 10.223.139.150 with SMTP id o22mr4357960wra.118.1494429688542; Wed, 10 May 2017 08:21:28 -0700 (PDT) Received: from mail-wm0-f52.google.com (mail-wm0-f52.google.com. [74.125.82.52]) by smtp.gmail.com with ESMTPSA id s81sm3903637wms.6.2017.05.10.08.21.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 10 May 2017 08:21:28 -0700 (PDT) Received: by mail-wm0-f52.google.com with SMTP id 142so3038371wma.1; Wed, 10 May 2017 08:21:28 -0700 (PDT) X-Received: by 10.80.186.201 with SMTP id x67mr4789064ede.46.1494429688179; Wed, 10 May 2017 08:21:28 -0700 (PDT) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.80.169.4 with HTTP; Wed, 10 May 2017 08:21:27 -0700 (PDT) In-Reply-To: <201705040004.v4404Hru044263@repo.freebsd.org> References: <201705040004.v4404Hru044263@repo.freebsd.org> From: Conrad Meyer Date: Wed, 10 May 2017 08:21:27 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r317782 - in head: contrib/libarchive/cpio contrib/libarchive/cpio/test contrib/libarchive/libarchive contrib/libarchive/libarchive/test contrib/libarchive/test_utils lib/libarchive/tests To: Martin Matuska Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 16:27:04 -0000 Hi Martin, One minor Coverity nit below: On Wed, May 3, 2017 at 5:04 PM, Martin Matuska wrote: > Author: mm > Date: Thu May 4 00:04:17 2017 > New Revision: 317782 > URL: https://svnweb.freebsd.org/changeset/base/317782 > > Log: > MFV r317781: > Sync libarchive with vendor > > Vendor changes (FreeBSD-related): > PR 897: add test for ZIP archives with invalid EOCD headers > PR 901: fix invalid renaming of sparse files > OSS-Fuzz issue 497: remove fallback tree in LZX decoder > OSS-Fuzz issue 527: rewrite expressions in lz4 filter > OSS-Fuzz issue 577: fix integer overflow in cpio reader > OSS-Fuzz issue 862: fix numerc parsing in mtree reader > OSS-Fuzz issue 1097: fix undefined shift in rar reader > cpio: various optimizations and memory leak fixes > > MFC after: 1 week > > ... > Modified: head/contrib/libarchive/cpio/test/test_option_lz4.c > ============================================================================== > --- head/contrib/libarchive/cpio/test/test_option_lz4.c Wed May 3 23:55:12 2017 (r317781) > +++ head/contrib/libarchive/cpio/test/test_option_lz4.c Thu May 4 00:04:17 2017 (r317782) > ... > @@ -68,14 +71,18 @@ DEFINE_TEST(test_option_lz4) > if (strstr(p, "Error closing") != NULL && !canLz4()) { > skipping("This version of bsdcpio uses an external lz4 program " > "but no such program is available on this system."); > + free(p); > return; > } > + free(p); > failure("--lz4 option is broken: %s", p); p is used after free here. Coverity CID 1374948. Best, Conrad > assertEqualInt(r, 0); > return; > } > + free(p); > /* Check that the archive file has an lz4 signature. */ > p = slurpfile(&s, "archive.out"); > assert(s > 2); > assertEqualMem(p, "\x04\x22\x4d\x18", 4); > + free(p); > } > ... From owner-svn-src-all@freebsd.org Wed May 10 16:32:14 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@freebsd.org Wed May 10 16:32:14 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@freebsd.org Wed May 10 17:32:30 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@freebsd.org Wed May 10 18:33:41 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E6630D66EA8; Wed, 10 May 2017 18:33:41 +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 A0384E77; Wed, 10 May 2017 18:33:41 +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 v4AIXeHk082989; Wed, 10 May 2017 18:33:40 GMT (envelope-from erj@FreeBSD.org) Received: (from erj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4AIXeof082987; Wed, 10 May 2017 18:33:40 GMT (envelope-from erj@FreeBSD.org) Message-Id: <201705101833.v4AIXeof082987@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: erj set sender to erj@FreeBSD.org using -f From: Eric Joyner Date: Wed, 10 May 2017 18:33:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318147 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 18:33:42 -0000 Author: erj Date: Wed May 10 18:33:40 2017 New Revision: 318147 URL: https://svnweb.freebsd.org/changeset/base/318147 Log: Add several new media types to if_media.h These include several 25G types (for active direct attach cables and LR modules), and a missing type for 10G active direct attach. Differential Revision: https://reviews.freebsd.org/D10425 Reviewed by: smh, imp MFC after: 3 days Sponsored by: Intel Corporation Modified: head/sys/net/ieee8023ad_lacp.c head/sys/net/if_media.h Modified: head/sys/net/ieee8023ad_lacp.c ============================================================================== --- head/sys/net/ieee8023ad_lacp.c Wed May 10 17:32:29 2017 (r318146) +++ head/sys/net/ieee8023ad_lacp.c Wed May 10 18:33:40 2017 (r318147) @@ -1121,6 +1121,7 @@ lacp_compose_key(struct lacp_port *lp) case IFM_10G_CR1: case IFM_10G_ER: case IFM_10G_SFI: + case IFM_10G_AOC: key = IFM_10G_LR; break; case IFM_20G_KR2: @@ -1145,6 +1146,9 @@ lacp_compose_key(struct lacp_port *lp) case IFM_25G_CR: case IFM_25G_KR: case IFM_25G_SR: + case IFM_25G_LR: + case IFM_25G_ACC: + case IFM_25G_AOC: key = IFM_25G_PCIE; break; case IFM_40G_CR4: Modified: head/sys/net/if_media.h ============================================================================== --- head/sys/net/if_media.h Wed May 10 17:32:29 2017 (r318146) +++ head/sys/net/if_media.h Wed May 10 18:33:40 2017 (r318147) @@ -196,6 +196,10 @@ uint64_t ifmedia_baudrate(int); #define IFM_25G_SR IFM_X(55) /* 25GBase-SR */ #define IFM_50G_CR2 IFM_X(56) /* 50GBase-CR2 */ #define IFM_50G_KR2 IFM_X(57) /* 50GBase-KR2 */ +#define IFM_25G_LR IFM_X(58) /* 25GBase-LR */ +#define IFM_10G_AOC IFM_X(59) /* 10G active optical cable */ +#define IFM_25G_ACC IFM_X(60) /* 25G active copper cable */ +#define IFM_25G_AOC IFM_X(61) /* 25G active optical cable */ /* * Please update ieee8023ad_lacp.c:lacp_compose_key() @@ -450,6 +454,10 @@ struct ifmedia_description { { IFM_25G_SR, "25GBase-SR" }, \ { IFM_50G_CR2, "50GBase-CR2" }, \ { IFM_50G_KR2, "50GBase-KR2" }, \ + { IFM_25G_LR, "25GBase-LR" }, \ + { IFM_10G_AOC, "10GBase-AOC" }, \ + { IFM_25G_ACC, "25GBase-ACC" }, \ + { IFM_25G_AOC, "25GBase-AOC" }, \ { 0, NULL }, \ } @@ -782,6 +790,10 @@ struct ifmedia_baudrate { { IFM_ETHER | IFM_25G_SR, IF_Gbps(25ULL) }, \ { IFM_ETHER | IFM_50G_CR2, IF_Gbps(50ULL) }, \ { IFM_ETHER | IFM_50G_KR2, IF_Gbps(50ULL) }, \ + { IFM_ETHER | IFM_25G_LR, IF_Gbps(25ULL) }, \ + { IFM_ETHER | IFM_10G_AOC, IF_Gbps(10ULL) }, \ + { IFM_ETHER | IFM_25G_ACC, IF_Gbps(25ULL) }, \ + { IFM_ETHER | IFM_25G_AOC, IF_Gbps(25ULL) }, \ \ { IFM_TOKEN | IFM_TOK_STP4, IF_Mbps(4) }, \ { IFM_TOKEN | IFM_TOK_STP16, IF_Mbps(16) }, \ From owner-svn-src-all@freebsd.org Wed May 10 18:59:20 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@freebsd.org Wed May 10 18:59:22 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@freebsd.org Wed May 10 19:41:54 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5A19FD5B449; Wed, 10 May 2017 19:41:54 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 10AE31783; Wed, 10 May 2017 19:41:53 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4AJfrAO010172; Wed, 10 May 2017 19:41:53 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4AJfrfF010171; Wed, 10 May 2017 19:41:53 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201705101941.v4AJfrfF010171@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Wed, 10 May 2017 19:41:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318150 - head/sys/netinet/libalias X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 19:41:54 -0000 Author: eugen (ports committer) Date: Wed May 10 19:41:52 2017 New Revision: 318150 URL: https://svnweb.freebsd.org/changeset/base/318150 Log: ipfw nat and natd support multiple aliasing instances with "nat global" feature that chooses right alias_address for outgoing packets that already have corresponding state in one of aliasing instances. This feature works just fine for ICMP, UDP, TCP and SCTP packes but not for others. For example, outgoing PPtP/GRE packets always get alias_address of latest configured instance no matter whether such packets have corresponding state or not. This change unbreaks translation of transit PPtP/GRE connections for "nat global" case fixing a bug in static ProtoAliasOut() function that ignores its "create" argument and performs translation regardless of its value. This static function is called only by LibAliasOutLocked() function and only for packers other than ICMP, UDP, TCP and SCTP. LibAliasOutLocked() passes its "create" argument unmodified. We have only two consumers of LibAliasOutLocked() in the source tree calling it with "create" unequal to 1: "ipfw nat global" code and similar natd code having same problem. All other consumers of LibAliasOutLocked() call it with create = 1 and the patch is "no-op" for such cases. PR: 218968 Approved by: ae, vsevolod (mentor) MFC after: 1 week Modified: head/sys/netinet/libalias/alias.c Modified: head/sys/netinet/libalias/alias.c ============================================================================== --- head/sys/netinet/libalias/alias.c Wed May 10 18:59:20 2017 (r318149) +++ head/sys/netinet/libalias/alias.c Wed May 10 19:41:52 2017 (r318150) @@ -699,12 +699,14 @@ ProtoAliasOut(struct libalias *la, struc struct alias_link *lnk; LIBALIAS_LOCK_ASSERT(la); - (void)create; /* Return if proxy-only mode is enabled */ if (la->packetAliasMode & PKT_ALIAS_PROXY_ONLY) return (PKT_ALIAS_OK); + if (!create) + return (PKT_ALIAS_IGNORED); + lnk = FindProtoOut(la, *ip_src, ip_dst, ip_p); if (lnk != NULL) { struct in_addr alias_address; From owner-svn-src-all@freebsd.org Wed May 10 20:12:24 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@freebsd.org Wed May 10 20:29:03 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@freebsd.org Wed May 10 20:29:34 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@freebsd.org Wed May 10 20:46:56 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@freebsd.org Wed May 10 20:47:00 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@freebsd.org Wed May 10 20:53:14 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@freebsd.org Wed May 10 21:11:17 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@freebsd.org Wed May 10 21:42:14 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@freebsd.org Wed May 10 21:42:18 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@freebsd.org Wed May 10 22:13:49 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4D6A3D664BA; Wed, 10 May 2017 22:13:49 +0000 (UTC) (envelope-from rpokala@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 10E9A3CD; Wed, 10 May 2017 22:13:48 +0000 (UTC) (envelope-from rpokala@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4AMDmv0074715; Wed, 10 May 2017 22:13:48 GMT (envelope-from rpokala@FreeBSD.org) Received: (from rpokala@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4AMDlE2074710; Wed, 10 May 2017 22:13:47 GMT (envelope-from rpokala@FreeBSD.org) Message-Id: <201705102213.v4AMDlE2074710@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rpokala set sender to rpokala@FreeBSD.org using -f From: Ravi Pokala Date: Wed, 10 May 2017 22:13:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318160 - in head: sbin/ifconfig sys/net sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 22:13:49 -0000 Author: rpokala Date: Wed May 10 22:13:47 2017 New Revision: 318160 URL: https://svnweb.freebsd.org/changeset/base/318160 Log: Persistently store NIC's hardware MAC address, and add a way to retrive it The MAC address reported by `ifconfig ${nic} ether' does not always match the address in the hardware, as reported by the driver during attach. In particular, NICs which are components of a lagg(4) interface all report the same MAC. When attaching, the NIC driver passes the MAC address it read from the hardware as an argument to ether_ifattach(). Keep a second copy of it, and create ioctl(SIOCGHWADDR) to return it. Teach `ifconfig' to report it along with the active MAC address. PR: 194386 Reviewed by: glebius MFC after: 1 week Sponsored by: Panasas Differential Revision: https://reviews.freebsd.org/D10609 Modified: head/sbin/ifconfig/af_link.c head/sys/net/if.c head/sys/net/if_ethersubr.c head/sys/net/if_var.h head/sys/sys/sockio.h Modified: head/sbin/ifconfig/af_link.c ============================================================================== --- head/sbin/ifconfig/af_link.c Wed May 10 21:42:16 2017 (r318159) +++ head/sbin/ifconfig/af_link.c Wed May 10 22:13:47 2017 (r318160) @@ -42,6 +42,7 @@ static const char rcsid[] = #include #include #include +#include #include #include @@ -67,7 +68,7 @@ link_status(int s __unused, const struct sdl->sdl_alen == ETHER_ADDR_LEN) { ether_format = ether_ntoa((struct ether_addr *)LLADDR(sdl)); if (f_ether != NULL && strcmp(f_ether, "dash") == 0) { - for (format_char = strchr(ether_format, ':'); + for (format_char = strchr(ether_format, ':'); format_char != NULL; format_char = strchr(ether_format, ':')) *format_char = '-'; @@ -78,6 +79,48 @@ link_status(int s __unused, const struct printf("\tlladdr %s\n", link_ntoa(sdl) + n); } + /* Best-effort (i.e. failures are silent) to get original + * hardware address, as read by NIC driver at attach time. Only + * applies to Ethernet NICs (IFT_ETHER). However, laggX + * interfaces claim to be IFT_ETHER, and re-type their component + * Ethernet NICs as IFT_IEEE8023ADLAG. So, check for both. If + * the MAC is zeroed, then it's actually a lagg. + */ + if ((sdl->sdl_type == IFT_ETHER || + sdl->sdl_type == IFT_IEEE8023ADLAG) && + sdl->sdl_alen == ETHER_ADDR_LEN) { + struct ifreq ifr; + int sock_hw; + int rc; + static const u_char laggaddr[6] = {0}; + + strncpy(ifr.ifr_name, ifa->ifa_name, + sizeof(ifr.ifr_name)); + memcpy(&ifr.ifr_addr, ifa->ifa_addr, + sizeof(ifa->ifa_addr->sa_len)); + ifr.ifr_addr.sa_family = AF_LOCAL; + if ((sock_hw = socket(AF_LOCAL, SOCK_DGRAM, 0)) < 0) { + warn("socket(AF_LOCAL,SOCK_DGRAM)"); + return; + } + rc = ioctl(sock_hw, SIOCGHWADDR, &ifr); + close(sock_hw); + if (rc != 0) { + return; + } + if (memcmp(ifr.ifr_addr.sa_data, laggaddr, sdl->sdl_alen) == 0) { + return; + } + ether_format = ether_ntoa((const struct ether_addr *) + &ifr.ifr_addr.sa_data); + if (f_ether != NULL && strcmp(f_ether, "dash") == 0) { + for (format_char = strchr(ether_format, ':'); + format_char != NULL; + format_char = strchr(ether_format, ':')) + *format_char = '-'; + } + printf("\thwaddr %s\n", ether_format); + } } } Modified: head/sys/net/if.c ============================================================================== --- head/sys/net/if.c Wed May 10 21:42:16 2017 (r318159) +++ head/sys/net/if.c Wed May 10 22:13:47 2017 (r318160) @@ -744,6 +744,11 @@ if_attach_internal(struct ifnet *ifp, in /* Reliably crash if used uninitialized. */ ifp->if_broadcastaddr = NULL; + if (ifp->if_type == IFT_ETHER) { + ifp->if_hw_addr = malloc(ifp->if_addrlen, M_IFADDR, + M_WAITOK | M_ZERO); + } + #if defined(INET) || defined(INET6) /* Use defaults for TSO, if nothing is set */ if (ifp->if_hw_tsomax == 0 && @@ -1059,6 +1064,8 @@ if_detach_internal(struct ifnet *ifp, in * Remove link ifaddr pointer and maybe decrement if_index. * Clean up all addresses. */ + free(ifp->if_hw_addr, M_IFADDR); + ifp->if_hw_addr = NULL; ifp->if_addr = NULL; /* We can now free link ifaddr. */ @@ -2667,6 +2674,10 @@ ifhwioctl(u_long cmd, struct ifnet *ifp, ifr->ifr_addr.sa_data, ifr->ifr_addr.sa_len); break; + case SIOCGHWADDR: + error = if_gethwaddr(ifp, ifr); + break; + case SIOCAIFGROUP: { struct ifgroupreq *ifgr = (struct ifgroupreq *)ifr; @@ -3584,6 +3595,29 @@ if_requestencap_default(struct ifnet *if } /* + * Get the link layer address that was read from the hardware at attach. + * + * This is only set by Ethernet NICs (IFT_ETHER), but laggX interfaces re-type + * their component interfaces as IFT_IEEE8023ADLAG. + */ +int +if_gethwaddr(struct ifnet *ifp, struct ifreq *ifr) +{ + + if (ifp->if_hw_addr == NULL) + return (ENODEV); + + switch (ifp->if_type) { + case IFT_ETHER: + case IFT_IEEE8023ADLAG: + bcopy(ifp->if_hw_addr, ifr->ifr_addr.sa_data, ifp->if_addrlen); + return (0); + default: + return (ENODEV); + } +} + +/* * The name argument must be a pointer to storage which will last as * long as the interface does. For physical devices, the result of * device_get_name(dev) is a good choice and for pseudo-devices a Modified: head/sys/net/if_ethersubr.c ============================================================================== --- head/sys/net/if_ethersubr.c Wed May 10 21:42:16 2017 (r318159) +++ head/sys/net/if_ethersubr.c Wed May 10 22:13:47 2017 (r318160) @@ -916,6 +916,8 @@ ether_ifattach(struct ifnet *ifp, const sdl->sdl_alen = ifp->if_addrlen; bcopy(lla, LLADDR(sdl), ifp->if_addrlen); + bcopy(lla, ifp->if_hw_addr, ifp->if_addrlen); + bpfattach(ifp, DLT_EN10MB, ETHER_HDR_LEN); if (ng_ether_attach_p != NULL) (*ng_ether_attach_p)(ifp); Modified: head/sys/net/if_var.h ============================================================================== --- head/sys/net/if_var.h Wed May 10 21:42:16 2017 (r318159) +++ head/sys/net/if_var.h Wed May 10 22:13:47 2017 (r318160) @@ -281,6 +281,7 @@ struct ifnet { struct ifmultihead if_multiaddrs; /* multicast addresses configured */ int if_amcount; /* number of all-multicast requests */ struct ifaddr *if_addr; /* pointer to link-level address */ + void *if_hw_addr; /* hardware link-level address */ const u_int8_t *if_broadcastaddr; /* linklevel broadcast bytestring */ struct rwlock if_afdata_lock; void *if_afdata[AF_MAX]; @@ -650,6 +651,7 @@ int if_gethwassist(if_t ifp); int if_setsoftc(if_t ifp, void *softc); void *if_getsoftc(if_t ifp); int if_setflags(if_t ifp, int flags); +int if_gethwaddr(if_t ifp, struct ifreq *); int if_setmtu(if_t ifp, int mtu); int if_getmtu(if_t ifp); int if_getmtu_family(if_t ifp, int family); Modified: head/sys/sys/sockio.h ============================================================================== --- head/sys/sys/sockio.h Wed May 10 21:42:16 2017 (r318159) +++ head/sys/sys/sockio.h Wed May 10 22:13:47 2017 (r318160) @@ -97,6 +97,7 @@ #define SIOCGIFSTATUS _IOWR('i', 59, struct ifstat) /* get IF status */ #define SIOCSIFLLADDR _IOW('i', 60, struct ifreq) /* set linklevel addr */ #define SIOCGI2C _IOWR('i', 61, struct ifreq) /* get I2C data */ +#define SIOCGHWADDR _IOWR('i', 62, struct ifreq) /* get hardware lladdr */ #define SIOCSIFPHYADDR _IOW('i', 70, struct ifaliasreq) /* set gif address */ #define SIOCGIFPSRCADDR _IOWR('i', 71, struct ifreq) /* get gif psrc addr */ From owner-svn-src-all@freebsd.org Wed May 10 22:24:10 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6E681D667C0; Wed, 10 May 2017 22:24:10 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 353C5ACF; Wed, 10 May 2017 22:24:10 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4AMO9Ob078719; Wed, 10 May 2017 22:24:09 GMT (envelope-from sjg@FreeBSD.org) Received: (from sjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4AMO9SQ078718; Wed, 10 May 2017 22:24:09 GMT (envelope-from sjg@FreeBSD.org) Message-Id: <201705102224.v4AMO9SQ078718@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sjg set sender to sjg@FreeBSD.org using -f From: "Simon J. Gerraty" Date: Wed, 10 May 2017 22:24:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318161 - head/contrib/bmake X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 22:24:10 -0000 Author: sjg Date: Wed May 10 22:24:09 2017 New Revision: 318161 URL: https://svnweb.freebsd.org/changeset/base/318161 Log: Ensure buf2 is in scope Modified: head/contrib/bmake/main.c Modified: head/contrib/bmake/main.c ============================================================================== --- head/contrib/bmake/main.c Wed May 10 22:13:47 2017 (r318160) +++ head/contrib/bmake/main.c Wed May 10 22:24:09 2017 (r318161) @@ -751,6 +751,7 @@ Main_SetObjdir(const char *fmt, ...) struct stat sb; char *path; char buf[MAXPATHLEN + 1]; + char buf2[MAXPATHLEN + 1]; Boolean rc = FALSE; va_list ap; @@ -759,8 +760,6 @@ Main_SetObjdir(const char *fmt, ...) va_end(ap); if (path[0] != '/') { - char buf2[MAXPATHLEN + 1]; - snprintf(buf2, MAXPATHLEN, "%s/%s", curdir, path); path = buf2; } From owner-svn-src-all@freebsd.org Wed May 10 22:31:25 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8235AD66A29; Wed, 10 May 2017 22:31:25 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-qk0-x22f.google.com (mail-qk0-x22f.google.com [IPv6:2607:f8b0:400d:c09::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3FF6DDEB; Wed, 10 May 2017 22:31:25 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-qk0-x22f.google.com with SMTP id k74so8799904qke.1; Wed, 10 May 2017 15:31:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=SrknS3qGcyCLjgqh1OVj9FkQuaEQMcLvKcqNH40E3TI=; b=bvDAz/ePCtWekRl5RxTAbFUF3HBgCnkAVSm74fISwtfDVuKCOoWgp39N6aIlDOYIvs EibNpg7DQ9xhXper3FR6LZJi65DkNVq8NiQG3OzPCw+Jri8r5X6Jvms0ACqKjyiONUha rY6MMq5NGTWdMfLiPfvWE2Om5YF+NDCExWEMvBi85MIEb5/WwHZjRiNJWml8uNlY6uTB XC4HXjuhO8VIseMxUcl6kMI4UN/MtZkuqs06mG9Hnz2h0zfrf2m+yly2gRCXJ76HKLlk VGBQQQJX7e9pN9TISg/s/p2j7Rl/x8U1lmTp8bOIB8ygm+Pul661+4oa/fqavyBR6Ymf zz1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=SrknS3qGcyCLjgqh1OVj9FkQuaEQMcLvKcqNH40E3TI=; b=n3tmjjbbJ3U0mnZHwDrxKIkMDRtxV9usQR2P5K1dEJXBSTjDWkI04viI1NzTFl0wPp r2kfc7xwpPYilQ9TwSSLGHr3mSMeaAyBLJB8CA0wPozliB1rR5mgCKDu04FJrk1H0T60 e33z6RGR62b1ZFMd/6QpIyVwyJiZ2PrIocFfd76ojpwIibWpkUP3mRn2R5ecFsyw9Y2L lkVXSVw2BHz+KpGyVvjYU/ChDrupaK5QcvsX2y1i+nTL18NR8/JVL3b0jqBEl4zv+R+r cWeA7sdnF4Zhx4/rPHrWF4iOt/gzsOu4TYHNOG6I+zD5d2iFnedPtZ9jVzagw3xXUwM0 DNDQ== X-Gm-Message-State: AODbwcBMbyBYJNdZhNvpeDisRNwsu+06/ccNZVwGFiMaAB2UqS8UnjAg +MTlRn31nEZNAkH7ogKAxS6fzfQigdAnfiA= X-Received: by 10.55.73.71 with SMTP id w68mr8788596qka.76.1494455484105; Wed, 10 May 2017 15:31:24 -0700 (PDT) MIME-Version: 1.0 Received: by 10.140.93.48 with HTTP; Wed, 10 May 2017 15:31:23 -0700 (PDT) In-Reply-To: <201705102224.v4AMO9SQ078718@repo.freebsd.org> References: <201705102224.v4AMO9SQ078718@repo.freebsd.org> From: Ngie Cooper Date: Wed, 10 May 2017 15:31:23 -0700 Message-ID: Subject: Re: svn commit: r318161 - head/contrib/bmake To: "Simon J. Gerraty" Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 22:31:25 -0000 On Wed, May 10, 2017 at 3:24 PM, Simon J. Gerraty wrote: > Author: sjg > Date: Wed May 10 22:24:09 2017 > New Revision: 318161 > URL: https://svnweb.freebsd.org/changeset/base/318161 > > Log: > Ensure buf2 is in scope I think this is the proper fix for the issue that Bryan, Ravi, and I reported.. also reported as Coverity CID: 1374641. Thanks! -Ngie From owner-svn-src-all@freebsd.org Wed May 10 22:35:07 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8E233D66C59; Wed, 10 May 2017 22:35:07 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-qt0-x22b.google.com (mail-qt0-x22b.google.com [IPv6:2607:f8b0:400d:c0d::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49535146A; Wed, 10 May 2017 22:35:07 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-qt0-x22b.google.com with SMTP id m91so4343238qte.3; Wed, 10 May 2017 15:35:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=xcQdeF47Crb9BTRM3doG+z8ILZa7azBKJMpByK229PQ=; b=nmJuueTnheAfWjCimGyRWniKuqkp8rIir9Pxc1nqGEIO4tRGF1b63fWxciR6aYS9mV Bwarzn7k8MBxOd1esbANb4ActPT3443CNWYQqA1dbUdC9Ro3DBAPimDVaEuEsfRVrrWx xHYI2P5JyF9hKKuL03MlKuQYC7fJaRVXXGlNzch7vFFsdN17cU8Y3uEcwEN3hKKEfLgk dVorvs530vZsDqDlQloUy+lS9k+FjmgStrVp3r1VwD/aYPND0oEj2TwpAZyQoodGY641 fmuU5/mSYfHUzcBN+W2WgzYxyh+v4gIGEmeaJ4jT6hF0mHKAov/up9kHsFxlApV6FGfx RnIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=xcQdeF47Crb9BTRM3doG+z8ILZa7azBKJMpByK229PQ=; b=jDT/XJTRVwzQuDIsnl2gBYriq+Lru3SarQHQEqaUlWe4igOQcrhscrXw156ZOnfrmO QikZGuZQqUQp3q7+L0xDFK0nABj16a3mD4cIvouvwEBKL1o5sk8cUrv3yC+bvDSw/kPf TLmL/qjbeEXhSDwidN+G1+5TekvrxuyEyWSwN38BHkCLrcRj7l1Hrf9SD1a+yjqyUStP yJRRbT51xEO+nnpRE4wdH4fwzMWzK1dQEid8Mok/mSJYKlI5kb8F9zpSu22bA0q+/Z6y eIf+CAvKA8iDA77TbtEXc2VaiI8jDUaWUhD/oWqaV4Eu01mjLrL0zdGSdhMOcUPSuY/i 5rAA== X-Gm-Message-State: AODbwcCA9ZyuWEvTV0bz68DNVYz2BmB8n2M83TEEBrj3gvtfuizhlUBg 1UxyOvCc2zNGJxHDdtN8fowxdCFEfdDu X-Received: by 10.200.38.251 with SMTP id 56mr987479qtp.244.1494455706359; Wed, 10 May 2017 15:35:06 -0700 (PDT) MIME-Version: 1.0 Received: by 10.140.93.48 with HTTP; Wed, 10 May 2017 15:35:05 -0700 (PDT) In-Reply-To: References: <201705102224.v4AMO9SQ078718@repo.freebsd.org> From: Ngie Cooper Date: Wed, 10 May 2017 15:35:05 -0700 Message-ID: Subject: Re: svn commit: r318161 - head/contrib/bmake To: "Simon J. Gerraty" Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 22:35:07 -0000 On Wed, May 10, 2017 at 3:31 PM, Ngie Cooper wrote: > On Wed, May 10, 2017 at 3:24 PM, Simon J. Gerraty wrote: >> Author: sjg >> Date: Wed May 10 22:24:09 2017 >> New Revision: 318161 >> URL: https://svnweb.freebsd.org/changeset/base/318161 >> >> Log: >> Ensure buf2 is in scope > > I think this is the proper fix for the issue that Bryan, Ravi, and I Ravi -> Renato > reported.. also reported as Coverity CID: 1374641. > Thanks! > -Ngie From owner-svn-src-all@freebsd.org Wed May 10 22:40:32 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2740BD66DF6; Wed, 10 May 2017 22:40:32 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E4BEA1656; Wed, 10 May 2017 22:40:31 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4AMeV8k083370; Wed, 10 May 2017 22:40:31 GMT (envelope-from sjg@FreeBSD.org) Received: (from sjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4AMeRQD083338; Wed, 10 May 2017 22:40:27 GMT (envelope-from sjg@FreeBSD.org) Message-Id: <201705102240.v4AMeRQD083338@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sjg set sender to sjg@FreeBSD.org using -f From: "Simon J. Gerraty" Date: Wed, 10 May 2017 22:40:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r318162 - in vendor/NetBSD/bmake/dist: . mk mk/sys unit-tests X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 22:40:32 -0000 Author: sjg Date: Wed May 10 22:40:27 2017 New Revision: 318162 URL: https://svnweb.freebsd.org/changeset/base/318162 Log: Import bmake-20170510 Added: vendor/NetBSD/bmake/dist/mk/files.mk (contents, props changed) Modified: vendor/NetBSD/bmake/dist/ChangeLog vendor/NetBSD/bmake/dist/Makefile vendor/NetBSD/bmake/dist/main.c vendor/NetBSD/bmake/dist/mk/ChangeLog vendor/NetBSD/bmake/dist/mk/FILES vendor/NetBSD/bmake/dist/mk/dirdeps.mk vendor/NetBSD/bmake/dist/mk/doc.mk vendor/NetBSD/bmake/dist/mk/final.mk vendor/NetBSD/bmake/dist/mk/inc.mk vendor/NetBSD/bmake/dist/mk/init.mk vendor/NetBSD/bmake/dist/mk/install-mk vendor/NetBSD/bmake/dist/mk/lib.mk vendor/NetBSD/bmake/dist/mk/meta2deps.py vendor/NetBSD/bmake/dist/mk/own.mk vendor/NetBSD/bmake/dist/mk/prog.mk vendor/NetBSD/bmake/dist/mk/scripts.mk vendor/NetBSD/bmake/dist/mk/sys/AIX.mk vendor/NetBSD/bmake/dist/mk/sys/Darwin.mk vendor/NetBSD/bmake/dist/mk/sys/Generic.mk vendor/NetBSD/bmake/dist/mk/sys/HP-UX.mk vendor/NetBSD/bmake/dist/mk/sys/IRIX.mk vendor/NetBSD/bmake/dist/mk/sys/Linux.mk vendor/NetBSD/bmake/dist/mk/sys/NetBSD.mk vendor/NetBSD/bmake/dist/mk/sys/OSF1.mk vendor/NetBSD/bmake/dist/mk/sys/OpenBSD.mk vendor/NetBSD/bmake/dist/mk/sys/SunOS.mk vendor/NetBSD/bmake/dist/mk/sys/UnixWare.mk vendor/NetBSD/bmake/dist/parse.c vendor/NetBSD/bmake/dist/str.c vendor/NetBSD/bmake/dist/unit-tests/modmatch.exp vendor/NetBSD/bmake/dist/unit-tests/modmatch.mk Modified: vendor/NetBSD/bmake/dist/ChangeLog ============================================================================== --- vendor/NetBSD/bmake/dist/ChangeLog Wed May 10 22:24:09 2017 (r318161) +++ vendor/NetBSD/bmake/dist/ChangeLog Wed May 10 22:40:27 2017 (r318162) @@ -1,3 +1,29 @@ +2017-05-10 Simon J. Gerraty + + * Makefile (_MAKE_VERSION): 20170510 + Merge with NetBSD make, pick up + o main.c: Main_SetObjdir: ensure buf2 is in scope + +2017-05-08 Simon J. Gerraty + + * Makefile (_MAKE_VERSION): 20170505 + see mk/ChangeLog + +2017-05-05 Simon J. Gerraty + + * parse.c: not everyone has stdint.h + +2017-05-01 Simon J. Gerraty + + * Makefile (_MAKE_VERSION): 20170501 + see mk/ChangeLog + +2017-04-21 Simon J. Gerraty + + * Makefile (_MAKE_VERSION): 20170421 + Merge with NetBSD make, pick up + o str.c: Str_Match: fix closure tests for [^] and add unit-test. + 2017-04-20 Simon J. Gerraty * Makefile (_MAKE_VERSION): 20170420 Modified: vendor/NetBSD/bmake/dist/Makefile ============================================================================== --- vendor/NetBSD/bmake/dist/Makefile Wed May 10 22:24:09 2017 (r318161) +++ vendor/NetBSD/bmake/dist/Makefile Wed May 10 22:40:27 2017 (r318162) @@ -1,7 +1,7 @@ -# $Id: Makefile,v 1.88 2017/04/20 14:51:14 sjg Exp $ +# $Id: Makefile,v 1.92 2017/05/10 22:29:04 sjg Exp $ # Base version on src date -_MAKE_VERSION= 20170420 +_MAKE_VERSION= 20170510 PROG= bmake Modified: vendor/NetBSD/bmake/dist/main.c ============================================================================== --- vendor/NetBSD/bmake/dist/main.c Wed May 10 22:24:09 2017 (r318161) +++ vendor/NetBSD/bmake/dist/main.c Wed May 10 22:40:27 2017 (r318162) @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.264 2017/04/20 03:57:27 sjg Exp $ */ +/* $NetBSD: main.c,v 1.265 2017/05/10 22:26:14 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,7 +69,7 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: main.c,v 1.264 2017/04/20 03:57:27 sjg Exp $"; +static char rcsid[] = "$NetBSD: main.c,v 1.265 2017/05/10 22:26:14 sjg Exp $"; #else #include #ifndef lint @@ -81,7 +81,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 19 #if 0 static char sccsid[] = "@(#)main.c 8.3 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: main.c,v 1.264 2017/04/20 03:57:27 sjg Exp $"); +__RCSID("$NetBSD: main.c,v 1.265 2017/05/10 22:26:14 sjg Exp $"); #endif #endif /* not lint */ #endif @@ -751,6 +751,7 @@ Main_SetObjdir(const char *fmt, ...) struct stat sb; char *path; char buf[MAXPATHLEN + 1]; + char buf2[MAXPATHLEN + 1]; Boolean rc = FALSE; va_list ap; @@ -759,8 +760,6 @@ Main_SetObjdir(const char *fmt, ...) va_end(ap); if (path[0] != '/') { - char buf2[MAXPATHLEN + 1]; - snprintf(buf2, MAXPATHLEN, "%s/%s", curdir, path); path = buf2; } Modified: vendor/NetBSD/bmake/dist/mk/ChangeLog ============================================================================== --- vendor/NetBSD/bmake/dist/mk/ChangeLog Wed May 10 22:24:09 2017 (r318161) +++ vendor/NetBSD/bmake/dist/mk/ChangeLog Wed May 10 22:40:27 2017 (r318162) @@ -1,3 +1,37 @@ +2017-05-08 Simon J. Gerraty + + * install-mk (MK_VERSION): 20170505 + + * meta2deps.py: fix botched indenation. + +2017-05-05 Simon J. Gerraty + + * sys/*.mk: Remove setting of MAKE it is unnecessary and + in many cases wrong (basname rather than full path) + + * scripts.mk (SCRIPTSGROUPS): make this more like files.mk and inc.mk + + * init.mk: define realbuild to simplify logic in {lib,prog}.mk etc + +2017-05-01 Simon J. Gerraty + + * install-mk (MK_VERSION): 20170501 + + * doc.mk: fix typo in DOC_INSTALL_OWN + + * inc.mk: handle INCGROUPS similar to freebsd + + * files.mk: add something for files too + + * add staging logic to lib.mk prog.mk etc. + +2017-04-24 Simon J. Gerraty + + * install-mk (MK_VERSION): 20170424 + + * dirdeps.mk: set NO_DIRDEPS when bootstrapping. + also target of bootstrap-this when sed is needed should be ${_want:T} + 2017-04-18 Simon J. Gerraty * install-mk (MK_VERSION): 20170418 Modified: vendor/NetBSD/bmake/dist/mk/FILES ============================================================================== --- vendor/NetBSD/bmake/dist/mk/FILES Wed May 10 22:24:09 2017 (r318161) +++ vendor/NetBSD/bmake/dist/mk/FILES Wed May 10 22:40:27 2017 (r318162) @@ -9,6 +9,7 @@ cython.mk dep.mk doc.mk dpadd.mk +files.mk final.mk host-target.mk host.libnames.mk Modified: vendor/NetBSD/bmake/dist/mk/dirdeps.mk ============================================================================== --- vendor/NetBSD/bmake/dist/mk/dirdeps.mk Wed May 10 22:24:09 2017 (r318161) +++ vendor/NetBSD/bmake/dist/mk/dirdeps.mk Wed May 10 22:40:27 2017 (r318162) @@ -1,4 +1,4 @@ -# $Id: dirdeps.mk,v 1.87 2017/03/07 01:49:03 sjg Exp $ +# $Id: dirdeps.mk,v 1.88 2017/04/24 20:34:59 sjg Exp $ # Copyright (c) 2010-2013, Juniper Networks, Inc. # All rights reserved. @@ -137,6 +137,14 @@ # built for. # +.if !target(bootstrap) && (make(bootstrap) || \ + make(bootstrap-this) || \ + make(bootstrap-recurse) || \ + make(bootstrap-empty)) +# disable most of below +.MAKE.LEVEL = 1 +.endif + # touch this at your peril _DIRDEP_USE_LEVEL?= 0 .if ${.MAKE.LEVEL} == ${_DIRDEP_USE_LEVEL} @@ -757,7 +765,7 @@ bootstrap-this: .NOTMAIN @echo Bootstrapping ${RELDIR}/${_want:T} from ${_src:T}; \ echo You need to build ${RELDIR} to correctly populate it. .if ${_src:T} != ${.MAKE.DEPENDFILE_PREFIX:T} - (cd ${.CURDIR} && sed ${.MAKE.DEPENDFILE_BOOTSTRAP_SED} ${_src} > ${_want}) + (cd ${.CURDIR} && sed ${.MAKE.DEPENDFILE_BOOTSTRAP_SED} ${_src} > ${_want:T}) .else cp ${.CURDIR}/${_src:T} ${_want} .endif Modified: vendor/NetBSD/bmake/dist/mk/doc.mk ============================================================================== --- vendor/NetBSD/bmake/dist/mk/doc.mk Wed May 10 22:24:09 2017 (r318161) +++ vendor/NetBSD/bmake/dist/mk/doc.mk Wed May 10 22:40:27 2017 (r318162) @@ -1,4 +1,4 @@ -# $Id: doc.mk,v 1.5 2015/09/08 06:15:31 sjg Exp $ +# $Id: doc.mk,v 1.6 2017/05/01 21:24:10 sjg Exp $ .if !target(__${.PARSEFILE}__) __${.PARSEFILE}__: @@ -59,7 +59,7 @@ spell: ${SRCS} .include .if !empty(DOCOWN) -DOC_INSTALL_OWN?= -o ${DOCOWN} -g ${DOGGRP} +DOC_INSTALL_OWN?= -o ${DOCOWN} -g ${DOCGRP} .endif .endif Added: vendor/NetBSD/bmake/dist/mk/files.mk ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/NetBSD/bmake/dist/mk/files.mk Wed May 10 22:40:27 2017 (r318162) @@ -0,0 +1,83 @@ +# $Id: files.mk,v 1.6 2017/05/07 02:21:02 sjg Exp $ +# +# @(#) Copyright (c) 2017, Simon J. Gerraty +# +# This file is provided in the hope that it will +# be of use. There is absolutely NO WARRANTY. +# Permission to copy, redistribute or otherwise +# use this file is hereby granted provided that +# the above copyright notice and this notice are +# left intact. +# +# Please send copies of changes and bug-fixes to: +# sjg@crufty.net +# + +.include + +FILES_INSTALL_OWN ?= -o ${SHAREOWN} -g ${SHAREGRP} +FILESMODE ?= ${SHAREMODE} +FILES_COPY ?= -C + +FILESGROUPS ?= FILES +FILESGROUPS := ${FILESGROUPS:O:u} + +.if !target(buildfiles) +.for group in ${FILESGROUPS} +buildfiles: ${${group}} +.endfor +.endif +buildfiles: +realbuild: buildfiles + +# there is no default FILESDIR so +# ignore group if ${group}DIR is not defined +.for group in ${FILESGROUPS} +.if !empty(${group}) && defined(${group}DIR) +.if ${group} != "FILES" +${group}_INSTALL_OWN ?= ${FILES_INSTALL_OWN} +.endif +# incase we are staging +STAGE_DIR.${group} ?= ${STAGE_OBJTOP}${${group}DIR} + +.for file in ${${group}:O:u} +${group}_INSTALL_OWN.${file:T} ?= ${${group}_INSTALL_OWN} +${group}DIR.${file:T} ?= ${${group}DIR} +file_mkdir_list += ${${group}DIR.${file:T}} + +.if defined(${group}NAME.${file:T}) +STAGE_AS_SETS += ${group} +STAGE_AS_${file} = ${${group}NAME.${file:T}} +stage_as.${group}: ${file} + +installfiles: installfiles.${group}.${file:T} +installfiles.${group}.${file:T}: ${file} file_mkdirs + ${INSTALL} ${FILES_COPY} ${${group}_INSTALL_OWN.${file:T}} \ + -m ${FILESMODE} ${.ALLSRC:Nfile_mkdirs} ${DESTDIR}${${group}DIR}/${${group}NAME.${file:T}} + +.else +STAGE_SETS += ${group} +stage_files.${group}: ${file} +installfiles.${group}: ${file} +installfiles: installfiles.${group} +.endif + +.endfor # file + +installfiles.${group}: file_mkdirs + ${INSTALL} ${FILES_COPY} ${${group}_INSTALL_OWN} -m ${FILESMODE} \ + ${.ALLSRC:Nfile_mkdirs:O:u} ${DESTDIR}${${group}DIR} + +.endif # !empty +.endfor # group + +file_mkdirs: + @for d in ${file_mkdir_list:O:u}; do \ + test -d ${DESTDIR}$$d || \ + ${INSTALL} -d ${FILES_INSTALL_OWN} -m 775 ${DESTDIR}$$d; \ + done + +beforeinstall: +installfiles: +realinstall: installfiles +.ORDER: beforeinstall installfiles Modified: vendor/NetBSD/bmake/dist/mk/final.mk ============================================================================== --- vendor/NetBSD/bmake/dist/mk/final.mk Wed May 10 22:24:09 2017 (r318161) +++ vendor/NetBSD/bmake/dist/mk/final.mk Wed May 10 22:40:27 2017 (r318162) @@ -1,4 +1,4 @@ -# $Id: final.mk,v 1.6 2016/04/05 15:58:37 sjg Exp $ +# $Id: final.mk,v 1.8 2017/05/07 20:30:08 sjg Exp $ .if !target(__${.PARSEFILE}__) __${.PARSEFILE}__: @@ -6,9 +6,17 @@ __${.PARSEFILE}__: # provide a hook for folk who want to do scary stuff .-include <${.CURDIR:H}/Makefile-final.inc> -.if !empty(STAGE) +.if ${MK_STAGING} == "yes" +.include +.elif !empty(STAGE) .-include .endif .-include + +.if empty(_SKIP_BUILD) +install: realinstall +.endif +realinstall: + .endif Modified: vendor/NetBSD/bmake/dist/mk/inc.mk ============================================================================== --- vendor/NetBSD/bmake/dist/mk/inc.mk Wed May 10 22:24:09 2017 (r318161) +++ vendor/NetBSD/bmake/dist/mk/inc.mk Wed May 10 22:40:27 2017 (r318162) @@ -1,4 +1,4 @@ -# $Id: inc.mk,v 1.3 2011/03/11 05:23:05 sjg Exp $ +# $Id: inc.mk,v 1.7 2017/05/06 17:29:45 sjg Exp $ # # @(#) Copyright (c) 2008, Simon J. Gerraty # @@ -15,8 +15,6 @@ .include -includes: ${INCS} - .if !empty(LIBOWN) INC_INSTALL_OWN ?= -o ${LIBOWN} -g ${LIBGRP} .endif @@ -24,12 +22,68 @@ INCMODE ?= 444 INC_COPY ?= -C INCSDIR ?= ${INCDIR} -realinstall: incinstall +STAGE_INCSDIR?= ${STAGE_OBJTOP}${INCSDIR} + +# accommodate folk used to freebsd +INCGROUPS ?= ${INCSGROUPS:UINCS} +INCGROUPS := ${INCGROUPS:O:u} + +.if !target(buildincludes) +.for group in ${INCGROUPS} +buildincludes: ${${group}} +.endfor +.endif +buildincludes: +includes: buildincludes + .if !target(incinstall) -incinstall: -.if !empty(INCS) - [ -d ${DESTDIR}${INCSDIR} ] || \ - ${INSTALL} -d ${INC_INSTALL_OWN} -m 775 ${DESTDIR}${INCSDIR} - ${INSTALL} ${INC_COPY} ${INC_INSTALL_OWN} -m ${INCMODE} ${INCS} ${DESTDIR}${INCSDIR} +.for group in ${INCGROUPS} +.if !empty(${group}) +.if ${group} != "INC" +${group}_INSTALL_OWN ?= ${INC_INSTALL_OWN} +${group}DIR ?= ${INCDIR} .endif +# incase we are staging +STAGE_DIR.${group} ?= ${STAGE_OBJTOP}${${group}DIR} + +.for header in ${${group}:O:u} +${group}_INSTALL_OWN.${header:T} ?= ${${group}_INSTALL_OWN} +${group}DIR.${header:T} ?= ${${group}DIR} +inc_mkdir_list += ${${group}DIR.${header:T}} + +.if defined(${group}NAME.${header:T}) +STAGE_AS_SETS += ${group} +STAGE_AS_${header} = ${${group}NAME.${header:T}} +stage_as.${group}: ${header} + +incinstall: incinstall.${group}.${header:T} +incinstall.${group}.${header:T}: ${header} inc_mkdirs + ${INSTALL} ${INC_COPY} ${${group}_INSTALL_OWN.${header:T}} -m ${INCMODE} ${.ALLSRC:Ninc_mkdirs} ${DESTDIR}${${group}DIR}/${${group}NAME.${header:T}} + +.else +STAGE_SETS += ${group} +stage_files.${group}: ${header} +incinstall.${group}: ${header} +incinstall: incinstall.${group} .endif + +.endfor # header + +incinstall.${group}: inc_mkdirs + ${INSTALL} ${INC_COPY} ${${group}_INSTALL_OWN} -m ${INCMODE} \ + ${.ALLSRC:Ninc_mkdirs:O:u} ${DESTDIR}${${group}DIR} + +.endif # !empty +.endfor # group + +inc_mkdirs: + @for d in ${inc_mkdir_list:O:u}; do \ + test -d ${DESTDIR}$$d || \ + ${INSTALL} -d ${INC_INSTALL_OWN} -m 775 ${DESTDIR}$$d; \ + done + +.endif # !target(incinstall) + +beforeinstall: +realinstall: incinstall +.ORDER: beforeinstall incinstall Modified: vendor/NetBSD/bmake/dist/mk/init.mk ============================================================================== --- vendor/NetBSD/bmake/dist/mk/init.mk Wed May 10 22:24:09 2017 (r318161) +++ vendor/NetBSD/bmake/dist/mk/init.mk Wed May 10 22:40:27 2017 (r318162) @@ -1,4 +1,4 @@ -# $Id: init.mk,v 1.12 2016/04/05 15:58:37 sjg Exp $ +# $Id: init.mk,v 1.15 2017/05/07 20:27:54 sjg Exp $ # # @(#) Copyright (c) 2002, Simon J. Gerraty # @@ -50,8 +50,20 @@ PROFFLAGS?= -DGPROF -DPROF _SKIP_BUILD = not building at level 0 .endif -.if !empty(_SKIP_BUILD) +.if !defined(.PARSEDIR) +# no-op is the best we can do if not bmake. +.WAIT: +.endif + +# define this once for consistency +.if empty(_SKIP_BUILD) +# beforebuild is a hook for things that must be done early +all: beforebuild .WAIT realbuild +.else all: .PHONY .warning ${_SKIP_BUILD} .endif +beforebuild: +realbuild: + .endif Modified: vendor/NetBSD/bmake/dist/mk/install-mk ============================================================================== --- vendor/NetBSD/bmake/dist/mk/install-mk Wed May 10 22:24:09 2017 (r318161) +++ vendor/NetBSD/bmake/dist/mk/install-mk Wed May 10 22:40:27 2017 (r318162) @@ -55,7 +55,7 @@ # Simon J. Gerraty # RCSid: -# $Id: install-mk,v 1.141 2017/04/18 23:53:18 sjg Exp $ +# $Id: install-mk,v 1.145 2017/05/09 04:05:32 sjg Exp $ # # @(#) Copyright (c) 1994 Simon J. Gerraty # @@ -70,7 +70,7 @@ # sjg@crufty.net # -MK_VERSION=20170418 +MK_VERSION=20170505 OWNER= GROUP= MODE=444 @@ -176,7 +176,7 @@ $SKIP_MKFILES Do chmod $BINMODE $mk_scri [ "$OWNER" ] && $SKIP_MKFILES Do chown $OWNER $mk_files $sys_mk_files # if this is a BSD system the bsd.*.mk should exist and be used. if [ -z "$SKIP_BSD_MK" ]; then - for f in dep doc init lib links man nls obj own prog subdir + for f in dep doc files inc init lib links man nls obj own prog subdir do b=bsd.$f.mk [ -s $b ] || Do ln -s $f.mk $b Modified: vendor/NetBSD/bmake/dist/mk/lib.mk ============================================================================== --- vendor/NetBSD/bmake/dist/mk/lib.mk Wed May 10 22:24:09 2017 (r318161) +++ vendor/NetBSD/bmake/dist/mk/lib.mk Wed May 10 22:40:27 2017 (r318162) @@ -1,4 +1,4 @@ -# $Id: lib.mk,v 1.55 2016/09/23 23:04:51 sjg Exp $ +# $Id: lib.mk,v 1.61 2017/05/06 17:30:09 sjg Exp $ .if !target(__${.PARSEFILE}__) __${.PARSEFILE}__: @@ -37,7 +37,7 @@ PICO?= .pico CFLAGS+= ${COPTS} -# Derrived from NetBSD-1.6 +# Originally derrived from NetBSD-1.6 # Set PICFLAGS to cc flags for producing position-independent code, # if not already set. Includes -DPIC, if required. @@ -375,15 +375,14 @@ _LIBS+=llib-l${LIB}.ln .include .endif -.if !defined(_SKIP_BUILD) -all: prebuild .WAIT ${_LIBS} -# a hook for things that must be done early -prebuild: -.if !defined(.PARSEDIR) -# no-op is the best we can do if not bmake. -.WAIT: +.if empty(LIB) +_LIBS= .endif + +.if !defined(_SKIP_BUILD) +realbuild: ${_LIBS} .endif + all: _SUBDIRUSE .for s in ${SRCS:N*.h:M*/*} @@ -509,7 +508,7 @@ LIB_INSTALL_OWN ?= -o ${LIBOWN} -g ${LIB .include -.if !target(realinstall) +.if !target(realinstall) && !empty(LIB) realinstall: libinstall .endif .if !target(libinstall) @@ -552,13 +551,19 @@ libinstall: .endif .endif +.if ${MK_MAN} != "no" install: maninstall _SUBDIRUSE maninstall: afterinstall +.endif afterinstall: realinstall libinstall: beforeinstall realinstall: beforeinstall .endif +.if defined(FILES) || defined(FILESGROUPS) +.include +.endif + .if ${MK_MAN} != "no" .include .endif @@ -591,5 +596,10 @@ realinstall: beforeinstall .endfor @touch ${.TARGET} +.if !empty(LIB) +STAGE_LIBDIR?= ${STAGE_OBJTOP}${LIBDIR} +stage_libs: ${_LIBS} +.endif + .include .endif Modified: vendor/NetBSD/bmake/dist/mk/meta2deps.py ============================================================================== --- vendor/NetBSD/bmake/dist/mk/meta2deps.py Wed May 10 22:24:09 2017 (r318161) +++ vendor/NetBSD/bmake/dist/mk/meta2deps.py Wed May 10 22:40:27 2017 (r318162) @@ -37,7 +37,7 @@ We only pay attention to a subset of the """ RCSid: - $Id: meta2deps.py,v 1.25 2017/04/03 21:04:09 sjg Exp $ + $Id: meta2deps.py,v 1.26 2017/05/09 04:04:16 sjg Exp $ Copyright (c) 2011-2013, Juniper Networks, Inc. All rights reserved. @@ -142,7 +142,7 @@ def sort_unique(list, cmp=None, key=None for e in list: if e == le: continue - le = e + le = e nl.append(e) return nl @@ -534,7 +534,7 @@ class MetaFile: # to the src dir, we may need to add dependencies for each rdir = dir dir = abspath(dir, cwd, self.last_dir, self.debug, self.debug_out) - rdir = os.path.realpath(dir) + rdir = os.path.realpath(dir) if rdir == dir: rdir = None # now put path back together Modified: vendor/NetBSD/bmake/dist/mk/own.mk ============================================================================== --- vendor/NetBSD/bmake/dist/mk/own.mk Wed May 10 22:24:09 2017 (r318161) +++ vendor/NetBSD/bmake/dist/mk/own.mk Wed May 10 22:40:27 2017 (r318162) @@ -1,4 +1,4 @@ -# $Id: own.mk,v 1.32 2016/05/18 20:54:29 sjg Exp $ +# $Id: own.mk,v 1.35 2017/05/03 18:09:44 sjg Exp $ .if !target(__${.PARSEFILE}__) __${.PARSEFILE}__: @@ -117,6 +117,7 @@ OPTIONS_DEFAULT_DEPENDENT+= \ PICINSTALL/LINKLIB \ PICLIB/PIC \ PROFILE/LINKLIB \ + STAGING_PROG/STAGING \ .include @@ -128,7 +129,7 @@ _uid!= id -u USERGRP!= id -g .export USERGRP .endif -.for x in BIN CONF DOC INFO KMOD LIB MAN NLS SHARE +.for x in BIN CONF DOC INC INFO FILES KMOD LIB MAN NLS SHARE $xOWN= ${USER} $xGRP= ${USERGRP} $x_INSTALL_OWN= @@ -145,6 +146,9 @@ BINMODE?= 555 NONBINMODE?= 444 DIRMODE?= 755 +INCLUDEDIR?= ${prefix}/include +INCDIR?= ${INCLUDEDIR} + # Define MANZ to have the man pages compressed (gzip) #MANZ= 1 @@ -184,6 +188,10 @@ KMODGRP?= ${BINGRP} KMODOWN?= ${BINOWN} KMODMODE?= ${NONBINMODE} +SHAREGRP?= ${BINGRP} +SHAREOWN?= ${BINOWN} +SHAREMODE?= ${NONBINMODE} + COPY?= -c STRIP_FLAG?= -s @@ -244,4 +252,19 @@ MK_MAN= no MK_NLS= no .endif +# :U incase not using our sys.mk +.if ${MK_META_MODE:Uno} == "yes" +# should all be set by sys.mk if not default +TARGET_SPEC_VARS ?= MACHINE +.if ${TARGET_SPEC_VARS:[#]} > 1 +TARGET_SPEC_VARS_REV := ${TARGET_SPEC_VARS:[-1..1]} +.else +TARGET_SPEC_VARS_REV = ${TARGET_SPEC_VARS} +.endif +.if ${MK_STAGING} == "yes" +STAGE_ROOT?= ${OBJROOT}/stage +STAGE_OBJTOP?= ${STAGE_ROOT}/${TARGET_SPEC_VARS_REV:ts/} +.endif +.endif + .endif Modified: vendor/NetBSD/bmake/dist/mk/prog.mk ============================================================================== --- vendor/NetBSD/bmake/dist/mk/prog.mk Wed May 10 22:24:09 2017 (r318161) +++ vendor/NetBSD/bmake/dist/mk/prog.mk Wed May 10 22:40:27 2017 (r318162) @@ -1,4 +1,4 @@ -# $Id: prog.mk,v 1.28 2017/02/14 21:26:13 sjg Exp $ +# $Id: prog.mk,v 1.32 2017/05/06 17:30:09 sjg Exp $ .if !target(__${.PARSEFILE}__) __${.PARSEFILE}__: @@ -75,6 +75,8 @@ ${CXX_SUFFIXES:%=%.o}: .if defined(PROG) +BINDIR ?= ${prefix}/bin + SRCS?= ${PROG}.c .for s in ${SRCS:N*.h:N*.sh:M*/*} ${.o .po .lo:L:@o@${s:T:R}$o@}: $s @@ -126,8 +128,9 @@ MAN= ${PROG}.1 .endif # defined(PROG) .if !defined(_SKIP_BUILD) -all: ${PROG} +realbuild: ${PROG} .endif + all: _SUBDIRUSE .if !target(clean) @@ -208,6 +211,10 @@ lint: ${LOBJS} .NOPATH: ${OBJS} .endif +.if defined(FILES) || defined(FILESGROUPS) +.include +.endif + .if ${MK_MAN} != "no" .include .endif @@ -219,6 +226,20 @@ lint: ${LOBJS} .include .include .include + +.if !empty(PROG) && ${MK_STAGING_PROG} == "yes" +STAGE_BINDIR ?= ${STAGE_OBJTOP}${BINDIR} +STAGE_DIR.prog ?= ${STAGE_BINDIR} +.if ${PROG_NAME:U${PROG}} != ${PROG} +STAGE_AS_SETS += prog +STAGE_AS_${PROG} = ${PROG_NAME} +stage_as.prog: ${PROG} +.else +STAGE_SETS += prog +stage_files.prog: ${PROG} +.endif +.endif + .include .endif Modified: vendor/NetBSD/bmake/dist/mk/scripts.mk ============================================================================== --- vendor/NetBSD/bmake/dist/mk/scripts.mk Wed May 10 22:24:09 2017 (r318161) +++ vendor/NetBSD/bmake/dist/mk/scripts.mk Wed May 10 22:40:27 2017 (r318162) @@ -1,52 +1,91 @@ -# $Id: scripts.mk,v 1.2 2006/11/09 01:55:18 sjg Exp $ +# $Id: scripts.mk,v 1.3 2017/05/06 17:29:45 sjg Exp $ +# +# @(#) Copyright (c) 2006, Simon J. Gerraty +# +# This file is provided in the hope that it will +# be of use. There is absolutely NO WARRANTY. +# Permission to copy, redistribute or otherwise +# use this file is hereby granted provided that +# the above copyright notice and this notice are +# left intact. +# +# Please send copies of changes and bug-fixes to: +# sjg@crufty.net +# .include -.if defined(SCRIPTS) +SCRIPTSGROUPS ?= SCRIPTS +SCRIPTSGROUPS := ${SCRIPTSGROUPS:O:u} -all: ${SCRIPTS} - -.PHONY: scriptsinstall -install: scriptsinstall - -.if !target(scriptsinstall) SCRIPTSDIR?= ${BINDIR} SCRIPTSOWN?= ${BINOWN} SCRIPTSGRP?= ${BINGRP} SCRIPTSMODE?= ${BINMODE} +SCRIPTS_INSTALL_OWN?= -o ${SCRIPTSOWN} -g ${SCRIPTSGRP} +SCRIPTS_COPY ?= -C + # how we get script name from src SCRIPTSNAME_MOD?=T:R -script_targets= ${SCRIPTS:@s@${DESTDIR}${SCRIPTSDIR_$s:U${SCRIPTSDIR}}/${SCRIPTSNAME_$s:U${s:${SCRIPTSNAME_MOD}}}@} - -scriptsinstall:: ${script_targets} - -.PRECIOUS: ${script_targets} -.if !defined(UPDATE) -.PHONY: ${script_targets} -.endif - -INSTALL_FLAGS?= ${RENAME} ${PRESERVE} ${COPY} ${INSTPRIV} \ - -o ${OWN_${.TARGET:T}:U${SCRIPTSOWN}} \ - -g ${GRP_${.TARGET:T}:U${SCRIPTSGRP}} \ - -m ${MODE_${.TARGET:T}:U${SCRIPTSMODE}} - -__SCRIPTINSTALL_USE: .USE - ${INSTALL} ${INSTALL_FLAGS_${.TARGET:T}:U${INSTALL_FLAGS}} \ - ${.ALLSRC} ${.TARGET} - -.for s in ${SCRIPTS} -.if !defined(BUILD) && !make(all) && !make(${s}) -${DESTDIR}${SCRIPTSDIR_$s:U${SCRIPTSDIR}}/${SCRIPTSNAME_$s:U${s:${SCRIPTSNAME_MOD}}}: .MADE -.endif -${DESTDIR}${SCRIPTSDIR_$s:U${SCRIPTSDIR}}/${SCRIPTSNAME_$s:U${s:${SCRIPTSNAME_MOD}}}: ${s} __SCRIPTINSTALL_USE +.if !target(buildfiles) +.for group in ${SCRIPTSGROUPS} +buildfiles: ${${group}} .endfor .endif +buildfiles: +realbuild: buildfiles +.for group in ${SCRIPTSGROUPS} +.if !empty(${group}) && defined(${group}DIR) +.if ${group} != "SCRIPTS" +${group}_INSTALL_OWN ?= ${SCRIPTS_INSTALL_OWN} .endif +# incase we are staging +STAGE_DIR.${group} ?= ${STAGE_OBJTOP}${${group}DIR} -.if !target(scriptsinstall) -scriptsinstall:: +.for script in ${${group}:O:u} +${group}_INSTALL_OWN.${script:T} ?= ${${group}_INSTALL_OWN} +${group}DIR.${script:T} ?= ${${group}DIR_${script:T}:U${${group}DIR}} +script_mkdir_list += ${${group}DIR.${script:T}} + +${group}NAME.${script} ?= ${${group}NAME_${script:T}:U${script:${SCRIPTSNAME_MOD}}} +.if ${${group}NAME.${script}:T} != ${script:T} +STAGE_AS_SETS += ${group} +STAGE_AS_${script} = ${${group}NAME.${script:T}} +stage_as.${group}: ${script} + +installscripts: installscripts.${group}.${script:T} +installscripts.${group}.${script:T}: ${script} script_mkdirs + ${INSTALL} ${SCRIPTS_COPY} ${${group}_INSTALL_OWN.${script:T}} \ + -m ${SCRIPTSMODE} ${.ALLSRC:Nscript_mkdirs} ${DESTDIR}${${group}DIR}/${${group}NAME.${script:T}} + +.else +STAGE_SETS += ${group} +stage_files.${group}: ${script} +installscripts.${group}: ${script} +installscripts: installscripts.${group} .endif +.endfor # script + +installscripts.${group}: script_mkdirs + ${INSTALL} ${SCRIPTS_COPY} ${${group}_INSTALL_OWN} -m ${SCRIPTSMODE} \ + ${.ALLSRC:Nscript_mkdirs:O:u} ${DESTDIR}${${group}DIR} + +.endif # !empty +.endfor # group + +script_mkdirs: + @for d in ${script_mkdir_list:O:u}; do \ + test -d ${DESTDIR}$$d || \ + ${INSTALL} -d ${SCRIPTS_INSTALL_OWN} -m 775 ${DESTDIR}$$d; \ + done + + +beforeinstall: +installscripts: +realinstall: installscripts +.ORDER: beforeinstall installscripts + Modified: vendor/NetBSD/bmake/dist/mk/sys/AIX.mk ============================================================================== --- vendor/NetBSD/bmake/dist/mk/sys/AIX.mk Wed May 10 22:24:09 2017 (r318161) +++ vendor/NetBSD/bmake/dist/mk/sys/AIX.mk Wed May 10 22:40:27 2017 (r318162) @@ -67,8 +67,6 @@ LDFLAGS= LINT= lint LINTFLAGS= -chapbx -MAKE= bmake - PC= pc PFLAGS= COMPILE.p= ${PC} ${PFLAGS} ${CPPFLAGS} -c Modified: vendor/NetBSD/bmake/dist/mk/sys/Darwin.mk ============================================================================== --- vendor/NetBSD/bmake/dist/mk/sys/Darwin.mk Wed May 10 22:24:09 2017 (r318161) +++ vendor/NetBSD/bmake/dist/mk/sys/Darwin.mk Wed May 10 22:40:27 2017 (r318162) @@ -84,8 +84,6 @@ LINTFLAGS?= -chapbx LORDER?= lorder -MAKE?= bmake - NM?= nm PC?= pc Modified: vendor/NetBSD/bmake/dist/mk/sys/Generic.mk ============================================================================== --- vendor/NetBSD/bmake/dist/mk/sys/Generic.mk Wed May 10 22:24:09 2017 (r318161) +++ vendor/NetBSD/bmake/dist/mk/sys/Generic.mk Wed May 10 22:40:27 2017 (r318162) @@ -1,4 +1,4 @@ -# $Id: Generic.mk,v 1.12 2016/03/22 20:45:14 sjg Exp $ +# $Id: Generic.mk,v 1.13 2017/05/05 18:02:16 sjg Exp $ # # some reasonable defaults @@ -80,8 +80,6 @@ LDFLAGS?= LINT?= lint LINTFLAGS?= -chapbxzF -MAKE?= ${.MAKE} - NM?= nm PC?= pc Modified: vendor/NetBSD/bmake/dist/mk/sys/HP-UX.mk ============================================================================== --- vendor/NetBSD/bmake/dist/mk/sys/HP-UX.mk Wed May 10 22:24:09 2017 (r318161) +++ vendor/NetBSD/bmake/dist/mk/sys/HP-UX.mk Wed May 10 22:40:27 2017 (r318162) @@ -1,4 +1,4 @@ -# $Id: HP-UX.mk,v 1.10 2016/03/22 20:45:14 sjg Exp $ +# $Id: HP-UX.mk,v 1.11 2017/05/05 18:02:16 sjg Exp $ # $NetBSD: sys.mk,v 1.19.2.1 1994/07/26 19:58:31 cgd Exp $ # @(#)sys.mk 5.11 (Berkeley) 3/13/91 @@ -101,8 +101,6 @@ LDFLAGS= LINT= lint LINTFLAGS= -chapbx -MAKE= bmake - PC= pc PFLAGS= COMPILE.p= ${PC} ${PFLAGS} ${CPPFLAGS} -c Modified: vendor/NetBSD/bmake/dist/mk/sys/IRIX.mk ============================================================================== --- vendor/NetBSD/bmake/dist/mk/sys/IRIX.mk Wed May 10 22:24:09 2017 (r318161) +++ vendor/NetBSD/bmake/dist/mk/sys/IRIX.mk Wed May 10 22:40:27 2017 (r318162) @@ -70,8 +70,6 @@ LINTFLAGS?= -chapbxzF LORDER?= lorder -MAKE?= make - NM?= nm PC?= pc Modified: vendor/NetBSD/bmake/dist/mk/sys/Linux.mk ============================================================================== --- vendor/NetBSD/bmake/dist/mk/sys/Linux.mk Wed May 10 22:24:09 2017 (r318161) +++ vendor/NetBSD/bmake/dist/mk/sys/Linux.mk Wed May 10 22:40:27 2017 (r318162) @@ -1,4 +1,4 @@ -# $Id: Linux.mk,v 1.8 2016/03/22 20:45:14 sjg Exp $ +# $Id: Linux.mk,v 1.9 2017/05/05 18:02:16 sjg Exp $ # $NetBSD: sys.mk,v 1.19.2.1 1994/07/26 19:58:31 cgd Exp $ # @(#)sys.mk 5.11 (Berkeley) 3/13/91 @@ -70,8 +70,6 @@ LDFLAGS= LINT= lint LINTFLAGS= -chapbx -MAKE= bmake - PC= pc PFLAGS= COMPILE.p= ${PC} ${PFLAGS} ${CPPFLAGS} -c Modified: vendor/NetBSD/bmake/dist/mk/sys/NetBSD.mk ============================================================================== --- vendor/NetBSD/bmake/dist/mk/sys/NetBSD.mk Wed May 10 22:24:09 2017 (r318161) +++ vendor/NetBSD/bmake/dist/mk/sys/NetBSD.mk Wed May 10 22:40:27 2017 (r318162) @@ -105,8 +105,6 @@ LINTFLAGS?= -chapbxzF LORDER?= lorder -MAKE?= make - NM?= nm PC?= pc Modified: vendor/NetBSD/bmake/dist/mk/sys/OSF1.mk ============================================================================== --- vendor/NetBSD/bmake/dist/mk/sys/OSF1.mk Wed May 10 22:24:09 2017 (r318161) +++ vendor/NetBSD/bmake/dist/mk/sys/OSF1.mk Wed May 10 22:40:27 2017 (r318162) @@ -1,4 +1,4 @@ -# $Id: OSF1.mk,v 1.7 2016/03/22 20:45:15 sjg Exp $ +# $Id: OSF1.mk,v 1.8 2017/05/05 18:02:16 sjg Exp $ # $NetBSD: sys.mk,v 1.19.2.1 1994/07/26 19:58:31 cgd Exp $ # @(#)sys.mk 5.11 (Berkeley) 3/13/91 @@ -77,8 +77,6 @@ LDFLAGS= LINT= lint LINTFLAGS= -chapbx -MAKE= bmake - PC= pc PFLAGS= COMPILE.p= ${PC} ${PFLAGS} ${CPPFLAGS} -c Modified: vendor/NetBSD/bmake/dist/mk/sys/OpenBSD.mk ============================================================================== --- vendor/NetBSD/bmake/dist/mk/sys/OpenBSD.mk Wed May 10 22:24:09 2017 (r318161) +++ vendor/NetBSD/bmake/dist/mk/sys/OpenBSD.mk Wed May 10 22:40:27 2017 (r318162) @@ -80,8 +80,6 @@ LINTFLAGS?= -chapbxzF LORDER?= lorder -MAKE?= make - NM?= nm PC?= pc Modified: vendor/NetBSD/bmake/dist/mk/sys/SunOS.mk ============================================================================== --- vendor/NetBSD/bmake/dist/mk/sys/SunOS.mk Wed May 10 22:24:09 2017 (r318161) +++ vendor/NetBSD/bmake/dist/mk/sys/SunOS.mk Wed May 10 22:40:27 2017 (r318162) @@ -1,4 +1,4 @@ -# $Id: SunOS.mk,v 1.7 2016/03/22 20:45:15 sjg Exp $ +# $Id: SunOS.mk,v 1.8 2017/05/05 18:02:17 sjg Exp $ .if ${.PARSEFILE} == "sys.mk" .include @@ -98,8 +98,6 @@ LDFLAGS= LINT= lint LINTFLAGS= -chapbx -MAKE= bmake - PC= pc PFLAGS= COMPILE.p= ${PC} ${PFLAGS} ${CPPFLAGS} -c Modified: vendor/NetBSD/bmake/dist/mk/sys/UnixWare.mk ============================================================================== --- vendor/NetBSD/bmake/dist/mk/sys/UnixWare.mk Wed May 10 22:24:09 2017 (r318161) +++ vendor/NetBSD/bmake/dist/mk/sys/UnixWare.mk Wed May 10 22:40:27 2017 (r318162) @@ -1,4 +1,4 @@ -# $Id: UnixWare.mk,v 1.2 2016/03/22 20:45:15 sjg Exp $ +# $Id: UnixWare.mk,v 1.3 2017/05/05 18:02:17 sjg Exp $ # based on "Id: SunOS.5.sys.mk,v 1.6 2003/09/30 16:42:23 sjg Exp " # $NetBSD: sys.mk,v 1.19.2.1 1994/07/26 19:58:31 cgd Exp $ # @(#)sys.mk 5.11 (Berkeley) 3/13/91 @@ -114,8 +114,6 @@ LINTFLAGS?= -pF LORDER?= lorder -MAKE?= bmake - NM?= nm PC?= pc # XXX: UDK probably does not have pc Modified: vendor/NetBSD/bmake/dist/parse.c ============================================================================== --- vendor/NetBSD/bmake/dist/parse.c Wed May 10 22:24:09 2017 (r318161) +++ vendor/NetBSD/bmake/dist/parse.c Wed May 10 22:40:27 2017 (r318162) @@ -130,7 +130,6 @@ __RCSID("$NetBSD: parse.c,v 1.225 2017/0 #include #include #include -#include #include "make.h" #include "hash.h" @@ -139,6 +138,10 @@ __RCSID("$NetBSD: parse.c,v 1.225 2017/0 #include "buf.h" #include "pathnames.h" +#ifdef HAVE_STDINT_H +#include +#endif + #ifdef HAVE_MMAP #include Modified: vendor/NetBSD/bmake/dist/str.c ============================================================================== --- vendor/NetBSD/bmake/dist/str.c Wed May 10 22:24:09 2017 (r318161) +++ vendor/NetBSD/bmake/dist/str.c Wed May 10 22:40:27 2017 (r318162) @@ -1,4 +1,4 @@ -/* $NetBSD: str.c,v 1.37 2017/04/11 17:30:13 sjg Exp $ */ +/* $NetBSD: str.c,v 1.38 2017/04/21 22:15:44 sjg Exp $ */ /*- * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,14 +69,14 @@ */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Wed May 10 22:45:10 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 06396D67033; Wed, 10 May 2017 22:45:10 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C1EAF1A7E; Wed, 10 May 2017 22:45:09 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4AMj883087118; Wed, 10 May 2017 22:45:08 GMT (envelope-from sjg@FreeBSD.org) Received: (from sjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4AMj5rb087086; Wed, 10 May 2017 22:45:05 GMT (envelope-from sjg@FreeBSD.org) Message-Id: <201705102245.v4AMj5rb087086@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sjg set sender to sjg@FreeBSD.org using -f From: "Simon J. Gerraty" Date: Wed, 10 May 2017 22:45:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318163 - in head: contrib/bmake contrib/bmake/mk contrib/bmake/mk/sys usr.bin/bmake X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 22:45:10 -0000 Author: sjg Date: Wed May 10 22:45:05 2017 New Revision: 318163 URL: https://svnweb.freebsd.org/changeset/base/318163 Log: Merge bmake-20170510 No-op change other than version update. Added: head/contrib/bmake/mk/files.mk - copied unchanged from r318162, vendor/NetBSD/bmake/dist/mk/files.mk Modified: head/contrib/bmake/ChangeLog head/contrib/bmake/Makefile head/contrib/bmake/main.c head/contrib/bmake/mk/ChangeLog head/contrib/bmake/mk/FILES head/contrib/bmake/mk/dirdeps.mk head/contrib/bmake/mk/doc.mk head/contrib/bmake/mk/final.mk head/contrib/bmake/mk/inc.mk head/contrib/bmake/mk/init.mk head/contrib/bmake/mk/install-mk head/contrib/bmake/mk/lib.mk head/contrib/bmake/mk/meta2deps.py head/contrib/bmake/mk/own.mk head/contrib/bmake/mk/prog.mk head/contrib/bmake/mk/scripts.mk head/contrib/bmake/mk/sys/AIX.mk head/contrib/bmake/mk/sys/Darwin.mk head/contrib/bmake/mk/sys/Generic.mk head/contrib/bmake/mk/sys/HP-UX.mk head/contrib/bmake/mk/sys/IRIX.mk head/contrib/bmake/mk/sys/Linux.mk head/contrib/bmake/mk/sys/NetBSD.mk head/contrib/bmake/mk/sys/OSF1.mk head/contrib/bmake/mk/sys/OpenBSD.mk head/contrib/bmake/mk/sys/SunOS.mk head/contrib/bmake/mk/sys/UnixWare.mk head/contrib/bmake/parse.c head/contrib/bmake/str.c head/usr.bin/bmake/Makefile Directory Properties: head/contrib/bmake/ (props changed) Modified: head/contrib/bmake/ChangeLog ============================================================================== --- head/contrib/bmake/ChangeLog Wed May 10 22:40:27 2017 (r318162) +++ head/contrib/bmake/ChangeLog Wed May 10 22:45:05 2017 (r318163) @@ -1,3 +1,29 @@ +2017-05-10 Simon J. Gerraty + + * Makefile (_MAKE_VERSION): 20170510 + Merge with NetBSD make, pick up + o main.c: Main_SetObjdir: ensure buf2 is in scope + +2017-05-08 Simon J. Gerraty + + * Makefile (_MAKE_VERSION): 20170505 + see mk/ChangeLog + +2017-05-05 Simon J. Gerraty + + * parse.c: not everyone has stdint.h + +2017-05-01 Simon J. Gerraty + + * Makefile (_MAKE_VERSION): 20170501 + see mk/ChangeLog + +2017-04-21 Simon J. Gerraty + + * Makefile (_MAKE_VERSION): 20170421 + Merge with NetBSD make, pick up + o str.c: Str_Match: fix closure tests for [^] and add unit-test. + 2017-04-20 Simon J. Gerraty * Makefile (_MAKE_VERSION): 20170420 Modified: head/contrib/bmake/Makefile ============================================================================== --- head/contrib/bmake/Makefile Wed May 10 22:40:27 2017 (r318162) +++ head/contrib/bmake/Makefile Wed May 10 22:45:05 2017 (r318163) @@ -1,7 +1,7 @@ -# $Id: Makefile,v 1.88 2017/04/20 14:51:14 sjg Exp $ +# $Id: Makefile,v 1.92 2017/05/10 22:29:04 sjg Exp $ # Base version on src date -_MAKE_VERSION= 20170420 +_MAKE_VERSION= 20170510 PROG= bmake Modified: head/contrib/bmake/main.c ============================================================================== --- head/contrib/bmake/main.c Wed May 10 22:40:27 2017 (r318162) +++ head/contrib/bmake/main.c Wed May 10 22:45:05 2017 (r318163) @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.264 2017/04/20 03:57:27 sjg Exp $ */ +/* $NetBSD: main.c,v 1.265 2017/05/10 22:26:14 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,7 +69,7 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: main.c,v 1.264 2017/04/20 03:57:27 sjg Exp $"; +static char rcsid[] = "$NetBSD: main.c,v 1.265 2017/05/10 22:26:14 sjg Exp $"; #else #include #ifndef lint @@ -81,7 +81,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 19 #if 0 static char sccsid[] = "@(#)main.c 8.3 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: main.c,v 1.264 2017/04/20 03:57:27 sjg Exp $"); +__RCSID("$NetBSD: main.c,v 1.265 2017/05/10 22:26:14 sjg Exp $"); #endif #endif /* not lint */ #endif Modified: head/contrib/bmake/mk/ChangeLog ============================================================================== --- head/contrib/bmake/mk/ChangeLog Wed May 10 22:40:27 2017 (r318162) +++ head/contrib/bmake/mk/ChangeLog Wed May 10 22:45:05 2017 (r318163) @@ -1,3 +1,37 @@ +2017-05-08 Simon J. Gerraty + + * install-mk (MK_VERSION): 20170505 + + * meta2deps.py: fix botched indenation. + +2017-05-05 Simon J. Gerraty + + * sys/*.mk: Remove setting of MAKE it is unnecessary and + in many cases wrong (basname rather than full path) + + * scripts.mk (SCRIPTSGROUPS): make this more like files.mk and inc.mk + + * init.mk: define realbuild to simplify logic in {lib,prog}.mk etc + +2017-05-01 Simon J. Gerraty + + * install-mk (MK_VERSION): 20170501 + + * doc.mk: fix typo in DOC_INSTALL_OWN + + * inc.mk: handle INCGROUPS similar to freebsd + + * files.mk: add something for files too + + * add staging logic to lib.mk prog.mk etc. + +2017-04-24 Simon J. Gerraty + + * install-mk (MK_VERSION): 20170424 + + * dirdeps.mk: set NO_DIRDEPS when bootstrapping. + also target of bootstrap-this when sed is needed should be ${_want:T} + 2017-04-18 Simon J. Gerraty * install-mk (MK_VERSION): 20170418 Modified: head/contrib/bmake/mk/FILES ============================================================================== --- head/contrib/bmake/mk/FILES Wed May 10 22:40:27 2017 (r318162) +++ head/contrib/bmake/mk/FILES Wed May 10 22:45:05 2017 (r318163) @@ -9,6 +9,7 @@ cython.mk dep.mk doc.mk dpadd.mk +files.mk final.mk host-target.mk host.libnames.mk Modified: head/contrib/bmake/mk/dirdeps.mk ============================================================================== --- head/contrib/bmake/mk/dirdeps.mk Wed May 10 22:40:27 2017 (r318162) +++ head/contrib/bmake/mk/dirdeps.mk Wed May 10 22:45:05 2017 (r318163) @@ -1,4 +1,4 @@ -# $Id: dirdeps.mk,v 1.87 2017/03/07 01:49:03 sjg Exp $ +# $Id: dirdeps.mk,v 1.88 2017/04/24 20:34:59 sjg Exp $ # Copyright (c) 2010-2013, Juniper Networks, Inc. # All rights reserved. @@ -137,6 +137,14 @@ # built for. # +.if !target(bootstrap) && (make(bootstrap) || \ + make(bootstrap-this) || \ + make(bootstrap-recurse) || \ + make(bootstrap-empty)) +# disable most of below +.MAKE.LEVEL = 1 +.endif + # touch this at your peril _DIRDEP_USE_LEVEL?= 0 .if ${.MAKE.LEVEL} == ${_DIRDEP_USE_LEVEL} @@ -757,7 +765,7 @@ bootstrap-this: .NOTMAIN @echo Bootstrapping ${RELDIR}/${_want:T} from ${_src:T}; \ echo You need to build ${RELDIR} to correctly populate it. .if ${_src:T} != ${.MAKE.DEPENDFILE_PREFIX:T} - (cd ${.CURDIR} && sed ${.MAKE.DEPENDFILE_BOOTSTRAP_SED} ${_src} > ${_want}) + (cd ${.CURDIR} && sed ${.MAKE.DEPENDFILE_BOOTSTRAP_SED} ${_src} > ${_want:T}) .else cp ${.CURDIR}/${_src:T} ${_want} .endif Modified: head/contrib/bmake/mk/doc.mk ============================================================================== --- head/contrib/bmake/mk/doc.mk Wed May 10 22:40:27 2017 (r318162) +++ head/contrib/bmake/mk/doc.mk Wed May 10 22:45:05 2017 (r318163) @@ -1,4 +1,4 @@ -# $Id: doc.mk,v 1.5 2015/09/08 06:15:31 sjg Exp $ +# $Id: doc.mk,v 1.6 2017/05/01 21:24:10 sjg Exp $ .if !target(__${.PARSEFILE}__) __${.PARSEFILE}__: @@ -59,7 +59,7 @@ spell: ${SRCS} .include .if !empty(DOCOWN) -DOC_INSTALL_OWN?= -o ${DOCOWN} -g ${DOGGRP} +DOC_INSTALL_OWN?= -o ${DOCOWN} -g ${DOCGRP} .endif .endif Copied: head/contrib/bmake/mk/files.mk (from r318162, vendor/NetBSD/bmake/dist/mk/files.mk) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/bmake/mk/files.mk Wed May 10 22:45:05 2017 (r318163, copy of r318162, vendor/NetBSD/bmake/dist/mk/files.mk) @@ -0,0 +1,83 @@ +# $Id: files.mk,v 1.6 2017/05/07 02:21:02 sjg Exp $ +# +# @(#) Copyright (c) 2017, Simon J. Gerraty +# +# This file is provided in the hope that it will +# be of use. There is absolutely NO WARRANTY. +# Permission to copy, redistribute or otherwise +# use this file is hereby granted provided that +# the above copyright notice and this notice are +# left intact. +# +# Please send copies of changes and bug-fixes to: +# sjg@crufty.net +# + +.include + +FILES_INSTALL_OWN ?= -o ${SHAREOWN} -g ${SHAREGRP} +FILESMODE ?= ${SHAREMODE} +FILES_COPY ?= -C + +FILESGROUPS ?= FILES +FILESGROUPS := ${FILESGROUPS:O:u} + +.if !target(buildfiles) +.for group in ${FILESGROUPS} +buildfiles: ${${group}} +.endfor +.endif +buildfiles: +realbuild: buildfiles + +# there is no default FILESDIR so +# ignore group if ${group}DIR is not defined +.for group in ${FILESGROUPS} +.if !empty(${group}) && defined(${group}DIR) +.if ${group} != "FILES" +${group}_INSTALL_OWN ?= ${FILES_INSTALL_OWN} +.endif +# incase we are staging +STAGE_DIR.${group} ?= ${STAGE_OBJTOP}${${group}DIR} + +.for file in ${${group}:O:u} +${group}_INSTALL_OWN.${file:T} ?= ${${group}_INSTALL_OWN} +${group}DIR.${file:T} ?= ${${group}DIR} +file_mkdir_list += ${${group}DIR.${file:T}} + +.if defined(${group}NAME.${file:T}) +STAGE_AS_SETS += ${group} +STAGE_AS_${file} = ${${group}NAME.${file:T}} +stage_as.${group}: ${file} + +installfiles: installfiles.${group}.${file:T} +installfiles.${group}.${file:T}: ${file} file_mkdirs + ${INSTALL} ${FILES_COPY} ${${group}_INSTALL_OWN.${file:T}} \ + -m ${FILESMODE} ${.ALLSRC:Nfile_mkdirs} ${DESTDIR}${${group}DIR}/${${group}NAME.${file:T}} + +.else +STAGE_SETS += ${group} +stage_files.${group}: ${file} +installfiles.${group}: ${file} +installfiles: installfiles.${group} +.endif + +.endfor # file + +installfiles.${group}: file_mkdirs + ${INSTALL} ${FILES_COPY} ${${group}_INSTALL_OWN} -m ${FILESMODE} \ + ${.ALLSRC:Nfile_mkdirs:O:u} ${DESTDIR}${${group}DIR} + +.endif # !empty +.endfor # group + +file_mkdirs: + @for d in ${file_mkdir_list:O:u}; do \ + test -d ${DESTDIR}$$d || \ + ${INSTALL} -d ${FILES_INSTALL_OWN} -m 775 ${DESTDIR}$$d; \ + done + +beforeinstall: +installfiles: +realinstall: installfiles +.ORDER: beforeinstall installfiles Modified: head/contrib/bmake/mk/final.mk ============================================================================== --- head/contrib/bmake/mk/final.mk Wed May 10 22:40:27 2017 (r318162) +++ head/contrib/bmake/mk/final.mk Wed May 10 22:45:05 2017 (r318163) @@ -1,4 +1,4 @@ -# $Id: final.mk,v 1.6 2016/04/05 15:58:37 sjg Exp $ +# $Id: final.mk,v 1.8 2017/05/07 20:30:08 sjg Exp $ .if !target(__${.PARSEFILE}__) __${.PARSEFILE}__: @@ -6,9 +6,17 @@ __${.PARSEFILE}__: # provide a hook for folk who want to do scary stuff .-include <${.CURDIR:H}/Makefile-final.inc> -.if !empty(STAGE) +.if ${MK_STAGING} == "yes" +.include +.elif !empty(STAGE) .-include .endif .-include + +.if empty(_SKIP_BUILD) +install: realinstall +.endif +realinstall: + .endif Modified: head/contrib/bmake/mk/inc.mk ============================================================================== --- head/contrib/bmake/mk/inc.mk Wed May 10 22:40:27 2017 (r318162) +++ head/contrib/bmake/mk/inc.mk Wed May 10 22:45:05 2017 (r318163) @@ -1,4 +1,4 @@ -# $Id: inc.mk,v 1.3 2011/03/11 05:23:05 sjg Exp $ +# $Id: inc.mk,v 1.7 2017/05/06 17:29:45 sjg Exp $ # # @(#) Copyright (c) 2008, Simon J. Gerraty # @@ -15,8 +15,6 @@ .include -includes: ${INCS} - .if !empty(LIBOWN) INC_INSTALL_OWN ?= -o ${LIBOWN} -g ${LIBGRP} .endif @@ -24,12 +22,68 @@ INCMODE ?= 444 INC_COPY ?= -C INCSDIR ?= ${INCDIR} -realinstall: incinstall +STAGE_INCSDIR?= ${STAGE_OBJTOP}${INCSDIR} + +# accommodate folk used to freebsd +INCGROUPS ?= ${INCSGROUPS:UINCS} +INCGROUPS := ${INCGROUPS:O:u} + +.if !target(buildincludes) +.for group in ${INCGROUPS} +buildincludes: ${${group}} +.endfor +.endif +buildincludes: +includes: buildincludes + .if !target(incinstall) -incinstall: -.if !empty(INCS) - [ -d ${DESTDIR}${INCSDIR} ] || \ - ${INSTALL} -d ${INC_INSTALL_OWN} -m 775 ${DESTDIR}${INCSDIR} - ${INSTALL} ${INC_COPY} ${INC_INSTALL_OWN} -m ${INCMODE} ${INCS} ${DESTDIR}${INCSDIR} +.for group in ${INCGROUPS} +.if !empty(${group}) +.if ${group} != "INC" +${group}_INSTALL_OWN ?= ${INC_INSTALL_OWN} +${group}DIR ?= ${INCDIR} .endif +# incase we are staging +STAGE_DIR.${group} ?= ${STAGE_OBJTOP}${${group}DIR} + +.for header in ${${group}:O:u} +${group}_INSTALL_OWN.${header:T} ?= ${${group}_INSTALL_OWN} +${group}DIR.${header:T} ?= ${${group}DIR} +inc_mkdir_list += ${${group}DIR.${header:T}} + +.if defined(${group}NAME.${header:T}) +STAGE_AS_SETS += ${group} +STAGE_AS_${header} = ${${group}NAME.${header:T}} +stage_as.${group}: ${header} + +incinstall: incinstall.${group}.${header:T} +incinstall.${group}.${header:T}: ${header} inc_mkdirs + ${INSTALL} ${INC_COPY} ${${group}_INSTALL_OWN.${header:T}} -m ${INCMODE} ${.ALLSRC:Ninc_mkdirs} ${DESTDIR}${${group}DIR}/${${group}NAME.${header:T}} + +.else +STAGE_SETS += ${group} +stage_files.${group}: ${header} +incinstall.${group}: ${header} +incinstall: incinstall.${group} .endif + +.endfor # header + +incinstall.${group}: inc_mkdirs + ${INSTALL} ${INC_COPY} ${${group}_INSTALL_OWN} -m ${INCMODE} \ + ${.ALLSRC:Ninc_mkdirs:O:u} ${DESTDIR}${${group}DIR} + +.endif # !empty +.endfor # group + +inc_mkdirs: + @for d in ${inc_mkdir_list:O:u}; do \ + test -d ${DESTDIR}$$d || \ + ${INSTALL} -d ${INC_INSTALL_OWN} -m 775 ${DESTDIR}$$d; \ + done + +.endif # !target(incinstall) + +beforeinstall: +realinstall: incinstall +.ORDER: beforeinstall incinstall Modified: head/contrib/bmake/mk/init.mk ============================================================================== --- head/contrib/bmake/mk/init.mk Wed May 10 22:40:27 2017 (r318162) +++ head/contrib/bmake/mk/init.mk Wed May 10 22:45:05 2017 (r318163) @@ -1,4 +1,4 @@ -# $Id: init.mk,v 1.12 2016/04/05 15:58:37 sjg Exp $ +# $Id: init.mk,v 1.15 2017/05/07 20:27:54 sjg Exp $ # # @(#) Copyright (c) 2002, Simon J. Gerraty # @@ -50,8 +50,20 @@ PROFFLAGS?= -DGPROF -DPROF _SKIP_BUILD = not building at level 0 .endif -.if !empty(_SKIP_BUILD) +.if !defined(.PARSEDIR) +# no-op is the best we can do if not bmake. +.WAIT: +.endif + +# define this once for consistency +.if empty(_SKIP_BUILD) +# beforebuild is a hook for things that must be done early +all: beforebuild .WAIT realbuild +.else all: .PHONY .warning ${_SKIP_BUILD} .endif +beforebuild: +realbuild: + .endif Modified: head/contrib/bmake/mk/install-mk ============================================================================== --- head/contrib/bmake/mk/install-mk Wed May 10 22:40:27 2017 (r318162) +++ head/contrib/bmake/mk/install-mk Wed May 10 22:45:05 2017 (r318163) @@ -55,7 +55,7 @@ # Simon J. Gerraty # RCSid: -# $Id: install-mk,v 1.141 2017/04/18 23:53:18 sjg Exp $ +# $Id: install-mk,v 1.145 2017/05/09 04:05:32 sjg Exp $ # # @(#) Copyright (c) 1994 Simon J. Gerraty # @@ -70,7 +70,7 @@ # sjg@crufty.net # -MK_VERSION=20170418 +MK_VERSION=20170505 OWNER= GROUP= MODE=444 @@ -176,7 +176,7 @@ $SKIP_MKFILES Do chmod $BINMODE $mk_scri [ "$OWNER" ] && $SKIP_MKFILES Do chown $OWNER $mk_files $sys_mk_files # if this is a BSD system the bsd.*.mk should exist and be used. if [ -z "$SKIP_BSD_MK" ]; then - for f in dep doc init lib links man nls obj own prog subdir + for f in dep doc files inc init lib links man nls obj own prog subdir do b=bsd.$f.mk [ -s $b ] || Do ln -s $f.mk $b Modified: head/contrib/bmake/mk/lib.mk ============================================================================== --- head/contrib/bmake/mk/lib.mk Wed May 10 22:40:27 2017 (r318162) +++ head/contrib/bmake/mk/lib.mk Wed May 10 22:45:05 2017 (r318163) @@ -1,4 +1,4 @@ -# $Id: lib.mk,v 1.55 2016/09/23 23:04:51 sjg Exp $ +# $Id: lib.mk,v 1.61 2017/05/06 17:30:09 sjg Exp $ .if !target(__${.PARSEFILE}__) __${.PARSEFILE}__: @@ -37,7 +37,7 @@ PICO?= .pico CFLAGS+= ${COPTS} -# Derrived from NetBSD-1.6 +# Originally derrived from NetBSD-1.6 # Set PICFLAGS to cc flags for producing position-independent code, # if not already set. Includes -DPIC, if required. @@ -375,15 +375,14 @@ _LIBS+=llib-l${LIB}.ln .include .endif -.if !defined(_SKIP_BUILD) -all: prebuild .WAIT ${_LIBS} -# a hook for things that must be done early -prebuild: -.if !defined(.PARSEDIR) -# no-op is the best we can do if not bmake. -.WAIT: +.if empty(LIB) +_LIBS= .endif + +.if !defined(_SKIP_BUILD) +realbuild: ${_LIBS} .endif + all: _SUBDIRUSE .for s in ${SRCS:N*.h:M*/*} @@ -509,7 +508,7 @@ LIB_INSTALL_OWN ?= -o ${LIBOWN} -g ${LIB .include -.if !target(realinstall) +.if !target(realinstall) && !empty(LIB) realinstall: libinstall .endif .if !target(libinstall) @@ -552,13 +551,19 @@ libinstall: .endif .endif +.if ${MK_MAN} != "no" install: maninstall _SUBDIRUSE maninstall: afterinstall +.endif afterinstall: realinstall libinstall: beforeinstall realinstall: beforeinstall .endif +.if defined(FILES) || defined(FILESGROUPS) +.include +.endif + .if ${MK_MAN} != "no" .include .endif @@ -591,5 +596,10 @@ realinstall: beforeinstall .endfor @touch ${.TARGET} +.if !empty(LIB) +STAGE_LIBDIR?= ${STAGE_OBJTOP}${LIBDIR} +stage_libs: ${_LIBS} +.endif + .include .endif Modified: head/contrib/bmake/mk/meta2deps.py ============================================================================== --- head/contrib/bmake/mk/meta2deps.py Wed May 10 22:40:27 2017 (r318162) +++ head/contrib/bmake/mk/meta2deps.py Wed May 10 22:45:05 2017 (r318163) @@ -37,7 +37,7 @@ We only pay attention to a subset of the """ RCSid: - $Id: meta2deps.py,v 1.25 2017/04/03 21:04:09 sjg Exp $ + $Id: meta2deps.py,v 1.26 2017/05/09 04:04:16 sjg Exp $ Copyright (c) 2011-2013, Juniper Networks, Inc. All rights reserved. @@ -142,7 +142,7 @@ def sort_unique(list, cmp=None, key=None for e in list: if e == le: continue - le = e + le = e nl.append(e) return nl @@ -534,7 +534,7 @@ class MetaFile: # to the src dir, we may need to add dependencies for each rdir = dir dir = abspath(dir, cwd, self.last_dir, self.debug, self.debug_out) - rdir = os.path.realpath(dir) + rdir = os.path.realpath(dir) if rdir == dir: rdir = None # now put path back together Modified: head/contrib/bmake/mk/own.mk ============================================================================== --- head/contrib/bmake/mk/own.mk Wed May 10 22:40:27 2017 (r318162) +++ head/contrib/bmake/mk/own.mk Wed May 10 22:45:05 2017 (r318163) @@ -1,4 +1,4 @@ -# $Id: own.mk,v 1.32 2016/05/18 20:54:29 sjg Exp $ +# $Id: own.mk,v 1.35 2017/05/03 18:09:44 sjg Exp $ .if !target(__${.PARSEFILE}__) __${.PARSEFILE}__: @@ -117,6 +117,7 @@ OPTIONS_DEFAULT_DEPENDENT+= \ PICINSTALL/LINKLIB \ PICLIB/PIC \ PROFILE/LINKLIB \ + STAGING_PROG/STAGING \ .include @@ -128,7 +129,7 @@ _uid!= id -u USERGRP!= id -g .export USERGRP .endif -.for x in BIN CONF DOC INFO KMOD LIB MAN NLS SHARE +.for x in BIN CONF DOC INC INFO FILES KMOD LIB MAN NLS SHARE $xOWN= ${USER} $xGRP= ${USERGRP} $x_INSTALL_OWN= @@ -145,6 +146,9 @@ BINMODE?= 555 NONBINMODE?= 444 DIRMODE?= 755 +INCLUDEDIR?= ${prefix}/include +INCDIR?= ${INCLUDEDIR} + # Define MANZ to have the man pages compressed (gzip) #MANZ= 1 @@ -184,6 +188,10 @@ KMODGRP?= ${BINGRP} KMODOWN?= ${BINOWN} KMODMODE?= ${NONBINMODE} +SHAREGRP?= ${BINGRP} +SHAREOWN?= ${BINOWN} +SHAREMODE?= ${NONBINMODE} + COPY?= -c STRIP_FLAG?= -s @@ -244,4 +252,19 @@ MK_MAN= no MK_NLS= no .endif +# :U incase not using our sys.mk +.if ${MK_META_MODE:Uno} == "yes" +# should all be set by sys.mk if not default +TARGET_SPEC_VARS ?= MACHINE +.if ${TARGET_SPEC_VARS:[#]} > 1 +TARGET_SPEC_VARS_REV := ${TARGET_SPEC_VARS:[-1..1]} +.else +TARGET_SPEC_VARS_REV = ${TARGET_SPEC_VARS} +.endif +.if ${MK_STAGING} == "yes" +STAGE_ROOT?= ${OBJROOT}/stage +STAGE_OBJTOP?= ${STAGE_ROOT}/${TARGET_SPEC_VARS_REV:ts/} +.endif +.endif + .endif Modified: head/contrib/bmake/mk/prog.mk ============================================================================== --- head/contrib/bmake/mk/prog.mk Wed May 10 22:40:27 2017 (r318162) +++ head/contrib/bmake/mk/prog.mk Wed May 10 22:45:05 2017 (r318163) @@ -1,4 +1,4 @@ -# $Id: prog.mk,v 1.28 2017/02/14 21:26:13 sjg Exp $ +# $Id: prog.mk,v 1.32 2017/05/06 17:30:09 sjg Exp $ .if !target(__${.PARSEFILE}__) __${.PARSEFILE}__: @@ -75,6 +75,8 @@ ${CXX_SUFFIXES:%=%.o}: .if defined(PROG) +BINDIR ?= ${prefix}/bin + SRCS?= ${PROG}.c .for s in ${SRCS:N*.h:N*.sh:M*/*} ${.o .po .lo:L:@o@${s:T:R}$o@}: $s @@ -126,8 +128,9 @@ MAN= ${PROG}.1 .endif # defined(PROG) .if !defined(_SKIP_BUILD) -all: ${PROG} +realbuild: ${PROG} .endif + all: _SUBDIRUSE .if !target(clean) @@ -208,6 +211,10 @@ lint: ${LOBJS} .NOPATH: ${OBJS} .endif +.if defined(FILES) || defined(FILESGROUPS) +.include +.endif + .if ${MK_MAN} != "no" .include .endif @@ -219,6 +226,20 @@ lint: ${LOBJS} .include .include .include + +.if !empty(PROG) && ${MK_STAGING_PROG} == "yes" +STAGE_BINDIR ?= ${STAGE_OBJTOP}${BINDIR} +STAGE_DIR.prog ?= ${STAGE_BINDIR} +.if ${PROG_NAME:U${PROG}} != ${PROG} +STAGE_AS_SETS += prog +STAGE_AS_${PROG} = ${PROG_NAME} +stage_as.prog: ${PROG} +.else +STAGE_SETS += prog +stage_files.prog: ${PROG} +.endif +.endif + .include .endif Modified: head/contrib/bmake/mk/scripts.mk ============================================================================== --- head/contrib/bmake/mk/scripts.mk Wed May 10 22:40:27 2017 (r318162) +++ head/contrib/bmake/mk/scripts.mk Wed May 10 22:45:05 2017 (r318163) @@ -1,52 +1,91 @@ -# $Id: scripts.mk,v 1.2 2006/11/09 01:55:18 sjg Exp $ +# $Id: scripts.mk,v 1.3 2017/05/06 17:29:45 sjg Exp $ +# +# @(#) Copyright (c) 2006, Simon J. Gerraty +# +# This file is provided in the hope that it will +# be of use. There is absolutely NO WARRANTY. +# Permission to copy, redistribute or otherwise +# use this file is hereby granted provided that +# the above copyright notice and this notice are +# left intact. +# +# Please send copies of changes and bug-fixes to: +# sjg@crufty.net +# .include -.if defined(SCRIPTS) +SCRIPTSGROUPS ?= SCRIPTS +SCRIPTSGROUPS := ${SCRIPTSGROUPS:O:u} -all: ${SCRIPTS} - -.PHONY: scriptsinstall -install: scriptsinstall - -.if !target(scriptsinstall) SCRIPTSDIR?= ${BINDIR} SCRIPTSOWN?= ${BINOWN} SCRIPTSGRP?= ${BINGRP} SCRIPTSMODE?= ${BINMODE} +SCRIPTS_INSTALL_OWN?= -o ${SCRIPTSOWN} -g ${SCRIPTSGRP} +SCRIPTS_COPY ?= -C + # how we get script name from src SCRIPTSNAME_MOD?=T:R -script_targets= ${SCRIPTS:@s@${DESTDIR}${SCRIPTSDIR_$s:U${SCRIPTSDIR}}/${SCRIPTSNAME_$s:U${s:${SCRIPTSNAME_MOD}}}@} - -scriptsinstall:: ${script_targets} - -.PRECIOUS: ${script_targets} -.if !defined(UPDATE) -.PHONY: ${script_targets} -.endif - -INSTALL_FLAGS?= ${RENAME} ${PRESERVE} ${COPY} ${INSTPRIV} \ - -o ${OWN_${.TARGET:T}:U${SCRIPTSOWN}} \ - -g ${GRP_${.TARGET:T}:U${SCRIPTSGRP}} \ - -m ${MODE_${.TARGET:T}:U${SCRIPTSMODE}} - -__SCRIPTINSTALL_USE: .USE - ${INSTALL} ${INSTALL_FLAGS_${.TARGET:T}:U${INSTALL_FLAGS}} \ - ${.ALLSRC} ${.TARGET} - -.for s in ${SCRIPTS} -.if !defined(BUILD) && !make(all) && !make(${s}) -${DESTDIR}${SCRIPTSDIR_$s:U${SCRIPTSDIR}}/${SCRIPTSNAME_$s:U${s:${SCRIPTSNAME_MOD}}}: .MADE -.endif -${DESTDIR}${SCRIPTSDIR_$s:U${SCRIPTSDIR}}/${SCRIPTSNAME_$s:U${s:${SCRIPTSNAME_MOD}}}: ${s} __SCRIPTINSTALL_USE +.if !target(buildfiles) +.for group in ${SCRIPTSGROUPS} +buildfiles: ${${group}} .endfor .endif +buildfiles: +realbuild: buildfiles +.for group in ${SCRIPTSGROUPS} +.if !empty(${group}) && defined(${group}DIR) +.if ${group} != "SCRIPTS" +${group}_INSTALL_OWN ?= ${SCRIPTS_INSTALL_OWN} .endif +# incase we are staging +STAGE_DIR.${group} ?= ${STAGE_OBJTOP}${${group}DIR} -.if !target(scriptsinstall) -scriptsinstall:: +.for script in ${${group}:O:u} +${group}_INSTALL_OWN.${script:T} ?= ${${group}_INSTALL_OWN} +${group}DIR.${script:T} ?= ${${group}DIR_${script:T}:U${${group}DIR}} +script_mkdir_list += ${${group}DIR.${script:T}} + +${group}NAME.${script} ?= ${${group}NAME_${script:T}:U${script:${SCRIPTSNAME_MOD}}} +.if ${${group}NAME.${script}:T} != ${script:T} +STAGE_AS_SETS += ${group} +STAGE_AS_${script} = ${${group}NAME.${script:T}} +stage_as.${group}: ${script} + +installscripts: installscripts.${group}.${script:T} +installscripts.${group}.${script:T}: ${script} script_mkdirs + ${INSTALL} ${SCRIPTS_COPY} ${${group}_INSTALL_OWN.${script:T}} \ + -m ${SCRIPTSMODE} ${.ALLSRC:Nscript_mkdirs} ${DESTDIR}${${group}DIR}/${${group}NAME.${script:T}} + +.else +STAGE_SETS += ${group} +stage_files.${group}: ${script} +installscripts.${group}: ${script} +installscripts: installscripts.${group} .endif +.endfor # script + +installscripts.${group}: script_mkdirs + ${INSTALL} ${SCRIPTS_COPY} ${${group}_INSTALL_OWN} -m ${SCRIPTSMODE} \ + ${.ALLSRC:Nscript_mkdirs:O:u} ${DESTDIR}${${group}DIR} + +.endif # !empty +.endfor # group + +script_mkdirs: + @for d in ${script_mkdir_list:O:u}; do \ + test -d ${DESTDIR}$$d || \ + ${INSTALL} -d ${SCRIPTS_INSTALL_OWN} -m 775 ${DESTDIR}$$d; \ + done + + +beforeinstall: +installscripts: +realinstall: installscripts +.ORDER: beforeinstall installscripts + Modified: head/contrib/bmake/mk/sys/AIX.mk ============================================================================== --- head/contrib/bmake/mk/sys/AIX.mk Wed May 10 22:40:27 2017 (r318162) +++ head/contrib/bmake/mk/sys/AIX.mk Wed May 10 22:45:05 2017 (r318163) @@ -67,8 +67,6 @@ LDFLAGS= LINT= lint LINTFLAGS= -chapbx -MAKE= bmake - PC= pc PFLAGS= COMPILE.p= ${PC} ${PFLAGS} ${CPPFLAGS} -c Modified: head/contrib/bmake/mk/sys/Darwin.mk ============================================================================== --- head/contrib/bmake/mk/sys/Darwin.mk Wed May 10 22:40:27 2017 (r318162) +++ head/contrib/bmake/mk/sys/Darwin.mk Wed May 10 22:45:05 2017 (r318163) @@ -84,8 +84,6 @@ LINTFLAGS?= -chapbx LORDER?= lorder -MAKE?= bmake - NM?= nm PC?= pc Modified: head/contrib/bmake/mk/sys/Generic.mk ============================================================================== --- head/contrib/bmake/mk/sys/Generic.mk Wed May 10 22:40:27 2017 (r318162) +++ head/contrib/bmake/mk/sys/Generic.mk Wed May 10 22:45:05 2017 (r318163) @@ -1,4 +1,4 @@ -# $Id: Generic.mk,v 1.12 2016/03/22 20:45:14 sjg Exp $ +# $Id: Generic.mk,v 1.13 2017/05/05 18:02:16 sjg Exp $ # # some reasonable defaults @@ -80,8 +80,6 @@ LDFLAGS?= LINT?= lint LINTFLAGS?= -chapbxzF -MAKE?= ${.MAKE} - NM?= nm PC?= pc Modified: head/contrib/bmake/mk/sys/HP-UX.mk ============================================================================== --- head/contrib/bmake/mk/sys/HP-UX.mk Wed May 10 22:40:27 2017 (r318162) +++ head/contrib/bmake/mk/sys/HP-UX.mk Wed May 10 22:45:05 2017 (r318163) @@ -1,4 +1,4 @@ -# $Id: HP-UX.mk,v 1.10 2016/03/22 20:45:14 sjg Exp $ +# $Id: HP-UX.mk,v 1.11 2017/05/05 18:02:16 sjg Exp $ # $NetBSD: sys.mk,v 1.19.2.1 1994/07/26 19:58:31 cgd Exp $ # @(#)sys.mk 5.11 (Berkeley) 3/13/91 @@ -101,8 +101,6 @@ LDFLAGS= LINT= lint LINTFLAGS= -chapbx -MAKE= bmake - PC= pc PFLAGS= COMPILE.p= ${PC} ${PFLAGS} ${CPPFLAGS} -c Modified: head/contrib/bmake/mk/sys/IRIX.mk ============================================================================== --- head/contrib/bmake/mk/sys/IRIX.mk Wed May 10 22:40:27 2017 (r318162) +++ head/contrib/bmake/mk/sys/IRIX.mk Wed May 10 22:45:05 2017 (r318163) @@ -70,8 +70,6 @@ LINTFLAGS?= -chapbxzF LORDER?= lorder -MAKE?= make - NM?= nm PC?= pc Modified: head/contrib/bmake/mk/sys/Linux.mk ============================================================================== --- head/contrib/bmake/mk/sys/Linux.mk Wed May 10 22:40:27 2017 (r318162) +++ head/contrib/bmake/mk/sys/Linux.mk Wed May 10 22:45:05 2017 (r318163) @@ -1,4 +1,4 @@ -# $Id: Linux.mk,v 1.8 2016/03/22 20:45:14 sjg Exp $ +# $Id: Linux.mk,v 1.9 2017/05/05 18:02:16 sjg Exp $ # $NetBSD: sys.mk,v 1.19.2.1 1994/07/26 19:58:31 cgd Exp $ # @(#)sys.mk 5.11 (Berkeley) 3/13/91 @@ -70,8 +70,6 @@ LDFLAGS= LINT= lint LINTFLAGS= -chapbx -MAKE= bmake - PC= pc PFLAGS= COMPILE.p= ${PC} ${PFLAGS} ${CPPFLAGS} -c Modified: head/contrib/bmake/mk/sys/NetBSD.mk ============================================================================== --- head/contrib/bmake/mk/sys/NetBSD.mk Wed May 10 22:40:27 2017 (r318162) +++ head/contrib/bmake/mk/sys/NetBSD.mk Wed May 10 22:45:05 2017 (r318163) @@ -105,8 +105,6 @@ LINTFLAGS?= -chapbxzF LORDER?= lorder -MAKE?= make - NM?= nm PC?= pc Modified: head/contrib/bmake/mk/sys/OSF1.mk ============================================================================== --- head/contrib/bmake/mk/sys/OSF1.mk Wed May 10 22:40:27 2017 (r318162) +++ head/contrib/bmake/mk/sys/OSF1.mk Wed May 10 22:45:05 2017 (r318163) @@ -1,4 +1,4 @@ -# $Id: OSF1.mk,v 1.7 2016/03/22 20:45:15 sjg Exp $ +# $Id: OSF1.mk,v 1.8 2017/05/05 18:02:16 sjg Exp $ # $NetBSD: sys.mk,v 1.19.2.1 1994/07/26 19:58:31 cgd Exp $ # @(#)sys.mk 5.11 (Berkeley) 3/13/91 @@ -77,8 +77,6 @@ LDFLAGS= LINT= lint LINTFLAGS= -chapbx -MAKE= bmake - PC= pc PFLAGS= COMPILE.p= ${PC} ${PFLAGS} ${CPPFLAGS} -c Modified: head/contrib/bmake/mk/sys/OpenBSD.mk ============================================================================== --- head/contrib/bmake/mk/sys/OpenBSD.mk Wed May 10 22:40:27 2017 (r318162) +++ head/contrib/bmake/mk/sys/OpenBSD.mk Wed May 10 22:45:05 2017 (r318163) @@ -80,8 +80,6 @@ LINTFLAGS?= -chapbxzF LORDER?= lorder -MAKE?= make - NM?= nm PC?= pc Modified: head/contrib/bmake/mk/sys/SunOS.mk ============================================================================== --- head/contrib/bmake/mk/sys/SunOS.mk Wed May 10 22:40:27 2017 (r318162) +++ head/contrib/bmake/mk/sys/SunOS.mk Wed May 10 22:45:05 2017 (r318163) @@ -1,4 +1,4 @@ -# $Id: SunOS.mk,v 1.7 2016/03/22 20:45:15 sjg Exp $ +# $Id: SunOS.mk,v 1.8 2017/05/05 18:02:17 sjg Exp $ .if ${.PARSEFILE} == "sys.mk" .include @@ -98,8 +98,6 @@ LDFLAGS= LINT= lint LINTFLAGS= -chapbx -MAKE= bmake - PC= pc PFLAGS= COMPILE.p= ${PC} ${PFLAGS} ${CPPFLAGS} -c Modified: head/contrib/bmake/mk/sys/UnixWare.mk ============================================================================== --- head/contrib/bmake/mk/sys/UnixWare.mk Wed May 10 22:40:27 2017 (r318162) +++ head/contrib/bmake/mk/sys/UnixWare.mk Wed May 10 22:45:05 2017 (r318163) @@ -1,4 +1,4 @@ -# $Id: UnixWare.mk,v 1.2 2016/03/22 20:45:15 sjg Exp $ +# $Id: UnixWare.mk,v 1.3 2017/05/05 18:02:17 sjg Exp $ # based on "Id: SunOS.5.sys.mk,v 1.6 2003/09/30 16:42:23 sjg Exp " # $NetBSD: sys.mk,v 1.19.2.1 1994/07/26 19:58:31 cgd Exp $ # @(#)sys.mk 5.11 (Berkeley) 3/13/91 @@ -114,8 +114,6 @@ LINTFLAGS?= -pF LORDER?= lorder -MAKE?= bmake - NM?= nm PC?= pc # XXX: UDK probably does not have pc Modified: head/contrib/bmake/parse.c ============================================================================== --- head/contrib/bmake/parse.c Wed May 10 22:40:27 2017 (r318162) +++ head/contrib/bmake/parse.c Wed May 10 22:45:05 2017 (r318163) @@ -130,7 +130,6 @@ __RCSID("$NetBSD: parse.c,v 1.225 2017/0 #include #include #include -#include #include "make.h" #include "hash.h" @@ -139,6 +138,10 @@ __RCSID("$NetBSD: parse.c,v 1.225 2017/0 #include "buf.h" #include "pathnames.h" +#ifdef HAVE_STDINT_H +#include +#endif + #ifdef HAVE_MMAP #include Modified: head/contrib/bmake/str.c ============================================================================== --- head/contrib/bmake/str.c Wed May 10 22:40:27 2017 (r318162) +++ head/contrib/bmake/str.c Wed May 10 22:45:05 2017 (r318163) @@ -1,4 +1,4 @@ -/* $NetBSD: str.c,v 1.37 2017/04/11 17:30:13 sjg Exp $ */ +/* $NetBSD: str.c,v 1.38 2017/04/21 22:15:44 sjg Exp $ */ /*- * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,14 +69,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: str.c,v 1.37 2017/04/11 17:30:13 sjg Exp $"; +static char rcsid[] = "$NetBSD: str.c,v 1.38 2017/04/21 22:15:44 sjg Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)str.c 5.8 (Berkeley) 6/1/90"; #else -__RCSID("$NetBSD: str.c,v 1.37 2017/04/11 17:30:13 sjg Exp $"); +__RCSID("$NetBSD: str.c,v 1.38 2017/04/21 22:15:44 sjg Exp $"); #endif #endif /* not lint */ #endif Modified: head/usr.bin/bmake/Makefile ============================================================================== --- head/usr.bin/bmake/Makefile Wed May 10 22:40:27 2017 (r318162) +++ head/usr.bin/bmake/Makefile Wed May 10 22:45:05 2017 (r318163) @@ -14,10 +14,10 @@ CFLAGS+= -I${.CURDIR} *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Wed May 10 23:09:21 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@freebsd.org Wed May 10 23:09:25 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@freebsd.org Wed May 10 23:14:11 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@freebsd.org Wed May 10 23:14:11 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@freebsd.org Wed May 10 23:32:32 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 70ABFD67D1B; Wed, 10 May 2017 23:32:32 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 40DFC1764; Wed, 10 May 2017 23:32:32 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4ANWVxt007217; Wed, 10 May 2017 23:32:31 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4ANWVGW007216; Wed, 10 May 2017 23:32:31 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201705102332.v4ANWVGW007216@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Wed, 10 May 2017 23:32:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318166 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 23:32:32 -0000 Author: glebius Date: Wed May 10 23:32:31 2017 New Revision: 318166 URL: https://svnweb.freebsd.org/changeset/base/318166 Log: There is no good reason for TCP reassembly zone to be UMA_ZONE_NOFREE. It has strong locking model, doesn't have any timers associated with entries. The entries theirselves are referenced only from the tcpcb zone, which itself is a normal zone, without the UMA_ZONE_NOFREE flag. Modified: head/sys/netinet/tcp_reass.c Modified: head/sys/netinet/tcp_reass.c ============================================================================== --- head/sys/netinet/tcp_reass.c Wed May 10 23:14:09 2017 (r318165) +++ head/sys/netinet/tcp_reass.c Wed May 10 23:32:31 2017 (r318166) @@ -108,7 +108,7 @@ tcp_reass_global_init(void) TUNABLE_INT_FETCH("net.inet.tcp.reass.maxsegments", &tcp_reass_maxseg); tcp_reass_zone = uma_zcreate("tcpreass", sizeof (struct tseg_qent), - NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE); + NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); /* Set the zone limit and read back the effective value. */ tcp_reass_maxseg = uma_zone_set_max(tcp_reass_zone, tcp_reass_maxseg); From owner-svn-src-all@freebsd.org Thu May 11 00:23:53 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4B376D67AF1; Thu, 11 May 2017 00:23:53 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0CA3DEDD; Thu, 11 May 2017 00:23:52 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4B0NqTs027775; Thu, 11 May 2017 00:23:52 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4B0Npct027773; Thu, 11 May 2017 00:23:51 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201705110023.v4B0Npct027773@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Thu, 11 May 2017 00:23:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318167 - in head/sys: cddl/dev/dtrace/powerpc powerpc/booke X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 May 2017 00:23:53 -0000 Author: jhibbits Date: Thu May 11 00:23:51 2017 New Revision: 318167 URL: https://svnweb.freebsd.org/changeset/base/318167 Log: Fix stack tracing in dtrace for powerpc The current method only sort of works, and usually doesn't work reliably. Also, on Book-E the return address from DEBUG exceptions is not the sentinel addresses, so it won't exit the loop correctly. Fix this by better handling trap frames during unwinding, and using the common trap handler for debug traps, as the code in that segment is identical between the two. MFC after: 1 week Modified: head/sys/cddl/dev/dtrace/powerpc/dtrace_isa.c head/sys/powerpc/booke/trap_subr.S Modified: head/sys/cddl/dev/dtrace/powerpc/dtrace_isa.c ============================================================================== --- head/sys/cddl/dev/dtrace/powerpc/dtrace_isa.c Wed May 10 23:32:31 2017 (r318166) +++ head/sys/cddl/dev/dtrace/powerpc/dtrace_isa.c Thu May 11 00:23:51 2017 (r318167) @@ -38,6 +38,7 @@ #include #include +#include #include #include @@ -54,16 +55,19 @@ #ifdef __powerpc64__ #define OFFSET 4 /* Account for the TOC reload slot */ +#define FRAME_OFFSET 48 #else #define OFFSET 0 +#define FRAME_OFFSET 8 #endif #define INKERNEL(x) ((x) <= VM_MAX_KERNEL_ADDRESS && \ (x) >= VM_MIN_KERNEL_ADDRESS) static __inline int -dtrace_sp_inkernel(uintptr_t sp, int aframes) +dtrace_sp_inkernel(uintptr_t sp) { + struct trapframe *frame; vm_offset_t callpc; #ifdef __powerpc64__ @@ -77,14 +81,15 @@ dtrace_sp_inkernel(uintptr_t sp, int afr /* * trapexit() and asttrapexit() are sentinels * for kernel stack tracing. - * - * Special-case this for 'aframes == 0', because fbt sets aframes to the - * trap callchain depth, so we want to break out of it. */ - if ((callpc + OFFSET == (vm_offset_t) &trapexit || - callpc + OFFSET == (vm_offset_t) &asttrapexit) && - aframes != 0) - return (0); + if (callpc + OFFSET == (vm_offset_t) &trapexit || + callpc + OFFSET == (vm_offset_t) &asttrapexit) { + if (sp == 0) + return (0); + frame = (struct trapframe *)(sp + FRAME_OFFSET); + + return ((frame->srr1 & PSL_PR) == 0); + } return (1); } @@ -93,6 +98,7 @@ static __inline uintptr_t dtrace_next_sp(uintptr_t sp) { vm_offset_t callpc; + struct trapframe *frame; #ifdef __powerpc64__ callpc = *(vm_offset_t *)(sp + RETURN_OFFSET64); @@ -103,18 +109,13 @@ dtrace_next_sp(uintptr_t sp) /* * trapexit() and asttrapexit() are sentinels * for kernel stack tracing. - * - * Special-case this for 'aframes == 0', because fbt sets aframes to the - * trap callchain depth, so we want to break out of it. */ if ((callpc + OFFSET == (vm_offset_t) &trapexit || - callpc + OFFSET == (vm_offset_t) &asttrapexit)) - /* Access the trap frame */ -#ifdef __powerpc64__ - return (*(uintptr_t *)sp + 48 + sizeof(register_t)); -#else - return (*(uintptr_t *)sp + 8 + sizeof(register_t)); -#endif + callpc + OFFSET == (vm_offset_t) &asttrapexit)) { + /* Access the trap frame */ + frame = (struct trapframe *)(sp + FRAME_OFFSET); + return (*(uintptr_t *)(frame->fixreg[1])); + } return (*(uintptr_t*)sp); } @@ -122,6 +123,7 @@ dtrace_next_sp(uintptr_t sp) static __inline uintptr_t dtrace_get_pc(uintptr_t sp) { + struct trapframe *frame; vm_offset_t callpc; #ifdef __powerpc64__ @@ -133,18 +135,13 @@ dtrace_get_pc(uintptr_t sp) /* * trapexit() and asttrapexit() are sentinels * for kernel stack tracing. - * - * Special-case this for 'aframes == 0', because fbt sets aframes to the - * trap callchain depth, so we want to break out of it. */ if ((callpc + OFFSET == (vm_offset_t) &trapexit || - callpc + OFFSET == (vm_offset_t) &asttrapexit)) - /* Access the trap frame */ -#ifdef __powerpc64__ - return (*(uintptr_t *)sp + 48 + offsetof(struct trapframe, lr)); -#else - return (*(uintptr_t *)sp + 8 + offsetof(struct trapframe, lr)); -#endif + callpc + OFFSET == (vm_offset_t) &asttrapexit)) { + /* Access the trap frame */ + frame = (struct trapframe *)(sp + FRAME_OFFSET); + return (frame->srr0); + } return (callpc); } @@ -176,7 +173,7 @@ dtrace_getpcstack(pc_t *pcstack, int pcs if (sp <= osp) break; - if (!dtrace_sp_inkernel(sp, aframes)) + if (!dtrace_sp_inkernel(sp)) break; callpc = dtrace_get_pc(sp); @@ -537,7 +534,7 @@ dtrace_getstackdepth(int aframes) if (sp <= osp) break; - if (!dtrace_sp_inkernel(sp, aframes)) + if (!dtrace_sp_inkernel(sp)) break; if (aframes == 0) Modified: head/sys/powerpc/booke/trap_subr.S ============================================================================== --- head/sys/powerpc/booke/trap_subr.S Wed May 10 23:32:31 2017 (r318166) +++ head/sys/powerpc/booke/trap_subr.S Thu May 11 00:23:51 2017 (r318167) @@ -981,12 +981,12 @@ int_debug_int: LOAD %r4,0(%r5) /* interrupt_vector_base in r4 */ add %r4,%r4,%r5 CMPL cr0, %r3, %r4 - blt 1f + blt trap_common LOAD %r4,4(%r5) /* interrupt_vector_top in r4 */ add %r4,%r4,%r5 addi %r4,%r4,4 CMPL cr0, %r3, %r4 - bge 1f + bge trap_common /* Disable single-stepping for the interrupt handlers. */ LOAD %r3, FRAME_SRR1+CALLSIZE(%r1); rlwinm %r3, %r3, 0, 23, 21 @@ -999,16 +999,6 @@ int_debug_int: mtspr SPR_SRR1, %r4 mtlr %r14 blr -1: - GET_TOCBASE(%r2) - addi %r3, %r1, CALLSIZE - bl CNAME(trap) - TOC_RESTORE - /* - * Handle ASTs, needed for proper support of single-stepping. - * We actually need to return to the process with an rfi. - */ - b trapexit /***************************************************************************** * Common trap code From owner-svn-src-all@freebsd.org Thu May 11 00:27:28 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-all@freebsd.org Thu May 11 03:37:07 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-all@freebsd.org Thu May 11 03:37:07 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-all@freebsd.org Thu May 11 03:41:56 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-all@freebsd.org Thu May 11 03:47:59 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7A608D68D24; Thu, 11 May 2017 03:47:59 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4C45616F0; Thu, 11 May 2017 03:47:59 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4B3lwcM009424; Thu, 11 May 2017 03:47:58 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4B3lwj4009423; Thu, 11 May 2017 03:47:58 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201705110347.v4B3lwj4009423@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Thu, 11 May 2017 03:47:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318171 - head/sys/dev/dpaa X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 May 2017 03:47:59 -0000 Author: jhibbits Date: Thu May 11 03:47:58 2017 New Revision: 318171 URL: https://svnweb.freebsd.org/changeset/base/318171 Log: Fix uma_zcreate() align argument, now that the constraint is asserted. The alignment argument is the mask of low bits to mask off when allocating items in a zone, not the block-size alignment. Modified: head/sys/dev/dpaa/if_dtsec_rm.c Modified: head/sys/dev/dpaa/if_dtsec_rm.c ============================================================================== --- head/sys/dev/dpaa/if_dtsec_rm.c Thu May 11 03:41:55 2017 (r318170) +++ head/sys/dev/dpaa/if_dtsec_rm.c Thu May 11 03:47:58 2017 (r318171) @@ -115,7 +115,7 @@ dtsec_rm_fi_pool_init(struct dtsec_softc sc->sc_fi_zone = uma_zcreate(sc->sc_fi_zname, sizeof(struct dtsec_rm_frame_info), NULL, NULL, NULL, NULL, - sizeof(void *), 0); + sizeof(void *) - 1, 0); if (sc->sc_fi_zone == NULL) return (EIO); @@ -312,7 +312,7 @@ dtsec_rm_pool_rx_init(struct dtsec_softc device_get_nameunit(sc->sc_dev)); sc->sc_rx_zone = uma_zcreate(sc->sc_rx_zname, FM_PORT_BUFFER_SIZE, NULL, - NULL, NULL, NULL, FM_PORT_BUFFER_SIZE, 0); + NULL, NULL, NULL, FM_PORT_BUFFER_SIZE - 1, 0); if (sc->sc_rx_zone == NULL) return (EIO); From owner-svn-src-all@freebsd.org Thu May 11 04:29:22 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-all@freebsd.org Thu May 11 04:29:22 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-all@freebsd.org Thu May 11 04:39:12 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AC679D68563; Thu, 11 May 2017 04:39:12 +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 7E73E1390; Thu, 11 May 2017 04:39:12 +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 v4B4dBVa029885; Thu, 11 May 2017 04:39:11 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4B4dBsH029884; Thu, 11 May 2017 04:39:11 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201705110439.v4B4dBsH029884@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Thu, 11 May 2017 04:39:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318173 - head/contrib/ipfilter/lib X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 May 2017 04:39:12 -0000 Author: cy Date: Thu May 11 04:39:11 2017 New Revision: 318173 URL: https://svnweb.freebsd.org/changeset/base/318173 Log: Implement outputting of IPv6 addresses in the ippool debug list of tree type pools (ippool -l -d -t tree). Currently IPv6 in ippool tree type pool handling is partially implemented (meaning it doesn't work). This is the first of a series of commits to remediate ippool. This will be MFCed with a yet to be committed series of fixes to ippool after it has been fully remediated. PR: 218433 Modified: head/contrib/ipfilter/lib/printpoolnode.c Modified: head/contrib/ipfilter/lib/printpoolnode.c ============================================================================== --- head/contrib/ipfilter/lib/printpoolnode.c Thu May 11 04:29:20 2017 (r318172) +++ head/contrib/ipfilter/lib/printpoolnode.c Thu May 11 04:39:11 2017 (r318173) @@ -33,8 +33,30 @@ printpoolnode(np, opts, fields) printmask(np->ipn_addr.adf_family, (u_32_t *)&np->ipn_mask.adf_addr); } else { - PRINTF("\tAddress: %s%s", np->ipn_info ? "! " : "", - inet_ntoa(np->ipn_addr.adf_addr.in4)); +#ifdef AF_INET6 + if (np->ipn_addr.adf_family == AF_INET6) { + char buf[INET6_ADDRSTRLEN + 1]; + const char *str; + + buf[0] = '\0'; + str = inet_ntop(AF_INET6, &np->ipn_addr.adf_addr.in6, + buf, sizeof(buf) - 1); + if (str == NULL) + str = "???"; + PRINTF("\tAddress: %s%s", np->ipn_info ? "! " : "", + str); + } else if (np->ipn_addr.adf_family == AF_INET) { +#else + if (np->ipn_addr.adf_family == AF_INET) { +#endif + PRINTF("\tAddress: %s%s", np->ipn_info ? "! " : "", + inet_ntoa(np->ipn_addr.adf_addr.in4)); + } else { + PRINTF("\tAddress: family: %d", + np->ipn_addr.adf_family); +#ifdef AF_INET6 + } +#endif printmask(np->ipn_addr.adf_family, (u_32_t *)&np->ipn_mask.adf_addr); #ifdef USE_QUAD_T From owner-svn-src-all@freebsd.org Thu May 11 05:36:07 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8FFA9D689CD; Thu, 11 May 2017 05:36:07 +0000 (UTC) (envelope-from srs0=hy3x=4r=sigsegv.be=kristof@codepro.be) Received: from venus.codepro.be (venus.codepro.be [IPv6:2a01:4f8:162:1127::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.codepro.be", Issuer "Gandi Standard SSL CA 2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5A6E61244; Thu, 11 May 2017 05:36:03 +0000 (UTC) (envelope-from srs0=hy3x=4r=sigsegv.be=kristof@codepro.be) Received: from [172.16.16.31] (unknown [119.161.97.34]) (Authenticated sender: kp) by venus.codepro.be (Postfix) with ESMTPSA id A1C05994A; Thu, 11 May 2017 07:35:59 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sigsegv.be; s=mail; t=1494480960; bh=H5R7jQlNXsH6G3KB8PmwNxb0/cePE6nWgW/Bgrmz3M0=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Ygd08d4QtqzhQvopsprePNyo4vzOLsUXfn0etMWzOsy+PS9GSmu1cJoBKy4I6gvHo qLbMJytc5PDw6iBVBhtSpe50wAtRTnXu3dL2ktTie+f3EVeX74fYCIPIwUC4diE0Kp 6YpnQomlVnR/Yz2pwutSzfNHJ6c/Sf+4YzTSL1n0= From: "Kristof Provost" To: "Ravi Pokala" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r318160 - in head: sbin/ifconfig sys/net sys/sys Date: Thu, 11 May 2017 11:05:57 +0530 Message-ID: <3F09C117-5017-481D-AAB2-7C64FF23B395@sigsegv.be> In-Reply-To: <201705102213.v4AMDlE2074710@repo.freebsd.org> References: <201705102213.v4AMDlE2074710@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; format=flowed X-Mailer: MailMate (2.0BETAr6082) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 May 2017 05:36:07 -0000 On 11 May 2017, at 3:43, Ravi Pokala wrote: > Author: rpokala > Date: Wed May 10 22:13:47 2017 > New Revision: 318160 > URL: https://svnweb.freebsd.org/changeset/base/318160 > > Log: > Persistently store NIC's hardware MAC address, and add a way to > retrive it > > Modified: head/sys/net/if_ethersubr.c > ============================================================================== > --- head/sys/net/if_ethersubr.c Wed May 10 21:42:16 2017 (r318159) > +++ head/sys/net/if_ethersubr.c Wed May 10 22:13:47 2017 (r318160) > @@ -916,6 +916,8 @@ ether_ifattach(struct ifnet *ifp, const > sdl->sdl_alen = ifp->if_addrlen; > bcopy(lla, LLADDR(sdl), ifp->if_addrlen); > > + bcopy(lla, ifp->if_hw_addr, ifp->if_addrlen); > + > bpfattach(ifp, DLT_EN10MB, ETHER_HDR_LEN); > if (ng_ether_attach_p != NULL) > (*ng_ether_attach_p)(ifp); > This seems to cause panics when I create a bridge interface: #10 0xffffffff80ef9304 in bcopy () at /usr/src/sys/amd64/amd64/support.S:139 #11 0xffffffff80b57a80 in ether_ifattach (ifp=0xfffff80035663000, lla=0xfffff800090e13f8 "\002k") at /usr/src/sys/net/if_ethersubr.c:919 #12 0xffffffff8325dc67 in bridge_clone_create (ifc=, unit=, params=) at /usr/src/sys/net/if_bridge.c:704 #13 0xffffffff80b54f54 in if_clone_createif (ifc=0xfffff80035081500, name=0xfffffe03e7936780 "bridge0", len=, params=0x0) at /usr/src/sys/net/if_clone.c:685 #14 0xffffffff80b50833 in ifioctl (so=, cmd=3223349628, data=, td=) at /usr/src/sys/net/if.c:2794 #15 0xffffffff80abc00d in kern_ioctl (td=, fd=, com=, data=) at file.h:323 #16 0xffffffff80abbccf in sys_ioctl (td=, uap=0xfffffe03e7936930) at /usr/src/sys/kern/sys_generic.c:745 #17 0xffffffff80efc059 in amd64_syscall (td=0xfffff80009114000, traced=0) at subr_syscall.c:136 #18 0xffffffff80edd09b in Xfast_syscall () at /usr/src/sys/amd64/amd64/exception.S:396 ifp->if_hw_addr is NULL here: (kgdb) fr 11 #11 0xffffffff80b57a80 in ether_ifattach (ifp=0xfffff80035663000, lla=0xfffff800090e13f8 "\002k") at /usr/src/sys/net/if_ethersubr.c:919 919 bcopy(lla, ifp->if_hw_addr, ifp->if_addrlen); (kgdb) p ifp->if_hw_addr $1 = (void *) 0x0 Regards, Kristof From owner-svn-src-all@freebsd.org Thu May 11 05:38:56 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E99F8D68C00; Thu, 11 May 2017 05:38:56 +0000 (UTC) (envelope-from srs0=hy3x=4r=sigsegv.be=kristof@codepro.be) Received: from venus.codepro.be (venus.codepro.be [IPv6:2a01:4f8:162:1127::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.codepro.be", Issuer "Gandi Standard SSL CA 2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8590B1668; Thu, 11 May 2017 05:38:56 +0000 (UTC) (envelope-from srs0=hy3x=4r=sigsegv.be=kristof@codepro.be) Received: from [172.16.16.31] (unknown [119.161.97.34]) (Authenticated sender: kp) by venus.codepro.be (Postfix) with ESMTPSA id D59779973; Thu, 11 May 2017 07:38:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sigsegv.be; s=mail; t=1494481134; bh=mMpGty9sQQtczmS2iTKpv73OIU6u8MMG2NrYvNv6yms=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=2V6pU8ityBCHl3WetMVGUhtuvQPUIcrWjhyqnee2MY8n38twiSzStn5FSmXiIn44Q EG/PXvYEoNXLsIsWDedZqDHyRj+6ZU8K+tYFage4qMzMyMrPjAMoJ1NMqB7M4YMP4c Tq8ZxKzpYeE3XYvMD3FahWIPXTkj/3XBs8x0syZg= From: "Kristof Provost" To: "Ravi Pokala" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r318160 - in head: sbin/ifconfig sys/net sys/sys Date: Thu, 11 May 2017 11:08:51 +0530 Message-ID: In-Reply-To: <3F09C117-5017-481D-AAB2-7C64FF23B395@sigsegv.be> References: <201705102213.v4AMDlE2074710@repo.freebsd.org> <3F09C117-5017-481D-AAB2-7C64FF23B395@sigsegv.be> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Mailer: MailMate (2.0BETAr6082) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 May 2017 05:38:57 -0000 On 11 May 2017, at 11:05, Kristof Provost wrote: > On 11 May 2017, at 3:43, Ravi Pokala wrote: >> Author: rpokala >> Date: Wed May 10 22:13:47 2017 >> New Revision: 318160 >> URL: https://svnweb.freebsd.org/changeset/base/318160 >> >> Log: >> Persistently store NIC's hardware MAC address, and add a way to = >> retrive it >> > >> Modified: head/sys/net/if_ethersubr.c >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/sys/net/if_ethersubr.c Wed May 10 21:42:16 2017 (r318159) >> +++ head/sys/net/if_ethersubr.c Wed May 10 22:13:47 2017 (r318160) >> @@ -916,6 +916,8 @@ ether_ifattach(struct ifnet *ifp, const >> sdl->sdl_alen =3D ifp->if_addrlen; >> bcopy(lla, LLADDR(sdl), ifp->if_addrlen); >> >> + bcopy(lla, ifp->if_hw_addr, ifp->if_addrlen); >> + >> bpfattach(ifp, DLT_EN10MB, ETHER_HDR_LEN); >> if (ng_ether_attach_p !=3D NULL) >> (*ng_ether_attach_p)(ifp); >> > > This seems to cause panics when I create a bridge interface: > > #10 0xffffffff80ef9304 in bcopy () at = > /usr/src/sys/amd64/amd64/support.S:139 > #11 0xffffffff80b57a80 in ether_ifattach (ifp=3D0xfffff80035663000, = > lla=3D0xfffff800090e13f8 "\002k") at /usr/src/sys/net/if_ethersubr.c:91= 9 > #12 0xffffffff8325dc67 in bridge_clone_create (ifc=3D out>, unit=3D, params=3D) at = > /usr/src/sys/net/if_bridge.c:704 > #13 0xffffffff80b54f54 in if_clone_createif (ifc=3D0xfffff80035081500, = > name=3D0xfffffe03e7936780 "bridge0", len=3D, = > params=3D0x0) at /usr/src/sys/net/if_clone.c:685 > #14 0xffffffff80b50833 in ifioctl (so=3D, = > cmd=3D3223349628, data=3D, td=3D) = > at /usr/src/sys/net/if.c:2794 > #15 0xffffffff80abc00d in kern_ioctl (td=3D, = > fd=3D, com=3D, data=3D optimized out>) at file.h:323 > #16 0xffffffff80abbccf in sys_ioctl (td=3D, = > uap=3D0xfffffe03e7936930) at /usr/src/sys/kern/sys_generic.c:745 > #17 0xffffffff80efc059 in amd64_syscall (td=3D0xfffff80009114000, = > traced=3D0) at subr_syscall.c:136 > #18 0xffffffff80edd09b in Xfast_syscall () at = > /usr/src/sys/amd64/amd64/exception.S:396 > > ifp->if_hw_addr is NULL here: > (kgdb) fr 11 > #11 0xffffffff80b57a80 in ether_ifattach (ifp=3D0xfffff80035663000, = > lla=3D0xfffff800090e13f8 "\002k") at /usr/src/sys/net/if_ethersubr.c:91= 9 > 919 bcopy(lla, ifp->if_hw_addr, ifp->if_addrlen); > (kgdb) p ifp->if_hw_addr > $1 =3D (void *) 0x0 > This may be because I=E2=80=99ve not yet updated world, just the kernel, = but = clearly that still shouldn=E2=80=99t cause panics. Regards, Kristof From owner-svn-src-all@freebsd.org Thu May 11 05:47:32 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6FB26D68FBF; Thu, 11 May 2017 05:47:32 +0000 (UTC) (envelope-from rpokala@mac.com) Received: from mr11p00im-asmtp002.me.com (mr11p00im-asmtp002.me.com [17.110.69.253]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 549F51B9F; Thu, 11 May 2017 05:47:32 +0000 (UTC) (envelope-from rpokala@mac.com) Received: from process-dkim-sign-daemon.mr11p00im-asmtp002.me.com by mr11p00im-asmtp002.me.com (Oracle Communications Messaging Server 7.0.5.38.0 64bit (built Feb 26 2016)) id <0OPR00K00WNS3Y00@mr11p00im-asmtp002.me.com>; Thu, 11 May 2017 05:47:17 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mac.com; s=4d515a; t=1494481637; bh=BUg8AolDgRXnN62Ol1z1LyR+izu6sThdSFDhgnkE9Ds=; h=Date:Subject:From:To:Message-id:MIME-version:Content-type; b=r2gxOHT51dwFUJRq85lszDw4pl4Ghj4aOYYOLPXPvWv7jUvofNvpzLdbf3d4iewk+ L9tSXMn0YN86qMwBy98r5YBM5EQ6I1TgYmOtKRLCZoZvySFiu1hsM1mpEw413mX+6q lCZLwOscxxoWjJxYhumtFen1ABefFnz5f+wntjlOcxTHYLpK0bfGKykJSlQs/R1sYm X++JLxW8UUYOrohTjVMd2v0H2FdASxzwCi9g4BgfiOFR6brrxeQIgYpi1EAP14xbHI QA8AUkQzyLVlWT5Ae19/nh97WDyiBC6O/RzZUQp4tPexor2OOsLaoopjfEgoEcnZQn fbtgLJ7aMCVcQ== Received: from icloud.com ([127.0.0.1]) by mr11p00im-asmtp002.me.com (Oracle Communications Messaging Server 7.0.5.38.0 64bit (built Feb 26 2016)) with ESMTPSA id <0OPR00LMQXERAG30@mr11p00im-asmtp002.me.com>; Thu, 11 May 2017 05:47:16 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-05-11_04:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 clxscore=1034 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1701120000 definitions=main-1705110036 User-Agent: Microsoft-MacOutlook/f.21.0.170409 Date: Wed, 10 May 2017 22:47:14 -0700 Subject: Re: svn commit: r318160 - in head: sbin/ifconfig sys/net sys/sys From: Ravi Pokala To: Kristof Provost Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-id: Thread-topic: svn commit: r318160 - in head: sbin/ifconfig sys/net sys/sys References: <201705102213.v4AMDlE2074710@repo.freebsd.org> <3F09C117-5017-481D-AAB2-7C64FF23B395@sigsegv.be> In-reply-to: MIME-version: 1.0 Content-type: text/plain; charset=UTF-8 Content-transfer-encoding: quoted-printable X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 May 2017 05:47:32 -0000 -----Original Message----- > From: on behalf of Kristof Provost > Date: 2017-05-10, Wednesday at 22:38 > To: Ravi Pokala > Cc: , , > Subject: Re: svn commit: r318160 - in head: sbin/ifconfig sys/net sys/sys >=20 > On 11 May 2017, at 11:05, Kristof Provost wrote: >> On 11 May 2017, at 3:43, Ravi Pokala wrote: >>> Author: rpokala >>> Date: Wed May 10 22:13:47 2017 >>> New Revision: 318160 >>> URL: https://svnweb.freebsd.org/changeset/base/318160 >>> >>> Log: >>> Persistently store NIC's hardware MAC address, and add a way to=20 >>> retrive it >>> >> >> This seems to cause panics when I create a bridge interface: >> >> #10 0xffffffff80ef9304 in bcopy () at=20 >> /usr/src/sys/amd64/amd64/support.S:139 >> #11 0xffffffff80b57a80 in ether_ifattach (ifp=3D0xfffff80035663000,=20 >> lla=3D0xfffff800090e13f8 "\002k") at /usr/src/sys/net/if_ethersubr.c:919 >> #12 0xffffffff8325dc67 in bridge_clone_create (ifc=3D> out>, unit=3D, params=3D) at=20 >> /usr/src/sys/net/if_bridge.c:704 >> ... >> >> ifp->if_hw_addr is NULL here: >> (kgdb) fr 11 >> #11 0xffffffff80b57a80 in ether_ifattach (ifp=3D0xfffff80035663000,=20 >> lla=3D0xfffff800090e13f8 "\002k") at /usr/src/sys/net/if_ethersubr.c:919 >> 919 bcopy(lla, ifp->if_hw_addr, ifp->if_addrlen); >> (kgdb) p ifp->if_hw_addr >> $1 =3D (void *) 0x0 >> >=20 > This may be because I=E2=80=99ve not yet updated world, just the kernel, but=20 > clearly that still shouldn=E2=80=99t cause panics. >=20 > Regards, > Kristof No, this is purely a kernel mistake -- I forgot to add a NULL-check in ethe= r_ifattach(). :-p Fixing now... -Ravi (rpokala@) From owner-svn-src-all@freebsd.org Thu May 11 06:24:59 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 23B51D68BBB; Thu, 11 May 2017 06:24:59 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E9DE91469; Thu, 11 May 2017 06:24:58 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4B6OvAS074433; Thu, 11 May 2017 06:24:57 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4B6OvtA074432; Thu, 11 May 2017 06:24:57 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705110624.v4B6OvtA074432@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 11 May 2017 06:24:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318174 - head/usr.bin/procstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 May 2017 06:24:59 -0000 Author: ngie Date: Thu May 11 06:24:57 2017 New Revision: 318174 URL: https://svnweb.freebsd.org/changeset/base/318174 Log: procstat(1): fix a typo (it's -> its) MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/usr.bin/procstat/procstat.1 Modified: head/usr.bin/procstat/procstat.1 ============================================================================== --- head/usr.bin/procstat/procstat.1 Thu May 11 04:39:11 2017 (r318173) +++ head/usr.bin/procstat/procstat.1 Thu May 11 06:24:57 2017 (r318174) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 5, 2015 +.Dd May 10, 2017 .Dt PROCSTAT 1 .Os .Sh NAME @@ -80,7 +80,7 @@ printed. .It Fl l Display resource limits for the process. .It Fl L -Display LWP info for the process pertaining to it's signal driven exit. +Display LWP info for the process pertaining to its signal driven exit. .It Fl r Display resource usage information for the process. .It Fl s From owner-svn-src-all@freebsd.org Thu May 11 06:35:25 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 01C19D6800F; Thu, 11 May 2017 06:35:25 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C60BB1B03; Thu, 11 May 2017 06:35:24 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4B6ZNWV078414; Thu, 11 May 2017 06:35:23 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4B6ZN8a078413; Thu, 11 May 2017 06:35:23 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705110635.v4B6ZN8a078413@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 11 May 2017 06:35:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318175 - head/usr.bin/procstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 May 2017 06:35:25 -0000 Author: ngie Date: Thu May 11 06:35:23 2017 New Revision: 318175 URL: https://svnweb.freebsd.org/changeset/base/318175 Log: procstat(1): clarify the Signal Disposition section - Fix a typo (SIGIGN -> SIG_IGN). Use .Dv when referencing SIG_IGN. - Use semi-colons as soft breaks when separating sentences for the FLAGS section. - Tweak wording for C slightly to flow better and to be a bit more technically correct (signals with handlers installed will be caught by the target program). - Reference signal(3) in the SEE ALSO section. MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/usr.bin/procstat/procstat.1 Modified: head/usr.bin/procstat/procstat.1 ============================================================================== --- head/usr.bin/procstat/procstat.1 Thu May 11 06:24:57 2017 (r318174) +++ head/usr.bin/procstat/procstat.1 Thu May 11 06:35:23 2017 (r318175) @@ -285,11 +285,13 @@ signal name process signal disposition details, three symbols .Bl -tag -width X -compact .It P -if signal is pending in the global process queue, - otherwise +if signal is pending in the global process queue; - otherwise. .It I -if signal delivery disposition is SIGIGN, - otherwise +if signal delivery disposition is +.Dv SIG_IGN; +- otherwise. .It C -if signal delivery is to catch it, - otherwise +if the signal will be caught; - otherwise. .El .El .Pp @@ -542,6 +544,7 @@ auxiliary vector value .Xr cap_rights_limit 2 , .Xr libprocstat 3 , .Xr libxo 3 , +.Xr signal 3 , .Xr xo_parse_args 3 , .Xr ddb 4 , .Xr stack 9 From owner-svn-src-all@freebsd.org Thu May 11 06:46:40 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CC28FD68319; Thu, 11 May 2017 06:46:40 +0000 (UTC) (envelope-from rpokala@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 913941FC2; Thu, 11 May 2017 06:46:40 +0000 (UTC) (envelope-from rpokala@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4B6kd3M082327; Thu, 11 May 2017 06:46:39 GMT (envelope-from rpokala@FreeBSD.org) Received: (from rpokala@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4B6kdCM082326; Thu, 11 May 2017 06:46:39 GMT (envelope-from rpokala@FreeBSD.org) Message-Id: <201705110646.v4B6kdCM082326@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rpokala set sender to rpokala@FreeBSD.org using -f From: Ravi Pokala Date: Thu, 11 May 2017 06:46:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318176 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 May 2017 06:46:40 -0000 Author: rpokala Date: Thu May 11 06:46:39 2017 New Revision: 318176 URL: https://svnweb.freebsd.org/changeset/base/318176 Log: Persistently store NIC's hardware MAC address, and add a way to retrive it An earlier version of r318160 allocated if_hw_addr unconditionally; when it became conditional, I forgot to check for NULL in ether_ifattach(). Reviewed by: kp MFC after: 1 week MFC with: r318160 Sponsored by: Panasas Differential Revision: https://reviews.freebsd.org/D10678 Pointy-hat to: rpokala Modified: head/sys/net/if_ethersubr.c Modified: head/sys/net/if_ethersubr.c ============================================================================== --- head/sys/net/if_ethersubr.c Thu May 11 06:35:23 2017 (r318175) +++ head/sys/net/if_ethersubr.c Thu May 11 06:46:39 2017 (r318176) @@ -916,7 +916,8 @@ ether_ifattach(struct ifnet *ifp, const sdl->sdl_alen = ifp->if_addrlen; bcopy(lla, LLADDR(sdl), ifp->if_addrlen); - bcopy(lla, ifp->if_hw_addr, ifp->if_addrlen); + if (ifp->if_hw_addr != NULL) + bcopy(lla, ifp->if_hw_addr, ifp->if_addrlen); bpfattach(ifp, DLT_EN10MB, ETHER_HDR_LEN); if (ng_ether_attach_p != NULL) From owner-svn-src-all@freebsd.org Thu May 11 06:55:57 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 412A1D6855B; Thu, 11 May 2017 06:55:57 +0000 (UTC) (envelope-from rpokala@mac.com) Received: from mr11p00im-asmtp004.me.com (mr11p00im-asmtp004.me.com [17.110.69.135]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1FD9B785; Thu, 11 May 2017 06:55:57 +0000 (UTC) (envelope-from rpokala@mac.com) Received: from process-dkim-sign-daemon.mr11p00im-asmtp004.me.com by mr11p00im-asmtp004.me.com (Oracle Communications Messaging Server 7.0.5.38.0 64bit (built Feb 26 2016)) id <0OPS006000FP9000@mr11p00im-asmtp004.me.com>; Thu, 11 May 2017 06:55:56 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mac.com; s=4d515a; t=1494485756; bh=PkoyV3mzfhGhV2F8Ds+HT04ZGHVLIPnOFzaxwCslAiA=; h=Date:Subject:From:To:Message-id:MIME-version:Content-type; b=HaAVMuGYNZrAy53QZUNTuYO9i9hRyrGjW3FH8R3lFjiqcxi+6mpLS58y6q1Don9M9 SSY9kNia5mIWcqw3RT2r8s1j6FhP5UddOoAjqCPezHY7zFYEwGBjufg6QQwBxrZiGs TPMVBGFRLEsW/VRt1PUQRgC20iaaSgT0TqfZEK7ltNZ95AhbLL/tF2fEPRM/20Uzka bdNaEXHRQOXSLdoIasUV65V74tvEbXWTB5BzKEkupqxHlQoHvzOceHUTUSFdVy8IDe qT3bWKwHQ+RqKL0IIQksu+yTZQBTXoqmqw3+tU1NyWrv4C+zQ4OnzAdBsloqgaNGxw ETck0xCec06Bw== Received: from icloud.com ([127.0.0.1]) by mr11p00im-asmtp004.me.com (Oracle Communications Messaging Server 7.0.5.38.0 64bit (built Feb 26 2016)) with ESMTPSA id <0OPS00OA80L5DO20@mr11p00im-asmtp004.me.com>; Thu, 11 May 2017 06:55:54 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-05-11_04:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 clxscore=1034 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1701120000 definitions=main-1705110044 User-Agent: Microsoft-MacOutlook/f.21.0.170409 Date: Wed, 10 May 2017 23:55:52 -0700 Subject: Re: svn commit: r318160 - in head: sbin/ifconfig sys/net sys/sys From: Ravi Pokala To: Kristof Provost Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-id: Thread-topic: svn commit: r318160 - in head: sbin/ifconfig sys/net sys/sys References: <201705102213.v4AMDlE2074710@repo.freebsd.org> <3F09C117-5017-481D-AAB2-7C64FF23B395@sigsegv.be> In-reply-to: MIME-version: 1.0 Content-type: text/plain; charset=UTF-8 Content-transfer-encoding: quoted-printable X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 May 2017 06:55:57 -0000 Fixed in r318176. Sorry for the breakage everyone. :-p -Ravi (rpokala@) -----Original Message----- From: Ravi Pokala Date: 2017-05-10, Wednesday at 22:47 To: Kristof Provost Cc: , , Subject: Re: svn commit: r318160 - in head: sbin/ifconfig sys/net sys/sys -----Original Message----- > From: on behalf of Kristof Provost > Date: 2017-05-10, Wednesday at 22:38 > To: Ravi Pokala > Cc: , , > Subject: Re: svn commit: r318160 - in head: sbin/ifconfig sys/net sys/sys >=20 > On 11 May 2017, at 11:05, Kristof Provost wrote: >> On 11 May 2017, at 3:43, Ravi Pokala wrote: >>> Author: rpokala >>> Date: Wed May 10 22:13:47 2017 >>> New Revision: 318160 >>> URL: https://svnweb.freebsd.org/changeset/base/318160 >>> >>> Log: >>> Persistently store NIC's hardware MAC address, and add a way to=20 >>> retrive it >>> >> >> This seems to cause panics when I create a bridge interface: >> >> #10 0xffffffff80ef9304 in bcopy () at=20 >> /usr/src/sys/amd64/amd64/support.S:139 >> #11 0xffffffff80b57a80 in ether_ifattach (ifp=3D0xfffff80035663000,=20 >> lla=3D0xfffff800090e13f8 "\002k") at /usr/src/sys/net/if_ethersubr.c:919 >> #12 0xffffffff8325dc67 in bridge_clone_create (ifc=3D> out>, unit=3D, params=3D) at=20 >> /usr/src/sys/net/if_bridge.c:704 >> ... >> >> ifp->if_hw_addr is NULL here: >> (kgdb) fr 11 >> #11 0xffffffff80b57a80 in ether_ifattach (ifp=3D0xfffff80035663000,=20 >> lla=3D0xfffff800090e13f8 "\002k") at /usr/src/sys/net/if_ethersubr.c:919 >> 919 bcopy(lla, ifp->if_hw_addr, ifp->if_addrlen); >> (kgdb) p ifp->if_hw_addr >> $1 =3D (void *) 0x0 >> >=20 > This may be because I=E2=80=99ve not yet updated world, just the kernel, but=20 > clearly that still shouldn=E2=80=99t cause panics. >=20 > Regards, > Kristof No, this is purely a kernel mistake -- I forgot to add a NULL-check in ethe= r_ifattach(). :-p Fixing now... -Ravi (rpokala@) From owner-svn-src-all@freebsd.org Thu May 11 06:57:21 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 884E9D68605; Thu, 11 May 2017 06:57:21 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 586EE8F0; Thu, 11 May 2017 06:57:21 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4B6vKOV086556; Thu, 11 May 2017 06:57:20 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4B6vKxW086554; Thu, 11 May 2017 06:57:20 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705110657.v4B6vKxW086554@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 11 May 2017 06:57:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318177 - in head: share/man/man4 tools/build/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 May 2017 06:57:21 -0000 Author: ngie Date: Thu May 11 06:57:20 2017 New Revision: 318177 URL: https://svnweb.freebsd.org/changeset/base/318177 Log: Unconditionally install udp(4) and udplite(4) again I added this to the MK_USB != no block in error in r278202. MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/share/man/man4/Makefile head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Thu May 11 06:46:39 2017 (r318176) +++ head/share/man/man4/Makefile Thu May 11 06:57:20 2017 (r318177) @@ -528,6 +528,8 @@ MAN= aac.4 \ tws.4 \ tx.4 \ txp.4 \ + udp.4 \ + udplite.4 \ ure.4 \ vale.4 \ vga.4 \ @@ -924,8 +926,6 @@ MAN+= \ ucycom.4 \ udav.4 \ udbp.4 \ - udp.4 \ - udplite.4 \ udl.4 \ uep.4 \ ufm.4 \ Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Thu May 11 06:46:39 2017 (r318176) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Thu May 11 06:57:20 2017 (r318177) @@ -9342,8 +9342,6 @@ OLD_FILES+=usr/share/man/man4/ucom.4.gz OLD_FILES+=usr/share/man/man4/ucycom.4.gz OLD_FILES+=usr/share/man/man4/udav.4.gz OLD_FILES+=usr/share/man/man4/udbp.4.gz -OLD_FILES+=usr/share/man/man4/udp.4.gz -OLD_FILES+=usr/share/man/man4/udplite.4.gz OLD_FILES+=usr/share/man/man4/uep.4.gz OLD_FILES+=usr/share/man/man4/ufm.4.gz OLD_FILES+=usr/share/man/man4/ufoma.4.gz From owner-svn-src-all@freebsd.org Thu May 11 07:55:39 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A6244D63879; Thu, 11 May 2017 07:55:39 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5FEE02E2; Thu, 11 May 2017 07:55:39 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4B7tcHK010599; Thu, 11 May 2017 07:55:38 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4B7tc8e010598; Thu, 11 May 2017 07:55:38 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705110755.v4B7tc8e010598@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 11 May 2017 07:55:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318178 - head/usr.bin/procstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 May 2017 07:55:39 -0000 Author: ngie Date: Thu May 11 07:55:38 2017 New Revision: 318178 URL: https://svnweb.freebsd.org/changeset/base/318178 Log: procstat(1): document all possible `PRO` (network protocol) values Reference the appropriate section 4 manpages for networking protocols. MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/usr.bin/procstat/procstat.1 Modified: head/usr.bin/procstat/procstat.1 ============================================================================== --- head/usr.bin/procstat/procstat.1 Thu May 11 06:57:20 2017 (r318177) +++ head/usr.bin/procstat/procstat.1 Thu May 11 07:55:38 2017 (r318178) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 10, 2017 +.Dd May 11, 2017 .Dt PROCSTAT 1 .Os .Sh NAME @@ -271,6 +271,60 @@ omitted, and a new capabilities field wi as described in .Xr cap_rights_limit 2 , present for each capability descriptor. +.Pp +The following network protocols may be displayed (grouped by address family): +.Pp +.Dv AF_INET , +.Dv AF_INET6 +.Pp +.Bl -tag -width indent -compact +.It ICM +.Dv IPPROTO_ICMP ; +see +.Xr icmp 4 . +.It IPD +.Dv IPPROTO_DIVERT ; +see +.Xr divert 4 . +.It IP\? +unknown protocol. +.It RAW +.Dv IPPROTO_RAW ; +see +.Xr ip 4 . +.It SCT +.Dv IPPROTO_SCTP ; +see +.Xr sctp 4 . +.It TCP +.Dv IPPROTO_TCP ; +see +.Xr tcp 4 . +.It UDP +.Dv IPPROTO_UDP ; +see +.Xr udp 4 . +.El +.Pp +.Dv AF_LOCAL +.Pp +.Bl -tag -width indent -compact +.It UDD +.Dv IPPROTO_UDP ; +see +.Xr udp 4 . +.It UDS +.Dv IPPROTO_TCP ; +see +.Xr tcp 4 . +.It UD\? +unknown protocol. +.El +.Pp +.Bl -tag -width indent -compact +.It \? +unknown address family. +.El .Ss Signal Disposition Information Display signal pending and disposition for a process: .Pp @@ -547,6 +601,10 @@ auxiliary vector value .Xr signal 3 , .Xr xo_parse_args 3 , .Xr ddb 4 , +.Xr divert 4 , +.Xr ip 4 , +.Xr tcp 4 , +.Xr udp 4 , .Xr stack 9 .Sh AUTHORS .An Robert N M Watson Aq Mt rwatson@FreeBSD.org . From owner-svn-src-all@freebsd.org Thu May 11 07:58:06 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5E9C6D639A6; Thu, 11 May 2017 07:58:06 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2EBFF6A1; Thu, 11 May 2017 07:58:06 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4B7w5sw010719; Thu, 11 May 2017 07:58:05 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4B7w5K9010718; Thu, 11 May 2017 07:58:05 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705110758.v4B7w5K9010718@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 11 May 2017 07:58:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318179 - head/usr.bin/procstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 May 2017 07:58:06 -0000 Author: ngie Date: Thu May 11 07:58:04 2017 New Revision: 318179 URL: https://svnweb.freebsd.org/changeset/base/318179 Log: procstat(1): also reference icmp(4) and sctp(4) This was missed in the previous commit by accident. MFC after: 3 weeks MFC with: r318178 Sponsored by: Dell EMC Isilon Modified: head/usr.bin/procstat/procstat.1 Modified: head/usr.bin/procstat/procstat.1 ============================================================================== --- head/usr.bin/procstat/procstat.1 Thu May 11 07:55:38 2017 (r318178) +++ head/usr.bin/procstat/procstat.1 Thu May 11 07:58:04 2017 (r318179) @@ -602,7 +602,9 @@ auxiliary vector value .Xr xo_parse_args 3 , .Xr ddb 4 , .Xr divert 4 , +.Xr icmp 4 , .Xr ip 4 , +.Xr sctp 4 , .Xr tcp 4 , .Xr udp 4 , .Xr stack 9 From owner-svn-src-all@freebsd.org Thu May 11 08:06:48 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1A0EAD63EE3; Thu, 11 May 2017 08:06:48 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D52D6C26; Thu, 11 May 2017 08:06:47 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4B86kvo014559; Thu, 11 May 2017 08:06:46 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4B86k7p014558; Thu, 11 May 2017 08:06:46 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705110806.v4B86k7p014558@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 11 May 2017 08:06:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318180 - head/tests/sys/aio X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 May 2017 08:06:48 -0000 Author: ngie Date: Thu May 11 08:06:46 2017 New Revision: 318180 URL: https://svnweb.freebsd.org/changeset/base/318180 Log: Mark all md tests as requiring unsafe AIO in order to function These tests have been flapping (failing<->passing) on Jenkins for months. It passes reliably for me if unsafe AIO is permitted, but it doesn't pass on Jenkins reliably if unsafe AIO is disabled (the current default). Mark the tests as requiring unsafe AIO to mitigate the intermittent failures when unsafe AIO isn't permitted. If the kernel code is changed to reliably function with md(4) devices using unsafe AIO, this commit can be reverted. MFC after: 2 months PR: 217261 Reported by: Jenkins Sponsored by: Dell EMC Isilon Modified: head/tests/sys/aio/aio_test.c Modified: head/tests/sys/aio/aio_test.c ============================================================================== --- head/tests/sys/aio/aio_test.c Thu May 11 07:58:04 2017 (r318179) +++ head/tests/sys/aio/aio_test.c Thu May 11 08:06:46 2017 (r318180) @@ -735,6 +735,7 @@ aio_md_test(completion comp) struct md_ioctl mdio; ATF_REQUIRE_KERNEL_MODULE("aio"); + ATF_REQUIRE_UNSAFE_AIO(); mdctl_fd = open("/dev/" MDCTL_NAME, O_RDWR, 0); ATF_REQUIRE_MSG(mdctl_fd != -1, From owner-svn-src-all@freebsd.org Thu May 11 08:22:02 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A4BB2D67680; Thu, 11 May 2017 08:22:02 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 74FB21686; Thu, 11 May 2017 08:22:02 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4B8M1UD021962; Thu, 11 May 2017 08:22:01 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4B8M10n021961; Thu, 11 May 2017 08:22:01 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705110822.v4B8M10n021961@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 11 May 2017 08:22:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318181 - head/contrib/libarchive/cpio/test X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 May 2017 08:22:02 -0000 Author: ngie Date: Thu May 11 08:22:01 2017 New Revision: 318181 URL: https://svnweb.freebsd.org/changeset/base/318181 Log: cpio/tests/test_option_lz4: fix a use after free in the failure case This change will be upstreamed to the libarchive project. MFC after: 6 days MFC with: r317782 Reported by: Coverity Sponsored by: Dell EMC Isilon Modified: head/contrib/libarchive/cpio/test/test_option_lz4.c Modified: head/contrib/libarchive/cpio/test/test_option_lz4.c ============================================================================== --- head/contrib/libarchive/cpio/test/test_option_lz4.c Thu May 11 08:06:46 2017 (r318180) +++ head/contrib/libarchive/cpio/test/test_option_lz4.c Thu May 11 08:22:01 2017 (r318181) @@ -74,8 +74,8 @@ DEFINE_TEST(test_option_lz4) free(p); return; } - free(p); failure("--lz4 option is broken: %s", p); + free(p); assertEqualInt(r, 0); return; } From owner-svn-src-all@freebsd.org Thu May 11 08:39:56 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AE1F4D67C14; Thu, 11 May 2017 08:39:56 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 66072103; Thu, 11 May 2017 08:39:56 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4B8dtsG027112; Thu, 11 May 2017 08:39:55 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4B8dtoo027111; Thu, 11 May 2017 08:39:55 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201705110839.v4B8dtoo027111@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 11 May 2017 08:39:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318182 - head/share/man/man7 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 May 2017 08:39:56 -0000 Author: trasz Date: Thu May 11 08:39:55 2017 New Revision: 318182 URL: https://svnweb.freebsd.org/changeset/base/318182 Log: Improve build(7): add missing "buildkernel" and "installkernel" to the example, change the architectures to something more common, and improve description of defaults for TARGET. Reviewed by: bdrewery, ngie, imp (older revisions) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D10654 Modified: head/share/man/man7/build.7 Modified: head/share/man/man7/build.7 ============================================================================== --- head/share/man/man7/build.7 Thu May 11 08:22:01 2017 (r318181) +++ head/share/man/man7/build.7 Thu May 11 08:39:55 2017 (r318182) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 22, 2017 +.Dd May 11, 2017 .Dt BUILD 7 .Os .Sh NAME @@ -528,7 +528,10 @@ and .Va TARGET Ns = Ns Li arm64 . If not set, .Va TARGET -defaults to the current hardware platform. +defaults to the current hardware platform, unless +.Va TARGET_ARCH +is also set, in which case it defaults to the appropriate +value for that architecture. .It Va TARGET_ARCH The target machine processor architecture. This is analogous to the @@ -689,11 +692,11 @@ section in .Pa src/UPDATING . .Pp The following sequence of commands can be used to cross-build the -system for the sparc64 architecture on an i386 host: +system for the armv6 architecture on an amd64 host: .Bd -literal -offset indent cd /usr/src -make TARGET=sparc64 buildworld -make TARGET=sparc64 DESTDIR=/clients/sparc64 installworld +make TARGET_ARCH=armv6 buildworld buildkernel +make TARGET_ARCH=armv6 DESTDIR=/clients/arm64 installworld installkernel .Ed .Sh SEE ALSO .Xr cc 1 , @@ -702,6 +705,7 @@ make TARGET=sparc64 DESTDIR=/clients/spa .Xr svn 1 , .Xr make.conf 5 , .Xr src.conf 5 , +.Xr arch 7 , .Xr ports 7 , .Xr release 7 , .Xr tests 7 , From owner-svn-src-all@freebsd.org Thu May 11 09:36:53 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-all@freebsd.org Thu May 11 11:13:04 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 02A59D65091; Thu, 11 May 2017 11:13:04 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 C71EC115F; Thu, 11 May 2017 11:13:03 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4BBD25C091874; Thu, 11 May 2017 11:13:02 GMT (envelope-from mm@FreeBSD.org) Received: (from mm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4BBD2TL091873; Thu, 11 May 2017 11:13:02 GMT (envelope-from mm@FreeBSD.org) Message-Id: <201705111113.v4BBD2TL091873@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mm set sender to mm@FreeBSD.org using -f From: Martin Matuska Date: Thu, 11 May 2017 11:13:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r318184 - vendor/libarchive/dist/cpio/test X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 May 2017 11:13:04 -0000 Author: mm Date: Thu May 11 11:13:02 2017 New Revision: 318184 URL: https://svnweb.freebsd.org/changeset/base/318184 Log: Update vendor/libarchive to git f2230fcaed3159d10caed63d9a20caa9fdc94c62 Vendor fixes: #909: Fix use after free in cpio test_option_lz4 Reported by: Coverity (ngie@) Modified: vendor/libarchive/dist/cpio/test/test_option_lz4.c Modified: vendor/libarchive/dist/cpio/test/test_option_lz4.c ============================================================================== --- vendor/libarchive/dist/cpio/test/test_option_lz4.c Thu May 11 09:36:51 2017 (r318183) +++ vendor/libarchive/dist/cpio/test/test_option_lz4.c Thu May 11 11:13:02 2017 (r318184) @@ -74,8 +74,8 @@ DEFINE_TEST(test_option_lz4) free(p); return; } - free(p); failure("--lz4 option is broken: %s", p); + free(p); assertEqualInt(r, 0); return; } From owner-svn-src-all@freebsd.org Thu May 11 11:30:23 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 39B12D65637; Thu, 11 May 2017 11:30:23 +0000 (UTC) (envelope-from garga.bsd@gmail.com) Received: from mail-qk0-x243.google.com (mail-qk0-x243.google.com [IPv6:2607:f8b0:400d:c09::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DDEEE1873; Thu, 11 May 2017 11:30:22 +0000 (UTC) (envelope-from garga.bsd@gmail.com) Received: by mail-qk0-x243.google.com with SMTP id u75so3191122qka.1; Thu, 11 May 2017 04:30:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=7ZUnWF+V//e6VSPxNcUBgrvUBNQUS6o1Ze3t9/kG0I0=; b=FLgGc1jM+NFXhXD9xwO/p3t2g4Ysuh/hHNUs5BK4dUlHkhT7+f9yB8FwcY6UEtt6zc ja15TCv3P7uwoInffvJ9TIu8j84gCoqpbITDS+6YCRDQE3uGIObklzY3qTcgE0TpaW9N UKymOGTcuQ27xtqgD5uBSMC3Yfq/l/maB+RNirmtY+98gY7VOIt+dsgBBR+JE4+7k1O8 YKvYERJYO1VHuPSHLdSNSYFLeGfg10DmHHIPe7qtG/XmXO6m8m/uhY6v0BIjItQVehk6 d4Tgrhv3xHC8BuC4ykDDyQ7hwzcE16UGl73CGqfGM3V492YuXV8JNJ7mqnbVyul9X/aU 5QXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=7ZUnWF+V//e6VSPxNcUBgrvUBNQUS6o1Ze3t9/kG0I0=; b=O9lJvM9rO5LlkNvexq2oOT7z+g0XTsbisTFu/7I0X0veF9kAyr8nxj++YeTYVZ5RMz LtLGJ6a24IByB0gKmm4vek8KUhOBxB7sf3UCYDoLkUI/RGyZVfSHPK2n1uhorJN8xE9i dv7KtI1lFu3ddoiu+S5rMBTQa7UlkUz5uG8EKbvsRwIyJblIxir+BfgpUxAj0/dt1i1N r0d+dzZmeUXxAcPaSkU8dqVe74FuGwteHQAz57+Mz49l8D49Rkl2sf/d818pCNx5zzpG 8MzpT2Uwio2A1SZS2ct7zOW2VDLilVAxb1mz5wX2oYnIP/kdCrWAE+P6TTXdAb9QF8DJ zNsQ== X-Gm-Message-State: AODbwcBSCDVBAuxvdITVgQha/oxhbubokg/SVDfu25fvB56Ym7mQ6W0r NualguyR8hIWoA== X-Received: by 10.55.25.80 with SMTP id k77mr10029303qkh.294.1494502222042; Thu, 11 May 2017 04:30:22 -0700 (PDT) Received: from mbp-eth.home ([177.53.86.172]) by smtp.gmail.com with ESMTPSA id r19sm988835qkl.54.2017.05.11.04.30.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 11 May 2017 04:30:20 -0700 (PDT) Subject: Re: svn commit: r318161 - head/contrib/bmake To: Ngie Cooper , "Simon J. Gerraty" References: <201705102224.v4AMO9SQ078718@repo.freebsd.org> Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" From: Renato Botelho Message-ID: <76c18c38-e38d-e98a-d107-c1e5fb7012f7@gmail.com> Date: Thu, 11 May 2017 08:30:16 -0300 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 May 2017 11:30:23 -0000 On 10/05/17 19:35, Ngie Cooper wrote: > On Wed, May 10, 2017 at 3:31 PM, Ngie Cooper wrote: >> On Wed, May 10, 2017 at 3:24 PM, Simon J. Gerraty wrote: >>> Author: sjg >>> Date: Wed May 10 22:24:09 2017 >>> New Revision: 318161 >>> URL: https://svnweb.freebsd.org/changeset/base/318161 >>> >>> Log: >>> Ensure buf2 is in scope >> >> I think this is the proper fix for the issue that Bryan, Ravi, and I > > Ravi -> Renato > >> reported.. also reported as Coverity CID: 1374641. Yeah, it fixed the problem to me. Thanks! -- Renato Botelho From owner-svn-src-all@freebsd.org Thu May 11 11:30:26 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EBA78D6565C for ; Thu, 11 May 2017 11:30:26 +0000 (UTC) (envelope-from freebsd-listen@fabiankeil.de) Received: from smtprelay05.ispgateway.de (smtprelay05.ispgateway.de [80.67.31.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B3ACB1883; Thu, 11 May 2017 11:30:26 +0000 (UTC) (envelope-from freebsd-listen@fabiankeil.de) Received: from [78.35.155.27] (helo=fabiankeil.de) by smtprelay05.ispgateway.de with esmtpsa (TLSv1.2:AES256-GCM-SHA384:256) (Exim 4.84) (envelope-from ) id 1d8mGM-0000xI-6W; Thu, 11 May 2017 13:28:06 +0200 Date: Thu, 11 May 2017 12:55:14 +0200 From: Fabian Keil To: Gleb Smirnoff Cc: svn-src-all@freebsd.org Subject: Re: svn commit: r318166 - head/sys/netinet Message-ID: <20170511125514.6714f872@fabiankeil.de> In-Reply-To: <201705102332.v4ANWVGW007216@repo.freebsd.org> References: <201705102332.v4ANWVGW007216@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; boundary="Sig_/x0z4jbxxNV68R/mjLWE_plZ"; protocol="application/pgp-signature" X-Df-Sender: Nzc1MDY3 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 May 2017 11:30:27 -0000 --Sig_/x0z4jbxxNV68R/mjLWE_plZ Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Gleb Smirnoff wrote: > Author: glebius > Date: Wed May 10 23:32:31 2017 > New Revision: 318166 > URL: https://svnweb.freebsd.org/changeset/base/318166 >=20 > Log: > There is no good reason for TCP reassembly zone to be UMA_ZONE_NOFREE. > =20 > It has strong locking model, doesn't have any timers associated with > entries. The entries theirselves are referenced only from the tcpcb > zone, which itself is a normal zone, without the UMA_ZONE_NOFREE flag. A side effect of the UMA_ZONE_NOFREE flag is that allocations with M_NOWAIT (currently used tcp_reass()) are less likely to fail. Removing the UMA_ZONE_NOFREE in other TCP-related parts "recently" caused (still unfixed) regressions like: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D209680 It would be great if there was a method to reserve a certain number of items for the zone without having to rely on UMA_ZONE_NOFREE but last time I checked there wasn't one. Fabian --Sig_/x0z4jbxxNV68R/mjLWE_plZ Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iF0EARECAB0WIQTKUNd6H/m3+ByGULIFiohV/3dUnQUCWRRDEwAKCRAFiohV/3dU nTA5AJwPwD46UZaGdLP7ZOt23QLHMOLRvgCeMxzH8CUVwWKgHSTRLcLRvAt911U= =Tz+z -----END PGP SIGNATURE----- --Sig_/x0z4jbxxNV68R/mjLWE_plZ-- From owner-svn-src-all@freebsd.org Thu May 11 13:46:31 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B098AD67819; Thu, 11 May 2017 13:46:31 +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 5CA1B1F68; Thu, 11 May 2017 13:46:31 +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 v4BDkUPY053081; Thu, 11 May 2017 13:46:30 GMT (envelope-from ken@FreeBSD.org) Received: (from ken@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4BDkU1N053079; Thu, 11 May 2017 13:46:30 GMT (envelope-from ken@FreeBSD.org) Message-Id: <201705111346.v4BDkU1N053079@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ken set sender to ken@FreeBSD.org using -f From: "Kenneth D. Merry" Date: Thu, 11 May 2017 13:46:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318185 - in head: lib/libmt usr.bin/mt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 May 2017 13:46:31 -0000 Author: ken Date: Thu May 11 13:46:30 2017 New Revision: 318185 URL: https://svnweb.freebsd.org/changeset/base/318185 Log: Add LTO-8 density codes. lib/libmt/mtlib.c: Add the LTO-8 density code to the density table in libmt. usr.bin/mt/mt.1: Add the LTO-8 density code, tracks, bpmm, and bpi to the density table in the mt(1) man page. MFC after: 3 days Sponsored by: Spectra Logic Modified: head/lib/libmt/mtlib.c head/usr.bin/mt/mt.1 Modified: head/lib/libmt/mtlib.c ============================================================================== --- head/lib/libmt/mtlib.c Thu May 11 11:13:02 2017 (r318184) +++ head/lib/libmt/mtlib.c Thu May 11 13:46:30 2017 (r318185) @@ -644,6 +644,7 @@ static struct densities { { 0x58, 15142, 384607, "LTO-5" }, { 0x5A, 15142, 384607, "LTO-6" }, { 0x5C, 19107, 485318, "LTO-7" }, + { 0x5E, 20669, 524993, "LTO-8" }, { 0x71, 11800, 299720, "3592A1 (encrypted)" }, { 0x72, 11800, 299720, "3592A2 (encrypted)" }, { 0x73, 13452, 341681, "3592A3 (encrypted)" }, Modified: head/usr.bin/mt/mt.1 ============================================================================== --- head/usr.bin/mt/mt.1 Thu May 11 11:13:02 2017 (r318184) +++ head/usr.bin/mt/mt.1 Thu May 11 13:46:30 2017 (r318185) @@ -29,7 +29,7 @@ .\" @(#)mt.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd May 5, 2017 +.Dd May 11, 2017 .Dt MT 1 .Os .Sh NAME @@ -521,6 +521,7 @@ Value Width Tracks Density 0x58 12.7 (0.5) 1280 15,142 (384,607) C LTO-5 0x5A 12.7 (0.5) 2176 15,142 (384,607) C LTO-6 0x5C 12.7 (0.5) 3584 19,107 (485,318) C LTO-7 +0x5E 12.7 (0.5) 6656 20,669 (524,993) C LTO-8 0x71 12.7 (0.5) 512 11,800 (299,720) C 3592A1 (encrypted) 0x72 12.7 (0.5) 896 11,800 (299,720) C 3592A2 (encrypted) 0x73 12.7 (0.5) 1152 13,452 (341,681) C 3592A3 (encrypted) From owner-svn-src-all@freebsd.org Thu May 11 13:49:06 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-all@freebsd.org Thu May 11 13:50:17 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-all@freebsd.org Thu May 11 15:19:05 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AC729D68FA9; Thu, 11 May 2017 15:19:05 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 6DEEC12AE; Thu, 11 May 2017 15:19:05 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4BFJ45R090489; Thu, 11 May 2017 15:19:04 GMT (envelope-from scottl@FreeBSD.org) Received: (from scottl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4BFJ4nF090487; Thu, 11 May 2017 15:19:04 GMT (envelope-from scottl@FreeBSD.org) Message-Id: <201705111519.v4BFJ4nF090487@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: scottl set sender to scottl@FreeBSD.org using -f From: Scott Long Date: Thu, 11 May 2017 15:19:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318188 - in head/sys/dev: mpr mps X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 May 2017 15:19:05 -0000 Author: scottl Date: Thu May 11 15:19:04 2017 New Revision: 318188 URL: https://svnweb.freebsd.org/changeset/base/318188 Log: Improve error messages during command timeout for the mpr and mps drivers. Sponsored by: Netflix Modified: head/sys/dev/mpr/mpr_sas.c head/sys/dev/mps/mps_sas.c Modified: head/sys/dev/mpr/mpr_sas.c ============================================================================== --- head/sys/dev/mpr/mpr_sas.c Thu May 11 13:50:16 2017 (r318187) +++ head/sys/dev/mpr/mpr_sas.c Thu May 11 15:19:04 2017 (r318188) @@ -1562,7 +1562,7 @@ mprsas_send_abort(struct mpr_softc *sc, return -1; } - mprsas_log_command(tm, MPR_RECOVERY|MPR_INFO, + mprsas_log_command(cm, MPR_RECOVERY|MPR_INFO, "Aborting command %p\n", cm); req = (MPI2_SCSI_TASK_MANAGE_REQUEST *)tm->cm_req; @@ -1594,7 +1594,7 @@ mprsas_send_abort(struct mpr_softc *sc, err = mpr_map_command(sc, tm); if (err) - mprsas_log_command(tm, MPR_RECOVERY, + mpr_dprint(sc, MPR_RECOVERY, "error %d sending abort for cm %p SMID %u\n", err, cm, req->TaskMID); return err; @@ -1635,8 +1635,9 @@ mprsas_scsiio_timeout(void *data) targ = cm->cm_targ; targ->timeouts++; - mprsas_log_command(cm, MPR_ERROR, "command timeout cm %p ccb %p target " - "%u, handle(0x%04x)\n", cm, cm->cm_ccb, targ->tid, targ->handle); + mprsas_log_command(cm, MPR_ERROR, "command timeout %d cm %p target " + "%u, handle(0x%04x)\n", cm->cm_ccb->ccb_h.timeout, cm, targ->tid, + targ->handle); if (targ->encl_level_valid) { mpr_dprint(sc, MPR_ERROR, "At enclosure level %d, slot %d, " "connector name (%4s)\n", targ->encl_level, targ->encl_slot, Modified: head/sys/dev/mps/mps_sas.c ============================================================================== --- head/sys/dev/mps/mps_sas.c Thu May 11 13:50:16 2017 (r318187) +++ head/sys/dev/mps/mps_sas.c Thu May 11 15:19:04 2017 (r318188) @@ -1505,7 +1505,7 @@ mpssas_send_abort(struct mps_softc *sc, return -1; } - mpssas_log_command(tm, MPS_RECOVERY|MPS_INFO, + mpssas_log_command(cm, MPS_RECOVERY|MPS_INFO, "Aborting command %p\n", cm); req = (MPI2_SCSI_TASK_MANAGE_REQUEST *)tm->cm_req; @@ -1536,7 +1536,7 @@ mpssas_send_abort(struct mps_softc *sc, err = mps_map_command(sc, tm); if (err) - mpssas_log_command(tm, MPS_RECOVERY, + mps_dprint(sc, MPS_RECOVERY, "error %d sending abort for cm %p SMID %u\n", err, cm, req->TaskMID); return err; @@ -1574,12 +1574,13 @@ mpssas_scsiio_timeout(void *data) return; } - mpssas_log_command(cm, MPS_INFO, "command timeout cm %p ccb %p\n", - cm, cm->cm_ccb); - targ = cm->cm_targ; targ->timeouts++; + mpssas_log_command(cm, MPS_ERROR, "command timeout %d cm %p target " + "%u, handle(0x%04x)\n", cm->cm_ccb->ccb_h.timeout, cm, targ->tid, + targ->handle); + /* XXX first, check the firmware state, to see if it's still * operational. if not, do a diag reset. */ From owner-svn-src-all@freebsd.org Thu May 11 16:26:57 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CB368D68354; Thu, 11 May 2017 16:26:57 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7E96216F2; Thu, 11 May 2017 16:26:57 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4BGQujj018999; Thu, 11 May 2017 16:26:56 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4BGQuaK018998; Thu, 11 May 2017 16:26:56 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201705111626.v4BGQuaK018998@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Thu, 11 May 2017 16:26:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318189 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 May 2017 16:26:57 -0000 Author: asomers Date: Thu May 11 16:26:56 2017 New Revision: 318189 URL: https://svnweb.freebsd.org/changeset/base/318189 Log: vdev_geom may associate multiple vdevs per g_consumer vdev_geom.c currently uses the g_consumer's private field to point to a vdev_t. That way, a GEOM event can cause a change to a ZFS vdev. For example, when you remove a disk, the vdev's status will change to REMOVED. However, vdev_geom will sometimes attach multiple vdevs to the same GEOM consumer. If this happens, then geom events will only be propagated to one of the vdevs. Fix this by storing a linked list of vdevs in g_consumer's private field. sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c * g_consumer.private now stores a linked list of vdev pointers associated with the consumer instead of just a single vdev pointer. * Change vdev_geom_set_physpath's signature to more closely match vdev_geom_set_rotation_rate * Don't bother calling g_access in vdev_geom_set_physpath. It's guaranteed that we've already accessed the consumer by the time we get here. * Don't call vdev_geom_set_physpath in vdev_geom_attach. Instead, call it in vdev_geom_open, after we know that the open has succeeded. PR: 218634 Reviewed by: gibbs MFC after: 1 week Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D10391 Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Thu May 11 15:19:04 2017 (r318188) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Thu May 11 16:26:56 2017 (r318189) @@ -49,6 +49,16 @@ struct g_class zfs_vdev_class = { .attrchanged = vdev_geom_attrchanged, }; +struct consumer_vdev_elem { + SLIST_ENTRY(consumer_vdev_elem) elems; + vdev_t *vd; +}; + +SLIST_HEAD(consumer_priv_t, consumer_vdev_elem); +_Static_assert(sizeof(((struct g_consumer*)NULL)->private) + == sizeof(struct consumer_priv_t*), + "consumer_priv_t* can't be stored in g_consumer.private"); + DECLARE_GEOM_CLASS(zfs_vdev_class, zfs_vdev); SYSCTL_DECL(_vfs_zfs_vdev); @@ -85,21 +95,16 @@ vdev_geom_set_rotation_rate(vdev_t *vd, } static void -vdev_geom_set_physpath(struct g_consumer *cp, boolean_t do_null_update) +vdev_geom_set_physpath(vdev_t *vd, struct g_consumer *cp, + boolean_t do_null_update) { boolean_t needs_update = B_FALSE; - vdev_t *vd; char *physpath; int error, physpath_len; - if (g_access(cp, 1, 0, 0) != 0) - return; - - vd = cp->private; physpath_len = MAXPATHLEN; physpath = g_malloc(physpath_len, M_WAITOK|M_ZERO); error = g_io_getattr("GEOM::physpath", cp, &physpath_len, physpath); - g_access(cp, -1, 0, 0); if (error == 0) { char *old_physpath; @@ -130,37 +135,40 @@ vdev_geom_set_physpath(struct g_consumer static void vdev_geom_attrchanged(struct g_consumer *cp, const char *attr) { - vdev_t *vd; char *old_physpath; + struct consumer_priv_t *priv; + struct consumer_vdev_elem *elem; int error; - vd = cp->private; - if (vd == NULL) + priv = (struct consumer_priv_t*)&cp->private; + if (SLIST_EMPTY(priv)) return; - if (strcmp(attr, "GEOM::rotation_rate") == 0) { - vdev_geom_set_rotation_rate(vd, cp); - return; - } - - if (strcmp(attr, "GEOM::physpath") == 0) { - vdev_geom_set_physpath(cp, /*do_null_update*/B_TRUE); - return; + SLIST_FOREACH(elem, priv, elems) { + vdev_t *vd = elem->vd; + if (strcmp(attr, "GEOM::rotation_rate") == 0) { + vdev_geom_set_rotation_rate(vd, cp); + return; + } + if (strcmp(attr, "GEOM::physpath") == 0) { + vdev_geom_set_physpath(vd, cp, /*null_update*/B_TRUE); + return; + } } } static void vdev_geom_orphan(struct g_consumer *cp) { - vdev_t *vd; + struct consumer_priv_t *priv; + struct consumer_vdev_elem *elem; g_topology_assert(); - vd = cp->private; - if (vd == NULL) { + priv = (struct consumer_priv_t*)&cp->private; + if (SLIST_EMPTY(priv)) /* Vdev close in progress. Ignore the event. */ return; - } /* * Orphan callbacks occur from the GEOM event thread. @@ -176,8 +184,12 @@ vdev_geom_orphan(struct g_consumer *cp) * async removal support to invoke a close on this * vdev once it is safe to do so. */ - vd->vdev_remove_wanted = B_TRUE; - spa_async_request(vd->vdev_spa, SPA_ASYNC_REMOVE); + SLIST_FOREACH(elem, priv, elems) { + vdev_t *vd = elem->vd; + + vd->vdev_remove_wanted = B_TRUE; + spa_async_request(vd->vdev_spa, SPA_ASYNC_REMOVE); + } } static struct g_consumer * @@ -265,21 +277,8 @@ vdev_geom_attach(struct g_provider *pp, } } - /* - * BUG: cp may already belong to a vdev. This could happen if: - * 1) That vdev is a shared spare, or - * 2) We are trying to reopen a missing vdev and we are scanning by - * guid. In that case, we'll ultimately fail to open this consumer, - * but not until after setting the private field. - * The solution is to: - * 1) Don't set the private field until after the open succeeds, and - * 2) Set it to a linked list of vdevs, not just a single vdev - */ - cp->private = vd; - if (vd != NULL) { + if (vd != NULL) vd->vdev_tsd = cp; - vdev_geom_set_physpath(cp, /*do_null_update*/B_FALSE); - } cp->flags |= G_CF_DIRECT_SEND | G_CF_DIRECT_RECEIVE; return (cp); @@ -289,16 +288,12 @@ static void vdev_geom_detach(struct g_consumer *cp, boolean_t open_for_read) { struct g_geom *gp; - vdev_t *vd; g_topology_assert(); ZFS_LOG(1, "Detaching from %s.", cp->provider && cp->provider->name ? cp->provider->name : "NULL"); - vd = cp->private; - cp->private = NULL; - gp = cp->geom; if (open_for_read) g_access(cp, -1, 0, -1); @@ -324,16 +319,26 @@ static void vdev_geom_close_locked(vdev_t *vd) { struct g_consumer *cp; + struct consumer_priv_t *priv; + struct consumer_vdev_elem *elem, *elem_temp; g_topology_assert(); cp = vd->vdev_tsd; - vd->vdev_tsd = NULL; vd->vdev_delayed_close = B_FALSE; if (cp == NULL) return; ZFS_LOG(1, "Closing access to %s.", cp->provider->name); + KASSERT(cp->private != NULL, ("%s: cp->private is NULL", __func__)); + priv = (struct consumer_priv_t*)&cp->private; + vd->vdev_tsd = NULL; + SLIST_FOREACH_SAFE(elem, priv, elems, elem_temp) { + if (elem->vd == vd) { + SLIST_REMOVE(priv, elem, consumer_vdev_elem, elems); + g_free(elem); + } + } vdev_geom_detach(cp, B_TRUE); } @@ -870,11 +875,27 @@ vdev_geom_open(vdev_t *vd, uint64_t *psi cp = NULL; } } + if (cp != NULL) { + struct consumer_priv_t *priv; + struct consumer_vdev_elem *elem; + + priv = (struct consumer_priv_t*)&cp->private; + if (cp->private == NULL) + SLIST_INIT(priv); + elem = g_malloc(sizeof(*elem), M_WAITOK|M_ZERO); + elem->vd = vd; + SLIST_INSERT_HEAD(priv, elem, elems); + } /* Fetch initial physical path information for this device. */ - if (cp != NULL) + if (cp != NULL) { vdev_geom_attrchanged(cp, "GEOM::physpath"); + /* Set other GEOM characteristics */ + vdev_geom_set_physpath(vd, cp, /*do_null_update*/B_FALSE); + vdev_geom_set_rotation_rate(vd, cp); + } + g_topology_unlock(); PICKUP_GIANT(); if (cp == NULL) { @@ -905,11 +926,6 @@ skip_open: */ vd->vdev_nowritecache = B_FALSE; - /* - * Determine the device's rotation rate. - */ - vdev_geom_set_rotation_rate(vd, cp); - return (0); } From owner-svn-src-all@freebsd.org Thu May 11 16:37:31 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7CD14D68781; Thu, 11 May 2017 16:37: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 31D9A1D1D; Thu, 11 May 2017 16:37: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 v4BGbUpV022951; Thu, 11 May 2017 16:37:30 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4BGbUK6022950; Thu, 11 May 2017 16:37:30 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705111637.v4BGbUK6022950@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 16:37:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318190 - head/release/scripts X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 May 2017 16:37:31 -0000 Author: gjb Date: Thu May 11 16:37:29 2017 New Revision: 318190 URL: https://svnweb.freebsd.org/changeset/base/318190 Log: Update release/scripts/atlas-upload.sh to account for API changes made recently by Atlas Hashicorp. The data returned from GET and POST requests has changed, which caused a number of regex patterns to fail to be properly identified as 'success' or 'failure', which ended up in upload/publish failures. Tested with: 12-CURRENT MFC after: 3 days Sponsored by: The FreeBSD Foundation Modified: head/release/scripts/atlas-upload.sh Modified: head/release/scripts/atlas-upload.sh ============================================================================== --- head/release/scripts/atlas-upload.sh Thu May 11 16:26:56 2017 (r318189) +++ head/release/scripts/atlas-upload.sh Thu May 11 16:37:29 2017 (r318190) @@ -132,20 +132,20 @@ main () { echo "Failed to get the token from the API" exit 2; fi - echo ${TOKENRESULT} | grep "\"token\":" > /dev/null + echo ${TOKENRESULT} | grep -E "\"(token|upload_path)\":" > /dev/null if [ $? != 0 ]; then echo "No token found from the API" exit 2 else - TOKEN=$(echo $TOKENRESULT | sed -e 's/.*token":"//' -e 's/".*//') + TOKEN=$(echo $TOKENRESULT | sed -e 's/.*token":"//' -e 's/.*upload_path":"//' -e 's/}$//g' -e 's/"//g') echo "Uploading to Atlas" - UPLOADRESULT=$(/usr/local/bin/curl -s -X PUT --upload-file ${FILE} ${ATLAS_UPLOAD_URL}/${TOKEN}) + UPLOADRESULT=$(/usr/local/bin/curl -s -X PUT --upload-file ${FILE} ${TOKEN}) # Validate the Upload echo "Validating" VALIDRESULT=$(/usr/local/bin/curl -s "https://atlas.hashicorp.com/api/v1/box/${USERNAME}/${BOX}/version/${VERSION}/provider/${PROVIDER}?access_token=${KEY}") - HOSTED_TOKEN=$(echo $VALIDRESULT | sed -e 's/.*hosted_token":"//' -e 's/".*//') - if [ ! -z ${HOSTED_TOKEN} -a ! -z ${TOKEN} -a ${HOSTED_TOKEN} != ${TOKEN} ]; then + HOSTED_TOKEN=$(echo $VALIDRESULT | sed -e 's/.*"hosted"://' -e 's/,.*$//') + if [ ! -z ${TOKEN} -a "${HOSTED_TOKEN}" != "true" ]; then echo "Upload failed, try again." exit 2 fi From owner-svn-src-all@freebsd.org Thu May 11 17:03:46 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8AC54D680C0; Thu, 11 May 2017 17:03:46 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5CDCBF98; Thu, 11 May 2017 17:03:46 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4BH3jTG035619; Thu, 11 May 2017 17:03:45 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4BH3jVa035618; Thu, 11 May 2017 17:03:45 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201705111703.v4BH3jVa035618@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 11 May 2017 17:03:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318191 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 May 2017 17:03:46 -0000 Author: markj Date: Thu May 11 17:03:45 2017 New Revision: 318191 URL: https://svnweb.freebsd.org/changeset/base/318191 Log: Let ptracestop() suspend threads sleeping in an SBDRY section. When a thread enters ptracestop(), for example because it had received SIGSTOP from ptrace(PT_ATTACH), it attempts to suspend other threads in the same process. In the case of a thread sleeping interruptibly in an SBDRY section, sig_suspend_threads() must wake the thread and allow it to reach the user-mode boundary. However, sig_suspend_threads() would erroneously avoid waking up such threads, resulting in an apparent hang. Reviewed by: kib Tested by: pho MFC after: 2 weeks Sponsored by: Dell EMC Isilon Modified: head/sys/kern/kern_sig.c Modified: head/sys/kern/kern_sig.c ============================================================================== --- head/sys/kern/kern_sig.c Thu May 11 16:37:29 2017 (r318190) +++ head/sys/kern/kern_sig.c Thu May 11 17:03:45 2017 (r318191) @@ -2477,6 +2477,7 @@ sig_suspend_threads(struct thread *td, s PROC_LOCK_ASSERT(p, MA_OWNED); PROC_SLOCK_ASSERT(p, MA_OWNED); + MPASS(sending || td == curthread); wakeup_swapper = 0; FOREACH_THREAD_IN_PROC(p, td2) { @@ -2493,10 +2494,9 @@ sig_suspend_threads(struct thread *td, s */ KASSERT(!TD_IS_SUSPENDED(td2), ("thread with deferred stops suspended")); - if (TD_SBDRY_INTR(td2) && sending) { + if (TD_SBDRY_INTR(td2)) wakeup_swapper |= sleepq_abort(td2, TD_SBDRY_ERRNO(td2)); - } } else if (!TD_IS_SUSPENDED(td2)) { thread_suspend_one(td2); } From owner-svn-src-all@freebsd.org Thu May 11 17:26:35 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-all@freebsd.org Thu May 11 17:26:36 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-all@freebsd.org Thu May 11 18:14:46 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 13C98D68740; Thu, 11 May 2017 18:14:46 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E890F1A53; Thu, 11 May 2017 18:14:45 +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 5965010A82D; Thu, 11 May 2017 14:14:44 -0400 (EDT) From: John Baldwin To: Justin Hibbits Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r318171 - head/sys/dev/dpaa Date: Thu, 11 May 2017 10:52:14 -0700 Message-ID: <1565622.4efZRtpFtU@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-STABLE; KDE/4.14.10; amd64; ; ) In-Reply-To: <201705110347.v4B3lwj4009423@repo.freebsd.org> References: <201705110347.v4B3lwj4009423@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:44 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 May 2017 18:14:46 -0000 On Thursday, May 11, 2017 03:47:58 AM Justin Hibbits wrote: > Author: jhibbits > Date: Thu May 11 03:47:58 2017 > New Revision: 318171 > URL: https://svnweb.freebsd.org/changeset/base/318171 > > Log: > Fix uma_zcreate() align argument, now that the constraint is asserted. > > The alignment argument is the mask of low bits to mask off when allocating > items in a zone, not the block-size alignment. The first one should probably be using UMA_ALIGN_PTR instead. However, I do wonder if we shouldn't fix the API. All of the other APIs in the kernel for memory allocation use the size for alignment (contigmalloc, kmem_*, bus_dma, etc.). We could support a transition for uma by doing something like this in the implementation: if (alignment == 0) zone->align = 0; else if (powerof2(alignment)) zone->align = alignment - 1; else { KASSERT(powerof2(alignment + 1), ...); printf("WARNING: UMA zone %s using old alignment\n"); zone->alignment = alignment; } Along with updating the UMA_ALIGN_* constants which should fix most of the zones in the tree to use the new strategy. In 13 we would turn the printf() into a panic() / KASSERT. -- John Baldwin From owner-svn-src-all@freebsd.org Thu May 11 18:14:53 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-all@freebsd.org Thu May 11 18:53:30 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3D081D691B0; Thu, 11 May 2017 18:53:30 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0D34414DE; Thu, 11 May 2017 18:53:29 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4BIrTu4081825; Thu, 11 May 2017 18:53:29 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4BIrTP6081824; Thu, 11 May 2017 18:53:29 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201705111853.v4BIrTP6081824@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 11 May 2017 18:53:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318193 - head/sys/boot/efi/loader X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 May 2017 18:53:30 -0000 Author: markj Date: Thu May 11 18:53:28 2017 New Revision: 318193 URL: https://svnweb.freebsd.org/changeset/base/318193 Log: Set the right variable when overriding the default console speed. MFC after: 1 week Modified: head/sys/boot/efi/loader/main.c Modified: head/sys/boot/efi/loader/main.c ============================================================================== --- head/sys/boot/efi/loader/main.c Thu May 11 17:26:34 2017 (r318192) +++ head/sys/boot/efi/loader/main.c Thu May 11 18:53:28 2017 (r318193) @@ -391,7 +391,7 @@ main(int argc, CHAR16 *argv[]) } else { cpy16to8(&argv[i + 1][0], var, sizeof(var)); - setenv("comconsole_speedspeed", var, 1); + setenv("comconsole_speed", var, 1); } i++; break; From owner-svn-src-all@freebsd.org Thu May 11 19:49:24 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4D5E4D69CCC; Thu, 11 May 2017 19:49:24 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1A5F9F8C; Thu, 11 May 2017 19:49:24 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4BJnN4C002737; Thu, 11 May 2017 19:49:23 GMT (envelope-from sjg@FreeBSD.org) Received: (from sjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4BJnN1k002736; Thu, 11 May 2017 19:49:23 GMT (envelope-from sjg@FreeBSD.org) Message-Id: <201705111949.v4BJnN1k002736@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sjg set sender to sjg@FreeBSD.org using -f From: "Simon J. Gerraty" Date: Thu, 11 May 2017 19:49:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318194 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 May 2017 19:49:24 -0000 Author: sjg Date: Thu May 11 19:49:22 2017 New Revision: 318194 URL: https://svnweb.freebsd.org/changeset/base/318194 Log: Tell bmake (meta mode) to ignore changes to /usr/local/etc/libmap.d/* Differential Revision: D10685 Reviewed by: bdrewery Modified: head/share/mk/local.meta.sys.mk Modified: head/share/mk/local.meta.sys.mk ============================================================================== --- head/share/mk/local.meta.sys.mk Thu May 11 18:53:28 2017 (r318193) +++ head/share/mk/local.meta.sys.mk Thu May 11 19:49:22 2017 (r318194) @@ -283,3 +283,6 @@ META_MODE+= missing-meta=yes .if empty(META_MODE:Mnofilemon) META_MODE+= missing-filemon=yes .endif +# We do not want everything out-of-date just because +# some unrelated shared lib updated this. +.MAKE.META.IGNORE_PATHS+= /usr/local/etc/libmap.d From owner-svn-src-all@freebsd.org Thu May 11 20:01:21 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-all@freebsd.org Thu May 11 20:30:46 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-all@freebsd.org Thu May 11 20:55:14 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-all@freebsd.org Thu May 11 20:58:44 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3DCE1D68FF8 for ; Thu, 11 May 2017 20:58:44 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (glebi.us [96.95.210.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 2040D1AFE for ; Thu, 11 May 2017 20:58:43 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id v4BKndu7063640 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 11 May 2017 13:49:39 -0700 (PDT) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id v4BKndPr063639; Thu, 11 May 2017 13:49:39 -0700 (PDT) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@FreeBSD.org using -f Date: Thu, 11 May 2017 13:49:39 -0700 From: Gleb Smirnoff To: Fabian Keil Cc: svn-src-all@freebsd.org Subject: Re: svn commit: r318166 - head/sys/netinet Message-ID: <20170511204939.GO1137@FreeBSD.org> References: <201705102332.v4ANWVGW007216@repo.freebsd.org> <20170511125514.6714f872@fabiankeil.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170511125514.6714f872@fabiankeil.de> User-Agent: Mutt/1.8.0 (2017-02-23) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 May 2017 20:58:44 -0000 On Thu, May 11, 2017 at 12:55:14PM +0200, Fabian Keil wrote: F> > Author: glebius F> > Date: Wed May 10 23:32:31 2017 F> > New Revision: 318166 F> > URL: https://svnweb.freebsd.org/changeset/base/318166 F> > F> > Log: F> > There is no good reason for TCP reassembly zone to be UMA_ZONE_NOFREE. F> > F> > It has strong locking model, doesn't have any timers associated with F> > entries. The entries theirselves are referenced only from the tcpcb F> > zone, which itself is a normal zone, without the UMA_ZONE_NOFREE flag. F> F> A side effect of the UMA_ZONE_NOFREE flag is that allocations F> with M_NOWAIT (currently used tcp_reass()) are less likely to F> fail. F> F> Removing the UMA_ZONE_NOFREE in other TCP-related parts F> "recently" caused (still unfixed) regressions like: F> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=209680 F> F> It would be great if there was a method to reserve a certain F> number of items for the zone without having to rely on F> UMA_ZONE_NOFREE but last time I checked there wasn't one. Using UMA_ZONE_NOFREE for that problems is definitely a workaround. The problems should be separated, there definitely is an ipfw problem and TCP stack one. It is very strange that for an already established connection we require allocating more memory from these zones. -- Totus tuus, Glebius. From owner-svn-src-all@freebsd.org Thu May 11 21:01:05 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-all@freebsd.org Thu May 11 21:13:03 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-all@freebsd.org Thu May 11 21:13:07 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-all@freebsd.org Thu May 11 23:49:55 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-all@freebsd.org Fri May 12 01:09:25 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A41C4D5ECBF; Fri, 12 May 2017 01:09:25 +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 748AEDFA; Fri, 12 May 2017 01:09:25 +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 v4C19OMV037053; Fri, 12 May 2017 01:09:24 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4C19O5I037052; Fri, 12 May 2017 01:09:24 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201705120109.v4C19O5I037052@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 01:09:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318202 - head/contrib/ipfilter/lib X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2017 01:09:25 -0000 Author: cy Date: Fri May 12 01:09:24 2017 New Revision: 318202 URL: https://svnweb.freebsd.org/changeset/base/318202 Log: Add missing linefeed in debug output. Modified: head/contrib/ipfilter/lib/printpoolnode.c Modified: head/contrib/ipfilter/lib/printpoolnode.c ============================================================================== --- head/contrib/ipfilter/lib/printpoolnode.c Thu May 11 23:49:53 2017 (r318201) +++ head/contrib/ipfilter/lib/printpoolnode.c Fri May 12 01:09:24 2017 (r318202) @@ -52,7 +52,7 @@ printpoolnode(np, opts, fields) PRINTF("\tAddress: %s%s", np->ipn_info ? "! " : "", inet_ntoa(np->ipn_addr.adf_addr.in4)); } else { - PRINTF("\tAddress: family: %d", + PRINTF("\tAddress: family: %d\n", np->ipn_addr.adf_family); #ifdef AF_INET6 } From owner-svn-src-all@freebsd.org Fri May 12 02:12:05 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 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-all@freebsd.org Fri May 12 02:12:05 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 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-all@freebsd.org Fri May 12 02:12:40 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 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-all@freebsd.org Fri May 12 02:26:40 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 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-all@freebsd.org Fri May 12 02:26:40 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 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-all@freebsd.org Fri May 12 02:32:02 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 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-all@freebsd.org Fri May 12 02:32:02 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 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-all@freebsd.org Fri May 12 03:06:47 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 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-all@freebsd.org Fri May 12 03:44:21 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 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-all@freebsd.org Fri May 12 04:10:03 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E9188D69D9D; Fri, 12 May 2017 04:10:03 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AB1EA108D; Fri, 12 May 2017 04:10:03 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4C4A2pL012140; Fri, 12 May 2017 04:10:02 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4C4A2tZ012139; Fri, 12 May 2017 04:10:02 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201705120410.v4C4A2tZ012139@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Fri, 12 May 2017 04:10:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318209 - head/sys/dev/dpaa X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2017 04:10:04 -0000 Author: jhibbits Date: Fri May 12 04:10:02 2017 New Revision: 318209 URL: https://svnweb.freebsd.org/changeset/base/318209 Log: Use UMA_ALIGN_PTR to specify pointer alignment Suggested by: jhb Modified: head/sys/dev/dpaa/if_dtsec_rm.c Modified: head/sys/dev/dpaa/if_dtsec_rm.c ============================================================================== --- head/sys/dev/dpaa/if_dtsec_rm.c Fri May 12 03:44:20 2017 (r318208) +++ head/sys/dev/dpaa/if_dtsec_rm.c Fri May 12 04:10:02 2017 (r318209) @@ -115,7 +115,7 @@ dtsec_rm_fi_pool_init(struct dtsec_softc sc->sc_fi_zone = uma_zcreate(sc->sc_fi_zname, sizeof(struct dtsec_rm_frame_info), NULL, NULL, NULL, NULL, - sizeof(void *) - 1, 0); + UMA_ALIGN_PTR, 0); if (sc->sc_fi_zone == NULL) return (EIO); From owner-svn-src-all@freebsd.org Fri May 12 05:06:49 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7DF1BD68932; Fri, 12 May 2017 05:06:49 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4FE6E85F; Fri, 12 May 2017 05:06:49 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4C56mAk036170; Fri, 12 May 2017 05:06:48 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4C56mKI036169; Fri, 12 May 2017 05:06:48 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705120506.v4C56mKI036169@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 12 May 2017 05:06:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318210 - head/contrib/netbsd-tests/lib/libc/ssp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2017 05:06:49 -0000 Author: ngie Date: Fri May 12 05:06:48 2017 New Revision: 318210 URL: https://svnweb.freebsd.org/changeset/base/318210 Log: ssp_test:read:: query the value of MAXPATHLEN via getconf(1) In the event the value of PATH_MAX was changed, the assumption that MAXPATHLEN is 1024 (and hence the buffer length required to trigger SSP to fail for read(2)) would be invalidated. Query getconf(1) for the actual value of MAXPATHLEN via _XOPEN_PATH_MAX instead, and increment the value by 1 to ensure that the SSP support tests the stack smashing support properly. MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/contrib/netbsd-tests/lib/libc/ssp/t_ssp.sh Modified: head/contrib/netbsd-tests/lib/libc/ssp/t_ssp.sh ============================================================================== --- head/contrib/netbsd-tests/lib/libc/ssp/t_ssp.sh Fri May 12 04:10:02 2017 (r318209) +++ head/contrib/netbsd-tests/lib/libc/ssp/t_ssp.sh Fri May 12 05:06:48 2017 (r318210) @@ -392,7 +392,8 @@ read_body() h_fail "$prog 1027" "echo bar |" else # End FreeBSD - h_fail "$prog 1025" "echo bar |" + MAX_PATH=$(getconf _XOPEN_MAX_PATH) || atf_fail "getconf failed" + h_fail "$prog $(( $MAX_PATH + 1))" "echo bar |" # Begin FreeBSD fi # End FreeBSD From owner-svn-src-all@freebsd.org Fri May 12 05:17:51 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3E119D68BD1; Fri, 12 May 2017 05:17:51 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0D545D02; Fri, 12 May 2017 05:17:50 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4C5HoxX040444; Fri, 12 May 2017 05:17:50 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4C5Hokj040443; Fri, 12 May 2017 05:17:50 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705120517.v4C5Hokj040443@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 12 May 2017 05:17:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318211 - head/contrib/netbsd-tests/lib/libc/ssp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2017 05:17:51 -0000 Author: ngie Date: Fri May 12 05:17:49 2017 New Revision: 318211 URL: https://svnweb.freebsd.org/changeset/base/318211 Log: Fix up previous commit - Apply the logic to the FreeBSD block - Fix a typo with the getconf(1) call that I would have caught, were it not for the fact that I got the blocks wrong. - Consolidate the hardcoded buffer sizes to the NetBSD block. This would have been discovered had I run the test on a system where PATH_MAX != 1024 (I don't have that at my disposal right at this moment). MFC after: 3 weeks MFC with: r318210 Sponsored by: Dell EMC Isilon Modified: head/contrib/netbsd-tests/lib/libc/ssp/t_ssp.sh Modified: head/contrib/netbsd-tests/lib/libc/ssp/t_ssp.sh ============================================================================== --- head/contrib/netbsd-tests/lib/libc/ssp/t_ssp.sh Fri May 12 05:06:48 2017 (r318210) +++ head/contrib/netbsd-tests/lib/libc/ssp/t_ssp.sh Fri May 12 05:17:49 2017 (r318211) @@ -386,14 +386,15 @@ read_body() { prog="$(atf_get_srcdir)/h_read" - h_pass "$prog 1024" "echo foo |" # Begin FreeBSD if true; then - h_fail "$prog 1027" "echo bar |" + MAX_PATH=$(getconf _XOPEN_PATH_MAX) || atf_fail "getconf failed" + h_pass "$prog $MAX_PATH" "echo foo |" + h_fail "$prog $(( $MAX_PATH + 3 ))" "echo bar |" else # End FreeBSD - MAX_PATH=$(getconf _XOPEN_MAX_PATH) || atf_fail "getconf failed" - h_fail "$prog $(( $MAX_PATH + 1))" "echo bar |" + h_pass "$prog 1024" "echo foo |" + h_fail "$prog 1025" "echo bar |" # Begin FreeBSD fi # End FreeBSD From owner-svn-src-all@freebsd.org Fri May 12 05:19:10 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C0855D68C5F; Fri, 12 May 2017 05:19:10 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 900C2E60; Fri, 12 May 2017 05:19:10 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4C5J99I040544; Fri, 12 May 2017 05:19:09 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4C5J8a2040536; Fri, 12 May 2017 05:19:08 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201705120519.v4C5J8a2040536@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 12 May 2017 05:19:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318212 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2017 05:19:10 -0000 Author: adrian Date: Fri May 12 05:19:08 2017 New Revision: 318212 URL: https://svnweb.freebsd.org/changeset/base/318212 Log: [if_iwm] Partly sync if_iwm_binding.c to Linux iwlwifi code. * Store macid and color values in struct iwm_vap, to avoid hardcoded constants a bit. * Add iwm_mvm_binding_remove_vif() function (will be used in disconnecting from an access point without resetting the whole device). * Not adding code from Linux iwlwifi yet, to handle one PHY context to be bound to several VAPs/virtual-interfaces, it's definitely not needed in the near future. Obtained from: dragonflybsd.git f16ef74977e51e1bfc7a625dd18b98b02158e0e5 Modified: head/sys/dev/iwm/if_iwm.c head/sys/dev/iwm/if_iwm_binding.c head/sys/dev/iwm/if_iwm_binding.h head/sys/dev/iwm/if_iwm_mac_ctxt.c head/sys/dev/iwm/if_iwm_power.c head/sys/dev/iwm/if_iwm_time_event.c head/sys/dev/iwm/if_iwm_time_event.h head/sys/dev/iwm/if_iwmvar.h Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Fri May 12 05:17:49 2017 (r318211) +++ head/sys/dev/iwm/if_iwm.c Fri May 12 05:19:08 2017 (r318212) @@ -4156,7 +4156,7 @@ iwm_auth(struct ieee80211vap *vap, struc } iv->phy_ctxt = &sc->sc_phyctxt[0]; - if ((error = iwm_mvm_binding_update(sc, iv)) != 0) { + if ((error = iwm_mvm_binding_add_vif(sc, iv)) != 0) { device_printf(sc->sc_dev, "%s: binding update cmd\n", __func__); goto out; @@ -4205,7 +4205,7 @@ iwm_auth(struct ieee80211vap *vap, struc */ /* XXX duration is in units of TU, not MS */ duration = IWM_MVM_TE_SESSION_PROTECTION_MAX_TIME_MS; - iwm_mvm_protect_session(sc, in, duration, 500 /* XXX magic number */); + iwm_mvm_protect_session(sc, iv, duration, 500 /* XXX magic number */); DELAY(100); error = 0; @@ -4250,7 +4250,7 @@ iwm_release(struct iwm_softc *sc, struct * iwm_mvm_rm_sta(sc, in); * iwm_mvm_update_quotas(sc, NULL); * iwm_mvm_mac_ctxt_changed(sc, in); - * iwm_mvm_binding_remove_vif(sc, in); + * iwm_mvm_binding_remove_vif(sc, IWM_VAP(in->in_ni.ni_vap)); * iwm_mvm_mac_ctxt_remove(sc, in); * * However, that freezes the device not matter which permutations @@ -4299,7 +4299,7 @@ iwm_release(struct iwm_softc *sc, struct device_printf(sc->sc_dev, "mac ctxt change fail 2 %d\n", error); return error; } - iwm_mvm_binding_remove_vif(sc, in); + iwm_mvm_binding_remove_vif(sc, IWM_VAP(in->in_ni.ni_vap)); iwm_mvm_mac_ctxt_remove(sc, in); @@ -6303,6 +6303,9 @@ iwm_vap_create(struct ieee80211com *ic, ivp->iv_newstate = vap->iv_newstate; vap->iv_newstate = iwm_newstate; + ivp->id = IWM_DEFAULT_MACID; + ivp->color = IWM_DEFAULT_COLOR; + ieee80211_ratectl_init(vap); /* Complete setup. */ ieee80211_vap_attach(vap, iwm_media_change, ieee80211_media_status, Modified: head/sys/dev/iwm/if_iwm_binding.c ============================================================================== --- head/sys/dev/iwm/if_iwm_binding.c Fri May 12 05:17:49 2017 (r318211) +++ head/sys/dev/iwm/if_iwm_binding.c Fri May 12 05:19:08 2017 (r318212) @@ -31,7 +31,7 @@ * * GPL LICENSE SUMMARY * - * Copyright(c) 2007 - 2013 Intel Corporation. All rights reserved. + * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as @@ -51,13 +51,12 @@ * in the file called COPYING. * * Contact Information: - * Intel Linux Wireless + * Intel Linux Wireless * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 * - * * BSD LICENSE * - * Copyright(c) 2005 - 2013 Intel Corporation. All rights reserved. + * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -87,21 +86,6 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/*- - * Copyright (c) 2007-2010 Damien Bergamini - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ #include __FBSDID("$FreeBSD$"); @@ -161,11 +145,21 @@ __FBSDID("$FreeBSD$"); * BEGIN iwlwifi/mvm/binding.c */ -int -iwm_mvm_binding_cmd(struct iwm_softc *sc, struct iwm_vap *ivp, uint32_t action) +struct iwm_mvm_iface_iterator_data { + int idx; + + struct iwm_mvm_phy_ctxt *phyctxt; + + uint16_t ids[IWM_MAX_MACS_IN_BINDING]; + int16_t colors[IWM_MAX_MACS_IN_BINDING]; +}; + +static int +iwm_mvm_binding_cmd(struct iwm_softc *sc, uint32_t action, + struct iwm_mvm_iface_iterator_data *data) { struct iwm_binding_cmd cmd; - struct iwm_mvm_phy_ctxt *phyctxt = ivp->phy_ctxt; + struct iwm_mvm_phy_ctxt *phyctxt = data->phyctxt; int i, ret; uint32_t status; @@ -176,41 +170,88 @@ iwm_mvm_binding_cmd(struct iwm_softc *sc cmd.action = htole32(action); cmd.phy = htole32(IWM_FW_CMD_ID_AND_COLOR(phyctxt->id, phyctxt->color)); - cmd.macs[0] = htole32(IWM_FW_CMD_ID_AND_COLOR(IWM_DEFAULT_MACID, - IWM_DEFAULT_COLOR)); - /* We use MACID 0 here.. */ - for (i = 1; i < IWM_MAX_MACS_IN_BINDING; i++) + for (i = 0; i < IWM_MAX_MACS_IN_BINDING; i++) cmd.macs[i] = htole32(IWM_FW_CTXT_INVALID); + for (i = 0; i < data->idx; i++) + cmd.macs[i] = htole32(IWM_FW_CMD_ID_AND_COLOR(data->ids[i], + data->colors[i])); status = 0; ret = iwm_mvm_send_cmd_pdu_status(sc, IWM_BINDING_CONTEXT_CMD, sizeof(cmd), &cmd, &status); if (ret) { - IWM_DPRINTF(sc, IWM_DEBUG_CMD | IWM_DEBUG_RESET, - "%s: Failed to send binding (action:%d): %d\n", - __func__, action, ret); + device_printf(sc->sc_dev, + "Failed to send binding (action:%d): %d\n", action, ret); return ret; } if (status) { - IWM_DPRINTF(sc, IWM_DEBUG_CMD | IWM_DEBUG_RESET, - "%s: Binding command failed: %u\n", - __func__, - status); + device_printf(sc->sc_dev, + "Binding command failed: %u\n", status); ret = EIO; } return ret; } -int -iwm_mvm_binding_update(struct iwm_softc *sc, struct iwm_vap *ivp) +static int +iwm_mvm_binding_update(struct iwm_softc *sc, struct iwm_vap *ivp, + struct iwm_mvm_phy_ctxt *phyctxt, boolean_t add) { - return iwm_mvm_binding_cmd(sc, ivp, IWM_FW_CTXT_ACTION_MODIFY); + struct iwm_mvm_iface_iterator_data data = { + .phyctxt = phyctxt, + }; + uint32_t action; + + if (add) + action = IWM_FW_CTXT_ACTION_ADD; + else + action = IWM_FW_CTXT_ACTION_REMOVE; + + if (add) { + data.ids[0] = ivp->id; + data.colors[0] = ivp->color; + data.idx++; + } + + return iwm_mvm_binding_cmd(sc, action, &data); } int iwm_mvm_binding_add_vif(struct iwm_softc *sc, struct iwm_vap *ivp) { - return iwm_mvm_binding_cmd(sc, ivp, IWM_FW_CTXT_ACTION_ADD); + if (!ivp->phy_ctxt) + return EINVAL; + +#ifdef notyet + /* + * Update SF - Disable if needed. if this fails, SF might still be on + * while many macs are bound, which is forbidden - so fail the binding. + */ + if (iwm_mvm_sf_update(sc, ivp, FALSE)) + return EINVAL; +#endif + + return iwm_mvm_binding_update(sc, ivp, ivp->phy_ctxt, TRUE); +} + +int +iwm_mvm_binding_remove_vif(struct iwm_softc *sc, struct iwm_vap *ivp) +{ + int ret; + + if (!ivp->phy_ctxt) + return EINVAL; + + ret = iwm_mvm_binding_update(sc, ivp, ivp->phy_ctxt, FALSE); + +#ifdef notyet + if (!ret) { + if (iwm_mvm_sf_update(sc, ivp, TRUE)) + device_printf(sc->sc_dev, + "Failed to update SF state\n"); + } +#endif + + return ret; } Modified: head/sys/dev/iwm/if_iwm_binding.h ============================================================================== --- head/sys/dev/iwm/if_iwm_binding.h Fri May 12 05:17:49 2017 (r318211) +++ head/sys/dev/iwm/if_iwm_binding.h Fri May 12 05:19:08 2017 (r318212) @@ -105,9 +105,7 @@ #ifndef __IF_IWM_BINDING_H__ #define __IF_IWM_BINDING_H__ -extern int iwm_mvm_binding_cmd(struct iwm_softc *sc, struct iwm_vap *ivp, - uint32_t action); -extern int iwm_mvm_binding_update(struct iwm_softc *sc, struct iwm_vap *ivp); extern int iwm_mvm_binding_add_vif(struct iwm_softc *sc, struct iwm_vap *ivp); +extern int iwm_mvm_binding_remove_vif(struct iwm_softc *sc, struct iwm_vap *ivp); #endif /* __IF_IWM_BINDING_H__ */ Modified: head/sys/dev/iwm/if_iwm_mac_ctxt.c ============================================================================== --- head/sys/dev/iwm/if_iwm_mac_ctxt.c Fri May 12 05:17:49 2017 (r318211) +++ head/sys/dev/iwm/if_iwm_mac_ctxt.c Fri May 12 05:19:08 2017 (r318212) @@ -252,6 +252,7 @@ iwm_mvm_mac_ctxt_cmd_common(struct iwm_s struct ieee80211com *ic = &sc->sc_ic; struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps); struct ieee80211_node *ni = vap->iv_bss; + struct iwm_vap *ivp = IWM_VAP(vap); int cck_ack_rates, ofdm_ack_rates; int i; int is2ghz; @@ -263,8 +264,8 @@ iwm_mvm_mac_ctxt_cmd_common(struct iwm_s * These are both functions of the vap, not of the node. * So, for now, hard-code both to 0 (default). */ - cmd->id_and_color = htole32(IWM_FW_CMD_ID_AND_COLOR(IWM_DEFAULT_MACID, - IWM_DEFAULT_COLOR)); + cmd->id_and_color = htole32(IWM_FW_CMD_ID_AND_COLOR(ivp->id, + ivp->color)); cmd->action = htole32(action); cmd->mac_type = htole32(IWM_FW_MAC_TYPE_BSS_STA); Modified: head/sys/dev/iwm/if_iwm_power.c ============================================================================== --- head/sys/dev/iwm/if_iwm_power.c Fri May 12 05:17:49 2017 (r318211) +++ head/sys/dev/iwm/if_iwm_power.c Fri May 12 05:19:08 2017 (r318212) @@ -286,9 +286,10 @@ iwm_mvm_power_build_cmd(struct iwm_softc int keep_alive; struct ieee80211com *ic = &sc->sc_ic; struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps); + struct iwm_vap *ivp = IWM_VAP(vap); - cmd->id_and_color = htole32(IWM_FW_CMD_ID_AND_COLOR(IWM_DEFAULT_MACID, - IWM_DEFAULT_COLOR)); + cmd->id_and_color = htole32(IWM_FW_CMD_ID_AND_COLOR(ivp->id, + ivp->color)); dtimper = vap->iv_dtim_period ?: 1; /* Modified: head/sys/dev/iwm/if_iwm_time_event.c ============================================================================== --- head/sys/dev/iwm/if_iwm_time_event.c Fri May 12 05:17:49 2017 (r318211) +++ head/sys/dev/iwm/if_iwm_time_event.c Fri May 12 05:19:08 2017 (r318212) @@ -166,7 +166,7 @@ __FBSDID("$FreeBSD$"); #define IWM_MVM_ROC_TE_TYPE_MGMT_TX IWM_TE_P2P_CLIENT_ASSOC static int -iwm_mvm_time_event_send_add(struct iwm_softc *sc, struct iwm_node *in, +iwm_mvm_time_event_send_add(struct iwm_softc *sc, struct iwm_vap *ivp, void *te_data, struct iwm_time_event_cmd *te_cmd) { int ret; @@ -186,14 +186,14 @@ iwm_mvm_time_event_send_add(struct iwm_s } void -iwm_mvm_protect_session(struct iwm_softc *sc, struct iwm_node *in, +iwm_mvm_protect_session(struct iwm_softc *sc, struct iwm_vap *ivp, uint32_t duration, uint32_t max_delay) { struct iwm_time_event_cmd time_cmd = {}; time_cmd.action = htole32(IWM_FW_CTXT_ACTION_ADD); time_cmd.id_and_color = - htole32(IWM_FW_CMD_ID_AND_COLOR(IWM_DEFAULT_MACID, IWM_DEFAULT_COLOR)); + htole32(IWM_FW_CMD_ID_AND_COLOR(ivp->id, ivp->color)); time_cmd.id = htole32(IWM_TE_BSS_STA_AGGRESSIVE_ASSOC); time_cmd.apply_time = htole32(0); @@ -209,5 +209,5 @@ iwm_mvm_protect_session(struct iwm_softc IWM_TE_V2_NOTIF_HOST_EVENT_END | IWM_T2_V2_START_IMMEDIATELY); - iwm_mvm_time_event_send_add(sc, in, /*te_data*/NULL, &time_cmd); + iwm_mvm_time_event_send_add(sc, ivp, /*te_data*/NULL, &time_cmd); } Modified: head/sys/dev/iwm/if_iwm_time_event.h ============================================================================== --- head/sys/dev/iwm/if_iwm_time_event.h Fri May 12 05:17:49 2017 (r318211) +++ head/sys/dev/iwm/if_iwm_time_event.h Fri May 12 05:19:08 2017 (r318212) @@ -107,7 +107,7 @@ #ifndef __IF_IWM_TIME_EVENT_H__ #define __IF_IWM_TIME_EVENT_H__ -extern void iwm_mvm_protect_session(struct iwm_softc *sc, struct iwm_node *in, +extern void iwm_mvm_protect_session(struct iwm_softc *sc, struct iwm_vap *ivp, uint32_t duration, uint32_t max_delay); #endif /* __IF_IWM_TIME_EVENT_H__ */ Modified: head/sys/dev/iwm/if_iwmvar.h ============================================================================== --- head/sys/dev/iwm/if_iwmvar.h Fri May 12 05:17:49 2017 (r318211) +++ head/sys/dev/iwm/if_iwmvar.h Fri May 12 05:19:08 2017 (r318212) @@ -375,6 +375,9 @@ struct iwm_vap { enum ieee80211_state, int); struct iwm_mvm_phy_ctxt *phy_ctxt; + + uint16_t id; + uint16_t color; }; #define IWM_VAP(_vap) ((struct iwm_vap *)(_vap)) From owner-svn-src-all@freebsd.org Fri May 12 05:21:03 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A003ED68D2D; Fri, 12 May 2017 05:21:03 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 703A1101A; Fri, 12 May 2017 05:21:03 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4C5L2mG040687; Fri, 12 May 2017 05:21:02 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4C5L2a4040686; Fri, 12 May 2017 05:21:02 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201705120521.v4C5L2a4040686@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 12 May 2017 05:21:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318213 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2017 05:21:03 -0000 Author: adrian Date: Fri May 12 05:21:02 2017 New Revision: 318213 URL: https://svnweb.freebsd.org/changeset/base/318213 Log: [if_iwm] Get rid of another usage of the IWM_DEFAULT_MACID/_COLOR constant. Obtained from: dragonflybsd.git c009badecf7b1389cd86adde9fd35f6113c75b5b Modified: head/sys/dev/iwm/if_iwm.c Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Fri May 12 05:19:08 2017 (r318212) +++ head/sys/dev/iwm/if_iwm.c Fri May 12 05:21:02 2017 (r318213) @@ -3895,6 +3895,7 @@ iwm_mvm_send_add_sta_cmd_status(struct i static int iwm_mvm_sta_send_to_fw(struct iwm_softc *sc, struct iwm_node *in, int update) { + struct iwm_vap *ivp = IWM_VAP(in->in_ni.ni_vap); struct iwm_mvm_add_sta_cmd add_sta_cmd; int ret; uint32_t status; @@ -3903,8 +3904,7 @@ iwm_mvm_sta_send_to_fw(struct iwm_softc add_sta_cmd.sta_id = IWM_STATION_ID; add_sta_cmd.mac_id_n_color - = htole32(IWM_FW_CMD_ID_AND_COLOR(IWM_DEFAULT_MACID, - IWM_DEFAULT_COLOR)); + = htole32(IWM_FW_CMD_ID_AND_COLOR(ivp->id, ivp->color)); if (!update) { int ac; for (ac = 0; ac < WME_NUM_AC; ac++) { From owner-svn-src-all@freebsd.org Fri May 12 05:21:52 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3B9BFD68F08; Fri, 12 May 2017 05:21:52 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0B3731251; Fri, 12 May 2017 05:21:51 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4C5Lpof044458; Fri, 12 May 2017 05:21:51 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4C5LpJt044457; Fri, 12 May 2017 05:21:51 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201705120521.v4C5LpJt044457@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 12 May 2017 05:21:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318214 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2017 05:21:52 -0000 Author: adrian Date: Fri May 12 05:21:50 2017 New Revision: 318214 URL: https://svnweb.freebsd.org/changeset/base/318214 Log: [iwm] Sanity check channel for IEEE80211_CHAN_ANYC in if_iwm_mac_ctxt.c. * This avoids panicing in some broken vap state handling cases. Obtained from: dragonflybsd.git 10d5b77b5421e7cbcc426160edbe858d1d610a29 Modified: head/sys/dev/iwm/if_iwm_mac_ctxt.c Modified: head/sys/dev/iwm/if_iwm_mac_ctxt.c ============================================================================== --- head/sys/dev/iwm/if_iwm_mac_ctxt.c Fri May 12 05:21:02 2017 (r318213) +++ head/sys/dev/iwm/if_iwm_mac_ctxt.c Fri May 12 05:21:50 2017 (r318214) @@ -308,7 +308,7 @@ iwm_mvm_mac_ctxt_cmd_common(struct iwm_s /* * Default to 2ghz if no node information is given. */ - if (in) { + if (in && in->in_ni.ni_chan != IEEE80211_CHAN_ANYC) { is2ghz = !! IEEE80211_IS_CHAN_2GHZ(in->in_ni.ni_chan); } else { is2ghz = 1; From owner-svn-src-all@freebsd.org Fri May 12 05:22:31 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 714FDD68F80; Fri, 12 May 2017 05:22:31 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3E6B415BB; Fri, 12 May 2017 05:22:31 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4C5MUEN044550; Fri, 12 May 2017 05:22:30 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4C5MU2u044549; Fri, 12 May 2017 05:22:30 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201705120522.v4C5MU2u044549@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 12 May 2017 05:22:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318215 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2017 05:22:31 -0000 Author: adrian Date: Fri May 12 05:22:29 2017 New Revision: 318215 URL: https://svnweb.freebsd.org/changeset/base/318215 Log: [iwm] change the check for ADD_STA status, use IWM_ADD_STA_STATUS_MASK. Obtained from: dragonflybsd.git 74d41163ddac72b0d7ea7b7873d53fe134723a12 Modified: head/sys/dev/iwm/if_iwm.c Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Fri May 12 05:21:50 2017 (r318214) +++ head/sys/dev/iwm/if_iwm.c Fri May 12 05:22:29 2017 (r318215) @@ -3925,7 +3925,7 @@ iwm_mvm_sta_send_to_fw(struct iwm_softc if (ret) return ret; - switch (status) { + switch (status & IWM_ADD_STA_STATUS_MASK) { case IWM_ADD_STA_SUCCESS: break; default: @@ -3971,7 +3971,7 @@ iwm_mvm_add_int_sta_common(struct iwm_so if (ret) return ret; - switch (status) { + switch (status & IWM_ADD_STA_STATUS_MASK) { case IWM_ADD_STA_SUCCESS: IWM_DPRINTF(sc, IWM_DEBUG_RESET, "%s: Internal station added.\n", __func__); From owner-svn-src-all@freebsd.org Fri May 12 05:28:51 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 32282D69014; Fri, 12 May 2017 05:28:51 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E70041781; Fri, 12 May 2017 05:28:50 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4C5SnlH044852; Fri, 12 May 2017 05:28:49 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4C5SnmZ044851; Fri, 12 May 2017 05:28:49 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201705120528.v4C5SnmZ044851@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 12 May 2017 05:28:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318216 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2017 05:28:51 -0000 Author: adrian Date: Fri May 12 05:28:49 2017 New Revision: 318216 URL: https://svnweb.freebsd.org/changeset/base/318216 Log: [iwm] Sync iwm_read_firmware()'s loop to iwlwifi's code. Obtained from: dragonflybsd.git d1c10ccfcf2d6d2a664f17197add0b4f93333181 Modified: head/sys/dev/iwm/if_iwm.c Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Fri May 12 05:22:29 2017 (r318215) +++ head/sys/dev/iwm/if_iwm.c Fri May 12 05:28:49 2017 (r318216) @@ -549,12 +549,14 @@ iwm_read_firmware(struct iwm_softc *sc, { struct iwm_fw_info *fw = &sc->sc_fw; const struct iwm_tlv_ucode_header *uhdr; - struct iwm_ucode_tlv tlv; + const struct iwm_ucode_tlv *tlv; struct iwm_ucode_capabilities *capa = &sc->ucode_capa; enum iwm_ucode_tlv_type tlv_type; const struct firmware *fwp; const uint8_t *data; + uint32_t tlv_len; uint32_t usniffer_img; + const uint8_t *tlv_data; uint32_t paging_mem_size; int num_of_cpus; int error = 0; @@ -607,24 +609,20 @@ iwm_read_firmware(struct iwm_softc *sc, goto out; } - snprintf(sc->sc_fwver, sizeof(sc->sc_fwver), "%d.%d (API ver %d)", + snprintf(sc->sc_fwver, sizeof(sc->sc_fwver), "%u.%u (API ver %u)", IWM_UCODE_MAJOR(le32toh(uhdr->ver)), IWM_UCODE_MINOR(le32toh(uhdr->ver)), IWM_UCODE_API(le32toh(uhdr->ver))); data = uhdr->data; len = fw->fw_fp->datasize - sizeof(*uhdr); - while (len >= sizeof(tlv)) { - size_t tlv_len; - const void *tlv_data; - - memcpy(&tlv, data, sizeof(tlv)); - tlv_len = le32toh(tlv.length); - tlv_type = le32toh(tlv.type); - - len -= sizeof(tlv); - data += sizeof(tlv); - tlv_data = data; + while (len >= sizeof(*tlv)) { + len -= sizeof(*tlv); + tlv = (const void *)data; + + tlv_len = le32toh(tlv->length); + tlv_type = le32toh(tlv->type); + tlv_data = tlv->data; if (len < tlv_len) { device_printf(sc->sc_dev, @@ -633,19 +631,21 @@ iwm_read_firmware(struct iwm_softc *sc, error = EINVAL; goto parse_out; } + len -= roundup2(tlv_len, 4); + data += sizeof(tlv) + roundup2(tlv_len, 4); switch ((int)tlv_type) { case IWM_UCODE_TLV_PROBE_MAX_LEN: - if (tlv_len < sizeof(uint32_t)) { + if (tlv_len != sizeof(uint32_t)) { device_printf(sc->sc_dev, - "%s: PROBE_MAX_LEN (%d) < sizeof(uint32_t)\n", + "%s: PROBE_MAX_LEN (%d) != sizeof(uint32_t)\n", __func__, (int) tlv_len); error = EINVAL; goto parse_out; } capa->max_probe_length = - le32toh(*(const uint32_t *)tlv_data); + le32_to_cpup((const uint32_t *)tlv_data); /* limit it to something sensible */ if (capa->max_probe_length > IWM_SCAN_OFFLOAD_PROBE_REQ_SIZE) { @@ -676,6 +676,14 @@ iwm_read_firmware(struct iwm_softc *sc, error = EINVAL; goto parse_out; } + if (tlv_len % sizeof(uint32_t)) { + device_printf(sc->sc_dev, + "%s: IWM_UCODE_TLV_FLAGS: tlv_len (%d) %% sizeof(uint32_t)\n", + __func__, + (int) tlv_len); + error = EINVAL; + goto parse_out; + } /* * Apparently there can be many flags, but Linux driver * parses only the first one, and so do we. @@ -687,7 +695,7 @@ iwm_read_firmware(struct iwm_softc *sc, * 2) TLV_FLAGS contains TLV_FLAGS_PAN * ==> this resets TLV_PAN to itself... hnnnk */ - capa->flags = le32toh(*(const uint32_t *)tlv_data); + capa->flags = le32_to_cpup((const uint32_t *)tlv_data); break; case IWM_UCODE_TLV_CSCHEME: if ((error = iwm_store_cscheme(sc, @@ -708,7 +716,7 @@ iwm_read_firmware(struct iwm_softc *sc, error = EINVAL; goto parse_out; } - num_of_cpus = le32toh(*(const uint32_t *)tlv_data); + num_of_cpus = le32_to_cpup((const uint32_t *)tlv_data); if (num_of_cpus == 2) { fw->fw_sects[IWM_UCODE_REGULAR].is_dual_cpus = TRUE; @@ -782,7 +790,7 @@ iwm_read_firmware(struct iwm_softc *sc, goto parse_out; } sc->sc_fw.phy_config = - le32toh(*(const uint32_t *)tlv_data); + le32_to_cpup((const uint32_t *)tlv_data); sc->sc_fw.valid_tx_ant = (sc->sc_fw.phy_config & IWM_FW_PHY_CFG_TX_CHAIN) >> IWM_FW_PHY_CFG_TX_CHAIN_POS; @@ -833,7 +841,7 @@ iwm_read_firmware(struct iwm_softc *sc, error = EINVAL; goto parse_out; } - paging_mem_size = le32toh(*(const uint32_t *)tlv_data); + paging_mem_size = le32_to_cpup((const uint32_t *)tlv_data); IWM_DPRINTF(sc, IWM_DEBUG_FIRMWARE_TLV, "%s: Paging: paging enabled (size = %u bytes)\n", @@ -866,7 +874,7 @@ iwm_read_firmware(struct iwm_softc *sc, goto parse_out; } capa->n_scan_channels = - le32toh(*(const uint32_t *)tlv_data); + le32_to_cpup((const uint32_t *)tlv_data); break; case IWM_UCODE_TLV_FW_VERSION: @@ -891,9 +899,6 @@ iwm_read_firmware(struct iwm_softc *sc, error = EINVAL; goto parse_out; } - - len -= roundup(tlv_len, 4); - data += roundup(tlv_len, 4); } KASSERT(error == 0, ("unhandled error")); From owner-svn-src-all@freebsd.org Fri May 12 05:30:02 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D672CD69095; Fri, 12 May 2017 05:30:02 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A698018FD; Fri, 12 May 2017 05:30:02 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4C5U1a6044964; Fri, 12 May 2017 05:30:01 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4C5U1mg044963; Fri, 12 May 2017 05:30:01 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201705120530.v4C5U1mg044963@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 12 May 2017 05:30:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318217 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2017 05:30:02 -0000 Author: adrian Date: Fri May 12 05:30:01 2017 New Revision: 318217 URL: https://svnweb.freebsd.org/changeset/base/318217 Log: [iwm] Change UCODE_TLV_API #define-s from bitmasks to indexes. * Fixes oversight from commit 757eecf0e6c92745aa2eee95811e573c8300850e. fw_has_api now uses the isset macro instead of a simple logical-and. Obtained from: dragonflybsd.git c00575de8491dc402abf52c8c7e1cca1ef79e257 Modified: head/sys/dev/iwm/if_iwmreg.h Modified: head/sys/dev/iwm/if_iwmreg.h ============================================================================== --- head/sys/dev/iwm/if_iwmreg.h Fri May 12 05:28:49 2017 (r318216) +++ head/sys/dev/iwm/if_iwmreg.h Fri May 12 05:30:01 2017 (r318217) @@ -669,12 +669,12 @@ P2P_PS_SCM\31UAPSD_SUPPORT\32EBS\33P2P_P * @IWM_NUM_UCODE_TLV_API: number of bits used */ enum iwm_ucode_tlv_api { - IWM_UCODE_TLV_API_FRAGMENTED_SCAN = (1 << 8), - IWM_UCODE_TLV_API_WIFI_MCC_UPDATE = (1 << 9), - IWM_UCODE_TLV_API_WIDE_CMD_HDR = (1 << 14), - IWM_UCODE_TLV_API_LQ_SS_PARAMS = (1 << 18), - IWM_UCODE_TLV_API_EXT_SCAN_PRIORITY = (1 << 24), - IWM_UCODE_TLV_API_TX_POWER_CHAIN = (1 << 27), + IWM_UCODE_TLV_API_FRAGMENTED_SCAN = 8, + IWM_UCODE_TLV_API_WIFI_MCC_UPDATE = 9, + IWM_UCODE_TLV_API_WIDE_CMD_HDR = 14, + IWM_UCODE_TLV_API_LQ_SS_PARAMS = 18, + IWM_UCODE_TLV_API_EXT_SCAN_PRIORITY = 24, + IWM_UCODE_TLV_API_TX_POWER_CHAIN = 27, IWM_NUM_UCODE_TLV_API = 32 }; From owner-svn-src-all@freebsd.org Fri May 12 05:49:26 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 476C6D69421; Fri, 12 May 2017 05:49:26 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1777CED; Fri, 12 May 2017 05:49:26 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4C5nPh6052926; Fri, 12 May 2017 05:49:25 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4C5nO0m052923; Fri, 12 May 2017 05:49:24 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201705120549.v4C5nO0m052923@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 12 May 2017 05:49:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318218 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2017 05:49:26 -0000 Author: adrian Date: Fri May 12 05:49:24 2017 New Revision: 318218 URL: https://svnweb.freebsd.org/changeset/base/318218 Log: [iwm] Process multiple frames per RX buffer. * Factor out iwm_handle_rxb() function from iwm_notif_intr(). * Removing the IWM_FH_RCSR_CHNL0_RX_CONFIG_SINGLE_FRAME_MSK flag allows the device to put multiple frames (both command responses and 80211 frames) into a single RX buffer. * Uses m_copym() to split up the receive buffers when multiple 80211 frames are received in one RX buffer. The effect is basically the same as when using m_split(), but we want to keep the original mbuf around when calling iwm_mvm_rx_rx_mpdu() to make error handling a bit easier for now. * Contains a small optimization to avoid the m_copym() when only a single 80211 frame is received in one RX buffer (i.e. matching the existing behaviour). Obtained from: dragonflybsd.git b5eb43f0280bbcfd26af51cf5a4b8e8ff3590b67 Modified: head/sys/dev/iwm/if_iwm.c head/sys/dev/iwm/if_iwmreg.h head/sys/dev/iwm/if_iwmvar.h Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Fri May 12 05:30:01 2017 (r318217) +++ head/sys/dev/iwm/if_iwm.c Fri May 12 05:49:24 2017 (r318218) @@ -169,6 +169,9 @@ __FBSDID("$FreeBSD$"); #include #include +/* From DragonflyBSD */ +#define mtodoff(m, t, off) ((t)((m)->m_data + (off))) + const uint8_t iwm_nvm_channels[] = { /* 2.4 GHz */ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, @@ -320,16 +323,15 @@ static int iwm_rx_addbuf(struct iwm_soft static int iwm_mvm_get_signal_strength(struct iwm_softc *, struct iwm_rx_phy_info *); static void iwm_mvm_rx_rx_phy_cmd(struct iwm_softc *, - struct iwm_rx_packet *, - struct iwm_rx_data *); + struct iwm_rx_packet *); static int iwm_get_noise(struct iwm_softc *sc, const struct iwm_mvm_statistics_rx_non_phy *); -static void iwm_mvm_rx_rx_mpdu(struct iwm_softc *, struct mbuf *); +static boolean_t iwm_mvm_rx_rx_mpdu(struct iwm_softc *, struct mbuf *, + uint32_t, boolean_t); static int iwm_mvm_rx_tx_cmd_single(struct iwm_softc *, struct iwm_rx_packet *, struct iwm_node *); -static void iwm_mvm_rx_tx_cmd(struct iwm_softc *, struct iwm_rx_packet *, - struct iwm_rx_data *); +static void iwm_mvm_rx_tx_cmd(struct iwm_softc *, struct iwm_rx_packet *); static void iwm_cmd_done(struct iwm_softc *, struct iwm_rx_packet *); #if 0 static void iwm_update_sched(struct iwm_softc *, int, int, uint8_t, @@ -385,6 +387,7 @@ static const char * static void iwm_nic_error(struct iwm_softc *); static void iwm_nic_umac_error(struct iwm_softc *); #endif +static void iwm_handle_rxb(struct iwm_softc *, struct mbuf *); static void iwm_notif_intr(struct iwm_softc *); static void iwm_intr(void *); static int iwm_attach(device_t); @@ -1432,14 +1435,21 @@ iwm_nic_rx_init(struct iwm_softc *sc) IWM_WRITE(sc, IWM_FH_RSCSR_CHNL0_STTS_WPTR_REG, sc->rxq.stat_dma.paddr >> 4); - /* Enable RX. */ + /* Enable Rx DMA + * XXX 5000 HW isn't supported by the iwm(4) driver. + * IWM_FH_RCSR_CHNL0_RX_IGNORE_RXF_EMPTY is set because of HW bug in + * the credit mechanism in 5000 HW RX FIFO + * Direct rx interrupts to hosts + * Rx buffer size 4 or 8k or 12k + * RB timeout 0x10 + * 256 RBDs + */ IWM_WRITE(sc, IWM_FH_MEM_RCSR_CHNL0_CONFIG_REG, IWM_FH_RCSR_RX_CONFIG_CHNL_EN_ENABLE_VAL | IWM_FH_RCSR_CHNL0_RX_IGNORE_RXF_EMPTY | /* HW bug */ IWM_FH_RCSR_CHNL0_RX_CONFIG_IRQ_DEST_INT_HOST_VAL | - IWM_FH_RCSR_CHNL0_RX_CONFIG_SINGLE_FRAME_MSK | - (IWM_RX_RB_TIMEOUT << IWM_FH_RCSR_RX_CONFIG_REG_IRQ_RBTH_POS) | IWM_FH_RCSR_RX_CONFIG_REG_VAL_RB_SIZE_4K | + (IWM_RX_RB_TIMEOUT << IWM_FH_RCSR_RX_CONFIG_REG_IRQ_RBTH_POS) | IWM_RX_QUEUE_SIZE_LOG << IWM_FH_RCSR_RX_CONFIG_RBDCB_SIZE_POS); IWM_WRITE_1(sc, IWM_CSR_INT_COALESCING, IWM_HOST_INT_TIMEOUT_DEF); @@ -3126,13 +3136,11 @@ iwm_mvm_get_signal_strength(struct iwm_s } static void -iwm_mvm_rx_rx_phy_cmd(struct iwm_softc *sc, - struct iwm_rx_packet *pkt, struct iwm_rx_data *data) +iwm_mvm_rx_rx_phy_cmd(struct iwm_softc *sc, struct iwm_rx_packet *pkt) { struct iwm_rx_phy_info *phy_info = (void *)pkt->data; IWM_DPRINTF(sc, IWM_DEBUG_RECV, "received PHY stats\n"); - bus_dmamap_sync(sc->rxq.data_dmat, data->map, BUS_DMASYNC_POSTREAD); memcpy(&sc->sc_last_phy_info, phy_info, sizeof(sc->sc_last_phy_info)); } @@ -3176,8 +3184,9 @@ iwm_get_noise(struct iwm_softc *sc, * * Handles the actual data of the Rx packet from the fw */ -static void -iwm_mvm_rx_rx_mpdu(struct iwm_softc *sc, struct mbuf *m) +static boolean_t +iwm_mvm_rx_rx_mpdu(struct iwm_softc *sc, struct mbuf *m, uint32_t offset, + boolean_t stolen) { struct ieee80211com *ic = &sc->sc_ic; struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps); @@ -3186,7 +3195,7 @@ iwm_mvm_rx_rx_mpdu(struct iwm_softc *sc, struct ieee80211_rx_stats rxs; struct iwm_rx_phy_info *phy_info; struct iwm_rx_mpdu_res_start *rx_res; - struct iwm_rx_packet *pkt = mtod(m, struct iwm_rx_packet *); + struct iwm_rx_packet *pkt = mtodoff(m, struct iwm_rx_packet *, offset); uint32_t len; uint32_t rx_pkt_status; int rssi; @@ -3217,7 +3226,7 @@ iwm_mvm_rx_rx_mpdu(struct iwm_softc *sc, rssi = rssi - sc->sc_noise; /* replenish ring for the buffer we're going to feed to the sharks */ - if (iwm_rx_addbuf(sc, IWM_RBUF_SIZE, sc->rxq.cur) != 0) { + if (!stolen && iwm_rx_addbuf(sc, IWM_RBUF_SIZE, sc->rxq.cur) != 0) { device_printf(sc->sc_dev, "%s: unable to add more buffers\n", __func__); goto fail; @@ -3302,10 +3311,11 @@ iwm_mvm_rx_rx_mpdu(struct iwm_softc *sc, } IWM_LOCK(sc); - return; + return TRUE; fail: counter_u64_add(ic->ic_ierrors, 1); + return FALSE; } static int @@ -3360,8 +3370,7 @@ iwm_mvm_rx_tx_cmd_single(struct iwm_soft } static void -iwm_mvm_rx_tx_cmd(struct iwm_softc *sc, - struct iwm_rx_packet *pkt, struct iwm_rx_data *data) +iwm_mvm_rx_tx_cmd(struct iwm_softc *sc, struct iwm_rx_packet *pkt) { struct iwm_cmd_header *cmd_hdr = &pkt->hdr; int idx = cmd_hdr->idx; @@ -3376,8 +3385,6 @@ iwm_mvm_rx_tx_cmd(struct iwm_softc *sc, KASSERT(txd->in != NULL, ("txd without node")); KASSERT(txd->m != NULL, ("txd without mbuf")); - bus_dmamap_sync(ring->data_dmat, data->map, BUS_DMASYNC_POSTREAD); - sc->sc_tx_timer = 0; status = iwm_mvm_rx_tx_cmd_single(sc, pkt, in); @@ -5379,68 +5386,95 @@ iwm_nic_error(struct iwm_softc *sc) } #endif -#define ADVANCE_RXQ(sc) (sc->rxq.cur = (sc->rxq.cur + 1) % IWM_RX_RING_COUNT); - -/* - * Process an IWM_CSR_INT_BIT_FH_RX or IWM_CSR_INT_BIT_SW_RX interrupt. - * Basic structure from if_iwn - */ static void -iwm_notif_intr(struct iwm_softc *sc) +iwm_handle_rxb(struct iwm_softc *sc, struct mbuf *m) { struct ieee80211com *ic = &sc->sc_ic; - uint16_t hw; - - bus_dmamap_sync(sc->rxq.stat_dma.tag, sc->rxq.stat_dma.map, - BUS_DMASYNC_POSTREAD); - - hw = le16toh(sc->rxq.stat->closed_rb_num) & 0xfff; - - /* - * Process responses - */ - while (sc->rxq.cur != hw) { - struct iwm_rx_ring *ring = &sc->rxq; - struct iwm_rx_data *data = &ring->data[ring->cur]; - struct iwm_rx_packet *pkt; - struct iwm_cmd_response *cresp; - int qid, idx, code; - - bus_dmamap_sync(ring->data_dmat, data->map, - BUS_DMASYNC_POSTREAD); - pkt = mtod(data->m, struct iwm_rx_packet *); + struct iwm_cmd_response *cresp; + struct mbuf *m1; + uint32_t offset = 0; + uint32_t maxoff = IWM_RBUF_SIZE; + uint32_t nextoff; + boolean_t stolen = FALSE; + +#define HAVEROOM(a) \ + ((a) + sizeof(uint32_t) + sizeof(struct iwm_cmd_header) < maxoff) + + while (HAVEROOM(offset)) { + struct iwm_rx_packet *pkt = mtodoff(m, struct iwm_rx_packet *, + offset); + int qid, idx, code, len; - qid = pkt->hdr.qid & ~0x80; + qid = pkt->hdr.qid; idx = pkt->hdr.idx; code = IWM_WIDE_ID(pkt->hdr.flags, pkt->hdr.code); - IWM_DPRINTF(sc, IWM_DEBUG_INTR, - "rx packet qid=%d idx=%d type=%x %d %d\n", - pkt->hdr.qid & ~0x80, pkt->hdr.idx, code, ring->cur, hw); /* * randomly get these from the firmware, no idea why. * they at least seem harmless, so just ignore them for now */ - if (__predict_false((pkt->hdr.code == 0 && qid == 0 && idx == 0) - || pkt->len_n_flags == htole32(0x55550000))) { - ADVANCE_RXQ(sc); - continue; + if ((pkt->hdr.code == 0 && (qid & ~0x80) == 0 && idx == 0) || + pkt->len_n_flags == htole32(IWM_FH_RSCSR_FRAME_INVALID)) { + break; } + IWM_DPRINTF(sc, IWM_DEBUG_INTR, + "rx packet qid=%d idx=%d type=%x\n", + qid & ~0x80, pkt->hdr.idx, code); + + len = le32toh(pkt->len_n_flags) & IWM_FH_RSCSR_FRAME_SIZE_MSK; + len += sizeof(uint32_t); /* account for status word */ + nextoff = offset + roundup2(len, IWM_FH_RSCSR_FRAME_ALIGN); + iwm_notification_wait_notify(sc->sc_notif_wait, code, pkt); switch (code) { case IWM_REPLY_RX_PHY_CMD: - iwm_mvm_rx_rx_phy_cmd(sc, pkt, data); + iwm_mvm_rx_rx_phy_cmd(sc, pkt); break; - case IWM_REPLY_RX_MPDU_CMD: - iwm_mvm_rx_rx_mpdu(sc, data->m); + case IWM_REPLY_RX_MPDU_CMD: { + /* + * If this is the last frame in the RX buffer, we + * can directly feed the mbuf to the sharks here. + */ + struct iwm_rx_packet *nextpkt = mtodoff(m, + struct iwm_rx_packet *, nextoff); + if (!HAVEROOM(nextoff) || + (nextpkt->hdr.code == 0 && + (nextpkt->hdr.qid & ~0x80) == 0 && + nextpkt->hdr.idx == 0) || + (nextpkt->len_n_flags == + htole32(IWM_FH_RSCSR_FRAME_INVALID))) { + if (iwm_mvm_rx_rx_mpdu(sc, m, offset, stolen)) { + stolen = FALSE; + /* Make sure we abort the loop */ + nextoff = maxoff; + } + break; + } + + /* + * Use m_copym instead of m_split, because that + * makes it easier to keep a valid rx buffer in + * the ring, when iwm_mvm_rx_rx_mpdu() fails. + * + * We need to start m_copym() at offset 0, to get the + * M_PKTHDR flag preserved. + */ + m1 = m_copym(m, 0, M_COPYALL, M_NOWAIT); + if (m1) { + if (iwm_mvm_rx_rx_mpdu(sc, m1, offset, stolen)) + stolen = TRUE; + else + m_freem(m1); + } break; + } case IWM_TX_CMD: - iwm_mvm_rx_tx_cmd(sc, pkt, data); + iwm_mvm_rx_tx_cmd(sc, pkt); break; case IWM_MISSED_BEACONS_NOTIFICATION: { @@ -5501,7 +5535,7 @@ iwm_notif_intr(struct iwm_softc *sc) case IWM_NVM_ACCESS_CMD: case IWM_MCC_UPDATE_CMD: - if (sc->sc_wantresp == ((qid << 16) | idx)) { + if (sc->sc_wantresp == (((qid & ~0x80) << 16) | idx)) { memcpy(sc->sc_cmd_resp, pkt, sizeof(sc->sc_cmd_resp)); } @@ -5561,7 +5595,7 @@ iwm_notif_intr(struct iwm_softc *sc) case IWM_BT_CONFIG: case IWM_REPLY_THERMAL_MNG_BACKOFF: cresp = (void *)pkt->data; - if (sc->sc_wantresp == ((qid << 16) | idx)) { + if (sc->sc_wantresp == (((qid & ~0x80) << 16) | idx)) { memcpy(sc->sc_cmd_resp, pkt, sizeof(*pkt)+sizeof(*cresp)); } @@ -5645,7 +5679,7 @@ iwm_notif_intr(struct iwm_softc *sc) default: device_printf(sc->sc_dev, "frame %d/%d %x UNHANDLED (this should " - "not happen)\n", qid, idx, + "not happen)\n", qid & ~0x80, idx, pkt->len_n_flags); break; } @@ -5664,20 +5698,55 @@ iwm_notif_intr(struct iwm_softc *sc) * uses a slightly different format for pkt->hdr, and "qid" * is actually the upper byte of a two-byte field. */ - if (!(pkt->hdr.qid & (1 << 7))) { + if (!(qid & (1 << 7))) iwm_cmd_done(sc, pkt); - } - ADVANCE_RXQ(sc); + offset = nextoff; + } + if (stolen) + m_freem(m); +#undef HAVEROOM +} + +/* + * Process an IWM_CSR_INT_BIT_FH_RX or IWM_CSR_INT_BIT_SW_RX interrupt. + * Basic structure from if_iwn + */ +static void +iwm_notif_intr(struct iwm_softc *sc) +{ + uint16_t hw; + + bus_dmamap_sync(sc->rxq.stat_dma.tag, sc->rxq.stat_dma.map, + BUS_DMASYNC_POSTREAD); + + hw = le16toh(sc->rxq.stat->closed_rb_num) & 0xfff; + + /* + * Process responses + */ + while (sc->rxq.cur != hw) { + struct iwm_rx_ring *ring = &sc->rxq; + struct iwm_rx_data *data = &ring->data[ring->cur]; + + bus_dmamap_sync(ring->data_dmat, data->map, + BUS_DMASYNC_POSTREAD); + + IWM_DPRINTF(sc, IWM_DEBUG_INTR, + "%s: hw = %d cur = %d\n", __func__, hw, ring->cur); + iwm_handle_rxb(sc, data->m); + + ring->cur = (ring->cur + 1) % IWM_RX_RING_COUNT; } /* - * Tell the firmware what we have processed. + * Tell the firmware that it can reuse the ring entries that + * we have just processed. * Seems like the hardware gets upset unless we align * the write by 8?? */ hw = (hw == 0) ? IWM_RX_RING_COUNT - 1 : hw - 1; - IWM_WRITE(sc, IWM_FH_RSCSR_CHNL0_WPTR, hw & ~7); + IWM_WRITE(sc, IWM_FH_RSCSR_CHNL0_WPTR, rounddown2(hw, 8)); } static void Modified: head/sys/dev/iwm/if_iwmreg.h ============================================================================== --- head/sys/dev/iwm/if_iwmreg.h Fri May 12 05:30:01 2017 (r318217) +++ head/sys/dev/iwm/if_iwmreg.h Fri May 12 05:49:24 2017 (r318218) @@ -5979,16 +5979,9 @@ struct iwm_dts_measurement_notif_v2 { #define IWM_FRAME_LIMIT 64 /* - * From Linux commit ab02165ccec4c78162501acedeef1a768acdb811: - * As the firmware is slowly running out of command IDs and grouping of - * commands is desirable anyway, the firmware is extending the command - * header from 4 bytes to 8 bytes to introduce a group (in place of the - * former flags field, since that's always 0 on commands and thus can - * be easily used to distinguish between the two). - * * These functions retrieve specific information from the id field in * the iwm_host_cmd struct which contains the command id, the group id, - * and the version of the command. + * and the version of the command and vice versa. */ static inline uint8_t iwm_cmd_opcode(uint32_t cmdid) @@ -5999,7 +5992,7 @@ iwm_cmd_opcode(uint32_t cmdid) static inline uint8_t iwm_cmd_groupid(uint32_t cmdid) { - return ((cmdid & 0Xff00) >> 8); + return ((cmdid & 0xff00) >> 8); } static inline uint8_t @@ -6092,6 +6085,8 @@ struct iwm_rx_packet { } __packed; #define IWM_FH_RSCSR_FRAME_SIZE_MSK 0x00003fff +#define IWM_FH_RSCSR_FRAME_INVALID 0x55550000 +#define IWM_FH_RSCSR_FRAME_ALIGN 0x40 static inline uint32_t iwm_rx_packet_len(const struct iwm_rx_packet *pkt) Modified: head/sys/dev/iwm/if_iwmvar.h ============================================================================== --- head/sys/dev/iwm/if_iwmvar.h Fri May 12 05:30:01 2017 (r318217) +++ head/sys/dev/iwm/if_iwmvar.h Fri May 12 05:49:24 2017 (r318218) @@ -304,7 +304,6 @@ struct iwm_tx_ring { }; #define IWM_RX_RING_COUNT 256 -#define IWM_RBUF_COUNT (IWM_RX_RING_COUNT + 32) /* Linux driver optionally uses 8k buffer */ #define IWM_RBUF_SIZE 4096 From owner-svn-src-all@freebsd.org Fri May 12 05:50:40 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0D773D694C1; Fri, 12 May 2017 05:50:40 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C22E527E; Fri, 12 May 2017 05:50:39 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4C5ocnH053034; Fri, 12 May 2017 05:50:38 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4C5ocfa053030; Fri, 12 May 2017 05:50:38 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201705120550.v4C5ocfa053030@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 12 May 2017 05:50:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318219 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2017 05:50:40 -0000 Author: adrian Date: Fri May 12 05:50:38 2017 New Revision: 318219 URL: https://svnweb.freebsd.org/changeset/base/318219 Log: [iwm] Properly implement iwm_wme_update callback function. * Inspired by iwn(4) and Linux iwlwifi. * Read wme parameters into a buffer within struct iwm_vap in iwm_wme_update(). * If we aren't associated yet, the new settings will soon be sent by iwm_mvm_mac_ctxt_changed() during association. * If we are already associated, explicitly call iwm_mvm_mac_ctxt_changed() from iwm_wme_update() to send the new settings to the firmware. * Change iwm_mvm_ac_to_tx_fifo mapping, to fit the freebsd net80211 WME stream class numbering, instead of Linux's enum ieee80211_ac_numbers. Obtained from: dragonflybsd.git b8bd6cd746d1f45e616ccfcbeed06dfe452a1108 Modified: head/sys/dev/iwm/if_iwm.c head/sys/dev/iwm/if_iwm_mac_ctxt.c head/sys/dev/iwm/if_iwm_mac_ctxt.h head/sys/dev/iwm/if_iwmvar.h Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Fri May 12 05:49:24 2017 (r318218) +++ head/sys/dev/iwm/if_iwm.c Fri May 12 05:50:38 2017 (r318219) @@ -1533,13 +1533,6 @@ iwm_nic_init(struct iwm_softc *sc) return 0; } -const uint8_t iwm_mvm_ac_to_tx_fifo[] = { - IWM_MVM_TX_FIFO_VO, - IWM_MVM_TX_FIFO_VI, - IWM_MVM_TX_FIFO_BE, - IWM_MVM_TX_FIFO_BK, -}; - static int iwm_enable_txq(struct iwm_softc *sc, int sta_id, int qid, int fifo) { @@ -4258,7 +4251,7 @@ iwm_release(struct iwm_softc *sc, struct * from RUN back to SCAN is: * * iwm_mvm_power_mac_disable(sc, in); - * iwm_mvm_mac_ctxt_changed(sc, in); + * iwm_mvm_mac_ctxt_changed(sc, vap); * iwm_mvm_rm_sta(sc, in); * iwm_mvm_update_quotas(sc, NULL); * iwm_mvm_mac_ctxt_changed(sc, in); @@ -4295,7 +4288,7 @@ iwm_release(struct iwm_softc *sc, struct iwm_mvm_power_mac_disable(sc, in); - if ((error = iwm_mvm_mac_ctxt_changed(sc, in)) != 0) { + if ((error = iwm_mvm_mac_ctxt_changed(sc, vap)) != 0) { device_printf(sc->sc_dev, "mac ctxt change fail 1 %d\n", error); return error; } @@ -4307,7 +4300,7 @@ iwm_release(struct iwm_softc *sc, struct error = iwm_mvm_rm_sta(sc, in); in->in_assoc = 0; iwm_mvm_update_quotas(sc, NULL); - if ((error = iwm_mvm_mac_ctxt_changed(sc, in)) != 0) { + if ((error = iwm_mvm_mac_ctxt_changed(sc, vap)) != 0) { device_printf(sc->sc_dev, "mac ctxt change fail 2 %d\n", error); return error; } @@ -6260,12 +6253,47 @@ iwm_is_valid_ether_addr(uint8_t *addr) } static int -iwm_update_edca(struct ieee80211com *ic) +iwm_wme_update(struct ieee80211com *ic) { +#define IWM_EXP2(x) ((1 << (x)) - 1) /* CWmin = 2^ECWmin - 1 */ struct iwm_softc *sc = ic->ic_softc; + struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps); + struct iwm_vap *ivp = IWM_VAP(vap); + struct iwm_node *in; + struct wmeParams tmp[WME_NUM_AC]; + int aci, error; + + if (vap == NULL) + return (0); + + IEEE80211_LOCK(ic); + for (aci = 0; aci < WME_NUM_AC; aci++) + tmp[aci] = ic->ic_wme.wme_chanParams.cap_wmeParams[aci]; + IEEE80211_UNLOCK(ic); + + IWM_LOCK(sc); + for (aci = 0; aci < WME_NUM_AC; aci++) { + const struct wmeParams *ac = &tmp[aci]; + ivp->queue_params[aci].aifsn = ac->wmep_aifsn; + ivp->queue_params[aci].cw_min = IWM_EXP2(ac->wmep_logcwmin); + ivp->queue_params[aci].cw_max = IWM_EXP2(ac->wmep_logcwmax); + ivp->queue_params[aci].edca_txop = + IEEE80211_TXOP_TO_US(ac->wmep_txopLimit); + } + ivp->have_wme = TRUE; + if (ivp->is_uploaded && vap->iv_bss != NULL) { + in = IWM_NODE(vap->iv_bss); + if (in->in_assoc) { + if ((error = iwm_mvm_mac_ctxt_changed(sc, vap)) != 0) { + device_printf(sc->sc_dev, + "%s: failed to update MAC\n", __func__); + } + } + } + IWM_UNLOCK(sc); - device_printf(sc->sc_dev, "%s: called\n", __func__); return (0); +#undef IWM_EXP2 } static void @@ -6322,7 +6350,7 @@ iwm_preinit(void *arg) ic->ic_set_channel = iwm_set_channel; ic->ic_scan_curchan = iwm_scan_curchan; ic->ic_scan_mindwell = iwm_scan_mindwell; - ic->ic_wme.wme_update = iwm_update_edca; + ic->ic_wme.wme_update = iwm_wme_update; ic->ic_parent = iwm_parent; ic->ic_transmit = iwm_transmit; iwm_radiotap_attach(sc); @@ -6380,6 +6408,8 @@ iwm_vap_create(struct ieee80211com *ic, ivp->id = IWM_DEFAULT_MACID; ivp->color = IWM_DEFAULT_COLOR; + ivp->have_wme = FALSE; + ieee80211_ratectl_init(vap); /* Complete setup. */ ieee80211_vap_attach(vap, iwm_media_change, ieee80211_media_status, Modified: head/sys/dev/iwm/if_iwm_mac_ctxt.c ============================================================================== --- head/sys/dev/iwm/if_iwm_mac_ctxt.c Fri May 12 05:49:24 2017 (r318218) +++ head/sys/dev/iwm/if_iwm_mac_ctxt.c Fri May 12 05:50:38 2017 (r318219) @@ -161,6 +161,13 @@ __FBSDID("$FreeBSD$"); * BEGIN mvm/mac-ctxt.c */ +const uint8_t iwm_mvm_ac_to_tx_fifo[] = { + IWM_MVM_TX_FIFO_BE, + IWM_MVM_TX_FIFO_BK, + IWM_MVM_TX_FIFO_VI, + IWM_MVM_TX_FIFO_VO, +}; + static void iwm_mvm_ack_rates(struct iwm_softc *sc, int is2ghz, int *cck_rates, int *ofdm_rates, struct iwm_node *in) @@ -329,17 +336,20 @@ iwm_mvm_mac_ctxt_cmd_common(struct iwm_s * cmd->qos_flags |= cpu_to_le32(MAC_QOS_FLG_UPDATE_EDCA) */ - /* XXX TODO: set wme parameters; also handle getting updated wme parameters */ - for (i = 0; i < IWM_AC_NUM+1; i++) { - int txf = i; - - cmd->ac[txf].cw_min = htole16(0x0f); - cmd->ac[txf].cw_max = htole16(0x3f); - cmd->ac[txf].aifsn = 1; + for (i = 0; i < WME_NUM_AC; i++) { + uint8_t txf = iwm_mvm_ac_to_tx_fifo[i]; + + cmd->ac[txf].cw_min = htole16(ivp->queue_params[i].cw_min); + cmd->ac[txf].cw_max = htole16(ivp->queue_params[i].cw_max); + cmd->ac[txf].edca_txop = + htole16(ivp->queue_params[i].edca_txop); + cmd->ac[txf].aifsn = ivp->queue_params[i].aifsn; cmd->ac[txf].fifos_mask = (1 << txf); - cmd->ac[txf].edca_txop = 0; } + if (ivp->have_wme) + cmd->qos_flags |= htole32(IWM_MAC_QOS_FLG_UPDATE_EDCA); + if (ic->ic_flags & IEEE80211_F_USEPROT) cmd->protection_flags |= htole32(IWM_MAC_PROT_FLG_TGG_PROTECT); Modified: head/sys/dev/iwm/if_iwm_mac_ctxt.h ============================================================================== --- head/sys/dev/iwm/if_iwm_mac_ctxt.h Fri May 12 05:49:24 2017 (r318218) +++ head/sys/dev/iwm/if_iwm_mac_ctxt.h Fri May 12 05:50:38 2017 (r318219) @@ -106,6 +106,8 @@ #ifndef __IF_IWM_MAC_CTXT_H__ #define __IF_IWM_MAC_CTXT_H__ +extern const uint8_t iwm_mvm_ac_to_tx_fifo[]; + extern int iwm_mvm_mac_ctxt_add(struct iwm_softc *sc, struct ieee80211vap *vap); extern int iwm_mvm_mac_ctxt_changed(struct iwm_softc *sc, struct ieee80211vap *vap); extern int iwm_mvm_mac_ctxt_remove(struct iwm_softc *sc, struct ieee80211vap *vap); Modified: head/sys/dev/iwm/if_iwmvar.h ============================================================================== --- head/sys/dev/iwm/if_iwmvar.h Fri May 12 05:49:24 2017 (r318218) +++ head/sys/dev/iwm/if_iwmvar.h Fri May 12 05:50:38 2017 (r318219) @@ -377,6 +377,19 @@ struct iwm_vap { uint16_t id; uint16_t color; + + boolean_t have_wme; + /* + * QoS data from net80211, need to store this here + * as net80211 has a separate callback but we need + * to have the data for the MAC context + */ + struct { + uint16_t cw_min; + uint16_t cw_max; + uint16_t edca_txop; + uint8_t aifsn; + } queue_params[WME_NUM_AC]; }; #define IWM_VAP(_vap) ((struct iwm_vap *)(_vap)) From owner-svn-src-all@freebsd.org Fri May 12 05:51:51 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6E57ED696C6; Fri, 12 May 2017 05:51:51 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49CBF76D; Fri, 12 May 2017 05:51:51 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4C5polX056802; Fri, 12 May 2017 05:51:50 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4C5poVn056801; Fri, 12 May 2017 05:51:50 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201705120551.v4C5poVn056801@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 12 May 2017 05:51:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318220 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2017 05:51:51 -0000 Author: adrian Date: Fri May 12 05:51:50 2017 New Revision: 318220 URL: https://svnweb.freebsd.org/changeset/base/318220 Log: [iwm] No need for iwm_assoc() in AUTH->ASSOC transition. * Hence no need to keep stuff in separate iwm_assoc() function, just inline the stuff into iwm_newstate(). Obtained from: dragonflybsd.git e8f7d88e0d030f138f95ecdb7c1a729d9fb0d6ab Modified: head/sys/dev/iwm/if_iwm.c Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Fri May 12 05:50:38 2017 (r318219) +++ head/sys/dev/iwm/if_iwm.c Fri May 12 05:51:50 2017 (r318220) @@ -359,7 +359,6 @@ static int iwm_mvm_add_int_sta_common(st static int iwm_mvm_add_aux_sta(struct iwm_softc *); static int iwm_mvm_update_quotas(struct iwm_softc *, struct iwm_vap *); static int iwm_auth(struct ieee80211vap *, struct iwm_softc *); -static int iwm_assoc(struct ieee80211vap *, struct iwm_softc *); static int iwm_release(struct iwm_softc *, struct iwm_node *); static struct ieee80211_node * iwm_node_alloc(struct ieee80211vap *, @@ -4166,9 +4165,9 @@ iwm_auth(struct ieee80211vap *vap, struc "%s: binding update cmd\n", __func__); goto out; } - if ((error = iwm_mvm_update_sta(sc, in)) != 0) { + if ((error = iwm_mvm_add_sta(sc, in)) != 0) { device_printf(sc->sc_dev, - "%s: failed to update sta\n", __func__); + "%s: failed to add sta\n", __func__); goto out; } } else { @@ -4220,28 +4219,6 @@ out: } static int -iwm_assoc(struct ieee80211vap *vap, struct iwm_softc *sc) -{ - struct iwm_node *in = IWM_NODE(vap->iv_bss); - int error; - - if ((error = iwm_mvm_update_sta(sc, in)) != 0) { - device_printf(sc->sc_dev, - "%s: failed to update STA\n", __func__); - return error; - } - - in->in_assoc = 1; - if ((error = iwm_mvm_mac_ctxt_changed(sc, vap)) != 0) { - device_printf(sc->sc_dev, - "%s: failed to update MAC\n", __func__); - return error; - } - - return 0; -} - -static int iwm_release(struct iwm_softc *sc, struct iwm_node *in) { uint32_t tfd_msk; @@ -4556,7 +4533,6 @@ iwm_newstate(struct ieee80211vap *vap, e device_printf(sc->sc_dev, "%s: could not move to auth state: %d\n", __func__, error); - break; } break; @@ -4565,13 +4541,7 @@ iwm_newstate(struct ieee80211vap *vap, e * EBS may be disabled due to previous failures reported by FW. * Reset EBS status here assuming environment has been changed. */ - sc->last_ebs_successful = TRUE; - if ((error = iwm_assoc(vap, sc)) != 0) { - device_printf(sc->sc_dev, - "%s: failed to associate: %d\n", __func__, - error); - break; - } + sc->last_ebs_successful = TRUE; break; case IEEE80211_S_RUN: @@ -4582,18 +4552,24 @@ iwm_newstate(struct ieee80211vap *vap, e .flags = IWM_CMD_SYNC, }; + in = IWM_NODE(vap->iv_bss); /* Update the association state, now we have it all */ /* (eg associd comes in at this point */ - error = iwm_assoc(vap, sc); + error = iwm_mvm_update_sta(sc, in); if (error != 0) { device_printf(sc->sc_dev, - "%s: failed to update association state: %d\n", - __func__, - error); - break; + "%s: failed to update STA\n", __func__); + IWM_UNLOCK(sc); + IEEE80211_LOCK(ic); + return error; + } + in->in_assoc = 1; + error = iwm_mvm_mac_ctxt_changed(sc, vap); + if (error != 0) { + device_printf(sc->sc_dev, + "%s: failed to update MAC: %d\n", __func__, error); } - in = IWM_NODE(vap->iv_bss); iwm_mvm_enable_beacon_filter(sc, in); iwm_mvm_power_update_mac(sc); iwm_mvm_update_quotas(sc, ivp); From owner-svn-src-all@freebsd.org Fri May 12 05:53:29 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A73BAD69739; Fri, 12 May 2017 05:53:29 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5D84FA68; Fri, 12 May 2017 05:53:29 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4C5rSHD056908; Fri, 12 May 2017 05:53:28 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4C5rSOI056907; Fri, 12 May 2017 05:53:28 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201705120553.v4C5rSOI056907@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 12 May 2017 05:53:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318221 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2017 05:53:29 -0000 Author: adrian Date: Fri May 12 05:53:28 2017 New Revision: 318221 URL: https://svnweb.freebsd.org/changeset/base/318221 Log: [iwm] Deduplicate code in iwm_auth() from an if condition. Obtained from: dragonflybsd.git 03c6e6970115727c9d39f9358e0500ab4f4634cd Modified: head/sys/dev/iwm/if_iwm.c Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Fri May 12 05:51:50 2017 (r318220) +++ head/sys/dev/iwm/if_iwm.c Fri May 12 05:53:28 2017 (r318221) @@ -4152,24 +4152,6 @@ iwm_auth(struct ieee80211vap *vap, struc "%s: failed to update MAC\n", __func__); goto out; } - if ((error = iwm_mvm_phy_ctxt_changed(sc, &sc->sc_phyctxt[0], - in->in_ni.ni_chan, 1, 1)) != 0) { - device_printf(sc->sc_dev, - "%s: failed update phy ctxt\n", __func__); - goto out; - } - iv->phy_ctxt = &sc->sc_phyctxt[0]; - - if ((error = iwm_mvm_binding_add_vif(sc, iv)) != 0) { - device_printf(sc->sc_dev, - "%s: binding update cmd\n", __func__); - goto out; - } - if ((error = iwm_mvm_add_sta(sc, in)) != 0) { - device_printf(sc->sc_dev, - "%s: failed to add sta\n", __func__); - goto out; - } } else { if ((error = iwm_mvm_mac_ctxt_add(sc, vap)) != 0) { device_printf(sc->sc_dev, @@ -4182,25 +4164,25 @@ iwm_auth(struct ieee80211vap *vap, struc __func__); goto out; } - if ((error = iwm_mvm_phy_ctxt_changed(sc, &sc->sc_phyctxt[0], - in->in_ni.ni_chan, 1, 1)) != 0) { - device_printf(sc->sc_dev, - "%s: failed add phy ctxt!\n", __func__); - error = ETIMEDOUT; - goto out; - } - iv->phy_ctxt = &sc->sc_phyctxt[0]; + } - if ((error = iwm_mvm_binding_add_vif(sc, iv)) != 0) { - device_printf(sc->sc_dev, - "%s: binding add cmd\n", __func__); - goto out; - } - if ((error = iwm_mvm_add_sta(sc, in)) != 0) { - device_printf(sc->sc_dev, - "%s: failed to add sta\n", __func__); - goto out; - } + if ((error = iwm_mvm_phy_ctxt_changed(sc, &sc->sc_phyctxt[0], + in->in_ni.ni_chan, 1, 1)) != 0) { + device_printf(sc->sc_dev, + "%s: failed update phy ctxt\n", __func__); + goto out; + } + iv->phy_ctxt = &sc->sc_phyctxt[0]; + + if ((error = iwm_mvm_binding_add_vif(sc, iv)) != 0) { + device_printf(sc->sc_dev, + "%s: binding update cmd\n", __func__); + goto out; + } + if ((error = iwm_mvm_add_sta(sc, in)) != 0) { + device_printf(sc->sc_dev, + "%s: failed to add sta\n", __func__); + goto out; } /* From owner-svn-src-all@freebsd.org Fri May 12 06:03:25 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 38F5ED69916; Fri, 12 May 2017 06:03:25 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 025E2EC4; Fri, 12 May 2017 06:03:24 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4C63OkF061127; Fri, 12 May 2017 06:03:24 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4C63Nc3061120; Fri, 12 May 2017 06:03:23 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201705120603.v4C63Nc3061120@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 12 May 2017 06:03:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318222 - in head/sys: conf dev/iwm modules/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2017 06:03:25 -0000 Author: adrian Date: Fri May 12 06:03:23 2017 New Revision: 318222 URL: https://svnweb.freebsd.org/changeset/base/318222 Log: [iwm] Factor out firmware station handling into if_iwm_sta.c. * This adds iwm_mvm_rm_sta(), which will be used to tear down firmware state for better/cleaner iwm_newstate() handling. * Makes iwm_enable_txq() and iwm_mvm_flush_tx_path() non-static, add the declarations to if_iwm_util.h for now. Obtained from: dragonflybsd.git 85d1c6190c4c3564b1a347f253e823aa95c202b2 Added: head/sys/dev/iwm/if_iwm_sta.c (contents, props changed) head/sys/dev/iwm/if_iwm_sta.h (contents, props changed) Modified: head/sys/conf/files head/sys/dev/iwm/if_iwm.c head/sys/dev/iwm/if_iwm_util.h head/sys/modules/iwm/Makefile Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Fri May 12 05:53:28 2017 (r318221) +++ head/sys/conf/files Fri May 12 06:03:23 2017 (r318222) @@ -1855,6 +1855,7 @@ dev/iwm/if_iwm_phy_ctxt.c optional iwm dev/iwm/if_iwm_phy_db.c optional iwm dev/iwm/if_iwm_power.c optional iwm dev/iwm/if_iwm_scan.c optional iwm +dev/iwm/if_iwm_sta.c optional iwm dev/iwm/if_iwm_time_event.c optional iwm dev/iwm/if_iwm_util.c optional iwm iwm3160fw.c optional iwm3160fw | iwmfw \ Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Fri May 12 05:53:28 2017 (r318221) +++ head/sys/dev/iwm/if_iwm.c Fri May 12 06:03:23 2017 (r318222) @@ -164,6 +164,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -265,7 +266,6 @@ static void iwm_mvm_nic_config(struct iw static int iwm_nic_rx_init(struct iwm_softc *); static int iwm_nic_tx_init(struct iwm_softc *); static int iwm_nic_init(struct iwm_softc *); -static int iwm_enable_txq(struct iwm_softc *, int, int, int); static int iwm_trans_pcie_fw_alive(struct iwm_softc *, uint32_t); static int iwm_nvm_read_chunk(struct iwm_softc *, uint16_t, uint16_t, uint16_t, uint8_t *, uint16_t *); @@ -344,19 +344,6 @@ static int iwm_tx(struct iwm_softc *, st struct ieee80211_node *, int); static int iwm_raw_xmit(struct ieee80211_node *, struct mbuf *, const struct ieee80211_bpf_params *); -static int iwm_mvm_flush_tx_path(struct iwm_softc *sc, - uint32_t tfd_msk, uint32_t flags); -static int iwm_mvm_send_add_sta_cmd_status(struct iwm_softc *, - struct iwm_mvm_add_sta_cmd *, - int *); -static int iwm_mvm_sta_send_to_fw(struct iwm_softc *, struct iwm_node *, - int); -static int iwm_mvm_add_sta(struct iwm_softc *, struct iwm_node *); -static int iwm_mvm_update_sta(struct iwm_softc *, struct iwm_node *); -static int iwm_mvm_add_int_sta_common(struct iwm_softc *, - struct iwm_int_sta *, - const uint8_t *, uint16_t, uint16_t); -static int iwm_mvm_add_aux_sta(struct iwm_softc *); static int iwm_mvm_update_quotas(struct iwm_softc *, struct iwm_vap *); static int iwm_auth(struct ieee80211vap *, struct iwm_softc *); static int iwm_release(struct iwm_softc *, struct iwm_node *); @@ -1532,7 +1519,7 @@ iwm_nic_init(struct iwm_softc *sc) return 0; } -static int +int iwm_enable_txq(struct iwm_softc *sc, int sta_id, int qid, int fifo) { if (!iwm_nic_lock(sc)) { @@ -3884,137 +3871,6 @@ iwm_mvm_flush_tx_path(struct iwm_softc * } /* - * BEGIN mvm/sta.c - */ - -static int -iwm_mvm_send_add_sta_cmd_status(struct iwm_softc *sc, - struct iwm_mvm_add_sta_cmd *cmd, int *status) -{ - return iwm_mvm_send_cmd_pdu_status(sc, IWM_ADD_STA, sizeof(*cmd), - cmd, status); -} - -/* send station add/update command to firmware */ -static int -iwm_mvm_sta_send_to_fw(struct iwm_softc *sc, struct iwm_node *in, int update) -{ - struct iwm_vap *ivp = IWM_VAP(in->in_ni.ni_vap); - struct iwm_mvm_add_sta_cmd add_sta_cmd; - int ret; - uint32_t status; - - memset(&add_sta_cmd, 0, sizeof(add_sta_cmd)); - - add_sta_cmd.sta_id = IWM_STATION_ID; - add_sta_cmd.mac_id_n_color - = htole32(IWM_FW_CMD_ID_AND_COLOR(ivp->id, ivp->color)); - if (!update) { - int ac; - for (ac = 0; ac < WME_NUM_AC; ac++) { - add_sta_cmd.tfd_queue_msk |= - htole32(1 << iwm_mvm_ac_to_tx_fifo[ac]); - } - IEEE80211_ADDR_COPY(&add_sta_cmd.addr, in->in_ni.ni_bssid); - } - add_sta_cmd.add_modify = update ? 1 : 0; - add_sta_cmd.station_flags_msk - |= htole32(IWM_STA_FLG_FAT_EN_MSK | IWM_STA_FLG_MIMO_EN_MSK); - add_sta_cmd.tid_disable_tx = htole16(0xffff); - if (update) - add_sta_cmd.modify_mask |= (IWM_STA_MODIFY_TID_DISABLE_TX); - - status = IWM_ADD_STA_SUCCESS; - ret = iwm_mvm_send_add_sta_cmd_status(sc, &add_sta_cmd, &status); - if (ret) - return ret; - - switch (status & IWM_ADD_STA_STATUS_MASK) { - case IWM_ADD_STA_SUCCESS: - break; - default: - ret = EIO; - device_printf(sc->sc_dev, "IWM_ADD_STA failed\n"); - break; - } - - return ret; -} - -static int -iwm_mvm_add_sta(struct iwm_softc *sc, struct iwm_node *in) -{ - return iwm_mvm_sta_send_to_fw(sc, in, 0); -} - -static int -iwm_mvm_update_sta(struct iwm_softc *sc, struct iwm_node *in) -{ - return iwm_mvm_sta_send_to_fw(sc, in, 1); -} - -static int -iwm_mvm_add_int_sta_common(struct iwm_softc *sc, struct iwm_int_sta *sta, - const uint8_t *addr, uint16_t mac_id, uint16_t color) -{ - struct iwm_mvm_add_sta_cmd cmd; - int ret; - uint32_t status; - - memset(&cmd, 0, sizeof(cmd)); - cmd.sta_id = sta->sta_id; - cmd.mac_id_n_color = htole32(IWM_FW_CMD_ID_AND_COLOR(mac_id, color)); - - cmd.tfd_queue_msk = htole32(sta->tfd_queue_msk); - cmd.tid_disable_tx = htole16(0xffff); - - if (addr) - IEEE80211_ADDR_COPY(cmd.addr, addr); - - ret = iwm_mvm_send_add_sta_cmd_status(sc, &cmd, &status); - if (ret) - return ret; - - switch (status & IWM_ADD_STA_STATUS_MASK) { - case IWM_ADD_STA_SUCCESS: - IWM_DPRINTF(sc, IWM_DEBUG_RESET, - "%s: Internal station added.\n", __func__); - return 0; - default: - device_printf(sc->sc_dev, - "%s: Add internal station failed, status=0x%x\n", - __func__, status); - ret = EIO; - break; - } - return ret; -} - -static int -iwm_mvm_add_aux_sta(struct iwm_softc *sc) -{ - int ret; - - sc->sc_aux_sta.sta_id = IWM_AUX_STA_ID; - sc->sc_aux_sta.tfd_queue_msk = (1 << IWM_MVM_AUX_QUEUE); - - ret = iwm_enable_txq(sc, 0, IWM_MVM_AUX_QUEUE, IWM_MVM_TX_FIFO_MCAST); - if (ret) - return ret; - - ret = iwm_mvm_add_int_sta_common(sc, - &sc->sc_aux_sta, NULL, IWM_MAC_INDEX_AUX, 0); - - if (ret) - memset(&sc->sc_aux_sta, 0, sizeof(sc->sc_aux_sta)); - return ret; -} - -/* - * END mvm/sta.c - */ - -/* * BEGIN mvm/quota.c */ Added: head/sys/dev/iwm/if_iwm_sta.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/iwm/if_iwm_sta.c Fri May 12 06:03:23 2017 (r318222) @@ -0,0 +1,378 @@ +/*- + * Based on BSD-licensed source modules in the Linux iwlwifi driver, + * which were used as the reference documentation for this implementation. + * + * Driver version we are currently based off of is + * Linux 4.7.3 (tag id d7f6728f57e3ecbb7ef34eb7d9f564d514775d75) + * + *********************************************************************** + * + * This file is provided under a dual BSD/GPLv2 license. When using or + * redistributing this file, you may do so under either license. + * + * GPL LICENSE SUMMARY + * + * Copyright(c) 2012 - 2015 Intel Corporation. All rights reserved. + * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH + * Copyright(c) 2016 Intel Deutschland GmbH + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of version 2 of the GNU General Public License as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, + * USA + * + * The full GNU General Public License is included in this distribution + * in the file called COPYING. + * + * Contact Information: + * Intel Linux Wireless + * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 + * + * BSD LICENSE + * + * Copyright(c) 2012 - 2015 Intel Corporation. All rights reserved. + * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH + * Copyright(c) 2016 Intel Deutschland GmbH + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name Intel Corporation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + *****************************************************************************/ + +#include +__FBSDID("$FreeBSD$"); + +#include "opt_wlan.h" +#include "opt_iwm.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include + +#include + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +/* + * New version of ADD_STA_sta command added new fields at the end of the + * structure, so sending the size of the relevant API's structure is enough to + * support both API versions. + */ +static inline int +iwm_mvm_add_sta_cmd_size(struct iwm_softc *sc) +{ +#ifdef notyet + return iwm_mvm_has_new_rx_api(mvm) ? + sizeof(struct iwm_mvm_add_sta_cmd) : + sizeof(struct iwm_mvm_add_sta_cmd_v7); +#else + return sizeof(struct iwm_mvm_add_sta_cmd); +#endif +} + +/* send station add/update command to firmware */ +int +iwm_mvm_sta_send_to_fw(struct iwm_softc *sc, struct iwm_node *in, + boolean_t update) +{ + struct iwm_vap *ivp = IWM_VAP(in->in_ni.ni_vap); + struct iwm_mvm_add_sta_cmd add_sta_cmd = { + .sta_id = IWM_STATION_ID, + .mac_id_n_color = + htole32(IWM_FW_CMD_ID_AND_COLOR(ivp->id, ivp->color)), + .add_modify = update ? 1 : 0, + .station_flags_msk = htole32(IWM_STA_FLG_FAT_EN_MSK | + IWM_STA_FLG_MIMO_EN_MSK), + .tid_disable_tx = htole16(0xffff), + }; + int ret; + uint32_t status; + uint32_t agg_size = 0, mpdu_dens = 0; + + if (!update) { + int ac; + for (ac = 0; ac < WME_NUM_AC; ac++) { + add_sta_cmd.tfd_queue_msk |= + htole32(1 << iwm_mvm_ac_to_tx_fifo[ac]); + } + IEEE80211_ADDR_COPY(&add_sta_cmd.addr, in->in_ni.ni_bssid); + } + + add_sta_cmd.station_flags |= + htole32(agg_size << IWM_STA_FLG_MAX_AGG_SIZE_SHIFT); + add_sta_cmd.station_flags |= + htole32(mpdu_dens << IWM_STA_FLG_AGG_MPDU_DENS_SHIFT); + + status = IWM_ADD_STA_SUCCESS; + ret = iwm_mvm_send_cmd_pdu_status(sc, IWM_ADD_STA, + iwm_mvm_add_sta_cmd_size(sc), + &add_sta_cmd, &status); + if (ret) + return ret; + + switch (status & IWM_ADD_STA_STATUS_MASK) { + case IWM_ADD_STA_SUCCESS: + IWM_DPRINTF(sc, IWM_DEBUG_NODE, "IWM_ADD_STA PASSED\n"); + break; + default: + ret = EIO; + device_printf(sc->sc_dev, "IWM_ADD_STA failed\n"); + break; + } + + return ret; +} + +int +iwm_mvm_add_sta(struct iwm_softc *sc, struct iwm_node *in) +{ + return iwm_mvm_sta_send_to_fw(sc, in, FALSE); +} + +int +iwm_mvm_update_sta(struct iwm_softc *sc, struct iwm_node *in) +{ + return iwm_mvm_sta_send_to_fw(sc, in, TRUE); +} + +int +iwm_mvm_drain_sta(struct iwm_softc *sc, struct iwm_node *in, boolean_t drain) +{ + struct iwm_mvm_add_sta_cmd cmd = {}; + struct iwm_vap *ivp = IWM_VAP(in->in_ni.ni_vap); + int ret; + uint32_t status; + + cmd.mac_id_n_color = + htole32(IWM_FW_CMD_ID_AND_COLOR(ivp->id, ivp->color)); + cmd.sta_id = IWM_STATION_ID; + cmd.add_modify = IWM_STA_MODE_MODIFY; + cmd.station_flags = drain ? htole32(IWM_STA_FLG_DRAIN_FLOW) : 0; + cmd.station_flags_msk = htole32(IWM_STA_FLG_DRAIN_FLOW); + + status = IWM_ADD_STA_SUCCESS; + ret = iwm_mvm_send_cmd_pdu_status(sc, IWM_ADD_STA, + iwm_mvm_add_sta_cmd_size(sc), + &cmd, &status); + if (ret) + return ret; + + switch (status & IWM_ADD_STA_STATUS_MASK) { + case IWM_ADD_STA_SUCCESS: + IWM_DPRINTF(sc, IWM_DEBUG_NODE, + "Frames for staid %d will drained in fw\n", IWM_STATION_ID); + break; + default: + ret = EIO; + device_printf(sc->sc_dev, + "Couldn't drain frames for staid %d\n", IWM_STATION_ID); + break; + } + + return ret; +} + +/* + * Remove a station from the FW table. Before sending the command to remove + * the station validate that the station is indeed known to the driver (sanity + * only). + */ +static int +iwm_mvm_rm_sta_common(struct iwm_softc *sc) +{ + struct iwm_mvm_rm_sta_cmd rm_sta_cmd = { + .sta_id = IWM_STATION_ID, + }; + int ret; + + ret = iwm_mvm_send_cmd_pdu(sc, IWM_REMOVE_STA, 0, + sizeof(rm_sta_cmd), &rm_sta_cmd); + if (ret) { + device_printf(sc->sc_dev, + "Failed to remove station. Id=%d\n", IWM_STATION_ID); + return ret; + } + + return 0; +} + +int +iwm_mvm_rm_sta(struct iwm_softc *sc, struct ieee80211vap *vap, + struct iwm_node *in) +{ + uint32_t tfd_queue_msk = 0; + int ret; + int ac; + + ret = iwm_mvm_drain_sta(sc, in, TRUE); + if (ret) + return ret; + mbufq_drain(&sc->sc_snd); /* XXX needed ? */ + for (ac = 0; ac < WME_NUM_AC; ac++) { + tfd_queue_msk |= htole32(1 << iwm_mvm_ac_to_tx_fifo[ac]); + } + ret = iwm_mvm_flush_tx_path(sc, tfd_queue_msk, 0); + if (ret) + return ret; +#ifdef notyet /* function not yet implemented */ + ret = iwl_trans_wait_tx_queue_empty(mvm->trans, + mvm_sta->tfd_queue_msk); + if (ret) + return ret; +#endif + ret = iwm_mvm_drain_sta(sc, in, FALSE); + +#if 0 + /* if we are associated - we can't remove the AP STA now */ + if (sta->assoc) + return ret; +#endif + /* XXX wait until STA is drained */ + + ret = iwm_mvm_rm_sta_common(sc); + + return ret; +} + +static int +iwm_mvm_add_int_sta_common(struct iwm_softc *sc, struct iwm_int_sta *sta, + const uint8_t *addr, uint16_t mac_id, uint16_t color) +{ + struct iwm_mvm_add_sta_cmd cmd; + int ret; + uint32_t status; + + memset(&cmd, 0, sizeof(cmd)); + cmd.sta_id = sta->sta_id; + cmd.mac_id_n_color = htole32(IWM_FW_CMD_ID_AND_COLOR(mac_id, color)); + + cmd.tfd_queue_msk = htole32(sta->tfd_queue_msk); + cmd.tid_disable_tx = htole16(0xffff); + + if (addr) + IEEE80211_ADDR_COPY(cmd.addr, addr); + + ret = iwm_mvm_send_cmd_pdu_status(sc, IWM_ADD_STA, + iwm_mvm_add_sta_cmd_size(sc), + &cmd, &status); + if (ret) + return ret; + + switch (status & IWM_ADD_STA_STATUS_MASK) { + case IWM_ADD_STA_SUCCESS: + IWM_DPRINTF(sc, IWM_DEBUG_NODE, "Internal station added.\n"); + return 0; + default: + ret = EIO; + device_printf(sc->sc_dev, + "Add internal station failed, status=0x%x\n", status); + break; + } + return ret; +} + +int +iwm_mvm_add_aux_sta(struct iwm_softc *sc) +{ + int ret; + + sc->sc_aux_sta.sta_id = IWM_AUX_STA_ID; + sc->sc_aux_sta.tfd_queue_msk = (1 << IWM_MVM_AUX_QUEUE); + + /* Map Aux queue to fifo - needs to happen before adding Aux station */ + ret = iwm_enable_txq(sc, 0, IWM_MVM_AUX_QUEUE, IWM_MVM_TX_FIFO_MCAST); + if (ret) + return ret; + + ret = iwm_mvm_add_int_sta_common(sc, &sc->sc_aux_sta, NULL, + IWM_MAC_INDEX_AUX, 0); + + if (ret) { + memset(&sc->sc_aux_sta, 0, sizeof(sc->sc_aux_sta)); + sc->sc_aux_sta.sta_id = IWM_MVM_STATION_COUNT; + } + return ret; +} + +void iwm_mvm_del_aux_sta(struct iwm_softc *sc) +{ + memset(&sc->sc_aux_sta, 0, sizeof(sc->sc_aux_sta)); + sc->sc_aux_sta.sta_id = IWM_MVM_STATION_COUNT; +} Added: head/sys/dev/iwm/if_iwm_sta.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/iwm/if_iwm_sta.h Fri May 12 06:03:23 2017 (r318222) @@ -0,0 +1,222 @@ +/*- + * Based on BSD-licensed source modules in the Linux iwlwifi driver, + * which were used as the reference documentation for this implementation. + * + * Driver version we are currently based off of is + * Linux 4.7.3 (tag id d7f6728f57e3ecbb7ef34eb7d9f564d514775d75) + * + *********************************************************************** + * + * + * This file is provided under a dual BSD/GPLv2 license. When using or + * redistributing this file, you may do so under either license. + * + * GPL LICENSE SUMMARY + * + * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved. + * Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH + * Copyright(c) 2015 - 2016 Intel Deutschland GmbH + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of version 2 of the GNU General Public License as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, + * USA + * + * The full GNU General Public License is included in this distribution + * in the file called COPYING. + * + * Contact Information: + * Intel Linux Wireless + * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 + * + * BSD LICENSE + * + * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved. + * Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH + * Copyright(c) 2015 - 2016 Intel Deutschland GmbH + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name Intel Corporation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + *****************************************************************************/ + +/* $FreeBSD$ */ + +#ifndef __IF_IWM_STA_H__ +#define __IF_IWM_STA_H__ + +/** + * DOC: station table - introduction + * + * The station table is a list of data structure that reprensent the stations. + * In STA/P2P client mode, the driver will hold one station for the AP/ GO. + * In GO/AP mode, the driver will have as many stations as associated clients. + * All these stations are reflected in the fw's station table. The driver + * keeps the fw's station table up to date with the ADD_STA command. Stations + * can be removed by the REMOVE_STA command. + * + * All the data related to a station is held in the structure %iwl_mvm_sta + * which is embed in the mac80211's %ieee80211_sta (in the drv_priv) area. + * This data includes the index of the station in the fw, per tid information + * (sequence numbers, Block-ack state machine, etc...). The stations are + * created and deleted by the %sta_state callback from %ieee80211_ops. + * + * The driver holds a map: %fw_id_to_mac_id that allows to fetch a + * %ieee80211_sta (and the %iwl_mvm_sta embedded into it) based on a fw + * station index. That way, the driver is able to get the tid related data in + * O(1) in time sensitive paths (Tx / Tx response / BA notification). These + * paths are triggered by the fw, and the driver needs to get a pointer to the + * %ieee80211 structure. This map helps to get that pointer quickly. + */ + +/** + * DOC: station table - locking + * + * As stated before, the station is created / deleted by mac80211's %sta_state + * callback from %ieee80211_ops which can sleep. The next paragraph explains + * the locking of a single stations, the next ones relates to the station + * table. + * + * The station holds the sequence number per tid. So this data needs to be + * accessed in the Tx path (which is softIRQ). It also holds the Block-Ack + * information (the state machine / and the logic that checks if the queues + * were drained), so it also needs to be accessible from the Tx response flow. + * In short, the station needs to be access from sleepable context as well as + * from tasklets, so the station itself needs a spinlock. + * + * The writers of %fw_id_to_mac_id map are serialized by the global mutex of + * the mvm op_mode. This is possible since %sta_state can sleep. + * The pointers in this map are RCU protected, hence we won't replace the + * station while we have Tx / Tx response / BA notification running. + * + * If a station is deleted while it still has packets in its A-MPDU queues, + * then the reclaim flow will notice that there is no station in the map for + * sta_id and it will dump the responses. + */ + +/** + * DOC: station table - internal stations + * + * The FW needs a few internal stations that are not reflected in + * mac80211, such as broadcast station in AP / GO mode, or AUX sta for + * scanning and P2P device (during the GO negotiation). + * For these kind of stations we have %iwl_mvm_int_sta struct which holds the + * data relevant for them from both %iwl_mvm_sta and %ieee80211_sta. + * Usually the data for these stations is static, so no locking is required, + * and no TID data as this is also not needed. + * One thing to note, is that these stations have an ID in the fw, but not + * in mac80211. In order to "reserve" them a sta_id in %fw_id_to_mac_id + * we fill ERR_PTR(EINVAL) in this mapping and all other dereferencing of + * pointers from this mapping need to check that the value is not error + * or NULL. + * + * Currently there is only one auxiliary station for scanning, initialized + * on init. + */ + +/** + * DOC: station table - AP Station in STA mode + * + * %iwl_mvm_vif includes the index of the AP station in the fw's STA table: + * %ap_sta_id. To get the point to the corresponding %ieee80211_sta, + * &fw_id_to_mac_id can be used. Due to the way the fw works, we must not remove + * the AP station from the fw before setting the MAC context as unassociated. + * Hence, %fw_id_to_mac_id[%ap_sta_id] will be NULLed when the AP station is + * removed by mac80211, but the station won't be removed in the fw until the + * VIF is set as unassociated. Then, %ap_sta_id will be invalidated. + */ + +/** + * DOC: station table - Drain vs. Flush + * + * Flush means that all the frames in the SCD queue are dumped regardless the + * station to which they were sent. We do that when we disassociate and before + * we remove the STA of the AP. The flush can be done synchronously against the + * fw. + * Drain means that the fw will drop all the frames sent to a specific station. + * This is useful when a client (if we are IBSS / GO or AP) disassociates. In + * that case, we need to drain all the frames for that client from the AC queues + * that are shared with the other clients. Only then, we can remove the STA in + * the fw. In order to do so, we track the non-AMPDU packets for each station. + * If mac80211 removes a STA and if it still has non-AMPDU packets pending in + * the queues, we mark this station as %EBUSY in %fw_id_to_mac_id, and drop all + * the frames for this STA (%iwl_mvm_rm_sta). When the last frame is dropped + * (we know about it with its Tx response), we remove the station in fw and set + * it as %NULL in %fw_id_to_mac_id: this is the purpose of + * %iwl_mvm_sta_drained_wk. + */ + +/** + * DOC: station table - fw restart + * + * When the fw asserts, or we have any other issue that requires to reset the + * driver, we require mac80211 to reconfigure the driver. Since the private + * data of the stations is embed in mac80211's %ieee80211_sta, that data will + * not be zeroed and needs to be reinitialized manually. + * %IWL_MVM_STATUS_IN_HW_RESTART is set during restart and that will hint us + * that we must not allocate a new sta_id but reuse the previous one. This + * means that the stations being re-added after the reset will have the same + * place in the fw as before the reset. We do need to zero the %fw_id_to_mac_id + * map, since the stations aren't in the fw any more. Internal stations that + * are not added by mac80211 will be re-added in the init flow that is called + * after the restart: mac80211 call's %iwl_mvm_mac_start which calls to + * %iwl_mvm_up. + */ + +/** + * Send the STA info to the FW. + * + * @sc: the iwm_softc* to use + * @sta: the STA + * @update: this is true if the FW is being updated about a STA it already knows + * about. Otherwise (if this is a new STA), this should be false. + * @flags: if update==true, this marks what is being changed via ORs of values + * from enum iwm_sta_modify_flag. Otherwise, this is ignored. + */ +extern int iwm_mvm_sta_send_to_fw(struct iwm_softc *sc, struct iwm_node *in, + boolean_t update); +extern int iwm_mvm_add_sta(struct iwm_softc *sc, struct iwm_node *in); +extern int iwm_mvm_update_sta(struct iwm_softc *sc, struct iwm_node *in); +extern int iwm_mvm_rm_sta(struct iwm_softc *sc, struct ieee80211vap *vap, + struct iwm_node *in); + +extern int iwm_mvm_add_aux_sta(struct iwm_softc *sc); +extern void iwm_mvm_del_aux_sta(struct iwm_softc *sc); + +extern int iwm_mvm_drain_sta(struct iwm_softc *sc, struct iwm_node *in, + boolean_t drain); + +#endif /* __IF_IWM_STA_H__ */ Modified: head/sys/dev/iwm/if_iwm_util.h ============================================================================== --- head/sys/dev/iwm/if_iwm_util.h Fri May 12 05:53:28 2017 (r318221) +++ head/sys/dev/iwm/if_iwm_util.h Fri May 12 06:03:23 2017 (r318222) @@ -123,6 +123,9 @@ extern void iwm_dma_contig_free(struct i extern boolean_t iwm_mvm_rx_diversity_allowed(struct iwm_softc *sc); extern uint8_t iwm_ridx2rate(struct ieee80211_rateset *rs, int ridx); +extern int iwm_enable_txq(struct iwm_softc *sc, int sta_id, int qid, int fifo); +extern int iwm_mvm_flush_tx_path(struct iwm_softc *sc, uint32_t tfd_msk, + uint32_t flags); static inline uint8_t iwm_mvm_get_valid_tx_ant(struct iwm_softc *sc) Modified: head/sys/modules/iwm/Makefile ============================================================================== --- head/sys/modules/iwm/Makefile Fri May 12 05:53:28 2017 (r318221) +++ head/sys/modules/iwm/Makefile Fri May 12 06:03:23 2017 (r318222) @@ -7,10 +7,10 @@ KMOD= if_iwm SRCS= if_iwm.c if_iwm_binding.c if_iwm_util.c if_iwm_phy_db.c SRCS+= if_iwm_mac_ctxt.c if_iwm_phy_ctxt.c if_iwm_time_event.c SRCS+= if_iwm_power.c if_iwm_scan.c if_iwm_led.c if_iwm_notif_wait.c -SRCS+= if_iwm_7000.c if_iwm_8000.c if_iwm_fw.c +SRCS+= if_iwm_7000.c if_iwm_8000.c if_iwm_fw.c if_iwm_sta.c # bus layer SRCS+= if_iwm_pcie_trans.c -SRCS+= device_if.h bus_if.h pci_if.h opt_wlan.h +SRCS+= device_if.h bus_if.h pci_if.h opt_wlan.h opt_iwm.h CFLAGS+= -DIWM_DEBUG From owner-svn-src-all@freebsd.org Fri May 12 06:05:35 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A6AB6D699D9; Fri, 12 May 2017 06:05:35 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5C03D1032; Fri, 12 May 2017 06:05:35 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4C65YuY061288; Fri, 12 May 2017 06:05:34 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4C65YZD061287; Fri, 12 May 2017 06:05:34 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201705120605.v4C65YZD061287@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 12 May 2017 06:05:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318223 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2017 06:05:35 -0000 Author: adrian Date: Fri May 12 06:05:34 2017 New Revision: 318223 URL: https://svnweb.freebsd.org/changeset/base/318223 Log: [iwm] Handle AUTH->SCAN/INIT and ASSOC->SCAN/INIT better * Tear down the relevant firmware state (i.e. the station, the vif binding) in these transition cases. * Before this case would leave the firmware state lying around, resulting in errors and firmware panics in the subsequent association attempts. Obtained from: dragonflybsd.git 94b501399fde6368ae388a669c95b099a6e66e93 Modified: head/sys/dev/iwm/if_iwm.c Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Fri May 12 06:03:23 2017 (r318222) +++ head/sys/dev/iwm/if_iwm.c Fri May 12 06:05:34 2017 (r318223) @@ -4364,6 +4364,39 @@ iwm_newstate(struct ieee80211vap *vap, e switch (nstate) { case IEEE80211_S_INIT: + case IEEE80211_S_SCAN: + if (vap->iv_state == IEEE80211_S_AUTH || + vap->iv_state == IEEE80211_S_ASSOC) { + int myerr; + IWM_UNLOCK(sc); + IEEE80211_LOCK(ic); + myerr = ivp->iv_newstate(vap, nstate, arg); + IEEE80211_UNLOCK(ic); + IWM_LOCK(sc); + in = IWM_NODE(vap->iv_bss); + error = iwm_mvm_rm_sta(sc, vap, in); + if (error) { + device_printf(sc->sc_dev, + "%s: Failed to remove station: %d\n", + __func__, error); + } + error = iwm_mvm_mac_ctxt_changed(sc, vap); + if (error) { + device_printf(sc->sc_dev, + "%s: Failed to change mac context: %d\n", + __func__, error); + } + error = iwm_mvm_binding_remove_vif(sc, ivp); + if (error) { + device_printf(sc->sc_dev, + "%s: Failed to remove channel ctx: %d\n", + __func__, error); + } + ivp->phy_ctxt = NULL; + IWM_UNLOCK(sc); + IEEE80211_LOCK(ic); + return myerr; + } break; case IEEE80211_S_AUTH: From owner-svn-src-all@freebsd.org Fri May 12 06:16:12 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A6A80D69CFD; Fri, 12 May 2017 06:16:12 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7680015C6; Fri, 12 May 2017 06:16:12 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4C6GB4t065379; Fri, 12 May 2017 06:16:11 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4C6GB7i065378; Fri, 12 May 2017 06:16:11 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201705120616.v4C6GB7i065378@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 12 May 2017 06:16:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318224 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2017 06:16:12 -0000 Author: adrian Date: Fri May 12 06:16:11 2017 New Revision: 318224 URL: https://svnweb.freebsd.org/changeset/base/318224 Log: [iwm] Refuse connection to APs with beacon interval < 16. Obtained from: dragonflybsd.git aba448de727e9b122adadeb36fd00a8ad6018d4f Modified: head/sys/dev/iwm/if_iwm.c Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Fri May 12 06:05:34 2017 (r318223) +++ head/sys/dev/iwm/if_iwm.c Fri May 12 06:16:11 2017 (r318224) @@ -3976,6 +3976,21 @@ iwm_auth(struct ieee80211vap *vap, struc in->in_assoc = 0; + /* + * Firmware bug - it'll crash if the beacon interval is less + * than 16. We can't avoid connecting at all, so refuse the + * station state change, this will cause net80211 to abandon + * attempts to connect to this AP, and eventually wpa_s will + * blacklist the AP... + */ + if (ni->ni_intval < 16) { + device_printf(sc->sc_dev, + "AP %s beacon interval is %d, refusing due to firmware bug!\n", + ether_sprintf(ni->ni_bssid), ni->ni_intval); + error = EINVAL; + goto out; + } + error = iwm_mvm_sf_config(sc, IWM_SF_FULL_ON); if (error != 0) return error; From owner-svn-src-all@freebsd.org Fri May 12 06:21:04 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EEADAD69DDA; Fri, 12 May 2017 06:21:04 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A4F1617CA; Fri, 12 May 2017 06:21:04 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4C6L32v066301; Fri, 12 May 2017 06:21:03 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4C6L3gi066280; Fri, 12 May 2017 06:21:03 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201705120621.v4C6L3gi066280@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 12 May 2017 06:21:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318225 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2017 06:21:05 -0000 Author: adrian Date: Fri May 12 06:21:03 2017 New Revision: 318225 URL: https://svnweb.freebsd.org/changeset/base/318225 Log: [iwm] Already call iwm_mvm_power_update_mac() during SCAN<->AUTH paths. * Otherwise we would never update powersaving settings until we complete an association, after the first authentication attempt. * This corresponds to what Linux iwlwifi seems to do. Obtained from: dragonflybsd.git aa128dc02a17c2e616232ef0fa997121e969c995 Modified: head/sys/dev/iwm/if_iwm.c Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Fri May 12 06:16:11 2017 (r318224) +++ head/sys/dev/iwm/if_iwm.c Fri May 12 06:21:03 2017 (r318225) @@ -4029,12 +4029,6 @@ iwm_auth(struct ieee80211vap *vap, struc "%s: failed to add MAC\n", __func__); goto out; } - if ((error = iwm_mvm_power_update_mac(sc)) != 0) { - device_printf(sc->sc_dev, - "%s: failed to update power management\n", - __func__); - goto out; - } } if ((error = iwm_mvm_phy_ctxt_changed(sc, &sc->sc_phyctxt[0], @@ -4050,6 +4044,12 @@ iwm_auth(struct ieee80211vap *vap, struc "%s: binding update cmd\n", __func__); goto out; } + if ((error = iwm_mvm_power_update_mac(sc)) != 0) { + device_printf(sc->sc_dev, + "%s: failed to update power management\n", + __func__); + goto out; + } if ((error = iwm_mvm_add_sta(sc, in)) != 0) { device_printf(sc->sc_dev, "%s: failed to add sta\n", __func__); @@ -4408,6 +4408,12 @@ iwm_newstate(struct ieee80211vap *vap, e __func__, error); } ivp->phy_ctxt = NULL; + error = iwm_mvm_power_update_mac(sc); + if (error != 0) { + device_printf(sc->sc_dev, + "%s: failed to update power management\n", + __func__); + } IWM_UNLOCK(sc); IEEE80211_LOCK(ic); return myerr; From owner-svn-src-all@freebsd.org Fri May 12 06:30:08 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2E958D69FB5; Fri, 12 May 2017 06:30:08 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D5B3F1BE1; Fri, 12 May 2017 06:30:07 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4C6U6uG069573; Fri, 12 May 2017 06:30:06 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4C6U6F9069570; Fri, 12 May 2017 06:30:06 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201705120630.v4C6U6F9069570@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 12 May 2017 06:30:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318226 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2017 06:30:08 -0000 Author: adrian Date: Fri May 12 06:30:06 2017 New Revision: 318226 URL: https://svnweb.freebsd.org/changeset/base/318226 Log: [iwm] Switch arguments from iwm_node* to iwm_vap* in if_iwm_power.c. * Power management handling is per-vap, not per-node, so we should pass the iwm_vap in these arguments. Obtained from: dragonflybsd.git 62a4e7957a736b4de38938b02fa7eb9b45bc5d0d Modified: head/sys/dev/iwm/if_iwm.c head/sys/dev/iwm/if_iwm_power.c head/sys/dev/iwm/if_iwm_power.h Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Fri May 12 06:21:03 2017 (r318225) +++ head/sys/dev/iwm/if_iwm.c Fri May 12 06:30:06 2017 (r318226) @@ -4462,7 +4462,7 @@ iwm_newstate(struct ieee80211vap *vap, e "%s: failed to update MAC: %d\n", __func__, error); } - iwm_mvm_enable_beacon_filter(sc, in); + iwm_mvm_enable_beacon_filter(sc, ivp); iwm_mvm_power_update_mac(sc); iwm_mvm_update_quotas(sc, ivp); iwm_setrates(sc, in); Modified: head/sys/dev/iwm/if_iwm_power.c ============================================================================== --- head/sys/dev/iwm/if_iwm_power.c Fri May 12 06:21:03 2017 (r318225) +++ head/sys/dev/iwm/if_iwm_power.c Fri May 12 06:30:06 2017 (r318226) @@ -201,7 +201,7 @@ iwm_mvm_beacon_filter_send_cmd(struct iw static void iwm_mvm_beacon_filter_set_cqm_params(struct iwm_softc *sc, - struct iwm_node *in, struct iwm_beacon_filter_cmd *cmd) + struct iwm_vap *ivp, struct iwm_beacon_filter_cmd *cmd) { cmd->ba_enable_beacon_abort = htole32(sc->sc_bf.ba_enabled); } @@ -278,15 +278,14 @@ iwm_mvm_power_config_skip_dtim(struct iw } static void -iwm_mvm_power_build_cmd(struct iwm_softc *sc, struct iwm_node *in, +iwm_mvm_power_build_cmd(struct iwm_softc *sc, struct iwm_vap *ivp, struct iwm_mac_power_cmd *cmd) { - struct ieee80211_node *ni = &in->in_ni; + struct ieee80211_node *ni = ivp->iv_vap.iv_bss; int dtimper, dtimper_msec; int keep_alive; struct ieee80211com *ic = &sc->sc_ic; struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps); - struct iwm_vap *ivp = IWM_VAP(vap); cmd->id_and_color = htole32(IWM_FW_CMD_ID_AND_COLOR(ivp->id, ivp->color)); @@ -319,11 +318,11 @@ iwm_mvm_power_build_cmd(struct iwm_softc } static int -iwm_mvm_power_send_cmd(struct iwm_softc *sc, struct iwm_node *in) +iwm_mvm_power_send_cmd(struct iwm_softc *sc, struct iwm_vap *ivp) { struct iwm_mac_power_cmd cmd = {}; - iwm_mvm_power_build_cmd(sc, in, &cmd); + iwm_mvm_power_build_cmd(sc, ivp, &cmd); iwm_mvm_power_log(sc, &cmd); return iwm_mvm_send_cmd_pdu(sc, IWM_MAC_PM_POWER_TABLE, 0, @@ -331,12 +330,12 @@ iwm_mvm_power_send_cmd(struct iwm_softc } static int -_iwm_mvm_enable_beacon_filter(struct iwm_softc *sc, struct iwm_node *in, +_iwm_mvm_enable_beacon_filter(struct iwm_softc *sc, struct iwm_vap *ivp, struct iwm_beacon_filter_cmd *cmd) { int ret; - iwm_mvm_beacon_filter_set_cqm_params(sc, in, cmd); + iwm_mvm_beacon_filter_set_cqm_params(sc, ivp, cmd); ret = iwm_mvm_beacon_filter_send_cmd(sc, cmd); if (!ret) @@ -346,14 +345,14 @@ _iwm_mvm_enable_beacon_filter(struct iwm } int -iwm_mvm_enable_beacon_filter(struct iwm_softc *sc, struct iwm_node *in) +iwm_mvm_enable_beacon_filter(struct iwm_softc *sc, struct iwm_vap *ivp) { struct iwm_beacon_filter_cmd cmd = { IWM_BF_CMD_CONFIG_DEFAULTS, .bf_enable_beacon_filter = htole32(1), }; - return _iwm_mvm_enable_beacon_filter(sc, in, &cmd); + return _iwm_mvm_enable_beacon_filter(sc, ivp, &cmd); } int @@ -398,7 +397,7 @@ iwm_mvm_power_set_ps(struct iwm_softc *s } static int -iwm_mvm_power_set_ba(struct iwm_softc *sc, struct iwm_node *in) +iwm_mvm_power_set_ba(struct iwm_softc *sc, struct iwm_vap *ivp) { struct iwm_beacon_filter_cmd cmd = { IWM_BF_CMD_CONFIG_DEFAULTS, @@ -410,7 +409,7 @@ iwm_mvm_power_set_ba(struct iwm_softc *s sc->sc_bf.ba_enabled = !sc->sc_ps_disabled; - return _iwm_mvm_enable_beacon_filter(sc, in, &cmd); + return _iwm_mvm_enable_beacon_filter(sc, ivp, &cmd); } int @@ -424,7 +423,7 @@ iwm_mvm_power_update_ps(struct iwm_softc return ret; if (vap != NULL) - return iwm_mvm_power_set_ba(sc, IWM_NODE(vap->iv_bss)); + return iwm_mvm_power_set_ba(sc, IWM_VAP(vap)); return 0; } @@ -440,13 +439,13 @@ iwm_mvm_power_update_mac(struct iwm_soft return ret; if (vap != NULL) { - ret = iwm_mvm_power_send_cmd(sc, IWM_NODE(vap->iv_bss)); + ret = iwm_mvm_power_send_cmd(sc, IWM_VAP(vap)); if (ret) return ret; } if (vap != NULL) - return iwm_mvm_power_set_ba(sc, IWM_NODE(vap->iv_bss)); + return iwm_mvm_power_set_ba(sc, IWM_VAP(vap)); return 0; } Modified: head/sys/dev/iwm/if_iwm_power.h ============================================================================== --- head/sys/dev/iwm/if_iwm_power.h Fri May 12 06:21:03 2017 (r318225) +++ head/sys/dev/iwm/if_iwm_power.h Fri May 12 06:30:06 2017 (r318226) @@ -94,7 +94,7 @@ extern int iwm_mvm_power_update_device(s extern int iwm_mvm_power_update_mac(struct iwm_softc *sc); extern int iwm_mvm_power_update_ps(struct iwm_softc *sc); extern int iwm_mvm_enable_beacon_filter(struct iwm_softc *sc, - struct iwm_node *in); + struct iwm_vap *ivp); extern int iwm_mvm_disable_beacon_filter(struct iwm_softc *sc); #endif /* __IF_IWM_POWER_H__ */ From owner-svn-src-all@freebsd.org Fri May 12 06:30:52 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2C837D69022; Fri, 12 May 2017 06:30:52 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F2B061D5E; Fri, 12 May 2017 06:30:51 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4C6Upgm071930; Fri, 12 May 2017 06:30:51 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4C6Upt1071929; Fri, 12 May 2017 06:30:51 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201705120630.v4C6Upt1071929@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 12 May 2017 06:30:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318227 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2017 06:30:52 -0000 Author: adrian Date: Fri May 12 06:30:50 2017 New Revision: 318227 URL: https://svnweb.freebsd.org/changeset/base/318227 Log: [iwm] Clean up if_iwm_power.c a bit. Fix iwm_power_scheme debug print. Obtained from: dragonflybsd.git 52c3adbee676d8558065618e5ad694ea5c6697e0 Modified: head/sys/dev/iwm/if_iwm_power.c Modified: head/sys/dev/iwm/if_iwm_power.c ============================================================================== --- head/sys/dev/iwm/if_iwm_power.c Fri May 12 06:30:06 2017 (r318226) +++ head/sys/dev/iwm/if_iwm_power.c Fri May 12 06:30:50 2017 (r318227) @@ -212,7 +212,7 @@ iwm_mvm_power_log(struct iwm_softc *sc, IWM_DPRINTF(sc, IWM_DEBUG_PWRSAVE | IWM_DEBUG_CMD, "Sending power table command on mac id 0x%X for " "power level %d, flags = 0x%X\n", - cmd->id_and_color, IWM_POWER_SCHEME_CAM, le16toh(cmd->flags)); + cmd->id_and_color, iwm_power_scheme, le16toh(cmd->flags)); IWM_DPRINTF(sc, IWM_DEBUG_PWRSAVE | IWM_DEBUG_CMD, "Keep alive = %u sec\n", le16toh(cmd->keep_alive_seconds)); @@ -281,11 +281,10 @@ static void iwm_mvm_power_build_cmd(struct iwm_softc *sc, struct iwm_vap *ivp, struct iwm_mac_power_cmd *cmd) { - struct ieee80211_node *ni = ivp->iv_vap.iv_bss; + struct ieee80211vap *vap = &ivp->iv_vap; + struct ieee80211_node *ni = vap->iv_bss; int dtimper, dtimper_msec; int keep_alive; - struct ieee80211com *ic = &sc->sc_ic; - struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps); cmd->id_and_color = htole32(IWM_FW_CMD_ID_AND_COLOR(ivp->id, ivp->color)); From owner-svn-src-all@freebsd.org Fri May 12 06:31:59 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6D99AD691D1; Fri, 12 May 2017 06:31:59 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 484251FF4; Fri, 12 May 2017 06:31:59 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4C6VwE1073414; Fri, 12 May 2017 06:31:58 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4C6VwJk073411; Fri, 12 May 2017 06:31:58 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201705120631.v4C6VwJk073411@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 12 May 2017 06:31:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318228 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2017 06:31:59 -0000 Author: adrian Date: Fri May 12 06:31:57 2017 New Revision: 318228 URL: https://svnweb.freebsd.org/changeset/base/318228 Log: [iwm] Make powersaving more similar to Linux iwlwifi behaviour. * Add a per-vap ps_disabled flag, and use it for a workaround which fixes an association issue when powersaving is enabled. * Compute flag that should correpsond to the mvmif->bss_conf.ps flag in Linux's iwlwifi (e.g. this disallows powersaving when not associated yet). Inspired-By: Linux iwlwifi Obtained from: dragonflybsd.git dc2e69bdfe8c9d7049c8a28da0adffbfbc6de5c0 Modified: head/sys/dev/iwm/if_iwm.c head/sys/dev/iwm/if_iwm_power.c head/sys/dev/iwm/if_iwmvar.h Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Fri May 12 06:30:50 2017 (r318227) +++ head/sys/dev/iwm/if_iwm.c Fri May 12 06:31:57 2017 (r318228) @@ -4044,7 +4044,15 @@ iwm_auth(struct ieee80211vap *vap, struc "%s: binding update cmd\n", __func__); goto out; } - if ((error = iwm_mvm_power_update_mac(sc)) != 0) { + /* + * Authentication becomes unreliable when powersaving is left enabled + * here. Powersaving will be activated again when association has + * finished or is aborted. + */ + iv->ps_disabled = TRUE; + error = iwm_mvm_power_update_mac(sc); + iv->ps_disabled = FALSE; + if (error != 0) { device_printf(sc->sc_dev, "%s: failed to update power management\n", __func__); @@ -6277,6 +6285,7 @@ iwm_vap_create(struct ieee80211com *ic, ivp->color = IWM_DEFAULT_COLOR; ivp->have_wme = FALSE; + ivp->ps_disabled = FALSE; ieee80211_ratectl_init(vap); /* Complete setup. */ Modified: head/sys/dev/iwm/if_iwm_power.c ============================================================================== --- head/sys/dev/iwm/if_iwm_power.c Fri May 12 06:30:50 2017 (r318227) +++ head/sys/dev/iwm/if_iwm_power.c Fri May 12 06:31:57 2017 (r318228) @@ -285,6 +285,7 @@ iwm_mvm_power_build_cmd(struct iwm_softc struct ieee80211_node *ni = vap->iv_bss; int dtimper, dtimper_msec; int keep_alive; + boolean_t bss_conf_ps = FALSE; cmd->id_and_color = htole32(IWM_FW_CMD_ID_AND_COLOR(ivp->id, ivp->color)); @@ -306,6 +307,14 @@ iwm_mvm_power_build_cmd(struct iwm_softc return; cmd->flags |= htole16(IWM_POWER_FLAGS_POWER_SAVE_ENA_MSK); + + if (IWM_NODE(ni)->in_assoc && + (vap->iv_flags & IEEE80211_F_PMGTON) != 0) { + bss_conf_ps = TRUE; + } + if (!bss_conf_ps) + return; + cmd->flags |= htole16(IWM_POWER_FLAGS_POWER_MANAGEMENT_ENA_MSK); iwm_mvm_power_config_skip_dtim(sc, cmd); @@ -370,15 +379,18 @@ iwm_mvm_disable_beacon_filter(struct iwm static int iwm_mvm_power_set_ps(struct iwm_softc *sc) { - struct ieee80211vap *vap = TAILQ_FIRST(&sc->sc_ic.ic_vaps); + struct ieee80211vap *vap; boolean_t disable_ps; int ret; /* disable PS if CAM */ disable_ps = (iwm_power_scheme == IWM_POWER_SCHEME_CAM); /* ...or if any of the vifs require PS to be off */ - if (vap != NULL && (vap->iv_flags & IEEE80211_F_PMGTON) == 0) - disable_ps = TRUE; + TAILQ_FOREACH(vap, &sc->sc_ic.ic_vaps, iv_next) { + struct iwm_vap *ivp = IWM_VAP(vap); + if (ivp->phy_ctxt != NULL && ivp->ps_disabled) + disable_ps = TRUE; + } /* update device power state if it has changed */ if (sc->sc_ps_disabled != disable_ps) { @@ -402,11 +414,18 @@ iwm_mvm_power_set_ba(struct iwm_softc *s IWM_BF_CMD_CONFIG_DEFAULTS, .bf_enable_beacon_filter = htole32(1), }; + struct ieee80211vap *vap = &ivp->iv_vap; + struct ieee80211_node *ni = vap->iv_bss; + boolean_t bss_conf_ps = FALSE; if (!sc->sc_bf.bf_enabled) return 0; - sc->sc_bf.ba_enabled = !sc->sc_ps_disabled; + if (ni != NULL && IWM_NODE(ni)->in_assoc && + (vap->iv_flags & IEEE80211_F_PMGTON) != 0) { + bss_conf_ps = TRUE; + } + sc->sc_bf.ba_enabled = !sc->sc_ps_disabled && bss_conf_ps; return _iwm_mvm_enable_beacon_filter(sc, ivp, &cmd); } Modified: head/sys/dev/iwm/if_iwmvar.h ============================================================================== --- head/sys/dev/iwm/if_iwmvar.h Fri May 12 06:30:50 2017 (r318227) +++ head/sys/dev/iwm/if_iwmvar.h Fri May 12 06:31:57 2017 (r318228) @@ -390,6 +390,9 @@ struct iwm_vap { uint16_t edca_txop; uint8_t aifsn; } queue_params[WME_NUM_AC]; + + /* indicates that this interface requires PS to be disabled */ + boolean_t ps_disabled; }; #define IWM_VAP(_vap) ((struct iwm_vap *)(_vap)) From owner-svn-src-all@freebsd.org Fri May 12 06:33:08 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D060FD6925F; Fri, 12 May 2017 06:33:08 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ABB29383; Fri, 12 May 2017 06:33:08 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4C6X7lk073525; Fri, 12 May 2017 06:33:07 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4C6X7cK073522; Fri, 12 May 2017 06:33:07 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201705120633.v4C6X7cK073522@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 12 May 2017 06:33:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318229 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2017 06:33:08 -0000 Author: adrian Date: Fri May 12 06:33:07 2017 New Revision: 318229 URL: https://svnweb.freebsd.org/changeset/base/318229 Log: [iwm] Adjust if_iwm_sta.h prototypes, don't pass iwm_node to rm_sta(). * Since a RUN -> INIT/SCAN transition seems to immediately destroy the ieee80211_node for the AP, we can't read the in_assoc value from there. Instead just directly pass that information via a boolean_t argument. * Adds iwm_mvm_rm_sta_id() function, which just unconditionally removes the station from the firmware. * The iwm_mvm_rm_sta() function shouldn't actually remove the station from firmware when we are still associated (i.e. during a RUN -> INIT/SCAN transition). * So when disassociating we will first call iwm_mvm_rm_sta() to drain the queues/fifos. Later during disassociation we will then use iwm_mvm_rm_sta_id() to actually remove the station. Inspired-By: Linux iwlwifi Obtained from: dragonflybsd.git 81b3c1fe9122fa22f33d97103039cc375f656231 Modified: head/sys/dev/iwm/if_iwm.c head/sys/dev/iwm/if_iwm_sta.c head/sys/dev/iwm/if_iwm_sta.h Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Fri May 12 06:31:57 2017 (r318228) +++ head/sys/dev/iwm/if_iwm.c Fri May 12 06:33:07 2017 (r318229) @@ -4396,8 +4396,7 @@ iwm_newstate(struct ieee80211vap *vap, e myerr = ivp->iv_newstate(vap, nstate, arg); IEEE80211_UNLOCK(ic); IWM_LOCK(sc); - in = IWM_NODE(vap->iv_bss); - error = iwm_mvm_rm_sta(sc, vap, in); + error = iwm_mvm_rm_sta(sc, vap, FALSE); if (error) { device_printf(sc->sc_dev, "%s: Failed to remove station: %d\n", Modified: head/sys/dev/iwm/if_iwm_sta.c ============================================================================== --- head/sys/dev/iwm/if_iwm_sta.c Fri May 12 06:31:57 2017 (r318228) +++ head/sys/dev/iwm/if_iwm_sta.c Fri May 12 06:33:07 2017 (r318229) @@ -213,10 +213,9 @@ iwm_mvm_update_sta(struct iwm_softc *sc, } int -iwm_mvm_drain_sta(struct iwm_softc *sc, struct iwm_node *in, boolean_t drain) +iwm_mvm_drain_sta(struct iwm_softc *sc, struct iwm_vap *ivp, boolean_t drain) { struct iwm_mvm_add_sta_cmd cmd = {}; - struct iwm_vap *ivp = IWM_VAP(in->in_ni.ni_vap); int ret; uint32_t status; @@ -275,13 +274,13 @@ iwm_mvm_rm_sta_common(struct iwm_softc * int iwm_mvm_rm_sta(struct iwm_softc *sc, struct ieee80211vap *vap, - struct iwm_node *in) + boolean_t is_assoc) { uint32_t tfd_queue_msk = 0; int ret; int ac; - ret = iwm_mvm_drain_sta(sc, in, TRUE); + ret = iwm_mvm_drain_sta(sc, IWM_VAP(vap), TRUE); if (ret) return ret; mbufq_drain(&sc->sc_snd); /* XXX needed ? */ @@ -297,13 +296,12 @@ iwm_mvm_rm_sta(struct iwm_softc *sc, str if (ret) return ret; #endif - ret = iwm_mvm_drain_sta(sc, in, FALSE); + ret = iwm_mvm_drain_sta(sc, IWM_VAP(vap), FALSE); -#if 0 /* if we are associated - we can't remove the AP STA now */ - if (sta->assoc) + if (is_assoc) return ret; -#endif + /* XXX wait until STA is drained */ ret = iwm_mvm_rm_sta_common(sc); @@ -311,6 +309,14 @@ iwm_mvm_rm_sta(struct iwm_softc *sc, str return ret; } +int +iwm_mvm_rm_sta_id(struct iwm_softc *sc, struct ieee80211vap *vap) +{ + /* XXX wait until STA is drained */ + + return iwm_mvm_rm_sta_common(sc); +} + static int iwm_mvm_add_int_sta_common(struct iwm_softc *sc, struct iwm_int_sta *sta, const uint8_t *addr, uint16_t mac_id, uint16_t color) Modified: head/sys/dev/iwm/if_iwm_sta.h ============================================================================== --- head/sys/dev/iwm/if_iwm_sta.h Fri May 12 06:31:57 2017 (r318228) +++ head/sys/dev/iwm/if_iwm_sta.h Fri May 12 06:33:07 2017 (r318229) @@ -211,12 +211,13 @@ extern int iwm_mvm_sta_send_to_fw(struct extern int iwm_mvm_add_sta(struct iwm_softc *sc, struct iwm_node *in); extern int iwm_mvm_update_sta(struct iwm_softc *sc, struct iwm_node *in); extern int iwm_mvm_rm_sta(struct iwm_softc *sc, struct ieee80211vap *vap, - struct iwm_node *in); + boolean_t is_assoc); +extern int iwm_mvm_rm_sta_id(struct iwm_softc *sc, struct ieee80211vap *vap); extern int iwm_mvm_add_aux_sta(struct iwm_softc *sc); extern void iwm_mvm_del_aux_sta(struct iwm_softc *sc); -extern int iwm_mvm_drain_sta(struct iwm_softc *sc, struct iwm_node *in, +extern int iwm_mvm_drain_sta(struct iwm_softc *sc, struct iwm_vap *ivp, boolean_t drain); #endif /* __IF_IWM_STA_H__ */ From owner-svn-src-all@freebsd.org Fri May 12 06:33:57 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1A2DDD692CA; Fri, 12 May 2017 06:33:57 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C5C0974E; Fri, 12 May 2017 06:33:56 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4C6XtJw073599; Fri, 12 May 2017 06:33:55 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4C6XtGv073597; Fri, 12 May 2017 06:33:55 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201705120633.v4C6XtGv073597@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 12 May 2017 06:33:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318230 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2017 06:33:57 -0000 Author: adrian Date: Fri May 12 06:33:55 2017 New Revision: 318230 URL: https://svnweb.freebsd.org/changeset/base/318230 Log: [iwm] Fix iwm_mvm_send_cmd_pdu(_status) declarations. Make id a uint32_t. * This fixes cases where the group id of wide commands got lost, e.g. this happened to the IWM_SCAN_ABORT_UMAC command. Obtained from: dragonflybsd.git 71310fab0caca79bb5da43d9d642e77a4c27eea2 Modified: head/sys/dev/iwm/if_iwm_util.c head/sys/dev/iwm/if_iwm_util.h Modified: head/sys/dev/iwm/if_iwm_util.c ============================================================================== --- head/sys/dev/iwm/if_iwm_util.c Fri May 12 06:33:07 2017 (r318229) +++ head/sys/dev/iwm/if_iwm_util.c Fri May 12 06:33:55 2017 (r318230) @@ -346,7 +346,7 @@ iwm_send_cmd(struct iwm_softc *sc, struc /* iwlwifi: mvm/utils.c */ int -iwm_mvm_send_cmd_pdu(struct iwm_softc *sc, uint8_t id, +iwm_mvm_send_cmd_pdu(struct iwm_softc *sc, uint32_t id, uint32_t flags, uint16_t len, const void *data) { struct iwm_host_cmd cmd = { @@ -402,7 +402,7 @@ iwm_mvm_send_cmd_status(struct iwm_softc /* iwlwifi/mvm/utils.c */ int -iwm_mvm_send_cmd_pdu_status(struct iwm_softc *sc, uint8_t id, +iwm_mvm_send_cmd_pdu_status(struct iwm_softc *sc, uint32_t id, uint16_t len, const void *data, uint32_t *status) { struct iwm_host_cmd cmd = { Modified: head/sys/dev/iwm/if_iwm_util.h ============================================================================== --- head/sys/dev/iwm/if_iwm_util.h Fri May 12 06:33:07 2017 (r318229) +++ head/sys/dev/iwm/if_iwm_util.h Fri May 12 06:33:55 2017 (r318230) @@ -107,12 +107,12 @@ #define __IF_IWM_UTIL_H__ extern int iwm_send_cmd(struct iwm_softc *sc, struct iwm_host_cmd *hcmd); -extern int iwm_mvm_send_cmd_pdu(struct iwm_softc *sc, uint8_t id, +extern int iwm_mvm_send_cmd_pdu(struct iwm_softc *sc, uint32_t id, uint32_t flags, uint16_t len, const void *data); extern int iwm_mvm_send_cmd_status(struct iwm_softc *sc, struct iwm_host_cmd *cmd, uint32_t *status); -extern int iwm_mvm_send_cmd_pdu_status(struct iwm_softc *sc, uint8_t id, +extern int iwm_mvm_send_cmd_pdu_status(struct iwm_softc *sc, uint32_t id, uint16_t len, const void *data, uint32_t *status); extern void iwm_free_resp(struct iwm_softc *sc, struct iwm_host_cmd *hcmd); From owner-svn-src-all@freebsd.org Fri May 12 06:34:44 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C0512D69334; Fri, 12 May 2017 06:34:44 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8FF628C0; Fri, 12 May 2017 06:34:44 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4C6YhIc073674; Fri, 12 May 2017 06:34:43 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4C6YhG5073673; Fri, 12 May 2017 06:34:43 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201705120634.v4C6YhG5073673@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 12 May 2017 06:34:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318231 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2017 06:34:44 -0000 Author: adrian Date: Fri May 12 06:34:43 2017 New Revision: 318231 URL: https://svnweb.freebsd.org/changeset/base/318231 Log: [iwm] Revert "if_iwm - SCAN_ABORT_UMAC response doesn't use a wide id" This reverts commit cef47a9cbb0a3ce5f18369fed9403d2764884bc2. Obtained from: dragonflybsd.git f62d325820ee7f7c2bcf721ada9cef8b70f74471 Modified: head/sys/dev/iwm/if_iwm.c Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Fri May 12 06:33:55 2017 (r318230) +++ head/sys/dev/iwm/if_iwm.c Fri May 12 06:34:43 2017 (r318231) @@ -5450,7 +5450,7 @@ iwm_handle_rxb(struct iwm_softc *sc, str case IWM_TIME_EVENT_CMD: case IWM_WIDE_ID(IWM_ALWAYS_LONG_GROUP, IWM_SCAN_CFG_CMD): case IWM_WIDE_ID(IWM_ALWAYS_LONG_GROUP, IWM_SCAN_REQ_UMAC): - case IWM_SCAN_ABORT_UMAC: + case IWM_WIDE_ID(IWM_ALWAYS_LONG_GROUP, IWM_SCAN_ABORT_UMAC): case IWM_SCAN_OFFLOAD_REQUEST_CMD: case IWM_SCAN_OFFLOAD_ABORT_CMD: case IWM_REPLY_BEACON_FILTERING_CMD: From owner-svn-src-all@freebsd.org Fri May 12 06:35:21 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ED190D69394; Fri, 12 May 2017 06:35:21 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BD8F9A0C; Fri, 12 May 2017 06:35:21 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4C6ZKiO073755; Fri, 12 May 2017 06:35:20 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4C6ZKr9073754; Fri, 12 May 2017 06:35:20 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201705120635.v4C6ZKr9073754@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 12 May 2017 06:35:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318232 - head/sys/dev/iwm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2017 06:35:22 -0000 Author: adrian Date: Fri May 12 06:35:20 2017 New Revision: 318232 URL: https://svnweb.freebsd.org/changeset/base/318232 Log: [iwm] Recognize IWM_FW_PAGING_BLOCK_CMD wide cmd response correctly. Obtained from: dragonflybsd.git ef688cebb9b29b67f7a011846589971987949e0d Modified: head/sys/dev/iwm/if_iwm.c Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Fri May 12 06:34:43 2017 (r318231) +++ head/sys/dev/iwm/if_iwm.c Fri May 12 06:35:20 2017 (r318232) @@ -5459,7 +5459,8 @@ iwm_handle_rxb(struct iwm_softc *sc, str case IWM_REMOVE_STA: case IWM_TXPATH_FLUSH: case IWM_LQ_CMD: - case IWM_FW_PAGING_BLOCK_CMD: + case IWM_WIDE_ID(IWM_ALWAYS_LONG_GROUP, + IWM_FW_PAGING_BLOCK_CMD): case IWM_BT_CONFIG: case IWM_REPLY_THERMAL_MNG_BACKOFF: cresp = (void *)pkt->data; From owner-svn-src-all@freebsd.org Fri May 12 11:41:00 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 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-all@freebsd.org Fri May 12 14:38:10 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 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-all@freebsd.org Fri May 12 15:00:09 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 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-all@freebsd.org Fri May 12 15:03:10 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 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-all@freebsd.org Fri May 12 15:08:25 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 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-all@freebsd.org Fri May 12 15:20:14 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7F68BD69CEA; Fri, 12 May 2017 15:20:14 +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 4EC631D77; Fri, 12 May 2017 15:20:14 +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 v4CFKD2J085842; Fri, 12 May 2017 15:20:13 GMT (envelope-from lidl@FreeBSD.org) Received: (from lidl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4CFKCq5085834; Fri, 12 May 2017 15:20:12 GMT (envelope-from lidl@FreeBSD.org) Message-Id: <201705121520.v4CFKCq5085834@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:20:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318242 - head/crypto/openssh X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2017 15:20:14 -0000 Author: lidl Date: Fri May 12 15:20:12 2017 New Revision: 318242 URL: https://svnweb.freebsd.org/changeset/base/318242 Log: Refine and update blacklist support in sshd Adjust notification points slightly to catch all auth failures, rather than just the ones caused by bad usernames. Modify notification point for bad usernames to send new type of BLACKLIST_BAD_USER. (Support in libblacklist will be forthcoming soon.) Add guards to allow library headers to expose the enum of action values. Reviewed by: des Approved by: des Sponsored by: The FreeBSD Foundation Modified: head/crypto/openssh/auth-pam.c head/crypto/openssh/auth.c head/crypto/openssh/auth1.c head/crypto/openssh/auth2.c head/crypto/openssh/blacklist.c head/crypto/openssh/blacklist_client.h head/crypto/openssh/packet.c head/crypto/openssh/sshd.c Modified: head/crypto/openssh/auth-pam.c ============================================================================== --- head/crypto/openssh/auth-pam.c Fri May 12 15:08:23 2017 (r318241) +++ head/crypto/openssh/auth-pam.c Fri May 12 15:20:12 2017 (r318242) @@ -799,7 +799,8 @@ sshpam_query(void *ctx, char **name, cha free(msg); return (0); } - BLACKLIST_NOTIFY(BLACKLIST_AUTH_FAIL); + BLACKLIST_NOTIFY(BLACKLIST_BAD_USER, + sshpam_authctxt->user); error("PAM: %s for %s%.100s from %.100s", msg, sshpam_authctxt->valid ? "" : "illegal user ", sshpam_authctxt->user, Modified: head/crypto/openssh/auth.c ============================================================================== --- head/crypto/openssh/auth.c Fri May 12 15:08:23 2017 (r318241) +++ head/crypto/openssh/auth.c Fri May 12 15:20:12 2017 (r318242) @@ -311,7 +311,7 @@ auth_log(Authctxt *authctxt, int authent else { authmsg = authenticated ? "Accepted" : "Failed"; if (authenticated) - BLACKLIST_NOTIFY(BLACKLIST_AUTH_OK); + BLACKLIST_NOTIFY(BLACKLIST_AUTH_OK, "ssh"); } authlog("%s %s%s%s for %s%.100s from %.200s port %d ssh2%s%s", @@ -664,7 +664,7 @@ getpwnamallow(const char *user) } #endif if (pw == NULL) { - BLACKLIST_NOTIFY(BLACKLIST_AUTH_FAIL); + BLACKLIST_NOTIFY(BLACKLIST_BAD_USER, user); logit("Invalid user %.100s from %.100s port %d", user, ssh_remote_ipaddr(ssh), ssh_remote_port(ssh)); #ifdef CUSTOM_FAILED_LOGIN Modified: head/crypto/openssh/auth1.c ============================================================================== --- head/crypto/openssh/auth1.c Fri May 12 15:08:23 2017 (r318241) +++ head/crypto/openssh/auth1.c Fri May 12 15:20:12 2017 (r318242) @@ -338,7 +338,7 @@ do_authloop(Authctxt *authctxt) char *msg; size_t len; - BLACKLIST_NOTIFY(BLACKLIST_AUTH_FAIL); + BLACKLIST_NOTIFY(BLACKLIST_AUTH_FAIL, "ssh"); error("Access denied for user %s by PAM account " "configuration", authctxt->user); len = buffer_len(&loginmsg); @@ -364,6 +364,7 @@ do_authloop(Authctxt *authctxt) if (authenticated) return; + BLACKLIST_NOTIFY(BLACKLIST_AUTH_FAIL, "ssh"); if (++authctxt->failures >= options.max_authtries) { #ifdef SSH_AUDIT_EVENTS PRIVSEP(audit_event(SSH_LOGIN_EXCEED_MAXTRIES)); @@ -406,7 +407,7 @@ do_authentication(Authctxt *authctxt) else { debug("do_authentication: invalid user %s", user); authctxt->pw = fakepw(); - BLACKLIST_NOTIFY(BLACKLIST_AUTH_FAIL); + BLACKLIST_NOTIFY(BLACKLIST_BAD_USER, user); } /* Configuration may have changed as a result of Match */ Modified: head/crypto/openssh/auth2.c ============================================================================== --- head/crypto/openssh/auth2.c Fri May 12 15:08:23 2017 (r318241) +++ head/crypto/openssh/auth2.c Fri May 12 15:20:12 2017 (r318242) @@ -245,7 +245,6 @@ input_userauth_request(int type, u_int32 } else { logit("input_userauth_request: invalid user %s", user); authctxt->pw = fakepw(); - BLACKLIST_NOTIFY(BLACKLIST_AUTH_FAIL); #ifdef SSH_AUDIT_EVENTS PRIVSEP(audit_event(SSH_INVALID_USER)); #endif @@ -386,8 +385,10 @@ userauth_finish(Authctxt *authctxt, int /* Allow initial try of "none" auth without failure penalty */ if (!partial && !authctxt->server_caused_failure && - (authctxt->attempt > 1 || strcmp(method, "none") != 0)) + (authctxt->attempt > 1 || strcmp(method, "none") != 0)) { authctxt->failures++; + BLACKLIST_NOTIFY(BLACKLIST_AUTH_FAIL, "ssh"); + } if (authctxt->failures >= options.max_authtries) { #ifdef SSH_AUDIT_EVENTS PRIVSEP(audit_event(SSH_LOGIN_EXCEED_MAXTRIES)); Modified: head/crypto/openssh/blacklist.c ============================================================================== --- head/crypto/openssh/blacklist.c Fri May 12 15:08:23 2017 (r318241) +++ head/crypto/openssh/blacklist.c Fri May 12 15:20:12 2017 (r318242) @@ -46,8 +46,8 @@ #include "log.h" #include "misc.h" #include "servconf.h" -#include "blacklist_client.h" #include +#include "blacklist_client.h" static struct blacklist *blstate = NULL; @@ -88,10 +88,10 @@ blacklist_init(void) } void -blacklist_notify(int action) +blacklist_notify(int action, const char *msg) { if (blstate != NULL && packet_connection_is_on_socket()) (void)blacklist_r(blstate, action, - packet_get_connection_in(), "ssh"); + packet_get_connection_in(), msg); } Modified: head/crypto/openssh/blacklist_client.h ============================================================================== --- head/crypto/openssh/blacklist_client.h Fri May 12 15:08:23 2017 (r318241) +++ head/crypto/openssh/blacklist_client.h Fri May 12 15:20:12 2017 (r318242) @@ -34,22 +34,26 @@ #ifndef BLACKLIST_CLIENT_H #define BLACKLIST_CLIENT_H +#ifndef BLACKLIST_API_ENUM enum { BLACKLIST_AUTH_OK = 0, - BLACKLIST_AUTH_FAIL + BLACKLIST_AUTH_FAIL, + BLACKLIST_ABUSIVE_BEHAVIOR, + BLACKLIST_BAD_USER }; +#endif #ifdef USE_BLACKLIST void blacklist_init(void); -void blacklist_notify(int); +void blacklist_notify(int, const char *); #define BLACKLIST_INIT() blacklist_init() -#define BLACKLIST_NOTIFY(x) blacklist_notify(x) +#define BLACKLIST_NOTIFY(x,msg) blacklist_notify(x,msg) #else #define BLACKLIST_INIT() -#define BLACKLIST_NOTIFY(x) +#define BLACKLIST_NOTIFY(x,msg) #endif Modified: head/crypto/openssh/packet.c ============================================================================== --- head/crypto/openssh/packet.c Fri May 12 15:08:23 2017 (r318241) +++ head/crypto/openssh/packet.c Fri May 12 15:20:12 2017 (r318242) @@ -2104,7 +2104,7 @@ sshpkt_fatal(struct ssh *ssh, const char case SSH_ERR_NO_KEX_ALG_MATCH: case SSH_ERR_NO_HOSTKEY_ALG_MATCH: if (ssh && ssh->kex && ssh->kex->failed_choice) { - BLACKLIST_NOTIFY(BLACKLIST_AUTH_FAIL); + BLACKLIST_NOTIFY(BLACKLIST_AUTH_FAIL, "ssh"); logdie("Unable to negotiate with %.200s port %d: %s. " "Their offer: %s", ssh_remote_ipaddr(ssh), ssh_remote_port(ssh), ssh_err(r), Modified: head/crypto/openssh/sshd.c ============================================================================== --- head/crypto/openssh/sshd.c Fri May 12 15:08:23 2017 (r318241) +++ head/crypto/openssh/sshd.c Fri May 12 15:20:12 2017 (r318242) @@ -371,7 +371,7 @@ grace_alarm_handler(int sig) kill(0, SIGTERM); } - BLACKLIST_NOTIFY(BLACKLIST_AUTH_FAIL); + BLACKLIST_NOTIFY(BLACKLIST_AUTH_FAIL, "ssh"); /* Log error and exit. */ sigdie("Timeout before authentication for %s port %d", From owner-svn-src-all@freebsd.org Fri May 12 15:26:53 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EAEFFD6906A; Fri, 12 May 2017 15:26:53 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from hydra.pix.net (hydra.pix.net [IPv6:2001:470:e254:10::4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.pix.net", Issuer "Pix.Com Technologies LLC CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id BBF8D806; Fri, 12 May 2017 15:26:53 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from torb.pix.net (torb.pix.net [IPv6:2001:470:e254:10:1042:6a31:1deb:9f8a]) (authenticated bits=0) by hydra.pix.net (8.16.0.19/8.15.2) with ESMTPA id v4CFQquh020580; Fri, 12 May 2017 11:26:52 -0400 (EDT) (envelope-from lidl@FreeBSD.org) Subject: Re: svn commit: r318242 - head/crypto/openssh From: Kurt Lidl To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201705121520.v4CFKCq5085834@repo.freebsd.org> Reply-To: lidl@FreeBSD.org Message-ID: <1db4302e-63a1-e8ce-b493-91c0db9540a3@FreeBSD.org> Date: Fri, 12 May 2017 11:26:52 -0400 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 MIME-Version: 1.0 In-Reply-To: <201705121520.v4CFKCq5085834@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2017 15:26:54 -0000 On 5/12/17 11:20 AM, Kurt Lidl wrote: > Author: lidl > Date: Fri May 12 15:20:12 2017 > New Revision: 318242 > URL: https://svnweb.freebsd.org/changeset/base/318242 > > Log: > Refine and update blacklist support in sshd > > Adjust notification points slightly to catch all auth failures, > rather than just the ones caused by bad usernames. > > Modify notification point for bad usernames to send new type of > BLACKLIST_BAD_USER. (Support in libblacklist will be forthcoming soon.) > Add guards to allow library headers to expose the enum of action values. > > Reviewed by: des > Approved by: des > Sponsored by: The FreeBSD Foundation Forgot: MFC after: 3 days -Kurt From owner-svn-src-all@freebsd.org Fri May 12 15:35:01 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5142CD692F8; Fri, 12 May 2017 15:35:01 +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 20C00CC6; Fri, 12 May 2017 15:35:01 +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 v4CFZ03o094174; Fri, 12 May 2017 15:35:00 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4CFZ0eL094172; Fri, 12 May 2017 15:35:00 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201705121535.v4CFZ0eL094172@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 12 May 2017 15:35:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318243 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2017 15:35:01 -0000 Author: kib Date: Fri May 12 15:34:59 2017 New Revision: 318243 URL: https://svnweb.freebsd.org/changeset/base/318243 Log: Do not wake up sleeping thread in reschedule_signals() if the signal is blocked. The spurious wakeup might result in spurious EINTR. The reschedule_signals() function is called when the calling thread has the signal mask changed. For each newly blocked signal, we try to find a thread which might have the signal not blocked. If no such thread exists, sigtd() returns random thread, which must not be waken up. I decided that re-checking, as suggested by PR submitter, is more reasonable change than to change sigtd() interface, due to other uses of sigtd(). signotify() already performs this check. Submitted by: Duane PR: 219228 Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/kern/kern_sig.c Modified: head/sys/kern/kern_sig.c ============================================================================== --- head/sys/kern/kern_sig.c Fri May 12 15:20:12 2017 (r318242) +++ head/sys/kern/kern_sig.c Fri May 12 15:34:59 2017 (r318243) @@ -2646,7 +2646,9 @@ reschedule_signals(struct proc *p, sigse signotify(td); if (!(flags & SIGPROCMASK_PS_LOCKED)) mtx_lock(&ps->ps_mtx); - if (p->p_flag & P_TRACED || SIGISMEMBER(ps->ps_sigcatch, sig)) + if (p->p_flag & P_TRACED || + (SIGISMEMBER(ps->ps_sigcatch, sig) && + !SIGISMEMBER(td->td_sigmask, sig))) tdsigwakeup(td, sig, SIG_CATCH, (SIGISMEMBER(ps->ps_sigintr, sig) ? EINTR : ERESTART)); From owner-svn-src-all@freebsd.org Fri May 12 17:40:36 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 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-all@freebsd.org Fri May 12 18:01:06 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 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-all@freebsd.org Fri May 12 18:02:58 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 98CEBD699AF; Fri, 12 May 2017 18:02:58 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 70DA01EA9; Fri, 12 May 2017 18:02:58 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4CI2vLT057019; Fri, 12 May 2017 18:02:57 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4CI2vjx057018; Fri, 12 May 2017 18:02:57 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201705121802.v4CI2vjx057018@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 12 May 2017 18:02:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318246 - head/tests/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2017 18:02:58 -0000 Author: markj Date: Fri May 12 18:02:57 2017 New Revision: 318246 URL: https://svnweb.freebsd.org/changeset/base/318246 Log: Add a regression test for r318191. Reviewed by: badger MFC after: 1 week Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D10684 Modified: head/tests/sys/kern/ptrace_test.c Modified: head/tests/sys/kern/ptrace_test.c ============================================================================== --- head/tests/sys/kern/ptrace_test.c Fri May 12 18:01:05 2017 (r318245) +++ head/tests/sys/kern/ptrace_test.c Fri May 12 18:02:57 2017 (r318246) @@ -30,6 +30,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -3025,6 +3026,99 @@ ATF_TC_BODY(ptrace__event_mask_sigkill_d ATF_REQUIRE(errno == ECHILD); } +static void * +flock_thread(void *arg) +{ + int fd; + + fd = *(int *)arg; + (void)flock(fd, LOCK_EX); + (void)flock(fd, LOCK_UN); + return (NULL); +} + +/* + * Verify that PT_ATTACH will suspend threads sleeping in an SBDRY section. + * We rely on the fact that the lockf implementation sets SBDRY before blocking + * on a lock. This is a regression test for r318191. + */ +ATF_TC_WITHOUT_HEAD(ptrace__PT_ATTACH_with_SBDRY_thread); +ATF_TC_BODY(ptrace__PT_ATTACH_with_SBDRY_thread, tc) +{ + pthread_barrier_t barrier; + pthread_barrierattr_t battr; + char tmpfile[64]; + pid_t child, wpid; + int error, fd, i, status; + + ATF_REQUIRE(pthread_barrierattr_init(&battr) == 0); + ATF_REQUIRE(pthread_barrierattr_setpshared(&battr, + PTHREAD_PROCESS_SHARED) == 0); + ATF_REQUIRE(pthread_barrier_init(&barrier, &battr, 2) == 0); + + (void)snprintf(tmpfile, sizeof(tmpfile), "./ptrace.XXXXXX"); + fd = mkstemp(tmpfile); + ATF_REQUIRE(fd >= 0); + + ATF_REQUIRE((child = fork()) != -1); + if (child == 0) { + pthread_t t[2]; + int error, cfd; + + error = pthread_barrier_wait(&barrier); + if (error != 0 && error != PTHREAD_BARRIER_SERIAL_THREAD) + _exit(1); + + cfd = open(tmpfile, O_RDONLY); + if (cfd < 0) + _exit(1); + + /* + * We want at least two threads blocked on the file lock since + * the SIGSTOP from PT_ATTACH may kick one of them out of + * sleep. + */ + if (pthread_create(&t[0], NULL, flock_thread, &cfd) != 0) + _exit(1); + if (pthread_create(&t[1], NULL, flock_thread, &cfd) != 0) + _exit(1); + if (pthread_join(t[0], NULL) != 0) + _exit(1); + if (pthread_join(t[1], NULL) != 0) + _exit(1); + _exit(0); + } + + ATF_REQUIRE(flock(fd, LOCK_EX) == 0); + + error = pthread_barrier_wait(&barrier); + ATF_REQUIRE(error == 0 || error == PTHREAD_BARRIER_SERIAL_THREAD); + + /* + * Give the child some time to block. Is there a better way to do this? + */ + sleep(1); + + /* + * Attach and give the child 3 seconds to stop. + */ + ATF_REQUIRE(ptrace(PT_ATTACH, child, NULL, 0) == 0); + for (i = 0; i < 3; i++) { + wpid = waitpid(child, &status, WNOHANG); + if (wpid == child && WIFSTOPPED(status) && + WSTOPSIG(status) == SIGSTOP) + break; + sleep(1); + } + ATF_REQUIRE_MSG(i < 3, "failed to stop child process after PT_ATTACH"); + + ATF_REQUIRE(ptrace(PT_DETACH, child, NULL, 0) == 0); + + ATF_REQUIRE(flock(fd, LOCK_UN) == 0); + ATF_REQUIRE(unlink(tmpfile) == 0); + ATF_REQUIRE(close(fd) == 0); +} + ATF_TP_ADD_TCS(tp) { @@ -3072,6 +3166,7 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, ptrace__parent_terminate_with_pending_sigstop1); ATF_TP_ADD_TC(tp, ptrace__parent_terminate_with_pending_sigstop2); ATF_TP_ADD_TC(tp, ptrace__event_mask_sigkill_discard); + ATF_TP_ADD_TC(tp, ptrace__PT_ATTACH_with_SBDRY_thread); return (atf_no_error()); } From owner-svn-src-all@freebsd.org Fri May 12 18:06:15 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 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-all@freebsd.org Fri May 12 18:10:31 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 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-all@freebsd.org Fri May 12 18:37:11 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 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 = < Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E74B1D6A7CA; Sat, 13 May 2017 03:10:53 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A7BCC1859; Sat, 13 May 2017 03:10:53 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4D3AqL9085753; Sat, 13 May 2017 03:10:52 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4D3ApUl085738; Sat, 13 May 2017 03:10:51 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705130310.v4D3ApUl085738@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 13 May 2017 03:10:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318250 - in head: etc etc/newsyslog.conf.d etc/syslog.d tools/build/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 May 2017 03:10:54 -0000 Author: ngie Date: Sat May 13 03:10:50 2017 New Revision: 318250 URL: https://svnweb.freebsd.org/changeset/base/318250 Log: Handle the logfiles in newsyslog and syslogd conditionally, based on src.conf(5) knobs This will allow consumers of FreeBSD to use the unmodified configuration files out of the box more than previously. Both newsyslog.conf and syslog.conf: - /var/log/lpd-errs (MK_LPR != no) - /var/log/ppp.log (MK_PPP != no) - /var/log/xferlog (MK_FTP != no) newsyslog.conf: - /var/log/amd.log (MK_AMD != no) - /var/log/pflog (MK_PF != no) - /var/log/sendmail.st (MK_SENDMAIL != no) MFC after: 3 weeks Sponsored by: Dell EMC Isilon Added: head/etc/newsyslog.conf.d/amd.conf (contents, props changed) head/etc/newsyslog.conf.d/ftp.conf (contents, props changed) head/etc/newsyslog.conf.d/lpr.conf (contents, props changed) head/etc/newsyslog.conf.d/pf.conf (contents, props changed) head/etc/newsyslog.conf.d/ppp.conf (contents, props changed) head/etc/newsyslog.conf.d/sendmail.conf (contents, props changed) head/etc/syslog.d/ head/etc/syslog.d/Makefile (contents, props changed) head/etc/syslog.d/ftp.conf (contents, props changed) head/etc/syslog.d/lpr.conf (contents, props changed) head/etc/syslog.d/ppp.conf (contents, props changed) Modified: head/etc/Makefile head/etc/newsyslog.conf head/etc/newsyslog.conf.d/Makefile head/etc/syslog.conf head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/etc/Makefile ============================================================================== --- head/etc/Makefile Fri May 12 18:37:08 2017 (r318249) +++ head/etc/Makefile Sat May 13 03:10:50 2017 (r318250) @@ -8,7 +8,8 @@ FILESGROUPS= FILES # No need as it is empty and just causes rebuilds since this file does so much. UPDATE_DEPENDFILE= no SUBDIR= \ - newsyslog.conf.d + newsyslog.conf.d \ + syslog.d .if ${MK_SENDMAIL} != "no" SUBDIR+=sendmail Modified: head/etc/newsyslog.conf ============================================================================== --- head/etc/newsyslog.conf Fri May 12 18:37:08 2017 (r318249) +++ head/etc/newsyslog.conf Sat May 13 03:10:50 2017 (r318250) @@ -18,7 +18,6 @@ # # logfilename [owner:group] mode count size when flags [/pid_file] [sig_num] /var/log/all.log 600 7 * @T00 J -/var/log/amd.log 644 7 1000 * J /var/log/auth.log 600 7 1000 @0101T JC /var/log/console.log 600 5 1000 * J /var/log/cron 600 3 1000 * JC @@ -26,18 +25,13 @@ /var/log/debug.log 600 7 1000 * JC /var/log/init.log 644 3 1000 * J /var/log/kerberos.log 600 7 1000 * J -/var/log/lpd-errs 644 7 1000 * JC /var/log/maillog 640 7 * @T00 JC /var/log/messages 644 5 1000 @0101T JC /var/log/monthly.log 640 12 * $M1D0 JN -/var/log/pflog 600 3 1000 * JB /var/run/pflogd.pid -/var/log/ppp.log root:network 640 3 1000 * JC /var/log/devd.log 644 3 1000 * JC /var/log/security 600 10 1000 * JC -/var/log/sendmail.st 640 10 * 168 BN /var/log/utx.log 644 3 * @01T05 B /var/log/weekly.log 640 5 * $W6D0 JN -/var/log/xferlog 600 7 1000 * JC /etc/newsyslog.conf.d/* /usr/local/etc/newsyslog.conf.d/* Modified: head/etc/newsyslog.conf.d/Makefile ============================================================================== --- head/etc/newsyslog.conf.d/Makefile Fri May 12 18:37:08 2017 (r318249) +++ head/etc/newsyslog.conf.d/Makefile Sat May 13 03:10:50 2017 (r318250) @@ -6,8 +6,32 @@ BINDIR= /etc/newsyslog.conf.d FILES= +.if ${MK_AMD} != "no" +FILES+= amd.conf +.endif + +.if ${MK_FTP} != "no" +FILES+= ftp.conf +.endif + +.if ${MK_LPR} != "no" +FILES+= lpr.conf +.endif + .if ${MK_OFED} != "no" FILES+= opensm.conf .endif +.if ${MK_PF} != "no" +FILES+= pf.conf +.endif + +.if ${MK_PPP} != "no" +FILES+= ppp.conf +.endif + +.if ${MK_SENDMAIL} != "no" +FILES+= sendmail.conf +.endif + .include Added: head/etc/newsyslog.conf.d/amd.conf ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/etc/newsyslog.conf.d/amd.conf Sat May 13 03:10:50 2017 (r318250) @@ -0,0 +1,2 @@ +# $FreeBSD$ +/var/log/amd.log 644 7 1000 * J Added: head/etc/newsyslog.conf.d/ftp.conf ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/etc/newsyslog.conf.d/ftp.conf Sat May 13 03:10:50 2017 (r318250) @@ -0,0 +1,2 @@ +# $FreeBSD$ +/var/log/xferlog 600 7 1000 * JC Added: head/etc/newsyslog.conf.d/lpr.conf ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/etc/newsyslog.conf.d/lpr.conf Sat May 13 03:10:50 2017 (r318250) @@ -0,0 +1,2 @@ +# $FreeBSD$ +/var/log/lpd-errs 644 7 1000 * JC Added: head/etc/newsyslog.conf.d/pf.conf ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/etc/newsyslog.conf.d/pf.conf Sat May 13 03:10:50 2017 (r318250) @@ -0,0 +1,2 @@ +# $FreeBSD$ +/var/log/pflog 600 3 1000 * JB /var/run/pflogd.pid Added: head/etc/newsyslog.conf.d/ppp.conf ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/etc/newsyslog.conf.d/ppp.conf Sat May 13 03:10:50 2017 (r318250) @@ -0,0 +1,2 @@ +# $FreeBSD$ +/var/log/ppp.log root:network 640 3 1000 * JC Added: head/etc/newsyslog.conf.d/sendmail.conf ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/etc/newsyslog.conf.d/sendmail.conf Sat May 13 03:10:50 2017 (r318250) @@ -0,0 +1,2 @@ +# $FreeBSD$ +/var/log/sendmail.st 640 10 * 168 BN Modified: head/etc/syslog.conf ============================================================================== --- head/etc/syslog.conf Fri May 12 18:37:08 2017 (r318249) +++ head/etc/syslog.conf Sat May 13 03:10:50 2017 (r318250) @@ -10,8 +10,6 @@ security.* /var/log/security auth.info;authpriv.info /var/log/auth.log mail.info /var/log/maillog -lpr.info /var/log/lpd-errs -ftp.info /var/log/xferlog cron.* /var/log/cron !-devd *.=debug /var/log/debug.log @@ -31,8 +29,6 @@ cron.* /var/log/cron # Uncomment this if you wish to see messages produced by devd # !devd # *.>=notice /var/log/devd.log -!ppp -*.* /var/log/ppp.log !* include /etc/syslog.d include /usr/local/etc/syslog.d Added: head/etc/syslog.d/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/etc/syslog.d/Makefile Sat May 13 03:10:50 2017 (r318250) @@ -0,0 +1,19 @@ +# $FreeBSD$ + +.include + +.if ${MK_FTP} != "no" +FILES+= ftp.conf +.endif + +.if ${MK_LPR} != "no" +FILES+= lpr.conf +.endif + +.if ${MK_PPP} != "no" +FILES+= ppp.conf +.endif + +BINDIR= /etc/syslog.d + +.include Added: head/etc/syslog.d/ftp.conf ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/etc/syslog.d/ftp.conf Sat May 13 03:10:50 2017 (r318250) @@ -0,0 +1,2 @@ +# $FreeBSD$ +ftp.info /var/log/xferlog Added: head/etc/syslog.d/lpr.conf ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/etc/syslog.d/lpr.conf Sat May 13 03:10:50 2017 (r318250) @@ -0,0 +1,2 @@ +# $FreeBSD$ +lpr.info /var/log/lpd-errs Added: head/etc/syslog.d/ppp.conf ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/etc/syslog.d/ppp.conf Sat May 13 03:10:50 2017 (r318250) @@ -0,0 +1,3 @@ +# $FreeBSD$ +!ppp +*.* /var/log/ppp.log Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Fri May 12 18:37:08 2017 (r318249) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sat May 13 03:10:50 2017 (r318250) @@ -56,6 +56,7 @@ OLD_FILES+=usr/share/man/man8/iasl.8.gz .if ${MK_AMD} == no OLD_FILES+=etc/amd.map +OLD_FILES+=etc/newsyslog.conf.d/amd.conf OLD_FILES+=etc/rc.d/amd OLD_FILES+=usr/bin/pawd OLD_FILES+=usr/sbin/amd @@ -1588,9 +1589,11 @@ OLD_FILES+=usr/share/man/man8/fmtree.8.g .if ${MK_FTP} == no OLD_FILES+=etc/ftpusers +OLD_FILES+=etc/newsyslog.conf.d/ftp.conf OLD_FILES+=etc/pam.d/ftp OLD_FILES+=etc/pam.d/ftpd OLD_FILES+=etc/rc.d/ftpd +OLD_FILES+=etc/syslog.d/ftp.conf OLD_FILES+=usr/bin/ftp OLD_FILES+=usr/bin/gate-ftp OLD_FILES+=usr/bin/pftp @@ -6183,7 +6186,9 @@ OLD_FILES+=usr/share/man/man8/updatedb.8 .if ${MK_LPR} == no OLD_FILES+=etc/hosts.lpd OLD_FILES+=etc/printcap +OLD_FILES+=etc/newsyslog.conf.d/lpr.conf OLD_FILES+=etc/rc.d/lpd +OLD_FILES+=etc/syslog.d/lpr.conf OLD_FILES+=usr/bin/lp OLD_FILES+=usr/bin/lpq OLD_FILES+=usr/bin/lpr @@ -7158,6 +7163,7 @@ OLD_DIRS+=usr/share/examples/pc-sysinsta .endif .if ${MK_PF} == no +OLD_FILES+=etc/newsyslog.conf.d/pf.conf OLD_FILES+=etc/periodic/security/520.pfdenied OLD_FILES+=etc/pf.os OLD_FILES+=etc/rc.d/ftp-proxy @@ -7297,7 +7303,9 @@ OLD_FILES+=usr/share/man/man8/portsnap.8 .endif .if ${MK_PPP} == no +OLD_FILES+=etc/newsyslog.conf.d/ppp.conf OLD_FILES+=etc/ppp/ppp.conf +OLD_FILES+=etc/syslog.d/ppp.conf OLD_DIRS+=etc/ppp OLD_FILES+=usr/sbin/ppp OLD_FILES+=usr/sbin/pppctl @@ -7473,6 +7481,7 @@ OLD_FILES+=usr/share/man/man8/rtquery.8. .endif .if ${MK_SENDMAIL} == no +OLD_FILES+=etc/newsyslog.conf.d/sendmail.conf OLD_FILES+=etc/periodic/daily/150.clean-hoststat OLD_FILES+=etc/periodic/daily/440.status-mailq OLD_FILES+=etc/periodic/daily/460.status-mail-rejects From owner-svn-src-all@freebsd.org Sat May 13 10:00:25 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E29C3D6990C; Sat, 13 May 2017 10:00:25 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 B48B51E3F; Sat, 13 May 2017 10:00:25 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4DA0OOC057570; Sat, 13 May 2017 10:00:24 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4DA0O1m057569; Sat, 13 May 2017 10:00:24 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201705131000.v4DA0O1m057569@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Sat, 13 May 2017 10:00:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318251 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 May 2017 10:00:26 -0000 Author: mmel Date: Sat May 13 10:00:24 2017 New Revision: 318251 URL: https://svnweb.freebsd.org/changeset/base/318251 Log: Clarify usage rules for pmap_remap_vm_attr(). Not a functional change. MFC with: r318021 MFC after: 2 weeks Modified: head/sys/arm/arm/pmap-v6.c Modified: head/sys/arm/arm/pmap-v6.c ============================================================================== --- head/sys/arm/arm/pmap-v6.c Sat May 13 03:10:50 2017 (r318250) +++ head/sys/arm/arm/pmap-v6.c Sat May 13 10:00:24 2017 (r318251) @@ -500,7 +500,24 @@ pmap_set_tex(void) /* * Remap one vm_meattr class to another one. This can be useful as * workaround for SOC errata, e.g. if devices must be accessed using - * SO memory class. + * SO memory class. + * + * !!! Please note that this function is absolutely last resort thing. + * It should not be used under normal circumstances. !!! + * + * Usage rules: + * - it shall be called after pmap_bootstrap_prepare() and before + * cpu_mp_start() (thus only on boot CPU). In practice, it's expected + * to be called from platform_attach() or platform_late_init(). + * + * - if remapping doesn't change caching mode, or until uncached class + * is remapped to any kind of cached one, then no other restriction exists. + * + * - if pmap_remap_vm_attr() changes caching mode, but both (original and + * remapped) remain cached, then caller is resposible for calling + * of dcache_wbinv_poc_all(). + * + * - remapping of any kind of cached class to uncached is not permitted. */ void pmap_remap_vm_attr(vm_memattr_t old_attr, vm_memattr_t new_attr) From owner-svn-src-all@freebsd.org Sat May 13 13:01:16 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6BD8AD6A0A0; Sat, 13 May 2017 13:01:16 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 3B669174A; Sat, 13 May 2017 13:01:16 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4DD1FhJ038259; Sat, 13 May 2017 13:01:15 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4DD1FBc038256; Sat, 13 May 2017 13:01:15 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201705131301.v4DD1FBc038256@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sat, 13 May 2017 13:01:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318252 - head/sys/arm64/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 May 2017 13:01:16 -0000 Author: andrew Date: Sat May 13 13:01:15 2017 New Revision: 318252 URL: https://svnweb.freebsd.org/changeset/base/318252 Log: Add the VM_MEMATTR_WRITE_THROUGH memory type to arm64 and use it to support VM_MEMATTR_WRITE_COMBINING in the kernel. This fixes a bug where Xorg would use write back cached memory for its graphics buffers. This would produce artifacts on the screen as cachelines were written to memory. MFC after: 1 week Sponsored by: DARPA, AFRL Modified: head/sys/arm64/include/vm.h Modified: head/sys/arm64/include/vm.h ============================================================================== --- head/sys/arm64/include/vm.h Sat May 13 10:00:24 2017 (r318251) +++ head/sys/arm64/include/vm.h Sat May 13 13:01:15 2017 (r318252) @@ -30,9 +30,15 @@ #define _MACHINE_VM_H_ /* Memory attribute configuration. */ -#define VM_MEMATTR_DEVICE 0 -#define VM_MEMATTR_UNCACHEABLE 1 -#define VM_MEMATTR_WRITE_BACK 2 +#define VM_MEMATTR_DEVICE 0 +#define VM_MEMATTR_UNCACHEABLE 1 +#define VM_MEMATTR_WRITE_BACK 2 +#define VM_MEMATTR_WRITE_THROUGH 3 + +#ifdef _KERNEL +/* If defined vmstat will try to use both of these in a switch statement */ +#define VM_MEMATTR_WRITE_COMBINING VM_MEMATTR_WRITE_THROUGH +#endif #define VM_MEMATTR_DEFAULT VM_MEMATTR_WRITE_BACK From owner-svn-src-all@freebsd.org Sat May 13 13:03:21 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 97B68D6A19D; Sat, 13 May 2017 13:03:21 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 69E6B19E5; Sat, 13 May 2017 13:03:21 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4DD3KKo041947; Sat, 13 May 2017 13:03:20 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4DD3Kai041946; Sat, 13 May 2017 13:03:20 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201705131303.v4DD3Kai041946@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sat, 13 May 2017 13:03:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318253 - head/sys/arm64/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 May 2017 13:03:21 -0000 Author: andrew Date: Sat May 13 13:03:20 2017 New Revision: 318253 URL: https://svnweb.freebsd.org/changeset/base/318253 Log: Allocate a cacheline when reading or writing to write through memory. The hardware will still write to memory, however following reads will be from the cache. MFC after: 1 week Sponsored by: DARPA, AFRL Modified: head/sys/arm64/include/armreg.h Modified: head/sys/arm64/include/armreg.h ============================================================================== --- head/sys/arm64/include/armreg.h Sat May 13 13:01:15 2017 (r318252) +++ head/sys/arm64/include/armreg.h Sat May 13 13:03:20 2017 (r318253) @@ -360,7 +360,7 @@ #define MAIR_ATTR(attr, idx) ((attr) << ((idx) * 8)) #define MAIR_DEVICE_nGnRnE 0x00 #define MAIR_NORMAL_NC 0x44 -#define MAIR_NORMAL_WT 0x88 +#define MAIR_NORMAL_WT 0xbb #define MAIR_NORMAL_WB 0xff /* PAR_EL1 - Physical Address Register */ From owner-svn-src-all@freebsd.org Sat May 13 15:57:31 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 03F57D6B7F6; Sat, 13 May 2017 15:57:31 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D2F9513C0; Sat, 13 May 2017 15:57:30 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id v4DFbgnM045291; Sat, 13 May 2017 08:37:42 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id v4DFbgWV045290; Sat, 13 May 2017 08:37:42 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201705131537.v4DFbgWV045290@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r318250 - in head: etc etc/newsyslog.conf.d etc/syslog.d tools/build/mk In-Reply-To: <201705130310.v4D3ApUl085738@repo.freebsd.org> To: Ngie Cooper Date: Sat, 13 May 2017 08:37:42 -0700 (PDT) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 May 2017 15:57:31 -0000 > Author: ngie > Date: Sat May 13 03:10:50 2017 > New Revision: 318250 > URL: https://svnweb.freebsd.org/changeset/base/318250 > > Log: > Handle the logfiles in newsyslog and syslogd conditionally, based on > src.conf(5) knobs > > This will allow consumers of FreeBSD to use the unmodified configuration > files out of the box more than previously. What about simply generating proper newsyslog.conf and syslog.conf based on the the MK_ values rather than change the visible administration interface that has finger memory, ansible, and puppet support? > > Both newsyslog.conf and syslog.conf: > - /var/log/lpd-errs (MK_LPR != no) > - /var/log/ppp.log (MK_PPP != no) > - /var/log/xferlog (MK_FTP != no) > > newsyslog.conf: > - /var/log/amd.log (MK_AMD != no) > - /var/log/pflog (MK_PF != no) > - /var/log/sendmail.st (MK_SENDMAIL != no) > > MFC after: 3 weeks > Sponsored by: Dell EMC Isilon > > Added: > head/etc/newsyslog.conf.d/amd.conf (contents, props changed) > head/etc/newsyslog.conf.d/ftp.conf (contents, props changed) > head/etc/newsyslog.conf.d/lpr.conf (contents, props changed) > head/etc/newsyslog.conf.d/pf.conf (contents, props changed) > head/etc/newsyslog.conf.d/ppp.conf (contents, props changed) > head/etc/newsyslog.conf.d/sendmail.conf (contents, props changed) > head/etc/syslog.d/ > head/etc/syslog.d/Makefile (contents, props changed) > head/etc/syslog.d/ftp.conf (contents, props changed) > head/etc/syslog.d/lpr.conf (contents, props changed) > head/etc/syslog.d/ppp.conf (contents, props changed) > Modified: > head/etc/Makefile > head/etc/newsyslog.conf > head/etc/newsyslog.conf.d/Makefile > head/etc/syslog.conf > head/tools/build/mk/OptionalObsoleteFiles.inc > > Modified: head/etc/Makefile > ============================================================================== > --- head/etc/Makefile Fri May 12 18:37:08 2017 (r318249) > +++ head/etc/Makefile Sat May 13 03:10:50 2017 (r318250) > @@ -8,7 +8,8 @@ FILESGROUPS= FILES > # No need as it is empty and just causes rebuilds since this file does so much. > UPDATE_DEPENDFILE= no > SUBDIR= \ > - newsyslog.conf.d > + newsyslog.conf.d \ > + syslog.d > > .if ${MK_SENDMAIL} != "no" > SUBDIR+=sendmail > > Modified: head/etc/newsyslog.conf > ============================================================================== > --- head/etc/newsyslog.conf Fri May 12 18:37:08 2017 (r318249) > +++ head/etc/newsyslog.conf Sat May 13 03:10:50 2017 (r318250) > @@ -18,7 +18,6 @@ > # > # logfilename [owner:group] mode count size when flags [/pid_file] [sig_num] > /var/log/all.log 600 7 * @T00 J > -/var/log/amd.log 644 7 1000 * J > /var/log/auth.log 600 7 1000 @0101T JC > /var/log/console.log 600 5 1000 * J > /var/log/cron 600 3 1000 * JC > @@ -26,18 +25,13 @@ > /var/log/debug.log 600 7 1000 * JC > /var/log/init.log 644 3 1000 * J > /var/log/kerberos.log 600 7 1000 * J > -/var/log/lpd-errs 644 7 1000 * JC > /var/log/maillog 640 7 * @T00 JC > /var/log/messages 644 5 1000 @0101T JC > /var/log/monthly.log 640 12 * $M1D0 JN > -/var/log/pflog 600 3 1000 * JB /var/run/pflogd.pid > -/var/log/ppp.log root:network 640 3 1000 * JC > /var/log/devd.log 644 3 1000 * JC > /var/log/security 600 10 1000 * JC > -/var/log/sendmail.st 640 10 * 168 BN > /var/log/utx.log 644 3 * @01T05 B > /var/log/weekly.log 640 5 * $W6D0 JN > -/var/log/xferlog 600 7 1000 * JC > > /etc/newsyslog.conf.d/* > /usr/local/etc/newsyslog.conf.d/* > > Modified: head/etc/newsyslog.conf.d/Makefile > ============================================================================== > --- head/etc/newsyslog.conf.d/Makefile Fri May 12 18:37:08 2017 (r318249) > +++ head/etc/newsyslog.conf.d/Makefile Sat May 13 03:10:50 2017 (r318250) > @@ -6,8 +6,32 @@ BINDIR= /etc/newsyslog.conf.d > > FILES= > > +.if ${MK_AMD} != "no" > +FILES+= amd.conf > +.endif > + > +.if ${MK_FTP} != "no" > +FILES+= ftp.conf > +.endif > + > +.if ${MK_LPR} != "no" > +FILES+= lpr.conf > +.endif > + > .if ${MK_OFED} != "no" > FILES+= opensm.conf > .endif > > +.if ${MK_PF} != "no" > +FILES+= pf.conf > +.endif > + > +.if ${MK_PPP} != "no" > +FILES+= ppp.conf > +.endif > + > +.if ${MK_SENDMAIL} != "no" > +FILES+= sendmail.conf > +.endif > + > .include > > Added: head/etc/newsyslog.conf.d/amd.conf > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/etc/newsyslog.conf.d/amd.conf Sat May 13 03:10:50 2017 (r318250) > @@ -0,0 +1,2 @@ > +# $FreeBSD$ > +/var/log/amd.log 644 7 1000 * J > > Added: head/etc/newsyslog.conf.d/ftp.conf > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/etc/newsyslog.conf.d/ftp.conf Sat May 13 03:10:50 2017 (r318250) > @@ -0,0 +1,2 @@ > +# $FreeBSD$ > +/var/log/xferlog 600 7 1000 * JC > > Added: head/etc/newsyslog.conf.d/lpr.conf > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/etc/newsyslog.conf.d/lpr.conf Sat May 13 03:10:50 2017 (r318250) > @@ -0,0 +1,2 @@ > +# $FreeBSD$ > +/var/log/lpd-errs 644 7 1000 * JC > > Added: head/etc/newsyslog.conf.d/pf.conf > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/etc/newsyslog.conf.d/pf.conf Sat May 13 03:10:50 2017 (r318250) > @@ -0,0 +1,2 @@ > +# $FreeBSD$ > +/var/log/pflog 600 3 1000 * JB /var/run/pflogd.pid > > Added: head/etc/newsyslog.conf.d/ppp.conf > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/etc/newsyslog.conf.d/ppp.conf Sat May 13 03:10:50 2017 (r318250) > @@ -0,0 +1,2 @@ > +# $FreeBSD$ > +/var/log/ppp.log root:network 640 3 1000 * JC > > Added: head/etc/newsyslog.conf.d/sendmail.conf > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/etc/newsyslog.conf.d/sendmail.conf Sat May 13 03:10:50 2017 (r318250) > @@ -0,0 +1,2 @@ > +# $FreeBSD$ > +/var/log/sendmail.st 640 10 * 168 BN > > Modified: head/etc/syslog.conf > ============================================================================== > --- head/etc/syslog.conf Fri May 12 18:37:08 2017 (r318249) > +++ head/etc/syslog.conf Sat May 13 03:10:50 2017 (r318250) > @@ -10,8 +10,6 @@ > security.* /var/log/security > auth.info;authpriv.info /var/log/auth.log > mail.info /var/log/maillog > -lpr.info /var/log/lpd-errs > -ftp.info /var/log/xferlog > cron.* /var/log/cron > !-devd > *.=debug /var/log/debug.log > @@ -31,8 +29,6 @@ cron.* /var/log/cron > # Uncomment this if you wish to see messages produced by devd > # !devd > # *.>=notice /var/log/devd.log > -!ppp > -*.* /var/log/ppp.log > !* > include /etc/syslog.d > include /usr/local/etc/syslog.d > > Added: head/etc/syslog.d/Makefile > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/etc/syslog.d/Makefile Sat May 13 03:10:50 2017 (r318250) > @@ -0,0 +1,19 @@ > +# $FreeBSD$ > + > +.include > + > +.if ${MK_FTP} != "no" > +FILES+= ftp.conf > +.endif > + > +.if ${MK_LPR} != "no" > +FILES+= lpr.conf > +.endif > + > +.if ${MK_PPP} != "no" > +FILES+= ppp.conf > +.endif > + > +BINDIR= /etc/syslog.d > + > +.include > > Added: head/etc/syslog.d/ftp.conf > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/etc/syslog.d/ftp.conf Sat May 13 03:10:50 2017 (r318250) > @@ -0,0 +1,2 @@ > +# $FreeBSD$ > +ftp.info /var/log/xferlog > > Added: head/etc/syslog.d/lpr.conf > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/etc/syslog.d/lpr.conf Sat May 13 03:10:50 2017 (r318250) > @@ -0,0 +1,2 @@ > +# $FreeBSD$ > +lpr.info /var/log/lpd-errs > > Added: head/etc/syslog.d/ppp.conf > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/etc/syslog.d/ppp.conf Sat May 13 03:10:50 2017 (r318250) > @@ -0,0 +1,3 @@ > +# $FreeBSD$ > +!ppp > +*.* /var/log/ppp.log > > Modified: head/tools/build/mk/OptionalObsoleteFiles.inc > ============================================================================== > --- head/tools/build/mk/OptionalObsoleteFiles.inc Fri May 12 18:37:08 2017 (r318249) > +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sat May 13 03:10:50 2017 (r318250) > @@ -56,6 +56,7 @@ OLD_FILES+=usr/share/man/man8/iasl.8.gz > > .if ${MK_AMD} == no > OLD_FILES+=etc/amd.map > +OLD_FILES+=etc/newsyslog.conf.d/amd.conf > OLD_FILES+=etc/rc.d/amd > OLD_FILES+=usr/bin/pawd > OLD_FILES+=usr/sbin/amd > @@ -1588,9 +1589,11 @@ OLD_FILES+=usr/share/man/man8/fmtree.8.g > > .if ${MK_FTP} == no > OLD_FILES+=etc/ftpusers > +OLD_FILES+=etc/newsyslog.conf.d/ftp.conf > OLD_FILES+=etc/pam.d/ftp > OLD_FILES+=etc/pam.d/ftpd > OLD_FILES+=etc/rc.d/ftpd > +OLD_FILES+=etc/syslog.d/ftp.conf > OLD_FILES+=usr/bin/ftp > OLD_FILES+=usr/bin/gate-ftp > OLD_FILES+=usr/bin/pftp > @@ -6183,7 +6186,9 @@ OLD_FILES+=usr/share/man/man8/updatedb.8 > .if ${MK_LPR} == no > OLD_FILES+=etc/hosts.lpd > OLD_FILES+=etc/printcap > +OLD_FILES+=etc/newsyslog.conf.d/lpr.conf > OLD_FILES+=etc/rc.d/lpd > +OLD_FILES+=etc/syslog.d/lpr.conf > OLD_FILES+=usr/bin/lp > OLD_FILES+=usr/bin/lpq > OLD_FILES+=usr/bin/lpr > @@ -7158,6 +7163,7 @@ OLD_DIRS+=usr/share/examples/pc-sysinsta > .endif > > .if ${MK_PF} == no > +OLD_FILES+=etc/newsyslog.conf.d/pf.conf > OLD_FILES+=etc/periodic/security/520.pfdenied > OLD_FILES+=etc/pf.os > OLD_FILES+=etc/rc.d/ftp-proxy > @@ -7297,7 +7303,9 @@ OLD_FILES+=usr/share/man/man8/portsnap.8 > .endif > > .if ${MK_PPP} == no > +OLD_FILES+=etc/newsyslog.conf.d/ppp.conf > OLD_FILES+=etc/ppp/ppp.conf > +OLD_FILES+=etc/syslog.d/ppp.conf > OLD_DIRS+=etc/ppp > OLD_FILES+=usr/sbin/ppp > OLD_FILES+=usr/sbin/pppctl > @@ -7473,6 +7481,7 @@ OLD_FILES+=usr/share/man/man8/rtquery.8. > .endif > > .if ${MK_SENDMAIL} == no > +OLD_FILES+=etc/newsyslog.conf.d/sendmail.conf > OLD_FILES+=etc/periodic/daily/150.clean-hoststat > OLD_FILES+=etc/periodic/daily/440.status-mailq > OLD_FILES+=etc/periodic/daily/460.status-mail-rejects > > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Sat May 13 16:25:39 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CA81AD6B020 for ; Sat, 13 May 2017 16:25:39 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1a.eu.mailhop.org (outbound1a.eu.mailhop.org [52.58.109.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 675781D0 for ; Sat, 13 May 2017 16:25:38 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: a1e6d573-37f8-11e7-b96e-2378c10e3beb X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 73.78.92.27 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [73.78.92.27]) by outbound1.eu.mailhop.org (Halon) with ESMTPSA id a1e6d573-37f8-11e7-b96e-2378c10e3beb; Sat, 13 May 2017 16:24:27 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id v4DGOLRR004128; Sat, 13 May 2017 10:24:21 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1494692660.59865.85.camel@freebsd.org> Subject: Re: svn commit: r318250 - in head: etc etc/newsyslog.conf.d etc/syslog.d tools/build/mk From: Ian Lepore To: rgrimes@freebsd.org, Ngie Cooper Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Sat, 13 May 2017 10:24:20 -0600 In-Reply-To: <201705131537.v4DFbgWV045290@pdx.rh.CN85.dnsmgr.net> References: <201705131537.v4DFbgWV045290@pdx.rh.CN85.dnsmgr.net> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 May 2017 16:25:39 -0000 On Sat, 2017-05-13 at 08:37 -0700, Rodney W. Grimes wrote: > > > > Author: ngie > > Date: Sat May 13 03:10:50 2017 > > New Revision: 318250 > > URL: https://svnweb.freebsd.org/changeset/base/318250 > > > > Log: > >   Handle the logfiles in newsyslog and syslogd conditionally, based on > >   src.conf(5) knobs > >    > >   This will allow consumers of FreeBSD to use the unmodified configuration > >   files out of the box more than previously. > What about simply generating proper newsyslog.conf and syslog.conf based > on the the MK_ values rather than change the visible administration > interface that has finger memory, ansible, and puppet support? > The evolution for years has been away from monolithic config files containing a mashup of values for unrelated subsystems and towards .conf.d directories containing many single-subject files.  The monolithic files are difficult to edit and otherwise manage programmatically, and especially difficult to manage in terms of software packaging and software updates. -- Ian From owner-svn-src-all@freebsd.org Sat May 13 16:28:38 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EF8B5D6B0A4; Sat, 13 May 2017 16:28:38 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D23F2376; Sat, 13 May 2017 16:28:38 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 101BD1A54; Sat, 13 May 2017 16:28:38 +0000 (UTC) Date: Sat, 13 May 2017 16:28:38 +0000 From: Alexey Dokuchaev To: rgrimes@freebsd.org Cc: Ngie Cooper , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r318250 - in head: etc etc/newsyslog.conf.d etc/syslog.d tools/build/mk Message-ID: <20170513162838.GB84947@FreeBSD.org> References: <201705130310.v4D3ApUl085738@repo.freebsd.org> <201705131537.v4DFbgWV045290@pdx.rh.CN85.dnsmgr.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201705131537.v4DFbgWV045290@pdx.rh.CN85.dnsmgr.net> User-Agent: Mutt/1.7.1 (2016-10-04) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 May 2017 16:28:39 -0000 On Sat, May 13, 2017 at 08:37:42AM -0700, Rodney W. Grimes wrote: > > New Revision: 318250 > > URL: https://svnweb.freebsd.org/changeset/base/318250 > > > > Log: > > Handle the logfiles in newsyslog and syslogd conditionally, based on > > src.conf(5) knobs > > > > This will allow consumers of FreeBSD to use the unmodified configuration > > files out of the box more than previously. > > What about simply generating proper newsyslog.conf and syslog.conf based > on the the MK_ values rather than change the visible administration > interface that has finger memory, ansible, and puppet support? +1. I've always loved FreeBSD for its simplicity, and having to know/care about one or two config files is one of it; these *.d populated directories smell like Linux too much. I understand the reason behind supporting those for ports, but please don't plague our base with this one-line config files scattered around idiocy. ./danfe From owner-svn-src-all@freebsd.org Sat May 13 16:29:54 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2F231D6B12A; Sat, 13 May 2017 16:29:54 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg0-x243.google.com (mail-pg0-x243.google.com [IPv6:2607:f8b0:400e:c05::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F37626EB; Sat, 13 May 2017 16:29:53 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x243.google.com with SMTP id i63so11347981pgd.2; Sat, 13 May 2017 09:29:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=ocLYMLPUgKWH+JIa5sF+7kk1xH1u9S1ovkFIXpCbmLw=; b=ur0fthpnNUKlx75NiTw4XIV0skuT5LF61VgbJvu+/h4AN9RfnLxCDZnrg3RXnhF6HV /86DAu2dYLhXbPdBIjJeeRvAwiiweEd6AH1NmuXgxX4WvmcPs6OlO8cLq+y3//SyYCcq MUvkz2jER3mNBST+vXmijo+OKbt/nDivmoIdkd3aApoVPADKfgcPoLjyaB9C3h82W0ag urJMRrsgCvc06YKXtmCiE2fr2Qpo3N8e9wGuH35K1A8xXCbeWCoocCwn0MOqF+19GxRA IDkYEgxQZ18A709gucBWGOpFMNvfxqC/QgzEZRc70at/9p4Py/bmvf2ofm8hEzSp+c+3 5qRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=ocLYMLPUgKWH+JIa5sF+7kk1xH1u9S1ovkFIXpCbmLw=; b=NnNAVI8j9Iy7jHrXjly9hTtcceWFRU50J4NntNXQZM8JDOYT0SSpec6G4UW1/4p+G8 dc6qPqBQUofFt4kKpDz6aqUPey4A8HPjHKWBdR/LHlALH9Kwt12cAhqZeojGRy4L0GAt jOpYZ98Ifat7Jssto+GwVt/mWkn1imcGYMfZVzuZVs5EAXPuJlqwpg9Vw+GMBoNgzezA 0DkZGvmTLOPw/NlNyAdZ9SBtCoQScCR9Phonk+gaDvQwOlcBIqcgArLIroa84c2Cdl0A SMQid6DN18entJIFe3m0BNVjYmJ9ILXZaeRwdyrZJtDSEOj348wXTpoSPsY3sPbjr9ME UpuA== X-Gm-Message-State: AODbwcDwbW9bzWoogR4HOQWmtoXliYHl9AIo3f0rJwjnGh2ZlHLp4znx 63l33Ln5iIGttCBWVWk= X-Received: by 10.84.141.129 with SMTP id 1mr12788765plv.75.1494692993315; Sat, 13 May 2017 09:29:53 -0700 (PDT) Received: from [192.168.20.13] (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id e4sm10217109pfe.96.2017.05.13.09.29.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 13 May 2017 09:29:52 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r318250 - in head: etc etc/newsyslog.conf.d etc/syslog.d tools/build/mk From: Ngie Cooper X-Mailer: iPhone Mail (14E304) In-Reply-To: <201705131537.v4DFbgWV045290@pdx.rh.CN85.dnsmgr.net> Date: Sat, 13 May 2017 09:29:51 -0700 Cc: Ngie Cooper , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <201705131537.v4DFbgWV045290@pdx.rh.CN85.dnsmgr.net> To: rgrimes@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 May 2017 16:29:54 -0000 On May 13, 2017, at 08:37, Rodney W. Grimes = wrote: >> Author: ngie >> Date: Sat May 13 03:10:50 2017 >> New Revision: 318250 >> URL: https://svnweb.freebsd.org/changeset/base/318250 >>=20 >> Log: >> Handle the logfiles in newsyslog and syslogd conditionally, based on >> src.conf(5) knobs >>=20 >> This will allow consumers of FreeBSD to use the unmodified configuration= >> files out of the box more than previously. >=20 > What about simply generating proper newsyslog.conf and syslog.conf based > on the the MK_ values rather than change the visible administration > interface that has finger memory, ansible, and puppet support? - My employer doesn't use puppet on its appliances. - Files snapshotted in time bitrot (which was the case with our configs, whi= ch is part of the reason behind this change. - It's really easy to screw up a mergemaster call if you edit the files, and= install the stock version which removes the edits. Thanks, -Ngie= From owner-svn-src-all@freebsd.org Sat May 13 16:32:38 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6651BD6B2EC; Sat, 13 May 2017 16:32:38 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x242.google.com (mail-pf0-x242.google.com [IPv6:2607:f8b0:400e:c00::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2EDE9B13; Sat, 13 May 2017 16:32:38 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x242.google.com with SMTP id u26so10499155pfd.2; Sat, 13 May 2017 09:32:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=rSZ/EcO7zxEex2JwET6SlykQHCQLYs0Y4eLZWpDtUJc=; b=pfsTtgWwX3YEa9Id6Sn3vGslJ+Yj+zzlFhjktK5ZhKMDwd3622goknZu/lYDFl6L2c sDymivqm/z/iwo0m2+gPIZ4hJlXDNUxTFLeV5qCinWd/D1tdY+Y790/t874bG8JA4gI6 5mDL2GMdtB/MVAhLKPDPDlE4KBKYTe2BFCZ9CXncNvF0A9G5IJX8mckCbmZicSzeNLsb TtW8dCiVWPu1pfqZ0uM8Jahm2qxuS6IFTGHQpnsaVGBj/5fo4ac4NMJQJJdGMDb45gBU BFYcaQJvWnQZU5Ke/fzOpMgdWnDBCUrUQm5sNOZgUwnO2TBW+zbaaEUvsQqaOhADNNR2 Ywsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=rSZ/EcO7zxEex2JwET6SlykQHCQLYs0Y4eLZWpDtUJc=; b=Fzv6KO9rI8+ofpLOMgqNum1SLQlmr8jkjRVAICfQG/F8PpACTuYC/BhYhcGzua1zdX 76lSd/7kfmMbHMUa+ORiRp45zhwIAfgM/jjzO3HxSoXr/2bNEYzWO55IsLIizvmQwCgP sKhH4L+IUeK+o8Tht9HbASk2+b0RGwX5TN2E9BBHPFq58yVsgF7lz+j7Vy6KHOfxAu17 QPupoiay2A8yhPxU8huE4FALpQx4gg33XyWSjWR39/17Fy0HZVQ3G5fXDbiKdR3Ao7ps AixLO4s5q7L0EA32vCBiH+L3CFqYJZezlZ5lCAP6XWwkP9uHhs8Ifkf0Um2JGebNXcot tScg== X-Gm-Message-State: AODbwcDwxpF4Qab6Vy34gCHgB9ZGIKn2j6ZsoWcpvr0yOOoRJw8jUTCG 7gBAnbZZASAZmmeUzIs= X-Received: by 10.84.224.200 with SMTP id k8mr13611115pln.49.1494693157519; Sat, 13 May 2017 09:32:37 -0700 (PDT) Received: from [192.168.20.13] (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id 7sm10915861pff.36.2017.05.13.09.32.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 13 May 2017 09:32:36 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r318250 - in head: etc etc/newsyslog.conf.d etc/syslog.d tools/build/mk From: Ngie Cooper X-Mailer: iPhone Mail (14E304) In-Reply-To: Date: Sat, 13 May 2017 09:32:36 -0700 Cc: Ngie Cooper , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <201705131537.v4DFbgWV045290@pdx.rh.CN85.dnsmgr.net> To: rgrimes@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 May 2017 16:32:38 -0000 > On May 13, 2017, at 09:29, Ngie Cooper wrote: >=20 > On May 13, 2017, at 08:37, Rodney W. Grimes wrote: >=20 >>> Author: ngie >>> Date: Sat May 13 03:10:50 2017 >>> New Revision: 318250 >>> URL: https://svnweb.freebsd.org/changeset/base/318250 >>>=20 >>> Log: >>> Handle the logfiles in newsyslog and syslogd conditionally, based on >>> src.conf(5) knobs >>>=20 >>> This will allow consumers of FreeBSD to use the unmodified configuration= >>> files out of the box more than previously. >>=20 >> What about simply generating proper newsyslog.conf and syslog.conf based >> on the the MK_ values rather than change the visible administration >> interface that has finger memory, ansible, and puppet support? >=20 > - My employer doesn't use puppet on its appliances. > - Files snapshotted in time bitrot (which was the case with our configs, w= hich is part of the reason behind this change. > - It's really easy to screw up a mergemaster call if you edit the files, a= nd install the stock version which removes the edits. Also, programmatically removing the entries means you have to bake the metad= ata into etc/Makefile, which is already complicated enough as-is. Thanks, -Ngie= From owner-svn-src-all@freebsd.org Sat May 13 16:39:17 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7CD5CD6B398 for ; Sat, 13 May 2017 16:39:17 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x232.google.com (mail-io0-x232.google.com [IPv6:2607:f8b0:4001:c06::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3AC90CC6 for ; Sat, 13 May 2017 16:39:17 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x232.google.com with SMTP id o12so54891763iod.3 for ; Sat, 13 May 2017 09:39:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=HbZCQ/YfeUyhHxvJ86bwGonNQZZ2UR7bYETppkJ+Ubw=; b=CQ4Bj25tNul6OL92dZMz4MuiQ9pDi8Hmy/+BA+4TR3tNt4xvpodfd3crDfUt9NhsHb zfSwRkx5WYdgMrO2hBj/Uh6GCIVne9cng5RCQwqqcwjbx4/JW8hGL9B+lsyMJsV49gIu WBy9UuAwlSVre42h7H8eI6BByaCGmDiyzipryiGAMaKp+ciyNLX7W85nbkae+BiXfLPI 7pWGbJtxZaobKOWsEB0eSzAUlTBNUHuj4wEjyGOpAwYQX87Nwk6J5RMkpG6f5S0pXqfu b0MGDOykEMLHy8p/Xq+19Jm5FKLu8AkOzVJr/j76JWFvCngXDPxaT1yq3ve0RXyCCG53 P/Tw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=HbZCQ/YfeUyhHxvJ86bwGonNQZZ2UR7bYETppkJ+Ubw=; b=fKKvhjPFfTOkgAixHV4rqPtbbC4WpOhf2luTa3iTUYQPnt06hNS4QpCfbmzcDWjLOD 1JBIr9bKGT/8GT5cku/D2XSkJ2Ls9WL2l6m9xGC9kxsQX2YOrutvG0DKta2RttjqaMG/ zHP5qBUjImzTvreljVGD7g+veSYuWnaiShagH9IGuphRymAl27ZGgFUo9JUcikngbdWb Jb7d00WXN+rVmZyL09eaNtU63ihP2EvKqsH5zI89WnM3TlqxCwscVxVU0sD7yRwieNSu fMBNDStAYYSntD2tCH+rCyRzQBK5XiPnMqAOQcF9ulS/XvAnFcDlhgekjfow9/D0t34y zXYg== X-Gm-Message-State: AODbwcCulYW850jWVgYtcVHxL5ZLHcApgw8EhW//CVcRWbDRmv/wH8Vv Jhe1ttw0Hqx0Ci6SbjGuntp9tuSs5w== X-Received: by 10.107.85.4 with SMTP id j4mr9557338iob.218.1494693556442; Sat, 13 May 2017 09:39:16 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.126.6 with HTTP; Sat, 13 May 2017 09:39:15 -0700 (PDT) X-Originating-IP: [2603:300b:6:5100:5c7c:18cc:3900:fa11] In-Reply-To: References: <201705131537.v4DFbgWV045290@pdx.rh.CN85.dnsmgr.net> From: Warner Losh Date: Sat, 13 May 2017 10:39:15 -0600 X-Google-Sender-Auth: XhPw2u20NXQRJme6PFYXNoSOaWg Message-ID: Subject: Re: svn commit: r318250 - in head: etc etc/newsyslog.conf.d etc/syslog.d tools/build/mk To: Ngie Cooper Cc: "Rodney W. Grimes" , Ngie Cooper , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 May 2017 16:39:17 -0000 On Sat, May 13, 2017 at 10:32 AM, Ngie Cooper wrote: > >> On May 13, 2017, at 09:29, Ngie Cooper wrote: >> >> On May 13, 2017, at 08:37, Rodney W. Grimes wrote: >> >>>> Author: ngie >>>> Date: Sat May 13 03:10:50 2017 >>>> New Revision: 318250 >>>> URL: https://svnweb.freebsd.org/changeset/base/318250 >>>> >>>> Log: >>>> Handle the logfiles in newsyslog and syslogd conditionally, based on >>>> src.conf(5) knobs >>>> >>>> This will allow consumers of FreeBSD to use the unmodified configuration >>>> files out of the box more than previously. >>> >>> What about simply generating proper newsyslog.conf and syslog.conf based >>> on the the MK_ values rather than change the visible administration >>> interface that has finger memory, ansible, and puppet support? >> >> - My employer doesn't use puppet on its appliances. >> - Files snapshotted in time bitrot (which was the case with our configs, which is part of the reason behind this change. couldn't you have an Isilion config file in the appropriate directory instead? And use the default newsyslog / syslog config files? >> - It's really easy to screw up a mergemaster call if you edit the files, and install the stock version which removes the edits. > > Also, programmatically removing the entries means you have to bake the metadata into etc/Makefile, which is already complicated enough as-is. Why do you care about removing them at all? They are no-ops if the files don't exist. Why not just always install all these files is where I'm going with this... Warner From owner-svn-src-all@freebsd.org Sat May 13 16:51:46 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5EC90D6B7CC; Sat, 13 May 2017 16:51:46 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3EEFB128E; Sat, 13 May 2017 16:51:46 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 5AB861F6E; Sat, 13 May 2017 16:51:45 +0000 (UTC) Date: Sat, 13 May 2017 16:51:45 +0000 From: Alexey Dokuchaev To: Ian Lepore Cc: rgrimes@freebsd.org, Ngie Cooper , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r318250 - in head: etc etc/newsyslog.conf.d etc/syslog.d tools/build/mk Message-ID: <20170513165145.GC84947@FreeBSD.org> References: <201705131537.v4DFbgWV045290@pdx.rh.CN85.dnsmgr.net> <1494692660.59865.85.camel@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1494692660.59865.85.camel@freebsd.org> User-Agent: Mutt/1.7.1 (2016-10-04) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 May 2017 16:51:46 -0000 On Sat, May 13, 2017 at 10:24:20AM -0600, Ian Lepore wrote: > ... > The evolution for years has been away from monolithic config files > containing a mashup of values for unrelated subsystems and towards > .conf.d directories containing many single-subject files. This "evolution" had probably originated in people's minds who know little about software development and maintenance. And FWIW, newsyslog files are not about "unrelated subsystems", it's about one subsystem responsible for log rotation. Speaking of "unrelated subsystems", /etc/rc.conf is a living manifestation of how "unrelated subsystems" can be configured in a single file and, mind you, everyone is being quite happy about it. > The monolithic files are difficult to edit Quite on the contrary: monolithic files are much easier to edit and keep track of by a human being (system operator). > and otherwise manage programmatically, and especially difficult to manage > in terms of software packaging and software updates. Please don't mix "difficult to edit" and "manage programmatically". As I have said, having support for "include *.conf.d" makes sense for 3rd-party software (read: ports), but has little need for the base, and IMHO brings more maintenance burden than any benefit. ./danfe From owner-svn-src-all@freebsd.org Sat May 13 17:09:48 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 54024D6B0CE; Sat, 13 May 2017 17:09:48 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg0-x241.google.com (mail-pg0-x241.google.com [IPv6:2607:f8b0:400e:c05::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1C1C21D56; Sat, 13 May 2017 17:09:48 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x241.google.com with SMTP id h64so6695460pge.3; Sat, 13 May 2017 10:09:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=ers6k7lmFDYo98YneDXyvqCF/3tfvnBfbuj/10TMtmE=; b=dv1yZoSBJjEl8KaDtZ6XQHDjrdiGTY5cxa+7jiMdeMkwU64A1l5dBtlPwRAm/ErFyR rTllhVNJ0F8nUrazBsxn9Dw/y4Yx/QG6LZddchZZU7+I3pA49Lqkjd64B6WFys09PXPO lQLqKrM2X+5jGEwk3VRsSIrSCJvnEflySfKEOuj08XyDPhBvoORydHzjGFzwCchdf69h zLC+zQp2DWKbVHxd6irBcgKV+ltfbp8ILP6PqHaUTUOxWEJ1ybqnknFpcL0UIArqJnuj a7ziNxLTLeI6NNFi29hW3Ff+Ukyqt1VA582LaYLQ94BC6jwGi/DTIeObIBBHx8TJg3fF Rvtg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=ers6k7lmFDYo98YneDXyvqCF/3tfvnBfbuj/10TMtmE=; b=HHd9e0M6fXv2VAFNWbmbvax4aSpIvjPel+pGwKTXyQwDH8CjygYdWbDQHnUMy6TY3S Jyq4s8nEPKv/1UItvYwKD945tqNg2UquRWX4+r/4QBf4GrsoEL5cloZjzqctbzh4BuRn 1j4FIjaEim91LUmK2URIsK57y/Syk2ZdJDs+Q7I0TPYfGjPbopklLYOPmYJGolTrdMvv Ngxi6rcNPeEaGWkrByxLAXcUj0/BN+iTSCUmrBXTQjH4iREdUh5dNq2v1YRR6yXd3/wM dpZbcgmOGFWrJe6NkslX1wnd+4lZ8WPuyeM4LkFcuJl0aGgPNp7JEynzsm+1Bs4eZKhM vQBg== X-Gm-Message-State: AODbwcD185b+hH2hcP8Enxl6F8Lk1vGxnscx+JKLbPb94GzylmzAF1Rh m4S0bivNuKcAtg== X-Received: by 10.99.54.137 with SMTP id d131mr10450389pga.72.1494695387649; Sat, 13 May 2017 10:09:47 -0700 (PDT) Received: from fuji-wireless.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id e5sm16108332pga.13.2017.05.13.10.09.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 13 May 2017 10:09:46 -0700 (PDT) From: "Ngie Cooper (yaneurabeya)" Message-Id: Content-Type: multipart/signed; boundary="Apple-Mail=_9100C495-705F-4A7A-8839-5639A9A68FFD"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: svn commit: r318250 - in head: etc etc/newsyslog.conf.d etc/syslog.d tools/build/mk Date: Sat, 13 May 2017 10:09:52 -0700 In-Reply-To: Cc: "Rodney W. Grimes" , Ngie Cooper , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" To: Warner Losh References: <201705131537.v4DFbgWV045290@pdx.rh.CN85.dnsmgr.net> X-Mailer: Apple Mail (2.3273) X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 May 2017 17:09:48 -0000 --Apple-Mail=_9100C495-705F-4A7A-8839-5639A9A68FFD Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On May 13, 2017, at 9:39 AM, Warner Losh wrote: >=20 > On Sat, May 13, 2017 at 10:32 AM, Ngie Cooper > wrote: >>=20 >>> On May 13, 2017, at 09:29, Ngie Cooper = wrote: >>>=20 >>> On May 13, 2017, at 08:37, Rodney W. Grimes = wrote: >>>=20 >>>>> Author: ngie >>>>> Date: Sat May 13 03:10:50 2017 >>>>> New Revision: 318250 >>>>> URL: https://svnweb.freebsd.org/changeset/base/318250 >>>>>=20 >>>>> Log: >>>>> Handle the logfiles in newsyslog and syslogd conditionally, based = on >>>>> src.conf(5) knobs >>>>>=20 >>>>> This will allow consumers of FreeBSD to use the unmodified = configuration >>>>> files out of the box more than previously. >>>>=20 >>>> What about simply generating proper newsyslog.conf and syslog.conf = based >>>> on the the MK_ values rather than change the visible administration >>>> interface that has finger memory, ansible, and puppet support? >>>=20 >>> - My employer doesn't use puppet on its appliances. >>> - Files snapshotted in time bitrot (which was the case with our = configs, which is part of the reason behind this change. >=20 > couldn't you have an Isilion config file in the appropriate directory > instead? And use the default newsyslog / syslog config files? I=E2=80=99m not sure I=E2=80=99m in disagreement with this statement, = but the fact is that there are a handful of config files, about 200 = lines each, which drive newsyslog/syslogd on OneFS, with a fair amount = of duplication. I=E2=80=99m trying to simplify the mess I=E2=80=99m = presented with at work, one bit at a time. >>> - It's really easy to screw up a mergemaster call if you edit the = files, and install the stock version which removes the edits. >>=20 >> Also, programmatically removing the entries means you have to bake = the metadata into etc/Makefile, which is already complicated enough = as-is. >=20 > Why do you care about removing them at all? They are no-ops if the > files don't exist. Why not just always install all these files is > where I'm going with this=E2=80=A6 I don=E2=80=99t follow. Could you please restate this paragraph? Thanks, -Ngie --Apple-Mail=_9100C495-705F-4A7A-8839-5639A9A68FFD 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----- iQIcBAEBCgAGBQJZFz3gAAoJEPWDqSZpMIYV5dAP/REv7uL4OCv1mMMMShFpHQgG v1P+4qx9JRw+o+AEIuk9FNN5we2Utz4chTSYsoZzidrEJoqIj4vQZHVLVpiy+8/p TnqHguzPI6NawkjJIy1u0/cQS0esrOr808wuYpS2pxlQUllZNA1VQ2Sztgdd6LU9 zL2GMeRKRWLUQlUkImgCz1Nmgky+2lB+dL3kR4yuAf2b3Lnqr5YIfrMX0fhMYEmw Pp11ybVuDRBEMvSzWLGh/tCTyj6L3EuwJEU5F6JjUrgZAlrao6sKSNeZnrJk6ORa p2o2TnTFlV5lZouPwDnP7MLTK9/gt5z1qvv7Wbuil0vjNJRbQNDHWj0bdCEsU/ze 0Wu1vnVDPy5R5jBv9ZGTZcge08mQEeiu0/0G9JFn76na8IudSG8HmhPgeQvy3BXH 5sr+S90JTVz+IRO98SroK4qy+2n1UZw5BL0/2nVvLBhRDNmYrPL9MD9UpdTZGbgI 4P/6vLZpYGT2DCwpMGTDqY/hRpesLR9G0BiHBgKY4M29UqOItJuXG8A0PYOTDlM2 tDzH2lpMRnfHjhriIDg8qzTfaNUpf9dqDjYAR07Se1hcHnwUYU86Qo28g5CEPBbE uL+DvO8/s19Ye2Cv3GYdFwabEVnBCTZPAI+9KA1Qa7Od90rV+137Z843YkDaoDjS vQhg1DBofkOi1S0CQAjj =LJZA -----END PGP SIGNATURE----- --Apple-Mail=_9100C495-705F-4A7A-8839-5639A9A68FFD-- From owner-svn-src-all@freebsd.org Sat May 13 17:21:29 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E8134D6B67E; Sat, 13 May 2017 17:21:29 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x242.google.com (mail-pf0-x242.google.com [IPv6:2607:f8b0:400e:c00::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B3BEF777; Sat, 13 May 2017 17:21:29 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x242.google.com with SMTP id w69so10598228pfk.1; Sat, 13 May 2017 10:21:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=YWStF9UE6UUwSI9yQQjNKdeuBuR4vvX2p0hWy+ZmazI=; b=bxrAa6UQ8/rLFdySJq9DsSo8tDBmzg2a2eE6VXMBKSjOp8bsHgqxvrKAtMUS51XeVM y8PiGUoZyTOnZgkDBwNWAhVNhtitx4OYPvuK7vyBlmO5rossCdtIRpD/RlAKXxtTMtFg ytzYlDOh+FuC7ZEldqpIlx5abLqsCE/91FHhhsrkTkqPwNgY7bsNSo0CC1l1S04aypFk MzwR+gginZKA1sbEx0fLZmlJqQBN3ziRwtqrBteqHNQU3/x3DaLTFuR/v8jh6h0pX+/w NKwQYkzLZLOpc/B1KoIzQonIfMXePG7ec0FYFHXzWaSF++QxJMQXTmMf77eDjcxY/7xn Lh6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=YWStF9UE6UUwSI9yQQjNKdeuBuR4vvX2p0hWy+ZmazI=; b=ZHp7doI0jM86i5vCYpbsHWzhbEftAPuEe3WMCqe8TvJNdpIibMdwmrXXYuxRF7DbE0 O7ZUgVcqy+yMOCb1u1tDKMq74fNvzTPzbzt7HK5OQCYKf/Gf6vg7iKK+OQ58c+BkxcOv je1BJcGj5oYZeD8iyz7DDaLGwY5Oa5O5lsPLgW+o9CmK7lLPkeQNRboTaWCeNppqNXmC vUJ/8YxYWJpClOvyJlryrt78LoqTaXlf1mSziUrX7IODYU+DKMMyX4ahD8NWtG7l+7CN 7xQ6XLZ/UUWhiEtYWoOtzDjaZ/brT7EHsBcNBXG63eBskear/4tpI54QAUk3P5vqkfcL pvSQ== X-Gm-Message-State: AODbwcC7GD0irjpNEjhezJ06rsEF/JzFX1zjatclFwGYdCOi54FcRcgJ R/o7s1/esXRTvNz5GVw= X-Received: by 10.98.201.212 with SMTP id l81mr10519500pfk.225.1494696089126; Sat, 13 May 2017 10:21:29 -0700 (PDT) Received: from fuji-wireless.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id s18sm12272804pfi.16.2017.05.13.10.21.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 13 May 2017 10:21:28 -0700 (PDT) From: "Ngie Cooper (yaneurabeya)" Message-Id: Content-Type: multipart/signed; boundary="Apple-Mail=_80996CD5-7498-4790-A375-2BAA04DC6751"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: svn commit: r318250 - in head: etc etc/newsyslog.conf.d etc/syslog.d tools/build/mk Date: Sat, 13 May 2017 10:21:33 -0700 In-Reply-To: <20170513165145.GC84947@FreeBSD.org> Cc: Ian Lepore , rgrimes@freebsd.org, Ngie Cooper , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org To: Alexey Dokuchaev References: <201705131537.v4DFbgWV045290@pdx.rh.CN85.dnsmgr.net> <1494692660.59865.85.camel@freebsd.org> <20170513165145.GC84947@FreeBSD.org> X-Mailer: Apple Mail (2.3273) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 May 2017 17:21:30 -0000 --Apple-Mail=_80996CD5-7498-4790-A375-2BAA04DC6751 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On May 13, 2017, at 9:51 AM, Alexey Dokuchaev = wrote: >=20 > On Sat, May 13, 2017 at 10:24:20AM -0600, Ian Lepore wrote: >> ... >> The evolution for years has been away from monolithic config files >> containing a mashup of values for unrelated subsystems and towards >> .conf.d directories containing many single-subject files. >=20 > This "evolution" had probably originated in people's minds who know = little > about software development and maintenance. And FWIW, newsyslog files = are > not about "unrelated subsystems", it's about one subsystem responsible = for > log rotation. This hasn=E2=80=99t really changed with moving to .conf.d. A single = subsystem is managing a series of modular config files, instead of a = single config file. I firmly believe that this was the right general = approach to go. > Speaking of "unrelated subsystems", /etc/rc.conf is a living = manifestation > of how "unrelated subsystems" can be configured in a single file and, = mind > you, everyone is being quite happy about it. =E2=80=A6 except people have to bake in defaults in rc.d scripts for = whether or not services should be disabled because they can=E2=80=99t = put apache defaults in /etc/rc.conf . /etc/rc.conf isn=E2=80=99t managed = via etcupdate or mergemaster, so I think this comparison is like apples = to oranges. >> The monolithic files are difficult to edit >=20 > Quite on the contrary: monolithic files are much easier to edit and = keep > track of by a human being (system operator). I strongly disagree, having seen multiple configuration files a couple = hundred lines long. It gets messy and for those who don=E2=80=99t = understand how syslogd/newsyslog works (inevitably, these people are the = ones that get charged with implementing daemons, and this is one of the = pieces that needs to be done). >> and otherwise manage programmatically, and especially difficult to = manage >> in terms of software packaging and software updates. >=20 > Please don't mix "difficult to edit" and "manage programmatically". = As I > have said, having support for "include *.conf.d" makes sense for = 3rd-party > software (read: ports), but has little need for the base, and IMHO = brings > more maintenance burden than any benefit. Can you please provide an example of how it=E2=80=99s more burdensome = going to .conf.d? Personally, I think it=E2=80=99s a whole lot easier = doing `rm -f /etc/newsyslog.d/amd.conf`, than it is to open up the file = and edit out the amd entries, or invoke sed/something else to do the = same thing. Even ansible/chef/puppet would have to bake the configuration removal = logic into its template files, which seems like a pain for folks (and = the same logic would need to be implemented multiple times instead of = once). Thanks, -Ngie --Apple-Mail=_80996CD5-7498-4790-A375-2BAA04DC6751 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----- iQIcBAEBCgAGBQJZF0CeAAoJEPWDqSZpMIYVfVIP+wQ8wESMVwC2Zj2KoU0Xs8O3 S5gMXTBLJocE1As2VayrlLp6L03ZkdCTAkrds50klDzr4rTagf4aeuf1g86pw5b4 c17cdVKUFnsTpOnnQu8q/wCuHQoQJ2Zsj/Zb2CPW6nb9hdeOl28AXoyUU7B0YSVm nDXOl9lKxL6CjXvWPOcMHwid7nczupWF3dRnSbxr/+pmCx6VIQ4witsGmOJg3rsi C4vTkInHNHL9o8m2rJmJD4BaVPJnVoh2oFTFg+2kSBVvKmGeHo8omVTy7EpDIpVC 0NVyJV/GvtWsw6sO+aQSdHHJJn56X2lPZh0aopmgSA/rjl/61KjXOjOqMpvCjdDm QULup/DBtPqOdag0UEGfA/1b6Q9QLApnWPRyPKCpP3L2V7EH/Sy2C7dYGGobsMqK ljEjB6DKTCgwXIiYcQqqB/mjV6uR/Wh5kQfURLlc7e6GDI2z66axGfaeY/fnIkar ZxJxzQz0nVglV9aShF8ArvDNavz8/C3ISGOoK+clJ7/hhdAjTy3xZjevD0MYkx4n PZSxc4pMXzCjZA9PlW+5Nl6D/zaIKofCjxjHNWksjaWp/oy5PreCsBUTDfoNYhZa 6d9TUIOJb78vfZT9rj9flbxsexfmJeUcMixzu2fH+E6EZoi6q8mc36KRKvUKmUhK BHPCw3rAZ3eklEAsGmGN =bZit -----END PGP SIGNATURE----- --Apple-Mail=_80996CD5-7498-4790-A375-2BAA04DC6751-- From owner-svn-src-all@freebsd.org Sat May 13 17:49:54 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A297DD6BD57; Sat, 13 May 2017 17:49:54 +0000 (UTC) (envelope-from jasone@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 744C91594; Sat, 13 May 2017 17:49:54 +0000 (UTC) (envelope-from jasone@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4DHnr1P057220; Sat, 13 May 2017 17:49:53 GMT (envelope-from jasone@FreeBSD.org) Received: (from jasone@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4DHnrTE057219; Sat, 13 May 2017 17:49:53 GMT (envelope-from jasone@FreeBSD.org) Message-Id: <201705131749.v4DHnrTE057219@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jasone set sender to jasone@FreeBSD.org using -f From: Jason Evans Date: Sat, 13 May 2017 17:49:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318254 - head/lib/libthr/thread X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 May 2017 17:49:54 -0000 Author: jasone Date: Sat May 13 17:49:53 2017 New Revision: 318254 URL: https://svnweb.freebsd.org/changeset/base/318254 Log: Fix __pthread_mutex_trylock() to call THR_CRITICAL_LEAVE() on failure rather than on success. This regression was introduced by r300043 (Add implementation of robust mutexes...). MFC after: 1 day Modified: head/lib/libthr/thread/thr_mutex.c Modified: head/lib/libthr/thread/thr_mutex.c ============================================================================== --- head/lib/libthr/thread/thr_mutex.c Sat May 13 13:03:20 2017 (r318253) +++ head/lib/libthr/thread/thr_mutex.c Sat May 13 17:49:53 2017 (r318254) @@ -631,7 +631,7 @@ __pthread_mutex_trylock(pthread_mutex_t } /* else {} */ if (robust) _mutex_leave_robust(curthread, m); - if ((ret == 0 || ret == EOWNERDEAD) && + if (ret != 0 && ret != EOWNERDEAD && (m->m_flags & PMUTEX_FLAG_PRIVATE) != 0) THR_CRITICAL_LEAVE(curthread); return (ret); From owner-svn-src-all@freebsd.org Sat May 13 18:15:04 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F29E7D6AD25; Sat, 13 May 2017 18:15:04 +0000 (UTC) (envelope-from lifanov@FreeBSD.org) Received: from mail.lifanov.com (mail.lifanov.com [206.125.175.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D1ABCA29; Sat, 13 May 2017 18:15:04 +0000 (UTC) (envelope-from lifanov@FreeBSD.org) Received: from [10.10.0.1] (unknown [107.15.73.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.lifanov.com (Postfix) with ESMTPSA id 7D949239431; Sat, 13 May 2017 14:07:51 -0400 (EDT) Subject: Re: svn commit: r318250 - in head: etc etc/newsyslog.conf.d etc/syslog.d tools/build/mk To: "Ngie Cooper (yaneurabeya)" , Alexey Dokuchaev Cc: src-committers@freebsd.org, Ian Lepore , svn-src-all@freebsd.org, rgrimes@freebsd.org, svn-src-head@freebsd.org, Ngie Cooper References: <201705131537.v4DFbgWV045290@pdx.rh.CN85.dnsmgr.net> <1494692660.59865.85.camel@freebsd.org> <20170513165145.GC84947@FreeBSD.org> From: Nikolai Lifanov Message-ID: Date: Sat, 13 May 2017 14:07:38 -0400 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="PnBpcmiaHXBqbuDBXesQ1BAE4GOGavLlH" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 May 2017 18:15:05 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --PnBpcmiaHXBqbuDBXesQ1BAE4GOGavLlH Content-Type: multipart/mixed; boundary="CuHCJ9R7lqG2XFRKaaW96Ftkh3ldPgmNj"; protected-headers="v1" From: Nikolai Lifanov To: "Ngie Cooper (yaneurabeya)" , Alexey Dokuchaev Cc: src-committers@freebsd.org, Ian Lepore , svn-src-all@freebsd.org, rgrimes@freebsd.org, svn-src-head@freebsd.org, Ngie Cooper Message-ID: Subject: Re: svn commit: r318250 - in head: etc etc/newsyslog.conf.d etc/syslog.d tools/build/mk References: <201705131537.v4DFbgWV045290@pdx.rh.CN85.dnsmgr.net> <1494692660.59865.85.camel@freebsd.org> <20170513165145.GC84947@FreeBSD.org> In-Reply-To: --CuHCJ9R7lqG2XFRKaaW96Ftkh3ldPgmNj Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 05/13/2017 13:21, Ngie Cooper (yaneurabeya) wrote: > Even ansible/chef/puppet would have to bake the configuration removal l= ogic into its template files, which seems like a pain for folks (and the = same logic would need to be implemented multiple times instead of once). Having to template one .conf file couples not necessarily related config modules together and it's *a lot* more performant to conditionally install and remove config snippets in .d/ than to expand a template. The separation matters when separate people write separate configuration modules and the performance matters when deciding on frequency of config runs. - Nikolai --CuHCJ9R7lqG2XFRKaaW96Ftkh3ldPgmNj-- --PnBpcmiaHXBqbuDBXesQ1BAE4GOGavLlH Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQKoBAEBCgCSFiEE5oT6TcuaWvG5gtjzZ6sv56ecR0UFAlkXS3VfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEU2 ODRGQTREQ0I5QTVBRjFCOTgyRDhGMzY3QUIyRkU3QTc5QzQ3NDUUHGxpZmFub3ZA ZnJlZWJzZC5vcmcACgkQZ6sv56ecR0XRsg//RLgDDYopkbt4ILhCI1e1cY+HKP16 jTt6y5G0/rjSMsGdnzAPDgXaMsj54kBRl+pkYl3GD7iwZg/ylF1ViYaXwu6oylkS 2unVM9e9dtYOy41wIh3iawpXeCJT3fdpYmenELCWq/SAVXP++nOfK+nyyUqmp03U 8XVEgntchmvzgr8Rv4vse42dMDfVZ8xE4TejQceIktceQRSLfd4pwnKzKmpBqC9o dQhifW5RpzEXUBzu7QfpAg0r12Ygde28LwmI8zSD+vNMOUpPMXU3Im7tIddkHGHx ImmsWPyhZWdwG4SJcI+DZoBHEK/VjuYEuwvRiVYfgtyZ2k4Bf4L4toyTeIdPQpof L3R/sqHGUoDPfiLIzWs8cELHF/kBfkrhM9/bh9HWJogkwxw2BzpXZ+JeThfsV0V3 Ch9Z05EFeNJMNX3AK/HL0Ny1FWvPwPH5vchkNsOwmkaapk7REErC3OiBvw0J8Uyv HeS7kJ1vw88dbKwHa3eZd4IpW86rG9HFs02neiut4zWgqc/ndcS799R0nqCBFMgm FiRWxp0VFoTKT3WE0lpfsWeugCVya+iPfoIqfHcn8xAgzSJ5OzuKvSlyxVOQYqj6 g86Y7AQEZ3RBdQ3VT64fZB8iyesD7yS7JUp2TwjaA/COKVuVUNXsJ4zEJLT5Vg+o 7LDV1ifO/+kPb6A= =OqNk -----END PGP SIGNATURE----- --PnBpcmiaHXBqbuDBXesQ1BAE4GOGavLlH-- From owner-svn-src-all@freebsd.org Sat May 13 18:41:26 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 56968D6B58A; Sat, 13 May 2017 18:41:26 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1013117A8; Sat, 13 May 2017 18:41:25 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4DIfPHR078153; Sat, 13 May 2017 18:41:25 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4DIfOnH078151; Sat, 13 May 2017 18:41:25 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705131841.v4DIfOnH078151@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 13 May 2017 18:41:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318255 - in head/sys: netinet netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 May 2017 18:41:26 -0000 Author: ngie Date: Sat May 13 18:41:24 2017 New Revision: 318255 URL: https://svnweb.freebsd.org/changeset/base/318255 Log: Add missing braces around MCAST_EXCLUDE check when KTR support is compiled into the kernel This ensures that .iss_asm (the number of ASM listeners) isn't incorrectly decremented for MLD-layer source datagrams when inspecting im*s_st[1] (the second state in the structure). MFC after: 2 months PR: 217509 [1] Reported by: Coverity (Isilon) Reviewed by: ae ("This patch looks correct to me." [1]) Submitted by: Miles Ohlrich Sponsored by: Dell EMC Isilon Modified: head/sys/netinet/in_mcast.c head/sys/netinet6/in6_mcast.c Modified: head/sys/netinet/in_mcast.c ============================================================================== --- head/sys/netinet/in_mcast.c Sat May 13 17:49:53 2017 (r318254) +++ head/sys/netinet/in_mcast.c Sat May 13 18:41:24 2017 (r318255) @@ -1047,9 +1047,10 @@ inm_merge(struct in_multi *inm, /*const* /* Decrement ASM listener count on transition out of ASM mode. */ if (imf->imf_st[0] == MCAST_EXCLUDE && nsrc0 == 0) { if ((imf->imf_st[1] != MCAST_EXCLUDE) || - (imf->imf_st[1] == MCAST_EXCLUDE && nsrc1 > 0)) + (imf->imf_st[1] == MCAST_EXCLUDE && nsrc1 > 0)) { CTR1(KTR_IGMPV3, "%s: --asm on inm at t1", __func__); --inm->inm_st[1].iss_asm; + } } /* Increment ASM listener count on transition to ASM mode. */ Modified: head/sys/netinet6/in6_mcast.c ============================================================================== --- head/sys/netinet6/in6_mcast.c Sat May 13 17:49:53 2017 (r318254) +++ head/sys/netinet6/in6_mcast.c Sat May 13 18:41:24 2017 (r318255) @@ -999,9 +999,10 @@ in6m_merge(struct in6_multi *inm, /*cons /* Decrement ASM listener count on transition out of ASM mode. */ if (imf->im6f_st[0] == MCAST_EXCLUDE && nsrc0 == 0) { if ((imf->im6f_st[1] != MCAST_EXCLUDE) || - (imf->im6f_st[1] == MCAST_EXCLUDE && nsrc1 > 0)) + (imf->im6f_st[1] == MCAST_EXCLUDE && nsrc1 > 0)) { CTR1(KTR_MLD, "%s: --asm on inm at t1", __func__); --inm->in6m_st[1].iss_asm; + } } /* Increment ASM listener count on transition to ASM mode. */ From owner-svn-src-all@freebsd.org Sat May 13 18:59:28 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BF2DBD6BA2A; Sat, 13 May 2017 18:59:28 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 74C6E1EC4; Sat, 13 May 2017 18:59:28 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4DIxRdb085465; Sat, 13 May 2017 18:59:27 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4DIxRJg085464; Sat, 13 May 2017 18:59:27 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201705131859.v4DIxRJg085464@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 13 May 2017 18:59:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318256 - head/libexec/rtld-elf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 May 2017 18:59:28 -0000 Author: kib Date: Sat May 13 18:59:27 2017 New Revision: 318256 URL: https://svnweb.freebsd.org/changeset/base/318256 Log: In _rtld(), reorder local declarations to compact the block and partially sort them by style(9). Move locals declarations from nested blocks into the block at function start. Discussed with: emaste MFC after: 1 week Modified: head/libexec/rtld-elf/rtld.c Modified: head/libexec/rtld-elf/rtld.c ============================================================================== --- head/libexec/rtld-elf/rtld.c Sat May 13 18:41:24 2017 (r318255) +++ head/libexec/rtld-elf/rtld.c Sat May 13 18:59:27 2017 (r318256) @@ -339,22 +339,16 @@ _LD(const char *var) func_ptr_type _rtld(Elf_Addr *sp, func_ptr_type *exit_proc, Obj_Entry **objp) { - Elf_Auxinfo *aux_info[AT_COUNT]; - int i; - int argc; - char **argv; - char **env; - Elf_Auxinfo *aux; - Elf_Auxinfo *auxp; - const char *argv0; + Elf_Auxinfo *aux, *auxp, *aux_info[AT_COUNT]; Objlist_Entry *entry; - Obj_Entry *obj; - Obj_Entry *preload_tail; - Obj_Entry *last_interposer; + Obj_Entry *last_interposer, *obj, *preload_tail; + const Elf_Phdr *phdr; Objlist initlist; RtldLockState lockstate; - char *library_path_rpath; - int mib[2]; + char **argv, *argv0, **env, *kexecpath, *library_path_rpath; + caddr_t imgentry; + char buf[MAXPATHLEN]; + int argc, fd, i, mib[2], phnum; size_t len; /* @@ -477,7 +471,7 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_ * already loaded. */ if (aux_info[AT_EXECFD] != NULL) { /* Load the main program. */ - int fd = aux_info[AT_EXECFD]->a_un.a_val; + fd = aux_info[AT_EXECFD]->a_un.a_val; dbg("loading main program"); obj_main = map_object(fd, argv0, NULL); close(fd); @@ -485,10 +479,6 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_ rtld_die(); max_stack_flags = obj->stack_flags; } else { /* Main program already loaded. */ - const Elf_Phdr *phdr; - int phnum; - caddr_t entry; - dbg("processing main program's program header"); assert(aux_info[AT_PHDR] != NULL); phdr = (const Elf_Phdr *) aux_info[AT_PHDR]->a_un.a_ptr; @@ -497,15 +487,12 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_ assert(aux_info[AT_PHENT] != NULL); assert(aux_info[AT_PHENT]->a_un.a_val == sizeof(Elf_Phdr)); assert(aux_info[AT_ENTRY] != NULL); - entry = (caddr_t) aux_info[AT_ENTRY]->a_un.a_ptr; - if ((obj_main = digest_phdr(phdr, phnum, entry, argv0)) == NULL) + imgentry = (caddr_t) aux_info[AT_ENTRY]->a_un.a_ptr; + if ((obj_main = digest_phdr(phdr, phnum, imgentry, argv0)) == NULL) rtld_die(); } if (aux_info[AT_EXECPATH] != NULL) { - char *kexecpath; - char buf[MAXPATHLEN]; - kexecpath = aux_info[AT_EXECPATH]->a_un.a_ptr; dbg("AT_EXECPATH %p %s", kexecpath, kexecpath); if (kexecpath[0] == '/') From owner-svn-src-all@freebsd.org Sat May 13 19:59:05 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5932ED6BE9B; Sat, 13 May 2017 19:59:05 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 25C3B1C87; Sat, 13 May 2017 19:59:05 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4DJx4x2010291; Sat, 13 May 2017 19:59:04 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4DJx4nq010290; Sat, 13 May 2017 19:59:04 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201705131959.v4DJx4nq010290@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 13 May 2017 19:59:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318257 - head/usr.bin/localedef X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 May 2017 19:59:05 -0000 Author: ngie Date: Sat May 13 19:59:03 2017 New Revision: 318257 URL: https://svnweb.freebsd.org/changeset/base/318257 Log: style(9): sort headers MFC after: 3 weeks Sponsored by: Dell EMC Isilon Modified: head/usr.bin/localedef/localedef.h Modified: head/usr.bin/localedef/localedef.h ============================================================================== --- head/usr.bin/localedef/localedef.h Sat May 13 18:59:27 2017 (r318256) +++ head/usr.bin/localedef/localedef.h Sat May 13 19:59:03 2017 (r318257) @@ -35,10 +35,10 @@ */ /* Common header files. */ +#include +#include #include #include -#include -#include extern int com_char; extern int esc_char; From owner-svn-src-all@freebsd.org Sat May 13 20:28:34 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 74A5FD6B7EF; Sat, 13 May 2017 20:28:34 +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 44AFFDB7; Sat, 13 May 2017 20:28:34 +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 v4DKSXcB022815; Sat, 13 May 2017 20:28:33 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4DKSXKp022813; Sat, 13 May 2017 20:28:33 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201705132028.v4DKSXKp022813@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sat, 13 May 2017 20:28:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318258 - head/bin/sh/tests/builtins X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 May 2017 20:28:34 -0000 Author: jilles Date: Sat May 13 20:28:32 2017 New Revision: 318258 URL: https://svnweb.freebsd.org/changeset/base/318258 Log: sh: Add test for arithmetic expansion in [x-y] pattern range. It does not make much sense to generate the '-' in a pattern bracket expression using arithmetic expansion, but it does not make sense to forbid it either. This test already passes. Added: head/bin/sh/tests/builtins/case21.0 (contents, props changed) Modified: head/bin/sh/tests/builtins/Makefile Modified: head/bin/sh/tests/builtins/Makefile ============================================================================== --- head/bin/sh/tests/builtins/Makefile Sat May 13 19:59:03 2017 (r318257) +++ head/bin/sh/tests/builtins/Makefile Sat May 13 20:28:32 2017 (r318258) @@ -40,6 +40,7 @@ ${PACKAGE}FILES+= case17.0 ${PACKAGE}FILES+= case18.0 ${PACKAGE}FILES+= case19.0 ${PACKAGE}FILES+= case20.0 +${PACKAGE}FILES+= case21.0 ${PACKAGE}FILES+= cd1.0 ${PACKAGE}FILES+= cd2.0 ${PACKAGE}FILES+= cd3.0 Added: head/bin/sh/tests/builtins/case21.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/sh/tests/builtins/case21.0 Sat May 13 20:28:32 2017 (r318258) @@ -0,0 +1,10 @@ +# $FreeBSD$ + +case 5 in +[0$((-9))]) ;; +*) echo bad1 ;; +esac + +case - in +[0$((-9))]) echo bad2 ;; +esac From owner-svn-src-all@freebsd.org Sat May 13 22:36:55 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D7FF7D66FAA; Sat, 13 May 2017 22:36:55 +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 835529EC; Sat, 13 May 2017 22:36:55 +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 v4DMasr3077356; Sat, 13 May 2017 22:36:54 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4DMaswD077353; Sat, 13 May 2017 22:36:54 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201705132236.v4DMaswD077353@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 13 May 2017 22:36:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318259 - head/lib/msun/src X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 May 2017 22:36:56 -0000 Author: dim Date: Sat May 13 22:36:54 2017 New Revision: 318259 URL: https://svnweb.freebsd.org/changeset/base/318259 Log: Silence a -Wunused warning about the junk variable being used to raise an inexact floating point exception. The variable cannot be eliminated, unfortunately, otherwise the desired addition triggering the exception will be emitted neither by clang, nor by gcc. Reviewed by: Steve Kargl, bde MFC after: 3 days Modified: head/lib/msun/src/catrig.c head/lib/msun/src/catrigf.c head/lib/msun/src/catrigl.c Modified: head/lib/msun/src/catrig.c ============================================================================== --- head/lib/msun/src/catrig.c Sat May 13 20:28:32 2017 (r318258) +++ head/lib/msun/src/catrig.c Sat May 13 22:36:54 2017 (r318259) @@ -37,7 +37,7 @@ __FBSDID("$FreeBSD$"); #define isinf(x) (fabs(x) == INFINITY) #undef isnan #define isnan(x) ((x) != (x)) -#define raise_inexact() do { volatile float junk = 1 + tiny; } while(0) +#define raise_inexact() do { volatile float junk __unused = 1 + tiny; } while(0) #undef signbit #define signbit(x) (__builtin_signbit(x)) Modified: head/lib/msun/src/catrigf.c ============================================================================== --- head/lib/msun/src/catrigf.c Sat May 13 20:28:32 2017 (r318258) +++ head/lib/msun/src/catrigf.c Sat May 13 22:36:54 2017 (r318259) @@ -51,7 +51,7 @@ __FBSDID("$FreeBSD$"); #define isinf(x) (fabsf(x) == INFINITY) #undef isnan #define isnan(x) ((x) != (x)) -#define raise_inexact() do { volatile float junk = 1 + tiny; } while(0) +#define raise_inexact() do { volatile float junk __unused = 1 + tiny; } while(0) #undef signbit #define signbit(x) (__builtin_signbitf(x)) Modified: head/lib/msun/src/catrigl.c ============================================================================== --- head/lib/msun/src/catrigl.c Sat May 13 20:28:32 2017 (r318258) +++ head/lib/msun/src/catrigl.c Sat May 13 22:36:54 2017 (r318259) @@ -53,7 +53,7 @@ __FBSDID("$FreeBSD$"); #define isinf(x) (fabsl(x) == INFINITY) #undef isnan #define isnan(x) ((x) != (x)) -#define raise_inexact() do { volatile float junk = 1 + tiny; } while(0) +#define raise_inexact() do { volatile float junk __unused = 1 + tiny; } while(0) #undef signbit #define signbit(x) (__builtin_signbitl(x))