From owner-svn-src-all@FreeBSD.ORG Sun May 10 02:19:28 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 66CD8476; Sun, 10 May 2015 02:19:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 473EC1EE5; Sun, 10 May 2015 02:19:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4A2JSIv080497; Sun, 10 May 2015 02:19:28 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4A2JR7O080495; Sun, 10 May 2015 02:19:27 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201505100219.t4A2JR7O080495@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Sun, 10 May 2015 02:19:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282702 - in head/sys/dev: iicbus ofw 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.20 Precedence: list List-Id: "SVN commit messages 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, 10 May 2015 02:19:28 -0000 Author: loos Date: Sun May 10 02:19:27 2015 New Revision: 282702 URL: https://svnweb.freebsd.org/changeset/base/282702 Log: Remove unnecessary code and make use of generic implementations for bus_alloc_resource(), bus_release_resource() and bus_set_resource() (bus_generic_rl_alloc_resource(), bus_generic_rl_release_resource() and bus_generic_rl_set_resource() respectively). Do not print the resources for nomatch devices. Use the inherited method for bus_get_resource_list() on ofw_iicbus.c. Submitted by: jhb and Michal Meloun (D2033) Modified: head/sys/dev/iicbus/iicbus.c head/sys/dev/ofw/ofw_iicbus.c Modified: head/sys/dev/iicbus/iicbus.c ============================================================================== --- head/sys/dev/iicbus/iicbus.c Sat May 9 22:59:11 2015 (r282701) +++ head/sys/dev/iicbus/iicbus.c Sun May 10 02:19:27 2015 (r282702) @@ -159,9 +159,7 @@ iicbus_probe_nomatch(device_t bus, devic { struct iicbus_ivar *devi = IICBUS_IVAR(child); - device_printf(bus, " at addr %#x", devi->addr); - resource_list_print_type(&devi->rl, "irq", SYS_RES_IRQ, "%ld"); - printf("\n"); + device_printf(bus, " at addr %#x\n", devi->addr); } static int @@ -233,57 +231,6 @@ iicbus_hinted_child(device_t bus, const } } -static int -iicbus_set_resource(device_t dev, device_t child, int type, int rid, - u_long start, u_long count) -{ - struct iicbus_ivar *devi; - struct resource_list_entry *rle; - - devi = IICBUS_IVAR(child); - rle = resource_list_add(&devi->rl, type, rid, start, - start + count - 1, count); - if (rle == NULL) - return (ENXIO); - - return (0); -} - -static struct resource * -iicbus_alloc_resource(device_t bus, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) -{ - struct resource_list *rl; - struct resource_list_entry *rle; - - /* Only IRQ resources are supported. */ - if (type != SYS_RES_IRQ) - return (NULL); - - /* - * Request for the default allocation with a given rid: use resource - * list stored in the local device info. - */ - if ((start == 0UL) && (end == ~0UL)) { - rl = BUS_GET_RESOURCE_LIST(bus, child); - if (rl == NULL) - return (NULL); - rle = resource_list_find(rl, type, *rid); - if (rle == NULL) { - if (bootverbose) - device_printf(bus, "no default resources for " - "rid = %d, type = %d\n", *rid, type); - return (NULL); - } - start = rle->start; - end = rle->end; - count = rle->count; - } - - return (bus_generic_alloc_resource(bus, child, type, rid, start, end, - count, flags)); -} - static struct resource_list * iicbus_get_resource_list(device_t bus __unused, device_t child) { @@ -368,14 +315,14 @@ static device_method_t iicbus_methods[] /* bus interface */ DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), - 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_adjust_resource, bus_generic_adjust_resource), + DEVMETHOD(bus_alloc_resource, bus_generic_rl_alloc_resource), DEVMETHOD(bus_get_resource, bus_generic_rl_get_resource), - DEVMETHOD(bus_alloc_resource, iicbus_alloc_resource), + DEVMETHOD(bus_release_resource, bus_generic_rl_release_resource), + DEVMETHOD(bus_set_resource, bus_generic_rl_set_resource), DEVMETHOD(bus_get_resource_list, iicbus_get_resource_list), - DEVMETHOD(bus_set_resource, iicbus_set_resource), DEVMETHOD(bus_add_child, iicbus_add_child), DEVMETHOD(bus_print_child, iicbus_print_child), DEVMETHOD(bus_probe_nomatch, iicbus_probe_nomatch), Modified: head/sys/dev/ofw/ofw_iicbus.c ============================================================================== --- head/sys/dev/ofw/ofw_iicbus.c Sat May 9 22:59:11 2015 (r282701) +++ head/sys/dev/ofw/ofw_iicbus.c Sun May 10 02:19:27 2015 (r282702) @@ -50,8 +50,6 @@ static device_t ofw_iicbus_add_child(dev const char *name, int unit); static const struct ofw_bus_devinfo *ofw_iicbus_get_devinfo(device_t bus, device_t dev); -static struct resource_list *ofw_iicbus_get_resource_list(device_t bus, - device_t child); static device_method_t ofw_iicbus_methods[] = { /* Device interface */ @@ -59,7 +57,6 @@ static device_method_t ofw_iicbus_method DEVMETHOD(device_attach, ofw_iicbus_attach), /* Bus interface */ - DEVMETHOD(bus_get_resource_list, ofw_iicbus_get_resource_list), DEVMETHOD(bus_child_pnpinfo_str, ofw_bus_gen_child_pnpinfo_str), DEVMETHOD(bus_add_child, ofw_iicbus_add_child), @@ -205,12 +202,3 @@ ofw_iicbus_get_devinfo(device_t bus, dev dinfo = device_get_ivars(dev); return (&dinfo->opd_obdinfo); } - -static struct resource_list * -ofw_iicbus_get_resource_list(device_t bus __unused, device_t child) -{ - struct ofw_iicbus_devinfo *devi; - - devi = device_get_ivars(child); - return (&devi->opd_dinfo.rl); -} From owner-svn-src-all@FreeBSD.ORG Sun May 10 02:35:35 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0B50F64E; Sun, 10 May 2015 02:35:35 +0000 (UTC) Received: from mail-la0-x22f.google.com (mail-la0-x22f.google.com [IPv6:2a00:1450:4010:c03::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 8CADE10AA; Sun, 10 May 2015 02:35:34 +0000 (UTC) Received: by laat2 with SMTP id t2so73935376laa.1; Sat, 09 May 2015 19:35:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=caj+g9oEO0O3NO5a24IIJk9kl8pjXgZUZtnEiim9qTk=; b=emNTpQXoI5fh+OxBrqsmd+Kz0sRa9TPE1Kfo+v7Qo/nx5ERnf2YbE/zSIikCnR1c1Y JjXy5NHNuH88yH58Qd9GtISb6fRZRqg+t7Cl8MJw0/xLTSIc3mJ/MBiiHJM6foGNJTcl fbXl/tMnl6FJeSmveRo3z2DqPPF+y26gUigRFSheWeDpGv7pYK5mPvlsZFzR3RSp7LTw qdJwSOBZrarl+zA+RpzBVblwyrtCbrHsTPAjyV+y0zM6e9XAhkX9mh4evtdVdERJqzzh pKFPGkk3jxCbhnAXhFzhUct9HVZ+E63rRSZEaxNSXFS+9kYn1Ho+p/5EAFPwNF7hDDYa 72jw== MIME-Version: 1.0 X-Received: by 10.152.29.67 with SMTP id i3mr3532900lah.64.1431225332545; Sat, 09 May 2015 19:35:32 -0700 (PDT) Received: by 10.112.154.166 with HTTP; Sat, 9 May 2015 19:35:32 -0700 (PDT) In-Reply-To: <2165864.Vg8k3tllF7@ralph.baldwin.cx> References: <201505090305.t4935jYk086983@svn.freebsd.org> <2165864.Vg8k3tllF7@ralph.baldwin.cx> Date: Sat, 9 May 2015 23:35:32 -0300 Message-ID: Subject: Re: svn commit: r282674 - in head/sys/dev: iicbus ofw From: Luiz Otavio O Souza To: John Baldwin Cc: Luiz Otavio O Souza , 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.20 Precedence: list List-Id: "SVN commit messages 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, 10 May 2015 02:35:35 -0000 On Sat, May 9, 2015 at 7:45 AM, John Baldwin wrote: > On Saturday, May 09, 2015 03:05:45 AM Luiz Otavio O Souza wrote: >> Author: loos >> Date: Sat May 9 03:05:44 2015 >> New Revision: 282674 >> URL: https://svnweb.freebsd.org/changeset/base/282674 >> >> Log: >> Handle IRQ resources on iicbus and ofw_iicbus. >> >> Based on a patch submitted by Michal Meloun . >> >> Modified: >> head/sys/dev/iicbus/iicbus.c >> head/sys/dev/iicbus/iicbus.h >> head/sys/dev/ofw/ofw_iicbus.c >> >> Modified: head/sys/dev/iicbus/iicbus.c >> ============================================================================== >> --- head/sys/dev/iicbus/iicbus.c Sat May 9 00:48:44 2015 (r282673) >> +++ head/sys/dev/iicbus/iicbus.c Sat May 9 03:05:44 2015 (r282674) >> @@ -157,9 +159,9 @@ iicbus_probe_nomatch(device_t bus, devic >> { >> struct iicbus_ivar *devi = IICBUS_IVAR(child); >> >> - device_printf(bus, ""); >> - printf(" at addr %#x\n", devi->addr); >> - return; >> + device_printf(bus, " at addr %#x", devi->addr); >> + resource_list_print_type(&devi->rl, "irq", SYS_RES_IRQ, "%ld"); >> + printf("\n"); > > Other bus drivers do not print resources for nomatch devices (or at > least PCI doesn't). Given that, I'm not sure it makes sense to do > that here? That's right, it was an overzealous from my part. > >> +static int >> +iicbus_set_resource(device_t dev, device_t child, int type, int rid, >> + u_long start, u_long count) >> +{ >> + struct iicbus_ivar *devi; >> + struct resource_list_entry *rle; >> + >> + devi = IICBUS_IVAR(child); >> + rle = resource_list_add(&devi->rl, type, rid, start, >> + start + count - 1, count); >> + if (rle == NULL) >> + return (ENXIO); >> + >> + return (0); >> +} > > Isn't this the same as bus_generic_rl_set_resource()? > >> + >> +static struct resource * >> +iicbus_alloc_resource(device_t bus, device_t child, int type, int *rid, >> + u_long start, u_long end, u_long count, u_int flags) >> +{ >> + struct resource_list *rl; >> + struct resource_list_entry *rle; >> + >> + /* Only IRQ resources are supported. */ >> + if (type != SYS_RES_IRQ) >> + return (NULL); >> + >> + /* >> + * Request for the default allocation with a given rid: use resource >> + * list stored in the local device info. >> + */ >> + if ((start == 0UL) && (end == ~0UL)) { >> + rl = BUS_GET_RESOURCE_LIST(bus, child); >> + if (rl == NULL) >> + return (NULL); >> + rle = resource_list_find(rl, type, *rid); >> + if (rle == NULL) { >> + if (bootverbose) >> + device_printf(bus, "no default resources for " >> + "rid = %d, type = %d\n", *rid, type); >> + return (NULL); >> + } >> + start = rle->start; >> + end = rle->end; >> + count = rle->count; >> + } >> + >> + return (bus_generic_alloc_resource(bus, child, type, rid, start, end, >> + count, flags)); > > If you are using a resource list, you should be using resource_list_alloc(). > However, I think you can replace this entire method with just > bus_generic_rl_alloc_resource(). > >> @@ -297,6 +366,16 @@ static device_method_t iicbus_methods[] >> DEVMETHOD(device_detach, iicbus_detach), >> >> /* bus interface */ >> + DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), >> + DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), >> + DEVMETHOD(bus_release_resource, bus_generic_release_resource), > > After fixing alloc_resource to use resource_list_alloc() (either directly > or via the generic method), this should be set to > bus_generic_rl_release_resource(). > >> Modified: head/sys/dev/ofw/ofw_iicbus.c >> ============================================================================== >> --- head/sys/dev/ofw/ofw_iicbus.c Sat May 9 00:48:44 2015 (r282673) >> +++ head/sys/dev/ofw/ofw_iicbus.c Sat May 9 03:05:44 2015 (r282674) >> @@ -199,3 +205,12 @@ ofw_iicbus_get_devinfo(device_t bus, dev >> dinfo = device_get_ivars(dev); >> return (&dinfo->opd_obdinfo); >> } >> + >> +static struct resource_list * >> +ofw_iicbus_get_resource_list(device_t bus __unused, device_t child) >> +{ >> + struct ofw_iicbus_devinfo *devi; >> + >> + devi = device_get_ivars(child); >> + return (&devi->opd_dinfo.rl); >> +} > > I think you don't actually need this since the inherited method should > already work. > > -- > John Baldwin Yeah, that's all correct, Michal had already warned about a few of these issues. Fixed in r282702. Thanks for the review. Luiz From owner-svn-src-all@FreeBSD.ORG Sun May 10 04:33:02 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 395C736B; Sun, 10 May 2015 04:33:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 277001C3D; Sun, 10 May 2015 04:33:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4A4X2UP049846; Sun, 10 May 2015 04:33:02 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4A4X286049844; Sun, 10 May 2015 04:33:02 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201505100433.t4A4X286049844@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Sun, 10 May 2015 04:33:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282703 - head/sys/cddl/contrib/opensolaris/uts/powerpc/dtrace 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.20 Precedence: list List-Id: "SVN commit messages 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, 10 May 2015 04:33:02 -0000 Author: jhibbits Date: Sun May 10 04:33:01 2015 New Revision: 282703 URL: https://svnweb.freebsd.org/changeset/base/282703 Log: Fix a couple bugs in 64-bit powerpc fasttrap argument retrieval. Found by code inspection. Modified: head/sys/cddl/contrib/opensolaris/uts/powerpc/dtrace/fasttrap_isa.c Modified: head/sys/cddl/contrib/opensolaris/uts/powerpc/dtrace/fasttrap_isa.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/powerpc/dtrace/fasttrap_isa.c Sun May 10 02:19:27 2015 (r282702) +++ head/sys/cddl/contrib/opensolaris/uts/powerpc/dtrace/fasttrap_isa.c Sun May 10 04:33:01 2015 (r282703) @@ -244,8 +244,8 @@ fasttrap_anarg(struct reg *rp, int argno DTRACE_CPUFLAG_CLEAR(CPU_DTRACE_NOFAULT | CPU_DTRACE_BADADDR); } else { DTRACE_CPUFLAG_SET(CPU_DTRACE_NOFAULT); - value = dtrace_fuword64((void *)(rp->fixreg[1] + 16 + - ((argno - 8) * sizeof(uint32_t)))); + value = dtrace_fuword64((void *)(rp->fixreg[1] + 48 + + ((argno - 8) * sizeof(uint64_t)))); DTRACE_CPUFLAG_CLEAR(CPU_DTRACE_NOFAULT | CPU_DTRACE_BADADDR); } return value; @@ -289,7 +289,7 @@ fasttrap_usdt_args(fasttrap_probe_t *pro argv[i] = fuword32((void *)(rp->fixreg[1] + 8 + (x * sizeof(uint32_t)))); else - argv[i] = fuword32((void *)(rp->fixreg[1] + 16 + + argv[i] = fuword64((void *)(rp->fixreg[1] + 48 + (x * sizeof(uint64_t)))); } From owner-svn-src-all@FreeBSD.ORG Sun May 10 06:57:54 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F1A97AA; Sun, 10 May 2015 06:57:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C76E8179C; Sun, 10 May 2015 06:57:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4A6vrY2037126; Sun, 10 May 2015 06:57:53 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4A6vrm5037125; Sun, 10 May 2015 06:57:53 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201505100657.t4A6vrm5037125@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 10 May 2015 06:57:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282704 - head/sys/net80211 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.20 Precedence: list List-Id: "SVN commit messages 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, 10 May 2015 06:57:54 -0000 Author: adrian Date: Sun May 10 06:57:53 2015 New Revision: 282704 URL: https://svnweb.freebsd.org/changeset/base/282704 Log: Attempt to address Bug #176201 - don't advertise what the AP announced to us. Instead, advertise what we can do based on what the AP says and what we're capped at by the VAP settings. For non-STA modes we still advertise what our VAP settings are. It may be that I've over-complicated this and instead of capping things we can just always announce what we're capable of. But this should at least stop the blatantly wrong handling of A-MPDU parameters. (I'll happily simplify things if someone can dig up a replacement, better compliant behaviour.) PR: kern/176201 Modified: head/sys/net80211/ieee80211_ht.c Modified: head/sys/net80211/ieee80211_ht.c ============================================================================== --- head/sys/net80211/ieee80211_ht.c Sun May 10 04:33:01 2015 (r282703) +++ head/sys/net80211/ieee80211_ht.c Sun May 10 06:57:53 2015 (r282704) @@ -2662,10 +2662,24 @@ ieee80211_add_htcap_body(uint8_t *frm, s caps |= IEEE80211_HTCAP_CHWIDTH40; else caps &= ~IEEE80211_HTCAP_CHWIDTH40; - /* use advertised setting (XXX locally constraint) */ + + /* Start by using the advertised settings */ rxmax = MS(ni->ni_htparam, IEEE80211_HTCAP_MAXRXAMPDU); density = MS(ni->ni_htparam, IEEE80211_HTCAP_MPDUDENSITY); + /* Cap at VAP rxmax */ + if (rxmax > vap->iv_ampdu_rxmax) + rxmax = vap->iv_ampdu_rxmax; + + /* + * If the VAP ampdu density value greater, use that. + * + * (Larger density value == larger minimum gap between A-MPDU + * subframes.) + */ + if (vap->iv_ampdu_density > density) + density = vap->iv_ampdu_density; + /* * NB: Hardware might support HT40 on some but not all * channels. We can't determine this earlier because only @@ -2682,9 +2696,12 @@ ieee80211_add_htcap_body(uint8_t *frm, s caps |= IEEE80211_HTCAP_CHWIDTH40; else caps &= ~IEEE80211_HTCAP_CHWIDTH40; + + /* XXX TODO should it start by using advertised settings? */ rxmax = vap->iv_ampdu_rxmax; density = vap->iv_ampdu_density; } + /* adjust short GI based on channel and config */ if ((vap->iv_flags_ht & IEEE80211_FHT_SHORTGI20) == 0) caps &= ~IEEE80211_HTCAP_SHORTGI20; From owner-svn-src-all@FreeBSD.ORG Sun May 10 06:59:35 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7E78A20D; Sun, 10 May 2015 06:59:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5FA8217A7; Sun, 10 May 2015 06:59:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4A6xZoQ037409; Sun, 10 May 2015 06:59:35 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4A6xYYa037404; Sun, 10 May 2015 06:59:34 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201505100659.t4A6xYYa037404@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 10 May 2015 06:59:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282705 - head/sys/net80211 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.20 Precedence: list List-Id: "SVN commit messages 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, 10 May 2015 06:59:35 -0000 Author: adrian Date: Sun May 10 06:59:34 2015 New Revision: 282705 URL: https://svnweb.freebsd.org/changeset/base/282705 Log: Turn ieee80211_start_scan_locked() into a swscan module private method. It turns out that ieee80211_start_scan_locked() is only ever called by the swscan code and it won't likely be required by firmware scanning implementations. So, don't bother keeping it in ieee80211_scan.c and it likely won't become an API call. Tested: * Intel 5100, STA mode * AR5416, STA mode Modified: head/sys/net80211/ieee80211_scan.c head/sys/net80211/ieee80211_scan.h head/sys/net80211/ieee80211_scan_sw.c Modified: head/sys/net80211/ieee80211_scan.c ============================================================================== --- head/sys/net80211/ieee80211_scan.c Sun May 10 06:57:53 2015 (r282704) +++ head/sys/net80211/ieee80211_scan.c Sun May 10 06:59:34 2015 (r282705) @@ -309,80 +309,6 @@ ieee80211_scan_copy_ssid(struct ieee8021 * Start a scan unless one is already going. */ int -ieee80211_start_scan_locked(const struct ieee80211_scanner *scan, - struct ieee80211vap *vap, int flags, u_int duration, - u_int mindwell, u_int maxdwell, - u_int nssid, const struct ieee80211_scan_ssid ssids[]) -{ - struct ieee80211com *ic = vap->iv_ic; - struct ieee80211_scan_state *ss = ic->ic_scan; - - IEEE80211_LOCK_ASSERT(ic); - - if (ic->ic_flags & IEEE80211_F_CSAPENDING) { - IEEE80211_DPRINTF(vap, IEEE80211_MSG_SCAN, - "%s: scan inhibited by pending channel change\n", __func__); - } else if ((ic->ic_flags & IEEE80211_F_SCAN) == 0) { - IEEE80211_DPRINTF(vap, IEEE80211_MSG_SCAN, - "%s: %s scan, duration %u mindwell %u maxdwell %u, desired mode %s, %s%s%s%s%s%s\n" - , __func__ - , flags & IEEE80211_SCAN_ACTIVE ? "active" : "passive" - , duration, mindwell, maxdwell - , ieee80211_phymode_name[vap->iv_des_mode] - , flags & IEEE80211_SCAN_FLUSH ? "flush" : "append" - , flags & IEEE80211_SCAN_NOPICK ? ", nopick" : "" - , flags & IEEE80211_SCAN_NOJOIN ? ", nojoin" : "" - , flags & IEEE80211_SCAN_NOBCAST ? ", nobcast" : "" - , flags & IEEE80211_SCAN_PICK1ST ? ", pick1st" : "" - , flags & IEEE80211_SCAN_ONCE ? ", once" : "" - ); - - ieee80211_scan_update_locked(vap, scan); - if (ss->ss_ops != NULL) { - if ((flags & IEEE80211_SCAN_NOSSID) == 0) - ieee80211_scan_copy_ssid(vap, ss, nssid, ssids); - - /* NB: top 4 bits for internal use */ - ss->ss_flags = flags & 0xfff; - if (ss->ss_flags & IEEE80211_SCAN_ACTIVE) - vap->iv_stats.is_scan_active++; - else - vap->iv_stats.is_scan_passive++; - if (flags & IEEE80211_SCAN_FLUSH) - ss->ss_ops->scan_flush(ss); - if (flags & IEEE80211_SCAN_BGSCAN) - ic->ic_flags_ext |= IEEE80211_FEXT_BGSCAN; - - /* Set duration for this particular scan */ - ieee80211_swscan_set_scan_duration(vap, duration); - - ss->ss_next = 0; - ss->ss_mindwell = mindwell; - ss->ss_maxdwell = maxdwell; - /* NB: scan_start must be before the scan runtask */ - ss->ss_ops->scan_start(ss, vap); -#ifdef IEEE80211_DEBUG - if (ieee80211_msg_scan(vap)) - ieee80211_scan_dump(ss); -#endif /* IEEE80211_DEBUG */ - ic->ic_flags |= IEEE80211_F_SCAN; - - /* Start scan task */ - ieee80211_swscan_run_scan_task(vap); - } - return 1; - } else { - IEEE80211_DPRINTF(vap, IEEE80211_MSG_SCAN, - "%s: %s scan already in progress\n", __func__, - ss->ss_flags & IEEE80211_SCAN_ACTIVE ? "active" : "passive"); - } - return 0; -} - -/* - * Start a scan unless one is already going. - */ -int ieee80211_start_scan(struct ieee80211vap *vap, int flags, u_int duration, u_int mindwell, u_int maxdwell, u_int nssid, const struct ieee80211_scan_ssid ssids[]) Modified: head/sys/net80211/ieee80211_scan.h ============================================================================== --- head/sys/net80211/ieee80211_scan.h Sun May 10 06:57:53 2015 (r282704) +++ head/sys/net80211/ieee80211_scan.h Sun May 10 06:59:34 2015 (r282705) @@ -307,10 +307,6 @@ void ieee80211_scan_copy_ssid(struct iee void ieee80211_scan_dump_probe_beacon(uint8_t subtype, int isnew, const uint8_t mac[IEEE80211_ADDR_LEN], const struct ieee80211_scanparams *sp, int rssi); -int ieee80211_start_scan_locked(const struct ieee80211_scanner *scan, - struct ieee80211vap *vap, int flags, u_int duration, - u_int mindwell, u_int maxdwell, - u_int nssid, const struct ieee80211_scan_ssid ssids[]); void ieee80211_scan_dump(struct ieee80211_scan_state *ss); #endif /* _NET80211_IEEE80211_SCAN_H_ */ Modified: head/sys/net80211/ieee80211_scan_sw.c ============================================================================== --- head/sys/net80211/ieee80211_scan_sw.c Sun May 10 06:57:53 2015 (r282704) +++ head/sys/net80211/ieee80211_scan_sw.c Sun May 10 06:59:34 2015 (r282705) @@ -211,6 +211,81 @@ ieee80211_swscan_run_scan_task(struct ie /* * Start a scan unless one is already going. + */ +static int +ieee80211_swscan_start_scan_locked(const struct ieee80211_scanner *scan, + struct ieee80211vap *vap, int flags, u_int duration, + u_int mindwell, u_int maxdwell, + u_int nssid, const struct ieee80211_scan_ssid ssids[]) +{ + struct ieee80211com *ic = vap->iv_ic; + struct ieee80211_scan_state *ss = ic->ic_scan; + + IEEE80211_LOCK_ASSERT(ic); + + if (ic->ic_flags & IEEE80211_F_CSAPENDING) { + IEEE80211_DPRINTF(vap, IEEE80211_MSG_SCAN, + "%s: scan inhibited by pending channel change\n", __func__); + } else if ((ic->ic_flags & IEEE80211_F_SCAN) == 0) { + IEEE80211_DPRINTF(vap, IEEE80211_MSG_SCAN, + "%s: %s scan, duration %u mindwell %u maxdwell %u, desired mode %s, %s%s%s%s%s%s\n" + , __func__ + , flags & IEEE80211_SCAN_ACTIVE ? "active" : "passive" + , duration, mindwell, maxdwell + , ieee80211_phymode_name[vap->iv_des_mode] + , flags & IEEE80211_SCAN_FLUSH ? "flush" : "append" + , flags & IEEE80211_SCAN_NOPICK ? ", nopick" : "" + , flags & IEEE80211_SCAN_NOJOIN ? ", nojoin" : "" + , flags & IEEE80211_SCAN_NOBCAST ? ", nobcast" : "" + , flags & IEEE80211_SCAN_PICK1ST ? ", pick1st" : "" + , flags & IEEE80211_SCAN_ONCE ? ", once" : "" + ); + + ieee80211_scan_update_locked(vap, scan); + if (ss->ss_ops != NULL) { + if ((flags & IEEE80211_SCAN_NOSSID) == 0) + ieee80211_scan_copy_ssid(vap, ss, nssid, ssids); + + /* NB: top 4 bits for internal use */ + ss->ss_flags = flags & 0xfff; + if (ss->ss_flags & IEEE80211_SCAN_ACTIVE) + vap->iv_stats.is_scan_active++; + else + vap->iv_stats.is_scan_passive++; + if (flags & IEEE80211_SCAN_FLUSH) + ss->ss_ops->scan_flush(ss); + if (flags & IEEE80211_SCAN_BGSCAN) + ic->ic_flags_ext |= IEEE80211_FEXT_BGSCAN; + + /* Set duration for this particular scan */ + ieee80211_swscan_set_scan_duration(vap, duration); + + ss->ss_next = 0; + ss->ss_mindwell = mindwell; + ss->ss_maxdwell = maxdwell; + /* NB: scan_start must be before the scan runtask */ + ss->ss_ops->scan_start(ss, vap); +#ifdef IEEE80211_DEBUG + if (ieee80211_msg_scan(vap)) + ieee80211_scan_dump(ss); +#endif /* IEEE80211_DEBUG */ + ic->ic_flags |= IEEE80211_F_SCAN; + + /* Start scan task */ + ieee80211_swscan_run_scan_task(vap); + } + return 1; + } else { + IEEE80211_DPRINTF(vap, IEEE80211_MSG_SCAN, + "%s: %s scan already in progress\n", __func__, + ss->ss_flags & IEEE80211_SCAN_ACTIVE ? "active" : "passive"); + } + return 0; +} + + +/* + * Start a scan unless one is already going. * * Called without the comlock held; grab the comlock as appropriate. */ @@ -226,7 +301,7 @@ ieee80211_swscan_start_scan(const struct IEEE80211_UNLOCK_ASSERT(ic); IEEE80211_LOCK(ic); - result = ieee80211_start_scan_locked(scan, vap, flags, duration, + result = ieee80211_swscan_start_scan_locked(scan, vap, flags, duration, mindwell, maxdwell, nssid, ssids); IEEE80211_UNLOCK(ic); @@ -289,7 +364,7 @@ ieee80211_swscan_check_scan(const struct } } } - result = ieee80211_start_scan_locked(scan, vap, flags, duration, + result = ieee80211_swscan_start_scan_locked(scan, vap, flags, duration, mindwell, maxdwell, nssid, ssids); return result; From owner-svn-src-all@FreeBSD.ORG Sun May 10 08:21:04 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 776ACC6C; Sun, 10 May 2015 08:21:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 665371F4C; Sun, 10 May 2015 08:21:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4A8L4XX077652; Sun, 10 May 2015 08:21:04 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4A8L4EB077650; Sun, 10 May 2015 08:21:04 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201505100821.t4A8L4EB077650@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 10 May 2015 08:21:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282706 - head/sys/vm 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.20 Precedence: list List-Id: "SVN commit messages 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, 10 May 2015 08:21:04 -0000 Author: kib Date: Sun May 10 08:21:03 2015 New Revision: 282706 URL: https://svnweb.freebsd.org/changeset/base/282706 Log: Satisfy vm_object uma zone destructor requirements after r282660 when vnode object creation raced. Reported by: pho Reviewed by: alc Sponsored by: The FreeBSD Foundation Modified: head/sys/vm/vnode_pager.c Modified: head/sys/vm/vnode_pager.c ============================================================================== --- head/sys/vm/vnode_pager.c Sun May 10 06:59:34 2015 (r282705) +++ head/sys/vm/vnode_pager.c Sun May 10 08:21:03 2015 (r282706) @@ -237,6 +237,12 @@ retry: * Object has been created while we were sleeping */ VI_UNLOCK(vp); + VM_OBJECT_WLOCK(object); + KASSERT(object->ref_count == 1, + ("leaked ref %p %d", object, object->ref_count)); + object->type = OBJT_DEAD; + object->ref_count = 0; + VM_OBJECT_WUNLOCK(object); vm_object_destroy(object); goto retry; } From owner-svn-src-all@FreeBSD.ORG Sun May 10 08:48:01 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A731FFD8; Sun, 10 May 2015 08:48:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 95B34122A; Sun, 10 May 2015 08:48:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4A8m1lA092033; Sun, 10 May 2015 08:48:01 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4A8m1NS092031; Sun, 10 May 2015 08:48:01 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201505100848.t4A8m1NS092031@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sun, 10 May 2015 08:48:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282707 - head/sys/arm/allwinner 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.20 Precedence: list List-Id: "SVN commit messages 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, 10 May 2015 08:48:01 -0000 Author: andrew Date: Sun May 10 08:48:00 2015 New Revision: 282707 URL: https://svnweb.freebsd.org/changeset/base/282707 Log: Clean up the style to use "options". Modified: head/sys/arm/allwinner/std.a10 Modified: head/sys/arm/allwinner/std.a10 ============================================================================== --- head/sys/arm/allwinner/std.a10 Sun May 10 08:21:03 2015 (r282706) +++ head/sys/arm/allwinner/std.a10 Sun May 10 08:48:00 2015 (r282707) @@ -10,12 +10,12 @@ makeoption ARM_LITTLE_ENDIAN # 0x40200000, e.g. from u-boot with 'fatload mmc 0 0x40200000 kernel' # # -options PHYSADDR=0x40000000 +options PHYSADDR=0x40000000 makeoptions KERNPHYSADDR=0x40200000 -options KERNPHYSADDR=0x40200000 +options KERNPHYSADDR=0x40200000 makeoptions KERNVIRTADDR=0xc0200000 -options KERNVIRTADDR=0xc0200000 +options KERNVIRTADDR=0xc0200000 options ARM_L2_PIPT From owner-svn-src-all@FreeBSD.ORG Sun May 10 09:00:43 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 01FD64C2; Sun, 10 May 2015 09:00:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D74FB13C6; Sun, 10 May 2015 09:00:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4A90g8k000812; Sun, 10 May 2015 09:00:42 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4A90eLI000800; Sun, 10 May 2015 09:00:40 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201505100900.t4A90eLI000800@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 10 May 2015 09:00:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282708 - in head/sys: amd64/linux32 compat/freebsd32 compat/svr4 i386/ibcs2 i386/linux 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.20 Precedence: list List-Id: "SVN commit messages 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, 10 May 2015 09:00:43 -0000 Author: kib Date: Sun May 10 09:00:40 2015 New Revision: 282708 URL: https://svnweb.freebsd.org/changeset/base/282708 Log: On exec, single-threading must be enforced before arguments space is allocated from exec_map. If many threads try to perform execve(2) in parallel, the exec map is exhausted and some threads sleep uninterruptible waiting for the map space. Then, the thread which won the race for the space allocation, cannot single-thread the process, causing deadlock. Reported and tested by: pho (previous version) Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Modified: head/sys/amd64/linux32/linux32_machdep.c head/sys/compat/freebsd32/freebsd32_misc.c head/sys/compat/svr4/svr4_misc.c head/sys/i386/ibcs2/ibcs2_misc.c head/sys/i386/linux/linux_machdep.c head/sys/kern/kern_exec.c head/sys/sys/imgact.h Modified: head/sys/amd64/linux32/linux32_machdep.c ============================================================================== --- head/sys/amd64/linux32/linux32_machdep.c Sun May 10 08:48:00 2015 (r282707) +++ head/sys/amd64/linux32/linux32_machdep.c Sun May 10 09:00:40 2015 (r282708) @@ -137,6 +137,7 @@ int linux_execve(struct thread *td, struct linux_execve_args *args) { struct image_args eargs; + struct vmspace *oldvmspace; char *path; int error; @@ -147,12 +148,17 @@ linux_execve(struct thread *td, struct l printf(ARGS(execve, "%s"), path); #endif + error = pre_execve(td, &oldvmspace); + if (error != 0) { + free(path, M_TEMP); + return (error); + } error = freebsd32_exec_copyin_args(&eargs, path, UIO_SYSSPACE, args->argp, args->envp); free(path, M_TEMP); if (error == 0) error = kern_execve(td, &eargs, NULL); - if (error == 0) + if (error == 0) { /* Linux process can execute FreeBSD one, do not attempt * to create emuldata for such process using * linux_proc_init, this leads to a panic on KASSERT @@ -160,6 +166,8 @@ linux_execve(struct thread *td, struct l */ if (SV_PROC_ABI(td->td_proc) == SV_ABI_LINUX) error = linux_proc_init(td, 0, 0); + } + post_execve(td, error, oldvmspace); return (error); } Modified: head/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_misc.c Sun May 10 08:48:00 2015 (r282707) +++ head/sys/compat/freebsd32/freebsd32_misc.c Sun May 10 09:00:40 2015 (r282708) @@ -402,12 +402,17 @@ int freebsd32_execve(struct thread *td, struct freebsd32_execve_args *uap) { struct image_args eargs; + struct vmspace *oldvmspace; int error; + error = pre_execve(td, &oldvmspace); + if (error != 0) + return (error); error = freebsd32_exec_copyin_args(&eargs, uap->fname, UIO_USERSPACE, uap->argv, uap->envv); if (error == 0) error = kern_execve(td, &eargs, NULL); + post_execve(td, error, oldvmspace); return (error); } @@ -415,14 +420,19 @@ int freebsd32_fexecve(struct thread *td, struct freebsd32_fexecve_args *uap) { struct image_args eargs; + struct vmspace *oldvmspace; int error; + error = pre_execve(td, &oldvmspace); + if (error != 0) + return (error); error = freebsd32_exec_copyin_args(&eargs, NULL, UIO_SYSSPACE, uap->argv, uap->envv); if (error == 0) { eargs.fd = uap->fd; error = kern_execve(td, &eargs, NULL); } + post_execve(td, error, oldvmspace); return (error); } Modified: head/sys/compat/svr4/svr4_misc.c ============================================================================== --- head/sys/compat/svr4/svr4_misc.c Sun May 10 08:48:00 2015 (r282707) +++ head/sys/compat/svr4/svr4_misc.c Sun May 10 09:00:40 2015 (r282708) @@ -167,15 +167,22 @@ svr4_sys_execv(td, uap) struct svr4_sys_execv_args *uap; { struct image_args eargs; + struct vmspace *oldvmspace; char *path; int error; CHECKALTEXIST(td, uap->path, &path); + error = pre_execve(td, &oldvmspace); + if (error != 0) { + free(path, M_TEMP); + return (error); + } error = exec_copyin_args(&eargs, path, UIO_SYSSPACE, uap->argp, NULL); free(path, M_TEMP); if (error == 0) error = kern_execve(td, &eargs, NULL); + post_execve(td, error, oldvmspace); return (error); } @@ -185,16 +192,23 @@ svr4_sys_execve(td, uap) struct svr4_sys_execve_args *uap; { struct image_args eargs; + struct vmspace *oldvmspace; char *path; int error; CHECKALTEXIST(td, uap->path, &path); + error = pre_execve(td, &oldvmspace); + if (error != 0) { + free(path, M_TEMP); + return (error); + } error = exec_copyin_args(&eargs, path, UIO_SYSSPACE, uap->argp, uap->envp); free(path, M_TEMP); if (error == 0) error = kern_execve(td, &eargs, NULL); + post_execve(td, error, oldvmspace); return (error); } Modified: head/sys/i386/ibcs2/ibcs2_misc.c ============================================================================== --- head/sys/i386/ibcs2/ibcs2_misc.c Sun May 10 08:48:00 2015 (r282707) +++ head/sys/i386/ibcs2/ibcs2_misc.c Sun May 10 09:00:40 2015 (r282708) @@ -200,15 +200,22 @@ ibcs2_execv(td, uap) struct ibcs2_execv_args *uap; { struct image_args eargs; + struct vmspace *oldvmspace; char *path; int error; CHECKALTEXIST(td, uap->path, &path); + error = pre_execve(td, &oldvmspace); + if (error != 0) { + free(path, M_TEMP); + return (error); + } error = exec_copyin_args(&eargs, path, UIO_SYSSPACE, uap->argp, NULL); free(path, M_TEMP); if (error == 0) error = kern_execve(td, &eargs, NULL); + post_execve(td, error, oldvmspace); return (error); } @@ -218,16 +225,23 @@ ibcs2_execve(td, uap) struct ibcs2_execve_args *uap; { struct image_args eargs; + struct vmspace *oldvmspace; char *path; int error; CHECKALTEXIST(td, uap->path, &path); + error = pre_execve(td, &oldvmspace); + if (error != 0) { + free(path, M_TEMP); + return (error); + } error = exec_copyin_args(&eargs, path, UIO_SYSSPACE, uap->argp, uap->envp); free(path, M_TEMP); if (error == 0) error = kern_execve(td, &eargs, NULL); + post_execve(td, error, oldvmspace); return (error); } Modified: head/sys/i386/linux/linux_machdep.c ============================================================================== --- head/sys/i386/linux/linux_machdep.c Sun May 10 08:48:00 2015 (r282707) +++ head/sys/i386/linux/linux_machdep.c Sun May 10 09:00:40 2015 (r282708) @@ -126,9 +126,10 @@ bsd_to_linux_sigaltstack(int bsa) int linux_execve(struct thread *td, struct linux_execve_args *args) { - int error; - char *newpath; struct image_args eargs; + struct vmspace *oldvmspace; + char *newpath; + int error; LCONVPATHEXIST(td, args->path, &newpath); @@ -137,12 +138,17 @@ linux_execve(struct thread *td, struct l printf(ARGS(execve, "%s"), newpath); #endif + error = pre_execve(td, &oldvmspace); + if (error != 0) { + free(newpath, M_TEMP); + return (error); + } error = exec_copyin_args(&eargs, newpath, UIO_SYSSPACE, args->argp, args->envp); free(newpath, M_TEMP); if (error == 0) error = kern_execve(td, &eargs, NULL); - if (error == 0) + if (error == 0) { /* linux process can exec fbsd one, dont attempt * to create emuldata for such process using * linux_proc_init, this leads to a panic on KASSERT @@ -150,6 +156,8 @@ linux_execve(struct thread *td, struct l */ if (SV_PROC_ABI(td->td_proc) == SV_ABI_LINUX) error = linux_proc_init(td, 0, 0); + } + post_execve(td, error, oldvmspace); return (error); } Modified: head/sys/kern/kern_exec.c ============================================================================== --- head/sys/kern/kern_exec.c Sun May 10 08:48:00 2015 (r282707) +++ head/sys/kern/kern_exec.c Sun May 10 09:00:40 2015 (r282708) @@ -193,21 +193,20 @@ struct execve_args { #endif int -sys_execve(td, uap) - struct thread *td; - struct execve_args /* { - char *fname; - char **argv; - char **envv; - } */ *uap; +sys_execve(struct thread *td, struct execve_args *uap) { - int error; struct image_args args; + struct vmspace *oldvmspace; + int error; + error = pre_execve(td, &oldvmspace); + if (error != 0) + return (error); error = exec_copyin_args(&args, uap->fname, UIO_USERSPACE, uap->argv, uap->envv); if (error == 0) error = kern_execve(td, &args, NULL); + post_execve(td, error, oldvmspace); return (error); } @@ -221,15 +220,20 @@ struct fexecve_args { int sys_fexecve(struct thread *td, struct fexecve_args *uap) { - int error; struct image_args args; + struct vmspace *oldvmspace; + int error; + error = pre_execve(td, &oldvmspace); + if (error != 0) + return (error); error = exec_copyin_args(&args, NULL, UIO_SYSSPACE, uap->argv, uap->envv); if (error == 0) { args.fd = uap->fd; error = kern_execve(td, &args, NULL); } + post_execve(td, error, oldvmspace); return (error); } @@ -243,65 +247,56 @@ struct __mac_execve_args { #endif int -sys___mac_execve(td, uap) - struct thread *td; - struct __mac_execve_args /* { - char *fname; - char **argv; - char **envv; - struct mac *mac_p; - } */ *uap; +sys___mac_execve(struct thread *td, struct __mac_execve_args *uap) { #ifdef MAC - int error; struct image_args args; + struct vmspace *oldvmspace; + int error; + error = pre_execve(td, &oldvmspace); + if (error != 0) + return (error); error = exec_copyin_args(&args, uap->fname, UIO_USERSPACE, uap->argv, uap->envv); if (error == 0) error = kern_execve(td, &args, uap->mac_p); + post_execve(td, error, oldvmspace); return (error); #else return (ENOSYS); #endif } -/* - * XXX: kern_execve has the astonishing property of not always returning to - * the caller. If sufficiently bad things happen during the call to - * do_execve(), it can end up calling exit1(); as a result, callers must - * avoid doing anything which they might need to undo (e.g., allocating - * memory). - */ int -kern_execve(td, args, mac_p) - struct thread *td; - struct image_args *args; - struct mac *mac_p; +pre_execve(struct thread *td, struct vmspace **oldvmspace) { - struct proc *p = td->td_proc; - struct vmspace *oldvmspace; + struct proc *p; int error; - AUDIT_ARG_ARGV(args->begin_argv, args->argc, - args->begin_envv - args->begin_argv); - AUDIT_ARG_ENVV(args->begin_envv, args->envc, - args->endp - args->begin_envv); - if (p->p_flag & P_HADTHREADS) { + KASSERT(td == curthread, ("non-current thread %p", td)); + error = 0; + p = td->td_proc; + if ((p->p_flag & P_HADTHREADS) != 0) { PROC_LOCK(p); - if (thread_single(p, SINGLE_BOUNDARY)) { - PROC_UNLOCK(p); - exec_free_args(args); - return (ERESTART); /* Try again later. */ - } + if (thread_single(p, SINGLE_BOUNDARY) != 0) + error = ERESTART; PROC_UNLOCK(p); } + KASSERT(error != 0 || (td->td_pflags & TDP_EXECVMSPC) == 0, + ("nested execve")); + *oldvmspace = p->p_vmspace; + return (error); +} - KASSERT((td->td_pflags & TDP_EXECVMSPC) == 0, ("nested execve")); - oldvmspace = td->td_proc->p_vmspace; - error = do_execve(td, args, mac_p); +void +post_execve(struct thread *td, int error, struct vmspace *oldvmspace) +{ + struct proc *p; - if (p->p_flag & P_HADTHREADS) { + KASSERT(td == curthread, ("non-current thread %p", td)); + p = td->td_proc; + if ((p->p_flag & P_HADTHREADS) != 0) { PROC_LOCK(p); /* * If success, we upgrade to SINGLE_EXIT state to @@ -314,13 +309,29 @@ kern_execve(td, args, mac_p) PROC_UNLOCK(p); } if ((td->td_pflags & TDP_EXECVMSPC) != 0) { - KASSERT(td->td_proc->p_vmspace != oldvmspace, + KASSERT(p->p_vmspace != oldvmspace, ("oldvmspace still used")); vmspace_free(oldvmspace); td->td_pflags &= ~TDP_EXECVMSPC; } +} - return (error); +/* + * XXX: kern_execve has the astonishing property of not always returning to + * the caller. If sufficiently bad things happen during the call to + * do_execve(), it can end up calling exit1(); as a result, callers must + * avoid doing anything which they might need to undo (e.g., allocating + * memory). + */ +int +kern_execve(struct thread *td, struct image_args *args, struct mac *mac_p) +{ + + AUDIT_ARG_ARGV(args->begin_argv, args->argc, + args->begin_envv - args->begin_argv); + AUDIT_ARG_ENVV(args->begin_envv, args->envc, + args->endp - args->begin_envv); + return (do_execve(td, args, mac_p)); } /* Modified: head/sys/sys/imgact.h ============================================================================== --- head/sys/sys/imgact.h Sun May 10 08:48:00 2015 (r282707) +++ head/sys/sys/imgact.h Sun May 10 09:00:40 2015 (r282708) @@ -86,6 +86,7 @@ struct image_params { #ifdef _KERNEL struct sysentvec; struct thread; +struct vmspace; #define IMGACT_CORE_COMPRESS 0x01 @@ -98,6 +99,8 @@ void exec_setregs(struct thread *, struc int exec_shell_imgact(struct image_params *); int exec_copyin_args(struct image_args *, char *, enum uio_seg, char **, char **); +int pre_execve(struct thread *td, struct vmspace **oldvmspace); +void post_execve(struct thread *td, int error, struct vmspace *oldvmspace); #endif #endif /* !_SYS_IMGACT_H_ */ From owner-svn-src-all@FreeBSD.ORG Sun May 10 09:02:16 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9CCD7622; Sun, 10 May 2015 09:02:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8B5C813DA; Sun, 10 May 2015 09:02:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4A92GFB001596; Sun, 10 May 2015 09:02:16 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4A92G1l001595; Sun, 10 May 2015 09:02:16 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201505100902.t4A92G1l001595@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 10 May 2015 09:02:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282709 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 10 May 2015 09:02:16 -0000 Author: bapt Date: Sun May 10 09:02:15 2015 New Revision: 282709 URL: https://svnweb.freebsd.org/changeset/base/282709 Log: Some style(9) fixes Modified: head/usr.sbin/pw/pwupd.c Modified: head/usr.sbin/pw/pwupd.c ============================================================================== --- head/usr.sbin/pw/pwupd.c Sun May 10 09:00:40 2015 (r282708) +++ head/usr.sbin/pw/pwupd.c Sun May 10 09:02:15 2015 (r282709) @@ -52,12 +52,13 @@ int setpwdir(const char * dir) { if (dir == NULL) - return -1; + return (-1); else pwpath = strdup(dir); if (pwpath == NULL) - return -1; - return 0; + return (-1); + + return (0); } char * @@ -66,7 +67,8 @@ getpwpath(char const * file) static char pathbuf[MAXPATHLEN]; snprintf(pathbuf, sizeof pathbuf, "%s/%s", pwpath, file); - return pathbuf; + + return (pathbuf); } static int @@ -101,7 +103,8 @@ pwdb(char *arg,...) i = EIO; } va_end(ap); - return i; + + return (i); } static int @@ -146,19 +149,22 @@ pw_update(struct passwd * pwd, char cons free(pw); pw_fini(); } - return 0; + + return (0); } int addpwent(struct passwd * pwd) { - return pw_update(pwd, NULL); + + return (pw_update(pwd, NULL)); } int chgpwent(char const * login, struct passwd * pwd) { - return pw_update(pwd, login); + + return (pw_update(pwd, login)); } int @@ -167,5 +173,6 @@ delpwent(struct passwd * pwd) char login[MAXLOGNAME]; strlcpy(login, pwd->pw_name, MAXLOGNAME); - return pw_update(NULL, login); + + return (pw_update(NULL, login)); } From owner-svn-src-all@FreeBSD.ORG Sun May 10 09:05:58 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4AD64777; Sun, 10 May 2015 09:05:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 396F513F0; Sun, 10 May 2015 09:05:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4A95wOr002112; Sun, 10 May 2015 09:05:58 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4A95wB0002111; Sun, 10 May 2015 09:05:58 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201505100905.t4A95wB0002111@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 10 May 2015 09:05:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282710 - head/sys/amd64/amd64 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.20 Precedence: list List-Id: "SVN commit messages 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, 10 May 2015 09:05:58 -0000 Author: kib Date: Sun May 10 09:05:57 2015 New Revision: 282710 URL: https://svnweb.freebsd.org/changeset/base/282710 Log: Tweak assert to also print the thread address. Sponsored by: The FreeBSD Foundation MFC after: 3 weeks Modified: head/sys/amd64/amd64/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Sun May 10 09:02:15 2015 (r282709) +++ head/sys/amd64/amd64/pmap.c Sun May 10 09:05:57 2015 (r282710) @@ -6604,8 +6604,8 @@ pmap_activate_sw(struct thread *td) pmap->pm_pcids[cpuid].pm_pcid)); KASSERT(pmap->pm_pcids[cpuid].pm_pcid != PMAP_PCID_KERN || pmap == kernel_pmap, - ("non-kernel pmap %p cpu %d pcid %#x", pmap, cpuid, - pmap->pm_pcids[cpuid].pm_pcid)); + ("non-kernel pmap thread %p pmap %p cpu %d pcid %#x", + td, pmap, cpuid, pmap->pm_pcids[cpuid].pm_pcid)); if (!cached || (cr3 & ~CR3_PCID_MASK) != pmap->pm_cr3) { load_cr3(pmap->pm_cr3 | pmap->pm_pcids[cpuid].pm_pcid | cached); From owner-svn-src-all@FreeBSD.ORG Sun May 10 09:09:08 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8508C9DD; Sun, 10 May 2015 09:09:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 716FC144F; Sun, 10 May 2015 09:09:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4A998TT002566; Sun, 10 May 2015 09:09:08 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4A998pJ002565; Sun, 10 May 2015 09:09:08 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201505100909.t4A998pJ002565@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 10 May 2015 09:09:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282711 - head/sys/amd64/amd64 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.20 Precedence: list List-Id: "SVN commit messages 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, 10 May 2015 09:09:08 -0000 Author: kib Date: Sun May 10 09:09:07 2015 New Revision: 282711 URL: https://svnweb.freebsd.org/changeset/base/282711 Log: Initialize pcids array for the proc0 pmap. Sponsored by: The FreeBSD Foundation MFC after: 3 weeks Modified: head/sys/amd64/amd64/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Sun May 10 09:05:57 2015 (r282710) +++ head/sys/amd64/amd64/pmap.c Sun May 10 09:09:07 2015 (r282711) @@ -2108,6 +2108,7 @@ pmap_unuse_pt(pmap_t pmap, vm_offset_t v void pmap_pinit0(pmap_t pmap) { + int i; PMAP_LOCK_INIT(pmap); pmap->pm_pml4 = (pml4_entry_t *)PHYS_TO_DMAP(KPML4phys); @@ -2118,6 +2119,10 @@ pmap_pinit0(pmap_t pmap) TAILQ_INIT(&pmap->pm_pvchunk); bzero(&pmap->pm_stats, sizeof pmap->pm_stats); pmap->pm_flags = pmap_flags; + CPU_FOREACH(i) { + pmap->pm_pcids[i].pm_pcid = PMAP_PCID_NONE; + pmap->pm_pcids[i].pm_gen = 0; + } } /* From owner-svn-src-all@FreeBSD.ORG Sun May 10 09:11:13 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BB034B30; Sun, 10 May 2015 09:11:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 904F5151B; Sun, 10 May 2015 09:11:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4A9BD9P004613; Sun, 10 May 2015 09:11:13 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4A9BDB1004612; Sun, 10 May 2015 09:11:13 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201505100911.t4A9BDB1004612@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 10 May 2015 09:11:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282712 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 10 May 2015 09:11:13 -0000 Author: bapt Date: Sun May 10 09:11:12 2015 New Revision: 282712 URL: https://svnweb.freebsd.org/changeset/base/282712 Log: if the check of the pw db fails return the failed value Modified: head/usr.sbin/pw/pwupd.c Modified: head/usr.sbin/pw/pwupd.c ============================================================================== --- head/usr.sbin/pw/pwupd.c Sun May 10 09:09:07 2015 (r282711) +++ head/usr.sbin/pw/pwupd.c Sun May 10 09:11:12 2015 (r282712) @@ -110,45 +110,43 @@ pwdb(char *arg,...) static int pw_update(struct passwd * pwd, char const * user) { - int rc = 0; - - rc = pwdb("-C", (char *)NULL); /* Check only */ - if (rc == 0) { - int pfd, tfd; - struct passwd *pw = NULL; - struct passwd *old_pw = NULL; - - if (pwd != NULL) - pw = pw_dup(pwd); - - if (user != NULL) - old_pw = GETPWNAM(user); - - if (pw_init(pwpath, NULL)) - err(1, "pw_init()"); - if ((pfd = pw_lock()) == -1) { - pw_fini(); - err(1, "pw_lock()"); - } - if ((tfd = pw_tmp(-1)) == -1) { - pw_fini(); - err(1, "pw_tmp()"); - } - if (pw_copy(pfd, tfd, pw, old_pw) == -1) { - pw_fini(); - err(1, "pw_copy()"); - } - /* - * in case of deletion of a user, the whole database - * needs to be regenerated - */ - if (pw_mkdb(pw != NULL ? pw->pw_name : NULL) == -1) { - pw_fini(); - err(1, "pw_mkdb()"); - } - free(pw); + struct passwd *pw = NULL; + struct passwd *old_pw = NULL; + int rc, pfd, tfd; + + if ((rc = pwdb("-C", NULL)) != 0) + return (rc); + + if (pwd != NULL) + pw = pw_dup(pwd); + + if (user != NULL) + old_pw = GETPWNAM(user); + + if (pw_init(pwpath, NULL)) + err(1, "pw_init()"); + if ((pfd = pw_lock()) == -1) { + pw_fini(); + err(1, "pw_lock()"); + } + if ((tfd = pw_tmp(-1)) == -1) { + pw_fini(); + err(1, "pw_tmp()"); + } + if (pw_copy(pfd, tfd, pw, old_pw) == -1) { + pw_fini(); + err(1, "pw_copy()"); + } + /* + * in case of deletion of a user, the whole database + * needs to be regenerated + */ + if (pw_mkdb(pw != NULL ? pw->pw_name : NULL) == -1) { pw_fini(); + err(1, "pw_mkdb()"); } + free(pw); + pw_fini(); return (0); } From owner-svn-src-all@FreeBSD.ORG Sun May 10 09:23:04 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 150C6CBE; Sun, 10 May 2015 09:23:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 037021617; Sun, 10 May 2015 09:23:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4A9N30r011655; Sun, 10 May 2015 09:23:03 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4A9N3cT011654; Sun, 10 May 2015 09:23:03 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201505100923.t4A9N3cT011654@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 10 May 2015 09:23:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282713 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 10 May 2015 09:23:04 -0000 Author: bapt Date: Sun May 10 09:23:03 2015 New Revision: 282713 URL: https://svnweb.freebsd.org/changeset/base/282713 Log: The pwdb function is only used once to check the database rename it pwdb_check and simplify it accordingly Modified: head/usr.sbin/pw/pwupd.c Modified: head/usr.sbin/pw/pwupd.c ============================================================================== --- head/usr.sbin/pw/pwupd.c Sun May 10 09:11:12 2015 (r282712) +++ head/usr.sbin/pw/pwupd.c Sun May 10 09:23:03 2015 (r282713) @@ -33,7 +33,6 @@ static const char rcsid[] = #include #include #include -#include #include #include #include @@ -72,19 +71,15 @@ getpwpath(char const * file) } static int -pwdb(char *arg,...) +pwdb_check(void) { int i = 0; pid_t pid; - va_list ap; char *args[10]; args[i++] = _PATH_PWD_MKDB; - va_start(ap, arg); - while (i < 6 && arg != NULL) { - args[i++] = arg; - arg = va_arg(ap, char *); - } + args[i++] = "-C"; + if (pwpath != pathpwd) { args[i++] = "-d"; args[i++] = pwpath; @@ -102,7 +97,6 @@ pwdb(char *arg,...) if (WEXITSTATUS(i)) i = EIO; } - va_end(ap); return (i); } @@ -114,7 +108,7 @@ pw_update(struct passwd * pwd, char cons struct passwd *old_pw = NULL; int rc, pfd, tfd; - if ((rc = pwdb("-C", NULL)) != 0) + if ((rc = pwdb_check()) != 0) return (rc); if (pwd != NULL) From owner-svn-src-all@FreeBSD.ORG Sun May 10 09:23:50 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C72C9DFC; Sun, 10 May 2015 09:23:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B51FD161C; Sun, 10 May 2015 09:23:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4A9NoPT011790; Sun, 10 May 2015 09:23:50 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4A9NnBr011785; Sun, 10 May 2015 09:23:49 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201505100923.t4A9NnBr011785@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sun, 10 May 2015 09:23:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282714 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 10 May 2015 09:23:51 -0000 Author: andrew Date: Sun May 10 09:23:49 2015 New Revision: 282714 URL: https://svnweb.freebsd.org/changeset/base/282714 Log: First pass clenup over the Marvell db-88f6xxx kernel configs. Modified: head/sys/arm/conf/DB-88F6XXX head/sys/arm/conf/DOCKSTAR head/sys/arm/conf/DREAMPLUG-1001 head/sys/arm/conf/SHEEVAPLUG Modified: head/sys/arm/conf/DB-88F6XXX ============================================================================== --- head/sys/arm/conf/DB-88F6XXX Sun May 10 09:23:03 2015 (r282713) +++ head/sys/arm/conf/DB-88F6XXX Sun May 10 09:23:49 2015 (r282714) @@ -10,47 +10,48 @@ include "../mv/kirkwood/std.db88f6xxx" options SOC_MV_KIRKWOOD -#makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols makeoptions WERROR="-Werror" options SCHED_4BSD # 4BSD scheduler options INET # InterNETworking options INET6 # IPv6 communications protocols -options GEOM_PART_BSD # BSD partition scheme -options GEOM_PART_MBR # MBR partition scheme -options TMPFS # Efficient memory filesystem options FFS # Berkeley Fast Filesystem options NANDFS # NAND Filesystem options NFSCL # Network Filesystem Client options NFSLOCKD # Network Lock Manager options NFS_ROOT # NFS usable as /, requires NFSCL -options BOOTP -options BOOTP_NFSROOT -options BOOTP_NFSV3 -options BOOTP_WIRED_TO=mge0 - -#options ROOTDEVNAME=\"ufs:/dev/da0a\" - +options TMPFS # Efficient memory filesystem +options GEOM_PART_BSD # BSD partition scheme +options GEOM_PART_MBR # MBR partition scheme options SYSVSHM # SYSV-style shared memory options SYSVMSG # SYSV-style message queues options SYSVSEM # SYSV-style semaphores -options _KPOSIX_PRIORITY_SCHEDULING # Posix P1003_1B real-time extensions +options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions options MUTEX_NOINLINE options RWLOCK_NOINLINE options NO_FFS_SNAPSHOT options NO_SWAPPING -# Debugging +# Debugging for use in -current +#makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols options ALT_BREAK_TO_DEBUGGER -options DDB +options KDB # Enable kernel debugger support +options DDB # Enable the kernel debugger #options DEADLKRES # Enable the deadlock resolver -#options DIAGNOSTIC #options INVARIANTS # Enable calls of extra sanity checking #options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS -options KDB options WITNESS # Enable checks to detect deadlocks and cycles options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed #options WITNESS_KDB +#options DIAGNOSTIC + +# NFS root from boopt/dhcp +options BOOTP +options BOOTP_NFSROOT +options BOOTP_NFSV3 +options BOOTP_WIRED_TO=mge0 + +#options ROOTDEVNAME=\"ufs:/dev/da0a\" device pci @@ -93,6 +94,6 @@ device mvs device nand # Flattened Device Tree -options FDT +options FDT # Configure using FDT/DTB data options FDT_DTB_STATIC makeoptions FDT_DTS_FILE=db88f6281.dts Modified: head/sys/arm/conf/DOCKSTAR ============================================================================== --- head/sys/arm/conf/DOCKSTAR Sun May 10 09:23:03 2015 (r282713) +++ head/sys/arm/conf/DOCKSTAR Sun May 10 09:23:49 2015 (r282714) @@ -24,33 +24,54 @@ ident DOCKSTAR include "std.arm" include "../mv/kirkwood/std.db88f6xxx" -makeoptions FDT_DTS_FILE=dockstar.dts - options SOC_MV_KIRKWOOD options SCHED_4BSD # 4BSD scheduler options INET # InterNETworking options INET6 # IPv6 communications protocols -options SOFTUPDATES -options CD9660 # ISO 9660 filesystem options FFS # Berkeley Fast Filesystem -options TMPFS # Efficient memory filesystem -options MSDOSFS # MS DOS File System (FAT, FAT32) +options SOFTUPDATES # Enable FFS soft updates support +options NFSCL # Network Filesystem Client +options NFSLOCKD # Network Lock Manager +#options NFS_ROOT # NFS usable as /, requires NFSCL +options MSDOSFS # MSDOS Filesystem +options CD9660 # ISO 9660 filesystem options NULLFS # NULL filesystem +options TMPFS # Efficient memory filesystem +options GEOM_PART_GPT # GUID Partition Tables +options GEOM_PART_BSD # BSD partition scheme +options GEOM_PART_MBR # MBR partition scheme +options GEOM_LABEL # Provides labelization +options GEOM_ELI # Disk encryption options SYSVSHM # SYSV-style shared memory options SYSVMSG # SYSV-style message queues options SYSVSEM # SYSV-style semaphores -options _KPOSIX_PRIORITY_SCHEDULING # Posix P1003_1B real-time extensions -options GEOM_PART_BSD # BSD partition scheme -options GEOM_PART_MBR # MBR partition scheme -options GEOM_ELI # Disk encryption. -options GEOM_LABEL # Providers labelization. -options GEOM_PART_GPT # GPT partitioning +options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions -# Flattened Device Tree -device fdt -options FDT -options FDT_DTB_STATIC +# Debugging for use in -current +makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols +options BREAK_TO_DEBUGGER +options ALT_BREAK_TO_DEBUGGER +options KDB # Enable kernel debugger support +options DDB # Enable the kernel debugger +options INVARIANTS # Enable calls of extra sanity checking +options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS +#options WITNESS # Enable checks to detect deadlocks and cycles +#options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed +#options WITNESS_KDB +#options DIAGNOSTIC + +# Enable these options for nfs root configured via BOOTP. +#options BOOTP +#options BOOTP_NFSROOT +#options BOOTP_NFSV3 +#options BOOTP_WIRED_TO=mge0 + +# If not using BOOTP, use something like one of these... +#options ROOTDEVNAME=\"ufs:/dev/da0a\" +options ROOTDEVNAME=\"ufs:/dev/da0s1a\" +#options ROOTDEVNAME=\"ufs:/dev/da0p10\" +#options ROOTDEVNAME=\"nfs:192.168.0.254/dreamplug\" # Misc pseudo devices device bpf # Required for DHCP @@ -138,31 +159,7 @@ options ALTQ_PRIQ # Priority Queueing options ALTQ_NOPCC # Required if the TSC is unusable #options ALTQ_DEBUG -# Debugging -makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols -options BREAK_TO_DEBUGGER -options ALT_BREAK_TO_DEBUGGER -options DDB -options KDB -#options DIAGNOSTIC -options INVARIANTS # Enable calls of extra sanity checking -options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS -#options WITNESS # Enable checks to detect deadlocks and cycles -#options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed -#options WITNESS_KDB - -# Enable these options for nfs root configured via BOOTP. -options NFSCL # Network Filesystem Client -options NFSLOCKD # Network Lock Manager -#options NFS_ROOT # NFS usable as /, requires NFSCL -#options BOOTP -#options BOOTP_NFSROOT -#options BOOTP_NFSV3 -#options BOOTP_WIRED_TO=mge0 - -# If not using BOOTP, use something like one of these... -#options ROOTDEVNAME=\"ufs:/dev/da0a\" -options ROOTDEVNAME=\"ufs:/dev/da0s1a\" -#options ROOTDEVNAME=\"ufs:/dev/da0p10\" -#options ROOTDEVNAME=\"nfs:192.168.0.254/dreamplug\" - +# Flattened Device Tree +options FDT # Configure using FDT/DTB data +options FDT_DTB_STATIC +makeoptions FDT_DTS_FILE=dockstar.dts Modified: head/sys/arm/conf/DREAMPLUG-1001 ============================================================================== --- head/sys/arm/conf/DREAMPLUG-1001 Sun May 10 09:23:03 2015 (r282713) +++ head/sys/arm/conf/DREAMPLUG-1001 Sun May 10 09:23:49 2015 (r282714) @@ -27,33 +27,54 @@ ident DREAMPLUG-1001 include "std.arm" include "../mv/kirkwood/std.db88f6xxx" -makeoptions FDT_DTS_FILE=dreamplug-1001.dts - options SOC_MV_KIRKWOOD options SCHED_4BSD # 4BSD scheduler options INET # InterNETworking options INET6 # IPv6 communications protocols -options SOFTUPDATES -options TMPFS # Efficient memory filesystem -options CD9660 # ISO 9660 filesystem options FFS # Berkeley Fast Filesystem -options MSDOSFS # MS DOS File System (FAT, FAT32) +options SOFTUPDATES # Enable FFS soft updates support +options NFSCL # Network Filesystem Client +options NFSLOCKD # Network Lock Manager +#options NFS_ROOT # NFS usable as /, requires NFSCL +options MSDOSFS # MSDOS Filesystem +options CD9660 # ISO 9660 filesystem options NULLFS # NULL filesystem +options TMPFS # Efficient memory filesystem +options GEOM_PART_GPT # GUID Partition Tables +options GEOM_PART_BSD # BSD partition scheme +options GEOM_PART_MBR # MBR partition scheme +options GEOM_LABEL # Provides labelization +options GEOM_ELI # Disk encryption options SYSVSHM # SYSV-style shared memory options SYSVMSG # SYSV-style message queues options SYSVSEM # SYSV-style semaphores -options _KPOSIX_PRIORITY_SCHEDULING # Posix P1003_1B real-time extensions -options GEOM_PART_BSD # BSD partition scheme -options GEOM_PART_MBR # MBR partition scheme -options GEOM_ELI # Disk encryption. -options GEOM_LABEL # Providers labelization. -options GEOM_PART_GPT # GPT partitioning +options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions -# Flattened Device Tree -device fdt -options FDT -options FDT_DTB_STATIC +# Debugging for use in -current +makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols +options BREAK_TO_DEBUGGER +options ALT_BREAK_TO_DEBUGGER +options KDB # Enable kernel debugger support +options DDB # Enable the kernel debugger +options INVARIANTS # Enable calls of extra sanity checking +options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS +#options WITNESS # Enable checks to detect deadlocks and cycles +#options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed +#options WITNESS_KDB +#options DIAGNOSTIC + +# Enable these options for nfs root configured via BOOTP. +#options BOOTP +#options BOOTP_NFSROOT +#options BOOTP_NFSV3 +#options BOOTP_WIRED_TO=mge0 + +# If not using BOOTP, use something like one of these... +#options ROOTDEVNAME=\"ufs:/dev/da1a\" +options ROOTDEVNAME=\"ufs:/dev/da1s1a\" +#options ROOTDEVNAME=\"ufs:/dev/da1p10\" +#options ROOTDEVNAME=\"nfs:192.168.0.254/dreamplug\" # Misc pseudo devices device bpf # Required for DHCP @@ -146,34 +167,6 @@ options ALTQ_PRIQ # Priority Queueing options ALTQ_NOPCC # Required if the TSC is unusable #options ALTQ_DEBUG -# Debugging -makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols -options BREAK_TO_DEBUGGER -options ALT_BREAK_TO_DEBUGGER -options DDB -options KDB -#options DIAGNOSTIC -options INVARIANTS # Enable calls of extra sanity checking -options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS -#options WITNESS # Enable checks to detect deadlocks and cycles -#options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed -#options WITNESS_KDB - -# Enable these options for nfs root configured via BOOTP. -options NFSCL # Network Filesystem Client -options NFSLOCKD # Network Lock Manager -#options NFS_ROOT # NFS usable as /, requires NFSCL -#options BOOTP -#options BOOTP_NFSROOT -#options BOOTP_NFSV3 -#options BOOTP_WIRED_TO=mge0 - -# If not using BOOTP, use something like one of these... -#options ROOTDEVNAME=\"ufs:/dev/da1a\" -options ROOTDEVNAME=\"ufs:/dev/da1s1a\" -#options ROOTDEVNAME=\"ufs:/dev/da1p10\" -#options ROOTDEVNAME=\"nfs:192.168.0.254/dreamplug\" - # To use this configuration with the (rare) model 1001N (nand flash), # create a kernel config file that looks like this: # @@ -182,3 +175,7 @@ options ROOTDEVNAME=\"ufs:/dev/da1s1a\" # makeoptions FDT_DTS_FILE=dreamplug-1001N.dts # device nand +# Flattened Device Tree +options FDT # Configure using FDT/DTB data +options FDT_DTB_STATIC +makeoptions FDT_DTS_FILE=dreamplug-1001.dts Modified: head/sys/arm/conf/SHEEVAPLUG ============================================================================== --- head/sys/arm/conf/SHEEVAPLUG Sun May 10 09:23:03 2015 (r282713) +++ head/sys/arm/conf/SHEEVAPLUG Sun May 10 09:23:49 2015 (r282714) @@ -11,45 +11,47 @@ include "../mv/kirkwood/std.db88f6xxx" options SOC_MV_KIRKWOOD -#makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols makeoptions WERROR="-Werror" +options HZ=1000 options SCHED_4BSD # 4BSD scheduler options INET # InterNETworking options INET6 # IPv6 communications protocols -options GEOM_PART_BSD # BSD partition scheme -options GEOM_PART_MBR # MBR partition scheme -options TMPFS # Efficient memory filesystem options FFS # Berkeley Fast Filesystem options NANDFS # NAND Filesystem options NFSCL # Network Filesystem Client options NFSLOCKD # Network Lock Manager options NFS_ROOT # NFS usable as /, requires NFSCL -options BOOTP -options BOOTP_NFSROOT -options BOOTP_NFSV3 -options BOOTP_WIRED_TO=mge0 - -# Root fs on USB device -#options ROOTDEVNAME=\"ufs:/dev/da0a\" - +options TMPFS # Efficient memory filesystem +options GEOM_PART_BSD # BSD partition scheme +options GEOM_PART_MBR # MBR partition scheme options SYSVSHM # SYSV-style shared memory options SYSVMSG # SYSV-style message queues options SYSVSEM # SYSV-style semaphores -options _KPOSIX_PRIORITY_SCHEDULING # Posix P1003_1B real-time extensions +options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions options MUTEX_NOINLINE options RWLOCK_NOINLINE options NO_FFS_SNAPSHOT options NO_SWAPPING -# Debugging +# Debugging for use in -current +#makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols options ALT_BREAK_TO_DEBUGGER -options DDB -options KDB +options KDB # Enable kernel debugger support +options DDB # Enable the kernel debugger + +# NFS root from boopt/dhcp +options BOOTP +options BOOTP_NFSROOT +options BOOTP_NFSV3 +options BOOTP_WIRED_TO=mge0 + +# Root fs on USB device +#options ROOTDEVNAME=\"ufs:/dev/da0a\" # Pseudo devices -device random device loop +device random # Serial ports device uart @@ -60,7 +62,6 @@ device mge # Marvell Gigabit Ethernet device mii device e1000phy device bpf -options HZ=1000 options DEVICE_POLLING device vlan @@ -81,6 +82,6 @@ device da device nand # Flattened Device Tree -options FDT +options FDT # Configure using FDT/DTB data options FDT_DTB_STATIC makeoptions FDT_DTS_FILE=sheevaplug.dts From owner-svn-src-all@FreeBSD.ORG Sun May 10 09:33:05 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 11855FE5; Sun, 10 May 2015 09:33:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F36DF170B; Sun, 10 May 2015 09:33:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4A9X46H016654; Sun, 10 May 2015 09:33:04 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4A9X4O7016651; Sun, 10 May 2015 09:33:04 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201505100933.t4A9X4O7016651@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sun, 10 May 2015 09:33:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282715 - in head/sys: arm/allwinner/a20 arm/conf 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.20 Precedence: list List-Id: "SVN commit messages 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, 10 May 2015 09:33:05 -0000 Author: andrew Date: Sun May 10 09:33:03 2015 New Revision: 282715 URL: https://svnweb.freebsd.org/changeset/base/282715 Log: Add the gic to files.arm under "device gic" and use it with the CUBIEBOARD2 config. This is common across a few SoCs so should be a common option. Modified: head/sys/arm/allwinner/a20/files.a20 head/sys/arm/conf/CUBIEBOARD2 head/sys/conf/files.arm Modified: head/sys/arm/allwinner/a20/files.a20 ============================================================================== --- head/sys/arm/allwinner/a20/files.a20 Sun May 10 09:23:49 2015 (r282714) +++ head/sys/arm/allwinner/a20/files.a20 Sun May 10 09:33:03 2015 (r282715) @@ -1,5 +1,3 @@ # $FreeBSD$ -arm/arm/gic.c standard - arm/allwinner/a20/a20_mp.c optional smp Modified: head/sys/arm/conf/CUBIEBOARD2 ============================================================================== --- head/sys/arm/conf/CUBIEBOARD2 Sun May 10 09:23:49 2015 (r282714) +++ head/sys/arm/conf/CUBIEBOARD2 Sun May 10 09:33:03 2015 (r282715) @@ -53,6 +53,9 @@ options WITNESS_SKIPSPIN # Don't run wi # Boot device is 2nd slice on MMC/SD card options ROOTDEVNAME=\"ufs:/dev/da0s2\" +# Interrupt controller +device gic + # MMC/SD/SDIO Card slot support #device mmc # mmc/sd bus #device mmcsd # mmc/sd flash cards Modified: head/sys/conf/files.arm ============================================================================== --- head/sys/conf/files.arm Sun May 10 09:23:49 2015 (r282714) +++ head/sys/conf/files.arm Sun May 10 09:33:03 2015 (r282715) @@ -37,6 +37,7 @@ arm/arm/fiq.c standard arm/arm/fiq_subr.S standard arm/arm/fusu.S standard arm/arm/gdb_machdep.c optional gdb +arm/arm/gic.c optional gic arm/arm/identcpu.c standard arm/arm/in_cksum.c optional inet | inet6 arm/arm/in_cksum_arm.S optional inet | inet6 From owner-svn-src-all@FreeBSD.ORG Sun May 10 09:33:15 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BA9DC1A9; Sun, 10 May 2015 09:33:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A8EB2170D; Sun, 10 May 2015 09:33:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4A9XF8n016714; Sun, 10 May 2015 09:33:15 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4A9XFwD016713; Sun, 10 May 2015 09:33:15 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201505100933.t4A9XFwD016713@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 10 May 2015 09:33:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282716 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 10 May 2015 09:33:15 -0000 Author: bapt Date: Sun May 10 09:33:15 2015 New Revision: 282716 URL: https://svnweb.freebsd.org/changeset/base/282716 Log: Remove useless call to extendarray Modified: head/usr.sbin/pw/pw_conf.c Modified: head/usr.sbin/pw/pw_conf.c ============================================================================== --- head/usr.sbin/pw/pw_conf.c Sun May 10 09:33:03 2015 (r282715) +++ head/usr.sbin/pw/pw_conf.c Sun May 10 09:33:15 2015 (r282716) @@ -438,7 +438,6 @@ write_userconfig(char const * file) config.default_group : ""); break; case _UC_EXTRAGROUPS: - extendarray(&config.groups, &config.numgroups, 200); for (j = 0; j < config.numgroups && config.groups[j] != NULL; j++) sbuf_printf(buf, "%s\"%s\"", j ? From owner-svn-src-all@FreeBSD.ORG Sun May 10 09:37:55 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E28BA403; Sun, 10 May 2015 09:37:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D079F173A; Sun, 10 May 2015 09:37:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4A9btFP017383; Sun, 10 May 2015 09:37:55 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4A9btxU017379; Sun, 10 May 2015 09:37:55 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201505100937.t4A9btxU017379@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sun, 10 May 2015 09:37:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282717 - in head/sys/arm: conf qemu 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.20 Precedence: list List-Id: "SVN commit messages 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, 10 May 2015 09:37:56 -0000 Author: andrew Date: Sun May 10 09:37:54 2015 New Revision: 282717 URL: https://svnweb.freebsd.org/changeset/base/282717 Log: Use the new gic option. While here remove extra whitespace from the ned of a few lines. Modified: head/sys/arm/conf/VIRT head/sys/arm/qemu/files.qemu Modified: head/sys/arm/conf/VIRT ============================================================================== --- head/sys/arm/conf/VIRT Sun May 10 09:33:15 2015 (r282716) +++ head/sys/arm/conf/VIRT Sun May 10 09:37:54 2015 (r282717) @@ -43,6 +43,9 @@ options INVARIANT_SUPPORT # Extra sanit #options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed #options DIAGNOSTIC +# Interrupt controller +device gic + device bpf device loop device ether @@ -52,9 +55,9 @@ device snp device pl011 device psci -device virtio -device virtio_mmio -device virtio_blk +device virtio +device virtio_mmio +device virtio_blk device vtnet device md Modified: head/sys/arm/qemu/files.qemu ============================================================================== --- head/sys/arm/qemu/files.qemu Sun May 10 09:33:15 2015 (r282716) +++ head/sys/arm/qemu/files.qemu Sun May 10 09:37:54 2015 (r282717) @@ -10,7 +10,6 @@ kern/kern_clocksource.c standard # # Standard qemu virt devices and support. # -arm/arm/gic.c standard arm/arm/generic_timer.c standard arm/qemu/virt_common.c standard arm/qemu/virt_machdep.c standard From owner-svn-src-all@FreeBSD.ORG Sun May 10 10:02:09 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EAD5C950; Sun, 10 May 2015 10:02:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D90781A1D; Sun, 10 May 2015 10:02:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4AA29SI031422; Sun, 10 May 2015 10:02:09 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4AA29vb031421; Sun, 10 May 2015 10:02:09 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201505101002.t4AA29vb031421@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 10 May 2015 10:02:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282718 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 10 May 2015 10:02:10 -0000 Author: bapt Date: Sun May 10 10:02:09 2015 New Revision: 282718 URL: https://svnweb.freebsd.org/changeset/base/282718 Log: Use strndup(3) instead of malloc(3) + memcpy(3) Check the return of strndup Modified: head/usr.sbin/pw/pw_conf.c Modified: head/usr.sbin/pw/pw_conf.c ============================================================================== --- head/usr.sbin/pw/pw_conf.c Sun May 10 09:37:54 2015 (r282717) +++ head/usr.sbin/pw/pw_conf.c Sun May 10 10:02:09 2015 (r282718) @@ -34,6 +34,7 @@ static const char rcsid[] = #include #include #include +#include #include "pw.h" @@ -211,15 +212,18 @@ boolean_str(int val) char * newstr(char const * p) { - char *q = NULL; + char *q; + size_t l; - if ((p = unquote(p)) != NULL) { - int l = strlen(p) + 1; + if ((p = unquote(p)) == NULL) + return (NULL); - if ((q = malloc(l)) != NULL) - memcpy(q, p, l); - } - return q; + l = strlen(p) + 1; + + if ((q = strndup(p, l)) == NULL) + err(1, "strndup()"); + + return (q); } struct userconf * From owner-svn-src-all@FreeBSD.ORG Sun May 10 10:15:37 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B20D7CAD; Sun, 10 May 2015 10:15:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A03EF1B18; Sun, 10 May 2015 10:15:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4AAFbXO036697; Sun, 10 May 2015 10:15:37 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4AAFbU6036696; Sun, 10 May 2015 10:15:37 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201505101015.t4AAFbU6036696@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 10 May 2015 10:15:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282719 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 10 May 2015 10:15:37 -0000 Author: bapt Date: Sun May 10 10:15:36 2015 New Revision: 282719 URL: https://svnweb.freebsd.org/changeset/base/282719 Log: The initial logic for allocating the new string was wrong, the conversion to strndup(3) duplicated the same mistake, actually strdup(3) is good enough to allocate the new string. Modified: head/usr.sbin/pw/pw_conf.c Modified: head/usr.sbin/pw/pw_conf.c ============================================================================== --- head/usr.sbin/pw/pw_conf.c Sun May 10 10:02:09 2015 (r282718) +++ head/usr.sbin/pw/pw_conf.c Sun May 10 10:15:36 2015 (r282719) @@ -213,15 +213,12 @@ char * newstr(char const * p) { char *q; - size_t l; if ((p = unquote(p)) == NULL) return (NULL); - l = strlen(p) + 1; - - if ((q = strndup(p, l)) == NULL) - err(1, "strndup()"); + if ((q = strdup(p)) == NULL) + err(1, "strdup()"); return (q); } From owner-svn-src-all@FreeBSD.ORG Sun May 10 11:18:01 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EB9D85DB; Sun, 10 May 2015 11:18:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D9C1E10FC; Sun, 10 May 2015 11:18:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4ABI1li066118; Sun, 10 May 2015 11:18:01 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4ABI1d3066117; Sun, 10 May 2015 11:18:01 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201505101118.t4ABI1d3066117@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 10 May 2015 11:18:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282720 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 10 May 2015 11:18:02 -0000 Author: bapt Date: Sun May 10 11:18:01 2015 New Revision: 282720 URL: https://svnweb.freebsd.org/changeset/base/282720 Log: Use calloc(3) instead of malloc(3) + memset(3) While here check the return of calloc(3) Modified: head/usr.sbin/pw/pw_conf.c Modified: head/usr.sbin/pw/pw_conf.c ============================================================================== --- head/usr.sbin/pw/pw_conf.c Sun May 10 10:15:36 2015 (r282719) +++ head/usr.sbin/pw/pw_conf.c Sun May 10 11:18:01 2015 (r282720) @@ -234,8 +234,10 @@ read_userconfig(char const * file) buf = NULL; linecap = 0; - extendarray(&config.groups, &config.numgroups, 200); - memset(config.groups, 0, config.numgroups * sizeof(char *)); + config.numgroups = 200; + config.groups = calloc(config.numgroups, sizeof(char *)); + if (config.groups == NULL) + err(1, "calloc()"); if (file == NULL) file = _PATH_PW_CONF; From owner-svn-src-all@FreeBSD.ORG Sun May 10 11:24:17 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 90F0D771; Sun, 10 May 2015 11:24:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7F1D911D3; Sun, 10 May 2015 11:24:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4ABOHNf070511; Sun, 10 May 2015 11:24:17 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4ABOHus070510; Sun, 10 May 2015 11:24:17 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201505101124.t4ABOHus070510@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 10 May 2015 11:24:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282721 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 10 May 2015 11:24:17 -0000 Author: bapt Date: Sun May 10 11:24:16 2015 New Revision: 282721 URL: https://svnweb.freebsd.org/changeset/base/282721 Log: Remove extendline definition Remove now unused PWBUFSZ define Modified: head/usr.sbin/pw/pwupd.h Modified: head/usr.sbin/pw/pwupd.h ============================================================================== --- head/usr.sbin/pw/pwupd.h Sun May 10 11:18:01 2015 (r282720) +++ head/usr.sbin/pw/pwupd.h Sun May 10 11:24:16 2015 (r282721) @@ -112,10 +112,7 @@ void vendgrent(void); void copymkdir(char const * dir, char const * skel, mode_t mode, uid_t uid, gid_t gid); void rm_r(char const * dir, uid_t uid); -int extendline(char **buf, int *buflen, int needed); int extendarray(char ***buf, int *buflen, int needed); __END_DECLS -#define PWBUFSZ 1024 - #endif /* !_PWUPD_H */ From owner-svn-src-all@FreeBSD.ORG Sun May 10 11:41:40 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3807E979; Sun, 10 May 2015 11:41:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0C1081368; Sun, 10 May 2015 11:41:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4ABfdlH079881; Sun, 10 May 2015 11:41:39 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4ABfdRU079879; Sun, 10 May 2015 11:41:39 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201505101141.t4ABfdRU079879@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 10 May 2015 11:41:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282722 - head/usr.bin/col 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.20 Precedence: list List-Id: "SVN commit messages 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, 10 May 2015 11:41:40 -0000 Author: bapt Date: Sun May 10 11:41:38 2015 New Revision: 282722 URL: https://svnweb.freebsd.org/changeset/base/282722 Log: For half and reverse line feeds, recognize both SUSv2-style escape-digit and BSD-style escape-control-char sequences in the input stream. Submitted by: schwarze at OpenBSD Discussed with: schwarze at OpenBSD Obtained from: OpenBSD Modified: head/usr.bin/col/col.1 head/usr.bin/col/col.c Modified: head/usr.bin/col/col.1 ============================================================================== --- head/usr.bin/col/col.1 Sun May 10 11:24:16 2015 (r282721) +++ head/usr.bin/col/col.1 Sun May 10 11:41:38 2015 (r282722) @@ -31,7 +31,7 @@ .\" @(#)col.1 8.1 (Berkeley) 6/29/93 .\" $FreeBSD$ .\" -.Dd August 4, 2004 +.Dd May 10, 2015 .Dt COL 1 .Os .Sh NAME @@ -82,18 +82,33 @@ recognized and interpreted by itself, wh Output multiple spaces instead of tabs. .El .Pp -The control sequences for carriage motion that +In the input stream, .Nm -understands and their decimal values are listed in the following -table: +understands both the escape sequences of the form escape-digit +mandated by +.St -susv2 +and the traditional +.Bx +format escape-control-character. +The control sequences for carriage motion and their ASCII values +are as follows: .Pp .Bl -tag -width "carriage return" -compact +.It ESC\-BELL +reverse line feed (escape then bell). .It ESC\-7 -reverse line feed (escape then 7) +reverse line feed (escape then 7). +.It ESC\-BACKSPACE +half reverse line feed (escape then backspace). .It ESC\-8 -half reverse line feed (escape then 8) +half reverse line feed (escape then 8). +.It ESC\-TAB +half forward line feed (escape than tab). .It ESC\-9 -half forward line feed (escape then 9) +half forward line feed (escape then 9). +In +.Fl f +mode, this sequence may also occur in the output stream. .It backspace moves back one column (8); ignored in the first column .It carriage return Modified: head/usr.bin/col/col.c ============================================================================== --- head/usr.bin/col/col.c Sun May 10 11:24:16 2015 (r282721) +++ head/usr.bin/col/col.c Sun May 10 11:41:38 2015 (r282722) @@ -205,12 +205,23 @@ main(int argc, char **argv) continue; case ESC: /* just ignore EOF */ switch(getwchar()) { + /* + * In the input stream, accept both the + * XPG5 sequences ESC-digit and the + * traditional BSD sequences ESC-ctrl. + */ + case '\007': + /* FALLTHROUGH */ case RLF: addto_lineno(&cur_line, -2); break; + case '\010': + /* FALLTHROUGH */ case RHLF: addto_lineno(&cur_line, -1); break; + case '\011': + /* FALLTHROUGH */ case FHLF: addto_lineno(&cur_line, 1); if (cur_line > max_line) From owner-svn-src-all@FreeBSD.ORG Sun May 10 12:13:32 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4300B2C2; Sun, 10 May 2015 12:13:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2417316A3; Sun, 10 May 2015 12:13:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4ACDW7V095191; Sun, 10 May 2015 12:13:32 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4ACDR8J095151; Sun, 10 May 2015 12:13:27 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201505101213.t4ACDR8J095151@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sun, 10 May 2015 12:13:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282723 - in head/sys/arm: altera/socfpga amlogic/aml8726 conf freescale/imx freescale/vybrid rockchip samsung/exynos ti/omap4 xilinx 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.20 Precedence: list List-Id: "SVN commit messages 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, 10 May 2015 12:13:32 -0000 Author: andrew Date: Sun May 10 12:13:27 2015 New Revision: 282723 URL: https://svnweb.freebsd.org/changeset/base/282723 Log: Use the new gic option on all configs that need it. Modified: head/sys/arm/altera/socfpga/files.socfpga head/sys/arm/amlogic/aml8726/files.aml8726 head/sys/arm/conf/AML8726 head/sys/arm/conf/EXYNOS5.common head/sys/arm/conf/IMX6 head/sys/arm/conf/PANDABOARD head/sys/arm/conf/RK3188 head/sys/arm/conf/SOCKIT.common head/sys/arm/conf/VYBRID head/sys/arm/conf/ZEDBOARD head/sys/arm/freescale/imx/files.imx6 head/sys/arm/freescale/vybrid/files.vybrid head/sys/arm/rockchip/files.rk30xx head/sys/arm/samsung/exynos/files.exynos5 head/sys/arm/ti/omap4/files.omap4 head/sys/arm/xilinx/files.zynq7 Modified: head/sys/arm/altera/socfpga/files.socfpga ============================================================================== --- head/sys/arm/altera/socfpga/files.socfpga Sun May 10 11:41:38 2015 (r282722) +++ head/sys/arm/altera/socfpga/files.socfpga Sun May 10 12:13:27 2015 (r282723) @@ -6,7 +6,6 @@ arm/arm/bus_space_generic.c standard arm/arm/bus_space_asm_generic.S standard arm/arm/bus_space_base.c standard -arm/arm/gic.c standard arm/arm/mpcore_timer.c standard arm/altera/socfpga/socfpga_common.c standard Modified: head/sys/arm/amlogic/aml8726/files.aml8726 ============================================================================== --- head/sys/arm/amlogic/aml8726/files.aml8726 Sun May 10 11:41:38 2015 (r282722) +++ head/sys/arm/amlogic/aml8726/files.aml8726 Sun May 10 12:13:27 2015 (r282723) @@ -5,7 +5,6 @@ kern/kern_clocksource.c standard arm/arm/bus_space_base.c standard arm/arm/bus_space_generic.c standard -arm/arm/gic.c standard arm/arm/pl310.c standard arm/amlogic/aml8726/aml8726_l2cache.c standard Modified: head/sys/arm/conf/AML8726 ============================================================================== --- head/sys/arm/conf/AML8726 Sun May 10 11:41:38 2015 (r282722) +++ head/sys/arm/conf/AML8726 Sun May 10 12:13:27 2015 (r282723) @@ -59,6 +59,9 @@ device mmcsd # mmc/sd flash cards # Boot device is 2nd slice on MMC/SD card options ROOTDEVNAME=\"ufs:mmcsd0s2\" +# Interrupt controller +device gic + # GPIO device gpio device gpioled Modified: head/sys/arm/conf/EXYNOS5.common ============================================================================== --- head/sys/arm/conf/EXYNOS5.common Sun May 10 11:41:38 2015 (r282722) +++ head/sys/arm/conf/EXYNOS5.common Sun May 10 12:13:27 2015 (r282723) @@ -85,6 +85,9 @@ device mmc # mmc/sd bus device mmcsd # mmc/sd flash cards device dwmmc +# Interrupt controller +device gic + # Pseudo devices device loop Modified: head/sys/arm/conf/IMX6 ============================================================================== --- head/sys/arm/conf/IMX6 Sun May 10 11:41:38 2015 (r282722) +++ head/sys/arm/conf/IMX6 Sun May 10 12:13:27 2015 (r282723) @@ -58,6 +58,9 @@ options ALT_BREAK_TO_DEBUGGER # Use Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1153CBE6; Sun, 10 May 2015 12:45:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F3537196D; Sun, 10 May 2015 12:45:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4ACjLcG010934; Sun, 10 May 2015 12:45:21 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4ACjL3i010933; Sun, 10 May 2015 12:45:21 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201505101245.t4ACjL3i010933@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sun, 10 May 2015 12:45:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282725 - head/sys/dev/usb/video 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.20 Precedence: list List-Id: "SVN commit messages 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, 10 May 2015 12:45:22 -0000 Author: hselasky Date: Sun May 10 12:45:21 2015 New Revision: 282725 URL: https://svnweb.freebsd.org/changeset/base/282725 Log: Put recycle pointer in own memory area which is not mmap'able. Modified: head/sys/dev/usb/video/udl.c Modified: head/sys/dev/usb/video/udl.c ============================================================================== --- head/sys/dev/usb/video/udl.c Sun May 10 12:41:34 2015 (r282724) +++ head/sys/dev/usb/video/udl.c Sun May 10 12:45:21 2015 (r282725) @@ -203,12 +203,14 @@ udl_buffer_alloc(uint32_t size) } mtx_unlock(&udl_buffer_mtx); if (buf != NULL) { + uint8_t *ptr = ((uint8_t *)buf) - size; /* wipe and recycle buffer */ - memset(buf, 0, size); - return (buf); + memset(ptr, 0, size); + /* return buffer pointer */ + return (ptr); } /* allocate new buffer */ - return (malloc(size, M_USB_DL, M_WAITOK | M_ZERO)); + return (malloc(size + sizeof(*buf), M_USB_DL, M_WAITOK | M_ZERO)); } static void @@ -216,9 +218,11 @@ udl_buffer_free(void *_buf, uint32_t siz { struct udl_buffer *buf; - buf = (struct udl_buffer *)_buf; - if (buf == NULL) + /* check for NULL pointer */ + if (_buf == NULL) return; + /* compute pointer to recycle list */ + buf = (struct udl_buffer *)(((uint8_t *)_buf) + size); /* * Memory mapped buffers should never be freed. From owner-svn-src-all@FreeBSD.ORG Sun May 10 13:21:41 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0FE84C3E; Sun, 10 May 2015 13:21:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E62021D64; Sun, 10 May 2015 13:21:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4ADLeTR030076; Sun, 10 May 2015 13:21:40 GMT (envelope-from thomas@FreeBSD.org) Received: (from thomas@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4ADLa54030049; Sun, 10 May 2015 13:21:36 GMT (envelope-from thomas@FreeBSD.org) Message-Id: <201505101321.t4ADLa54030049@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: thomas set sender to thomas@FreeBSD.org using -f From: Thomas Quinot Date: Sun, 10 May 2015 13:21:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282726 - head/lib/libmd 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.20 Precedence: list List-Id: "SVN commit messages 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, 10 May 2015 13:21:41 -0000 Author: thomas Date: Sun May 10 13:21:36 2015 New Revision: 282726 URL: https://svnweb.freebsd.org/changeset/base/282726 Log: Ensure libmd symbols do not clash with libcrypto Add a prefix to all symbols in libmd to avoid incompatibilites with same-named, but not binary compatible, symbols from libcrypto. Also introduce Weak aliases to avoid the need to rebuild dependent binaries and a major version bump. PR: 199119 Differential Revision: D2216 Reviewed by: roberto, delphij MFC after: 2 weeks Modified: head/lib/libmd/md4.h head/lib/libmd/md4c.c head/lib/libmd/md5.h head/lib/libmd/md5c.c head/lib/libmd/mdXhl.c head/lib/libmd/ripemd.h head/lib/libmd/rmd160c.c head/lib/libmd/sha.h head/lib/libmd/sha1c.c head/lib/libmd/sha256.h head/lib/libmd/sha256c.c head/lib/libmd/sha512.h head/lib/libmd/sha512c.c head/lib/libmd/shadriver.c Modified: head/lib/libmd/md4.h ============================================================================== --- head/lib/libmd/md4.h Sun May 10 12:45:21 2015 (r282725) +++ head/lib/libmd/md4.h Sun May 10 13:21:36 2015 (r282726) @@ -35,6 +35,18 @@ typedef struct MD4Context { #include __BEGIN_DECLS + +/* Ensure libmd symbols do not clash with libcrypto */ + +#define MD4Init _libmd_MD4Init +#define MD4Update _libmd_MD4Update +#define MD4Pad _libmd_MD4Pad +#define MD4Final _libmd_MD4Final +#define MD4End _libmd_MD4End +#define MD4File _libmd_MD4File +#define MD4FileChunk _libmd_MD4FileChunk +#define MD4Data _libmd_MD4Data + void MD4Init(MD4_CTX *); void MD4Update(MD4_CTX *, const void *, unsigned int); void MD4Pad(MD4_CTX *); Modified: head/lib/libmd/md4c.c ============================================================================== --- head/lib/libmd/md4c.c Sun May 10 12:45:21 2015 (r282725) +++ head/lib/libmd/md4c.c Sun May 10 13:21:36 2015 (r282726) @@ -290,3 +290,12 @@ unsigned int len; output[i] = ((UINT4)input[j]) | (((UINT4)input[j+1]) << 8) | (((UINT4)input[j+2]) << 16) | (((UINT4)input[j+3]) << 24); } + +#undef MD4Init +__weak_reference(_libmd_MD4Init, MD4Init); +#undef MD4Update +__weak_reference(_libmd_MD4Update, MD4Update); +#undef MD4Pad +__weak_reference(_libmd_MD4Pad, MD4Pad); +#undef MD4Final +__weak_reference(_libmd_MD4Final, MD4Final); Modified: head/lib/libmd/md5.h ============================================================================== --- head/lib/libmd/md5.h Sun May 10 12:45:21 2015 (r282725) +++ head/lib/libmd/md5.h Sun May 10 13:21:36 2015 (r282726) @@ -1,4 +1,23 @@ +/* $FreeBSD$ */ + #ifndef _MD5_H_ #define _MD5_H_ + +#ifndef _KERNEL + +/* Ensure libmd symbols do not clash with libcrypto */ + +#define MD5Init _libmd_MD5Init +#define MD5Update _libmd_MD5Update +#define MD5Pad _libmd_MD5Pad +#define MD5Final _libmd_MD5Final +#define MD5Transform _libmd_MD5Transform +#define MD5End _libmd_MD5End +#define MD5File _libmd_MD5File +#define MD5FileChunk _libmd_MD5FileChunk +#define MD5Data _libmd_MD5Data + +#endif + #include #endif /* _MD5_H_ */ Modified: head/lib/libmd/md5c.c ============================================================================== --- head/lib/libmd/md5c.c Sun May 10 12:45:21 2015 (r282725) +++ head/lib/libmd/md5c.c Sun May 10 13:21:36 2015 (r282726) @@ -39,7 +39,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include +#include "md5.h" static void MD5Transform(u_int32_t [4], const unsigned char [64]); @@ -335,3 +335,14 @@ MD5Transform (state, block) /* Zeroize sensitive information. */ memset ((void *)x, 0, sizeof (x)); } + +#undef MD5Init +__weak_reference(_libmd_MD5Init, MD5Init); +#undef MD5Update +__weak_reference(_libmd_MD5Update, MD5Update); +#undef MD5Pad +__weak_reference(_libmd_MD5Pad, MD5Pad); +#undef MD5Final +__weak_reference(_libmd_MD5Final, MD5Final); +#undef MD5Transform +__weak_reference(_libmd_MD5Transform, MD5Transform); Modified: head/lib/libmd/mdXhl.c ============================================================================== --- head/lib/libmd/mdXhl.c Sun May 10 12:45:21 2015 (r282725) +++ head/lib/libmd/mdXhl.c Sun May 10 13:21:36 2015 (r282726) @@ -96,3 +96,12 @@ MDXData (const void *data, unsigned int MDXUpdate(&ctx,data,len); return (MDXEnd(&ctx, buf)); } + +#undef MDXEnd +__weak_reference(_libmd_MDXEnd, MDXEnd); +#undef MDXFile +__weak_reference(_libmd_MDXFile, MDXFile); +#undef MDXFileChunk +__weak_reference(_libmd_MDXFileChunk, MDXFileChunk); +#undef MDXData +__weak_reference(_libmd_MDXData, MDXData); Modified: head/lib/libmd/ripemd.h ============================================================================== --- head/lib/libmd/ripemd.h Sun May 10 12:45:21 2015 (r282725) +++ head/lib/libmd/ripemd.h Sun May 10 13:21:36 2015 (r282726) @@ -81,6 +81,21 @@ typedef struct RIPEMD160state_st { } RIPEMD160_CTX; __BEGIN_DECLS + +/* Ensure libmd symbols do not clash with libcrypto */ + +#define RIPEMD160_Init _libmd_RIPEMD160_Init +#define RIPEMD160_Update _libmd_RIPEMD160_Update +#define RIPEMD160_Final _libmd_RIPEMD160_Final +#define RIPEMD160_End _libmd_RIPEMD160_End +#define RIPEMD160_File _libmd_RIPEMD160_File +#define RIPEMD160_FileChunk _libmd_RIPEMD160_FileChunk +#define RIPEMD160_Data _libmd_RIPEMD160_Data + +#define RIPEMD160_Transform _libmd_RIPEMD160_Transform +#define RMD160_version _libmd_RMD160_version +#define ripemd160_block _libmd_ripemd160_block + void RIPEMD160_Init(RIPEMD160_CTX *c); void RIPEMD160_Update(RIPEMD160_CTX *c, const void *data, size_t len); Modified: head/lib/libmd/rmd160c.c ============================================================================== --- head/lib/libmd/rmd160c.c Sun May 10 12:45:21 2015 (r282725) +++ head/lib/libmd/rmd160c.c Sun May 10 13:21:36 2015 (r282726) @@ -545,3 +545,16 @@ unsigned long *l; } } #endif + +#undef RIPEMD160_Init +__weak_reference(_libmd_RIPEMD160_Init, RIPEMD160_Init); +#undef RIPEMD160_Update +__weak_reference(_libmd_RIPEMD160_Update, RIPEMD160_Update); +#undef RIPEMD160_Final +__weak_reference(_libmd_RIPEMD160_Final, RIPEMD160_Final); +#undef RIPEMD160_Transform +__weak_reference(_libmd_RIPEMD160_Transform, RIPEMD160_Transform); +#undef RMD160_version +__weak_reference(_libmd_RMD160_version, RMD160_version); +#undef ripemd160_block +__weak_reference(_libmd_ripemd160_block, ripemd160_block); Modified: head/lib/libmd/sha.h ============================================================================== --- head/lib/libmd/sha.h Sun May 10 12:45:21 2015 (r282725) +++ head/lib/libmd/sha.h Sun May 10 13:21:36 2015 (r282726) @@ -79,6 +79,33 @@ typedef struct SHAstate_st { #define SHA1_CTX SHA_CTX __BEGIN_DECLS + +/* Ensure libmd symbols do not clash with libcrypto */ + +#define SHA_Init _libmd_SHA_Init +#define SHA_Update _libmd_SHA_Update +#define SHA_Final _libmd_SHA_Final +#define SHA_End _libmd_SHA_End +#define SHA_File _libmd_SHA_File +#define SHA_FileChunk _libmd_SHA_FileChunk +#define SHA_Data _libmd_SHA_Data + +#define SHA_Transform _libmd_SHA_Transform +#define SHA_version _libmd_SHA_version +#define sha_block _libmd_sha_block + +#define SHA1_Init _libmd_SHA1_Init +#define SHA1_Update _libmd_SHA1_Update +#define SHA1_Final _libmd_SHA1_Final +#define SHA1_End _libmd_SHA1_End +#define SHA1_File _libmd_SHA1_File +#define SHA1_FileChunk _libmd_SHA1_FileChunk +#define SHA1_Data _libmd_SHA1_Data + +#define SHA1_Transform _libmd_SHA1_Transform +#define SHA1_version _libmd_SHA1_version +#define sha1_block _libmd_sha1_block + void SHA_Init(SHA_CTX *c); void SHA_Update(SHA_CTX *c, const void *data, size_t len); void SHA_Final(unsigned char *md, SHA_CTX *c); @@ -86,6 +113,7 @@ char *SHA_End(SHA_CTX *, char *); char *SHA_File(const char *, char *); char *SHA_FileChunk(const char *, char *, off_t, off_t); char *SHA_Data(const void *, unsigned int, char *); + void SHA1_Init(SHA_CTX *c); void SHA1_Update(SHA_CTX *c, const void *data, size_t len); void SHA1_Final(unsigned char *md, SHA_CTX *c); Modified: head/lib/libmd/sha1c.c ============================================================================== --- head/lib/libmd/sha1c.c Sun May 10 12:45:21 2015 (r282725) +++ head/lib/libmd/sha1c.c Sun May 10 13:21:36 2015 (r282726) @@ -488,3 +488,28 @@ SHA_CTX *c; /* memset((char *)&c,0,sizeof(c));*/ } + +#undef SHA_Init +__weak_reference(_libmd_SHA_Init, SHA_Init); +#undef SHA_Update +__weak_reference(_libmd_SHA_Update, SHA_Update); +#undef SHA_Final +__weak_reference(_libmd_SHA_Final, SHA_Final); +#undef SHA_Transform +__weak_reference(_libmd_SHA_Transform, SHA_Transform); +#undef SHA_version +__weak_reference(_libmd_SHA_version, SHA_version); +#undef sha_block +__weak_reference(_libmd_sha_block, sha_block); +#undef SHA1_Init +__weak_reference(_libmd_SHA1_Init, SHA1_Init); +#undef SHA1_Update +__weak_reference(_libmd_SHA1_Update, SHA1_Update); +#undef SHA1_Final +__weak_reference(_libmd_SHA1_Final, SHA1_Final); +#undef SHA1_Transform +__weak_reference(_libmd_SHA1_Transform, SHA1_Transform); +#undef SHA1_version +__weak_reference(_libmd_SHA1_version, SHA1_version); +#undef sha1_block +__weak_reference(_libmd_sha1_block, sha1_block); Modified: head/lib/libmd/sha256.h ============================================================================== --- head/lib/libmd/sha256.h Sun May 10 12:45:21 2015 (r282725) +++ head/lib/libmd/sha256.h Sun May 10 13:21:36 2015 (r282726) @@ -38,6 +38,20 @@ typedef struct SHA256Context { } SHA256_CTX; __BEGIN_DECLS + +/* Ensure libmd symbols do not clash with libcrypto */ + +#define SHA256_Init _libmd_SHA256_Init +#define SHA256_Update _libmd_SHA256_Update +#define SHA256_Final _libmd_SHA256_Final +#define SHA256_End _libmd_SHA256_End +#define SHA256_File _libmd_SHA256_File +#define SHA256_FileChunk _libmd_SHA256_FileChunk +#define SHA256_Data _libmd_SHA256_Data + +#define SHA256_Transform _libmd_SHA256_Transform +#define SHA256_version _libmd_SHA256_version + void SHA256_Init(SHA256_CTX *); void SHA256_Update(SHA256_CTX *, const void *, size_t); void SHA256_Final(unsigned char [32], SHA256_CTX *); Modified: head/lib/libmd/sha256c.c ============================================================================== --- head/lib/libmd/sha256c.c Sun May 10 12:45:21 2015 (r282725) +++ head/lib/libmd/sha256c.c Sun May 10 13:21:36 2015 (r282726) @@ -295,3 +295,14 @@ SHA256_Final(unsigned char digest[32], S /* Clear the context state */ memset((void *)ctx, 0, sizeof(*ctx)); } + +#undef SHA256_Init +__weak_reference(_libmd_SHA256_Init, SHA256_Init); +#undef SHA256_Update +__weak_reference(_libmd_SHA256_Update, SHA256_Update); +#undef SHA256_Final +__weak_reference(_libmd_SHA256_Final, SHA256_Final); +#undef SHA256_Transform +__weak_reference(_libmd_SHA256_Transform, SHA256_Transform); +#undef SHA256_version +__weak_reference(_libmd_SHA256_version, SHA256_version); Modified: head/lib/libmd/sha512.h ============================================================================== --- head/lib/libmd/sha512.h Sun May 10 12:45:21 2015 (r282725) +++ head/lib/libmd/sha512.h Sun May 10 13:21:36 2015 (r282726) @@ -38,6 +38,20 @@ typedef struct SHA512Context { } SHA512_CTX; __BEGIN_DECLS + +/* Ensure libmd symbols do not clash with libcrypto */ + +#define SHA512_Init _libmd_SHA512_Init +#define SHA512_Update _libmd_SHA512_Update +#define SHA512_Final _libmd_SHA512_Final +#define SHA512_End _libmd_SHA512_End +#define SHA512_File _libmd_SHA512_File +#define SHA512_FileChunk _libmd_SHA512_FileChunk +#define SHA512_Data _libmd_SHA512_Data + +#define SHA512_Transform _libmd_SHA512_Transform +#define SHA512_version _libmd_SHA512_version + void SHA512_Init(SHA512_CTX *); void SHA512_Update(SHA512_CTX *, const void *, size_t); void SHA512_Final(unsigned char [64], SHA512_CTX *); Modified: head/lib/libmd/sha512c.c ============================================================================== --- head/lib/libmd/sha512c.c Sun May 10 12:45:21 2015 (r282725) +++ head/lib/libmd/sha512c.c Sun May 10 13:21:36 2015 (r282726) @@ -318,3 +318,14 @@ SHA512_Final(unsigned char digest[64], S /* Clear the context state */ memset((void *)ctx, 0, sizeof(*ctx)); } + +#undef SHA512_Init +__weak_reference(_libmd_SHA512_Init, SHA512_Init); +#undef SHA512_Update +__weak_reference(_libmd_SHA512_Update, SHA512_Update); +#undef SHA512_Final +__weak_reference(_libmd_SHA512_Final, SHA512_Final); +#undef SHA512_Transform +__weak_reference(_libmd_SHA512_Transform, SHA512_Transform); +#undef SHA512_version +__weak_reference(_libmd_SHA512_version, SHA512_version); Modified: head/lib/libmd/shadriver.c ============================================================================== --- head/lib/libmd/shadriver.c Sun May 10 12:45:21 2015 (r282725) +++ head/lib/libmd/shadriver.c Sun May 10 13:21:36 2015 (r282726) @@ -31,10 +31,13 @@ __FBSDID("$FreeBSD$"); #endif #if SHA == 1 +#undef SHA_Data #define SHA_Data SHA1_Data #elif SHA == 256 +#undef SHA_Data #define SHA_Data SHA256_Data #elif SHA == 512 +#undef SHA_Data #define SHA_Data SHA512_Data #endif From owner-svn-src-all@FreeBSD.ORG Sun May 10 13:24:29 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E5D30DFC; Sun, 10 May 2015 13:24:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D2A531D8B; Sun, 10 May 2015 13:24:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4ADOSsr031643; Sun, 10 May 2015 13:24:28 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4ADORtJ031632; Sun, 10 May 2015 13:24:27 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201505101324.t4ADORtJ031632@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 10 May 2015 13:24:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282727 - in head/sys/boot: common efi/boot1 efi/loader efi/loader/arch/amd64 efi/loader/arch/arm efi/loader/arch/arm64 efi/loader/arch/i386 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.20 Precedence: list List-Id: "SVN commit messages 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, 10 May 2015 13:24:29 -0000 Author: ian Date: Sun May 10 13:24:26 2015 New Revision: 282727 URL: https://svnweb.freebsd.org/changeset/base/282727 Log: The self-relocation code is not efi-specific, move it to boot/common. The function was defined as taking 4 parameters and returning EFI_STATUS, but all existing callers (in asm code) passed only two parameters and don't use the return value. The function signature now matches that usage, and doesn't refer to efi-specific types. Parameters and variables now use the cannonical typenames set up by elf.h (Elf_Word, Elf_Addr, etc) instead of raw C types. Hopefully this will prevent suprises as new platforms come along and use this code. The function was renamed from _reloc() to self_reloc() to emphasize its difference from the other elf relocation code found in boot/common. Differential Revision: https://reviews.freebsd.org/D2490 Added: head/sys/boot/common/self_reloc.c - copied, changed from r282653, head/sys/boot/efi/loader/reloc.c Deleted: head/sys/boot/efi/loader/reloc.c Modified: head/sys/boot/efi/boot1/Makefile head/sys/boot/efi/loader/Makefile head/sys/boot/efi/loader/arch/amd64/start.S head/sys/boot/efi/loader/arch/arm/start.S head/sys/boot/efi/loader/arch/arm64/start.S head/sys/boot/efi/loader/arch/i386/start.S Copied and modified: head/sys/boot/common/self_reloc.c (from r282653, head/sys/boot/efi/loader/reloc.c) ============================================================================== --- head/sys/boot/efi/loader/reloc.c Fri May 8 17:53:44 2015 (r282653, copy source) +++ head/sys/boot/common/self_reloc.c Sun May 10 13:24:26 2015 (r282727) @@ -29,7 +29,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #if defined(__aarch64__) @@ -38,11 +37,11 @@ __FBSDID("$FreeBSD$"); #define ELFW_R_TYPE ELF64_R_TYPE #define ELF_RELA #elif defined(__arm__) || defined(__i386__) -#define ElfW_Rel Elf32_Rel +#define ElfW_Rel Elf32_Rel #define ElfW_Dyn Elf32_Dyn #define ELFW_R_TYPE ELF32_R_TYPE #elif defined(__amd64__) -#define ElfW_Rel Elf64_Rel +#define ElfW_Rel Elf64_Rel #define ElfW_Dyn Elf64_Dyn #define ELFW_R_TYPE ELF64_R_TYPE #else @@ -63,14 +62,13 @@ __FBSDID("$FreeBSD$"); #endif /* - * A simple relocator for EFI binaries. + * A simple elf relocator. */ -EFI_STATUS -_reloc(unsigned long ImageBase, ElfW_Dyn *dynamic, EFI_HANDLE image_handle, - EFI_SYSTEM_TABLE *system_table) +void +self_reloc(Elf_Addr baseaddr, ElfW_Dyn *dynamic) { - unsigned long relsz, relent; - unsigned long *newaddr; + Elf_Word relsz, relent; + Elf_Addr *newaddr; ElfW_Rel *rel; ElfW_Dyn *dynp; @@ -83,8 +81,7 @@ _reloc(unsigned long ImageBase, ElfW_Dyn switch (dynp->d_tag) { case DT_REL: case DT_RELA: - rel = (ElfW_Rel *) ((unsigned long) dynp->d_un.d_ptr + - ImageBase); + rel = (ElfW_Rel *)(dynp->d_un.d_ptr + baseaddr); break; case DT_RELSZ: case DT_RELASZ: @@ -110,8 +107,8 @@ _reloc(unsigned long ImageBase, ElfW_Dyn case RELOC_TYPE_RELATIVE: /* Address relative to the base address. */ - newaddr = (unsigned long *)(ImageBase + rel->r_offset); - *newaddr += ImageBase; + newaddr = (Elf_Addr *)(rel->r_offset + baseaddr); + *newaddr += baseaddr; /* Add the addend when the ABI uses them */ #ifdef ELF_RELA *newaddr += rel->r_addend; @@ -123,6 +120,4 @@ _reloc(unsigned long ImageBase, ElfW_Dyn } rel = (ElfW_Rel *) ((caddr_t) rel + relent); } - - return (EFI_SUCCESS); } Modified: head/sys/boot/efi/boot1/Makefile ============================================================================== --- head/sys/boot/efi/boot1/Makefile Sun May 10 13:21:36 2015 (r282726) +++ head/sys/boot/efi/boot1/Makefile Sun May 10 13:24:26 2015 (r282727) @@ -13,7 +13,7 @@ PROG= loader.sym INTERNALPROG= # architecture-specific loader code -SRCS= boot1.c reloc.c start.S +SRCS= boot1.c self_reloc.c start.S CFLAGS+= -I. CFLAGS+= -I${.CURDIR}/../include Modified: head/sys/boot/efi/loader/Makefile ============================================================================== --- head/sys/boot/efi/loader/Makefile Sun May 10 13:21:36 2015 (r282726) +++ head/sys/boot/efi/loader/Makefile Sun May 10 13:24:26 2015 (r282727) @@ -20,7 +20,7 @@ SRCS= autoload.c \ copy.c \ devicename.c \ main.c \ - reloc.c \ + self_reloc.c \ smbios.c \ vers.c Modified: head/sys/boot/efi/loader/arch/amd64/start.S ============================================================================== --- head/sys/boot/efi/loader/arch/amd64/start.S Sun May 10 13:21:36 2015 (r282726) +++ head/sys/boot/efi/loader/arch/amd64/start.S Sun May 10 13:24:26 2015 (r282727) @@ -53,7 +53,7 @@ _start: popq %rdx pushq %rcx pushq %rdx - call _reloc + call self_reloc popq %rdi popq %rsi Modified: head/sys/boot/efi/loader/arch/arm/start.S ============================================================================== --- head/sys/boot/efi/loader/arch/arm/start.S Sun May 10 13:21:36 2015 (r282726) +++ head/sys/boot/efi/loader/arch/arm/start.S Sun May 10 13:24:26 2015 (r282727) @@ -153,7 +153,7 @@ _start: ldr r1, .Ldynamic add r1, r1, r5 - bl _C_LABEL(_reloc) + bl _C_LABEL(self_reloc) /* Zero the BSS, _reloc fixed the values for us */ ldr r0, .Lbss Modified: head/sys/boot/efi/loader/arch/arm64/start.S ============================================================================== --- head/sys/boot/efi/loader/arch/arm64/start.S Sun May 10 13:21:36 2015 (r282726) +++ head/sys/boot/efi/loader/arch/arm64/start.S Sun May 10 13:24:26 2015 (r282727) @@ -156,7 +156,7 @@ _start: adr x0, ImageBase adr x1, _DYNAMIC - bl _reloc + bl self_reloc ldp x0, x1, [sp], #16 Modified: head/sys/boot/efi/loader/arch/i386/start.S ============================================================================== --- head/sys/boot/efi/loader/arch/i386/start.S Sun May 10 13:21:36 2015 (r282726) +++ head/sys/boot/efi/loader/arch/i386/start.S Sun May 10 13:24:26 2015 (r282727) @@ -53,7 +53,7 @@ ENTRY(_start) addl $_DYNAMIC-0b, %ebx pushl %ebx /* dynamic */ pushl %eax /* ImageBase */ - call _reloc + call self_reloc cmpl $EFI_SUCCESS, %eax jne 1f popl %ebx /* remove ImageBase from the stack */ From owner-svn-src-all@FreeBSD.ORG Sun May 10 13:30:22 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9D3C3109; Sun, 10 May 2015 13:30:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8BA5E1DBF; Sun, 10 May 2015 13:30:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4ADUMSU033124; Sun, 10 May 2015 13:30:22 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4ADUMrm033123; Sun, 10 May 2015 13:30:22 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201505101330.t4ADUMrm033123@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 10 May 2015 13:30:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282728 - head/sys/boot/efi/loader/arch/i386 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.20 Precedence: list List-Id: "SVN commit messages 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, 10 May 2015 13:30:22 -0000 Author: ian Date: Sun May 10 13:30:21 2015 New Revision: 282728 URL: https://svnweb.freebsd.org/changeset/base/282728 Log: Don't check the return value from self_reloc(), it can't fail and doesn't return a value. Despite what I said in my prior commit, it turns out this one platform was checking the return value from the old self-reloc code (which returned a hard-coded 0). Modified: head/sys/boot/efi/loader/arch/i386/start.S Modified: head/sys/boot/efi/loader/arch/i386/start.S ============================================================================== --- head/sys/boot/efi/loader/arch/i386/start.S Sun May 10 13:24:26 2015 (r282727) +++ head/sys/boot/efi/loader/arch/i386/start.S Sun May 10 13:30:21 2015 (r282728) @@ -54,8 +54,6 @@ ENTRY(_start) pushl %ebx /* dynamic */ pushl %eax /* ImageBase */ call self_reloc - cmpl $EFI_SUCCESS, %eax - jne 1f popl %ebx /* remove ImageBase from the stack */ popl %ebx /* remove dynamic from the stack */ call efi_main From owner-svn-src-all@FreeBSD.ORG Sun May 10 14:06:06 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E1F516B5; Sun, 10 May 2015 14:06:06 +0000 (UTC) Received: from relay.mailchannels.net (tkt-001-i373.relay.mailchannels.net [174.136.5.175]) by mx1.freebsd.org (Postfix) with ESMTP id 62BFA11AA; Sun, 10 May 2015 14:06:04 +0000 (UTC) X-Sender-Id: duocircle|x-authuser|hippie Received: from smtp3.ore.mailhop.org (ip-10-213-14-133.us-west-2.compute.internal [10.213.14.133]) by relay.mailchannels.net (Postfix) with ESMTPA id 3D8351007AF; Sun, 10 May 2015 13:59:12 +0000 (UTC) X-Sender-Id: duocircle|x-authuser|hippie Received: from smtp3.ore.mailhop.org (smtp3.ore.mailhop.org [10.45.8.167]) (using TLSv1 with cipher DHE-RSA-AES256-SHA) by 0.0.0.0:2500 (trex/5.4.8); Sun, 10 May 2015 13:59:12 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: duocircle|x-authuser|hippie X-MailChannels-Auth-Id: duocircle X-MC-Loop-Signature: 1431266352352:4141350547 X-MC-Ingress-Time: 1431266352351 Received: from c-73-34-117-227.hsd1.co.comcast.net ([73.34.117.227] helo=ilsoft.org) by smtp3.ore.mailhop.org with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.82) (envelope-from ) id 1YrRl8-0002vc-Io; Sun, 10 May 2015 13:59:10 +0000 Received: from revolution.hippie.lan (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id t4ADx7NF073687; Sun, 10 May 2015 07:59:07 -0600 (MDT) (envelope-from ian@freebsd.org) X-Mail-Handler: DuoCircle Outbound SMTP X-Originating-IP: 73.34.117.227 X-Report-Abuse-To: abuse@duocircle.com (see https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information for abuse reporting information) X-MHO-User: U2FsdGVkX19QaaxbbqXvyH6+bjYpTiS9 Message-ID: <1431266347.6170.221.camel@freebsd.org> Subject: Re: svn commit: r282726 - head/lib/libmd From: Ian Lepore To: Thomas Quinot Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Sun, 10 May 2015 07:59:07 -0600 In-Reply-To: <201505101321.t4ADLa54030049@svn.freebsd.org> References: <201505101321.t4ADLa54030049@svn.freebsd.org> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.12.10 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-AuthUser: hippie X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 10 May 2015 14:06:07 -0000 On Sun, 2015-05-10 at 13:21 +0000, Thomas Quinot wrote: > Author: thomas > Date: Sun May 10 13:21:36 2015 > New Revision: 282726 > URL: https://svnweb.freebsd.org/changeset/base/282726 > > Log: > Ensure libmd symbols do not clash with libcrypto > > Add a prefix to all symbols in libmd to avoid incompatibilites > with same-named, but not binary compatible, symbols from libcrypto. > > Also introduce Weak aliases to avoid the need to rebuild dependent > binaries and a major version bump. > > PR: 199119 > Differential Revision: D2216 > Reviewed by: roberto, delphij > MFC after: 2 weeks > > Modified: > head/lib/libmd/md4.h > head/lib/libmd/md4c.c > head/lib/libmd/md5.h > head/lib/libmd/md5c.c > head/lib/libmd/mdXhl.c > head/lib/libmd/ripemd.h > head/lib/libmd/rmd160c.c > head/lib/libmd/sha.h > head/lib/libmd/sha1c.c > head/lib/libmd/sha256.h > head/lib/libmd/sha256c.c > head/lib/libmd/sha512.h > head/lib/libmd/sha512c.c > head/lib/libmd/shadriver.c This appears to break bootstrapping, at least when cross-building ARM on a 10-stable build host. The build runs for about 15 seconds before hitting... --- _bootstrap-tools-usr.bin/xinstall --- xinstall.o: In function `install': /local/build/staging/freebsd/wand/src/usr.bin/xinstall/xinstall.c:(.text+0xdff): undefined reference to `_libmd_MD5File' /local/build/staging/freebsd/wand/src/usr.bin/xinstall/xinstall.c:(.text+0x12ee): undefined reference to `_libmd_MD5Init' /local/build/staging/freebsd/wand/src/usr.bin/xinstall/xinstall.c:(.text+0x12fa): undefined reference to `_libmd_RIPEMD160_File' [quite a few more symbols listed] Complete log is here (command includes -DNO_CLEAN, but objdir started out empty). http://pastebin.com/v3iSZpSJ -- Ian From owner-svn-src-all@FreeBSD.ORG Sun May 10 14:21:00 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 54EA0B1C; Sun, 10 May 2015 14:21:00 +0000 (UTC) Received: from melamine.cuivre.fr.eu.org (houdart.cuivre.fr.eu.org [81.57.40.110]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 132B31391; Sun, 10 May 2015 14:20:59 +0000 (UTC) Received: by melamine.cuivre.fr.eu.org (Postfix, from userid 1000) id 81D72A4F0D; Sun, 10 May 2015 16:14:35 +0200 (CEST) Date: Sun, 10 May 2015 16:14:35 +0200 From: Thomas Quinot To: Ian Lepore Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r282726 - head/lib/libmd Message-ID: <20150510141435.GA86919@melamine.cuivre.fr.eu.org> References: <201505101321.t4ADLa54030049@svn.freebsd.org> <1431266347.6170.221.camel@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1431266347.6170.221.camel@freebsd.org> X-message-flag: WARNING! Using Outlook can damage your computer. User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 10 May 2015 14:21:00 -0000 * Ian Lepore, 2015-05-10 : > This appears to break bootstrapping, at least when cross-building ARM on > a 10-stable build host. The build runs for about 15 seconds before > hitting... Ack, looking into it. Does it also fail if building with -j1? Thomas. From owner-svn-src-all@FreeBSD.ORG Sun May 10 14:26:30 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0F15ED0D; Sun, 10 May 2015 14:26:30 +0000 (UTC) Received: from melamine.cuivre.fr.eu.org (houdart.cuivre.fr.eu.org [81.57.40.110]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BD05113C9; Sun, 10 May 2015 14:26:29 +0000 (UTC) Received: by melamine.cuivre.fr.eu.org (Postfix, from userid 1000) id 95F7CA4F1F; Sun, 10 May 2015 16:26:27 +0200 (CEST) Date: Sun, 10 May 2015 16:26:27 +0200 From: Thomas Quinot To: Ian Lepore Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r282726 - head/lib/libmd Message-ID: <20150510142627.GA77866@melamine.cuivre.fr.eu.org> References: <201505101321.t4ADLa54030049@svn.freebsd.org> <1431266347.6170.221.camel@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="2fHTh5uZTiUOsy+g" Content-Disposition: inline In-Reply-To: <1431266347.6170.221.camel@freebsd.org> X-message-flag: WARNING! Using Outlook can damage your computer. User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 10 May 2015 14:26:30 -0000 --2fHTh5uZTiUOsy+g Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Ian Lepore, 2015-05-10 : > This appears to break bootstrapping, at least when cross-building ARM on > a 10-stable build host. The build runs for about 15 seconds before > hitting... >=20 > --- _bootstrap-tools-usr.bin/xinstall --- > xinstall.o: In function `install': > /local/build/staging/freebsd/wand/src/usr.bin/xinstall/xinstall.c:(.text+= 0xdff): undefined reference to `_libmd_MD5File' > /local/build/staging/freebsd/wand/src/usr.bin/xinstall/xinstall.c:(.text+= 0x12ee): undefined reference to `_libmd_MD5Init' > /local/build/staging/freebsd/wand/src/usr.bin/xinstall/xinstall.c:(.text+= 0x12fa): undefined reference to `_libmd_RIPEMD160_File' > [quite a few more symbols listed] >=20 > Complete log is here (command includes -DNO_CLEAN, but objdir started out= empty). >=20 > http://pastebin.com/v3iSZpSJ Thanks for your report Ian. Could you please try the patch below? Thomas. Index: Makefile.inc1 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- Makefile.inc1 (r=E9vision 282726) +++ Makefile.inc1 (copie de travail) @@ -1361,6 +1361,9 @@ .ORDER: ${_kerberos5_bootstrap_tools:C/^/${_bt}-/g} .endif =20 +# Rebuild up-to-date libmd for xinstall +${_bt}-usr.bin/xinstall: ${_bt}-lib/libmd + bootstrap-tools: .PHONY =20 # Please document (add comment) why something is in 'bootstrap-tools'. --2fHTh5uZTiUOsy+g Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQJ8BAEBCgBmBQJVT2p7XxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRDRUU5NDNCMDA4OUI3QTg3NUZGMDg3RDdE RjhFMEI1QzdDQzYyRUYyAAoJEN+OC1x8xi7yYPwP/i4wDEVV5FxAIXbNyYLmqbHh PsT9NzrRcAHFFcQWb1HrW6U7jDKn19XsG3lMkAvTCO0vFHiipkKh5aNy/YjLNrrH /Dqj2j8jLjhQ3zITc1DuJcx8G962rnPOk5svUKR/QNlK9bVuYOjPVn88wCuXgZtf /RYsu96KjgpyQrAvbg0Mds8gio5aKJR1GtKPXy4zzevDl9dSGikQTD0mrq9sjgcj wKYrN4yt6muH7OiyErvOWalu790PJ9naiHfic+97pm0GzFYdJbK26miFyuS2/e3B 1Bwdw6J6pNDVHTA86i2mlG6lgAZcD2xpN4WzigDSO+QTwUb+bMIiiSwVDc7N2nvC 7XKxbmGXe9b+6XM4UUsQvnUTe77J2ExO13pP/VFED77CcpHnvMKmG9YlAyG3+rTr 6KOJ/vmVKW4kxgVFts2n816UfutoJwdK47l0aY1BBF6vCn95y6q4Gh2R8X57NhLa M/2C+jETIxQXOfoRQnC2rKcAhbYXYtwZ1eDF2c7rDk1j9OtFslD7Madlb24pjKVj Lscb31Kb1l5ZSJVkmWf+tlErXbTtelWHEiMQc5yH9xNCZnSS5cevP2CgLfg7Zz24 U0+Uk5rLeFxPFeeyws/ODCfWMLXRXVDqJ38i2xBnAYvfmFJTbuMTkKUfu3P4PB5w fLbekzolYC7hFHuP5mfS =Z8jy -----END PGP SIGNATURE----- --2fHTh5uZTiUOsy+g-- From owner-svn-src-all@FreeBSD.ORG Sun May 10 14:50:51 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4CF13123; Sun, 10 May 2015 14:50:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 22528160A; Sun, 10 May 2015 14:50:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4AEopSD074788; Sun, 10 May 2015 14:50:51 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4AEooNH074786; Sun, 10 May 2015 14:50:50 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201505101450.t4AEooNH074786@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sun, 10 May 2015 14:50:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282729 - head/lib/libc/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.20 Precedence: list List-Id: "SVN commit messages 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, 10 May 2015 14:50:51 -0000 Author: jilles Date: Sun May 10 14:50:50 2015 New Revision: 282729 URL: https://svnweb.freebsd.org/changeset/base/282729 Log: recv(),send(): Directly call interposing entry instead of going through PLT. recv() and send()'s calls to recvfrom() and sendto() are much like waitpid()'s call to wait4(), and likewise need not allow PLT interposing on the called function. Modified: head/lib/libc/net/recv.c head/lib/libc/net/send.c Modified: head/lib/libc/net/recv.c ============================================================================== --- head/lib/libc/net/recv.c Sun May 10 13:30:21 2015 (r282728) +++ head/lib/libc/net/recv.c Sun May 10 14:50:50 2015 (r282729) @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include "libc_private.h" #include @@ -48,5 +49,8 @@ recv(s, buf, len, flags) * POSIX says recv() shall be a cancellation point, so call the * cancellation-enabled recvfrom() and not _recvfrom(). */ - return (recvfrom(s, buf, len, flags, NULL, 0)); + return (((ssize_t (*)(int, void *, size_t, int, + struct sockaddr *, socklen_t *)) + __libc_interposing[INTERPOS_recvfrom])(s, buf, len, flags, + NULL, NULL)); } Modified: head/lib/libc/net/send.c ============================================================================== --- head/lib/libc/net/send.c Sun May 10 13:30:21 2015 (r282728) +++ head/lib/libc/net/send.c Sun May 10 14:50:50 2015 (r282729) @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include "libc_private.h" #include @@ -48,5 +49,8 @@ send(s, msg, len, flags) * POSIX says send() shall be a cancellation point, so call the * cancellation-enabled sendto() and not _sendto(). */ - return (sendto(s, msg, len, flags, NULL, 0)); + return (((ssize_t (*)(int, const void *, size_t, int, + const struct sockaddr *, socklen_t)) + __libc_interposing[INTERPOS_sendto])(s, msg, len, flags, + NULL, 0)); } From owner-svn-src-all@FreeBSD.ORG Sun May 10 15:40:57 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B9C99F1B; Sun, 10 May 2015 15:40:57 +0000 (UTC) Received: from relay.mailchannels.net (ar-005-i207.relay.mailchannels.net [162.253.144.89]) by mx1.freebsd.org (Postfix) with ESMTP id 376D51AF3; Sun, 10 May 2015 15:40:52 +0000 (UTC) X-Sender-Id: duocircle|x-authuser|hippie Received: from smtp4.ore.mailhop.org (ip-10-237-13-110.us-west-2.compute.internal [10.237.13.110]) by relay.mailchannels.net (Postfix) with ESMTPA id A7AFD4307; Sun, 10 May 2015 15:40:50 +0000 (UTC) X-Sender-Id: duocircle|x-authuser|hippie Received: from smtp4.ore.mailhop.org (smtp4.ore.mailhop.org [10.21.145.197]) (using TLSv1 with cipher DHE-RSA-AES256-SHA) by 0.0.0.0:2500 (trex/5.4.8); Sun, 10 May 2015 15:40:51 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: duocircle|x-authuser|hippie X-MailChannels-Auth-Id: duocircle X-MC-Loop-Signature: 1431272450776:2526392302 X-MC-Ingress-Time: 1431272450775 Received: from c-73-34-117-227.hsd1.co.comcast.net ([73.34.117.227] helo=ilsoft.org) by smtp4.ore.mailhop.org with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.82) (envelope-from ) id 1YrTLU-0001nz-3I; Sun, 10 May 2015 15:40:48 +0000 Received: from revolution.hippie.lan (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id t4AFeiMN073872; Sun, 10 May 2015 09:40:44 -0600 (MDT) (envelope-from ian@freebsd.org) X-Mail-Handler: DuoCircle Outbound SMTP X-Originating-IP: 73.34.117.227 X-Report-Abuse-To: abuse@duocircle.com (see https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information for abuse reporting information) X-MHO-User: U2FsdGVkX186WSG59V55yxhe69x3kGbp Message-ID: <1431272444.6170.231.camel@freebsd.org> Subject: Re: svn commit: r282726 - head/lib/libmd From: Ian Lepore To: Thomas Quinot Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Sun, 10 May 2015 09:40:44 -0600 In-Reply-To: <20150510142627.GA77866@melamine.cuivre.fr.eu.org> References: <201505101321.t4ADLa54030049@svn.freebsd.org> <1431266347.6170.221.camel@freebsd.org> <20150510142627.GA77866@melamine.cuivre.fr.eu.org> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.12.10 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-AuthUser: hippie X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 10 May 2015 15:40:57 -0000 On Sun, 2015-05-10 at 16:26 +0200, Thomas Quinot wrote: > * Ian Lepore, 2015-05-10 : >=20 > > This appears to break bootstrapping, at least when cross-building ARM o= n > > a 10-stable build host. The build runs for about 15 seconds before > > hitting... > >=20 > > --- _bootstrap-tools-usr.bin/xinstall --- > > xinstall.o: In function `install': > > /local/build/staging/freebsd/wand/src/usr.bin/xinstall/xinstall.c:(.tex= t+0xdff): undefined reference to `_libmd_MD5File' > > /local/build/staging/freebsd/wand/src/usr.bin/xinstall/xinstall.c:(.tex= t+0x12ee): undefined reference to `_libmd_MD5Init' > > /local/build/staging/freebsd/wand/src/usr.bin/xinstall/xinstall.c:(.tex= t+0x12fa): undefined reference to `_libmd_RIPEMD160_File' > > [quite a few more symbols listed] > >=20 > > Complete log is here (command includes -DNO_CLEAN, but objdir started o= ut empty). > >=20 > > http://pastebin.com/v3iSZpSJ >=20 > Thanks for your report Ian. Could you please try the patch below? >=20 > Thomas. >=20 > Index: Makefile.inc1 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- Makefile.inc1 (r=E9vision 282726) > +++ Makefile.inc1 (copie de travail) > @@ -1361,6 +1361,9 @@ > .ORDER: ${_kerberos5_bootstrap_tools:C/^/${_bt}-/g} > .endif > =20 > +# Rebuild up-to-date libmd for xinstall > +${_bt}-usr.bin/xinstall: ${_bt}-lib/libmd > + > bootstrap-tools: .PHONY > =20 > # Please document (add comment) why something is in 'bootstrap-tools'. That gets past the bootstrapping problem, now it dies like this: --- lib/libcrypt__L --- --- crypt-md5.So --- cc -fpic -DPIC -O -pipe -I/local/build/staging/freebsd/wand/src/lib/lib= crypt/../libmd -I/local/build/staging/freebsd/wand/src/lib/libcrypt/../libu= til -I/local/build/staging/freebsd/wand/src/lib/libcrypt -DHAS_DES -DHAS_BL= OWFISH -DMD4Init=3D__MD4Init -DMD4Final=3D__MD4Final -DMD4Update=3D__MD4Upd= ate -DMD4Pad=3D__MD4Pad -DMD5Init=3D__MD5Init -DMD5Final=3D__MD5Final -DMD5= Update=3D__MD5Update -DMD5Pad=3D__MD5Pad -DSHA256_Init=3D__SHA256_Init -DSH= A256_Final=3D__SHA256_Final -DSHA256_Update=3D__SHA256_Update -DSHA512_Init= =3D__SHA512_Init -DSHA512_Final=3D__SHA512_Final -DSHA512_Update=3D__SHA512= _Update -std=3Dgnu99 -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-un= initialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unu= sed-const-variable -Wno-tautological-compare -Wno-unused-value -Wno-parenth= eses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-t= ypedef -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter -Qunused-ar= guments -c /local/build/staging/freebsd/wand/src/lib/libcrypt/crypt-md5.c -= o crypt-md5.So [...] --- lib/libcrypt__L --- In file included from /local/build/staging/freebsd/wand/src/lib/libcrypt/cr= ypt-md5.c:33: /local/build/staging/freebsd/wand/src/lib/libcrypt/../libmd/md5.h:10:9: war= ning: 'MD5Init' macro redefined [-Wmacro-redefined] #define MD5Init _libmd_MD5Init ^ :8:9: note: previous definition is here #define MD5Init __MD5Init ^ -- Ian From owner-svn-src-all@FreeBSD.ORG Sun May 10 17:05:00 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 525EBCD5; Sun, 10 May 2015 17:05:00 +0000 (UTC) Received: from gold.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "gold.funkthat.com", Issuer "gold.funkthat.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 2B9BE12F7; Sun, 10 May 2015 17:04:59 +0000 (UTC) Received: from gold.funkthat.com (localhost [127.0.0.1]) by gold.funkthat.com (8.14.5/8.14.5) with ESMTP id t4AH4w0X079450 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 10 May 2015 10:04:58 -0700 (PDT) (envelope-from jmg@gold.funkthat.com) Received: (from jmg@localhost) by gold.funkthat.com (8.14.5/8.14.5/Submit) id t4AH4wNZ079449; Sun, 10 May 2015 10:04:58 -0700 (PDT) (envelope-from jmg) Date: Sun, 10 May 2015 10:04:58 -0700 From: John-Mark Gurney To: Benjamin Kaduk Cc: Julian Elischer , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r282485 - head/lib/libc/gen Message-ID: <20150510170458.GG37063@funkthat.com> References: <201505051452.t45EqXXv027613@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: FreeBSD 9.1-PRERELEASE amd64 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-TipJar: bitcoin:13Qmb6AeTgQecazTWph4XasEsP7nGRbAPE X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? User-Agent: Mutt/1.5.21 (2010-09-15) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (gold.funkthat.com [127.0.0.1]); Sun, 10 May 2015 10:04:58 -0700 (PDT) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 10 May 2015 17:05:00 -0000 Benjamin Kaduk wrote this message on Tue, May 05, 2015 at 11:43 -0400: > > --- head/lib/libc/gen/directory.3 Tue May 5 14:19:22 2015 > > (r282484) > > +++ head/lib/libc/gen/directory.3 Tue May 5 14:52:33 2015 > > (r282485) > > @@ -267,4 +267,27 @@ The invalidation of > > .Fn telldir > > tokens when calling > > .Fn seekdir > > -is non-standard. > > +is non-standard. This is a compile time option. > > > > Man page style puts the start of new sentences on a new line. For future reference, igor (in ports) would have caught most of the issues raised here... Always run igor on the man page before you commit... Thanks. -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-svn-src-all@FreeBSD.ORG Sun May 10 17:11:05 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1D528E79; Sun, 10 May 2015 17:11:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0BAD61320; Sun, 10 May 2015 17:11:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4AHB4gA044189; Sun, 10 May 2015 17:11:04 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4AHB4xp044188; Sun, 10 May 2015 17:11:04 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201505101711.t4AHB4xp044188@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sun, 10 May 2015 17:11:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282730 - head/sys/dev/vt 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.20 Precedence: list List-Id: "SVN commit messages 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, 10 May 2015 17:11:05 -0000 Author: hselasky Date: Sun May 10 17:11:04 2015 New Revision: 282730 URL: https://svnweb.freebsd.org/changeset/base/282730 Log: Ensure the result from signed subtraction under modulus does not become negative. Submitted by: Oliver Pinter MFC after: 3 days Modified: head/sys/dev/vt/vt_core.c Modified: head/sys/dev/vt/vt_core.c ============================================================================== --- head/sys/dev/vt/vt_core.c Sun May 10 14:50:50 2015 (r282729) +++ head/sys/dev/vt/vt_core.c Sun May 10 17:11:04 2015 (r282730) @@ -785,7 +785,7 @@ vt_processkey(keyboard_t *kbd, struct vt return (0); case PREV: /* Switch to previous VT. */ - c = (vw->vw_number - 1) % VT_MAXWINDOWS; + c = (vw->vw_number + VT_MAXWINDOWS - 1) % VT_MAXWINDOWS; vw = vd->vd_windows[c]; vt_proc_window_switch(vw); return (0); From owner-svn-src-all@FreeBSD.ORG Sun May 10 17:52:12 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3FC4F75F; Sun, 10 May 2015 17:52:12 +0000 (UTC) Received: from melamine.cuivre.fr.eu.org (houdart.cuivre.fr.eu.org [81.57.40.110]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F3D1A17D6; Sun, 10 May 2015 17:52:10 +0000 (UTC) Received: by melamine.cuivre.fr.eu.org (Postfix, from userid 1000) id 79CEEA4FED; Sun, 10 May 2015 19:52:08 +0200 (CEST) Date: Sun, 10 May 2015 19:52:08 +0200 From: Thomas Quinot To: Ian Lepore Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r282726 - head/lib/libmd Message-ID: <20150510175208.GA10340@melamine.cuivre.fr.eu.org> References: <201505101321.t4ADLa54030049@svn.freebsd.org> <1431266347.6170.221.camel@freebsd.org> <20150510142627.GA77866@melamine.cuivre.fr.eu.org> <1431272444.6170.231.camel@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1431272444.6170.231.camel@freebsd.org> X-message-flag: WARNING! Using Outlook can damage your computer. User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 10 May 2015 17:52:12 -0000 * Ian Lepore, 2015-05-10 : > That gets past the bootstrapping problem, now it dies like this: Ack, I have a fix for this one as well, now rebuilding world to test it... Thomas. From owner-svn-src-all@FreeBSD.ORG Sun May 10 19:14:29 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 40B454D2; Sun, 10 May 2015 19:14:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 214731F5C; Sun, 10 May 2015 19:14:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4AJESXN006161; Sun, 10 May 2015 19:14:28 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4AJESCC006158; Sun, 10 May 2015 19:14:28 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201505101914.t4AJESCC006158@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 10 May 2015 19:14:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282731 - head/sys/boot/arm/uboot 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.20 Precedence: list List-Id: "SVN commit messages 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, 10 May 2015 19:14:29 -0000 Author: ian Date: Sun May 10 19:14:28 2015 New Revision: 282731 URL: https://svnweb.freebsd.org/changeset/base/282731 Log: Create a relocatable instance of ubldr for ARM. The original ubldr, static-linked to run at a fixed position, is still installed to maintain compatibility with existing configurations. The makefile now also creates and installs ubldr.bin, a stripped binary (no elf headers) with an entry point offset of 0 that can be loaded by u-boot at any address and launched with "go ${loadaddr}". To use ubldr.bin, U-Boot must still be built with the CONFIG_API option, but no longer needs the CONFIG_ELF option. Modified: head/sys/boot/arm/uboot/Makefile head/sys/boot/arm/uboot/start.S Modified: head/sys/boot/arm/uboot/Makefile ============================================================================== --- head/sys/boot/arm/uboot/Makefile Sun May 10 17:11:04 2015 (r282730) +++ head/sys/boot/arm/uboot/Makefile Sun May 10 19:14:28 2015 (r282731) @@ -2,7 +2,8 @@ .include -PROG= ubldr +FILES= ubldr ubldr.bin + NEWVERSWHAT= "U-Boot loader" ${MACHINE_ARCH} BINDIR?= /boot INSTALLFLAGS= -b @@ -12,7 +13,7 @@ WARNS?= 1 UBLDR_LOADADDR?= 0x1000000 # Architecture-specific loader code -SRCS= start.S conf.c vers.c +SRCS= start.S conf.c self_reloc.c vers.c .if !defined(LOADER_NO_DISK_SUPPORT) LOADER_DISK_SUPPORT?= yes @@ -93,9 +94,7 @@ CLEANFILES+= vers.c loader.help CFLAGS+= -ffreestanding -msoft-float -LDFLAGS= -nostdlib -static -LDFLAGS+= -T ldscript.generated -LDFLAGS+= -T ${.CURDIR}/ldscript.${MACHINE_CPUARCH} +LDFLAGS= -nostdlib -static -T ${.CURDIR}/ldscript.${MACHINE_CPUARCH} # Pull in common loader code .PATH: ${.CURDIR}/../../uboot/common @@ -116,6 +115,8 @@ NO_WERROR.clang= DPADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} ${LIBSTAND} LDADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} -lstand +OBJS+= ${SRCS:N*.h:R:S/$/.o/g} + vers.c: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version ${NEWVERSWHAT} @@ -123,17 +124,24 @@ loader.help: help.common help.uboot ${.C cat ${.ALLSRC} | \ awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET} -${PROG}: ldscript.generated ${.CURDIR}/ldscript.${MACHINE_CPUARCH} +ldscript.abs: + echo "UBLDR_LOADADDR = ${UBLDR_LOADADDR};" >${.TARGET} + +ldscript.pie: + echo "UBLDR_LOADADDR = 0;" >${.TARGET} + +ubldr: ${OBJS} ldscript.abs ${.CURDIR}/ldscript.${MACHINE_CPUARCH} + ${CC} ${CFLAGS} -T ldscript.abs ${LDFLAGS} \ + -o ${.TARGET} ${OBJS} ${LDADD} + +ubldr.pie: ${OBJS} ldscript.pie ${.CURDIR}/ldscript.${MACHINE_CPUARCH} + ${CC} ${CFLAGS} -T ldscript.pie ${LDFLAGS} -pie -Wl,-Bsymbolic \ + -o ${.TARGET} ${OBJS} ${LDADD} + +ubldr.bin: ubldr.pie + ${OBJCOPY} -S -O binary ubldr.pie ${.TARGET} -ldscript.generated:: - rm -f ldscript.generated.tmp - echo "UBLDR_LOADADDR = ${UBLDR_LOADADDR};" >ldscript.generated.tmp - if diff ldscript.generated ldscript.generated.tmp > /dev/null; then \ - true; \ - else \ - rm -f ldscript.generated; \ - mv ldscript.generated.tmp ldscript.generated; \ - fi +CLEANFILES+= ldscript.abs ldscript.pie ubldr ubldr.pie ubldr.bin .if !defined(LOADER_ONLY) .PATH: ${.CURDIR}/../../forth Modified: head/sys/boot/arm/uboot/start.S ============================================================================== --- head/sys/boot/arm/uboot/start.S Sun May 10 17:11:04 2015 (r282730) +++ head/sys/boot/arm/uboot/start.S Sun May 10 19:14:28 2015 (r282731) @@ -29,12 +29,38 @@ #include #include + .text + .extern _C_LABEL(self_reloc), _C_LABEL(main) + .weak _DYNAMIC + /* * Entry point to the loader that U-Boot passes control to. */ - .text .globl _start _start: + +#ifdef _ARM_ARCH_6 + mrc p15, 0, ip, c1, c0, 0 + orr ip, ip, #(CPU_CONTROL_UNAL_ENABLE) + orr ip, ip, #(CPU_CONTROL_AFLT_ENABLE) + mcr p15, 0, ip, c1, c0, 0 +#endif + /* + * Do self-relocation when the weak external symbol _DYNAMIC is non-NULL. + * When linked as a dynamic relocatable file, the linker automatically + * defines _DYNAMIC with a value that is the offset of the dynamic + * relocation info section. + * Note that we're still on u-boot's stack here, but the self_reloc + * code uses only a couple dozen bytes of stack space. + */ + adr ip, .here_off /* .here_off is a symbol whose value */ + ldr r0, [ip] /* is its own offset in the text seg. */ + sub r0, ip, r0 /* Get its pc-relative address and */ + ldr r1, .dynamic_off /* subtract its value and we get */ + teq r1, #0 /* r0 = physaddr we were loaded at. */ + addne r1, r1, r0 /* r1 = dynamic section physaddr. */ + blne _C_LABEL(self_reloc) /* Do reloc if _DYNAMIC is non-NULL. */ + /* Hint where to look for the API signature */ ldr ip, =uboot_address str sp, [ip] @@ -44,16 +70,20 @@ _start: str r8, [ip, #0] str r9, [ip, #4] -#ifdef _ARM_ARCH_6 - mrc p15, 0, r2, c1, c0, 0 - orr r2, r2, #(CPU_CONTROL_UNAL_ENABLE) - orr r2, r2, #(CPU_CONTROL_AFLT_ENABLE) - mcr p15, 0, r2, c1, c0, 0 -#endif - - /* Start loader */ + /* + * Start loader. This is basically a tail-recursion call; if main() + * returns, it returns to u-boot (which reports the value returned r0). + */ b main + /* + * Data for self-relocation, in the text segment for pc-rel access. + */ +.here_off: + .word . +.dynamic_off: + .word _DYNAMIC + /* * syscall() */ From owner-svn-src-all@FreeBSD.ORG Sun May 10 19:45:51 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BA0E595D; Sun, 10 May 2015 19:45:51 +0000 (UTC) Received: from bigwig.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 949CE125C; Sun, 10 May 2015 19:45:51 +0000 (UTC) Received: from [192.168.1.2] (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id B8FEDB93A; Sun, 10 May 2015 15:45:49 -0400 (EDT) References: <201505082336.t48NaWRS080408@svn.freebsd.org> Mime-Version: 1.0 (1.0) In-Reply-To: <201505082336.t48NaWRS080408@svn.freebsd.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Message-Id: Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" X-Mailer: iPad Mail (12F69) From: John Baldwin Subject: Re: svn commit: r282672 - head/etc/rc.d Date: Sun, 10 May 2015 15:45:48 -0400 To: Xin LI X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Sun, 10 May 2015 15:45:49 -0400 (EDT) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 10 May 2015 19:45:51 -0000 > On May 8, 2015, at 19:36, Xin LI wrote: >=20 > Author: delphij > Date: Fri May 8 23:36:31 2015 > New Revision: 282672 > URL: https://svnweb.freebsd.org/changeset/base/282672 >=20 > Log: > Always convert uuid to lower case. >=20 > MFC after: 2 weeks >=20 > Modified: > head/etc/rc.d/hostid >=20 > Modified: head/etc/rc.d/hostid > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=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/etc/rc.d/hostid Fri May 8 23:29:42 2015 (r282671) > +++ head/etc/rc.d/hostid Fri May 8 23:36:31 2015 (r282672) > @@ -58,7 +58,7 @@ hostid_set() >=20 > valid_hostid() > { > - uuid=3D$1 > + uuid=3D$(echo $1 | tr '[:upper:]' '[:lower:]') tr is in /usr/bin so this breaks systems with a separate /usr. Perhaps you c= ould use dd with conv=3Dlcase instead? --=20 John Baldwin= From owner-svn-src-all@FreeBSD.ORG Sun May 10 20:01:59 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 253F5CE1; Sun, 10 May 2015 20:01:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0F9B11453; Sun, 10 May 2015 20:01:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4AK1wm7030033; Sun, 10 May 2015 20:01:58 GMT (envelope-from sjg@FreeBSD.org) Received: (from sjg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4AK1tso030017; Sun, 10 May 2015 20:01:55 GMT (envelope-from sjg@FreeBSD.org) Message-Id: <201505102001.t4AK1tso030017@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: sjg set sender to sjg@FreeBSD.org using -f From: "Simon J. Gerraty" Date: Sun, 10 May 2015 20:01:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r282732 - in vendor/NetBSD/bmake/dist: . mk 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.20 Precedence: list List-Id: "SVN commit messages 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, 10 May 2015 20:01:59 -0000 Author: sjg Date: Sun May 10 20:01:54 2015 New Revision: 282732 URL: https://svnweb.freebsd.org/changeset/base/282732 Log: Import bmake-20150505 detect typo's in .if variable references. Added: vendor/NetBSD/bmake/dist/unit-tests/cond2.exp vendor/NetBSD/bmake/dist/unit-tests/cond2.mk (contents, props changed) Modified: vendor/NetBSD/bmake/dist/ChangeLog vendor/NetBSD/bmake/dist/FILES vendor/NetBSD/bmake/dist/Makefile vendor/NetBSD/bmake/dist/cond.c vendor/NetBSD/bmake/dist/machine.sh vendor/NetBSD/bmake/dist/mk/ChangeLog vendor/NetBSD/bmake/dist/mk/dirdeps.mk vendor/NetBSD/bmake/dist/mk/install-mk vendor/NetBSD/bmake/dist/nonints.h vendor/NetBSD/bmake/dist/unit-tests/Makefile.in vendor/NetBSD/bmake/dist/var.c Modified: vendor/NetBSD/bmake/dist/ChangeLog ============================================================================== --- vendor/NetBSD/bmake/dist/ChangeLog Sun May 10 19:14:28 2015 (r282731) +++ vendor/NetBSD/bmake/dist/ChangeLog Sun May 10 20:01:54 2015 (r282732) @@ -1,3 +1,16 @@ +2015-05-05 Simon J. Gerraty + + * Makefile (MAKE_VERSION): 20150505 + Merge with NetBSD make, pick up + o cond.c: be strict about lhs of comparison when evaluating .if + but less so when called from variable expansion. + o unit-tests/cond2.mk: test various error conditions + +2015-05-04 Simon J. Gerraty + + * machine.sh (MACHINE): Add Bitrig + patch from joerg@netbsd.org + 2015-04-18 Simon J. Gerraty * Makefile (MAKE_VERSION): 20150418 Modified: vendor/NetBSD/bmake/dist/FILES ============================================================================== --- vendor/NetBSD/bmake/dist/FILES Sun May 10 19:14:28 2015 (r282731) +++ vendor/NetBSD/bmake/dist/FILES Sun May 10 20:01:54 2015 (r282732) @@ -96,6 +96,8 @@ unit-tests/comment.exp unit-tests/comment.mk unit-tests/cond1.exp unit-tests/cond1.mk +unit-tests/cond2.exp +unit-tests/cond2.mk unit-tests/doterror.exp unit-tests/doterror.mk unit-tests/dotwait.exp Modified: vendor/NetBSD/bmake/dist/Makefile ============================================================================== --- vendor/NetBSD/bmake/dist/Makefile Sun May 10 19:14:28 2015 (r282731) +++ vendor/NetBSD/bmake/dist/Makefile Sun May 10 20:01:54 2015 (r282732) @@ -1,7 +1,7 @@ -# $Id: Makefile,v 1.36 2015/04/18 19:58:53 sjg Exp $ +# $Id: Makefile,v 1.38 2015/05/05 21:58:05 sjg Exp $ # Base version on src date -MAKE_VERSION= 20150418 +MAKE_VERSION= 20150505 PROG= bmake @@ -94,7 +94,7 @@ SUBDIR+= unit-tests # we skip a lot of this when building as part of FreeBSD etc. # list of OS's which are derrived from BSD4.4 -BSD44_LIST= NetBSD FreeBSD OpenBSD DragonFly +BSD44_LIST= NetBSD FreeBSD OpenBSD DragonFly MirBSD Bitrig # we are... OS!= uname -s # are we 4.4BSD ? Modified: vendor/NetBSD/bmake/dist/cond.c ============================================================================== --- vendor/NetBSD/bmake/dist/cond.c Sun May 10 19:14:28 2015 (r282731) +++ vendor/NetBSD/bmake/dist/cond.c Sun May 10 20:01:54 2015 (r282732) @@ -1,4 +1,4 @@ -/* $NetBSD: cond.c,v 1.67 2012/11/03 13:59:27 christos Exp $ */ +/* $NetBSD: cond.c,v 1.68 2015/05/05 21:51:09 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -70,14 +70,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: cond.c,v 1.67 2012/11/03 13:59:27 christos Exp $"; +static char rcsid[] = "$NetBSD: cond.c,v 1.68 2015/05/05 21:51:09 sjg Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)cond.c 8.2 (Berkeley) 1/2/94"; #else -__RCSID("$NetBSD: cond.c,v 1.67 2012/11/03 13:59:27 christos Exp $"); +__RCSID("$NetBSD: cond.c,v 1.68 2015/05/05 21:51:09 sjg Exp $"); #endif #endif /* not lint */ #endif @@ -181,6 +181,15 @@ static Token condPushBack=TOK_NONE; /* static unsigned int cond_depth = 0; /* current .if nesting level */ static unsigned int cond_min_depth = 0; /* depth at makefile open */ +/* + * Indicate when we should be strict about lhs of comparisons. + * TRUE when Cond_EvalExpression is called from Cond_Eval (.if etc) + * FALSE when Cond_EvalExpression is called from var.c:ApplyModifiers + * since lhs is already expanded and we cannot tell if + * it was a variable reference or not. + */ +static Boolean lhsStrict; + static int istoken(const char *str, const char *tok, size_t len) { @@ -517,7 +526,7 @@ CondCvtArg(char *str, double *value) */ /* coverity:[+alloc : arg-*2] */ static char * -CondGetString(Boolean doEval, Boolean *quoted, void **freeIt) +CondGetString(Boolean doEval, Boolean *quoted, void **freeIt, Boolean strictLHS) { Buffer buf; char *cp; @@ -601,6 +610,16 @@ CondGetString(Boolean doEval, Boolean *q condExpr--; /* don't skip over next char */ break; default: + if (strictLHS && !qt && *start != '$' && + !isdigit((unsigned char) *start)) { + /* lhs must be quoted, a variable reference or number */ + if (*freeIt) { + free(*freeIt); + *freeIt = NULL; + } + str = NULL; + goto cleanup; + } Buf_AddByte(&buf, *condExpr); break; } @@ -648,7 +667,7 @@ compare_expression(Boolean doEval) * Parse the variable spec and skip over it, saving its * value in lhs. */ - lhs = CondGetString(doEval, &lhsQuoted, &lhsFree); + lhs = CondGetString(doEval, &lhsQuoted, &lhsFree, lhsStrict); if (!lhs) goto done; @@ -709,7 +728,7 @@ compare_expression(Boolean doEval) goto done; } - rhs = CondGetString(doEval, &rhsQuoted, &rhsFree); + rhs = CondGetString(doEval, &rhsQuoted, &rhsFree, FALSE); if (!rhs) goto done; @@ -1135,7 +1154,7 @@ CondE(Boolean doEval) *----------------------------------------------------------------------- */ int -Cond_EvalExpression(const struct If *info, char *line, Boolean *value, int eprint) +Cond_EvalExpression(const struct If *info, char *line, Boolean *value, int eprint, Boolean strictLHS) { static const struct If *dflt_info; const struct If *sv_if_info = if_info; @@ -1143,6 +1162,8 @@ Cond_EvalExpression(const struct If *inf Token sv_condPushBack = condPushBack; int rval; + lhsStrict = strictLHS; + while (*line == ' ' || *line == '\t') line++; @@ -1359,7 +1380,7 @@ Cond_Eval(char *line) } /* And evaluate the conditional expresssion */ - if (Cond_EvalExpression(ifp, line, &value, 1) == COND_INVALID) { + if (Cond_EvalExpression(ifp, line, &value, 1, TRUE) == COND_INVALID) { /* Syntax error in conditional, error message already output. */ /* Skip everything to matching .endif */ cond_state[cond_depth] = SKIP_TO_ELSE; Modified: vendor/NetBSD/bmake/dist/machine.sh ============================================================================== --- vendor/NetBSD/bmake/dist/machine.sh Sun May 10 19:14:28 2015 (r282731) +++ vendor/NetBSD/bmake/dist/machine.sh Sun May 10 20:01:54 2015 (r282732) @@ -2,7 +2,7 @@ # derrived from /etc/rc_d/os.sh # RCSid: -# $Id: machine.sh,v 1.16 2010/10/17 00:05:51 sjg Exp $ +# $Id: machine.sh,v 1.17 2015/05/05 00:10:54 sjg Exp $ # # @(#) Copyright (c) 1994-2002 Simon J. Gerraty # @@ -49,6 +49,10 @@ OpenBSD) arch=`Which arch /usr/bin:/usr/ucb:$PATH` MACHINE_ARCH=`$arch -s`; ;; +Bitrig) + MACHINE=$OS$OSMAJOR.$machine + MACHINE_ARCH=`uname -m`; + ;; *BSD) MACHINE=$OS$OSMAJOR.$machine ;; Modified: vendor/NetBSD/bmake/dist/mk/ChangeLog ============================================================================== --- vendor/NetBSD/bmake/dist/mk/ChangeLog Sun May 10 19:14:28 2015 (r282731) +++ vendor/NetBSD/bmake/dist/mk/ChangeLog Sun May 10 20:01:54 2015 (r282732) @@ -1,3 +1,9 @@ +2015-04-30 Simon J. Gerraty + + * install-mk (MK_VERSION): 20150430 + + * dirdeps.mk: fix _count_dirdeps for non-cache case. + 2015-04-16 Simon J. Gerraty * install-mk (MK_VERSION): 20150411 Modified: vendor/NetBSD/bmake/dist/mk/dirdeps.mk ============================================================================== --- vendor/NetBSD/bmake/dist/mk/dirdeps.mk Sun May 10 19:14:28 2015 (r282731) +++ vendor/NetBSD/bmake/dist/mk/dirdeps.mk Sun May 10 20:01:54 2015 (r282732) @@ -1,4 +1,4 @@ -# $Id: dirdeps.mk,v 1.49 2015/03/11 21:39:28 sjg Exp $ +# $Id: dirdeps.mk,v 1.51 2015/05/06 06:07:30 sjg Exp $ # Copyright (c) 2010-2013, Juniper Networks, Inc. # All rights reserved. @@ -349,7 +349,7 @@ BUILD_DIRDEPS ?= yes .if !defined(NO_DIRDEPS) .if ${MK_DIRDEPS_CACHE} == "yes" # this is where we will cache all our work -DIRDEPS_CACHE?= ${_OBJDIR}/dirdeps.cache${.TARGETS:Nall:O:u:ts-:S,^,.,:N.} +DIRDEPS_CACHE?= ${_OBJDIR}/dirdeps.cache${.TARGETS:Nall:O:u:ts-:S,/,_,g:S,^,.,:N.} # just ensure this exists build-dirdeps: @@ -394,13 +394,14 @@ _count_dirdeps: .NOMETA @echo '.info $${.newline}$${TRACER}Makefiles read: total=${.MAKE.MAKEFILES:[#]} depend=${.MAKE.MAKEFILES:M*depend*:[#]} dirdeps=${.ALLTARGETS:M${SRCTOP}*:O:u:[#]}' >&3 .endif -.endif -.elif !target(_count_dirdeps) +.elif !make(dirdeps) && !target(_count_dirdeps) beforedirdeps: _count_dirdeps _count_dirdeps: .NOMETA @echo "${TRACER}Makefiles read: total=${.MAKE.MAKEFILES:[#]} depend=${.MAKE.MAKEFILES:M*depend*:[#]} dirdeps=${.ALLTARGETS:M${SRCTOP}*:O:u:[#]} seconds=`expr ${now_utc} - ${start_utc}`" .endif +.endif + .if ${BUILD_DIRDEPS} == "yes" .if ${DEBUG_DIRDEPS:@x@${DEP_RELDIR:M$x}${${DEP_RELDIR}.${DEP_MACHINE}:L:M$x}@} != "" _debug_reldir = 1 Modified: vendor/NetBSD/bmake/dist/mk/install-mk ============================================================================== --- vendor/NetBSD/bmake/dist/mk/install-mk Sun May 10 19:14:28 2015 (r282731) +++ vendor/NetBSD/bmake/dist/mk/install-mk Sun May 10 20:01:54 2015 (r282732) @@ -55,7 +55,7 @@ # Simon J. Gerraty # RCSid: -# $Id: install-mk,v 1.109 2015/04/16 16:59:00 sjg Exp $ +# $Id: install-mk,v 1.110 2015/05/01 06:37:49 sjg Exp $ # # @(#) Copyright (c) 1994 Simon J. Gerraty # @@ -70,7 +70,7 @@ # sjg@crufty.net # -MK_VERSION=20150411 +MK_VERSION=20150430 OWNER= GROUP= MODE=444 Modified: vendor/NetBSD/bmake/dist/nonints.h ============================================================================== --- vendor/NetBSD/bmake/dist/nonints.h Sun May 10 19:14:28 2015 (r282731) +++ vendor/NetBSD/bmake/dist/nonints.h Sun May 10 20:01:54 2015 (r282732) @@ -1,4 +1,4 @@ -/* $NetBSD: nonints.h,v 1.67 2014/09/07 20:55:34 joerg Exp $ */ +/* $NetBSD: nonints.h,v 1.68 2015/05/05 21:51:09 sjg Exp $ */ /*- * Copyright (c) 1988, 1989, 1990, 1993 @@ -91,7 +91,7 @@ int Compat_Make(void *, void *); /* cond.c */ struct If; -int Cond_EvalExpression(const struct If *, char *, Boolean *, int); +int Cond_EvalExpression(const struct If *, char *, Boolean *, int, Boolean); int Cond_Eval(char *); void Cond_restore_depth(unsigned int); unsigned int Cond_save_depth(void); Modified: vendor/NetBSD/bmake/dist/unit-tests/Makefile.in ============================================================================== --- vendor/NetBSD/bmake/dist/unit-tests/Makefile.in Sun May 10 19:14:28 2015 (r282731) +++ vendor/NetBSD/bmake/dist/unit-tests/Makefile.in Sun May 10 20:01:54 2015 (r282732) @@ -1,6 +1,6 @@ -# $Id: Makefile.in,v 1.46 2014/11/06 01:47:57 sjg Exp $ +# $Id: Makefile.in,v 1.47 2015/05/05 21:58:06 sjg Exp $ # -# $NetBSD: Makefile,v 1.51 2014/10/20 23:21:11 sjg Exp $ +# $NetBSD: Makefile,v 1.52 2015/05/05 21:51:09 sjg Exp $ # # Unit tests for make(1) # The main targets are: @@ -27,6 +27,7 @@ UNIT_TESTS:= ${srcdir} TESTNAMES= \ comment \ cond1 \ + cond2 \ error \ export \ export-all \ Added: vendor/NetBSD/bmake/dist/unit-tests/cond2.exp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/NetBSD/bmake/dist/unit-tests/cond2.exp Sun May 10 20:01:54 2015 (r282732) @@ -0,0 +1,7 @@ +make: Bad conditional expression ` == "empty"' in == "empty"?oops:ok +make: "cond2.mk" line 13: Malformed conditional ({TEST_TYPO} == "Ok") +TEST_NOT_SET is empty or not defined +make: "cond2.mk" line 20: Malformed conditional (${TEST_NOT_SET} == "empty") +make: Fatal errors encountered -- cannot continue +make: stopped in unit-tests +exit status 1 Added: vendor/NetBSD/bmake/dist/unit-tests/cond2.mk ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/NetBSD/bmake/dist/unit-tests/cond2.mk Sun May 10 20:01:54 2015 (r282732) @@ -0,0 +1,25 @@ +# $Id: cond2.mk,v 1.1.1.1 2015/05/05 21:53:13 sjg Exp $ + +TEST_UNAME_S= NetBSD + +# this should be ok +X:= ${${TEST_UNAME_S} == "NetBSD":?Ok:fail} +.if $X == "Ok" +Y= good +.endif +# expect: Bad conditional expression ` == "empty"' in == "empty"?oops:ok +X:= ${${TEST_NOT_SET} == "empty":?oops:ok} +# expect: Malformed conditional ({TEST_TYPO} == "Ok") +.if {TEST_TYPO} == "Ok" +Y= oops +.endif +.if empty(TEST_NOT_SET) +Y!= echo TEST_NOT_SET is empty or not defined >&2; echo +.endif +# expect: Malformed conditional (${TEST_NOT_SET} == "empty") +.if ${TEST_NOT_SET} == "empty" +Y= oops +.endif + +all: + @echo $@ Modified: vendor/NetBSD/bmake/dist/var.c ============================================================================== --- vendor/NetBSD/bmake/dist/var.c Sun May 10 19:14:28 2015 (r282731) +++ vendor/NetBSD/bmake/dist/var.c Sun May 10 20:01:54 2015 (r282732) @@ -1,4 +1,4 @@ -/* $NetBSD: var.c,v 1.191 2014/09/14 02:32:51 dholland Exp $ */ +/* $NetBSD: var.c,v 1.192 2015/05/05 21:51:09 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,14 +69,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: var.c,v 1.191 2014/09/14 02:32:51 dholland Exp $"; +static char rcsid[] = "$NetBSD: var.c,v 1.192 2015/05/05 21:51:09 sjg Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)var.c 8.3 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: var.c,v 1.191 2014/09/14 02:32:51 dholland Exp $"); +__RCSID("$NetBSD: var.c,v 1.192 2015/05/05 21:51:09 sjg Exp $"); #endif #endif /* not lint */ #endif @@ -3260,7 +3260,7 @@ ApplyModifiers(char *nstr, const char *t termc = *--cp; delim = '\0'; - if (Cond_EvalExpression(NULL, v->name, &value, 0) + if (Cond_EvalExpression(NULL, v->name, &value, 0, FALSE) == COND_INVALID) { Error("Bad conditional expression `%s' in %s?%s:%s", v->name, v->name, pattern.lhs, pattern.rhs); From owner-svn-src-all@FreeBSD.ORG Sun May 10 20:02:27 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B6010E0F; Sun, 10 May 2015 20:02:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8A3981459; Sun, 10 May 2015 20:02:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4AK2Rli030152; Sun, 10 May 2015 20:02:27 GMT (envelope-from sjg@FreeBSD.org) Received: (from sjg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4AK2R94030151; Sun, 10 May 2015 20:02:27 GMT (envelope-from sjg@FreeBSD.org) Message-Id: <201505102002.t4AK2R94030151@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: sjg set sender to sjg@FreeBSD.org using -f From: "Simon J. Gerraty" Date: Sun, 10 May 2015 20:02:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r282733 - vendor/NetBSD/bmake/20150505 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.20 Precedence: list List-Id: "SVN commit messages 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, 10 May 2015 20:02:27 -0000 Author: sjg Date: Sun May 10 20:02:26 2015 New Revision: 282733 URL: https://svnweb.freebsd.org/changeset/base/282733 Log: Tag bmake-20150505 Added: vendor/NetBSD/bmake/20150505/ - copied from r282732, vendor/NetBSD/bmake/dist/ From owner-svn-src-all@FreeBSD.ORG Sun May 10 20:36:58 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BB28C26C; Sun, 10 May 2015 20:36:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A7DFF17F7; Sun, 10 May 2015 20:36:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4AKawft051973; Sun, 10 May 2015 20:36:58 GMT (envelope-from rpaulo@FreeBSD.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4AKawc6051971; Sun, 10 May 2015 20:36:58 GMT (envelope-from rpaulo@FreeBSD.org) Message-Id: <201505102036.t4AKawc6051971@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rpaulo set sender to rpaulo@FreeBSD.org using -f From: Rui Paulo Date: Sun, 10 May 2015 20:36:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282734 - in head/sys: dev/atkbdc 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.20 Precedence: list List-Id: "SVN commit messages 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, 10 May 2015 20:36:58 -0000 Author: rpaulo Date: Sun May 10 20:36:57 2015 New Revision: 282734 URL: https://svnweb.freebsd.org/changeset/base/282734 Log: synaptics: more support for semi-MT trackpads. Several improvements to the Synaptics driver to support semi-multitouch trackpads and some other fixes: - Two finger scrolling support for "semi-MT" touchpads. Those include many of the older Synaptics touchpads before "true" multitouch support (indicated by capMultiFinger). Semi-MT touchpads can report a second finger position, but the X or Y coordinate may be swapped with some coordinate of the first finger. This is a result of how the hardware works internally. Therefore, all that can be reliably extracted is the bounding box of the two finger positions. Semi-MT touchpads can be recognized by the capAdvancedGestures capability bit. After setting the mode byte, advanced gestures mode has to be enabled. Then, data packets compatible with the capMultiFinger format are sent, so the same two finger scrolling code can be leveraged. Enabling advanced gestures mode on true multitouch touchpads should be harmless. Linux seems to always enable advanced gestures mode. - Put mode setting logic into own functions synaptics_preferred_mode() and synaptics_set_mode() to have this in one place. synaptics_passthrough_on() and synaptics_passthrough_off() currently always use 0xc1 as the mode byte, which may be wrong for touchpads that don't have capExtended. - Expose X and Y resolution of touchpad to userland. Also expose minimum and maximum X and Y coordinates. This is useful for programs in userspace that read raw PSM packets (with PSM_LEVEL_NATIVE enabled) and need to interpret the coordinates. - Also send "extended w mode" packets (see section 3.2.9 of 511-000275-01_RevB.pdf) to userspace if PSM_LEVEL_NATIVE is enabled. This is useful for userspace programs/drivers such as xf86-input-synaptics that can handle these packets. - Fix parsing of nExtendedQueries, and request extended/continued capability bits depending on this value. - capReportsMax, capClearPad, capAdvancedGestures and capCoveredPad must be extracted from status[0] and not status[2], I think. Submitted by: Jan Kokemüller jan.kokemueller at gmail.com Modified: head/sys/dev/atkbdc/psm.c head/sys/sys/mouse.h Modified: head/sys/dev/atkbdc/psm.c ============================================================================== --- head/sys/dev/atkbdc/psm.c Sun May 10 20:02:26 2015 (r282733) +++ head/sys/dev/atkbdc/psm.c Sun May 10 20:36:57 2015 (r282734) @@ -483,6 +483,8 @@ static probefunc_t enable_versapad; static void set_trackpoint_parameters(struct psm_softc *sc); static void synaptics_passthrough_on(struct psm_softc *sc); static void synaptics_passthrough_off(struct psm_softc *sc); +static int synaptics_preferred_mode(struct psm_softc *sc); +static void synaptics_set_mode(struct psm_softc *sc, int mode_byte); static struct { int model; @@ -933,14 +935,8 @@ doopen(struct psm_softc *sc, int command get_mouse_status(sc->kbdc, stat, 0, 3); if ((SYNAPTICS_VERSION_GE(sc->synhw, 7, 5) || stat[1] == 0x47) && - stat[2] == 0x40) { - /* Set the mode byte -- request wmode where - * available */ - if (sc->synhw.capExtended) - mouse_ext_command(sc->kbdc, 0xc1); - else - mouse_ext_command(sc->kbdc, 0xc0); - set_mouse_sampling_rate(sc->kbdc, 20); + stat[2] == 0x40) { + synaptics_set_mode(sc, synaptics_preferred_mode(sc)); VLOG(5, (LOG_DEBUG, "psm%d: Synaptis Absolute Mode " "hopefully restored\n", sc->unit)); @@ -2176,6 +2172,20 @@ psmioctl(struct cdev *dev, u_long cmd, c (*(int *)addr > PSM_LEVEL_MAX)) return (EINVAL); sc->mode.level = *(int *)addr; + + if (sc->hw.model == MOUSE_MODEL_SYNAPTICS) { + /* + * If we are entering PSM_LEVEL_NATIVE, we want to + * enable sending of "extended W mode" packets to + * userland. Reset the mode of the touchpad so that the + * change in the level is picked up. + */ + error = block_mouse_data(sc, &command_byte); + if (error) + return (error); + synaptics_set_mode(sc, synaptics_preferred_mode(sc)); + unblock_mouse_data(sc, command_byte); + } break; case MOUSE_GETSTATUS: @@ -2865,7 +2875,8 @@ proc_synaptics(struct psm_softc *sc, pac /* Palm detection. */ if (!( - (sc->synhw.capMultiFinger && (w == 0 || w == 1)) || + ((sc->synhw.capMultiFinger || + sc->synhw.capAdvancedGestures) && (w == 0 || w == 1)) || (sc->synhw.capPalmDetect && w >= 4 && w <= max_width) || (!sc->synhw.capPalmDetect && *z <= max_pressure) || (sc->synhw.capPen && w == 2))) { @@ -4192,7 +4203,8 @@ synaptics_sysctl_create_tree(struct psm_ * physical area reserved for scrolling or when * there's no multi finger support. */ - if (sc->synhw.verticalScroll || sc->synhw.capMultiFinger == 0) + if (sc->synhw.verticalScroll || (sc->synhw.capMultiFinger == 0 && + sc->synhw.capAdvancedGestures == 0)) sc->syninfo.two_finger_scroll = 0; else sc->syninfo.two_finger_scroll = 1; @@ -4494,6 +4506,43 @@ synaptics_sysctl_create_tree(struct psm_ } static int +synaptics_preferred_mode(struct psm_softc *sc) { + int mode_byte; + + mode_byte = 0xc0; + + /* request wmode where available */ + if (sc->synhw.capExtended) + mode_byte |= 1; + + /* + * Disable gesture processing when native packets are requested. This + * enables sending of encapsulated "extended W mode" packets. + */ + if (sc->mode.level == PSM_LEVEL_NATIVE) + mode_byte |= (1 << 2); + + return mode_byte; +} + +static void +synaptics_set_mode(struct psm_softc *sc, int mode_byte) { + mouse_ext_command(sc->kbdc, mode_byte); + + /* "Commit" the Set Mode Byte command sent above. */ + set_mouse_sampling_rate(sc->kbdc, 20); + + /* + * Enable advanced gestures mode if supported and we are not entering + * passthrough mode. + */ + if (sc->synhw.capAdvancedGestures && !(mode_byte & (1 << 5))) { + mouse_ext_command(sc->kbdc, 3); + set_mouse_sampling_rate(sc->kbdc, 0xc8); + } +} + +static int enable_synaptics(KBDC kbdc, struct psm_softc *sc) { synapticshw_t synhw; @@ -4576,7 +4625,7 @@ enable_synaptics(KBDC kbdc, struct psm_s buttons = 0; synhw.capExtended = (status[0] & 0x80) != 0; if (synhw.capExtended) { - synhw.nExtendedQueries = (status[0] & 0x70) != 0; + synhw.nExtendedQueries = (status[0] & 0x70) >> 4; synhw.capMiddle = (status[0] & 0x04) != 0; synhw.capPassthrough = (status[2] & 0x80) != 0; synhw.capLowPower = (status[2] & 0x40) != 0; @@ -4588,6 +4637,16 @@ enable_synaptics(KBDC kbdc, struct psm_s synhw.capMultiFinger = (status[2] & 0x02) != 0; synhw.capPalmDetect = (status[2] & 0x01) != 0; + if (!set_mouse_scaling(kbdc, 1)) + return (FALSE); + if (mouse_ext_command(kbdc, 0x08) == 0) + return (FALSE); + if (get_mouse_status(kbdc, status, 0, 3) != 3) + return (FALSE); + + synhw.infoXupmm = status[0]; + synhw.infoYupmm = status[2]; + if (verbose >= 2) { printf(" Extended capabilities:\n"); printf(" capExtended: %d\n", synhw.capExtended); @@ -4603,6 +4662,8 @@ enable_synaptics(KBDC kbdc, struct psm_s printf(" capBallistics: %d\n", synhw.capBallistics); printf(" capMultiFinger: %d\n", synhw.capMultiFinger); printf(" capPalmDetect: %d\n", synhw.capPalmDetect); + printf(" infoXupmm: %d\n", synhw.infoXupmm); + printf(" infoYupmm: %d\n", synhw.infoYupmm); } /* @@ -4610,7 +4671,9 @@ enable_synaptics(KBDC kbdc, struct psm_s * supports this number of extended queries. We can load * more information about buttons using query 0x09. */ - if (synhw.capExtended && synhw.nExtendedQueries) { + if (synhw.nExtendedQueries >= 1) { + if (!set_mouse_scaling(kbdc, 1)) + return (FALSE); if (mouse_ext_command(kbdc, 0x09) == 0) return (FALSE); if (get_mouse_status(kbdc, status, 0, 3) != 3) @@ -4619,6 +4682,7 @@ enable_synaptics(KBDC kbdc, struct psm_s synhw.horizontalScroll = (status[0] & 0x02) != 0; synhw.verticalWheel = (status[0] & 0x08) != 0; synhw.nExtendedButtons = (status[1] & 0xf0) >> 4; + synhw.capEWmode = (status[0] & 0x04) != 0; if (verbose >= 2) { printf(" Extended model ID:\n"); printf(" verticalScroll: %d\n", @@ -4629,6 +4693,8 @@ enable_synaptics(KBDC kbdc, struct psm_s synhw.verticalWheel); printf(" nExtendedButtons: %d\n", synhw.nExtendedButtons); + printf(" capEWmode: %d\n", + synhw.capEWmode); } /* * Add the number of extended buttons to the total @@ -4642,7 +4708,97 @@ enable_synaptics(KBDC kbdc, struct psm_s * add a fourth button to the total button count. */ buttons = synhw.capFourButtons ? 1 : 0; + + /* Read the continued capabilities bits. */ + if (synhw.nExtendedQueries >= 4) { + if (!set_mouse_scaling(kbdc, 1)) + return (FALSE); + if (mouse_ext_command(kbdc, 0x0c) == 0) + return (FALSE); + if (get_mouse_status(kbdc, status, 0, 3) != 3) + return (FALSE); + + synhw.capClickPad = (status[1] & 0x01) << 1; + synhw.capClickPad |= (status[0] & 0x10) != 0; + synhw.capDeluxeLEDs = (status[1] & 0x02) != 0; + synhw.noAbsoluteFilter = (status[1] & 0x04) != 0; + synhw.capReportsV = (status[1] & 0x08) != 0; + synhw.capUniformClickPad = (status[1] & 0x10) != 0; + synhw.capReportsMin = (status[1] & 0x20) != 0; + synhw.capInterTouch = (status[1] & 0x40) != 0; + synhw.capReportsMax = (status[0] & 0x02) != 0; + synhw.capClearPad = (status[0] & 0x04) != 0; + synhw.capAdvancedGestures = (status[0] & 0x08) != 0; + synhw.capCoveredPad = (status[0] & 0x80) != 0; + + if (synhw.capReportsMax) { + if (!set_mouse_scaling(kbdc, 1)) + return (FALSE); + if (mouse_ext_command(kbdc, 0x0d) == 0) + return (FALSE); + if (get_mouse_status(kbdc, status, 0, 3) != 3) + return (FALSE); + + synhw.maximumXCoord = (status[0] << 5) | + ((status[1] & 0x0f) << 1); + synhw.maximumYCoord = (status[2] << 5) | + ((status[1] & 0xf0) >> 3); + } + if (synhw.capReportsMin) { + if (!set_mouse_scaling(kbdc, 1)) + return (FALSE); + if (mouse_ext_command(kbdc, 0x0f) == 0) + return (FALSE); + if (get_mouse_status(kbdc, status, 0, 3) != 3) + return (FALSE); + + synhw.minimumXCoord = (status[0] << 5) | + ((status[1] & 0x0f) << 1); + synhw.minimumYCoord = (status[2] << 5) | + ((status[1] & 0xf0) >> 3); + } + + if (verbose >= 2) { + printf(" Continued capabilities:\n"); + printf(" capClickPad: %d\n", + synhw.capClickPad); + printf(" capDeluxeLEDs: %d\n", + synhw.capDeluxeLEDs); + printf(" noAbsoluteFilter: %d\n", + synhw.noAbsoluteFilter); + printf(" capReportsV: %d\n", + synhw.capReportsV); + printf(" capUniformClickPad: %d\n", + synhw.capUniformClickPad); + printf(" capReportsMin: %d\n", + synhw.capReportsMin); + printf(" capInterTouch: %d\n", + synhw.capInterTouch); + printf(" capReportsMax: %d\n", + synhw.capReportsMax); + printf(" capClearPad: %d\n", + synhw.capClearPad); + printf(" capAdvancedGestures: %d\n", + synhw.capAdvancedGestures); + printf(" capCoveredPad: %d\n", + synhw.capCoveredPad); + if (synhw.capReportsMax) { + printf(" maximumXCoord: %d\n", + synhw.maximumXCoord); + printf(" maximumYCoord: %d\n", + synhw.maximumYCoord); + } + if (synhw.capReportsMin) { + printf(" minimumXCoord: %d\n", + synhw.minimumXCoord); + printf(" minimumYCoord: %d\n", + synhw.minimumYCoord); + } + } + buttons += synhw.capClickPad; + } } + if (verbose >= 2) { if (synhw.capExtended) printf(" Additional Buttons: %d\n", buttons); @@ -4650,42 +4806,6 @@ enable_synaptics(KBDC kbdc, struct psm_s printf(" No extended capabilities\n"); } - /* Read the continued capabilities bits. */ - if (mouse_ext_command(kbdc, 0xc) != 0 && - get_mouse_status(kbdc, status, 0, 3) == 3) { - synhw.capClickPad = (status[1] & 0x01) << 1; - synhw.capClickPad |= (status[0] & 0x10) != 0; - synhw.capDeluxeLEDs = (status[1] & 0x02) != 0; - synhw.noAbsoluteFilter = (status[1] & 0x04) != 0; - synhw.capReportsV = (status[1] & 0x08) != 0; - synhw.capUniformClickPad = (status[1] & 0x10) != 0; - synhw.capReportsMin = (status[1] & 0x20) != 0; - synhw.capInterTouch = (status[1] & 0x40) != 0; - synhw.capReportsMax = (status[2] & 0x02) != 0; - synhw.capClearPad = (status[2] & 0x04) != 0; - synhw.capAdvancedGestures = (status[2] & 0x08) != 0; - synhw.capCoveredPad = (status[2] & 0x80) != 0; - - if (verbose >= 2) { - printf(" Continued capabilities:\n"); - printf(" capClickPad: %d\n", synhw.capClickPad); - printf(" capDeluxeLEDs: %d\n", synhw.capDeluxeLEDs); - printf(" noAbsoluteFilter: %d\n", - synhw.noAbsoluteFilter); - printf(" capReportsV: %d\n", synhw.capReportsV); - printf(" capUniformClickPad: %d\n", - synhw.capUniformClickPad); - printf(" capReportsMin: %d\n", synhw.capReportsMin); - printf(" capInterTouch: %d\n", synhw.capInterTouch); - printf(" capReportsMax: %d\n", synhw.capReportsMax); - printf(" capClearPad: %d\n", synhw.capClearPad); - printf(" capAdvancedGestures: %d\n", - synhw.capAdvancedGestures); - printf(" capCoveredPad: %d\n", synhw.capCoveredPad); - } - buttons += synhw.capClickPad; - } - /* * Add the default number of 3 buttons to the total * count of supported buttons reported above. @@ -4713,15 +4833,10 @@ enable_synaptics(KBDC kbdc, struct psm_s if (!synaptics_support) return (FALSE); - /* Set the mode byte; request wmode where available. */ - mouse_ext_command(kbdc, synhw.capExtended ? 0xc1 : 0xc0); - - /* "Commit" the Set Mode Byte command sent above. */ - set_mouse_sampling_rate(kbdc, 20); - VLOG(3, (LOG_DEBUG, "synaptics: END init (%d buttons)\n", buttons)); if (sc != NULL) { + synaptics_set_mode(sc, synaptics_preferred_mode(sc)); if (trackpoint_support && synhw.capPassthrough) { synaptics_passthrough_on(sc); enable_trackpoint(kbdc, sc); @@ -4738,30 +4853,17 @@ enable_synaptics(KBDC kbdc, struct psm_s static void synaptics_passthrough_on(struct psm_softc *sc) { - int mode_byte; - - mode_byte = 0xc1 | (1 << 5); - VLOG(2, (LOG_NOTICE, "psm: setting pass-through mode. %d\n", - mode_byte)); - mouse_ext_command(sc->kbdc, mode_byte); - - /* "Commit" the Set Mode Byte command sent above. */ - set_mouse_sampling_rate(sc->kbdc, 20); + VLOG(2, (LOG_NOTICE, "psm: setting pass-through mode.\n")); + synaptics_set_mode(sc, synaptics_preferred_mode(sc) | (1 << 5)); } static void synaptics_passthrough_off(struct psm_softc *sc) { - int mode_byte; - - mode_byte = 0xc1; VLOG(2, (LOG_NOTICE, "psm: turning pass-through mode off.\n")); set_mouse_scaling(sc->kbdc, 2); set_mouse_scaling(sc->kbdc, 1); - mouse_ext_command(sc->kbdc, mode_byte); - - /* "Commit" the Set Mode Byte command sent above. */ - set_mouse_sampling_rate(sc->kbdc, 20); + synaptics_set_mode(sc, synaptics_preferred_mode(sc)); } /* IBM/Lenovo TrackPoint */ Modified: head/sys/sys/mouse.h ============================================================================== --- head/sys/sys/mouse.h Sun May 10 20:02:26 2015 (r282733) +++ head/sys/sys/mouse.h Sun May 10 20:36:57 2015 (r282734) @@ -128,6 +128,13 @@ typedef struct synapticshw { int verticalScroll; int horizontalScroll; int verticalWheel; + int capEWmode; + int minimumXCoord; + int minimumYCoord; + int maximumXCoord; + int maximumYCoord; + int infoXupmm; + int infoYupmm; } synapticshw_t; /* iftype */ From owner-svn-src-all@FreeBSD.ORG Sun May 10 20:38:12 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A2BB63B9; Sun, 10 May 2015 20:38:12 +0000 (UTC) Received: from st11p00im-asmtp003.me.com (st11p00im-asmtp003.me.com [17.172.80.97]) (using TLSv1.2 with cipher DHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 79D211806; Sun, 10 May 2015 20:38:12 +0000 (UTC) Received: from akita.localnet (c-73-162-13-215.hsd1.ca.comcast.net [73.162.13.215]) by st11p00im-asmtp003.me.com (Oracle Communications Messaging Server 7.0.5.35.0 64bit (built Dec 4 2014)) with ESMTPSA id <0NO500M2QINLVK00@st11p00im-asmtp003.me.com>; Sun, 10 May 2015 20:38:11 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.14.151,1.0.33,0.0.0000 definitions=2015-05-10_03:2015-05-09,2015-05-10,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=2 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1412110000 definitions=main-1505100283 From: Rui Paulo To: Ian Lepore Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r282728 - head/sys/boot/efi/loader/arch/i386 Date: Sun, 10 May 2015 13:38:09 -0700 Message-id: <1681536.tQ00bholm1@akita> User-Agent: KMail/4.14.3 (FreeBSD/11.0-CURRENT; KDE/4.14.3; amd64; ; ) In-reply-to: <201505101330.t4ADUMrm033123@svn.freebsd.org> References: <201505101330.t4ADUMrm033123@svn.freebsd.org> 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.20 Precedence: list List-Id: "SVN commit messages 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, 10 May 2015 20:38:12 -0000 On Sunday 10 May 2015 13:30:22 Ian Lepore wrote: > Author: ian > Date: Sun May 10 13:30:21 2015 > New Revision: 282728 > URL: https://svnweb.freebsd.org/changeset/base/282728 > > Log: > Don't check the return value from self_reloc(), it can't fail and doesn't > return a value. > > Despite what I said in my prior commit, it turns out this one platform > was checking the return value from the old self-reloc code (which returned > a hard-coded 0). Mea culpa. :-) -- Rui Paulo From owner-svn-src-all@FreeBSD.ORG Sun May 10 21:05:32 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E6860D3A; Sun, 10 May 2015 21:05:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D4F1B1C23; Sun, 10 May 2015 21:05:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4AL5Wk8066894; Sun, 10 May 2015 21:05:32 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4AL5Wk0066893; Sun, 10 May 2015 21:05:32 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201505102105.t4AL5Wk0066893@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 10 May 2015 21:05:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282735 - head/sys/net80211 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.20 Precedence: list List-Id: "SVN commit messages 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, 10 May 2015 21:05:33 -0000 Author: adrian Date: Sun May 10 21:05:32 2015 New Revision: 282735 URL: https://svnweb.freebsd.org/changeset/base/282735 Log: Fix typo introduced in previous commit. PR: kern/199632 Submitted by: Andriy Voskoboinyk Modified: head/sys/net80211/ieee80211_adhoc.c Modified: head/sys/net80211/ieee80211_adhoc.c ============================================================================== --- head/sys/net80211/ieee80211_adhoc.c Sun May 10 20:36:57 2015 (r282734) +++ head/sys/net80211/ieee80211_adhoc.c Sun May 10 21:05:32 2015 (r282735) @@ -373,7 +373,7 @@ adhoc_input(struct ieee80211_node *ni, s */ if (!(type == IEEE80211_FC0_TYPE_MGT && (subtype == IEEE80211_FC0_SUBTYPE_BEACON || - subtype == IEEE80211_FC0_SUBTYPE_PROBE_REQ)) && + subtype == IEEE80211_FC0_SUBTYPE_PROBE_RESP)) && !IEEE80211_ADDR_EQ(bssid, vap->iv_bss->ni_bssid) && !IEEE80211_ADDR_EQ(bssid, ifp->if_broadcastaddr)) { /* not interested in */ From owner-svn-src-all@FreeBSD.ORG Sun May 10 21:21:55 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7ABA51F0; Sun, 10 May 2015 21:21:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5C8741DF2; Sun, 10 May 2015 21:21:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4ALLtkH076671; Sun, 10 May 2015 21:21:55 GMT (envelope-from thomas@FreeBSD.org) Received: (from thomas@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4ALLr3A076661; Sun, 10 May 2015 21:21:53 GMT (envelope-from thomas@FreeBSD.org) Message-Id: <201505102121.t4ALLr3A076661@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: thomas set sender to thomas@FreeBSD.org using -f From: Thomas Quinot Date: Sun, 10 May 2015 21:21:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282736 - in head: . lib/libmd 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.20 Precedence: list List-Id: "SVN commit messages 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, 10 May 2015 21:21:55 -0000 Author: thomas Date: Sun May 10 21:21:52 2015 New Revision: 282736 URL: https://svnweb.freebsd.org/changeset/base/282736 Log: Unbreak build following rev. 282726 (Makefile.inc1): add dependency of xinstall on libmd to avoid failure of parallel bootstrap. (lib/libmd/*.h): do not redefine symbols if already defined as macros (libcrypt uses the same sources internally, redefining symbols with a prefix of its own). Fixes build failures caused by previous change to libmd. Reported by: ian Pointy hat to: thomas Modified: head/Makefile.inc1 head/lib/libmd/md4.h head/lib/libmd/md5.h head/lib/libmd/ripemd.h head/lib/libmd/sha.h head/lib/libmd/sha256.h head/lib/libmd/sha512.h Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Sun May 10 21:05:32 2015 (r282735) +++ head/Makefile.inc1 Sun May 10 21:21:52 2015 (r282736) @@ -1361,6 +1361,9 @@ _kerberos5_bootstrap_tools= \ .ORDER: ${_kerberos5_bootstrap_tools:C/^/${_bt}-/g} .endif +# Rebuild up-to-date libmd for xinstall +${_bt}-usr.bin/xinstall: ${_bt}-lib/libmd + bootstrap-tools: .PHONY # Please document (add comment) why something is in 'bootstrap-tools'. Modified: head/lib/libmd/md4.h ============================================================================== --- head/lib/libmd/md4.h Sun May 10 21:05:32 2015 (r282735) +++ head/lib/libmd/md4.h Sun May 10 21:21:52 2015 (r282736) @@ -38,14 +38,30 @@ __BEGIN_DECLS /* Ensure libmd symbols do not clash with libcrypto */ +#ifndef MD4Init #define MD4Init _libmd_MD4Init +#endif +#ifndef MD4Update #define MD4Update _libmd_MD4Update +#endif +#ifndef MD4Pad #define MD4Pad _libmd_MD4Pad +#endif +#ifndef MD4Final #define MD4Final _libmd_MD4Final +#endif +#ifndef MD4End #define MD4End _libmd_MD4End +#endif +#ifndef MD4File #define MD4File _libmd_MD4File +#endif +#ifndef MD4FileChunk #define MD4FileChunk _libmd_MD4FileChunk +#endif +#ifndef MD4Data #define MD4Data _libmd_MD4Data +#endif void MD4Init(MD4_CTX *); void MD4Update(MD4_CTX *, const void *, unsigned int); Modified: head/lib/libmd/md5.h ============================================================================== --- head/lib/libmd/md5.h Sun May 10 21:05:32 2015 (r282735) +++ head/lib/libmd/md5.h Sun May 10 21:21:52 2015 (r282736) @@ -7,15 +7,33 @@ /* Ensure libmd symbols do not clash with libcrypto */ +#ifndef MD5Init #define MD5Init _libmd_MD5Init +#endif +#ifndef MD5Update #define MD5Update _libmd_MD5Update +#endif +#ifndef MD5Pad #define MD5Pad _libmd_MD5Pad +#endif +#ifndef MD5Final #define MD5Final _libmd_MD5Final +#endif +#ifndef MD5Transform #define MD5Transform _libmd_MD5Transform +#endif +#ifndef MD5End #define MD5End _libmd_MD5End +#endif +#ifndef MD5File #define MD5File _libmd_MD5File +#endif +#ifndef MD5FileChunk #define MD5FileChunk _libmd_MD5FileChunk +#endif +#ifndef MD5Data #define MD5Data _libmd_MD5Data +#endif #endif Modified: head/lib/libmd/ripemd.h ============================================================================== --- head/lib/libmd/ripemd.h Sun May 10 21:05:32 2015 (r282735) +++ head/lib/libmd/ripemd.h Sun May 10 21:21:52 2015 (r282736) @@ -84,17 +84,37 @@ __BEGIN_DECLS /* Ensure libmd symbols do not clash with libcrypto */ +#ifndef RIPEMD160_Init #define RIPEMD160_Init _libmd_RIPEMD160_Init +#endif +#ifndef RIPEMD160_Update #define RIPEMD160_Update _libmd_RIPEMD160_Update +#endif +#ifndef RIPEMD160_Final #define RIPEMD160_Final _libmd_RIPEMD160_Final +#endif +#ifndef RIPEMD160_End #define RIPEMD160_End _libmd_RIPEMD160_End +#endif +#ifndef RIPEMD160_File #define RIPEMD160_File _libmd_RIPEMD160_File +#endif +#ifndef RIPEMD160_FileChunk #define RIPEMD160_FileChunk _libmd_RIPEMD160_FileChunk +#endif +#ifndef RIPEMD160_Data #define RIPEMD160_Data _libmd_RIPEMD160_Data +#endif +#ifndef RIPEMD160_Transform #define RIPEMD160_Transform _libmd_RIPEMD160_Transform +#endif +#ifndef RMD160_version #define RMD160_version _libmd_RMD160_version +#endif +#ifndef ripemd160_block #define ripemd160_block _libmd_ripemd160_block +#endif void RIPEMD160_Init(RIPEMD160_CTX *c); void RIPEMD160_Update(RIPEMD160_CTX *c, const void *data, Modified: head/lib/libmd/sha.h ============================================================================== --- head/lib/libmd/sha.h Sun May 10 21:05:32 2015 (r282735) +++ head/lib/libmd/sha.h Sun May 10 21:21:52 2015 (r282736) @@ -82,29 +82,69 @@ __BEGIN_DECLS /* Ensure libmd symbols do not clash with libcrypto */ +#ifndef SHA_Init #define SHA_Init _libmd_SHA_Init +#endif +#ifndef SHA_Update #define SHA_Update _libmd_SHA_Update +#endif +#ifndef SHA_Final #define SHA_Final _libmd_SHA_Final +#endif +#ifndef SHA_End #define SHA_End _libmd_SHA_End +#endif +#ifndef SHA_File #define SHA_File _libmd_SHA_File +#endif +#ifndef SHA_FileChunk #define SHA_FileChunk _libmd_SHA_FileChunk +#endif +#ifndef SHA_Data #define SHA_Data _libmd_SHA_Data +#endif +#ifndef SHA_Transform #define SHA_Transform _libmd_SHA_Transform +#endif +#ifndef SHA_version #define SHA_version _libmd_SHA_version +#endif +#ifndef sha_block #define sha_block _libmd_sha_block +#endif +#ifndef SHA1_Init #define SHA1_Init _libmd_SHA1_Init +#endif +#ifndef SHA1_Update #define SHA1_Update _libmd_SHA1_Update +#endif +#ifndef SHA1_Final #define SHA1_Final _libmd_SHA1_Final +#endif +#ifndef SHA1_End #define SHA1_End _libmd_SHA1_End +#endif +#ifndef SHA1_File #define SHA1_File _libmd_SHA1_File +#endif +#ifndef SHA1_FileChunk #define SHA1_FileChunk _libmd_SHA1_FileChunk +#endif +#ifndef SHA1_Data #define SHA1_Data _libmd_SHA1_Data +#endif +#ifndef SHA1_Transform #define SHA1_Transform _libmd_SHA1_Transform +#endif +#ifndef SHA1_version #define SHA1_version _libmd_SHA1_version +#endif +#ifndef sha1_block #define sha1_block _libmd_sha1_block +#endif void SHA_Init(SHA_CTX *c); void SHA_Update(SHA_CTX *c, const void *data, size_t len); Modified: head/lib/libmd/sha256.h ============================================================================== --- head/lib/libmd/sha256.h Sun May 10 21:05:32 2015 (r282735) +++ head/lib/libmd/sha256.h Sun May 10 21:21:52 2015 (r282736) @@ -41,16 +41,34 @@ __BEGIN_DECLS /* Ensure libmd symbols do not clash with libcrypto */ +#ifndef SHA256_Init #define SHA256_Init _libmd_SHA256_Init +#endif +#ifndef SHA256_Update #define SHA256_Update _libmd_SHA256_Update +#endif +#ifndef SHA256_Final #define SHA256_Final _libmd_SHA256_Final +#endif +#ifndef SHA256_End #define SHA256_End _libmd_SHA256_End +#endif +#ifndef SHA256_File #define SHA256_File _libmd_SHA256_File +#endif +#ifndef SHA256_FileChunk #define SHA256_FileChunk _libmd_SHA256_FileChunk +#endif +#ifndef SHA256_Data #define SHA256_Data _libmd_SHA256_Data +#endif +#ifndef SHA256_Transform #define SHA256_Transform _libmd_SHA256_Transform +#endif +#ifndef SHA256_version #define SHA256_version _libmd_SHA256_version +#endif void SHA256_Init(SHA256_CTX *); void SHA256_Update(SHA256_CTX *, const void *, size_t); Modified: head/lib/libmd/sha512.h ============================================================================== --- head/lib/libmd/sha512.h Sun May 10 21:05:32 2015 (r282735) +++ head/lib/libmd/sha512.h Sun May 10 21:21:52 2015 (r282736) @@ -41,16 +41,34 @@ __BEGIN_DECLS /* Ensure libmd symbols do not clash with libcrypto */ +#ifndef SHA512_Init #define SHA512_Init _libmd_SHA512_Init +#endif +#ifndef SHA512_Update #define SHA512_Update _libmd_SHA512_Update +#endif +#ifndef SHA512_Final #define SHA512_Final _libmd_SHA512_Final +#endif +#ifndef SHA512_End #define SHA512_End _libmd_SHA512_End +#endif +#ifndef SHA512_File #define SHA512_File _libmd_SHA512_File +#endif +#ifndef SHA512_FileChunk #define SHA512_FileChunk _libmd_SHA512_FileChunk +#endif +#ifndef SHA512_Data #define SHA512_Data _libmd_SHA512_Data +#endif +#ifndef SHA512_Transform #define SHA512_Transform _libmd_SHA512_Transform +#endif +#ifndef SHA512_version #define SHA512_version _libmd_SHA512_version +#endif void SHA512_Init(SHA512_CTX *); void SHA512_Update(SHA512_CTX *, const void *, size_t); From owner-svn-src-all@FreeBSD.ORG Sun May 10 21:26:08 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 78509443; Sun, 10 May 2015 21:26:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 66D001E12; Sun, 10 May 2015 21:26:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4ALQ8T6077372; Sun, 10 May 2015 21:26:08 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4ALQ84W077371; Sun, 10 May 2015 21:26:08 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201505102126.t4ALQ84W077371@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sun, 10 May 2015 21:26:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r282738 - stable/10/usr.bin/hexdump 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.20 Precedence: list List-Id: "SVN commit messages 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, 10 May 2015 21:26:08 -0000 Author: jilles Date: Sun May 10 21:26:07 2015 New Revision: 282738 URL: https://svnweb.freebsd.org/changeset/base/282738 Log: MFC r282041: hexdump: Don't use uninitialized struct stat. PR: 196194 Modified: stable/10/usr.bin/hexdump/display.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/hexdump/display.c ============================================================================== --- stable/10/usr.bin/hexdump/display.c Sun May 10 21:24:55 2015 (r282737) +++ stable/10/usr.bin/hexdump/display.c Sun May 10 21:26:07 2015 (r282738) @@ -380,7 +380,7 @@ doskip(const char *fname, int statok) return; } } - if (S_ISREG(sb.st_mode)) { + if (statok && S_ISREG(sb.st_mode)) { if (fseeko(stdin, skip, SEEK_SET)) err(1, "%s", fname); address += skip; From owner-svn-src-all@FreeBSD.ORG Sun May 10 21:32:34 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EE00A5D8 for ; Sun, 10 May 2015 21:32:33 +0000 (UTC) Received: from mail-ig0-f176.google.com (mail-ig0-f176.google.com [209.85.213.176]) (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 BE3411ED0 for ; Sun, 10 May 2015 21:32:33 +0000 (UTC) Received: by igbyr2 with SMTP id yr2so56098680igb.0 for ; Sun, 10 May 2015 14:32:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=4S5P2omIefr8uyl8TknuZRKfdEs2PVH5kAm0XpkuFaI=; b=VZsrRzKToZfYZbL/2fzPzcTJ6Anmgd+Orj1Qe9BU2/dy0YKoOLeqAFgsFzgR63i/AA XNDn/KTxrpglBcYCFMGHbY70trhN4jwtWWTcNnold/xQ/tDnBZftz3oXXApgVTFoScQZ xIEkofWwgfhX/wEHnO2jenviZlYaCe3EQML8MgV9w4s0Bru+zyXDXGE6Pb8X5oZgVqBX aXAmx8pIt3eTIHuQ+nkJ0NezI9k1JfX3Kq80RBeVrw0RXT8kgv5lyQ1zDVkcTkkK0IRM jm1kL0qMT6Inme5p8+B2jGZeBKW89JASlJc+pH69jMAHx6iB9g+03gmbd5KNFw3BB315 ZGBg== X-Gm-Message-State: ALoCoQnE0WeKcgRNZYeWdda012a6DpRRrEBi2KTvLgRIQC964SADBb1QjaAdaQ1ubqjLemoSgHnP MIME-Version: 1.0 X-Received: by 10.107.165.206 with SMTP id o197mr9313020ioe.56.1431293547393; Sun, 10 May 2015 14:32:27 -0700 (PDT) Received: by 10.79.11.6 with HTTP; Sun, 10 May 2015 14:32:27 -0700 (PDT) In-Reply-To: References: <201505082336.t48NaWRS080408@svn.freebsd.org> Date: Sun, 10 May 2015 23:32:27 +0200 Message-ID: Subject: Re: svn commit: r282672 - head/etc/rc.d From: Oliver Pinter To: John Baldwin Cc: Xin LI , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 10 May 2015 21:32:34 -0000 On Sun, May 10, 2015 at 9:45 PM, John Baldwin wrote: > >> On May 8, 2015, at 19:36, Xin LI wrote: >> >> Author: delphij >> Date: Fri May 8 23:36:31 2015 >> New Revision: 282672 >> URL: https://svnweb.freebsd.org/changeset/base/282672 >> >> Log: >> Always convert uuid to lower case. >> >> MFC after: 2 weeks >> >> Modified: >> head/etc/rc.d/hostid >> >> Modified: head/etc/rc.d/hostid >> ============================================================================== >> --- head/etc/rc.d/hostid Fri May 8 23:29:42 2015 (r282671) >> +++ head/etc/rc.d/hostid Fri May 8 23:36:31 2015 (r282672) >> @@ -58,7 +58,7 @@ hostid_set() >> >> valid_hostid() >> { >> - uuid=$1 >> + uuid=$(echo $1 | tr '[:upper:]' '[:lower:]') > > tr is in /usr/bin so this breaks systems with a separate /usr. Perhaps you could use dd with conv=lcase instead? Then these are affected too:: root@robot rc.d# grep -r -E '(awk| tr )' * ftp-proxy: ps_pid=`ps ax -o pid= -o command= | grep $cmd_string | grep -e "$flag_string" | grep -v grep | awk '{ print $1 }'` growfs: rootdev=$(df / | tail -n 1 | awk '{ sub("/dev/", "", $1); print $1 }') growfs: rawdev=$(glabel status | awk '$1 == "'"$rootdev"'" { print $3 }') growfs: sysctl -b kern.geom.conftxt | awk ' jail: _j=$(echo $_j | tr /. _) jail: _j=$(echo $1 | tr /. _) jail: _j=$(echo $_j | tr /. _) jail: _j=$(echo $_j | tr /. _) jail: _j=$(echo $_j | tr /. _) motd: awk '{if (NR == 1) {if ($1 == "FreeBSD") {next} else {print "\n"$0}} else {print}}' < /etc/motd >> ${T} ntpdate: ntpdate_hosts=`awk ' power_profile: awk '{ split($0, a, "[/ ]"); print a[1] }' -) 2> /dev/null`" power_profile: awk '{ split($0, a, "[/ ]"); print a[length(a) - 1] }' -) 2> /dev/null`" sshd: local ALG="$(echo $alg | tr a-z A-Z)" syscons: for i in `kldstat | awk '$5 ~ "_saver\.ko$" { print $5 }'`; do syslogd: for _s in `cat $sockfile | tr '\n' ' '` ; do virecover: recfile=`awk '/^X-vi-recover-path:/{print $2}' < "${i}"` The awk is located in /usr/bin/awk too, and for e.g. the growfs should running in the very first steps... > > > -- > John Baldwin > _______________________________________________ > svn-src-head@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" From owner-svn-src-all@FreeBSD.ORG Sun May 10 21:39:25 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 61930776; Sun, 10 May 2015 21:39:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 35E161F04; Sun, 10 May 2015 21:39:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4ALdPxB082745; Sun, 10 May 2015 21:39:25 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4ALdPXD082744; Sun, 10 May 2015 21:39:25 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201505102139.t4ALdPXD082744@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 10 May 2015 21:39:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282739 - head/cddl/contrib/opensolaris/common/ctf 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.20 Precedence: list List-Id: "SVN commit messages 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, 10 May 2015 21:39:25 -0000 Author: markj Date: Sun May 10 21:39:24 2015 New Revision: 282739 URL: https://svnweb.freebsd.org/changeset/base/282739 Log: ctf_add_type(): when looking up an integer or floating point type in the list of pending dynamic type definitions, a match on the type name is not sufficient - we need to compare the type encodings as well. For example, bitfields have their own distinct type definitions which share the name of the underlying integer type, and these types aren't generally interchangeable. This bug was causing the following libdtrace error when attempting to trace the th_flags member of a struct tcphdr: cg: bad field: off 104 type <32877> bits 539620016 Reported by: rwatson MFC after: 3 weeks Modified: head/cddl/contrib/opensolaris/common/ctf/ctf_create.c Modified: head/cddl/contrib/opensolaris/common/ctf/ctf_create.c ============================================================================== --- head/cddl/contrib/opensolaris/common/ctf/ctf_create.c Sun May 10 21:26:07 2015 (r282738) +++ head/cddl/contrib/opensolaris/common/ctf/ctf_create.c Sun May 10 21:39:24 2015 (r282739) @@ -1328,15 +1328,28 @@ ctf_add_type(ctf_file_t *dst_fp, ctf_fil * we are looking for. This is necessary to permit ctf_add_type() to * operate recursively on entities such as a struct that contains a * pointer member that refers to the same struct type. + * + * In the case of integer and floating point types, we match using the + * type encoding as well - else we may incorrectly return a bitfield + * type, for instance. */ if (dst_type == CTF_ERR && name[0] != '\0') { for (dtd = ctf_list_prev(&dst_fp->ctf_dtdefs); dtd != NULL && CTF_TYPE_TO_INDEX(dtd->dtd_type) > dst_fp->ctf_dtoldid; dtd = ctf_list_prev(dtd)) { - if (CTF_INFO_KIND(dtd->dtd_data.ctt_info) == kind && - dtd->dtd_name != NULL && - strcmp(dtd->dtd_name, name) == 0) - return (dtd->dtd_type); + if (CTF_INFO_KIND(dtd->dtd_data.ctt_info) != kind || + dtd->dtd_name == NULL || + strcmp(dtd->dtd_name, name) != 0) + continue; + if (kind == CTF_K_INTEGER || kind == CTF_K_FLOAT) { + if (ctf_type_encoding(src_fp, src_type, + &src_en) != 0) + continue; + if (bcmp(&src_en, &dtd->dtd_u.dtu_enc, + sizeof (ctf_encoding_t)) != 0) + continue; + } + return (dtd->dtd_type); } } From owner-svn-src-all@FreeBSD.ORG Sun May 10 22:04:04 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 28A80B06; Sun, 10 May 2015 22:04:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 14F3A11BE; Sun, 10 May 2015 22:04:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4AM44J3096840; Sun, 10 May 2015 22:04:04 GMT (envelope-from sjg@FreeBSD.org) Received: (from sjg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4AM40Gr096798; Sun, 10 May 2015 22:04:00 GMT (envelope-from sjg@FreeBSD.org) Message-Id: <201505102204.t4AM40Gr096798@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: sjg set sender to sjg@FreeBSD.org using -f From: "Simon J. Gerraty" Date: Sun, 10 May 2015 22:04:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282740 - in head: contrib/bmake contrib/bmake/mk contrib/bmake/unit-tests usr.bin/bmake usr.bin/bmake/unit-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.20 Precedence: list List-Id: "SVN commit messages 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, 10 May 2015 22:04:04 -0000 Author: sjg Date: Sun May 10 22:03:59 2015 New Revision: 282740 URL: https://svnweb.freebsd.org/changeset/base/282740 Log: Merge bmake-20150505 improve detection of malformed conditionals. Added: head/contrib/bmake/unit-tests/cond2.exp - copied unchanged from r282739, vendor/NetBSD/bmake/dist/unit-tests/cond2.exp head/contrib/bmake/unit-tests/cond2.mk - copied unchanged from r282739, vendor/NetBSD/bmake/dist/unit-tests/cond2.mk Modified: head/contrib/bmake/ChangeLog head/contrib/bmake/FILES head/contrib/bmake/Makefile head/contrib/bmake/cond.c head/contrib/bmake/machine.sh head/contrib/bmake/mk/ChangeLog head/contrib/bmake/mk/dirdeps.mk head/contrib/bmake/mk/install-mk head/contrib/bmake/nonints.h head/contrib/bmake/unit-tests/Makefile.in head/contrib/bmake/var.c head/usr.bin/bmake/Makefile head/usr.bin/bmake/unit-tests/Makefile Directory Properties: head/contrib/bmake/ (props changed) Modified: head/contrib/bmake/ChangeLog ============================================================================== --- head/contrib/bmake/ChangeLog Sun May 10 21:39:24 2015 (r282739) +++ head/contrib/bmake/ChangeLog Sun May 10 22:03:59 2015 (r282740) @@ -1,3 +1,16 @@ +2015-05-05 Simon J. Gerraty + + * Makefile (MAKE_VERSION): 20150505 + Merge with NetBSD make, pick up + o cond.c: be strict about lhs of comparison when evaluating .if + but less so when called from variable expansion. + o unit-tests/cond2.mk: test various error conditions + +2015-05-04 Simon J. Gerraty + + * machine.sh (MACHINE): Add Bitrig + patch from joerg@netbsd.org + 2015-04-18 Simon J. Gerraty * Makefile (MAKE_VERSION): 20150418 Modified: head/contrib/bmake/FILES ============================================================================== --- head/contrib/bmake/FILES Sun May 10 21:39:24 2015 (r282739) +++ head/contrib/bmake/FILES Sun May 10 22:03:59 2015 (r282740) @@ -96,6 +96,8 @@ unit-tests/comment.exp unit-tests/comment.mk unit-tests/cond1.exp unit-tests/cond1.mk +unit-tests/cond2.exp +unit-tests/cond2.mk unit-tests/doterror.exp unit-tests/doterror.mk unit-tests/dotwait.exp Modified: head/contrib/bmake/Makefile ============================================================================== --- head/contrib/bmake/Makefile Sun May 10 21:39:24 2015 (r282739) +++ head/contrib/bmake/Makefile Sun May 10 22:03:59 2015 (r282740) @@ -1,7 +1,7 @@ -# $Id: Makefile,v 1.36 2015/04/18 19:58:53 sjg Exp $ +# $Id: Makefile,v 1.38 2015/05/05 21:58:05 sjg Exp $ # Base version on src date -MAKE_VERSION= 20150418 +MAKE_VERSION= 20150505 PROG= bmake @@ -94,7 +94,7 @@ SUBDIR+= unit-tests # we skip a lot of this when building as part of FreeBSD etc. # list of OS's which are derrived from BSD4.4 -BSD44_LIST= NetBSD FreeBSD OpenBSD DragonFly +BSD44_LIST= NetBSD FreeBSD OpenBSD DragonFly MirBSD Bitrig # we are... OS!= uname -s # are we 4.4BSD ? Modified: head/contrib/bmake/cond.c ============================================================================== --- head/contrib/bmake/cond.c Sun May 10 21:39:24 2015 (r282739) +++ head/contrib/bmake/cond.c Sun May 10 22:03:59 2015 (r282740) @@ -1,4 +1,4 @@ -/* $NetBSD: cond.c,v 1.67 2012/11/03 13:59:27 christos Exp $ */ +/* $NetBSD: cond.c,v 1.68 2015/05/05 21:51:09 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -70,14 +70,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: cond.c,v 1.67 2012/11/03 13:59:27 christos Exp $"; +static char rcsid[] = "$NetBSD: cond.c,v 1.68 2015/05/05 21:51:09 sjg Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)cond.c 8.2 (Berkeley) 1/2/94"; #else -__RCSID("$NetBSD: cond.c,v 1.67 2012/11/03 13:59:27 christos Exp $"); +__RCSID("$NetBSD: cond.c,v 1.68 2015/05/05 21:51:09 sjg Exp $"); #endif #endif /* not lint */ #endif @@ -181,6 +181,15 @@ static Token condPushBack=TOK_NONE; /* static unsigned int cond_depth = 0; /* current .if nesting level */ static unsigned int cond_min_depth = 0; /* depth at makefile open */ +/* + * Indicate when we should be strict about lhs of comparisons. + * TRUE when Cond_EvalExpression is called from Cond_Eval (.if etc) + * FALSE when Cond_EvalExpression is called from var.c:ApplyModifiers + * since lhs is already expanded and we cannot tell if + * it was a variable reference or not. + */ +static Boolean lhsStrict; + static int istoken(const char *str, const char *tok, size_t len) { @@ -517,7 +526,7 @@ CondCvtArg(char *str, double *value) */ /* coverity:[+alloc : arg-*2] */ static char * -CondGetString(Boolean doEval, Boolean *quoted, void **freeIt) +CondGetString(Boolean doEval, Boolean *quoted, void **freeIt, Boolean strictLHS) { Buffer buf; char *cp; @@ -601,6 +610,16 @@ CondGetString(Boolean doEval, Boolean *q condExpr--; /* don't skip over next char */ break; default: + if (strictLHS && !qt && *start != '$' && + !isdigit((unsigned char) *start)) { + /* lhs must be quoted, a variable reference or number */ + if (*freeIt) { + free(*freeIt); + *freeIt = NULL; + } + str = NULL; + goto cleanup; + } Buf_AddByte(&buf, *condExpr); break; } @@ -648,7 +667,7 @@ compare_expression(Boolean doEval) * Parse the variable spec and skip over it, saving its * value in lhs. */ - lhs = CondGetString(doEval, &lhsQuoted, &lhsFree); + lhs = CondGetString(doEval, &lhsQuoted, &lhsFree, lhsStrict); if (!lhs) goto done; @@ -709,7 +728,7 @@ compare_expression(Boolean doEval) goto done; } - rhs = CondGetString(doEval, &rhsQuoted, &rhsFree); + rhs = CondGetString(doEval, &rhsQuoted, &rhsFree, FALSE); if (!rhs) goto done; @@ -1135,7 +1154,7 @@ CondE(Boolean doEval) *----------------------------------------------------------------------- */ int -Cond_EvalExpression(const struct If *info, char *line, Boolean *value, int eprint) +Cond_EvalExpression(const struct If *info, char *line, Boolean *value, int eprint, Boolean strictLHS) { static const struct If *dflt_info; const struct If *sv_if_info = if_info; @@ -1143,6 +1162,8 @@ Cond_EvalExpression(const struct If *inf Token sv_condPushBack = condPushBack; int rval; + lhsStrict = strictLHS; + while (*line == ' ' || *line == '\t') line++; @@ -1359,7 +1380,7 @@ Cond_Eval(char *line) } /* And evaluate the conditional expresssion */ - if (Cond_EvalExpression(ifp, line, &value, 1) == COND_INVALID) { + if (Cond_EvalExpression(ifp, line, &value, 1, TRUE) == COND_INVALID) { /* Syntax error in conditional, error message already output. */ /* Skip everything to matching .endif */ cond_state[cond_depth] = SKIP_TO_ELSE; Modified: head/contrib/bmake/machine.sh ============================================================================== --- head/contrib/bmake/machine.sh Sun May 10 21:39:24 2015 (r282739) +++ head/contrib/bmake/machine.sh Sun May 10 22:03:59 2015 (r282740) @@ -2,7 +2,7 @@ # derrived from /etc/rc_d/os.sh # RCSid: -# $Id: machine.sh,v 1.16 2010/10/17 00:05:51 sjg Exp $ +# $Id: machine.sh,v 1.17 2015/05/05 00:10:54 sjg Exp $ # # @(#) Copyright (c) 1994-2002 Simon J. Gerraty # @@ -49,6 +49,10 @@ OpenBSD) arch=`Which arch /usr/bin:/usr/ucb:$PATH` MACHINE_ARCH=`$arch -s`; ;; +Bitrig) + MACHINE=$OS$OSMAJOR.$machine + MACHINE_ARCH=`uname -m`; + ;; *BSD) MACHINE=$OS$OSMAJOR.$machine ;; Modified: head/contrib/bmake/mk/ChangeLog ============================================================================== --- head/contrib/bmake/mk/ChangeLog Sun May 10 21:39:24 2015 (r282739) +++ head/contrib/bmake/mk/ChangeLog Sun May 10 22:03:59 2015 (r282740) @@ -1,3 +1,9 @@ +2015-04-30 Simon J. Gerraty + + * install-mk (MK_VERSION): 20150430 + + * dirdeps.mk: fix _count_dirdeps for non-cache case. + 2015-04-16 Simon J. Gerraty * install-mk (MK_VERSION): 20150411 Modified: head/contrib/bmake/mk/dirdeps.mk ============================================================================== --- head/contrib/bmake/mk/dirdeps.mk Sun May 10 21:39:24 2015 (r282739) +++ head/contrib/bmake/mk/dirdeps.mk Sun May 10 22:03:59 2015 (r282740) @@ -1,4 +1,4 @@ -# $Id: dirdeps.mk,v 1.49 2015/03/11 21:39:28 sjg Exp $ +# $Id: dirdeps.mk,v 1.51 2015/05/06 06:07:30 sjg Exp $ # Copyright (c) 2010-2013, Juniper Networks, Inc. # All rights reserved. @@ -349,7 +349,7 @@ BUILD_DIRDEPS ?= yes .if !defined(NO_DIRDEPS) .if ${MK_DIRDEPS_CACHE} == "yes" # this is where we will cache all our work -DIRDEPS_CACHE?= ${_OBJDIR}/dirdeps.cache${.TARGETS:Nall:O:u:ts-:S,^,.,:N.} +DIRDEPS_CACHE?= ${_OBJDIR}/dirdeps.cache${.TARGETS:Nall:O:u:ts-:S,/,_,g:S,^,.,:N.} # just ensure this exists build-dirdeps: @@ -394,13 +394,14 @@ _count_dirdeps: .NOMETA @echo '.info $${.newline}$${TRACER}Makefiles read: total=${.MAKE.MAKEFILES:[#]} depend=${.MAKE.MAKEFILES:M*depend*:[#]} dirdeps=${.ALLTARGETS:M${SRCTOP}*:O:u:[#]}' >&3 .endif -.endif -.elif !target(_count_dirdeps) +.elif !make(dirdeps) && !target(_count_dirdeps) beforedirdeps: _count_dirdeps _count_dirdeps: .NOMETA @echo "${TRACER}Makefiles read: total=${.MAKE.MAKEFILES:[#]} depend=${.MAKE.MAKEFILES:M*depend*:[#]} dirdeps=${.ALLTARGETS:M${SRCTOP}*:O:u:[#]} seconds=`expr ${now_utc} - ${start_utc}`" .endif +.endif + .if ${BUILD_DIRDEPS} == "yes" .if ${DEBUG_DIRDEPS:@x@${DEP_RELDIR:M$x}${${DEP_RELDIR}.${DEP_MACHINE}:L:M$x}@} != "" _debug_reldir = 1 Modified: head/contrib/bmake/mk/install-mk ============================================================================== --- head/contrib/bmake/mk/install-mk Sun May 10 21:39:24 2015 (r282739) +++ head/contrib/bmake/mk/install-mk Sun May 10 22:03:59 2015 (r282740) @@ -55,7 +55,7 @@ # Simon J. Gerraty # RCSid: -# $Id: install-mk,v 1.109 2015/04/16 16:59:00 sjg Exp $ +# $Id: install-mk,v 1.110 2015/05/01 06:37:49 sjg Exp $ # # @(#) Copyright (c) 1994 Simon J. Gerraty # @@ -70,7 +70,7 @@ # sjg@crufty.net # -MK_VERSION=20150411 +MK_VERSION=20150430 OWNER= GROUP= MODE=444 Modified: head/contrib/bmake/nonints.h ============================================================================== --- head/contrib/bmake/nonints.h Sun May 10 21:39:24 2015 (r282739) +++ head/contrib/bmake/nonints.h Sun May 10 22:03:59 2015 (r282740) @@ -1,4 +1,4 @@ -/* $NetBSD: nonints.h,v 1.67 2014/09/07 20:55:34 joerg Exp $ */ +/* $NetBSD: nonints.h,v 1.68 2015/05/05 21:51:09 sjg Exp $ */ /*- * Copyright (c) 1988, 1989, 1990, 1993 @@ -91,7 +91,7 @@ int Compat_Make(void *, void *); /* cond.c */ struct If; -int Cond_EvalExpression(const struct If *, char *, Boolean *, int); +int Cond_EvalExpression(const struct If *, char *, Boolean *, int, Boolean); int Cond_Eval(char *); void Cond_restore_depth(unsigned int); unsigned int Cond_save_depth(void); Modified: head/contrib/bmake/unit-tests/Makefile.in ============================================================================== --- head/contrib/bmake/unit-tests/Makefile.in Sun May 10 21:39:24 2015 (r282739) +++ head/contrib/bmake/unit-tests/Makefile.in Sun May 10 22:03:59 2015 (r282740) @@ -1,6 +1,6 @@ -# $Id: Makefile.in,v 1.46 2014/11/06 01:47:57 sjg Exp $ +# $Id: Makefile.in,v 1.47 2015/05/05 21:58:06 sjg Exp $ # -# $NetBSD: Makefile,v 1.51 2014/10/20 23:21:11 sjg Exp $ +# $NetBSD: Makefile,v 1.52 2015/05/05 21:51:09 sjg Exp $ # # Unit tests for make(1) # The main targets are: @@ -27,6 +27,7 @@ UNIT_TESTS:= ${srcdir} TESTNAMES= \ comment \ cond1 \ + cond2 \ error \ export \ export-all \ Copied: head/contrib/bmake/unit-tests/cond2.exp (from r282739, vendor/NetBSD/bmake/dist/unit-tests/cond2.exp) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/bmake/unit-tests/cond2.exp Sun May 10 22:03:59 2015 (r282740, copy of r282739, vendor/NetBSD/bmake/dist/unit-tests/cond2.exp) @@ -0,0 +1,7 @@ +make: Bad conditional expression ` == "empty"' in == "empty"?oops:ok +make: "cond2.mk" line 13: Malformed conditional ({TEST_TYPO} == "Ok") +TEST_NOT_SET is empty or not defined +make: "cond2.mk" line 20: Malformed conditional (${TEST_NOT_SET} == "empty") +make: Fatal errors encountered -- cannot continue +make: stopped in unit-tests +exit status 1 Copied: head/contrib/bmake/unit-tests/cond2.mk (from r282739, vendor/NetBSD/bmake/dist/unit-tests/cond2.mk) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/bmake/unit-tests/cond2.mk Sun May 10 22:03:59 2015 (r282740, copy of r282739, vendor/NetBSD/bmake/dist/unit-tests/cond2.mk) @@ -0,0 +1,25 @@ +# $Id: cond2.mk,v 1.1.1.1 2015/05/05 21:53:13 sjg Exp $ + +TEST_UNAME_S= NetBSD + +# this should be ok +X:= ${${TEST_UNAME_S} == "NetBSD":?Ok:fail} +.if $X == "Ok" +Y= good +.endif +# expect: Bad conditional expression ` == "empty"' in == "empty"?oops:ok +X:= ${${TEST_NOT_SET} == "empty":?oops:ok} +# expect: Malformed conditional ({TEST_TYPO} == "Ok") +.if {TEST_TYPO} == "Ok" +Y= oops +.endif +.if empty(TEST_NOT_SET) +Y!= echo TEST_NOT_SET is empty or not defined >&2; echo +.endif +# expect: Malformed conditional (${TEST_NOT_SET} == "empty") +.if ${TEST_NOT_SET} == "empty" +Y= oops +.endif + +all: + @echo $@ Modified: head/contrib/bmake/var.c ============================================================================== --- head/contrib/bmake/var.c Sun May 10 21:39:24 2015 (r282739) +++ head/contrib/bmake/var.c Sun May 10 22:03:59 2015 (r282740) @@ -1,4 +1,4 @@ -/* $NetBSD: var.c,v 1.191 2014/09/14 02:32:51 dholland Exp $ */ +/* $NetBSD: var.c,v 1.192 2015/05/05 21:51:09 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,14 +69,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: var.c,v 1.191 2014/09/14 02:32:51 dholland Exp $"; +static char rcsid[] = "$NetBSD: var.c,v 1.192 2015/05/05 21:51:09 sjg Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)var.c 8.3 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: var.c,v 1.191 2014/09/14 02:32:51 dholland Exp $"); +__RCSID("$NetBSD: var.c,v 1.192 2015/05/05 21:51:09 sjg Exp $"); #endif #endif /* not lint */ #endif @@ -3261,7 +3261,7 @@ ApplyModifiers(char *nstr, const char *t termc = *--cp; delim = '\0'; - if (Cond_EvalExpression(NULL, v->name, &value, 0) + if (Cond_EvalExpression(NULL, v->name, &value, 0, FALSE) == COND_INVALID) { Error("Bad conditional expression `%s' in %s?%s:%s", v->name, v->name, pattern.lhs, pattern.rhs); Modified: head/usr.bin/bmake/Makefile ============================================================================== --- head/usr.bin/bmake/Makefile Sun May 10 21:39:24 2015 (r282739) +++ head/usr.bin/bmake/Makefile Sun May 10 22:03:59 2015 (r282740) @@ -14,10 +14,10 @@ CFLAGS+= -I${.CURDIR} CLEANDIRS+= FreeBSD CLEANFILES+= bootstrap -# $Id: Makefile,v 1.36 2015/04/18 19:58:53 sjg Exp $ +# $Id: Makefile,v 1.38 2015/05/05 21:58:05 sjg Exp $ # Base version on src date -MAKE_VERSION= 20150418 +MAKE_VERSION= 20150505 PROG?= ${.CURDIR:T} Modified: head/usr.bin/bmake/unit-tests/Makefile ============================================================================== --- head/usr.bin/bmake/unit-tests/Makefile Sun May 10 21:39:24 2015 (r282739) +++ head/usr.bin/bmake/unit-tests/Makefile Sun May 10 22:03:59 2015 (r282740) @@ -5,9 +5,9 @@ SRCTOP?= ${.CURDIR:H:H:H} -# $Id: Makefile.in,v 1.46 2014/11/06 01:47:57 sjg Exp $ +# $Id: Makefile.in,v 1.47 2015/05/05 21:58:06 sjg Exp $ # -# $NetBSD: Makefile,v 1.51 2014/10/20 23:21:11 sjg Exp $ +# $NetBSD: Makefile,v 1.52 2015/05/05 21:51:09 sjg Exp $ # # Unit tests for make(1) # The main targets are: @@ -34,6 +34,7 @@ UNIT_TESTS:= ${srcdir} TESTNAMES= \ comment \ cond1 \ + cond2 \ error \ export \ export-all \ From owner-svn-src-all@FreeBSD.ORG Sun May 10 22:04:43 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 74EDFCA8; Sun, 10 May 2015 22:04:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 640D911C9; Sun, 10 May 2015 22:04:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4AM4hXs096974; Sun, 10 May 2015 22:04:43 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4AM4huc096973; Sun, 10 May 2015 22:04:43 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201505102204.t4AM4huc096973@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 10 May 2015 22:04:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282741 - head/sys/ofed/include/linux 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.20 Precedence: list List-Id: "SVN commit messages 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, 10 May 2015 22:04:43 -0000 Author: markj Date: Sun May 10 22:04:42 2015 New Revision: 282741 URL: https://svnweb.freebsd.org/changeset/base/282741 Log: find_next_bit() and find_next_zero_bit(): if the caller-specified offset lies within the last block of the bit set and no bits are set beyond the offset, terminate the search immediately instead of continuing as though there are further blocks in the set and subsequently returning an incorrect result. MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/sys/ofed/include/linux/bitops.h Modified: head/sys/ofed/include/linux/bitops.h ============================================================================== --- head/sys/ofed/include/linux/bitops.h Sun May 10 22:03:59 2015 (r282740) +++ head/sys/ofed/include/linux/bitops.h Sun May 10 22:04:42 2015 (r282741) @@ -165,6 +165,8 @@ find_next_bit(unsigned long *addr, unsig mask = (*addr) & ~BIT_MASK(offs); if (mask) return (bit + __ffsl(mask)); + if (size - bit <= BITS_PER_LONG) + return (size); bit += BITS_PER_LONG; addr++; } @@ -203,6 +205,8 @@ find_next_zero_bit(unsigned long *addr, mask = ~(*addr) & ~BIT_MASK(offs); if (mask) return (bit + __ffsl(mask)); + if (size - bit <= BITS_PER_LONG) + return (size); bit += BITS_PER_LONG; addr++; } From owner-svn-src-all@FreeBSD.ORG Sun May 10 22:07:57 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 84027E00; Sun, 10 May 2015 22:07:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6520711DE; Sun, 10 May 2015 22:07:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4AM7v2K097461; Sun, 10 May 2015 22:07:57 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4AM7sDJ097440; Sun, 10 May 2015 22:07:54 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201505102207.t4AM7sDJ097440@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 10 May 2015 22:07:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282742 - in head/sys: dev/if_ndis net80211 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.20 Precedence: list List-Id: "SVN commit messages 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, 10 May 2015 22:07:57 -0000 Author: adrian Date: Sun May 10 22:07:53 2015 New Revision: 282742 URL: https://svnweb.freebsd.org/changeset/base/282742 Log: Prepare for supporting driver-overridden curchan when submitting scan results. Right now the scan infrastructure assumes the channel is under net80211 control, and that when receiving beacon frames for scanning, the current channel is indeed what ic_curchan is set to. But firmware NICs with firmware scan support need more than this - they can do background scans whilst hiding the off-channel behaviour from net80211. Ie, net80211 still thinks everything is associated and on the main channel, but it's getting scan results from all the background traffic. However sta_add() pays attention to ic_curchan and discards scan results that aren't on the right channel. CCK beacon frames can be decoded from adjacent channels so the receive path and sta_add discard these as appropriate. This is fine for software scanning like for ath(4), but not for firmware NICs. So with those, the whole concept of background firmware scanning won't work without major hacks (eg, overriding ic_curchan before calling the beacon input / scan add.) As part of my scan overhaul, modify sta_add() and the scan_add() APIs to take an explicit current channel. The normal RX path will set it to ic_curchan so it's a no-op. However, drivers may decide to (eventually!) override the scan method to set the "right" current channel based on what the firmware reports the scan state is. So for example, iwn, rsu and other NICs will eventually do this: * driver issues scan start firmware command; * firmware sends a "scan start on channel X" notify; * firmware sends a bunch of beacon RX's as part of the scan results; * .. and the driver will replace scan_add() curchan with channel X, so scan results are correct. * firmware sends a "scan start on channel Y" notify; * firmware sends more beacons... * .. the driver replaces scan_add() curchan with channel Y. Note: * Eventually, net80211 should eventually grow the idea of a per-packet current channel. It's possible in various modes (eg WAVE, P2P, etc) that individual frames can come in from different channels and that is under firmware control rather than driver/net80211 control, so we should support that. Modified: head/sys/dev/if_ndis/if_ndis.c head/sys/net80211/ieee80211_adhoc.c head/sys/net80211/ieee80211_hostap.c head/sys/net80211/ieee80211_mesh.c head/sys/net80211/ieee80211_scan.c head/sys/net80211/ieee80211_scan.h head/sys/net80211/ieee80211_scan_sta.c head/sys/net80211/ieee80211_scan_sw.c head/sys/net80211/ieee80211_scan_sw.h head/sys/net80211/ieee80211_sta.c Modified: head/sys/dev/if_ndis/if_ndis.c ============================================================================== --- head/sys/dev/if_ndis/if_ndis.c Sun May 10 22:04:42 2015 (r282741) +++ head/sys/dev/if_ndis/if_ndis.c Sun May 10 22:07:53 2015 (r282742) @@ -3316,7 +3316,7 @@ done: DPRINTF(("scan: bssid %s chan %dMHz (%d/%d) rssi %d\n", ether_sprintf(wb->nwbx_macaddr), freq, sp.bchan, chanflag, rssi)); - ieee80211_add_scan(vap, &sp, &wh, 0, rssi, noise); + ieee80211_add_scan(vap, ic->ic_curchan, &sp, &wh, 0, rssi, noise); wb = (ndis_wlan_bssid_ex *)((char *)wb + wb->nwbx_len); } free(bl, M_DEVBUF); Modified: head/sys/net80211/ieee80211_adhoc.c ============================================================================== --- head/sys/net80211/ieee80211_adhoc.c Sun May 10 22:04:42 2015 (r282741) +++ head/sys/net80211/ieee80211_adhoc.c Sun May 10 22:07:53 2015 (r282742) @@ -735,7 +735,8 @@ adhoc_recv_mgmt(struct ieee80211_node *n ieee80211_probe_curchan(vap, 1); ic->ic_flags_ext &= ~IEEE80211_FEXT_PROBECHAN; } - ieee80211_add_scan(vap, &scan, wh, subtype, rssi, nf); + ieee80211_add_scan(vap, ic->ic_curchan, &scan, wh, + subtype, rssi, nf); return; } if (scan.capinfo & IEEE80211_CAPINFO_IBSS) { Modified: head/sys/net80211/ieee80211_hostap.c ============================================================================== --- head/sys/net80211/ieee80211_hostap.c Sun May 10 22:04:42 2015 (r282741) +++ head/sys/net80211/ieee80211_hostap.c Sun May 10 22:07:53 2015 (r282742) @@ -1737,7 +1737,8 @@ hostap_recv_mgmt(struct ieee80211_node * ieee80211_probe_curchan(vap, 1); ic->ic_flags_ext &= ~IEEE80211_FEXT_PROBECHAN; } - ieee80211_add_scan(vap, &scan, wh, subtype, rssi, nf); + ieee80211_add_scan(vap, ic->ic_curchan, &scan, wh, + subtype, rssi, nf); return; } /* Modified: head/sys/net80211/ieee80211_mesh.c ============================================================================== --- head/sys/net80211/ieee80211_mesh.c Sun May 10 22:04:42 2015 (r282741) +++ head/sys/net80211/ieee80211_mesh.c Sun May 10 22:07:53 2015 (r282742) @@ -1906,7 +1906,7 @@ mesh_recv_mgmt(struct ieee80211_node *ni ieee80211_probe_curchan(vap, 1); ic->ic_flags_ext &= ~IEEE80211_FEXT_PROBECHAN; } - ieee80211_add_scan(vap, &scan, wh, + ieee80211_add_scan(vap, ic->ic_curchan, &scan, wh, subtype, rssi, nf); return; } Modified: head/sys/net80211/ieee80211_scan.c ============================================================================== --- head/sys/net80211/ieee80211_scan.c Sun May 10 22:04:42 2015 (r282741) +++ head/sys/net80211/ieee80211_scan.c Sun May 10 22:07:53 2015 (r282742) @@ -562,12 +562,14 @@ ieee80211_scan_dump_probe_beacon(uint8_t */ void ieee80211_add_scan(struct ieee80211vap *vap, + struct ieee80211_channel *curchan, const struct ieee80211_scanparams *sp, const struct ieee80211_frame *wh, int subtype, int rssi, int noise) { - return (ieee80211_swscan_add_scan(vap, sp, wh, subtype, rssi, noise)); + return (ieee80211_swscan_add_scan(vap, curchan, sp, wh, subtype, + rssi, noise)); } /* Modified: head/sys/net80211/ieee80211_scan.h ============================================================================== --- head/sys/net80211/ieee80211_scan.h Sun May 10 22:04:42 2015 (r282741) +++ head/sys/net80211/ieee80211_scan.h Sun May 10 22:07:53 2015 (r282742) @@ -148,6 +148,7 @@ struct ieee80211_channel *ieee80211_scan struct ieee80211_scanparams; void ieee80211_add_scan(struct ieee80211vap *, + struct ieee80211_channel *, const struct ieee80211_scanparams *, const struct ieee80211_frame *, int subtype, int rssi, int noise); @@ -273,6 +274,7 @@ struct ieee80211_scanner { struct ieee80211_scan_state *, int); /* add an entry to the cache */ int (*scan_add)(struct ieee80211_scan_state *, + struct ieee80211_channel *, const struct ieee80211_scanparams *, const struct ieee80211_frame *, int subtype, int rssi, int noise); Modified: head/sys/net80211/ieee80211_scan_sta.c ============================================================================== --- head/sys/net80211/ieee80211_scan_sta.c Sun May 10 22:04:42 2015 (r282741) +++ head/sys/net80211/ieee80211_scan_sta.c Sun May 10 22:07:53 2015 (r282742) @@ -228,6 +228,7 @@ sta_flush_table(struct sta_table *st) */ static int sta_add(struct ieee80211_scan_state *ss, + struct ieee80211_channel *curchan, const struct ieee80211_scanparams *sp, const struct ieee80211_frame *wh, int subtype, int rssi, int noise) @@ -310,15 +311,15 @@ found: * IEEE80211_BPARSE_OFFCHAN. */ c = ieee80211_find_channel_byieee(ic, sp->chan, - ic->ic_curchan->ic_flags); + curchan->ic_flags); if (c != NULL) { ise->se_chan = c; } else if (ise->se_chan == NULL) { /* should not happen, pick something */ - ise->se_chan = ic->ic_curchan; + ise->se_chan = curchan; } } else - ise->se_chan = ic->ic_curchan; + ise->se_chan = curchan; if (IEEE80211_IS_CHAN_HT(ise->se_chan) && sp->htcap == NULL) { /* Demote legacy networks to a non-HT channel. */ c = ieee80211_find_channel(ic, ise->se_chan->ic_freq, Modified: head/sys/net80211/ieee80211_scan_sw.c ============================================================================== --- head/sys/net80211/ieee80211_scan_sw.c Sun May 10 22:04:42 2015 (r282741) +++ head/sys/net80211/ieee80211_scan_sw.c Sun May 10 22:07:53 2015 (r282742) @@ -900,6 +900,7 @@ done: */ void ieee80211_swscan_add_scan(struct ieee80211vap *vap, + struct ieee80211_channel *curchan, const struct ieee80211_scanparams *sp, const struct ieee80211_frame *wh, int subtype, int rssi, int noise) @@ -922,7 +923,7 @@ ieee80211_swscan_add_scan(struct ieee802 ieee80211_scan_dump_probe_beacon(subtype, 1, wh->i_addr2, sp, rssi); #endif if (ss->ss_ops != NULL && - ss->ss_ops->scan_add(ss, sp, wh, subtype, rssi, noise)) { + ss->ss_ops->scan_add(ss, curchan, sp, wh, subtype, rssi, noise)) { /* * If we've reached the min dwell time terminate * the timer so we'll switch to the next channel. Modified: head/sys/net80211/ieee80211_scan_sw.h ============================================================================== --- head/sys/net80211/ieee80211_scan_sw.h Sun May 10 22:04:42 2015 (r282741) +++ head/sys/net80211/ieee80211_scan_sw.h Sun May 10 22:07:53 2015 (r282742) @@ -53,6 +53,7 @@ extern void ieee80211_swscan_scan_done(s extern void ieee80211_swscan_probe_curchan(struct ieee80211vap *vap, int force); extern void ieee80211_swscan_add_scan(struct ieee80211vap *vap, + struct ieee80211_channel *curchan, const struct ieee80211_scanparams *sp, const struct ieee80211_frame *wh, int subtype, int rssi, int noise); Modified: head/sys/net80211/ieee80211_sta.c ============================================================================== --- head/sys/net80211/ieee80211_sta.c Sun May 10 22:04:42 2015 (r282741) +++ head/sys/net80211/ieee80211_sta.c Sun May 10 22:07:53 2015 (r282742) @@ -1484,8 +1484,8 @@ sta_recv_mgmt(struct ieee80211_node *ni, * our ap. */ if (ic->ic_flags & IEEE80211_F_SCAN) { - ieee80211_add_scan(vap, &scan, wh, - subtype, rssi, nf); + ieee80211_add_scan(vap, ic->ic_curchan, + &scan, wh, subtype, rssi, nf); } else if (contbgscan(vap)) { ieee80211_bg_scan(vap, 0); } else if (startbgscan(vap)) { @@ -1529,7 +1529,8 @@ sta_recv_mgmt(struct ieee80211_node *ni, ieee80211_probe_curchan(vap, 1); ic->ic_flags_ext &= ~IEEE80211_FEXT_PROBECHAN; } - ieee80211_add_scan(vap, &scan, wh, subtype, rssi, nf); + ieee80211_add_scan(vap, ic->ic_curchan, &scan, wh, + subtype, rssi, nf); return; } break; From owner-svn-src-all@FreeBSD.ORG Sun May 10 22:11:24 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 43AE7F67; Sun, 10 May 2015 22:11:24 +0000 (UTC) Received: from melamine.cuivre.fr.eu.org (houdart.cuivre.fr.eu.org [81.57.40.110]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F1ACD129B; Sun, 10 May 2015 22:11:23 +0000 (UTC) Received: by melamine.cuivre.fr.eu.org (Postfix, from userid 1000) id 215CA1909B; Mon, 11 May 2015 00:11:21 +0200 (CEST) Date: Mon, 11 May 2015 00:11:21 +0200 From: Thomas Quinot To: Ian Lepore Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r282726 - head/lib/libmd Message-ID: <20150510221121.GB10340@melamine.cuivre.fr.eu.org> References: <201505101321.t4ADLa54030049@svn.freebsd.org> <1431266347.6170.221.camel@freebsd.org> <20150510142627.GA77866@melamine.cuivre.fr.eu.org> <1431272444.6170.231.camel@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <1431272444.6170.231.camel@freebsd.org> X-message-flag: WARNING! Using Outlook can damage your computer. User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 10 May 2015 22:11:24 -0000 * Ian Lepore, 2015-05-10 : > That gets past the bootstrapping problem, now it dies like this: >=20 > --- lib/libcrypt__L --- > --- crypt-md5.So --- > cc -fpic -DPIC -O -pipe -I/local/build/staging/freebsd/wand/src/lib/l= ibcrypt/../libmd -I/local/build/staging/freebsd/wand/src/lib/libcrypt/../li= butil -I/local/build/staging/freebsd/wand/src/lib/libcrypt -DHAS_DES -DHAS_= BLOWFISH -DMD4Init=3D__MD4Init -DMD4Final=3D__MD4Final -DMD4Update=3D__MD4U= pdate -DMD4Pad=3D__MD4Pad -DMD5Init=3D__MD5Init -DMD5Final=3D__MD5Final -DM= D5Update=3D__MD5Update -DMD5Pad=3D__MD5Pad -DSHA256_Init=3D__SHA256_Init -D= SHA256_Final=3D__SHA256_Final -DSHA256_Update=3D__SHA256_Update -DSHA512_In= it=3D__SHA512_Init -DSHA512_Final=3D__SHA512_Final -DSHA512_Update=3D__SHA5= 12_Update -std=3Dgnu99 -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-= uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-u= nused-const-variable -Wno-tautological-compare -Wno-unused-value -Wno-paren= theses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local= -typedef -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter -Qunused-= arguments -c /local/build/staging/freebsd/wand/src/lib/libcrypt/crypt-md5.c= -o crypt-md5.So >=20 > [...] >=20 > --- lib/libcrypt__L --- > In file included from /local/build/staging/freebsd/wand/src/lib/libcrypt/= crypt-md5.c:33: > /local/build/staging/freebsd/wand/src/lib/libcrypt/../libmd/md5.h:10:9: w= arning: 'MD5Init' macro redefined [-Wmacro-redefined] > #define MD5Init _libmd_MD5Init > ^ > :8:9: note: previous definition is here > #define MD5Init __MD5Init > ^ Cumulative fix for both this issue and the previous one committed as rev. 282736. I was able to get a successul buildworld and buildkernel with -j12. Apologies for the breakage! Thomas. From owner-svn-src-all@FreeBSD.ORG Sun May 10 22:21:01 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F30391B6; Sun, 10 May 2015 22:21:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E171812D6; Sun, 10 May 2015 22:21:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4AML0Rh003856; Sun, 10 May 2015 22:21:00 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4AML0BR003855; Sun, 10 May 2015 22:21:00 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201505102221.t4AML0BR003855@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 10 May 2015 22:21:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282743 - head/sys/ofed/include/linux 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.20 Precedence: list List-Id: "SVN commit messages 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, 10 May 2015 22:21:01 -0000 Author: markj Date: Sun May 10 22:21:00 2015 New Revision: 282743 URL: https://svnweb.freebsd.org/changeset/base/282743 Log: msecs_to_jiffies() is implemented using tvtohz(9), which always returns a positive value since it adds the current tick to its result. This differs from the behaviour in Linux, whose implementation does not add the extra tick, so subtract the extra tick in the OFED compat layer implementation. This addresses some incorrect handling of IB MAD timeouts, since some IB code depends on msecs_to_jiffies(0) returning 0. MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/sys/ofed/include/linux/jiffies.h Modified: head/sys/ofed/include/linux/jiffies.h ============================================================================== --- head/sys/ofed/include/linux/jiffies.h Sun May 10 22:07:53 2015 (r282742) +++ head/sys/ofed/include/linux/jiffies.h Sun May 10 22:21:00 2015 (r282743) @@ -42,7 +42,7 @@ msecs_to_jiffies(int msec) tv.tv_sec = msec / 1000; tv.tv_usec = (msec % 1000) * 1000; - return (tvtohz(&tv)); + return (tvtohz(&tv) - 1); } #define jiffies ticks From owner-svn-src-all@FreeBSD.ORG Sun May 10 22:27:49 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 99987331; Sun, 10 May 2015 22:27:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 87BDC13A1; Sun, 10 May 2015 22:27:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4AMRnI1007297; Sun, 10 May 2015 22:27:49 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4AMRn1g007294; Sun, 10 May 2015 22:27:49 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201505102227.t4AMRn1g007294@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 10 May 2015 22:27:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282744 - in head/sys/cddl/dev/dtrace: amd64 i386 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.20 Precedence: list List-Id: "SVN commit messages 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, 10 May 2015 22:27:49 -0000 Author: markj Date: Sun May 10 22:27:48 2015 New Revision: 282744 URL: https://svnweb.freebsd.org/changeset/base/282744 Log: Remove some commented-out upstream code for handling traps from usermode DTrace probes. This handling is already done in trap() on i386 and amd64. Modified: head/sys/cddl/dev/dtrace/amd64/dtrace_subr.c head/sys/cddl/dev/dtrace/i386/dtrace_subr.c Modified: head/sys/cddl/dev/dtrace/amd64/dtrace_subr.c ============================================================================== --- head/sys/cddl/dev/dtrace/amd64/dtrace_subr.c Sun May 10 22:21:00 2015 (r282743) +++ head/sys/cddl/dev/dtrace/amd64/dtrace_subr.c Sun May 10 22:27:48 2015 (r282744) @@ -142,114 +142,6 @@ dtrace_sync(void) } #ifdef notyet -int (*dtrace_pid_probe_ptr)(struct regs *); -int (*dtrace_return_probe_ptr)(struct regs *); - -void -dtrace_user_probe(struct regs *rp, caddr_t addr, processorid_t cpuid) -{ - krwlock_t *rwp; - proc_t *p = curproc; - extern void trap(struct regs *, caddr_t, processorid_t); - - if (USERMODE(rp->r_cs) || (rp->r_ps & PS_VM)) { - if (curthread->t_cred != p->p_cred) { - cred_t *oldcred = curthread->t_cred; - /* - * DTrace accesses t_cred in probe context. t_cred - * must always be either NULL, or point to a valid, - * allocated cred structure. - */ - curthread->t_cred = crgetcred(); - crfree(oldcred); - } - } - - if (rp->r_trapno == T_DTRACE_RET) { - uint8_t step = curthread->t_dtrace_step; - uint8_t ret = curthread->t_dtrace_ret; - uintptr_t npc = curthread->t_dtrace_npc; - - if (curthread->t_dtrace_ast) { - aston(curthread); - curthread->t_sig_check = 1; - } - - /* - * Clear all user tracing flags. - */ - curthread->t_dtrace_ft = 0; - - /* - * If we weren't expecting to take a return probe trap, kill - * the process as though it had just executed an unassigned - * trap instruction. - */ - if (step == 0) { - tsignal(curthread, SIGILL); - return; - } - - /* - * If we hit this trap unrelated to a return probe, we're - * just here to reset the AST flag since we deferred a signal - * until after we logically single-stepped the instruction we - * copied out. - */ - if (ret == 0) { - rp->r_pc = npc; - return; - } - - /* - * We need to wait until after we've called the - * dtrace_return_probe_ptr function pointer to set %pc. - */ - rwp = &CPU->cpu_ft_lock; - rw_enter(rwp, RW_READER); - if (dtrace_return_probe_ptr != NULL) - (void) (*dtrace_return_probe_ptr)(rp); - rw_exit(rwp); - rp->r_pc = npc; - - } else if (rp->r_trapno == T_BPTFLT) { - uint8_t instr; - rwp = &CPU->cpu_ft_lock; - - /* - * The DTrace fasttrap provider uses the breakpoint trap - * (int 3). We let DTrace take the first crack at handling - * this trap; if it's not a probe that DTrace knowns about, - * we call into the trap() routine to handle it like a - * breakpoint placed by a conventional debugger. - */ - rw_enter(rwp, RW_READER); - if (dtrace_pid_probe_ptr != NULL && - (*dtrace_pid_probe_ptr)(rp) == 0) { - rw_exit(rwp); - return; - } - rw_exit(rwp); - - /* - * If the instruction that caused the breakpoint trap doesn't - * look like an int 3 anymore, it may be that this tracepoint - * was removed just after the user thread executed it. In - * that case, return to user land to retry the instuction. - */ - if (fuword8((void *)(rp->r_pc - 1), &instr) == 0 && - instr != FASTTRAP_INSTR) { - rp->r_pc--; - return; - } - - trap(rp, addr, cpuid); - - } else { - trap(rp, addr, cpuid); - } -} - void dtrace_safe_synchronous_signal(void) { Modified: head/sys/cddl/dev/dtrace/i386/dtrace_subr.c ============================================================================== --- head/sys/cddl/dev/dtrace/i386/dtrace_subr.c Sun May 10 22:21:00 2015 (r282743) +++ head/sys/cddl/dev/dtrace/i386/dtrace_subr.c Sun May 10 22:27:48 2015 (r282744) @@ -143,122 +143,6 @@ dtrace_sync(void) } #ifdef notyet -int (*dtrace_fasttrap_probe_ptr)(struct regs *); -int (*dtrace_pid_probe_ptr)(struct regs *); -int (*dtrace_return_probe_ptr)(struct regs *); - -void -dtrace_user_probe(struct regs *rp, caddr_t addr, processorid_t cpuid) -{ - krwlock_t *rwp; - proc_t *p = curproc; - extern void trap(struct regs *, caddr_t, processorid_t); - - if (USERMODE(rp->r_cs) || (rp->r_ps & PS_VM)) { - if (curthread->t_cred != p->p_cred) { - cred_t *oldcred = curthread->t_cred; - /* - * DTrace accesses t_cred in probe context. t_cred - * must always be either NULL, or point to a valid, - * allocated cred structure. - */ - curthread->t_cred = crgetcred(); - crfree(oldcred); - } - } - - if (rp->r_trapno == T_DTRACE_RET) { - uint8_t step = curthread->t_dtrace_step; - uint8_t ret = curthread->t_dtrace_ret; - uintptr_t npc = curthread->t_dtrace_npc; - - if (curthread->t_dtrace_ast) { - aston(curthread); - curthread->t_sig_check = 1; - } - - /* - * Clear all user tracing flags. - */ - curthread->t_dtrace_ft = 0; - - /* - * If we weren't expecting to take a return probe trap, kill - * the process as though it had just executed an unassigned - * trap instruction. - */ - if (step == 0) { - tsignal(curthread, SIGILL); - return; - } - - /* - * If we hit this trap unrelated to a return probe, we're - * just here to reset the AST flag since we deferred a signal - * until after we logically single-stepped the instruction we - * copied out. - */ - if (ret == 0) { - rp->r_pc = npc; - return; - } - - /* - * We need to wait until after we've called the - * dtrace_return_probe_ptr function pointer to set %pc. - */ - rwp = &CPU->cpu_ft_lock; - rw_enter(rwp, RW_READER); - if (dtrace_return_probe_ptr != NULL) - (void) (*dtrace_return_probe_ptr)(rp); - rw_exit(rwp); - rp->r_pc = npc; - - } else if (rp->r_trapno == T_DTRACE_PROBE) { - rwp = &CPU->cpu_ft_lock; - rw_enter(rwp, RW_READER); - if (dtrace_fasttrap_probe_ptr != NULL) - (void) (*dtrace_fasttrap_probe_ptr)(rp); - rw_exit(rwp); - - } else if (rp->r_trapno == T_BPTFLT) { - uint8_t instr; - rwp = &CPU->cpu_ft_lock; - - /* - * The DTrace fasttrap provider uses the breakpoint trap - * (int 3). We let DTrace take the first crack at handling - * this trap; if it's not a probe that DTrace knowns about, - * we call into the trap() routine to handle it like a - * breakpoint placed by a conventional debugger. - */ - rw_enter(rwp, RW_READER); - if (dtrace_pid_probe_ptr != NULL && - (*dtrace_pid_probe_ptr)(rp) == 0) { - rw_exit(rwp); - return; - } - rw_exit(rwp); - - /* - * If the instruction that caused the breakpoint trap doesn't - * look like an int 3 anymore, it may be that this tracepoint - * was removed just after the user thread executed it. In - * that case, return to user land to retry the instuction. - */ - if (fuword8((void *)(rp->r_pc - 1), &instr) == 0 && - instr != FASTTRAP_INSTR) { - rp->r_pc--; - return; - } - - trap(rp, addr, cpuid); - - } else { - trap(rp, addr, cpuid); - } -} - void dtrace_safe_synchronous_signal(void) { From owner-svn-src-all@FreeBSD.ORG Mon May 11 00:16:33 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3DF341B6; Mon, 11 May 2015 00:16:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2D3101E26; Mon, 11 May 2015 00:16:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4B0GXIw062645; Mon, 11 May 2015 00:16:33 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4B0GXXI062644; Mon, 11 May 2015 00:16:33 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201505110016.t4B0GXXI062644@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 11 May 2015 00:16:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282745 - head/etc/rc.d 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.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2015 00:16:33 -0000 Author: delphij Date: Mon May 11 00:16:32 2015 New Revision: 282745 URL: https://svnweb.freebsd.org/changeset/base/282745 Log: Revert r282672. tr is in /usr and not available at the time hostid is run (must be run before FILESYSTEMS). Reported by: def Modified: head/etc/rc.d/hostid Modified: head/etc/rc.d/hostid ============================================================================== --- head/etc/rc.d/hostid Sun May 10 22:27:48 2015 (r282744) +++ head/etc/rc.d/hostid Mon May 11 00:16:32 2015 (r282745) @@ -58,7 +58,7 @@ hostid_set() valid_hostid() { - uuid=$(echo $1 | tr '[:upper:]' '[:lower:]') + uuid=$1 x="[0-9a-f]" y=$x$x$x$x From owner-svn-src-all@FreeBSD.ORG Mon May 11 00:23:13 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 860D4382; Mon, 11 May 2015 00:23:13 +0000 (UTC) Received: from gold.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "gold.funkthat.com", Issuer "gold.funkthat.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 51F531EFC; Mon, 11 May 2015 00:23:12 +0000 (UTC) Received: from gold.funkthat.com (localhost [127.0.0.1]) by gold.funkthat.com (8.14.5/8.14.5) with ESMTP id t4B0N6HQ087100 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 10 May 2015 17:23:06 -0700 (PDT) (envelope-from jmg@gold.funkthat.com) Received: (from jmg@localhost) by gold.funkthat.com (8.14.5/8.14.5/Submit) id t4B0N6d4087099; Sun, 10 May 2015 17:23:06 -0700 (PDT) (envelope-from jmg) Date: Sun, 10 May 2015 17:23:06 -0700 From: John-Mark Gurney To: Oliver Pinter Cc: John Baldwin , Xin LI , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Subject: Re: svn commit: r282672 - head/etc/rc.d Message-ID: <20150511002306.GK37063@funkthat.com> References: <201505082336.t48NaWRS080408@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: FreeBSD 9.1-PRERELEASE amd64 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-TipJar: bitcoin:13Qmb6AeTgQecazTWph4XasEsP7nGRbAPE X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? User-Agent: Mutt/1.5.21 (2010-09-15) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (gold.funkthat.com [127.0.0.1]); Sun, 10 May 2015 17:23:06 -0700 (PDT) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2015 00:23:13 -0000 Oliver Pinter wrote this message on Sun, May 10, 2015 at 23:32 +0200: > > The awk is located in /usr/bin/awk too, and for e.g. the growfs should > running in the very first steps... Yes, I realized this when I added growfs... As growfs is usually used on single fs root systems, I didn't think it was too bad... Trying to do what awk does in sh may be possible, but more difficult.. -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-svn-src-all@FreeBSD.ORG Mon May 11 00:45:20 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ED56E6B9 for ; Mon, 11 May 2015 00:45:20 +0000 (UTC) Received: from mail-wg0-x22f.google.com (mail-wg0-x22f.google.com [IPv6:2a00:1450:400c:c00::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 8080B10E5 for ; Mon, 11 May 2015 00:45:20 +0000 (UTC) Received: by wgbhc8 with SMTP id hc8so13868173wgb.2 for ; Sun, 10 May 2015 17:45:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=S0KnkqwQIOQuTnhFKX0hm+4IqjSYsONHoPdUsXv2IpE=; b=K9wNTpEQuvlSO6fPJ2aVr2JcHWLCehP/in7tVyeyHmYrdtdCwl5Nx77ZtHHMruLX0X EGdHqaWaemYIJ2wxGXvhKGLoHzETtFAeTdEoLFcy8+tCZJS/OnKb1GAQS6fYp9LZ+sAz H1l7jHhPJytzON7fTQIpS8ygpBEx/HuqUVYrg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-type; bh=S0KnkqwQIOQuTnhFKX0hm+4IqjSYsONHoPdUsXv2IpE=; b=OFXPHIhYQSpdItyLygNMDmmug4+zgaGdquvYUYkJg3+UOIu0WHmWPU7iJstT5fkEcp KxjHalQ9JRaL4kW3qeJEXhHqCsnW7V4GEwbxKzOrYJiVsVdvvNT4BfzjW2xNJeKWzUlZ Jz0+FOTQkAHNmsHHUZ5RRjx9rBWRTdckzMlKVCNVaA+51WayHYpOH1zJLwsOBcNaygZL cIe2+c1IloCbzRERIdMj1gBCBqi/DGlmOMSdoJUJchQtaq4HFXGabfxSuyYi9Ydqj8Wr ce/tNF145TSycCAL1rfsT4M4VbiKHofZvFhrcKPrcOiHsJthwmGawSW3QYpqf/zHLc8h XjAg== X-Gm-Message-State: ALoCoQmP/tvcl1D/ZrmJuWp6tgxol08NsLmw5vXQwYn2yDfJDHRyzKGvqgdzrP19lwlrViUHaVGA X-Received: by 10.180.92.161 with SMTP id cn1mr15729001wib.91.1431305119113; Sun, 10 May 2015 17:45:19 -0700 (PDT) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.28.20.75 with HTTP; Sun, 10 May 2015 17:44:48 -0700 (PDT) In-Reply-To: References: <201505082336.t48NaWRS080408@svn.freebsd.org> From: Eitan Adler Date: Sun, 10 May 2015 17:44:48 -0700 X-Google-Sender-Auth: rCNNcYQFsQR-ix5ygBfyScmUwBE Message-ID: Subject: Re: svn commit: r282672 - head/etc/rc.d To: John Baldwin Cc: Xin LI , "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.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2015 00:45:21 -0000 On 10 May 2015 at 12:45, John Baldwin wrote: > >> On May 8, 2015, at 19:36, Xin LI wrote: >> >> Author: delphij >> Date: Fri May 8 23:36:31 2015 >> New Revision: 282672 >> URL: https://svnweb.freebsd.org/changeset/base/282672 >> >> Log: >> Always convert uuid to lower case. >> >> MFC after: 2 weeks >> >> Modified: >> head/etc/rc.d/hostid >> >> Modified: head/etc/rc.d/hostid >> ============================================================================== >> --- head/etc/rc.d/hostid Fri May 8 23:29:42 2015 (r282671) >> +++ head/etc/rc.d/hostid Fri May 8 23:36:31 2015 (r282672) >> @@ -58,7 +58,7 @@ hostid_set() >> >> valid_hostid() >> { >> - uuid=$1 >> + uuid=$(echo $1 | tr '[:upper:]' '[:lower:]') > > tr is in /usr/bin so this breaks systems with a separate /usr. Perhaps you could use dd with conv=lcase instead? FWIW this broke hostid on my system, causing zfs to refuse to import one of my pools. In particular the lack of tr caused hostid to fail entirely, causing the hostid to change each time. Is there a reason that the uuid has to be lowercase in the first place? -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams From owner-svn-src-all@FreeBSD.ORG Mon May 11 00:47:43 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5055383C; Mon, 11 May 2015 00:47:43 +0000 (UTC) Received: from anubis.delphij.net (anubis.delphij.net [64.62.153.212]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "anubis.delphij.net", Issuer "StartCom Class 1 Primary Intermediate Server CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 356A910F9; Mon, 11 May 2015 00:47:42 +0000 (UTC) Received: from Xins-MacBook-Pro.local (unknown [50.242.82.187]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by anubis.delphij.net (Postfix) with ESMTPSA id 6CD254D27; Sun, 10 May 2015 17:47:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=delphij.net; s=anubis; t=1431305262; x=1431319662; bh=cL9iUtbaMTAUIf/FB7E/V6vwa6xvejNoMk6e4r/TJsM=; h=Date:From:To:CC:Subject:References:In-Reply-To; b=49aS4aw4bIoJIesWiS40NR3W24N8Q3C0WnVfdmnxk7/jBaKyOfxE4jyuKm0gootkp Znt/0fL8LjNA8c36G34aISPEJkgirjS5lNxE5LM3gSY5cc/RXxGykwlmVuz6sGskHp Xk/7pa++ybp6yBpN6c8IjC/iV0te4/a0t3hncaQA= Message-ID: <554FFC2E.50503@delphij.net> Date: Sun, 10 May 2015 17:47:42 -0700 From: Xin Li User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: John-Mark Gurney , Oliver Pinter CC: John Baldwin , Xin LI , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Subject: Re: svn commit: r282672 - head/etc/rc.d References: <201505082336.t48NaWRS080408@svn.freebsd.org> <20150511002306.GK37063@funkthat.com> In-Reply-To: <20150511002306.GK37063@funkthat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2015 00:47:43 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 5/10/15 17:23, John-Mark Gurney wrote: > Oliver Pinter wrote this message on Sun, May 10, 2015 at 23:32 > +0200: >> >> The awk is located in /usr/bin/awk too, and for e.g. the growfs >> should running in the very first steps... > > Yes, I realized this when I added growfs... As growfs is usually > used on single fs root systems, I didn't think it was too bad... > Trying to do what awk does in sh may be possible, but more > difficult.. I have reverted the changeset (I really should have noted the fact in the commit message, as it was omitted for the exact same reason) for now. (using dd as John suggested should be fine, though). I have taken /usr being available for granted for too long time :( Cheers, -----BEGIN PGP SIGNATURE----- iQIcBAEBCgAGBQJVT/wtAAoJEJW2GBstM+nsXVkQAJoLVkWdWyFdDAJYpktmK555 R7iM7pbH9fQbZzojEPhjxl3KxBH0nqdQNBGFweDt7nkNEvblyZgBfCJlwTCkU0aG xNIWQiT3Ozb3uUZeolkujuW03trhUONDdMFnMR9fGc310x93TRN/Vxloiqqr3aQT aTc2s+tTscf+A04qTbNlU7zetB9VqttagazuGNN43U/m0CrfjXvrI3BRmeP2eLZl pUkX2WgOnuqv/+lQ9+a4na9kw+0au6usPYPNGhlOOlyqOU2UUdQjTGhurDLEDPsG RPzusmY6C4vgnhqnaXnmMlQ9nsg644z+Me6FnyxOZYXj5l0ktzUdYnAnYBvXwbjM t5Q9mPZUBydfVCg5QN8q80avGGybXIDre2A2bnPir+4R44g51LHTAUotYlQ3M884 ZUKFmnXk/P9ZEVFpMjmT2VSPICzo8yEtgVi+O78jYrmGh9E7LUGp2c6S29BHT8l7 0R4lZbwtXBbACj3TuJrFZAUZopJJqka4PCXhfUUO91TdOeQnpdPwDUiLhPbBDwHC m160dHT2pv6o/B3MHbXLi2NISo7q+it+UWi3Cj0fzf8ZgXVS0sLF4pV0ezJVYz2i ec9oLTYQnC6bD5SAr+TwZ03X1hnTCELgnz8TAld0Dg0OCMc0quiO/kXy0OVWjtTI Rcqucneut5RpbKJCh/FN =Tvx3 -----END PGP SIGNATURE----- From owner-svn-src-all@FreeBSD.ORG Mon May 11 01:05:48 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 30DE8BCE for ; Mon, 11 May 2015 01:05:48 +0000 (UTC) Received: from mail-wg0-x22f.google.com (mail-wg0-x22f.google.com [IPv6:2a00:1450:400c:c00::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 B430712A7 for ; Mon, 11 May 2015 01:05:47 +0000 (UTC) Received: by wgic8 with SMTP id c8so87850309wgi.1 for ; Sun, 10 May 2015 18:05:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=SWXJOJYmle9IxeEliAcsbi3I0kLhnyQMRCZBMTR7NA4=; b=dwnNKA8MNxJjfMnFparOSncMGw1NIMy06KqXYjJ4WmYmfzi3M7w8L7VOKIAg/p9t5l VE3jVtoWd5Ho6FoTyJ3CjCkAnTBhjNgj+pj1J6a5ImD0kF7ynSsUvte+97i0AyfM4T0d gnRxkySpiUpzMCP6GWkra5TjHHwLKrZ7KPEy4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-type; bh=SWXJOJYmle9IxeEliAcsbi3I0kLhnyQMRCZBMTR7NA4=; b=j2VDnrHbt+6WK5aUn679OZ0gmqZ2uL3ApEr7bSp5QlzAkphwMg1A3LgOlAnqnTDtmB L4vdx9KuhYF8DJaIP/AZWsURpWktWNZtPOIeBkGZSi1QQuosF1OhMaCwY8IjE/Gy/MUa rlAlXaCcZsY2yWPT3n1uL1Goptg/Y4AlrUCflSTFxKaBo5OG5G2t43Uh4ZysOLTIy8ej UyzHjy78vF5ZuFlmpVLuRwV2PjjHdlzByVySj97Yzf/96DerOslt+4UV4z/jduP9PFgl OADFGQj7gAZDKny0P85ypVUA1iLwK6aFFwSBCz8CqWLgsSKnhhWyF67iHNeESZls6+I9 kXMQ== X-Gm-Message-State: ALoCoQnEeRVHe+N0GI2uVIzeH7ykz79HvHFldQy0JSDCE6YREx1nCFvJpHph9YA3s8RZt91/V8+b X-Received: by 10.194.9.6 with SMTP id v6mr15757551wja.13.1431306346297; Sun, 10 May 2015 18:05:46 -0700 (PDT) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.28.20.75 with HTTP; Sun, 10 May 2015 18:05:15 -0700 (PDT) In-Reply-To: <554FFC2E.50503@delphij.net> References: <201505082336.t48NaWRS080408@svn.freebsd.org> <20150511002306.GK37063@funkthat.com> <554FFC2E.50503@delphij.net> From: Eitan Adler Date: Sun, 10 May 2015 18:05:15 -0700 X-Google-Sender-Auth: aGIFfiVxgATz8MTtgnlXHic7xUo Message-ID: Subject: Re: svn commit: r282672 - head/etc/rc.d To: Xin Li Cc: John-Mark Gurney , Oliver Pinter , John Baldwin , Xin LI , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2015 01:05:48 -0000 On 10 May 2015 at 17:47, Xin Li wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA512 > > > > On 5/10/15 17:23, John-Mark Gurney wrote: >> Oliver Pinter wrote this message on Sun, May 10, 2015 at 23:32 >> +0200: >>> >>> The awk is located in /usr/bin/awk too, and for e.g. the growfs >>> should running in the very first steps... >> >> Yes, I realized this when I added growfs... As growfs is usually >> used on single fs root systems, I didn't think it was too bad... >> Trying to do what awk does in sh may be possible, but more >> difficult.. > > I have reverted the changeset (I really should have noted the fact in > the commit message, as it was omitted for the exact same reason) for > now. (using dd as John suggested should be fine, though). Thanks! -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams From owner-svn-src-all@FreeBSD.ORG Mon May 11 01:33:37 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 74E22E17; Mon, 11 May 2015 01:33:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 61FDB158A; Mon, 11 May 2015 01:33:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4B1Xb3e002904; Mon, 11 May 2015 01:33:37 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4B1XYAr002878; Mon, 11 May 2015 01:33:34 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201505110133.t4B1XYAr002878@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 11 May 2015 01:33: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: r282746 - in stable/10: contrib/openresolv sbin/resolvconf 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.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2015 01:33:37 -0000 Author: gjb Date: Mon May 11 01:33:34 2015 New Revision: 282746 URL: https://svnweb.freebsd.org/changeset/base/282746 Log: MFC r282434: MFV r225523, r282431: r225523 (hrs): Import openresolv-3.4.4. r282431: Import openresolv-3.7.0. PR: 199854 Submitted by: yuri@rawbw.com Relnotes: yes Sponsored by: The FreeBSD Foundation Added: stable/10/contrib/openresolv/GNUmakefile - copied unchanged from r282434, head/contrib/openresolv/GNUmakefile stable/10/contrib/openresolv/config-null.mk - copied unchanged from r282434, head/contrib/openresolv/config-null.mk stable/10/contrib/openresolv/pdns_recursor.in - copied unchanged from r282434, head/contrib/openresolv/pdns_recursor.in Modified: stable/10/contrib/openresolv/Makefile stable/10/contrib/openresolv/configure stable/10/contrib/openresolv/dnsmasq.in stable/10/contrib/openresolv/libc.in stable/10/contrib/openresolv/named.in stable/10/contrib/openresolv/pdnsd.in stable/10/contrib/openresolv/resolvconf.8.in stable/10/contrib/openresolv/resolvconf.conf.5.in stable/10/contrib/openresolv/resolvconf.in stable/10/contrib/openresolv/unbound.in stable/10/sbin/resolvconf/Makefile Directory Properties: stable/10/ (props changed) Copied: stable/10/contrib/openresolv/GNUmakefile (from r282434, head/contrib/openresolv/GNUmakefile) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/contrib/openresolv/GNUmakefile Mon May 11 01:33:34 2015 (r282746, copy of r282434, head/contrib/openresolv/GNUmakefile) @@ -0,0 +1,4 @@ +# Nasty hack so that make clean works without configure being run +CONFIG_MK?=$(shell test -e config.mk && echo config.mk || echo config-null.mk) + +include Makefile Modified: stable/10/contrib/openresolv/Makefile ============================================================================== --- stable/10/contrib/openresolv/Makefile Mon May 11 00:16:32 2015 (r282745) +++ stable/10/contrib/openresolv/Makefile Mon May 11 01:33:34 2015 (r282746) @@ -1,8 +1,19 @@ -include config.mk +PKG= openresolv +VERSION= 3.7.0 -NAME= openresolv -VERSION= 3.4.1 -PKG= ${NAME}-${VERSION} +# Nasty hack so that make clean works without configure being run +_CONFIG_MK!= test -e config.mk && echo config.mk || echo config-null.mk +CONFIG_MK?= ${_CONFIG_MK} +include ${CONFIG_MK} + +SBINDIR?= /sbin +SYSCONFDIR?= /etc +LIBEXECDIR?= /libexec/resolvconf +VARDIR?= /var/run/resolvconf +RCDIR?= /etc/rc.d +RESTARTCMD?= if ${RCDIR}/\1 status >/dev/null 2>\&1; then \ + ${RCDIR}/\1 restart; \ + fi INSTALL?= install SED?= sed @@ -17,31 +28,36 @@ TARGET= ${RESOLVCONF} ${SUBSCRIBERS} SRCS= ${TARGET:C,$,.in,} # pmake SRCS:= ${TARGET:=.in} # gmake -SED_PREFIX= -e 's:@PREFIX@:${PREFIX}:g' +SED_SBINDIR= -e 's:@SBINDIR@:${SBINDIR}:g' SED_SYSCONFDIR= -e 's:@SYSCONFDIR@:${SYSCONFDIR}:g' SED_LIBEXECDIR= -e 's:@LIBEXECDIR@:${LIBEXECDIR}:g' SED_VARDIR= -e 's:@VARDIR@:${VARDIR}:g' SED_RCDIR= -e 's:@RCDIR@:${RCDIR}:g' SED_RESTARTCMD= -e 's:@RESTARTCMD \(.*\)@:${RESTARTCMD}:g' +DISTPREFIX?= ${PKG}-${VERSION} +DISTFILEGZ?= ${DISTPREFIX}.tar.gz +DISTFILE?= ${DISTPREFIX}.tar.bz2 +FOSSILID?= current + .SUFFIXES: .in all: ${TARGET} .in: - ${SED} ${SED_PREFIX} ${SED_SYSCONFDIR} ${SED_LIBEXECDIR} \ + ${SED} ${SED_SBINDIR} ${SED_SYSCONFDIR} ${SED_LIBEXECDIR} \ ${SED_VARDIR} ${SED_RCDIR} ${SED_RESTARTCMD} \ $< > $@ clean: - rm -f ${TARGET} openresolv-${VERSION}.tar.bz2 + rm -f ${TARGET} distclean: clean - rm -f config.mk + rm -f config.mk ${DISTFILE} installdirs: -install: ${TARGET} +proginstall: ${TARGET} ${INSTALL} -d ${DESTDIR}${SBINDIR} ${INSTALL} -m ${BINMODE} resolvconf ${DESTDIR}${SBINDIR} ${INSTALL} -d ${DESTDIR}${SYSCONFDIR} @@ -49,18 +65,21 @@ install: ${TARGET} ${INSTALL} -m ${DOCMODE} resolvconf.conf ${DESTDIR}${SYSCONFDIR} ${INSTALL} -d ${DESTDIR}${LIBEXECDIR} ${INSTALL} -m ${DOCMODE} ${SUBSCRIBERS} ${DESTDIR}${LIBEXECDIR} + +maninstall: ${INSTALL} -d ${DESTDIR}${MANDIR}/man8 ${INSTALL} -m ${MANMODE} resolvconf.8 ${DESTDIR}${MANDIR}/man8 ${INSTALL} -d ${DESTDIR}${MANDIR}/man5 ${INSTALL} -m ${MANMODE} resolvconf.conf.5 ${DESTDIR}${MANDIR}/man5 +install: proginstall maninstall + import: - rm -rf /tmp/${PKG} - ${INSTALL} -d /tmp/${PKG} - cp README ${SRCS} /tmp/${PKG} - -dist: import - cp configure Makefile resolvconf.conf /tmp/${PKG} - tar cvjpf ${PKG}.tar.bz2 -C /tmp ${PKG} - rm -rf /tmp/${PKG} - ls -l ${PKG}.tar.bz2 + rm -rf /tmp/${DISTPREFIX} + ${INSTALL} -d /tmp/${DISTPREFIX} + cp README ${SRCS} /tmp/${DISPREFIX} + +dist: + fossil tarball --name ${DISTPREFIX} ${FOSSILID} ${DISTFILEGZ} + gunzip -c ${DISTFILEGZ} | bzip2 >${DISTFILE} + rm ${DISTFILEGZ} Copied: stable/10/contrib/openresolv/config-null.mk (from r282434, head/contrib/openresolv/config-null.mk) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/contrib/openresolv/config-null.mk Mon May 11 01:33:34 2015 (r282746, copy of r282434, head/contrib/openresolv/config-null.mk) @@ -0,0 +1 @@ +# This space left intentionally blank Modified: stable/10/contrib/openresolv/configure ============================================================================== --- stable/10/contrib/openresolv/configure Mon May 11 00:16:32 2015 (r282745) +++ stable/10/contrib/openresolv/configure Mon May 11 01:33:34 2015 (r282746) @@ -9,7 +9,7 @@ TARGET= RESTARTCMD= RCDIR= -for x; do +for x do opt=${x%%=*} var=${x#*=} case "$opt" in @@ -18,7 +18,7 @@ for x; do --debug) DEBUG=$var;; --disable-debug) DEBUG=no;; --enable-debug) DEBUG=yes;; - --prefix) prefix=$var;; + --prefix) PREFIX=$var;; --sysconfdir) SYSCONFDIR=$var;; --bindir|--sbindir) SBINDIR=$var;; --libexecdir) LIBEXECDIR=$var;; @@ -41,68 +41,76 @@ for x; do esac done +if [ -z "$LIBEXECDIR" ]; then + printf "Checking for directory /libexec ... " + if [ -d /libexec ]; then + echo "yes" + LIBEXECDIR=$PREFIX/libexec/resolvconf + else + echo "no" + LIBEXECDIR=$PREFIX/lib/resolvconf + fi +fi +if [ -z "$RUNDIR" ]; then + printf "Checking for directory /run ... " + if [ -d /run ]; then + echo "yes" + RUNDIR=/run + else + echo "no" + RUNDIR=/var/run + fi +fi + : ${SED:=sed} -: ${PREFIX:=$prefix} : ${SYSCONFDIR:=$PREFIX/etc} : ${SBINDIR:=$PREFIX/sbin} -: ${LIBEXECDIR:=$PREFIX/libexec} +: ${LIBEXECDIR:=$PREFIX/libexec/resolvconf} : ${STATEDIR:=/var} : ${RUNDIR:=$STATEDIR/run} : ${MANDIR:=${PREFIX:-/usr}/share/man} eval SYSCONFDIR="$SYSCONFDIR" eval SBINDIR="$SBINDIR" -eval LIBEXECDIR="$LIBEXECDIR/resolvconf" +eval LIBEXECDIR="$LIBEXECDIR" eval VARDIR="$RUNDIR/resolvconf" eval MANDIR="$MANDIR" CONFIG_MK=config.mk if [ -z "$BUILD" ]; then - BUILD=`uname -m`-`uname -s | tr '[:upper:]' '[:lower:]'` -fi -if [ -z "$HOST" ]; then - [ -z "$TARGET" ] && TARGET=$BUILD - HOST=$TARGET -fi -if [ -z "$TARGET" ]; then - [ -z "$HOST" ] && HOST=$BUILD - TARGET=$HOST -fi - -# Debian and Slackware have linux in different places when dealing with -# autoconf, so we deal with that here. -if [ -z "$OS" ]; then - case "$TARGET" in - *-linux-*|linux-*|*-linux|linux) OS=linux;; - esac + # autoconf target triplet: cpu-vendor-os + BUILD=$(uname -m)-unknown-$(uname -s | tr '[:upper:]' '[:lower:]') fi +: ${HOST:=$BUILD} if [ -z "$OS" ]; then - # Derive OS from cpu-manufacturer-os-kernel - CPU=${TARGET%%-*} - REST=${TARGET#*-} + echo "Deriving operating system from ... $HOST" + # Derive OS from cpu-vendor-[kernel-]os + CPU=${HOST%%-*} + REST=${HOST#*-} if [ "$CPU" != "$REST" ]; then - MANU=${REST%%-*} + VENDOR=${REST%%-*} REST=${REST#*-} - if [ "$MANU" != "$REST" ]; then + if [ "$VENDOR" != "$REST" ]; then + # Use kernel if given, otherwise os OS=${REST%%-*} - REST=${REST#*-} - if [ "$OS" != "$REST" ]; then - KERNEL=${REST%%-*} - else - # 3 tupple - KERNEL=$OS - OS=$MANU - MANU= - fi else # 2 tupple - OS=$MANU - MANU= + OS=$VENDOR + VENDOR= fi fi + + # Work with cpu-kernel-os, ie Debian + case "$VENDOR" in + linux*|kfreebsd*) OS=$VENDOR; VENDOR= ;; + esac + # Special case + case "$OS" in + gnu*) OS=hurd;; # No HURD support as yet + esac fi echo "Configuring openresolv for ... $OS" @@ -118,17 +126,36 @@ for x in SYSCONFDIR SBINDIR LIBEXECDIR V echo "$x=$t $v" >>$CONFIG_MK done -if [ -e /etc/arch-release -a -d /etc/rc.d ]; then - echo "Overriding service status check for Arch Linux" - RCDIR=/etc/rc.d - RESTARTCMD="[ -e /var/run/daemons/\1 ] \&\& /etc/rc.d/\1 restart" - echo "yes" +if [ -z "$RESTARTCMD" ]; then + printf "Checking for systemd ... " + if [ -x /bin/systemctl ]; then + RESTARTCMD="/bin/systemctl try-restart \1" + echo "yes" + elif [ -x /usr/bin/systemctl ]; then + RESTARTCMD="/usr/bin/systemctl try-restart \1" + echo "yes" + else + echo "no" + fi +fi + +# Arch upgraded to systemd, so this check has to be just after systemd +# but higher than the others +if [ -z "$RESTARTCMD" ]; then + printf "Checking for Arch ... " + if [ -e /etc/arch-release -a -d /etc/rc.d ]; then + RCDIR=/etc/rc.d + RESTARTCMD="[ -e /var/run/daemons/\1 ] \&\& /etc/rc.d/\1 restart" + echo "yes" + else + echo "no" + fi fi if [ -z "$RESTARTCMD" ]; then printf "Checking for OpenRC ... " if [ -x /sbin/rc-service ]; then - RESTARTCMD="/sbin/rc-service -e \1 \&\& /sbin/rc-service \1 -- -Ds restart" + RESTARTCMD="if /sbin/rc-service -e \1; then /sbin/rc-service \1 -- -Ds restart; fi" echo "yes" else echo "no" @@ -138,7 +165,7 @@ if [ -z "$RESTARTCMD" ]; then printf "Checking for invoke-rc.d ... " if [ -x /usr/sbin/invoke-rc.d ]; then RCDIR=/etc/init.d - RESTARTCMD="/usr/sbin/invoke-rc.d --quiet \1 status >/dev/null 2>\&1 \&\& /usr/sbin/invoke-rc.d \1 restart" + RESTARTCMD="if /usr/sbin/invoke-rc.d --quiet \1 status >/dev/null 2>\&1; then /usr/sbin/invoke-rc.d \1 restart; fi" echo "yes" else echo "no" @@ -148,7 +175,19 @@ if [ -z "$RESTARTCMD" ]; then printf "Checking for service ... " if [ -x /sbin/service ]; then RCDIR=/etc/init.d - RESTARTCMD="/sbin/service \1 \&\& /sbin/service \1 restart" + RESTARTCMD="if /sbin/service \1; then /sbin/service \1 restart; fi" + echo "yes" + else + echo "no" + fi +fi +if [ -z "$RESTARTCMD" ]; then + printf "Checking for runit... " + if [ -x /bin/sv ]; then + RESTARTCMD="/bin/sv try-restart \1" + echo "yes" + elif [ -x /usr/bin/sv ]; then + RESTARTCMD="/usr/bin/sv try-restart \1" echo "yes" else echo "no" @@ -159,7 +198,7 @@ if [ -z "$RESTARTCMD" ]; then printf "Checking for $x ... " if [ -d $x ]; then RCDIR=$x - RESTARTCMD="$x/\1 status >/dev/null 2>\&1 \&\& $x/\1 restart" + RESTARTCMD="if $x/\1 status >/dev/null 2>\&1; then $x/\1 restart; fi" echo "yes" break else @@ -169,7 +208,7 @@ if [ -z "$RESTARTCMD" ]; then fi if [ -z "$RESTARTCMD" ]; then - echo "WARNING! No means of interacting with system services detected!" + echo "$0: WARNING: No means of interacting with system services detected!" exit 1 fi Modified: stable/10/contrib/openresolv/dnsmasq.in ============================================================================== --- stable/10/contrib/openresolv/dnsmasq.in Mon May 11 00:16:32 2015 (r282745) +++ stable/10/contrib/openresolv/dnsmasq.in Mon May 11 01:33:34 2015 (r282746) @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (c) 2007-2009 Roy Marples +# Copyright (c) 2007-2012 Roy Marples # All rights reserved # dnsmasq subscriber for resolvconf @@ -29,12 +29,13 @@ [ -f "@SYSCONFDIR@"/resolvconf.conf ] || exit 0 . "@SYSCONFDIR@/resolvconf.conf" || exit 1 [ -z "$dnsmasq_conf" -a -z "$dnsmasq_resolv" ] && exit 0 -[ -z "$RESOLVCONF" ] && eval "$(@PREFIX@/sbin/resolvconf -v)" +[ -z "$RESOLVCONF" ] && eval "$(@SBINDIR@/resolvconf -v)" NL=" " : ${dnsmasq_pid:=/var/run/dnsmasq.pid} [ -s "$dnsmasq_pid" ] || dnsmasq_pid=/var/run/dnsmasq/dnsmasq.pid +[ -s "$dnsmasq_pid" ] || unset dnsmasq_pid : ${dnsmasq_service:=dnsmasq} : ${dnsmasq_restart:=@RESTARTCMD ${dnsmasq_service}@} newconf="# Generated by resolvconf$NL" @@ -46,21 +47,18 @@ newresolv="$newconf" # so we need to validate a few things first. # Check for DBus support in the binary dbus=false -: ${dbus_pid:=/var/run/dbus/dbus.pid} -[ -s "$dbus_pid" ] || dbus_pid=/var/run/dbus.pid -[ -s "$dbus_pid" ] || dbus_pid=/var/run/dbus/pid -if [ -s "$dbus_pid" -a -s "$dnsmasq_pid" ]; then - if dnsmasq --version 2>/dev/null | \ - grep -q "^Compile time options.*[[:space:]]DBus[[:space:]]" +dbus_ex=false +dbus_introspect=$(dbus-send --print-reply --system \ + --dest=uk.org.thekelleys.dnsmasq \ + /uk/org/thekelleys/dnsmasq \ + org.freedesktop.DBus.Introspectable.Introspect \ + 2>/dev/null) +if [ $? = 0 ]; then + dbus=true + if printf %s "$dbus_introspect" | \ + grep -q '' then - # Sanity - check that dnsmasq and dbus are running - if kill -0 $(cat "$dbus_pid") 2>/dev/null && \ - kill -0 $(cat "$dnsmasq_pid") 2>/dev/null - then - dbus=true - newconf="$newconf$NL# Domain specific servers will" - newconf="$newconf be sent over dbus${NL}enable-dbus$NL" - fi + dbus_ex=true fi fi @@ -69,30 +67,97 @@ for n in $NAMESERVERS; do done dbusdest= +dbusdest_ex= +conf= for d in $DOMAINS; do dn="${d%%:*}" ns="${d#*:}" while [ -n "$ns" ]; do - if $dbus; then - SIFS=${IFS-y} OIFS=$IFS - IFS=. - set -- ${ns%%,*} - num="0x$(printf %02x $1 $2 $3 $4)" - if [ "$SIFS" = yi ]; then - unset IFS - else - IFS=$OIFS - fi - dbusdest="$dbusdest uint32:$(printf %u $num)" - dbusdest="$dbusdest string:$dn" - else - newconf="${newconf}server=/$dn/${ns%%,*}$NL" + n="${ns%%,*}" + if $dbus && ! $dbus_ex; then + case "$n" in + *.*.*.*) + SIFS=${IFS-y} OIFS=$IFS + IFS=. + set -- $n + num="0x$(printf %02x $1 $2 $3 $4)" + if [ "$SIFS" = y ]; then + unset IFS + else + IFS=$OIFS + fi + dbusdest="$dbusdest uint32:$(printf %u $num)" + dbusdest="$dbusdest string:$dn" + ;; + *:*%*) + # This version of dnsmasq won't accept + # scoped IPv6 addresses + dbus=false + ;; + *:*) + SIFS=${IFS-y} OIFS=$IFS bytes= front= back= + empty=false i=0 + IFS=: + set -- $n + while [ -n "$1" -o -n "$2" ]; do + addr="$1" + shift + if [ -z "$addr" ]; then + empty=true + continue + fi + i=$(($i + 1)) + while [ ${#addr} -lt 4 ]; do + addr="0${addr}" + done + byte1="$(printf %d 0x${addr%??})" + byte2="$(printf %d 0x${addr#??})" + if $empty; then + back="$back byte:$byte1 byte:$byte2" + else + front="$front byte:$byte1 byte:$byte2" + fi + done + while [ $i != 8 ]; do + i=$(($i + 1)) + front="$front byte:0 byte:0" + done + front="${front}$back" + if [ "$SIFS" = y ]; then + unset IFS + else + IFS=$OIFS + fi + dbusdest="${dbusdest}$front string:$dn" + ;; + *) + if ! $dbus_ex; then + dbus=false + fi + ;; + esac fi + dbusdest_ex="$dbusdest_ex${dbusdest_ex:+,}/$dn/$n" + conf="${conf}server=/$dn/$n$NL" [ "$ns" = "${ns#*,}" ] && break ns="${ns#*,}" done done +if $dbus; then + newconf="$newconf$NL# Domain specific servers will" + newconf="$newconf be sent over dbus${NL}" +else + newconf="$newconf$conf" +fi + +# Try to ensure that config dirs exist +if type config_mkdirs >/dev/null 2>&1; then + config_mkdirs "$dnsmasq_conf" "$dnsmasq_resolv" +else + @SBINDIR@/resolvconf -D "$dnsmasq_conf" "$dnsmasq_resolv" +fi + changed=false if [ -n "$dnsmasq_conf" ]; then if [ ! -f "$dnsmasq_conf" ] || \ @@ -103,14 +168,13 @@ if [ -n "$dnsmasq_conf" ]; then fi fi if [ -n "$dnsmasq_resolv" ]; then + # dnsmasq polls this file so no need to set changed=true if [ -f "$dnsmasq_resolv" ]; then if [ "$(cat "$dnsmasq_resolv")" != "$(printf %s "$newresolv")" ] then - changed=true printf %s "$newresolv" >"$dnsmasq_resolv" fi else - # dnsmasq polls this file so no need to set changed=true printf %s "$newresolv" >"$dnsmasq_resolv" fi fi @@ -119,9 +183,20 @@ if $changed; then eval $dnsmasq_restart fi if $dbus; then - $changed || kill -HUP $(cat "$dnsmasq_pid") + if [ -s "$dnsmasq_pid" ]; then + $changed || kill -HUP $(cat "$dnsmasq_pid") + fi # Send even if empty so old servers are cleared + if $dbus_ex; then + method=SetDomainServers + if [ -n "$dbusdest_ex" ]; then + dbusdest_ex="array:string:$dbusdest_ex" + fi + dbusdest="$dbusdest_ex" + else + method=SetServers + fi dbus-send --system --dest=uk.org.thekelleys.dnsmasq \ - /uk/org/thekelleys/dnsmasq uk.org.thekelleys.SetServers \ + /uk/org/thekelleys/dnsmasq uk.org.thekelleys.$method \ $dbusdest fi Modified: stable/10/contrib/openresolv/libc.in ============================================================================== --- stable/10/contrib/openresolv/libc.in Mon May 11 00:16:32 2015 (r282745) +++ stable/10/contrib/openresolv/libc.in Mon May 11 01:33:34 2015 (r282746) @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (c) 2007-2009 Roy Marples +# Copyright (c) 2007-2014 Roy Marples # All rights reserved # libc subscriber for resolvconf @@ -36,18 +36,18 @@ NL=" # sed may not be available, and this is faster on small files key_get_value() { - local key="$1" value= x= line= + local key="$1" x= line= shift if [ $# -eq 0 ]; then - while read line; do + while read -r line; do case "$line" in "$key"*) echo "${line##$key}";; esac done else - for x; do - while read line; do + for x do + while read -r line; do case "$line" in "$key"*) echo "${line##$key}";; esac @@ -56,6 +56,24 @@ key_get_value() fi } +keys_remove() +{ + local key x line found + + while read -r line; do + found=false + for key do + case "$line" in + "$key"*|"#"*|" "*|" "*|"") found=true;; + esac + $found && break + done + $found || echo "$line" + done +} + +local_nameservers="127.* 0.0.0.0 255.255.255.255 ::1" + # Support original resolvconf configuration layout # as well as the openresolv config file if [ -f "$SYSCONFDIR"/resolvconf.conf ]; then @@ -64,12 +82,11 @@ elif [ -d "$SYSCONFDIR"/resolvconf ]; th SYSCONFDIR="$SYSCONFDIR/resolvconf/resolv.conf.d" base="$SYSCONFDIR/resolv.conf.d/base" if [ -f "$base" ]; then - name_servers="$(key_get_value "nameserver " "$base")" - search_domains="$(key_get_value "search " "$base")" - if [ -z "$search_domains" ]; then - search_domains="$(key_get_value "domain " "$base")" - fi + prepend_nameservers="$(key_get_value "nameserver " "$base")" + domain="$(key_get_value "domain " "$base")" + prepend_search="$(key_get_value "search " "$base")" resolv_conf_options="$(key_get_value "options " "$base")" + resolv_conf_sortlist="$(key_get_value "sortlist " "$base")" fi if [ -f "$SYSCONFDIR"/resolv.conf.d/head ]; then resolv_conf_head="$(cat "${SYSCONFDIR}"/resolv.conf.d/head)" @@ -81,7 +98,7 @@ fi : ${resolv_conf:=/etc/resolv.conf} : ${libc_service:=nscd} : ${libc_restart:=@RESTARTCMD ${libc_service}@} -: ${list_resolv:=@PREFIX@/sbin/resolvconf -l} +: ${list_resolv:=@SBINDIR@/resolvconf -l} if [ "${resolv_conf_head-x}" = x -a -f "$SYSCONFDIR"/resolv.conf.head ]; then resolv_conf_head="$(cat "${SYSCONFDIR}"/resolv.conf.head)" fi @@ -89,6 +106,9 @@ if [ "${resolv_conf_tail-x}" = x -a -f " resolv_conf_tail="$(cat "$SYSCONFDIR"/resolv.conf.tail)" fi +backup=true +signature="# Generated by resolvconf" + uniqify() { local result= @@ -104,6 +124,7 @@ uniqify() case "${resolv_conf_passthrough:-NO}" in [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1) + backup=false newest= for conf in "$IFACEDIR"/*; do if [ -z "$newest" -o "$conf" -nt "$newest" ]; then @@ -113,31 +134,70 @@ case "${resolv_conf_passthrough:-NO}" in [ -z "$newest" ] && exit 0 newconf="$(cat "$newest")$NL" ;; +/dev/null|[Nn][Uu][Ll][Ll]) + : ${resolv_conf_local_only:=NO} + if [ "$local_nameservers" = "127.* 0.0.0.0 255.255.255.255 ::1" ]; then + local_nameservers= + fi + # Need to overwrite our variables. + eval "$(@SBINDIR@/resolvconf -V)" + ;; + +*) + [ -z "$RESOLVCONF" ] && eval "$(@SBINDIR@/resolvconf -v)" + ;; +esac +case "${resolv_conf_passthrough:-NO}" in +[Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1) ;; *) - [ -z "$RESOLVCONF" ] && eval "$(@PREFIX@/sbin/resolvconf -v)" - newsearch="$(uniqify $search_domains $SEARCH $search_domains_append)" + : ${domain:=$DOMAIN} + newsearch="$(uniqify $prepend_search $SEARCH $append_search)" NS="$LOCALNAMESERVERS $NAMESERVERS" - newns="$(uniqify $name_servers $NS $name_servers_append)" + newns= + gotlocal=false + for n in $(uniqify $prepend_nameservers $NS $append_nameservers); do + add=true + islocal=false + for l in $local_nameservers; do + case "$n" in + $l) islocal=true; gotlocal=true; break;; + esac + done + if ! $islocal; then + case "${resolv_conf_local_only:-YES}" in + [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1) + $gotlocal && add=false;; + esac + fi + $add && newns="$newns $n" + done # Hold our new resolv.conf in a variable to save on temporary files - newconf="# Generated by resolvconf$NL" + newconf="$signature$NL" if [ -n "$resolv_conf_head" ]; then newconf="$newconf$resolv_conf_head$NL" fi - [ -n "$newsearch" ] && newconf="${newconf}search $newsearch$NL" + + [ -n "$domain" ] && newconf="${newconf}domain $domain$NL" + if [ -n "$newsearch" -a "$newsearch" != "$domain" ]; then + newconf="${newconf}search $newsearch$NL" + fi for n in $newns; do newconf="${newconf}nameserver $n$NL" done - # Now get any configured options - opts="$resolv_conf_options${resolv_conf_options:+ }" - opts="$opts$($list_resolv | key_get_value "options ")" - if [ -n "$opts" ]; then - newconf="${newconf}options" - for opt in $(uniqify $opts); do - newconf="${newconf} $opt" - done - newconf="$newconf$NL" + # Now add anything we don't care about such as sortlist and options + stuff="$($list_resolv | keys_remove nameserver domain search)" + if [ -n "$stuff" ]; then + newconf="$newconf$stuff$NL" + fi + + # Append any user defined ones + if [ -n "$resolv_conf_options" ]; then + newconf="${newconf}options $resolv_conf_options$NL" + fi + if [ -n "$resolv_conf_sortlist" ]; then + newconf="${newconf}sortlist $resolv_conf_sortlist$NL" fi if [ -n "$resolv_conf_tail" ]; then @@ -151,6 +211,22 @@ if [ -e "$resolv_conf" ]; then [ "$(cat "$resolv_conf")" = "$(printf %s "$newconf")" ] && exit 0 fi +# Change is good. +# If the old file does not have our signature, back it up. +# If the new file just has our signature, restore the backup. +if $backup; then + if [ "$newconf" = "$signature$NL" ]; then + if [ -e "$resolv_conf.bak" ]; then + newconf="$(cat "$resolv_conf.bak")" + fi + elif [ -e "$resolv_conf" ]; then + read line <"$resolv_conf" + if [ "$line" != "$signature" ]; then + cp "$resolv_conf" "$resolv_conf.bak" + fi + fi +fi + # Create our resolv.conf now (umask 022; echo "$newconf" >"$resolv_conf") eval $libc_restart @@ -162,7 +238,7 @@ for script in "$LIBEXECDIR"/libc.d/*; do if [ -x "$script" ]; then "$script" "$@" else - (. "$script" "$@") + (. "$script") fi retval=$(($retval + $?)) fi Modified: stable/10/contrib/openresolv/named.in ============================================================================== --- stable/10/contrib/openresolv/named.in Mon May 11 00:16:32 2015 (r282745) +++ stable/10/contrib/openresolv/named.in Mon May 11 01:33:34 2015 (r282746) @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (c) 2007-2009 Roy Marples +# Copyright (c) 2007-2012 Roy Marples # All rights reserved # named subscriber for resolvconf @@ -29,7 +29,7 @@ [ -f "@SYSCONFDIR@"/resolvconf.conf ] || exit 0 . "@SYSCONFDIR@/resolvconf.conf" || exit 1 [ -z "$named_zones" -a -z "$named_options" ] && exit 0 -[ -z "$RESOLVCONF" ] && eval "$(@PREFIX@/sbin/resolvconf -v)" +[ -z "$RESOLVCONF" ] && eval "$(@SBINDIR@/resolvconf -v)" NL=" " @@ -40,6 +40,9 @@ then if [ -x "@RCDIR@"/bind9 ]; then # Debian and derivatives named_service=bind9 + elif [ -x "@RCDIR@"/rc.bind ]; then + # Slackware + named_service=rc.bind fi fi : ${named_service:=named} @@ -71,6 +74,13 @@ for d in $DOMAINS; do newzones="$newzones };$NL};$NL" done +# Try to ensure that config dirs exist +if type config_mkdirs >/dev/null 2>&1; then + config_mkdirs "$named_options" "$named_zones" +else + @SBINDIR@/resolvconf -D "$named_options" "$named_zones" +fi + # No point in changing files or reloading bind if the end result has not # changed changed=false Copied: stable/10/contrib/openresolv/pdns_recursor.in (from r282434, head/contrib/openresolv/pdns_recursor.in) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/contrib/openresolv/pdns_recursor.in Mon May 11 01:33:34 2015 (r282746, copy of r282434, head/contrib/openresolv/pdns_recursor.in) @@ -0,0 +1,72 @@ +#!/bin/sh +# Copyright (c) 2009-2011 Roy Marples +# All rights reserved + +# PowerDNS Recursor subscriber for resolvconf + +# 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. +# +# 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. + +[ -f "@SYSCONFDIR@"/resolvconf.conf ] || exit 0 +. "@SYSCONFDIR@/resolvconf.conf" || exit 1 +[ -z "$pdns_zones" ] && exit 0 +[ -z "$RESOLVCONF" ] && eval "$(@SBINDIR@/resolvconf -v)" +NL=" +" + +: ${pdns_service:=pdns_recursor} +: ${pdns_restart:=@RESTARTCMD ${pdns_service}@} + +newzones= + +# pds_recursor does not present support global forward servers, which +# does limit it's usefulness somewhat. +# If it did, the below code can be enabled, or something like it. +#for n in $NAMESERVERS; do +# newzones="$newzones${newzones:+,}$n" +#done +#[ -n "$newzones" ] && newzones=".=$newzones$NL" + +for d in $DOMAINS; do + newns= + ns="${d#*:}" + while [ -n "$ns" ]; do + newns="$newns${newns:+,}${ns%%,*}" + [ "$ns" = "${ns#*,}" ] && break + ns="${ns#*,}" + done + [ -n "$newns" ] && newzones="$newzones${d%%:*}=$newns$NL" +done + +# Try to ensure that config dirs exist +if type config_mkdirs >/dev/null 2>&1; then + config_mkdirs "$pdnsd_zones" +else + @SBINDIR@/resolvconf -D "$pdnsd_zones" +fi + +if [ ! -f "$pdns_zones" ] || \ + [ "$(cat "$pdns_zones")" != "$(printf %s "$newzones")" ] +then + printf %s "$newzones" >"$pdns_zones" + eval $pdns_restart +fi Modified: stable/10/contrib/openresolv/pdnsd.in ============================================================================== --- stable/10/contrib/openresolv/pdnsd.in Mon May 11 00:16:32 2015 (r282745) +++ stable/10/contrib/openresolv/pdnsd.in Mon May 11 01:33:34 2015 (r282746) @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (c) 2010 Roy Marples +# Copyright (c) 2010-2013 Roy Marples # All rights reserved # pdnsd subscriber for resolvconf @@ -29,7 +29,9 @@ [ -f "@SYSCONFDIR@"/resolvconf.conf ] || exit 0 . "@SYSCONFDIR@/resolvconf.conf" || exit 1 [ -z "$pdnsd_conf" -a -z "$pdnsd_resolv" ] && exit 0 -[ -z "$RESOLVCONF" ] && eval "$(@PREFIX@/sbin/resolvconf -v)" +[ -z "$RESOLVCONF" ] && eval "$(@SBINDIR@/resolvconf -v)" +NL=" +" : ${pdnsd_restart:=pdnsd-ctl config $pdnsd_conf} signature="# Generated by resolvconf" @@ -46,7 +48,7 @@ remove_markers() sed "/^$m1/,/^$m2/d" $@ else for x; do - while read line; do + while read -r line; do case "$line" in "$m1"*) in_marker=1;; "$m2"*) in_marker=0;; @@ -80,24 +82,32 @@ change_file() return 0 } -newresolv="# Generated by resolvconf\n" +newresolv="# Generated by resolvconf$NL" changed=false +# Try to ensure that config dirs exist +if type config_mkdirs >/dev/null 2>&1; then + config_mkdirs "$pdnsd_resolv" "$pdnsd_conf" +else + @SBINDIR@/resolvconf -D "$pdnsd_resolv" "$pdnsd_conf" +fi + if [ -n "$pdnsd_resolv" ]; then for n in $NAMESERVERS; do - newresolv="${newresolv}nameserver $n\n" + newresolv="${newresolv}nameserver $n$NL" done fi -if [ -n "$pdnsd_conf" ]; then +# Only modify the configuration if it exists and we can write to it +if [ -w "$pdnsd_conf" ]; then cf="$pdnsd_conf.new" newconf= if [ -z "$pdnsd_resolv" ]; then - newconf="${newconf}server {\n" - newconf="${newconf}\tlabel=resolvconf;\n" + newconf="${newconf}server {$NL" + newconf="${newconf} label=resolvconf;$NL" if [ -n "$NAMESERVERS" ]; then - newconf="${newconf}\tip=" + newconf="${newconf} ip=" first=true for n in $NAMESERVERS; do if $first; then @@ -107,16 +117,16 @@ if [ -n "$pdnsd_conf" ]; then fi newconf="$newconf$n" done - newconf="${newconf};\n" + newconf="${newconf};$NL" fi - newconf="${newconf}}\n" + newconf="${newconf}}$NL" fi for d in $DOMAINS; do - newconf="${newconf}server {\n" - newconf="${newconf}\tinclude=.${d%%:*}.;\n" - newconf="${newconf}\tpolicy=excluded;\n" - newconf="${newconf}\tip=" + newconf="${newconf}server {$NL" + newconf="${newconf} include=.${d%%:*}.;$NL" + newconf="${newconf} policy=excluded;$NL" + newconf="${newconf} ip=" ns="${d#*:}" while [ -n "$ns" ]; do newconf="${newconf}${ns%%,*}" @@ -124,7 +134,7 @@ if [ -n "$pdnsd_conf" ]; then ns="${ns#*,}" newconf="${newconf}," done - newconf="${newconf};\n}\n" + newconf="${newconf};$NL}$NL" done rm -f "$cf" @@ -136,7 +146,7 @@ if [ -n "$pdnsd_conf" ]; then fi if change_file "$pdnsd_conf" "$cf"; then changed=true - fi + fi fi if [ -n "$pdnsd_resolv" ]; then Modified: stable/10/contrib/openresolv/resolvconf.8.in ============================================================================== --- stable/10/contrib/openresolv/resolvconf.8.in Mon May 11 00:16:32 2015 (r282745) +++ stable/10/contrib/openresolv/resolvconf.8.in Mon May 11 01:33:34 2015 (r282746) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2007-2009 Roy Marples +.\" Copyright (c) 2007-2015 Roy Marples .\" All rights reserved .\" .\" Redistribution and use in source and binary forms, with or without @@ -22,8 +22,8 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd December 3, 2009 -.Dt RESOLVCONF 8 SMM *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon May 11 01:55:43 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 31B2480; Mon, 11 May 2015 01:55:43 +0000 (UTC) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "vps1.elischer.org", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id F1F92173E; Mon, 11 May 2015 01:55:42 +0000 (UTC) Received: from Julian-MBP3.local (ppp121-45-241-118.lns20.per4.internode.on.net [121.45.241.118]) (authenticated bits=0) by vps1.elischer.org (8.14.9/8.14.9) with ESMTP id t4B1tU5M062878 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Sun, 10 May 2015 18:55:33 -0700 (PDT) (envelope-from julian@freebsd.org) Message-ID: <55500C0D.7090802@freebsd.org> Date: Mon, 11 May 2015 09:55:25 +0800 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Mark Johnston , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r282744 - in head/sys/cddl/dev/dtrace: amd64 i386 References: <201505102227.t4AMRn1g007294@svn.freebsd.org> In-Reply-To: <201505102227.t4AMRn1g007294@svn.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2015 01:55:43 -0000 On 5/11/15 6:27 AM, Mark Johnston wrote: > Author: markj > Date: Sun May 10 22:27:48 2015 > New Revision: 282744 > URL: https://svnweb.freebsd.org/changeset/base/282744 > > Log: > Remove some commented-out upstream code for handling traps from usermode > DTrace probes. This handling is already done in trap() on i386 and amd64. I take issue with the implied assertion that upstream code that is not needed for FreeBSD should be removed. Commented out upstream code makes it easier to merge in changes from upstream. it allows patches to be applied and for a lot less worry on the part of the merger. If the code is not there, and there is an upstream change to it, one has to ask "is there equivalent code somewhere else that needs to be patched instead?" But if there is just a #ifndef __FreeBSD__ /* this code is not needed in FreeBSD because ...*/ blah #endif /*__FreeBSD__ this code is not needed in FreeBSD */ then the merger has a much easier task. I've just gone through large code merge (where FreeBSD was "upstream") and the cases there the original FreebSD code was still present but #Ifdef'd out were SO MUCH easier to handle. > > Modified: > head/sys/cddl/dev/dtrace/amd64/dtrace_subr.c > head/sys/cddl/dev/dtrace/i386/dtrace_subr.c > > Modified: head/sys/cddl/dev/dtrace/amd64/dtrace_subr.c > ============================================================================== > --- head/sys/cddl/dev/dtrace/amd64/dtrace_subr.c Sun May 10 22:21:00 2015 (r282743) > +++ head/sys/cddl/dev/dtrace/amd64/dtrace_subr.c Sun May 10 22:27:48 2015 (r282744) > @@ -142,114 +142,6 @@ dtrace_sync(void) > } > > #ifdef notyet > -int (*dtrace_pid_probe_ptr)(struct regs *); > -int (*dtrace_return_probe_ptr)(struct regs *); > - > -void > -dtrace_user_probe(struct regs *rp, caddr_t addr, processorid_t cpuid) > -{ > - krwlock_t *rwp; > - proc_t *p = curproc; > - extern void trap(struct regs *, caddr_t, processorid_t); > - > - if (USERMODE(rp->r_cs) || (rp->r_ps & PS_VM)) { > - if (curthread->t_cred != p->p_cred) { > - cred_t *oldcred = curthread->t_cred; > - /* > - * DTrace accesses t_cred in probe context. t_cred > - * must always be either NULL, or point to a valid, > - * allocated cred structure. > - */ > - curthread->t_cred = crgetcred(); > - crfree(oldcred); > - } > - } > - > - if (rp->r_trapno == T_DTRACE_RET) { > - uint8_t step = curthread->t_dtrace_step; > - uint8_t ret = curthread->t_dtrace_ret; > - uintptr_t npc = curthread->t_dtrace_npc; > - > - if (curthread->t_dtrace_ast) { > - aston(curthread); > - curthread->t_sig_check = 1; > - } > - > - /* > - * Clear all user tracing flags. > - */ > - curthread->t_dtrace_ft = 0; > - > - /* > - * If we weren't expecting to take a return probe trap, kill > - * the process as though it had just executed an unassigned > - * trap instruction. > - */ > - if (step == 0) { > - tsignal(curthread, SIGILL); > - return; > - } > - > - /* > - * If we hit this trap unrelated to a return probe, we're > - * just here to reset the AST flag since we deferred a signal > - * until after we logically single-stepped the instruction we > - * copied out. > - */ > - if (ret == 0) { > - rp->r_pc = npc; > - return; > - } > - > - /* > - * We need to wait until after we've called the > - * dtrace_return_probe_ptr function pointer to set %pc. > - */ > - rwp = &CPU->cpu_ft_lock; > - rw_enter(rwp, RW_READER); > - if (dtrace_return_probe_ptr != NULL) > - (void) (*dtrace_return_probe_ptr)(rp); > - rw_exit(rwp); > - rp->r_pc = npc; > - > - } else if (rp->r_trapno == T_BPTFLT) { > - uint8_t instr; > - rwp = &CPU->cpu_ft_lock; > - > - /* > - * The DTrace fasttrap provider uses the breakpoint trap > - * (int 3). We let DTrace take the first crack at handling > - * this trap; if it's not a probe that DTrace knowns about, > - * we call into the trap() routine to handle it like a > - * breakpoint placed by a conventional debugger. > - */ > - rw_enter(rwp, RW_READER); > - if (dtrace_pid_probe_ptr != NULL && > - (*dtrace_pid_probe_ptr)(rp) == 0) { > - rw_exit(rwp); > - return; > - } > - rw_exit(rwp); > - > - /* > - * If the instruction that caused the breakpoint trap doesn't > - * look like an int 3 anymore, it may be that this tracepoint > - * was removed just after the user thread executed it. In > - * that case, return to user land to retry the instuction. > - */ > - if (fuword8((void *)(rp->r_pc - 1), &instr) == 0 && > - instr != FASTTRAP_INSTR) { > - rp->r_pc--; > - return; > - } > - > - trap(rp, addr, cpuid); > - > - } else { > - trap(rp, addr, cpuid); > - } > -} > - > void > dtrace_safe_synchronous_signal(void) > { > > Modified: head/sys/cddl/dev/dtrace/i386/dtrace_subr.c > ============================================================================== > --- head/sys/cddl/dev/dtrace/i386/dtrace_subr.c Sun May 10 22:21:00 2015 (r282743) > +++ head/sys/cddl/dev/dtrace/i386/dtrace_subr.c Sun May 10 22:27:48 2015 (r282744) > @@ -143,122 +143,6 @@ dtrace_sync(void) > } > > #ifdef notyet > -int (*dtrace_fasttrap_probe_ptr)(struct regs *); > -int (*dtrace_pid_probe_ptr)(struct regs *); > -int (*dtrace_return_probe_ptr)(struct regs *); > - > -void > -dtrace_user_probe(struct regs *rp, caddr_t addr, processorid_t cpuid) > -{ > - krwlock_t *rwp; > - proc_t *p = curproc; > - extern void trap(struct regs *, caddr_t, processorid_t); > - > - if (USERMODE(rp->r_cs) || (rp->r_ps & PS_VM)) { > - if (curthread->t_cred != p->p_cred) { > - cred_t *oldcred = curthread->t_cred; > - /* > - * DTrace accesses t_cred in probe context. t_cred > - * must always be either NULL, or point to a valid, > - * allocated cred structure. > - */ > - curthread->t_cred = crgetcred(); > - crfree(oldcred); > - } > - } > - > - if (rp->r_trapno == T_DTRACE_RET) { > - uint8_t step = curthread->t_dtrace_step; > - uint8_t ret = curthread->t_dtrace_ret; > - uintptr_t npc = curthread->t_dtrace_npc; > - > - if (curthread->t_dtrace_ast) { > - aston(curthread); > - curthread->t_sig_check = 1; > - } > - > - /* > - * Clear all user tracing flags. > - */ > - curthread->t_dtrace_ft = 0; > - > - /* > - * If we weren't expecting to take a return probe trap, kill > - * the process as though it had just executed an unassigned > - * trap instruction. > - */ > - if (step == 0) { > - tsignal(curthread, SIGILL); > - return; > - } > - > - /* > - * If we hit this trap unrelated to a return probe, we're > - * just here to reset the AST flag since we deferred a signal > - * until after we logically single-stepped the instruction we > - * copied out. > - */ > - if (ret == 0) { > - rp->r_pc = npc; > - return; > - } > - > - /* > - * We need to wait until after we've called the > - * dtrace_return_probe_ptr function pointer to set %pc. > - */ > - rwp = &CPU->cpu_ft_lock; > - rw_enter(rwp, RW_READER); > - if (dtrace_return_probe_ptr != NULL) > - (void) (*dtrace_return_probe_ptr)(rp); > - rw_exit(rwp); > - rp->r_pc = npc; > - > - } else if (rp->r_trapno == T_DTRACE_PROBE) { > - rwp = &CPU->cpu_ft_lock; > - rw_enter(rwp, RW_READER); > - if (dtrace_fasttrap_probe_ptr != NULL) > - (void) (*dtrace_fasttrap_probe_ptr)(rp); > - rw_exit(rwp); > - > - } else if (rp->r_trapno == T_BPTFLT) { > - uint8_t instr; > - rwp = &CPU->cpu_ft_lock; > - > - /* > - * The DTrace fasttrap provider uses the breakpoint trap > - * (int 3). We let DTrace take the first crack at handling > - * this trap; if it's not a probe that DTrace knowns about, > - * we call into the trap() routine to handle it like a > - * breakpoint placed by a conventional debugger. > - */ > - rw_enter(rwp, RW_READER); > - if (dtrace_pid_probe_ptr != NULL && > - (*dtrace_pid_probe_ptr)(rp) == 0) { > - rw_exit(rwp); > - return; > - } > - rw_exit(rwp); > - > - /* > - * If the instruction that caused the breakpoint trap doesn't > - * look like an int 3 anymore, it may be that this tracepoint > - * was removed just after the user thread executed it. In > - * that case, return to user land to retry the instuction. > - */ > - if (fuword8((void *)(rp->r_pc - 1), &instr) == 0 && > - instr != FASTTRAP_INSTR) { > - rp->r_pc--; > - return; > - } > - > - trap(rp, addr, cpuid); > - > - } else { > - trap(rp, addr, cpuid); > - } > -} > - > void > dtrace_safe_synchronous_signal(void) > { > > From owner-svn-src-all@FreeBSD.ORG Mon May 11 02:48:02 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D63446D2; Mon, 11 May 2015 02:48:01 +0000 (UTC) Received: from mail-pd0-x22a.google.com (mail-pd0-x22a.google.com [IPv6:2607:f8b0:400e:c02::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 B00F91C21; Mon, 11 May 2015 02:48:01 +0000 (UTC) Received: by pdea3 with SMTP id a3so136539916pde.3; Sun, 10 May 2015 19:48:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=lMEEclmenH9JiqB5ISHCsATiLwrrSpWZW1Ejp5xIKOc=; b=mtA9bt62HpbnOcn0VizoG7pdMlHlTFZ7UmZX3ngxNR6IHpAmPmJWfe7ZOv+xv9HOCp h+gUTQV2a/9xRL8YWB/HmeYZxfe9sVzhvwnc1FBuVfgxnUKWhTGA90yk7eiHfAES0RnH HbGwLXtQFXjligVxf6WzDRyCC6ugwr8jysmZxx2M2DGTrM7f+9ne4LOckJwQn/PHdG55 KHAjc+WNhcz2n9WjPJJdhb0leAGrTyUjQOSwVxXV1X4wnPWOX0wB51yLk00+S2e/p6Mx uUCGo5cXwVOQ60B5fA0SQchvEZ0QSHuKy4gfZB9yakc6eR7BoxY9UgLG1mdRqyF++3zj VEDA== X-Received: by 10.66.221.34 with SMTP id qb2mr15504711pac.42.1431312481156; Sun, 10 May 2015 19:48:01 -0700 (PDT) Received: from raichu ([104.232.114.184]) by mx.google.com with ESMTPSA id sl9sm11413297pac.41.2015.05.10.19.47.59 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 10 May 2015 19:47:59 -0700 (PDT) Sender: Mark Johnston Date: Sun, 10 May 2015 19:47:55 -0700 From: Mark Johnston To: Julian Elischer Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r282744 - in head/sys/cddl/dev/dtrace: amd64 i386 Message-ID: <20150511024754.GA65659@raichu> References: <201505102227.t4AMRn1g007294@svn.freebsd.org> <55500C0D.7090802@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <55500C0D.7090802@freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2015 02:48:02 -0000 On Mon, May 11, 2015 at 09:55:25AM +0800, Julian Elischer wrote: > On 5/11/15 6:27 AM, Mark Johnston wrote: > > Author: markj > > Date: Sun May 10 22:27:48 2015 > > New Revision: 282744 > > URL: https://svnweb.freebsd.org/changeset/base/282744 > > > > Log: > > Remove some commented-out upstream code for handling traps from usermode > > DTrace probes. This handling is already done in trap() on i386 and amd64. > > I take issue with the implied assertion that upstream code that is > not needed for FreeBSD should be removed. I don't agree with that assertion either. The truly upstream DTrace code, i.e. the DTrace code that is updated by merges from the vendor branch, lives under sys/cddl/contrib/opensolaris. When DTrace was imported, some parts of it had to be modified significantly enough that they were placed outside the vendor import dir, in sys/cddl/dev/. In particular, this code isn't modified by MFVs and is maintained solely within FreeBSD. I try quite hard to keep the upstream code around for changes under the former directory, but I don't see the value in keeping upstream code under the latter. In many cases it is substantially different from what we actually use and just ends up being confusing. It also becomes inconsistent as different arches gain DTrace support and add varying amounts of upstream code to their MD DTrace files. See r281916 for an example where the (dead) upstream code was kept for years and copied around before it was realized that it wasn't needed. This split isn't ideal, but upstream DTrace development has been inactive enough that it doesn't end up being too painful an issue, IMHO. > > Commented out upstream code makes it easier to merge in changes from > upstream. > it allows patches to be applied and for a lot less worry on the part > of the merger. > If the code is not there, and there is an upstream change to it, one > has to ask > "is there equivalent code somewhere else that needs to be patched > instead?" > But if there is just a > > #ifndef __FreeBSD__ /* this code is not needed in FreeBSD because ...*/ > blah > #endif /*__FreeBSD__ this code is not needed in FreeBSD */ > > then the merger has a much easier task. I've caught several cases (specifically in merging DTrace code) where the upstream code block is so large the merger didn't even notice the #ifndef __FreeBSD__ was present and thought that the merge was fine because the upstream diff applied cleanly. > > I've just gone through large code merge (where FreeBSD was "upstream") > and the cases > there the original FreebSD code was still present but #Ifdef'd out > were SO MUCH easier > to handle. From owner-svn-src-all@FreeBSD.ORG Mon May 11 03:33:10 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3C5BBE7C; Mon, 11 May 2015 03:33:10 +0000 (UTC) Received: from mail.ignoranthack.me (ignoranthack.me [199.102.79.106]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0765111C3; Mon, 11 May 2015 03:33:09 +0000 (UTC) Received: from [192.168.200.208] (unknown [50.136.155.142]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: sbruno@ignoranthack.me) by mail.ignoranthack.me (Postfix) with ESMTPSA id 72F9C193B83; Mon, 11 May 2015 03:33:07 +0000 (UTC) Message-ID: <555022F2.9010801@ignoranthack.me> Date: Sun, 10 May 2015 20:33:06 -0700 From: Sean Bruno Reply-To: sbruno@freebsd.org User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Thomas Quinot , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r282736 - in head: . lib/libmd References: <201505102121.t4ALLr3A076661@svn.freebsd.org> In-Reply-To: <201505102121.t4ALLr3A076661@svn.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2015 03:33:10 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 05/10/15 14:21, Thomas Quinot wrote: > Author: thomas Date: Sun May 10 21:21:52 2015 New Revision: 282736 > URL: https://svnweb.freebsd.org/changeset/base/282736 > > Log: Unbreak build following rev. 282726 > I already pinged Thomas about this privately, but in the event anyone is looking, MIPS is still broken after this commit. Probably all the GCC based targets are, if I read this correctly. make -s -j8 buildworld TARGET=mips TARGET_ARCH=mips ... ===> libexec/rtld-elf/tests/libpythagoras (all) make[6]: /var/tmp/mips.mips/home/sbruno/bsd/fbsd_head/libexec/rtld-elf/tests/libp ythagoras/.depend, 11: ignoring stale .depend for /var/tmp/mips.mips/home/sbruno/bsd/fbsd_head/tmp/usr/tests/libexec/rtld- elf/libm.a ===> kerberos5/lib/libgssapi_krb5 (all) ===> libexec/rtld-elf/tests/target (all) ===> rescue/rescue/date/tests (depend) /var/tmp/mips.mips/home/sbruno/bsd/fbsd_head/tmp/usr/lib/libcrypt.so: undefined reference to `_libmd_MD4Init' /var/tmp/mips.mips/home/sbruno/bsd/fbsd_head/tmp/usr/lib/libcrypt.so: undefined reference to `_libmd_SHA256_Init' /var/tmp/mips.mips/home/sbruno/bsd/fbsd_head/tmp/usr/lib/libcrypt.so: undefined reference to `_libmd_MD5Final' /var/tmp/mips.mips/home/sbruno/bsd/fbsd_head/tmp/usr/lib/libcrypt.so: undefined reference to `_libmd_MD5Init' /var/tmp/mips.mips/home/sbruno/bsd/fbsd_head/tmp/usr/lib/libcrypt.so: undefined reference to `_libmd_MD4Update' /var/tmp/mips.mips/home/sbruno/bsd/fbsd_head/tmp/usr/lib/libcrypt.so: undefined reference to `_libmd_SHA512_version' /var/tmp/mips.mips/home/sbruno/bsd/fbsd_head/tmp/usr/lib/libcrypt.so: undefined reference to `_libmd_SHA512_Init' /var/tmp/mips.mips/home/sbruno/bsd/fbsd_head/tmp/usr/lib/libcrypt.so: undefined reference to `_libmd_MD4Pad' /var/tmp/mips.mips/home/sbruno/bsd/fbsd_head/tmp/usr/lib/libcrypt.so: undefined reference to `_libmd_SHA256_Final' /var/tmp/mips.mips/home/sbruno/bsd/fbsd_head/tmp/usr/lib/libcrypt.so: undefined reference to `_libmd_MD5Update' /var/tmp/mips.mips/home/sbruno/bsd/fbsd_head/tmp/usr/lib/libcrypt.so: undefined reference to `_libmd_SHA256_version' /var/tmp/mips.mips/home/sbruno/bsd/fbsd_head/tmp/usr/lib/libcrypt.so: undefined reference to `_libmd_SHA256_Update' /var/tmp/mips.mips/home/sbruno/bsd/fbsd_head/tmp/usr/lib/libcrypt.so: undefined reference to `_libmd_SHA512_Final' /var/tmp/mips.mips/home/sbruno/bsd/fbsd_head/tmp/usr/lib/libcrypt.so: undefined reference to `_libmd_MD5Pad' /var/tmp/mips.mips/home/sbruno/bsd/fbsd_head/tmp/usr/lib/libcrypt.so: undefined reference to `_libmd_SHA512_Update' /var/tmp/mips.mips/home/sbruno/bsd/fbsd_head/tmp/usr/lib/libcrypt.so: undefined reference to `_libmd_MD4Final' > (Makefile.inc1): add dependency of xinstall on libmd to avoid > failure of parallel bootstrap. > > (lib/libmd/*.h): do not redefine symbols if already defined as > macros (libcrypt uses the same sources internally, redefining > symbols with a prefix of its own). > > Fixes build failures caused by previous change to libmd. > > Reported by: ian Pointy hat to: thomas > > Modified: head/Makefile.inc1 head/lib/libmd/md4.h > head/lib/libmd/md5.h head/lib/libmd/ripemd.h head/lib/libmd/sha.h > head/lib/libmd/sha256.h head/lib/libmd/sha512.h > > Modified: head/Makefile.inc1 > ====================================================================== ======== > > - --- head/Makefile.inc1 Sun May 10 21:05:32 2015 (r282735) > +++ head/Makefile.inc1 Sun May 10 21:21:52 2015 (r282736) @@ > -1361,6 +1361,9 @@ _kerberos5_bootstrap_tools= \ .ORDER: > ${_kerberos5_bootstrap_tools:C/^/${_bt}-/g} .endif > > +# Rebuild up-to-date libmd for xinstall +${_bt}-usr.bin/xinstall: > ${_bt}-lib/libmd + bootstrap-tools: .PHONY > > # Please document (add comment) why something is in > 'bootstrap-tools'. > > Modified: head/lib/libmd/md4.h > ====================================================================== ======== > > - --- head/lib/libmd/md4.h Sun May 10 21:05:32 2015 (r282735) > +++ head/lib/libmd/md4.h Sun May 10 21:21:52 2015 (r282736) @@ > -38,14 +38,30 @@ __BEGIN_DECLS > > /* Ensure libmd symbols do not clash with libcrypto */ > > +#ifndef MD4Init #define MD4Init _libmd_MD4Init +#endif +#ifndef > MD4Update #define MD4Update _libmd_MD4Update +#endif +#ifndef > MD4Pad #define MD4Pad _libmd_MD4Pad +#endif +#ifndef MD4Final > #define MD4Final _libmd_MD4Final +#endif +#ifndef MD4End #define > MD4End _libmd_MD4End +#endif +#ifndef MD4File #define MD4File > _libmd_MD4File +#endif +#ifndef MD4FileChunk #define MD4FileChunk > _libmd_MD4FileChunk +#endif +#ifndef MD4Data #define MD4Data > _libmd_MD4Data +#endif > > void MD4Init(MD4_CTX *); void MD4Update(MD4_CTX *, const void > *, unsigned int); > > Modified: head/lib/libmd/md5.h > ====================================================================== ======== > > - --- head/lib/libmd/md5.h Sun May 10 21:05:32 2015 (r282735) > +++ head/lib/libmd/md5.h Sun May 10 21:21:52 2015 (r282736) @@ > -7,15 +7,33 @@ > > /* Ensure libmd symbols do not clash with libcrypto */ > > +#ifndef MD5Init #define MD5Init _libmd_MD5Init +#endif +#ifndef > MD5Update #define MD5Update _libmd_MD5Update +#endif +#ifndef > MD5Pad #define MD5Pad _libmd_MD5Pad +#endif +#ifndef MD5Final > #define MD5Final _libmd_MD5Final +#endif +#ifndef MD5Transform > #define MD5Transform _libmd_MD5Transform +#endif +#ifndef MD5End > #define MD5End _libmd_MD5End +#endif +#ifndef MD5File #define > MD5File _libmd_MD5File +#endif +#ifndef MD5FileChunk #define > MD5FileChunk _libmd_MD5FileChunk +#endif +#ifndef MD5Data #define > MD5Data _libmd_MD5Data +#endif > > #endif > > > Modified: head/lib/libmd/ripemd.h > ====================================================================== ======== > > - --- head/lib/libmd/ripemd.h Sun May 10 21:05:32 2015 (r282735) > +++ head/lib/libmd/ripemd.h Sun May 10 21:21:52 2015 (r282736) @@ > -84,17 +84,37 @@ __BEGIN_DECLS > > /* Ensure libmd symbols do not clash with libcrypto */ > > +#ifndef RIPEMD160_Init #define RIPEMD160_Init > _libmd_RIPEMD160_Init +#endif +#ifndef RIPEMD160_Update #define > RIPEMD160_Update _libmd_RIPEMD160_Update +#endif +#ifndef > RIPEMD160_Final #define RIPEMD160_Final _libmd_RIPEMD160_Final > +#endif +#ifndef RIPEMD160_End #define RIPEMD160_End > _libmd_RIPEMD160_End +#endif +#ifndef RIPEMD160_File #define > RIPEMD160_File _libmd_RIPEMD160_File +#endif +#ifndef > RIPEMD160_FileChunk #define RIPEMD160_FileChunk > _libmd_RIPEMD160_FileChunk +#endif +#ifndef RIPEMD160_Data #define > RIPEMD160_Data _libmd_RIPEMD160_Data +#endif > > +#ifndef RIPEMD160_Transform #define RIPEMD160_Transform > _libmd_RIPEMD160_Transform +#endif +#ifndef RMD160_version #define > RMD160_version _libmd_RMD160_version +#endif +#ifndef > ripemd160_block #define ripemd160_block _libmd_ripemd160_block > +#endif > > void RIPEMD160_Init(RIPEMD160_CTX *c); void > RIPEMD160_Update(RIPEMD160_CTX *c, const void *data, > > Modified: head/lib/libmd/sha.h > ====================================================================== ======== > > - --- head/lib/libmd/sha.h Sun May 10 21:05:32 2015 (r282735) > +++ head/lib/libmd/sha.h Sun May 10 21:21:52 2015 (r282736) @@ > -82,29 +82,69 @@ __BEGIN_DECLS > > /* Ensure libmd symbols do not clash with libcrypto */ > > +#ifndef SHA_Init #define SHA_Init _libmd_SHA_Init +#endif +#ifndef > SHA_Update #define SHA_Update _libmd_SHA_Update +#endif +#ifndef > SHA_Final #define SHA_Final _libmd_SHA_Final +#endif +#ifndef > SHA_End #define SHA_End _libmd_SHA_End +#endif +#ifndef SHA_File > #define SHA_File _libmd_SHA_File +#endif +#ifndef SHA_FileChunk > #define SHA_FileChunk _libmd_SHA_FileChunk +#endif +#ifndef > SHA_Data #define SHA_Data _libmd_SHA_Data +#endif > > +#ifndef SHA_Transform #define SHA_Transform _libmd_SHA_Transform > +#endif +#ifndef SHA_version #define SHA_version > _libmd_SHA_version +#endif +#ifndef sha_block #define sha_block > _libmd_sha_block +#endif > > +#ifndef SHA1_Init #define SHA1_Init _libmd_SHA1_Init +#endif > +#ifndef SHA1_Update #define SHA1_Update _libmd_SHA1_Update > +#endif +#ifndef SHA1_Final #define SHA1_Final _libmd_SHA1_Final > +#endif +#ifndef SHA1_End #define SHA1_End _libmd_SHA1_End +#endif > +#ifndef SHA1_File #define SHA1_File _libmd_SHA1_File +#endif > +#ifndef SHA1_FileChunk #define SHA1_FileChunk > _libmd_SHA1_FileChunk +#endif +#ifndef SHA1_Data #define SHA1_Data > _libmd_SHA1_Data +#endif > > +#ifndef SHA1_Transform #define SHA1_Transform > _libmd_SHA1_Transform +#endif +#ifndef SHA1_version #define > SHA1_version _libmd_SHA1_version +#endif +#ifndef sha1_block > #define sha1_block _libmd_sha1_block +#endif > > void SHA_Init(SHA_CTX *c); void SHA_Update(SHA_CTX *c, const void > *data, size_t len); > > Modified: head/lib/libmd/sha256.h > ====================================================================== ======== > > - --- head/lib/libmd/sha256.h Sun May 10 21:05:32 2015 (r282735) > +++ head/lib/libmd/sha256.h Sun May 10 21:21:52 2015 (r282736) @@ > -41,16 +41,34 @@ __BEGIN_DECLS > > /* Ensure libmd symbols do not clash with libcrypto */ > > +#ifndef SHA256_Init #define SHA256_Init _libmd_SHA256_Init > +#endif +#ifndef SHA256_Update #define SHA256_Update > _libmd_SHA256_Update +#endif +#ifndef SHA256_Final #define > SHA256_Final _libmd_SHA256_Final +#endif +#ifndef SHA256_End > #define SHA256_End _libmd_SHA256_End +#endif +#ifndef SHA256_File > #define SHA256_File _libmd_SHA256_File +#endif +#ifndef > SHA256_FileChunk #define SHA256_FileChunk _libmd_SHA256_FileChunk > +#endif +#ifndef SHA256_Data #define SHA256_Data > _libmd_SHA256_Data +#endif > > +#ifndef SHA256_Transform #define SHA256_Transform > _libmd_SHA256_Transform +#endif +#ifndef SHA256_version #define > SHA256_version _libmd_SHA256_version +#endif > > void SHA256_Init(SHA256_CTX *); void SHA256_Update(SHA256_CTX *, > const void *, size_t); > > Modified: head/lib/libmd/sha512.h > ====================================================================== ======== > > - --- head/lib/libmd/sha512.h Sun May 10 21:05:32 2015 (r282735) > +++ head/lib/libmd/sha512.h Sun May 10 21:21:52 2015 (r282736) @@ > -41,16 +41,34 @@ __BEGIN_DECLS > > /* Ensure libmd symbols do not clash with libcrypto */ > > +#ifndef SHA512_Init #define SHA512_Init _libmd_SHA512_Init > +#endif +#ifndef SHA512_Update #define SHA512_Update > _libmd_SHA512_Update +#endif +#ifndef SHA512_Final #define > SHA512_Final _libmd_SHA512_Final +#endif +#ifndef SHA512_End > #define SHA512_End _libmd_SHA512_End +#endif +#ifndef SHA512_File > #define SHA512_File _libmd_SHA512_File +#endif +#ifndef > SHA512_FileChunk #define SHA512_FileChunk _libmd_SHA512_FileChunk > +#endif +#ifndef SHA512_Data #define SHA512_Data > _libmd_SHA512_Data +#endif > > +#ifndef SHA512_Transform #define SHA512_Transform > _libmd_SHA512_Transform +#endif +#ifndef SHA512_version #define > SHA512_version _libmd_SHA512_version +#endif > > void SHA512_Init(SHA512_CTX *); void SHA512_Update(SHA512_CTX *, > const void *, size_t); > > > -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQF8BAEBCgBmBQJVUCLvXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRCQUFENDYzMkU3MTIxREU4RDIwOTk3REQx MjAxRUZDQTFFNzI3RTY0AAoJEBIB78oecn5k8LoH/17hvkIpwPPLfH+izbUSfHn1 BzlRDivNSzgFVbey8tKpl3/iGtpXkB/tgjIxPgXdZGDCn3CZTHRWehPNzDPWCKaV d8f3MEFKTU9e0i2n5DE3sZ//Wmg2Am9u9iwIVQhcGeClUPCsmSpcFt0OBRYHXtPQ ygdNXc8YsKBNzPsevmiUK4fM7Ls0FFDom3Vo4RrxSQciWt9Srt9R0BtF8RwFuJ4O rk/oNJV7vQkpQDi3e6jipqNTdK55s7P1IDXBlXm7THsJ21JnHIBvh3yFVALN8lI0 9JH3YhQ/EjXJS/widel3JroE7x1L/J4zrRovFunRsOtoZl9ZEpMCDhO8hIK9/2s= =wJ7q -----END PGP SIGNATURE----- From owner-svn-src-all@FreeBSD.ORG Mon May 11 03:52:10 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1C4301E7; Mon, 11 May 2015 03:52:10 +0000 (UTC) Received: from mail-oi0-x22e.google.com (mail-oi0-x22e.google.com [IPv6:2607:f8b0:4003: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 D84E81381; Mon, 11 May 2015 03:52:09 +0000 (UTC) Received: by oign205 with SMTP id n205so95202407oig.2; Sun, 10 May 2015 20:52:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:mime-version:content-type:from:in-reply-to:date:cc :message-id:references:to; bh=m2XC6bAX2qCF/lBuEYLKVr2KW1Al8z3GMeD17w7gGWI=; b=PdGCfx5NzSPiRtt2pC+BvXUiyXZRotGms/LVrX4j3OiQ8RM3GuD8r3bBhMGJC8d5Qk /22jB3+LQrQNGhs2V9eq93cGjD6iMKqLDntKE2UW6zCdaH90EhgR5K792U5tbF4ycchw b2lO56AQDLwUuMjMYmx7tjcRx/oNb9xmWRsXH/U9TCAJlURYzOnpRHI1vCM01VZNyNRO XdnZwzJLiwJMiNxIP3Aozmi5SsqH4fzwtQMsDk+dfIM84t7pDavyY6CD1LnLsUveXRnf Vfzo2etcOgr0KGzgbeqwfgbBwZDm4++W8dXyV3gzJchExTRX4iKg/ja+8bqiMMKLBHIZ +FxA== X-Received: by 10.60.33.74 with SMTP id p10mr6656582oei.62.1431316328609; Sun, 10 May 2015 20:52:08 -0700 (PDT) Received: from [192.168.20.5] (c-98-247-240-204.hsd1.wa.comcast.net. [98.247.240.204]) by mx.google.com with ESMTPSA id fz4sm8241159obb.7.2015.05.10.20.52.07 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 10 May 2015 20:52:07 -0700 (PDT) Subject: Re: svn commit: r282736 - in head: . lib/libmd Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Content-Type: multipart/signed; boundary="Apple-Mail=_40D959F7-C7BD-40A9-B528-9D78BFC47225"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5b6 From: Garrett Cooper In-Reply-To: <555022F2.9010801@ignoranthack.me> Date: Sun, 10 May 2015 20:52:04 -0700 Cc: Thomas Quinot , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <569241B1-48FA-429D-83C4-C9B52C0FDF38@gmail.com> References: <201505102121.t4ALLr3A076661@svn.freebsd.org> <555022F2.9010801@ignoranthack.me> To: sbruno@freebsd.org X-Mailer: Apple Mail (2.1878.6) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2015 03:52:10 -0000 --Apple-Mail=_40D959F7-C7BD-40A9-B528-9D78BFC47225 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 On May 10, 2015, at 20:33, Sean Bruno wrote: > Signed PGP part > On 05/10/15 14:21, Thomas Quinot wrote: > > Author: thomas Date: Sun May 10 21:21:52 2015 New Revision: 282736 > > URL: https://svnweb.freebsd.org/changeset/base/282736 > > > > Log: Unbreak build following rev. 282726 > > >=20 > I already pinged Thomas about this privately, but in the event anyone > is looking, MIPS is still broken after this commit. >=20 > Probably all the GCC based targets are, if I read this correctly. >=20 > make -s -j8 buildworld TARGET=3Dmips TARGET_ARCH=3Dmips Are you using a GCC "bootstrap=94 compiler with --sysroot set = appropriately? Thanks! -NGie --Apple-Mail=_40D959F7-C7BD-40A9-B528-9D78BFC47225 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 iQEcBAEBCgAGBQJVUCdlAAoJEMZr5QU6S73exmcH/255ua9dKCmlSciWeLZFdDg0 Aa+okOrfMB4eCH/v5qEkhBdG5Lj2QgwGbWEq0RrkmggAmSQ6grnW7B4CjaWILRb6 q1qlFgTm3v2o8NyFyuZR8HJYS8H+bbXoquQfGF411+Z/kSfj+ebVoFcEe7lwxNhd nRbd/ptgp1jLFqbLylqWOxYSpdg1qfKx21Ar5rIOVNovT7d2ZP7v3soOUOzWAS4h suNQJQV80VFXu78WlCNcZL+8cFMGJqoEiamoFYpHO7FXs0wh2YE08mzM/6DAJHY+ 52sH/eehaVhTtItsmUkb6AyMpSumb9yDSNln/K5x4hGdSK34Xu12ZgQijaMzmio= =zW2h -----END PGP SIGNATURE----- --Apple-Mail=_40D959F7-C7BD-40A9-B528-9D78BFC47225-- From owner-svn-src-all@FreeBSD.ORG Mon May 11 04:02:46 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A9EC140E; Mon, 11 May 2015 04:02:46 +0000 (UTC) Received: from mail.ignoranthack.me (ignoranthack.me [199.102.79.106]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8953114AA; Mon, 11 May 2015 04:02:46 +0000 (UTC) Received: from [192.168.200.208] (unknown [50.136.155.142]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: sbruno@ignoranthack.me) by mail.ignoranthack.me (Postfix) with ESMTPSA id 1405C193656; Mon, 11 May 2015 04:02:45 +0000 (UTC) Message-ID: <555029E4.9040609@ignoranthack.me> Date: Sun, 10 May 2015 21:02:44 -0700 From: Sean Bruno Reply-To: sbruno@freebsd.org User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Garrett Cooper CC: Thomas Quinot , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r282736 - in head: . lib/libmd References: <201505102121.t4ALLr3A076661@svn.freebsd.org> <555022F2.9010801@ignoranthack.me> <569241B1-48FA-429D-83C4-C9B52C0FDF38@gmail.com> In-Reply-To: <569241B1-48FA-429D-83C4-C9B52C0FDF38@gmail.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2015 04:02:46 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 05/10/15 20:52, Garrett Cooper wrote: > On May 10, 2015, at 20:33, Sean Bruno > wrote: > >> Signed PGP part On 05/10/15 14:21, Thomas Quinot wrote: >>> Author: thomas Date: Sun May 10 21:21:52 2015 New Revision: >>> 282736 URL: https://svnweb.freebsd.org/changeset/base/282736 >>> >>> Log: Unbreak build following rev. 282726 >>> >> >> I already pinged Thomas about this privately, but in the event >> anyone is looking, MIPS is still broken after this commit. >> >> Probably all the GCC based targets are, if I read this >> correctly. >> >> make -s -j8 buildworld TARGET=mips TARGET_ARCH=mips > > Are you using a GCC "bootstrap” compiler with --sysroot set > appropriately? Thanks! -NGie > Uh, no. I've never had to do that, ever. Using the builtin gcc in base . sean -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQF8BAEBCgBmBQJVUCnhXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRCQUFENDYzMkU3MTIxREU4RDIwOTk3REQx MjAxRUZDQTFFNzI3RTY0AAoJEBIB78oecn5k5WQIAMvO+srQAshYTZTzuVVPcS07 CuklzsoY3jCdEUKygJdGqRKzM4T6F180kI37bLAscgCnUaAQ65NlhFvZa5E6dBjW 1ZwxATQ4EY/sBAVMQxQF0SqGNIYypZ0vL4QIG4OOEhbn1eiok0lT2VoWoCVjPM81 tOw1DjhOBK2fEgzOiTTGuSwVpRxAmCWaqlT5BDlkkuVSQQ1AfNP+ayAmM2um1BdC MK+Ag5GEZu67IYXUWzDzyoqcyfe1cK+7ynzsucF3u7rWW7L6GnRjHwBdw+O5uLoX RoXVABBSpuKHD9++BTqnwyyyPpbJJ8qrCgg+XLcTjzCfpW1HG6yXGi5HcF+Ptic= =Lmue -----END PGP SIGNATURE----- From owner-svn-src-all@FreeBSD.ORG Mon May 11 04:03:48 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7D019551; Mon, 11 May 2015 04:03:48 +0000 (UTC) Received: from mail-oi0-x232.google.com (mail-oi0-x232.google.com [IPv6:2607:f8b0:4003: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 3A6DD14B0; Mon, 11 May 2015 04:03:48 +0000 (UTC) Received: by oign205 with SMTP id n205so95326254oig.2; Sun, 10 May 2015 21:03:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:mime-version:content-type:from:in-reply-to:date:cc :message-id:references:to; bh=b5uBDOo0hq7PgB1Lwf9uk/de4Y2qibX/gViaij/yfhY=; b=JfFBqA4q2A8OSOohLRGcbzpqYw6j+IQQNTIMjgq//MQe66k74kOkr8sdwtMCbUBJ6z tgL1dZ1iwdse8KL0++W+Woy3JCKseRfJ0aeCk+moi7kRxp7avPvaVwri0CWOsu+aSNOh 3TGVSoFgUT/B89OmgJfEZS8AvTO8ndn9FVnLKgInEHcyvXOEXPfg/1iqIewqmVqd618p BOwCwOO2g8CxmAqOd7HCadZgstcxAIWV2ZWGSXX4I4DwAWwZSzBZdZVpjqDsmru3dqOp FqxXYzLQUgdEPmq43w+M25Ac/L3cuiuln4aH1+EO6B3Dt6MK/mS8u3fd1pwEbq9UgKEU HoKA== X-Received: by 10.182.209.99 with SMTP id ml3mr6648611obc.20.1431317027379; Sun, 10 May 2015 21:03:47 -0700 (PDT) Received: from [192.168.20.5] (c-98-247-240-204.hsd1.wa.comcast.net. [98.247.240.204]) by mx.google.com with ESMTPSA id e3sm8248874obn.15.2015.05.10.21.03.45 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 10 May 2015 21:03:46 -0700 (PDT) Subject: Re: svn commit: r282736 - in head: . lib/libmd Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Content-Type: multipart/signed; boundary="Apple-Mail=_AAB6D75E-5228-470E-9250-3CAA944DFD08"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5b6 From: Garrett Cooper In-Reply-To: <555029E4.9040609@ignoranthack.me> Date: Sun, 10 May 2015 21:03:44 -0700 Cc: Thomas Quinot , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: References: <201505102121.t4ALLr3A076661@svn.freebsd.org> <555022F2.9010801@ignoranthack.me> <569241B1-48FA-429D-83C4-C9B52C0FDF38@gmail.com> <555029E4.9040609@ignoranthack.me> To: sbruno@freebsd.org X-Mailer: Apple Mail (2.1878.6) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2015 04:03:48 -0000 --Apple-Mail=_AAB6D75E-5228-470E-9250-3CAA944DFD08 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 On May 10, 2015, at 21:02, Sean Bruno wrote: > Signed PGP part > On 05/10/15 20:52, Garrett Cooper wrote: > > On May 10, 2015, at 20:33, Sean Bruno > > wrote: > > > >> Signed PGP part On 05/10/15 14:21, Thomas Quinot wrote: > >>> Author: thomas Date: Sun May 10 21:21:52 2015 New Revision: > >>> 282736 URL: https://svnweb.freebsd.org/changeset/base/282736 > >>> > >>> Log: Unbreak build following rev. 282726 > >>> > >> > >> I already pinged Thomas about this privately, but in the event > >> anyone is looking, MIPS is still broken after this commit. > >> > >> Probably all the GCC based targets are, if I read this > >> correctly. > >> > >> make -s -j8 buildworld TARGET=3Dmips TARGET_ARCH=3Dmips > > > > Are you using a GCC "bootstrap=94 compiler with --sysroot set > > appropriately? Thanks! -NGie > > >=20 > Uh, no. I've never had to do that, ever. Using the builtin gcc in = base And you=92re using MK_GCC_BOOTSTRAP? --Apple-Mail=_AAB6D75E-5228-470E-9250-3CAA944DFD08 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 iQEcBAEBCgAGBQJVUCogAAoJEMZr5QU6S73eNK0H/1SN7ZXAFZcHZ2+sqLxF5eFH 9SNLTlkmERvv42hcm0HfvEPCBC9qoqwQOsJnAvkbuYUlEfDYGPCl5zCyldb+L4wq ihCoqKfwhQV4h+4aZ5MgrDb7UG/BR4xsrBdaH78jWmYioUv8sO5yPQQtryzkZy8n rl/woyinVymcbWBYvamzJpYhAJfggDvOmgbtsklvI2HL6lQnImoyEfXZuInLHb8M dGarP2QYUwcUqKEqqr5RVAEDBdBT2SvccVcnDuGOIviFfRf2D5UD59QOPZkwU0wz 2QwpZALonw+r/l57Qic4oddjue8fjCoerUgKLcanHPYR+y5+3pVRz2ZCMWaWmtQ= =B8Dp -----END PGP SIGNATURE----- --Apple-Mail=_AAB6D75E-5228-470E-9250-3CAA944DFD08-- From owner-svn-src-all@FreeBSD.ORG Mon May 11 04:42:55 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 633BDAB5; Mon, 11 May 2015 04:42:55 +0000 (UTC) Received: from mail.ignoranthack.me (ignoranthack.me [199.102.79.106]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 41FDD181D; Mon, 11 May 2015 04:42:54 +0000 (UTC) Received: from [192.168.200.208] (unknown [50.136.155.142]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: sbruno@ignoranthack.me) by mail.ignoranthack.me (Postfix) with ESMTPSA id 8B434193A1A; Mon, 11 May 2015 04:42:53 +0000 (UTC) Message-ID: <5550334C.30103@ignoranthack.me> Date: Sun, 10 May 2015 21:42:52 -0700 From: Sean Bruno Reply-To: sbruno@freebsd.org User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Garrett Cooper CC: Thomas Quinot , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r282736 - in head: . lib/libmd References: <201505102121.t4ALLr3A076661@svn.freebsd.org> <555022F2.9010801@ignoranthack.me> <569241B1-48FA-429D-83C4-C9B52C0FDF38@gmail.com> <555029E4.9040609@ignoranthack.me> In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2015 04:42:55 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 05/10/15 21:03, Garrett Cooper wrote: > On May 10, 2015, at 21:02, Sean Bruno > wrote: > >> Signed PGP part On 05/10/15 20:52, Garrett Cooper wrote: >>> On May 10, 2015, at 20:33, Sean Bruno >>> wrote: >>> >>>> Signed PGP part On 05/10/15 14:21, Thomas Quinot wrote: >>>>> Author: thomas Date: Sun May 10 21:21:52 2015 New >>>>> Revision: 282736 URL: >>>>> https://svnweb.freebsd.org/changeset/base/282736 >>>>> >>>>> Log: Unbreak build following rev. 282726 >>>>> >>>> >>>> I already pinged Thomas about this privately, but in the >>>> event anyone is looking, MIPS is still broken after this >>>> commit. >>>> >>>> Probably all the GCC based targets are, if I read this >>>> correctly. >>>> >>>> make -s -j8 buildworld TARGET=mips TARGET_ARCH=mips >>> >>> Are you using a GCC "bootstrap” compiler with --sysroot set >>> appropriately? Thanks! -NGie >>> >> >> Uh, no. I've never had to do that, ever. Using the builtin gcc >> in base > > And you’re using MK_GCC_BOOTSTRAP? > Nope, AFAIK the mips/sparc64/powerpc targets are supposed to DTRT and have in the past. However, my build box is super old (february current) and might be contributing to this fallout? sean sean -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQF8BAEBCgBmBQJVUDNJXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRCQUFENDYzMkU3MTIxREU4RDIwOTk3REQx MjAxRUZDQTFFNzI3RTY0AAoJEBIB78oecn5kxIcH/31oySW1ITL+gUNoV4wIrMgI VsZm8CaseYzN96L4x9OhpqjKiAC0xnMsiiNAbqfLmTSbtAYyUGi9rS0EPy6q6Qqt zGAIO/TkSDDfjTBcVzVAkkZ60Cg1UNAXDzHMFzkAu2A7QW0Jdsvz7mDEK8coAiN2 tEiVGq1SeAlxsAyjqU7UVbvPYfsVzpLMoKup1PEQrPO+lVc1fJeFXMP3jvl3DUvL wbSjU4Q0hI31ZAT1SBlm4/uRsO3lYXPn8TVMisLXnKrxdUzgyXZt6UaUv7uWOfhf H8rt3cBfsiUgYxaUy37B7qTLcfSc28rztOneVmN8LzE9npAfP3snNvWnYPuCwrI= =bffz -----END PGP SIGNATURE----- From owner-svn-src-all@FreeBSD.ORG Mon May 11 04:54:57 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 560C8D0D; Mon, 11 May 2015 04:54:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 438B518FB; Mon, 11 May 2015 04:54:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4B4svZW001347; Mon, 11 May 2015 04:54:57 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4B4svut001346; Mon, 11 May 2015 04:54:57 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201505110454.t4B4svut001346@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 11 May 2015 04:54:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282747 - head/sbin/ifconfig 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.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2015 04:54:57 -0000 Author: ngie Date: Mon May 11 04:54:56 2015 New Revision: 282747 URL: https://svnweb.freebsd.org/changeset/base/282747 Log: Use MIN from sys/param.h instead of handrolling the macro Replace sys/types.h with sys/param.h per-style(9) MFC after: 3 days Sponsored by: EMC / Isilon Storage Division Modified: head/sbin/ifconfig/af_inet.c Modified: head/sbin/ifconfig/af_inet.c ============================================================================== --- head/sbin/ifconfig/af_inet.c Mon May 11 01:33:34 2015 (r282746) +++ head/sbin/ifconfig/af_inet.c Mon May 11 04:54:56 2015 (r282747) @@ -32,7 +32,7 @@ static const char rcsid[] = "$FreeBSD$"; #endif /* not lint */ -#include +#include #include #include #include @@ -100,7 +100,6 @@ static struct sockaddr_in *sintab[] = { static void in_getaddr(const char *s, int which) { -#define MIN(a,b) ((a)<(b)?(a):(b)) struct sockaddr_in *sin = sintab[which]; struct hostent *hp; struct netent *np; @@ -141,7 +140,6 @@ in_getaddr(const char *s, int which) sin->sin_addr = inet_makeaddr(np->n_net, INADDR_ANY); else errx(1, "%s: bad value", s); -#undef MIN } static void From owner-svn-src-all@FreeBSD.ORG Mon May 11 06:19:57 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 74CB5941; Mon, 11 May 2015 06:19:57 +0000 (UTC) Received: from melamine.cuivre.fr.eu.org (houdart.cuivre.fr.eu.org [81.57.40.110]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 31E201055; Mon, 11 May 2015 06:19:56 +0000 (UTC) Received: by melamine.cuivre.fr.eu.org (Postfix, from userid 1000) id 38AC0194D7; Mon, 11 May 2015 08:19:53 +0200 (CEST) Date: Mon, 11 May 2015 08:19:52 +0200 From: Thomas Quinot To: sbruno@freebsd.org Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r282736 - in head: . lib/libmd Message-ID: <20150511061952.GA38363@melamine.cuivre.fr.eu.org> References: <201505102121.t4ALLr3A076661@svn.freebsd.org> <555022F2.9010801@ignoranthack.me> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <555022F2.9010801@ignoranthack.me> X-message-flag: WARNING! Using Outlook can damage your computer. User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2015 06:19:57 -0000 * Sean Bruno, 2015-05-11 : > I already pinged Thomas about this privately, but in the event anyone > is looking, MIPS is still broken after this commit. > > Probably all the GCC based targets are, if I read this correctly. > > make -s -j8 buildworld TARGET=mips TARGET_ARCH=mips > ... > > ===> libexec/rtld-elf/tests/libpythagoras (all) > make[6]: > /var/tmp/mips.mips/home/sbruno/bsd/fbsd_head/libexec/rtld-elf/tests/libp > ythagoras/.depend, > 11: ignoring stale .depend for > /var/tmp/mips.mips/home/sbruno/bsd/fbsd_head/tmp/usr/tests/libexec/rtld- > elf/libm.a > ===> kerberos5/lib/libgssapi_krb5 (all) > ===> libexec/rtld-elf/tests/target (all) > ===> rescue/rescue/date/tests (depend) > /var/tmp/mips.mips/home/sbruno/bsd/fbsd_head/tmp/usr/lib/libcrypt.so: > undefined reference to `_libmd_MD4Init' Ack, trying to reproduce this one locally. Can you make a full build log available somewhere? Thanks! Thomas. From owner-svn-src-all@FreeBSD.ORG Mon May 11 07:54:43 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 20AEBA03; Mon, 11 May 2015 07:54:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0CBC71BB8; Mon, 11 May 2015 07:54:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4B7shdQ088187; Mon, 11 May 2015 07:54:43 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4B7seVh088151; Mon, 11 May 2015 07:54:40 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201505110754.t4B7seVh088151@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 11 May 2015 07:54:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r282748 - in stable/10/sys: cddl/compat/opensolaris/sys cddl/contrib/opensolaris/uts/common/dtrace cddl/contrib/opensolaris/uts/common/sys cddl/dev/cyclic cddl/dev/fbt cddl/dev/profile ... 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.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2015 07:54:43 -0000 Author: avg Date: Mon May 11 07:54:39 2015 New Revision: 282748 URL: https://svnweb.freebsd.org/changeset/base/282748 Log: MFC r275576: remove opensolaris cyclic code, replace with high-precision callouts Deleted: stable/10/sys/cddl/compat/opensolaris/sys/cyclic.h stable/10/sys/cddl/compat/opensolaris/sys/cyclic_impl.h stable/10/sys/cddl/dev/cyclic/ Modified: stable/10/sys/cddl/compat/opensolaris/sys/cpuvar.h stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h stable/10/sys/cddl/dev/fbt/fbt.c stable/10/sys/cddl/dev/profile/profile.c stable/10/sys/kern/kern_clocksource.c stable/10/sys/modules/Makefile stable/10/sys/modules/dtrace/Makefile.inc stable/10/sys/modules/dtrace/dtraceall/dtraceall.c stable/10/sys/sys/dtrace_bsd.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/compat/opensolaris/sys/cpuvar.h ============================================================================== --- stable/10/sys/cddl/compat/opensolaris/sys/cpuvar.h Mon May 11 04:54:56 2015 (r282747) +++ stable/10/sys/cddl/compat/opensolaris/sys/cpuvar.h Mon May 11 07:54:39 2015 (r282748) @@ -38,11 +38,8 @@ struct cyc_cpu; typedef struct { int cpuid; - struct cyc_cpu *cpu_cyclic; uint32_t cpu_flags; uint_t cpu_intr_actv; - uintptr_t cpu_profile_pc; - uintptr_t cpu_profile_upc; uintptr_t cpu_dtrace_caller; /* DTrace: caller, if any */ hrtime_t cpu_dtrace_chillmark; /* DTrace: chill mark time */ hrtime_t cpu_dtrace_chilled; /* DTrace: total chill time */ Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Mon May 11 04:54:56 2015 (r282747) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Mon May 11 07:54:39 2015 (r282748) @@ -17947,6 +17947,5 @@ SYSINIT(dtrace_anon_init, SI_SUB_DTRACE_ DEV_MODULE(dtrace, dtrace_modevent, NULL); MODULE_VERSION(dtrace, 1); -MODULE_DEPEND(dtrace, cyclic, 1, 1, 1); MODULE_DEPEND(dtrace, opensolaris, 1, 1, 1); #endif Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h Mon May 11 04:54:56 2015 (r282747) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h Mon May 11 07:54:39 2015 (r282748) @@ -57,6 +57,7 @@ extern "C" { #if defined(sun) #include #else +#include #include #include #include @@ -64,8 +65,8 @@ extern "C" { typedef int model_t; #endif #include -#include #if defined(sun) +#include #include #else #include Modified: stable/10/sys/cddl/dev/fbt/fbt.c ============================================================================== --- stable/10/sys/cddl/dev/fbt/fbt.c Mon May 11 04:54:56 2015 (r282747) +++ stable/10/sys/cddl/dev/fbt/fbt.c Mon May 11 07:54:39 2015 (r282748) @@ -428,13 +428,6 @@ fbt_provide_module(void *arg, modctl_t * return; /* - * The cyclic timer subsystem can be built as a module and DTrace - * depends on that, so it is ineligible too. - */ - if (strcmp(modname, "cyclic") == 0) - return; - - /* * To register with DTrace, a module must list 'dtrace' as a * dependency in order for the kernel linker to resolve * symbols like dtrace_register(). All modules with such a Modified: stable/10/sys/cddl/dev/profile/profile.c ============================================================================== --- stable/10/sys/cddl/dev/profile/profile.c Mon May 11 04:54:56 2015 (r282747) +++ stable/10/sys/cddl/dev/profile/profile.c Mon May 11 07:54:39 2015 (r282748) @@ -52,9 +52,9 @@ #include #include #include +#include #include -#include #include #include @@ -97,7 +97,7 @@ * allow for a manual override in case we get it completely wrong. */ #ifdef __amd64 -#define PROF_ARTIFICIAL_FRAMES 7 +#define PROF_ARTIFICIAL_FRAMES 10 #else #ifdef __i386 #define PROF_ARTIFICIAL_FRAMES 6 @@ -126,18 +126,30 @@ #define PROF_ARTIFICIAL_FRAMES 3 #endif +struct profile_probe_percpu; + typedef struct profile_probe { char prof_name[PROF_NAMELEN]; dtrace_id_t prof_id; int prof_kind; +#ifdef illumos hrtime_t prof_interval; cyclic_id_t prof_cyclic; +#else + sbintime_t prof_interval; + struct callout prof_cyclic; + sbintime_t prof_expected; + struct profile_probe_percpu **prof_pcpus; +#endif } profile_probe_t; typedef struct profile_probe_percpu { hrtime_t profc_expected; hrtime_t profc_interval; profile_probe_t *profc_probe; +#ifdef __FreeBSD__ + struct callout profc_cyclic; +#endif } profile_probe_percpu_t; static d_open_t profile_open; @@ -206,29 +218,92 @@ static dtrace_provider_id_t profile_id; static hrtime_t profile_interval_min = NANOSEC / 5000; /* 5000 hz */ static int profile_aframes = 0; /* override */ +static sbintime_t +nsec_to_sbt(hrtime_t nsec) +{ + time_t sec; + + /* + * We need to calculate nsec * 2^32 / 10^9 + * Seconds and nanoseconds are split to avoid overflow. + */ + sec = nsec / NANOSEC; + nsec = nsec % NANOSEC; + return (((sbintime_t)sec << 32) | ((sbintime_t)nsec << 32) / NANOSEC); +} + +static hrtime_t +sbt_to_nsec(sbintime_t sbt) +{ + + return ((sbt >> 32) * NANOSEC + + (((uint32_t)sbt * (hrtime_t)NANOSEC) >> 32)); +} + static void profile_fire(void *arg) { profile_probe_percpu_t *pcpu = arg; profile_probe_t *prof = pcpu->profc_probe; hrtime_t late; - solaris_cpu_t *c = &solaris_cpu[curcpu]; + struct trapframe *frame; + uintfptr_t pc, upc; +#ifdef illumos late = gethrtime() - pcpu->profc_expected; - pcpu->profc_expected += pcpu->profc_interval; +#else + late = sbt_to_nsec(sbinuptime() - pcpu->profc_expected); +#endif - dtrace_probe(prof->prof_id, c->cpu_profile_pc, - c->cpu_profile_upc, late, 0, 0); + pc = 0; + upc = 0; + + /* + * td_intr_frame can be unset if this is a catch up event + * after waking up from idle sleep. + * This can only happen on a CPU idle thread. + */ + frame = curthread->td_intr_frame; + if (frame != NULL) { + if (TRAPF_USERMODE(frame)) + upc = TRAPF_PC(frame); + else + pc = TRAPF_PC(frame); + } + dtrace_probe(prof->prof_id, pc, upc, late, 0, 0); + + pcpu->profc_expected += pcpu->profc_interval; + callout_schedule_sbt_curcpu(&pcpu->profc_cyclic, + pcpu->profc_expected, 0, C_DIRECT_EXEC | C_ABSOLUTE); } static void profile_tick(void *arg) { profile_probe_t *prof = arg; - solaris_cpu_t *c = &solaris_cpu[curcpu]; + struct trapframe *frame; + uintfptr_t pc, upc; + + pc = 0; + upc = 0; + + /* + * td_intr_frame can be unset if this is a catch up event + * after waking up from idle sleep. + * This can only happen on a CPU idle thread. + */ + frame = curthread->td_intr_frame; + if (frame != NULL) { + if (TRAPF_USERMODE(frame)) + upc = TRAPF_PC(frame); + else + pc = TRAPF_PC(frame); + } + dtrace_probe(prof->prof_id, pc, upc, 0, 0, 0); - dtrace_probe(prof->prof_id, c->cpu_profile_pc, - c->cpu_profile_upc, 0, 0, 0); + prof->prof_expected += prof->prof_interval; + callout_schedule_sbt(&prof->prof_cyclic, + prof->prof_expected, 0, C_DIRECT_EXEC | C_ABSOLUTE); } static void @@ -250,8 +325,13 @@ profile_create(hrtime_t interval, char * prof = kmem_zalloc(sizeof (profile_probe_t), KM_SLEEP); (void) strcpy(prof->prof_name, name); +#ifdef illumos prof->prof_interval = interval; prof->prof_cyclic = CYCLIC_NONE; +#else + prof->prof_interval = nsec_to_sbt(interval); + callout_init(&prof->prof_cyclic, CALLOUT_MPSAFE); +#endif prof->prof_kind = kind; prof->prof_id = dtrace_probe_create(profile_id, NULL, NULL, name, @@ -396,13 +476,18 @@ profile_destroy(void *arg, dtrace_id_t i { profile_probe_t *prof = parg; +#ifdef illumos ASSERT(prof->prof_cyclic == CYCLIC_NONE); +#else + ASSERT(!callout_active(&prof->prof_cyclic) && prof->prof_pcpus == NULL); +#endif kmem_free(prof, sizeof (profile_probe_t)); ASSERT(profile_total >= 1); atomic_add_32(&profile_total, -1); } +#ifdef illumos /*ARGSUSED*/ static void profile_online(void *arg, cpu_t *cpu, cyc_handler_t *hdlr, cyc_time_t *when) @@ -478,6 +563,81 @@ profile_disable(void *arg, dtrace_id_t i prof->prof_cyclic = CYCLIC_NONE; } +#else + +static void +profile_enable_omni(profile_probe_t *prof) +{ + profile_probe_percpu_t *pcpu; + int cpu; + + prof->prof_pcpus = kmem_zalloc((mp_maxid + 1) * sizeof(pcpu), KM_SLEEP); + CPU_FOREACH(cpu) { + pcpu = kmem_zalloc(sizeof(profile_probe_percpu_t), KM_SLEEP); + prof->prof_pcpus[cpu] = pcpu; + pcpu->profc_probe = prof; + pcpu->profc_expected = sbinuptime() + prof->prof_interval; + pcpu->profc_interval = prof->prof_interval; + callout_init(&pcpu->profc_cyclic, CALLOUT_MPSAFE); + callout_reset_sbt_on(&pcpu->profc_cyclic, + pcpu->profc_expected, 0, profile_fire, pcpu, + cpu, C_DIRECT_EXEC | C_ABSOLUTE); + } +} + +static void +profile_disable_omni(profile_probe_t *prof) +{ + profile_probe_percpu_t *pcpu; + int cpu; + + ASSERT(prof->prof_pcpus != NULL); + CPU_FOREACH(cpu) { + pcpu = prof->prof_pcpus[cpu]; + ASSERT(pcpu->profc_probe == prof); + ASSERT(callout_active(&pcpu->profc_cyclic)); + callout_stop(&pcpu->profc_cyclic); + callout_drain(&pcpu->profc_cyclic); + kmem_free(pcpu, sizeof(profile_probe_percpu_t)); + } + kmem_free(prof->prof_pcpus, (mp_maxid + 1) * sizeof(pcpu)); + prof->prof_pcpus = NULL; +} + +/* ARGSUSED */ +static void +profile_enable(void *arg, dtrace_id_t id, void *parg) +{ + profile_probe_t *prof = parg; + + if (prof->prof_kind == PROF_TICK) { + prof->prof_expected = sbinuptime() + prof->prof_interval; + callout_reset_sbt(&prof->prof_cyclic, + prof->prof_expected, 0, profile_tick, prof, + C_DIRECT_EXEC | C_ABSOLUTE); + } else { + ASSERT(prof->prof_kind == PROF_PROFILE); + profile_enable_omni(prof); + } +} + +/* ARGSUSED */ +static void +profile_disable(void *arg, dtrace_id_t id, void *parg) +{ + profile_probe_t *prof = parg; + + if (prof->prof_kind == PROF_TICK) { + ASSERT(callout_active(&prof->prof_cyclic)); + callout_stop(&prof->prof_cyclic); + callout_drain(&prof->prof_cyclic); + } else { + ASSERT(prof->prof_kind == PROF_PROFILE); + profile_disable_omni(prof); + } +} +#endif + static void profile_load(void *dummy) { @@ -541,5 +701,4 @@ SYSUNINIT(profile_unload, SI_SUB_DTRACE_ DEV_MODULE(profile, profile_modevent, NULL); MODULE_VERSION(profile, 1); MODULE_DEPEND(profile, dtrace, 1, 1, 1); -MODULE_DEPEND(profile, cyclic, 1, 1, 1); MODULE_DEPEND(profile, opensolaris, 1, 1, 1); Modified: stable/10/sys/kern/kern_clocksource.c ============================================================================== --- stable/10/sys/kern/kern_clocksource.c Mon May 11 04:54:56 2015 (r282747) +++ stable/10/sys/kern/kern_clocksource.c Mon May 11 07:54:39 2015 (r282748) @@ -55,11 +55,6 @@ __FBSDID("$FreeBSD$"); #include #include -#ifdef KDTRACE_HOOKS -#include -cyclic_clock_func_t cyclic_clock_func = NULL; -#endif - int cpu_deepest_sleep = 0; /* Deepest Cx state available. */ int cpu_disable_c2_sleep = 0; /* Timer dies in C2. */ int cpu_disable_c3_sleep = 0; /* Timer dies in C3. */ @@ -129,9 +124,6 @@ struct pcpu_state { sbintime_t nextprof; /* Next profclock() event. */ sbintime_t nextcall; /* Next callout event. */ sbintime_t nextcallopt; /* Next optional callout event. */ -#ifdef KDTRACE_HOOKS - sbintime_t nextcyc; /* Next OpenSolaris cyclics event. */ -#endif int ipi; /* This CPU needs IPI. */ int idle; /* This CPU is in idle mode. */ }; @@ -223,13 +215,6 @@ handleevents(sbintime_t now, int fake) callout_process(now); } -#ifdef KDTRACE_HOOKS - if (fake == 0 && now >= state->nextcyc && cyclic_clock_func != NULL) { - state->nextcyc = INT64_MAX; - (*cyclic_clock_func)(frame); - } -#endif - t = getnextcpuevent(0); ET_HW_LOCK(state); if (!busy) { @@ -275,10 +260,6 @@ getnextcpuevent(int idle) if (profiling && event > state->nextprof) event = state->nextprof; } -#ifdef KDTRACE_HOOKS - if (event > state->nextcyc) - event = state->nextcyc; -#endif return (event); } @@ -599,9 +580,6 @@ cpu_initclocks_bsp(void) CPU_FOREACH(cpu) { state = DPCPU_ID_PTR(cpu, timerstate); mtx_init(&state->et_hw_mtx, "et_hw_mtx", NULL, MTX_SPIN); -#ifdef KDTRACE_HOOKS - state->nextcyc = INT64_MAX; -#endif state->nextcall = INT64_MAX; state->nextcallopt = INT64_MAX; } @@ -820,41 +798,6 @@ cpu_et_frequency(struct eventtimer *et, ET_UNLOCK(); } -#ifdef KDTRACE_HOOKS -void -clocksource_cyc_set(const struct bintime *bt) -{ - sbintime_t now, t; - struct pcpu_state *state; - - /* Do not touch anything if somebody reconfiguring timers. */ - if (busy) - return; - t = bttosbt(*bt); - state = DPCPU_PTR(timerstate); - if (periodic) - now = state->now; - else - now = sbinuptime(); - - CTR5(KTR_SPARE2, "set_cyc at %d: now %d.%08x t %d.%08x", - curcpu, (int)(now >> 32), (u_int)(now & 0xffffffff), - (int)(t >> 32), (u_int)(t & 0xffffffff)); - - ET_HW_LOCK(state); - if (t == state->nextcyc) - goto done; - state->nextcyc = t; - if (t >= state->nextevent) - goto done; - state->nextevent = t; - if (!periodic) - loadtimer(now, 0); -done: - ET_HW_UNLOCK(state); -} -#endif - void cpu_new_callout(int cpu, sbintime_t bt, sbintime_t bt_opt) { Modified: stable/10/sys/modules/Makefile ============================================================================== --- stable/10/sys/modules/Makefile Mon May 11 04:54:56 2015 (r282747) +++ stable/10/sys/modules/Makefile Mon May 11 07:54:39 2015 (r282748) @@ -85,7 +85,6 @@ SUBDIR= \ ctl \ ${_cxgb} \ ${_cxgbe} \ - ${_cyclic} \ dc \ dcons \ dcons_crom \ @@ -498,9 +497,6 @@ _cp= cp _cpuctl= cpuctl _cpufreq= cpufreq _cs= cs -.if ${MK_CDDL} != "no" || defined(ALL_MODULES) -_cyclic= cyclic -.endif _dpms= dpms _drm= drm _drm2= drm2 @@ -847,9 +843,6 @@ _cardbus= cardbus _cbb= cbb _cfi= cfi _cpufreq= cpufreq -.if ${MK_CDDL} != "no" || defined(ALL_MODULES) -_cyclic= cyclic -.endif _drm= drm .if ${MK_CDDL} != "no" || defined(ALL_MODULES) _dtrace= dtrace Modified: stable/10/sys/modules/dtrace/Makefile.inc ============================================================================== --- stable/10/sys/modules/dtrace/Makefile.inc Mon May 11 04:54:56 2015 (r282747) +++ stable/10/sys/modules/dtrace/Makefile.inc Mon May 11 07:54:39 2015 (r282748) @@ -3,7 +3,6 @@ IGNORE_PRAGMA= 1 load : - -kldload cyclic -kldload dtrace .if ${MACHINE_CPUARCH} == "i386" -kldload sdt @@ -25,5 +24,4 @@ unload : -kldunload sdt .endif -kldunload dtrace - -kldunload cyclic kldstat Modified: stable/10/sys/modules/dtrace/dtraceall/dtraceall.c ============================================================================== --- stable/10/sys/modules/dtrace/dtraceall/dtraceall.c Mon May 11 04:54:56 2015 (r282747) +++ stable/10/sys/modules/dtrace/dtraceall/dtraceall.c Mon May 11 07:54:39 2015 (r282748) @@ -63,7 +63,6 @@ DEV_MODULE(dtraceall, dtraceall_modevent MODULE_VERSION(dtraceall, 1); /* All the DTrace modules should be dependencies here: */ -MODULE_DEPEND(dtraceall, cyclic, 1, 1, 1); MODULE_DEPEND(dtraceall, opensolaris, 1, 1, 1); MODULE_DEPEND(dtraceall, dtrace, 1, 1, 1); MODULE_DEPEND(dtraceall, dtmalloc, 1, 1, 1); Modified: stable/10/sys/sys/dtrace_bsd.h ============================================================================== --- stable/10/sys/sys/dtrace_bsd.h Mon May 11 04:54:56 2015 (r282747) +++ stable/10/sys/sys/dtrace_bsd.h Mon May 11 07:54:39 2015 (r282748) @@ -42,15 +42,6 @@ struct devstat; struct bio; /* - * Cyclic clock function type definition used to hook the cyclic - * subsystem into the appropriate timer interrupt. - */ -typedef void (*cyclic_clock_func_t)(struct trapframe *); -extern cyclic_clock_func_t cyclic_clock_func; - -void clocksource_cyc_set(const struct bintime *t); - -/* * The dtrace module handles traps that occur during a DTrace probe. * This type definition is used in the trap handler to provide a * hook for the dtrace module to register it's handler with. From owner-svn-src-all@FreeBSD.ORG Mon May 11 08:00:18 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 05632B99; Mon, 11 May 2015 08:00:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E82551BE1; Mon, 11 May 2015 08:00:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4B80H9J089084; Mon, 11 May 2015 08:00:17 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4B80GQ6089078; Mon, 11 May 2015 08:00:16 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201505110800.t4B80GQ6089078@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 11 May 2015 08:00: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: r282749 - in stable/10/sys/dev: fb vt vt/hw/fb 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.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2015 08:00:18 -0000 Author: avg Date: Mon May 11 08:00:16 2015 New Revision: 282749 URL: https://svnweb.freebsd.org/changeset/base/282749 Log: MFC r277795,278849: vt(4): Use power_{suspend,resume} event handlers Modified: stable/10/sys/dev/fb/fbd.c stable/10/sys/dev/vt/hw/fb/vt_fb.c stable/10/sys/dev/vt/hw/fb/vt_fb.h stable/10/sys/dev/vt/vt.h stable/10/sys/dev/vt/vt_core.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/fb/fbd.c ============================================================================== --- stable/10/sys/dev/fb/fbd.c Mon May 11 07:54:39 2015 (r282748) +++ stable/10/sys/dev/fb/fbd.c Mon May 11 08:00:16 2015 (r282749) @@ -332,22 +332,6 @@ fbd_detach(device_t dev) return (err); } -static int -fbd_suspend(device_t dev) -{ - - vt_fb_suspend(); - return (bus_generic_suspend(dev)); -} - -static int -fbd_resume(device_t dev) -{ - - vt_fb_resume(); - return (bus_generic_resume(dev)); -} - static device_method_t fbd_methods[] = { /* Device interface */ DEVMETHOD(device_probe, fbd_probe), @@ -355,8 +339,6 @@ static device_method_t fbd_methods[] = { DEVMETHOD(device_detach, fbd_detach), DEVMETHOD(device_shutdown, bus_generic_shutdown), - DEVMETHOD(device_suspend, fbd_suspend), - DEVMETHOD(device_resume, fbd_resume), { 0, 0 } }; Modified: stable/10/sys/dev/vt/hw/fb/vt_fb.c ============================================================================== --- stable/10/sys/dev/vt/hw/fb/vt_fb.c Mon May 11 07:54:39 2015 (r282748) +++ stable/10/sys/dev/vt/hw/fb/vt_fb.c Mon May 11 08:00:16 2015 (r282749) @@ -53,6 +53,8 @@ static struct vt_driver vt_fb_driver = { .vd_priority = VD_PRIORITY_GENERIC+10, .vd_fb_ioctl = vt_fb_ioctl, .vd_fb_mmap = vt_fb_mmap, + .vd_suspend = vt_fb_suspend, + .vd_resume = vt_fb_resume, }; VT_DRIVER_DECLARE(vt_fb, vt_fb_driver); @@ -441,15 +443,15 @@ vt_fb_attach(struct fb_info *info) } void -vt_fb_resume(void) +vt_fb_suspend(struct vt_device *vd) { - vt_resume(); + vt_suspend(vd); } void -vt_fb_suspend(void) +vt_fb_resume(struct vt_device *vd) { - vt_suspend(); + vt_resume(vd); } Modified: stable/10/sys/dev/vt/hw/fb/vt_fb.h ============================================================================== --- stable/10/sys/dev/vt/hw/fb/vt_fb.h Mon May 11 07:54:39 2015 (r282748) +++ stable/10/sys/dev/vt/hw/fb/vt_fb.h Mon May 11 08:00:16 2015 (r282749) @@ -33,8 +33,8 @@ #define _DEV_VT_HW_FB_VT_FB_H_ /* Generic framebuffer interface call vt_fb_attach to init VT(9) */ int vt_fb_attach(struct fb_info *info); -void vt_fb_resume(void); -void vt_fb_suspend(void); +void vt_fb_resume(struct vt_device *vd); +void vt_fb_suspend(struct vt_device *vd); vd_init_t vt_fb_init; vd_blank_t vt_fb_blank; Modified: stable/10/sys/dev/vt/vt.h ============================================================================== --- stable/10/sys/dev/vt/vt.h Mon May 11 07:54:39 2015 (r282748) +++ stable/10/sys/dev/vt/vt.h Mon May 11 08:00:16 2015 (r282749) @@ -91,8 +91,6 @@ TUNABLE_INT("kern.vt." #_name, &vt_##_na struct vt_driver; void vt_allocate(struct vt_driver *, void *); -void vt_resume(void); -void vt_suspend(void); typedef unsigned int vt_axis_t; @@ -162,6 +160,9 @@ struct vt_device { #define VD_PASTEBUFSZ(vd) ((vd)->vd_pastebuf.vpb_bufsz) #define VD_PASTEBUFLEN(vd) ((vd)->vd_pastebuf.vpb_len) +void vt_resume(struct vt_device *vd); +void vt_suspend(struct vt_device *vd); + /* * Per-window terminal screen buffer. * @@ -314,6 +315,8 @@ typedef int vd_fb_mmap_t(struct vt_devic typedef void vd_drawrect_t(struct vt_device *, int, int, int, int, int, term_color_t); typedef void vd_setpixel_t(struct vt_device *, int, int, term_color_t); +typedef void vd_suspend_t(struct vt_device *); +typedef void vd_resume_t(struct vt_device *); struct vt_driver { char vd_name[16]; @@ -337,6 +340,10 @@ struct vt_driver { /* Update display setting on vt switch. */ vd_postswitch_t *vd_postswitch; + /* Suspend/resume handlers. */ + vd_suspend_t *vd_suspend; + vd_resume_t *vd_resume; + /* Priority to know which one can override */ int vd_priority; #define VD_PRIORITY_DUMB 10 Modified: stable/10/sys/dev/vt/vt_core.c ============================================================================== --- stable/10/sys/dev/vt/vt_core.c Mon May 11 07:54:39 2015 (r282748) +++ stable/10/sys/dev/vt/vt_core.c Mon May 11 08:00:16 2015 (r282749) @@ -166,6 +166,8 @@ static void vt_update_static(void *); #ifndef SC_NO_CUTPASTE static void vt_mouse_paste(void); #endif +static void vt_suspend_handler(void *priv); +static void vt_resume_handler(void *priv); SET_DECLARE(vt_drv_set, struct vt_driver); @@ -2507,6 +2509,7 @@ vt_upgrade(struct vt_device *vd) { struct vt_window *vw; unsigned int i; + int register_handlers; if (!vty_enabled(VTY_VT)) return; @@ -2535,6 +2538,7 @@ vt_upgrade(struct vt_device *vd) if (vd->vd_curwindow == NULL) vd->vd_curwindow = vd->vd_windows[VT_CONSWINDOW]; + register_handlers = 0; if (!(vd->vd_flags & VDF_ASYNC)) { /* Attach keyboard. */ vt_allocate_keyboard(vd); @@ -2546,12 +2550,21 @@ vt_upgrade(struct vt_device *vd) vd->vd_flags |= VDF_ASYNC; callout_reset(&vd->vd_timer, hz / VT_TIMERFREQ, vt_timer, vd); vd->vd_timer_armed = 1; + register_handlers = 1; } VT_UNLOCK(vd); /* Refill settings with new sizes. */ vt_resize(vd); + + if (register_handlers) { + /* Register suspend/resume handlers. */ + EVENTHANDLER_REGISTER(power_suspend, vt_suspend_handler, vd, + EVENTHANDLER_PRI_ANY); + EVENTHANDLER_REGISTER(power_resume, vt_resume_handler, vd, + EVENTHANDLER_PRI_ANY); + } } static void @@ -2649,26 +2662,54 @@ vt_allocate(struct vt_driver *drv, void termcn_cnregister(vd->vd_windows[VT_CONSWINDOW]->vw_terminal); } +static void +vt_suspend_handler(void *priv) +{ + struct vt_device *vd; + + vd = priv; + if (vd->vd_driver != NULL && vd->vd_driver->vd_suspend != NULL) + vd->vd_driver->vd_suspend(vd); +} + +static void +vt_resume_handler(void *priv) +{ + struct vt_device *vd; + + vd = priv; + if (vd->vd_driver != NULL && vd->vd_driver->vd_resume != NULL) + vd->vd_driver->vd_resume(vd); +} + void -vt_suspend() +vt_suspend(struct vt_device *vd) { + int error; if (vt_suspendswitch == 0) return; /* Save current window. */ - main_vd->vd_savedwindow = main_vd->vd_curwindow; + vd->vd_savedwindow = vd->vd_curwindow; /* Ask holding process to free window and switch to console window */ - vt_proc_window_switch(main_vd->vd_windows[VT_CONSWINDOW]); + vt_proc_window_switch(vd->vd_windows[VT_CONSWINDOW]); + + /* Wait for the window switch to complete. */ + error = 0; + VT_LOCK(vd); + while (vd->vd_curwindow != vd->vd_windows[VT_CONSWINDOW] && error == 0) + error = cv_wait_sig(&vd->vd_winswitch, &vd->vd_lock); + VT_UNLOCK(vd); } void -vt_resume() +vt_resume(struct vt_device *vd) { if (vt_suspendswitch == 0) return; /* Switch back to saved window */ - if (main_vd->vd_savedwindow != NULL) - vt_proc_window_switch(main_vd->vd_savedwindow); - main_vd->vd_savedwindow = NULL; + if (vd->vd_savedwindow != NULL) + vt_proc_window_switch(vd->vd_savedwindow); + vd->vd_savedwindow = NULL; } From owner-svn-src-all@FreeBSD.ORG Mon May 11 08:16:35 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 26BB512F; Mon, 11 May 2015 08:16:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 083DD1E0A; Mon, 11 May 2015 08:16:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4B8GYPe098394; Mon, 11 May 2015 08:16:34 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4B8GYxc098388; Mon, 11 May 2015 08:16:34 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201505110816.t4B8GYxc098388@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 11 May 2015 08:16:33 +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: r282750 - in stable/10/sys: dev/acpica dev/syscons dev/vt 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.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2015 08:16:35 -0000 Author: avg Date: Mon May 11 08:16:33 2015 New Revision: 282750 URL: https://svnweb.freebsd.org/changeset/base/282750 Log: MFC r277796: hook userland threads suspend + resume into acpi suspend code Modified: stable/10/sys/dev/acpica/acpi.c stable/10/sys/dev/syscons/syscons.c stable/10/sys/dev/vt/vt_core.c stable/10/sys/sys/eventhandler.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/acpica/acpi.c ============================================================================== --- stable/10/sys/dev/acpica/acpi.c Mon May 11 08:00:16 2015 (r282749) +++ stable/10/sys/dev/acpica/acpi.c Mon May 11 08:16:33 2015 (r282750) @@ -2749,6 +2749,8 @@ acpi_EnterSleepState(struct acpi_softc * return_ACPI_STATUS (AE_OK); } + EVENTHANDLER_INVOKE(power_suspend_early); + stop_all_proc(); EVENTHANDLER_INVOKE(power_suspend); if (smp_started) { @@ -2892,6 +2894,8 @@ backout: thread_unlock(curthread); } + resume_all_proc(); + EVENTHANDLER_INVOKE(power_resume); /* Allow another sleep request after a while. */ Modified: stable/10/sys/dev/syscons/syscons.c ============================================================================== --- stable/10/sys/dev/syscons/syscons.c Mon May 11 08:00:16 2015 (r282749) +++ stable/10/sys/dev/syscons/syscons.c Mon May 11 08:16:33 2015 (r282750) @@ -550,7 +550,7 @@ sc_attach_unit(int unit, int flags) /* Register suspend/resume/shutdown callbacks for the kernel console. */ if (sc_console_unit == unit) { - EVENTHANDLER_REGISTER(power_suspend, scsuspend, NULL, + EVENTHANDLER_REGISTER(power_suspend_early, scsuspend, NULL, EVENTHANDLER_PRI_ANY); EVENTHANDLER_REGISTER(power_resume, scresume, NULL, EVENTHANDLER_PRI_ANY); Modified: stable/10/sys/dev/vt/vt_core.c ============================================================================== --- stable/10/sys/dev/vt/vt_core.c Mon May 11 08:00:16 2015 (r282749) +++ stable/10/sys/dev/vt/vt_core.c Mon May 11 08:16:33 2015 (r282750) @@ -2560,8 +2560,8 @@ vt_upgrade(struct vt_device *vd) if (register_handlers) { /* Register suspend/resume handlers. */ - EVENTHANDLER_REGISTER(power_suspend, vt_suspend_handler, vd, - EVENTHANDLER_PRI_ANY); + EVENTHANDLER_REGISTER(power_suspend_early, vt_suspend_handler, + vd, EVENTHANDLER_PRI_ANY); EVENTHANDLER_REGISTER(power_resume, vt_resume_handler, vd, EVENTHANDLER_PRI_ANY); } Modified: stable/10/sys/sys/eventhandler.h ============================================================================== --- stable/10/sys/sys/eventhandler.h Mon May 11 08:00:16 2015 (r282749) +++ stable/10/sys/sys/eventhandler.h Mon May 11 08:16:33 2015 (r282750) @@ -182,6 +182,7 @@ EVENTHANDLER_DECLARE(shutdown_final, shu typedef void (*power_change_fn)(void *); EVENTHANDLER_DECLARE(power_resume, power_change_fn); EVENTHANDLER_DECLARE(power_suspend, power_change_fn); +EVENTHANDLER_DECLARE(power_suspend_early, power_change_fn); /* Low memory event */ typedef void (*vm_lowmem_handler_t)(void *, int); From owner-svn-src-all@FreeBSD.ORG Mon May 11 08:30:58 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 95087447; Mon, 11 May 2015 08:30:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 836191FCC; Mon, 11 May 2015 08:30:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4B8Uwqh006471; Mon, 11 May 2015 08:30:58 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4B8Uwje006470; Mon, 11 May 2015 08:30:58 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201505110830.t4B8Uwje006470@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 11 May 2015 08:30:58 +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: r282751 - stable/10/cddl/contrib/opensolaris/lib/libnvpair 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.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2015 08:30:58 -0000 Author: avg Date: Mon May 11 08:30:57 2015 New Revision: 282751 URL: https://svnweb.freebsd.org/changeset/base/282751 Log: MFC r282121: dump_nvlist: handle DATA_TYPE_BOOLEAN_ARRAY Modified: stable/10/cddl/contrib/opensolaris/lib/libnvpair/libnvpair.c Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/lib/libnvpair/libnvpair.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/lib/libnvpair/libnvpair.c Mon May 11 08:16:33 2015 (r282750) +++ stable/10/cddl/contrib/opensolaris/lib/libnvpair/libnvpair.c Mon May 11 08:30:57 2015 (r282751) @@ -793,6 +793,7 @@ dump_nvlist(nvlist_t *list, int indent) { nvpair_t *elem = NULL; boolean_t bool_value; + boolean_t *bool_array_value; nvlist_t *nvlist_value; nvlist_t **nvlist_array_value; uint_t i, count; @@ -853,6 +854,16 @@ dump_nvlist(nvlist_t *list, int indent) NVP(elem, string, char *, char *, "'%s'"); break; + case DATA_TYPE_BOOLEAN_ARRAY: + (void) nvpair_value_boolean_array(elem, + &bool_array_value, &count); + for (i = 0; i < count; i++) { + (void) printf("%*s%s[%d]: %s\n", indent, "", + nvpair_name(elem), i, + bool_array_value[i] ? "true" : "false"); + } + break; + case DATA_TYPE_BYTE_ARRAY: NVPA(elem, byte_array, uchar_t, int, "%u"); break; From owner-svn-src-all@FreeBSD.ORG Mon May 11 08:31:39 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E9FA45EB; Mon, 11 May 2015 08:31:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D891D1FDC; Mon, 11 May 2015 08:31:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4B8Vd6w007773; Mon, 11 May 2015 08:31:39 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4B8VdOH007772; Mon, 11 May 2015 08:31:39 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201505110831.t4B8VdOH007772@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 11 May 2015 08:31:39 +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: r282752 - stable/9/cddl/contrib/opensolaris/lib/libnvpair 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.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2015 08:31:40 -0000 Author: avg Date: Mon May 11 08:31:39 2015 New Revision: 282752 URL: https://svnweb.freebsd.org/changeset/base/282752 Log: MFC r282121: dump_nvlist: handle DATA_TYPE_BOOLEAN_ARRAY Modified: stable/9/cddl/contrib/opensolaris/lib/libnvpair/libnvpair.c Directory Properties: stable/9/cddl/contrib/opensolaris/lib/libnvpair/ (props changed) Modified: stable/9/cddl/contrib/opensolaris/lib/libnvpair/libnvpair.c ============================================================================== --- stable/9/cddl/contrib/opensolaris/lib/libnvpair/libnvpair.c Mon May 11 08:30:57 2015 (r282751) +++ stable/9/cddl/contrib/opensolaris/lib/libnvpair/libnvpair.c Mon May 11 08:31:39 2015 (r282752) @@ -793,6 +793,7 @@ dump_nvlist(nvlist_t *list, int indent) { nvpair_t *elem = NULL; boolean_t bool_value; + boolean_t *bool_array_value; nvlist_t *nvlist_value; nvlist_t **nvlist_array_value; uint_t i, count; @@ -853,6 +854,16 @@ dump_nvlist(nvlist_t *list, int indent) NVP(elem, string, char *, char *, "'%s'"); break; + case DATA_TYPE_BOOLEAN_ARRAY: + (void) nvpair_value_boolean_array(elem, + &bool_array_value, &count); + for (i = 0; i < count; i++) { + (void) printf("%*s%s[%d]: %s\n", indent, "", + nvpair_name(elem), i, + bool_array_value[i] ? "true" : "false"); + } + break; + case DATA_TYPE_BYTE_ARRAY: NVPA(elem, byte_array, uchar_t, int, "%u"); break; From owner-svn-src-all@FreeBSD.ORG Mon May 11 08:33:50 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8ABD5763; Mon, 11 May 2015 08:33:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 78E561FFC; Mon, 11 May 2015 08:33:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4B8XoN5008265; Mon, 11 May 2015 08:33:50 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4B8XoZJ008264; Mon, 11 May 2015 08:33:50 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201505110833.t4B8XoZJ008264@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 11 May 2015 08:33:50 +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: r282753 - stable/10/sys/cddl/contrib/opensolaris/common/nvpair 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.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2015 08:33:50 -0000 Author: avg Date: Mon May 11 08:33:49 2015 New Revision: 282753 URL: https://svnweb.freebsd.org/changeset/base/282753 Log: MFC r282122: nvpair_type_is_array: DATA_TYPE_INT8_ARRAY was not recognized Modified: stable/10/sys/cddl/contrib/opensolaris/common/nvpair/nvpair.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/common/nvpair/nvpair.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/common/nvpair/nvpair.c Mon May 11 08:31:39 2015 (r282752) +++ stable/10/sys/cddl/contrib/opensolaris/common/nvpair/nvpair.c Mon May 11 08:33:49 2015 (r282753) @@ -1227,6 +1227,7 @@ nvpair_type_is_array(nvpair_t *nvp) data_type_t type = NVP_TYPE(nvp); if ((type == DATA_TYPE_BYTE_ARRAY) || + (type == DATA_TYPE_INT8_ARRAY) || (type == DATA_TYPE_UINT8_ARRAY) || (type == DATA_TYPE_INT16_ARRAY) || (type == DATA_TYPE_UINT16_ARRAY) || From owner-svn-src-all@FreeBSD.ORG Mon May 11 08:34:09 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 35B268A6; Mon, 11 May 2015 08:34:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2444D1007; Mon, 11 May 2015 08:34:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4B8Y9vY008370; Mon, 11 May 2015 08:34:09 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4B8Y85Z008369; Mon, 11 May 2015 08:34:09 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201505110834.t4B8Y85Z008369@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 11 May 2015 08:34:08 +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: r282754 - stable/9/sys/cddl/contrib/opensolaris/common/nvpair 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.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2015 08:34:09 -0000 Author: avg Date: Mon May 11 08:34:08 2015 New Revision: 282754 URL: https://svnweb.freebsd.org/changeset/base/282754 Log: MFC r282122: nvpair_type_is_array: DATA_TYPE_INT8_ARRAY was not recognized Modified: stable/9/sys/cddl/contrib/opensolaris/common/nvpair/nvpair.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/common/nvpair/nvpair.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/common/nvpair/nvpair.c Mon May 11 08:33:49 2015 (r282753) +++ stable/9/sys/cddl/contrib/opensolaris/common/nvpair/nvpair.c Mon May 11 08:34:08 2015 (r282754) @@ -1227,6 +1227,7 @@ nvpair_type_is_array(nvpair_t *nvp) data_type_t type = NVP_TYPE(nvp); if ((type == DATA_TYPE_BYTE_ARRAY) || + (type == DATA_TYPE_INT8_ARRAY) || (type == DATA_TYPE_UINT8_ARRAY) || (type == DATA_TYPE_INT16_ARRAY) || (type == DATA_TYPE_UINT16_ARRAY) || From owner-svn-src-all@FreeBSD.ORG Mon May 11 08:36:59 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 78D21C5C; Mon, 11 May 2015 08:36:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 67292104D; Mon, 11 May 2015 08:36:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4B8axaD008795; Mon, 11 May 2015 08:36:59 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4B8axQB008794; Mon, 11 May 2015 08:36:59 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201505110836.t4B8axQB008794@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 11 May 2015 08:36: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: r282755 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs 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.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2015 08:36:59 -0000 Author: avg Date: Mon May 11 08:36:58 2015 New Revision: 282755 URL: https://svnweb.freebsd.org/changeset/base/282755 Log: MFC r282125: MFV r282124: 5393 spurious failures from dsl_dataset_hold_obj() Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Mon May 11 08:34:08 2015 (r282754) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Mon May 11 08:36:58 2015 (r282755) @@ -413,7 +413,8 @@ dsl_dataset_hold_obj(dsl_pool_t *dp, uin offsetof(dmu_sendarg_t, dsa_link)); if (doi.doi_type == DMU_OTN_ZAP_METADATA) { - int zaperr = zap_contains(mos, dsobj, DS_FIELD_LARGE_BLOCKS); + int zaperr = zap_contains(mos, dsobj, + DS_FIELD_LARGE_BLOCKS); if (zaperr != ENOENT) { VERIFY0(zaperr); ds->ds_large_blocks = B_TRUE; From owner-svn-src-all@FreeBSD.ORG Mon May 11 08:40:56 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5131CE64; Mon, 11 May 2015 08:40:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2573C1152; Mon, 11 May 2015 08:40:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4B8euP3009372; Mon, 11 May 2015 08:40:56 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4B8etTi009370; Mon, 11 May 2015 08:40:55 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201505110840.t4B8etTi009370@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 11 May 2015 08:40: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: r282756 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs 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.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2015 08:40:56 -0000 Author: avg Date: Mon May 11 08:40:55 2015 New Revision: 282756 URL: https://svnweb.freebsd.org/changeset/base/282756 Log: MFC r282126: FV r282123: 5610 zfs clone from different source and target pools Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c Mon May 11 08:36:58 2015 (r282755) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c Mon May 11 08:40:55 2015 (r282756) @@ -23,6 +23,7 @@ * Copyright (c) 2012, 2014 by Delphix. All rights reserved. * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. * Copyright (c) 2013, Joyent, Inc. All rights reserved. + * Copyright 2015 Nexenta Systems, Inc. All rights reserved. */ /* Portions Copyright 2010 Robert Milkowski */ @@ -879,11 +880,7 @@ dmu_objset_clone_check(void *arg, dmu_tx dsl_dir_rele(pdd, FTAG); return (SET_ERROR(EEXIST)); } - /* You can't clone across pools. */ - if (pdd->dd_pool != dp) { - dsl_dir_rele(pdd, FTAG); - return (SET_ERROR(EXDEV)); - } + error = dsl_fs_ss_limit_check(pdd, 1, ZFS_PROP_FILESYSTEM_LIMIT, NULL, doca->doca_cred); if (error != 0) { @@ -896,12 +893,6 @@ dmu_objset_clone_check(void *arg, dmu_tx if (error != 0) return (error); - /* You can't clone across pools. */ - if (origin->ds_dir->dd_pool != dp) { - dsl_dataset_rele(origin, FTAG); - return (SET_ERROR(EXDEV)); - } - /* You can only clone snapshots, not the head datasets. */ if (!dsl_dataset_is_snapshot(origin)) { dsl_dataset_rele(origin, FTAG); Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c Mon May 11 08:36:58 2015 (r282755) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c Mon May 11 08:40:55 2015 (r282756) @@ -24,6 +24,7 @@ * All rights reserved. * Copyright (c) 2012, 2014 by Delphix. All rights reserved. * Copyright (c) 2014 Joyent, Inc. All rights reserved. + * Copyright 2015 Nexenta Systems, Inc. All rights reserved. */ #include @@ -408,7 +409,7 @@ dsl_dir_hold(dsl_pool_t *dp, const char /* Make sure the name is in the specified pool. */ spaname = spa_name(dp->dp_spa); if (strcmp(buf, spaname) != 0) - return (SET_ERROR(EINVAL)); + return (SET_ERROR(EXDEV)); ASSERT(dsl_pool_config_held(dp)); From owner-svn-src-all@FreeBSD.ORG Mon May 11 08:41:23 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 17312F93; Mon, 11 May 2015 08:41:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DFCA41159; Mon, 11 May 2015 08:41:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4B8fMl6009981; Mon, 11 May 2015 08:41:22 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4B8fM5C009979; Mon, 11 May 2015 08:41:22 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201505110841.t4B8fM5C009979@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 11 May 2015 08:41:22 +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: r282757 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs 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.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2015 08:41:23 -0000 Author: avg Date: Mon May 11 08:41:21 2015 New Revision: 282757 URL: https://svnweb.freebsd.org/changeset/base/282757 Log: MFC r282126: FV r282123: 5610 zfs clone from different source and target pools Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c Mon May 11 08:40:55 2015 (r282756) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c Mon May 11 08:41:21 2015 (r282757) @@ -23,6 +23,7 @@ * Copyright (c) 2013 by Delphix. All rights reserved. * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. * Copyright (c) 2013, Joyent, Inc. All rights reserved. + * Copyright 2015 Nexenta Systems, Inc. All rights reserved. */ /* Portions Copyright 2010 Robert Milkowski */ @@ -842,11 +843,7 @@ dmu_objset_clone_check(void *arg, dmu_tx dsl_dir_rele(pdd, FTAG); return (SET_ERROR(EEXIST)); } - /* You can't clone across pools. */ - if (pdd->dd_pool != dp) { - dsl_dir_rele(pdd, FTAG); - return (SET_ERROR(EXDEV)); - } + error = dsl_fs_ss_limit_check(pdd, 1, ZFS_PROP_FILESYSTEM_LIMIT, NULL, doca->doca_cred); if (error != 0) { @@ -859,12 +856,6 @@ dmu_objset_clone_check(void *arg, dmu_tx if (error != 0) return (error); - /* You can't clone across pools. */ - if (origin->ds_dir->dd_pool != dp) { - dsl_dataset_rele(origin, FTAG); - return (SET_ERROR(EXDEV)); - } - /* You can only clone snapshots, not the head datasets. */ if (!dsl_dataset_is_snapshot(origin)) { dsl_dataset_rele(origin, FTAG); Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c Mon May 11 08:40:55 2015 (r282756) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c Mon May 11 08:41:21 2015 (r282757) @@ -24,6 +24,7 @@ * All rights reserved. * Copyright (c) 2013 by Delphix. All rights reserved. * Copyright (c) 2014 Joyent, Inc. All rights reserved. + * Copyright 2015 Nexenta Systems, Inc. All rights reserved. */ #include @@ -404,7 +405,7 @@ dsl_dir_hold(dsl_pool_t *dp, const char /* Make sure the name is in the specified pool. */ spaname = spa_name(dp->dp_spa); if (strcmp(buf, spaname) != 0) - return (SET_ERROR(EINVAL)); + return (SET_ERROR(EXDEV)); ASSERT(dsl_pool_config_held(dp)); From owner-svn-src-all@FreeBSD.ORG Mon May 11 08:43:21 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A916318D; Mon, 11 May 2015 08:43:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 978DE1176; Mon, 11 May 2015 08:43:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4B8hLRk013336; Mon, 11 May 2015 08:43:21 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4B8hLgW013335; Mon, 11 May 2015 08:43:21 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201505110843.t4B8hLgW013335@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 11 May 2015 08:43: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: r282758 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs 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.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2015 08:43:21 -0000 Author: avg Date: Mon May 11 08:43:20 2015 New Revision: 282758 URL: https://svnweb.freebsd.org/changeset/base/282758 Log: MFC r282127: dsl_dir_rename_check: return EXDEV on cross-pool rename attempt Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c Mon May 11 08:41:21 2015 (r282757) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c Mon May 11 08:43:20 2015 (r282758) @@ -1707,7 +1707,7 @@ dsl_dir_rename_check(void *arg, dmu_tx_t if (dd->dd_pool != newparent->dd_pool) { dsl_dir_rele(newparent, FTAG); dsl_dir_rele(dd, FTAG); - return (SET_ERROR(ENXIO)); + return (SET_ERROR(EXDEV)); } /* new name should not already exist */ From owner-svn-src-all@FreeBSD.ORG Mon May 11 08:43:38 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 291BD2EC; Mon, 11 May 2015 08:43:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1765D117B; Mon, 11 May 2015 08:43:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4B8hbhl013419; Mon, 11 May 2015 08:43:37 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4B8hbWd013418; Mon, 11 May 2015 08:43:37 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201505110843.t4B8hbWd013418@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 11 May 2015 08:43:37 +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: r282759 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs 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.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2015 08:43:38 -0000 Author: avg Date: Mon May 11 08:43:37 2015 New Revision: 282759 URL: https://svnweb.freebsd.org/changeset/base/282759 Log: MFC r282127: dsl_dir_rename_check: return EXDEV on cross-pool rename attempt Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c Mon May 11 08:43:20 2015 (r282758) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c Mon May 11 08:43:37 2015 (r282759) @@ -1698,7 +1698,7 @@ dsl_dir_rename_check(void *arg, dmu_tx_t if (dd->dd_pool != newparent->dd_pool) { dsl_dir_rele(newparent, FTAG); dsl_dir_rele(dd, FTAG); - return (SET_ERROR(ENXIO)); + return (SET_ERROR(EXDEV)); } /* new name should not already exist */ From owner-svn-src-all@FreeBSD.ORG Mon May 11 08:46:04 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4AAE3457; Mon, 11 May 2015 08:46:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 38EBD1192; Mon, 11 May 2015 08:46:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4B8k4at013850; Mon, 11 May 2015 08:46:04 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4B8k4Uf013849; Mon, 11 May 2015 08:46:04 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201505110846.t4B8k4Uf013849@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 11 May 2015 08:46: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: r282760 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs 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.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2015 08:46:04 -0000 Author: avg Date: Mon May 11 08:46:03 2015 New Revision: 282760 URL: https://svnweb.freebsd.org/changeset/base/282760 Log: MFC r282130: zfs_onexit_fd_hold: return EBADF even if devfs_get_cdevpriv gave ENOENT Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_onexit.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_onexit.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_onexit.c Mon May 11 08:43:37 2015 (r282759) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_onexit.c Mon May 11 08:46:03 2015 (r282760) @@ -137,7 +137,7 @@ zfs_onexit_fd_hold(int fd, minor_t *mino *minorp = (minor_t)(uintptr_t)data; curthread->td_fpop = tmpfp; if (error != 0) - return (error); + return (SET_ERROR(EBADF)); return (zfs_onexit_minor_to_state(*minorp, &zo)); } From owner-svn-src-all@FreeBSD.ORG Mon May 11 08:46:24 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 48AAF587; Mon, 11 May 2015 08:46:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 36E801199; Mon, 11 May 2015 08:46:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4B8kOns013940; Mon, 11 May 2015 08:46:24 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4B8kOrU013938; Mon, 11 May 2015 08:46:24 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201505110846.t4B8kOrU013938@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 11 May 2015 08:46:24 +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: r282761 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs 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.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2015 08:46:24 -0000 Author: avg Date: Mon May 11 08:46:23 2015 New Revision: 282761 URL: https://svnweb.freebsd.org/changeset/base/282761 Log: MFC r282130: zfs_onexit_fd_hold: return EBADF even if devfs_get_cdevpriv gave ENOENT Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_onexit.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_onexit.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_onexit.c Mon May 11 08:46:03 2015 (r282760) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_onexit.c Mon May 11 08:46:23 2015 (r282761) @@ -136,7 +136,7 @@ zfs_onexit_fd_hold(int fd, minor_t *mino *minorp = (minor_t)(uintptr_t)data; curthread->td_fpop = tmpfp; if (error != 0) - return (error); + return (SET_ERROR(EBADF)); return (zfs_onexit_minor_to_state(*minorp, &zo)); } From owner-svn-src-all@FreeBSD.ORG Mon May 11 08:51:25 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9363C732; Mon, 11 May 2015 08:51:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 81F2C125F; Mon, 11 May 2015 08:51:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4B8pPDY018153; Mon, 11 May 2015 08:51:25 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4B8pPtU018152; Mon, 11 May 2015 08:51:25 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201505110851.t4B8pPtU018152@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 11 May 2015 08:51:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282762 - 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.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2015 08:51:25 -0000 Author: andrew Date: Mon May 11 08:51:24 2015 New Revision: 282762 URL: https://svnweb.freebsd.org/changeset/base/282762 Log: Use the ACLE spelling of _ARM_ARCH_6: "__ARM_ARCH >= 6" Modified: head/sys/arm/arm/swtch.S Modified: head/sys/arm/arm/swtch.S ============================================================================== --- head/sys/arm/arm/swtch.S Mon May 11 08:46:23 2015 (r282761) +++ head/sys/arm/arm/swtch.S Mon May 11 08:51:24 2015 (r282762) @@ -81,6 +81,7 @@ #include "assym.s" #include "opt_sched.h" +#include #include #include #include @@ -88,7 +89,7 @@ __FBSDID("$FreeBSD$"); -#if defined(_ARM_ARCH_6) && defined(SMP) +#if __ARM_ARCH >= 6 && defined(SMP) #define GET_PCPU(tmp, tmp2) \ mrc p15, 0, tmp, c0, c0, 5; \ and tmp, tmp, #0xf; \ From owner-svn-src-all@FreeBSD.ORG Mon May 11 08:57:24 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BA0FE971; Mon, 11 May 2015 08:57:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A8AEF12AF; Mon, 11 May 2015 08:57:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4B8vOii018939; Mon, 11 May 2015 08:57:24 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4B8vOZr018937; Mon, 11 May 2015 08:57:24 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201505110857.t4B8vOZr018937@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 11 May 2015 08:57:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282763 - 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.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2015 08:57:24 -0000 Author: andrew Date: Mon May 11 08:57:23 2015 New Revision: 282763 URL: https://svnweb.freebsd.org/changeset/base/282763 Log: Move to use __ARM_ARCH in more places in the kernel. Modified: head/sys/arm/arm/fusu.S head/sys/arm/arm/stdatomic.c Modified: head/sys/arm/arm/fusu.S ============================================================================== --- head/sys/arm/arm/fusu.S Mon May 11 08:51:24 2015 (r282762) +++ head/sys/arm/arm/fusu.S Mon May 11 08:57:23 2015 (r282763) @@ -33,6 +33,7 @@ * */ +#include #include #include #include "assym.s" @@ -40,7 +41,7 @@ __FBSDID("$FreeBSD$"); .syntax unified -#ifdef _ARM_ARCH_6 +#if __ARM_ARCH >= 6 #define GET_PCB(tmp) \ mrc p15, 0, tmp, c13, c0, 4; \ add tmp, tmp, #(TD_PCB) @@ -68,7 +69,7 @@ EENTRY_NP(casuword32) stmfd sp!, {r4, r5} adr r4, .Lcasuwordfault str r4, [r3, #PCB_ONFAULT] -#ifdef _ARM_ARCH_6 +#if __ARM_ARCH >= 6 1: cmp r0, #KERNBASE mvnhs r0, #0 Modified: head/sys/arm/arm/stdatomic.c ============================================================================== --- head/sys/arm/arm/stdatomic.c Mon May 11 08:51:24 2015 (r282762) +++ head/sys/arm/arm/stdatomic.c Mon May 11 08:57:23 2015 (r282763) @@ -31,6 +31,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -66,16 +67,14 @@ do_sync(void) __asm volatile ("" : : : "memory"); } -#elif defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) +#elif __ARM_ARCH >= 7 static inline void do_sync(void) { __asm volatile ("dmb" : : : "memory"); } -#elif defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || \ - defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6Z__) || \ - defined(__ARM_ARCH_6ZK__) +#elif __ARM_ARCH >= 6 static inline void do_sync(void) { @@ -90,14 +89,8 @@ do_sync(void) * New C11 __atomic_* API. */ -#if defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || \ - defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6Z__) || \ - defined(__ARM_ARCH_6ZK__) || \ - defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) - -/* These systems should be supported by the compiler. */ - -#else /* __ARM_ARCH_5__ */ +/* ARMv6+ systems should be supported by the compiler. */ +#if __ARM_ARCH <= 5 /* Clang doesn't allow us to reimplement builtins without this. */ #ifdef __clang__ @@ -331,7 +324,7 @@ EMIT_ALL_OPS_N(4, uint32_t, "ldr", "str" #endif /* _KERNEL */ -#endif +#endif /* __ARM_ARCH */ #endif /* __CLANG_ATOMICS || __GNUC_ATOMICS */ @@ -365,10 +358,7 @@ EMIT_ALL_OPS_N(4, uint32_t, "ldr", "str" * Old __sync_* API. */ -#if defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || \ - defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6Z__) || \ - defined(__ARM_ARCH_6ZK__) || \ - defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) +#if __ARM_ARCH >= 6 /* Implementations for old GCC versions, lacking support for atomics. */ @@ -686,7 +676,7 @@ __strong_reference(__sync_fetch_and_xor_ __strong_reference(__sync_fetch_and_xor_4_c, __sync_fetch_and_xor_4); #endif -#else /* __ARM_ARCH_5__ */ +#else /* __ARM_ARCH < 6 */ #ifdef _KERNEL @@ -881,7 +871,7 @@ __strong_reference(__sync_fetch_and_or_4 __strong_reference(__sync_fetch_and_xor_1_c, __sync_fetch_and_xor_1); __strong_reference(__sync_fetch_and_xor_2_c, __sync_fetch_and_xor_2); __strong_reference(__sync_fetch_and_xor_4_c, __sync_fetch_and_xor_4); -#endif +#endif /* __ARM_ARCH */ #endif /* _KERNEL */ From owner-svn-src-all@FreeBSD.ORG Mon May 11 09:40:09 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2104C841; Mon, 11 May 2015 09:40:09 +0000 (UTC) Received: from melamine.cuivre.fr.eu.org (houdart.cuivre.fr.eu.org [81.57.40.110]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D03521782; Mon, 11 May 2015 09:40:08 +0000 (UTC) Received: by melamine.cuivre.fr.eu.org (Postfix, from userid 1000) id A4B0619711; Mon, 11 May 2015 11:40:05 +0200 (CEST) Date: Mon, 11 May 2015 11:40:05 +0200 From: Thomas Quinot To: sbruno@freebsd.org Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r282736 - in head: . lib/libmd Message-ID: <20150511094005.GA58845@melamine.cuivre.fr.eu.org> References: <201505102121.t4ALLr3A076661@svn.freebsd.org> <555022F2.9010801@ignoranthack.me> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <555022F2.9010801@ignoranthack.me> X-message-flag: WARNING! Using Outlook can damage your computer. User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2015 09:40:09 -0000 * Sean Bruno, 2015-05-11 : > I already pinged Thomas about this privately, but in the event anyone > is looking, MIPS is still broken after this commit. > > Probably all the GCC based targets are, if I read this correctly. > > make -s -j8 buildworld TARGET=mips TARGET_ARCH=mips > ... Sean, Can you try the attached patch? with it I was able to complete a MIPS build with the command above. Thomas. Index: lib/libmd/Makefile =================================================================== --- lib/libmd/Makefile (révision 282735) +++ lib/libmd/Makefile (copie de travail) @@ -42,7 +42,7 @@ sha0.ref sha0hl.c sha1.ref sha1hl.c shadriver \ sha256.ref sha256hl.c sha512.ref sha512hl.c -CFLAGS+= -I${.CURDIR} +CFLAGS+= -I${.CURDIR} -DWEAK_REFS .PATH: ${.CURDIR}/${MACHINE_ARCH} ${.CURDIR}/../../sys/crypto/sha2 .if exists(${MACHINE_ARCH}/sha.S) Index: lib/libmd/md4c.c =================================================================== --- lib/libmd/md4c.c (révision 282735) +++ lib/libmd/md4c.c (copie de travail) @@ -291,6 +291,11 @@ (((UINT4)input[j+2]) << 16) | (((UINT4)input[j+3]) << 24); } +#ifdef WEAK_REFS +/* When building libmd, provide weak references. Note: this is not + activated in the context of compiling these sources for internal + use in libcrypt. + */ #undef MD4Init __weak_reference(_libmd_MD4Init, MD4Init); #undef MD4Update @@ -299,3 +304,4 @@ __weak_reference(_libmd_MD4Pad, MD4Pad); #undef MD4Final __weak_reference(_libmd_MD4Final, MD4Final); +#endif Index: lib/libmd/md5c.c =================================================================== --- lib/libmd/md5c.c (révision 282735) +++ lib/libmd/md5c.c (copie de travail) @@ -336,6 +336,11 @@ memset ((void *)x, 0, sizeof (x)); } +#ifdef WEAK_REFS +/* When building libmd, provide weak references. Note: this is not + activated in the context of compiling these sources for internal + use in libcrypt. + */ #undef MD5Init __weak_reference(_libmd_MD5Init, MD5Init); #undef MD5Update @@ -346,3 +351,4 @@ __weak_reference(_libmd_MD5Final, MD5Final); #undef MD5Transform __weak_reference(_libmd_MD5Transform, MD5Transform); +#endif Index: lib/libmd/mdXhl.c =================================================================== --- lib/libmd/mdXhl.c (révision 282735) +++ lib/libmd/mdXhl.c (copie de travail) @@ -97,6 +97,11 @@ return (MDXEnd(&ctx, buf)); } +#ifdef WEAK_REFS +/* When building libmd, provide weak references. Note: this is not + activated in the context of compiling these sources for internal + use in libcrypt. + */ #undef MDXEnd __weak_reference(_libmd_MDXEnd, MDXEnd); #undef MDXFile @@ -105,3 +110,4 @@ __weak_reference(_libmd_MDXFileChunk, MDXFileChunk); #undef MDXData __weak_reference(_libmd_MDXData, MDXData); +#endif Index: lib/libmd/rmd160c.c =================================================================== --- lib/libmd/rmd160c.c (révision 282735) +++ lib/libmd/rmd160c.c (copie de travail) @@ -546,6 +546,11 @@ } #endif +#ifdef WEAK_REFS +/* When building libmd, provide weak references. Note: this is not + activated in the context of compiling these sources for internal + use in libcrypt. + */ #undef RIPEMD160_Init __weak_reference(_libmd_RIPEMD160_Init, RIPEMD160_Init); #undef RIPEMD160_Update @@ -558,3 +563,4 @@ __weak_reference(_libmd_RMD160_version, RMD160_version); #undef ripemd160_block __weak_reference(_libmd_ripemd160_block, ripemd160_block); +#endif Index: lib/libmd/sha1c.c =================================================================== --- lib/libmd/sha1c.c (révision 282735) +++ lib/libmd/sha1c.c (copie de travail) @@ -488,7 +488,11 @@ /* memset((char *)&c,0,sizeof(c));*/ } - +#ifdef WEAK_REFS +/* When building libmd, provide weak references. Note: this is not + activated in the context of compiling these sources for internal + use in libcrypt. + */ #undef SHA_Init __weak_reference(_libmd_SHA_Init, SHA_Init); #undef SHA_Update @@ -513,3 +517,4 @@ __weak_reference(_libmd_SHA1_version, SHA1_version); #undef sha1_block __weak_reference(_libmd_sha1_block, sha1_block); +#endif Index: lib/libmd/sha256c.c =================================================================== --- lib/libmd/sha256c.c (révision 282735) +++ lib/libmd/sha256c.c (copie de travail) @@ -296,6 +296,11 @@ memset((void *)ctx, 0, sizeof(*ctx)); } +#ifdef WEAK_REFS +/* When building libmd, provide weak references. Note: this is not + activated in the context of compiling these sources for internal + use in libcrypt. + */ #undef SHA256_Init __weak_reference(_libmd_SHA256_Init, SHA256_Init); #undef SHA256_Update @@ -304,5 +309,4 @@ __weak_reference(_libmd_SHA256_Final, SHA256_Final); #undef SHA256_Transform __weak_reference(_libmd_SHA256_Transform, SHA256_Transform); -#undef SHA256_version -__weak_reference(_libmd_SHA256_version, SHA256_version); +#endif Index: lib/libmd/sha512c.c =================================================================== --- lib/libmd/sha512c.c (révision 282735) +++ lib/libmd/sha512c.c (copie de travail) @@ -319,6 +319,11 @@ memset((void *)ctx, 0, sizeof(*ctx)); } +#ifdef WEAK_REFS +/* When building libmd, provide weak references. Note: this is not + activated in the context of compiling these sources for internal + use in libcrypt. + */ #undef SHA512_Init __weak_reference(_libmd_SHA512_Init, SHA512_Init); #undef SHA512_Update @@ -327,5 +332,4 @@ __weak_reference(_libmd_SHA512_Final, SHA512_Final); #undef SHA512_Transform __weak_reference(_libmd_SHA512_Transform, SHA512_Transform); -#undef SHA512_version -__weak_reference(_libmd_SHA512_version, SHA512_version); +#endif From owner-svn-src-all@FreeBSD.ORG Mon May 11 09:43:04 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 256369AE; Mon, 11 May 2015 09:43:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EE9121853; Mon, 11 May 2015 09:43:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4B9h3nd043062; Mon, 11 May 2015 09:43:03 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4B9h3JW043061; Mon, 11 May 2015 09:43:03 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201505110943.t4B9h3JW043061@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 11 May 2015 09:43: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: r282764 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs 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.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2015 09:43:04 -0000 Author: avg Date: Mon May 11 09:43:03 2015 New Revision: 282764 URL: https://svnweb.freebsd.org/changeset/base/282764 Log: MFC r282131: replace a comment about zfs recv -F corner case with a longer one Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Mon May 11 08:57:23 2015 (r282763) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Mon May 11 09:43:03 2015 (r282764) @@ -1320,15 +1320,25 @@ zfs_rezget(znode_t *zp) } /* - * XXXPJD: Not sure how is that possible, but under heavy - * zfs recv -F load it happens that z_gen is the same, but - * vnode type is different than znode type. This would mean - * that for example regular file was replaced with directory - * which has the same object number. + * It is highly improbable but still quite possible that two + * objects in different datasets are created with the same + * object numbers and in transaction groups with the same + * numbers. znodes corresponding to those objects would + * have the same z_id and z_gen, but their other attributes + * may be different. + * zfs recv -F may replace one of such objects with the other. + * As a result file properties recorded in the replaced + * object's vnode may no longer match the received object's + * properties. At present the only cached property is the + * files type recorded in v_type. + * So, handle this case by leaving the old vnode and znode + * disassociated from the actual object. A new vnode and a + * znode will be created if the object is accessed + * (e.g. via a look-up). The old vnode and znode will be + * recycled when the last vnode reference is dropped. */ vp = ZTOV(zp); - if (vp != NULL && - vp->v_type != IFTOVT((mode_t)zp->z_mode)) { + if (vp != NULL && vp->v_type != IFTOVT((mode_t)zp->z_mode)) { zfs_znode_dmu_fini(zp); ZFS_OBJ_HOLD_EXIT(zfsvfs, obj_num); return (EIO); From owner-svn-src-all@FreeBSD.ORG Mon May 11 09:43:17 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 583C3AE2; Mon, 11 May 2015 09:43:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2C528185B; Mon, 11 May 2015 09:43:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4B9hHBC043138; Mon, 11 May 2015 09:43:17 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4B9hHTS043137; Mon, 11 May 2015 09:43:17 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201505110943.t4B9hHTS043137@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 11 May 2015 09:43: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: r282765 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs 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.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2015 09:43:17 -0000 Author: avg Date: Mon May 11 09:43:16 2015 New Revision: 282765 URL: https://svnweb.freebsd.org/changeset/base/282765 Log: MFC r282131: replace a comment about zfs recv -F corner case with a longer one Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Mon May 11 09:43:03 2015 (r282764) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Mon May 11 09:43:16 2015 (r282765) @@ -1319,15 +1319,25 @@ zfs_rezget(znode_t *zp) } /* - * XXXPJD: Not sure how is that possible, but under heavy - * zfs recv -F load it happens that z_gen is the same, but - * vnode type is different than znode type. This would mean - * that for example regular file was replaced with directory - * which has the same object number. + * It is highly improbable but still quite possible that two + * objects in different datasets are created with the same + * object numbers and in transaction groups with the same + * numbers. znodes corresponding to those objects would + * have the same z_id and z_gen, but their other attributes + * may be different. + * zfs recv -F may replace one of such objects with the other. + * As a result file properties recorded in the replaced + * object's vnode may no longer match the received object's + * properties. At present the only cached property is the + * files type recorded in v_type. + * So, handle this case by leaving the old vnode and znode + * disassociated from the actual object. A new vnode and a + * znode will be created if the object is accessed + * (e.g. via a look-up). The old vnode and znode will be + * recycled when the last vnode reference is dropped. */ vp = ZTOV(zp); - if (vp != NULL && - vp->v_type != IFTOVT((mode_t)zp->z_mode)) { + if (vp != NULL && vp->v_type != IFTOVT((mode_t)zp->z_mode)) { zfs_znode_dmu_fini(zp); ZFS_OBJ_HOLD_EXIT(zfsvfs, obj_num); return (EIO); From owner-svn-src-all@FreeBSD.ORG Mon May 11 10:07:32 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D016C276; Mon, 11 May 2015 10:07:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A44AF1AE2; Mon, 11 May 2015 10:07:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4BA7WFD053416; Mon, 11 May 2015 10:07:32 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4BA7Wre053415; Mon, 11 May 2015 10:07:32 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201505111007.t4BA7Wre053415@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 11 May 2015 10:07:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282766 - 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.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2015 10:07:32 -0000 Author: avg Date: Mon May 11 10:07:31 2015 New Revision: 282766 URL: https://svnweb.freebsd.org/changeset/base/282766 Log: zfs ioctls: use fget_write / fget_read instead of getf wrapper for fget This allows to ensure that we do not write to a file that was opened for reading only or vice versa. Also, use the correct capability in in zfs_ioc_send_new(). Differential Revision: https://reviews.freebsd.org/D2382 Reviewed by: delphij MFC after: 17 days Sponsored by: ClusterHQ Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Mon May 11 09:43:16 2015 (r282765) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Mon May 11 10:07:31 2015 (r282766) @@ -4196,7 +4196,11 @@ zfs_ioc_recv(zfs_cmd_t *zc) return (error); fd = zc->zc_cookie; - fp = getf(fd, cap_rights_init(&rights, CAP_PREAD)); +#ifdef illumos + fp = getf(fd); +#else + fget_read(curthread, fd, cap_rights_init(&rights, CAP_PREAD), &fp); +#endif if (fp == NULL) { nvlist_free(props); return (SET_ERROR(EBADF)); @@ -4442,8 +4446,12 @@ zfs_ioc_send(zfs_cmd_t *zc) file_t *fp; cap_rights_t rights; - fp = getf(zc->zc_cookie, - cap_rights_init(&rights, CAP_WRITE)); +#ifdef illumos + fp = getf(zc->zc_cookie); +#else + fget_write(curthread, zc->zc_cookie, + cap_rights_init(&rights, CAP_WRITE), &fp); +#endif if (fp == NULL) return (SET_ERROR(EBADF)); @@ -5039,7 +5047,12 @@ zfs_ioc_diff(zfs_cmd_t *zc) offset_t off; int error; - fp = getf(zc->zc_cookie, cap_rights_init(&rights, CAP_WRITE)); +#ifdef illumos + fp = getf(zc->zc_cookie); +#else + fget_write(curthread, zc->zc_cookie, + cap_rights_init(&rights, CAP_WRITE), &fp); +#endif if (fp == NULL) return (SET_ERROR(EBADF)); @@ -5404,6 +5417,7 @@ static int zfs_ioc_send_new(const char *snapname, nvlist_t *innvl, nvlist_t *outnvl) { cap_rights_t rights; + file_t *fp; int error; offset_t off; char *fromname = NULL; @@ -5420,7 +5434,11 @@ zfs_ioc_send_new(const char *snapname, n largeblockok = nvlist_exists(innvl, "largeblockok"); embedok = nvlist_exists(innvl, "embedok"); - file_t *fp = getf(fd, cap_rights_init(&rights, CAP_READ)); +#ifdef illumos + file_t *fp = getf(fd); +#else + fget_write(curthread, fd, cap_rights_init(&rights, CAP_WRITE), &fp); +#endif if (fp == NULL) return (SET_ERROR(EBADF)); From owner-svn-src-all@FreeBSD.ORG Mon May 11 12:44:03 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3573375F; Mon, 11 May 2015 12:44:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 23F9A1CB2; Mon, 11 May 2015 12:44:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4BCi3ld034735; Mon, 11 May 2015 12:44:03 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4BCi3Nk034734; Mon, 11 May 2015 12:44:03 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201505111244.t4BCi3Nk034734@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 11 May 2015 12:44:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282767 - head/sys/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.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2015 12:44:03 -0000 Author: andrew Date: Mon May 11 12:44:02 2015 New Revision: 282767 URL: https://svnweb.freebsd.org/changeset/base/282767 Log: cpu-v6.h should only be used in the kernel, add an error to enforce this. Modified: head/sys/arm/include/cpu-v6.h Modified: head/sys/arm/include/cpu-v6.h ============================================================================== --- head/sys/arm/include/cpu-v6.h Mon May 11 10:07:31 2015 (r282766) +++ head/sys/arm/include/cpu-v6.h Mon May 11 12:44:02 2015 (r282767) @@ -29,6 +29,11 @@ #ifndef MACHINE_CPU_V6_H #define MACHINE_CPU_V6_H +/* There are no user serviceable parts here, they may change without notice */ +#ifndef _KERNEL +#error Only include this file in the kernel +#else + #include "machine/atomic.h" #include "machine/cpufunc.h" #include "machine/cpuinfo.h" @@ -499,4 +504,6 @@ cp15_ttbr_set(uint32_t reg) tlb_flush_all_ng_local(); } +#endif /* _KERNEL */ + #endif /* !MACHINE_CPU_V6_H */ From owner-svn-src-all@FreeBSD.ORG Mon May 11 13:53:36 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DFB8968B; Mon, 11 May 2015 13:53:36 +0000 (UTC) Received: from mail-ig0-x232.google.com (mail-ig0-x232.google.com [IPv6:2607:f8b0:4001:c05::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A9A1515AE; Mon, 11 May 2015 13:53:36 +0000 (UTC) Received: by igbpi8 with SMTP id pi8so69968292igb.1; Mon, 11 May 2015 06:53:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=JrHJZ7Ai0gvbObaWWaEBiVAooNpUPrLTlFdRj77fY34=; b=tkmctaYGox3g5+1TD0zqJYjgENWwUHvgrvcaqIJ4m/AcgLb91XdBMtPGzxjchf5aTa tGP89eRsfnawM7ye4rS24Fru4PEJgPqsxznpPtnQly8sVA7XObwhvkh7/vdeew6HCR+T B/fuQrL7K9RGo5K2OlWsb2Kqwj9Hq1rniCYzkSjyhUOA0gGW0/7T8ARVnyhK9JRZQBzL KGRdEuWfSPbucB779jGGpCIoBLP9plf4KkCgrY77gwdn1AwP/T4htfrMcZsX+9C/yZM1 YbBssnb13aAev5KzKSw7NvGLTY8y2RUXekrysKWKP2HNYRmTelQp9uZjjUTxT12Z85e4 DsKg== X-Received: by 10.50.143.33 with SMTP id sb1mr12967259igb.33.1431352416139; Mon, 11 May 2015 06:53:36 -0700 (PDT) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.48.3 with HTTP; Mon, 11 May 2015 06:53:15 -0700 (PDT) In-Reply-To: <20150511024754.GA65659@raichu> References: <201505102227.t4AMRn1g007294@svn.freebsd.org> <55500C0D.7090802@freebsd.org> <20150511024754.GA65659@raichu> From: Ed Maste Date: Mon, 11 May 2015 09:53:15 -0400 X-Google-Sender-Auth: xEH5kH-ATO3-clHN8QZDwt-vzvw Message-ID: Subject: Re: svn commit: r282744 - in head/sys/cddl/dev/dtrace: amd64 i386 To: Mark Johnston Cc: Julian Elischer , "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.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2015 13:53:37 -0000 On 10 May 2015 at 22:47, Mark Johnston wrote: > > I've caught several cases (specifically in merging DTrace code) where the > upstream code block is so large the merger didn't even notice the > #ifndef __FreeBSD__ was present and thought that the merge was fine because > the upstream diff applied cleanly. Indeed - leaving large blocks of #if'd out upstream code can easily lead to a false sense that everything was successful in a merge. It's actually better that the merge creates a conflict: the merger then needs to understand the change and determine if it actually applies to FreeBSD or not, rather than just accepting the patch. Both approaches have arguments for and against, but ultimately I think the decision rests with the one doing the work. From owner-svn-src-all@FreeBSD.ORG Mon May 11 14:02:41 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 17E78A80; Mon, 11 May 2015 14:02:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0293916E4; Mon, 11 May 2015 14:02:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4BE2eO8073832; Mon, 11 May 2015 14:02:40 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4BE2cna073813; Mon, 11 May 2015 14:02:38 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201505111402.t4BE2cna073813@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Mon, 11 May 2015 14:02:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r282768 - in vendor/ficl: . dist dist/contrib dist/contrib/xclasses dist/doc dist/doc/articles dist/doc/graphics dist/doc/source dist/ficlplatform dist/softcore dist/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.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2015 14:02:41 -0000 Author: pfg Date: Mon May 11 14:02:38 2015 New Revision: 282768 URL: https://svnweb.freebsd.org/changeset/base/282768 Log: Bring ficl4 to the vendor area. We currently use ficl3 but there is interest (and a GSoC) to bring the newer version for use in the bootloader. WWW: http://ficl.sourceforge.net/ Discussed with: dteske Added: vendor/ficl/ vendor/ficl/dist/ vendor/ficl/dist/Makefile (contents, props changed) vendor/ficl/dist/Makefile.ansi (contents, props changed) vendor/ficl/dist/Makefile.linux (contents, props changed) vendor/ficl/dist/ReadMe.txt (contents, props changed) vendor/ficl/dist/bit.c (contents, props changed) vendor/ficl/dist/callback.c (contents, props changed) vendor/ficl/dist/compatibility.c (contents, props changed) vendor/ficl/dist/contrib/ vendor/ficl/dist/contrib/xclasses/ vendor/ficl/dist/contrib/xclasses/readme.txt (contents, props changed) vendor/ficl/dist/contrib/xclasses/xclasses.py (contents, props changed) vendor/ficl/dist/dictionary.c (contents, props changed) vendor/ficl/dist/doc/ vendor/ficl/dist/doc/api.html (contents, props changed) vendor/ficl/dist/doc/articles/ vendor/ficl/dist/doc/articles/ficlddj.pdf (contents, props changed) vendor/ficl/dist/doc/articles/jwsforml.pdf (contents, props changed) vendor/ficl/dist/doc/articles/oo_in_c.html (contents, props changed) vendor/ficl/dist/doc/articles/sigplan9906.doc (contents, props changed) vendor/ficl/dist/doc/debugger.html (contents, props changed) vendor/ficl/dist/doc/dpans.html (contents, props changed) vendor/ficl/dist/doc/favicon.ico (contents, props changed) vendor/ficl/dist/doc/ficl.html (contents, props changed) vendor/ficl/dist/doc/graphics/ vendor/ficl/dist/doc/graphics/4ring.gif (contents, props changed) vendor/ficl/dist/doc/graphics/ficl.4.128.jpg (contents, props changed) vendor/ficl/dist/doc/graphics/ficl.4.64.jpg (contents, props changed) vendor/ficl/dist/doc/graphics/ficl.4.96.jpg (contents, props changed) vendor/ficl/dist/doc/graphics/ficl_oop.jpg (contents, props changed) vendor/ficl/dist/doc/graphics/ficl_top.jpg (contents, props changed) vendor/ficl/dist/doc/graphics/sourceforge.jpg (contents, props changed) vendor/ficl/dist/doc/index.html (contents, props changed) vendor/ficl/dist/doc/license.html (contents, props changed) vendor/ficl/dist/doc/links.html (contents, props changed) vendor/ficl/dist/doc/locals.html (contents, props changed) vendor/ficl/dist/doc/oop.html (contents, props changed) vendor/ficl/dist/doc/parsesteps.html (contents, props changed) vendor/ficl/dist/doc/releases.html (contents, props changed) vendor/ficl/dist/doc/source/ vendor/ficl/dist/doc/source/api.ht vendor/ficl/dist/doc/source/debugger.ht vendor/ficl/dist/doc/source/dpans.ht vendor/ficl/dist/doc/source/ficl.ht vendor/ficl/dist/doc/source/generate.py (contents, props changed) vendor/ficl/dist/doc/source/index.ht vendor/ficl/dist/doc/source/license.ht vendor/ficl/dist/doc/source/links.ht vendor/ficl/dist/doc/source/locals.ht vendor/ficl/dist/doc/source/oop.ht vendor/ficl/dist/doc/source/parsesteps.ht vendor/ficl/dist/doc/source/releases.ht vendor/ficl/dist/doc/source/upgrading.ht vendor/ficl/dist/doc/upgrading.html (contents, props changed) vendor/ficl/dist/double.c (contents, props changed) vendor/ficl/dist/extras.c (contents, props changed) vendor/ficl/dist/ficl.dsw vendor/ficl/dist/ficl.h (contents, props changed) vendor/ficl/dist/ficlcompatibility.h (contents, props changed) vendor/ficl/dist/ficldll.def vendor/ficl/dist/ficldll.dsp vendor/ficl/dist/ficlexe.dsp vendor/ficl/dist/ficllib.dsp vendor/ficl/dist/ficllocal.h (contents, props changed) vendor/ficl/dist/ficlplatform/ vendor/ficl/dist/ficlplatform/alpha.h (contents, props changed) vendor/ficl/dist/ficlplatform/ansi.c (contents, props changed) vendor/ficl/dist/ficlplatform/ansi.h (contents, props changed) vendor/ficl/dist/ficlplatform/ficlexports.txt (contents, props changed) vendor/ficl/dist/ficlplatform/makedef.py (contents, props changed) vendor/ficl/dist/ficlplatform/unix.c (contents, props changed) vendor/ficl/dist/ficlplatform/unix.h (contents, props changed) vendor/ficl/dist/ficlplatform/win32.c (contents, props changed) vendor/ficl/dist/ficlplatform/win32.h (contents, props changed) vendor/ficl/dist/ficltokens.h (contents, props changed) vendor/ficl/dist/fileaccess.c (contents, props changed) vendor/ficl/dist/float.c (contents, props changed) vendor/ficl/dist/hash.c (contents, props changed) vendor/ficl/dist/lzcompress.c (contents, props changed) vendor/ficl/dist/lzuncompress.c (contents, props changed) vendor/ficl/dist/main.c (contents, props changed) vendor/ficl/dist/prefix.c (contents, props changed) vendor/ficl/dist/primitives.c (contents, props changed) vendor/ficl/dist/search.c (contents, props changed) vendor/ficl/dist/softcore/ vendor/ficl/dist/softcore.c (contents, props changed) vendor/ficl/dist/softcore/classes.fr vendor/ficl/dist/softcore/ficl.fr vendor/ficl/dist/softcore/ficlclass.fr vendor/ficl/dist/softcore/ficllocal.fr vendor/ficl/dist/softcore/fileaccess.fr vendor/ficl/dist/softcore/forml.fr vendor/ficl/dist/softcore/ifbrack.fr vendor/ficl/dist/softcore/jhlocal.fr vendor/ficl/dist/softcore/make.bat vendor/ficl/dist/softcore/makefile (contents, props changed) vendor/ficl/dist/softcore/makesoftcore.c (contents, props changed) vendor/ficl/dist/softcore/marker.fr vendor/ficl/dist/softcore/oo.fr vendor/ficl/dist/softcore/prefix.fr vendor/ficl/dist/softcore/softcore.fr vendor/ficl/dist/softcore/string.fr vendor/ficl/dist/softcore/win32.fr vendor/ficl/dist/stack.c (contents, props changed) vendor/ficl/dist/system.c (contents, props changed) vendor/ficl/dist/test/ vendor/ficl/dist/test/asm68k.4th vendor/ficl/dist/test/core.fr vendor/ficl/dist/test/fib.fr vendor/ficl/dist/test/ficltest.fr vendor/ficl/dist/test/ooptest.fr vendor/ficl/dist/test/prefix.fr vendor/ficl/dist/test/sarray.fr vendor/ficl/dist/test/testcase.fr vendor/ficl/dist/test/tester.fr vendor/ficl/dist/test/vocab.fr vendor/ficl/dist/tools.c (contents, props changed) vendor/ficl/dist/utility.c (contents, props changed) vendor/ficl/dist/vm.c (contents, props changed) vendor/ficl/dist/word.c (contents, props changed) Added: vendor/ficl/dist/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/ficl/dist/Makefile Mon May 11 14:02:38 2015 (r282768) @@ -0,0 +1,60 @@ +OBJECTS= dictionary.o system.o fileaccess.o float.o double.o prefix.o search.o softcore.o stack.o tools.o vm.o primitives.o bit.o lzuncompress.o unix.o utility.o hash.o callback.o word.o extras.o +HEADERS= ficl.h ficlplatform/unix.h +# +# Flags for shared library +#TARGET= -Dlinux # riscos MOTO_CPU32 +SHFLAGS = -fPIC +CFLAGS= -O $(SHFLAGS) -Wall +CPPFLAGS= $(TARGET) -I. +CC = cc +LIB = ar cr +RANLIB = ranlib + +MAJOR = 4 +MINOR = 1.0 + +ficl: main.o $(HEADERS) libficl.a + $(CC) $(CFLAGS) $(LDFLAGS) main.o -o ficl -L. -lficl -lm + +lib: libficl.so.$(MAJOR).$(MINOR) + +# static library build +libficl.a: $(OBJECTS) + $(LIB) libficl.a $(OBJECTS) + $(RANLIB) libficl.a + +# shared library build +libficl.so.$(MAJOR).$(MINOR): $(OBJECTS) + $(CC) $(LDFLAGS) -shared -Wl,-soname,libficl.so.$(MAJOR).$(MINOR) \ + -o libficl.so.$(MAJOR).$(MINOR) $(OBJECTS) + ln -sf libficl.so.$(MAJOR).$(MINOR) libficl.so + +main: main.o ficl.h sysdep.h libficl.so.$(MAJOR).$(MINOR) + $(CC) $(CFLAGS) $(LDFLAGS) main.o -o main -L. -lficl -lm + ln -sf libficl.so.$(MAJOR).$(MINOR) libficl.so.$(MAJOR) + +# depend explicitly to help finding source files in another subdirectory, +# and repeat commands since gmake doesn't understand otherwise +ansi.o: ficlplatform/ansi.c $(HEADERS) + $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $< +unix.o: ficlplatform/unix.c $(HEADERS) + $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $< + +# +# generic object code +# +.SUFFIXES: .cxx .cc .c .o + +.c.o: + $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $< + +.cxx.o: + $(CPP) $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $< + +.cc.o: + $(CPP) $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $< +# +# generic cleanup code +# +clean: + rm -f *.o *.a libficl.* ficl Added: vendor/ficl/dist/Makefile.ansi ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/ficl/dist/Makefile.ansi Mon May 11 14:02:38 2015 (r282768) @@ -0,0 +1,56 @@ +OBJECTS= dictionary.o system.o fileaccess.o float.o double.o prefix.o search.o softcore.o stack.o tools.o vm.o primitives.o bit.o lzuncompress.o ansi.o utility.o hash.o callback.o word.o extras.o +HEADERS= ficl.h ficlplatform/ansi.h +# +# Flags for shared library +TARGET= -ansi -DFICL_ANSI # riscos MOTO_CPU32 +SHFLAGS = -fPIC +CFLAGS= -O $(SHFLAGS) +CPPFLAGS= $(TARGET) -I. +CC = cc +LIB = ar cr +RANLIB = ranlib + +MAJOR = 4 +MINOR = 1.0 + +ficl: main.o $(HEADERS) libficl.a + $(CC) main.o -o ficl -L. -lficl -lm + +lib: libficl.so.$(MAJOR).$(MINOR) + +# static library build +libficl.a: $(OBJECTS) + $(LIB) libficl.a $(OBJECTS) + $(RANLIB) libficl.a + +# shared library build +libficl.so.$(MAJOR).$(MINOR): $(OBJECTS) + $(CC) -shared -Wl,-soname,libficl.so.$(MAJOR).$(MINOR) \ + -o libficl.so.$(MAJOR).$(MINOR) $(OBJECTS) + ln -sf libficl.so.$(MAJOR).$(MINOR) libficl.so + +main: main.o ficl.h sysdep.h libficl.so.$(MAJOR).$(MINOR) + $(CC) main.o -o main -L. -lficl -lm + ln -sf libficl.so.$(MAJOR).$(MINOR) libficl.so.$(MAJOR) + +ansi.o: ficlplatform/ansi.c $(HEADERS) + $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ ficlplatform/ansi.c + +# +# generic object code +# +.SUFFIXES: .cxx .cc .c .o + +.c.o: + $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $< + +.cxx.o: + $(CPP) $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $< + +.cc.o: + $(CPP) $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $< +# +# generic cleanup code +# +clean: + rm -f *.o *.a libficl.* Added: vendor/ficl/dist/Makefile.linux ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/ficl/dist/Makefile.linux Mon May 11 14:02:38 2015 (r282768) @@ -0,0 +1,56 @@ +OBJECTS= dictionary.o system.o fileaccess.o float.o double.o prefix.o search.o softcore.o stack.o tools.o vm.o primitives.o bit.o lzuncompress.o unix.o utility.o hash.o callback.o word.o extras.o +HEADERS= ficl.h ficlplatform/unix.h +# +# Flags for shared library +TARGET= -Dlinux # riscos MOTO_CPU32 +SHFLAGS = -fPIC +CFLAGS= -O $(SHFLAGS) +CPPFLAGS= $(TARGET) -I. +CC = cc +LIB = ar cr +RANLIB = ranlib + +MAJOR = 4 +MINOR = 1.0 + +ficl: main.o $(HEADERS) libficl.a + $(CC) main.o -o ficl -L. -lficl -lm + +lib: libficl.so.$(MAJOR).$(MINOR) + +# static library build +libficl.a: $(OBJECTS) + $(LIB) libficl.a $(OBJECTS) + $(RANLIB) libficl.a + +# shared library build +libficl.so.$(MAJOR).$(MINOR): $(OBJECTS) + $(CC) -shared -Wl,-soname,libficl.so.$(MAJOR).$(MINOR) \ + -o libficl.so.$(MAJOR).$(MINOR) $(OBJECTS) + ln -sf libficl.so.$(MAJOR).$(MINOR) libficl.so + +main: main.o ficl.h sysdep.h libficl.so.$(MAJOR).$(MINOR) + $(CC) main.o -o main -L. -lficl -lm + ln -sf libficl.so.$(MAJOR).$(MINOR) libficl.so.$(MAJOR) + +unix.o: ficlplatform/unix.c $(HEADERS) + $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ ficlplatform/unix.c + +# +# generic object code +# +.SUFFIXES: .cxx .cc .c .o + +.c.o: + $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $< + +.cxx.o: + $(CPP) $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $< + +.cc.o: + $(CPP) $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $< +# +# generic cleanup code +# +clean: + rm -f *.o *.a libficl.* Added: vendor/ficl/dist/ReadMe.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/ficl/dist/ReadMe.txt Mon May 11 14:02:38 2015 (r282768) @@ -0,0 +1,53 @@ +FICL 4.1.0 +October 2010 + +________ +OVERVIEW + +Ficl is a complete programming language interpreter designed to be embedded +into other systems (including firmware based ones) as a command, macro, +and development prototype language. Ficl stands for "Forth Inspired +Command Language". + +For more information, please see the "doc" directory. +For release notes, please see "doc/releases.html". + +____________ +INSTALLATION + +Ficl builds out-of-the-box on the following platforms: + * NetBSD, FreeBSD: use "Makefile". + * Linux: use "Makefile.linux", but it should work with + "Makefile" as well. + * Win32: use "ficl.dsw" / "ficl.dsp". +To port to other platforms, we suggest you start with the generic +"Makefile" and the "unix.c" / "unix.h" platform-specific implementation +files. (And please--feel free to submit your portability changes!) + +(Note: Ficl used to build under RiscOS, but we broke everything +for the 4.0 release. Please fix it and send us the diffs!) + +____________ +FICL LICENSE + +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. + Added: vendor/ficl/dist/bit.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/ficl/dist/bit.c Mon May 11 14:02:38 2015 (r282768) @@ -0,0 +1,49 @@ +#include "ficl.h" + +int ficlBitGet(const unsigned char *bits, size_t index) + { + int byteIndex = index >> 3; + int bitIndex = index & 7; + unsigned char mask = (unsigned char)(128 >> bitIndex); + + return ((mask & bits[byteIndex]) ? 1 : 0); + } + + + +void ficlBitSet(unsigned char *bits, size_t index, int value) + { + int byteIndex = index >> 3; + int bitIndex = index & 7; + unsigned char mask = (unsigned char)(128 >> bitIndex); + + if (value) + bits[byteIndex] |= mask; + else + bits[byteIndex] &= ~mask; + } + + +void ficlBitGetString(unsigned char *destination, const unsigned char *source, int offset, int count, int destAlignment) + { + int bit = destAlignment - count; + while (count--) + ficlBitSet(destination, bit++, ficlBitGet(source, offset++)); + } + + +/* +** This will actually work correctly *regardless* of the local architecture. +** --lch +**/ +ficlUnsigned16 ficlNetworkUnsigned16(ficlUnsigned16 number) +{ + ficlUnsigned8 *pointer = (ficlUnsigned8 *)&number; + return (ficlUnsigned16)(((ficlUnsigned16)(pointer[0] << 8)) | (pointer[1])); +} + +ficlUnsigned32 ficlNetworkUnsigned32(ficlUnsigned32 number) +{ + ficlUnsigned16 *pointer = (ficlUnsigned16 *)&number; + return ((ficlUnsigned32)(ficlNetworkUnsigned16(pointer[0]) << 16)) | ficlNetworkUnsigned16(pointer[1]); +} Added: vendor/ficl/dist/callback.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/ficl/dist/callback.c Mon May 11 14:02:38 2015 (r282768) @@ -0,0 +1,76 @@ +#include "ficl.h" + + +extern ficlSystem *ficlSystemGlobal; + +/************************************************************************** + f i c l C a l l b a c k T e x t O u t +** Feeds text to the vm's output callback +**************************************************************************/ +void ficlCallbackTextOut(ficlCallback *callback, char *text) +{ + ficlOutputFunction textOut = NULL; + + if (callback != NULL) + { + if (callback->textOut != NULL) + textOut = callback->textOut; + else if ((callback->system != NULL) && (callback != &(callback->system->callback))) + { + ficlCallbackTextOut(&(callback->system->callback), text); + return; + } + } + + if ((textOut == NULL) && (ficlSystemGlobal != NULL)) + { + callback = &(ficlSystemGlobal->callback); + textOut = callback->textOut; + } + + if (textOut == NULL) + textOut = ficlCallbackDefaultTextOut; + + (textOut)(callback, text); + + return; +} + + +/************************************************************************** + f i c l C a l l b a c k E r r o r O u t +** Feeds text to the vm's error output callback +**************************************************************************/ +void ficlCallbackErrorOut(ficlCallback *callback, char *text) +{ + ficlOutputFunction errorOut = NULL; + + if (callback != NULL) + { + if (callback->errorOut != NULL) + errorOut = callback->errorOut; + else if ((callback->system != NULL) && (callback != &(callback->system->callback))) + { + ficlCallbackErrorOut(&(callback->system->callback), text); + return; + } + } + + if ((errorOut == NULL) && (ficlSystemGlobal != NULL)) + { + callback = &(ficlSystemGlobal->callback); + errorOut = callback->errorOut; + } + + if (errorOut == NULL) + { + ficlCallbackTextOut(callback, text); + return; + } + + (errorOut)(callback, text); + + return; +} + + Added: vendor/ficl/dist/compatibility.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/ficl/dist/compatibility.c Mon May 11 14:02:38 2015 (r282768) @@ -0,0 +1,284 @@ +#define FICL_FORCE_COMPATIBILITY 1 +#include "ficl.h" + + +FICL_PLATFORM_EXTERN ficlStack *stackCreate (unsigned cells) { return ficlStackCreate(NULL, "unknown", cells); } +FICL_PLATFORM_EXTERN void stackDelete (ficlStack *stack) { ficlStackDestroy(stack); } +FICL_PLATFORM_EXTERN int stackDepth (ficlStack *stack) { return ficlStackDepth(stack); } +FICL_PLATFORM_EXTERN void stackDrop (ficlStack *stack, int n) { ficlStackDrop(stack, n); } +FICL_PLATFORM_EXTERN ficlCell stackFetch (ficlStack *stack, int n) { return ficlStackFetch(stack, n); } +FICL_PLATFORM_EXTERN ficlCell stackGetTop (ficlStack *stack) { return ficlStackFetch(stack, 0); } +#if FICL_WANT_LOCALS +FICL_PLATFORM_EXTERN void stackLink (ficlStack *stack, int cells) { ficlStackLink(stack, cells); } +FICL_PLATFORM_EXTERN void stackUnlink (ficlStack *stack) { ficlStackUnlink(stack); } +#endif /* FICL_WANT_LOCALS */ +FICL_PLATFORM_EXTERN void stackPick (ficlStack *stack, int n) { ficlStackPick(stack, n); } +FICL_PLATFORM_EXTERN ficlCell stackPop (ficlStack *stack) { return ficlStackPop(stack); } +FICL_PLATFORM_EXTERN void *stackPopPtr (ficlStack *stack) { return ficlStackPopPointer(stack); } +FICL_PLATFORM_EXTERN ficlUnsigned stackPopUNS (ficlStack *stack) { return ficlStackPopUnsigned(stack); } +FICL_PLATFORM_EXTERN ficlInteger stackPopINT (ficlStack *stack) { return ficlStackPopInteger(stack); } +FICL_PLATFORM_EXTERN void stackPush (ficlStack *stack, ficlCell cell) { ficlStackPush(stack, cell); } +FICL_PLATFORM_EXTERN void stackPushPtr (ficlStack *stack, void *pointer) { ficlStackPushPointer(stack, pointer); } +FICL_PLATFORM_EXTERN void stackPushUNS (ficlStack *stack, ficlUnsigned u) { ficlStackPushUnsigned(stack, u); } +FICL_PLATFORM_EXTERN void stackPushINT (ficlStack *stack, ficlInteger i) { ficlStackPushInteger(stack, i); } +FICL_PLATFORM_EXTERN void stackReset (ficlStack *stack) { ficlStackReset(stack); } +FICL_PLATFORM_EXTERN void stackRoll (ficlStack *stack, int n) { ficlStackRoll(stack, n); } +FICL_PLATFORM_EXTERN void stackSetTop (ficlStack *stack, ficlCell cell) { ficlStackSetTop(stack, cell); } +FICL_PLATFORM_EXTERN void stackStore (ficlStack *stack, int n, ficlCell cell) { ficlStackStore(stack, n, cell); } + +#if (FICL_WANT_FLOAT) +FICL_PLATFORM_EXTERN ficlFloat stackPopFloat (ficlStack *stack) { return ficlStackPopFloat(stack); } +FICL_PLATFORM_EXTERN void stackPushFloat(ficlStack *stack, ficlFloat f) { ficlStackPushFloat(stack, f); } +#endif + +FICL_PLATFORM_EXTERN int wordIsImmediate(ficlWord *word) { return ficlWordIsImmediate(word); } +FICL_PLATFORM_EXTERN int wordIsCompileOnly(ficlWord *word) { return ficlWordIsCompileOnly(word); } + + +FICL_PLATFORM_EXTERN void vmBranchRelative(ficlVm *vm, int offset) { ficlVmBranchRelative(vm, offset); } +FICL_PLATFORM_EXTERN ficlVm *vmCreate (ficlVm *vm, unsigned nPStack, unsigned nRStack) { return ficlVmCreate(vm, nPStack, nRStack); } +FICL_PLATFORM_EXTERN void vmDelete (ficlVm *vm) { ficlVmDestroy(vm); } +FICL_PLATFORM_EXTERN void vmExecute (ficlVm *vm, ficlWord *word) { ficlVmExecuteWord(vm, word); } +FICL_PLATFORM_EXTERN ficlDictionary *vmGetDict (ficlVm *vm) { return ficlVmGetDictionary(vm); } +FICL_PLATFORM_EXTERN char * vmGetString (ficlVm *vm, ficlCountedString *spDest, char delimiter) { return ficlVmGetString(vm, spDest, delimiter); } +FICL_PLATFORM_EXTERN ficlString vmGetWord (ficlVm *vm) { return ficlVmGetWord(vm); } +FICL_PLATFORM_EXTERN ficlString vmGetWord0 (ficlVm *vm) { return ficlVmGetWord0(vm); } +FICL_PLATFORM_EXTERN int vmGetWordToPad (ficlVm *vm) { return ficlVmGetWordToPad(vm); } +FICL_PLATFORM_EXTERN ficlString vmParseString (ficlVm *vm, char delimiter) { return ficlVmParseString(vm, delimiter); } +FICL_PLATFORM_EXTERN ficlString vmParseStringEx(ficlVm *vm, char delimiter, char skipLeading) { return ficlVmParseStringEx(vm, delimiter, skipLeading); } +FICL_PLATFORM_EXTERN ficlCell vmPop (ficlVm *vm) { return ficlVmPop(vm); } +FICL_PLATFORM_EXTERN void vmPush (ficlVm *vm, ficlCell cell) { ficlVmPush(vm, cell); } +FICL_PLATFORM_EXTERN void vmPopIP (ficlVm *vm) { ficlVmPopIP(vm); } +FICL_PLATFORM_EXTERN void vmPushIP (ficlVm *vm, ficlIp newIP) { ficlVmPushIP(vm, newIP); } +FICL_PLATFORM_EXTERN void vmQuit (ficlVm *vm) { ficlVmQuit(vm); } +FICL_PLATFORM_EXTERN void vmReset (ficlVm *vm) { ficlVmReset(vm); } +FICL_PLATFORM_EXTERN void vmThrow (ficlVm *vm, int except) { ficlVmThrow(vm, except); } +FICL_PLATFORM_EXTERN void vmThrowErr (ficlVm *vm, char *fmt, ...) { va_list list; va_start(list, fmt); ficlVmThrowErrorVararg(vm, fmt, list); va_end(list); } + +FICL_PLATFORM_EXTERN void vmCheckStack(ficlVm *vm, int popCells, int pushCells) { FICL_IGNORE(vm); FICL_IGNORE(popCells); FICL_IGNORE(pushCells); FICL_STACK_CHECK(vm->dataStack, popCells, pushCells); } +#if FICL_WANT_FLOAT +FICL_PLATFORM_EXTERN void vmCheckFStack(ficlVm *vm, int popCells, int pushCells) { FICL_IGNORE(vm); FICL_IGNORE(popCells); FICL_IGNORE(pushCells); FICL_STACK_CHECK(vm->floatStack, popCells, pushCells); } +#endif + +FICL_PLATFORM_EXTERN void vmPushTib (ficlVm *vm, char *text, ficlInteger nChars, ficlTIB *pSaveTib) { ficlVmPushTib(vm, text, nChars, pSaveTib); } +FICL_PLATFORM_EXTERN void vmPopTib (ficlVm *vm, ficlTIB *pTib) { ficlVmPopTib(vm, pTib); } + +FICL_PLATFORM_EXTERN int isPowerOfTwo(ficlUnsigned u) { return ficlIsPowerOfTwo(u); } + +#if defined(_WIN32) +/* #SHEESH +** Why do Microsoft Meatballs insist on contaminating +** my namespace with their string functions??? +*/ +#pragma warning(disable: 4273) +#endif +char *ltoa(ficlInteger value, char *string, int radix ) { return ficlLtoa(value, string, radix); } +char *ultoa(ficlUnsigned value, char *string, int radix ) { return ficlUltoa(value, string, radix); } +char *strrev( char *string ) { return ficlStringReverse(string); } +#if defined(_WIN32) +#pragma warning(default: 4273) +#endif +FICL_PLATFORM_EXTERN char digit_to_char(int value) { return ficlDigitToCharacter(value); } +FICL_PLATFORM_EXTERN char *skipSpace(char *cp, char *end) { return ficlStringSkipSpace(cp, end); } +FICL_PLATFORM_EXTERN char *caseFold(char *cp) { return ficlStringCaseFold(cp); } +FICL_PLATFORM_EXTERN int strincmp(char *cp1, char *cp2, ficlUnsigned count) { return ficlStrincmp(cp1, cp2, count); } + +FICL_PLATFORM_EXTERN void hashForget (ficlHash *hash, void *where) { ficlHashForget(hash, where); } +FICL_PLATFORM_EXTERN ficlUnsigned16 hashHashCode (ficlString string) { return ficlHashCode(string); } +FICL_PLATFORM_EXTERN void hashInsertWord(ficlHash *hash, ficlWord *word) { ficlHashInsertWord(hash, word); } +FICL_PLATFORM_EXTERN ficlWord *hashLookup (ficlHash *hash, ficlString string, ficlUnsigned16 hashCode) { return ficlHashLookup(hash, string, hashCode); } +FICL_PLATFORM_EXTERN void hashReset (ficlHash *hash) { ficlHashReset(hash); } + + +FICL_PLATFORM_EXTERN void *alignPtr(void *ptr) { return ficlAlignPointer(ptr); } +FICL_PLATFORM_EXTERN void dictAbortDefinition(ficlDictionary *dictionary) { ficlDictionaryAbortDefinition(dictionary); } +FICL_PLATFORM_EXTERN void dictAlign (ficlDictionary *dictionary) { ficlDictionaryAlign(dictionary); } +FICL_PLATFORM_EXTERN int dictAllot (ficlDictionary *dictionary, int n) { ficlDictionaryAllot(dictionary, n); return 0; } +FICL_PLATFORM_EXTERN int dictAllotCells (ficlDictionary *dictionary, int cells) { ficlDictionaryAllotCells(dictionary, cells); return 0; } +FICL_PLATFORM_EXTERN void dictAppendCell (ficlDictionary *dictionary, ficlCell cell) { ficlDictionaryAppendCell(dictionary, cell); } +FICL_PLATFORM_EXTERN void dictAppendChar (ficlDictionary *dictionary, char c) { ficlDictionaryAppendCharacter(dictionary, c); } +FICL_PLATFORM_EXTERN ficlWord *dictAppendWord (ficlDictionary *dictionary, + char *name, + ficlPrimitive code, + ficlUnsigned8 flags) + { return ficlDictionaryAppendPrimitive(dictionary, name, code, flags); } +FICL_PLATFORM_EXTERN ficlWord *dictAppendWord2(ficlDictionary *dictionary, + ficlString name, + ficlPrimitive code, + ficlUnsigned8 flags) + { return ficlDictionaryAppendWord(dictionary, name, code, flags); } +FICL_PLATFORM_EXTERN void dictAppendUNS (ficlDictionary *dictionary, ficlUnsigned u) { ficlDictionaryAppendUnsigned(dictionary, u); } +FICL_PLATFORM_EXTERN int dictCellsAvail (ficlDictionary *dictionary) { return ficlDictionaryCellsAvailable(dictionary); } +FICL_PLATFORM_EXTERN int dictCellsUsed (ficlDictionary *dictionary) { return ficlDictionaryCellsUsed(dictionary); } +FICL_PLATFORM_EXTERN void dictCheck (ficlDictionary *dictionary, ficlVm *vm, int n) { FICL_IGNORE(dictionary); FICL_IGNORE(vm); FICL_IGNORE(n); FICL_VM_DICTIONARY_CHECK(vm, dictionary, n); } +FICL_PLATFORM_EXTERN ficlDictionary *dictCreate(unsigned cells) { return ficlDictionaryCreate(NULL, cells); } +FICL_PLATFORM_EXTERN ficlDictionary *dictCreateHashed(unsigned cells, unsigned hash) { return ficlDictionaryCreateHashed(NULL, cells, hash); } +FICL_PLATFORM_EXTERN ficlHash *dictCreateWordlist(ficlDictionary *dictionary, int nBuckets) { return ficlDictionaryCreateWordlist(dictionary, nBuckets); } +FICL_PLATFORM_EXTERN void dictDelete (ficlDictionary *dictionary) { ficlDictionaryDestroy(dictionary); } +FICL_PLATFORM_EXTERN void dictEmpty (ficlDictionary *dictionary, unsigned nHash) { ficlDictionaryEmpty(dictionary, nHash); } +#if FICL_WANT_FLOAT +FICL_PLATFORM_EXTERN void ficlPrimitiveHashSummary(ficlVm *vm); +FICL_PLATFORM_EXTERN void dictHashSummary(ficlVm *vm) { ficlPrimitiveHashSummary(vm); } +#endif +FICL_PLATFORM_EXTERN int dictIncludes (ficlDictionary *dictionary, void *p) { return ficlDictionaryIncludes(dictionary, p); } +FICL_PLATFORM_EXTERN ficlWord *dictLookup (ficlDictionary *dictionary, ficlString name) { return ficlDictionaryLookup(dictionary, name); } +#if FICL_WANT_LOCALS +FICL_PLATFORM_EXTERN ficlWord *ficlLookupLoc (ficlSystem *system, ficlString name) { return ficlDictionaryLookup(ficlSystemGetLocals(system), name); } +#endif +FICL_PLATFORM_EXTERN void dictResetSearchOrder(ficlDictionary *dictionary) { ficlDictionaryResetSearchOrder(dictionary); } +FICL_PLATFORM_EXTERN void dictSetFlags (ficlDictionary *dictionary, ficlUnsigned8 set, ficlUnsigned8 clear) { ficlDictionarySetFlags(dictionary, set); ficlDictionaryClearFlags(dictionary, clear); } +FICL_PLATFORM_EXTERN void dictSetImmediate(ficlDictionary *dictionary) { ficlDictionarySetImmediate(dictionary); } +FICL_PLATFORM_EXTERN void dictUnsmudge (ficlDictionary *dictionary) { ficlDictionaryUnsmudge(dictionary); } +FICL_PLATFORM_EXTERN ficlCell *dictWhere (ficlDictionary *dictionary) { return ficlDictionaryWhere(dictionary); } + +FICL_PLATFORM_EXTERN int ficlAddParseStep(ficlSystem *system, ficlWord *word) { return ficlSystemAddParseStep(system, word); } +FICL_PLATFORM_EXTERN void ficlAddPrecompiledParseStep(ficlSystem *system, char *name, ficlParseStep pStep) { ficlSystemAddPrimitiveParseStep(system, name, pStep); } +FICL_PLATFORM_EXTERN void ficlPrimitiveParseStepList(ficlVm *vm); +FICL_PLATFORM_EXTERN void ficlListParseSteps(ficlVm *vm) { ficlPrimitiveParseStepList(vm); } + +FICL_PLATFORM_EXTERN void ficlTermSystem(ficlSystem *system) { ficlSystemDestroy(system); } +FICL_PLATFORM_EXTERN int ficlEvaluate(ficlVm *vm, char *pText) { return ficlVmEvaluate(vm, pText); } +FICL_PLATFORM_EXTERN int ficlExec (ficlVm *vm, char *pText) { ficlString s; FICL_STRING_SET_FROM_CSTRING(s, pText); return ficlVmExecuteString(vm, s); } +FICL_PLATFORM_EXTERN int ficlExecC(ficlVm *vm, char *pText, ficlInteger nChars) { ficlString s; FICL_STRING_SET_POINTER(s, pText); FICL_STRING_SET_LENGTH(s, nChars); return ficlVmExecuteString(vm, s); } +FICL_PLATFORM_EXTERN int ficlExecXT(ficlVm *vm, ficlWord *word) { return ficlVmExecuteXT(vm, word); } +FICL_PLATFORM_EXTERN void ficlFreeVM(ficlVm *vm) { ficlVmDestroy(vm); } + + + + + +static void thunkTextOut(ficlCallback *callback, char *text) + { + ficlCompatibilityOutputFunction outputFunction; + if ((callback->vm != NULL) && (callback->vm->thunkedTextout != NULL)) + outputFunction = callback->system->thunkedTextout; + else if (callback->system->thunkedTextout != NULL) + outputFunction = callback->system->thunkedTextout; + else + { + ficlCallbackDefaultTextOut(callback, text); + return; + } + ficlCompatibilityTextOutCallback(callback, text, outputFunction); + } + + +FICL_PLATFORM_EXTERN void vmSetTextOut(ficlVm *vm, ficlCompatibilityOutputFunction textOut) + { + vm->thunkedTextout = textOut; + ficlVmSetTextOut(vm, thunkTextOut); + } + +FICL_PLATFORM_EXTERN void vmTextOut (ficlVm *vm, char *text, int fNewline) + { + ficlVmTextOut(vm, text); + if (fNewline) + ficlVmTextOut(vm, "\n"); + } + + +FICL_PLATFORM_EXTERN void ficlTextOut (ficlVm *vm, char *text, int fNewline) + { + vmTextOut(vm, text, fNewline); + } + +extern ficlSystem *ficlSystemGlobal; +static defaultStackSize = FICL_DEFAULT_STACK_SIZE; +FICL_PLATFORM_EXTERN int ficlSetStackSize(int nStackCells) +{ + if (defaultStackSize < nStackCells) + defaultStackSize = nStackCells; + if ((ficlSystemGlobal != NULL) && (ficlSystemGlobal->stackSize < nStackCells)) + ficlSystemGlobal->stackSize = nStackCells; + return defaultStackSize; +} + + +FICL_PLATFORM_EXTERN ficlSystem *ficlInitSystemEx(ficlSystemInformation *fsi) +{ + ficlSystem *returnValue; + ficlCompatibilityOutputFunction thunkedTextout; + ficlSystemInformation clone; + + memcpy(&clone, fsi, sizeof(clone)); + thunkedTextout = (ficlCompatibilityOutputFunction)clone.textOut; + clone.textOut = clone.errorOut = thunkTextOut; + + returnValue = ficlSystemCreate(&clone); + if (returnValue != NULL) + { + returnValue->thunkedTextout = thunkedTextout; + } + return returnValue; +} + + +FICL_PLATFORM_EXTERN ficlSystem *ficlInitSystem(int nDictCells) +{ + ficlSystemInformation fsi; + ficlSystemInformationInitialize(&fsi); + fsi.dictionarySize = nDictCells; + if (fsi.stackSize < defaultStackSize) + fsi.stackSize = defaultStackSize; + return ficlSystemCreate(&fsi); +} + + + + +FICL_PLATFORM_EXTERN ficlVm *ficlNewVM(ficlSystem *system) +{ + ficlVm *returnValue = ficlSystemCreateVm(system); + if (returnValue != NULL) + { + if ((returnValue->callback.textOut != NULL) && (returnValue->callback.textOut != thunkTextOut)) + { + returnValue->thunkedTextout = (ficlCompatibilityOutputFunction)returnValue->callback.textOut; + returnValue->callback.textOut = thunkTextOut; + } + if ((returnValue->callback.errorOut != NULL) && (returnValue->callback.errorOut != thunkTextOut)) + { + if (returnValue->thunkedTextout == NULL) + returnValue->thunkedTextout = (ficlCompatibilityOutputFunction)returnValue->callback.errorOut; + returnValue->callback.errorOut = thunkTextOut; + } + } + return returnValue; +} + + + +FICL_PLATFORM_EXTERN ficlWord *ficlLookup(ficlSystem *system, char *name) { return ficlSystemLookup(system, name); } +FICL_PLATFORM_EXTERN ficlDictionary *ficlGetDict(ficlSystem *system) { return ficlSystemGetDictionary(system); } +FICL_PLATFORM_EXTERN ficlDictionary *ficlGetEnv (ficlSystem *system) { return ficlSystemGetEnvironment(system); } +FICL_PLATFORM_EXTERN void ficlSetEnv (ficlSystem *system, char *name, ficlInteger value) { ficlDictionarySetConstant(ficlSystemGetDictionary(system), name, value); } +FICL_PLATFORM_EXTERN void ficlSetEnvD(ficlSystem *system, char *name, ficlInteger high, ficlInteger low) { ficl2Unsigned value; FICL_2UNSIGNED_SET(low, high, value); ficlDictionarySet2Constant(ficlSystemGetDictionary(system), name, FICL_2UNSIGNED_TO_2INTEGER(value)); } +#if FICL_WANT_LOCALS +FICL_PLATFORM_EXTERN ficlDictionary *ficlGetLoc (ficlSystem *system) { return ficlSystemGetLocals(system); } +#endif +FICL_PLATFORM_EXTERN int ficlBuild(ficlSystem *system, char *name, ficlPrimitive code, char flags) { ficlDictionary *dictionary = ficlSystemGetDictionary(system); ficlDictionaryLock(dictionary, FICL_TRUE); ficlDictionaryAppendPrimitive(dictionary, name, code, flags); ficlDictionaryLock(dictionary, FICL_FALSE); return 0; } +FICL_PLATFORM_EXTERN void ficlCompileCore(ficlSystem *system) { ficlSystemCompileCore(system); } +FICL_PLATFORM_EXTERN void ficlCompilePrefix(ficlSystem *system) { ficlSystemCompilePrefix(system); } +FICL_PLATFORM_EXTERN void ficlCompileSearch(ficlSystem *system) { ficlSystemCompileSearch(system); } +FICL_PLATFORM_EXTERN void ficlCompileSoftCore(ficlSystem *system) { ficlSystemCompileSoftCore(system); } +FICL_PLATFORM_EXTERN void ficlCompileTools(ficlSystem *system) { ficlSystemCompileTools(system); } +FICL_PLATFORM_EXTERN void ficlCompileFile(ficlSystem *system) { ficlSystemCompileFile(system); } +#if FICL_WANT_FLOAT +FICL_PLATFORM_EXTERN void ficlCompileFloat(ficlSystem *system) { ficlSystemCompileFloat(system); } +FICL_PLATFORM_EXTERN int ficlParseFloatNumber( ficlVm *vm, ficlString string) { return ficlVmParseFloatNumber(vm, string); } +#endif +#if FICL_WANT_PLATFORM +FICL_PLATFORM_EXTERN void ficlCompilePlatform(ficlSystem *system) { ficlSystemCompilePlatform(system); } +#endif +FICL_PLATFORM_EXTERN int ficlParsePrefix(ficlVm *vm, ficlString string) { return ficlVmParsePrefix(vm, string); } + +FICL_PLATFORM_EXTERN int ficlParseNumber(ficlVm *vm, ficlString string) { return ficlVmParseNumber(vm, string); } +FICL_PLATFORM_EXTERN void ficlTick(ficlVm *vm) { ficlPrimitiveTick(vm); } +FICL_PLATFORM_EXTERN void parseStepParen(ficlVm *vm) { ficlPrimitiveParseStepParen(vm); } + +FICL_PLATFORM_EXTERN int isAFiclWord(ficlDictionary *dictionary, ficlWord *word) { return ficlDictionaryIsAWord(dictionary, word); } + + +FICL_PLATFORM_EXTERN void buildTestInterface(ficlSystem *system) { ficlSystemCompileExtras(system); } + + Added: vendor/ficl/dist/contrib/xclasses/readme.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/ficl/dist/contrib/xclasses/readme.txt Mon May 11 14:02:38 2015 (r282768) @@ -0,0 +1,111 @@ +XClasses is a simple IDL written in Python. +You declare your classes, methods, and members as Python objects, +and XClasses will generate the .c, .h, and .f files for you. +Not only do the Forth classes line up with their C counterparts +exactly, but all non-static methods (virtual and non-virtual) +are *automatically* thunked. In other words, any method +declared in XClasses and implemented in C can be called from +the matching Ficl class, and the C method will be automatically +called with the correct arguments. XClasses handles floating-point +arguments too! + +Known limitations: + * All arguments must be one cell wide. (That means + only single-precision floats, too.) + + + +To use: + * Declare all your classes in a .py script + * Include "xclasses.h" everywhere you need your classes + * Include xclasses.cpp in your project somewhere + * Call + "xclasses.f" included + from your Ficl initialization script + +And you're mostly done! + +Simply including xclasses.f is not enough, though. You must +explicitly instantiate your classes. This is to allow you a +chance to add your own methods to the class. For a class +named "myCallback", it would look like this: + + declare-myCallback + end-myCallback + +You also have to define the "init" function for the class. +Most of the time this will work fine: + + declare-myCallback + use-default-init + end-myCallback + + +The "default" init function calls the super class's init +function, then sets all data members to 0. If this isn't +what you want, roll your own. The init function takes +the usual 2-cell "this" pointer as its argument: + + declare-myCallback + : init ( 2:this ) ... + ; + end-myCallback + +For a do-nothing init function, you'll want this: + + declare-myCallback + : init 2drop ; + end-myCallback + + +Here's a random example from the simple game I'm working on: + +----------------------------------------------------------------- +skinStream = xMethod("stream", "void").setVirtual(1) +gjeSkin.addMethod(skinStream) + +## +## gjeTexture +## +## +gjeTexture = xClass("gjeTexture") +gjeTexture.setParent(gjeSkin) +gjeTexture.addMethod(skinStream) +gjeTexture.addMethod(xMethod("clear", "void")) +gjeTexture.addMember(xVariable("texture", "LPDIRECT3DTEXTURE8")) +gjeTexture.addMember(xVariable("name", "char *")) +gjeTexture.addMember(xVariable("variation", "int")) +gjeTexture.addMember(xVariable("material", "D3DMATERIAL8 *")) + +----------------------------------------------------------------- + +I sure hope that's enough to get you started. + + + +Random notes: +* XClasses doesn't deal well with struct-packing issues. It assumes + pretty much everything will be 4-byte aligned. This can bite you + if you add a 64-bit int... the C compiler may align it for you, + and XClasses won't know about it. (This could be fixed in a future + release... are you volunteering?) For now, it's best to declare + your classes such that 64-bit ints are naturally 8-byte aligned. + +* If you don't want to have to declare each class in turn, + you can add something like this to the end of your Python script: +----- +def declare(name): + xAddFiclFooter("\t\"" + name + ".constant\" \" sfind swap drop 0= [if] declare-" + name + " use-default-init end-" + name + " [endif] \" evaluate") + + +xAddFiclFooter(": xclassesDeclare") +for c in classes: + declare(c.name) +xAddFiclFooter("\t;") +----- + and then call "xclassesDeclare" from your Ficl script just after + including "xclasses.f". + + +--lch +larry@hastings.org Added: vendor/ficl/dist/contrib/xclasses/xclasses.py ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/ficl/dist/contrib/xclasses/xclasses.py Mon May 11 14:02:38 2015 (r282768) @@ -0,0 +1,870 @@ +import copy +import string +import sys +import time +import types + + +def capitalize(s): + return string.upper(s[0]) + s[1:] + +def fprint(f, s): + print >> f, s + + +def fprintHeader(f, comment = "//"): + fprint(f, comment) + fprint(f, comment + " Generated by xclasses.py at " + time.strftime("%Y/%m/%d %H:%M:%S")) + fprint(f, comment) + fprint(f, comment) + fprint(f, "") + +def fprintFooter(f, comment = "//"): + fprint(f, "") + fprint(f, "") + fprint(f, comment + " end of file") + fprint(f, "") + +multicallCallTypeFunction = 0 +multicallCallTypeMethod = 1 +multicallCallTypeVirtualMethod = 2 + +multicallReturnTypeVoid = 0 +multicallReturnTypeInteger = 16 +multicallReturnTypeCstring = 32 +multicallReturnTypeFloat = 48 + +multicallExplicitVtable = 512 + + +ficlVmName = "ficlVm" + +h_headers = [] +def xAddHHeader(line): + h_headers.append(line) + +h_footers = [] +def xAddHFooter(line): + h_footers.append(line) + +ficl_headers = [] +def xAddFiclHeader(line): + ficl_headers.append(line) + +ficl_footers = [] +def xAddFiclFooter(line): + ficl_footers.append(line) + +c_headers = [] +def xAddCHeader(line): + c_headers.append(line) + +c_footers = [] +def xAddCFooter(line): + c_footers.append(line) + + +classes = [] + +class xVariable: + def __init__(self, name, typeCPP = None, cells = None, count = None, defaultValue = None, cstring = None): + self.comments = [] + self.setName(name) + self.setCells(cells) + self.setCount(count) + self.setDefaultValue(defaultValue) + self.setCString(cstring) + self.setTypeCPP(typeCPP) + + def setName(self, name): + self.name = name + return self + + def setTypeCPP(self, typeCPP): + self.typeCPP = typeCPP + if (typeCPP == "char *"): + self.setCString(1) + return self + + def setCells(self, cells): + if cells == None: + self.cells = 1 + else: + self.cells = cells + return self + + def setCString(self, cstring): + self.cstring = cstring + return self + + def isCString(self): + return self.cstring + + def getTotalSize(self): + return self.cells * self.count + + def setCount(self, count): + if type(count) != types.IntType: + count = 1 + self.count = count + return self + + def setDefaultValue(self, defaultValue): + if (defaultValue != None) and (type(defaultValue) != types.StringType): + defaultValue = str(defaultValue) + self.defaultValue = defaultValue + return self + + def addComment(self, c): + self.comments.append(c) + return self + + def isFloat(self): + return self.typeCPP == "float" + + def stringCPP(self, wantDefaultValues=1): + if (type(self.typeCPP) != types.StringType): + sys.exit("didn't set a CPP type on variable " + self.name + "!") + output = self.typeCPP + if (self.typeCPP[-1] != "*") and (self.typeCPP[-1] != "&"): + output += " " + output += self.name + if self.count > 1: + output += "[" + str(self.count) + "]" + if self.count == 0: + output += "[]" + if wantDefaultValues and (self.defaultValue != None): + output += " = " + self.defaultValue + return output + + def printH(self, f): + if len(self.comments): + for comment in self.comments: + fprint(f, "\t" + "// " + comment) + fprint(f, "\t" + self.stringCPP() + ";") + + def printF(self, f): + totalCells = self.count * self.cells + if (totalCells <= 1): + typeF = "cell:" + else: + typeF = str(totalCells) + " cells:" + if len(self.comments): + for comment in self.comments: + fprint(f, "\t" + "// " + comment) + fprint(f, "\t" + "S\" " + typeF + " ." + self.name + " \" evaluate") + + +class xMethod: + def __init__(self, name, returnType = None, virtual = None, static = None, body = None): + self.arguments = [] + self.comments = [] + + self.setName(name) + self.setReturnType(returnType) + self.setVirtual(virtual) + self.setStatic(static) + self.setBody(body) + self.setThunkVariable(None) + self.vtableOffset = 0 + + def copy(): + clone = xMethod(self.name, self.returnType, self.virtual, self.static) + clone.arguments = self.arguments + clone.comments = self.comments + + def setName(self, name): + self.name = name + return self + + def setReturnType(self, returnType): + if returnType.__class__ == xVariable: + self.returnType = returnType + elif type(returnType) == types.StringType: + self.returnType = xVariable("ignored", returnType) + else: + self.returnType = None + return self + + def returnTypeIsVoid(self): + return(self.returnType == None) or (self.returnType.typeCPP == None) or (self.returnType.typeCPP == "") or (self.returnType.typeCPP == "void") + + def setVirtual(self, virtual): + self.virtual = virtual + return self + + def isVirtual(self): + return self.virtual > 0 + + def isPureVirtual(self): + return self.virtual > 1 + + def setStatic(self, static): + self.static = static + return self + + def setThunkVariable(self, thunkVariable): + self.thunkVariable = thunkVariable + return self + + def isStatic(self): + return self.static + + # a constructor or a destructor + def isClassSpecial(self): + return (self.returnType == None) or (self.returnType.typeCPP == None) or (self.returnType.typeCPP == "") + + def setBody(self, body): + self.body = body + return self + + def addArgument(self, argument): + self.arguments.append(argument) + return self + + def addComment(self, c): + self.comments.append(c) + return self + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon May 11 14:07:49 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 61811E51; Mon, 11 May 2015 14:07:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 364821750; Mon, 11 May 2015 14:07:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4BE7nvi074702; Mon, 11 May 2015 14:07:49 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4BE7ng1074701; Mon, 11 May 2015 14:07:49 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201505111407.t4BE7ng1074701@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Mon, 11 May 2015 14:07:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r282769 - vendor/ficl/4.1.0 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.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2015 14:07:49 -0000 Author: pfg Date: Mon May 11 14:07:48 2015 New Revision: 282769 URL: https://svnweb.freebsd.org/changeset/base/282769 Log: Tag ficl 4.1.0 Added: vendor/ficl/4.1.0/ - copied from r282768, vendor/ficl/dist/ From owner-svn-src-all@FreeBSD.ORG Mon May 11 14:10:55 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B8732210; Mon, 11 May 2015 14:10:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8CDE3177D; Mon, 11 May 2015 14:10:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4BEAtL6076932; Mon, 11 May 2015 14:10:55 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4BEAth3076931; Mon, 11 May 2015 14:10:55 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201505111410.t4BEAth3076931@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 11 May 2015 14:10:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282770 - head/sys/dev/ofw 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.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2015 14:10:55 -0000 Author: andrew Date: Mon May 11 14:10:54 2015 New Revision: 282770 URL: https://svnweb.freebsd.org/changeset/base/282770 Log: Add ofw_bus_find_compatible to find a compatible ofw node. This will be used on ARM to help find the correct node to use to start secondary CPUs as this happens before device enumeration. Modified: head/sys/dev/ofw/ofw_bus_subr.c Modified: head/sys/dev/ofw/ofw_bus_subr.c ============================================================================== --- head/sys/dev/ofw/ofw_bus_subr.c Mon May 11 14:07:48 2015 (r282769) +++ head/sys/dev/ofw/ofw_bus_subr.c Mon May 11 14:10:54 2015 (r282770) @@ -176,12 +176,37 @@ ofw_bus_status_okay(device_t dev) return (0); } +static int +ofw_bus_node_is_compatible(const char *compat, int len, const char *onecompat) +{ + int onelen, l, ret; + + onelen = strlen(onecompat); + + ret = 0; + while (len > 0) { + if (strlen(compat) == onelen && + strncasecmp(compat, onecompat, onelen) == 0) { + /* Found it. */ + ret = 1; + break; + } + + /* Slide to the next sub-string. */ + l = strlen(compat) + 1; + compat += l; + len -= l; + } + + return (ret); +} + int ofw_bus_is_compatible(device_t dev, const char *onecompat) { phandle_t node; const char *compat; - int len, onelen, l; + int len; if ((compat = ofw_bus_get_compat(dev)) == NULL) return (0); @@ -193,20 +218,7 @@ ofw_bus_is_compatible(device_t dev, cons if ((len = OF_getproplen(node, "compatible")) <= 0) return (0); - onelen = strlen(onecompat); - - while (len > 0) { - if (strlen(compat) == onelen && - strncasecmp(compat, onecompat, onelen) == 0) - /* Found it. */ - return (1); - - /* Slide to the next sub-string. */ - l = strlen(compat) + 1; - compat += l; - len -= l; - } - return (0); + return (ofw_bus_node_is_compatible(compat, len, onecompat)); } int @@ -487,3 +499,30 @@ ofw_bus_intr_to_rl(device_t dev, phandle return (err); } +phandle_t +ofw_bus_find_compatible(phandle_t node, const char *onecompat) +{ + phandle_t child, ret; + void *compat; + int len; + + /* + * Traverse all children of 'start' node, and find first with + * matching 'compatible' property. + */ + for (child = OF_child(node); child != 0; child = OF_peer(child)) { + len = OF_getprop_alloc(node, "compatible", 1, &compat); + if (len >= 0) { + ret = ofw_bus_node_is_compatible(compat, len, + onecompat); + free(compat, M_OFWPROP); + if (ret != 0) + return (child); + } + + ret = ofw_bus_find_compatible(child, onecompat); + if (ret != 0) + return (ret); + } + return (0); +} From owner-svn-src-all@FreeBSD.ORG Mon May 11 14:12:40 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3E924388; Mon, 11 May 2015 14:12:40 +0000 (UTC) Received: from kif.fubar.geek.nz (kif.fubar.geek.nz [178.62.119.249]) by mx1.freebsd.org (Postfix) with ESMTP id 0B94A185B; Mon, 11 May 2015 14:12:39 +0000 (UTC) Received: from bender (bender.sec.cl.cam.ac.uk [IPv6:2001:630:212:2a8:4e72:b9ff:fe93:61bf]) by kif.fubar.geek.nz (Postfix) with ESMTPSA id 7721FD7A67; Mon, 11 May 2015 14:12:01 +0000 (UTC) Date: Mon, 11 May 2015 15:12:01 +0100 From: Andrew Turner Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r282770 - head/sys/dev/ofw Message-ID: <20150511151201.2a00f466@bender> In-Reply-To: <201505111410.t4BEAth3076931@svn.freebsd.org> References: <201505111410.t4BEAth3076931@svn.freebsd.org> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.27; amd64-portbld-freebsd10.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2015 14:12:40 -0000 On Mon, 11 May 2015 14:10:55 +0000 (UTC) Andrew Turner wrote: > Author: andrew > Date: Mon May 11 14:10:54 2015 > New Revision: 282770 > URL: https://svnweb.freebsd.org/changeset/base/282770 > > Log: > Add ofw_bus_find_compatible to find a compatible ofw node. This > will be used on ARM to help find the correct node to use to start > secondary CPUs as this happens before device enumeration. Differential Revision: https://reviews.freebsd.org/D2416 From owner-svn-src-all@FreeBSD.ORG Mon May 11 14:36:35 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5B523A31; Mon, 11 May 2015 14:36:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49C9E1AFB; Mon, 11 May 2015 14:36:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4BEaZdW089685; Mon, 11 May 2015 14:36:35 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4BEaZPk089684; Mon, 11 May 2015 14:36:35 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201505111436.t4BEaZPk089684@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 11 May 2015 14:36:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282771 - head/sys/dev/acpica 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.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2015 14:36:35 -0000 Author: andrew Date: Mon May 11 14:36:34 2015 New Revision: 282771 URL: https://svnweb.freebsd.org/changeset/base/282771 Log: Hide code only used on i386 and amd64. Modified: head/sys/dev/acpica/acpi_cpu.c Modified: head/sys/dev/acpica/acpi_cpu.c ============================================================================== --- head/sys/dev/acpica/acpi_cpu.c Mon May 11 14:10:54 2015 (r282770) +++ head/sys/dev/acpica/acpi_cpu.c Mon May 11 14:36:34 2015 (r282771) @@ -746,6 +746,7 @@ acpi_cpu_generic_cx_probe(struct acpi_cp } } +#if defined(__i386__) || defined(__amd64__) static void acpi_cpu_cx_cst_mwait(struct acpi_cx *cx_ptr, uint64_t address, int accsize) { @@ -755,6 +756,7 @@ acpi_cpu_cx_cst_mwait(struct acpi_cx *cx cx_ptr->mwait_hw_coord = (accsize & CST_FFH_MWAIT_HW_COORD) != 0; cx_ptr->mwait_bm_avoidance = (accsize & CST_FFH_MWAIT_BM_AVOID) != 0; } +#endif static void acpi_cpu_cx_cst_free_plvlx(device_t cpu_dev, struct acpi_cx *cx_ptr) @@ -781,8 +783,11 @@ acpi_cpu_cx_cst(struct acpi_cpu_softc *s ACPI_OBJECT *top; ACPI_OBJECT *pkg; uint32_t count; + int i; +#if defined(__i386__) || defined(__amd64__) uint64_t address; - int i, vendor, class, accsize; + int vendor, class, accsize; +#endif ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); From owner-svn-src-all@FreeBSD.ORG Mon May 11 14:53:08 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 734E5E3; Mon, 11 May 2015 14:53:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 61E331D51; Mon, 11 May 2015 14:53:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4BEr8X1099024; Mon, 11 May 2015 14:53:08 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4BEr8aD099023; Mon, 11 May 2015 14:53:08 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201505111453.t4BEr8aD099023@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 11 May 2015 14:53:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282772 - head/release/tools 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.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2015 14:53:08 -0000 Author: gjb Date: Mon May 11 14:53:07 2015 New Revision: 282772 URL: https://svnweb.freebsd.org/changeset/base/282772 Log: Fix virtual machine disk format creating by passing VMFORMAT to mkimg(1) PR: 200068 Submitted by: Jeremy Norris MFC after: 3 days Sponsored by: The FreeBSD Foundation Modified: head/release/tools/vmimage.subr Modified: head/release/tools/vmimage.subr ============================================================================== --- head/release/tools/vmimage.subr Mon May 11 14:36:34 2015 (r282771) +++ head/release/tools/vmimage.subr Mon May 11 14:53:07 2015 (r282772) @@ -23,20 +23,21 @@ write_partition_layout() { case "${TARGET}:${TARGET_ARCH}" in amd64:amd64 | i386:i386) - mkimg -s gpt -b ${BOOTFILES}/i386/pmbr/pmbr \ + mkimg -s gpt -f ${VMFORMAT} \ + -b ${BOOTFILES}/i386/pmbr/pmbr \ -p freebsd-boot/bootfs:=${BOOTFILES}/i386/gptboot/gptboot \ ${SWAPOPT} \ -p freebsd-ufs/rootfs:=${VMBASE} \ -o ${VMIMAGE} ;; arm64:aarch64) - mkimg -s mbr \ + mkimg -s mbr -f ${VMFORMAT} \ -p efi:=${BOOTFILES}/efi/boot1/boot1.efifat \ -p freebsd:=${VMBASE} \ -o ${VMIMAGE} ;; powerpc:powerpc*) - mkimg -s apm \ + mkimg -s apm -f ${VMFORMAT} \ -p apple-boot/bootfs:=${BOOTFILES}/powerpc/boot1.chrp/boot1.hfs \ ${SWAPOPT} \ -p freebsd-ufs/rootfs:=${VMBASE} \ From owner-svn-src-all@FreeBSD.ORG Mon May 11 15:38:42 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 66F48A49; Mon, 11 May 2015 15:38:42 +0000 (UTC) Received: from mail.ignoranthack.me (ignoranthack.me [199.102.79.106]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 483721295; Mon, 11 May 2015 15:38:42 +0000 (UTC) Received: from [192.168.200.208] (unknown [50.136.155.142]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: sbruno@ignoranthack.me) by mail.ignoranthack.me (Postfix) with ESMTPSA id 6258E193FB4; Mon, 11 May 2015 15:38:40 +0000 (UTC) Message-ID: <5550CCFF.6030701@ignoranthack.me> Date: Mon, 11 May 2015 08:38:39 -0700 From: Sean Bruno Reply-To: sbruno@freebsd.org User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Thomas Quinot CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r282736 - in head: . lib/libmd References: <201505102121.t4ALLr3A076661@svn.freebsd.org> <555022F2.9010801@ignoranthack.me> <20150511094005.GA58845@melamine.cuivre.fr.eu.org> In-Reply-To: <20150511094005.GA58845@melamine.cuivre.fr.eu.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2015 15:38:42 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 05/11/15 02:40, Thomas Quinot wrote: >> Probably all the GCC based targets are, if I read this >> correctly. >>> >>> make -s -j8 buildworld TARGET=mips TARGET_ARCH=mips ... > Sean, > > Can you try the attached patch? with it I was able to complete a > MIPS build with the command above. > > Thomas. Yep, it looks like it DTRT here. Thanks! sean -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQF8BAEBCgBmBQJVUMz8XxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRCQUFENDYzMkU3MTIxREU4RDIwOTk3REQx MjAxRUZDQTFFNzI3RTY0AAoJEBIB78oecn5kh60H/RyRdfvYNo0y+zlsOrI6Y3Pg 4ecvUAXtVxCCO6TrcovLumM8Svpcr09OIPii/HgDAKg6VBesfLP6O8DG61A/C0nh 7b1QFYh+sJug6l0X/RVoA7Z7uy3pFass2cTXkhO7tz1DlLhy8YNqYMSr+pAzgcda QkgLDs4MvB/iUUgx3yBkNJmxWbXpKrPC2Lki5O5xp3kTVB99V8NNO66QBtgNL+Q7 uh7Wk0CewZ3MGP4YbHzzA4GBYubjHkL98j7QWm/iv1tjxO0Glm0GwSGSAFy4MdG7 N3m4DuA0E8C+z4oQtoRxgPyvqJToXoBxQT+XmQ0+bFuWo13C1Q1umH7Ek2Uqaw8= =KyJd -----END PGP SIGNATURE----- From owner-svn-src-all@FreeBSD.ORG Mon May 11 15:47:56 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 85A3FCCF; Mon, 11 May 2015 15:47:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 741D213C9; Mon, 11 May 2015 15:47:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4BFlus8023866; Mon, 11 May 2015 15:47:56 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4BFluvd023865; Mon, 11 May 2015 15:47:56 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201505111547.t4BFluvd023865@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 11 May 2015 15:47:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282773 - head/sys/dev/ofw 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.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2015 15:47:56 -0000 Author: andrew Date: Mon May 11 15:47:55 2015 New Revision: 282773 URL: https://svnweb.freebsd.org/changeset/base/282773 Log: Add the ofw_bus_subr.h change missed in r282770. Modified: head/sys/dev/ofw/ofw_bus_subr.h Modified: head/sys/dev/ofw/ofw_bus_subr.h ============================================================================== --- head/sys/dev/ofw/ofw_bus_subr.h Mon May 11 14:53:07 2015 (r282772) +++ head/sys/dev/ofw/ofw_bus_subr.h Mon May 11 15:47:55 2015 (r282773) @@ -101,4 +101,7 @@ const struct ofw_compat_data * /* Helper routine for checking existence of a prop */ int ofw_bus_has_prop(device_t, const char *); +/* Helper to search for a child with a given compat prop */ +phandle_t ofw_bus_find_compatible(phandle_t, const char *); + #endif /* !_DEV_OFW_OFW_BUS_SUBR_H_ */ From owner-svn-src-all@FreeBSD.ORG Mon May 11 16:45:36 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 60F0DF5B; Mon, 11 May 2015 16:45:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4EB451B5D; Mon, 11 May 2015 16:45:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4BGja20052844; Mon, 11 May 2015 16:45:36 GMT (envelope-from thomas@FreeBSD.org) Received: (from thomas@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4BGjYi5052836; Mon, 11 May 2015 16:45:34 GMT (envelope-from thomas@FreeBSD.org) Message-Id: <201505111645.t4BGjYi5052836@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: thomas set sender to thomas@FreeBSD.org using -f From: Thomas Quinot Date: Mon, 11 May 2015 16:45:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282774 - head/lib/libmd 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.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2015 16:45:36 -0000 Author: thomas Date: Mon May 11 16:45:33 2015 New Revision: 282774 URL: https://svnweb.freebsd.org/changeset/base/282774 Log: Unbreak MIPS build following rev. 282726 Introduce further adjustments to the renaming of libmd symbols: make sure that we do not generate dangling weak aliases, as this causes build failures on MIPS. Tested by: sbruno Modified: head/lib/libmd/Makefile head/lib/libmd/md4c.c head/lib/libmd/md5c.c head/lib/libmd/mdXhl.c head/lib/libmd/rmd160c.c head/lib/libmd/sha1c.c head/lib/libmd/sha256c.c head/lib/libmd/sha512c.c Modified: head/lib/libmd/Makefile ============================================================================== --- head/lib/libmd/Makefile Mon May 11 15:47:55 2015 (r282773) +++ head/lib/libmd/Makefile Mon May 11 16:45:33 2015 (r282774) @@ -42,7 +42,13 @@ CLEANFILES+= md[245]hl.c md[245].ref md[ sha0.ref sha0hl.c sha1.ref sha1hl.c shadriver \ sha256.ref sha256hl.c sha512.ref sha512hl.c -CFLAGS+= -I${.CURDIR} +# Define WEAK_REFS to provide weak aliases for libmd symbols +# +# Note that the same sources are also used internally by libcrypt, +# in which case: +# * macros are used to rename symbols to libcrypt internal names +# * no weak aliases are generated +CFLAGS+= -I${.CURDIR} -DWEAK_REFS .PATH: ${.CURDIR}/${MACHINE_ARCH} ${.CURDIR}/../../sys/crypto/sha2 .if exists(${MACHINE_ARCH}/sha.S) Modified: head/lib/libmd/md4c.c ============================================================================== --- head/lib/libmd/md4c.c Mon May 11 15:47:55 2015 (r282773) +++ head/lib/libmd/md4c.c Mon May 11 16:45:33 2015 (r282774) @@ -291,6 +291,11 @@ unsigned int len; (((UINT4)input[j+2]) << 16) | (((UINT4)input[j+3]) << 24); } +#ifdef WEAK_REFS +/* When building libmd, provide weak references. Note: this is not + activated in the context of compiling these sources for internal + use in libcrypt. + */ #undef MD4Init __weak_reference(_libmd_MD4Init, MD4Init); #undef MD4Update @@ -299,3 +304,4 @@ __weak_reference(_libmd_MD4Update, MD4Up __weak_reference(_libmd_MD4Pad, MD4Pad); #undef MD4Final __weak_reference(_libmd_MD4Final, MD4Final); +#endif Modified: head/lib/libmd/md5c.c ============================================================================== --- head/lib/libmd/md5c.c Mon May 11 15:47:55 2015 (r282773) +++ head/lib/libmd/md5c.c Mon May 11 16:45:33 2015 (r282774) @@ -336,6 +336,11 @@ MD5Transform (state, block) memset ((void *)x, 0, sizeof (x)); } +#ifdef WEAK_REFS +/* When building libmd, provide weak references. Note: this is not + activated in the context of compiling these sources for internal + use in libcrypt. + */ #undef MD5Init __weak_reference(_libmd_MD5Init, MD5Init); #undef MD5Update @@ -346,3 +351,4 @@ __weak_reference(_libmd_MD5Pad, MD5Pad); __weak_reference(_libmd_MD5Final, MD5Final); #undef MD5Transform __weak_reference(_libmd_MD5Transform, MD5Transform); +#endif Modified: head/lib/libmd/mdXhl.c ============================================================================== --- head/lib/libmd/mdXhl.c Mon May 11 15:47:55 2015 (r282773) +++ head/lib/libmd/mdXhl.c Mon May 11 16:45:33 2015 (r282774) @@ -97,6 +97,11 @@ MDXData (const void *data, unsigned int return (MDXEnd(&ctx, buf)); } +#ifdef WEAK_REFS +/* When building libmd, provide weak references. Note: this is not + activated in the context of compiling these sources for internal + use in libcrypt. + */ #undef MDXEnd __weak_reference(_libmd_MDXEnd, MDXEnd); #undef MDXFile @@ -105,3 +110,4 @@ __weak_reference(_libmd_MDXFile, MDXFile __weak_reference(_libmd_MDXFileChunk, MDXFileChunk); #undef MDXData __weak_reference(_libmd_MDXData, MDXData); +#endif Modified: head/lib/libmd/rmd160c.c ============================================================================== --- head/lib/libmd/rmd160c.c Mon May 11 15:47:55 2015 (r282773) +++ head/lib/libmd/rmd160c.c Mon May 11 16:45:33 2015 (r282774) @@ -546,6 +546,11 @@ unsigned long *l; } #endif +#ifdef WEAK_REFS +/* When building libmd, provide weak references. Note: this is not + activated in the context of compiling these sources for internal + use in libcrypt. + */ #undef RIPEMD160_Init __weak_reference(_libmd_RIPEMD160_Init, RIPEMD160_Init); #undef RIPEMD160_Update @@ -558,3 +563,4 @@ __weak_reference(_libmd_RIPEMD160_Transf __weak_reference(_libmd_RMD160_version, RMD160_version); #undef ripemd160_block __weak_reference(_libmd_ripemd160_block, ripemd160_block); +#endif Modified: head/lib/libmd/sha1c.c ============================================================================== --- head/lib/libmd/sha1c.c Mon May 11 15:47:55 2015 (r282773) +++ head/lib/libmd/sha1c.c Mon May 11 16:45:33 2015 (r282774) @@ -488,7 +488,11 @@ SHA_CTX *c; /* memset((char *)&c,0,sizeof(c));*/ } - +#ifdef WEAK_REFS +/* When building libmd, provide weak references. Note: this is not + activated in the context of compiling these sources for internal + use in libcrypt. + */ #undef SHA_Init __weak_reference(_libmd_SHA_Init, SHA_Init); #undef SHA_Update @@ -513,3 +517,4 @@ __weak_reference(_libmd_SHA1_Transform, __weak_reference(_libmd_SHA1_version, SHA1_version); #undef sha1_block __weak_reference(_libmd_sha1_block, sha1_block); +#endif Modified: head/lib/libmd/sha256c.c ============================================================================== --- head/lib/libmd/sha256c.c Mon May 11 15:47:55 2015 (r282773) +++ head/lib/libmd/sha256c.c Mon May 11 16:45:33 2015 (r282774) @@ -296,6 +296,11 @@ SHA256_Final(unsigned char digest[32], S memset((void *)ctx, 0, sizeof(*ctx)); } +#ifdef WEAK_REFS +/* When building libmd, provide weak references. Note: this is not + activated in the context of compiling these sources for internal + use in libcrypt. + */ #undef SHA256_Init __weak_reference(_libmd_SHA256_Init, SHA256_Init); #undef SHA256_Update @@ -304,5 +309,4 @@ __weak_reference(_libmd_SHA256_Update, S __weak_reference(_libmd_SHA256_Final, SHA256_Final); #undef SHA256_Transform __weak_reference(_libmd_SHA256_Transform, SHA256_Transform); -#undef SHA256_version -__weak_reference(_libmd_SHA256_version, SHA256_version); +#endif Modified: head/lib/libmd/sha512c.c ============================================================================== --- head/lib/libmd/sha512c.c Mon May 11 15:47:55 2015 (r282773) +++ head/lib/libmd/sha512c.c Mon May 11 16:45:33 2015 (r282774) @@ -319,6 +319,11 @@ SHA512_Final(unsigned char digest[64], S memset((void *)ctx, 0, sizeof(*ctx)); } +#ifdef WEAK_REFS +/* When building libmd, provide weak references. Note: this is not + activated in the context of compiling these sources for internal + use in libcrypt. + */ #undef SHA512_Init __weak_reference(_libmd_SHA512_Init, SHA512_Init); #undef SHA512_Update @@ -327,5 +332,4 @@ __weak_reference(_libmd_SHA512_Update, S __weak_reference(_libmd_SHA512_Final, SHA512_Final); #undef SHA512_Transform __weak_reference(_libmd_SHA512_Transform, SHA512_Transform); -#undef SHA512_version -__weak_reference(_libmd_SHA512_version, SHA512_version); +#endif From owner-svn-src-all@FreeBSD.ORG Mon May 11 16:46:37 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B4D11208; Mon, 11 May 2015 16:46:37 +0000 (UTC) Received: from melamine.cuivre.fr.eu.org (houdart.cuivre.fr.eu.org [81.57.40.110]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 74F2D1B79; Mon, 11 May 2015 16:46:36 +0000 (UTC) Received: by melamine.cuivre.fr.eu.org (Postfix, from userid 1000) id 2851119AAD; Mon, 11 May 2015 18:46:29 +0200 (CEST) Date: Mon, 11 May 2015 18:46:29 +0200 From: Thomas Quinot To: sbruno@freebsd.org Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r282736 - in head: . lib/libmd Message-ID: <20150511164629.GA83175@melamine.cuivre.fr.eu.org> References: <201505102121.t4ALLr3A076661@svn.freebsd.org> <555022F2.9010801@ignoranthack.me> <20150511094005.GA58845@melamine.cuivre.fr.eu.org> <5550CCFF.6030701@ignoranthack.me> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5550CCFF.6030701@ignoranthack.me> X-message-flag: WARNING! Using Outlook can damage your computer. User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2015 16:46:37 -0000 * Sean Bruno, 2015-05-11 : > Yep, it looks like it DTRT here. Thanks! Thanks for your feedback! Patch committed as rev. 282774. Thomas. From owner-svn-src-all@FreeBSD.ORG Mon May 11 17:49:09 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F3BE51F3; Mon, 11 May 2015 17:49:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C82381218; Mon, 11 May 2015 17:49:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4BHn8dX083090; Mon, 11 May 2015 17:49:08 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4BHn8eD083085; Mon, 11 May 2015 17:49:08 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201505111749.t4BHn8eD083085@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 11 May 2015 17:49:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282775 - head/lib/liblzma 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.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2015 17:49:09 -0000 Author: delphij Date: Mon May 11 17:49:07 2015 New Revision: 282775 URL: https://svnweb.freebsd.org/changeset/base/282775 Log: Revert r281372, it's no longer needed after r282726 (fix for PR 199119) as the symbol conflict between libmd and libcrypto have been solved. Modified: head/lib/liblzma/Makefile head/lib/liblzma/Symbol.map head/lib/liblzma/config.h Modified: head/lib/liblzma/Makefile ============================================================================== --- head/lib/liblzma/Makefile Mon May 11 16:45:33 2015 (r282774) +++ head/lib/liblzma/Makefile Mon May 11 17:49:07 2015 (r282775) @@ -77,8 +77,7 @@ SRCS+= common.c \ .PATH: ${LZMADIR}/check SRCS+= check.c \ crc32_table.c \ - crc64_table.c \ - sha256.c + crc64_table.c .if defined(MACHINE_ARCH) && ${MACHINE_ARCH} == "i386" SRCS+= crc32_x86.S \ crc64_x86.S @@ -146,7 +145,7 @@ CFLAGS+= -DHAVE_CONFIG_H \ -I${LZMADIR}/simple \ -I${LZMADIR}/../common -LIBADD+= pthread +LIBADD+= md pthread VERSION_DEF= ${.CURDIR}/Versions.def SYMBOL_MAPS= ${.CURDIR}/Symbol.map Modified: head/lib/liblzma/Symbol.map ============================================================================== --- head/lib/liblzma/Symbol.map Mon May 11 16:45:33 2015 (r282774) +++ head/lib/liblzma/Symbol.map Mon May 11 17:49:07 2015 (r282775) @@ -180,9 +180,6 @@ XZprivate_1.0 { lzma_raw_coder_memusage; lzma_raw_decoder_init; lzma_raw_encoder_init; - lzma_sha256_finish; - lzma_sha256_init; - lzma_sha256_update; lzma_simple_arm_decoder_init; lzma_simple_arm_encoder_init; lzma_simple_armthumb_decoder_init; Modified: head/lib/liblzma/config.h ============================================================================== --- head/lib/liblzma/config.h Mon May 11 16:45:33 2015 (r282774) +++ head/lib/liblzma/config.h Mon May 11 17:49:07 2015 (r282775) @@ -203,16 +203,13 @@ /* #undef HAVE_SHA256INIT */ /* Define to 1 if the system has the type `SHA256_CTX'. */ -/* FreeBSD - disabled libmd SHA256 for now */ -/* #undef HAVE_SHA256_CTX */ +#define HAVE_SHA256_CTX 1 /* Define to 1 if you have the header file. */ -/* FreeBSD - disabled libmd SHA256 for now */ -/* #undef HAVE_SHA256_H */ +#define HAVE_SHA256_H 1 /* Define to 1 if you have the `SHA256_Init' function. */ -/* FreeBSD - disabled libmd SHA256 for now */ -/* #undef HAVE_SHA256_INIT */ +#define HAVE_SHA256_INIT 1 /* Define to 1 if the system has the type `SHA2_CTX'. */ /* #undef HAVE_SHA2_CTX */ From owner-svn-src-all@FreeBSD.ORG Mon May 11 18:52:07 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3FC092EF; Mon, 11 May 2015 18:52:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2E08C1AF0; Mon, 11 May 2015 18:52:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4BIq7el020225; Mon, 11 May 2015 18:52:07 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4BIq7dI020224; Mon, 11 May 2015 18:52:07 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201505111852.t4BIq7dI020224@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 11 May 2015 18:52:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282776 - head/sys/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.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2015 18:52:07 -0000 Author: andrew Date: Mon May 11 18:52:06 2015 New Revision: 282776 URL: https://svnweb.freebsd.org/changeset/base/282776 Log: List both registers to use in the 64-bit atomic instructions. We will need these to build for Thumb-2. Modified: head/sys/arm/include/atomic.h Modified: head/sys/arm/include/atomic.h ============================================================================== --- head/sys/arm/include/atomic.h Mon May 11 17:49:07 2015 (r282775) +++ head/sys/arm/include/atomic.h Mon May 11 18:52:06 2015 (r282776) @@ -151,10 +151,10 @@ atomic_set_64(volatile uint64_t *p, uint __asm __volatile( "1: \n" - " ldrexd %[tmp], [%[ptr]]\n" + " ldrexd %Q[tmp], %R[tmp], [%[ptr]]\n" " orr %Q[tmp], %Q[val]\n" " orr %R[tmp], %R[val]\n" - " strexd %[exf], %[tmp], [%[ptr]]\n" + " strexd %[exf], %Q[tmp], %R[tmp], [%[ptr]]\n" " teq %[exf], #0\n" " it ne \n" " bne 1b\n" @@ -204,10 +204,10 @@ atomic_clear_64(volatile uint64_t *p, ui __asm __volatile( "1: \n" - " ldrexd %[tmp], [%[ptr]]\n" + " ldrexd %Q[tmp], %R[tmp], [%[ptr]]\n" " bic %Q[tmp], %Q[val]\n" " bic %R[tmp], %R[val]\n" - " strexd %[exf], %[tmp], [%[ptr]]\n" + " strexd %[exf], %Q[tmp], %R[tmp], [%[ptr]]\n" " teq %[exf], #0\n" " it ne \n" " bne 1b\n" @@ -263,13 +263,13 @@ atomic_cmpset_64(volatile uint64_t *p, u __asm __volatile( "1: \n" - " ldrexd %[tmp], [%[ptr]]\n" + " ldrexd %Q[tmp], %R[tmp], [%[ptr]]\n" " teq %Q[tmp], %Q[cmpval]\n" " itee eq \n" " teqeq %R[tmp], %R[cmpval]\n" " movne %[ret], #0\n" " bne 2f\n" - " strexd %[ret], %[newval], [%[ptr]]\n" + " strexd %[ret], %Q[newval], %R[newval], [%[ptr]]\n" " teq %[ret], #0\n" " it ne \n" " bne 1b\n" @@ -381,10 +381,10 @@ atomic_add_64(volatile uint64_t *p, uint __asm __volatile( "1: \n" - " ldrexd %[tmp], [%[ptr]]\n" + " ldrexd %Q[tmp], %R[tmp], [%[ptr]]\n" " adds %Q[tmp], %Q[val]\n" - " adc %R[tmp], %R[val]\n" - " strexd %[exf], %[tmp], [%[ptr]]\n" + " adc %R[tmp], %R[tmp], %R[val]\n" + " strexd %[exf], %Q[tmp], %R[tmp], [%[ptr]]\n" " teq %[exf], #0\n" " it ne \n" " bne 1b\n" @@ -433,10 +433,10 @@ atomic_subtract_64(volatile uint64_t *p, __asm __volatile( "1: \n" - " ldrexd %[tmp], [%[ptr]]\n" + " ldrexd %Q[tmp], %R[tmp], [%[ptr]]\n" " subs %Q[tmp], %Q[val]\n" - " sbc %R[tmp], %R[val]\n" - " strexd %[exf], %[tmp], [%[ptr]]\n" + " sbc %R[tmp], %R[tmp], %R[val]\n" + " strexd %[exf], %Q[tmp], %R[tmp], [%[ptr]]\n" " teq %[exf], #0\n" " it ne \n" " bne 1b\n" @@ -536,10 +536,10 @@ atomic_fetchadd_64(volatile uint64_t *p, __asm __volatile( "1: \n" - " ldrexd %[ret], [%[ptr]]\n" + " ldrexd %Q[tmp], %R[tmp], [%[ptr]]\n" " adds %Q[tmp], %Q[ret], %Q[val]\n" " adc %R[tmp], %R[ret], %R[val]\n" - " strexd %[exf], %[tmp], [%[ptr]]\n" + " strexd %[exf], %Q[tmp], %R[tmp], [%[ptr]]\n" " teq %[exf], #0\n" " it ne \n" " bne 1b\n" @@ -560,10 +560,10 @@ atomic_readandclear_64(volatile uint64_t __asm __volatile( "1: \n" - " ldrexd %[ret], [%[ptr]]\n" + " ldrexd %Q[ret], %R[ret], [%[ptr]]\n" " mov %Q[tmp], #0\n" " mov %R[tmp], #0\n" - " strexd %[exf], %[tmp], [%[ptr]]\n" + " strexd %[exf], %Q[tmp], %R[tmp], [%[ptr]]\n" " teq %[exf], #0\n" " it ne \n" " bne 1b\n" @@ -587,7 +587,7 @@ atomic_load_64(volatile uint64_t *p) */ __asm __volatile( "1: \n" - " ldrexd %[ret], [%[ptr]]\n" + " ldrexd %Q[ret], %R[ret], [%[ptr]]\n" " clrex \n" : [ret] "=&r" (ret) : [ptr] "r" (p) @@ -618,8 +618,8 @@ atomic_store_64(volatile uint64_t *p, ui */ __asm __volatile( "1: \n" - " ldrexd %[tmp], [%[ptr]]\n" - " strexd %[exf], %[val], [%[ptr]]\n" + " ldrexd %Q[tmp], %R[tmp], [%[ptr]]\n" + " strexd %[exf], %Q[tmp], %R[tmp], [%[ptr]]\n" " teq %[exf], #0\n" " it ne \n" " bne 1b\n" From owner-svn-src-all@FreeBSD.ORG Mon May 11 19:00:03 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8A98D673; Mon, 11 May 2015 19:00:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 78FF21B76; Mon, 11 May 2015 19:00:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4BJ03PY021343; Mon, 11 May 2015 19:00:03 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4BJ03am021342; Mon, 11 May 2015 19:00:03 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201505111900.t4BJ03am021342@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 11 May 2015 19:00:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282777 - head/sys/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.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2015 19:00:03 -0000 Author: andrew Date: Mon May 11 19:00:02 2015 New Revision: 282777 URL: https://svnweb.freebsd.org/changeset/base/282777 Log: Use the Thumb compliant version of the add instruction. We can only use "add Rd, Rn, Rm" from within an IT (if-then) block. Modified: head/sys/arm/include/asm.h Modified: head/sys/arm/include/asm.h ============================================================================== --- head/sys/arm/include/asm.h Mon May 11 18:52:06 2015 (r282776) +++ head/sys/arm/include/asm.h Mon May 11 19:00:02 2015 (r282777) @@ -126,7 +126,7 @@ ldr x, [x, got] #define GOT_INIT(got,gotsym,pclabel) \ ldr got, gotsym; \ - pclabel: add got, got, pc + pclabel: add got, pc #ifdef __thumb__ #define GOT_INITSYM(gotsym,pclabel) \ .align 2; \ From owner-svn-src-all@FreeBSD.ORG Mon May 11 19:04:33 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AAA4D8AB; Mon, 11 May 2015 19:04:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 994921C5A; Mon, 11 May 2015 19:04:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4BJ4XMo025467; Mon, 11 May 2015 19:04:33 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4BJ4XKx025466; Mon, 11 May 2015 19:04:33 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201505111904.t4BJ4XKx025466@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 11 May 2015 19:04:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282778 - head/sys/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.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2015 19:04:33 -0000 Author: andrew Date: Mon May 11 19:04:32 2015 New Revision: 282778 URL: https://svnweb.freebsd.org/changeset/base/282778 Log: Mark thumb entry points as such when building for thumb, otherwise mark them as arm. Modified: head/sys/arm/include/asm.h Modified: head/sys/arm/include/asm.h ============================================================================== --- head/sys/arm/include/asm.h Mon May 11 19:00:02 2015 (r282777) +++ head/sys/arm/include/asm.h Mon May 11 19:04:32 2015 (r282778) @@ -87,7 +87,13 @@ */ #define GLOBAL(x) .global x -#define _LEENTRY(x) .type x,_ASM_TYPE_FUNCTION; x: +#ifdef __thumb__ +#define _FUNC_MODE .code 16; .thumb_func +#else +#define _FUNC_MODE .code 32 +#endif + +#define _LEENTRY(x) .type x,_ASM_TYPE_FUNCTION; _FUNC_MODE; x: #define _LEEND(x) /* nothing */ #define _EENTRY(x) GLOBAL(x); _LEENTRY(x) #define _EEND(x) _LEEND(x) From owner-svn-src-all@FreeBSD.ORG Mon May 11 19:18:50 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E9511C6C; Mon, 11 May 2015 19:18:50 +0000 (UTC) Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) by mx1.freebsd.org (Postfix) with ESMTP id C65BF1DB2; Mon, 11 May 2015 19:18:50 +0000 (UTC) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id 436AA5A9F25; Mon, 11 May 2015 19:18:50 +0000 (UTC) Date: Mon, 11 May 2015 19:18:50 +0000 From: Brooks Davis To: John Baldwin Cc: Xin LI , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r282672 - head/etc/rc.d Message-ID: <20150511191850.GC68045@spindle.one-eyed-alien.net> References: <201505082336.t48NaWRS080408@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2015 19:18:51 -0000 On Sun, May 10, 2015 at 03:45:48PM -0400, John Baldwin wrote: > > > On May 8, 2015, at 19:36, Xin LI wrote: > > > > Author: delphij > > Date: Fri May 8 23:36:31 2015 > > New Revision: 282672 > > URL: https://svnweb.freebsd.org/changeset/base/282672 > > > > Log: > > Always convert uuid to lower case. > > > > MFC after: 2 weeks > > > > Modified: > > head/etc/rc.d/hostid > > > > Modified: head/etc/rc.d/hostid > > ============================================================================== > > --- head/etc/rc.d/hostid Fri May 8 23:29:42 2015 (r282671) > > +++ head/etc/rc.d/hostid Fri May 8 23:36:31 2015 (r282672) > > @@ -58,7 +58,7 @@ hostid_set() > > > > valid_hostid() > > { > > - uuid=$1 > > + uuid=$(echo $1 | tr '[:upper:]' '[:lower:]') > > tr is in /usr/bin so this breaks systems with a separate /usr. Perhaps you could use dd with conv=lcase instead? Alterntively, a shell function "ltr" exists in rc.subr for this purpose. -- Brooks From owner-svn-src-all@FreeBSD.ORG Mon May 11 19:20:32 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8D47ADC0; Mon, 11 May 2015 19:20:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6E3091DC0; Mon, 11 May 2015 19:20:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4BJKW0L033117; Mon, 11 May 2015 19:20:32 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4BJKVYk033104; Mon, 11 May 2015 19:20:31 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201505111920.t4BJKVYk033104@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 11 May 2015 19:20:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282779 - 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.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2015 19:20:32 -0000 Author: andrew Date: Mon May 11 19:20:30 2015 New Revision: 282779 URL: https://svnweb.freebsd.org/changeset/base/282779 Log: Add the kernel support for Thumb-2. It is only supported on ARMv7 as the main ARMv6 target, the Raspberry Pi, doesn't support Thumb-2. This as been tested with a Thumb-2 userland, however building one is currently unsupported as there are known toolchain issues breaking some binaries. Further work will also be needed to decide on the method of selecting which instruction set to build for, and to benchmark both to find how building everything as Thumb-2 will affect performance. Relnotes: yes Modified: head/sys/arm/arm/exception.S head/sys/arm/arm/machdep.c head/sys/arm/arm/syscall.c head/sys/arm/arm/undefined.c head/sys/arm/arm/vm_machdep.c Modified: head/sys/arm/arm/exception.S ============================================================================== --- head/sys/arm/arm/exception.S Mon May 11 19:04:32 2015 (r282778) +++ head/sys/arm/arm/exception.S Mon May 11 19:20:30 2015 (r282779) @@ -364,7 +364,6 @@ END(data_abort_entry) * on exit (without transitioning back through the undefined mode stack). */ ASENTRY_NP(undefined_entry) - sub lr, lr, #4 /* Adjust the lr. Transition to scv32 */ PUSHFRAMEINSVC /* mode stack, build trapframe there. */ adr lr, exception_exit /* Return from handler via standard */ mov r0, sp /* exception exit routine. Pass the */ Modified: head/sys/arm/arm/machdep.c ============================================================================== --- head/sys/arm/arm/machdep.c Mon May 11 19:04:32 2015 (r282778) +++ head/sys/arm/arm/machdep.c Mon May 11 19:20:30 2015 (r282779) @@ -87,6 +87,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -337,6 +338,13 @@ sendsig(catcher, ksi, mask) tf->tf_pc = (register_t)catcher; tf->tf_usr_sp = (register_t)fp; tf->tf_usr_lr = (register_t)(PS_STRINGS - *(p->p_sysent->sv_szsigcode)); + /* Set the mode to enter in the signal handler */ +#if __ARM_ARCH >= 7 + if ((register_t)catcher & 1) + tf->tf_spsr |= PSR_T; + else + tf->tf_spsr &= ~PSR_T; +#endif CTR3(KTR_SIG, "sendsig: return td=%p pc=%#x sp=%#x", td, tf->tf_usr_lr, tf->tf_usr_sp); @@ -626,6 +634,10 @@ ptrace_single_step(struct thread *td) struct proc *p; int error; + /* TODO: This needs to be updated for Thumb-2 */ + if ((td->td_frame->tf_spsr & PSR_T) != 0) + return (EINVAL); + KASSERT(td->td_md.md_ptrace_instr == 0, ("Didn't clear single step")); p = td->td_proc; @@ -649,6 +661,10 @@ ptrace_clear_single_step(struct thread * { struct proc *p; + /* TODO: This needs to be updated for Thumb-2 */ + if ((td->td_frame->tf_spsr & PSR_T) != 0) + return (EINVAL); + if (td->td_md.md_ptrace_instr) { p = td->td_proc; PROC_UNLOCK(p); Modified: head/sys/arm/arm/syscall.c ============================================================================== --- head/sys/arm/arm/syscall.c Mon May 11 19:04:32 2015 (r282778) +++ head/sys/arm/arm/syscall.c Mon May 11 19:20:30 2015 (r282779) @@ -171,16 +171,7 @@ swi_handler(struct trapframe *frame) td->td_frame = frame; td->td_pticks = 0; - /* - * Make sure the program counter is correctly aligned so we - * don't take an alignment fault trying to read the opcode. - * XXX: Fix for Thumb mode - */ - if (__predict_false(((frame->tf_pc - INSN_SIZE) & 3) != 0)) { - call_trapsignal(td, SIGILL, 0); - userret(td, frame); - return; - } + /* * Enable interrupts if they were enabled before the exception. * Since all syscalls *should* come from user mode it will always Modified: head/sys/arm/arm/undefined.c ============================================================================== --- head/sys/arm/arm/undefined.c Mon May 11 19:04:32 2015 (r282778) +++ head/sys/arm/arm/undefined.c Mon May 11 19:20:30 2015 (r282779) @@ -86,6 +86,19 @@ __FBSDID("$FreeBSD$"); #include #endif +#define ARM_COPROC_INSN(insn) (((insn) & (1 << 27)) != 0) +#define ARM_VFP_INSN(insn) ((((insn) & 0xfe000000) == 0xf2000000) || \ + (((insn) & 0xff100000) == 0xf4000000)) +#define ARM_COPROC(insn) (((insn) >> 8) & 0xf) + +#define THUMB_32BIT_INSN(insn) ((insn) >= 0xe800) +#define THUMB_COPROC_INSN(insn) (((insn) & (3 << 26)) == (3 << 26)) +#define THUMB_COPROC_UNDEFINED(insn) (((insn) & 0x3e << 20) == 0) +#define THUMB_VFP_INSN(insn) (((insn) & (3 << 24)) == (3 << 24)) +#define THUMB_COPROC(insn) (((insn) >> 8) & 0xf) + +#define COPROC_VFP 10 + #ifdef KDTRACE_HOOKS int (*dtrace_invop_jump_addr)(struct trapframe *); #endif @@ -179,6 +192,7 @@ undefinedinstruction(struct trapframe *f int fault_code; int coprocessor; struct undefined_handler *uh; + int error; #ifdef VERBOSE_ARM32 int s; #endif @@ -192,6 +206,12 @@ undefinedinstruction(struct trapframe *f PCPU_INC(cnt.v_trap); +#if __ARM_ARCH >= 7 + if ((frame->tf_spsr & PSR_T) != 0) + frame->tf_pc -= THUMB_INSN_SIZE; + else +#endif + frame->tf_pc -= INSN_SIZE; fault_pc = frame->tf_pc; /* @@ -200,11 +220,72 @@ undefinedinstruction(struct trapframe *f */ td = curthread == NULL ? &thread0 : curthread; - /* - * Make sure the program counter is correctly aligned so we - * don't take an alignment fault trying to read the opcode. - */ - if (__predict_false((fault_pc & 3) != 0)) { + coprocessor = 0; + if ((frame->tf_spsr & PSR_T) == 0) { + /* + * Make sure the program counter is correctly aligned so we + * don't take an alignment fault trying to read the opcode. + */ + if (__predict_false((fault_pc & 3) != 0)) { + ksiginfo_init_trap(&ksi); + ksi.ksi_signo = SIGILL; + ksi.ksi_code = ILL_ILLADR; + ksi.ksi_addr = (u_int32_t *)(intptr_t) fault_pc; + trapsignal(td, &ksi); + userret(td, frame); + return; + } + + /* + * Should use fuword() here .. but in the interests of + * squeezing every bit of speed we will just use ReadWord(). + * We know the instruction can be read as was just executed + * so this will never fail unless the kernel is screwed up + * in which case it does not really matter does it ? + */ + + fault_instruction = *(u_int32_t *)fault_pc; + + /* Check for coprocessor instruction */ + + /* + * According to the datasheets you only need to look at bit + * 27 of the instruction to tell the difference between and + * undefined instruction and a coprocessor instruction + * following an undefined instruction trap. + */ + + if (ARM_COPROC_INSN(fault_instruction)) + coprocessor = ARM_COPROC(fault_instruction); + else { /* check for special instructions */ + if (ARM_VFP_INSN(fault_instruction)) + coprocessor = COPROC_VFP; /* vfp / simd */ + } + } else { +#if __ARM_ARCH >= 7 + fault_instruction = *(uint16_t *)fault_pc; + if (THUMB_32BIT_INSN(fault_instruction)) { + fault_instruction <<= 16; + fault_instruction |= *(uint16_t *)(fault_pc + 2); + + /* + * Is it a Coprocessor, Advanced SIMD, or + * Floating-point instruction. + */ + if (THUMB_COPROC_INSN(fault_instruction)) { + if (THUMB_COPROC_UNDEFINED(fault_instruction)) { + /* undefined insn */ + } else if (THUMB_VFP_INSN(fault_instruction)) + coprocessor = COPROC_VFP; + else + coprocessor = + THUMB_COPROC(fault_instruction); + } + } +#else + /* + * No support for Thumb-2 on this cpu + */ ksiginfo_init_trap(&ksi); ksi.ksi_signo = SIGILL; ksi.ksi_code = ILL_ILLADR; @@ -212,41 +293,8 @@ undefinedinstruction(struct trapframe *f trapsignal(td, &ksi); userret(td, frame); return; - } - - /* - * Should use fuword() here .. but in the interests of squeezing every - * bit of speed we will just use ReadWord(). We know the instruction - * can be read as was just executed so this will never fail unless the - * kernel is screwed up in which case it does not really matter does - * it ? - */ - - fault_instruction = *(u_int32_t *)fault_pc; - - /* Update vmmeter statistics */ -#if 0 - uvmexp.traps++; #endif - /* Check for coprocessor instruction */ - - /* - * According to the datasheets you only need to look at bit 27 of the - * instruction to tell the difference between and undefined - * instruction and a coprocessor instruction following an undefined - * instruction trap. - */ - - coprocessor = 0; - if ((fault_instruction & (1 << 27)) != 0) - coprocessor = (fault_instruction >> 8) & 0x0f; -#ifdef VFP - else { /* check for special instructions */ - if (((fault_instruction & 0xfe000000) == 0xf2000000) || - ((fault_instruction & 0xff100000) == 0xf4000000)) - coprocessor = 10; /* vfp / simd */ } -#endif /* VFP */ if ((frame->tf_spsr & PSR_MODE) == PSR_USR32_MODE) { /* @@ -264,13 +312,24 @@ undefinedinstruction(struct trapframe *f fault_code) == 0) break; - if (fault_code & FAULT_USER && fault_instruction == PTRACE_BREAKPOINT) { - PROC_LOCK(td->td_proc); - _PHOLD(td->td_proc); - ptrace_clear_single_step(td); - _PRELE(td->td_proc); - PROC_UNLOCK(td->td_proc); - return; + if (fault_code & FAULT_USER) { + /* TODO: No support for ptrace from Thumb-2 */ + if ((frame->tf_spsr & PSR_T) == 0 && + fault_instruction == PTRACE_BREAKPOINT) { + PROC_LOCK(td->td_proc); + _PHOLD(td->td_proc); + error = ptrace_clear_single_step(td); + _PRELE(td->td_proc); + PROC_UNLOCK(td->td_proc); + if (error != 0) { + ksiginfo_init_trap(&ksi); + ksi.ksi_signo = SIGILL; + ksi.ksi_code = ILL_ILLOPC; + ksi.ksi_addr = (u_int32_t *)(intptr_t) fault_pc; + trapsignal(td, &ksi); + } + return; + } } if (uh == NULL && (fault_code & FAULT_USER)) { Modified: head/sys/arm/arm/vm_machdep.c ============================================================================== --- head/sys/arm/arm/vm_machdep.c Mon May 11 19:04:32 2015 (r282778) +++ head/sys/arm/arm/vm_machdep.c Mon May 11 19:20:30 2015 (r282779) @@ -72,6 +72,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -204,7 +205,12 @@ cpu_set_syscall_retval(struct thread *td /* * Reconstruct the pc to point at the swi. */ - frame->tf_pc -= INSN_SIZE; +#if __ARM_ARCH >= 7 + if ((frame->tf_spsr & PSR_T) != 0) + frame->tf_pc -= THUMB_INSN_SIZE; + else +#endif + frame->tf_pc -= INSN_SIZE; break; case EJUSTRETURN: /* nothing to do */ From owner-svn-src-all@FreeBSD.ORG Mon May 11 19:25:24 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 48B70F70 for ; Mon, 11 May 2015 19:25:24 +0000 (UTC) Received: from o1.l99.sendgrid.net (o1.l99.sendgrid.net [198.37.153.74]) (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 E526E1E9A for ; Mon, 11 May 2015 19:25:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sendgrid.info; h=from:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding; s=smtpapi; bh=+RatjHNnJcPxuXelSEZbHLd7FjQ=; b=SW74dV9G0HppDHn+7b ZvN4m3H5YJuXiBBs3mNt5hZJIqwEBJrEGI6+pyX6NSkLLXwzPBqhbCVJr7LHWrRJ vt/YOBqFTP1NlHdr9vM/w5ef5sa2hlVKA5P0Jc4hNzhKNpd9g0KkPZpkcmSiXLYx shKOmLhemAG1vdCAsBnpa7XgA= Received: by filter0202p1mdw1.sendgrid.net with SMTP id filter0202p1mdw1.21639.555102214 2015-05-11 19:25:21.254848601 +0000 UTC Received: from mail.tarsnap.com (ec2-54-86-246-204.compute-1.amazonaws.com [54.86.246.204]) by ismtpd-027 (SG) with ESMTP id 14d447051ab.1b05.fea5d for ; Mon, 11 May 2015 19:25:21 +0000 (UTC) Received: (qmail 67991 invoked from network); 11 May 2015 19:22:47 -0000 Received: from unknown (HELO clamshell.daemonology.net) (127.0.0.1) by ec2-107-20-205-189.compute-1.amazonaws.com with ESMTP; 11 May 2015 19:22:47 -0000 Received: (qmail 29778 invoked from network); 11 May 2015 19:23:57 -0000 Received: from unknown (HELO clamshell.daemonology.net) (127.0.0.1) by clamshell.daemonology.net with SMTP; 11 May 2015 19:23:57 -0000 Message-ID: <555101CC.9060702@freebsd.org> Date: Mon, 11 May 2015 12:23:56 -0700 From: Colin Percival User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Brooks Davis , John Baldwin CC: Xin LI , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r282672 - head/etc/rc.d References: <201505082336.t48NaWRS080408@svn.freebsd.org> <20150511191850.GC68045@spindle.one-eyed-alien.net> In-Reply-To: <20150511191850.GC68045@spindle.one-eyed-alien.net> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SG-EID: A6W2xSVPHetogaU8rnzccWwgBYtN+QvIzXyjfe/10PH25wNcDsehesSRr/7+7L27Ttt1Th2n6t4yVb 7jkgRznWFadMA0h+Fsuyz7Zy5zcmkGezMqoY2mFpul0dXl/fzdS3g843E3n87N0EvxUgXERx6M5ekq XDDzPN22VBxmEjg= X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2015 19:25:24 -0000 On 05/11/15 12:18, Brooks Davis wrote: > On Sun, May 10, 2015 at 03:45:48PM -0400, John Baldwin wrote: >>> On May 8, 2015, at 19:36, Xin LI wrote: >>> - uuid=$1 >>> + uuid=$(echo $1 | tr '[:upper:]' '[:lower:]') >> >> tr is in /usr/bin so this breaks systems with a separate /usr. Perhaps you could use dd with conv=lcase instead? > > Alterntively, a shell function "ltr" exists in rc.subr for this purpose. This only works with a single pattern at a time, though. Perhaps we need a new "ldowncase" shell function which iterates through the alphabet and invokes ltr for each letter? -- Colin Percival Security Officer Emeritus, FreeBSD | The power to serve Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid From owner-svn-src-all@FreeBSD.ORG Mon May 11 19:37:32 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3F6EC1F2; Mon, 11 May 2015 19:37:32 +0000 (UTC) Received: from shxd.cx (mail.shxd.cx [64.201.244.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 26F861F9F; Mon, 11 May 2015 19:37:32 +0000 (UTC) Received: from [64.201.244.132] (port=55656 helo=[10.0.0.102]) by shxd.cx with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.77 (FreeBSD)) (envelope-from ) id 1Yrsle-00073h-8n; Mon, 11 May 2015 11:49:30 -0700 Mime-Version: 1.0 (Mac OS X Mail 8.0 \(1990.1\)) Subject: Re: svn commit: r282672 - head/etc/rc.d From: Devin Teske In-Reply-To: <20150511191850.GC68045@spindle.one-eyed-alien.net> Date: Mon, 11 May 2015 12:37:29 -0700 Cc: John Baldwin , Xin LI , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , Devin Teske Message-Id: <9FB76653-EF89-48E5-B4E8-A2006923B76A@FreeBSD.org> References: <201505082336.t48NaWRS080408@svn.freebsd.org> <20150511191850.GC68045@spindle.one-eyed-alien.net> To: Brooks Davis X-Mailer: Apple Mail (2.1990.1) Sender: devin@shxd.cx Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2015 19:37:32 -0000 > On May 11, 2015, at 12:18 PM, Brooks Davis wrote: >=20 > On Sun, May 10, 2015 at 03:45:48PM -0400, John Baldwin wrote: >>=20 >>> On May 8, 2015, at 19:36, Xin LI wrote: >>>=20 >>> Author: delphij >>> Date: Fri May 8 23:36:31 2015 >>> New Revision: 282672 >>> URL: https://svnweb.freebsd.org/changeset/base/282672 >>>=20 >>> Log: >>> Always convert uuid to lower case. >>>=20 >>> MFC after: 2 weeks >>>=20 >>> Modified: >>> head/etc/rc.d/hostid >>>=20 >>> Modified: head/etc/rc.d/hostid >>> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=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/etc/rc.d/hostid Fri May 8 23:29:42 2015 (r282671) >>> +++ head/etc/rc.d/hostid Fri May 8 23:36:31 2015 (r282672) >>> @@ -58,7 +58,7 @@ hostid_set() >>>=20 >>> valid_hostid() >>> { >>> - uuid=3D$1 >>> + uuid=3D$(echo $1 | tr '[:upper:]' '[:lower:]') >>=20 >> tr is in /usr/bin so this breaks systems with a separate /usr. = Perhaps you could use dd with conv=3Dlcase instead? >=20 > Alterntively, a shell function "ltr" exists in rc.subr for this = purpose. >=20 ltr would not work in this situation, for multiple reasons. 1. ltr doesn=E2=80=99t support character classes 2. ltr is for replacing one or more characters (cannot be a class) with = a single string (of variable length, 0+). In /etc/networks.subr you can see an example usage of ltr: 287 = = _punct=3D".-/+" 288 = = ltr ${_if} "${_punct}" '_' _if The result of this is to take a value of (for example) foo.bar and = replace any occurrences of period, minus, forward slash, or plus with instead a single underscore. The result is stuffed into the variable =E2=80=9C_if=E2= =80=9D (over- writing previous contents which may have contained aforementioned characters replaced with underscore). An attempt to use ltr in the below fashion: ltr $string =E2=80=98[:lower:]=E2=80=99 =E2=80=98[:upper:]=E2=80=99= somevar would surely fail. While it is indeed *possible* to write a find/replace function in = native- shell that supports character classes, it would not be a small function. The primary issue is that you need to know what the character that matched the class and there aren=E2=80=99t any built-ins that provide = this info. For example: case =E2=80=9C$src=E2=80=9D in *[[:lower:]]*) will trigger when you have a lower-case character that needs conversion to upper-case (or opposite if using *[[:upper:]]*) BUT you won=E2=80=99t = know what the character was that you matched (so how can you know which upper-case character to supplant)? The function will have to resort to complicated substring mechanics or any other seldom known procedure. I=E2=80=99ll have a noodle on it and see what I can come up with. It=E2=80= =99s not exactly immediately coming to me how to do this in any simple fashion while maintaining efficiency (read: by not iterating over every single = character and also by not having a giant massive case statement with every letter spelled out =E2=80=94 coming up with a solution that embraces the use of = the character class I would believe to be more efficient). =E2=80=94=20 Devin= From owner-svn-src-all@FreeBSD.ORG Mon May 11 19:44:40 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6A2D14D2; Mon, 11 May 2015 19:44:40 +0000 (UTC) Received: from smtp.vangyzen.net (hotblack.vangyzen.net [199.48.133.146]) by mx1.freebsd.org (Postfix) with ESMTP id 367B510C8; Mon, 11 May 2015 19:44:39 +0000 (UTC) Received: from marvin.lab.vangyzen.net (c-73-147-253-17.hsd1.va.comcast.net [73.147.253.17]) by smtp.vangyzen.net (Postfix) with ESMTPSA id 75E2356467; Mon, 11 May 2015 14:44:32 -0500 (CDT) Message-ID: <555106B5.3010104@FreeBSD.org> Date: Mon, 11 May 2015 15:44:53 -0400 From: Eric van Gyzen User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Devin Teske , Brooks Davis CC: John Baldwin , Xin LI , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r282672 - head/etc/rc.d References: <201505082336.t48NaWRS080408@svn.freebsd.org> <20150511191850.GC68045@spindle.one-eyed-alien.net> <9FB76653-EF89-48E5-B4E8-A2006923B76A@FreeBSD.org> In-Reply-To: <9FB76653-EF89-48E5-B4E8-A2006923B76A@FreeBSD.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2015 19:44:40 -0000 On 05/11/2015 15:37, Devin Teske wrote: > >> On May 11, 2015, at 12:18 PM, Brooks Davis > wrote: >> >> On Sun, May 10, 2015 at 03:45:48PM -0400, John Baldwin wrote: >>> >>>> On May 8, 2015, at 19:36, Xin LI > wrote: >>>> >>>> Author: delphij >>>> Date: Fri May 8 23:36:31 2015 >>>> New Revision: 282672 >>>> URL: https://svnweb.freebsd.org/changeset/base/282672 >>>> >>>> Log: >>>> Always convert uuid to lower case. >>>> >>>> MFC after: 2 weeks >>>> >>>> Modified: >>>> head/etc/rc.d/hostid >>>> >>>> Modified: head/etc/rc.d/hostid >>>> ============================================================================== >>>> --- head/etc/rc.d/hostid Fri May 8 23:29:42 2015 (r282671) >>>> +++ head/etc/rc.d/hostid Fri May 8 23:36:31 2015 (r282672) >>>> @@ -58,7 +58,7 @@ hostid_set() >>>> >>>> valid_hostid() >>>> { >>>> - uuid=$1 >>>> + uuid=$(echo $1 | tr '[:upper:]' '[:lower:]') >>> >>> tr is in /usr/bin so this breaks systems with a separate /usr. Perhaps you could use dd with conv=lcase instead? >> >> Alterntively, a shell function "ltr" exists in rc.subr for this purpose. >> > > ltr would not work in this situation, for multiple reasons. > > 1. ltr doesn’t support character classes > 2. ltr is for replacing one or more characters (cannot be a class) with a single string (of variable length, 0+). > > In /etc/networks.subr you can see an example usage of ltr: > > 287 _punct=".-/+" > 288 ltr ${_if} "${_punct}" '_' _if > > > The result of this is to take a value of (for example) foo.bar and replace > any occurrences of period, minus, forward slash, or plus with instead > a single underscore. The result is stuffed into the variable “_if†(over- > writing previous contents which may have contained aforementioned > characters replaced with underscore). > > An attempt to use ltr in the below fashion: > > ltr $string ‘[:lower:]’ ‘[:upper:]’ somevar > > would surely fail. > > While it is indeed *possible* to write a find/replace function in native- > shell that supports character classes, it would not be a small function. > The primary issue is that you need to know what the character that > matched the class and there aren’t any built-ins that provide this info. > > For example: > > case “$src†in *[[:lower:]]*) > > will trigger when you have a lower-case character that needs conversion > to upper-case (or opposite if using *[[:upper:]]*) BUT you won’t know > what the character was that you matched (so how can you know which > upper-case character to supplant)? > > The function will have to resort to complicated substring mechanics or > any other seldom known procedure. > > I’ll have a noodle on it and see what I can come up with. It’s not exactly > immediately coming to me how to do this in any simple fashion while > maintaining efficiency (read: by not iterating over every single character > and also by not having a giant massive case statement with every letter > spelled out — coming up with a solution that embraces the use of the > character class I would believe to be more efficient). John Baldwin suggested "dd conv=lcase", since dd is in /bin. $ echo MixedCaseLetters | dd conv=lcase 2>/dev/null mixedcaseletters $ type dd dd is /bin/dd Eric From owner-svn-src-all@FreeBSD.ORG Mon May 11 19:50:03 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6F0EEDD8; Mon, 11 May 2015 19:50:03 +0000 (UTC) Received: from shxd.cx (mail.shxd.cx [64.201.244.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 58CE212C4; Mon, 11 May 2015 19:50:03 +0000 (UTC) Received: from [64.201.244.132] (port=55736 helo=[10.0.0.102]) by shxd.cx with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.77 (FreeBSD)) (envelope-from ) id 1Yrsxl-000864-4h; Mon, 11 May 2015 12:02:01 -0700 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.0 \(1990.1\)) Subject: Re: svn commit: r282672 - head/etc/rc.d From: Devin Teske In-Reply-To: <555106B5.3010104@FreeBSD.org> Date: Mon, 11 May 2015 12:49:58 -0700 Cc: Brooks Davis , John Baldwin , Xin LI , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , Devin Teske Content-Transfer-Encoding: quoted-printable Message-Id: <5AE2B9A2-FF6E-422A-B2E2-7E6CA85999BD@FreeBSD.org> References: <201505082336.t48NaWRS080408@svn.freebsd.org> <20150511191850.GC68045@spindle.one-eyed-alien.net> <9FB76653-EF89-48E5-B4E8-A2006923B76A@FreeBSD.org> <555106B5.3010104@FreeBSD.org> To: Eric van Gyzen X-Mailer: Apple Mail (2.1990.1) Sender: devin@shxd.cx X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2015 19:50:03 -0000 > On May 11, 2015, at 12:44 PM, Eric van Gyzen = wrote: >=20 > On 05/11/2015 15:37, Devin Teske wrote: >>=20 >>> On May 11, 2015, at 12:18 PM, Brooks Davis > wrote: >>>=20 >>> On Sun, May 10, 2015 at 03:45:48PM -0400, John Baldwin wrote: >>>>=20 >>>>> On May 8, 2015, at 19:36, Xin LI > wrote: >>>>>=20 >>>>> Author: delphij >>>>> Date: Fri May 8 23:36:31 2015 >>>>> New Revision: 282672 >>>>> URL: https://svnweb.freebsd.org/changeset/base/282672 >>>>>=20 >>>>> Log: >>>>> Always convert uuid to lower case. >>>>>=20 >>>>> MFC after: 2 weeks >>>>>=20 >>>>> Modified: >>>>> head/etc/rc.d/hostid >>>>>=20 >>>>> Modified: head/etc/rc.d/hostid >>>>> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=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/etc/rc.d/hostid Fri May 8 23:29:42 2015 (r282671) >>>>> +++ head/etc/rc.d/hostid Fri May 8 23:36:31 2015 (r282672) >>>>> @@ -58,7 +58,7 @@ hostid_set() >>>>>=20 >>>>> valid_hostid() >>>>> { >>>>> - uuid=3D$1 >>>>> + uuid=3D$(echo $1 | tr '[:upper:]' '[:lower:]') >>>>=20 >>>> tr is in /usr/bin so this breaks systems with a separate /usr. = Perhaps you could use dd with conv=3Dlcase instead? >>>=20 >>> Alterntively, a shell function "ltr" exists in rc.subr for this = purpose. >>>=20 >>=20 >> ltr would not work in this situation, for multiple reasons. >>=20 >> 1. ltr doesn=E2=80=99t support character classes >> 2. ltr is for replacing one or more characters (cannot be a class) = with a single string (of variable length, 0+). >>=20 >> In /etc/networks.subr you can see an example usage of ltr: >>=20 >> 287 = = _punct=3D".-/+" >> 288 = = ltr ${_if} "${_punct}" '_' _if >>=20 >>=20 >> The result of this is to take a value of (for example) foo.bar and = replace >> any occurrences of period, minus, forward slash, or plus with instead >> a single underscore. The result is stuffed into the variable = =E2=80=9C_if=E2=80=9D (over- >> writing previous contents which may have contained aforementioned >> characters replaced with underscore). >>=20 >> An attempt to use ltr in the below fashion: >>=20 >> ltr $string =E2=80=98[:lower:]=E2=80=99 =E2=80=98[:upper:]=E2=80=99 = somevar >>=20 >> would surely fail. >>=20 >> While it is indeed *possible* to write a find/replace function in = native- >> shell that supports character classes, it would not be a small = function. >> The primary issue is that you need to know what the character that >> matched the class and there aren=E2=80=99t any built-ins that provide = this info. >>=20 >> For example: >>=20 >> case =E2=80=9C$src=E2=80=9D in *[[:lower:]]*) >>=20 >> will trigger when you have a lower-case character that needs = conversion >> to upper-case (or opposite if using *[[:upper:]]*) BUT you won=E2=80=99= t know >> what the character was that you matched (so how can you know which >> upper-case character to supplant)? >>=20 >> The function will have to resort to complicated substring mechanics = or >> any other seldom known procedure. >>=20 >> I=E2=80=99ll have a noodle on it and see what I can come up with. = It=E2=80=99s not exactly >> immediately coming to me how to do this in any simple fashion while >> maintaining efficiency (read: by not iterating over every single = character >> and also by not having a giant massive case statement with every = letter >> spelled out =E2=80=94 coming up with a solution that embraces the use = of the >> character class I would believe to be more efficient). >=20 > John Baldwin suggested "dd conv=3Dlcase", since dd is in /bin. >=20 > $ echo MixedCaseLetters | dd conv=3Dlcase 2>/dev/null > mixedcaseletters >=20 > $ type dd > dd is /bin/dd >=20 Yeah, I have to say, this looks by far the simplest approach. Even if I or Colin or someone else were to whip up a comprehensive native shell function that does this, I can=E2=80=99t say that it would = be chosen necessarily over the dd approach (which itself is comprehensive but may suffer the lag of pulling dd into memory =E2=80=94 most significant = when say, running off of CD). Not knowing where the code is destined nor how many times iteratively it could be passed over in a casual day, it=E2=80=99s still probably likely that the dd approach is the best = (unless you=E2=80=99re doing it repetitively in a tight loop ;D). =E2=80=94=20 Devin From owner-svn-src-all@FreeBSD.ORG Mon May 11 19:55:03 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9C9D1E7; Mon, 11 May 2015 19:55:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7E98E1393; Mon, 11 May 2015 19:55:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4BJt3KY049707; Mon, 11 May 2015 19:55:03 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4BJt24F049697; Mon, 11 May 2015 19:55:02 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201505111955.t4BJt24F049697@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Mon, 11 May 2015 19:55:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282780 - 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.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2015 19:55:03 -0000 Author: alc Date: Mon May 11 19:55:01 2015 New Revision: 282780 URL: https://svnweb.freebsd.org/changeset/base/282780 Log: Retire pmap_lazyfix(). This function only existed in the new armv6 pmap because the i386 pmap on which the new armv6 pmap is based had it, and in r281707 pmap_lazyfix() was removed from the i386 pmap. Discussed with: kib Submitted by: Michal Meloun (via Svatopluk Kraus) Modified: head/sys/arm/arm/mp_machdep.c head/sys/arm/arm/pmap-v6-new.c head/sys/arm/arm/swtch.S head/sys/arm/include/pmap-v6.h head/sys/arm/include/smp.h Modified: head/sys/arm/arm/mp_machdep.c ============================================================================== --- head/sys/arm/arm/mp_machdep.c Mon May 11 19:20:30 2015 (r282779) +++ head/sys/arm/arm/mp_machdep.c Mon May 11 19:55:01 2015 (r282780) @@ -309,12 +309,6 @@ ipi_handler(void *arg) CTR1(KTR_SMP, "%s: IPI_TLB", __func__); cpufuncs.cf_tlb_flushID(); break; -#ifdef ARM_NEW_PMAP - case IPI_LAZYPMAP: - CTR1(KTR_SMP, "%s: IPI_LAZYPMAP", __func__); - pmap_lazyfix_action(); - break; -#endif default: panic("Unknown IPI 0x%0x on cpu %d", ipi, curcpu); } Modified: head/sys/arm/arm/pmap-v6-new.c ============================================================================== --- head/sys/arm/arm/pmap-v6-new.c Mon May 11 19:20:30 2015 (r282779) +++ head/sys/arm/arm/pmap-v6-new.c Mon May 11 19:55:01 2015 (r282780) @@ -2166,104 +2166,6 @@ pmap_pinit(pmap_t pmap) return (1); } -#ifdef SMP -/* - * Deal with a SMP shootdown of other users of the pmap that we are - * trying to dispose of. This can be a bit hairy. - */ -static cpuset_t *lazymask; -static ttb_entry_t lazyttb; -static volatile u_int lazywait; - -void -pmap_lazyfix_action(void) -{ - -#ifdef COUNT_IPIS - (*ipi_lazypmap_counts[PCPU_GET(cpuid)])++; -#endif - spinlock_enter(); - if (cp15_ttbr_get() == lazyttb) { - cp15_ttbr_set(curthread->td_pcb->pcb_pagedir); - } - CPU_CLR_ATOMIC(PCPU_GET(cpuid), lazymask); - atomic_store_rel_int(&lazywait, 1); - spinlock_exit(); - -} - -static void -pmap_lazyfix_self(u_int cpuid) -{ - - spinlock_enter(); - if (cp15_ttbr_get() == lazyttb) { - cp15_ttbr_set(curthread->td_pcb->pcb_pagedir); - } - CPU_CLR_ATOMIC(cpuid, lazymask); - spinlock_exit(); -} - -static void -pmap_lazyfix(pmap_t pmap) -{ - cpuset_t mymask, mask; - u_int cpuid, spins; - int lsb; - - mask = pmap->pm_active; - while (!CPU_EMPTY(&mask)) { - spins = 50000000; - - /* Find least significant set bit. */ - lsb = CPU_FFS(&mask); - MPASS(lsb != 0); - lsb--; - CPU_SETOF(lsb, &mask); - mtx_lock_spin(&smp_ipi_mtx); - - lazyttb = pmap_ttb_get(pmap); - cpuid = PCPU_GET(cpuid); - - /* Use a cpuset just for having an easy check. */ - CPU_SETOF(cpuid, &mymask); - if (!CPU_CMP(&mask, &mymask)) { - lazymask = &pmap->pm_active; - pmap_lazyfix_self(cpuid); - } else { - atomic_store_rel_int((u_int *)&lazymask, - (u_int)&pmap->pm_active); - atomic_store_rel_int(&lazywait, 0); - ipi_selected(mask, IPI_LAZYPMAP); - while (lazywait == 0) { - if (--spins == 0) - break; - } - } - mtx_unlock_spin(&smp_ipi_mtx); - if (spins == 0) - printf("%s: spun for 50000000\n", __func__); - mask = pmap->pm_active; - } -} -#else /* SMP */ -/* - * Cleaning up on uniprocessor is easy. For various reasons, we're - * unlikely to have to even execute this code, including the fact - * that the cleanup is deferred until the parent does a wait(2), which - * means that another userland process has run. - */ -static void -pmap_lazyfix(pmap_t pmap) -{ - - if (!CPU_EMPTY(&pmap->pm_active)) { - cp15_ttbr_set(curthread->td_pcb->pcb_pagedir); - CPU_ZERO(&pmap->pm_active); - } -} -#endif /* SMP */ - #ifdef INVARIANTS static boolean_t pt2tab_user_is_empty(pt2_entry_t *tab) @@ -2292,8 +2194,9 @@ pmap_release(pmap_t pmap) pmap->pm_stats.resident_count)); KASSERT(pt2tab_user_is_empty(pmap->pm_pt2tab), ("%s: has allocated user PT2(s)", __func__)); + KASSERT(CPU_EMPTY(&pmap->pm_active), + ("%s: pmap %p is active on some CPU(s)", __func__, pmap)); - pmap_lazyfix(pmap); mtx_lock_spin(&allpmaps_lock); LIST_REMOVE(pmap, pm_list); mtx_unlock_spin(&allpmaps_lock); Modified: head/sys/arm/arm/swtch.S ============================================================================== --- head/sys/arm/arm/swtch.S Mon May 11 19:20:30 2015 (r282779) +++ head/sys/arm/arm/swtch.S Mon May 11 19:55:01 2015 (r282780) @@ -624,14 +624,6 @@ ENTRY(cpu_switch) cmp r0, r1 /* Switching to the TTB? */ beq sw0 /* same TTB, skip */ -#if 1 /* Lazy context switch */ - /* Don't switch mapping for kernel threads */ - ldr r1, =pmap_kern_ttb - ldr r1, [r1] /* r1 = kernel TTB */ - cmp r0, r1 /* Switching to kernel TTB? */ - beq sw0 /* kernel TTB, skip */ -#endif - #ifdef INVARIANTS cmp r0, #0 /* new thread? */ beq badsw4 /* no, panic */ Modified: head/sys/arm/include/pmap-v6.h ============================================================================== --- head/sys/arm/include/pmap-v6.h Mon May 11 19:20:30 2015 (r282779) +++ head/sys/arm/include/pmap-v6.h Mon May 11 19:55:01 2015 (r282780) @@ -193,7 +193,6 @@ void pmap_unmapdev(vm_offset_t, vm_size_ void pmap_kenter_device(vm_offset_t, vm_size_t, vm_paddr_t); void pmap_kremove_device(vm_offset_t, vm_size_t); void pmap_set_pcb_pagedir(pmap_t , struct pcb *); -void pmap_lazyfix_action(void); void pmap_tlb_flush(pmap_t , vm_offset_t ); void pmap_tlb_flush_range(pmap_t , vm_offset_t , vm_size_t ); Modified: head/sys/arm/include/smp.h ============================================================================== --- head/sys/arm/include/smp.h Mon May 11 19:20:30 2015 (r282779) +++ head/sys/arm/include/smp.h Mon May 11 19:55:01 2015 (r282780) @@ -14,7 +14,6 @@ #define IPI_HARDCLOCK 6 #define IPI_TLB 7 #define IPI_CACHE 8 -#define IPI_LAZYPMAP 9 void init_secondary(int cpu); void mpentry(void); From owner-svn-src-all@FreeBSD.ORG Mon May 11 20:26:36 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A6F69DFD; Mon, 11 May 2015 20:26:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 94D171760; Mon, 11 May 2015 20:26:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4BKQaLR064578; Mon, 11 May 2015 20:26:36 GMT (envelope-from hiren@FreeBSD.org) Received: (from hiren@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4BKQZEh064574; Mon, 11 May 2015 20:26:35 GMT (envelope-from hiren@FreeBSD.org) Message-Id: <201505112026.t4BKQZEh064574@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hiren set sender to hiren@FreeBSD.org using -f From: Hiren Panchasara Date: Mon, 11 May 2015 20:26:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r282781 - in stable/10: share/man/man9 sys/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.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2015 20:26:36 -0000 Author: hiren Date: Mon May 11 20:26:35 2015 New Revision: 282781 URL: https://svnweb.freebsd.org/changeset/base/282781 Log: r281955 removed M_FLOWID which could cause problems for old drivers still using the field. It cannot be removed from stable/10 so restore it. Change M_HASHTYPE_GET() and M_HASHTYPE_SET() to do the right thing when M_FLOWID exists. Also bumping the FreeBSD version to note the fact that M_FLOWID is brought back in stable/10. (Just a note that M_FLOWID has been removed from -head.) Spotted by: np Suggested by: hans Reviewed by: hans, tuexen (earlier version) Helped by: jhb, delphij, gjb Sponsored by: Limelight Networks Modified: stable/10/share/man/man9/netisr.9 stable/10/sys/sys/mbuf.h stable/10/sys/sys/param.h Modified: stable/10/share/man/man9/netisr.9 ============================================================================== --- stable/10/share/man/man9/netisr.9 Mon May 11 19:55:01 2015 (r282780) +++ stable/10/share/man/man9/netisr.9 Mon May 11 20:26:35 2015 (r282781) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 11, 2015 +.Dd May 11, 2015 .Dt NETISR 9 .Os .Sh NAME @@ -126,13 +126,13 @@ MIB names, so should not contain whitesp Protocol handler function that will be invoked on each packet received for the protocol. .It Vt netisr_m2flow_t Va nh_m2flow -Optional protocol function to generate a flow ID and set a valid -hashtype for packets that enter the +Optional protocol function to generate a flow ID and set +.Dv M_FLOWID +for packets that do not enter .Nm with -.Dv M_HASHTYPE_GET(m) -equal to -.Dv M_HASHTYPE_NONE . +.Dv M_FLOWID +defined. Will be used only with .Dv NETISR_POLICY_FLOW . .It Vt netisr_m2cpuid_t Va nh_m2cpuid Modified: stable/10/sys/sys/mbuf.h ============================================================================== --- stable/10/sys/sys/mbuf.h Mon May 11 19:55:01 2015 (r282780) +++ stable/10/sys/sys/mbuf.h Mon May 11 20:26:35 2015 (r282781) @@ -230,7 +230,7 @@ struct mbuf { #define M_MCAST 0x00000020 /* send/received as link-level multicast */ #define M_PROMISC 0x00000040 /* packet was not for us */ #define M_VLANTAG 0x00000080 /* ether_vtag is valid */ -#define M_UNUSED_8 0x00000100 /* --available-- */ +#define M_FLOWID 0x00000100 /* deprecated: flowid is valid */ #define M_NOFREE 0x00000200 /* do not free mbuf, embedded in cluster */ #define M_PROTO1 0x00001000 /* protocol-specific */ @@ -257,7 +257,7 @@ struct mbuf { * Flags preserved when copying m_pkthdr. */ #define M_COPYFLAGS \ - (M_PKTHDR|M_EOR|M_RDONLY|M_BCAST|M_MCAST|M_PROMISC|M_VLANTAG| \ + (M_PKTHDR|M_EOR|M_RDONLY|M_BCAST|M_MCAST|M_PROMISC|M_VLANTAG|M_FLOWID| \ M_PROTOFLAGS) /* @@ -265,7 +265,7 @@ struct mbuf { */ #define M_FLAG_BITS \ "\20\1M_EXT\2M_PKTHDR\3M_EOR\4M_RDONLY\5M_BCAST\6M_MCAST" \ - "\7M_PROMISC\10M_VLANTAG" + "\7M_PROMISC\10M_VLANTAG\11M_FLOWID" #define M_FLAG_PROTOBITS \ "\15M_PROTO1\16M_PROTO2\17M_PROTO3\20M_PROTO4\21M_PROTO5" \ "\22M_PROTO6\23M_PROTO7\24M_PROTO8\25M_PROTO9\26M_PROTO10" \ @@ -297,8 +297,16 @@ struct mbuf { #define M_HASHTYPE_OPAQUE 255 /* ordering, not affinity */ #define M_HASHTYPE_CLEAR(m) ((m)->m_pkthdr.rsstype = 0) -#define M_HASHTYPE_GET(m) ((m)->m_pkthdr.rsstype) -#define M_HASHTYPE_SET(m, v) ((m)->m_pkthdr.rsstype = (v)) +/* + * Handle M_FLOWID for legacy drivers still using them. + */ +#define M_HASHTYPE_GET(m) ((m->m_flags & M_FLOWID) ? M_HASHTYPE_OPAQUE \ + : (m)->m_pkthdr.rsstype) +#define M_HASHTYPE_SET(m, v) do { \ + if ((v) != M_HASHTYPE_NONE) \ + m->m_flags |= M_FLOWID; \ + (m)->m_pkthdr.rsstype = (v); \ +} while (0) #define M_HASHTYPE_TEST(m, v) (M_HASHTYPE_GET(m) == (v)) /* Modified: stable/10/sys/sys/param.h ============================================================================== --- stable/10/sys/sys/param.h Mon May 11 19:55:01 2015 (r282780) +++ stable/10/sys/sys/param.h Mon May 11 20:26:35 2015 (r282781) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1001514 /* Master, propagated to newvers */ +#define __FreeBSD_version 1001515 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-all@FreeBSD.ORG Mon May 11 20:33:47 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B890A15D; Mon, 11 May 2015 20:33:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8CC321853; Mon, 11 May 2015 20:33:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4BKXlZa069215; Mon, 11 May 2015 20:33:47 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4BKXlUQ069213; Mon, 11 May 2015 20:33:47 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201505112033.t4BKXlUQ069213@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 11 May 2015 20:33:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282782 - head/lib/libc/arm/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.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2015 20:33:47 -0000 Author: andrew Date: Mon May 11 20:33:46 2015 New Revision: 282782 URL: https://svnweb.freebsd.org/changeset/base/282782 Log: Use the GOT_* macros to help simplify the code, these work with both pic and non-pic code, and to build for Thumb. Modified: head/lib/libc/arm/sys/brk.S head/lib/libc/arm/sys/sbrk.S Modified: head/lib/libc/arm/sys/brk.S ============================================================================== --- head/lib/libc/arm/sys/brk.S Mon May 11 20:26:35 2015 (r282781) +++ head/lib/libc/arm/sys/brk.S Mon May 11 20:33:46 2015 (r282782) @@ -53,16 +53,10 @@ _C_LABEL(minbrk): * Change the data segment size */ ENTRY(_brk) -#ifdef PIC /* Setup the GOT */ - ldr r3, .Lgot - add r3, pc, r3 -.L1: - ldr r1, .Lminbrk - ldr r1, [r3, r1] -#else - ldr r1, .Lminbrk -#endif + GOT_INIT(r3, .Lgot, .L1) + GOT_GET(r1, r3, .Lminbrk) + /* Get the minimum allowable brk address */ ldr r1, [r1] @@ -71,6 +65,7 @@ ENTRY(_brk) * if the address is below minbrk. */ cmp r0, r1 + it lt movlt r0, r1 mov r2, r0 SYSTRAP(break) @@ -90,10 +85,7 @@ ENTRY(_brk) RET .align 2 -#ifdef PIC -.Lgot: - .word _GLOBAL_OFFSET_TABLE_ - (.L1+4) -#endif + GOT_INITSYM(.Lgot, .L1) .Lminbrk: .word PIC_SYM(_C_LABEL(minbrk), GOT) .Lcurbrk: Modified: head/lib/libc/arm/sys/sbrk.S ============================================================================== --- head/lib/libc/arm/sys/sbrk.S Mon May 11 20:26:35 2015 (r282781) +++ head/lib/libc/arm/sys/sbrk.S Mon May 11 20:33:46 2015 (r282782) @@ -52,16 +52,10 @@ CURBRK: * Change the data segment size */ ENTRY(_sbrk) -#ifdef PIC /* Setup the GOT */ - ldr r3, .Lgot - add r3, pc, r3 -.L1: - ldr r2, .Lcurbrk - ldr r2, [r3, r2] -#else - ldr r2, .Lcurbrk -#endif + GOT_INIT(r3, .Lgot, .L1) + GOT_GET(r2, r3, .Lcurbrk) + /* Get the current brk address */ ldr r1, [r2] @@ -80,10 +74,7 @@ ENTRY(_sbrk) RET .align 0 -#ifdef PIC -.Lgot: - .word _GLOBAL_OFFSET_TABLE_ - (.L1+4) -#endif + GOT_INITSYM(.Lgot, .L1) .Lcurbrk: .word PIC_SYM(CURBRK, GOT) END(_sbrk) From owner-svn-src-all@FreeBSD.ORG Mon May 11 20:58:07 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CB02D9F6; Mon, 11 May 2015 20:58:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AC3F21B1A; Mon, 11 May 2015 20:58:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4BKw7vj079983; Mon, 11 May 2015 20:58:07 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4BKw6Zj079978; Mon, 11 May 2015 20:58:06 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201505112058.t4BKw6Zj079978@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Mon, 11 May 2015 20:58:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282783 - in head/sys: conf dev/pci powerpc/mpc85xx 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.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2015 20:58:08 -0000 Author: jhibbits Date: Mon May 11 20:58:05 2015 New Revision: 282783 URL: https://svnweb.freebsd.org/changeset/base/282783 Log: Add a PCI bridge for the Freescale PCIe Root Complex Summary: The Freescale PCIe Root Complex shows up as a Processor class device, PowerPC subclass, so the generic PCI code ignores it for a bridge. This adds support for it. As part of this, update the Freescale PCI hostbridge driver, to allow probing beyond the root complex, instead of only allowing "proper" PCI-PCI bridges. Reviewers: #powerpc, marcel, nwhitehorn Reviewed By: nwhitehorn Subscribers: imp Differential Revision: https://reviews.freebsd.org/D2442 Relnotes: yes Added: head/sys/powerpc/mpc85xx/pci_mpc85xx_pcib.c (contents, props changed) Modified: head/sys/conf/files.powerpc head/sys/dev/pci/pci_pci.c head/sys/dev/pci/pcib_private.h head/sys/powerpc/mpc85xx/pci_mpc85xx.c Modified: head/sys/conf/files.powerpc ============================================================================== --- head/sys/conf/files.powerpc Mon May 11 20:33:46 2015 (r282782) +++ head/sys/conf/files.powerpc Mon May 11 20:58:05 2015 (r282783) @@ -138,6 +138,7 @@ powerpc/mpc85xx/mpc85xx.c optional mpc85 powerpc/mpc85xx/mpc85xx_gpio.c optional mpc85xx gpio powerpc/mpc85xx/platform_mpc85xx.c optional mpc85xx powerpc/mpc85xx/pci_mpc85xx.c optional pci mpc85xx +powerpc/mpc85xx/pci_mpc85xx_pcib.c optional pci mpc85xx powerpc/ofw/ofw_machdep.c standard powerpc/ofw/ofw_pci.c optional pci powerpc/ofw/ofw_pcibus.c optional pci Modified: head/sys/dev/pci/pci_pci.c ============================================================================== --- head/sys/dev/pci/pci_pci.c Mon May 11 20:33:46 2015 (r282782) +++ head/sys/dev/pci/pci_pci.c Mon May 11 20:58:05 2015 (r282783) @@ -442,16 +442,7 @@ pcib_probe_windows(struct pcib_softc *sc dev = sc->dev; if (pci_clear_pcib) { - pci_write_config(dev, PCIR_IOBASEL_1, 0xff, 1); - pci_write_config(dev, PCIR_IOBASEH_1, 0xffff, 2); - pci_write_config(dev, PCIR_IOLIMITL_1, 0, 1); - pci_write_config(dev, PCIR_IOLIMITH_1, 0, 2); - pci_write_config(dev, PCIR_MEMBASE_1, 0xffff, 2); - pci_write_config(dev, PCIR_MEMLIMIT_1, 0, 2); - pci_write_config(dev, PCIR_PMBASEL_1, 0xffff, 2); - pci_write_config(dev, PCIR_PMBASEH_1, 0xffffffff, 4); - pci_write_config(dev, PCIR_PMLIMITL_1, 0, 2); - pci_write_config(dev, PCIR_PMLIMITH_1, 0, 4); + pcib_bridge_init(dev); } /* Determine if the I/O port window is implemented. */ @@ -1115,6 +1106,21 @@ pcib_resume(device_t dev) return (bus_generic_resume(dev)); } +void +pcib_bridge_init(device_t dev) +{ + pci_write_config(dev, PCIR_IOBASEL_1, 0xff, 1); + pci_write_config(dev, PCIR_IOBASEH_1, 0xffff, 2); + pci_write_config(dev, PCIR_IOLIMITL_1, 0, 1); + pci_write_config(dev, PCIR_IOLIMITH_1, 0, 2); + pci_write_config(dev, PCIR_MEMBASE_1, 0xffff, 2); + pci_write_config(dev, PCIR_MEMLIMIT_1, 0, 2); + pci_write_config(dev, PCIR_PMBASEL_1, 0xffff, 2); + pci_write_config(dev, PCIR_PMBASEH_1, 0xffffffff, 4); + pci_write_config(dev, PCIR_PMLIMITL_1, 0, 2); + pci_write_config(dev, PCIR_PMLIMITH_1, 0, 4); +} + int pcib_read_ivar(device_t dev, device_t child, int which, uintptr_t *result) { Modified: head/sys/dev/pci/pcib_private.h ============================================================================== --- head/sys/dev/pci/pcib_private.h Mon May 11 20:33:46 2015 (r282782) +++ head/sys/dev/pci/pcib_private.h Mon May 11 20:58:05 2015 (r282783) @@ -145,6 +145,7 @@ void pcib_setup_secbus(device_t dev, st #endif int pcib_attach(device_t dev); void pcib_attach_common(device_t dev); +void pcib_bridge_init(device_t dev); #ifdef NEW_PCIB const char *pcib_child_name(device_t child); #endif Modified: head/sys/powerpc/mpc85xx/pci_mpc85xx.c ============================================================================== --- head/sys/powerpc/mpc85xx/pci_mpc85xx.c Mon May 11 20:33:46 2015 (r282782) +++ head/sys/powerpc/mpc85xx/pci_mpc85xx.c Mon May 11 20:58:05 2015 (r282783) @@ -570,10 +570,19 @@ fsl_pcib_init(struct fsl_pcib_softc *sc, subclass = fsl_pcib_read_config(sc->sc_dev, bus, slot, func, PCIR_SUBCLASS, 1); + /* + * The PCI Root Complex comes up as a Processor/PowerPC, + * but is a bridge. + */ /* Allow only proper PCI-PCI briges */ - if (class != PCIC_BRIDGE) + if (class != PCIC_BRIDGE && class != PCIC_PROCESSOR) continue; - if (subclass != PCIS_BRIDGE_PCI) + if (subclass != PCIS_BRIDGE_PCI && + subclass != PCIS_PROCESSOR_POWERPC) + continue; + + if (subclass == PCIS_PROCESSOR_POWERPC && + hdrtype != PCIM_HDRTYPE_BRIDGE) continue; secbus++; @@ -825,4 +834,3 @@ fsl_pcib_decode_win(phandle_t node, stru return (0); } - Added: head/sys/powerpc/mpc85xx/pci_mpc85xx_pcib.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/powerpc/mpc85xx/pci_mpc85xx_pcib.c Mon May 11 20:58:05 2015 (r282783) @@ -0,0 +1,104 @@ +/*- + * Copyright 2015 Justin Hibbits + * 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. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * 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. + * + * From: FreeBSD: src/sys/powerpc/mpc85xx/pci_ocp.c,v 1.9 2010/03/23 23:46:28 marcel + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include + +#include "pcib_if.h" + +static int +fsl_pcib_rc_probe(device_t dev) +{ + printf("Probe called\n"); + if (pci_get_vendor(dev) != 0x1957) + return (ENXIO); + if (pci_get_progif(dev) != 0) + return (ENXIO); + if (pci_get_class(dev) != PCIC_PROCESSOR) + return (ENXIO); + if (pci_get_subclass(dev) != PCIS_PROCESSOR_POWERPC) + return (ENXIO); + + return (BUS_PROBE_DEFAULT); +} + +static int +fsl_pcib_rc_attach(device_t dev) +{ + struct pcib_softc *sc; + device_t child; + + pcib_bridge_init(dev); + pcib_attach_common(dev); + + sc = device_get_softc(dev); + if (sc->bus.sec != 0) { + child = device_add_child(dev, "pci", -1); + if (child != NULL) + return (bus_generic_attach(dev)); + } + + return (0); +} + +static device_method_t fsl_pcib_rc_methods[] = { + DEVMETHOD(device_probe, fsl_pcib_rc_probe), + DEVMETHOD(device_attach, fsl_pcib_rc_attach), + DEVMETHOD_END +}; + +static devclass_t fsl_pcib_rc_devclass; +DEFINE_CLASS_1(pcib, fsl_pcib_rc_driver, fsl_pcib_rc_methods, + sizeof(struct pcib_softc), pcib_driver); +DRIVER_MODULE(rcpcib, pci, fsl_pcib_rc_driver, fsl_pcib_rc_devclass, 0, 0); + From owner-svn-src-all@FreeBSD.ORG Mon May 11 21:24:10 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DECDA12F; Mon, 11 May 2015 21:24:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CD2901E69; Mon, 11 May 2015 21:24:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4BLOAtV093941; Mon, 11 May 2015 21:24:10 GMT (envelope-from grehan@FreeBSD.org) Received: (from grehan@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4BLOAC9093940; Mon, 11 May 2015 21:24:10 GMT (envelope-from grehan@FreeBSD.org) Message-Id: <201505112124.t4BLOAC9093940@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: grehan set sender to grehan@FreeBSD.org using -f From: Peter Grehan Date: Mon, 11 May 2015 21:24:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282784 - head/usr.sbin/bhyve 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.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2015 21:24:11 -0000 Author: grehan Date: Mon May 11 21:24:10 2015 New Revision: 282784 URL: https://svnweb.freebsd.org/changeset/base/282784 Log: Handling indirect descriptors is a capability of the host and not one that needs to be negotiated. Use the host capabilities field and not the negotiated field when verifying that indirect descriptors are supported. Found with the Redhat Windows viostor driver, which clears the indirect capability in the negotiated caps and then starts using them. Reported and tested by: Leon Dang (ldang@nahannisys.com) MFC after: 2 weeks Modified: head/usr.sbin/bhyve/virtio.c Modified: head/usr.sbin/bhyve/virtio.c ============================================================================== --- head/usr.sbin/bhyve/virtio.c Mon May 11 20:58:05 2015 (r282783) +++ head/usr.sbin/bhyve/virtio.c Mon May 11 21:24:10 2015 (r282784) @@ -316,7 +316,7 @@ vq_getchain(struct vqueue_info *vq, uint if ((vdir->vd_flags & VRING_DESC_F_INDIRECT) == 0) { _vq_record(i, vdir, ctx, iov, n_iov, flags); i++; - } else if ((vs->vs_negotiated_caps & + } else if ((vs->vs_vc->vc_hv_caps & VIRTIO_RING_F_INDIRECT_DESC) == 0) { fprintf(stderr, "%s: descriptor has forbidden INDIRECT flag, " From owner-svn-src-all@FreeBSD.ORG Mon May 11 22:12:14 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2D698A1D; Mon, 11 May 2015 22:12:14 +0000 (UTC) Received: from mx1.stack.nl (relay04.stack.nl [IPv6:2001:610:1108:5010::107]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mailhost.stack.nl", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id E42B51364; Mon, 11 May 2015 22:12:13 +0000 (UTC) Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mx1.stack.nl (Postfix) with ESMTP id 85AD4B805F; Tue, 12 May 2015 00:12:10 +0200 (CEST) Received: by snail.stack.nl (Postfix, from userid 1677) id 7023628494; Tue, 12 May 2015 00:12:10 +0200 (CEST) Date: Tue, 12 May 2015 00:12:10 +0200 From: Jilles Tjoelker To: Oliver Pinter Cc: John Baldwin , Xin LI , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Subject: Re: svn commit: r282672 - head/etc/rc.d Message-ID: <20150511221210.GA65008@stack.nl> References: <201505082336.t48NaWRS080408@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2015 22:12:14 -0000 On Sun, May 10, 2015 at 11:32:27PM +0200, Oliver Pinter wrote: > > tr is in /usr/bin so this breaks systems with a separate /usr. > > Perhaps you could use dd with conv=lcase instead? > Then these are affected too:: > root@robot rc.d# grep -r -E '(awk| tr )' * > ftp-proxy: ps_pid=`ps ax -o pid= -o command= | > grep $cmd_string | grep -e "$flag_string" | grep -v grep | awk '{ > print $1 }'` > growfs: rootdev=$(df / | tail -n 1 | awk '{ sub("/dev/", "", $1); print $1 }') > growfs: rawdev=$(glabel status | awk '$1 == "'"$rootdev"'" { > print $3 }') > growfs: sysctl -b kern.geom.conftxt | awk ' > jail: _j=$(echo $_j | tr /. _) > jail: _j=$(echo $1 | tr /. _) > jail: _j=$(echo $_j | tr /. _) > jail: _j=$(echo $_j | tr /. _) > jail: _j=$(echo $_j | tr /. _) > motd: awk '{if (NR == 1) {if ($1 == "FreeBSD") {next} else {print > "\n"$0}} else {print}}' < /etc/motd >> ${T} > ntpdate: ntpdate_hosts=`awk ' > power_profile: awk '{ split($0, a, "[/ ]"); print a[1] }' -) 2> /dev/null`" > power_profile: awk '{ split($0, a, "[/ ]"); print a[length(a) - 1] }' > -) 2> /dev/null`" > sshd: local ALG="$(echo $alg | tr a-z A-Z)" > syscons: for i in `kldstat | awk '$5 ~ "_saver\.ko$" { > print $5 }'`; do > syslogd: for _s in `cat $sockfile | tr '\n' ' '` ; do > virecover: recfile=`awk > '/^X-vi-recover-path:/{print $2}' < "${i}"` > The awk is located in /usr/bin/awk too, and for e.g. the growfs should > running in the very first steps... Except for growfs and power_profile, these already REQUIRE mountcritremote or FILESYSTEMS (directly or indirectly), or critically depend on software in /usr like /usr/sbin/ftp-proxy or /usr/sbin/jail. The problem with growfs was explained elsewhere in the thread. Although power_profile appears to have an appropriate REQUIRE line, it is in fact started via devd, which happens fairly early. -- Jilles Tjoelker From owner-svn-src-all@FreeBSD.ORG Mon May 11 22:14:04 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A2780B79; Mon, 11 May 2015 22:14:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 82E161376; Mon, 11 May 2015 22:14:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4BME4jU018627; Mon, 11 May 2015 22:14:04 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4BME4gD018626; Mon, 11 May 2015 22:14:04 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201505112214.t4BME4gD018626@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 11 May 2015 22:14:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282785 - head/release 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.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2015 22:14:04 -0000 Author: gjb Date: Mon May 11 22:14:03 2015 New Revision: 282785 URL: https://svnweb.freebsd.org/changeset/base/282785 Log: Add a new file, Makefile.mirrors, which is intended to replace a 474-line kludge of a shell script to pre-create the directory hierarchy on ftp-master. This is not in any way connected to the build, and there is no intention to do so. This only intent here is to try to make things a little bit easier for me. But I've probably just made things worse. Sponsored by: The FreeBSD Foundation Added: head/release/Makefile.mirrors (contents, props changed) Added: head/release/Makefile.mirrors ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/release/Makefile.mirrors Mon May 11 22:14:03 2015 (r282785) @@ -0,0 +1,128 @@ +# +# This Makefile helps create the directory structure on ftp-master, +# making staging builds a bit more sane. +# +# You probably do not want to use this. Really. +# You have been warned. +# +# $FreeBSD$ +# + +.include "${.CURDIR}/Makefile" + +FTPDIR?= /ftp +STAGE_TARGETS?= iso-images-stage + +# snapshot +.if ${BRANCH} == "STABLE" || ${BRANCH} == "CURRENT" +SNAPSHOT= 1 +TLD?= ${FTPDIR}/snapshots +BUILDDATE!= date -j -f '%s' $$(stat -f "%c" ${.OBJDIR}/dist/base/bin/sh) +%Y%m%d +. if ${TARGET} == "arm" && ${TARGET_ARCH} == "armv6" +. if !defined(BOARDNAME) || empty(BOARDNAME) +BOARDNAME= ${KERNCONF} +. endif +_SNAP_SUFFIX:= -${BOARDNAME}-${BUILDDATE} +. else # not arm/armv6 +_SNAP_SUFFIX:= -${BUILDDATE} +. endif +. for _D in /usr/bin /usr/local/bin +. for _S in svnversion svnliteversion +. if exists(${_D}/${_S}) +SVNVERSION?= ${_D}/${_S} +. endif +. endfor +. endfor +. if exists(${SVNVERSION}) && !empty(SVNVERSION) +SVNREVISION!= ${SVNVERSION} ${WORLDDIR}/Makefile +_SNAP_SUFFIX:= ${_SNAP_SUFFIX}-r${SVNREVISION} +. endif +.else +# release +SNAPSHOT= +TLD?= ${FTPDIR}/releases +.endif + +.if defined(WITH_VMIMAGES) && !empty(WITH_VMIMAGES) +STAGE_TARGETS+= vm-images-stage +VM_DIR= ${TLD}/VM-IMAGES/${REVISION}-${BRANCH}/${TARGET_ARCH} +.endif + +CLEANFILES+= ${STAGE_TARGETS} +CHECKSUM_FILES?= SHA256 MD5 +SNAP_SUFFIX!= echo ${_SNAP_SUFFIX:S,^-,,1} | tr -d ' ' +ISO_DIR= ${TLD}/${TARGET}/${TARGET_ARCH}/ISO-IMAGES/${REVISION} +FTP_DIR= ${TLD}/${TARGET}/${TARGET_ARCH}/${REVISION}-${BRANCH} + +iso-images-stage: + mkdir -p ${ISO_DIR} + mkdir -p ${TLD}/ISO-IMAGES/${REVISION} +.for IMAGE in ${IMAGES} + cp -p ${.OBJDIR}/${IMAGE} ${ISO_DIR}/${OSRELEASE}-${IMAGE} +. if exists(/R/${IMAGE}.xz) + cp -p ${.OBJDIR}/${IMAGE}.xz ${ISO_DIR}/${OSRELEASE}-${IMAGE}.xz +. endif +.endfor +.if defined(SNAPSHOT) && !empty(SNAPSHOT) +. for IMAGE in ${IMAGES} + cd ${ISO_DIR} && mv ${OSRELEASE}-${IMAGE} \ + ${OSRELEASE}-${SNAP_SUFFIX}-${IMAGE} + cd ${TLD}/ISO-IMAGES/${REVISION} && \ + ln -s \ + ../../${TARGET}/${TARGET_ARCH}/${OSRELEASE}-${SNAP_SUFFIX}-${IMAGE} +. endfor +. for CHECKSUM in ${CHECKSUM_FILES} +. if exists(${ISO_DIR}/CHECKSUM.${CHECKSUM}) + rm -f ${ISO_DIR}/CHECKSUM.${CHECKSUM} +. endif + cd ${ISO_DIR} && ${CHECKSUM:tl} ${OSRELEASE}* > \ + CHECKSUM.${CHECKSUM}-${REVISION}-${BRANCH}-${SNAP_SUFFIX} +. endfor +.else # !snapshot + cd ${TLD}/ISO-IMAGES/${REVISION} && ln -s \ + ../../${TARGET}/${TARGET_ARCH}/${OSRELEASE}-${IMAGE} . + cd ${ISO_DIR} && ${CHECKSUM:tl} ${OSRELEASE}* > \ + CHECKSUM.${CHECKSUM}-${REVISION}-${BRANCH}-${SNAP_SUFFIX} +.endif +.if exists(${.OBJDIR}/ftp) + mkdir -p ${FTP_DIR} + cp ${.OBJDIR}/ftp/*.txz ${.OBJDIR}/ftp/MANIFEST ${FTP_DIR} + cd ${TLD}/${TARGET} && \ + ln -s ${TARGET_ARCH}/${REVISION}-${BRANCH} \ + ${REVISION}-${BRANCH} +.endif + +vm-images-stage: + @true +# mkdir -p ${VM_DIR} +#.if defined(SNAPSHOT) && !empty(SNAPSHOT) +# mkdir -p ${VM_DIR}/${BUILDDATE} +#. if exists(${VM_DIR}/Latest) +# unlink ${VM_DIR}/Latest +# cd ${VM_DIR} && ln -s ${BUILDDATE} Latest +#. endif +#. for VMIMAGE in ${VMIMAGES} +# cd /R/vmimages && cp -p ${VMIMAGE}.xz \ +# ${VM_DIR}/${BUILDDATE}/${OSRELEASE}-${SNAP_SUFFIX}-${VMIMAGE}.xz +# cd ${VM_DIR}/Latest && ln -s \ +# ../${BUILDDATE}/${OSRELEASE}-${SNAP_SUFFIX}-${VMIMAGE}.xz \ +# ${OSRELEASE}-${VMIMAGE}.xz +#. endfor +#. for CHECKSUM in ${CHECKSUM_FILES} +#. if exists(${VM_DIR}/${BUILDDATE}/CHECKSUM.${CHECKSUM}) +# rm -f ${VM_DIR}/${BUILDDATE}/CHECKSUM.${CHECKSUM} +#. endif +# cd ${VM_DIR}/${BUILDDATE} && ${CHECKSUM:tl} ${OSRELEASE}* > \ +# CHECKSUM.${CHECKSUM}-${REVISION}-${BRANCH}-${SNAP_SUFFIX} +# cd ${VM_DIR}/Latest && ln -s \ +# ${VM_DIR}/${BUILDDATE}/CHECKSUM.${CHECKSUM}-${SNAP_SUFFIX} \ +# CHECKSUM.${CHECKSUM} +#. endfor +#.else # !snapshot +#. for CHECKSUM in ${CHECKSUM_FILES} +# cd /R/vmimages && cp -p CHECKSUM.${CHECKSUM}* \ +# ${VM_DIR}/${BUILDDATE}/CHECKSUM.${CHECKSUM}-${SNAP_SUFFIX} +#.endif + +ftp-stage: ${STAGE_TARGETS} + From owner-svn-src-all@FreeBSD.ORG Tue May 12 00:23:23 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B89A3607 for ; Tue, 12 May 2015 00:23:23 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9D0F61290 for ; Tue, 12 May 2015 00:23:23 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.9/8.14.9) with ESMTP id t4C0NNdc093952 for ; Tue, 12 May 2015 00:23:23 GMT (envelope-from bdrewery@freefall.freebsd.org) Received: (from bdrewery@localhost) by freefall.freebsd.org (8.14.9/8.14.9/Submit) id t4C0NN2Q093944 for svn-src-all@freebsd.org; Tue, 12 May 2015 00:23:23 GMT (envelope-from bdrewery) Received: (qmail 29759 invoked from network); 11 May 2015 19:23:21 -0500 Received: from unknown (HELO ?10.10.1.139?) (freebsd@shatow.net@10.10.1.139) by sweb.xzibition.com with ESMTPA; 11 May 2015 19:23:21 -0500 Message-ID: <5551480E.90906@FreeBSD.org> Date: Mon, 11 May 2015 19:23:42 -0500 From: Bryan Drewery Organization: FreeBSD User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Thomas Quinot , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r282736 - in head: . lib/libmd References: <201505102121.t4ALLr3A076661@svn.freebsd.org> In-Reply-To: <201505102121.t4ALLr3A076661@svn.freebsd.org> OpenPGP: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="1VlEGXSAVA4SmFSHbCTm2VSef5jCrwIA3" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 12 May 2015 00:23:23 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --1VlEGXSAVA4SmFSHbCTm2VSef5jCrwIA3 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable The libmd changes break pkg - so all packages. http://beefy6.nyi.freebsd.org/data/head-amd64-default/p386108_s282785/log= s/pkg-1.5.2.log > CCLD pkg-static > /usr/lib/liblzma.a(check.o): In function `lzma_check_init': > /usr/local/poudriere/jails/head-amd64/usr/src/lib/liblzma/../../contrib= /xz/src/liblzma/check/check.c:(.text+0x5e): undefined reference to `_libm= d_SHA256_Init' > /usr/lib/liblzma.a(check.o): In function `lzma_check_update': > /usr/local/poudriere/jails/head-amd64/usr/src/lib/liblzma/../../contrib= /xz/src/liblzma/check/check.c:(.text+0xbf): undefined reference to `_libm= d_SHA256_Update' > /usr/lib/liblzma.a(check.o): In function `lzma_check_finish': > /usr/local/poudriere/jails/head-amd64/usr/src/lib/liblzma/../../contrib= /xz/src/liblzma/check/check.c:(.text+0x10d): undefined reference to `_lib= md_SHA256_Final' > cc: error: linker command failed with exit code 1 (use -v to see invoca= tion) > *** [pkg-static] Error code 1 Can you please just revert this and 282726 until they are working and have a passing exp-run? On 5/10/2015 4:21 PM, Thomas Quinot wrote: > Author: thomas > Date: Sun May 10 21:21:52 2015 > New Revision: 282736 > URL: https://svnweb.freebsd.org/changeset/base/282736 >=20 > Log: > Unbreak build following rev. 282726 > =20 > (Makefile.inc1): add dependency of xinstall on libmd to > avoid failure of parallel bootstrap. > =20 > (lib/libmd/*.h): do not redefine symbols if already > defined as macros (libcrypt uses the same sources internally, > redefining symbols with a prefix of its own). > =20 > Fixes build failures caused by previous change to libmd. > =20 > Reported by: ian > Pointy hat to: thomas >=20 > Modified: > head/Makefile.inc1 > head/lib/libmd/md4.h > head/lib/libmd/md5.h > head/lib/libmd/ripemd.h > head/lib/libmd/sha.h > head/lib/libmd/sha256.h > head/lib/libmd/sha512.h >=20 > Modified: head/Makefile.inc1 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=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/Makefile.inc1 Sun May 10 21:05:32 2015 (r282735) > +++ head/Makefile.inc1 Sun May 10 21:21:52 2015 (r282736) > @@ -1361,6 +1361,9 @@ _kerberos5_bootstrap_tools=3D \ > .ORDER: ${_kerberos5_bootstrap_tools:C/^/${_bt}-/g} > .endif > =20 > +# Rebuild up-to-date libmd for xinstall > +${_bt}-usr.bin/xinstall: ${_bt}-lib/libmd > + > bootstrap-tools: .PHONY > =20 > # Please document (add comment) why something is in 'bootstrap-tools'.= >=20 > Modified: head/lib/libmd/md4.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/lib/libmd/md4.h Sun May 10 21:05:32 2015 (r282735) > +++ head/lib/libmd/md4.h Sun May 10 21:21:52 2015 (r282736) > @@ -38,14 +38,30 @@ __BEGIN_DECLS > =20 > /* Ensure libmd symbols do not clash with libcrypto */ > =20 > +#ifndef MD4Init > #define MD4Init _libmd_MD4Init > +#endif > +#ifndef MD4Update > #define MD4Update _libmd_MD4Update > +#endif > +#ifndef MD4Pad > #define MD4Pad _libmd_MD4Pad > +#endif > +#ifndef MD4Final > #define MD4Final _libmd_MD4Final > +#endif > +#ifndef MD4End > #define MD4End _libmd_MD4End > +#endif > +#ifndef MD4File > #define MD4File _libmd_MD4File > +#endif > +#ifndef MD4FileChunk > #define MD4FileChunk _libmd_MD4FileChunk > +#endif > +#ifndef MD4Data > #define MD4Data _libmd_MD4Data > +#endif > =20 > void MD4Init(MD4_CTX *); > void MD4Update(MD4_CTX *, const void *, unsigned int); >=20 > Modified: head/lib/libmd/md5.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/lib/libmd/md5.h Sun May 10 21:05:32 2015 (r282735) > +++ head/lib/libmd/md5.h Sun May 10 21:21:52 2015 (r282736) > @@ -7,15 +7,33 @@ > =20 > /* Ensure libmd symbols do not clash with libcrypto */ > =20 > +#ifndef MD5Init > #define MD5Init _libmd_MD5Init > +#endif > +#ifndef MD5Update > #define MD5Update _libmd_MD5Update > +#endif > +#ifndef MD5Pad > #define MD5Pad _libmd_MD5Pad > +#endif > +#ifndef MD5Final > #define MD5Final _libmd_MD5Final > +#endif > +#ifndef MD5Transform > #define MD5Transform _libmd_MD5Transform > +#endif > +#ifndef MD5End > #define MD5End _libmd_MD5End > +#endif > +#ifndef MD5File > #define MD5File _libmd_MD5File > +#endif > +#ifndef MD5FileChunk > #define MD5FileChunk _libmd_MD5FileChunk > +#endif > +#ifndef MD5Data > #define MD5Data _libmd_MD5Data > +#endif > =20 > #endif > =20 >=20 > Modified: head/lib/libmd/ripemd.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/lib/libmd/ripemd.h Sun May 10 21:05:32 2015 (r282735) > +++ head/lib/libmd/ripemd.h Sun May 10 21:21:52 2015 (r282736) > @@ -84,17 +84,37 @@ __BEGIN_DECLS > =20 > /* Ensure libmd symbols do not clash with libcrypto */ > =20 > +#ifndef RIPEMD160_Init > #define RIPEMD160_Init _libmd_RIPEMD160_Init > +#endif > +#ifndef RIPEMD160_Update > #define RIPEMD160_Update _libmd_RIPEMD160_Update > +#endif > +#ifndef RIPEMD160_Final > #define RIPEMD160_Final _libmd_RIPEMD160_Final > +#endif > +#ifndef RIPEMD160_End > #define RIPEMD160_End _libmd_RIPEMD160_End > +#endif > +#ifndef RIPEMD160_File > #define RIPEMD160_File _libmd_RIPEMD160_File > +#endif > +#ifndef RIPEMD160_FileChunk > #define RIPEMD160_FileChunk _libmd_RIPEMD160_FileChunk > +#endif > +#ifndef RIPEMD160_Data > #define RIPEMD160_Data _libmd_RIPEMD160_Data > +#endif > =20 > +#ifndef RIPEMD160_Transform > #define RIPEMD160_Transform _libmd_RIPEMD160_Transform > +#endif > +#ifndef RMD160_version > #define RMD160_version _libmd_RMD160_version > +#endif > +#ifndef ripemd160_block > #define ripemd160_block _libmd_ripemd160_block > +#endif > =20 > void RIPEMD160_Init(RIPEMD160_CTX *c); > void RIPEMD160_Update(RIPEMD160_CTX *c, const void *data, >=20 > Modified: head/lib/libmd/sha.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/lib/libmd/sha.h Sun May 10 21:05:32 2015 (r282735) > +++ head/lib/libmd/sha.h Sun May 10 21:21:52 2015 (r282736) > @@ -82,29 +82,69 @@ __BEGIN_DECLS > =20 > /* Ensure libmd symbols do not clash with libcrypto */ > =20 > +#ifndef SHA_Init > #define SHA_Init _libmd_SHA_Init > +#endif > +#ifndef SHA_Update > #define SHA_Update _libmd_SHA_Update > +#endif > +#ifndef SHA_Final > #define SHA_Final _libmd_SHA_Final > +#endif > +#ifndef SHA_End > #define SHA_End _libmd_SHA_End > +#endif > +#ifndef SHA_File > #define SHA_File _libmd_SHA_File > +#endif > +#ifndef SHA_FileChunk > #define SHA_FileChunk _libmd_SHA_FileChunk > +#endif > +#ifndef SHA_Data > #define SHA_Data _libmd_SHA_Data > +#endif > =20 > +#ifndef SHA_Transform > #define SHA_Transform _libmd_SHA_Transform > +#endif > +#ifndef SHA_version > #define SHA_version _libmd_SHA_version > +#endif > +#ifndef sha_block > #define sha_block _libmd_sha_block > +#endif > =20 > +#ifndef SHA1_Init > #define SHA1_Init _libmd_SHA1_Init > +#endif > +#ifndef SHA1_Update > #define SHA1_Update _libmd_SHA1_Update > +#endif > +#ifndef SHA1_Final > #define SHA1_Final _libmd_SHA1_Final > +#endif > +#ifndef SHA1_End > #define SHA1_End _libmd_SHA1_End > +#endif > +#ifndef SHA1_File > #define SHA1_File _libmd_SHA1_File > +#endif > +#ifndef SHA1_FileChunk > #define SHA1_FileChunk _libmd_SHA1_FileChunk > +#endif > +#ifndef SHA1_Data > #define SHA1_Data _libmd_SHA1_Data > +#endif > =20 > +#ifndef SHA1_Transform > #define SHA1_Transform _libmd_SHA1_Transform > +#endif > +#ifndef SHA1_version > #define SHA1_version _libmd_SHA1_version > +#endif > +#ifndef sha1_block > #define sha1_block _libmd_sha1_block > +#endif > =20 > void SHA_Init(SHA_CTX *c); > void SHA_Update(SHA_CTX *c, const void *data, size_t len); >=20 > Modified: head/lib/libmd/sha256.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/lib/libmd/sha256.h Sun May 10 21:05:32 2015 (r282735) > +++ head/lib/libmd/sha256.h Sun May 10 21:21:52 2015 (r282736) > @@ -41,16 +41,34 @@ __BEGIN_DECLS > =20 > /* Ensure libmd symbols do not clash with libcrypto */ > =20 > +#ifndef SHA256_Init > #define SHA256_Init _libmd_SHA256_Init > +#endif > +#ifndef SHA256_Update > #define SHA256_Update _libmd_SHA256_Update > +#endif > +#ifndef SHA256_Final > #define SHA256_Final _libmd_SHA256_Final > +#endif > +#ifndef SHA256_End > #define SHA256_End _libmd_SHA256_End > +#endif > +#ifndef SHA256_File > #define SHA256_File _libmd_SHA256_File > +#endif > +#ifndef SHA256_FileChunk > #define SHA256_FileChunk _libmd_SHA256_FileChunk > +#endif > +#ifndef SHA256_Data > #define SHA256_Data _libmd_SHA256_Data > +#endif > =20 > +#ifndef SHA256_Transform > #define SHA256_Transform _libmd_SHA256_Transform > +#endif > +#ifndef SHA256_version > #define SHA256_version _libmd_SHA256_version > +#endif > =20 > void SHA256_Init(SHA256_CTX *); > void SHA256_Update(SHA256_CTX *, const void *, size_t); >=20 > Modified: head/lib/libmd/sha512.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/lib/libmd/sha512.h Sun May 10 21:05:32 2015 (r282735) > +++ head/lib/libmd/sha512.h Sun May 10 21:21:52 2015 (r282736) > @@ -41,16 +41,34 @@ __BEGIN_DECLS > =20 > /* Ensure libmd symbols do not clash with libcrypto */ > =20 > +#ifndef SHA512_Init > #define SHA512_Init _libmd_SHA512_Init > +#endif > +#ifndef SHA512_Update > #define SHA512_Update _libmd_SHA512_Update > +#endif > +#ifndef SHA512_Final > #define SHA512_Final _libmd_SHA512_Final > +#endif > +#ifndef SHA512_End > #define SHA512_End _libmd_SHA512_End > +#endif > +#ifndef SHA512_File > #define SHA512_File _libmd_SHA512_File > +#endif > +#ifndef SHA512_FileChunk > #define SHA512_FileChunk _libmd_SHA512_FileChunk > +#endif > +#ifndef SHA512_Data > #define SHA512_Data _libmd_SHA512_Data > +#endif > =20 > +#ifndef SHA512_Transform > #define SHA512_Transform _libmd_SHA512_Transform > +#endif > +#ifndef SHA512_version > #define SHA512_version _libmd_SHA512_version > +#endif > =20 > void SHA512_Init(SHA512_CTX *); > void SHA512_Update(SHA512_CTX *, const void *, size_t); >=20 --=20 Regards, Bryan Drewery --1VlEGXSAVA4SmFSHbCTm2VSef5jCrwIA3 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJVUUgOAAoJEDXXcbtuRpfPA9wIAJvneaKA6wxG6iyPAjysB43R Q0t1wX9VngljfN0ylFVyRBjzfxcrsws2GF2nuVt+HEZukCMGe6R7hUKWLLQnIt79 9nXOQva8MEG2IKDgeIMUij0AzXc91Q1Oa72X/n6holckjqyOIhsh/DUMjSXn/H2e EQfsKl23IbI5NLIYx7jdjU+Y0+MYmQgBTIby/cR4oCaQfR0qjZd3gD3dq6KKmf4V IJc5WSOYjBSPSwtF0dnZv6gAM5IPlTWeKyjRoHV8p+jDF/AI4HTXsY/mece+gK9h WlcDxR6dRszPLAus5uofGQIuJ6wREJZ7PeUuBFjvX4QU+o/0OkKu4yKsrymKwZI= =yVTl -----END PGP SIGNATURE----- --1VlEGXSAVA4SmFSHbCTm2VSef5jCrwIA3-- From owner-svn-src-all@FreeBSD.ORG Tue May 12 00:27:21 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7F8D57BC; Tue, 12 May 2015 00:27:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6DC1B12C6; Tue, 12 May 2015 00:27:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4C0RL8e082927; Tue, 12 May 2015 00:27:21 GMT (envelope-from hiren@FreeBSD.org) Received: (from hiren@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4C0RL4T082926; Tue, 12 May 2015 00:27:21 GMT (envelope-from hiren@FreeBSD.org) Message-Id: <201505120027.t4C0RL4T082926@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hiren set sender to hiren@FreeBSD.org using -f From: Hiren Panchasara Date: Tue, 12 May 2015 00:27: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: r282786 - stable/10/sys/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.20 Precedence: list List-Id: "SVN commit messages 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, 12 May 2015 00:27:21 -0000 Author: hiren Date: Tue May 12 00:27:20 2015 New Revision: 282786 URL: https://svnweb.freebsd.org/changeset/base/282786 Log: Fix r282781: We should return OPAQUE from M_HASHTYPE_GET() if M_FLOWID is there and rsstype is not set. Submitted by: hans Modified: stable/10/sys/sys/mbuf.h Modified: stable/10/sys/sys/mbuf.h ============================================================================== --- stable/10/sys/sys/mbuf.h Mon May 11 22:14:03 2015 (r282785) +++ stable/10/sys/sys/mbuf.h Tue May 12 00:27:20 2015 (r282786) @@ -300,8 +300,9 @@ struct mbuf { /* * Handle M_FLOWID for legacy drivers still using them. */ -#define M_HASHTYPE_GET(m) ((m->m_flags & M_FLOWID) ? M_HASHTYPE_OPAQUE \ - : (m)->m_pkthdr.rsstype) +#define M_HASHTYPE_GET(m) (((m->m_flags & M_FLOWID) && \ + (m)->m_pkthdr.rsstype == M_HASHTYPE_NONE) ? M_HASHTYPE_OPAQUE : \ + (m)->m_pkthdr.rsstype) #define M_HASHTYPE_SET(m, v) do { \ if ((v) != M_HASHTYPE_NONE) \ m->m_flags |= M_FLOWID; \ From owner-svn-src-all@FreeBSD.ORG Tue May 12 00:27:53 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0F3248ED; Tue, 12 May 2015 00:27:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D92B312CA; Tue, 12 May 2015 00:27:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4C0Rqut083025; Tue, 12 May 2015 00:27:52 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4C0Rq1A083024; Tue, 12 May 2015 00:27:52 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201505120027.t4C0Rq1A083024@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 12 May 2015 00:27:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282787 - head/release 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.20 Precedence: list List-Id: "SVN commit messages 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, 12 May 2015 00:27:53 -0000 Author: gjb Date: Tue May 12 00:27:52 2015 New Revision: 282787 URL: https://svnweb.freebsd.org/changeset/base/282787 Log: Always use the 'make install' directory as the source for images. For RE purposes, we use the default (/R within the chroot), so this helps avoid copying files multiple times and xz(1)-compressing additional times when not needed. Again, this Makefile is not for general consumption. Sponsored by: The FreeBSD Foundation Modified: head/release/Makefile.mirrors Modified: head/release/Makefile.mirrors ============================================================================== --- head/release/Makefile.mirrors Tue May 12 00:27:20 2015 (r282786) +++ head/release/Makefile.mirrors Tue May 12 00:27:52 2015 (r282787) @@ -11,6 +11,7 @@ .include "${.CURDIR}/Makefile" FTPDIR?= /ftp +RELEASEDIR?= /R STAGE_TARGETS?= iso-images-stage # snapshot @@ -57,12 +58,17 @@ FTP_DIR= ${TLD}/${TARGET}/${TARGET_ARCH iso-images-stage: mkdir -p ${ISO_DIR} mkdir -p ${TLD}/ISO-IMAGES/${REVISION} -.for IMAGE in ${IMAGES} - cp -p ${.OBJDIR}/${IMAGE} ${ISO_DIR}/${OSRELEASE}-${IMAGE} -. if exists(/R/${IMAGE}.xz) - cp -p ${.OBJDIR}/${IMAGE}.xz ${ISO_DIR}/${OSRELEASE}-${IMAGE}.xz +.if exists(${RELEASEDIR}) + @# Assume we have images to copy. +. for IMAGE in ${IMAGES} + cp -p ${RELEASEDIR}/${OSRELEASE}-${IMAGE} \ + ${ISO_DIR}/${OSRELEASE}-${IMAGE} +. if exists(/R/${IMAGE}.xz) + cp -p ${RELEASEDIR}/${IMAGE}.xz \ + ${ISO_DIR}/${OSRELEASE}-${IMAGE}.xz . endif -.endfor +.endif + .if defined(SNAPSHOT) && !empty(SNAPSHOT) . for IMAGE in ${IMAGES} cd ${ISO_DIR} && mv ${OSRELEASE}-${IMAGE} \ @@ -84,9 +90,9 @@ iso-images-stage: cd ${ISO_DIR} && ${CHECKSUM:tl} ${OSRELEASE}* > \ CHECKSUM.${CHECKSUM}-${REVISION}-${BRANCH}-${SNAP_SUFFIX} .endif -.if exists(${.OBJDIR}/ftp) +.if exists(${RELEASEDIR}/ftp) mkdir -p ${FTP_DIR} - cp ${.OBJDIR}/ftp/*.txz ${.OBJDIR}/ftp/MANIFEST ${FTP_DIR} + cp ${RELEASEDIR}/ftp/*.txz ${RELEASEDIR}/ftp/MANIFEST ${FTP_DIR} cd ${TLD}/${TARGET} && \ ln -s ${TARGET_ARCH}/${REVISION}-${BRANCH} \ ${REVISION}-${BRANCH} From owner-svn-src-all@FreeBSD.ORG Tue May 12 00:30:40 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4CD0BB25; Tue, 12 May 2015 00:30:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2EFA51387; Tue, 12 May 2015 00:30:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4C0UehX085906; Tue, 12 May 2015 00:30:40 GMT (envelope-from neel@FreeBSD.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4C0UdHR085904; Tue, 12 May 2015 00:30:39 GMT (envelope-from neel@FreeBSD.org) Message-Id: <201505120030.t4C0UdHR085904@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: neel set sender to neel@FreeBSD.org using -f From: Neel Natu Date: Tue, 12 May 2015 00:30:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282788 - head/usr.sbin/bhyve 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.20 Precedence: list List-Id: "SVN commit messages 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, 12 May 2015 00:30:40 -0000 Author: neel Date: Tue May 12 00:30:39 2015 New Revision: 282788 URL: https://svnweb.freebsd.org/changeset/base/282788 Log: Allow configuration of the sector size advertised to the guest. The default behavior is to infer the logical and physical sector sizes from the block device backend. However older versions of Windows only work with specific logical/physical combinations: - Vista and Windows 7: 512/512 - Windows 7 SP1: 512/512 or 512/4096 For this reason allow the sector size to be specified using the following block device option: sectorsize=logical[/physical] Reported by: Leon Dang (ldang@nahannisys.com) Reviewed by: grehan MFC after: 2 weeks Modified: head/usr.sbin/bhyve/bhyve.8 head/usr.sbin/bhyve/block_if.c Modified: head/usr.sbin/bhyve/bhyve.8 ============================================================================== --- head/usr.sbin/bhyve/bhyve.8 Tue May 12 00:27:52 2015 (r282787) +++ head/usr.sbin/bhyve/bhyve.8 Tue May 12 00:30:39 2015 (r282788) @@ -193,8 +193,13 @@ format. .Pp Block storage devices: .Bl -tag -width 10n -.It Pa /filename Ns Oo , Ns Li nocache Oc Ns Oo , Ns Li direct Oc Ns Oo , Ns Li ro Oc -.It Pa /dev/xxx Ns Oo , Ns Ar nocache Oc Ns Oo , Ns Ar direct Oc Ns Oo , Ns Ar ro Oc +.It Pa /filename Ns Oo , Ns Ar block-device-options Oc +.It Pa /dev/xxx Ns Oo , Ns Ar block-device-options Oc +.El +.Pp +The +.Ar block-device-options +are: .Bl -tag -width 8n .It Li nocache Open the file with @@ -204,14 +209,10 @@ Open the file using .Dv O_SYNC . .It Li ro Force the file to be opened read-only. -.El -.Pp -The -.Li nocache , -.Li direct , -and -.Li ro -options are not available for virtio block devices. +.It Li sectorsize= Ns Ar logical Ns Oo / Ns Ar physical Oc +Specify the logical and physical sector sizes of the emulated disk. +The physical sector size is optional and is equal to the logical sector size +if not explicitly specified. .El .Pp TTY devices: Modified: head/usr.sbin/bhyve/block_if.c ============================================================================== --- head/usr.sbin/bhyve/block_if.c Tue May 12 00:27:52 2015 (r282787) +++ head/usr.sbin/bhyve/block_if.c Tue May 12 00:30:39 2015 (r282788) @@ -392,16 +392,18 @@ blockif_open(const char *optstr, const c { char tname[MAXCOMLEN + 1]; char name[MAXPATHLEN]; - char *nopt, *xopts; + char *nopt, *xopts, *cp; struct blockif_ctxt *bc; struct stat sbuf; struct diocgattr_arg arg; off_t size, psectsz, psectoff; int extra, fd, i, sectsz; - int nocache, sync, ro, candelete, geom; + int nocache, sync, ro, candelete, geom, ssopt, pssopt; pthread_once(&blockif_once, blockif_init); + fd = -1; + ssopt = 0; nocache = 0; sync = 0; ro = 0; @@ -410,16 +412,25 @@ blockif_open(const char *optstr, const c * The first element in the optstring is always a pathname. * Optional elements follow */ - nopt = strdup(optstr); - for (xopts = strtok(nopt, ","); - xopts != NULL; - xopts = strtok(NULL, ",")) { - if (!strcmp(xopts, "nocache")) + nopt = xopts = strdup(optstr); + while (xopts != NULL) { + cp = strsep(&xopts, ","); + if (cp == nopt) /* file or device pathname */ + continue; + else if (!strcmp(cp, "nocache")) nocache = 1; - else if (!strcmp(xopts, "sync")) + else if (!strcmp(cp, "sync") || !strcmp(cp, "direct")) sync = 1; - else if (!strcmp(xopts, "ro")) + else if (!strcmp(cp, "ro")) ro = 1; + else if (sscanf(cp, "sectorsize=%d/%d", &ssopt, &pssopt) == 2) + ; + else if (sscanf(cp, "sectorsize=%d", &ssopt) == 1) + pssopt = ssopt; + else { + fprintf(stderr, "Invalid device option \"%s\"\n", cp); + goto err; + } } extra = 0; @@ -437,13 +448,12 @@ blockif_open(const char *optstr, const c if (fd < 0) { perror("Could not open backing file"); - return (NULL); + goto err; } if (fstat(fd, &sbuf) < 0) { perror("Could not stat backing file"); - close(fd); - return (NULL); + goto err; } /* @@ -457,8 +467,7 @@ blockif_open(const char *optstr, const c if (ioctl(fd, DIOCGMEDIASIZE, &size) < 0 || ioctl(fd, DIOCGSECTORSIZE, §sz)) { perror("Could not fetch dev blk/sector size"); - close(fd); - return (NULL); + goto err; } assert(size != 0); assert(sectsz != 0); @@ -473,10 +482,39 @@ blockif_open(const char *optstr, const c } else psectsz = sbuf.st_blksize; + if (ssopt != 0) { + if (!powerof2(ssopt) || !powerof2(pssopt) || ssopt < 512 || + ssopt > pssopt) { + fprintf(stderr, "Invalid sector size %d/%d\n", + ssopt, pssopt); + goto err; + } + + /* + * Some backend drivers (e.g. cd0, ada0) require that the I/O + * size be a multiple of the device's sector size. + * + * Validate that the emulated sector size complies with this + * requirement. + */ + if (S_ISCHR(sbuf.st_mode)) { + if (ssopt < sectsz || (ssopt % sectsz) != 0) { + fprintf(stderr, "Sector size %d incompatible " + "with underlying device sector size %d\n", + ssopt, sectsz); + goto err; + } + } + + sectsz = ssopt; + psectsz = pssopt; + psectoff = 0; + } + bc = calloc(1, sizeof(struct blockif_ctxt)); if (bc == NULL) { - close(fd); - return (NULL); + perror("calloc"); + goto err; } bc->bc_magic = BLOCKIF_SIG; @@ -506,6 +544,10 @@ blockif_open(const char *optstr, const c } return (bc); +err: + if (fd >= 0) + close(fd); + return (NULL); } static int From owner-svn-src-all@FreeBSD.ORG Tue May 12 00:30:57 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B3CB0C61; Tue, 12 May 2015 00:30:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A30E8138A; Tue, 12 May 2015 00:30:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4C0UvK6087126; Tue, 12 May 2015 00:30:57 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4C0Uvt5087125; Tue, 12 May 2015 00:30:57 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201505120030.t4C0Uvt5087125@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 12 May 2015 00:30:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282789 - head/release 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.20 Precedence: list List-Id: "SVN commit messages 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, 12 May 2015 00:30:57 -0000 Author: gjb Date: Tue May 12 00:30:56 2015 New Revision: 282789 URL: https://svnweb.freebsd.org/changeset/base/282789 Log: Temporarily 'rm -rf $FTPDIR' during additional testing. Sponsored by: The FreeBSD Foundation Modified: head/release/Makefile.mirrors Modified: head/release/Makefile.mirrors ============================================================================== --- head/release/Makefile.mirrors Tue May 12 00:30:39 2015 (r282788) +++ head/release/Makefile.mirrors Tue May 12 00:30:56 2015 (r282789) @@ -55,6 +55,9 @@ SNAP_SUFFIX!= echo ${_SNAP_SUFFIX:S,^-, ISO_DIR= ${TLD}/${TARGET}/${TARGET_ARCH}/ISO-IMAGES/${REVISION} FTP_DIR= ${TLD}/${TARGET}/${TARGET_ARCH}/${REVISION}-${BRANCH} +remove-old-bits: + rm -rf ${FTPDIR} + iso-images-stage: mkdir -p ${ISO_DIR} mkdir -p ${TLD}/ISO-IMAGES/${REVISION} @@ -130,5 +133,5 @@ vm-images-stage: # ${VM_DIR}/${BUILDDATE}/CHECKSUM.${CHECKSUM}-${SNAP_SUFFIX} #.endif -ftp-stage: ${STAGE_TARGETS} +ftp-stage: remove-old-bits ${STAGE_TARGETS} From owner-svn-src-all@FreeBSD.ORG Tue May 12 00:32:29 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CF877DC2; Tue, 12 May 2015 00:32:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BE77E1397; Tue, 12 May 2015 00:32:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4C0WTJj087401; Tue, 12 May 2015 00:32:29 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4C0WTC7087400; Tue, 12 May 2015 00:32:29 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201505120032.t4C0WTC7087400@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 12 May 2015 00:32:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282790 - head/release 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.20 Precedence: list List-Id: "SVN commit messages 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, 12 May 2015 00:32:29 -0000 Author: gjb Date: Tue May 12 00:32:28 2015 New Revision: 282790 URL: https://svnweb.freebsd.org/changeset/base/282790 Log: Fix a make(1) syntax error. Sponsored by: The FreeBSD Foundation Modified: head/release/Makefile.mirrors Modified: head/release/Makefile.mirrors ============================================================================== --- head/release/Makefile.mirrors Tue May 12 00:30:56 2015 (r282789) +++ head/release/Makefile.mirrors Tue May 12 00:32:28 2015 (r282790) @@ -69,6 +69,7 @@ iso-images-stage: . if exists(/R/${IMAGE}.xz) cp -p ${RELEASEDIR}/${IMAGE}.xz \ ${ISO_DIR}/${OSRELEASE}-${IMAGE}.xz +. endfor . endif .endif From owner-svn-src-all@FreeBSD.ORG Tue May 12 00:33:19 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5EFABF00; Tue, 12 May 2015 00:33:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4D981139C; Tue, 12 May 2015 00:33:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4C0XJYL087571; Tue, 12 May 2015 00:33:19 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4C0XJP0087570; Tue, 12 May 2015 00:33:19 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201505120033.t4C0XJP0087570@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 12 May 2015 00:33:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282791 - head/release 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.20 Precedence: list List-Id: "SVN commit messages 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, 12 May 2015 00:33:19 -0000 Author: gjb Date: Tue May 12 00:33:18 2015 New Revision: 282791 URL: https://svnweb.freebsd.org/changeset/base/282791 Log: Sigh. Fix more syntax errors introduced by the last commit. Sponsored by: The FreeBSD Foundation Modified: head/release/Makefile.mirrors Modified: head/release/Makefile.mirrors ============================================================================== --- head/release/Makefile.mirrors Tue May 12 00:32:28 2015 (r282790) +++ head/release/Makefile.mirrors Tue May 12 00:33:18 2015 (r282791) @@ -69,8 +69,8 @@ iso-images-stage: . if exists(/R/${IMAGE}.xz) cp -p ${RELEASEDIR}/${IMAGE}.xz \ ${ISO_DIR}/${OSRELEASE}-${IMAGE}.xz -. endfor -. endif +. endif +. endfor .endif .if defined(SNAPSHOT) && !empty(SNAPSHOT) From owner-svn-src-all@FreeBSD.ORG Tue May 12 00:36:14 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4888E1EA; Tue, 12 May 2015 00:36:14 +0000 (UTC) Received: from mail-ig0-x233.google.com (mail-ig0-x233.google.com [IPv6:2607:f8b0:4001:c05::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 22B0113B5; Tue, 12 May 2015 00:36:14 +0000 (UTC) Received: by igbpi8 with SMTP id pi8so87024311igb.1; Mon, 11 May 2015 17:36:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=VymmVJhWWPqbO+y9bvx4hh46Okva4bQk4qTd9cb9iaU=; b=pItAlvGIijA9gYUYqebxNNxLw/LzsxwY5vzhcBhtI5NvsF1AA1Y1Kubm3jQEwDJHBh OvbZOol3JebRvYe917wzVNtqSGJIFRmxEPCPoo2hoZ9TVpVpZAbsnMCRttYgZRCPXyK2 mhTy9uR3k7uC+Gd+4lvoatqgkTJxVEPKtp+4KS79fWraBRQv8gBW+syOanorM6GaFPat JytdvxLG4KsfLBos7iXSE4jmcuLp5Pa2fq08OjEaV6bad0jBLWXh0h3fsPvunMSn22NF jKEtmgqLAcoZON4+gaT+jtyn72VL+z4u1C0JU+F9doVVC/L/l/nyoiK8aU8j1VmMO9/1 CPIQ== MIME-Version: 1.0 X-Received: by 10.107.34.80 with SMTP id i77mr15774916ioi.33.1431390973355; Mon, 11 May 2015 17:36:13 -0700 (PDT) Received: by 10.64.74.70 with HTTP; Mon, 11 May 2015 17:36:13 -0700 (PDT) In-Reply-To: <5551480E.90906@FreeBSD.org> References: <201505102121.t4ALLr3A076661@svn.freebsd.org> <5551480E.90906@FreeBSD.org> Date: Mon, 11 May 2015 17:36:13 -0700 Message-ID: Subject: Re: svn commit: r282736 - in head: . lib/libmd From: Xin LI To: Bryan Drewery Cc: Thomas Quinot , "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.20 Precedence: list List-Id: "SVN commit messages 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, 12 May 2015 00:36:14 -0000 Note that r282775 depends on this so if these are reverted, r282775 should be reverted altogether. On Mon, May 11, 2015 at 5:23 PM, Bryan Drewery wrote: > The libmd changes break pkg - so all packages. > > http://beefy6.nyi.freebsd.org/data/head-amd64-default/p386108_s282785/logs/pkg-1.5.2.log > > >> CCLD pkg-static >> /usr/lib/liblzma.a(check.o): In function `lzma_check_init': >> /usr/local/poudriere/jails/head-amd64/usr/src/lib/liblzma/../../contrib/xz/src/liblzma/check/check.c:(.text+0x5e): undefined reference to `_libmd_SHA256_Init' >> /usr/lib/liblzma.a(check.o): In function `lzma_check_update': >> /usr/local/poudriere/jails/head-amd64/usr/src/lib/liblzma/../../contrib/xz/src/liblzma/check/check.c:(.text+0xbf): undefined reference to `_libmd_SHA256_Update' >> /usr/lib/liblzma.a(check.o): In function `lzma_check_finish': >> /usr/local/poudriere/jails/head-amd64/usr/src/lib/liblzma/../../contrib/xz/src/liblzma/check/check.c:(.text+0x10d): undefined reference to `_libmd_SHA256_Final' >> cc: error: linker command failed with exit code 1 (use -v to see invocation) >> *** [pkg-static] Error code 1 > > > Can you please just revert this and 282726 until they are working and > have a passing exp-run? > > On 5/10/2015 4:21 PM, Thomas Quinot wrote: >> Author: thomas >> Date: Sun May 10 21:21:52 2015 >> New Revision: 282736 >> URL: https://svnweb.freebsd.org/changeset/base/282736 >> >> Log: >> Unbreak build following rev. 282726 >> >> (Makefile.inc1): add dependency of xinstall on libmd to >> avoid failure of parallel bootstrap. >> >> (lib/libmd/*.h): do not redefine symbols if already >> defined as macros (libcrypt uses the same sources internally, >> redefining symbols with a prefix of its own). >> >> Fixes build failures caused by previous change to libmd. >> >> Reported by: ian >> Pointy hat to: thomas >> >> Modified: >> head/Makefile.inc1 >> head/lib/libmd/md4.h >> head/lib/libmd/md5.h >> head/lib/libmd/ripemd.h >> head/lib/libmd/sha.h >> head/lib/libmd/sha256.h >> head/lib/libmd/sha512.h >> >> Modified: head/Makefile.inc1 >> ============================================================================== >> --- head/Makefile.inc1 Sun May 10 21:05:32 2015 (r282735) >> +++ head/Makefile.inc1 Sun May 10 21:21:52 2015 (r282736) >> @@ -1361,6 +1361,9 @@ _kerberos5_bootstrap_tools= \ >> .ORDER: ${_kerberos5_bootstrap_tools:C/^/${_bt}-/g} >> .endif >> >> +# Rebuild up-to-date libmd for xinstall >> +${_bt}-usr.bin/xinstall: ${_bt}-lib/libmd >> + >> bootstrap-tools: .PHONY >> >> # Please document (add comment) why something is in 'bootstrap-tools'. >> >> Modified: head/lib/libmd/md4.h >> ============================================================================== >> --- head/lib/libmd/md4.h Sun May 10 21:05:32 2015 (r282735) >> +++ head/lib/libmd/md4.h Sun May 10 21:21:52 2015 (r282736) >> @@ -38,14 +38,30 @@ __BEGIN_DECLS >> >> /* Ensure libmd symbols do not clash with libcrypto */ >> >> +#ifndef MD4Init >> #define MD4Init _libmd_MD4Init >> +#endif >> +#ifndef MD4Update >> #define MD4Update _libmd_MD4Update >> +#endif >> +#ifndef MD4Pad >> #define MD4Pad _libmd_MD4Pad >> +#endif >> +#ifndef MD4Final >> #define MD4Final _libmd_MD4Final >> +#endif >> +#ifndef MD4End >> #define MD4End _libmd_MD4End >> +#endif >> +#ifndef MD4File >> #define MD4File _libmd_MD4File >> +#endif >> +#ifndef MD4FileChunk >> #define MD4FileChunk _libmd_MD4FileChunk >> +#endif >> +#ifndef MD4Data >> #define MD4Data _libmd_MD4Data >> +#endif >> >> void MD4Init(MD4_CTX *); >> void MD4Update(MD4_CTX *, const void *, unsigned int); >> >> Modified: head/lib/libmd/md5.h >> ============================================================================== >> --- head/lib/libmd/md5.h Sun May 10 21:05:32 2015 (r282735) >> +++ head/lib/libmd/md5.h Sun May 10 21:21:52 2015 (r282736) >> @@ -7,15 +7,33 @@ >> >> /* Ensure libmd symbols do not clash with libcrypto */ >> >> +#ifndef MD5Init >> #define MD5Init _libmd_MD5Init >> +#endif >> +#ifndef MD5Update >> #define MD5Update _libmd_MD5Update >> +#endif >> +#ifndef MD5Pad >> #define MD5Pad _libmd_MD5Pad >> +#endif >> +#ifndef MD5Final >> #define MD5Final _libmd_MD5Final >> +#endif >> +#ifndef MD5Transform >> #define MD5Transform _libmd_MD5Transform >> +#endif >> +#ifndef MD5End >> #define MD5End _libmd_MD5End >> +#endif >> +#ifndef MD5File >> #define MD5File _libmd_MD5File >> +#endif >> +#ifndef MD5FileChunk >> #define MD5FileChunk _libmd_MD5FileChunk >> +#endif >> +#ifndef MD5Data >> #define MD5Data _libmd_MD5Data >> +#endif >> >> #endif >> >> >> Modified: head/lib/libmd/ripemd.h >> ============================================================================== >> --- head/lib/libmd/ripemd.h Sun May 10 21:05:32 2015 (r282735) >> +++ head/lib/libmd/ripemd.h Sun May 10 21:21:52 2015 (r282736) >> @@ -84,17 +84,37 @@ __BEGIN_DECLS >> >> /* Ensure libmd symbols do not clash with libcrypto */ >> >> +#ifndef RIPEMD160_Init >> #define RIPEMD160_Init _libmd_RIPEMD160_Init >> +#endif >> +#ifndef RIPEMD160_Update >> #define RIPEMD160_Update _libmd_RIPEMD160_Update >> +#endif >> +#ifndef RIPEMD160_Final >> #define RIPEMD160_Final _libmd_RIPEMD160_Final >> +#endif >> +#ifndef RIPEMD160_End >> #define RIPEMD160_End _libmd_RIPEMD160_End >> +#endif >> +#ifndef RIPEMD160_File >> #define RIPEMD160_File _libmd_RIPEMD160_File >> +#endif >> +#ifndef RIPEMD160_FileChunk >> #define RIPEMD160_FileChunk _libmd_RIPEMD160_FileChunk >> +#endif >> +#ifndef RIPEMD160_Data >> #define RIPEMD160_Data _libmd_RIPEMD160_Data >> +#endif >> >> +#ifndef RIPEMD160_Transform >> #define RIPEMD160_Transform _libmd_RIPEMD160_Transform >> +#endif >> +#ifndef RMD160_version >> #define RMD160_version _libmd_RMD160_version >> +#endif >> +#ifndef ripemd160_block >> #define ripemd160_block _libmd_ripemd160_block >> +#endif >> >> void RIPEMD160_Init(RIPEMD160_CTX *c); >> void RIPEMD160_Update(RIPEMD160_CTX *c, const void *data, >> >> Modified: head/lib/libmd/sha.h >> ============================================================================== >> --- head/lib/libmd/sha.h Sun May 10 21:05:32 2015 (r282735) >> +++ head/lib/libmd/sha.h Sun May 10 21:21:52 2015 (r282736) >> @@ -82,29 +82,69 @@ __BEGIN_DECLS >> >> /* Ensure libmd symbols do not clash with libcrypto */ >> >> +#ifndef SHA_Init >> #define SHA_Init _libmd_SHA_Init >> +#endif >> +#ifndef SHA_Update >> #define SHA_Update _libmd_SHA_Update >> +#endif >> +#ifndef SHA_Final >> #define SHA_Final _libmd_SHA_Final >> +#endif >> +#ifndef SHA_End >> #define SHA_End _libmd_SHA_End >> +#endif >> +#ifndef SHA_File >> #define SHA_File _libmd_SHA_File >> +#endif >> +#ifndef SHA_FileChunk >> #define SHA_FileChunk _libmd_SHA_FileChunk >> +#endif >> +#ifndef SHA_Data >> #define SHA_Data _libmd_SHA_Data >> +#endif >> >> +#ifndef SHA_Transform >> #define SHA_Transform _libmd_SHA_Transform >> +#endif >> +#ifndef SHA_version >> #define SHA_version _libmd_SHA_version >> +#endif >> +#ifndef sha_block >> #define sha_block _libmd_sha_block >> +#endif >> >> +#ifndef SHA1_Init >> #define SHA1_Init _libmd_SHA1_Init >> +#endif >> +#ifndef SHA1_Update >> #define SHA1_Update _libmd_SHA1_Update >> +#endif >> +#ifndef SHA1_Final >> #define SHA1_Final _libmd_SHA1_Final >> +#endif >> +#ifndef SHA1_End >> #define SHA1_End _libmd_SHA1_End >> +#endif >> +#ifndef SHA1_File >> #define SHA1_File _libmd_SHA1_File >> +#endif >> +#ifndef SHA1_FileChunk >> #define SHA1_FileChunk _libmd_SHA1_FileChunk >> +#endif >> +#ifndef SHA1_Data >> #define SHA1_Data _libmd_SHA1_Data >> +#endif >> >> +#ifndef SHA1_Transform >> #define SHA1_Transform _libmd_SHA1_Transform >> +#endif >> +#ifndef SHA1_version >> #define SHA1_version _libmd_SHA1_version >> +#endif >> +#ifndef sha1_block >> #define sha1_block _libmd_sha1_block >> +#endif >> >> void SHA_Init(SHA_CTX *c); >> void SHA_Update(SHA_CTX *c, const void *data, size_t len); >> >> Modified: head/lib/libmd/sha256.h >> ============================================================================== >> --- head/lib/libmd/sha256.h Sun May 10 21:05:32 2015 (r282735) >> +++ head/lib/libmd/sha256.h Sun May 10 21:21:52 2015 (r282736) >> @@ -41,16 +41,34 @@ __BEGIN_DECLS >> >> /* Ensure libmd symbols do not clash with libcrypto */ >> >> +#ifndef SHA256_Init >> #define SHA256_Init _libmd_SHA256_Init >> +#endif >> +#ifndef SHA256_Update >> #define SHA256_Update _libmd_SHA256_Update >> +#endif >> +#ifndef SHA256_Final >> #define SHA256_Final _libmd_SHA256_Final >> +#endif >> +#ifndef SHA256_End >> #define SHA256_End _libmd_SHA256_End >> +#endif >> +#ifndef SHA256_File >> #define SHA256_File _libmd_SHA256_File >> +#endif >> +#ifndef SHA256_FileChunk >> #define SHA256_FileChunk _libmd_SHA256_FileChunk >> +#endif >> +#ifndef SHA256_Data >> #define SHA256_Data _libmd_SHA256_Data >> +#endif >> >> +#ifndef SHA256_Transform >> #define SHA256_Transform _libmd_SHA256_Transform >> +#endif >> +#ifndef SHA256_version >> #define SHA256_version _libmd_SHA256_version >> +#endif >> >> void SHA256_Init(SHA256_CTX *); >> void SHA256_Update(SHA256_CTX *, const void *, size_t); >> >> Modified: head/lib/libmd/sha512.h >> ============================================================================== >> --- head/lib/libmd/sha512.h Sun May 10 21:05:32 2015 (r282735) >> +++ head/lib/libmd/sha512.h Sun May 10 21:21:52 2015 (r282736) >> @@ -41,16 +41,34 @@ __BEGIN_DECLS >> >> /* Ensure libmd symbols do not clash with libcrypto */ >> >> +#ifndef SHA512_Init >> #define SHA512_Init _libmd_SHA512_Init >> +#endif >> +#ifndef SHA512_Update >> #define SHA512_Update _libmd_SHA512_Update >> +#endif >> +#ifndef SHA512_Final >> #define SHA512_Final _libmd_SHA512_Final >> +#endif >> +#ifndef SHA512_End >> #define SHA512_End _libmd_SHA512_End >> +#endif >> +#ifndef SHA512_File >> #define SHA512_File _libmd_SHA512_File >> +#endif >> +#ifndef SHA512_FileChunk >> #define SHA512_FileChunk _libmd_SHA512_FileChunk >> +#endif >> +#ifndef SHA512_Data >> #define SHA512_Data _libmd_SHA512_Data >> +#endif >> >> +#ifndef SHA512_Transform >> #define SHA512_Transform _libmd_SHA512_Transform >> +#endif >> +#ifndef SHA512_version >> #define SHA512_version _libmd_SHA512_version >> +#endif >> >> void SHA512_Init(SHA512_CTX *); >> void SHA512_Update(SHA512_CTX *, const void *, size_t); >> > > > -- > Regards, > Bryan Drewery > -- Xin LI https://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die From owner-svn-src-all@FreeBSD.ORG Tue May 12 00:39:02 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 419A2347; Tue, 12 May 2015 00:39:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 309B613CA; Tue, 12 May 2015 00:39:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4C0d25X088454; Tue, 12 May 2015 00:39:02 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4C0d2gJ088453; Tue, 12 May 2015 00:39:02 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201505120039.t4C0d2gJ088453@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 12 May 2015 00:39:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282792 - head/release 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.20 Precedence: list List-Id: "SVN commit messages 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, 12 May 2015 00:39:02 -0000 Author: gjb Date: Tue May 12 00:39:01 2015 New Revision: 282792 URL: https://svnweb.freebsd.org/changeset/base/282792 Log: Fix a few incorrect variables and/or hard-coded paths. Sponsored by: The FreeBSD Foundation Modified: head/release/Makefile.mirrors Modified: head/release/Makefile.mirrors ============================================================================== --- head/release/Makefile.mirrors Tue May 12 00:33:18 2015 (r282791) +++ head/release/Makefile.mirrors Tue May 12 00:39:01 2015 (r282792) @@ -66,8 +66,8 @@ iso-images-stage: . for IMAGE in ${IMAGES} cp -p ${RELEASEDIR}/${OSRELEASE}-${IMAGE} \ ${ISO_DIR}/${OSRELEASE}-${IMAGE} -. if exists(/R/${IMAGE}.xz) - cp -p ${RELEASEDIR}/${IMAGE}.xz \ +. if exists(${RELEASEDIR}/${OSRELEASE}-${IMAGE}.xz) + cp -p ${RELEASEDIR}/${OSRELEASE}-${IMAGE}.xz \ ${ISO_DIR}/${OSRELEASE}-${IMAGE}.xz . endif . endfor From owner-svn-src-all@FreeBSD.ORG Tue May 12 00:46:33 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 10692578; Tue, 12 May 2015 00:46:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F3B9214FF; Tue, 12 May 2015 00:46:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4C0kWfs093010; Tue, 12 May 2015 00:46:32 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4C0kWe0093009; Tue, 12 May 2015 00:46:32 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201505120046.t4C0kWe0093009@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 12 May 2015 00:46:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282793 - head/release 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.20 Precedence: list List-Id: "SVN commit messages 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, 12 May 2015 00:46:33 -0000 Author: gjb Date: Tue May 12 00:46:32 2015 New Revision: 282793 URL: https://svnweb.freebsd.org/changeset/base/282793 Log: Also copy CHECKSUM.{SHA256,MD5} files. Sponsored by: The FreeBSD Foundation Modified: head/release/Makefile.mirrors Modified: head/release/Makefile.mirrors ============================================================================== --- head/release/Makefile.mirrors Tue May 12 00:39:01 2015 (r282792) +++ head/release/Makefile.mirrors Tue May 12 00:46:32 2015 (r282793) @@ -70,6 +70,10 @@ iso-images-stage: cp -p ${RELEASEDIR}/${OSRELEASE}-${IMAGE}.xz \ ${ISO_DIR}/${OSRELEASE}-${IMAGE}.xz . endif +. if exists(${RELEASEDIR}/CHECKSUM.${CHECKSUM}) + cp -p ${RELEASEDIR}/CHECKSUM.${CHECKSUM} \ + ${ISO_DIR}/CHECKSUM.${CHECKSUM} +. endif . endfor .endif From owner-svn-src-all@FreeBSD.ORG Tue May 12 00:53:21 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A05BB6ED; Tue, 12 May 2015 00:53:21 +0000 (UTC) Received: from anubis.delphij.net (anubis.delphij.net [64.62.153.212]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "anubis.delphij.net", Issuer "StartCom Class 1 Primary Intermediate Server CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 7EA1E15E5; Tue, 12 May 2015 00:53:21 +0000 (UTC) Received: from zeta.ixsystems.com (unknown [12.229.62.2]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by anubis.delphij.net (Postfix) with ESMTPSA id BFCA82418; Mon, 11 May 2015 17:53:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=delphij.net; s=anubis; t=1431391994; x=1431406394; bh=5WlRx5LpgPgpA6kmi8fQfBx0ej/G2rmNRCC3leowzRo=; h=Date:From:Reply-To:To:Subject:References:In-Reply-To; b=IOSMR2mWWsXmk2JGHYlBJ2w6hF+eqXAj1WtPjajQbdahQJgaCmmcLZXycP8bZF884 ibGuoRP2vaOvjOT/UqLMoc7amPCe2MbYKHGBZo3wUgMN63fHNxApgA+dzoGBwKhoMO eRmEXK21dagL9HojvI8MzFerVzMdZdXxssLReoIU= Message-ID: <55514EFA.4040608@delphij.net> Date: Mon, 11 May 2015 17:53:14 -0700 From: Xin Li Reply-To: d@delphij.net Organization: The FreeBSD Project MIME-Version: 1.0 To: Bryan Drewery , Thomas Quinot , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r282736 - in head: . lib/libmd References: <201505102121.t4ALLr3A076661@svn.freebsd.org> <5551480E.90906@FreeBSD.org> In-Reply-To: <5551480E.90906@FreeBSD.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 12 May 2015 00:53:21 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 05/11/15 17:23, Bryan Drewery wrote: > The libmd changes break pkg - so all packages. > > http://beefy6.nyi.freebsd.org/data/head-amd64-default/p386108_s282785/ logs/pkg-1.5.2.log > > > >> CCLD pkg-static /usr/lib/liblzma.a(check.o): In function >> `lzma_check_init': >> /usr/local/poudriere/jails/head-amd64/usr/src/lib/liblzma/../../contr ib/xz/src/liblzma/check/check.c:(.text+0x5e): >> undefined reference to `_libmd_SHA256_Init' >> /usr/lib/liblzma.a(check.o): In function `lzma_check_update': >> /usr/local/poudriere/jails/head-amd64/usr/src/lib/liblzma/../../contr ib/xz/src/liblzma/check/check.c:(.text+0xbf): >> undefined reference to `_libmd_SHA256_Update' >> /usr/lib/liblzma.a(check.o): In function `lzma_check_finish': >> /usr/local/poudriere/jails/head-amd64/usr/src/lib/liblzma/../../contr ib/xz/src/liblzma/check/check.c:(.text+0x10d): >> undefined reference to `_libmd_SHA256_Final' cc: error: linker >> command failed with exit code 1 (use -v to see invocation) *** >> [pkg-static] Error code 1 > > > Can you please just revert this and 282726 until they are working > and have a passing exp-run? Looks like this is because my change (r282775) which makes libmd a dependency of liblzma, while pkg didn't catch up with, and it's unrelated to libmd change. A quick hack would be: - --- src/Makefile.in.orig 2015-05-11 17:49:52.690333554 -0700 +++ src/Makefile.in 2015-05-11 17:50:03.427853585 -0700 @@ -617,7 +617,7 @@ $(top_builddir)/compat/libbsd_compat.la \ $(top_builddir)/external/libsbuf_static.la $(pkg_OBJECTS) \ @LIBJAIL_LIB@ @LDNS_LIBS@ @OS_LIBS@ -larchive -lz -lutil -lbz2 \ - - -llzma -lssl -lcrypto -lm $(am__append_1) $(am__append_2) \ + -lmd -llzma -lssl -lcrypto -lm $(am__append_1) $(am__append_2) \ $(am__append_3) DYNPROG = pkg @BUILD_STATIC_TRUE@pkg_static_LDFLAGS = -all-static But it would break earlier FreeBSD. Should I revert my change and request for a exp-run? Cheers, - -- Xin LI https://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.1.2 (FreeBSD) iQIcBAEBCgAGBQJVUU76AAoJEJW2GBstM+nsg2cP/i/t3SB59mnwdoqQi72KQNA0 z+N4FGufh0ULnsOTtkW5M+iUhTLqPk64NHYlQd7MlqQEle5UZgmKj8db35j/UJjL r1b+ERwOIgg8415umMPUVnexwwwOngxGIcaa7moE1HTKz2SCuC1NAypuXmhqyQ9p It49A9MKhkNKt9sVbV2vfm8R6UA2T9suwjOxvyEpf0fihdp2XcbNZ3raL6yPTNoN O/nxeWL4O2UQju17nKKMsTLBqWeJCGrY1htwyvpR8kDi53UDAeyZUF3MOnj9jIa7 L4RJg38hjZlctV5UzOlz1ThbOCI4hsz9jaIEsN/OCAWsh+RLHTIA21w09KT8mnkn Ch8ARY0na9sWOLxbYgF2uqK/Y4Cv64P0W33Smd9WtqlX84FY+sm/FjEbAglmCD0d KhTBNYEL/I+Rn3fe9VfUHWAiW5QTT6CHGKdDcKpI63hFjrp2MoNmB18vRop/IQ/9 RihTuVaF25XOnbbW/K8L9yajZos0Mkrvz75nnmr5dG3uJljbPN0o3nzNAXqKa20c q8ld2cGrCs4WjJtJfLmdtTSN1kbeY74pTseq+DlIixlaDOcec7phY/qDRXrjCvy1 K5Upi2fUhYScuGzmz3MEP+SmtOn+2juPO+hWIXd3iP9Vtin3VYw8pUWttQsqWYvh XP2zfiUjGOMNs4kx1BMD =rz9u -----END PGP SIGNATURE----- From owner-svn-src-all@FreeBSD.ORG Tue May 12 00:55:29 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 31285845; Tue, 12 May 2015 00:55:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1F5F915F2; Tue, 12 May 2015 00:55:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4C0tSMP097710; Tue, 12 May 2015 00:55:28 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4C0tS79097709; Tue, 12 May 2015 00:55:28 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201505120055.t4C0tS79097709@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 12 May 2015 00:55:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282794 - head/release 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.20 Precedence: list List-Id: "SVN commit messages 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, 12 May 2015 00:55:29 -0000 Author: gjb Date: Tue May 12 00:55:28 2015 New Revision: 282794 URL: https://svnweb.freebsd.org/changeset/base/282794 Log: Also symlink the CHECKSUM.{SHA256,MD5} files. Sponsored by: The FreeBSD Foundation Modified: head/release/Makefile.mirrors Modified: head/release/Makefile.mirrors ============================================================================== --- head/release/Makefile.mirrors Tue May 12 00:46:32 2015 (r282793) +++ head/release/Makefile.mirrors Tue May 12 00:55:28 2015 (r282794) @@ -91,6 +91,9 @@ iso-images-stage: . endif cd ${ISO_DIR} && ${CHECKSUM:tl} ${OSRELEASE}* > \ CHECKSUM.${CHECKSUM}-${REVISION}-${BRANCH}-${SNAP_SUFFIX} + cd ${ISO_DIR} && \ + ln -s \ + ../../${TARGET}/${TARGET_ARCH}/${CHECKSUM}-${REVISION}-${BRANCH}-${SNAP_SUFFIX} . endfor .else # !snapshot cd ${TLD}/ISO-IMAGES/${REVISION} && ln -s \ From owner-svn-src-all@FreeBSD.ORG Tue May 12 00:58:17 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D3D6F9F6; Tue, 12 May 2015 00:58:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C2FFD1603; Tue, 12 May 2015 00:58:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4C0wHfA098075; Tue, 12 May 2015 00:58:17 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4C0wH97098074; Tue, 12 May 2015 00:58:17 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201505120058.t4C0wH97098074@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 12 May 2015 00:58:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282795 - head/release 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.20 Precedence: list List-Id: "SVN commit messages 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, 12 May 2015 00:58:17 -0000 Author: gjb Date: Tue May 12 00:58:17 2015 New Revision: 282795 URL: https://svnweb.freebsd.org/changeset/base/282795 Log: Provide the correct path to the checksum file. Sponsored by: The FreeBSD Foundation Modified: head/release/Makefile.mirrors Modified: head/release/Makefile.mirrors ============================================================================== --- head/release/Makefile.mirrors Tue May 12 00:55:28 2015 (r282794) +++ head/release/Makefile.mirrors Tue May 12 00:58:17 2015 (r282795) @@ -93,7 +93,7 @@ iso-images-stage: CHECKSUM.${CHECKSUM}-${REVISION}-${BRANCH}-${SNAP_SUFFIX} cd ${ISO_DIR} && \ ln -s \ - ../../${TARGET}/${TARGET_ARCH}/${CHECKSUM}-${REVISION}-${BRANCH}-${SNAP_SUFFIX} + ../../${TARGET}/${TARGET_ARCH}/CHECKSUM.${CHECKSUM}-${REVISION}-${BRANCH}-${SNAP_SUFFIX} . endfor .else # !snapshot cd ${TLD}/ISO-IMAGES/${REVISION} && ln -s \ From owner-svn-src-all@FreeBSD.ORG Tue May 12 01:04:03 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6D4B3B75; Tue, 12 May 2015 01:04:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5CBB916BF; Tue, 12 May 2015 01:04:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4C143pn002624; Tue, 12 May 2015 01:04:03 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4C143SY002623; Tue, 12 May 2015 01:04:03 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201505120104.t4C143SY002623@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 12 May 2015 01:04:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282796 - head/release 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.20 Precedence: list List-Id: "SVN commit messages 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, 12 May 2015 01:04:03 -0000 Author: gjb Date: Tue May 12 01:04:02 2015 New Revision: 282796 URL: https://svnweb.freebsd.org/changeset/base/282796 Log: Fix more path variables. Sponsored by: The FreeBSD Foundation Modified: head/release/Makefile.mirrors Modified: head/release/Makefile.mirrors ============================================================================== --- head/release/Makefile.mirrors Tue May 12 00:58:17 2015 (r282795) +++ head/release/Makefile.mirrors Tue May 12 01:04:02 2015 (r282796) @@ -91,7 +91,7 @@ iso-images-stage: . endif cd ${ISO_DIR} && ${CHECKSUM:tl} ${OSRELEASE}* > \ CHECKSUM.${CHECKSUM}-${REVISION}-${BRANCH}-${SNAP_SUFFIX} - cd ${ISO_DIR} && \ + cd ${TLD}/ISO-IMAGES/${REVISION} && \ ln -s \ ../../${TARGET}/${TARGET_ARCH}/CHECKSUM.${CHECKSUM}-${REVISION}-${BRANCH}-${SNAP_SUFFIX} . endfor From owner-svn-src-all@FreeBSD.ORG Tue May 12 01:14:22 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A9B21E30; Tue, 12 May 2015 01:14:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 97F3617AD; Tue, 12 May 2015 01:14:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4C1EMi4007455; Tue, 12 May 2015 01:14:22 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4C1EMNw007454; Tue, 12 May 2015 01:14:22 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201505120114.t4C1EMNw007454@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 12 May 2015 01:14:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282797 - head/release 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.20 Precedence: list List-Id: "SVN commit messages 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, 12 May 2015 01:14:22 -0000 Author: gjb Date: Tue May 12 01:14:21 2015 New Revision: 282797 URL: https://svnweb.freebsd.org/changeset/base/282797 Log: Fix more paths to the actual files. Sponsored by: The FreeBSD Foundation Modified: head/release/Makefile.mirrors Modified: head/release/Makefile.mirrors ============================================================================== --- head/release/Makefile.mirrors Tue May 12 01:04:02 2015 (r282796) +++ head/release/Makefile.mirrors Tue May 12 01:14:21 2015 (r282797) @@ -83,7 +83,7 @@ iso-images-stage: ${OSRELEASE}-${SNAP_SUFFIX}-${IMAGE} cd ${TLD}/ISO-IMAGES/${REVISION} && \ ln -s \ - ../../${TARGET}/${TARGET_ARCH}/${OSRELEASE}-${SNAP_SUFFIX}-${IMAGE} + ../../${TARGET}/${TARGET_ARCH}/ISO-IMAGES/${REVISION}/${OSRELEASE}-${SNAP_SUFFIX}-${IMAGE} . endfor . for CHECKSUM in ${CHECKSUM_FILES} . if exists(${ISO_DIR}/CHECKSUM.${CHECKSUM}) @@ -93,11 +93,11 @@ iso-images-stage: CHECKSUM.${CHECKSUM}-${REVISION}-${BRANCH}-${SNAP_SUFFIX} cd ${TLD}/ISO-IMAGES/${REVISION} && \ ln -s \ - ../../${TARGET}/${TARGET_ARCH}/CHECKSUM.${CHECKSUM}-${REVISION}-${BRANCH}-${SNAP_SUFFIX} + ../../${TARGET}/${TARGET_ARCH}/ISO-IMAGES/${REVISION}/CHECKSUM.${CHECKSUM}-${REVISION}-${BRANCH}-${SNAP_SUFFIX} . endfor .else # !snapshot cd ${TLD}/ISO-IMAGES/${REVISION} && ln -s \ - ../../${TARGET}/${TARGET_ARCH}/${OSRELEASE}-${IMAGE} . + ../../${TARGET}/${TARGET_ARCH}/ISO-IMAGES/${REVISION}/${OSRELEASE}-${IMAGE} . cd ${ISO_DIR} && ${CHECKSUM:tl} ${OSRELEASE}* > \ CHECKSUM.${CHECKSUM}-${REVISION}-${BRANCH}-${SNAP_SUFFIX} .endif From owner-svn-src-all@FreeBSD.ORG Tue May 12 01:20:28 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ABC25F94; Tue, 12 May 2015 01:20:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9ACC917CB; Tue, 12 May 2015 01:20:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4C1KSgX010178; Tue, 12 May 2015 01:20:28 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4C1KScc010177; Tue, 12 May 2015 01:20:28 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201505120120.t4C1KScc010177@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 12 May 2015 01:20:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282798 - head/release 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.20 Precedence: list List-Id: "SVN commit messages 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, 12 May 2015 01:20:28 -0000 Author: gjb Date: Tue May 12 01:20:27 2015 New Revision: 282798 URL: https://svnweb.freebsd.org/changeset/base/282798 Log: After the last influx of commits, and a REALLY BIG WARNING to the top of the file. Sponsored by: The FreeBSD Foundation Modified: head/release/Makefile.mirrors Modified: head/release/Makefile.mirrors ============================================================================== --- head/release/Makefile.mirrors Tue May 12 01:14:21 2015 (r282797) +++ head/release/Makefile.mirrors Tue May 12 01:20:27 2015 (r282798) @@ -5,6 +5,10 @@ # You probably do not want to use this. Really. # You have been warned. # +# Seriously. +# +# Don't use this unless you know why you're using it. +# # $FreeBSD$ # From owner-svn-src-all@FreeBSD.ORG Tue May 12 01:21:50 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2EE9B247 for ; Tue, 12 May 2015 01:21:50 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1319B188D for ; Tue, 12 May 2015 01:21:50 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.9/8.14.9) with ESMTP id t4C1LnS4017758 for ; Tue, 12 May 2015 01:21:49 GMT (envelope-from bdrewery@freefall.freebsd.org) Received: (from bdrewery@localhost) by freefall.freebsd.org (8.14.9/8.14.9/Submit) id t4C1LnYm017757 for svn-src-all@freebsd.org; Tue, 12 May 2015 01:21:49 GMT (envelope-from bdrewery) Received: (qmail 4855 invoked from network); 11 May 2015 20:21:45 -0500 Received: from unknown (HELO ?10.10.1.139?) (freebsd@shatow.net@10.10.1.139) by sweb.xzibition.com with ESMTPA; 11 May 2015 20:21:45 -0500 Message-ID: <555155BE.30604@FreeBSD.org> Date: Mon, 11 May 2015 20:22:06 -0500 From: Bryan Drewery Organization: FreeBSD User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: d@delphij.net, Thomas Quinot , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r282736 - in head: . lib/libmd References: <201505102121.t4ALLr3A076661@svn.freebsd.org> <5551480E.90906@FreeBSD.org> <55514EFA.4040608@delphij.net> In-Reply-To: <55514EFA.4040608@delphij.net> OpenPGP: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="5gCrqb4kXNxSgIgNFXDfKv7Ne6135h6FP" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 12 May 2015 01:21:50 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --5gCrqb4kXNxSgIgNFXDfKv7Ne6135h6FP Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 5/11/2015 7:53 PM, Xin Li wrote: > On 05/11/15 17:23, Bryan Drewery wrote: >> The libmd changes break pkg - so all packages. >=20 >> http://beefy6.nyi.freebsd.org/data/head-amd64-default/p386108_s282785/= > logs/pkg-1.5.2.log >=20 >=20 >=20 >>> CCLD pkg-static /usr/lib/liblzma.a(check.o): In function >>> `lzma_check_init':=20 >>> /usr/local/poudriere/jails/head-amd64/usr/src/lib/liblzma/../../contr= > ib/xz/src/liblzma/check/check.c:(.text+0x5e): >>> undefined reference to `_libmd_SHA256_Init'=20 >>> /usr/lib/liblzma.a(check.o): In function `lzma_check_update':=20 >>> /usr/local/poudriere/jails/head-amd64/usr/src/lib/liblzma/../../contr= > ib/xz/src/liblzma/check/check.c:(.text+0xbf): >>> undefined reference to `_libmd_SHA256_Update'=20 >>> /usr/lib/liblzma.a(check.o): In function `lzma_check_finish':=20 >>> /usr/local/poudriere/jails/head-amd64/usr/src/lib/liblzma/../../contr= > ib/xz/src/liblzma/check/check.c:(.text+0x10d): >>> undefined reference to `_libmd_SHA256_Final' cc: error: linker >>> command failed with exit code 1 (use -v to see invocation) *** >>> [pkg-static] Error code 1 >=20 >=20 >> Can you please just revert this and 282726 until they are working >> and have a passing exp-run? >=20 > Looks like this is because my change (r282775) which makes libmd a > dependency of liblzma, while pkg didn't catch up with, and it's > unrelated to libmd change. >=20 > A quick hack would be: >=20 > --- src/Makefile.in.orig 2015-05-11 17:49:52.690333554 -0700 > +++ src/Makefile.in 2015-05-11 17:50:03.427853585 -0700 > @@ -617,7 +617,7 @@ > $(top_builddir)/compat/libbsd_compat.la \ > $(top_builddir)/external/libsbuf_static.la $(pkg_OBJECTS) \ > @LIBJAIL_LIB@ @LDNS_LIBS@ @OS_LIBS@ -larchive -lz -lutil -lbz2 \ > - -llzma -lssl -lcrypto -lm $(am__append_1) $(am__append_2) \ > + -lmd -llzma -lssl -lcrypto -lm $(am__append_1) $(am__append_2) \ > $(am__append_3) > DYNPROG =3D pkg > @BUILD_STATIC_TRUE@pkg_static_LDFLAGS =3D -all-static >=20 > But it would break earlier FreeBSD. Should I revert my change and > request for a exp-run? Please. --=20 Regards, Bryan Drewery --5gCrqb4kXNxSgIgNFXDfKv7Ne6135h6FP Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJVUVW/AAoJEDXXcbtuRpfPXAoIAInPx3TkJ4QxwE23GJx/bitp YTPOQQI1O3mhYOojDz7WC2gAqIZ1qV7Nk+uwtJMvNTvm02HRdRHMLhWZmDxmcQTd jabzBTmHReGoAYLinpUOwc6yJdMBDJi+wB0IZFHVZ/alR/taEs1Sy/7RiBdMNFRU YgPqxUZd4dV/soyddUGwVesXb8vwzc1/YXFK2YdMvWu6hodhocUUvGxq5IFOay85 gxvXGIxhGI04Sa0hzVntchynQaoFoDjAO7agwvltxZ+YV1UzWeUpQ4oPSpSfvZHD qA/sUIX5uc2w/kDIFPSgU/C7/bEDQM0Tba3gWP5zZS0x16tpomGEx+KdnLwKy9I= =mFvQ -----END PGP SIGNATURE----- --5gCrqb4kXNxSgIgNFXDfKv7Ne6135h6FP-- From owner-svn-src-all@FreeBSD.ORG Tue May 12 01:27:59 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6FC0E2E7; Tue, 12 May 2015 01:27:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5EE7F18B7; Tue, 12 May 2015 01:27:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4C1RxYk012762; Tue, 12 May 2015 01:27:59 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4C1RxKD012761; Tue, 12 May 2015 01:27:59 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201505120127.t4C1RxKD012761@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 12 May 2015 01:27:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282799 - head/release 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.20 Precedence: list List-Id: "SVN commit messages 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, 12 May 2015 01:27:59 -0000 Author: gjb Date: Tue May 12 01:27:58 2015 New Revision: 282799 URL: https://svnweb.freebsd.org/changeset/base/282799 Log: Avoid polluting the filesystem when not necessary. Sponsored by: The FreeBSD Foundation Modified: head/release/Makefile.mirrors Modified: head/release/Makefile.mirrors ============================================================================== --- head/release/Makefile.mirrors Tue May 12 01:20:27 2015 (r282798) +++ head/release/Makefile.mirrors Tue May 12 01:27:58 2015 (r282799) @@ -14,8 +14,8 @@ .include "${.CURDIR}/Makefile" -FTPDIR?= /ftp RELEASEDIR?= /R +FTPDIR?= ${RELEASEDIR}/ftp-stage STAGE_TARGETS?= iso-images-stage # snapshot From owner-svn-src-all@FreeBSD.ORG Tue May 12 02:28:15 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EE77C8F2; Tue, 12 May 2015 02:28:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C34241E9C; Tue, 12 May 2015 02:28:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4C2SFRf041465; Tue, 12 May 2015 02:28:15 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4C2SFjd041464; Tue, 12 May 2015 02:28:15 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201505120228.t4C2SFjd041464@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Tue, 12 May 2015 02:28:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r282800 - vendor/ficl 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.20 Precedence: list List-Id: "SVN commit messages 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, 12 May 2015 02:28:16 -0000 Author: pfg Date: Tue May 12 02:28:15 2015 New Revision: 282800 URL: https://svnweb.freebsd.org/changeset/base/282800 Log: Revert r282768, r282769: Reset ficl - it will be reimported cleanly from 3.0.3. Deleted: vendor/ficl/ Modified: Directory Properties: vendor/ (props changed) From owner-svn-src-all@FreeBSD.ORG Tue May 12 02:36:35 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 042E1AC4; Tue, 12 May 2015 02:36:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E404A1F79; Tue, 12 May 2015 02:36:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4C2aYNv046138; Tue, 12 May 2015 02:36:34 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4C2aYul046134; Tue, 12 May 2015 02:36:34 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201505120236.t4C2aYul046134@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Tue, 12 May 2015 02:36:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r282801 - in vendor/ficl: . dist dist/doc dist/softwords dist/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.20 Precedence: list List-Id: "SVN commit messages 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, 12 May 2015 02:36:35 -0000 Author: pfg Date: Tue May 12 02:36:33 2015 New Revision: 282801 URL: https://svnweb.freebsd.org/changeset/base/282801 Log: Bring ficl to the vendor area. We currently use ficl3 in ~sys/boot/ficl but it has a bunch of local changes. WWW: http://ficl.sourceforge.net/ Discussed with: dteske, mr Added: vendor/ficl/ vendor/ficl/dist/ vendor/ficl/dist/Makefile.linux (contents, props changed) vendor/ficl/dist/ReadMe.txt (contents, props changed) vendor/ficl/dist/dict.c (contents, props changed) vendor/ficl/dist/doc/ vendor/ficl/dist/doc/Logo.jpg (contents, props changed) vendor/ficl/dist/doc/favicon.ico (contents, props changed) vendor/ficl/dist/doc/ficl.html (contents, props changed) vendor/ficl/dist/doc/ficl1.ico (contents, props changed) vendor/ficl/dist/doc/ficl_debug.html (contents, props changed) vendor/ficl/dist/doc/ficl_guts.htm vendor/ficl/dist/doc/ficl_loc.html (contents, props changed) vendor/ficl/dist/doc/ficl_logo.jpg (contents, props changed) vendor/ficl/dist/doc/ficl_oop.html (contents, props changed) vendor/ficl/dist/doc/ficl_oop.jpg (contents, props changed) vendor/ficl/dist/doc/ficl_parse.html (contents, props changed) vendor/ficl/dist/doc/ficl_rel.html (contents, props changed) vendor/ficl/dist/doc/ficl_top.jpg (contents, props changed) vendor/ficl/dist/doc/ficlddj.PDF (contents, props changed) vendor/ficl/dist/doc/ficlheader.js vendor/ficl/dist/doc/index.html (contents, props changed) vendor/ficl/dist/doc/jwsforml.PDF (contents, props changed) vendor/ficl/dist/doc/oo_in_c.html (contents, props changed) vendor/ficl/dist/doc/primer.txt (contents, props changed) vendor/ficl/dist/doc/sigplan9906.doc (contents, props changed) vendor/ficl/dist/doc/skey.gif (contents, props changed) vendor/ficl/dist/ficl.c (contents, props changed) vendor/ficl/dist/ficl.dsp vendor/ficl/dist/ficl.dsw vendor/ficl/dist/ficl.h (contents, props changed) vendor/ficl/dist/fileaccess.c (contents, props changed) vendor/ficl/dist/float.c (contents, props changed) vendor/ficl/dist/math64.c (contents, props changed) vendor/ficl/dist/math64.h (contents, props changed) vendor/ficl/dist/prefix.c (contents, props changed) vendor/ficl/dist/search.c (contents, props changed) vendor/ficl/dist/softcore.c (contents, props changed) vendor/ficl/dist/softwords/ vendor/ficl/dist/softwords/classes.fr vendor/ficl/dist/softwords/ficlclass.fr vendor/ficl/dist/softwords/ficllocal.fr vendor/ficl/dist/softwords/fileaccess.fr vendor/ficl/dist/softwords/forml.fr vendor/ficl/dist/softwords/ifbrack.fr vendor/ficl/dist/softwords/jhlocal.fr vendor/ficl/dist/softwords/makefile (contents, props changed) vendor/ficl/dist/softwords/marker.fr vendor/ficl/dist/softwords/oo.fr vendor/ficl/dist/softwords/oo.fr.bak vendor/ficl/dist/softwords/prefix.fr vendor/ficl/dist/softwords/softcore.bat vendor/ficl/dist/softwords/softcore.fr vendor/ficl/dist/softwords/softcore.pl (contents, props changed) vendor/ficl/dist/softwords/softcore.py (contents, props changed) vendor/ficl/dist/softwords/softcore.py.bat vendor/ficl/dist/softwords/string.fr vendor/ficl/dist/softwords/win32.fr vendor/ficl/dist/stack.c (contents, props changed) vendor/ficl/dist/sysdep.c (contents, props changed) vendor/ficl/dist/sysdep.h (contents, props changed) vendor/ficl/dist/test/ vendor/ficl/dist/test/asm68k.4th vendor/ficl/dist/test/core.fr vendor/ficl/dist/test/fib.fr vendor/ficl/dist/test/ficltest.fr vendor/ficl/dist/test/ooptest.fr vendor/ficl/dist/test/prefix.fr vendor/ficl/dist/test/sarray.fr vendor/ficl/dist/test/testcase.fr vendor/ficl/dist/test/tester.fr vendor/ficl/dist/test/vocab.fr vendor/ficl/dist/testmain.c (contents, props changed) vendor/ficl/dist/tools.c (contents, props changed) vendor/ficl/dist/unix.c (contents, props changed) vendor/ficl/dist/vm.c (contents, props changed) vendor/ficl/dist/win32.c (contents, props changed) vendor/ficl/dist/words.c (contents, props changed) Added: vendor/ficl/dist/Makefile.linux ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/ficl/dist/Makefile.linux Tue May 12 02:36:33 2015 (r282801) @@ -0,0 +1,52 @@ +OBJECTS= dict.o ficl.o fileaccess.o float.o math64.o prefix.o search.o softcore.o stack.o sysdep.o tools.o unix.o vm.o words.o +HEADERS= ficl.h math64.h sysdep.h +# +# Flags for shared library +TARGET= -Dlinux # riscos MOTO_CPU32 +SHFLAGS = -fPIC +CFLAGS= -O -c $(SHFLAGS) $(TARGET) +CC=gcc +LIB = ar cr +RANLIB = ranlib + +MAJOR = 3 +MINOR = 0.1 + +ficl: testmain.o ficl.h sysdep.h libficl.a + $(CC) testmain.o -o ficl -L. -lficl -lm + +lib: libficl.so.$(MAJOR).$(MINOR) + +# static library build +libficl.a: $(OBJECTS) + $(LIB) libficl.a $(OBJECTS) + $(RANLIB) libficl.a + +# shared library build +libficl.so.$(MAJOR).$(MINOR): $(OBJECTS) + $(CC) -shared -Wl,-soname,libficl.so.$(MAJOR).$(MINOR) \ + -o libficl.so.$(MAJOR).$(MINOR) $(OBJECTS) + ln -sf libficl.so.$(MAJOR).$(MINOR) libficl.so + +testmain: testmain.o ficl.h sysdep.h libficl.so.$(MAJOR).$(MINOR) + $(CC) testmain.o -o testmain -L. -lficl -lm + ln -sf libficl.so.$(MAJOR).$(MINOR) libficl.so.$(MAJOR) + +# +# generic object code +# +.SUFFIXES: .cxx .cc .c .o + +.c.o: + $(CC) $(CFLAGS) -c $*.c + +.cxx.o: + $(CPP) $(CPFLAGS) -c $*.cxx + +.cc.o: + $(CPP) $(CPFLAGS) -c $*.cc +# +# generic cleanup code +# +clean: + rm -f *.o *.a libficl.* Added: vendor/ficl/dist/ReadMe.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/ficl/dist/ReadMe.txt Tue May 12 02:36:33 2015 (r282801) @@ -0,0 +1,49 @@ +FICL 3.03 +April 2002 + +________ +OVERVIEW + +Ficl is a complete programming language interpreter designed to be embedded +into other systems (including firmware based ones) as a command, macro, +and development prototype language. Ficl stands for "Forth Inspired +Command Language". + +For more information, please see the "doc" directory. +For release notes, please see "doc/ficl_rel.html". + +____________ +INSTALLATION + +Ficl builds out-of-the-box on the following platforms: + * Linux: use "Makefile.linux". + * RiscOS: use "Makefile.riscos". + * Win32: use "ficl.dsw" / "ficl.dsp". +To port to other platforms, be sure to examine "sysdep.h", and +we suggest you start with the Linux makefile. (And please--feel +free to submit your portability changes!) + +____________ +FICL LICENSE + +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. + Added: vendor/ficl/dist/dict.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/ficl/dist/dict.c Tue May 12 02:36:33 2015 (r282801) @@ -0,0 +1,836 @@ +/******************************************************************* +** d i c t . c +** Forth Inspired Command Language - dictionary methods +** Author: John Sadler (john_sadler@alum.mit.edu) +** Created: 19 July 1997 +** $Id: dict.c,v 1.12 2001-10-28 10:59:22-08 jsadler Exp jsadler $ +*******************************************************************/ +/* +** This file implements the dictionary -- FICL's model of +** memory management. All FICL words are stored in the +** dictionary. A word is a named chunk of data with its +** associated code. FICL treats all words the same, even +** precompiled ones, so your words become first-class +** extensions of the language. You can even define new +** control structures. +** +** 29 jun 1998 (sadler) added variable sized hash table support +*/ +/* +** Copyright (c) 1997-2001 John Sadler (john_sadler@alum.mit.edu) +** All rights reserved. +** +** Get the latest Ficl release at http://ficl.sourceforge.net +** +** I am interested in hearing from anyone who uses ficl. If you have +** a problem, a success story, a defect, an enhancement request, or +** if you would like to contribute to the ficl release, please +** contact me by email at the address above. +** +** L I C E N S E and D I S C L A I M E R +** +** Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions +** are met: +** 1. Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** 2. Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in the +** documentation and/or other materials provided with the distribution. +** +** THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +** ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +** FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +** DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +** OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +** HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +** OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +** SUCH DAMAGE. +*/ + +#include +#include /* sprintf */ +#include +#include +#include "ficl.h" + +static char *dictCopyName(FICL_DICT *pDict, STRINGINFO si); + +/************************************************************************** + d i c t A b o r t D e f i n i t i o n +** Abort a definition in process: reclaim its memory and unlink it +** from the dictionary list. Assumes that there is a smudged +** definition in process...otherwise does nothing. +** NOTE: this function is not smart enough to unlink a word that +** has been successfully defined (ie linked into a hash). It +** only works for defs in process. If the def has been unsmudged, +** nothing happens. +**************************************************************************/ +void dictAbortDefinition(FICL_DICT *pDict) +{ + FICL_WORD *pFW; + ficlLockDictionary(TRUE); + pFW = pDict->smudge; + + if (pFW->flags & FW_SMUDGE) + pDict->here = (CELL *)pFW->name; + + ficlLockDictionary(FALSE); + return; +} + + +/************************************************************************** + a l i g n P t r +** Aligns the given pointer to FICL_ALIGN address units. +** Returns the aligned pointer value. +**************************************************************************/ +void *alignPtr(void *ptr) +{ +#if FICL_ALIGN > 0 + char *cp; + CELL c; + cp = (char *)ptr + FICL_ALIGN_ADD; + c.p = (void *)cp; + c.u = c.u & (~FICL_ALIGN_ADD); + ptr = (CELL *)c.p; +#endif + return ptr; +} + + +/************************************************************************** + d i c t A l i g n +** Align the dictionary's free space pointer +**************************************************************************/ +void dictAlign(FICL_DICT *pDict) +{ + pDict->here = alignPtr(pDict->here); +} + + +/************************************************************************** + d i c t A l l o t +** Allocate or remove n chars of dictionary space, with +** checks for underrun and overrun +**************************************************************************/ +int dictAllot(FICL_DICT *pDict, int n) +{ + char *cp = (char *)pDict->here; +#if FICL_ROBUST + if (n > 0) + { + if ((unsigned)n <= dictCellsAvail(pDict) * sizeof (CELL)) + cp += n; + else + return 1; /* dict is full */ + } + else + { + n = -n; + if ((unsigned)n <= dictCellsUsed(pDict) * sizeof (CELL)) + cp -= n; + else /* prevent underflow */ + cp -= dictCellsUsed(pDict) * sizeof (CELL); + } +#else + cp += n; +#endif + pDict->here = PTRtoCELL cp; + return 0; +} + + +/************************************************************************** + d i c t A l l o t C e l l s +** Reserve space for the requested number of cells in the +** dictionary. If nCells < 0 , removes space from the dictionary. +**************************************************************************/ +int dictAllotCells(FICL_DICT *pDict, int nCells) +{ +#if FICL_ROBUST + if (nCells > 0) + { + if (nCells <= dictCellsAvail(pDict)) + pDict->here += nCells; + else + return 1; /* dict is full */ + } + else + { + nCells = -nCells; + if (nCells <= dictCellsUsed(pDict)) + pDict->here -= nCells; + else /* prevent underflow */ + pDict->here -= dictCellsUsed(pDict); + } +#else + pDict->here += nCells; +#endif + return 0; +} + + +/************************************************************************** + d i c t A p p e n d C e l l +** Append the specified cell to the dictionary +**************************************************************************/ +void dictAppendCell(FICL_DICT *pDict, CELL c) +{ + *pDict->here++ = c; + return; +} + + +/************************************************************************** + d i c t A p p e n d C h a r +** Append the specified char to the dictionary +**************************************************************************/ +void dictAppendChar(FICL_DICT *pDict, char c) +{ + char *cp = (char *)pDict->here; + *cp++ = c; + pDict->here = PTRtoCELL cp; + return; +} + + +/************************************************************************** + d i c t A p p e n d W o r d +** Create a new word in the dictionary with the specified +** name, code, and flags. Name must be NULL-terminated. +**************************************************************************/ +FICL_WORD *dictAppendWord(FICL_DICT *pDict, + char *name, + FICL_CODE pCode, + UNS8 flags) +{ + STRINGINFO si; + SI_SETLEN(si, strlen(name)); + SI_SETPTR(si, name); + return dictAppendWord2(pDict, si, pCode, flags); +} + + +/************************************************************************** + d i c t A p p e n d W o r d 2 +** Create a new word in the dictionary with the specified +** STRINGINFO, code, and flags. Does not require a NULL-terminated +** name. +**************************************************************************/ +FICL_WORD *dictAppendWord2(FICL_DICT *pDict, + STRINGINFO si, + FICL_CODE pCode, + UNS8 flags) +{ + FICL_COUNT len = (FICL_COUNT)SI_COUNT(si); + char *pName; + FICL_WORD *pFW; + + ficlLockDictionary(TRUE); + + /* + ** NOTE: dictCopyName advances "here" as a side-effect. + ** It must execute before pFW is initialized. + */ + pName = dictCopyName(pDict, si); + pFW = (FICL_WORD *)pDict->here; + pDict->smudge = pFW; + pFW->hash = hashHashCode(si); + pFW->code = pCode; + pFW->flags = (UNS8)(flags | FW_SMUDGE); + pFW->nName = (char)len; + pFW->name = pName; + /* + ** Point "here" to first cell of new word's param area... + */ + pDict->here = pFW->param; + + if (!(flags & FW_SMUDGE)) + dictUnsmudge(pDict); + + ficlLockDictionary(FALSE); + return pFW; +} + + +/************************************************************************** + d i c t A p p e n d U N S +** Append the specified FICL_UNS to the dictionary +**************************************************************************/ +void dictAppendUNS(FICL_DICT *pDict, FICL_UNS u) +{ + *pDict->here++ = LVALUEtoCELL(u); + return; +} + + +/************************************************************************** + d i c t C e l l s A v a i l +** Returns the number of empty cells left in the dictionary +**************************************************************************/ +int dictCellsAvail(FICL_DICT *pDict) +{ + return pDict->size - dictCellsUsed(pDict); +} + + +/************************************************************************** + d i c t C e l l s U s e d +** Returns the number of cells consumed in the dicionary +**************************************************************************/ +int dictCellsUsed(FICL_DICT *pDict) +{ + return pDict->here - pDict->dict; +} + + +/************************************************************************** + d i c t C h e c k +** Checks the dictionary for corruption and throws appropriate +** errors. +** Input: +n number of ADDRESS UNITS (not Cells) proposed to allot +** -n number of ADDRESS UNITS proposed to de-allot +** 0 just do a consistency check +**************************************************************************/ +void dictCheck(FICL_DICT *pDict, FICL_VM *pVM, int n) +{ + if ((n >= 0) && (dictCellsAvail(pDict) * (int)sizeof(CELL) < n)) + { + vmThrowErr(pVM, "Error: dictionary full"); + } + + if ((n <= 0) && (dictCellsUsed(pDict) * (int)sizeof(CELL) < -n)) + { + vmThrowErr(pVM, "Error: dictionary underflow"); + } + + if (pDict->nLists > FICL_DEFAULT_VOCS) + { + dictResetSearchOrder(pDict); + vmThrowErr(pVM, "Error: search order overflow"); + } + else if (pDict->nLists < 0) + { + dictResetSearchOrder(pDict); + vmThrowErr(pVM, "Error: search order underflow"); + } + + return; +} + + +/************************************************************************** + d i c t C o p y N a m e +** Copy up to nFICLNAME characters of the name specified by si into +** the dictionary starting at "here", then NULL-terminate the name, +** point "here" to the next available byte, and return the address of +** the beginning of the name. Used by dictAppendWord. +** N O T E S : +** 1. "here" is guaranteed to be aligned after this operation. +** 2. If the string has zero length, align and return "here" +**************************************************************************/ +static char *dictCopyName(FICL_DICT *pDict, STRINGINFO si) +{ + char *oldCP = (char *)pDict->here; + char *cp = oldCP; + char *name = SI_PTR(si); + int i = SI_COUNT(si); + + if (i == 0) + { + dictAlign(pDict); + return (char *)pDict->here; + } + + if (i > nFICLNAME) + i = nFICLNAME; + + for (; i > 0; --i) + { + *cp++ = *name++; + } + + *cp++ = '\0'; + + pDict->here = PTRtoCELL cp; + dictAlign(pDict); + return oldCP; +} + + +/************************************************************************** + d i c t C r e a t e +** Create and initialize a dictionary with the specified number +** of cells capacity, and no hashing (hash size == 1). +**************************************************************************/ +FICL_DICT *dictCreate(unsigned nCells) +{ + return dictCreateHashed(nCells, 1); +} + + +FICL_DICT *dictCreateHashed(unsigned nCells, unsigned nHash) +{ + FICL_DICT *pDict; + size_t nAlloc; + + nAlloc = sizeof (FICL_DICT) + nCells * sizeof (CELL) + + sizeof (FICL_HASH) + (nHash - 1) * sizeof (FICL_WORD *); + + pDict = ficlMalloc(nAlloc); + assert(pDict); + + pDict->size = nCells; + dictEmpty(pDict, nHash); + return pDict; +} + + +/************************************************************************** + d i c t C r e a t e W o r d l i s t +** Create and initialize an anonymous wordlist +**************************************************************************/ +FICL_HASH *dictCreateWordlist(FICL_DICT *dp, int nBuckets) +{ + FICL_HASH *pHash; + + dictAlign(dp); + pHash = (FICL_HASH *)dp->here; + dictAllot(dp, sizeof (FICL_HASH) + + (nBuckets-1) * sizeof (FICL_WORD *)); + + pHash->size = nBuckets; + hashReset(pHash); + return pHash; +} + + +/************************************************************************** + d i c t D e l e t e +** Free all memory allocated for the given dictionary +**************************************************************************/ +void dictDelete(FICL_DICT *pDict) +{ + assert(pDict); + ficlFree(pDict); + return; +} + + +/************************************************************************** + d i c t E m p t y +** Empty the dictionary, reset its hash table, and reset its search order. +** Clears and (re-)creates the hash table with the size specified by nHash. +**************************************************************************/ +void dictEmpty(FICL_DICT *pDict, unsigned nHash) +{ + FICL_HASH *pHash; + + pDict->here = pDict->dict; + + dictAlign(pDict); + pHash = (FICL_HASH *)pDict->here; + dictAllot(pDict, + sizeof (FICL_HASH) + (nHash - 1) * sizeof (FICL_WORD *)); + + pHash->size = nHash; + hashReset(pHash); + + pDict->pForthWords = pHash; + pDict->smudge = NULL; + dictResetSearchOrder(pDict); + return; +} + + +/************************************************************************** + d i c t H a s h S u m m a r y +** Calculate a figure of merit for the dictionary hash table based +** on the average search depth for all the words in the dictionary, +** assuming uniform distribution of target keys. The figure of merit +** is the ratio of the total search depth for all keys in the table +** versus a theoretical optimum that would be achieved if the keys +** were distributed into the table as evenly as possible. +** The figure would be worse if the hash table used an open +** addressing scheme (i.e. collisions resolved by searching the +** table for an empty slot) for a given size table. +**************************************************************************/ +#if FICL_WANT_FLOAT +void dictHashSummary(FICL_VM *pVM) +{ + FICL_DICT *dp = vmGetDict(pVM); + FICL_HASH *pFHash; + FICL_WORD **pHash; + unsigned size; + FICL_WORD *pFW; + unsigned i; + int nMax = 0; + int nWords = 0; + int nFilled; + double avg = 0.0; + double best; + int nAvg, nRem, nDepth; + + dictCheck(dp, pVM, 0); + + pFHash = dp->pSearch[dp->nLists - 1]; + pHash = pFHash->table; + size = pFHash->size; + nFilled = size; + + for (i = 0; i < size; i++) + { + int n = 0; + pFW = pHash[i]; + + while (pFW) + { + ++n; + ++nWords; + pFW = pFW->link; + } + + avg += (double)(n * (n+1)) / 2.0; + + if (n > nMax) + nMax = n; + if (n == 0) + --nFilled; + } + + /* Calc actual avg search depth for this hash */ + avg = avg / nWords; + + /* Calc best possible performance with this size hash */ + nAvg = nWords / size; + nRem = nWords % size; + nDepth = size * (nAvg * (nAvg+1))/2 + (nAvg+1)*nRem; + best = (double)nDepth/nWords; + + sprintf(pVM->pad, + "%d bins, %2.0f%% filled, Depth: Max=%d, Avg=%2.1f, Best=%2.1f, Score: %2.0f%%", + size, + (double)nFilled * 100.0 / size, nMax, + avg, + best, + 100.0 * best / avg); + + ficlTextOut(pVM, pVM->pad, 1); + + return; +} +#endif + +/************************************************************************** + d i c t I n c l u d e s +** Returns TRUE iff the given pointer is within the address range of +** the dictionary. +**************************************************************************/ +int dictIncludes(FICL_DICT *pDict, void *p) +{ + return ((p >= (void *) &pDict->dict) + && (p < (void *)(&pDict->dict + pDict->size)) + ); +} + + +/************************************************************************** + d i c t L o o k u p +** Find the FICL_WORD that matches the given name and length. +** If found, returns the word's address. Otherwise returns NULL. +** Uses the search order list to search multiple wordlists. +**************************************************************************/ +FICL_WORD *dictLookup(FICL_DICT *pDict, STRINGINFO si) +{ + FICL_WORD *pFW = NULL; + FICL_HASH *pHash; + int i; + UNS16 hashCode = hashHashCode(si); + + assert(pDict); + + ficlLockDictionary(1); + + for (i = (int)pDict->nLists - 1; (i >= 0) && (!pFW); --i) + { + pHash = pDict->pSearch[i]; + pFW = hashLookup(pHash, si, hashCode); + } + + ficlLockDictionary(0); + return pFW; +} + + +/************************************************************************** + f i c l L o o k u p L o c +** Same as dictLookup, but looks in system locals dictionary first... +** Assumes locals dictionary has only one wordlist... +**************************************************************************/ +#if FICL_WANT_LOCALS +FICL_WORD *ficlLookupLoc(FICL_SYSTEM *pSys, STRINGINFO si) +{ + FICL_WORD *pFW = NULL; + FICL_DICT *pDict = pSys->dp; + FICL_HASH *pHash = ficlGetLoc(pSys)->pForthWords; + int i; + UNS16 hashCode = hashHashCode(si); + + assert(pHash); + assert(pDict); + + ficlLockDictionary(1); + /* + ** check the locals dict first... + */ + pFW = hashLookup(pHash, si, hashCode); + + /* + ** If no joy, (!pFW) --------------------------v + ** iterate over the search list in the main dict + */ + for (i = (int)pDict->nLists - 1; (i >= 0) && (!pFW); --i) + { + pHash = pDict->pSearch[i]; + pFW = hashLookup(pHash, si, hashCode); + } + + ficlLockDictionary(0); + return pFW; +} +#endif + + +/************************************************************************** + d i c t R e s e t S e a r c h O r d e r +** Initialize the dictionary search order list to sane state +**************************************************************************/ +void dictResetSearchOrder(FICL_DICT *pDict) +{ + assert(pDict); + pDict->pCompile = pDict->pForthWords; + pDict->nLists = 1; + pDict->pSearch[0] = pDict->pForthWords; + return; +} + + +/************************************************************************** + d i c t S e t F l a g s +** Changes the flags field of the most recently defined word: +** Set all bits that are ones in the set parameter, clear all bits +** that are ones in the clr parameter. Clear wins in case the same bit +** is set in both parameters. +**************************************************************************/ +void dictSetFlags(FICL_DICT *pDict, UNS8 set, UNS8 clr) +{ + assert(pDict->smudge); + pDict->smudge->flags |= set; + pDict->smudge->flags &= ~clr; + return; +} + + +/************************************************************************** + d i c t S e t I m m e d i a t e +** Set the most recently defined word as IMMEDIATE +**************************************************************************/ +void dictSetImmediate(FICL_DICT *pDict) +{ + assert(pDict->smudge); + pDict->smudge->flags |= FW_IMMEDIATE; + return; +} + + +/************************************************************************** + d i c t U n s m u d g e +** Completes the definition of a word by linking it +** into the main list +**************************************************************************/ +void dictUnsmudge(FICL_DICT *pDict) +{ + FICL_WORD *pFW = pDict->smudge; + FICL_HASH *pHash = pDict->pCompile; + + assert(pHash); + assert(pFW); + /* + ** :noname words never get linked into the list... + */ + if (pFW->nName > 0) + hashInsertWord(pHash, pFW); + pFW->flags &= ~(FW_SMUDGE); + return; +} + + +/************************************************************************** + d i c t W h e r e +** Returns the value of the HERE pointer -- the address +** of the next free cell in the dictionary +**************************************************************************/ +CELL *dictWhere(FICL_DICT *pDict) +{ + return pDict->here; +} + + +/************************************************************************** + h a s h F o r g e t +** Unlink all words in the hash that have addresses greater than or +** equal to the address supplied. Implementation factor for FORGET +** and MARKER. +**************************************************************************/ +void hashForget(FICL_HASH *pHash, void *where) +{ + FICL_WORD *pWord; + unsigned i; + + assert(pHash); + assert(where); + + for (i = 0; i < pHash->size; i++) + { + pWord = pHash->table[i]; + + while ((void *)pWord >= where) + { + pWord = pWord->link; + } + + pHash->table[i] = pWord; + } + + return; +} + + +/************************************************************************** + h a s h H a s h C o d e +** +** Generate a 16 bit hashcode from a character string using a rolling +** shift and add stolen from PJ Weinberger of Bell Labs fame. Case folds +** the name before hashing it... +** N O T E : If string has zero length, returns zero. +**************************************************************************/ +UNS16 hashHashCode(STRINGINFO si) +{ + /* hashPJW */ + UNS8 *cp; + UNS16 code = (UNS16)si.count; + UNS16 shift = 0; + + if (si.count == 0) + return 0; + + /* changed to run without errors under Purify -- lch */ + for (cp = (UNS8 *)si.cp; si.count && *cp; cp++, si.count--) + { + code = (UNS16)((code << 4) + tolower(*cp)); + shift = (UNS16)(code & 0xf000); + if (shift) + { + code ^= (UNS16)(shift >> 8); + code ^= (UNS16)shift; + } + } + + return (UNS16)code; +} + + + + +/************************************************************************** + h a s h I n s e r t W o r d +** Put a word into the hash table using the word's hashcode as +** an index (modulo the table size). +**************************************************************************/ +void hashInsertWord(FICL_HASH *pHash, FICL_WORD *pFW) +{ + FICL_WORD **pList; + + assert(pHash); + assert(pFW); + + if (pHash->size == 1) + { + pList = pHash->table; + } + else + { + pList = pHash->table + (pFW->hash % pHash->size); + } + + pFW->link = *pList; + *pList = pFW; + return; +} + + +/************************************************************************** + h a s h L o o k u p +** Find a name in the hash table given the hashcode and text of the name. +** Returns the address of the corresponding FICL_WORD if found, +** otherwise NULL. +** Note: outer loop on link field supports inheritance in wordlists. +** It's not part of ANS Forth - ficl only. hashReset creates wordlists +** with NULL link fields. +**************************************************************************/ +FICL_WORD *hashLookup(FICL_HASH *pHash, STRINGINFO si, UNS16 hashCode) +{ + FICL_UNS nCmp = si.count; + FICL_WORD *pFW; + UNS16 hashIdx; + + if (nCmp > nFICLNAME) + nCmp = nFICLNAME; + + for (; pHash != NULL; pHash = pHash->link) + { + if (pHash->size > 1) + hashIdx = (UNS16)(hashCode % pHash->size); + else /* avoid the modulo op for single threaded lists */ + hashIdx = 0; + + for (pFW = pHash->table[hashIdx]; pFW; pFW = pFW->link) + { + if ( (pFW->nName == si.count) + && (!strincmp(si.cp, pFW->name, nCmp)) ) + return pFW; +#if FICL_ROBUST + assert(pFW != pFW->link); +#endif + } + } + + return NULL; +} + + +/************************************************************************** + h a s h R e s e t +** Initialize a FICL_HASH to empty state. +**************************************************************************/ +void hashReset(FICL_HASH *pHash) +{ + unsigned i; + + assert(pHash); + + for (i = 0; i < pHash->size; i++) + { + pHash->table[i] = NULL; + } + + pHash->link = NULL; + pHash->name = NULL; + return; +} + + Added: vendor/ficl/dist/doc/Logo.jpg ============================================================================== Binary file. No diff available. Added: vendor/ficl/dist/doc/favicon.ico ============================================================================== Binary file. No diff available. Added: vendor/ficl/dist/doc/ficl.html ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/ficl/dist/doc/ficl.html Tue May 12 02:36:33 2015 (r282801) @@ -0,0 +1,1519 @@ + + + + + + + + + + Ficl - Embedded Scripting + + + +

+ Ficl Documentation +

+ +
+
+ +

+ What is ficl? +

+ Ficl is a complete programming language interpreter designed to be embedded into other systems (including firmware based ones) as a command, macro, and development prototype language. Unlike other scripting interpreters, + Ficl: +
    +
  • + typically takes under 2 hours to port to a new system -- much less if the target operating system is one of several already supported (Win32, Linux, FreeBSD, RiscOS, and more) +
  • +
  • + has a small memory footprint: a fully featured Win32 console version takes less than 100K of memory, and a minimal version is less than half that +
  • +
  • + is relatively quick thanks to its threaded code virtual machine design and just in time compiling +
  • +
  • + is a complete and powerful programming language +
  • +
  • + is interactive +
  • +
  • + has object oriented programming features that can be used to wrap data structures or classes of the host system without altering them - even if the host is mainly written in a non-OO + language +
  • +
+

+ Ficl syntax is based on ANS Forth and the code is Standard C. See below for examples of software and products that include ficl. Ficl stands for "Forth inspired *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue May 12 02:38:49 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9FDE6C20; Tue, 12 May 2015 02:38:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 74A401FA5; Tue, 12 May 2015 02:38:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4C2cniF046427; Tue, 12 May 2015 02:38:49 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4C2cn7q046426; Tue, 12 May 2015 02:38:49 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201505120238.t4C2cn7q046426@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Tue, 12 May 2015 02:38:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r282802 - vendor/ficl/3.0.3 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.20 Precedence: list List-Id: "SVN commit messages 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, 12 May 2015 02:38:49 -0000 Author: pfg Date: Tue May 12 02:38:48 2015 New Revision: 282802 URL: https://svnweb.freebsd.org/changeset/base/282802 Log: Tag ficl 3.0.3 Added: vendor/ficl/3.0.3/ - copied from r282801, vendor/ficl/dist/ From owner-svn-src-all@FreeBSD.ORG Tue May 12 03:27:09 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9E47864B; Tue, 12 May 2015 03:27:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 893271663; Tue, 12 May 2015 03:27:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4C3R9ku071505; Tue, 12 May 2015 03:27:09 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4C3R7Hb071491; Tue, 12 May 2015 03:27:07 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201505120327.t4C3R7Hb071491@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Tue, 12 May 2015 03:27:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r282803 - in vendor/ficl/dist: . contrib contrib/xclasses doc doc/articles doc/graphics doc/source ficlplatform softcore softwords 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.20 Precedence: list List-Id: "SVN commit messages 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, 12 May 2015 03:27:09 -0000 Author: pfg Date: Tue May 12 03:27:06 2015 New Revision: 282803 URL: https://svnweb.freebsd.org/changeset/base/282803 Log: Update to ficl 4.1.0 (latest release on sourceforge) Added: vendor/ficl/dist/Makefile (contents, props changed) vendor/ficl/dist/Makefile.ansi (contents, props changed) vendor/ficl/dist/bit.c (contents, props changed) vendor/ficl/dist/callback.c (contents, props changed) vendor/ficl/dist/compatibility.c (contents, props changed) vendor/ficl/dist/contrib/ vendor/ficl/dist/contrib/xclasses/ vendor/ficl/dist/contrib/xclasses/readme.txt (contents, props changed) vendor/ficl/dist/contrib/xclasses/xclasses.py (contents, props changed) vendor/ficl/dist/dictionary.c - copied, changed from r282801, vendor/ficl/dist/dict.c vendor/ficl/dist/doc/api.html (contents, props changed) vendor/ficl/dist/doc/articles/ vendor/ficl/dist/doc/articles/ficlddj.pdf (contents, props changed) vendor/ficl/dist/doc/articles/jwsforml.pdf (contents, props changed) vendor/ficl/dist/doc/articles/oo_in_c.html (contents, props changed) vendor/ficl/dist/doc/articles/sigplan9906.doc (contents, props changed) vendor/ficl/dist/doc/debugger.html (contents, props changed) vendor/ficl/dist/doc/dpans.html (contents, props changed) vendor/ficl/dist/doc/graphics/ vendor/ficl/dist/doc/graphics/4ring.gif (contents, props changed) vendor/ficl/dist/doc/graphics/ficl.4.128.jpg (contents, props changed) vendor/ficl/dist/doc/graphics/ficl.4.64.jpg (contents, props changed) vendor/ficl/dist/doc/graphics/ficl.4.96.jpg (contents, props changed) vendor/ficl/dist/doc/graphics/ficl_oop.jpg (contents, props changed) vendor/ficl/dist/doc/graphics/ficl_top.jpg (contents, props changed) vendor/ficl/dist/doc/graphics/sourceforge.jpg (contents, props changed) vendor/ficl/dist/doc/license.html (contents, props changed) vendor/ficl/dist/doc/links.html (contents, props changed) vendor/ficl/dist/doc/locals.html (contents, props changed) vendor/ficl/dist/doc/oop.html (contents, props changed) vendor/ficl/dist/doc/parsesteps.html (contents, props changed) vendor/ficl/dist/doc/releases.html (contents, props changed) vendor/ficl/dist/doc/source/ vendor/ficl/dist/doc/source/api.ht vendor/ficl/dist/doc/source/debugger.ht vendor/ficl/dist/doc/source/dpans.ht vendor/ficl/dist/doc/source/ficl.ht vendor/ficl/dist/doc/source/generate.py (contents, props changed) vendor/ficl/dist/doc/source/index.ht vendor/ficl/dist/doc/source/license.ht vendor/ficl/dist/doc/source/links.ht vendor/ficl/dist/doc/source/locals.ht vendor/ficl/dist/doc/source/oop.ht vendor/ficl/dist/doc/source/parsesteps.ht vendor/ficl/dist/doc/source/releases.ht vendor/ficl/dist/doc/source/upgrading.ht vendor/ficl/dist/doc/upgrading.html (contents, props changed) vendor/ficl/dist/double.c - copied, changed from r282801, vendor/ficl/dist/math64.c vendor/ficl/dist/extras.c (contents, props changed) vendor/ficl/dist/ficlcompatibility.h (contents, props changed) vendor/ficl/dist/ficldll.def vendor/ficl/dist/ficldll.dsp vendor/ficl/dist/ficlexe.dsp vendor/ficl/dist/ficllib.dsp vendor/ficl/dist/ficllocal.h (contents, props changed) vendor/ficl/dist/ficlplatform/ vendor/ficl/dist/ficlplatform/alpha.h (contents, props changed) vendor/ficl/dist/ficlplatform/ansi.c (contents, props changed) vendor/ficl/dist/ficlplatform/ansi.h (contents, props changed) vendor/ficl/dist/ficlplatform/ficlexports.txt (contents, props changed) vendor/ficl/dist/ficlplatform/makedef.py (contents, props changed) vendor/ficl/dist/ficlplatform/unix.c (contents, props changed) vendor/ficl/dist/ficlplatform/unix.h (contents, props changed) vendor/ficl/dist/ficlplatform/win32.c (contents, props changed) vendor/ficl/dist/ficlplatform/win32.h (contents, props changed) vendor/ficl/dist/ficltokens.h (contents, props changed) vendor/ficl/dist/hash.c (contents, props changed) vendor/ficl/dist/lzcompress.c (contents, props changed) vendor/ficl/dist/lzuncompress.c (contents, props changed) vendor/ficl/dist/main.c (contents, props changed) vendor/ficl/dist/primitives.c - copied, changed from r282801, vendor/ficl/dist/words.c vendor/ficl/dist/softcore/ - copied from r282801, vendor/ficl/dist/softwords/ vendor/ficl/dist/softcore/ficl.fr vendor/ficl/dist/softcore/make.bat vendor/ficl/dist/softcore/makesoftcore.c (contents, props changed) vendor/ficl/dist/system.c - copied, changed from r282801, vendor/ficl/dist/ficl.c vendor/ficl/dist/utility.c (contents, props changed) vendor/ficl/dist/word.c (contents, props changed) Deleted: vendor/ficl/dist/dict.c vendor/ficl/dist/doc/Logo.jpg vendor/ficl/dist/doc/ficl1.ico vendor/ficl/dist/doc/ficl_debug.html vendor/ficl/dist/doc/ficl_guts.htm vendor/ficl/dist/doc/ficl_loc.html vendor/ficl/dist/doc/ficl_logo.jpg vendor/ficl/dist/doc/ficl_oop.html vendor/ficl/dist/doc/ficl_oop.jpg vendor/ficl/dist/doc/ficl_parse.html vendor/ficl/dist/doc/ficl_rel.html vendor/ficl/dist/doc/ficl_top.jpg vendor/ficl/dist/doc/ficlddj.PDF vendor/ficl/dist/doc/ficlheader.js vendor/ficl/dist/doc/jwsforml.PDF vendor/ficl/dist/doc/oo_in_c.html vendor/ficl/dist/doc/primer.txt vendor/ficl/dist/doc/sigplan9906.doc vendor/ficl/dist/doc/skey.gif vendor/ficl/dist/ficl.c vendor/ficl/dist/ficl.dsp vendor/ficl/dist/math64.c vendor/ficl/dist/math64.h vendor/ficl/dist/softcore/oo.fr.bak vendor/ficl/dist/softcore/softcore.bat vendor/ficl/dist/softcore/softcore.pl vendor/ficl/dist/softcore/softcore.py vendor/ficl/dist/softcore/softcore.py.bat vendor/ficl/dist/softwords/ vendor/ficl/dist/sysdep.c vendor/ficl/dist/sysdep.h vendor/ficl/dist/testmain.c vendor/ficl/dist/unix.c vendor/ficl/dist/win32.c vendor/ficl/dist/words.c Modified: vendor/ficl/dist/Makefile.linux vendor/ficl/dist/ReadMe.txt vendor/ficl/dist/doc/favicon.ico vendor/ficl/dist/doc/ficl.html vendor/ficl/dist/doc/index.html vendor/ficl/dist/ficl.dsw vendor/ficl/dist/ficl.h vendor/ficl/dist/fileaccess.c vendor/ficl/dist/float.c vendor/ficl/dist/prefix.c vendor/ficl/dist/search.c vendor/ficl/dist/softcore.c vendor/ficl/dist/softcore/classes.fr vendor/ficl/dist/softcore/ficlclass.fr vendor/ficl/dist/softcore/ficllocal.fr vendor/ficl/dist/softcore/fileaccess.fr vendor/ficl/dist/softcore/forml.fr vendor/ficl/dist/softcore/ifbrack.fr vendor/ficl/dist/softcore/jhlocal.fr vendor/ficl/dist/softcore/makefile vendor/ficl/dist/softcore/marker.fr vendor/ficl/dist/softcore/oo.fr vendor/ficl/dist/softcore/prefix.fr vendor/ficl/dist/softcore/softcore.fr vendor/ficl/dist/softcore/string.fr vendor/ficl/dist/softcore/win32.fr vendor/ficl/dist/stack.c vendor/ficl/dist/test/asm68k.4th vendor/ficl/dist/test/core.fr vendor/ficl/dist/test/fib.fr vendor/ficl/dist/test/ficltest.fr vendor/ficl/dist/test/ooptest.fr vendor/ficl/dist/test/prefix.fr vendor/ficl/dist/test/sarray.fr vendor/ficl/dist/test/testcase.fr vendor/ficl/dist/test/tester.fr vendor/ficl/dist/test/vocab.fr vendor/ficl/dist/tools.c vendor/ficl/dist/vm.c Added: vendor/ficl/dist/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/ficl/dist/Makefile Tue May 12 03:27:06 2015 (r282803) @@ -0,0 +1,60 @@ +OBJECTS= dictionary.o system.o fileaccess.o float.o double.o prefix.o search.o softcore.o stack.o tools.o vm.o primitives.o bit.o lzuncompress.o unix.o utility.o hash.o callback.o word.o extras.o +HEADERS= ficl.h ficlplatform/unix.h +# +# Flags for shared library +#TARGET= -Dlinux # riscos MOTO_CPU32 +SHFLAGS = -fPIC +CFLAGS= -O $(SHFLAGS) -Wall +CPPFLAGS= $(TARGET) -I. +CC = cc +LIB = ar cr +RANLIB = ranlib + +MAJOR = 4 +MINOR = 1.0 + +ficl: main.o $(HEADERS) libficl.a + $(CC) $(CFLAGS) $(LDFLAGS) main.o -o ficl -L. -lficl -lm + +lib: libficl.so.$(MAJOR).$(MINOR) + +# static library build +libficl.a: $(OBJECTS) + $(LIB) libficl.a $(OBJECTS) + $(RANLIB) libficl.a + +# shared library build +libficl.so.$(MAJOR).$(MINOR): $(OBJECTS) + $(CC) $(LDFLAGS) -shared -Wl,-soname,libficl.so.$(MAJOR).$(MINOR) \ + -o libficl.so.$(MAJOR).$(MINOR) $(OBJECTS) + ln -sf libficl.so.$(MAJOR).$(MINOR) libficl.so + +main: main.o ficl.h sysdep.h libficl.so.$(MAJOR).$(MINOR) + $(CC) $(CFLAGS) $(LDFLAGS) main.o -o main -L. -lficl -lm + ln -sf libficl.so.$(MAJOR).$(MINOR) libficl.so.$(MAJOR) + +# depend explicitly to help finding source files in another subdirectory, +# and repeat commands since gmake doesn't understand otherwise +ansi.o: ficlplatform/ansi.c $(HEADERS) + $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $< +unix.o: ficlplatform/unix.c $(HEADERS) + $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $< + +# +# generic object code +# +.SUFFIXES: .cxx .cc .c .o + +.c.o: + $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $< + +.cxx.o: + $(CPP) $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $< + +.cc.o: + $(CPP) $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $< +# +# generic cleanup code +# +clean: + rm -f *.o *.a libficl.* ficl Added: vendor/ficl/dist/Makefile.ansi ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/ficl/dist/Makefile.ansi Tue May 12 03:27:06 2015 (r282803) @@ -0,0 +1,56 @@ +OBJECTS= dictionary.o system.o fileaccess.o float.o double.o prefix.o search.o softcore.o stack.o tools.o vm.o primitives.o bit.o lzuncompress.o ansi.o utility.o hash.o callback.o word.o extras.o +HEADERS= ficl.h ficlplatform/ansi.h +# +# Flags for shared library +TARGET= -ansi -DFICL_ANSI # riscos MOTO_CPU32 +SHFLAGS = -fPIC +CFLAGS= -O $(SHFLAGS) +CPPFLAGS= $(TARGET) -I. +CC = cc +LIB = ar cr +RANLIB = ranlib + +MAJOR = 4 +MINOR = 1.0 + +ficl: main.o $(HEADERS) libficl.a + $(CC) main.o -o ficl -L. -lficl -lm + +lib: libficl.so.$(MAJOR).$(MINOR) + +# static library build +libficl.a: $(OBJECTS) + $(LIB) libficl.a $(OBJECTS) + $(RANLIB) libficl.a + +# shared library build +libficl.so.$(MAJOR).$(MINOR): $(OBJECTS) + $(CC) -shared -Wl,-soname,libficl.so.$(MAJOR).$(MINOR) \ + -o libficl.so.$(MAJOR).$(MINOR) $(OBJECTS) + ln -sf libficl.so.$(MAJOR).$(MINOR) libficl.so + +main: main.o ficl.h sysdep.h libficl.so.$(MAJOR).$(MINOR) + $(CC) main.o -o main -L. -lficl -lm + ln -sf libficl.so.$(MAJOR).$(MINOR) libficl.so.$(MAJOR) + +ansi.o: ficlplatform/ansi.c $(HEADERS) + $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ ficlplatform/ansi.c + +# +# generic object code +# +.SUFFIXES: .cxx .cc .c .o + +.c.o: + $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $< + +.cxx.o: + $(CPP) $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $< + +.cc.o: + $(CPP) $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $< +# +# generic cleanup code +# +clean: + rm -f *.o *.a libficl.* Modified: vendor/ficl/dist/Makefile.linux ============================================================================== --- vendor/ficl/dist/Makefile.linux Tue May 12 02:38:48 2015 (r282802) +++ vendor/ficl/dist/Makefile.linux Tue May 12 03:27:06 2015 (r282803) @@ -1,19 +1,20 @@ -OBJECTS= dict.o ficl.o fileaccess.o float.o math64.o prefix.o search.o softcore.o stack.o sysdep.o tools.o unix.o vm.o words.o -HEADERS= ficl.h math64.h sysdep.h +OBJECTS= dictionary.o system.o fileaccess.o float.o double.o prefix.o search.o softcore.o stack.o tools.o vm.o primitives.o bit.o lzuncompress.o unix.o utility.o hash.o callback.o word.o extras.o +HEADERS= ficl.h ficlplatform/unix.h # # Flags for shared library TARGET= -Dlinux # riscos MOTO_CPU32 SHFLAGS = -fPIC -CFLAGS= -O -c $(SHFLAGS) $(TARGET) -CC=gcc +CFLAGS= -O $(SHFLAGS) +CPPFLAGS= $(TARGET) -I. +CC = cc LIB = ar cr RANLIB = ranlib -MAJOR = 3 -MINOR = 0.1 +MAJOR = 4 +MINOR = 1.0 -ficl: testmain.o ficl.h sysdep.h libficl.a - $(CC) testmain.o -o ficl -L. -lficl -lm +ficl: main.o $(HEADERS) libficl.a + $(CC) main.o -o ficl -L. -lficl -lm lib: libficl.so.$(MAJOR).$(MINOR) @@ -28,23 +29,26 @@ libficl.so.$(MAJOR).$(MINOR): $(OBJECTS) -o libficl.so.$(MAJOR).$(MINOR) $(OBJECTS) ln -sf libficl.so.$(MAJOR).$(MINOR) libficl.so -testmain: testmain.o ficl.h sysdep.h libficl.so.$(MAJOR).$(MINOR) - $(CC) testmain.o -o testmain -L. -lficl -lm +main: main.o ficl.h sysdep.h libficl.so.$(MAJOR).$(MINOR) + $(CC) main.o -o main -L. -lficl -lm ln -sf libficl.so.$(MAJOR).$(MINOR) libficl.so.$(MAJOR) +unix.o: ficlplatform/unix.c $(HEADERS) + $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ ficlplatform/unix.c + # # generic object code # .SUFFIXES: .cxx .cc .c .o .c.o: - $(CC) $(CFLAGS) -c $*.c + $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $< .cxx.o: - $(CPP) $(CPFLAGS) -c $*.cxx + $(CPP) $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $< .cc.o: - $(CPP) $(CPFLAGS) -c $*.cc + $(CPP) $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $< # # generic cleanup code # Modified: vendor/ficl/dist/ReadMe.txt ============================================================================== --- vendor/ficl/dist/ReadMe.txt Tue May 12 02:38:48 2015 (r282802) +++ vendor/ficl/dist/ReadMe.txt Tue May 12 03:27:06 2015 (r282803) @@ -1,5 +1,5 @@ -FICL 3.03 -April 2002 +FICL 4.1.0 +October 2010 ________ OVERVIEW @@ -10,18 +10,22 @@ and development prototype language. Fic Command Language". For more information, please see the "doc" directory. -For release notes, please see "doc/ficl_rel.html". +For release notes, please see "doc/releases.html". ____________ INSTALLATION Ficl builds out-of-the-box on the following platforms: - * Linux: use "Makefile.linux". - * RiscOS: use "Makefile.riscos". + * NetBSD, FreeBSD: use "Makefile". + * Linux: use "Makefile.linux", but it should work with + "Makefile" as well. * Win32: use "ficl.dsw" / "ficl.dsp". -To port to other platforms, be sure to examine "sysdep.h", and -we suggest you start with the Linux makefile. (And please--feel -free to submit your portability changes!) +To port to other platforms, we suggest you start with the generic +"Makefile" and the "unix.c" / "unix.h" platform-specific implementation +files. (And please--feel free to submit your portability changes!) + +(Note: Ficl used to build under RiscOS, but we broke everything +for the 4.0 release. Please fix it and send us the diffs!) ____________ FICL LICENSE Added: vendor/ficl/dist/bit.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/ficl/dist/bit.c Tue May 12 03:27:06 2015 (r282803) @@ -0,0 +1,49 @@ +#include "ficl.h" + +int ficlBitGet(const unsigned char *bits, size_t index) + { + int byteIndex = index >> 3; + int bitIndex = index & 7; + unsigned char mask = (unsigned char)(128 >> bitIndex); + + return ((mask & bits[byteIndex]) ? 1 : 0); + } + + + +void ficlBitSet(unsigned char *bits, size_t index, int value) + { + int byteIndex = index >> 3; + int bitIndex = index & 7; + unsigned char mask = (unsigned char)(128 >> bitIndex); + + if (value) + bits[byteIndex] |= mask; + else + bits[byteIndex] &= ~mask; + } + + +void ficlBitGetString(unsigned char *destination, const unsigned char *source, int offset, int count, int destAlignment) + { + int bit = destAlignment - count; + while (count--) + ficlBitSet(destination, bit++, ficlBitGet(source, offset++)); + } + + +/* +** This will actually work correctly *regardless* of the local architecture. +** --lch +**/ +ficlUnsigned16 ficlNetworkUnsigned16(ficlUnsigned16 number) +{ + ficlUnsigned8 *pointer = (ficlUnsigned8 *)&number; + return (ficlUnsigned16)(((ficlUnsigned16)(pointer[0] << 8)) | (pointer[1])); +} + +ficlUnsigned32 ficlNetworkUnsigned32(ficlUnsigned32 number) +{ + ficlUnsigned16 *pointer = (ficlUnsigned16 *)&number; + return ((ficlUnsigned32)(ficlNetworkUnsigned16(pointer[0]) << 16)) | ficlNetworkUnsigned16(pointer[1]); +} Added: vendor/ficl/dist/callback.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/ficl/dist/callback.c Tue May 12 03:27:06 2015 (r282803) @@ -0,0 +1,76 @@ +#include "ficl.h" + + +extern ficlSystem *ficlSystemGlobal; + +/************************************************************************** + f i c l C a l l b a c k T e x t O u t +** Feeds text to the vm's output callback +**************************************************************************/ +void ficlCallbackTextOut(ficlCallback *callback, char *text) +{ + ficlOutputFunction textOut = NULL; + + if (callback != NULL) + { + if (callback->textOut != NULL) + textOut = callback->textOut; + else if ((callback->system != NULL) && (callback != &(callback->system->callback))) + { + ficlCallbackTextOut(&(callback->system->callback), text); + return; + } + } + + if ((textOut == NULL) && (ficlSystemGlobal != NULL)) + { + callback = &(ficlSystemGlobal->callback); + textOut = callback->textOut; + } + + if (textOut == NULL) + textOut = ficlCallbackDefaultTextOut; + + (textOut)(callback, text); + + return; +} + + +/************************************************************************** + f i c l C a l l b a c k E r r o r O u t +** Feeds text to the vm's error output callback +**************************************************************************/ +void ficlCallbackErrorOut(ficlCallback *callback, char *text) +{ + ficlOutputFunction errorOut = NULL; + + if (callback != NULL) + { + if (callback->errorOut != NULL) + errorOut = callback->errorOut; + else if ((callback->system != NULL) && (callback != &(callback->system->callback))) + { + ficlCallbackErrorOut(&(callback->system->callback), text); + return; + } + } + + if ((errorOut == NULL) && (ficlSystemGlobal != NULL)) + { + callback = &(ficlSystemGlobal->callback); + errorOut = callback->errorOut; + } + + if (errorOut == NULL) + { + ficlCallbackTextOut(callback, text); + return; + } + + (errorOut)(callback, text); + + return; +} + + Added: vendor/ficl/dist/compatibility.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/ficl/dist/compatibility.c Tue May 12 03:27:06 2015 (r282803) @@ -0,0 +1,284 @@ +#define FICL_FORCE_COMPATIBILITY 1 +#include "ficl.h" + + +FICL_PLATFORM_EXTERN ficlStack *stackCreate (unsigned cells) { return ficlStackCreate(NULL, "unknown", cells); } +FICL_PLATFORM_EXTERN void stackDelete (ficlStack *stack) { ficlStackDestroy(stack); } +FICL_PLATFORM_EXTERN int stackDepth (ficlStack *stack) { return ficlStackDepth(stack); } +FICL_PLATFORM_EXTERN void stackDrop (ficlStack *stack, int n) { ficlStackDrop(stack, n); } +FICL_PLATFORM_EXTERN ficlCell stackFetch (ficlStack *stack, int n) { return ficlStackFetch(stack, n); } +FICL_PLATFORM_EXTERN ficlCell stackGetTop (ficlStack *stack) { return ficlStackFetch(stack, 0); } +#if FICL_WANT_LOCALS +FICL_PLATFORM_EXTERN void stackLink (ficlStack *stack, int cells) { ficlStackLink(stack, cells); } +FICL_PLATFORM_EXTERN void stackUnlink (ficlStack *stack) { ficlStackUnlink(stack); } +#endif /* FICL_WANT_LOCALS */ +FICL_PLATFORM_EXTERN void stackPick (ficlStack *stack, int n) { ficlStackPick(stack, n); } +FICL_PLATFORM_EXTERN ficlCell stackPop (ficlStack *stack) { return ficlStackPop(stack); } +FICL_PLATFORM_EXTERN void *stackPopPtr (ficlStack *stack) { return ficlStackPopPointer(stack); } +FICL_PLATFORM_EXTERN ficlUnsigned stackPopUNS (ficlStack *stack) { return ficlStackPopUnsigned(stack); } +FICL_PLATFORM_EXTERN ficlInteger stackPopINT (ficlStack *stack) { return ficlStackPopInteger(stack); } +FICL_PLATFORM_EXTERN void stackPush (ficlStack *stack, ficlCell cell) { ficlStackPush(stack, cell); } +FICL_PLATFORM_EXTERN void stackPushPtr (ficlStack *stack, void *pointer) { ficlStackPushPointer(stack, pointer); } +FICL_PLATFORM_EXTERN void stackPushUNS (ficlStack *stack, ficlUnsigned u) { ficlStackPushUnsigned(stack, u); } +FICL_PLATFORM_EXTERN void stackPushINT (ficlStack *stack, ficlInteger i) { ficlStackPushInteger(stack, i); } +FICL_PLATFORM_EXTERN void stackReset (ficlStack *stack) { ficlStackReset(stack); } +FICL_PLATFORM_EXTERN void stackRoll (ficlStack *stack, int n) { ficlStackRoll(stack, n); } +FICL_PLATFORM_EXTERN void stackSetTop (ficlStack *stack, ficlCell cell) { ficlStackSetTop(stack, cell); } +FICL_PLATFORM_EXTERN void stackStore (ficlStack *stack, int n, ficlCell cell) { ficlStackStore(stack, n, cell); } + +#if (FICL_WANT_FLOAT) +FICL_PLATFORM_EXTERN ficlFloat stackPopFloat (ficlStack *stack) { return ficlStackPopFloat(stack); } +FICL_PLATFORM_EXTERN void stackPushFloat(ficlStack *stack, ficlFloat f) { ficlStackPushFloat(stack, f); } +#endif + +FICL_PLATFORM_EXTERN int wordIsImmediate(ficlWord *word) { return ficlWordIsImmediate(word); } +FICL_PLATFORM_EXTERN int wordIsCompileOnly(ficlWord *word) { return ficlWordIsCompileOnly(word); } + + +FICL_PLATFORM_EXTERN void vmBranchRelative(ficlVm *vm, int offset) { ficlVmBranchRelative(vm, offset); } +FICL_PLATFORM_EXTERN ficlVm *vmCreate (ficlVm *vm, unsigned nPStack, unsigned nRStack) { return ficlVmCreate(vm, nPStack, nRStack); } +FICL_PLATFORM_EXTERN void vmDelete (ficlVm *vm) { ficlVmDestroy(vm); } +FICL_PLATFORM_EXTERN void vmExecute (ficlVm *vm, ficlWord *word) { ficlVmExecuteWord(vm, word); } +FICL_PLATFORM_EXTERN ficlDictionary *vmGetDict (ficlVm *vm) { return ficlVmGetDictionary(vm); } +FICL_PLATFORM_EXTERN char * vmGetString (ficlVm *vm, ficlCountedString *spDest, char delimiter) { return ficlVmGetString(vm, spDest, delimiter); } +FICL_PLATFORM_EXTERN ficlString vmGetWord (ficlVm *vm) { return ficlVmGetWord(vm); } +FICL_PLATFORM_EXTERN ficlString vmGetWord0 (ficlVm *vm) { return ficlVmGetWord0(vm); } +FICL_PLATFORM_EXTERN int vmGetWordToPad (ficlVm *vm) { return ficlVmGetWordToPad(vm); } +FICL_PLATFORM_EXTERN ficlString vmParseString (ficlVm *vm, char delimiter) { return ficlVmParseString(vm, delimiter); } +FICL_PLATFORM_EXTERN ficlString vmParseStringEx(ficlVm *vm, char delimiter, char skipLeading) { return ficlVmParseStringEx(vm, delimiter, skipLeading); } +FICL_PLATFORM_EXTERN ficlCell vmPop (ficlVm *vm) { return ficlVmPop(vm); } +FICL_PLATFORM_EXTERN void vmPush (ficlVm *vm, ficlCell cell) { ficlVmPush(vm, cell); } +FICL_PLATFORM_EXTERN void vmPopIP (ficlVm *vm) { ficlVmPopIP(vm); } +FICL_PLATFORM_EXTERN void vmPushIP (ficlVm *vm, ficlIp newIP) { ficlVmPushIP(vm, newIP); } +FICL_PLATFORM_EXTERN void vmQuit (ficlVm *vm) { ficlVmQuit(vm); } +FICL_PLATFORM_EXTERN void vmReset (ficlVm *vm) { ficlVmReset(vm); } +FICL_PLATFORM_EXTERN void vmThrow (ficlVm *vm, int except) { ficlVmThrow(vm, except); } +FICL_PLATFORM_EXTERN void vmThrowErr (ficlVm *vm, char *fmt, ...) { va_list list; va_start(list, fmt); ficlVmThrowErrorVararg(vm, fmt, list); va_end(list); } + +FICL_PLATFORM_EXTERN void vmCheckStack(ficlVm *vm, int popCells, int pushCells) { FICL_IGNORE(vm); FICL_IGNORE(popCells); FICL_IGNORE(pushCells); FICL_STACK_CHECK(vm->dataStack, popCells, pushCells); } +#if FICL_WANT_FLOAT +FICL_PLATFORM_EXTERN void vmCheckFStack(ficlVm *vm, int popCells, int pushCells) { FICL_IGNORE(vm); FICL_IGNORE(popCells); FICL_IGNORE(pushCells); FICL_STACK_CHECK(vm->floatStack, popCells, pushCells); } +#endif + +FICL_PLATFORM_EXTERN void vmPushTib (ficlVm *vm, char *text, ficlInteger nChars, ficlTIB *pSaveTib) { ficlVmPushTib(vm, text, nChars, pSaveTib); } +FICL_PLATFORM_EXTERN void vmPopTib (ficlVm *vm, ficlTIB *pTib) { ficlVmPopTib(vm, pTib); } + +FICL_PLATFORM_EXTERN int isPowerOfTwo(ficlUnsigned u) { return ficlIsPowerOfTwo(u); } + +#if defined(_WIN32) +/* #SHEESH +** Why do Microsoft Meatballs insist on contaminating +** my namespace with their string functions??? +*/ +#pragma warning(disable: 4273) +#endif +char *ltoa(ficlInteger value, char *string, int radix ) { return ficlLtoa(value, string, radix); } +char *ultoa(ficlUnsigned value, char *string, int radix ) { return ficlUltoa(value, string, radix); } +char *strrev( char *string ) { return ficlStringReverse(string); } +#if defined(_WIN32) +#pragma warning(default: 4273) +#endif +FICL_PLATFORM_EXTERN char digit_to_char(int value) { return ficlDigitToCharacter(value); } +FICL_PLATFORM_EXTERN char *skipSpace(char *cp, char *end) { return ficlStringSkipSpace(cp, end); } +FICL_PLATFORM_EXTERN char *caseFold(char *cp) { return ficlStringCaseFold(cp); } +FICL_PLATFORM_EXTERN int strincmp(char *cp1, char *cp2, ficlUnsigned count) { return ficlStrincmp(cp1, cp2, count); } + +FICL_PLATFORM_EXTERN void hashForget (ficlHash *hash, void *where) { ficlHashForget(hash, where); } +FICL_PLATFORM_EXTERN ficlUnsigned16 hashHashCode (ficlString string) { return ficlHashCode(string); } +FICL_PLATFORM_EXTERN void hashInsertWord(ficlHash *hash, ficlWord *word) { ficlHashInsertWord(hash, word); } +FICL_PLATFORM_EXTERN ficlWord *hashLookup (ficlHash *hash, ficlString string, ficlUnsigned16 hashCode) { return ficlHashLookup(hash, string, hashCode); } +FICL_PLATFORM_EXTERN void hashReset (ficlHash *hash) { ficlHashReset(hash); } + + +FICL_PLATFORM_EXTERN void *alignPtr(void *ptr) { return ficlAlignPointer(ptr); } +FICL_PLATFORM_EXTERN void dictAbortDefinition(ficlDictionary *dictionary) { ficlDictionaryAbortDefinition(dictionary); } +FICL_PLATFORM_EXTERN void dictAlign (ficlDictionary *dictionary) { ficlDictionaryAlign(dictionary); } +FICL_PLATFORM_EXTERN int dictAllot (ficlDictionary *dictionary, int n) { ficlDictionaryAllot(dictionary, n); return 0; } +FICL_PLATFORM_EXTERN int dictAllotCells (ficlDictionary *dictionary, int cells) { ficlDictionaryAllotCells(dictionary, cells); return 0; } +FICL_PLATFORM_EXTERN void dictAppendCell (ficlDictionary *dictionary, ficlCell cell) { ficlDictionaryAppendCell(dictionary, cell); } +FICL_PLATFORM_EXTERN void dictAppendChar (ficlDictionary *dictionary, char c) { ficlDictionaryAppendCharacter(dictionary, c); } +FICL_PLATFORM_EXTERN ficlWord *dictAppendWord (ficlDictionary *dictionary, + char *name, + ficlPrimitive code, + ficlUnsigned8 flags) + { return ficlDictionaryAppendPrimitive(dictionary, name, code, flags); } +FICL_PLATFORM_EXTERN ficlWord *dictAppendWord2(ficlDictionary *dictionary, + ficlString name, + ficlPrimitive code, + ficlUnsigned8 flags) + { return ficlDictionaryAppendWord(dictionary, name, code, flags); } +FICL_PLATFORM_EXTERN void dictAppendUNS (ficlDictionary *dictionary, ficlUnsigned u) { ficlDictionaryAppendUnsigned(dictionary, u); } +FICL_PLATFORM_EXTERN int dictCellsAvail (ficlDictionary *dictionary) { return ficlDictionaryCellsAvailable(dictionary); } +FICL_PLATFORM_EXTERN int dictCellsUsed (ficlDictionary *dictionary) { return ficlDictionaryCellsUsed(dictionary); } +FICL_PLATFORM_EXTERN void dictCheck (ficlDictionary *dictionary, ficlVm *vm, int n) { FICL_IGNORE(dictionary); FICL_IGNORE(vm); FICL_IGNORE(n); FICL_VM_DICTIONARY_CHECK(vm, dictionary, n); } +FICL_PLATFORM_EXTERN ficlDictionary *dictCreate(unsigned cells) { return ficlDictionaryCreate(NULL, cells); } +FICL_PLATFORM_EXTERN ficlDictionary *dictCreateHashed(unsigned cells, unsigned hash) { return ficlDictionaryCreateHashed(NULL, cells, hash); } +FICL_PLATFORM_EXTERN ficlHash *dictCreateWordlist(ficlDictionary *dictionary, int nBuckets) { return ficlDictionaryCreateWordlist(dictionary, nBuckets); } +FICL_PLATFORM_EXTERN void dictDelete (ficlDictionary *dictionary) { ficlDictionaryDestroy(dictionary); } +FICL_PLATFORM_EXTERN void dictEmpty (ficlDictionary *dictionary, unsigned nHash) { ficlDictionaryEmpty(dictionary, nHash); } +#if FICL_WANT_FLOAT +FICL_PLATFORM_EXTERN void ficlPrimitiveHashSummary(ficlVm *vm); +FICL_PLATFORM_EXTERN void dictHashSummary(ficlVm *vm) { ficlPrimitiveHashSummary(vm); } +#endif +FICL_PLATFORM_EXTERN int dictIncludes (ficlDictionary *dictionary, void *p) { return ficlDictionaryIncludes(dictionary, p); } +FICL_PLATFORM_EXTERN ficlWord *dictLookup (ficlDictionary *dictionary, ficlString name) { return ficlDictionaryLookup(dictionary, name); } +#if FICL_WANT_LOCALS +FICL_PLATFORM_EXTERN ficlWord *ficlLookupLoc (ficlSystem *system, ficlString name) { return ficlDictionaryLookup(ficlSystemGetLocals(system), name); } +#endif +FICL_PLATFORM_EXTERN void dictResetSearchOrder(ficlDictionary *dictionary) { ficlDictionaryResetSearchOrder(dictionary); } +FICL_PLATFORM_EXTERN void dictSetFlags (ficlDictionary *dictionary, ficlUnsigned8 set, ficlUnsigned8 clear) { ficlDictionarySetFlags(dictionary, set); ficlDictionaryClearFlags(dictionary, clear); } +FICL_PLATFORM_EXTERN void dictSetImmediate(ficlDictionary *dictionary) { ficlDictionarySetImmediate(dictionary); } +FICL_PLATFORM_EXTERN void dictUnsmudge (ficlDictionary *dictionary) { ficlDictionaryUnsmudge(dictionary); } +FICL_PLATFORM_EXTERN ficlCell *dictWhere (ficlDictionary *dictionary) { return ficlDictionaryWhere(dictionary); } + +FICL_PLATFORM_EXTERN int ficlAddParseStep(ficlSystem *system, ficlWord *word) { return ficlSystemAddParseStep(system, word); } +FICL_PLATFORM_EXTERN void ficlAddPrecompiledParseStep(ficlSystem *system, char *name, ficlParseStep pStep) { ficlSystemAddPrimitiveParseStep(system, name, pStep); } +FICL_PLATFORM_EXTERN void ficlPrimitiveParseStepList(ficlVm *vm); +FICL_PLATFORM_EXTERN void ficlListParseSteps(ficlVm *vm) { ficlPrimitiveParseStepList(vm); } + +FICL_PLATFORM_EXTERN void ficlTermSystem(ficlSystem *system) { ficlSystemDestroy(system); } +FICL_PLATFORM_EXTERN int ficlEvaluate(ficlVm *vm, char *pText) { return ficlVmEvaluate(vm, pText); } +FICL_PLATFORM_EXTERN int ficlExec (ficlVm *vm, char *pText) { ficlString s; FICL_STRING_SET_FROM_CSTRING(s, pText); return ficlVmExecuteString(vm, s); } +FICL_PLATFORM_EXTERN int ficlExecC(ficlVm *vm, char *pText, ficlInteger nChars) { ficlString s; FICL_STRING_SET_POINTER(s, pText); FICL_STRING_SET_LENGTH(s, nChars); return ficlVmExecuteString(vm, s); } +FICL_PLATFORM_EXTERN int ficlExecXT(ficlVm *vm, ficlWord *word) { return ficlVmExecuteXT(vm, word); } +FICL_PLATFORM_EXTERN void ficlFreeVM(ficlVm *vm) { ficlVmDestroy(vm); } + + + + + +static void thunkTextOut(ficlCallback *callback, char *text) + { + ficlCompatibilityOutputFunction outputFunction; + if ((callback->vm != NULL) && (callback->vm->thunkedTextout != NULL)) + outputFunction = callback->system->thunkedTextout; + else if (callback->system->thunkedTextout != NULL) + outputFunction = callback->system->thunkedTextout; + else + { + ficlCallbackDefaultTextOut(callback, text); + return; + } + ficlCompatibilityTextOutCallback(callback, text, outputFunction); + } + + +FICL_PLATFORM_EXTERN void vmSetTextOut(ficlVm *vm, ficlCompatibilityOutputFunction textOut) + { + vm->thunkedTextout = textOut; + ficlVmSetTextOut(vm, thunkTextOut); + } + +FICL_PLATFORM_EXTERN void vmTextOut (ficlVm *vm, char *text, int fNewline) + { + ficlVmTextOut(vm, text); + if (fNewline) + ficlVmTextOut(vm, "\n"); + } + + +FICL_PLATFORM_EXTERN void ficlTextOut (ficlVm *vm, char *text, int fNewline) + { + vmTextOut(vm, text, fNewline); + } + +extern ficlSystem *ficlSystemGlobal; +static defaultStackSize = FICL_DEFAULT_STACK_SIZE; +FICL_PLATFORM_EXTERN int ficlSetStackSize(int nStackCells) +{ + if (defaultStackSize < nStackCells) + defaultStackSize = nStackCells; + if ((ficlSystemGlobal != NULL) && (ficlSystemGlobal->stackSize < nStackCells)) + ficlSystemGlobal->stackSize = nStackCells; + return defaultStackSize; +} + + +FICL_PLATFORM_EXTERN ficlSystem *ficlInitSystemEx(ficlSystemInformation *fsi) +{ + ficlSystem *returnValue; + ficlCompatibilityOutputFunction thunkedTextout; + ficlSystemInformation clone; + + memcpy(&clone, fsi, sizeof(clone)); + thunkedTextout = (ficlCompatibilityOutputFunction)clone.textOut; + clone.textOut = clone.errorOut = thunkTextOut; + + returnValue = ficlSystemCreate(&clone); + if (returnValue != NULL) + { + returnValue->thunkedTextout = thunkedTextout; + } + return returnValue; +} + + +FICL_PLATFORM_EXTERN ficlSystem *ficlInitSystem(int nDictCells) +{ + ficlSystemInformation fsi; + ficlSystemInformationInitialize(&fsi); + fsi.dictionarySize = nDictCells; + if (fsi.stackSize < defaultStackSize) + fsi.stackSize = defaultStackSize; + return ficlSystemCreate(&fsi); +} + + + + +FICL_PLATFORM_EXTERN ficlVm *ficlNewVM(ficlSystem *system) +{ + ficlVm *returnValue = ficlSystemCreateVm(system); + if (returnValue != NULL) + { + if ((returnValue->callback.textOut != NULL) && (returnValue->callback.textOut != thunkTextOut)) + { + returnValue->thunkedTextout = (ficlCompatibilityOutputFunction)returnValue->callback.textOut; + returnValue->callback.textOut = thunkTextOut; + } + if ((returnValue->callback.errorOut != NULL) && (returnValue->callback.errorOut != thunkTextOut)) + { + if (returnValue->thunkedTextout == NULL) + returnValue->thunkedTextout = (ficlCompatibilityOutputFunction)returnValue->callback.errorOut; + returnValue->callback.errorOut = thunkTextOut; + } + } + return returnValue; +} + + + +FICL_PLATFORM_EXTERN ficlWord *ficlLookup(ficlSystem *system, char *name) { return ficlSystemLookup(system, name); } +FICL_PLATFORM_EXTERN ficlDictionary *ficlGetDict(ficlSystem *system) { return ficlSystemGetDictionary(system); } +FICL_PLATFORM_EXTERN ficlDictionary *ficlGetEnv (ficlSystem *system) { return ficlSystemGetEnvironment(system); } +FICL_PLATFORM_EXTERN void ficlSetEnv (ficlSystem *system, char *name, ficlInteger value) { ficlDictionarySetConstant(ficlSystemGetDictionary(system), name, value); } +FICL_PLATFORM_EXTERN void ficlSetEnvD(ficlSystem *system, char *name, ficlInteger high, ficlInteger low) { ficl2Unsigned value; FICL_2UNSIGNED_SET(low, high, value); ficlDictionarySet2Constant(ficlSystemGetDictionary(system), name, FICL_2UNSIGNED_TO_2INTEGER(value)); } +#if FICL_WANT_LOCALS +FICL_PLATFORM_EXTERN ficlDictionary *ficlGetLoc (ficlSystem *system) { return ficlSystemGetLocals(system); } +#endif +FICL_PLATFORM_EXTERN int ficlBuild(ficlSystem *system, char *name, ficlPrimitive code, char flags) { ficlDictionary *dictionary = ficlSystemGetDictionary(system); ficlDictionaryLock(dictionary, FICL_TRUE); ficlDictionaryAppendPrimitive(dictionary, name, code, flags); ficlDictionaryLock(dictionary, FICL_FALSE); return 0; } +FICL_PLATFORM_EXTERN void ficlCompileCore(ficlSystem *system) { ficlSystemCompileCore(system); } +FICL_PLATFORM_EXTERN void ficlCompilePrefix(ficlSystem *system) { ficlSystemCompilePrefix(system); } +FICL_PLATFORM_EXTERN void ficlCompileSearch(ficlSystem *system) { ficlSystemCompileSearch(system); } +FICL_PLATFORM_EXTERN void ficlCompileSoftCore(ficlSystem *system) { ficlSystemCompileSoftCore(system); } +FICL_PLATFORM_EXTERN void ficlCompileTools(ficlSystem *system) { ficlSystemCompileTools(system); } +FICL_PLATFORM_EXTERN void ficlCompileFile(ficlSystem *system) { ficlSystemCompileFile(system); } +#if FICL_WANT_FLOAT +FICL_PLATFORM_EXTERN void ficlCompileFloat(ficlSystem *system) { ficlSystemCompileFloat(system); } +FICL_PLATFORM_EXTERN int ficlParseFloatNumber( ficlVm *vm, ficlString string) { return ficlVmParseFloatNumber(vm, string); } +#endif +#if FICL_WANT_PLATFORM +FICL_PLATFORM_EXTERN void ficlCompilePlatform(ficlSystem *system) { ficlSystemCompilePlatform(system); } +#endif +FICL_PLATFORM_EXTERN int ficlParsePrefix(ficlVm *vm, ficlString string) { return ficlVmParsePrefix(vm, string); } + +FICL_PLATFORM_EXTERN int ficlParseNumber(ficlVm *vm, ficlString string) { return ficlVmParseNumber(vm, string); } +FICL_PLATFORM_EXTERN void ficlTick(ficlVm *vm) { ficlPrimitiveTick(vm); } +FICL_PLATFORM_EXTERN void parseStepParen(ficlVm *vm) { ficlPrimitiveParseStepParen(vm); } + +FICL_PLATFORM_EXTERN int isAFiclWord(ficlDictionary *dictionary, ficlWord *word) { return ficlDictionaryIsAWord(dictionary, word); } + + +FICL_PLATFORM_EXTERN void buildTestInterface(ficlSystem *system) { ficlSystemCompileExtras(system); } + + Added: vendor/ficl/dist/contrib/xclasses/readme.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/ficl/dist/contrib/xclasses/readme.txt Tue May 12 03:27:06 2015 (r282803) @@ -0,0 +1,111 @@ +XClasses is a simple IDL written in Python. +You declare your classes, methods, and members as Python objects, +and XClasses will generate the .c, .h, and .f files for you. +Not only do the Forth classes line up with their C counterparts +exactly, but all non-static methods (virtual and non-virtual) +are *automatically* thunked. In other words, any method +declared in XClasses and implemented in C can be called from +the matching Ficl class, and the C method will be automatically +called with the correct arguments. XClasses handles floating-point +arguments too! + +Known limitations: + * All arguments must be one cell wide. (That means + only single-precision floats, too.) + + + +To use: + * Declare all your classes in a .py script + * Include "xclasses.h" everywhere you need your classes + * Include xclasses.cpp in your project somewhere + * Call + "xclasses.f" included + from your Ficl initialization script + +And you're mostly done! + +Simply including xclasses.f is not enough, though. You must +explicitly instantiate your classes. This is to allow you a +chance to add your own methods to the class. For a class +named "myCallback", it would look like this: + + declare-myCallback + end-myCallback + +You also have to define the "init" function for the class. +Most of the time this will work fine: + + declare-myCallback + use-default-init + end-myCallback + + +The "default" init function calls the super class's init +function, then sets all data members to 0. If this isn't +what you want, roll your own. The init function takes +the usual 2-cell "this" pointer as its argument: + + declare-myCallback + : init ( 2:this ) ... + ; + end-myCallback + +For a do-nothing init function, you'll want this: + + declare-myCallback + : init 2drop ; + end-myCallback + + +Here's a random example from the simple game I'm working on: + +----------------------------------------------------------------- +skinStream = xMethod("stream", "void").setVirtual(1) +gjeSkin.addMethod(skinStream) + +## +## gjeTexture +## +## +gjeTexture = xClass("gjeTexture") +gjeTexture.setParent(gjeSkin) +gjeTexture.addMethod(skinStream) +gjeTexture.addMethod(xMethod("clear", "void")) +gjeTexture.addMember(xVariable("texture", "LPDIRECT3DTEXTURE8")) +gjeTexture.addMember(xVariable("name", "char *")) +gjeTexture.addMember(xVariable("variation", "int")) +gjeTexture.addMember(xVariable("material", "D3DMATERIAL8 *")) + +----------------------------------------------------------------- + +I sure hope that's enough to get you started. + + + +Random notes: +* XClasses doesn't deal well with struct-packing issues. It assumes + pretty much everything will be 4-byte aligned. This can bite you + if you add a 64-bit int... the C compiler may align it for you, + and XClasses won't know about it. (This could be fixed in a future + release... are you volunteering?) For now, it's best to declare + your classes such that 64-bit ints are naturally 8-byte aligned. + +* If you don't want to have to declare each class in turn, + you can add something like this to the end of your Python script: +----- +def declare(name): + xAddFiclFooter("\t\"" + name + ".constant\" \" sfind swap drop 0= [if] declare-" + name + " use-default-init end-" + name + " [endif] \" evaluate") + + +xAddFiclFooter(": xclassesDeclare") +for c in classes: + declare(c.name) +xAddFiclFooter("\t;") +----- + and then call "xclassesDeclare" from your Ficl script just after + including "xclasses.f". + + +--lch +larry@hastings.org Added: vendor/ficl/dist/contrib/xclasses/xclasses.py ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/ficl/dist/contrib/xclasses/xclasses.py Tue May 12 03:27:06 2015 (r282803) @@ -0,0 +1,870 @@ +import copy +import string +import sys +import time +import types + + +def capitalize(s): + return string.upper(s[0]) + s[1:] + +def fprint(f, s): + print >> f, s + + +def fprintHeader(f, comment = "//"): + fprint(f, comment) + fprint(f, comment + " Generated by xclasses.py at " + time.strftime("%Y/%m/%d %H:%M:%S")) + fprint(f, comment) + fprint(f, comment) + fprint(f, "") + +def fprintFooter(f, comment = "//"): + fprint(f, "") + fprint(f, "") + fprint(f, comment + " end of file") + fprint(f, "") + +multicallCallTypeFunction = 0 +multicallCallTypeMethod = 1 +multicallCallTypeVirtualMethod = 2 + +multicallReturnTypeVoid = 0 +multicallReturnTypeInteger = 16 +multicallReturnTypeCstring = 32 +multicallReturnTypeFloat = 48 + +multicallExplicitVtable = 512 + + +ficlVmName = "ficlVm" + +h_headers = [] +def xAddHHeader(line): + h_headers.append(line) + +h_footers = [] +def xAddHFooter(line): + h_footers.append(line) + +ficl_headers = [] +def xAddFiclHeader(line): + ficl_headers.append(line) + +ficl_footers = [] +def xAddFiclFooter(line): + ficl_footers.append(line) + +c_headers = [] +def xAddCHeader(line): + c_headers.append(line) + +c_footers = [] +def xAddCFooter(line): + c_footers.append(line) + + +classes = [] + +class xVariable: + def __init__(self, name, typeCPP = None, cells = None, count = None, defaultValue = None, cstring = None): + self.comments = [] + self.setName(name) + self.setCells(cells) + self.setCount(count) + self.setDefaultValue(defaultValue) + self.setCString(cstring) + self.setTypeCPP(typeCPP) + + def setName(self, name): + self.name = name + return self + + def setTypeCPP(self, typeCPP): + self.typeCPP = typeCPP + if (typeCPP == "char *"): + self.setCString(1) + return self + + def setCells(self, cells): + if cells == None: + self.cells = 1 + else: + self.cells = cells + return self + + def setCString(self, cstring): + self.cstring = cstring + return self + + def isCString(self): + return self.cstring + + def getTotalSize(self): + return self.cells * self.count + + def setCount(self, count): + if type(count) != types.IntType: + count = 1 + self.count = count + return self + + def setDefaultValue(self, defaultValue): + if (defaultValue != None) and (type(defaultValue) != types.StringType): + defaultValue = str(defaultValue) + self.defaultValue = defaultValue + return self + + def addComment(self, c): + self.comments.append(c) + return self + + def isFloat(self): + return self.typeCPP == "float" + + def stringCPP(self, wantDefaultValues=1): + if (type(self.typeCPP) != types.StringType): + sys.exit("didn't set a CPP type on variable " + self.name + "!") + output = self.typeCPP + if (self.typeCPP[-1] != "*") and (self.typeCPP[-1] != "&"): + output += " " + output += self.name + if self.count > 1: + output += "[" + str(self.count) + "]" + if self.count == 0: + output += "[]" + if wantDefaultValues and (self.defaultValue != None): + output += " = " + self.defaultValue + return output + + def printH(self, f): + if len(self.comments): + for comment in self.comments: + fprint(f, "\t" + "// " + comment) + fprint(f, "\t" + self.stringCPP() + ";") + + def printF(self, f): + totalCells = self.count * self.cells + if (totalCells <= 1): + typeF = "cell:" + else: + typeF = str(totalCells) + " cells:" + if len(self.comments): + for comment in self.comments: + fprint(f, "\t" + "// " + comment) + fprint(f, "\t" + "S\" " + typeF + " ." + self.name + " \" evaluate") + + +class xMethod: + def __init__(self, name, returnType = None, virtual = None, static = None, body = None): + self.arguments = [] + self.comments = [] + + self.setName(name) + self.setReturnType(returnType) + self.setVirtual(virtual) + self.setStatic(static) + self.setBody(body) + self.setThunkVariable(None) + self.vtableOffset = 0 + + def copy(): + clone = xMethod(self.name, self.returnType, self.virtual, self.static) + clone.arguments = self.arguments + clone.comments = self.comments + + def setName(self, name): + self.name = name + return self + + def setReturnType(self, returnType): + if returnType.__class__ == xVariable: + self.returnType = returnType + elif type(returnType) == types.StringType: + self.returnType = xVariable("ignored", returnType) + else: + self.returnType = None + return self + + def returnTypeIsVoid(self): + return(self.returnType == None) or (self.returnType.typeCPP == None) or (self.returnType.typeCPP == "") or (self.returnType.typeCPP == "void") + + def setVirtual(self, virtual): + self.virtual = virtual + return self + + def isVirtual(self): + return self.virtual > 0 + + def isPureVirtual(self): + return self.virtual > 1 + + def setStatic(self, static): + self.static = static + return self + + def setThunkVariable(self, thunkVariable): + self.thunkVariable = thunkVariable + return self + + def isStatic(self): + return self.static + + # a constructor or a destructor + def isClassSpecial(self): + return (self.returnType == None) or (self.returnType.typeCPP == None) or (self.returnType.typeCPP == "") + + def setBody(self, body): + self.body = body + return self + + def addArgument(self, argument): + self.arguments.append(argument) + return self + + def addComment(self, c): + self.comments.append(c) + return self + + def prototype(self, isDefinition=None): + arguments = "" + for a in self.arguments: + if len(arguments): + arguments += ", " + arguments += a.stringCPP(not isDefinition) + + if len(arguments) == 0: + arguments = "void" + className = "" + if (isDefinition): + className = self.memberOf.name + "::" + modifiers = "" *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue May 12 03:29:53 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F08537D2; Tue, 12 May 2015 03:29:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DB0E11691; Tue, 12 May 2015 03:29:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4C3Tqu4071887; Tue, 12 May 2015 03:29:52 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4C3Topf071873; Tue, 12 May 2015 03:29:50 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201505120329.t4C3Topf071873@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Tue, 12 May 2015 03:29:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r282804 - in vendor/ficl/4.1.0: . contrib doc doc/articles doc/graphics doc/source ficlplatform softcore softwords 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.20 Precedence: list List-Id: "SVN commit messages 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, 12 May 2015 03:29:53 -0000 Author: pfg Date: Tue May 12 03:29:50 2015 New Revision: 282804 URL: https://svnweb.freebsd.org/changeset/base/282804 Log: Tag ficl 4.1.0 Added: vendor/ficl/4.1.0/ - copied from r282801, vendor/ficl/dist/ vendor/ficl/4.1.0/Makefile - copied unchanged from r282803, vendor/ficl/dist/Makefile vendor/ficl/4.1.0/Makefile.ansi - copied unchanged from r282803, vendor/ficl/dist/Makefile.ansi vendor/ficl/4.1.0/bit.c - copied unchanged from r282803, vendor/ficl/dist/bit.c vendor/ficl/4.1.0/callback.c - copied unchanged from r282803, vendor/ficl/dist/callback.c vendor/ficl/4.1.0/compatibility.c - copied unchanged from r282803, vendor/ficl/dist/compatibility.c vendor/ficl/4.1.0/contrib/ - copied from r282803, vendor/ficl/dist/contrib/ vendor/ficl/4.1.0/dictionary.c - copied unchanged from r282803, vendor/ficl/dist/dictionary.c vendor/ficl/4.1.0/doc/api.html - copied unchanged from r282803, vendor/ficl/dist/doc/api.html vendor/ficl/4.1.0/doc/articles/ - copied from r282803, vendor/ficl/dist/doc/articles/ vendor/ficl/4.1.0/doc/debugger.html - copied unchanged from r282803, vendor/ficl/dist/doc/debugger.html vendor/ficl/4.1.0/doc/dpans.html - copied unchanged from r282803, vendor/ficl/dist/doc/dpans.html vendor/ficl/4.1.0/doc/graphics/ - copied from r282803, vendor/ficl/dist/doc/graphics/ vendor/ficl/4.1.0/doc/license.html - copied unchanged from r282803, vendor/ficl/dist/doc/license.html vendor/ficl/4.1.0/doc/links.html - copied unchanged from r282803, vendor/ficl/dist/doc/links.html vendor/ficl/4.1.0/doc/locals.html - copied unchanged from r282803, vendor/ficl/dist/doc/locals.html vendor/ficl/4.1.0/doc/oop.html - copied unchanged from r282803, vendor/ficl/dist/doc/oop.html vendor/ficl/4.1.0/doc/parsesteps.html - copied unchanged from r282803, vendor/ficl/dist/doc/parsesteps.html vendor/ficl/4.1.0/doc/releases.html - copied unchanged from r282803, vendor/ficl/dist/doc/releases.html vendor/ficl/4.1.0/doc/source/ - copied from r282803, vendor/ficl/dist/doc/source/ vendor/ficl/4.1.0/doc/upgrading.html - copied unchanged from r282803, vendor/ficl/dist/doc/upgrading.html vendor/ficl/4.1.0/double.c - copied unchanged from r282803, vendor/ficl/dist/double.c vendor/ficl/4.1.0/extras.c - copied unchanged from r282803, vendor/ficl/dist/extras.c vendor/ficl/4.1.0/ficlcompatibility.h - copied unchanged from r282803, vendor/ficl/dist/ficlcompatibility.h vendor/ficl/4.1.0/ficldll.def - copied unchanged from r282803, vendor/ficl/dist/ficldll.def vendor/ficl/4.1.0/ficldll.dsp - copied unchanged from r282803, vendor/ficl/dist/ficldll.dsp vendor/ficl/4.1.0/ficlexe.dsp - copied unchanged from r282803, vendor/ficl/dist/ficlexe.dsp vendor/ficl/4.1.0/ficllib.dsp - copied unchanged from r282803, vendor/ficl/dist/ficllib.dsp vendor/ficl/4.1.0/ficllocal.h - copied unchanged from r282803, vendor/ficl/dist/ficllocal.h vendor/ficl/4.1.0/ficlplatform/ - copied from r282803, vendor/ficl/dist/ficlplatform/ vendor/ficl/4.1.0/ficltokens.h - copied unchanged from r282803, vendor/ficl/dist/ficltokens.h vendor/ficl/4.1.0/hash.c - copied unchanged from r282803, vendor/ficl/dist/hash.c vendor/ficl/4.1.0/lzcompress.c - copied unchanged from r282803, vendor/ficl/dist/lzcompress.c vendor/ficl/4.1.0/lzuncompress.c - copied unchanged from r282803, vendor/ficl/dist/lzuncompress.c vendor/ficl/4.1.0/main.c - copied unchanged from r282803, vendor/ficl/dist/main.c vendor/ficl/4.1.0/primitives.c - copied unchanged from r282803, vendor/ficl/dist/primitives.c vendor/ficl/4.1.0/softcore/ - copied from r282803, vendor/ficl/dist/softcore/ vendor/ficl/4.1.0/system.c - copied unchanged from r282803, vendor/ficl/dist/system.c vendor/ficl/4.1.0/utility.c - copied unchanged from r282803, vendor/ficl/dist/utility.c vendor/ficl/4.1.0/word.c - copied unchanged from r282803, vendor/ficl/dist/word.c Replaced: vendor/ficl/4.1.0/Makefile.linux - copied unchanged from r282803, vendor/ficl/dist/Makefile.linux vendor/ficl/4.1.0/ReadMe.txt - copied unchanged from r282803, vendor/ficl/dist/ReadMe.txt vendor/ficl/4.1.0/doc/favicon.ico - copied unchanged from r282803, vendor/ficl/dist/doc/favicon.ico vendor/ficl/4.1.0/doc/ficl.html - copied unchanged from r282803, vendor/ficl/dist/doc/ficl.html vendor/ficl/4.1.0/doc/index.html - copied unchanged from r282803, vendor/ficl/dist/doc/index.html vendor/ficl/4.1.0/ficl.dsw - copied unchanged from r282803, vendor/ficl/dist/ficl.dsw vendor/ficl/4.1.0/ficl.h - copied unchanged from r282803, vendor/ficl/dist/ficl.h vendor/ficl/4.1.0/fileaccess.c - copied unchanged from r282803, vendor/ficl/dist/fileaccess.c vendor/ficl/4.1.0/float.c - copied unchanged from r282803, vendor/ficl/dist/float.c vendor/ficl/4.1.0/prefix.c - copied unchanged from r282803, vendor/ficl/dist/prefix.c vendor/ficl/4.1.0/search.c - copied unchanged from r282803, vendor/ficl/dist/search.c vendor/ficl/4.1.0/softcore.c - copied unchanged from r282803, vendor/ficl/dist/softcore.c vendor/ficl/4.1.0/stack.c - copied unchanged from r282803, vendor/ficl/dist/stack.c vendor/ficl/4.1.0/test/asm68k.4th - copied unchanged from r282803, vendor/ficl/dist/test/asm68k.4th vendor/ficl/4.1.0/test/core.fr - copied unchanged from r282803, vendor/ficl/dist/test/core.fr vendor/ficl/4.1.0/test/fib.fr - copied unchanged from r282803, vendor/ficl/dist/test/fib.fr vendor/ficl/4.1.0/test/ficltest.fr - copied unchanged from r282803, vendor/ficl/dist/test/ficltest.fr vendor/ficl/4.1.0/test/ooptest.fr - copied unchanged from r282803, vendor/ficl/dist/test/ooptest.fr vendor/ficl/4.1.0/test/prefix.fr - copied unchanged from r282803, vendor/ficl/dist/test/prefix.fr vendor/ficl/4.1.0/test/sarray.fr - copied unchanged from r282803, vendor/ficl/dist/test/sarray.fr vendor/ficl/4.1.0/test/testcase.fr - copied unchanged from r282803, vendor/ficl/dist/test/testcase.fr vendor/ficl/4.1.0/test/tester.fr - copied unchanged from r282803, vendor/ficl/dist/test/tester.fr vendor/ficl/4.1.0/test/vocab.fr - copied unchanged from r282803, vendor/ficl/dist/test/vocab.fr vendor/ficl/4.1.0/tools.c - copied unchanged from r282803, vendor/ficl/dist/tools.c vendor/ficl/4.1.0/vm.c - copied unchanged from r282803, vendor/ficl/dist/vm.c Deleted: vendor/ficl/4.1.0/dict.c vendor/ficl/4.1.0/doc/Logo.jpg vendor/ficl/4.1.0/doc/ficl1.ico vendor/ficl/4.1.0/doc/ficl_debug.html vendor/ficl/4.1.0/doc/ficl_guts.htm vendor/ficl/4.1.0/doc/ficl_loc.html vendor/ficl/4.1.0/doc/ficl_logo.jpg vendor/ficl/4.1.0/doc/ficl_oop.html vendor/ficl/4.1.0/doc/ficl_oop.jpg vendor/ficl/4.1.0/doc/ficl_parse.html vendor/ficl/4.1.0/doc/ficl_rel.html vendor/ficl/4.1.0/doc/ficl_top.jpg vendor/ficl/4.1.0/doc/ficlddj.PDF vendor/ficl/4.1.0/doc/ficlheader.js vendor/ficl/4.1.0/doc/jwsforml.PDF vendor/ficl/4.1.0/doc/oo_in_c.html vendor/ficl/4.1.0/doc/primer.txt vendor/ficl/4.1.0/doc/sigplan9906.doc vendor/ficl/4.1.0/doc/skey.gif vendor/ficl/4.1.0/ficl.c vendor/ficl/4.1.0/ficl.dsp vendor/ficl/4.1.0/math64.c vendor/ficl/4.1.0/math64.h vendor/ficl/4.1.0/softwords/ vendor/ficl/4.1.0/sysdep.c vendor/ficl/4.1.0/sysdep.h vendor/ficl/4.1.0/testmain.c vendor/ficl/4.1.0/unix.c vendor/ficl/4.1.0/win32.c vendor/ficl/4.1.0/words.c Copied: vendor/ficl/4.1.0/Makefile (from r282803, vendor/ficl/dist/Makefile) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/ficl/4.1.0/Makefile Tue May 12 03:29:50 2015 (r282804, copy of r282803, vendor/ficl/dist/Makefile) @@ -0,0 +1,60 @@ +OBJECTS= dictionary.o system.o fileaccess.o float.o double.o prefix.o search.o softcore.o stack.o tools.o vm.o primitives.o bit.o lzuncompress.o unix.o utility.o hash.o callback.o word.o extras.o +HEADERS= ficl.h ficlplatform/unix.h +# +# Flags for shared library +#TARGET= -Dlinux # riscos MOTO_CPU32 +SHFLAGS = -fPIC +CFLAGS= -O $(SHFLAGS) -Wall +CPPFLAGS= $(TARGET) -I. +CC = cc +LIB = ar cr +RANLIB = ranlib + +MAJOR = 4 +MINOR = 1.0 + +ficl: main.o $(HEADERS) libficl.a + $(CC) $(CFLAGS) $(LDFLAGS) main.o -o ficl -L. -lficl -lm + +lib: libficl.so.$(MAJOR).$(MINOR) + +# static library build +libficl.a: $(OBJECTS) + $(LIB) libficl.a $(OBJECTS) + $(RANLIB) libficl.a + +# shared library build +libficl.so.$(MAJOR).$(MINOR): $(OBJECTS) + $(CC) $(LDFLAGS) -shared -Wl,-soname,libficl.so.$(MAJOR).$(MINOR) \ + -o libficl.so.$(MAJOR).$(MINOR) $(OBJECTS) + ln -sf libficl.so.$(MAJOR).$(MINOR) libficl.so + +main: main.o ficl.h sysdep.h libficl.so.$(MAJOR).$(MINOR) + $(CC) $(CFLAGS) $(LDFLAGS) main.o -o main -L. -lficl -lm + ln -sf libficl.so.$(MAJOR).$(MINOR) libficl.so.$(MAJOR) + +# depend explicitly to help finding source files in another subdirectory, +# and repeat commands since gmake doesn't understand otherwise +ansi.o: ficlplatform/ansi.c $(HEADERS) + $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $< +unix.o: ficlplatform/unix.c $(HEADERS) + $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $< + +# +# generic object code +# +.SUFFIXES: .cxx .cc .c .o + +.c.o: + $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $< + +.cxx.o: + $(CPP) $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $< + +.cc.o: + $(CPP) $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $< +# +# generic cleanup code +# +clean: + rm -f *.o *.a libficl.* ficl Copied: vendor/ficl/4.1.0/Makefile.ansi (from r282803, vendor/ficl/dist/Makefile.ansi) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/ficl/4.1.0/Makefile.ansi Tue May 12 03:29:50 2015 (r282804, copy of r282803, vendor/ficl/dist/Makefile.ansi) @@ -0,0 +1,56 @@ +OBJECTS= dictionary.o system.o fileaccess.o float.o double.o prefix.o search.o softcore.o stack.o tools.o vm.o primitives.o bit.o lzuncompress.o ansi.o utility.o hash.o callback.o word.o extras.o +HEADERS= ficl.h ficlplatform/ansi.h +# +# Flags for shared library +TARGET= -ansi -DFICL_ANSI # riscos MOTO_CPU32 +SHFLAGS = -fPIC +CFLAGS= -O $(SHFLAGS) +CPPFLAGS= $(TARGET) -I. +CC = cc +LIB = ar cr +RANLIB = ranlib + +MAJOR = 4 +MINOR = 1.0 + +ficl: main.o $(HEADERS) libficl.a + $(CC) main.o -o ficl -L. -lficl -lm + +lib: libficl.so.$(MAJOR).$(MINOR) + +# static library build +libficl.a: $(OBJECTS) + $(LIB) libficl.a $(OBJECTS) + $(RANLIB) libficl.a + +# shared library build +libficl.so.$(MAJOR).$(MINOR): $(OBJECTS) + $(CC) -shared -Wl,-soname,libficl.so.$(MAJOR).$(MINOR) \ + -o libficl.so.$(MAJOR).$(MINOR) $(OBJECTS) + ln -sf libficl.so.$(MAJOR).$(MINOR) libficl.so + +main: main.o ficl.h sysdep.h libficl.so.$(MAJOR).$(MINOR) + $(CC) main.o -o main -L. -lficl -lm + ln -sf libficl.so.$(MAJOR).$(MINOR) libficl.so.$(MAJOR) + +ansi.o: ficlplatform/ansi.c $(HEADERS) + $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ ficlplatform/ansi.c + +# +# generic object code +# +.SUFFIXES: .cxx .cc .c .o + +.c.o: + $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $< + +.cxx.o: + $(CPP) $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $< + +.cc.o: + $(CPP) $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $< +# +# generic cleanup code +# +clean: + rm -f *.o *.a libficl.* Copied: vendor/ficl/4.1.0/Makefile.linux (from r282803, vendor/ficl/dist/Makefile.linux) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/ficl/4.1.0/Makefile.linux Tue May 12 03:29:50 2015 (r282804, copy of r282803, vendor/ficl/dist/Makefile.linux) @@ -0,0 +1,56 @@ +OBJECTS= dictionary.o system.o fileaccess.o float.o double.o prefix.o search.o softcore.o stack.o tools.o vm.o primitives.o bit.o lzuncompress.o unix.o utility.o hash.o callback.o word.o extras.o +HEADERS= ficl.h ficlplatform/unix.h +# +# Flags for shared library +TARGET= -Dlinux # riscos MOTO_CPU32 +SHFLAGS = -fPIC +CFLAGS= -O $(SHFLAGS) +CPPFLAGS= $(TARGET) -I. +CC = cc +LIB = ar cr +RANLIB = ranlib + +MAJOR = 4 +MINOR = 1.0 + +ficl: main.o $(HEADERS) libficl.a + $(CC) main.o -o ficl -L. -lficl -lm + +lib: libficl.so.$(MAJOR).$(MINOR) + +# static library build +libficl.a: $(OBJECTS) + $(LIB) libficl.a $(OBJECTS) + $(RANLIB) libficl.a + +# shared library build +libficl.so.$(MAJOR).$(MINOR): $(OBJECTS) + $(CC) -shared -Wl,-soname,libficl.so.$(MAJOR).$(MINOR) \ + -o libficl.so.$(MAJOR).$(MINOR) $(OBJECTS) + ln -sf libficl.so.$(MAJOR).$(MINOR) libficl.so + +main: main.o ficl.h sysdep.h libficl.so.$(MAJOR).$(MINOR) + $(CC) main.o -o main -L. -lficl -lm + ln -sf libficl.so.$(MAJOR).$(MINOR) libficl.so.$(MAJOR) + +unix.o: ficlplatform/unix.c $(HEADERS) + $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ ficlplatform/unix.c + +# +# generic object code +# +.SUFFIXES: .cxx .cc .c .o + +.c.o: + $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $< + +.cxx.o: + $(CPP) $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $< + +.cc.o: + $(CPP) $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $< +# +# generic cleanup code +# +clean: + rm -f *.o *.a libficl.* Copied: vendor/ficl/4.1.0/ReadMe.txt (from r282803, vendor/ficl/dist/ReadMe.txt) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/ficl/4.1.0/ReadMe.txt Tue May 12 03:29:50 2015 (r282804, copy of r282803, vendor/ficl/dist/ReadMe.txt) @@ -0,0 +1,53 @@ +FICL 4.1.0 +October 2010 + +________ +OVERVIEW + +Ficl is a complete programming language interpreter designed to be embedded +into other systems (including firmware based ones) as a command, macro, +and development prototype language. Ficl stands for "Forth Inspired +Command Language". + +For more information, please see the "doc" directory. +For release notes, please see "doc/releases.html". + +____________ +INSTALLATION + +Ficl builds out-of-the-box on the following platforms: + * NetBSD, FreeBSD: use "Makefile". + * Linux: use "Makefile.linux", but it should work with + "Makefile" as well. + * Win32: use "ficl.dsw" / "ficl.dsp". +To port to other platforms, we suggest you start with the generic +"Makefile" and the "unix.c" / "unix.h" platform-specific implementation +files. (And please--feel free to submit your portability changes!) + +(Note: Ficl used to build under RiscOS, but we broke everything +for the 4.0 release. Please fix it and send us the diffs!) + +____________ +FICL LICENSE + +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. + Copied: vendor/ficl/4.1.0/bit.c (from r282803, vendor/ficl/dist/bit.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/ficl/4.1.0/bit.c Tue May 12 03:29:50 2015 (r282804, copy of r282803, vendor/ficl/dist/bit.c) @@ -0,0 +1,49 @@ +#include "ficl.h" + +int ficlBitGet(const unsigned char *bits, size_t index) + { + int byteIndex = index >> 3; + int bitIndex = index & 7; + unsigned char mask = (unsigned char)(128 >> bitIndex); + + return ((mask & bits[byteIndex]) ? 1 : 0); + } + + + +void ficlBitSet(unsigned char *bits, size_t index, int value) + { + int byteIndex = index >> 3; + int bitIndex = index & 7; + unsigned char mask = (unsigned char)(128 >> bitIndex); + + if (value) + bits[byteIndex] |= mask; + else + bits[byteIndex] &= ~mask; + } + + +void ficlBitGetString(unsigned char *destination, const unsigned char *source, int offset, int count, int destAlignment) + { + int bit = destAlignment - count; + while (count--) + ficlBitSet(destination, bit++, ficlBitGet(source, offset++)); + } + + +/* +** This will actually work correctly *regardless* of the local architecture. +** --lch +**/ +ficlUnsigned16 ficlNetworkUnsigned16(ficlUnsigned16 number) +{ + ficlUnsigned8 *pointer = (ficlUnsigned8 *)&number; + return (ficlUnsigned16)(((ficlUnsigned16)(pointer[0] << 8)) | (pointer[1])); +} + +ficlUnsigned32 ficlNetworkUnsigned32(ficlUnsigned32 number) +{ + ficlUnsigned16 *pointer = (ficlUnsigned16 *)&number; + return ((ficlUnsigned32)(ficlNetworkUnsigned16(pointer[0]) << 16)) | ficlNetworkUnsigned16(pointer[1]); +} Copied: vendor/ficl/4.1.0/callback.c (from r282803, vendor/ficl/dist/callback.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/ficl/4.1.0/callback.c Tue May 12 03:29:50 2015 (r282804, copy of r282803, vendor/ficl/dist/callback.c) @@ -0,0 +1,76 @@ +#include "ficl.h" + + +extern ficlSystem *ficlSystemGlobal; + +/************************************************************************** + f i c l C a l l b a c k T e x t O u t +** Feeds text to the vm's output callback +**************************************************************************/ +void ficlCallbackTextOut(ficlCallback *callback, char *text) +{ + ficlOutputFunction textOut = NULL; + + if (callback != NULL) + { + if (callback->textOut != NULL) + textOut = callback->textOut; + else if ((callback->system != NULL) && (callback != &(callback->system->callback))) + { + ficlCallbackTextOut(&(callback->system->callback), text); + return; + } + } + + if ((textOut == NULL) && (ficlSystemGlobal != NULL)) + { + callback = &(ficlSystemGlobal->callback); + textOut = callback->textOut; + } + + if (textOut == NULL) + textOut = ficlCallbackDefaultTextOut; + + (textOut)(callback, text); + + return; +} + + +/************************************************************************** + f i c l C a l l b a c k E r r o r O u t +** Feeds text to the vm's error output callback +**************************************************************************/ +void ficlCallbackErrorOut(ficlCallback *callback, char *text) +{ + ficlOutputFunction errorOut = NULL; + + if (callback != NULL) + { + if (callback->errorOut != NULL) + errorOut = callback->errorOut; + else if ((callback->system != NULL) && (callback != &(callback->system->callback))) + { + ficlCallbackErrorOut(&(callback->system->callback), text); + return; + } + } + + if ((errorOut == NULL) && (ficlSystemGlobal != NULL)) + { + callback = &(ficlSystemGlobal->callback); + errorOut = callback->errorOut; + } + + if (errorOut == NULL) + { + ficlCallbackTextOut(callback, text); + return; + } + + (errorOut)(callback, text); + + return; +} + + Copied: vendor/ficl/4.1.0/compatibility.c (from r282803, vendor/ficl/dist/compatibility.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/ficl/4.1.0/compatibility.c Tue May 12 03:29:50 2015 (r282804, copy of r282803, vendor/ficl/dist/compatibility.c) @@ -0,0 +1,284 @@ +#define FICL_FORCE_COMPATIBILITY 1 +#include "ficl.h" + + +FICL_PLATFORM_EXTERN ficlStack *stackCreate (unsigned cells) { return ficlStackCreate(NULL, "unknown", cells); } +FICL_PLATFORM_EXTERN void stackDelete (ficlStack *stack) { ficlStackDestroy(stack); } +FICL_PLATFORM_EXTERN int stackDepth (ficlStack *stack) { return ficlStackDepth(stack); } +FICL_PLATFORM_EXTERN void stackDrop (ficlStack *stack, int n) { ficlStackDrop(stack, n); } +FICL_PLATFORM_EXTERN ficlCell stackFetch (ficlStack *stack, int n) { return ficlStackFetch(stack, n); } +FICL_PLATFORM_EXTERN ficlCell stackGetTop (ficlStack *stack) { return ficlStackFetch(stack, 0); } +#if FICL_WANT_LOCALS +FICL_PLATFORM_EXTERN void stackLink (ficlStack *stack, int cells) { ficlStackLink(stack, cells); } +FICL_PLATFORM_EXTERN void stackUnlink (ficlStack *stack) { ficlStackUnlink(stack); } +#endif /* FICL_WANT_LOCALS */ +FICL_PLATFORM_EXTERN void stackPick (ficlStack *stack, int n) { ficlStackPick(stack, n); } +FICL_PLATFORM_EXTERN ficlCell stackPop (ficlStack *stack) { return ficlStackPop(stack); } +FICL_PLATFORM_EXTERN void *stackPopPtr (ficlStack *stack) { return ficlStackPopPointer(stack); } +FICL_PLATFORM_EXTERN ficlUnsigned stackPopUNS (ficlStack *stack) { return ficlStackPopUnsigned(stack); } +FICL_PLATFORM_EXTERN ficlInteger stackPopINT (ficlStack *stack) { return ficlStackPopInteger(stack); } +FICL_PLATFORM_EXTERN void stackPush (ficlStack *stack, ficlCell cell) { ficlStackPush(stack, cell); } +FICL_PLATFORM_EXTERN void stackPushPtr (ficlStack *stack, void *pointer) { ficlStackPushPointer(stack, pointer); } +FICL_PLATFORM_EXTERN void stackPushUNS (ficlStack *stack, ficlUnsigned u) { ficlStackPushUnsigned(stack, u); } +FICL_PLATFORM_EXTERN void stackPushINT (ficlStack *stack, ficlInteger i) { ficlStackPushInteger(stack, i); } +FICL_PLATFORM_EXTERN void stackReset (ficlStack *stack) { ficlStackReset(stack); } +FICL_PLATFORM_EXTERN void stackRoll (ficlStack *stack, int n) { ficlStackRoll(stack, n); } +FICL_PLATFORM_EXTERN void stackSetTop (ficlStack *stack, ficlCell cell) { ficlStackSetTop(stack, cell); } +FICL_PLATFORM_EXTERN void stackStore (ficlStack *stack, int n, ficlCell cell) { ficlStackStore(stack, n, cell); } + +#if (FICL_WANT_FLOAT) +FICL_PLATFORM_EXTERN ficlFloat stackPopFloat (ficlStack *stack) { return ficlStackPopFloat(stack); } +FICL_PLATFORM_EXTERN void stackPushFloat(ficlStack *stack, ficlFloat f) { ficlStackPushFloat(stack, f); } +#endif + +FICL_PLATFORM_EXTERN int wordIsImmediate(ficlWord *word) { return ficlWordIsImmediate(word); } +FICL_PLATFORM_EXTERN int wordIsCompileOnly(ficlWord *word) { return ficlWordIsCompileOnly(word); } + + +FICL_PLATFORM_EXTERN void vmBranchRelative(ficlVm *vm, int offset) { ficlVmBranchRelative(vm, offset); } +FICL_PLATFORM_EXTERN ficlVm *vmCreate (ficlVm *vm, unsigned nPStack, unsigned nRStack) { return ficlVmCreate(vm, nPStack, nRStack); } +FICL_PLATFORM_EXTERN void vmDelete (ficlVm *vm) { ficlVmDestroy(vm); } +FICL_PLATFORM_EXTERN void vmExecute (ficlVm *vm, ficlWord *word) { ficlVmExecuteWord(vm, word); } +FICL_PLATFORM_EXTERN ficlDictionary *vmGetDict (ficlVm *vm) { return ficlVmGetDictionary(vm); } +FICL_PLATFORM_EXTERN char * vmGetString (ficlVm *vm, ficlCountedString *spDest, char delimiter) { return ficlVmGetString(vm, spDest, delimiter); } +FICL_PLATFORM_EXTERN ficlString vmGetWord (ficlVm *vm) { return ficlVmGetWord(vm); } +FICL_PLATFORM_EXTERN ficlString vmGetWord0 (ficlVm *vm) { return ficlVmGetWord0(vm); } +FICL_PLATFORM_EXTERN int vmGetWordToPad (ficlVm *vm) { return ficlVmGetWordToPad(vm); } +FICL_PLATFORM_EXTERN ficlString vmParseString (ficlVm *vm, char delimiter) { return ficlVmParseString(vm, delimiter); } +FICL_PLATFORM_EXTERN ficlString vmParseStringEx(ficlVm *vm, char delimiter, char skipLeading) { return ficlVmParseStringEx(vm, delimiter, skipLeading); } +FICL_PLATFORM_EXTERN ficlCell vmPop (ficlVm *vm) { return ficlVmPop(vm); } +FICL_PLATFORM_EXTERN void vmPush (ficlVm *vm, ficlCell cell) { ficlVmPush(vm, cell); } +FICL_PLATFORM_EXTERN void vmPopIP (ficlVm *vm) { ficlVmPopIP(vm); } +FICL_PLATFORM_EXTERN void vmPushIP (ficlVm *vm, ficlIp newIP) { ficlVmPushIP(vm, newIP); } +FICL_PLATFORM_EXTERN void vmQuit (ficlVm *vm) { ficlVmQuit(vm); } +FICL_PLATFORM_EXTERN void vmReset (ficlVm *vm) { ficlVmReset(vm); } +FICL_PLATFORM_EXTERN void vmThrow (ficlVm *vm, int except) { ficlVmThrow(vm, except); } +FICL_PLATFORM_EXTERN void vmThrowErr (ficlVm *vm, char *fmt, ...) { va_list list; va_start(list, fmt); ficlVmThrowErrorVararg(vm, fmt, list); va_end(list); } + +FICL_PLATFORM_EXTERN void vmCheckStack(ficlVm *vm, int popCells, int pushCells) { FICL_IGNORE(vm); FICL_IGNORE(popCells); FICL_IGNORE(pushCells); FICL_STACK_CHECK(vm->dataStack, popCells, pushCells); } +#if FICL_WANT_FLOAT +FICL_PLATFORM_EXTERN void vmCheckFStack(ficlVm *vm, int popCells, int pushCells) { FICL_IGNORE(vm); FICL_IGNORE(popCells); FICL_IGNORE(pushCells); FICL_STACK_CHECK(vm->floatStack, popCells, pushCells); } +#endif + +FICL_PLATFORM_EXTERN void vmPushTib (ficlVm *vm, char *text, ficlInteger nChars, ficlTIB *pSaveTib) { ficlVmPushTib(vm, text, nChars, pSaveTib); } +FICL_PLATFORM_EXTERN void vmPopTib (ficlVm *vm, ficlTIB *pTib) { ficlVmPopTib(vm, pTib); } + +FICL_PLATFORM_EXTERN int isPowerOfTwo(ficlUnsigned u) { return ficlIsPowerOfTwo(u); } + +#if defined(_WIN32) +/* #SHEESH +** Why do Microsoft Meatballs insist on contaminating +** my namespace with their string functions??? +*/ +#pragma warning(disable: 4273) +#endif +char *ltoa(ficlInteger value, char *string, int radix ) { return ficlLtoa(value, string, radix); } +char *ultoa(ficlUnsigned value, char *string, int radix ) { return ficlUltoa(value, string, radix); } +char *strrev( char *string ) { return ficlStringReverse(string); } +#if defined(_WIN32) +#pragma warning(default: 4273) +#endif +FICL_PLATFORM_EXTERN char digit_to_char(int value) { return ficlDigitToCharacter(value); } +FICL_PLATFORM_EXTERN char *skipSpace(char *cp, char *end) { return ficlStringSkipSpace(cp, end); } +FICL_PLATFORM_EXTERN char *caseFold(char *cp) { return ficlStringCaseFold(cp); } +FICL_PLATFORM_EXTERN int strincmp(char *cp1, char *cp2, ficlUnsigned count) { return ficlStrincmp(cp1, cp2, count); } + +FICL_PLATFORM_EXTERN void hashForget (ficlHash *hash, void *where) { ficlHashForget(hash, where); } +FICL_PLATFORM_EXTERN ficlUnsigned16 hashHashCode (ficlString string) { return ficlHashCode(string); } +FICL_PLATFORM_EXTERN void hashInsertWord(ficlHash *hash, ficlWord *word) { ficlHashInsertWord(hash, word); } +FICL_PLATFORM_EXTERN ficlWord *hashLookup (ficlHash *hash, ficlString string, ficlUnsigned16 hashCode) { return ficlHashLookup(hash, string, hashCode); } +FICL_PLATFORM_EXTERN void hashReset (ficlHash *hash) { ficlHashReset(hash); } + + +FICL_PLATFORM_EXTERN void *alignPtr(void *ptr) { return ficlAlignPointer(ptr); } +FICL_PLATFORM_EXTERN void dictAbortDefinition(ficlDictionary *dictionary) { ficlDictionaryAbortDefinition(dictionary); } +FICL_PLATFORM_EXTERN void dictAlign (ficlDictionary *dictionary) { ficlDictionaryAlign(dictionary); } +FICL_PLATFORM_EXTERN int dictAllot (ficlDictionary *dictionary, int n) { ficlDictionaryAllot(dictionary, n); return 0; } +FICL_PLATFORM_EXTERN int dictAllotCells (ficlDictionary *dictionary, int cells) { ficlDictionaryAllotCells(dictionary, cells); return 0; } +FICL_PLATFORM_EXTERN void dictAppendCell (ficlDictionary *dictionary, ficlCell cell) { ficlDictionaryAppendCell(dictionary, cell); } +FICL_PLATFORM_EXTERN void dictAppendChar (ficlDictionary *dictionary, char c) { ficlDictionaryAppendCharacter(dictionary, c); } +FICL_PLATFORM_EXTERN ficlWord *dictAppendWord (ficlDictionary *dictionary, + char *name, + ficlPrimitive code, + ficlUnsigned8 flags) + { return ficlDictionaryAppendPrimitive(dictionary, name, code, flags); } +FICL_PLATFORM_EXTERN ficlWord *dictAppendWord2(ficlDictionary *dictionary, + ficlString name, + ficlPrimitive code, + ficlUnsigned8 flags) + { return ficlDictionaryAppendWord(dictionary, name, code, flags); } +FICL_PLATFORM_EXTERN void dictAppendUNS (ficlDictionary *dictionary, ficlUnsigned u) { ficlDictionaryAppendUnsigned(dictionary, u); } +FICL_PLATFORM_EXTERN int dictCellsAvail (ficlDictionary *dictionary) { return ficlDictionaryCellsAvailable(dictionary); } +FICL_PLATFORM_EXTERN int dictCellsUsed (ficlDictionary *dictionary) { return ficlDictionaryCellsUsed(dictionary); } +FICL_PLATFORM_EXTERN void dictCheck (ficlDictionary *dictionary, ficlVm *vm, int n) { FICL_IGNORE(dictionary); FICL_IGNORE(vm); FICL_IGNORE(n); FICL_VM_DICTIONARY_CHECK(vm, dictionary, n); } +FICL_PLATFORM_EXTERN ficlDictionary *dictCreate(unsigned cells) { return ficlDictionaryCreate(NULL, cells); } +FICL_PLATFORM_EXTERN ficlDictionary *dictCreateHashed(unsigned cells, unsigned hash) { return ficlDictionaryCreateHashed(NULL, cells, hash); } +FICL_PLATFORM_EXTERN ficlHash *dictCreateWordlist(ficlDictionary *dictionary, int nBuckets) { return ficlDictionaryCreateWordlist(dictionary, nBuckets); } +FICL_PLATFORM_EXTERN void dictDelete (ficlDictionary *dictionary) { ficlDictionaryDestroy(dictionary); } +FICL_PLATFORM_EXTERN void dictEmpty (ficlDictionary *dictionary, unsigned nHash) { ficlDictionaryEmpty(dictionary, nHash); } +#if FICL_WANT_FLOAT +FICL_PLATFORM_EXTERN void ficlPrimitiveHashSummary(ficlVm *vm); +FICL_PLATFORM_EXTERN void dictHashSummary(ficlVm *vm) { ficlPrimitiveHashSummary(vm); } +#endif +FICL_PLATFORM_EXTERN int dictIncludes (ficlDictionary *dictionary, void *p) { return ficlDictionaryIncludes(dictionary, p); } +FICL_PLATFORM_EXTERN ficlWord *dictLookup (ficlDictionary *dictionary, ficlString name) { return ficlDictionaryLookup(dictionary, name); } +#if FICL_WANT_LOCALS +FICL_PLATFORM_EXTERN ficlWord *ficlLookupLoc (ficlSystem *system, ficlString name) { return ficlDictionaryLookup(ficlSystemGetLocals(system), name); } +#endif +FICL_PLATFORM_EXTERN void dictResetSearchOrder(ficlDictionary *dictionary) { ficlDictionaryResetSearchOrder(dictionary); } +FICL_PLATFORM_EXTERN void dictSetFlags (ficlDictionary *dictionary, ficlUnsigned8 set, ficlUnsigned8 clear) { ficlDictionarySetFlags(dictionary, set); ficlDictionaryClearFlags(dictionary, clear); } +FICL_PLATFORM_EXTERN void dictSetImmediate(ficlDictionary *dictionary) { ficlDictionarySetImmediate(dictionary); } +FICL_PLATFORM_EXTERN void dictUnsmudge (ficlDictionary *dictionary) { ficlDictionaryUnsmudge(dictionary); } +FICL_PLATFORM_EXTERN ficlCell *dictWhere (ficlDictionary *dictionary) { return ficlDictionaryWhere(dictionary); } + +FICL_PLATFORM_EXTERN int ficlAddParseStep(ficlSystem *system, ficlWord *word) { return ficlSystemAddParseStep(system, word); } +FICL_PLATFORM_EXTERN void ficlAddPrecompiledParseStep(ficlSystem *system, char *name, ficlParseStep pStep) { ficlSystemAddPrimitiveParseStep(system, name, pStep); } +FICL_PLATFORM_EXTERN void ficlPrimitiveParseStepList(ficlVm *vm); +FICL_PLATFORM_EXTERN void ficlListParseSteps(ficlVm *vm) { ficlPrimitiveParseStepList(vm); } + +FICL_PLATFORM_EXTERN void ficlTermSystem(ficlSystem *system) { ficlSystemDestroy(system); } +FICL_PLATFORM_EXTERN int ficlEvaluate(ficlVm *vm, char *pText) { return ficlVmEvaluate(vm, pText); } +FICL_PLATFORM_EXTERN int ficlExec (ficlVm *vm, char *pText) { ficlString s; FICL_STRING_SET_FROM_CSTRING(s, pText); return ficlVmExecuteString(vm, s); } +FICL_PLATFORM_EXTERN int ficlExecC(ficlVm *vm, char *pText, ficlInteger nChars) { ficlString s; FICL_STRING_SET_POINTER(s, pText); FICL_STRING_SET_LENGTH(s, nChars); return ficlVmExecuteString(vm, s); } +FICL_PLATFORM_EXTERN int ficlExecXT(ficlVm *vm, ficlWord *word) { return ficlVmExecuteXT(vm, word); } +FICL_PLATFORM_EXTERN void ficlFreeVM(ficlVm *vm) { ficlVmDestroy(vm); } + + + + + +static void thunkTextOut(ficlCallback *callback, char *text) + { + ficlCompatibilityOutputFunction outputFunction; + if ((callback->vm != NULL) && (callback->vm->thunkedTextout != NULL)) + outputFunction = callback->system->thunkedTextout; + else if (callback->system->thunkedTextout != NULL) + outputFunction = callback->system->thunkedTextout; + else + { + ficlCallbackDefaultTextOut(callback, text); + return; + } + ficlCompatibilityTextOutCallback(callback, text, outputFunction); + } + + +FICL_PLATFORM_EXTERN void vmSetTextOut(ficlVm *vm, ficlCompatibilityOutputFunction textOut) + { + vm->thunkedTextout = textOut; + ficlVmSetTextOut(vm, thunkTextOut); + } + +FICL_PLATFORM_EXTERN void vmTextOut (ficlVm *vm, char *text, int fNewline) + { + ficlVmTextOut(vm, text); + if (fNewline) + ficlVmTextOut(vm, "\n"); + } + + +FICL_PLATFORM_EXTERN void ficlTextOut (ficlVm *vm, char *text, int fNewline) + { + vmTextOut(vm, text, fNewline); + } + +extern ficlSystem *ficlSystemGlobal; +static defaultStackSize = FICL_DEFAULT_STACK_SIZE; +FICL_PLATFORM_EXTERN int ficlSetStackSize(int nStackCells) +{ + if (defaultStackSize < nStackCells) + defaultStackSize = nStackCells; + if ((ficlSystemGlobal != NULL) && (ficlSystemGlobal->stackSize < nStackCells)) + ficlSystemGlobal->stackSize = nStackCells; + return defaultStackSize; +} + + +FICL_PLATFORM_EXTERN ficlSystem *ficlInitSystemEx(ficlSystemInformation *fsi) +{ + ficlSystem *returnValue; + ficlCompatibilityOutputFunction thunkedTextout; + ficlSystemInformation clone; + + memcpy(&clone, fsi, sizeof(clone)); + thunkedTextout = (ficlCompatibilityOutputFunction)clone.textOut; + clone.textOut = clone.errorOut = thunkTextOut; + + returnValue = ficlSystemCreate(&clone); + if (returnValue != NULL) + { + returnValue->thunkedTextout = thunkedTextout; + } + return returnValue; +} + + +FICL_PLATFORM_EXTERN ficlSystem *ficlInitSystem(int nDictCells) +{ + ficlSystemInformation fsi; + ficlSystemInformationInitialize(&fsi); + fsi.dictionarySize = nDictCells; + if (fsi.stackSize < defaultStackSize) + fsi.stackSize = defaultStackSize; + return ficlSystemCreate(&fsi); +} + + + + +FICL_PLATFORM_EXTERN ficlVm *ficlNewVM(ficlSystem *system) +{ + ficlVm *returnValue = ficlSystemCreateVm(system); + if (returnValue != NULL) + { + if ((returnValue->callback.textOut != NULL) && (returnValue->callback.textOut != thunkTextOut)) + { + returnValue->thunkedTextout = (ficlCompatibilityOutputFunction)returnValue->callback.textOut; + returnValue->callback.textOut = thunkTextOut; + } + if ((returnValue->callback.errorOut != NULL) && (returnValue->callback.errorOut != thunkTextOut)) + { + if (returnValue->thunkedTextout == NULL) + returnValue->thunkedTextout = (ficlCompatibilityOutputFunction)returnValue->callback.errorOut; + returnValue->callback.errorOut = thunkTextOut; + } + } + return returnValue; +} + + + +FICL_PLATFORM_EXTERN ficlWord *ficlLookup(ficlSystem *system, char *name) { return ficlSystemLookup(system, name); } +FICL_PLATFORM_EXTERN ficlDictionary *ficlGetDict(ficlSystem *system) { return ficlSystemGetDictionary(system); } +FICL_PLATFORM_EXTERN ficlDictionary *ficlGetEnv (ficlSystem *system) { return ficlSystemGetEnvironment(system); } +FICL_PLATFORM_EXTERN void ficlSetEnv (ficlSystem *system, char *name, ficlInteger value) { ficlDictionarySetConstant(ficlSystemGetDictionary(system), name, value); } +FICL_PLATFORM_EXTERN void ficlSetEnvD(ficlSystem *system, char *name, ficlInteger high, ficlInteger low) { ficl2Unsigned value; FICL_2UNSIGNED_SET(low, high, value); ficlDictionarySet2Constant(ficlSystemGetDictionary(system), name, FICL_2UNSIGNED_TO_2INTEGER(value)); } +#if FICL_WANT_LOCALS +FICL_PLATFORM_EXTERN ficlDictionary *ficlGetLoc (ficlSystem *system) { return ficlSystemGetLocals(system); } +#endif +FICL_PLATFORM_EXTERN int ficlBuild(ficlSystem *system, char *name, ficlPrimitive code, char flags) { ficlDictionary *dictionary = ficlSystemGetDictionary(system); ficlDictionaryLock(dictionary, FICL_TRUE); ficlDictionaryAppendPrimitive(dictionary, name, code, flags); ficlDictionaryLock(dictionary, FICL_FALSE); return 0; } +FICL_PLATFORM_EXTERN void ficlCompileCore(ficlSystem *system) { ficlSystemCompileCore(system); } +FICL_PLATFORM_EXTERN void ficlCompilePrefix(ficlSystem *system) { ficlSystemCompilePrefix(system); } +FICL_PLATFORM_EXTERN void ficlCompileSearch(ficlSystem *system) { ficlSystemCompileSearch(system); } +FICL_PLATFORM_EXTERN void ficlCompileSoftCore(ficlSystem *system) { ficlSystemCompileSoftCore(system); } +FICL_PLATFORM_EXTERN void ficlCompileTools(ficlSystem *system) { ficlSystemCompileTools(system); } +FICL_PLATFORM_EXTERN void ficlCompileFile(ficlSystem *system) { ficlSystemCompileFile(system); } +#if FICL_WANT_FLOAT +FICL_PLATFORM_EXTERN void ficlCompileFloat(ficlSystem *system) { ficlSystemCompileFloat(system); } +FICL_PLATFORM_EXTERN int ficlParseFloatNumber( ficlVm *vm, ficlString string) { return ficlVmParseFloatNumber(vm, string); } +#endif +#if FICL_WANT_PLATFORM +FICL_PLATFORM_EXTERN void ficlCompilePlatform(ficlSystem *system) { ficlSystemCompilePlatform(system); } +#endif +FICL_PLATFORM_EXTERN int ficlParsePrefix(ficlVm *vm, ficlString string) { return ficlVmParsePrefix(vm, string); } + +FICL_PLATFORM_EXTERN int ficlParseNumber(ficlVm *vm, ficlString string) { return ficlVmParseNumber(vm, string); } +FICL_PLATFORM_EXTERN void ficlTick(ficlVm *vm) { ficlPrimitiveTick(vm); } +FICL_PLATFORM_EXTERN void parseStepParen(ficlVm *vm) { ficlPrimitiveParseStepParen(vm); } + +FICL_PLATFORM_EXTERN int isAFiclWord(ficlDictionary *dictionary, ficlWord *word) { return ficlDictionaryIsAWord(dictionary, word); } + + +FICL_PLATFORM_EXTERN void buildTestInterface(ficlSystem *system) { ficlSystemCompileExtras(system); } + + Copied: vendor/ficl/4.1.0/dictionary.c (from r282803, vendor/ficl/dist/dictionary.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/ficl/4.1.0/dictionary.c Tue May 12 03:29:50 2015 (r282804, copy of r282803, vendor/ficl/dist/dictionary.c) @@ -0,0 +1,851 @@ +/******************************************************************* +** d i c t . c +** Forth Inspired Command Language - dictionary methods +** Author: John Sadler (john_sadler@alum.mit.edu) +** Created: 19 July 1997 +** $Id: dictionary.c,v 1.2 2010/09/12 15:14:52 asau Exp $ +*******************************************************************/ +/* +** This file implements the dictionary -- Ficl's model of +** memory management. All Ficl words are stored in the +** dictionary. A word is a named chunk of data with its +** associated code. Ficl treats all words the same, even +** precompiled ones, so your words become first-class +** extensions of the language. You can even define new +** control structures. +** +** 29 jun 1998 (sadler) added variable sized hash table support +*/ +/* +** Copyright (c) 1997-2001 John Sadler (john_sadler@alum.mit.edu) +** All rights reserved. +** +** Get the latest Ficl release at http://ficl.sourceforge.net +** +** I am interested in hearing from anyone who uses Ficl. If you have +** a problem, a success story, a defect, an enhancement request, or +** if you would like to contribute to the Ficl release, please +** contact me by email at the address above. +** +** L I C E N S E and D I S C L A I M E R +** +** Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions +** are met: +** 1. Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** 2. Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in the +** documentation and/or other materials provided with the distribution. +** +** THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +** ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +** FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +** DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +** OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +** HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +** OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +** SUCH DAMAGE. +*/ + +#include +#include +#include +#include + +#include "ficl.h" + +#define FICL_SAFE_CALLBACK_FROM_SYSTEM(system) (((system) != NULL) ? &((system)->callback) : NULL) +#define FICL_SAFE_SYSTEM_FROM_DICTIONARY(dictionary) (((dictionary) != NULL) ? (dictionary)->system : NULL) +#define FICL_DICTIONARY_ASSERT(dictionary, expression) FICL_SYSTEM_ASSERT(FICL_SAFE_SYSTEM_FROM_DICTIONARY(dictionary), expression) + +/************************************************************************** + d i c t A b o r t D e f i n i t i o n +** Abort a definition in process: reclaim its memory and unlink it +** from the dictionary list. Assumes that there is a smudged +** definition in process...otherwise does nothing. +** NOTE: this function is not smart enough to unlink a word that +** has been successfully defined (ie linked into a hash). It +** only works for defs in process. If the def has been unsmudged, +** nothing happens. +**************************************************************************/ +void ficlDictionaryAbortDefinition(ficlDictionary *dictionary) +{ + ficlWord *word; + ficlDictionaryLock(dictionary, FICL_TRUE); + word = dictionary->smudge; + + if (word->flags & FICL_WORD_SMUDGED) + dictionary->here = (ficlCell *)word->name; + + ficlDictionaryLock(dictionary, FICL_FALSE); + return; +} + + +/************************************************************************** + d i c t A l i g n +** Align the dictionary's free space pointer +**************************************************************************/ +void ficlDictionaryAlign(ficlDictionary *dictionary) +{ + dictionary->here = ficlAlignPointer(dictionary->here); +} + + +/************************************************************************** + d i c t A l l o t +** Allocate or remove n chars of dictionary space, with +** checks for underrun and overrun +**************************************************************************/ +void ficlDictionaryAllot(ficlDictionary *dictionary, int n) +{ + char *here = (char *)dictionary->here; + here += n; + dictionary->here = FICL_POINTER_TO_CELL(here); +} + + +/************************************************************************** + d i c t A l l o t C e l l s +** Reserve space for the requested number of ficlCells in the +** dictionary. If nficlCells < 0 , removes space from the dictionary. +**************************************************************************/ +void ficlDictionaryAllotCells(ficlDictionary *dictionary, int nficlCells) +{ + dictionary->here += nficlCells; +} + + +/************************************************************************** + d i c t A p p e n d C e l l +** Append the specified ficlCell to the dictionary +**************************************************************************/ +void ficlDictionaryAppendCell(ficlDictionary *dictionary, ficlCell c) +{ + *dictionary->here++ = c; + return; +} + + +/************************************************************************** + d i c t A p p e n d C h a r +** Append the specified char to the dictionary +**************************************************************************/ +void ficlDictionaryAppendCharacter(ficlDictionary *dictionary, char c) +{ + char *here = (char *)dictionary->here; + *here++ = c; + dictionary->here = FICL_POINTER_TO_CELL(here); + return; +} + + +/************************************************************************** + d i c t A p p e n d U N S +** Append the specified ficlUnsigned to the dictionary +**************************************************************************/ +void ficlDictionaryAppendUnsigned(ficlDictionary *dictionary, ficlUnsigned u) +{ + *dictionary->here++ = FICL_LVALUE_TO_CELL(u); + return; +} + + +void *ficlDictionaryAppendData(ficlDictionary *dictionary, void *data, ficlInteger length) +{ + char *here = (char *)dictionary->here; + char *oldHere = here; + char *from = (char *)data; + + if (length == 0) + { + ficlDictionaryAlign(dictionary); + return (char *)dictionary->here; + } + + while (length) + { + *here++ = *from++; + length--; + } + + *here++ = '\0'; + + dictionary->here = FICL_POINTER_TO_CELL(here); + ficlDictionaryAlign(dictionary); + return oldHere; +} + + +/************************************************************************** + d i c t C o p y N a m e +** Copy up to FICL_NAME_LENGTH characters of the name specified by s into +** the dictionary starting at "here", then NULL-terminate the name, +** point "here" to the next available byte, and return the address of +** the beginning of the name. Used by dictAppendWord. +** N O T E S : +** 1. "here" is guaranteed to be aligned after this operation. +** 2. If the string has zero length, align and return "here" +**************************************************************************/ +char *ficlDictionaryAppendString(ficlDictionary *dictionary, ficlString s) +{ + void *data = FICL_STRING_GET_POINTER(s); + ficlInteger length = FICL_STRING_GET_LENGTH(s); + + if (length > FICL_NAME_LENGTH) + length = FICL_NAME_LENGTH; + + return ficlDictionaryAppendData(dictionary, data, length); +} + + +ficlWord *ficlDictionaryAppendConstantInstruction(ficlDictionary *dictionary, ficlString name, ficlInstruction instruction, ficlInteger value) +{ + ficlWord *word = ficlDictionaryAppendWord(dictionary, name, (ficlPrimitive)instruction, FICL_WORD_DEFAULT); + if (word != NULL) + ficlDictionaryAppendUnsigned(dictionary, value); + return word; +} + + +ficlWord *ficlDictionaryAppend2ConstantInstruction(ficlDictionary *dictionary, ficlString name, ficlInstruction instruction, ficl2Integer value) +{ + ficlWord *word = ficlDictionaryAppendWord(dictionary, name, (ficlPrimitive)instruction, FICL_WORD_DEFAULT); + if (word != NULL) + { + ficlDictionaryAppendUnsigned(dictionary, FICL_2UNSIGNED_GET_HIGH(value)); + ficlDictionaryAppendUnsigned(dictionary, FICL_2UNSIGNED_GET_LOW(value)); + } + return word; +} + + + +ficlWord *ficlDictionaryAppendConstant(ficlDictionary *dictionary, char *name, ficlInteger value) +{ + ficlString s; + FICL_STRING_SET_FROM_CSTRING(s, name); + return ficlDictionaryAppendConstantInstruction(dictionary, s, ficlInstructionConstantParen, value); +} + + + +ficlWord *ficlDictionaryAppend2Constant(ficlDictionary *dictionary, char *name, ficl2Integer value) +{ + ficlString s; + FICL_STRING_SET_FROM_CSTRING(s, name); + return ficlDictionaryAppend2ConstantInstruction(dictionary, s, ficlInstruction2ConstantParen, value); +} + + + +ficlWord *ficlDictionarySetConstantInstruction(ficlDictionary *dictionary, ficlString name, ficlInstruction instruction, ficlInteger value) +{ + ficlWord *word = ficlDictionaryLookup(dictionary, name); + + if (word == NULL) + { + word = ficlDictionaryAppendConstantInstruction(dictionary, name, instruction, value); + } + else + { + word->code = (ficlPrimitive)instruction; + word->param[0] = FICL_LVALUE_TO_CELL(value); + } + return word; +} + +ficlWord *ficlDictionarySetConstant(ficlDictionary *dictionary, char *name, ficlInteger value) +{ + ficlString s; + FICL_STRING_SET_FROM_CSTRING(s, name); + return ficlDictionarySetConstantInstruction(dictionary, s, ficlInstructionConstantParen, value); +} + +ficlWord *ficlDictionarySet2ConstantInstruction(ficlDictionary *dictionary, ficlString s, ficlInstruction instruction, ficl2Integer value) +{ + ficlWord *word; + word = ficlDictionaryLookup(dictionary, s); + + /* only reuse the existing word if we're sure it has space for a 2constant */ + if ((word != NULL) && + ((((ficlInstruction)word->code) == ficlInstruction2ConstantParen) +#if FICL_WANT_FLOAT + || + (((ficlInstruction)word->code) == ficlInstructionF2ConstantParen) +#endif /* FICL_WANT_FLOAT */ + ) + ) + { + word->code = (ficlPrimitive)instruction; + word->param[0].u = FICL_2UNSIGNED_GET_HIGH(value); + word->param[1].u = FICL_2UNSIGNED_GET_LOW(value); + } + else + { + word = ficlDictionaryAppend2ConstantInstruction(dictionary, s, instruction, value); + } + + return word; +} + + +ficlWord *ficlDictionarySet2Constant(ficlDictionary *dictionary, char *name, ficl2Integer value) +{ + ficlString s; + FICL_STRING_SET_FROM_CSTRING(s, name); + return ficlDictionarySet2ConstantInstruction(dictionary, s, ficlInstruction2ConstantParen, value); +} + + +ficlWord *ficlDictionarySetConstantString(ficlDictionary *dictionary, char *name, char *value) +{ + ficlString s; + ficl2Integer valueAs2Integer; + FICL_2INTEGER_SET(strlen(value), (intptr_t)value, valueAs2Integer); + FICL_STRING_SET_FROM_CSTRING(s, name); + + return ficlDictionarySet2ConstantInstruction(dictionary, s, ficlInstruction2ConstantParen, valueAs2Integer); +} + + + +/************************************************************************** + d i c t A p p e n d W o r d +** Create a new word in the dictionary with the specified +** ficlString, code, and flags. Does not require a NULL-terminated +** name. +**************************************************************************/ +ficlWord *ficlDictionaryAppendWord(ficlDictionary *dictionary, + ficlString name, + ficlPrimitive code, + ficlUnsigned8 flags) +{ + ficlUnsigned8 length = (ficlUnsigned8)FICL_STRING_GET_LENGTH(name); + char *nameCopy; + ficlWord *word; + + ficlDictionaryLock(dictionary, FICL_TRUE); + + /* + ** NOTE: ficlDictionaryAppendString advances "here" as a side-effect. + ** It must execute before word is initialized. + */ + nameCopy = ficlDictionaryAppendString(dictionary, name); + word = (ficlWord *)dictionary->here; + dictionary->smudge = word; + word->hash = ficlHashCode(name); + word->code = code; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue May 12 03:31:59 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 42AB2981; Tue, 12 May 2015 03:31:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 307AB16B7; Tue, 12 May 2015 03:31:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4C3VxJR075855; Tue, 12 May 2015 03:31:59 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4C3VwMP075851; Tue, 12 May 2015 03:31:58 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201505120331.t4C3VwMP075851@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Tue, 12 May 2015 03:31:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282805 - in head: sbin/ifconfig 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.20 Precedence: list List-Id: "SVN commit messages 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, 12 May 2015 03:31:59 -0000 Author: hrs Date: Tue May 12 03:31:57 2015 New Revision: 282805 URL: https://svnweb.freebsd.org/changeset/base/282805 Log: - Remove ND6_IFF_IGNORELOOP. This functionality was useless in practice because a link where looped back NS messages are permanently observed does not work with either NDP or ARP for IPv4. - draft-ietf-6man-enhanced-dad is now RFC 7527. Discussed with: hiren MFC after: 3 days Modified: head/sbin/ifconfig/af_inet6.c head/sbin/ifconfig/ifconfig.8 head/sys/netinet6/nd6.h head/sys/netinet6/nd6_nbr.c Modified: head/sbin/ifconfig/af_inet6.c ============================================================================== --- head/sbin/ifconfig/af_inet6.c Tue May 12 03:29:50 2015 (r282804) +++ head/sbin/ifconfig/af_inet6.c Tue May 12 03:31:57 2015 (r282805) @@ -486,8 +486,6 @@ static struct cmd inet6_cmds[] = { DEF_CMD("-no_prefer_iface",-ND6_IFF_NO_PREFER_IFACE,setnd6flags), DEF_CMD("no_dad", ND6_IFF_NO_DAD, setnd6flags), DEF_CMD("-no_dad", -ND6_IFF_NO_DAD, setnd6flags), - DEF_CMD("ignoreloop", ND6_IFF_IGNORELOOP, setnd6flags), - DEF_CMD("-ignoreloop", -ND6_IFF_IGNORELOOP, setnd6flags), DEF_CMD_ARG("pltime", setip6pltime), DEF_CMD_ARG("vltime", setip6vltime), DEF_CMD("eui64", 0, setip6eui64), Modified: head/sbin/ifconfig/ifconfig.8 ============================================================================== --- head/sbin/ifconfig/ifconfig.8 Tue May 12 03:29:50 2015 (r282804) +++ head/sbin/ifconfig/ifconfig.8 Tue May 12 03:31:57 2015 (r282805) @@ -28,7 +28,7 @@ .\" From: @(#)ifconfig.8 8.3 (Berkeley) 1/5/94 .\" $FreeBSD$ .\" -.Dd March 6, 2015 +.Dd May 12, 2015 .Dt IFCONFIG 8 .Os .Sh NAME @@ -692,15 +692,6 @@ Set a flag to disable Duplicate Address .It Cm -no_dad Clear a flag .Cm no_dad . -.It Cm ignoreloop -Set a flag to disable loopback detection in Enhanced Duplicate Address -Detection Algorithm. -When this flag is set, -Duplicate Address Detection will stop in a finite number of probings -even if a loopback configuration is detected. -.It Cm -ignoreloop -Clear a flag -.Cm ignoreloop . .El .Pp The following parameters are specific for IPv6 addresses. Modified: head/sys/netinet6/nd6.h ============================================================================== --- head/sys/netinet6/nd6.h Tue May 12 03:29:50 2015 (r282804) +++ head/sys/netinet6/nd6.h Tue May 12 03:31:57 2015 (r282805) @@ -87,8 +87,7 @@ struct nd_ifinfo { #define ND6_IFF_AUTO_LINKLOCAL 0x20 #define ND6_IFF_NO_RADR 0x40 #define ND6_IFF_NO_PREFER_IFACE 0x80 /* XXX: not related to ND. */ -#define ND6_IFF_IGNORELOOP 0x100 -#define ND6_IFF_NO_DAD 0x200 +#define ND6_IFF_NO_DAD 0x100 #define ND6_CREATE LLE_CREATE #define ND6_EXCLUSIVE LLE_EXCLUSIVE Modified: head/sys/netinet6/nd6_nbr.c ============================================================================== --- head/sys/netinet6/nd6_nbr.c Tue May 12 03:29:50 2015 (r282804) +++ head/sys/netinet6/nd6_nbr.c Tue May 12 03:31:57 2015 (r282805) @@ -1445,10 +1445,9 @@ nd6_dad_timer(struct dadq *dp) dp->dad_ns_lcount > 0 && dp->dad_ns_lcount > dp->dad_loopbackprobe) { /* - * A looped back probe is detected, - * Sec. 4.1 in draft-ietf-6man-enhanced-dad-13 - * requires transmission of additional probes until - * the loopback condition becomes clear. + * Sec. 4.1 in RFC 7527 requires transmission of + * additional probes until the loopback condition + * becomes clear when a looped back probe is detected. */ log(LOG_ERR, "%s: a looped back NS message is " "detected during DAD for %s. " @@ -1457,16 +1456,6 @@ nd6_dad_timer(struct dadq *dp) ip6_sprintf(ip6buf, IFA_IN6(ifa))); dp->dad_loopbackprobe = dp->dad_ns_lcount; /* - * An interface with IGNORELOOP is one which a - * loopback is permanently expected while regular - * traffic works. In that case, stop DAD after - * MAX_MULTICAST_SOLICIT number of NS messages - * regardless of the number of received loopback NS - * by increasing dad_loopbackprobe in advance. - */ - if (ND_IFINFO(ifa->ifa_ifp)->flags & ND6_IFF_IGNORELOOP) - dp->dad_loopbackprobe += V_nd6_mmaxtries; - /* * Send an NS immediately and increase dad_count by * V_nd6_mmaxtries - 1. */ From owner-svn-src-all@FreeBSD.ORG Tue May 12 03:35:46 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BC1A2BEF; Tue, 12 May 2015 03:35:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AAAD01782; Tue, 12 May 2015 03:35:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4C3ZkYH076537; Tue, 12 May 2015 03:35:46 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4C3ZkPU076536; Tue, 12 May 2015 03:35:46 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201505120335.t4C3ZkPU076536@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Tue, 12 May 2015 03:35:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282806 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 12 May 2015 03:35:46 -0000 Author: hrs Date: Tue May 12 03:35:45 2015 New Revision: 282806 URL: https://svnweb.freebsd.org/changeset/base/282806 Log: Fix a panic when VIMAGE is enabled. Spotted by: Nikos Vassiliadis Modified: head/sys/net/if_bridge.c Modified: head/sys/net/if_bridge.c ============================================================================== --- head/sys/net/if_bridge.c Tue May 12 03:31:57 2015 (r282805) +++ head/sys/net/if_bridge.c Tue May 12 03:35:45 2015 (r282806) @@ -3065,9 +3065,11 @@ bridge_state_change(struct ifnet *ifp, i "discarding" }; + CURVNET_SET(ifp->if_vnet); if (V_log_stp) log(LOG_NOTICE, "%s: state changed to %s on %s\n", sc->sc_ifp->if_xname, stpstates[state], ifp->if_xname); + CURVNET_RESTORE(); } /* From owner-svn-src-all@FreeBSD.ORG Tue May 12 03:49:19 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 040051DF; Tue, 12 May 2015 03:49:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E60711943; Tue, 12 May 2015 03:49:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4C3nIoN081819; Tue, 12 May 2015 03:49:18 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4C3nI03081818; Tue, 12 May 2015 03:49:18 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201505120349.t4C3nI03081818@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Tue, 12 May 2015 03:49:18 +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: r282807 - stable/10/sys/netinet6 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.20 Precedence: list List-Id: "SVN commit messages 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, 12 May 2015 03:49:19 -0000 Author: hrs Date: Tue May 12 03:49:18 2015 New Revision: 282807 URL: https://svnweb.freebsd.org/changeset/base/282807 Log: MFC r274223 (by glebius): Remove VNET_SYSCTL_ARG(). The generic sysctl(9) code handles that. A panic could occur by "sysctl -a" when using VIMAGE-enabled stable/10 kernel after r262734 because of this missing MFC. Modified: stable/10/sys/netinet6/in6_proto.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet6/in6_proto.c ============================================================================== --- stable/10/sys/netinet6/in6_proto.c Tue May 12 03:35:45 2015 (r282806) +++ stable/10/sys/netinet6/in6_proto.c Tue May 12 03:49:18 2015 (r282807) @@ -474,8 +474,6 @@ sysctl_ip6_temppltime(SYSCTL_HANDLER_ARG int error = 0; int old; - VNET_SYSCTL_ARG(req, arg1); - error = SYSCTL_OUT(req, arg1, sizeof(int)); if (error || !req->newptr) return (error); @@ -495,8 +493,6 @@ sysctl_ip6_tempvltime(SYSCTL_HANDLER_ARG int error = 0; int old; - VNET_SYSCTL_ARG(req, arg1); - error = SYSCTL_OUT(req, arg1, sizeof(int)); if (error || !req->newptr) return (error); From owner-svn-src-all@FreeBSD.ORG Tue May 12 04:46:02 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3FB9117D for ; Tue, 12 May 2015 04:46:02 +0000 (UTC) Received: from mail-wi0-x233.google.com (mail-wi0-x233.google.com [IPv6:2a00:1450:400c:c05::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AC12C1309 for ; Tue, 12 May 2015 04:46:01 +0000 (UTC) Received: by wief7 with SMTP id f7so101889457wie.0 for ; Mon, 11 May 2015 21:45:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=OniOL2k1qEBVs5k0cy3RmZpquHgwkwbLqkxxvEjsTHg=; b=IyIo5kSPA+Aa3pnSQVaBKbxQMMDApQDkjzutBIu3LXVODOzTEPMy8xlJZYb5SDJlb/ mYjEkehMyoILUtbtvX0Kum1/XGBEfwwxZ/BbL0djbbno/gTYQEtTDsVzZGOSjhdHhBpF 0w+UqOI+mpNrUF/yVXKRLx4yCRSA76qrwIifY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-type; bh=OniOL2k1qEBVs5k0cy3RmZpquHgwkwbLqkxxvEjsTHg=; b=IqZeC1uofu7nTu+QM0U0n4T5RV5hZvQ1iFvDZXSz4XaJe/ccL8vHbsCB1quCylO5WP ybtuuDj04kPGnk3EzRGVzx21+zJ4DVLpExM+6V7C2RRmH5Ng281BzveeQM47GV0w1Rsn itAViSdttCNSqlJvBfrj3k/WJ9+VPKXHvgHwCAgJF6se7Px1U6omynZ52VmLuxAtS9Jy yzYjVwo+ycE79NHq9ZMDAkrVXH2t/uZ+mj6q9vgxY0fEstWqUvgEnJlH2tlSG9bxYQe8 N7mG4jRTqXw7XwgfstganGwnidH2UjeSxUHtEH80CkAPkWSXaPWTkMsedkxagNXJzj2s MB0w== X-Gm-Message-State: ALoCoQlqIpcyGj85Nbvoq3BcCei/50eO4yniftLS1co3xELhYNPopXVlbeAkF3k8nZU7ABtNgmjl X-Received: by 10.194.9.6 with SMTP id v6mr26606368wja.13.1431405959770; Mon, 11 May 2015 21:45:59 -0700 (PDT) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.28.20.75 with HTTP; Mon, 11 May 2015 21:45:29 -0700 (PDT) In-Reply-To: <20150511191850.GC68045@spindle.one-eyed-alien.net> References: <201505082336.t48NaWRS080408@svn.freebsd.org> <20150511191850.GC68045@spindle.one-eyed-alien.net> From: Eitan Adler Date: Mon, 11 May 2015 21:45:29 -0700 X-Google-Sender-Auth: cP62W6VRemmYKnQkJsTYMD4DMgo Message-ID: Subject: Re: svn commit: r282672 - head/etc/rc.d To: Brooks Davis Cc: John Baldwin , Xin LI , "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.20 Precedence: list List-Id: "SVN commit messages 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, 12 May 2015 04:46:02 -0000 On 11 May 2015 at 12:18, Brooks Davis wrote: > On Sun, May 10, 2015 at 03:45:48PM -0400, John Baldwin wrote: >> >> > On May 8, 2015, at 19:36, Xin LI wrote: >> > >> > Author: delphij >> > Date: Fri May 8 23:36:31 2015 >> > New Revision: 282672 >> > URL: https://svnweb.freebsd.org/changeset/base/282672 >> > >> > Log: >> > Always convert uuid to lower case. >> > >> > MFC after: 2 weeks >> > >> > Modified: >> > head/etc/rc.d/hostid >> > >> > Modified: head/etc/rc.d/hostid >> > ============================================================================== >> > --- head/etc/rc.d/hostid Fri May 8 23:29:42 2015 (r282671) >> > +++ head/etc/rc.d/hostid Fri May 8 23:36:31 2015 (r282672) >> > @@ -58,7 +58,7 @@ hostid_set() >> > >> > valid_hostid() >> > { >> > - uuid=$1 >> > + uuid=$(echo $1 | tr '[:upper:]' '[:lower:]') >> >> tr is in /usr/bin so this breaks systems with a separate /usr. Perhaps you could use dd with conv=lcase instead? > > Alterntively, a shell function "ltr" exists in rc.subr for this purpose. Why does the hostid need to be lowercase in the first place? -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams From owner-svn-src-all@FreeBSD.ORG Tue May 12 05:42:14 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D90EC878; Tue, 12 May 2015 05:42:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AFB3418AE; Tue, 12 May 2015 05:42:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4C5gERI038844; Tue, 12 May 2015 05:42:14 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4C5gDFX038841; Tue, 12 May 2015 05:42:13 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201505120542.t4C5gDFX038841@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Tue, 12 May 2015 05:42:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282808 - head/lib/liblzma 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.20 Precedence: list List-Id: "SVN commit messages 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, 12 May 2015 05:42:15 -0000 Author: delphij Date: Tue May 12 05:42:13 2015 New Revision: 282808 URL: https://svnweb.freebsd.org/changeset/base/282808 Log: Revert r282775 for now. The added dependency would cause problems for e.g. ports-mgmt/pkg and we would like to do an exp-build. Requested by: bdrewery Modified: head/lib/liblzma/Makefile head/lib/liblzma/Symbol.map head/lib/liblzma/config.h Modified: head/lib/liblzma/Makefile ============================================================================== --- head/lib/liblzma/Makefile Tue May 12 03:49:18 2015 (r282807) +++ head/lib/liblzma/Makefile Tue May 12 05:42:13 2015 (r282808) @@ -77,7 +77,8 @@ SRCS+= common.c \ .PATH: ${LZMADIR}/check SRCS+= check.c \ crc32_table.c \ - crc64_table.c + crc64_table.c \ + sha256.c .if defined(MACHINE_ARCH) && ${MACHINE_ARCH} == "i386" SRCS+= crc32_x86.S \ crc64_x86.S @@ -145,7 +146,7 @@ CFLAGS+= -DHAVE_CONFIG_H \ -I${LZMADIR}/simple \ -I${LZMADIR}/../common -LIBADD+= md pthread +LIBADD+= pthread VERSION_DEF= ${.CURDIR}/Versions.def SYMBOL_MAPS= ${.CURDIR}/Symbol.map Modified: head/lib/liblzma/Symbol.map ============================================================================== --- head/lib/liblzma/Symbol.map Tue May 12 03:49:18 2015 (r282807) +++ head/lib/liblzma/Symbol.map Tue May 12 05:42:13 2015 (r282808) @@ -180,6 +180,9 @@ XZprivate_1.0 { lzma_raw_coder_memusage; lzma_raw_decoder_init; lzma_raw_encoder_init; + lzma_sha256_finish; + lzma_sha256_init; + lzma_sha256_update; lzma_simple_arm_decoder_init; lzma_simple_arm_encoder_init; lzma_simple_armthumb_decoder_init; Modified: head/lib/liblzma/config.h ============================================================================== --- head/lib/liblzma/config.h Tue May 12 03:49:18 2015 (r282807) +++ head/lib/liblzma/config.h Tue May 12 05:42:13 2015 (r282808) @@ -203,13 +203,16 @@ /* #undef HAVE_SHA256INIT */ /* Define to 1 if the system has the type `SHA256_CTX'. */ -#define HAVE_SHA256_CTX 1 +/* FreeBSD - disabled libmd SHA256 for now */ +/* #undef HAVE_SHA256_CTX */ /* Define to 1 if you have the header file. */ -#define HAVE_SHA256_H 1 +/* FreeBSD - disabled libmd SHA256 for now */ +/* #undef HAVE_SHA256_H */ /* Define to 1 if you have the `SHA256_Init' function. */ -#define HAVE_SHA256_INIT 1 +/* FreeBSD - disabled libmd SHA256 for now */ +/* #undef HAVE_SHA256_INIT */ /* Define to 1 if the system has the type `SHA2_CTX'. */ /* #undef HAVE_SHA2_CTX */ From owner-svn-src-all@FreeBSD.ORG Tue May 12 07:25:01 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7228AC3E; Tue, 12 May 2015 07:25:01 +0000 (UTC) Received: from mail-yk0-x232.google.com (mail-yk0-x232.google.com [IPv6:2607:f8b0:4002:c07::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 30ED212E6; Tue, 12 May 2015 07:25:01 +0000 (UTC) Received: by ykep21 with SMTP id p21so45521484yke.3; Tue, 12 May 2015 00:25:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=HrInTkZptRVs4HvbIe71xuqumLcq81kSrjfzdSmox5Q=; b=SY2Nk05FjjYYE87AxB9L2jO3o48GpW8RYGNM8Yx1bAkO62z4DkH0FJVwrxr904L8GA WZrYxH8nUe2T1prYJpAWdy6Qo+tpcpsRH4U7oeW78I1dcT5ChI9EhfP0A20SHdFqmIny jz+oFUdKC5KLVyavKeR3I4cnmDJHdiTiFGPmuBP8o/NqQ7A7uLUOOOhWQvd4JcouB88T nukuLWZQvzWfXnebyS7PwgIv07swi8iUh9cGCmzTd//dFaCMTQQ6YSaDF5XQU02P/sVi B2oI5bPml/iQOTJhk3iUsofJcPJbTKdWWoNqbWjDKfhaq8QgRrsu8zew8J9263PbIKQQ ZVng== MIME-Version: 1.0 X-Received: by 10.236.199.11 with SMTP id w11mr14202877yhn.81.1431415500196; Tue, 12 May 2015 00:25:00 -0700 (PDT) Sender: ermal.luci@gmail.com Received: by 10.129.123.197 with HTTP; Tue, 12 May 2015 00:25:00 -0700 (PDT) In-Reply-To: <201504280929.t3S9TTE6061279@svn.freebsd.org> References: <201504280929.t3S9TTE6061279@svn.freebsd.org> Date: Tue, 12 May 2015 09:25:00 +0200 X-Google-Sender-Auth: HjBfEYu86FleaoBdPcM7U0-l_gE Message-ID: Subject: Re: svn commit: r282132 - head/sys/netipsec From: =?UTF-8?Q?Ermal_Lu=C3=A7i?= To: "Andrey V. Elsukov" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 12 May 2015 07:25:01 -0000 Hello Andrey, do you plan to MFC this one? On Tue, Apr 28, 2015 at 11:29 AM, Andrey V. Elsukov wrote: > Author: ae > Date: Tue Apr 28 09:29:28 2015 > New Revision: 282132 > URL: https://svnweb.freebsd.org/changeset/base/282132 > > Log: > Since PFIL can change mbuf pointer, we should update pointers after > calling ipsec_filter(). > > Sponsored by: Yandex LLC > > Modified: > head/sys/netipsec/ipsec_input.c > head/sys/netipsec/ipsec_output.c > > Modified: head/sys/netipsec/ipsec_input.c > > ============================================================================== > --- head/sys/netipsec/ipsec_input.c Tue Apr 28 09:19:40 2015 > (r282131) > +++ head/sys/netipsec/ipsec_input.c Tue Apr 28 09:29:28 2015 > (r282132) > @@ -391,6 +391,7 @@ ipsec4_common_input_cb(struct mbuf *m, s > ipsec_bpf(m, sav, AF_INET, ENC_IN|ENC_BEFORE); > if ((error = ipsec_filter(&m, PFIL_IN, ENC_IN|ENC_BEFORE)) != 0) > return (error); > + ip = mtod(m, struct ip *); > #endif /* DEV_ENC */ > > /* IP-in-IP encapsulation */ > > Modified: head/sys/netipsec/ipsec_output.c > > ============================================================================== > --- head/sys/netipsec/ipsec_output.c Tue Apr 28 09:19:40 2015 > (r282131) > +++ head/sys/netipsec/ipsec_output.c Tue Apr 28 09:29:28 2015 > (r282132) > @@ -578,6 +578,7 @@ ipsec4_process_packet(struct mbuf *m, st > /* pass the mbuf to enc0 for packet filtering */ > if ((error = ipsec_filter(&m, PFIL_OUT, ENC_OUT|ENC_BEFORE)) != 0) > goto bad; > + ip = mtod(m, struct ip *); > #endif > /* Do the appropriate encapsulation, if necessary */ > if (isr->saidx.mode == IPSEC_MODE_TUNNEL || /* Tunnel requ'd */ > @@ -699,6 +700,7 @@ ipsec6_process_packet(struct mbuf *m, st > /* pass the mbuf to enc0 for packet filtering */ > if ((error = ipsec_filter(&m, PFIL_OUT, ENC_OUT|ENC_BEFORE)) != 0) > goto bad; > + ip6 = mtod(m, struct ip6_hdr *); > #endif /* DEV_ENC */ > > /* Do the appropriate encapsulation, if necessary */ > > -- Ermal From owner-svn-src-all@FreeBSD.ORG Tue May 12 07:37:29 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BE186242; Tue, 12 May 2015 07:37:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AC4D51462; Tue, 12 May 2015 07:37:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4C7bTLW092838; Tue, 12 May 2015 07:37:29 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4C7bS9i092832; Tue, 12 May 2015 07:37:28 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201505120737.t4C7bS9i092832@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Tue, 12 May 2015 07:37:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282809 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 12 May 2015 07:37:29 -0000 Author: ae Date: Tue May 12 07:37:27 2015 New Revision: 282809 URL: https://svnweb.freebsd.org/changeset/base/282809 Log: Add new socket ioctls SIOC[SG]TUNFIB to set FIB number of encapsulated packets on tunnel interfaces. Add support of these ioctls to gre(4), gif(4) and me(4) interfaces. For incoming packets M_SETFIB() should use if_fib value from ifnet structure, use proper value in gre(4) and me(4). Differential Revision: https://reviews.freebsd.org/D2462 No objection from: #network MFC after: 2 weeks Sponsored by: Yandex LLC Modified: head/sbin/ifconfig/ifconfig.8 head/sbin/ifconfig/iffib.c head/sys/net/if_gif.c head/sys/net/if_gre.c head/sys/net/if_me.c head/sys/sys/sockio.h Modified: head/sbin/ifconfig/ifconfig.8 ============================================================================== --- head/sbin/ifconfig/ifconfig.8 Tue May 12 05:42:13 2015 (r282808) +++ head/sbin/ifconfig/ifconfig.8 Tue May 12 07:37:27 2015 (r282809) @@ -316,6 +316,14 @@ using the kernel configuration option, or the .Va net.fibs tunable. +.It Cm tunnelfib Ar fib_number +Specify tunnel FIB. +A FIB +.Ar fib_number +is assigned to all packets encapsulated by tunnel interface, e.g., +.Xr gif 4 +and +.Xr gre 4 . .It Cm maclabel Ar label If Mandatory Access Control support is enabled in the kernel, set the MAC label to Modified: head/sbin/ifconfig/iffib.c ============================================================================== --- head/sbin/ifconfig/iffib.c Tue May 12 05:42:13 2015 (r282808) +++ head/sbin/ifconfig/iffib.c Tue May 12 07:37:27 2015 (r282809) @@ -50,15 +50,15 @@ fib_status(int s) memset(&ifr, 0, sizeof(ifr)); strncpy(ifr.ifr_name, name, sizeof(ifr.ifr_name)); + if (ioctl(s, SIOCGIFFIB, (caddr_t)&ifr) == 0 && + ifr.ifr_fib != RT_DEFAULT_FIB) + printf("\tfib: %u\n", ifr.ifr_fib); - if (ioctl(s, SIOCGIFFIB, (caddr_t)&ifr) < 0) - return; - - /* Ignore if it is the default. */ - if (ifr.ifr_fib == 0) - return; - - printf("\tfib: %u\n", ifr.ifr_fib); + memset(&ifr, 0, sizeof(ifr)); + strncpy(ifr.ifr_name, name, sizeof(ifr.ifr_name)); + if (ioctl(s, SIOCGTUNFIB, (caddr_t)&ifr) == 0 && + ifr.ifr_fib != RT_DEFAULT_FIB) + printf("\ttunnelfib: %u\n", ifr.ifr_fib); } static void @@ -80,8 +80,28 @@ setiffib(const char *val, int dummy __un warn("ioctl (SIOCSIFFIB)"); } +static void +settunfib(const char *val, int dummy __unused, int s, + const struct afswtch *afp) +{ + unsigned long fib; + char *ep; + + fib = strtoul(val, &ep, 0); + if (*ep != '\0' || fib > UINT_MAX) { + warn("fib %s not valid", val); + return; + } + + strncpy(ifr.ifr_name, name, sizeof (ifr.ifr_name)); + ifr.ifr_fib = fib; + if (ioctl(s, SIOCSTUNFIB, (caddr_t)&ifr) < 0) + warn("ioctl (SIOCSTUNFIB)"); +} + static struct cmd fib_cmds[] = { DEF_CMD_ARG("fib", setiffib), + DEF_CMD_ARG("tunnelfib", settunfib), }; static struct afswtch af_fib = { Modified: head/sys/net/if_gif.c ============================================================================== --- head/sys/net/if_gif.c Tue May 12 05:42:13 2015 (r282808) +++ head/sys/net/if_gif.c Tue May 12 07:37:27 2015 (r282809) @@ -920,6 +920,17 @@ gif_ioctl(struct ifnet *ifp, u_long cmd, #endif } break; + case SIOCGTUNFIB: + ifr->ifr_fib = sc->gif_fibnum; + break; + case SIOCSTUNFIB: + if ((error = priv_check(curthread, PRIV_NET_GIF)) != 0) + break; + if (ifr->ifr_fib >= rt_numfibs) + error = EINVAL; + else + sc->gif_fibnum = ifr->ifr_fib; + break; case GIFGOPTS: options = sc->gif_options; error = copyout(&options, ifr->ifr_data, sizeof(options)); @@ -935,7 +946,6 @@ gif_ioctl(struct ifnet *ifp, u_long cmd, else sc->gif_options = options; break; - default: error = EINVAL; break; Modified: head/sys/net/if_gre.c ============================================================================== --- head/sys/net/if_gre.c Tue May 12 05:42:13 2015 (r282808) +++ head/sys/net/if_gre.c Tue May 12 07:37:27 2015 (r282809) @@ -64,6 +64,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #ifdef INET @@ -441,6 +442,17 @@ gre_ioctl(struct ifnet *ifp, u_long cmd, #endif } break; + case SIOCGTUNFIB: + ifr->ifr_fib = sc->gre_fibnum; + break; + case SIOCSTUNFIB: + if ((error = priv_check(curthread, PRIV_NET_GRE)) != 0) + break; + if (ifr->ifr_fib >= rt_numfibs) + error = EINVAL; + else + sc->gre_fibnum = ifr->ifr_fib; + break; case GRESKEY: if ((error = priv_check(curthread, PRIV_NET_GRE)) != 0) break; @@ -454,7 +466,8 @@ gre_ioctl(struct ifnet *ifp, u_long cmd, } break; case GREGKEY: - error = copyout(&sc->gre_key, ifr->ifr_data, sizeof(sc->gre_key)); + error = copyout(&sc->gre_key, ifr->ifr_data, + sizeof(sc->gre_key)); break; case GRESOPTS: if ((error = priv_check(curthread, PRIV_NET_GRE)) != 0) @@ -725,7 +738,7 @@ gre_input(struct mbuf **mp, int *offp, i m_adj(m, *offp + hlen); m_clrprotoflags(m); m->m_pkthdr.rcvif = ifp; - M_SETFIB(m, sc->gre_fibnum); + M_SETFIB(m, ifp->if_fib); #ifdef MAC mac_ifnet_create_mbuf(ifp, m); #endif Modified: head/sys/net/if_me.c ============================================================================== --- head/sys/net/if_me.c Tue May 12 05:42:13 2015 (r282808) +++ head/sys/net/if_me.c Tue May 12 07:37:27 2015 (r282809) @@ -54,6 +54,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -297,6 +298,17 @@ me_ioctl(struct ifnet *ifp, u_long cmd, if (error != 0) memset(src, 0, sizeof(*src)); break; + case SIOCGTUNFIB: + ifr->ifr_fib = sc->me_fibnum; + break; + case SIOCSTUNFIB: + if ((error = priv_check(curthread, PRIV_NET_GRE)) != 0) + break; + if (ifr->ifr_fib >= rt_numfibs) + error = EINVAL; + else + sc->me_fibnum = ifr->ifr_fib; + break; default: error = EINVAL; break; @@ -453,7 +465,7 @@ me_input(struct mbuf **mp, int *offp, in m_clrprotoflags(m); m->m_pkthdr.rcvif = ifp; m->m_pkthdr.csum_flags |= (CSUM_IP_CHECKED | CSUM_IP_VALID); - M_SETFIB(m, sc->me_fibnum); + M_SETFIB(m, ifp->if_fib); hlen = AF_INET; BPF_MTAP2(ifp, &hlen, sizeof(hlen), m); if_inc_counter(ifp, IFCOUNTER_IPACKETS, 1); Modified: head/sys/sys/sockio.h ============================================================================== --- head/sys/sys/sockio.h Tue May 12 05:42:13 2015 (r282808) +++ head/sys/sys/sockio.h Tue May 12 07:37:27 2015 (r282809) @@ -114,6 +114,9 @@ #define SIOCGIFFIB _IOWR('i', 92, struct ifreq) /* get IF fib */ #define SIOCSIFFIB _IOW('i', 93, struct ifreq) /* set IF fib */ +#define SIOCGTUNFIB _IOWR('i', 94, struct ifreq) /* get tunnel fib */ +#define SIOCSTUNFIB _IOW('i', 95, struct ifreq) /* set tunnel fib */ + #define SIOCSDRVSPEC _IOW('i', 123, struct ifdrv) /* set driver-specific parameters */ #define SIOCGDRVSPEC _IOWR('i', 123, struct ifdrv) /* get driver-specific From owner-svn-src-all@FreeBSD.ORG Tue May 12 08:05:42 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 337157EC; Tue, 12 May 2015 08:05:42 +0000 (UTC) Received: from mail-wi0-x229.google.com (mail-wi0-x229.google.com [IPv6:2a00:1450:400c:c05::229]) (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 BBA0617A0; Tue, 12 May 2015 08:05:41 +0000 (UTC) Received: by widdi4 with SMTP id di4so140475765wid.0; Tue, 12 May 2015 01:05:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=lBb5YbzjrVQMgaKojq7Y+0zyRGfvV0E/KQgCouFw/TE=; b=HNYTO8/pR+NYbE5w8i7Ln3UT8hmRKf7TIeNX8QNIsR6ziXSkf/DvGWACs8hNU5/k5y ukBr2+VbSq9r0gFb83R/Q+xGEq6i8SiAq5NI8m6RahGsfA76nABM1uPO48lU8Ku1/AGt todzhNh+2dGzamxzlkT+K12auQyemUNDHhMyIb/ROIoe2eqaYyT+arE6Mf+ZFh9/Y+40 MdpKn8E1sTnWZosUtgPWKUZR7faxN0+cALESYkrLyM43sVT6+YLjXkunY1OGUN1qrCBg yiaX29Q5mvA2aM0n6wVkh1uPPXnX7lZrF/VTUT81ar+KGnsWQyVjKjvuJ+GfTIm4+8qI iSOQ== X-Received: by 10.194.103.232 with SMTP id fz8mr26580395wjb.130.1431417940282; Tue, 12 May 2015 01:05:40 -0700 (PDT) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by mx.google.com with ESMTPSA id bh7sm26447867wjb.8.2015.05.12.01.05.39 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 May 2015 01:05:39 -0700 (PDT) Sender: Baptiste Daroussin Date: Tue, 12 May 2015 10:05:37 +0200 From: Baptiste Daroussin To: Xin LI Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r282808 - head/lib/liblzma Message-ID: <20150512080537.GB46991@ivaldir.etoilebsd.net> References: <201505120542.t4C5gDFX038841@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="5/uDoXvLw7AC5HRs" Content-Disposition: inline In-Reply-To: <201505120542.t4C5gDFX038841@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 12 May 2015 08:05:42 -0000 --5/uDoXvLw7AC5HRs Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, May 12, 2015 at 05:42:13AM +0000, Xin LI wrote: > Author: delphij > Date: Tue May 12 05:42:13 2015 > New Revision: 282808 > URL: https://svnweb.freebsd.org/changeset/base/282808 >=20 > Log: > Revert r282775 for now. The added dependency would cause problems for > e.g. ports-mgmt/pkg and we would like to do an exp-build. > =20 > Requested by: bdrewery >=20 > Modified: > head/lib/liblzma/Makefile > head/lib/liblzma/Symbol.map > head/lib/liblzma/config.h >=20 > Modified: head/lib/liblzma/Makefile > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/lib/liblzma/Makefile Tue May 12 03:49:18 2015 (r282807) > +++ head/lib/liblzma/Makefile Tue May 12 05:42:13 2015 (r282808) > @@ -77,7 +77,8 @@ SRCS+=3D common.c \ > .PATH: ${LZMADIR}/check > SRCS+=3D check.c \ > crc32_table.c \ > - crc64_table.c > + crc64_table.c \ > + sha256.c > .if defined(MACHINE_ARCH) && ${MACHINE_ARCH} =3D=3D "i386" > SRCS+=3D crc32_x86.S \ > crc64_x86.S > @@ -145,7 +146,7 @@ CFLAGS+=3D -DHAVE_CONFIG_H \ > -I${LZMADIR}/simple \ > -I${LZMADIR}/../common > =20 > -LIBADD+=3D md pthread > +LIBADD+=3D pthread If you are on doing that you should at least modify as well the lzma .pc fi= le to that anything asking for pkg-config --libs will provide -lmd, should be = the Libs.private field Also note that this will not solve the pkg case :) Best regards, Bapt --5/uDoXvLw7AC5HRs Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlVRtFEACgkQ8kTtMUmk6ExEEwCfedNJCCWhciar0QrT0uXRQmip v9QAoItF3x1H6w+YfBl1PL+5qZVgz5jA =ROjj -----END PGP SIGNATURE----- --5/uDoXvLw7AC5HRs-- From owner-svn-src-all@FreeBSD.ORG Tue May 12 08:08:17 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9B538954; Tue, 12 May 2015 08:08:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8A41617C0; Tue, 12 May 2015 08:08:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4C88Htx007708; Tue, 12 May 2015 08:08:17 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4C88HSc007707; Tue, 12 May 2015 08:08:17 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201505120808.t4C88HSc007707@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Tue, 12 May 2015 08:08:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282810 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 12 May 2015 08:08:17 -0000 Author: tuexen Date: Tue May 12 08:08:16 2015 New Revision: 282810 URL: https://svnweb.freebsd.org/changeset/base/282810 Log: Ensure that the COOKIE-ACK can be sent over UDP if the COOKIE-ECHO was received over UDP. Thanks to Felix Weinrank for makeing me aware of the problem and to Irene Ruengeler for providing the fix. MFC after: 1 week Modified: head/sys/netinet/sctp_input.c Modified: head/sys/netinet/sctp_input.c ============================================================================== --- head/sys/netinet/sctp_input.c Tue May 12 07:37:27 2015 (r282809) +++ head/sys/netinet/sctp_input.c Tue May 12 08:08:16 2015 (r282810) @@ -2325,12 +2325,13 @@ sctp_process_cookie_new(struct mbuf *m, sctp_is_feature_on(inp, SCTP_PCB_FLAGS_AUTOCLOSE)) { sctp_timer_start(SCTP_TIMER_TYPE_AUTOCLOSE, inp, stcb, NULL); } - /* calculate the RTT */ (void)SCTP_GETTIME_TIMEVAL(&stcb->asoc.time_entered); if ((netp) && (*netp)) { + /* calculate the RTT and set the encaps port */ (*netp)->RTO = sctp_calculate_rto(stcb, asoc, *netp, &cookie->time_entered, sctp_align_unsafe_makecopy, SCTP_RTT_FROM_NON_DATA); + (*netp)->port = port; } /* respond with a COOKIE-ACK */ sctp_send_cookie_ack(stcb); From owner-svn-src-all@FreeBSD.ORG Tue May 12 08:39:52 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:1900:2254:206a::19:2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4D4C9DF7; Tue, 12 May 2015 08:39:52 +0000 (UTC) Received: from butcher-nb.yandex.net (hub.freebsd.org [IPv6:2001:1900:2254:206c::16:88]) by mx2.freebsd.org (Postfix) with ESMTP id 0F05C1A46; Tue, 12 May 2015 08:39:50 +0000 (UTC) Message-ID: <5551BBDD.2060901@FreeBSD.org> Date: Tue, 12 May 2015 11:37:49 +0300 From: "Andrey V. Elsukov" User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: =?UTF-8?B?RXJtYWwgTHXDp2k=?= CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r282132 - head/sys/netipsec References: <201504280929.t3S9TTE6061279@svn.freebsd.org> In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="re7riFXgQsWm0cIedPCq38s6Q4Ug6Ilnl" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 12 May 2015 08:39:52 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --re7riFXgQsWm0cIedPCq38s6Q4Ug6Ilnl Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 12.05.2015 10:25, Ermal Lu=C3=A7i wrote: > Hello Andrey, >=20 > do you plan to MFC this one? >=20 > On Tue, Apr 28, 2015 at 11:29 AM, Andrey V. Elsukov > wrote: >=20 > Author: ae > Date: Tue Apr 28 09:29:28 2015 > New Revision: 282132 > URL: https://svnweb.freebsd.org/changeset/base/282132 >=20 > Log: > Since PFIL can change mbuf pointer, we should update pointers aft= er > calling ipsec_filter(). Hi, it looks like there are more revisions should be merged before this one. But probably this will break your IPSec implementation :) --=20 WBR, Andrey V. Elsukov --re7riFXgQsWm0cIedPCq38s6Q4Ug6Ilnl Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJVUbvkAAoJEAHF6gQQyKF691IH/0W5hWhvtOYlEaCzR/f0Ye7i 2fgGUAqjmtsLPovbi/fjYAx7uc8oyFUNTsnEv6VLFBbGSr8cX94LqYn5ceYPO41p 1jxjiePdKvLTEx7hXdRoD+UHpFD5C3P3j5q5f20A197evn9D7OEALapgEwubBhQT Oc8mThuoeNVtExiIYuP3gxs2gina8s9+/pN+C5fohP4gvVF85WeobHVQ7m3jhMDQ L+bbKQZGXYyxYR8NQwEZwDPQQEjGPkkKGgZXpBKV7pLjVd3tiqzAcwb6lOPXDDWa kAksWfaMpi85+s3FgBv60V8o3CfzsvTKsu7BD2mo+Wa/G1JSAWbH2RlXjQt0PgM= =Yktf -----END PGP SIGNATURE----- --re7riFXgQsWm0cIedPCq38s6Q4Ug6Ilnl-- From owner-svn-src-all@FreeBSD.ORG Tue May 12 08:52:51 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3B656195; Tue, 12 May 2015 08:52:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2968A1D62; Tue, 12 May 2015 08:52:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4C8qpXw031249; Tue, 12 May 2015 08:52:51 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4C8qpXb031248; Tue, 12 May 2015 08:52:51 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201505120852.t4C8qpXb031248@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 12 May 2015 08:52: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: r282811 - stable/10/sys/amd64/amd64 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.20 Precedence: list List-Id: "SVN commit messages 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, 12 May 2015 08:52:51 -0000 Author: kib Date: Tue May 12 08:52:50 2015 New Revision: 282811 URL: https://svnweb.freebsd.org/changeset/base/282811 Log: MFC r282680: Remove unused define. Modified: stable/10/sys/amd64/amd64/apic_vector.S Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/amd64/apic_vector.S ============================================================================== --- stable/10/sys/amd64/amd64/apic_vector.S Tue May 12 08:08:16 2015 (r282810) +++ stable/10/sys/amd64/amd64/apic_vector.S Tue May 12 08:52:50 2015 (r282811) @@ -156,8 +156,6 @@ IDTVEC(xen_intr_upcall) */ .text -#define NAKE_INTR_CS 24 - SUPERALIGN_TEXT invltlb_ret: movq lapic, %rax From owner-svn-src-all@FreeBSD.ORG Tue May 12 08:53:55 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 825F72DF; Tue, 12 May 2015 08:53:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 707951D71; Tue, 12 May 2015 08:53:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4C8rtJ9031434; Tue, 12 May 2015 08:53:55 GMT (envelope-from ganbold@FreeBSD.org) Received: (from ganbold@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4C8rtmC031433; Tue, 12 May 2015 08:53:55 GMT (envelope-from ganbold@FreeBSD.org) Message-Id: <201505120853.t4C8rtmC031433@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ganbold set sender to ganbold@FreeBSD.org using -f From: Ganbold Tsagaankhuu Date: Tue, 12 May 2015 08:53:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282812 - head/sys/arm/amlogic/aml8726 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.20 Precedence: list List-Id: "SVN commit messages 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, 12 May 2015 08:53:55 -0000 Author: ganbold Date: Tue May 12 08:53:54 2015 New Revision: 282812 URL: https://svnweb.freebsd.org/changeset/base/282812 Log: Disable WPI in case of aml8726-m3. The aml8726-m3 SoC is identified as a Cortex A9-r2 rev 4 CPU and it hangs sometimes during the boot when WFI is used by the kernel. Differential Revision: https://reviews.freebsd.org/D2473 Submitted by: John Wehle Suggested by: ian@ Modified: head/sys/arm/amlogic/aml8726/aml8726_machdep.c Modified: head/sys/arm/amlogic/aml8726/aml8726_machdep.c ============================================================================== --- head/sys/arm/amlogic/aml8726/aml8726_machdep.c Tue May 12 08:52:50 2015 (r282811) +++ head/sys/arm/amlogic/aml8726/aml8726_machdep.c Tue May 12 08:53:54 2015 (r282812) @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -114,6 +115,19 @@ platform_gpio_init(void) aml8726_identify_soc(); /* + * My aml8726-m3 development box which identifies the CPU as + * a Cortex A9-r2 rev 4 randomly locks up during boot when WFI + * is used. + */ + switch (aml8726_soc_hw_rev) { + case AML_SOC_HW_REV_M3: + cpufuncs.cf_sleep = (void *)cpufunc_nullop; + break; + default: + break; + } + + /* * This FDT fixup should arguably be called through fdt_fixup_table, * however currently there's no mechanism to specify a fixup which * should always be invoked. From owner-svn-src-all@FreeBSD.ORG Tue May 12 09:25:17 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CEA86CA9; Tue, 12 May 2015 09:25:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BC4A010E6; Tue, 12 May 2015 09:25:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4C9PHEe046731; Tue, 12 May 2015 09:25:17 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4C9PHXN046730; Tue, 12 May 2015 09:25:17 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201505120925.t4C9PHXN046730@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Tue, 12 May 2015 09:25: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: r282813 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs 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.20 Precedence: list List-Id: "SVN commit messages 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, 12 May 2015 09:25:18 -0000 Author: smh Date: Tue May 12 09:25:16 2015 New Revision: 282813 URL: https://svnweb.freebsd.org/changeset/base/282813 Log: MFC r282205: Fix misuse of input argument in traverse_visitbp Obtained from: zfsonlinux (a585f2f844ed3d4270221fed88f5e494eb55d932 Sponsored by: Multiplay Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c Tue May 12 08:53:54 2015 (r282812) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c Tue May 12 09:25:16 2015 (r282813) @@ -306,21 +306,22 @@ traverse_visitbp(traverse_data_t *td, co arc_flags_t flags = ARC_FLAG_WAIT; int i; int epb = BP_GET_LSIZE(bp) >> DNODE_SHIFT; + dnode_phys_t *cdnp; err = arc_read(NULL, td->td_spa, bp, arc_getbuf_func, &buf, ZIO_PRIORITY_ASYNC_READ, ZIO_FLAG_CANFAIL, &flags, zb); if (err != 0) goto post; - dnp = buf->b_data; + cdnp = buf->b_data; for (i = 0; i < epb; i++) { - prefetch_dnode_metadata(td, &dnp[i], zb->zb_objset, + prefetch_dnode_metadata(td, &cdnp[i], zb->zb_objset, zb->zb_blkid * epb + i); } /* recursively visitbp() blocks below this */ for (i = 0; i < epb; i++) { - err = traverse_dnode(td, &dnp[i], zb->zb_objset, + err = traverse_dnode(td, &cdnp[i], zb->zb_objset, zb->zb_blkid * epb + i); if (err != 0) break; @@ -328,7 +329,7 @@ traverse_visitbp(traverse_data_t *td, co } else if (BP_GET_TYPE(bp) == DMU_OT_OBJSET) { arc_flags_t flags = ARC_FLAG_WAIT; objset_phys_t *osp; - dnode_phys_t *dnp; + dnode_phys_t *mdnp, *gdnp, *udnp; err = arc_read(NULL, td->td_spa, bp, arc_getbuf_func, &buf, ZIO_PRIORITY_ASYNC_READ, ZIO_FLAG_CANFAIL, &flags, zb); @@ -336,26 +337,27 @@ traverse_visitbp(traverse_data_t *td, co goto post; osp = buf->b_data; - dnp = &osp->os_meta_dnode; - prefetch_dnode_metadata(td, dnp, zb->zb_objset, + mdnp = &osp->os_meta_dnode; + gdnp = &osp->os_groupused_dnode; + udnp = &osp->os_userused_dnode; + + prefetch_dnode_metadata(td, mdnp, zb->zb_objset, DMU_META_DNODE_OBJECT); if (arc_buf_size(buf) >= sizeof (objset_phys_t)) { - prefetch_dnode_metadata(td, &osp->os_groupused_dnode, - zb->zb_objset, DMU_GROUPUSED_OBJECT); - prefetch_dnode_metadata(td, &osp->os_userused_dnode, - zb->zb_objset, DMU_USERUSED_OBJECT); + prefetch_dnode_metadata(td, gdnp, zb->zb_objset, + DMU_GROUPUSED_OBJECT); + prefetch_dnode_metadata(td, udnp, zb->zb_objset, + DMU_USERUSED_OBJECT); } - err = traverse_dnode(td, dnp, zb->zb_objset, + err = traverse_dnode(td, mdnp, zb->zb_objset, DMU_META_DNODE_OBJECT); if (err == 0 && arc_buf_size(buf) >= sizeof (objset_phys_t)) { - dnp = &osp->os_groupused_dnode; - err = traverse_dnode(td, dnp, zb->zb_objset, + err = traverse_dnode(td, gdnp, zb->zb_objset, DMU_GROUPUSED_OBJECT); } if (err == 0 && arc_buf_size(buf) >= sizeof (objset_phys_t)) { - dnp = &osp->os_userused_dnode; - err = traverse_dnode(td, dnp, zb->zb_objset, + err = traverse_dnode(td, udnp, zb->zb_objset, DMU_USERUSED_OBJECT); } } From owner-svn-src-all@FreeBSD.ORG Tue May 12 09:30:30 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 14B5B13F; Tue, 12 May 2015 09:30:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 02DE711E8; Tue, 12 May 2015 09:30:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4C9UTWG047511; Tue, 12 May 2015 09:30:29 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4C9UT14047510; Tue, 12 May 2015 09:30:29 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201505120930.t4C9UT14047510@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 12 May 2015 09:30: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: r282814 - stable/10/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.20 Precedence: list List-Id: "SVN commit messages 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, 12 May 2015 09:30:30 -0000 Author: avg Date: Tue May 12 09:30:29 2015 New Revision: 282814 URL: https://svnweb.freebsd.org/changeset/base/282814 Log: followup to r282748: remove another instance of cyclic in sys/modules/Makefile Those lines were not present in head and thus were not removed by the original commit and its merge. Modified: stable/10/sys/modules/Makefile Modified: stable/10/sys/modules/Makefile ============================================================================== --- stable/10/sys/modules/Makefile Tue May 12 09:25:16 2015 (r282813) +++ stable/10/sys/modules/Makefile Tue May 12 09:30:29 2015 (r282814) @@ -672,9 +672,6 @@ _ciss= ciss _coretemp= coretemp _cpuctl= cpuctl _cpufreq= cpufreq -.if ${MK_CDDL} != "no" || defined(ALL_MODULES) -_cyclic= cyclic -.endif _dpms= dpms _drm= drm _drm2= drm2 From owner-svn-src-all@FreeBSD.ORG Tue May 12 09:35:51 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 419FE384; Tue, 12 May 2015 09:35:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 15D79122F; Tue, 12 May 2015 09:35:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4C9Zoul051768; Tue, 12 May 2015 09:35:50 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4C9ZoWT051767; Tue, 12 May 2015 09:35:50 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201505120935.t4C9ZoWT051767@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 12 May 2015 09:35:50 +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: r282815 - stable/10/sys/modules/cyclic 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.20 Precedence: list List-Id: "SVN commit messages 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, 12 May 2015 09:35:51 -0000 Author: avg Date: Tue May 12 09:35:50 2015 New Revision: 282815 URL: https://svnweb.freebsd.org/changeset/base/282815 Log: followup to r282748: sys/modules/cyclic was not removed by svn merge This directory and its content were removed by the original commit but somehow the merge did not remove the directory. Spotted by: smh Deleted: stable/10/sys/modules/cyclic/ From owner-svn-src-all@FreeBSD.ORG Tue May 12 10:03:16 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2A345BA6; Tue, 12 May 2015 10:03:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 179DB161C; Tue, 12 May 2015 10:03:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4CA3Fpb066145; Tue, 12 May 2015 10:03:15 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4CA3ES7066139; Tue, 12 May 2015 10:03:14 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201505121003.t4CA3ES7066139@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 12 May 2015 10:03:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282816 - in head/lib/libc/arm: . aeabi 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.20 Precedence: list List-Id: "SVN commit messages 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, 12 May 2015 10:03:16 -0000 Author: andrew Date: Tue May 12 10:03:14 2015 New Revision: 282816 URL: https://svnweb.freebsd.org/changeset/base/282816 Log: Teach bits of libc about Thumb. This adds the if-then instructions needed to handle the ARM conditional execution. While here fix a bug found by this in the hard-float code, cc is the opposite of cs. The former is used for 'less than' in floating-point code and is executed when the C (carry) bit is clear, the latter is used when greater than, equal, or unordered, and is executed when the C bit is set. Modified: head/lib/libc/arm/SYS.h head/lib/libc/arm/aeabi/aeabi_vfp_double.S head/lib/libc/arm/aeabi/aeabi_vfp_float.S head/lib/libc/arm/gen/_setjmp.S head/lib/libc/arm/gen/setjmp.S Modified: head/lib/libc/arm/SYS.h ============================================================================== --- head/lib/libc/arm/SYS.h Tue May 12 09:35:50 2015 (r282815) +++ head/lib/libc/arm/SYS.h Tue May 12 10:03:14 2015 (r282816) @@ -62,6 +62,7 @@ #define _SYSCALL(x) \ _SYSCALL_NOERROR(x); \ + it cs; \ bcs PIC_SYM(CERROR, PLT) #define SYSCALL(x) \ @@ -72,6 +73,7 @@ .weak _C_LABEL(__CONCAT(_,x)); \ .set _C_LABEL(__CONCAT(_,x)),_C_LABEL(__CONCAT(__sys_,x)); \ SYSTRAP(x); \ + it cs; \ bcs PIC_SYM(CERROR, PLT); \ RET Modified: head/lib/libc/arm/aeabi/aeabi_vfp_double.S ============================================================================== --- head/lib/libc/arm/aeabi/aeabi_vfp_double.S Tue May 12 09:35:50 2015 (r282815) +++ head/lib/libc/arm/aeabi/aeabi_vfp_double.S Tue May 12 10:03:14 2015 (r282816) @@ -66,6 +66,7 @@ AEABI_ENTRY(dcmpeq) LOAD_DREG(d1, r2, r3) vcmp.f64 d0, d1 vmrs APSR_nzcv, fpscr + ite ne movne r0, #0 moveq r0, #1 RET @@ -77,8 +78,9 @@ AEABI_ENTRY(dcmplt) LOAD_DREG(d1, r2, r3) vcmp.f64 d0, d1 vmrs APSR_nzcv, fpscr + ite cs movcs r0, #0 - movlt r0, #1 + movcc r0, #1 RET AEABI_END(dcmplt) @@ -88,6 +90,7 @@ AEABI_ENTRY(dcmple) LOAD_DREG(d1, r2, r3) vcmp.f64 d0, d1 vmrs APSR_nzcv, fpscr + ite hi movhi r0, #0 movls r0, #1 RET @@ -99,6 +102,7 @@ AEABI_ENTRY(dcmpge) LOAD_DREG(d1, r2, r3) vcmp.f64 d0, d1 vmrs APSR_nzcv, fpscr + ite lt movlt r0, #0 movge r0, #1 RET @@ -110,6 +114,7 @@ AEABI_ENTRY(dcmpgt) LOAD_DREG(d1, r2, r3) vcmp.f64 d0, d1 vmrs APSR_nzcv, fpscr + ite le movle r0, #0 movgt r0, #1 RET @@ -121,6 +126,7 @@ AEABI_ENTRY(dcmpun) LOAD_DREG(d1, r2, r3) vcmp.f64 d0, d1 vmrs APSR_nzcv, fpscr + ite vc movvc r0, #0 movvs r0, #1 RET Modified: head/lib/libc/arm/aeabi/aeabi_vfp_float.S ============================================================================== --- head/lib/libc/arm/aeabi/aeabi_vfp_float.S Tue May 12 09:35:50 2015 (r282815) +++ head/lib/libc/arm/aeabi/aeabi_vfp_float.S Tue May 12 10:03:14 2015 (r282816) @@ -62,6 +62,7 @@ AEABI_ENTRY(fcmpeq) LOAD_SREGS(s0, s1, r0, r1) vcmp.f32 s0, s1 vmrs APSR_nzcv, fpscr + ite ne movne r0, #0 moveq r0, #1 RET @@ -72,8 +73,9 @@ AEABI_ENTRY(fcmplt) LOAD_SREGS(s0, s1, r0, r1) vcmp.f32 s0, s1 vmrs APSR_nzcv, fpscr + ite cs movcs r0, #0 - movlt r0, #1 + movcc r0, #1 RET AEABI_END(fcmplt) @@ -82,6 +84,7 @@ AEABI_ENTRY(fcmple) LOAD_SREGS(s0, s1, r0, r1) vcmp.f32 s0, s1 vmrs APSR_nzcv, fpscr + ite hi movhi r0, #0 movls r0, #1 RET @@ -92,6 +95,7 @@ AEABI_ENTRY(fcmpge) LOAD_SREGS(s0, s1, r0, r1) vcmp.f32 s0, s1 vmrs APSR_nzcv, fpscr + ite lt movlt r0, #0 movge r0, #1 RET @@ -102,6 +106,7 @@ AEABI_ENTRY(fcmpgt) LOAD_SREGS(s0, s1, r0, r1) vcmp.f32 s0, s1 vmrs APSR_nzcv, fpscr + ite le movle r0, #0 movgt r0, #1 RET @@ -112,6 +117,7 @@ AEABI_ENTRY(fcmpun) LOAD_SREGS(s0, s1, r0, r1) vcmp.f32 s0, s1 vmrs APSR_nzcv, fpscr + ite vc movvc r0, #0 movvs r0, #1 RET Modified: head/lib/libc/arm/gen/_setjmp.S ============================================================================== --- head/lib/libc/arm/gen/_setjmp.S Tue May 12 09:35:50 2015 (r282815) +++ head/lib/libc/arm/gen/_setjmp.S Tue May 12 10:03:14 2015 (r282816) @@ -85,7 +85,13 @@ ENTRY(_setjmp) add r0, r0, #(_JB_REG_R4 * 4) /* Store integer registers */ +#ifndef __thumb__ stmia r0, {r4-r14} +#else + stmia r0, {r4-r12} + str r13, [r0, #((_JB_REG_R13 - _JB_REG_R4) * 4)] + str r14, [r0, #((_JB_REG_R14 - _JB_REG_R4) * 4)] +#endif mov r0, #0x00000000 RET @@ -120,15 +126,24 @@ ENTRY(_longjmp) add r0, r0, #(_JB_REG_R4 * 4) /* Restore integer registers */ +#ifndef __thumb__ ldmia r0, {r4-r14} +#else + ldmia r0, {r4-r12} + ldr r13, [r0, #((_JB_REG_R13 - _JB_REG_R4) * 4)] + ldr r14, [r0, #((_JB_REG_R14 - _JB_REG_R4) * 4)] +#endif /* Validate sp and r14 */ teq sp, #0 + it ne teqne r14, #0 + it eq beq botch /* Set return value */ movs r0, r1 + it eq moveq r0, #0x00000001 RET @@ -137,7 +152,7 @@ botch: #if !defined(_STANDALONE) bl PIC_SYM(_C_LABEL(longjmperror), PLT) bl PIC_SYM(_C_LABEL(abort), PLT) - b . - 8 /* Cannot get here */ +1: b 1b /* Cannot get here */ #else b . #endif Modified: head/lib/libc/arm/gen/setjmp.S ============================================================================== --- head/lib/libc/arm/gen/setjmp.S Tue May 12 09:35:50 2015 (r282815) +++ head/lib/libc/arm/gen/setjmp.S Tue May 12 10:03:14 2015 (r282816) @@ -90,7 +90,13 @@ ENTRY(setjmp) /* Store integer registers */ add r0, r0, #(_JB_REG_R4 * 4) +#ifndef __thumb__ stmia r0, {r4-r14} +#else + stmia r0, {r4-r12} + str r13, [r0, #((_JB_REG_R13 - _JB_REG_R4) * 4)] + str r14, [r0, #((_JB_REG_R14 - _JB_REG_R4) * 4)] +#endif mov r0, #0x00000000 RET @@ -133,15 +139,24 @@ ENTRY(__longjmp) add r0, r0, #(_JB_REG_R4 * 4) /* Restore integer registers */ +#ifndef __thumb__ ldmia r0, {r4-r14} +#else + ldmia r0, {r4-r12} + ldr r13, [r0, #((_JB_REG_R13 - _JB_REG_R4) * 4)] + ldr r14, [r0, #((_JB_REG_R14 - _JB_REG_R4) * 4)] +#endif /* Validate sp and r14 */ teq sp, #0 + it ne teqne r14, #0 + it eq beq .Lbotch /* Set return value */ movs r0, r1 + it eq moveq r0, #0x00000001 RET @@ -149,5 +164,5 @@ ENTRY(__longjmp) .Lbotch: bl PIC_SYM(_C_LABEL(longjmperror), PLT) bl PIC_SYM(_C_LABEL(abort), PLT) - b . - 8 /* Cannot get here */ +1: b 1b /* Cannot get here */ END(__longjmp) From owner-svn-src-all@FreeBSD.ORG Tue May 12 11:52:35 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A6507D17; Tue, 12 May 2015 11:52:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9436F11D4; Tue, 12 May 2015 11:52:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4CBqZZB019743; Tue, 12 May 2015 11:52:35 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4CBqZ2E019742; Tue, 12 May 2015 11:52:35 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201505121152.t4CBqZ2E019742@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 12 May 2015 11:52:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282817 - head/sys/ofed/drivers/net/mlx4 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.20 Precedence: list List-Id: "SVN commit messages 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, 12 May 2015 11:52:35 -0000 Author: hselasky Date: Tue May 12 11:52:34 2015 New Revision: 282817 URL: https://svnweb.freebsd.org/changeset/base/282817 Log: Apply proper locking when iterating the multicast addresses and add a missing check for NULL from a non-blocking "kzalloc()" function call. MFC after: 1 week Sponsored by: Mellanox Technologies Found by: glebius @ Modified: head/sys/ofed/drivers/net/mlx4/en_netdev.c Modified: head/sys/ofed/drivers/net/mlx4/en_netdev.c ============================================================================== --- head/sys/ofed/drivers/net/mlx4/en_netdev.c Tue May 12 10:03:14 2015 (r282816) +++ head/sys/ofed/drivers/net/mlx4/en_netdev.c Tue May 12 11:52:34 2015 (r282817) @@ -650,6 +650,7 @@ static void mlx4_en_cache_mclist(struct struct mlx4_en_mc_list *tmp; struct mlx4_en_priv *priv = netdev_priv(dev); + if_maddr_rlock(dev); TAILQ_FOREACH(ifma, &dev->if_multiaddrs, ifma_link) { if (ifma->ifma_addr->sa_family != AF_LINK) continue; @@ -658,10 +659,13 @@ static void mlx4_en_cache_mclist(struct continue; /* Make sure the list didn't grow. */ tmp = kzalloc(sizeof(struct mlx4_en_mc_list), GFP_ATOMIC); + if (tmp == NULL) + break; memcpy(tmp->addr, LLADDR((struct sockaddr_dl *)ifma->ifma_addr), ETH_ALEN); list_add_tail(&tmp->list, &priv->mc_list); } + if_maddr_runlock(dev); } static void update_mclist_flags(struct mlx4_en_priv *priv, From owner-svn-src-all@FreeBSD.ORG Tue May 12 14:58:38 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 49B3E1DB for ; Tue, 12 May 2015 14:58:38 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 163E9180C for ; Tue, 12 May 2015 14:58:38 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.9/8.14.9) with ESMTP id t4CEwbV9020984 for ; Tue, 12 May 2015 14:58:37 GMT (envelope-from bdrewery@freefall.freebsd.org) Received: (from bdrewery@localhost) by freefall.freebsd.org (8.14.9/8.14.9/Submit) id t4CEwbTs020983 for svn-src-all@freebsd.org; Tue, 12 May 2015 14:58:37 GMT (envelope-from bdrewery) Received: (qmail 48544 invoked from network); 12 May 2015 09:58:33 -0500 Received: from unknown (HELO ?10.10.1.139?) (freebsd@shatow.net@10.10.1.139) by sweb.xzibition.com with ESMTPA; 12 May 2015 09:58:33 -0500 Message-ID: <55521519.7090303@FreeBSD.org> Date: Tue, 12 May 2015 09:58:33 -0500 From: Bryan Drewery Organization: FreeBSD User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Xin LI , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r282808 - head/lib/liblzma References: <201505120542.t4C5gDFX038841@svn.freebsd.org> In-Reply-To: <201505120542.t4C5gDFX038841@svn.freebsd.org> OpenPGP: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="FfKgSXUeGD1FPENGRBNbkNVjLnO6UjJI9" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 12 May 2015 14:58:38 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --FfKgSXUeGD1FPENGRBNbkNVjLnO6UjJI9 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 5/12/2015 12:42 AM, Xin LI wrote: > Author: delphij > Date: Tue May 12 05:42:13 2015 > New Revision: 282808 > URL: https://svnweb.freebsd.org/changeset/base/282808 >=20 > Log: > Revert r282775 for now. The added dependency would cause problems fo= r > e.g. ports-mgmt/pkg and we would like to do an exp-build. > =20 > Requested by: bdrewery >=20 > Modified: > head/lib/liblzma/Makefile > head/lib/liblzma/Symbol.map > head/lib/liblzma/config.h >=20 Thank you. --=20 Regards, Bryan Drewery --FfKgSXUeGD1FPENGRBNbkNVjLnO6UjJI9 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJVUhUZAAoJEDXXcbtuRpfP8AwIAMZpX3NDYDG0UoXV56ZSiv8g xVTxYSo8MwXdz5LlP1V3aywhrTH/TFNrwkdabCuS/kYFqNClRBRqgqIWMCgpo3kG qKNwUebwqUTwnHKfC4BSMkg0FHNGVJYeIDZj19vhqq24YGY9rXVCy10w4bctqygr R5MRdPTIeFSxxsK1Sft6N7txPOi82JNZ6sSGQWUyR5Y+Tn3AVVyrQxWhVyyQa5Iu rTU+uT9gzyRCCVEIWAYbeaySUZ2HK8+oE+ITlVIhVVqMksrfP6LGpzL1CZ/8vY9d Pd+4Ao1wFwaD7b1a8hw/Ad3FxOsYAmWqheMato/KKToWH1/MIQUpLS/xUaQ74/o= =uZ1A -----END PGP SIGNATURE----- --FfKgSXUeGD1FPENGRBNbkNVjLnO6UjJI9-- From owner-svn-src-all@FreeBSD.ORG Tue May 12 15:21:20 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B4FEEBA2; Tue, 12 May 2015 15:21:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A28B01BDE; Tue, 12 May 2015 15:21:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4CFLKYi024185; Tue, 12 May 2015 15:21:20 GMT (envelope-from garga@FreeBSD.org) Received: (from garga@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4CFLKGH024183; Tue, 12 May 2015 15:21:20 GMT (envelope-from garga@FreeBSD.org) Message-Id: <201505121521.t4CFLKGH024183@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: garga set sender to garga@FreeBSD.org using -f From: Renato Botelho Date: Tue, 12 May 2015 15:21: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: r282818 - in stable/10/sys/dev/usb: . serial 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.20 Precedence: list List-Id: "SVN commit messages 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, 12 May 2015 15:21:20 -0000 Author: garga (ports committer) Date: Tue May 12 15:21:19 2015 New Revision: 282818 URL: https://svnweb.freebsd.org/changeset/base/282818 Log: MFC r282469: Add support for Sierra MC7354 card Author: Jeremy Porter Differential Revision: https://reviews.freebsd.org/D2444 Reviewed by: gnn, hselasky Sponsored by: Netgate Modified: stable/10/sys/dev/usb/serial/u3g.c stable/10/sys/dev/usb/usbdevs Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/serial/u3g.c ============================================================================== --- stable/10/sys/dev/usb/serial/u3g.c Tue May 12 11:52:34 2015 (r282817) +++ stable/10/sys/dev/usb/serial/u3g.c Tue May 12 15:21:19 2015 (r282818) @@ -521,6 +521,7 @@ static const STRUCT_USB_HOST_ID u3g_devs U3G_DEV(SIERRA, MC5727, 0), U3G_DEV(SIERRA, MC5727_2, 0), U3G_DEV(SIERRA, MC5728, 0), + U3G_DEV(SIERRA, MC7354, 0), U3G_DEV(SIERRA, MC8700, 0), U3G_DEV(SIERRA, MC8755, 0), U3G_DEV(SIERRA, MC8755_2, 0), Modified: stable/10/sys/dev/usb/usbdevs ============================================================================== --- stable/10/sys/dev/usb/usbdevs Tue May 12 11:52:34 2015 (r282817) +++ stable/10/sys/dev/usb/usbdevs Tue May 12 15:21:19 2015 (r282818) @@ -4003,6 +4003,7 @@ product SIERRA C22 0x6891 C22 product SIERRA E6892 0x6892 E6892 product SIERRA E6893 0x6893 E6893 product SIERRA MC8700 0x68A3 MC8700 +product SIERRA MC7354 0x6820 MC7354 product SIERRA AIRCARD875 0x6820 Aircard 875 HSDPA product SIERRA AC313U 0x68aa Sierra Wireless AirCard 313U product SIERRA TRUINSTALL 0x0fff Aircard Tru Installer From owner-svn-src-all@FreeBSD.ORG Tue May 12 16:23:18 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C3D8EC5F; Tue, 12 May 2015 16:23:18 +0000 (UTC) Received: from melamine.cuivre.fr.eu.org (houdart.cuivre.fr.eu.org [81.57.40.110]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7C98B13B1; Tue, 12 May 2015 16:23:17 +0000 (UTC) Received: by melamine.cuivre.fr.eu.org (Postfix, from userid 1000) id E46623B47; Tue, 12 May 2015 18:23:12 +0200 (CEST) Date: Tue, 12 May 2015 18:23:12 +0200 From: Thomas Quinot To: d@delphij.net Cc: Bryan Drewery , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r282736 - in head: . lib/libmd Message-ID: <20150512162312.GA89899@melamine.cuivre.fr.eu.org> References: <201505102121.t4ALLr3A076661@svn.freebsd.org> <5551480E.90906@FreeBSD.org> <55514EFA.4040608@delphij.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <55514EFA.4040608@delphij.net> X-message-flag: WARNING! Using Outlook can damage your computer. User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 12 May 2015 16:23:18 -0000 * Xin Li, 2015-05-12 : > On 05/11/15 17:23, Bryan Drewery wrote: > > The libmd changes break pkg - so all packages. > > > > http://beefy6.nyi.freebsd.org/data/head-amd64-default/p386108_s282785/ > logs/pkg-1.5.2.log > > > > > > > >> CCLD pkg-static /usr/lib/liblzma.a(check.o): In function > >> `lzma_check_init': > >> /usr/local/poudriere/jails/head-amd64/usr/src/lib/liblzma/../../contr > ib/xz/src/liblzma/check/check.c:(.text+0x5e): > >> undefined reference to `_libmd_SHA256_Init' > >> /usr/lib/liblzma.a(check.o): In function `lzma_check_update': > >> /usr/local/poudriere/jails/head-amd64/usr/src/lib/liblzma/../../contr > ib/xz/src/liblzma/check/check.c:(.text+0xbf): > >> undefined reference to `_libmd_SHA256_Update' > >> /usr/lib/liblzma.a(check.o): In function `lzma_check_finish': > >> /usr/local/poudriere/jails/head-amd64/usr/src/lib/liblzma/../../contr > ib/xz/src/liblzma/check/check.c:(.text+0x10d): > >> undefined reference to `_libmd_SHA256_Final' cc: error: linker > >> command failed with exit code 1 (use -v to see invocation) *** > >> [pkg-static] Error code 1 > > > > > > Can you please just revert this and 282726 until they are working > > and have a passing exp-run? > > Looks like this is because my change (r282775) which makes libmd a > dependency of liblzma, while pkg didn't catch up with, and it's > unrelated to libmd change. > > A quick hack would be: > > - --- src/Makefile.in.orig 2015-05-11 17:49:52.690333554 -0700 > +++ src/Makefile.in 2015-05-11 17:50:03.427853585 -0700 > @@ -617,7 +617,7 @@ > $(top_builddir)/compat/libbsd_compat.la \ > $(top_builddir)/external/libsbuf_static.la $(pkg_OBJECTS) \ > @LIBJAIL_LIB@ @LDNS_LIBS@ @OS_LIBS@ -larchive -lz -lutil -lbz2 \ > - - -llzma -lssl -lcrypto -lm $(am__append_1) $(am__append_2) \ > + -lmd -llzma -lssl -lcrypto -lm $(am__append_1) $(am__append_2) \ > $(am__append_3) > DYNPROG = pkg > @BUILD_STATIC_TRUE@pkg_static_LDFLAGS = -all-static > > But it would break earlier FreeBSD. Should I revert my change and > request for a exp-run? Xin, I'm assuming you are taking the lead on fixing this part. Could you please let me know if I can contribute, or if any change I made so far needs to be reverted? Thanks! Thomas. From owner-svn-src-all@FreeBSD.ORG Tue May 12 16:36:55 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 27398BF; Tue, 12 May 2015 16:36:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F0A931591; Tue, 12 May 2015 16:36:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4CGas4G059218; Tue, 12 May 2015 16:36:54 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4CGasXG059217; Tue, 12 May 2015 16:36:54 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201505121636.t4CGasXG059217@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Tue, 12 May 2015 16:36:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r282819 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 12 May 2015 16:36:55 -0000 Author: araujo (ports committer) Date: Tue May 12 16:36:54 2015 New Revision: 282819 URL: https://svnweb.freebsd.org/changeset/base/282819 Log: Fix the media detected for copper cables NIC based on chipsest X540T. Requested by: hiren@ MFH: 279803 Modified: stable/10/sys/dev/ixgbe/ixgbe.c Modified: stable/10/sys/dev/ixgbe/ixgbe.c ============================================================================== --- stable/10/sys/dev/ixgbe/ixgbe.c Tue May 12 15:21:19 2015 (r282818) +++ stable/10/sys/dev/ixgbe/ixgbe.c Tue May 12 16:36:54 2015 (r282819) @@ -1673,6 +1673,7 @@ static void ixgbe_media_status(struct ifnet * ifp, struct ifmediareq * ifmr) { struct adapter *adapter = ifp->if_softc; + struct ixgbe_hw *hw = &adapter->hw; INIT_DEBUGOUT("ixgbe_media_status: begin"); IXGBE_CORE_LOCK(adapter); @@ -1688,17 +1689,28 @@ ixgbe_media_status(struct ifnet * ifp, s ifmr->ifm_status |= IFM_ACTIVE; - switch (adapter->link_speed) { - case IXGBE_LINK_SPEED_100_FULL: - ifmr->ifm_active |= IFM_100_TX | IFM_FDX; - break; - case IXGBE_LINK_SPEED_1GB_FULL: - ifmr->ifm_active |= IFM_1000_SX | IFM_FDX; - break; - case IXGBE_LINK_SPEED_10GB_FULL: - ifmr->ifm_active |= adapter->optics | IFM_FDX; - break; - } + /* + * Not all NIC are 1000baseSX as an example X540T. + * We must set properly the media based on NIC model. + */ + switch (hw->device_id) { + case IXGBE_DEV_ID_X540T: + if (adapter->link_speed == IXGBE_LINK_SPEED_100_FULL) + ifmr->ifm_active |= IFM_100_TX | IFM_FDX; + else if (adapter->link_speed == IXGBE_LINK_SPEED_1GB_FULL) + ifmr->ifm_active |= IFM_1000_T | IFM_FDX; + else if (adapter->link_speed == IXGBE_LINK_SPEED_10GB_FULL) + ifmr->ifm_active |= adapter->optics | IFM_FDX; + break; + default: + if (adapter->link_speed == IXGBE_LINK_SPEED_100_FULL) + ifmr->ifm_active |= IFM_100_TX | IFM_FDX; + else if (adapter->link_speed == IXGBE_LINK_SPEED_1GB_FULL) + ifmr->ifm_active |= IFM_1000_SX | IFM_FDX; + else if (adapter->link_speed == IXGBE_LINK_SPEED_10GB_FULL) + ifmr->ifm_active |= adapter->optics | IFM_FDX; + break; + } IXGBE_CORE_UNLOCK(adapter); From owner-svn-src-all@FreeBSD.ORG Tue May 12 16:55:53 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 127014F0; Tue, 12 May 2015 16:55:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E786917BD; Tue, 12 May 2015 16:55:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4CGtqKU068848; Tue, 12 May 2015 16:55:52 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4CGtpsx068838; Tue, 12 May 2015 16:55:51 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201505121655.t4CGtpsx068838@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 12 May 2015 16:55:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282820 - head/sys/net80211 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.20 Precedence: list List-Id: "SVN commit messages 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, 12 May 2015 16:55:53 -0000 Author: adrian Date: Tue May 12 16:55:50 2015 New Revision: 282820 URL: https://svnweb.freebsd.org/changeset/base/282820 Log: Do not check sequence number for QoS Null frames; set it for generated QoS Null frames to 0 From IEEE Std. 802.11-2012, 8.3.2.1 "Data frame format", p. 415 (513): "The Sequence Control field for QoS (+)Null frames is ignored by the receiver upon reception." At this moment, any _input() function interprets them as regular QoS data frames with TID = 0. As a result, stations, that use another TX sequence for QoS Null frames (e.g. wpi(4), where (QoS) Null frames are generated by the firmware), may experience significant packet loss with any other NIC in hostap mode. Tested: * wpi(4) (author) * iwn(4) - Intel 5100, STA mode (me) PR: kern/200128 Submitted by: Andriy Voskoboinyk Modified: head/sys/net80211/ieee80211.h head/sys/net80211/ieee80211_adhoc.c head/sys/net80211/ieee80211_hostap.c head/sys/net80211/ieee80211_input.h head/sys/net80211/ieee80211_output.c head/sys/net80211/ieee80211_sta.c head/sys/net80211/ieee80211_wds.c Modified: head/sys/net80211/ieee80211.h ============================================================================== --- head/sys/net80211/ieee80211.h Tue May 12 16:36:54 2015 (r282819) +++ head/sys/net80211/ieee80211.h Tue May 12 16:55:50 2015 (r282820) @@ -169,6 +169,11 @@ struct ieee80211_qosframe_addr4 { #define IEEE80211_FC1_PROTECTED 0x40 #define IEEE80211_FC1_ORDER 0x80 +#define IEEE80211_HAS_SEQ(type, subtype) \ + ((type) != IEEE80211_FC0_TYPE_CTL && \ + !((type) == IEEE80211_FC0_TYPE_DATA && \ + ((subtype) & IEEE80211_FC0_SUBTYPE_QOS_NULL) == \ + IEEE80211_FC0_SUBTYPE_QOS_NULL)) #define IEEE80211_SEQ_FRAG_MASK 0x000f #define IEEE80211_SEQ_FRAG_SHIFT 0 #define IEEE80211_SEQ_SEQ_MASK 0xfff0 Modified: head/sys/net80211/ieee80211_adhoc.c ============================================================================== --- head/sys/net80211/ieee80211_adhoc.c Tue May 12 16:36:54 2015 (r282819) +++ head/sys/net80211/ieee80211_adhoc.c Tue May 12 16:55:50 2015 (r282820) @@ -291,7 +291,6 @@ doprint(struct ieee80211vap *vap, int su static int adhoc_input(struct ieee80211_node *ni, struct mbuf *m, int rssi, int nf) { -#define HAS_SEQ(type) ((type & 0x4) == 0) struct ieee80211vap *vap = ni->ni_vap; struct ieee80211com *ic = ni->ni_ic; struct ifnet *ifp = vap->iv_ifp; @@ -414,7 +413,8 @@ adhoc_input(struct ieee80211_node *ni, s } IEEE80211_RSSI_LPF(ni->ni_avgrssi, rssi); ni->ni_noise = nf; - if (HAS_SEQ(type) && IEEE80211_ADDR_EQ(wh->i_addr2, ni->ni_macaddr)) { + if (IEEE80211_HAS_SEQ(type, subtype) && + IEEE80211_ADDR_EQ(wh->i_addr2, ni->ni_macaddr)) { uint8_t tid = ieee80211_gettid(wh); if (IEEE80211_QOS_HAS_SEQ(wh) && TID_TO_WME_AC(tid) >= WME_AC_VI) Modified: head/sys/net80211/ieee80211_hostap.c ============================================================================== --- head/sys/net80211/ieee80211_hostap.c Tue May 12 16:36:54 2015 (r282819) +++ head/sys/net80211/ieee80211_hostap.c Tue May 12 16:55:50 2015 (r282820) @@ -478,7 +478,6 @@ doprint(struct ieee80211vap *vap, int su static int hostap_input(struct ieee80211_node *ni, struct mbuf *m, int rssi, int nf) { -#define HAS_SEQ(type) ((type & 0x4) == 0) struct ieee80211vap *vap = ni->ni_vap; struct ieee80211com *ic = ni->ni_ic; struct ifnet *ifp = vap->iv_ifp; @@ -571,7 +570,7 @@ hostap_input(struct ieee80211_node *ni, IEEE80211_RSSI_LPF(ni->ni_avgrssi, rssi); ni->ni_noise = nf; - if (HAS_SEQ(type)) { + if (IEEE80211_HAS_SEQ(type, subtype)) { uint8_t tid = ieee80211_gettid(wh); if (IEEE80211_QOS_HAS_SEQ(wh) && TID_TO_WME_AC(tid) >= WME_AC_VI) Modified: head/sys/net80211/ieee80211_input.h ============================================================================== --- head/sys/net80211/ieee80211_input.h Tue May 12 16:36:54 2015 (r282819) +++ head/sys/net80211/ieee80211_input.h Tue May 12 16:55:50 2015 (r282820) @@ -168,19 +168,22 @@ ieee80211_check_rxseq(struct ieee80211_n { #define SEQ_LEQ(a,b) ((int)((a)-(b)) <= 0) #define SEQ_EQ(a,b) ((int)((a)-(b)) == 0) -#define HAS_SEQ(type) ((type & 0x4) == 0) #define SEQNO(a) ((a) >> IEEE80211_SEQ_SEQ_SHIFT) #define FRAGNO(a) ((a) & IEEE80211_SEQ_FRAG_MASK) uint16_t rxseq; - uint8_t type; + uint8_t type, subtype; uint8_t tid; struct ieee80211_rx_ampdu *rap; rxseq = le16toh(*(uint16_t *)wh->i_seq); type = wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK; + subtype = wh->i_fc[0] & IEEE80211_FC0_SUBTYPE_MASK; - /* Types with no sequence number are always treated valid */ - if (! HAS_SEQ(type)) + /* + * Types with no sequence number (or QoS (+)Null frames) + * are always treated valid. + */ + if (! IEEE80211_HAS_SEQ(type, subtype)) return 1; tid = ieee80211_gettid(wh); @@ -235,7 +238,6 @@ ieee80211_check_rxseq(struct ieee80211_n return 1; #undef SEQ_LEQ #undef SEQ_EQ -#undef HAS_SEQ #undef SEQNO #undef FRAGNO } Modified: head/sys/net80211/ieee80211_output.c ============================================================================== --- head/sys/net80211/ieee80211_output.c Tue May 12 16:36:54 2015 (r282819) +++ head/sys/net80211/ieee80211_output.c Tue May 12 16:55:50 2015 (r282820) @@ -730,7 +730,12 @@ ieee80211_send_setup( if (tid != IEEE80211_NONQOS_TID && IEEE80211_AMPDU_RUNNING(tap)) m->m_flags |= M_AMPDU_MPDU; else { - seqno = ni->ni_txseqs[tid]++; + if (IEEE80211_HAS_SEQ(type & IEEE80211_FC0_TYPE_MASK, + type & IEEE80211_FC0_SUBTYPE_MASK)) + seqno = ni->ni_txseqs[tid]++; + else + seqno = 0; + *(uint16_t *)&wh->i_seq[0] = htole16(seqno << IEEE80211_SEQ_SEQ_SHIFT); M_SEQNO_SET(m, seqno); Modified: head/sys/net80211/ieee80211_sta.c ============================================================================== --- head/sys/net80211/ieee80211_sta.c Tue May 12 16:36:54 2015 (r282819) +++ head/sys/net80211/ieee80211_sta.c Tue May 12 16:55:50 2015 (r282820) @@ -527,7 +527,6 @@ doprint(struct ieee80211vap *vap, int su static int sta_input(struct ieee80211_node *ni, struct mbuf *m, int rssi, int nf) { -#define HAS_SEQ(type) ((type & 0x4) == 0) struct ieee80211vap *vap = ni->ni_vap; struct ieee80211com *ic = ni->ni_ic; struct ifnet *ifp = vap->iv_ifp; @@ -623,7 +622,8 @@ sta_input(struct ieee80211_node *ni, str IEEE80211_RSSI_LPF(ni->ni_avgrssi, rssi); ni->ni_noise = nf; - if (HAS_SEQ(type) && !IEEE80211_IS_MULTICAST(wh->i_addr1)) { + if ( IEEE80211_HAS_SEQ(type, subtype) && + !IEEE80211_IS_MULTICAST(wh->i_addr1)) { uint8_t tid = ieee80211_gettid(wh); if (IEEE80211_QOS_HAS_SEQ(wh) && TID_TO_WME_AC(tid) >= WME_AC_VI) Modified: head/sys/net80211/ieee80211_wds.c ============================================================================== --- head/sys/net80211/ieee80211_wds.c Tue May 12 16:36:54 2015 (r282819) +++ head/sys/net80211/ieee80211_wds.c Tue May 12 16:55:50 2015 (r282820) @@ -406,7 +406,6 @@ wds_newstate(struct ieee80211vap *vap, e static int wds_input(struct ieee80211_node *ni, struct mbuf *m, int rssi, int nf) { -#define HAS_SEQ(type) ((type & 0x4) == 0) struct ieee80211vap *vap = ni->ni_vap; struct ieee80211com *ic = ni->ni_ic; struct ifnet *ifp = vap->iv_ifp; @@ -488,7 +487,7 @@ wds_input(struct ieee80211_node *ni, str } IEEE80211_RSSI_LPF(ni->ni_avgrssi, rssi); ni->ni_noise = nf; - if (HAS_SEQ(type)) { + if (IEEE80211_HAS_SEQ(type, subtype)) { uint8_t tid = ieee80211_gettid(wh); if (IEEE80211_QOS_HAS_SEQ(wh) && TID_TO_WME_AC(tid) >= WME_AC_VI) From owner-svn-src-all@FreeBSD.ORG Tue May 12 17:53:23 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 44DDE377; Tue, 12 May 2015 17:53:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1A2D31F9D; Tue, 12 May 2015 17:53:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4CHrMhM098168; Tue, 12 May 2015 17:53:22 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4CHrMjt098166; Tue, 12 May 2015 17:53:22 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201505121753.t4CHrMjt098166@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 12 May 2015 17:53:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282821 - in head: . 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.20 Precedence: list List-Id: "SVN commit messages 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, 12 May 2015 17:53:23 -0000 Author: emaste Date: Tue May 12 17:53:22 2015 New Revision: 282821 URL: https://svnweb.freebsd.org/changeset/base/282821 Log: Remove redundant csu subdir logic The appropriate subdirectories are handled by lib/csu/Makefile. There's no need to duplicate this logic in Makefile.inc1 and lib/Makefile. Reviewed by: imp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D2523 Modified: head/Makefile.inc1 head/lib/Makefile Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Tue May 12 16:55:50 2015 (r282820) +++ head/Makefile.inc1 Tue May 12 17:53:22 2015 (r282821) @@ -1660,13 +1660,7 @@ _prereq_libs= gnu/lib/libssp/libssp_nons # all shared libraries for ELF. # _startup_libs= gnu/lib/csu -.if exists(${.CURDIR}/lib/csu/${MACHINE_ARCH}-elf) -_startup_libs+= lib/csu/${MACHINE_ARCH}-elf -.elif exists(${.CURDIR}/lib/csu/${MACHINE_ARCH}) -_startup_libs+= lib/csu/${MACHINE_ARCH} -.else -_startup_libs+= lib/csu/${MACHINE_CPUARCH} -.endif +_startup_libs+= lib/csu _startup_libs+= gnu/lib/libgcc _startup_libs+= lib/libcompiler_rt _startup_libs+= lib/libc Modified: head/lib/Makefile ============================================================================== --- head/lib/Makefile Tue May 12 16:55:50 2015 (r282820) +++ head/lib/Makefile Tue May 12 17:53:22 2015 (r282821) @@ -8,7 +8,7 @@ # and the main list to avoid needing a SUBDIR_DEPEND line on every library # naming just these few items. -SUBDIR_ORDERED= ${_csu} \ +SUBDIR_ORDERED= csu \ .WAIT \ libc \ libc_nonshared \ @@ -156,16 +156,6 @@ SUBDIR_DEPEND_libulog= libmd SUBDIR_DEPEND_libunbound= ${_libldns} SUBDIR_DEPEND_liblzma= ${_libthr} -.if exists(${.CURDIR}/csu/${MACHINE_ARCH}-elf) -_csu=csu/${MACHINE_ARCH}-elf -.elif exists(${.CURDIR}/csu/${MACHINE_ARCH}) -_csu=csu/${MACHINE_ARCH} -.elif exists(${.CURDIR}/csu/${MACHINE_CPUARCH}/Makefile) -_csu=csu/${MACHINE_CPUARCH} -.else -_csu=csu -.endif - # NB: keep these sorted by MK_* knobs .if ${MK_ATM} != "no" From owner-svn-src-all@FreeBSD.ORG Tue May 12 18:08:08 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A3A4A722; Tue, 12 May 2015 18:08:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 777AD1117; Tue, 12 May 2015 18:08:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4CI88LB004632; Tue, 12 May 2015 18:08:08 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4CI88PP004631; Tue, 12 May 2015 18:08:08 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201505121808.t4CI88PP004631@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 12 May 2015 18:08:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r282822 - stable/10/sys/dev/vt/hw/fb 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.20 Precedence: list List-Id: "SVN commit messages 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, 12 May 2015 18:08:08 -0000 Author: emaste Date: Tue May 12 18:08:07 2015 New Revision: 282822 URL: https://svnweb.freebsd.org/changeset/base/282822 Log: MFC r282247: vt: fix vt_fb_bitblt_bitmap mask corruption Previously the mask wrapped when one or more of the mask bytes extended past the right edge of the window. Simplify the logic and use the same byte offset and bit in both the pattern and mask. PR: 199648 Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/dev/vt/hw/fb/vt_fb.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/vt/hw/fb/vt_fb.c ============================================================================== --- stable/10/sys/dev/vt/hw/fb/vt_fb.c Tue May 12 17:53:22 2015 (r282821) +++ stable/10/sys/dev/vt/hw/fb/vt_fb.c Tue May 12 18:08:07 2015 (r282822) @@ -250,43 +250,37 @@ vt_fb_bitblt_bitmap(struct vt_device *vd { struct fb_info *info; uint32_t fgc, bgc, cc, o; - int c, l, bpp, bpl; - u_long line; - uint8_t b, m; - const uint8_t *ch; + int bpp, bpl, xi, yi; + int bit, byte; info = vd->vd_softc; bpp = FBTYPE_GET_BYTESPP(info); fgc = info->fb_cmap[fg]; bgc = info->fb_cmap[bg]; - b = m = 0; - bpl = (width + 7) >> 3; /* Bytes per source line. */ + bpl = (width + 7) / 8; /* Bytes per source line. */ KASSERT((info->fb_vbase != 0), ("Unmapped framebuffer")); - line = (info->fb_stride * y) + (x * bpp); - for (l = 0; - l < height && y + l < vw->vw_draw_area.tr_end.tp_row; - l++) { - ch = pattern; - for (c = 0; - c < width && x + c < vw->vw_draw_area.tr_end.tp_col; - c++) { - if (c % 8 == 0) - b = *ch++; - else - b <<= 1; - if (mask != NULL) { - if (c % 8 == 0) - m = *mask++; - else - m <<= 1; - /* Skip pixel write, if mask has no bit set. */ - if ((m & 0x80) == 0) - continue; - } - o = line + (c * bpp); - cc = b & 0x80 ? fgc : bgc; + /* Bound by right and bottom edges. */ + if (y + height > vw->vw_draw_area.tr_end.tp_row) { + if (y >= vw->vw_draw_area.tr_end.tp_row) + return; + height = vw->vw_draw_area.tr_end.tp_row - y; + } + if (x + width > vw->vw_draw_area.tr_end.tp_col) { + if (x >= vw->vw_draw_area.tr_end.tp_col) + return; + width = vw->vw_draw_area.tr_end.tp_col - x; + } + for (yi = 0; yi < height; yi++) { + for (xi = 0; xi < width; xi++) { + byte = yi * bpl + xi / 8; + bit = 0x80 >> (xi % 8); + /* Skip pixel write, if mask bit not set. */ + if (mask != NULL && (mask[byte] & bit) == 0) + continue; + o = (y + yi) * info->fb_stride + (x + xi) * bpp; + cc = pattern[byte] & bit ? fgc : bgc; switch(bpp) { case 1: @@ -309,8 +303,6 @@ vt_fb_bitblt_bitmap(struct vt_device *vd break; } } - line += info->fb_stride; - pattern += bpl; } } From owner-svn-src-all@FreeBSD.ORG Tue May 12 18:09:55 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CB0D48C2; Tue, 12 May 2015 18:09:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B879A1132; Tue, 12 May 2015 18:09:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4CI9t4x004928; Tue, 12 May 2015 18:09:55 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4CI9t0T004927; Tue, 12 May 2015 18:09:55 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201505121809.t4CI9t0T004927@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 12 May 2015 18:09: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: r282823 - stable/10/sys/dev/vt 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.20 Precedence: list List-Id: "SVN commit messages 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, 12 May 2015 18:09:55 -0000 Author: emaste Date: Tue May 12 18:09:54 2015 New Revision: 282823 URL: https://svnweb.freebsd.org/changeset/base/282823 Log: MFC r281944: vt(4): Simplify mouse area detection vt_is_cursor_in_area needs to return true if any part of the mouse cursor is visible in the rectangle area. Replace the existing test with a simpler version of a test for overlapping rectangles. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/dev/vt/vt_core.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/vt/vt_core.c ============================================================================== --- stable/10/sys/dev/vt/vt_core.c Tue May 12 18:08:07 2015 (r282822) +++ stable/10/sys/dev/vt/vt_core.c Tue May 12 18:09:54 2015 (r282823) @@ -1018,7 +1018,7 @@ vt_determine_colors(term_char_t c, int c int vt_is_cursor_in_area(const struct vt_device *vd, const term_rect_t *area) { - unsigned int mx, my, x1, y1, x2, y2; + unsigned int mx, my; /* * We use the cursor position saved during the current refresh, @@ -1027,18 +1027,12 @@ vt_is_cursor_in_area(const struct vt_dev mx = vd->vd_mx_drawn + vd->vd_curwindow->vw_draw_area.tr_begin.tp_col; my = vd->vd_my_drawn + vd->vd_curwindow->vw_draw_area.tr_begin.tp_row; - x1 = area->tr_begin.tp_col; - y1 = area->tr_begin.tp_row; - x2 = area->tr_end.tp_col; - y2 = area->tr_end.tp_row; - - if (((mx >= x1 && x2 - 1 >= mx) || - (mx < x1 && mx + vd->vd_mcursor->width >= x1)) && - ((my >= y1 && y2 - 1 >= my) || - (my < y1 && my + vd->vd_mcursor->height >= y1))) - return (1); - - return (0); + if (mx >= area->tr_end.tp_col || + mx + vd->vd_mcursor->width <= area->tr_begin.tp_col || + my >= area->tr_end.tp_row || + my + vd->vd_mcursor->height <= area->tr_begin.tp_row) + return (0); + return (1); } static void From owner-svn-src-all@FreeBSD.ORG Tue May 12 20:04:18 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CEA37577; Tue, 12 May 2015 20:04:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BE15E1FE0; Tue, 12 May 2015 20:04:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4CK4IBB063739; Tue, 12 May 2015 20:04:18 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4CK4IgR063738; Tue, 12 May 2015 20:04:18 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201505122004.t4CK4IgR063738@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 12 May 2015 20:04:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282824 - head/usr.sbin/crunch/crunchide 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.20 Precedence: list List-Id: "SVN commit messages 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, 12 May 2015 20:04:18 -0000 Author: emaste Date: Tue May 12 20:04:17 2015 New Revision: 282824 URL: https://svnweb.freebsd.org/changeset/base/282824 Log: crunchide: remove EOL whitespace Modified: head/usr.sbin/crunch/crunchide/exec_elf32.c Modified: head/usr.sbin/crunch/crunchide/exec_elf32.c ============================================================================== --- head/usr.sbin/crunch/crunchide/exec_elf32.c Tue May 12 18:09:54 2015 (r282823) +++ head/usr.sbin/crunch/crunchide/exec_elf32.c Tue May 12 20:04:17 2015 (r282824) @@ -35,7 +35,7 @@ __RCSID("$NetBSD: exec_elf32.c,v 1.6 199 #endif #endif __FBSDID("$FreeBSD$"); - + #ifndef ELFSIZE #define ELFSIZE 32 #endif @@ -142,7 +142,7 @@ static void * xrealloc(void *ptr, size_t size, const char *fn, const char *use) { void *rv; - + rv = realloc(ptr, size); if (rv == NULL) { free(ptr); @@ -150,7 +150,7 @@ xrealloc(void *ptr, size_t size, const c fn, use); } return (rv); -} +} int ELFNAMEEND(check)(int fd, const char *fn) From owner-svn-src-all@FreeBSD.ORG Tue May 12 20:42:42 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D88B5CEF; Tue, 12 May 2015 20:42:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C744314B4; Tue, 12 May 2015 20:42:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4CKggVN083196; Tue, 12 May 2015 20:42:42 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4CKgg9L083195; Tue, 12 May 2015 20:42:42 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201505122042.t4CKgg9L083195@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Tue, 12 May 2015 20:42:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282825 - head/sys/netpfil/ipfw 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.20 Precedence: list List-Id: "SVN commit messages 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, 12 May 2015 20:42:43 -0000 Author: melifaro Date: Tue May 12 20:42:42 2015 New Revision: 282825 URL: https://svnweb.freebsd.org/changeset/base/282825 Log: Remove ptei->value check from ipfw_link_table_values(): even if there was non-zero number of restarts, we would unref/clear all value references and start ipfw_link_table_values() once again with (mostly) cleared "tei" buffer. Additionally, ptei->ptv stores only to-be-added values, not existing ones. This is a forgotten piece of previous value refconting implementation, and now it is simply incorrect. Modified: head/sys/netpfil/ipfw/ip_fw_table_value.c Modified: head/sys/netpfil/ipfw/ip_fw_table_value.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_table_value.c Tue May 12 20:04:17 2015 (r282824) +++ head/sys/netpfil/ipfw/ip_fw_table_value.c Tue May 12 20:42:42 2015 (r282825) @@ -563,17 +563,6 @@ ipfw_link_table_values(struct ip_fw_chai /* Let's try to link values */ for (i = 0; i < count; i++) { ptei = &tei[i]; - if (ptei->value != 0) { - - /* - * We may be here after several process restarts, - * so we need to update all fields that might - * have changed. - */ - ptv = (struct table_val_link *)ptei->ptv; - ptv->pval = &pval[i]; - continue; - } /* Check if record has appeared */ mask_table_value(ptei->pvalue, &tval, ts->vmask); From owner-svn-src-all@FreeBSD.ORG Wed May 13 00:28:38 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 52C14825; Wed, 13 May 2015 00:28:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 267951C82; Wed, 13 May 2015 00:28:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4D0SckV093696; Wed, 13 May 2015 00:28:38 GMT (envelope-from gnn@FreeBSD.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4D0SbK7093688; Wed, 13 May 2015 00:28:37 GMT (envelope-from gnn@FreeBSD.org) Message-Id: <201505130028.t4D0SbK7093688@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gnn set sender to gnn@FreeBSD.org using -f From: "George V. Neville-Neil" Date: Wed, 13 May 2015 00:28:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r282826 - in stable/10/sys: conf netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 13 May 2015 00:28:38 -0000 Author: gnn Date: Wed May 13 00:28:36 2015 New Revision: 282826 URL: https://svnweb.freebsd.org/changeset/base/282826 Log: MFC: 282215 Make it possible to statically link SIFTR into the kernel as a new option. Reviewed by: bz Discussed with: lstewart Modified: stable/10/sys/conf/files stable/10/sys/conf/options stable/10/sys/netinet/tcp_timewait.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/conf/files ============================================================================== --- stable/10/sys/conf/files Tue May 12 20:42:42 2015 (r282825) +++ stable/10/sys/conf/files Wed May 13 00:28:36 2015 (r282826) @@ -3426,6 +3426,7 @@ netinet/sctp_sysctl.c optional inet sct netinet/sctp_timer.c optional inet sctp | inet6 sctp netinet/sctp_usrreq.c optional inet sctp | inet6 sctp netinet/sctputil.c optional inet sctp | inet6 sctp +netinet/siftr.c optional inet siftr alq | inet6 siftr alq netinet/tcp_debug.c optional tcpdebug netinet/tcp_hostcache.c optional inet | inet6 netinet/tcp_input.c optional inet | inet6 Modified: stable/10/sys/conf/options ============================================================================== --- stable/10/sys/conf/options Tue May 12 20:42:42 2015 (r282825) +++ stable/10/sys/conf/options Wed May 13 00:28:36 2015 (r282826) @@ -439,6 +439,7 @@ RADIX_MPATH opt_mpath.h ROUTETABLES opt_route.h SLIP_IFF_OPTS opt_slip.h TCPDEBUG +SIFTR TCP_OFFLOAD opt_inet.h # Enable code to dispatch TCP offloading TCP_SIGNATURE opt_inet.h VLAN_ARRAY opt_vlan.h Modified: stable/10/sys/netinet/tcp_timewait.c ============================================================================== --- stable/10/sys/netinet/tcp_timewait.c Tue May 12 20:42:42 2015 (r282825) +++ stable/10/sys/netinet/tcp_timewait.c Wed May 13 00:28:36 2015 (r282826) @@ -250,6 +250,13 @@ tcp_twstart(struct tcpcb *tp) } } + + /* + * For use only by DTrace. We do not reference the state + * after this point so modifying it in place is not a problem. + */ + tcp_state_change(tp, TCPS_TIME_WAIT); + tw = uma_zalloc(V_tcptw_zone, M_NOWAIT); if (tw == NULL) { /* From owner-svn-src-all@FreeBSD.ORG Wed May 13 00:29:47 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D34FC9E9; Wed, 13 May 2015 00:29:47 +0000 (UTC) Received: from mail.strugglingcoder.info (strugglingcoder.info [65.19.130.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BE8B71C96; Wed, 13 May 2015 00:29:47 +0000 (UTC) Received: from localhost (unknown [10.1.1.3]) (Authenticated sender: hiren@strugglingcoder.info) by mail.strugglingcoder.info (Postfix) with ESMTPSA id 95DBA110787; Tue, 12 May 2015 17:29:41 -0700 (PDT) Date: Tue, 12 May 2015 17:29:41 -0700 From: Hiren Panchasara To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r281838 - head/sys/dev/e1000 Message-ID: <20150513002941.GA10967@strugglingcoder.info> References: <201504212024.t3LKOG3N073010@svn.freebsd.org> <20150421220550.GA28632@strugglingcoder.info> <20150422193604.GF28632@strugglingcoder.info> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="AhhlLboLdkugWU4S" Content-Disposition: inline In-Reply-To: <20150422193604.GF28632@strugglingcoder.info> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 13 May 2015 00:29:47 -0000 --AhhlLboLdkugWU4S Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 04/22/15 at 12:36P, Hiren Panchasara wrote: > On 04/21/15 at 03:05P, Hiren Panchasara wrote: > > On 04/21/15 at 08:24P, Hiren Panchasara wrote: > > > Author: hiren > > > Date: Tue Apr 21 20:24:15 2015 > > > New Revision: 281838 > > > URL: https://svnweb.freebsd.org/changeset/base/281838 > > >=20 > > > Log: > > > For igb(4), when we are doing multiqueue, we are all setup to have = full 32bit > > > RSS hash from the card. We do not need to hide that under "ifdef RS= S" and should > > > expose that by default so others like lagg(4) can use that and avoi= d hashing the > > > traffic by themselves. > > > While here, improve comments and get rid of hidden/unimplemented RS= S support > > > code for UDP. > > > =20 > > > Differential Revision: https://reviews.freebsd.org/D2296 > > > Reviewed by: jfv, erj > > > Discussed with: adrian > > > Sponsored by: Limelight Networks > > >=20 > > > Modified: > > > head/sys/dev/e1000/if_igb.c > >=20 > > I intend to MFC this in a week or so. But for that, I'd have to first > > MFC a part of https://svnweb.freebsd.org/base?view=3Drevision&revision= =3D268028 > > which sets rss hash types. >=20 > Apparently another missing MFC is r275358. I'll work on them. So, here is the patch that I intend to commit to stable/10: https://people.freebsd.org/~hiren/patches/igb_flowid_mfc.patch RSS is not (yet) ready to be brought back into stable/10 so for now I am only exposing full 32bit flowid and we will still return flowtype OPAQUE. cheers, Hiren --AhhlLboLdkugWU4S Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQF8BAEBCgBmBQJVUpr1XxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRBNEUyMEZBMUQ4Nzg4RjNGMTdFNjZGMDI4 QjkyNTBFMTU2M0VERkU1AAoJEIuSUOFWPt/lt4kH/Ax/KydpXQctbO89wMU9CXWg ZM/R5SZRgc6LAnj/fUYxRfVSPbu0Ibr5QU2prGy7oeCW9MTfaXWKmdcD0JUR3vaM CQwHvn5odi+pfL+GOHj0ntck92cUJdqTucQ1croOVQR3Kv3Ac1Tneon1Ik03uNE4 tLRc//muZOgjZa2TRgw0Z879uZytgFCC9AbS1uqK2cqPhQjbgO6qJVyO+/wdHA26 vkZUJkHwLZ3jHcygF8vOqErxB2SxUpz0FOdyO3QiJRrsnE57cPWWy1wNegRUuFl6 Ut/vsPW+gHHmXE6vhkxUE0d1LSCyVzxL0hGpb484/hPQNWZ1I5n7FY5qQu6rFgc= =YoDI -----END PGP SIGNATURE----- --AhhlLboLdkugWU4S-- From owner-svn-src-all@FreeBSD.ORG Wed May 13 01:10:29 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 693B1448; Wed, 13 May 2015 01:10:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49DE110CA; Wed, 13 May 2015 01:10:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4D1ATAa014424; Wed, 13 May 2015 01:10:29 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4D1ASEG014421; Wed, 13 May 2015 01:10:28 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201505130110.t4D1ASEG014421@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Wed, 13 May 2015 01:10:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282827 - in head/sys: arm/ti/am335x boot/fdt/dts/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.20 Precedence: list List-Id: "SVN commit messages 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, 13 May 2015 01:10:29 -0000 Author: loos Date: Wed May 13 01:10:28 2015 New Revision: 282827 URL: https://svnweb.freebsd.org/changeset/base/282827 Log: Add support for the power button on BeagleBone Black. Shutdown and turn off the board when the power button is pressed. Submitted by: Michal Meloun Relnotes: yes Modified: head/sys/arm/ti/am335x/am335x_pmic.c head/sys/boot/fdt/dts/arm/beaglebone-black.dts Modified: head/sys/arm/ti/am335x/am335x_pmic.c ============================================================================== --- head/sys/arm/ti/am335x/am335x_pmic.c Wed May 13 00:28:36 2015 (r282826) +++ head/sys/arm/ti/am335x/am335x_pmic.c Wed May 13 01:10:28 2015 (r282827) @@ -37,6 +37,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -58,12 +59,20 @@ __FBSDID("$FreeBSD$"); #define TPS65217D 0x6 /* TPS65217 Reisters */ -#define TPS65217_CHIPID_REG 0x00 -#define TPS65217_STATUS_REG 0x0A -#define TPS65217_STATUS_OFF (1U << 7) -#define TPS65217_STATUS_ACPWR (1U << 3) -#define TPS65217_STATUS_USBPWR (1U << 2) -#define TPS65217_STATUS_BT (1U << 0) +#define TPS65217_CHIPID_REG 0x00 +#define TPS65217_INT_REG 0x02 +#define TPS65217_INT_PBM (1U << 6) +#define TPS65217_INT_ACM (1U << 5) +#define TPS65217_INT_USBM (1U << 4) +#define TPS65217_INT_PBI (1U << 2) +#define TPS65217_INT_ACI (1U << 1) +#define TPS65217_INT_USBI (1U << 0) + +#define TPS65217_STATUS_REG 0x0A +#define TPS65217_STATUS_OFF (1U << 7) +#define TPS65217_STATUS_ACPWR (1U << 3) +#define TPS65217_STATUS_USBPWR (1U << 2) +#define TPS65217_STATUS_BT (1U << 0) #define MAX_IIC_DATA_SIZE 2 @@ -72,6 +81,8 @@ struct am335x_pmic_softc { device_t sc_dev; uint32_t sc_addr; struct intr_config_hook enum_hook; + struct resource *sc_irq_res; + void *sc_intrhand; }; static void am335x_pmic_shutdown(void *, int); @@ -105,6 +116,38 @@ am335x_pmic_write(device_t dev, uint8_t return (iicbus_transfer(dev, msg, 1)); } +static void +am335x_pmic_intr(void *arg) +{ + struct am335x_pmic_softc *sc = (struct am335x_pmic_softc *)arg; + uint8_t int_reg, status_reg; + int rv; + char notify_buf[16]; + + THREAD_SLEEPING_OK(); + rv = am335x_pmic_read(sc->sc_dev, TPS65217_INT_REG, &int_reg, 1); + if (rv != 0) { + device_printf(sc->sc_dev, "Cannot read interrupt register\n"); + THREAD_NO_SLEEPING(); + return; + } + rv = am335x_pmic_read(sc->sc_dev, TPS65217_STATUS_REG, &status_reg, 1); + if (rv != 0) { + device_printf(sc->sc_dev, "Cannot read status register\n"); + THREAD_NO_SLEEPING(); + return; + } + THREAD_NO_SLEEPING(); + + if ((int_reg & TPS65217_INT_PBI) && (status_reg & TPS65217_STATUS_BT)) + shutdown_nice(RB_POWEROFF); + if (int_reg & TPS65217_INT_ACI) { + snprintf(notify_buf, sizeof(notify_buf), "notify=0x%02x", + (status_reg & TPS65217_STATUS_ACPWR) ? 1 : 0); + devctl_notify_f("ACPI", "ACAD", "power", notify_buf, M_NOWAIT); + } +} + static int am335x_pmic_probe(device_t dev) { @@ -130,6 +173,7 @@ am335x_pmic_start(void *xdev) uint8_t reg; char name[20]; char pwr[4][11] = {"Unknown", "USB", "AC", "USB and AC"}; + int rv; sc = device_get_softc(dev); @@ -158,15 +202,38 @@ am335x_pmic_start(void *xdev) SHUTDOWN_PRI_LAST); config_intrhook_disestablish(&sc->enum_hook); + + /* Unmask all interrupts and clear pending status */ + reg = 0; + am335x_pmic_write(dev, TPS65217_INT_REG, ®, 1); + am335x_pmic_read(dev, TPS65217_INT_REG, ®, 1); + + if (sc->sc_irq_res != NULL) { + rv = bus_setup_intr(dev, sc->sc_irq_res, + INTR_TYPE_MISC | INTR_MPSAFE, NULL, am335x_pmic_intr, + sc, &sc->sc_intrhand); + if (rv != 0) + device_printf(dev, + "Unable to setup the irq handler.\n"); + } } static int am335x_pmic_attach(device_t dev) { struct am335x_pmic_softc *sc; + int rid; sc = device_get_softc(dev); + rid = 0; + sc->sc_irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, + RF_ACTIVE); + if (!sc->sc_irq_res) { + device_printf(dev, "cannot allocate interrupt\n"); + /* return (ENXIO); */ + } + sc->enum_hook.ich_func = am335x_pmic_start; sc->enum_hook.ich_arg = dev; Modified: head/sys/boot/fdt/dts/arm/beaglebone-black.dts ============================================================================== --- head/sys/boot/fdt/dts/arm/beaglebone-black.dts Wed May 13 00:28:36 2015 (r282826) +++ head/sys/boot/fdt/dts/arm/beaglebone-black.dts Wed May 13 01:10:28 2015 (r282827) @@ -149,6 +149,8 @@ pmic@48 { compatible = "ti,am335x-pmic"; reg = <0x48>; + interrupts = <7>; /* nNMI */ + interrupt-parent = <&AINTC>; }; }; }; From owner-svn-src-all@FreeBSD.ORG Wed May 13 01:48:48 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 78F58A2A; Wed, 13 May 2015 01:48:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 67A0C14EC; Wed, 13 May 2015 01:48:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4D1mm2a033462; Wed, 13 May 2015 01:48:48 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4D1mmeS033461; Wed, 13 May 2015 01:48:48 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201505130148.t4D1mmeS033461@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Wed, 13 May 2015 01:48:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282828 - head/sys/arm/broadcom/bcm2835 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.20 Precedence: list List-Id: "SVN commit messages 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, 13 May 2015 01:48:48 -0000 Author: loos Date: Wed May 13 01:48:47 2015 New Revision: 282828 URL: https://svnweb.freebsd.org/changeset/base/282828 Log: Fix the SMP initialization on RPi 2 (BCM2836). Invalidate the CPU cache before start the others CPUs. Submitted by: Michal Meloun Modified: head/sys/arm/broadcom/bcm2835/bcm2836_mp.c Modified: head/sys/arm/broadcom/bcm2835/bcm2836_mp.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2836_mp.c Wed May 13 01:10:28 2015 (r282827) +++ head/sys/arm/broadcom/bcm2835/bcm2836_mp.c Wed May 13 01:48:47 2015 (r282828) @@ -123,6 +123,8 @@ platform_mp_start_ap(void) BSWR4(MBOX3CLR_CORE(i), 0xffffffff); } wmb(); + cpu_idcache_wbinv_all(); + cpu_l2cache_wbinv_all(); /* boot secondary CPUs */ for (i = 1; i < mp_ncpus; i++) { @@ -152,9 +154,6 @@ platform_mp_start_ap(void) /* recode AP in CPU map */ CPU_SET(i, &all_cpus); } - - cpu_idcache_wbinv_all(); - cpu_l2cache_wbinv_all(); } void From owner-svn-src-all@FreeBSD.ORG Wed May 13 02:25:54 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EBD9EFA1; Wed, 13 May 2015 02:25:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D9F1218F9; Wed, 13 May 2015 02:25:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4D2PshJ052603; Wed, 13 May 2015 02:25:54 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4D2PsxZ052602; Wed, 13 May 2015 02:25:54 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201505130225.t4D2PsxZ052602@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Wed, 13 May 2015 02:25:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282829 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 13 May 2015 02:25:55 -0000 Author: loos Date: Wed May 13 02:25:54 2015 New Revision: 282829 URL: https://svnweb.freebsd.org/changeset/base/282829 Log: Fix the vmstat -i output on ARM. The consumers of hw.intrnames expect a NULL byte at end of the string containing the interrupt names. On ARM all the interrupt name slots are initialized and this leave no room for the terminating NULL byte, which makes vmstat read beyond the end of intrnames. PR: 199891 Tested on: RPi 2 and BeagleBone Black Modified: head/sys/arm/arm/intr.c Modified: head/sys/arm/arm/intr.c ============================================================================== --- head/sys/arm/arm/intr.c Wed May 13 01:48:47 2015 (r282828) +++ head/sys/arm/arm/intr.c Wed May 13 02:25:54 2015 (r282829) @@ -78,7 +78,7 @@ int (*arm_config_irq)(int irq, enum intr /* Data for statistics reporting. */ u_long intrcnt[NIRQ]; -char intrnames[NIRQ * INTRNAME_LEN]; +char intrnames[(NIRQ * INTRNAME_LEN) + 1]; size_t sintrcnt = sizeof(intrcnt); size_t sintrnames = sizeof(intrnames); From owner-svn-src-all@FreeBSD.ORG Wed May 13 04:41:36 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EBF5E402; Wed, 13 May 2015 04:41:35 +0000 (UTC) Received: from firebird.onthenet.com.au (firebird.onthenet.com.au [121.50.214.250]) by mx1.freebsd.org (Postfix) with ESMTP id 797E0188B; Wed, 13 May 2015 04:41:35 +0000 (UTC) Received: by firebird.onthenet.com.au (Postfix, from userid 0) id 1F9B0A4905; Wed, 13 May 2015 13:59:55 +1000 (AEST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mx2.freebsd.org (mx2.freebsd.org [8.8.178.116]) by firebird.onthenet.com.au (Postfix) with ESMTP id CB33F9FE16 for ; Fri, 8 May 2015 00:17:52 +1000 (AEST) Received: from hub.freebsd.org (hub.freebsd.org [8.8.178.136]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.freebsd.org (Postfix) with ESMTPS id B80FC1371 for ; Thu, 7 May 2015 14:17:49 +0000 (UTC) Received: by hub.freebsd.org (Postfix) id A6D773FD; Thu, 7 May 2015 14:17:49 +0000 (UTC) Delivered-To: grehan@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 538) id 8116C3B1; Thu, 7 May 2015 14:17:49 +0000 (UTC) Delivered-To: src-committers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2150F351; Thu, 7 May 2015 14:17:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0F82A1C1E; Thu, 7 May 2015 14:17:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t47EHhjl047809; Thu, 7 May 2015 14:17:43 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t47EHh0W047808; Thu, 7 May 2015 14:17:43 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201505071417.t47EHh0W047808@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Thu, 7 May 2015 14:17:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282578 - head/sys/netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk X-Loop: FreeBSD.org Sender: owner-src-committers@freebsd.org X-MailScanner-Information: Please contact the ISP for more information X-MailScanner: Not scanned: please contact your Internet E-Mail Service Provider for details X-Spam-Flag: not spam (whitelisted), SpamAssassin (not cached, score=-6.5, required 5, autolearn=not spam, BAYES_00 -1.90, KHOP_RCVD_UNTRUST 0.50, RCVD_IN_DNSWL_HI -5.00, RCVD_IN_HOSTKARMA_W -0.10) X-MailScanner-From: root@firebird.onthenet.com.au X-Spam-Status: No X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 List-Id: "SVN commit messages 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, 13 May 2015 04:41:36 -0000 Author: ae Date: Thu May 7 14:17:43 2015 New Revision: 282578 URL: https://svnweb.freebsd.org/changeset/base/282578 Log: Mark data checksum as valid for multicast packets, that we send back to myself via simloop. Also remove duplicate check under #ifdef DIAGNOSTIC. PR: 180065 MFC after: 1 week Modified: head/sys/netinet6/ip6_output.c Modified: head/sys/netinet6/ip6_output.c ============================================================================== --- head/sys/netinet6/ip6_output.c Thu May 7 12:54:27 2015 (r282577) +++ head/sys/netinet6/ip6_output.c Thu May 7 14:17:43 2015 (r282578) @@ -2900,14 +2900,6 @@ ip6_mloopback(struct ifnet *ifp, struct if (copym == NULL) return; } - -#ifdef DIAGNOSTIC - if (copym->m_len < sizeof(*ip6)) { - m_freem(copym); - return; - } -#endif - ip6 = mtod(copym, struct ip6_hdr *); /* * clear embedded scope identifiers if necessary. @@ -2915,7 +2907,11 @@ ip6_mloopback(struct ifnet *ifp, struct */ in6_clearscope(&ip6->ip6_src); in6_clearscope(&ip6->ip6_dst); - + if (copym->m_pkthdr.csum_flags & CSUM_DELAY_DATA_IPV6) { + copym->m_pkthdr.csum_flags |= CSUM_DATA_VALID_IPV6 | + CSUM_PSEUDO_HDR; + copym->m_pkthdr.csum_data = 0xffff; + } (void)if_simloop(ifp, copym, dst->sin6_family, 0); } From owner-svn-src-all@FreeBSD.ORG Wed May 13 05:38:54 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 04993F32; Wed, 13 May 2015 05:38:54 +0000 (UTC) Received: from st11p00im-asmtp004.me.com (st11p00im-asmtp004.me.com [17.172.80.98]) (using TLSv1.2 with cipher DHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CFB871DDF; Wed, 13 May 2015 05:38:53 +0000 (UTC) Received: from akita.localnet (c-73-162-13-215.hsd1.ca.comcast.net [73.162.13.215]) by st11p00im-asmtp004.me.com (Oracle Communications Messaging Server 7.0.5.35.0 64bit (built Dec 4 2014)) with ESMTPSA id <0NO900ISAU8F0I20@st11p00im-asmtp004.me.com>; Wed, 13 May 2015 04:38:45 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.14.151,1.0.33,0.0.0000 definitions=2015-05-13_01:2015-05-12,2015-05-13,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=2 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1412110000 definitions=main-1505130038 From: Rui Paulo To: Luiz Otavio O Souza Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r282827 - in head/sys: arm/ti/am335x boot/fdt/dts/arm Date: Tue, 12 May 2015 21:38:39 -0700 Message-id: <12569579.LIGAUiFBhh@akita> User-Agent: KMail/4.14.3 (FreeBSD/11.0-CURRENT; KDE/4.14.3; amd64; ; ) In-reply-to: <201505130110.t4D1ASEG014421@svn.freebsd.org> References: <201505130110.t4D1ASEG014421@svn.freebsd.org> 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.20 Precedence: list List-Id: "SVN commit messages 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, 13 May 2015 05:38:54 -0000 On Wednesday 13 May 2015 01:10:28 Luiz Otavio O Souza wrote: > Author: loos > Date: Wed May 13 01:10:28 2015 > New Revision: 282827 > URL: https://svnweb.freebsd.org/changeset/base/282827 > > Log: > Add support for the power button on BeagleBone Black. > > Shutdown and turn off the board when the power button is pressed. > > Submitted by: Michal Meloun > Relnotes: yes Cool! But... > > Modified: > head/sys/arm/ti/am335x/am335x_pmic.c > head/sys/boot/fdt/dts/arm/beaglebone-black.dts > > Modified: head/sys/arm/ti/am335x/am335x_pmic.c > ============================================================================ > == --- head/sys/arm/ti/am335x/am335x_pmic.c Wed May 13 00:28:36 > 2015 (r282826) +++ head/sys/arm/ti/am335x/am335x_pmic.c Wed May 13 01:10:28 > 2015 (r282827) @@ -37,6 +37,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > #include > #include > #include > @@ -58,12 +59,20 @@ __FBSDID("$FreeBSD$"); > #define TPS65217D 0x6 > > /* TPS65217 Reisters */ > -#define TPS65217_CHIPID_REG 0x00 > -#define TPS65217_STATUS_REG 0x0A > -#define TPS65217_STATUS_OFF (1U << 7) > -#define TPS65217_STATUS_ACPWR (1U << 3) > -#define TPS65217_STATUS_USBPWR (1U << 2) > -#define TPS65217_STATUS_BT (1U << 0) > +#define TPS65217_CHIPID_REG 0x00 > +#define TPS65217_INT_REG 0x02 > +#define TPS65217_INT_PBM (1U << 6) > +#define TPS65217_INT_ACM (1U << 5) > +#define TPS65217_INT_USBM (1U << 4) > +#define TPS65217_INT_PBI (1U << 2) > +#define TPS65217_INT_ACI (1U << 1) > +#define TPS65217_INT_USBI (1U << 0) > + > +#define TPS65217_STATUS_REG 0x0A > +#define TPS65217_STATUS_OFF (1U << 7) > +#define TPS65217_STATUS_ACPWR (1U << 3) > +#define TPS65217_STATUS_USBPWR (1U << 2) > +#define TPS65217_STATUS_BT (1U << 0) > > #define MAX_IIC_DATA_SIZE 2 > > @@ -72,6 +81,8 @@ struct am335x_pmic_softc { > device_t sc_dev; > uint32_t sc_addr; > struct intr_config_hook enum_hook; > + struct resource *sc_irq_res; > + void *sc_intrhand; > }; > > static void am335x_pmic_shutdown(void *, int); > @@ -105,6 +116,38 @@ am335x_pmic_write(device_t dev, uint8_t > return (iicbus_transfer(dev, msg, 1)); > } > > +static void > +am335x_pmic_intr(void *arg) > +{ > + struct am335x_pmic_softc *sc = (struct am335x_pmic_softc *)arg; > + uint8_t int_reg, status_reg; > + int rv; > + char notify_buf[16]; > + > + THREAD_SLEEPING_OK(); > + rv = am335x_pmic_read(sc->sc_dev, TPS65217_INT_REG, &int_reg, 1); Scary! The correct way to handle this case is to start a task(9). Why wasn't that done here? -- Rui Paulo From owner-svn-src-all@FreeBSD.ORG Wed May 13 05:46:05 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AA873264; Wed, 13 May 2015 05:46:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 998E61ECA; Wed, 13 May 2015 05:46:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4D5k5xO053293; Wed, 13 May 2015 05:46:05 GMT (envelope-from ganbold@FreeBSD.org) Received: (from ganbold@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4D5k53m053292; Wed, 13 May 2015 05:46:05 GMT (envelope-from ganbold@FreeBSD.org) Message-Id: <201505130546.t4D5k53m053292@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ganbold set sender to ganbold@FreeBSD.org using -f From: Ganbold Tsagaankhuu Date: Wed, 13 May 2015 05:46:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282830 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 13 May 2015 05:46:05 -0000 Author: ganbold Date: Wed May 13 05:46:04 2015 New Revision: 282830 URL: https://svnweb.freebsd.org/changeset/base/282830 Log: Delete cpu_do_powersave which is set but never used/tested serving no useful purpose. Differential Revision: https://reviews.freebsd.org/D2516 Submitted by: John Wehle Reviewed by: ian@ Modified: head/sys/arm/arm/cpufunc.c Modified: head/sys/arm/arm/cpufunc.c ============================================================================== --- head/sys/arm/arm/cpufunc.c Wed May 13 02:25:54 2015 (r282829) +++ head/sys/arm/arm/cpufunc.c Wed May 13 05:46:04 2015 (r282830) @@ -99,8 +99,6 @@ u_int arm_cache_level; u_int arm_cache_type[14]; u_int arm_cache_loc; -/* 1 == use cpu_sleep(), 0 == don't */ -int cpu_do_powersave; int ctrl; #ifdef CPU_ARM9 @@ -838,11 +836,6 @@ set_cpufuncs() cputype = cpufunc_id(); cputype &= CPU_ID_CPU_MASK; - /* - * NOTE: cpu_do_powersave defaults to off. If we encounter a - * CPU type where we want to use it by default, then we set it. - */ - #ifdef CPU_ARM9 if (((cputype & CPU_ID_IMPLEMENTOR_MASK) == CPU_ID_ARM_LTD || (cputype & CPU_ID_IMPLEMENTOR_MASK) == CPU_ID_TI) && @@ -922,8 +915,6 @@ set_cpufuncs() get_cachetype_cp15(); pmap_pte_init_mmu_v6(); - /* Use powersave on this CPU. */ - cpu_do_powersave = 1; goto out; } #endif /* CPU_CORTEXA */ @@ -946,9 +937,6 @@ set_cpufuncs() get_cachetype_cp15(); pmap_pte_init_generic(); - /* Use powersave on this CPU. */ - cpu_do_powersave = 1; - goto out; } #endif /* CPU_FA526 */ @@ -985,9 +973,6 @@ set_cpufuncs() get_cachetype_cp15(); pmap_pte_init_xscale(); - /* Use powersave on this CPU. */ - cpu_do_powersave = 1; - goto out; } #endif /* CPU_XSCALE_PXA2X0 */ From owner-svn-src-all@FreeBSD.ORG Wed May 13 07:39:17 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 04E9F501; Wed, 13 May 2015 07:39:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E73821B2D; Wed, 13 May 2015 07:39:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4D7dGjq007460; Wed, 13 May 2015 07:39:16 GMT (envelope-from hiren@FreeBSD.org) Received: (from hiren@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4D7dG3J007459; Wed, 13 May 2015 07:39:16 GMT (envelope-from hiren@FreeBSD.org) Message-Id: <201505130739.t4D7dG3J007459@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hiren set sender to hiren@FreeBSD.org using -f From: Hiren Panchasara Date: Wed, 13 May 2015 07:39: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: r282831 - stable/10/sys/dev/e1000 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.20 Precedence: list List-Id: "SVN commit messages 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, 13 May 2015 07:39:17 -0000 Author: hiren Date: Wed May 13 07:39:16 2015 New Revision: 282831 URL: https://svnweb.freebsd.org/changeset/base/282831 Log: Partial MFC r281838: For igb(4), when we are doing multiqueue, we are all setup to have full 32bit RSS hash from the card. Expose that so others like lagg(4) can use that and avoid hashing the traffic by themselves. Setting hashtype as OPAQUE because FreeBSD 10 doesn't have RSS support. Sponsored by: Limelight Networks Modified: stable/10/sys/dev/e1000/if_igb.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/e1000/if_igb.c ============================================================================== --- stable/10/sys/dev/e1000/if_igb.c Wed May 13 05:46:04 2015 (r282830) +++ stable/10/sys/dev/e1000/if_igb.c Wed May 13 07:39:16 2015 (r282831) @@ -4970,10 +4970,27 @@ igb_rxeof(struct igb_queue *que, int cou rxr->fmp->m_pkthdr.ether_vtag = vtag; rxr->fmp->m_flags |= M_VLANTAG; } + + /* + * In case of multiqueue, we have RXCSUM.PCSD bit set + * and never cleared. This means we have RSS hash + * available to be used. + */ + if (adapter->num_queues > 1) { + rxr->fmp->m_pkthdr.flowid = + le32toh(cur->wb.lower.hi_dword.rss); + /* + * Full RSS support is not avilable in + * FreeBSD 10 so setting the hash type to + * OPAQUE. + */ + M_HASHTYPE_SET(rxr->fmp, M_HASHTYPE_OPAQUE); + } else { #ifndef IGB_LEGACY_TX - rxr->fmp->m_pkthdr.flowid = que->msix; - M_HASHTYPE_SET(rxr->fmp, M_HASHTYPE_OPAQUE); + rxr->fmp->m_pkthdr.flowid = que->msix; + M_HASHTYPE_SET(rxr->fmp, M_HASHTYPE_OPAQUE); #endif + } sendmp = rxr->fmp; /* Make sure to set M_PKTHDR. */ sendmp->m_flags |= M_PKTHDR; From owner-svn-src-all@FreeBSD.ORG Wed May 13 08:04:51 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3006EBC8; Wed, 13 May 2015 08:04:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0478A1E77; Wed, 13 May 2015 08:04:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4D84oFI021575; Wed, 13 May 2015 08:04:50 GMT (envelope-from hiren@FreeBSD.org) Received: (from hiren@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4D84oCO021574; Wed, 13 May 2015 08:04:50 GMT (envelope-from hiren@FreeBSD.org) Message-Id: <201505130804.t4D84oCO021574@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hiren set sender to hiren@FreeBSD.org using -f From: Hiren Panchasara Date: Wed, 13 May 2015 08:04:50 +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: r282832 - stable/10/sys/net 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.20 Precedence: list List-Id: "SVN commit messages 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, 13 May 2015 08:04:51 -0000 Author: hiren Date: Wed May 13 08:04:50 2015 New Revision: 282832 URL: https://svnweb.freebsd.org/changeset/base/282832 Log: MFC r281984: Currently there is no easy way to specify net.isr.maxthreads = all cpus. We need to specify exact number of cpus in loader.conf which get annoying when you have mix of machines which don't have equal number of total cpus. I propose "-1" as that value. When loader.conf has net.isr.maxthreads = -1, netisr will use all available cpus. Sponsored by: Limelight Networks Modified: stable/10/sys/net/netisr.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/net/netisr.c ============================================================================== --- stable/10/sys/net/netisr.c Wed May 13 07:39:16 2015 (r282831) +++ stable/10/sys/net/netisr.c Wed May 13 08:04:50 2015 (r282832) @@ -156,10 +156,13 @@ SYSCTL_PROC(_net_isr, OID_AUTO, dispatch /* * Allow the administrator to limit the number of threads (CPUs) to use for * netisr. We don't check netisr_maxthreads before creating the thread for - * CPU 0, so in practice we ignore values <= 1. This must be set at boot. - * We will create at most one thread per CPU. + * CPU 0. This must be set at boot. We will create at most one thread per CPU. + * By default we initialize this to 1 which would assign just 1 cpu (cpu0) and + * therefore only 1 workstream. If set to -1, netisr would use all cpus + * (mp_ncpus) and therefore would have those many workstreams. One workstream + * per thread (CPU). */ -static int netisr_maxthreads = -1; /* Max number of threads. */ +static int netisr_maxthreads = 1; /* Max number of threads. */ TUNABLE_INT("net.isr.maxthreads", &netisr_maxthreads); SYSCTL_INT(_net_isr, OID_AUTO, maxthreads, CTLFLAG_RDTUN, &netisr_maxthreads, 0, @@ -1128,8 +1131,10 @@ netisr_init(void *arg) KASSERT(curcpu == 0, ("%s: not on CPU 0", __func__)); NETISR_LOCK_INIT(); - if (netisr_maxthreads < 1) - netisr_maxthreads = 1; + if (netisr_maxthreads == 0 || netisr_maxthreads < -1 ) + netisr_maxthreads = 1; /* default behavior */ + else if (netisr_maxthreads == -1) + netisr_maxthreads = mp_ncpus; /* use max cpus */ if (netisr_maxthreads > mp_ncpus) { printf("netisr_init: forcing maxthreads from %d to %d\n", netisr_maxthreads, mp_ncpus); From owner-svn-src-all@FreeBSD.ORG Wed May 13 08:58:06 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CBADE885; Wed, 13 May 2015 08:58:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ACBB314E7; Wed, 13 May 2015 08:58:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4D8w6hu046623; Wed, 13 May 2015 08:58:06 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4D8w6CY046622; Wed, 13 May 2015 08:58:06 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201505130858.t4D8w6CY046622@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Wed, 13 May 2015 08:58: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: r282833 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 13 May 2015 08:58:07 -0000 Author: araujo (ports committer) Date: Wed May 13 08:58:06 2015 New Revision: 282833 URL: https://svnweb.freebsd.org/changeset/base/282833 Log: Convert space to tabs in the bits that I changed in my last commit. No functional change. Reported by: jmallet@ Modified: stable/10/sys/dev/ixgbe/ixgbe.c Modified: stable/10/sys/dev/ixgbe/ixgbe.c ============================================================================== --- stable/10/sys/dev/ixgbe/ixgbe.c Wed May 13 08:04:50 2015 (r282832) +++ stable/10/sys/dev/ixgbe/ixgbe.c Wed May 13 08:58:06 2015 (r282833) @@ -1673,7 +1673,7 @@ static void ixgbe_media_status(struct ifnet * ifp, struct ifmediareq * ifmr) { struct adapter *adapter = ifp->if_softc; - struct ixgbe_hw *hw = &adapter->hw; + struct ixgbe_hw *hw = &adapter->hw; INIT_DEBUGOUT("ixgbe_media_status: begin"); IXGBE_CORE_LOCK(adapter); @@ -1689,28 +1689,28 @@ ixgbe_media_status(struct ifnet * ifp, s ifmr->ifm_status |= IFM_ACTIVE; - /* - * Not all NIC are 1000baseSX as an example X540T. - * We must set properly the media based on NIC model. - */ - switch (hw->device_id) { - case IXGBE_DEV_ID_X540T: - if (adapter->link_speed == IXGBE_LINK_SPEED_100_FULL) - ifmr->ifm_active |= IFM_100_TX | IFM_FDX; - else if (adapter->link_speed == IXGBE_LINK_SPEED_1GB_FULL) - ifmr->ifm_active |= IFM_1000_T | IFM_FDX; - else if (adapter->link_speed == IXGBE_LINK_SPEED_10GB_FULL) - ifmr->ifm_active |= adapter->optics | IFM_FDX; - break; - default: - if (adapter->link_speed == IXGBE_LINK_SPEED_100_FULL) - ifmr->ifm_active |= IFM_100_TX | IFM_FDX; - else if (adapter->link_speed == IXGBE_LINK_SPEED_1GB_FULL) - ifmr->ifm_active |= IFM_1000_SX | IFM_FDX; - else if (adapter->link_speed == IXGBE_LINK_SPEED_10GB_FULL) - ifmr->ifm_active |= adapter->optics | IFM_FDX; - break; - } + /* + * Not all NIC are 1000baseSX as an example X540T. + * We must set properly the media based on NIC model. + */ + switch (hw->device_id) { + case IXGBE_DEV_ID_X540T: + if (adapter->link_speed == IXGBE_LINK_SPEED_100_FULL) + ifmr->ifm_active |= IFM_100_TX | IFM_FDX; + else if (adapter->link_speed == IXGBE_LINK_SPEED_1GB_FULL) + ifmr->ifm_active |= IFM_1000_T | IFM_FDX; + else if (adapter->link_speed == IXGBE_LINK_SPEED_10GB_FULL) + ifmr->ifm_active |= adapter->optics | IFM_FDX; + break; + default: + if (adapter->link_speed == IXGBE_LINK_SPEED_100_FULL) + ifmr->ifm_active |= IFM_100_TX | IFM_FDX; + else if (adapter->link_speed == IXGBE_LINK_SPEED_1GB_FULL) + ifmr->ifm_active |= IFM_1000_SX | IFM_FDX; + else if (adapter->link_speed == IXGBE_LINK_SPEED_10GB_FULL) + ifmr->ifm_active |= adapter->optics | IFM_FDX; + break; + } IXGBE_CORE_UNLOCK(adapter); From owner-svn-src-all@FreeBSD.ORG Wed May 13 10:03:22 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 07D525D8; Wed, 13 May 2015 10:03:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E9FEB1DAD; Wed, 13 May 2015 10:03:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4DA3LG8080179; Wed, 13 May 2015 10:03:21 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4DA3LHR080177; Wed, 13 May 2015 10:03:21 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201505131003.t4DA3LHR080177@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 13 May 2015 10:03: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: r282834 - stable/10/lib/libc/tests/db 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.20 Precedence: list List-Id: "SVN commit messages 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, 13 May 2015 10:03:22 -0000 Author: ngie Date: Wed May 13 10:03:21 2015 New Revision: 282834 URL: https://svnweb.freebsd.org/changeset/base/282834 Log: MFC r281967: Assuming a system has /bin/csh on it is a bad idea (especially it being optional on FreeBSD). Look for /bin/cat instead Modified: stable/10/lib/libc/tests/db/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/tests/db/Makefile ============================================================================== --- stable/10/lib/libc/tests/db/Makefile Wed May 13 08:58:06 2015 (r282833) +++ stable/10/lib/libc/tests/db/Makefile Wed May 13 10:03:21 2015 (r282834) @@ -11,6 +11,7 @@ FILESDIR= ${TESTSDIR} FILES= README NETBSD_ATF_TESTS_SH+= db_test +ATF_TESTS_SH_SED_db_test= -e 's,/bin/csh,/bin/cat,g' .include "../Makefile.netbsd-tests" From owner-svn-src-all@FreeBSD.ORG Wed May 13 10:07:50 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D848E7C5; Wed, 13 May 2015 10:07:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C65A71DEC; Wed, 13 May 2015 10:07:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4DA7ofI080825; Wed, 13 May 2015 10:07:50 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4DA7oF9080824; Wed, 13 May 2015 10:07:50 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201505131007.t4DA7oF9080824@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 13 May 2015 10:07:50 +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: r282835 - stable/10/usr.sbin/bluetooth 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.20 Precedence: list List-Id: "SVN commit messages 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, 13 May 2015 10:07:51 -0000 Author: ngie Date: Wed May 13 10:07:50 2015 New Revision: 282835 URL: https://svnweb.freebsd.org/changeset/base/282835 Log: MFC r282054: ath3kfw, bcmfw, bthidcontrol, bthidd all require usb(4); build them conditionally if MK_USB != no Modified: stable/10/usr.sbin/bluetooth/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bluetooth/Makefile ============================================================================== --- stable/10/usr.sbin/bluetooth/Makefile Wed May 13 10:03:21 2015 (r282834) +++ stable/10/usr.sbin/bluetooth/Makefile Wed May 13 10:07:50 2015 (r282835) @@ -1,12 +1,10 @@ # $Id: Makefile,v 1.5 2003/09/08 02:28:35 max Exp $ # $FreeBSD$ +.include + SUBDIR= \ - ath3kfw \ - bcmfw \ bt3cfw \ - bthidcontrol \ - bthidd \ btpand \ hccontrol \ hcsecd \ @@ -17,5 +15,12 @@ SUBDIR= \ sdpcontrol \ sdpd +.if ${MK_USB} != "no" +SUBDIR+= ath3kfw +SUBDIR+= bcmfw +SUBDIR+= bthidcontrol +SUBDIR+= bthidd +.endif + .include From owner-svn-src-all@FreeBSD.ORG Wed May 13 10:12:17 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C8094961; Wed, 13 May 2015 10:12:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B5B991EB8; Wed, 13 May 2015 10:12:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4DACHqL085086; Wed, 13 May 2015 10:12:17 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4DACHEQ085085; Wed, 13 May 2015 10:12:17 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201505131012.t4DACHEQ085085@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 13 May 2015 10:12: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: r282836 - stable/10/contrib/netbsd-tests/lib/libm 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.20 Precedence: list List-Id: "SVN commit messages 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, 13 May 2015 10:12:17 -0000 Author: ngie Date: Wed May 13 10:12:16 2015 New Revision: 282836 URL: https://svnweb.freebsd.org/changeset/base/282836 Log: MFC r282056: The fmodl compat shims on arm/mips/powerpc aren't complete Disable the test code for now on those architectures PR: 199422 Modified: stable/10/contrib/netbsd-tests/lib/libm/t_fmod.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/netbsd-tests/lib/libm/t_fmod.c ============================================================================== --- stable/10/contrib/netbsd-tests/lib/libm/t_fmod.c Wed May 13 10:07:50 2015 (r282835) +++ stable/10/contrib/netbsd-tests/lib/libm/t_fmod.c Wed May 13 10:12:16 2015 (r282836) @@ -43,15 +43,21 @@ ATF_TC_BODY(fmod, tc) { ATF_CHECK(fmodf(2.0, 1.0) == 0); ATF_CHECK(fmod(2.0, 1.0) == 0); +#if !defined(__FreeBSD__) || LDBL_PREC != 53 ATF_CHECK(fmodl(2.0, 1.0) == 0); +#endif ATF_CHECK(fmodf(2.0, 0.5) == 0); ATF_CHECK(fmod(2.0, 0.5) == 0); +#if !defined(__FreeBSD__) || LDBL_PREC != 53 ATF_CHECK(fmodl(2.0, 0.5) == 0); +#endif ATF_CHECK(fabsf(fmodf(1.0, 0.1) - 0.1f) <= 55 * FLT_EPSILON); ATF_CHECK(fabs(fmod(1.0, 0.1) - 0.1) <= 55 * DBL_EPSILON); +#if !defined(__FreeBSD__) || LDBL_PREC != 53 ATF_CHECK(fabsl(fmodl(1.0, 0.1L) - 0.1L) <= 55 * LDBL_EPSILON); +#endif } ATF_TP_ADD_TCS(tp) From owner-svn-src-all@FreeBSD.ORG Wed May 13 10:15:27 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 617C5B3E; Wed, 13 May 2015 10:15:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 34EFA1EF4; Wed, 13 May 2015 10:15:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4DAFRlr085634; Wed, 13 May 2015 10:15:27 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4DAFRxF085633; Wed, 13 May 2015 10:15:27 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201505131015.t4DAFRxF085633@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 13 May 2015 10:15:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r282837 - stable/10/tools/regression/gaithrstress 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.20 Precedence: list List-Id: "SVN commit messages 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, 13 May 2015 10:15:27 -0000 Author: ngie Date: Wed May 13 10:15:26 2015 New Revision: 282837 URL: https://svnweb.freebsd.org/changeset/base/282837 Log: MFC r282062: Fix -Wformat warnings by using proper format string qualifiers for long and unsigned[ long] types Modified: stable/10/tools/regression/gaithrstress/gaithrstress.c Directory Properties: stable/10/ (props changed) Modified: stable/10/tools/regression/gaithrstress/gaithrstress.c ============================================================================== --- stable/10/tools/regression/gaithrstress/gaithrstress.c Wed May 13 10:12:16 2015 (r282836) +++ stable/10/tools/regression/gaithrstress/gaithrstress.c Wed May 13 10:15:26 2015 (r282837) @@ -230,7 +230,7 @@ usage: err(1, "reading word file %s", wordfile); if (nrandwords < 1) errx(1, "word file %s did not have >0 words", wordfile); - printf("Read %u random words from %s.\n", nrandwords, wordfile); + printf("Read %zu random words from %s.\n", nrandwords, wordfile); workers = calloc(nworkers, sizeof(*workers)); if (workers == NULL) err(1, "allocating workers"); @@ -242,8 +242,8 @@ usage: for (i = 0; i < nworkers; i++) { if (pthread_create(&workers[i].w_thread, NULL, work, &workers[i]) != 0) - err(1, "creating worker %u", i); - printf("%u%s", i, i == nworkers - 1 ? ".\n" : ", "); + err(1, "creating worker %zu", i); + printf("%zu%s", i, i == nworkers - 1 ? ".\n" : ", "); fflush(stdout); } @@ -255,7 +255,7 @@ usage: fflush(stdout); for (i = 0; i < nworkers; i++) { pthread_join(workers[i].w_thread, NULL); - printf("%u%s", i, i == nworkers - 1 ? ".\n" : ", "); + printf("%zu%s", i, i == nworkers - 1 ? ".\n" : ", "); fflush(stdout); } @@ -264,7 +264,7 @@ usage: printf("%-10s%-20s%-20s%-29s\n", "------", "--------------", "----------", "---------------------------"); for (i = 0; i < nworkers; i++) { - printf("%-10u%-20ju%-20ju%u:%s%.2f\n", i, + printf("%-10zu%-20ju%-20ju%ld:%s%.2f\n", i, workers[i].w_lookup_success, workers[i].w_lookup_failure, workers[i].w_max_lookup_time.tv_sec / 60, workers[i].w_max_lookup_time.tv_sec % 60 < 10 ? "0" : "", From owner-svn-src-all@FreeBSD.ORG Wed May 13 10:17:35 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8533CCDC; Wed, 13 May 2015 10:17:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 58A311F13; Wed, 13 May 2015 10:17:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4DAHZ2v085964; Wed, 13 May 2015 10:17:35 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4DAHZvU085963; Wed, 13 May 2015 10:17:35 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201505131017.t4DAHZvU085963@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 13 May 2015 10:17:35 +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: r282838 - stable/9/tools/regression/gaithrstress 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.20 Precedence: list List-Id: "SVN commit messages 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, 13 May 2015 10:17:35 -0000 Author: ngie Date: Wed May 13 10:17:34 2015 New Revision: 282838 URL: https://svnweb.freebsd.org/changeset/base/282838 Log: MFC r282062: Fix -Wformat warnings by using proper format string qualifiers for long and unsigned[ long] types Modified: stable/9/tools/regression/gaithrstress/gaithrstress.c Directory Properties: stable/9/ (props changed) stable/9/tools/ (props changed) stable/9/tools/regression/ (props changed) Modified: stable/9/tools/regression/gaithrstress/gaithrstress.c ============================================================================== --- stable/9/tools/regression/gaithrstress/gaithrstress.c Wed May 13 10:15:26 2015 (r282837) +++ stable/9/tools/regression/gaithrstress/gaithrstress.c Wed May 13 10:17:34 2015 (r282838) @@ -230,7 +230,7 @@ usage: err(1, "reading word file %s", wordfile); if (nrandwords < 1) errx(1, "word file %s did not have >0 words", wordfile); - printf("Read %u random words from %s.\n", nrandwords, wordfile); + printf("Read %zu random words from %s.\n", nrandwords, wordfile); workers = calloc(nworkers, sizeof(*workers)); if (workers == NULL) err(1, "allocating workers"); @@ -242,8 +242,8 @@ usage: for (i = 0; i < nworkers; i++) { if (pthread_create(&workers[i].w_thread, NULL, work, &workers[i]) != 0) - err(1, "creating worker %u", i); - printf("%u%s", i, i == nworkers - 1 ? ".\n" : ", "); + err(1, "creating worker %zu", i); + printf("%zu%s", i, i == nworkers - 1 ? ".\n" : ", "); fflush(stdout); } @@ -255,7 +255,7 @@ usage: fflush(stdout); for (i = 0; i < nworkers; i++) { pthread_join(workers[i].w_thread, NULL); - printf("%u%s", i, i == nworkers - 1 ? ".\n" : ", "); + printf("%zu%s", i, i == nworkers - 1 ? ".\n" : ", "); fflush(stdout); } @@ -264,7 +264,7 @@ usage: printf("%-10s%-20s%-20s%-29s\n", "------", "--------------", "----------", "---------------------------"); for (i = 0; i < nworkers; i++) { - printf("%-10u%-20ju%-20ju%u:%s%.2f\n", i, + printf("%-10zu%-20ju%-20ju%ld:%s%.2f\n", i, workers[i].w_lookup_success, workers[i].w_lookup_failure, workers[i].w_max_lookup_time.tv_sec / 60, workers[i].w_max_lookup_time.tv_sec % 60 < 10 ? "0" : "", From owner-svn-src-all@FreeBSD.ORG Wed May 13 10:18:45 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B4FE7E3A; Wed, 13 May 2015 10:18:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 88D3E1F28; Wed, 13 May 2015 10:18:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4DAIjvI086321; Wed, 13 May 2015 10:18:45 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4DAIjE8086320; Wed, 13 May 2015 10:18:45 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201505131018.t4DAIjE8086320@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 13 May 2015 10:18: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: r282839 - stable/10/usr.sbin/bhyve 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.20 Precedence: list List-Id: "SVN commit messages 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, 13 May 2015 10:18:45 -0000 Author: mav Date: Wed May 13 10:18:44 2015 New Revision: 282839 URL: https://svnweb.freebsd.org/changeset/base/282839 Log: MFC r281764, r282563: Disable RX/TX queues notifications when not needed. This reduces CPU load and doubles iperf throughput, reaching 2-3Gbit/s. Sponsored by: iXsystems, Inc. Modified: stable/10/usr.sbin/bhyve/pci_virtio_net.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bhyve/pci_virtio_net.c ============================================================================== --- stable/10/usr.sbin/bhyve/pci_virtio_net.c Wed May 13 10:17:34 2015 (r282838) +++ stable/10/usr.sbin/bhyve/pci_virtio_net.c Wed May 13 10:18:44 2015 (r282839) @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -393,6 +394,7 @@ pci_vtnet_ping_rxq(void *vsc, struct vqu */ if (sc->vsc_rx_ready == 0) { sc->vsc_rx_ready = 1; + vq->vq_used->vu_flags |= VRING_USED_F_NO_NOTIFY; } } @@ -438,6 +440,7 @@ pci_vtnet_ping_txq(void *vsc, struct vqu /* Signal the tx thread for processing */ pthread_mutex_lock(&sc->tx_mtx); + vq->vq_used->vu_flags |= VRING_USED_F_NO_NOTIFY; if (sc->tx_in_progress == 0) pthread_cond_signal(&sc->tx_cond); pthread_mutex_unlock(&sc->tx_mtx); @@ -451,7 +454,7 @@ pci_vtnet_tx_thread(void *param) { struct pci_vtnet_softc *sc = param; struct vqueue_info *vq; - int have_work, error; + int error; vq = &sc->vsc_queues[VTNET_TXQ]; @@ -465,19 +468,17 @@ pci_vtnet_tx_thread(void *param) for (;;) { /* note - tx mutex is locked here */ - do { - if (sc->resetting) - have_work = 0; - else - have_work = vq_has_descs(vq); - - if (!have_work) { - sc->tx_in_progress = 0; - error = pthread_cond_wait(&sc->tx_cond, - &sc->tx_mtx); - assert(error == 0); - } - } while (!have_work); + while (sc->resetting || !vq_has_descs(vq)) { + vq->vq_used->vu_flags &= ~VRING_USED_F_NO_NOTIFY; + mb(); + if (!sc->resetting && vq_has_descs(vq)) + break; + + sc->tx_in_progress = 0; + error = pthread_cond_wait(&sc->tx_cond, &sc->tx_mtx); + assert(error == 0); + } + vq->vq_used->vu_flags |= VRING_USED_F_NO_NOTIFY; sc->tx_in_progress = 1; pthread_mutex_unlock(&sc->tx_mtx); From owner-svn-src-all@FreeBSD.ORG Wed May 13 10:21:01 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6E59F162; Wed, 13 May 2015 10:21:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5C0991002; Wed, 13 May 2015 10:21:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4DAL1kn087857; Wed, 13 May 2015 10:21:01 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4DAL1fj087856; Wed, 13 May 2015 10:21:01 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201505131021.t4DAL1fj087856@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 13 May 2015 10:21: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: r282840 - stable/10/usr.sbin/bhyve 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.20 Precedence: list List-Id: "SVN commit messages 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, 13 May 2015 10:21:01 -0000 Author: mav Date: Wed May 13 10:21:00 2015 New Revision: 282840 URL: https://svnweb.freebsd.org/changeset/base/282840 Log: MFC r281766, r281767: Report link as up only if we managed to open tap device. It would be cool to report tap device status, but it has no such API. Modified: stable/10/usr.sbin/bhyve/pci_virtio_net.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bhyve/pci_virtio_net.c ============================================================================== --- stable/10/usr.sbin/bhyve/pci_virtio_net.c Wed May 13 10:18:44 2015 (r282839) +++ stable/10/usr.sbin/bhyve/pci_virtio_net.c Wed May 13 10:21:00 2015 (r282840) @@ -643,8 +643,8 @@ pci_vtnet_init(struct vmctx *ctx, struct pci_lintr_request(pi); - /* link always up */ - sc->vsc_config.status = 1; + /* Link is up if we managed to open tap device. */ + sc->vsc_config.status = (opts == NULL || sc->vsc_tapfd >= 0); /* use BAR 1 to map MSI-X table and PBA, if we're using MSI-X */ if (vi_intr_init(&sc->vsc_vs, 1, fbsdrun_virtio_msix())) From owner-svn-src-all@FreeBSD.ORG Wed May 13 10:21:15 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F0A7C293; Wed, 13 May 2015 10:21:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DD8201009; Wed, 13 May 2015 10:21:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4DALEkO089309; Wed, 13 May 2015 10:21:14 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4DALE87088941; Wed, 13 May 2015 10:21:14 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201505131021.t4DALE87088941@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 13 May 2015 10:21:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r282841 - in stable/10: etc/mtree tests/sys tests/sys/kqueue tools/regression/kqueue 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.20 Precedence: list List-Id: "SVN commit messages 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, 13 May 2015 10:21:15 -0000 Author: ngie Date: Wed May 13 10:21:13 2015 New Revision: 282841 URL: https://svnweb.freebsd.org/changeset/base/282841 Log: MFC r282063: Integrate tools/regression/kqueue into the FreeBSD test suite as tests/sys/kqueue Added: stable/10/tests/sys/kqueue/ - copied from r282063, head/tests/sys/kqueue/ Deleted: stable/10/tools/regression/kqueue/ Modified: stable/10/etc/mtree/BSD.tests.dist stable/10/tests/sys/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/mtree/BSD.tests.dist ============================================================================== --- stable/10/etc/mtree/BSD.tests.dist Wed May 13 10:21:00 2015 (r282840) +++ stable/10/etc/mtree/BSD.tests.dist Wed May 13 10:21:13 2015 (r282841) @@ -180,6 +180,8 @@ sys kern .. + kqueue + .. netinet .. pjdfstest Modified: stable/10/tests/sys/Makefile ============================================================================== --- stable/10/tests/sys/Makefile Wed May 13 10:21:00 2015 (r282840) +++ stable/10/tests/sys/Makefile Wed May 13 10:21:13 2015 (r282841) @@ -5,6 +5,7 @@ TESTSDIR= ${TESTSBASE}/sys TESTS_SUBDIRS+= kern +TESTS_SUBDIRS+= kqueue TESTS_SUBDIRS+= netinet # Items not integrated into kyua runs by default From owner-svn-src-all@FreeBSD.ORG Wed May 13 10:24:24 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 33E3D416; Wed, 13 May 2015 10:24:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1FDD91033; Wed, 13 May 2015 10:24:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4DAONjV090963; Wed, 13 May 2015 10:24:23 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4DAON7A090958; Wed, 13 May 2015 10:24:23 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201505131024.t4DAON7A090958@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 13 May 2015 10:24: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: r282842 - in stable/10: etc/mtree tests/sys tests/sys/fifo tests/sys/file tools/regression/fifo tools/regression/file/dup tools/regression/file/fcntlflags tools/regression/file/flock to... 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.20 Precedence: list List-Id: "SVN commit messages 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, 13 May 2015 10:24:24 -0000 Author: ngie Date: Wed May 13 10:24:23 2015 New Revision: 282842 URL: https://svnweb.freebsd.org/changeset/base/282842 Log: MFC r282067: Integrate tools/regression/fifo into the FreeBSD test suite as tests/sys/fifo and tools/regression/file into the FreeBSD test suite as tests/sys/file Added: stable/10/tests/sys/fifo/ - copied from r282067, head/tests/sys/fifo/ stable/10/tests/sys/file/ - copied from r282067, head/tests/sys/file/ Deleted: stable/10/tools/regression/fifo/ stable/10/tools/regression/file/dup/ stable/10/tools/regression/file/fcntlflags/ stable/10/tools/regression/file/flock/ stable/10/tools/regression/file/ftruncate/ stable/10/tools/regression/file/newfileops_on_fork/ Modified: stable/10/etc/mtree/BSD.tests.dist stable/10/tests/sys/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/mtree/BSD.tests.dist ============================================================================== --- stable/10/etc/mtree/BSD.tests.dist Wed May 13 10:21:13 2015 (r282841) +++ stable/10/etc/mtree/BSD.tests.dist Wed May 13 10:24:23 2015 (r282842) @@ -178,6 +178,10 @@ .. .. sys + fifo + .. + file + .. kern .. kqueue Modified: stable/10/tests/sys/Makefile ============================================================================== --- stable/10/tests/sys/Makefile Wed May 13 10:21:13 2015 (r282841) +++ stable/10/tests/sys/Makefile Wed May 13 10:24:23 2015 (r282842) @@ -4,6 +4,8 @@ TESTSDIR= ${TESTSBASE}/sys +TESTS_SUBDIRS+= fifo +TESTS_SUBDIRS+= file TESTS_SUBDIRS+= kern TESTS_SUBDIRS+= kqueue TESTS_SUBDIRS+= netinet From owner-svn-src-all@FreeBSD.ORG Wed May 13 10:29:03 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7E99F5BB; Wed, 13 May 2015 10:29:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6B5751060; Wed, 13 May 2015 10:29:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4DAT34J091651; Wed, 13 May 2015 10:29:03 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4DAT3Rs091648; Wed, 13 May 2015 10:29:03 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201505131029.t4DAT3Rs091648@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 13 May 2015 10:29: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: r282843 - stable/10/tools/regression/aio/aiop 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.20 Precedence: list List-Id: "SVN commit messages 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, 13 May 2015 10:29:03 -0000 Author: ngie Date: Wed May 13 10:29:02 2015 New Revision: 282843 URL: https://svnweb.freebsd.org/changeset/base/282843 Log: MFC r282073: - Fix style(9) a bit -- Fix whitespace -- Use err/errx -- Remove superfluous braces - Be a bit more defensive with input from the end-user - Don't throw a floating point exception by dividing by 0 when processing a zero-byte file Modified: stable/10/tools/regression/aio/aiop/Makefile stable/10/tools/regression/aio/aiop/aiop.c Directory Properties: stable/10/ (props changed) Modified: stable/10/tools/regression/aio/aiop/Makefile ============================================================================== --- stable/10/tools/regression/aio/aiop/Makefile Wed May 13 10:24:23 2015 (r282842) +++ stable/10/tools/regression/aio/aiop/Makefile Wed May 13 10:29:02 2015 (r282843) @@ -3,4 +3,6 @@ PROG= aiop MAN= +WARNS= 6 + .include Modified: stable/10/tools/regression/aio/aiop/aiop.c ============================================================================== --- stable/10/tools/regression/aio/aiop/aiop.c Wed May 13 10:24:23 2015 (r282842) +++ stable/10/tools/regression/aio/aiop/aiop.c Wed May 13 10:29:02 2015 (r282843) @@ -39,21 +39,22 @@ #include __FBSDID("$FreeBSD$"); -#include -#include -#include -#include -#include #include -#include -#include -#include #include +#include +#include +#include #include +#include +#include +#include #include +#include +#include +#include #include -#include -#include +#include +#include /* * This is a bit of a quick hack to do parallel IO testing through POSIX AIO. @@ -84,14 +85,12 @@ disk_getsize(int fd) { off_t mediasize; - if (ioctl(fd, DIOCGMEDIASIZE, &mediasize) < 0) { - perror("ioctl(DIOCGMEDIASIZE)"); - exit(1); - } - return mediasize; + if (ioctl(fd, DIOCGMEDIASIZE, &mediasize) < 0) + err(1, "ioctl(DIOCGMEDIASIZE)"); + return (mediasize); } -iot_t +static iot_t choose_aio(iot_t iomask) { /* choose a random read or write event, limited by the mask */ @@ -102,7 +101,7 @@ choose_aio(iot_t iomask) return (random() & 0x01 ? IOT_READ : IOT_WRITE); } -void +static void set_aio(struct aiocb *a, iot_t iot, int fd, off_t offset, int size, char *buf) { int r; @@ -115,10 +114,8 @@ set_aio(struct aiocb *a, iot_t iot, int r = aio_read(a); else r = aio_write(a); - if (r != 0) { - perror("set_aio"); - exit(1); - } + if (r != 0) + err(1, "set_aio call failed"); } int @@ -134,30 +131,35 @@ main(int argc, char *argv[]) off_t file_size, offset; struct aiocb *a; int i, n; - struct timeval st, et, rt; - float f_rt; + struct timeval st, et, rt; + float f_rt; iot_t iowhat; if (argc < 6) { - printf("Usage: %s \n", argv[0]); + printf("Usage: %s \n", + argv[0]); exit(1); } fn = argv[1]; io_size = atoi(argv[2]); + if (io_size <= 0) + errx(1, "the I/O size must be >0"); nrun = atoi(argv[3]); + if (nrun <= 0) + errx(1, "the number of runs must be >0"); aio_len = atoi(argv[4]); - if (strcmp(argv[5], "ro") == 0) { + if (aio_len <= 0) + errx(1, "AIO concurrency must be >0"); + if (strcmp(argv[5], "ro") == 0) iowhat = IOT_READ; - } else if (strcmp(argv[5], "rw") == 0) { + else if (strcmp(argv[5], "rw") == 0) iowhat = IOT_READ | IOT_WRITE; - } else if (strcmp(argv[5], "wo") == 0) { + else if (strcmp(argv[5], "wo") == 0) iowhat = IOT_WRITE; - } else { - fprintf(stderr, "needs to be ro, rw, wo!\n"); - exit(1); - } + else + errx(1, "the I/O type needs to be \"ro\", \"rw\", or \"wo\"!\n"); /* * Random returns values between 0 and (2^32)-1; only good for 4 gig. @@ -171,35 +173,31 @@ main(int argc, char *argv[]) else fd = open(fn, O_RDWR | O_DIRECT); - if (fd < 0) { - perror("open"); - exit(1); - } - if (fstat(fd, &sb) < 0) { - perror("fstat"); - exit(1); - } + if (fd < 0) + err(1, "open failed"); + if (fstat(fd, &sb) < 0) + err(1, "fstat failed"); if (S_ISREG(sb.st_mode)) { file_size = sb.st_size; } else if (S_ISBLK(sb.st_mode) || S_ISCHR(sb.st_mode)) { file_size = disk_getsize(fd); - } else { - perror("unknown file type\n"); - exit(1); - } + } else + errx(1, "unknown file type"); + if (file_size <= 0) + errx(1, "path provided too small"); + printf("File: %s; File size %jd bytes\n", fn, (intmax_t)file_size); aio = calloc(aio_len, sizeof(struct aiocb)); abuf = calloc(aio_len, sizeof(char *)); - for (i = 0; i < aio_len; i++) { + for (i = 0; i < aio_len; i++) abuf[i] = calloc(1, io_size * sizeof(char)); - } /* Fill with the initial contents */ - gettimeofday(&st, NULL); + gettimeofday(&st, NULL); for (i = 0; i < aio_len; i++) { - offset = random() % (file_size / io_size); - offset *= io_size; + offset = random() % (file_size / io_size); + offset *= io_size; set_aio(aio + i, choose_aio(iowhat), fd, offset, io_size, abuf[i]); } @@ -208,18 +206,18 @@ main(int argc, char *argv[]) n = a - aio; assert(n < aio_len); assert(n >= 0); - offset = random() % (file_size / io_size); - offset *= io_size; + offset = random() % (file_size / io_size); + offset *= io_size; set_aio(aio + n, choose_aio(iowhat), fd, offset, io_size, abuf[n]); } - gettimeofday(&et, NULL); - timersub(&et, &st, &rt); - f_rt = ((float) (rt.tv_usec)) / 1000000.0; - f_rt += (float) (rt.tv_sec); - printf("Runtime: %.2f seconds, ", f_rt); - printf("Op rate: %.2f ops/sec, ", ((float) (nrun)) / f_rt); - printf("Avg transfer rate: %.2f bytes/sec\n", ((float) (nrun)) * ((float)io_size) / f_rt); + gettimeofday(&et, NULL); + timersub(&et, &st, &rt); + f_rt = ((float) (rt.tv_usec)) / 1000000.0; + f_rt += (float) (rt.tv_sec); + printf("Runtime: %.2f seconds, ", f_rt); + printf("Op rate: %.2f ops/sec, ", ((float) (nrun)) / f_rt); + printf("Avg transfer rate: %.2f bytes/sec\n", ((float) (nrun)) * ((float)io_size) / f_rt); From owner-svn-src-all@FreeBSD.ORG Wed May 13 10:29:46 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6BFC770D; Wed, 13 May 2015 10:29:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 59B43106A; Wed, 13 May 2015 10:29:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4DATkSl091792; Wed, 13 May 2015 10:29:46 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4DATkCv091791; Wed, 13 May 2015 10:29:46 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201505131029.t4DATkCv091791@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 13 May 2015 10:29: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: r282844 - stable/10/usr.sbin/bhyve 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.20 Precedence: list List-Id: "SVN commit messages 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, 13 May 2015 10:29:46 -0000 Author: mav Date: Wed May 13 10:29:45 2015 New Revision: 282844 URL: https://svnweb.freebsd.org/changeset/base/282844 Log: MFC r282344: Handle ATA_SEND_FPDMA_QUEUED as NCQ in ahci_port_stop(). Modified: stable/10/usr.sbin/bhyve/pci_ahci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bhyve/pci_ahci.c ============================================================================== --- stable/10/usr.sbin/bhyve/pci_ahci.c Wed May 13 10:29:02 2015 (r282843) +++ stable/10/usr.sbin/bhyve/pci_ahci.c Wed May 13 10:29:45 2015 (r282844) @@ -418,7 +418,8 @@ ahci_port_stop(struct ahci_port *p) slot = aior->slot; cfis = aior->cfis; if (cfis[2] == ATA_WRITE_FPDMA_QUEUED || - cfis[2] == ATA_READ_FPDMA_QUEUED) + cfis[2] == ATA_READ_FPDMA_QUEUED || + cfis[2] == ATA_SEND_FPDMA_QUEUED) ncq = 1; if (ncq) From owner-svn-src-all@FreeBSD.ORG Wed May 13 10:30:54 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 35485863; Wed, 13 May 2015 10:30:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 22EF3108C; Wed, 13 May 2015 10:30:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4DAUsn7093259; Wed, 13 May 2015 10:30:54 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4DAUsmW093258; Wed, 13 May 2015 10:30:54 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201505131030.t4DAUsmW093258@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 13 May 2015 10:30:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r282845 - stable/10/usr.sbin/bhyve 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.20 Precedence: list List-Id: "SVN commit messages 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, 13 May 2015 10:30:54 -0000 Author: mav Date: Wed May 13 10:30:53 2015 New Revision: 282845 URL: https://svnweb.freebsd.org/changeset/base/282845 Log: MFC r282345: Initialize PxCMD on reset and make its read-only bits such. Modified: stable/10/usr.sbin/bhyve/pci_ahci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bhyve/pci_ahci.c ============================================================================== --- stable/10/usr.sbin/bhyve/pci_ahci.c Wed May 13 10:29:45 2015 (r282844) +++ stable/10/usr.sbin/bhyve/pci_ahci.c Wed May 13 10:30:53 2015 (r282845) @@ -490,6 +490,9 @@ ahci_reset(struct pci_ahci_softc *sc) for (i = 0; i < sc->ports; i++) { sc->port[i].ie = 0; sc->port[i].is = 0; + sc->port[i].cmd = (AHCI_P_CMD_SUD | AHCI_P_CMD_POD); + if (sc->port[i].bctx) + sc->port[i].cmd |= AHCI_P_CMD_CPS; sc->port[i].sctl = 0; ahci_port_reset(&sc->port[i]); } @@ -1941,8 +1944,15 @@ pci_ahci_port_write(struct pci_ahci_soft break; case AHCI_P_CMD: { - p->cmd = value; - + p->cmd &= ~(AHCI_P_CMD_ST | AHCI_P_CMD_SUD | AHCI_P_CMD_POD | + AHCI_P_CMD_CLO | AHCI_P_CMD_FRE | AHCI_P_CMD_APSTE | + AHCI_P_CMD_ATAPI | AHCI_P_CMD_DLAE | AHCI_P_CMD_ALPE | + AHCI_P_CMD_ASP | AHCI_P_CMD_ICC_MASK); + p->cmd |= (AHCI_P_CMD_ST | AHCI_P_CMD_SUD | AHCI_P_CMD_POD | + AHCI_P_CMD_CLO | AHCI_P_CMD_FRE | AHCI_P_CMD_APSTE | + AHCI_P_CMD_ATAPI | AHCI_P_CMD_DLAE | AHCI_P_CMD_ALPE | + AHCI_P_CMD_ASP | AHCI_P_CMD_ICC_MASK) & value; + if (!(value & AHCI_P_CMD_ST)) { ahci_port_stop(p); } else { @@ -1970,6 +1980,10 @@ pci_ahci_port_write(struct pci_ahci_soft p->cmd &= ~AHCI_P_CMD_CLO; } + if (value & AHCI_P_CMD_ICC_MASK) { + p->cmd &= ~AHCI_P_CMD_ICC_MASK; + } + ahci_handle_port(p); break; } From owner-svn-src-all@FreeBSD.ORG Wed May 13 10:35:34 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E1D2CA7B; Wed, 13 May 2015 10:35:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CF28D11C9; Wed, 13 May 2015 10:35:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4DAZYed096396; Wed, 13 May 2015 10:35:34 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4DAZYlI096395; Wed, 13 May 2015 10:35:34 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201505131035.t4DAZYlI096395@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 13 May 2015 10:35: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: r282846 - stable/10/usr.sbin/bhyve 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.20 Precedence: list List-Id: "SVN commit messages 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, 13 May 2015 10:35:35 -0000 Author: mav Date: Wed May 13 10:35:34 2015 New Revision: 282846 URL: https://svnweb.freebsd.org/changeset/base/282846 Log: MFC r282364, r282429, r282524: Implement BSY reporting and in-order execution of non-NCQ commands. Block command queue on BSY or DRQ bits set or device error reported. This can be a performance penalization for non-NCQ commands, but it is required for proper error recovery and standard compliance. Modified: stable/10/usr.sbin/bhyve/pci_ahci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bhyve/pci_ahci.c ============================================================================== --- stable/10/usr.sbin/bhyve/pci_ahci.c Wed May 13 10:30:53 2015 (r282845) +++ stable/10/usr.sbin/bhyve/pci_ahci.c Wed May 13 10:35:34 2015 (r282846) @@ -135,11 +135,13 @@ struct ahci_port { char ident[20 + 1]; int atapi; int reset; + int waitforclear; int mult_sectors; uint8_t xfermode; uint8_t err_cfis[20]; uint8_t sense_key; uint8_t asc; + u_int ccs; uint32_t pending; uint32_t clb; @@ -204,6 +206,8 @@ struct pci_ahci_softc { }; #define ahci_ctx(sc) ((sc)->asc_pi->pi_vmctx) +static void ahci_handle_port(struct ahci_port *p); + static inline void lba_to_msf(uint8_t *buf, int lba) { lba += 150; @@ -269,22 +273,26 @@ ahci_write_fis(struct ahci_port *p, enum case FIS_TYPE_REGD2H: offset = 0x40; len = 20; - irq = AHCI_P_IX_DHR; + irq = (fis[1] & (1 << 6)) ? AHCI_P_IX_DHR : 0; break; case FIS_TYPE_SETDEVBITS: offset = 0x58; len = 8; - irq = AHCI_P_IX_SDB; + irq = (fis[1] & (1 << 6)) ? AHCI_P_IX_SDB : 0; break; case FIS_TYPE_PIOSETUP: offset = 0x20; len = 20; - irq = 0; + irq = (fis[1] & (1 << 6)) ? AHCI_P_IX_PS : 0; break; default: WPRINTF("unsupported fis type %d\n", ft); return; } + if (fis[2] & ATA_S_ERROR) { + p->waitforclear = 1; + irq |= AHCI_P_IX_TFE; + } memcpy(p->rfis + offset, fis, len); if (irq) { p->is |= irq; @@ -309,22 +317,23 @@ ahci_write_fis_sdb(struct ahci_port *p, uint8_t error; error = (tfd >> 8) & 0xff; + tfd &= 0x77; memset(fis, 0, sizeof(fis)); fis[0] = FIS_TYPE_SETDEVBITS; fis[1] = (1 << 6); - fis[2] = tfd & 0x77; + fis[2] = tfd; fis[3] = error; if (fis[2] & ATA_S_ERROR) { - p->is |= AHCI_P_IX_TFE; p->err_cfis[0] = slot; - p->err_cfis[2] = tfd & 0x77; + p->err_cfis[2] = tfd; p->err_cfis[3] = error; memcpy(&p->err_cfis[4], cfis + 4, 16); } else { *(uint32_t *)(fis + 4) = (1 << slot); p->sact &= ~(1 << slot); } - p->tfd = tfd; + p->tfd &= ~0x77; + p->tfd |= tfd; ahci_write_fis(p, FIS_TYPE_SETDEVBITS, fis); } @@ -351,7 +360,6 @@ ahci_write_fis_d2h(struct ahci_port *p, fis[12] = cfis[12]; fis[13] = cfis[13]; if (fis[2] & ATA_S_ERROR) { - p->is |= AHCI_P_IX_TFE; p->err_cfis[0] = 0x80; p->err_cfis[2] = tfd & 0xff; p->err_cfis[3] = error; @@ -363,6 +371,21 @@ ahci_write_fis_d2h(struct ahci_port *p, } static void +ahci_write_fis_d2h_ncq(struct ahci_port *p, int slot) +{ + uint8_t fis[20]; + + p->tfd = ATA_S_READY | ATA_S_DSC; + memset(fis, 0, sizeof(fis)); + fis[0] = FIS_TYPE_REGD2H; + fis[1] = 0; /* No interrupt */ + fis[2] = p->tfd; /* Status */ + fis[3] = 0; /* No error */ + p->ci &= ~(1 << slot); + ahci_write_fis(p, FIS_TYPE_REGD2H, fis); +} + +static void ahci_write_reset_fis_d2h(struct ahci_port *p) { uint8_t fis[20]; @@ -389,9 +412,11 @@ ahci_check_stopped(struct ahci_port *p) */ if (!(p->cmd & AHCI_P_CMD_ST)) { if (p->pending == 0) { + p->ccs = 0; p->cmd &= ~(AHCI_P_CMD_CR | AHCI_P_CMD_CCS_MASK); p->ci = 0; p->sact = 0; + p->waitforclear = 0; } } } @@ -589,12 +614,13 @@ ahci_handle_rw(struct ahci_port *p, int struct ahci_cmd_hdr *hdr; uint64_t lba; uint32_t len; - int err, ncq, readop; + int err, first, ncq, readop; prdt = (struct ahci_prdt_entry *)(cfis + 0x80); hdr = (struct ahci_cmd_hdr *)(p->cmd_lst + slot * AHCI_CL_SIZE); ncq = 0; readop = 1; + first = (done == 0); if (cfis[2] == ATA_WRITE || cfis[2] == ATA_WRITE48 || cfis[2] == ATA_WRITE_MUL || cfis[2] == ATA_WRITE_MUL48 || @@ -655,14 +681,14 @@ ahci_handle_rw(struct ahci_port *p, int /* Stuff request onto busy list. */ TAILQ_INSERT_HEAD(&p->iobhd, aior, io_blist); + if (ncq && first) + ahci_write_fis_d2h_ncq(p, slot); + if (readop) err = blockif_read(p->bctx, breq); else err = blockif_write(p->bctx, breq); assert(err == 0); - - if (ncq) - p->ci &= ~(1 << slot); } static void @@ -735,15 +761,18 @@ ahci_handle_dsm_trim(struct ahci_port *p uint8_t *entry; uint64_t elba; uint32_t len, elen; - int err; + int err, first, ncq; uint8_t buf[512]; + first = (done == 0); if (cfis[2] == ATA_DATA_SET_MANAGEMENT) { len = (uint16_t)cfis[13] << 8 | cfis[12]; len *= 512; + ncq = 0; } else { /* ATA_SEND_FPDMA_QUEUED */ len = (uint16_t)cfis[11] << 8 | cfis[3]; len *= 512; + ncq = 1; } read_prdt(p, slot, cfis, buf, sizeof(buf)); @@ -762,6 +791,8 @@ next: ahci_write_fis_d2h(p, slot, cfis, ATA_S_READY | ATA_S_DSC); p->pending &= ~(1 << slot); ahci_check_stopped(p); + if (!first) + ahci_handle_port(p); return; } goto next; @@ -793,6 +824,9 @@ next: */ TAILQ_INSERT_HEAD(&p->iobhd, aior, io_blist); + if (ncq && first) + ahci_write_fis_d2h_ncq(p, slot); + err = blockif_delete(p->bctx, breq); assert(err == 0); } @@ -1548,6 +1582,7 @@ static void ahci_handle_cmd(struct ahci_port *p, int slot, uint8_t *cfis) { + p->tfd |= ATA_S_BUSY; switch (cfis[2]) { case ATA_ATA_IDENTIFY: handle_identify(p, slot, cfis); @@ -1729,20 +1764,23 @@ ahci_handle_slot(struct ahci_port *p, in static void ahci_handle_port(struct ahci_port *p) { - int i; if (!(p->cmd & AHCI_P_CMD_ST)) return; /* * Search for any new commands to issue ignoring those that - * are already in-flight. + * are already in-flight. Stop if device is busy or in error. */ - for (i = 0; (i < 32) && p->ci; i++) { - if ((p->ci & (1 << i)) && !(p->pending & (1 << i))) { + for (; (p->ci & ~p->pending) != 0; p->ccs = ((p->ccs + 1) & 31)) { + if ((p->tfd & (ATA_S_BUSY | ATA_S_DRQ)) != 0) + break; + if (p->waitforclear) + break; + if ((p->ci & ~p->pending & (1 << p->ccs)) != 0) { p->cmd &= ~AHCI_P_CMD_CCS_MASK; - p->cmd |= i << AHCI_P_CMD_CCS_SHIFT; - ahci_handle_slot(p, i); + p->cmd |= p->ccs << AHCI_P_CMD_CCS_SHIFT; + ahci_handle_slot(p, p->ccs); } } } @@ -1819,6 +1857,7 @@ ata_ioreq_cb(struct blockif_req *br, int p->pending &= ~(1 << slot); ahci_check_stopped(p); + ahci_handle_port(p); out: pthread_mutex_unlock(&sc->mtx); DPRINTF("%s exit\n", __func__); @@ -1880,6 +1919,7 @@ atapi_ioreq_cb(struct blockif_req *br, i p->pending &= ~(1 << slot); ahci_check_stopped(p); + ahci_handle_port(p); out: pthread_mutex_unlock(&sc->mtx); DPRINTF("%s exit\n", __func__); @@ -1976,7 +2016,7 @@ pci_ahci_port_write(struct pci_ahci_soft } if (value & AHCI_P_CMD_CLO) { - p->tfd = 0; + p->tfd &= ~(ATA_S_BUSY | ATA_S_DRQ); p->cmd &= ~AHCI_P_CMD_CLO; } From owner-svn-src-all@FreeBSD.ORG Wed May 13 10:43:51 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E884DE40; Wed, 13 May 2015 10:43:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D598B12E7; Wed, 13 May 2015 10:43:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4DAhoQY001448; Wed, 13 May 2015 10:43:50 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4DAhoqA001446; Wed, 13 May 2015 10:43:50 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201505131043.t4DAhoqA001446@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 13 May 2015 10:43:50 +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: r282847 - in stable/9/sys: dev/ixgbe sys 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.20 Precedence: list List-Id: "SVN commit messages 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, 13 May 2015 10:43:51 -0000 Author: ngie Date: Wed May 13 10:43:49 2015 New Revision: 282847 URL: https://svnweb.freebsd.org/changeset/base/282847 Log: MFstable/10 r281951,r281954: r281951: Backport MHSIZE/MPKTHSIZE equivalents from head These macros are equivalent to the ones on head, except they are only exposed when _KERNEL is defined, i.e. to kernel code, whereas the code on head is exposed to userland as well This is for improved forwards compatibility with mbuf(9) macros in head@r277203+, and is required for a clean MFC of r279393 This is a direct commit to stable/10 Differential Revision: https://reviews.freebsd.org/D2126 Reviewed by: glebius, rwatson Sponsored by: EMC / Isilon Storage Division r281954: MFC r279393: Pad RX copy alignment calculation to avoid illegal memory accesses The optimization made in r239940 is valid for struct mbuf's current structure and size in FreeBSD, but hardcodes assumptions about sizes of struct mbuf, which are unfortunately broken if additional data is added to the beginning of struct mbuf X-MFC note (discussed with rwatson): This change requires the MPKTHSIZE definition, which is only available after head@r277203 and will not be MFCed as it breaks mbuf(9) KPI. A direct commit to stable/10 and merges to other branches to add the necessary definitions to work with the code as-is will be done to facilitate this MFC PR: 194314 Approved/Reviewed by: erj, jfv Sponsored by: EMC / Isilon Storage Division Modified: stable/9/sys/dev/ixgbe/ixgbe.h stable/9/sys/sys/mbuf.h Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/ixgbe/ (props changed) stable/9/sys/sys/ (props changed) Modified: stable/9/sys/dev/ixgbe/ixgbe.h ============================================================================== --- stable/9/sys/dev/ixgbe/ixgbe.h Wed May 13 10:35:34 2015 (r282846) +++ stable/9/sys/dev/ixgbe/ixgbe.h Wed May 13 10:43:49 2015 (r282847) @@ -160,8 +160,9 @@ * modern Intel CPUs, results in 40 bytes wasted and a significant drop * in observed efficiency of the optimization, 97.9% -> 81.8%. */ -#define IXGBE_RX_COPY_LEN 160 -#define IXGBE_RX_COPY_ALIGN (MHLEN - IXGBE_RX_COPY_LEN) +#define IXGBE_RX_COPY_HDR_PADDED ((((MPKTHSIZE - 1) / 32) + 1) * 32) +#define IXGBE_RX_COPY_LEN (MSIZE - IXGBE_RX_COPY_HDR_PADDED) +#define IXGBE_RX_COPY_ALIGN (IXGBE_RX_COPY_HDR_PADDED - MPKTHSIZE) /* Keep older OS drivers building... */ #if !defined(SYSCTL_ADD_UQUAD) Modified: stable/9/sys/sys/mbuf.h ============================================================================== --- stable/9/sys/sys/mbuf.h Wed May 13 10:35:34 2015 (r282846) +++ stable/9/sys/sys/mbuf.h Wed May 13 10:43:49 2015 (r282847) @@ -174,6 +174,16 @@ struct mbuf { #define m_pktdat M_dat.MH.MH_dat.MH_databuf #define m_dat M_dat.M_databuf +/* + * NOTE: forwards compatibility definitions for mbuf(9) + * + * These aren't 1:1 with the macros in r277203; in particular they're exposed + * to both userland and kernel, whereas this is exposed to just _KERNEL -- to + * avoid disruption with existing KBI/KPIs + */ +#define MHSIZE offsetof(struct mbuf, m_dat) +#define MPKTHSIZE offsetof(struct mbuf, m_pktdat) + /* * mbuf flags. */ From owner-svn-src-all@FreeBSD.ORG Wed May 13 10:53:17 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4645D16E; Wed, 13 May 2015 10:53:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 346FA1465; Wed, 13 May 2015 10:53:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4DArHCf006325; Wed, 13 May 2015 10:53:17 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4DArH4Y006324; Wed, 13 May 2015 10:53:17 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201505131053.t4DArH4Y006324@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 13 May 2015 10:53: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: r282848 - stable/10 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 13 May 2015 10:53:17 -0000 Author: ngie Date: Wed May 13 10:53:16 2015 New Revision: 282848 URL: https://svnweb.freebsd.org/changeset/base/282848 Log: MFC r281618,r281823: r281618: Defeat race with MK_KERBEROS == yes introduced with bootstrap-tools parallelization work done in r279197 - kerberos5/lib/libroken requires kerberos5/tools/make-roken to build - kerberos5/tools/asn1_compile, kerberos5/tools/slc, and usr.bin/compile_et require kerberos5/lib/libroken and kerberos5/lib/libvers This race is incredibly evident when cross-building sparc64 on ref10-amd64.freebsd.org Pointyhat to: ngie r281823: Serialize all of _kerberos5_bootstrap_tools to avoid build failures involving make bootstrap-tools On the plus side, this also greatly reduces complexity Pointyhat to: ngie Reported by: Willem Jan Withagen Modified: stable/10/Makefile.inc1 Directory Properties: stable/10/ (props changed) Modified: stable/10/Makefile.inc1 ============================================================================== --- stable/10/Makefile.inc1 Wed May 13 10:43:49 2015 (r282847) +++ stable/10/Makefile.inc1 Wed May 13 10:53:16 2015 (r282848) @@ -1328,8 +1328,7 @@ _kerberos5_bootstrap_tools= \ kerberos5/tools/slc \ usr.bin/compile_et -${_bt}-kerberos5/tools/slc: ${_bt}-kerberos5/lib/libroken -${_bt}-kerberos5/tools/asn1_compile: ${_bt}-kerberos5/lib/libroken +.ORDER: ${_kerberos5_bootstrap_tools:C/^/${_bt}-/g} .endif .if ${_BOOTSTRAP_MAKEINFO} != "no" From owner-svn-src-all@FreeBSD.ORG Wed May 13 10:56:36 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7ED33316; Wed, 13 May 2015 10:56:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6C17B14A6; Wed, 13 May 2015 10:56:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4DAuaPt006895; Wed, 13 May 2015 10:56:36 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4DAuaS4006894; Wed, 13 May 2015 10:56:36 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201505131056.t4DAuaS4006894@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 13 May 2015 10:56:36 +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: r282849 - stable/10/contrib/netbsd-tests/lib/libpthread 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.20 Precedence: list List-Id: "SVN commit messages 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, 13 May 2015 10:56:36 -0000 Author: ngie Date: Wed May 13 10:56:35 2015 New Revision: 282849 URL: https://svnweb.freebsd.org/changeset/base/282849 Log: MFC r281966: Add #include sys/types.h for register_t for mips Modified: stable/10/contrib/netbsd-tests/lib/libpthread/t_swapcontext.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/netbsd-tests/lib/libpthread/t_swapcontext.c ============================================================================== --- stable/10/contrib/netbsd-tests/lib/libpthread/t_swapcontext.c Wed May 13 10:53:16 2015 (r282848) +++ stable/10/contrib/netbsd-tests/lib/libpthread/t_swapcontext.c Wed May 13 10:56:35 2015 (r282849) @@ -28,6 +28,9 @@ #include __RCSID("$NetBSD"); +#ifdef __FreeBSD__ +#include +#endif #include #include #include From owner-svn-src-all@FreeBSD.ORG Wed May 13 11:01:50 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 01E5959C; Wed, 13 May 2015 11:01:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C9BD015D6; Wed, 13 May 2015 11:01:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4DB1nLT008901; Wed, 13 May 2015 11:01:49 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4DB1ndf008898; Wed, 13 May 2015 11:01:49 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201505131101.t4DB1ndf008898@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 13 May 2015 11:01:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r282850 - stable/10/tests/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.20 Precedence: list List-Id: "SVN commit messages 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, 13 May 2015 11:01:50 -0000 Author: ngie Date: Wed May 13 11:01:48 2015 New Revision: 282850 URL: https://svnweb.freebsd.org/changeset/base/282850 Log: MFC r262526,r262730: r262526 (by pho): Added a regression test for r234131. Discussed with: asomers Sponsored by: EMC / Isilon storage division r262730 (by pho): Changed name of test case to a more descriptive one and moved comment to the "descr" property. Suggested by: jmmv Sponsored by: EMC / Isilon storage division Added: stable/10/tests/sys/kern/kern_descrip_test.c - copied, changed from r262526, head/tests/sys/kern/kern_descrip_test.c Modified: stable/10/tests/sys/kern/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/tests/sys/kern/Makefile ============================================================================== --- stable/10/tests/sys/kern/Makefile Wed May 13 10:56:35 2015 (r282849) +++ stable/10/tests/sys/kern/Makefile Wed May 13 11:01:48 2015 (r282850) @@ -2,7 +2,8 @@ TESTSDIR= ${TESTSBASE}/sys/kern -ATF_TESTS_C= unix_seqpacket_test +ATF_TESTS_C+= kern_descrip_test +ATF_TESTS_C+= unix_seqpacket_test TEST_METADATA.unix_seqpacket_test+= timeout="15" LDADD.unix_seqpacket_test+= -lpthread Copied and modified: stable/10/tests/sys/kern/kern_descrip_test.c (from r262526, head/tests/sys/kern/kern_descrip_test.c) ============================================================================== --- head/tests/sys/kern/kern_descrip_test.c Wed Feb 26 09:08:25 2014 (r262526, copy source) +++ stable/10/tests/sys/kern/kern_descrip_test.c Wed May 13 11:01:48 2015 (r282850) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 EMC Corp. + * Copyright (c) 2014 EMC Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -52,14 +52,12 @@ ATF_TC_BODY(dup2_simple, tc) ATF_REQUIRE(bcmp(&sb1, &sb2, sizeof(sb1)) == 0); } -/* - Regression test for r234131: - Return EBADF instead of EMFILE from dup2 when the second argument is - outside the range of valid file descriptors - */ - -ATF_TC_WITHOUT_HEAD(dup2_r234131); -ATF_TC_BODY(dup2_r234131, tc) +ATF_TC(dup2__ebadf_when_2nd_arg_out_of_range); +ATF_TC_HEAD(dup2__ebadf_when_2nd_arg_out_of_range, tc) +{ + atf_tc_set_md_var(tc, "descr", "Regression test for r234131"); +} +ATF_TC_BODY(dup2__ebadf_when_2nd_arg_out_of_range, tc) { int fd1, fd2, ret; @@ -74,7 +72,7 @@ ATF_TP_ADD_TCS(tp) { ATF_TP_ADD_TC(tp, dup2_simple); - ATF_TP_ADD_TC(tp, dup2_r234131); + ATF_TP_ADD_TC(tp, dup2__ebadf_when_2nd_arg_out_of_range); return atf_no_error(); } From owner-svn-src-all@FreeBSD.ORG Wed May 13 11:06:13 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7539A733; Wed, 13 May 2015 11:06:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 55AC9160B; Wed, 13 May 2015 11:06:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4DB6D8F011966; Wed, 13 May 2015 11:06:13 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4DB6Dkb011965; Wed, 13 May 2015 11:06:13 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201505131106.t4DB6Dkb011965@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 13 May 2015 11:06: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: r282851 - stable/10/tools/regression/mmap 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.20 Precedence: list List-Id: "SVN commit messages 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, 13 May 2015 11:06:13 -0000 Author: ngie Date: Wed May 13 11:06:12 2015 New Revision: 282851 URL: https://svnweb.freebsd.org/changeset/base/282851 Log: MFC r282075: Convert this testcase over to a TAP format testcase Modified: stable/10/tools/regression/mmap/mmap.c Directory Properties: stable/10/ (props changed) Modified: stable/10/tools/regression/mmap/mmap.c ============================================================================== --- stable/10/tools/regression/mmap/mmap.c Wed May 13 11:01:48 2015 (r282850) +++ stable/10/tools/regression/mmap/mmap.c Wed May 13 11:06:12 2015 (r282851) @@ -31,10 +31,11 @@ #include #include +#include #include -#include +#include -const struct tests { +static const struct { void *addr; int ok[2]; /* Depending on security.bsd.map_at_zero {0, !=0}. */ } tests[] = { @@ -49,6 +50,8 @@ const struct tests { { (void *)(0x1000 * PAGE_SIZE), { 1, 1 } }, }; +#define MAP_AT_ZERO "security.bsd.map_at_zero" + int main(void) { @@ -60,37 +63,43 @@ main(void) /* Get the current sysctl value of security.bsd.map_at_zero. */ len = sizeof(mib) / sizeof(*mib); - if (sysctlnametomib("security.bsd.map_at_zero", mib, &len) == -1) - err(1, "sysctlnametomib(security.bsd.map_at_zero)"); + if (sysctlnametomib(MAP_AT_ZERO, mib, &len) == -1) { + printf("1..0 # SKIP: sysctlnametomib(\"%s\") failed: %s\n", + MAP_AT_ZERO, strerror(errno)); + return (0); + } len = sizeof(map_at_zero); - if (sysctl(mib, 3, &map_at_zero, &len, NULL, 0) == -1) - err(1, "sysctl(security.bsd.map_at_zero)"); + if (sysctl(mib, 3, &map_at_zero, &len, NULL, 0) == -1) { + printf("1..0 # SKIP: sysctl for %s failed: %s\n", MAP_AT_ZERO, + strerror(errno)); + return (0); + } /* Normalize to 0 or 1 for array access. */ map_at_zero = !!map_at_zero; - for (i=0; i < (sizeof(tests) / sizeof(*tests)); i++) { + printf("1..%zu\n", nitems(tests)); + for (i = 0; i < (int)nitems(tests); i++) { p = mmap((void *)tests[i].addr, PAGE_SIZE, PROT_READ | PROT_WRITE | PROT_EXEC, MAP_ANON | MAP_FIXED, -1, 0); if (p == MAP_FAILED) { if (tests[i].ok[map_at_zero] != 0) error++; - warnx("%s: mmap(%p, ...) failed.", - (tests[i].ok[map_at_zero] == 0) ? "OK " : "ERR", - tests[i].addr); + printf("%sok %d # mmap(%p, ...) failed\n", + tests[i].ok[map_at_zero] == 0 ? "" : "not ", + i + 1, + tests[i].addr); } else { if (tests[i].ok[map_at_zero] != 1) error++; - warnx("%s: mmap(%p, ...) succeeded: p=%p", - (tests[i].ok[map_at_zero] == 1) ? "OK " : "ERR", + printf("%sok %d # mmap(%p, ...) succeeded: p=%p\n", + tests[i].ok[map_at_zero] == 1 ? "" : "not ", + i + 1, tests[i].addr, p); } } - if (error) - err(1, "---\nERROR: %d unexpected results.", error); - return (error != 0); } From owner-svn-src-all@FreeBSD.ORG Wed May 13 11:07:41 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A4338914; Wed, 13 May 2015 11:07:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 85184162A; Wed, 13 May 2015 11:07:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4DB7fBl012224; Wed, 13 May 2015 11:07:41 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4DB7f1w012222; Wed, 13 May 2015 11:07:41 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201505131107.t4DB7f1w012222@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 13 May 2015 11:07:41 +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: r282852 - stable/9/tools/regression/mmap 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.20 Precedence: list List-Id: "SVN commit messages 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, 13 May 2015 11:07:41 -0000 Author: ngie Date: Wed May 13 11:07:40 2015 New Revision: 282852 URL: https://svnweb.freebsd.org/changeset/base/282852 Log: MFstable/10 r282851: MFC r282075: Convert this testcase over to a TAP format testcase Modified: stable/9/tools/regression/mmap/mmap.c Directory Properties: stable/9/ (props changed) stable/9/tools/ (props changed) stable/9/tools/regression/ (props changed) Modified: stable/9/tools/regression/mmap/mmap.c ============================================================================== --- stable/9/tools/regression/mmap/mmap.c Wed May 13 11:06:12 2015 (r282851) +++ stable/9/tools/regression/mmap/mmap.c Wed May 13 11:07:40 2015 (r282852) @@ -31,10 +31,11 @@ #include #include +#include #include -#include +#include -const struct tests { +static const struct { void *addr; int ok[2]; /* Depending on security.bsd.map_at_zero {0, !=0}. */ } tests[] = { @@ -49,6 +50,8 @@ const struct tests { { (void *)(0x1000 * PAGE_SIZE), { 1, 1 } }, }; +#define MAP_AT_ZERO "security.bsd.map_at_zero" + int main(void) { @@ -60,37 +63,43 @@ main(void) /* Get the current sysctl value of security.bsd.map_at_zero. */ len = sizeof(mib) / sizeof(*mib); - if (sysctlnametomib("security.bsd.map_at_zero", mib, &len) == -1) - err(1, "sysctlnametomib(security.bsd.map_at_zero)"); + if (sysctlnametomib(MAP_AT_ZERO, mib, &len) == -1) { + printf("1..0 # SKIP: sysctlnametomib(\"%s\") failed: %s\n", + MAP_AT_ZERO, strerror(errno)); + return (0); + } len = sizeof(map_at_zero); - if (sysctl(mib, 3, &map_at_zero, &len, NULL, 0) == -1) - err(1, "sysctl(security.bsd.map_at_zero)"); + if (sysctl(mib, 3, &map_at_zero, &len, NULL, 0) == -1) { + printf("1..0 # SKIP: sysctl for %s failed: %s\n", MAP_AT_ZERO, + strerror(errno)); + return (0); + } /* Normalize to 0 or 1 for array access. */ map_at_zero = !!map_at_zero; - for (i=0; i < (sizeof(tests) / sizeof(*tests)); i++) { + printf("1..%zu\n", nitems(tests)); + for (i = 0; i < (int)nitems(tests); i++) { p = mmap((void *)tests[i].addr, PAGE_SIZE, PROT_READ | PROT_WRITE | PROT_EXEC, MAP_ANON | MAP_FIXED, -1, 0); if (p == MAP_FAILED) { if (tests[i].ok[map_at_zero] != 0) error++; - warnx("%s: mmap(%p, ...) failed.", - (tests[i].ok[map_at_zero] == 0) ? "OK " : "ERR", - tests[i].addr); + printf("%sok %d # mmap(%p, ...) failed\n", + tests[i].ok[map_at_zero] == 0 ? "" : "not ", + i + 1, + tests[i].addr); } else { if (tests[i].ok[map_at_zero] != 1) error++; - warnx("%s: mmap(%p, ...) succeeded: p=%p", - (tests[i].ok[map_at_zero] == 1) ? "OK " : "ERR", + printf("%sok %d # mmap(%p, ...) succeeded: p=%p\n", + tests[i].ok[map_at_zero] == 1 ? "" : "not ", + i + 1, tests[i].addr, p); } } - if (error) - err(1, "---\nERROR: %d unexpected results.", error); - return (error != 0); } From owner-svn-src-all@FreeBSD.ORG Wed May 13 11:12:07 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C5454B47; Wed, 13 May 2015 11:12:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B1A181701; Wed, 13 May 2015 11:12:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4DBC7Zd016492; Wed, 13 May 2015 11:12:07 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4DBC7mH016490; Wed, 13 May 2015 11:12:07 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201505131112.t4DBC7mH016490@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 13 May 2015 11:12:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r282853 - in stable/10: etc/mtree tests/sys tests/sys/vm tools/regression/mmap 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.20 Precedence: list List-Id: "SVN commit messages 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, 13 May 2015 11:12:07 -0000 Author: ngie Date: Wed May 13 11:12:06 2015 New Revision: 282853 URL: https://svnweb.freebsd.org/changeset/base/282853 Log: MFC r282076,r282104: r282076: Integrate tools/regression/mmap into the FreeBSD test suite as tests/sys/kern/mmap_test r282104: Move tests/sys/kern/mmap_test to tests/sys/vm/mmap_test As jhb noted, the actual mmap(2) implementation is under sys/vm, not sys/kern/, so the correct logical place is tests/sys/vm/, not tests/sys/kern/ Added: stable/10/tests/sys/vm/ - copied from r282104, head/tests/sys/vm/ Deleted: stable/10/tools/regression/mmap/ Modified: stable/10/etc/mtree/BSD.tests.dist stable/10/tests/sys/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/mtree/BSD.tests.dist ============================================================================== --- stable/10/etc/mtree/BSD.tests.dist Wed May 13 11:07:40 2015 (r282852) +++ stable/10/etc/mtree/BSD.tests.dist Wed May 13 11:12:06 2015 (r282853) @@ -220,6 +220,8 @@ unlink .. .. + vm + .. .. usr.bin apply Modified: stable/10/tests/sys/Makefile ============================================================================== --- stable/10/tests/sys/Makefile Wed May 13 11:07:40 2015 (r282852) +++ stable/10/tests/sys/Makefile Wed May 13 11:12:06 2015 (r282853) @@ -9,6 +9,7 @@ TESTS_SUBDIRS+= file TESTS_SUBDIRS+= kern TESTS_SUBDIRS+= kqueue TESTS_SUBDIRS+= netinet +TESTS_SUBDIRS+= vm # Items not integrated into kyua runs by default SUBDIR+= pjdfstest From owner-svn-src-all@FreeBSD.ORG Wed May 13 11:32:57 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 838A3104; Wed, 13 May 2015 11:32:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7078919A4; Wed, 13 May 2015 11:32:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4DBWvEf026255; Wed, 13 May 2015 11:32:57 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4DBWuNB026247; Wed, 13 May 2015 11:32:56 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201505131132.t4DBWuNB026247@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 13 May 2015 11:32:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r282854 - in stable/10/lib: libc librt libthr msun msun/tests X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 13 May 2015 11:32:57 -0000 Author: ngie Date: Wed May 13 11:32:55 2015 New Revision: 282854 URL: https://svnweb.freebsd.org/changeset/base/282854 Log: MFC r282057,r282092,r282106: r282057: Build/install libc, librt, libthr, and msun NetBSD test suites on all architectures r282092 (by andrew): Correct the spelling of MACHINE_CPUARCH, MACHINE_CPU is not set on arm64. r282106: Remove per-architecture checks for enabling HAVE_FENV_H The conditional came from NetBSD, where only select architectures have this header/support All architectures on FreeBSD have the necessary support though, so the conditional's completely unnecessary make tinderbox done on all architectures (including arm64, where the issue occurred before) this time Deleted: stable/10/lib/libc/Makefile.amd64 stable/10/lib/libc/Makefile.i386 stable/10/lib/librt/Makefile.amd64 stable/10/lib/librt/Makefile.i386 stable/10/lib/libthr/Makefile.amd64 stable/10/lib/libthr/Makefile.i386 stable/10/lib/msun/Makefile.amd64 stable/10/lib/msun/Makefile.i386 Modified: stable/10/lib/libc/Makefile stable/10/lib/librt/Makefile stable/10/lib/libthr/Makefile stable/10/lib/msun/Makefile stable/10/lib/msun/tests/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/Makefile ============================================================================== --- stable/10/lib/libc/Makefile Wed May 13 11:12:06 2015 (r282853) +++ stable/10/lib/libc/Makefile Wed May 13 11:32:55 2015 (r282854) @@ -160,7 +160,9 @@ libkern.${LIBC_ARCH}:: ${KMSRCS} CFLAGS+=-DSYSCALL_COMPAT .endif -.include +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif .include Modified: stable/10/lib/librt/Makefile ============================================================================== --- stable/10/lib/librt/Makefile Wed May 13 11:12:06 2015 (r282853) +++ stable/10/lib/librt/Makefile Wed May 13 11:32:55 2015 (r282854) @@ -20,6 +20,8 @@ PRECIOUSLIB= VERSION_MAP= ${.CURDIR}/Version.map -.include +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif .include Modified: stable/10/lib/libthr/Makefile ============================================================================== --- stable/10/lib/libthr/Makefile Wed May 13 11:12:06 2015 (r282853) +++ stable/10/lib/libthr/Makefile Wed May 13 11:32:55 2015 (r282854) @@ -63,6 +63,8 @@ SYMLINKS+=lib${LIB}_p.a ${LIBDIR}/libpth CFLAGS+=-DSYSCALL_COMPAT .endif -.include +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif .include Modified: stable/10/lib/msun/Makefile ============================================================================== --- stable/10/lib/msun/Makefile Wed May 13 11:12:06 2015 (r282853) +++ stable/10/lib/msun/Makefile Wed May 13 11:32:55 2015 (r282854) @@ -219,6 +219,8 @@ MLINKS+=trunc.3 truncf.3 trunc.3 truncl. .include -.include +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif .include Modified: stable/10/lib/msun/tests/Makefile ============================================================================== --- stable/10/lib/msun/tests/Makefile Wed May 13 11:12:06 2015 (r282853) +++ stable/10/lib/msun/tests/Makefile Wed May 13 11:32:55 2015 (r282854) @@ -6,11 +6,8 @@ TESTSRC= ${SRCTOP}/contrib/netbsd-tests/ TESTSDIR= ${TESTSBASE}/lib/msun -.if ${MACHINE} == "sparc" || ${MACHINE} == "i386" \ - || ${MACHINE} == "amd64" || ${MACHINE_CPU} == "arm" \ - || ${MACHINE} == "sparc64" +# All architectures on FreeBSD have fenv.h CFLAGS+= -DHAVE_FENV_H -.endif .if ${MACHINE} == "amd64" || ${MACHINE} == "i386" CFLAGS+= -D__HAVE_LONG_DOUBLE From owner-svn-src-all@FreeBSD.ORG Wed May 13 11:49:39 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D7DB3565; Wed, 13 May 2015 11:49:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B96F11B83; Wed, 13 May 2015 11:49:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4DBndCw032012; Wed, 13 May 2015 11:49:39 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4DBncLm032008; Wed, 13 May 2015 11:49:38 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201505131149.t4DBncLm032008@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 13 May 2015 11:49:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r282855 - in stable/10/tools/regression/aio/kqueue: . lio 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.20 Precedence: list List-Id: "SVN commit messages 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, 13 May 2015 11:49:40 -0000 Author: ngie Date: Wed May 13 11:49:38 2015 New Revision: 282855 URL: https://svnweb.freebsd.org/changeset/base/282855 Log: MFC r280894,r280895: r280894: Minor cleanup before converting to ATF testcases - Remove blank (tab-only) lines. - Fix -Wunused warnings. - Bump up to WARNS= 6 r280895: - Fix -Wsign issue - Bump up to WARNS=6 Modified: stable/10/tools/regression/aio/kqueue/Makefile stable/10/tools/regression/aio/kqueue/aio_kqueue.c stable/10/tools/regression/aio/kqueue/lio/Makefile stable/10/tools/regression/aio/kqueue/lio/lio_kqueue.c Directory Properties: stable/10/ (props changed) Modified: stable/10/tools/regression/aio/kqueue/Makefile ============================================================================== --- stable/10/tools/regression/aio/kqueue/Makefile Wed May 13 11:32:55 2015 (r282854) +++ stable/10/tools/regression/aio/kqueue/Makefile Wed May 13 11:49:38 2015 (r282855) @@ -3,4 +3,8 @@ PROG= aio_kqueue MAN= +WARNS?= 6 + +SUBDIR+= lio + .include Modified: stable/10/tools/regression/aio/kqueue/aio_kqueue.c ============================================================================== --- stable/10/tools/regression/aio/kqueue/aio_kqueue.c Wed May 13 11:32:55 2015 (r282854) +++ stable/10/tools/regression/aio/kqueue/aio_kqueue.c Wed May 13 11:49:38 2015 (r282855) @@ -177,7 +177,7 @@ main (int argc, char *argv[]) #endif if (result != sizeof(buffer)) { printf("FAIL: run %d, operation %d, result %d " - " (errno=%d) should be %d\n", run, pending, + " (errno=%d) should be %zu\n", run, pending, result, errno, sizeof(buffer)); failed++; } else Modified: stable/10/tools/regression/aio/kqueue/lio/Makefile ============================================================================== --- stable/10/tools/regression/aio/kqueue/lio/Makefile Wed May 13 11:32:55 2015 (r282854) +++ stable/10/tools/regression/aio/kqueue/lio/Makefile Wed May 13 11:49:38 2015 (r282855) @@ -3,4 +3,6 @@ PROG= lio_kqueue MAN= +WARNS?= 6 + .include Modified: stable/10/tools/regression/aio/kqueue/lio/lio_kqueue.c ============================================================================== --- stable/10/tools/regression/aio/kqueue/lio/lio_kqueue.c Wed May 13 11:32:55 2015 (r282854) +++ stable/10/tools/regression/aio/kqueue/lio/lio_kqueue.c Wed May 13 11:49:38 2015 (r282855) @@ -37,13 +37,15 @@ * http://www.ambrisko.com/doug/listio_kqueue/listio_kqueue.patch */ -#include -#include -#include -#include #include #include #include +#include +#include +#include +#include +#include +#include #include #define PATH_TEMPLATE "/tmp/aio.XXXXXXXXXX" @@ -52,9 +54,10 @@ #define MAX LIO_MAX * 16 #define MAX_RUNS 300 +int main(int argc, char *argv[]){ int fd; - struct aiocb *iocb[MAX], *kq_iocb; + struct aiocb *iocb[MAX]; struct aiocb **lio[LIO_MAX], **lio_element, **kq_lio; int i, result, run, error, j, k; char buffer[32768]; @@ -65,7 +68,7 @@ main(int argc, char *argv[]){ time_t time1, time2; char *file, pathname[sizeof(PATH_TEMPLATE)-1]; int tmp_file = 0, failed = 0; - + if (kq < 0) { perror("No kqeueue\n"); exit(1); @@ -89,7 +92,7 @@ main(int argc, char *argv[]){ #ifdef DEBUG printf("Hello kq %d fd %d\n", kq, fd); #endif - + for (run = 0; run < MAX_RUNS; run++){ #ifdef DEBUG printf("Run %d\n", run); @@ -137,13 +140,13 @@ main(int argc, char *argv[]){ printf("write %d is at %p\n", j, lio[j]); #endif } - + for(i = 0; i < LIO_MAX; i++) { for(j = LIO_MAX - 1; j >=0; j--) { if (lio[j]) break; } - + for(;;) { bzero(&ke, sizeof(ke)); bzero(&kq_returned, sizeof(ke)); @@ -169,18 +172,18 @@ main(int argc, char *argv[]){ kq_returned.udata, lio[j]); #endif - + if(kq_lio) break; #ifdef DEBUG printf("Try again\n"); #endif - } - + } + #ifdef DEBUG printf("lio %p\n", lio); #endif - + for (j = 0; j < LIO_MAX; j++) { if (lio[j] == kq_lio) { break; @@ -201,12 +204,12 @@ main(int argc, char *argv[]){ printf("PASS: run %d, operation %d result %d \n", run, LIO_MAX - i -1, result); } for(k = 0; k < MAX / LIO_MAX; k++){ - result = aio_return(kq_lio[k]); + result = aio_return(kq_lio[k]); #ifdef DEBUG printf("Return Resulto for %d %d is %d\n", j, k, result); #endif if (result != sizeof(buffer)) { - printf("FAIL: run %d, operation %d sub-opt %d result %d (errno=%d) should be %d\n", + printf("FAIL: run %d, operation %d sub-opt %d result %d (errno=%d) should be %zu\n", run, LIO_MAX - i -1, k, result, errno, sizeof(buffer)); } else { printf("PASS: run %d, operation %d sub-opt %d result %d\n", @@ -216,13 +219,13 @@ main(int argc, char *argv[]){ #ifdef DEBUG printf("\n"); #endif - + for(k = 0; k < MAX / LIO_MAX; k++) { free(lio[j][k]); } free(lio[j]); lio[j] = NULL; - } + } } #ifdef DEBUG printf("Done\n"); From owner-svn-src-all@FreeBSD.ORG Wed May 13 11:53:25 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C8B346F7; Wed, 13 May 2015 11:53:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B66E51C5F; Wed, 13 May 2015 11:53:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4DBrPHa036223; Wed, 13 May 2015 11:53:25 GMT (envelope-from luigi@FreeBSD.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4DBrPfM036222; Wed, 13 May 2015 11:53:25 GMT (envelope-from luigi@FreeBSD.org) Message-Id: <201505131153.t4DBrPfM036222@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: luigi set sender to luigi@FreeBSD.org using -f From: Luigi Rizzo Date: Wed, 13 May 2015 11:53:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282856 - head/sys/netpfil/ipfw 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.20 Precedence: list List-Id: "SVN commit messages 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, 13 May 2015 11:53:25 -0000 Author: luigi Date: Wed May 13 11:53:25 2015 New Revision: 282856 URL: https://svnweb.freebsd.org/changeset/base/282856 Log: bugfix (only affecting the "lookup" option in the userspace version of ipfw): the conditional block should not include the 'else' otherwise the code does a 'break;' without completing the check Modified: head/sys/netpfil/ipfw/ip_fw2.c Modified: head/sys/netpfil/ipfw/ip_fw2.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw2.c Wed May 13 11:49:38 2015 (r282855) +++ head/sys/netpfil/ipfw/ip_fw2.c Wed May 13 11:53:25 2015 (r282856) @@ -1532,8 +1532,9 @@ do { \ else if (v == 5 /* O_JAIL */) key = ucred_cache.xid; #endif /* !__FreeBSD__ */ - } else + } #endif /* !USERSPACE */ + else break; } match = ipfw_lookup_table(chain, From owner-svn-src-all@FreeBSD.ORG Wed May 13 12:02:52 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B5A8DC52; Wed, 13 May 2015 12:02:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A367D1DAA; Wed, 13 May 2015 12:02:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4DC2qT6041343; Wed, 13 May 2015 12:02:52 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4DC2qGv041342; Wed, 13 May 2015 12:02:52 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201505131202.t4DC2qGv041342@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Wed, 13 May 2015 12:02:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282857 - head/sbin/devd 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.20 Precedence: list List-Id: "SVN commit messages 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, 13 May 2015 12:02:52 -0000 Author: trasz Date: Wed May 13 12:02:51 2015 New Revision: 282857 URL: https://svnweb.freebsd.org/changeset/base/282857 Log: Document RCTL events in devd.conf(5). MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/sbin/devd/devd.conf.5 Modified: head/sbin/devd/devd.conf.5 ============================================================================== --- head/sbin/devd/devd.conf.5 Wed May 13 11:53:25 2015 (r282856) +++ head/sbin/devd/devd.conf.5 Wed May 13 12:02:51 2015 (r282857) @@ -41,7 +41,7 @@ .\" ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS .\" SOFTWARE. .\" -.Dd January 14, 2015 +.Dd May 13, 2015 .Dt DEVD.CONF 5 .Os .Sh NAME @@ -270,6 +270,8 @@ Interface Class (USB) Interface Protocol (USB) .It Li intsubclass Interface Sub-class (USB) +.It Li jail +Jail name for the process triggering the rule (RCTL) .It Li manufacturer Manufacturer ID (pccard). .It Li mode @@ -280,12 +282,18 @@ Match the value of the variable. .It Li parent Parent device +.It Li pid +PID of the process triggering the rule (RCTL) .It Li port Hub port number (USB) .It Li product Product ID (pccard/USB). .It Li release Hardware revision (USB) +.It Li ruid +Real UID of the process triggering the rule (RCTL) +.It Li rule +Rule (RCTL) .It Li sernum Serial Number (USB). .It Li slot @@ -397,6 +405,20 @@ Physical media has changed. .El .El .Pp +.It Li RCTL +Events related to the +.Xr rctl 8 +framework. +.Bl -tag -width ".Sy Subsystem" -compact +.It Sy Subsystem +.It Li rule +.Bl -tag -width ".Li matched" -compact +.It Sy Type +.It Li matched +A rule with action specified as "devctl" was triggered. +.El +.El +.Pp .It Li USB Events related to the USB subsystem. .Bl -tag -width ".Sy Subsystem" -compact From owner-svn-src-all@FreeBSD.ORG Wed May 13 12:09:05 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9529EFFB; Wed, 13 May 2015 12:09:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 802461E17; Wed, 13 May 2015 12:09:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4DC95ws042248; Wed, 13 May 2015 12:09:05 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4DC92BL042214; Wed, 13 May 2015 12:09:02 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201505131209.t4DC92BL042214@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 13 May 2015 12:09: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: r282858 - in stable/10: etc/mtree tests/freebsd_test_suite tests/sys tests/sys/aio tests/sys/mqueue tools/regression/aio/aiotest tools/regression/aio/kqueue tools/regression/mqueue 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.20 Precedence: list List-Id: "SVN commit messages 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, 13 May 2015 12:09:05 -0000 Author: ngie Date: Wed May 13 12:09:01 2015 New Revision: 282858 URL: https://svnweb.freebsd.org/changeset/base/282858 Log: MFC r281593,r282071,r282074,r282133,r282134,r282135,r282136,r282137,r282138: r282071: Integrate tools/regression/mqueue into the FreeBSD test suite as tests/sys/mqueue r282074: Integrate tools/regression/aio/aiotest and tools/regression/aio/kqueue into the FreeBSD test suite as tests/sys/aio r282133: Fill in the copyright boilerplate for the test program r282134: Add initial (unpolished) macros for interfacing with the FreeBSD test suite This is very rough, but will be replaced/redesigned some time soon after I fix the Jenkins breakage I introduced r282135: Use ATF_REQUIRE_KERNEL_MODULE instead of aio_available function r282136: - Use ATF_REQUIRE_KERNEL_MDOULE to require aio(4) - Don't use /tmp as a basis for temporary files as it's outside of the ATF sandbox - Don't override MAX macro in sys/param.h r282137: Use PLAIN_REQUIRE_KERNEL_MODULE to require "mqueuefs" r282138: Adjust CFLAGS to find freebsd_test_suite/macros.h Added: stable/10/tests/freebsd_test_suite/ - copied from r282134, head/tests/freebsd_test_suite/ stable/10/tests/sys/aio/ - copied from r282074, head/tests/sys/aio/ stable/10/tests/sys/mqueue/ - copied from r282071, head/tests/sys/mqueue/ Deleted: stable/10/tools/regression/aio/aiotest/ stable/10/tools/regression/aio/kqueue/ stable/10/tools/regression/mqueue/ Modified: stable/10/etc/mtree/BSD.tests.dist stable/10/tests/sys/Makefile stable/10/tests/sys/aio/Makefile stable/10/tests/sys/aio/aio_kqueue_test.c stable/10/tests/sys/aio/aio_test.c stable/10/tests/sys/aio/lio_kqueue_test.c stable/10/tests/sys/mqueue/Makefile stable/10/tests/sys/mqueue/mqtest1.c stable/10/tests/sys/mqueue/mqtest2.c stable/10/tests/sys/mqueue/mqtest3.c stable/10/tests/sys/mqueue/mqtest4.c stable/10/tests/sys/mqueue/mqtest5.c stable/10/tests/sys/mqueue/mqueue_test.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/mtree/BSD.tests.dist ============================================================================== --- stable/10/etc/mtree/BSD.tests.dist Wed May 13 12:02:51 2015 (r282857) +++ stable/10/etc/mtree/BSD.tests.dist Wed May 13 12:09:01 2015 (r282858) @@ -178,6 +178,8 @@ .. .. sys + aio + .. fifo .. file @@ -186,6 +188,8 @@ .. kqueue .. + mqueue + .. netinet .. pjdfstest Modified: stable/10/tests/sys/Makefile ============================================================================== --- stable/10/tests/sys/Makefile Wed May 13 12:02:51 2015 (r282857) +++ stable/10/tests/sys/Makefile Wed May 13 12:09:01 2015 (r282858) @@ -4,10 +4,12 @@ TESTSDIR= ${TESTSBASE}/sys +TESTS_SUBDIRS+= aio TESTS_SUBDIRS+= fifo TESTS_SUBDIRS+= file TESTS_SUBDIRS+= kern TESTS_SUBDIRS+= kqueue +TESTS_SUBDIRS+= mqueue TESTS_SUBDIRS+= netinet TESTS_SUBDIRS+= vm Modified: stable/10/tests/sys/aio/Makefile ============================================================================== --- head/tests/sys/aio/Makefile Mon Apr 27 08:51:40 2015 (r282074) +++ stable/10/tests/sys/aio/Makefile Wed May 13 12:09:01 2015 (r282858) @@ -9,6 +9,8 @@ ATF_TESTS_C+= aio_test DPADD.aio_test+= ${LIBUTIL} LDADD.aio_test+= -lutil +CFLAGS+= -I${.CURDIR:H:H} + WARNS?= 6 .include Modified: stable/10/tests/sys/aio/aio_kqueue_test.c ============================================================================== --- head/tests/sys/aio/aio_kqueue_test.c Mon Apr 27 08:51:40 2015 (r282074) +++ stable/10/tests/sys/aio/aio_kqueue_test.c Wed May 13 12:09:01 2015 (r282858) @@ -46,25 +46,29 @@ #include #include -#define PATH_TEMPLATE "/tmp/aio.XXXXXXXXXX" +#include "freebsd_test_suite/macros.h" -#define MAX 128 +#define PATH_TEMPLATE "aio.XXXXXXXXXX" + +#define MAX_IOCBS 128 #define MAX_RUNS 300 /* #define DEBUG */ int main (int argc, char *argv[]) { - int fd; - struct aiocb *iocb[MAX], *kq_iocb; - int i, result, run, error, j; - char buffer[32768]; - int kq = kqueue(); + struct aiocb *iocb[MAX_IOCBS], *kq_iocb; + char *file, pathname[sizeof(PATH_TEMPLATE)+1]; struct kevent ke, kq_returned; struct timespec ts; - int cancel, pending, tmp_file = 0, failed = 0; - char *file, pathname[sizeof(PATH_TEMPLATE)+1]; + char buffer[32768]; + int cancel, error, failed = 0, fd, kq, pending, result, run; + int tmp_file = 0; + unsigned i, j; + + PLAIN_REQUIRE_KERNEL_MODULE("aio", 0); + kq = kqueue(); if (kq < 0) { perror("No kqeueue\n"); exit(1); @@ -86,7 +90,7 @@ main (int argc, char *argv[]) #ifdef DEBUG printf("Run %d\n", run); #endif - for (i = 0; i < MAX; i++) { + for (i = 0; i < nitems(iocb); i++) { iocb[i] = (struct aiocb *)calloc(1, sizeof(struct aiocb)); if (iocb[i] == NULL) @@ -94,7 +98,7 @@ main (int argc, char *argv[]) } pending = 0; - for (i = 0; i < MAX; i++) { + for (i = 0; i < nitems(iocb); i++) { pending++; iocb[i]->aio_nbytes = sizeof(buffer); iocb[i]->aio_buf = buffer; @@ -129,8 +133,8 @@ main (int argc, char *argv[]) } } } - cancel = MAX - pending; - + cancel = nitems(iocb) - pending; + i = 0; while (pending) { @@ -159,11 +163,11 @@ main (int argc, char *argv[]) break; #ifdef DEBUG printf("Try again left %d out of %d %d\n", - pending, MAX, cancel); + pending, nitems(iocb), cancel); #endif } - for (j = 0; j < MAX && iocb[j] != kq_iocb; + for (j = 0; j < nitems(iocb) && iocb[j] != kq_iocb; j++) ; #ifdef DEBUG printf("kq_iocb %p\n", kq_iocb); @@ -190,7 +194,7 @@ main (int argc, char *argv[]) i++; } - for (i = 0; i < MAX; i++) + for (i = 0; i < nitems(iocb); i++) free(iocb[i]); } Modified: stable/10/tests/sys/aio/aio_test.c ============================================================================== --- head/tests/sys/aio/aio_test.c Mon Apr 27 08:51:40 2015 (r282074) +++ stable/10/tests/sys/aio/aio_test.c Wed May 13 12:09:01 2015 (r282858) @@ -59,6 +59,8 @@ #include +#include "freebsd_test_suite/macros.h" + #define PATH_TEMPLATE "aio.XXXXXXXXXX" /* @@ -82,15 +84,6 @@ struct aio_context { static int aio_timedout; -static void -aio_available(void) -{ - - if (modfind("aio") == -1) - atf_tc_skip("aio support not available in the kernel; " - "skipping testcases"); -} - /* * Each test run specifies a timeout in seconds. Use the somewhat obsoleted * signal(3) and alarm(3) APIs to set this up. @@ -211,7 +204,7 @@ aio_write_test(struct aio_context *ac) struct aiocb aio, *aiop; ssize_t len; - aio_available(); + ATF_REQUIRE_KERNEL_MODULE("aio"); bzero(&aio, sizeof(aio)); aio.aio_buf = ac->ac_buffer; @@ -263,7 +256,7 @@ aio_read_test(struct aio_context *ac) struct aiocb aio, *aiop; ssize_t len; - aio_available(); + ATF_REQUIRE_KERNEL_MODULE("aio"); bzero(ac->ac_buffer, ac->ac_buflen); bzero(&aio, sizeof(aio)); @@ -346,7 +339,7 @@ ATF_TC_BODY(aio_file_test, tc) struct aio_context ac; int fd; - aio_available(); + ATF_REQUIRE_KERNEL_MODULE("aio"); strcpy(pathname, PATH_TEMPLATE); fd = mkstemp(pathname); @@ -392,7 +385,7 @@ ATF_TC_BODY(aio_fifo_test, tc) char pathname[PATH_MAX]; struct aio_context ac; - aio_available(); + ATF_REQUIRE_KERNEL_MODULE("aio"); /* * In theory, mkstemp() can return a name that is then collided with. @@ -461,7 +454,7 @@ ATF_TC_BODY(aio_unix_socketpair_test, tc struct aio_context ac; int sockets[2]; - aio_available(); + ATF_REQUIRE_KERNEL_MODULE("aio"); ATF_REQUIRE_MSG(socketpair(PF_UNIX, SOCK_STREAM, 0, sockets) != -1, "socketpair failed: %s", strerror(errno)); @@ -503,7 +496,7 @@ ATF_TC_BODY(aio_pty_test, tc) struct termios ts; int error; - aio_available(); + ATF_REQUIRE_KERNEL_MODULE("aio"); ATF_REQUIRE_MSG(openpty(&read_fd, &write_fd, NULL, NULL, NULL) == 0, "openpty failed: %s", strerror(errno)); @@ -550,7 +543,7 @@ ATF_TC_BODY(aio_pipe_test, tc) struct aio_context ac; int pipes[2]; - aio_available(); + ATF_REQUIRE_KERNEL_MODULE("aio"); ATF_REQUIRE_MSG(pipe(pipes) != -1, "pipe failed: %s", strerror(errno)); @@ -613,7 +606,7 @@ ATF_TC_BODY(aio_md_test, tc) struct aio_context ac; struct md_ioctl mdio; - aio_available(); + ATF_REQUIRE_KERNEL_MODULE("aio"); mdctl_fd = open("/dev/" MDCTL_NAME, O_RDWR, 0); ATF_REQUIRE_MSG(mdctl_fd != -1, Modified: stable/10/tests/sys/aio/lio_kqueue_test.c ============================================================================== --- head/tests/sys/aio/lio_kqueue_test.c Mon Apr 27 08:51:40 2015 (r282074) +++ stable/10/tests/sys/aio/lio_kqueue_test.c Wed May 13 12:09:01 2015 (r282858) @@ -48,16 +48,18 @@ #include #include -#define PATH_TEMPLATE "/tmp/aio.XXXXXXXXXX" +#include "freebsd_test_suite/macros.h" + +#define PATH_TEMPLATE "aio.XXXXXXXXXX" #define LIO_MAX 5 -#define MAX LIO_MAX * 16 +#define MAX_IOCBS LIO_MAX * 16 #define MAX_RUNS 300 int main(int argc, char *argv[]){ int fd; - struct aiocb *iocb[MAX]; + struct aiocb *iocb[MAX_IOCBS]; struct aiocb **lio[LIO_MAX], **lio_element, **kq_lio; int i, result, run, error, j, k; char buffer[32768]; @@ -69,6 +71,8 @@ main(int argc, char *argv[]){ char *file, pathname[sizeof(PATH_TEMPLATE)-1]; int tmp_file = 0, failed = 0; + PLAIN_REQUIRE_KERNEL_MODULE("aio", 0); + if (kq < 0) { perror("No kqeueue\n"); exit(1); @@ -99,9 +103,9 @@ main(int argc, char *argv[]){ #endif for (j = 0; j < LIO_MAX; j++) { lio[j] = (struct aiocb **) - malloc(sizeof(struct aiocb *) * MAX/LIO_MAX); - for(i = 0; i < MAX / LIO_MAX; i++) { - k = (MAX / LIO_MAX * j) + i; + malloc(sizeof(struct aiocb *) * MAX_IOCBS/LIO_MAX); + for(i = 0; i < MAX_IOCBS / LIO_MAX; i++) { + k = (MAX_IOCBS / LIO_MAX * j) + i; lio_element = lio[j]; lio[j][i] = iocb[k] = (struct aiocb *) malloc(sizeof(struct aiocb)); @@ -123,7 +127,7 @@ main(int argc, char *argv[]){ sig.sigev_notify = SIGEV_KEVENT; time(&time1); result = lio_listio(LIO_NOWAIT, lio[j], - MAX / LIO_MAX, &sig); + MAX_IOCBS / LIO_MAX, &sig); error = errno; time(&time2); #ifdef DEBUG @@ -203,7 +207,7 @@ main(int argc, char *argv[]){ } else { printf("PASS: run %d, operation %d result %d \n", run, LIO_MAX - i -1, result); } - for(k = 0; k < MAX / LIO_MAX; k++){ + for(k = 0; k < MAX_IOCBS / LIO_MAX; k++){ result = aio_return(kq_lio[k]); #ifdef DEBUG printf("Return Resulto for %d %d is %d\n", j, k, result); @@ -220,7 +224,7 @@ main(int argc, char *argv[]){ printf("\n"); #endif - for(k = 0; k < MAX / LIO_MAX; k++) { + for(k = 0; k < MAX_IOCBS / LIO_MAX; k++) { free(lio[j][k]); } free(lio[j]); Modified: stable/10/tests/sys/mqueue/Makefile ============================================================================== --- head/tests/sys/mqueue/Makefile Mon Apr 27 08:31:43 2015 (r282071) +++ stable/10/tests/sys/mqueue/Makefile Wed May 13 12:09:01 2015 (r282858) @@ -6,6 +6,8 @@ ATF_TESTS_SH= mqueue_test BINDIR= ${TESTSDIR} +CFLAGS+= -I${.CURDIR:H:H} + PROGS+= mqtest1 PROGS+= mqtest2 PROGS+= mqtest3 Modified: stable/10/tests/sys/mqueue/mqtest1.c ============================================================================== --- head/tests/sys/mqueue/mqtest1.c Mon Apr 27 08:31:43 2015 (r282071) +++ stable/10/tests/sys/mqueue/mqtest1.c Wed May 13 12:09:01 2015 (r282858) @@ -7,6 +7,8 @@ #include #include +#include "freebsd_test_suite/macros.h" + #define MQNAME "/mytstqueue1" int @@ -17,6 +19,8 @@ main(void) mqd_t mq; int status; + PLAIN_REQUIRE_KERNEL_MODULE("mqueuefs", 0); + attr.mq_maxmsg = 2; attr.mq_msgsize = 100; mq = mq_open(MQNAME, O_CREAT | O_RDWR | O_EXCL, 0666, &attr); Modified: stable/10/tests/sys/mqueue/mqtest2.c ============================================================================== --- head/tests/sys/mqueue/mqtest2.c Mon Apr 27 08:31:43 2015 (r282071) +++ stable/10/tests/sys/mqueue/mqtest2.c Wed May 13 12:09:01 2015 (r282858) @@ -10,6 +10,8 @@ #include #include +#include "freebsd_test_suite/macros.h" + #define MQNAME "/mytstqueue2" #define LOOPS 1000 #define PRIO 10 @@ -29,6 +31,8 @@ main(void) int status; pid_t pid; + PLAIN_REQUIRE_KERNEL_MODULE("mqueuefs", 0); + mq_unlink(MQNAME); attr.mq_maxmsg = 5; Modified: stable/10/tests/sys/mqueue/mqtest3.c ============================================================================== --- head/tests/sys/mqueue/mqtest3.c Mon Apr 27 08:31:43 2015 (r282071) +++ stable/10/tests/sys/mqueue/mqtest3.c Wed May 13 12:09:01 2015 (r282858) @@ -11,6 +11,8 @@ #include #include +#include "freebsd_test_suite/macros.h" + #define MQNAME "/mytstqueue3" #define LOOPS 1000 #define PRIO 10 @@ -31,6 +33,8 @@ main(void) mqd_t mq; pid_t pid; + PLAIN_REQUIRE_KERNEL_MODULE("mqueuefs", 0); + mq_unlink(MQNAME); attr.mq_maxmsg = 5; Modified: stable/10/tests/sys/mqueue/mqtest4.c ============================================================================== --- head/tests/sys/mqueue/mqtest4.c Mon Apr 27 08:31:43 2015 (r282071) +++ stable/10/tests/sys/mqueue/mqtest4.c Wed May 13 12:09:01 2015 (r282858) @@ -12,6 +12,8 @@ #include #include +#include "freebsd_test_suite/macros.h" + #define MQNAME "/mytstqueue4" #define LOOPS 1000 #define PRIO 10 @@ -32,6 +34,8 @@ main(void) int kq, status; pid_t pid; + PLAIN_REQUIRE_KERNEL_MODULE("mqueuefs", 0); + mq_unlink(MQNAME); attr.mq_maxmsg = 5; Modified: stable/10/tests/sys/mqueue/mqtest5.c ============================================================================== --- head/tests/sys/mqueue/mqtest5.c Mon Apr 27 08:31:43 2015 (r282071) +++ stable/10/tests/sys/mqueue/mqtest5.c Wed May 13 12:09:01 2015 (r282858) @@ -12,6 +12,8 @@ #include #include +#include "freebsd_test_suite/macros.h" + #define MQNAME "/mytstqueue5" #define LOOPS 1000 #define PRIO 10 @@ -34,6 +36,8 @@ main(void) mqd_t mq; pid_t pid; + PLAIN_REQUIRE_KERNEL_MODULE("mqueuefs", 0); + mq_unlink(MQNAME); sigemptyset(&set); Modified: stable/10/tests/sys/mqueue/mqueue_test.sh ============================================================================== --- head/tests/sys/mqueue/mqueue_test.sh Mon Apr 27 08:31:43 2015 (r282071) +++ stable/10/tests/sys/mqueue/mqueue_test.sh Wed May 13 12:09:01 2015 (r282858) @@ -1,3 +1,30 @@ +# +# Copyright (c) 2015 EMC / Isilon Storage Division +# 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$ +# mqtest1_head() { From owner-svn-src-all@FreeBSD.ORG Wed May 13 12:13:19 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 38D35320; Wed, 13 May 2015 12:13:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0C1C21EFD; Wed, 13 May 2015 12:13:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4DCDIbu046594; Wed, 13 May 2015 12:13:18 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4DCDITE046593; Wed, 13 May 2015 12:13:18 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201505131213.t4DCDITE046593@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 13 May 2015 12:13:18 +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: r282859 - stable/10/tests/freebsd_test_suite 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.20 Precedence: list List-Id: "SVN commit messages 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, 13 May 2015 12:13:19 -0000 Author: ngie Date: Wed May 13 12:13:18 2015 New Revision: 282859 URL: https://svnweb.freebsd.org/changeset/base/282859 Log: MFC r282211,r282244: r282211: ATF_REQUIRE_KERNEL_MODULE: use atf_skip, not ATF_REQUIRE_MSG so the testcase no longer bombs out PLAIN_REQUIRE_KERNEL_MODULE: use printf + _exit, no err so the testcase no longer bombs out if it prints to stderr r282244: Fix typo. It should have been atf_tc_skip, not atf_skip Reported by: many, Jenkins Pointyhat to: ngie Modified: stable/10/tests/freebsd_test_suite/macros.h Directory Properties: stable/10/ (props changed) Modified: stable/10/tests/freebsd_test_suite/macros.h ============================================================================== --- stable/10/tests/freebsd_test_suite/macros.h Wed May 13 12:09:01 2015 (r282858) +++ stable/10/tests/freebsd_test_suite/macros.h Wed May 13 12:13:18 2015 (r282859) @@ -32,21 +32,24 @@ #include #include #include -#include #include +#include +#include #include #define ATF_REQUIRE_KERNEL_MODULE(_mod_name) do { \ - ATF_REQUIRE_MSG(modfind(_mod_name) != -1, \ - "module %s could not be resolved: %s", \ - _mod_name, strerror(errno)); \ + if (modfind(_mod_name) == -1) { \ + atf_tc_skip("module %s could not be resolved: %s", \ + _mod_name, strerror(errno)); \ + } \ } while(0) -#define PLAIN_REQUIRE_KERNEL_MODULE(_mod_name, _exit_code) do { \ +#define PLAIN_REQUIRE_KERNEL_MODULE(_mod_name, _exit_code) do { \ if (modfind(_mod_name) == -1) { \ - err(_exit_code, "module %s could not be resolved", \ - _mod_name); \ + printf("module %s could not be resolved: %s\n", \ + _mod_name, strerror(errno)); \ + _exit(_exit_code); \ } \ } while(0) From owner-svn-src-all@FreeBSD.ORG Wed May 13 12:17:01 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E2BAC599; Wed, 13 May 2015 12:17:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C35F41F38; Wed, 13 May 2015 12:17:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4DCH1Wd047175; Wed, 13 May 2015 12:17:01 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4DCH16m047174; Wed, 13 May 2015 12:17:01 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201505131217.t4DCH16m047174@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 13 May 2015 12:17: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: r282860 - stable/10/tests/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.20 Precedence: list List-Id: "SVN commit messages 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, 13 May 2015 12:17:02 -0000 Author: ngie Date: Wed May 13 12:17:01 2015 New Revision: 282860 URL: https://svnweb.freebsd.org/changeset/base/282860 Log: MFC r262781,r263336: r262781 (by pho): Preserve naming consistency for test cases. Pointed out by: jmmv Sponsored by: EMC / Isilon storage division r263336 (by pho): Added sysctl kern.maxfiles increase test, do not use /etc/passwd for tests and use volatile sig_atomic_t for signal handler variable. Reviewed by: asomers (previous version) Sponsored by: EMC / Isilon storage division Modified: stable/10/tests/sys/kern/kern_descrip_test.c Directory Properties: stable/10/ (props changed) Modified: stable/10/tests/sys/kern/kern_descrip_test.c ============================================================================== --- stable/10/tests/sys/kern/kern_descrip_test.c Wed May 13 12:13:18 2015 (r282859) +++ stable/10/tests/sys/kern/kern_descrip_test.c Wed May 13 12:17:01 2015 (r282860) @@ -29,22 +29,31 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include #include #include +#include #include #include -ATF_TC_WITHOUT_HEAD(dup2_simple); -ATF_TC_BODY(dup2_simple, tc) +static volatile sig_atomic_t done; + +#define AFILE "afile" +#define EXPANDBY 1000 +#define PARALLEL 4 +#define RENDEZVOUS "rendezvous" +#define VALUE "value" + +ATF_TC_WITHOUT_HEAD(dup2__simple); +ATF_TC_BODY(dup2__simple, tc) { int fd1, fd2; struct stat sb1, sb2; - fd1 = open("/etc/passwd", O_RDONLY); - ATF_REQUIRE(fd1 >= 0); + ATF_REQUIRE((fd1 = open(AFILE, O_CREAT, 0644)) != -1); fd2 = 27; ATF_REQUIRE(dup2(fd1, fd2) != -1); ATF_REQUIRE(fstat(fd1, &sb1) != -1); @@ -57,22 +66,125 @@ ATF_TC_HEAD(dup2__ebadf_when_2nd_arg_out { atf_tc_set_md_var(tc, "descr", "Regression test for r234131"); } + ATF_TC_BODY(dup2__ebadf_when_2nd_arg_out_of_range, tc) { int fd1, fd2, ret; - fd1 = open("/etc/passwd", O_RDONLY); + ATF_REQUIRE((fd1 = open(AFILE, O_CREAT, 0644)) != -1); fd2 = INT_MAX; ret = dup2(fd1, fd2); ATF_CHECK_EQ(-1, ret); ATF_CHECK_EQ(EBADF, errno); } +static void +handler(int s __unused) +{ + done++; +} + +static void +openfiles2(size_t n) +{ + size_t i; + int r; + + errno = 0; + for (i = 0; i < n; i++) + ATF_REQUIRE((r = open(AFILE, O_RDONLY)) != -1); + kill(getppid(), SIGUSR1); + + for (;;) { + if (access(RENDEZVOUS, R_OK) != 0) + break; + usleep(1000); + } + _exit(0); +} + +static void +openfiles(size_t n) +{ + int i, fd; + + signal(SIGUSR1, handler); + ATF_REQUIRE((fd = open(AFILE, O_CREAT, 0644)) != -1); + close(fd); + ATF_REQUIRE((fd = open(RENDEZVOUS, O_CREAT, 0644)) != -1); + close(fd); + done = 0; + for (i = 0; i < PARALLEL; i++) + if (fork() == 0) + openfiles2(n / PARALLEL); + while (done != PARALLEL) + usleep(1000); + unlink(RENDEZVOUS); + usleep(40000); +} + +ATF_TC_WITH_CLEANUP(kern_maxfiles__increase); +ATF_TC_HEAD(kern_maxfiles__increase, tc) +{ + atf_tc_set_md_var(tc, "require.user", "root"); + atf_tc_set_md_var(tc, "require.config", "allow_sysctl_side_effects"); + atf_tc_set_md_var(tc, "descr", + "Check kern.maxfiles expansion"); +} + +ATF_TC_BODY(kern_maxfiles__increase, tc) +{ + size_t oldlen; + int maxfiles, oldmaxfiles, current; + char buf[80]; + + oldlen = sizeof(maxfiles); + if (sysctlbyname("kern.maxfiles", &maxfiles, &oldlen, NULL, 0) == -1) + atf_tc_fail("getsysctlbyname(%s): %s", "kern.maxfiles", + strerror(errno)); + if (sysctlbyname("kern.openfiles", ¤t, &oldlen, NULL, 0) == -1) + atf_tc_fail("getsysctlbyname(%s): %s", "kern.openfiles", + strerror(errno)); + + oldmaxfiles = maxfiles; + + /* Store old kern.maxfiles in a symlink for cleanup */ + snprintf(buf, sizeof(buf), "%d", oldmaxfiles); + if (symlink(buf, VALUE) == 1) + atf_tc_fail("symlink(%s, %s): %s", buf, VALUE, + strerror(errno)); + + maxfiles += EXPANDBY; + if (sysctlbyname("kern.maxfiles", NULL, 0, &maxfiles, oldlen) == -1) + atf_tc_fail("getsysctlbyname(%s): %s", "kern.maxfiles", + strerror(errno)); + + openfiles(oldmaxfiles - current + 1); + (void)unlink(VALUE); +} + +ATF_TC_CLEANUP(kern_maxfiles__increase, tc) +{ + size_t oldlen; + int n, oldmaxfiles; + char buf[80]; + + if ((n = readlink(VALUE, buf, sizeof(buf))) > 0) { + buf[n] = '\0'; + if (sscanf(buf, "%d", &oldmaxfiles) == 1) { + oldlen = sizeof(oldmaxfiles); + (void) sysctlbyname("kern.maxfiles", NULL, 0, + &oldmaxfiles, oldlen); + } + } +} + ATF_TP_ADD_TCS(tp) { - ATF_TP_ADD_TC(tp, dup2_simple); - ATF_TP_ADD_TC(tp, dup2__ebadf_when_2nd_arg_out_of_range); + ATF_TP_ADD_TC(tp, dup2__simple); + ATF_TP_ADD_TC(tp, dup2__ebadf_when_2nd_arg_out_of_range); + ATF_TP_ADD_TC(tp, kern_maxfiles__increase); - return atf_no_error(); + return (atf_no_error()); } From owner-svn-src-all@FreeBSD.ORG Wed May 13 14:05:55 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 63EA4452; Wed, 13 May 2015 14:05:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4624D1E02; Wed, 13 May 2015 14:05:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4DE5thK000975; Wed, 13 May 2015 14:05:55 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4DE5sHu000972; Wed, 13 May 2015 14:05:54 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201505131405.t4DE5sHu000972@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Wed, 13 May 2015 14:05:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r282861 - in stable/10: sbin/geom/class/part sys/geom/part sys/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.20 Precedence: list List-Id: "SVN commit messages 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, 13 May 2015 14:05:55 -0000 Author: ae Date: Wed May 13 14:05:53 2015 New Revision: 282861 URL: https://svnweb.freebsd.org/changeset/base/282861 Log: MFC r282465: Add apple-boot, apple-hfs and apple-ufs aliases to MBR scheme. Sort DOSPTYP_* entries in diskmbr.h by value. Document these scheme-specific types in gpart(8). Modified: stable/10/sbin/geom/class/part/gpart.8 stable/10/sys/geom/part/g_part_mbr.c stable/10/sys/sys/diskmbr.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/geom/class/part/gpart.8 ============================================================================== --- stable/10/sbin/geom/class/part/gpart.8 Wed May 13 12:17:01 2015 (r282860) +++ stable/10/sbin/geom/class/part/gpart.8 Wed May 13 14:05:53 2015 (r282861) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 12, 2015 +.Dd May 5, 2015 .Dt GPART 8 .Os .Sh NAME @@ -668,6 +668,8 @@ for GPT. .It Cm apple-hfs An Apple Mac OS X partition that contains a HFS or HFS+ filesystem. The scheme-specific types are +.Qq Li "!175" +for MBR, .Qq Li "!Apple_HFS" for APM and .Qq Li "!48465300-0000-11aa-aa11-00306543ecac" @@ -696,6 +698,8 @@ for GPT. .It Cm apple-ufs An Apple Mac OS X partition that contains a UFS filesystem. The scheme-specific types are +.Qq Li "!168" +for MBR, .Qq Li "!Apple_UNIX_SVR2" for APM and .Qq Li "!55465300-0000-11aa-aa11-00306543ecac" Modified: stable/10/sys/geom/part/g_part_mbr.c ============================================================================== --- stable/10/sys/geom/part/g_part_mbr.c Wed May 13 12:17:01 2015 (r282860) +++ stable/10/sys/geom/part/g_part_mbr.c Wed May 13 14:05:53 2015 (r282861) @@ -138,6 +138,9 @@ static struct g_part_mbr_alias { { DOSPTYP_PPCBOOT, G_PART_ALIAS_PREP_BOOT }, { DOSPTYP_VMFS, G_PART_ALIAS_VMFS }, { DOSPTYP_VMKDIAG, G_PART_ALIAS_VMKDIAG }, + { DOSPTYP_APPLE_UFS, G_PART_ALIAS_APPLE_UFS }, + { DOSPTYP_APPLE_BOOT, G_PART_ALIAS_APPLE_BOOT }, + { DOSPTYP_HFS, G_PART_ALIAS_APPLE_HFS }, }; static int Modified: stable/10/sys/sys/diskmbr.h ============================================================================== --- stable/10/sys/sys/diskmbr.h Wed May 13 12:17:01 2015 (r282860) +++ stable/10/sys/sys/diskmbr.h Wed May 13 14:05:53 2015 (r282861) @@ -51,11 +51,13 @@ #define DOSPTYP_EXTLBA 0x0f /* DOS extended partition */ #define DOSPTYP_PPCBOOT 0x41 /* PReP/CHRP boot partition */ #define DOSPTYP_LDM 0x42 /* Win2k dynamic extended partition */ -#define DOSPTYP_386BSD 0xa5 /* 386BSD partition type */ -#define DOSPTYP_HFS 0xaf /* HFS/HFS+ partition type */ #define DOSPTYP_LINSWP 0x82 /* Linux swap partition */ #define DOSPTYP_LINUX 0x83 /* Linux partition */ #define DOSPTYP_LINLVM 0x8e /* Linux LVM partition */ +#define DOSPTYP_386BSD 0xa5 /* 386BSD partition type */ +#define DOSPTYP_APPLE_UFS 0xa8 /* Apple Mac OS X boot */ +#define DOSPTYP_APPLE_BOOT 0xab /* Apple Mac OS X UFS */ +#define DOSPTYP_HFS 0xaf /* HFS/HFS+ partition type */ #define DOSPTYP_PMBR 0xee /* GPT Protective MBR */ #define DOSPTYP_VMFS 0xfb /* VMware VMFS partition */ #define DOSPTYP_VMKDIAG 0xfc /* VMware vmkDiagnostic partition */ From owner-svn-src-all@FreeBSD.ORG Wed May 13 15:23:54 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BCA407C7; Wed, 13 May 2015 15:23:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AA9D61A8F; Wed, 13 May 2015 15:23:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4DFNscD040784; Wed, 13 May 2015 15:23:54 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4DFNstS040783; Wed, 13 May 2015 15:23:54 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201505131523.t4DFNstS040783@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 13 May 2015 15:23:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r282862 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 13 May 2015 15:23:54 -0000 Author: mav Date: Wed May 13 15:23:53 2015 New Revision: 282862 URL: https://svnweb.freebsd.org/changeset/base/282862 Log: MFC r282565: Handle EDQUOT backend storage errors same as ENOSPC. Modified: stable/10/sys/cam/ctl/ctl_backend_block.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend_block.c Wed May 13 14:05:53 2015 (r282861) +++ stable/10/sys/cam/ctl/ctl_backend_block.c Wed May 13 15:23:53 2015 (r282862) @@ -524,7 +524,7 @@ ctl_be_block_biodone(struct bio *bio) if (beio->num_errors > 0) { if (error == EOPNOTSUPP) { ctl_set_invalid_opcode(&io->scsiio); - } else if (error == ENOSPC) { + } else if (error == ENOSPC || error == EDQUOT) { ctl_set_space_alloc_fail(&io->scsiio); } else if (beio->bio_cmd == BIO_FLUSH) { /* XXX KDM is there is a better error here? */ @@ -741,7 +741,7 @@ ctl_be_block_dispatch_file(struct ctl_be ctl_scsi_path_string(io, path_str, sizeof(path_str)); printf("%s%s command returned errno %d\n", path_str, (beio->bio_cmd == BIO_READ) ? "READ" : "WRITE", error); - if (error == ENOSPC) { + if (error == ENOSPC || error == EDQUOT) { ctl_set_space_alloc_fail(&io->scsiio); } else ctl_set_medium_error(&io->scsiio); @@ -898,7 +898,7 @@ ctl_be_block_dispatch_zvol(struct ctl_be * return the I/O to the user. */ if (error != 0) { - if (error == ENOSPC) { + if (error == ENOSPC || error == EDQUOT) { ctl_set_space_alloc_fail(&io->scsiio); } else ctl_set_medium_error(&io->scsiio); From owner-svn-src-all@FreeBSD.ORG Wed May 13 15:26:45 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8A56398C; Wed, 13 May 2015 15:26:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 795871ABB; Wed, 13 May 2015 15:26:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4DFQjP0041202; Wed, 13 May 2015 15:26:45 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4DFQjfS041201; Wed, 13 May 2015 15:26:45 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201505131526.t4DFQjfS041201@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Wed, 13 May 2015 15:26:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282863 - head/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.20 Precedence: list List-Id: "SVN commit messages 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, 13 May 2015 15:26:45 -0000 Author: pfg Date: Wed May 13 15:26:44 2015 New Revision: 282863 URL: https://svnweb.freebsd.org/changeset/base/282863 Log: Adjust visibility macros. The GCC visibility attributes were introduced in GCC 4.0. Apparently the "protected" attribute was introduced only until GCC 4.2, but we are not currently using it. MFC after: 1 week Modified: head/sys/sys/cdefs.h Modified: head/sys/sys/cdefs.h ============================================================================== --- head/sys/sys/cdefs.h Wed May 13 15:23:53 2015 (r282862) +++ head/sys/sys/cdefs.h Wed May 13 15:26:44 2015 (r282863) @@ -464,7 +464,7 @@ #define __predict_false(exp) (exp) #endif -#if __GNUC_PREREQ__(4, 2) +#if __GNUC_PREREQ__(4, 0) #define __hidden __attribute__((__visibility__("hidden"))) #define __exported __attribute__((__visibility__("default"))) #else From owner-svn-src-all@FreeBSD.ORG Wed May 13 16:02:56 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CFEC2890; Wed, 13 May 2015 16:02:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BCC6510D3; Wed, 13 May 2015 16:02:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4DG2ukV060211; Wed, 13 May 2015 16:02:56 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4DG2ux5060210; Wed, 13 May 2015 16:02:56 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201505131602.t4DG2ux5060210@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Wed, 13 May 2015 16:02:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282864 - head/sys/dev/ofw 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.20 Precedence: list List-Id: "SVN commit messages 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, 13 May 2015 16:02:56 -0000 Author: andrew Date: Wed May 13 16:02:55 2015 New Revision: 282864 URL: https://svnweb.freebsd.org/changeset/base/282864 Log: Use the correct node wen reading the compatible property. Modified: head/sys/dev/ofw/ofw_bus_subr.c Modified: head/sys/dev/ofw/ofw_bus_subr.c ============================================================================== --- head/sys/dev/ofw/ofw_bus_subr.c Wed May 13 15:26:44 2015 (r282863) +++ head/sys/dev/ofw/ofw_bus_subr.c Wed May 13 16:02:55 2015 (r282864) @@ -511,7 +511,7 @@ ofw_bus_find_compatible(phandle_t node, * matching 'compatible' property. */ for (child = OF_child(node); child != 0; child = OF_peer(child)) { - len = OF_getprop_alloc(node, "compatible", 1, &compat); + len = OF_getprop_alloc(child, "compatible", 1, &compat); if (len >= 0) { ret = ofw_bus_node_is_compatible(compat, len, onecompat); From owner-svn-src-all@FreeBSD.ORG Wed May 13 17:38:09 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7B5DB4EE; Wed, 13 May 2015 17:38:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 500561CFB; Wed, 13 May 2015 17:38:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4DHc9AE007665; Wed, 13 May 2015 17:38:09 GMT (envelope-from grehan@FreeBSD.org) Received: (from grehan@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4DHc8tW007662; Wed, 13 May 2015 17:38:08 GMT (envelope-from grehan@FreeBSD.org) Message-Id: <201505131738.t4DHc8tW007662@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: grehan set sender to grehan@FreeBSD.org using -f From: Peter Grehan Date: Wed, 13 May 2015 17:38:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282865 - head/usr.sbin/bhyve 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.20 Precedence: list List-Id: "SVN commit messages 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, 13 May 2015 17:38:09 -0000 Author: grehan Date: Wed May 13 17:38:07 2015 New Revision: 282865 URL: https://svnweb.freebsd.org/changeset/base/282865 Log: Set the subvendor field in config space to the vendor ID. This is required by the Windows virtio drivers to correctly match a device. Submitted by: Leon Dang (ldang@nahannisys.com) MFC after: 2 weeks Modified: head/usr.sbin/bhyve/pci_virtio_block.c head/usr.sbin/bhyve/pci_virtio_net.c head/usr.sbin/bhyve/pci_virtio_rnd.c Modified: head/usr.sbin/bhyve/pci_virtio_block.c ============================================================================== --- head/usr.sbin/bhyve/pci_virtio_block.c Wed May 13 16:02:55 2015 (r282864) +++ head/usr.sbin/bhyve/pci_virtio_block.c Wed May 13 17:38:07 2015 (r282865) @@ -370,6 +370,7 @@ pci_vtblk_init(struct vmctx *ctx, struct pci_set_cfgdata16(pi, PCIR_VENDOR, VIRTIO_VENDOR); pci_set_cfgdata8(pi, PCIR_CLASS, PCIC_STORAGE); pci_set_cfgdata16(pi, PCIR_SUBDEV_0, VIRTIO_TYPE_BLOCK); + pci_set_cfgdata16(pi, PCIR_SUBVEND_0, VIRTIO_VENDOR); if (vi_intr_init(&sc->vbsc_vs, 1, fbsdrun_virtio_msix())) { blockif_close(sc->bc); Modified: head/usr.sbin/bhyve/pci_virtio_net.c ============================================================================== --- head/usr.sbin/bhyve/pci_virtio_net.c Wed May 13 16:02:55 2015 (r282864) +++ head/usr.sbin/bhyve/pci_virtio_net.c Wed May 13 17:38:07 2015 (r282865) @@ -640,6 +640,7 @@ pci_vtnet_init(struct vmctx *ctx, struct pci_set_cfgdata16(pi, PCIR_VENDOR, VIRTIO_VENDOR); pci_set_cfgdata8(pi, PCIR_CLASS, PCIC_NETWORK); pci_set_cfgdata16(pi, PCIR_SUBDEV_0, VIRTIO_TYPE_NET); + pci_set_cfgdata16(pi, PCIR_SUBVEND_0, VIRTIO_VENDOR); /* Link is up if we managed to open tap device. */ sc->vsc_config.status = (opts == NULL || sc->vsc_tapfd >= 0); Modified: head/usr.sbin/bhyve/pci_virtio_rnd.c ============================================================================== --- head/usr.sbin/bhyve/pci_virtio_rnd.c Wed May 13 16:02:55 2015 (r282864) +++ head/usr.sbin/bhyve/pci_virtio_rnd.c Wed May 13 17:38:07 2015 (r282865) @@ -170,6 +170,7 @@ pci_vtrnd_init(struct vmctx *ctx, struct pci_set_cfgdata16(pi, PCIR_VENDOR, VIRTIO_VENDOR); pci_set_cfgdata8(pi, PCIR_CLASS, PCIC_CRYPTO); pci_set_cfgdata16(pi, PCIR_SUBDEV_0, VIRTIO_TYPE_ENTROPY); + pci_set_cfgdata16(pi, PCIR_SUBVEND_0, VIRTIO_VENDOR); if (vi_intr_init(&sc->vrsc_vs, 1, fbsdrun_virtio_msix())) return (1); From owner-svn-src-all@FreeBSD.ORG Wed May 13 18:52:18 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DC4D6842; Wed, 13 May 2015 18:52:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CA91E1659; Wed, 13 May 2015 18:52:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4DIqIed046321; Wed, 13 May 2015 18:52:18 GMT (envelope-from stas@FreeBSD.org) Received: (from stas@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4DIqILs046320; Wed, 13 May 2015 18:52:18 GMT (envelope-from stas@FreeBSD.org) Message-Id: <201505131852.t4DIqILs046320@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: stas set sender to stas@FreeBSD.org using -f From: Stanislav Sedov Date: Wed, 13 May 2015 18:52:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282866 - head/usr.sbin/pmcstat 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.20 Precedence: list List-Id: "SVN commit messages 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, 13 May 2015 18:52:19 -0000 Author: stas Date: Wed May 13 18:52:18 2015 New Revision: 282866 URL: https://svnweb.freebsd.org/changeset/base/282866 Log: Fix pmcstat symbol resolution for userland processes. When examining existing processes pmcstat fails to correctly determine the locations of executable sections of the process due to a miscalculated virtual load address. This does not affect the newly launched processes as the same value passed as a "start address" to the pmcstat_image_link() thus nullifying the effect of it. The issue manifests itself in processes not being reported in the pmcstat(8) output and "dubious frames" being reported. Fix it for now by ignoring all the sections except the executable one. This won't fix the issue for objects with multiple executable sections but helps in majority of real world usecases. The real solution would be to modify the MAP-IN event to include the appropriate load address so pmcstat(8) won't have to manually parse object files to try to determine it. PR: 198147, 198148 Reviewed by: jhb, rpaulo MFC after: 2 weeks Modified: head/usr.sbin/pmcstat/pmcstat_log.c Modified: head/usr.sbin/pmcstat/pmcstat_log.c ============================================================================== --- head/usr.sbin/pmcstat/pmcstat_log.c Wed May 13 17:38:07 2015 (r282865) +++ head/usr.sbin/pmcstat/pmcstat_log.c Wed May 13 18:52:18 2015 (r282866) @@ -716,7 +716,8 @@ pmcstat_image_get_elf_params(struct pmcs ph.p_offset); break; case PT_LOAD: - if ((ph.p_offset & (-ph.p_align)) == 0) + if ((ph.p_flags & PF_X) != 0 && + (ph.p_offset & (-ph.p_align)) == 0) image->pi_vaddr = ph.p_vaddr & (-ph.p_align); break; } From owner-svn-src-all@FreeBSD.ORG Wed May 13 18:57:05 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0971FC5F; Wed, 13 May 2015 18:57:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EADF716B3; Wed, 13 May 2015 18:57:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4DIv4g9047166; Wed, 13 May 2015 18:57:04 GMT (envelope-from zbb@FreeBSD.org) Received: (from zbb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4DIv4B2047158; Wed, 13 May 2015 18:57:04 GMT (envelope-from zbb@FreeBSD.org) Message-Id: <201505131857.t4DIv4B2047158@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: zbb set sender to zbb@FreeBSD.org using -f From: Zbigniew Bodek Date: Wed, 13 May 2015 18:57:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282867 - in head/sys: arm64/arm64 arm64/include 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.20 Precedence: list List-Id: "SVN commit messages 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, 13 May 2015 18:57:05 -0000 Author: zbb Date: Wed May 13 18:57:03 2015 New Revision: 282867 URL: https://svnweb.freebsd.org/changeset/base/282867 Log: Add support for ARM GICv3 interrupt controller used in some ARM64 chips GICv3 allows to distribute interrupts to more than 8 cores served by the previous GIC revisions. GICv3 introduces additional logic in form of Re-Distributors associated with particular CPUs to determine the highest priority interrupts and manage PPIs and LPIs (Locality-specific Peripheral Interrupts). Interrupts routing is based on CPUs' affinity numbers. CPU interface was changed to be accessible via CPU System Registers and this is the preferred (and supported) method in this driver. Obtained from: Semihalf Reviewed by: andrew, emaste, ian, imp Sponsored by: The FreeBSD Foundation Added: head/sys/arm64/arm64/gic_v3.c (contents, props changed) head/sys/arm64/arm64/gic_v3_fdt.c (contents, props changed) head/sys/arm64/arm64/gic_v3_reg.h (contents, props changed) head/sys/arm64/arm64/gic_v3_var.h (contents, props changed) Modified: head/sys/arm64/arm64/locore.S head/sys/arm64/include/armreg.h head/sys/conf/files.arm64 Added: head/sys/arm64/arm64/gic_v3.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm64/arm64/gic_v3.c Wed May 13 18:57:03 2015 (r282867) @@ -0,0 +1,580 @@ +/*- + * Copyright (c) 2015 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Semihalf under + * the sponsorship of the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include + +#include "pic_if.h" + +#include "gic_v3_reg.h" +#include "gic_v3_var.h" + +/* Device and PIC methods */ +static void gic_v3_dispatch(device_t, struct trapframe *); +static void gic_v3_eoi(device_t, u_int); +static void gic_v3_mask_irq(device_t, u_int); +static void gic_v3_unmask_irq(device_t, u_int); + +static device_method_t gic_v3_methods[] = { + /* Device interface */ + DEVMETHOD(device_detach, gic_v3_detach), + + /* PIC interface */ + DEVMETHOD(pic_dispatch, gic_v3_dispatch), + DEVMETHOD(pic_eoi, gic_v3_eoi), + DEVMETHOD(pic_mask, gic_v3_mask_irq), + DEVMETHOD(pic_unmask, gic_v3_unmask_irq), + + /* End */ + DEVMETHOD_END +}; + +DEFINE_CLASS_0(gic_v3, gic_v3_driver, gic_v3_methods, + sizeof(struct gic_v3_softc)); + +/* + * Driver-specific definitions. + */ +MALLOC_DEFINE(M_GIC_V3, "GICv3", GIC_V3_DEVSTR); + +/* + * Helper functions and definitions. + */ +/* Destination registers, either Distributor or Re-Distributor */ +enum gic_v3_xdist { + DIST = 0, + REDIST, +}; + +/* Helper routines starting with gic_v3_ */ +static int gic_v3_dist_init(struct gic_v3_softc *); +static int gic_v3_redist_find(struct gic_v3_softc *); +static int gic_v3_redist_init(struct gic_v3_softc *); +static int gic_v3_cpu_init(struct gic_v3_softc *); +static void gic_v3_wait_for_rwp(struct gic_v3_softc *, enum gic_v3_xdist); + +/* A sequence of init functions for primary (boot) CPU */ +typedef int (*gic_v3_initseq_t) (struct gic_v3_softc *); +/* Primary CPU initialization sequence */ +static gic_v3_initseq_t gic_v3_primary_init[] = { + gic_v3_dist_init, + gic_v3_redist_init, + gic_v3_cpu_init, + NULL +}; + +/* + * Device interface. + */ +int +gic_v3_attach(device_t dev) +{ + struct gic_v3_softc *sc; + gic_v3_initseq_t *init_func; + uint32_t typer; + int rid; + int err; + size_t i; + + sc = device_get_softc(dev); + sc->gic_registered = FALSE; + sc->dev = dev; + err = 0; + + /* Initialize mutex */ + mtx_init(&sc->gic_mtx, "GICv3 lock", NULL, MTX_SPIN); + + /* + * Allocate array of struct resource. + * One entry for Distributor and all remaining for Re-Distributor. + */ + sc->gic_res = malloc( + sizeof(sc->gic_res) * (sc->gic_redists.nregions + 1), + M_GIC_V3, M_WAITOK); + + /* Now allocate corresponding resources */ + for (i = 0, rid = 0; i < (sc->gic_redists.nregions + 1); i++, rid++) { + sc->gic_res[rid] = bus_alloc_resource_any(dev, SYS_RES_MEMORY, + &rid, RF_ACTIVE); + if (sc->gic_res[rid] == NULL) + return (ENXIO); + } + + /* + * Distributor interface + */ + sc->gic_dist = sc->gic_res[0]; + + /* + * Re-Dristributor interface + */ + /* Allocate space under region descriptions */ + sc->gic_redists.regions = malloc( + sizeof(*sc->gic_redists.regions) * sc->gic_redists.nregions, + M_GIC_V3, M_WAITOK); + + /* Fill-up bus_space information for each region. */ + for (i = 0, rid = 1; i < sc->gic_redists.nregions; i++, rid++) + sc->gic_redists.regions[i] = sc->gic_res[rid]; + + /* Get the number of supported SPI interrupts */ + typer = gic_d_read(sc, 4, GICD_TYPER); + sc->gic_nirqs = GICD_TYPER_I_NUM(typer); + if (sc->gic_nirqs > GIC_I_NUM_MAX) + sc->gic_nirqs = GIC_I_NUM_MAX; + + /* Get the number of supported interrupt identifier bits */ + sc->gic_idbits = GICD_TYPER_IDBITS(typer); + + if (bootverbose) { + device_printf(dev, "SPIs: %u, IDs: %u\n", + sc->gic_nirqs, (1 << sc->gic_idbits) - 1); + } + + /* Train init sequence for boot CPU */ + for (init_func = gic_v3_primary_init; *init_func != NULL; init_func++) { + err = (*init_func)(sc); + if (err != 0) + return (err); + } + /* + * Full success. + * Now register PIC to the interrupts handling layer. + */ + arm_register_root_pic(dev, sc->gic_nirqs); + sc->gic_registered = TRUE; + + return (0); +} + +int +gic_v3_detach(device_t dev) +{ + struct gic_v3_softc *sc; + size_t i; + int rid; + + sc = device_get_softc(dev); + + if (device_is_attached(dev)) { + /* + * XXX: We should probably deregister PIC + */ + if (sc->gic_registered) + panic("Trying to detach registered PIC"); + } + for (rid = 0; rid < (sc->gic_redists.nregions + 1); rid++) + bus_release_resource(dev, SYS_RES_MEMORY, rid, sc->gic_res[rid]); + + for (i = 0; i < MAXCPU; i++) + free(sc->gic_redists.pcpu[i], M_GIC_V3); + + free(sc->gic_res, M_GIC_V3); + free(sc->gic_redists.regions, M_GIC_V3); + + return (0); +} + +/* + * PIC interface. + */ +static void +gic_v3_dispatch(device_t dev, struct trapframe *frame) +{ + uint64_t active_irq; + + while (1) { + active_irq = gic_icc_read(IAR1); + + if (__predict_false(active_irq == ICC_IAR1_EL1_SPUR)) + break; + + if (__predict_true((active_irq >= GIC_FIRST_PPI && + active_irq <= GIC_LAST_SPI))) { + arm_dispatch_intr(active_irq, frame); + continue; + } + + if (active_irq <= GIC_LAST_SGI || active_irq >= GIC_FIRST_LPI) { + /* + * TODO: Implement proper SGI/LPI handling. + * Mask it if such is received for some reason. + */ + device_printf(dev, + "Received unsupported interrupt type: %s\n", + active_irq >= GIC_FIRST_LPI ? "LPI" : "SGI"); + PIC_MASK(dev, active_irq); + } + } +} + +static void +gic_v3_eoi(device_t dev, u_int irq) +{ + + gic_icc_write(EOIR1, (uint64_t)irq); +} + +static void +gic_v3_mask_irq(device_t dev, u_int irq) +{ + struct gic_v3_softc *sc; + + sc = device_get_softc(dev); + + if (irq >= GIC_FIRST_PPI && irq <= GIC_LAST_PPI) { /* PPIs in corresponding Re-Distributor */ + gic_r_write(sc, 4, + GICR_SGI_BASE_SIZE + GICD_ICENABLER(irq), GICD_I_MASK(irq)); + gic_v3_wait_for_rwp(sc, REDIST); + } else if (irq >= GIC_FIRST_SPI && irq <= GIC_LAST_SPI) { /* SPIs in distributor */ + gic_r_write(sc, 4, GICD_ICENABLER(irq), GICD_I_MASK(irq)); + gic_v3_wait_for_rwp(sc, DIST); + } else + panic("%s: Unsupported IRQ number %u", __func__, irq); +} + +static void +gic_v3_unmask_irq(device_t dev, u_int irq) +{ + struct gic_v3_softc *sc; + + sc = device_get_softc(dev); + + if (irq >= GIC_FIRST_PPI && irq <= GIC_LAST_PPI) { /* PPIs in corresponding Re-Distributor */ + gic_r_write(sc, 4, + GICR_SGI_BASE_SIZE + GICD_ISENABLER(irq), GICD_I_MASK(irq)); + gic_v3_wait_for_rwp(sc, REDIST); + } else if (irq >= GIC_FIRST_SPI && irq <= GIC_LAST_SPI) { /* SPIs in distributor */ + gic_d_write(sc, 4, GICD_ISENABLER(irq), GICD_I_MASK(irq)); + gic_v3_wait_for_rwp(sc, DIST); + } else + panic("%s: Unsupported IRQ number %u", __func__, irq); +} + +/* + * Helper routines + */ +static void +gic_v3_wait_for_rwp(struct gic_v3_softc *sc, enum gic_v3_xdist xdist) +{ + struct resource *res; + u_int cpuid; + size_t us_left = 1000000; + + cpuid = PCPU_GET(cpuid); + + switch (xdist) { + case DIST: + res = sc->gic_dist; + break; + case REDIST: + res = sc->gic_redists.pcpu[cpuid]; + break; + default: + KASSERT(0, ("%s: Attempt to wait for unknown RWP", __func__)); + return; + } + + while ((bus_read_4(res, GICD_CTLR) & GICD_CTLR_RWP) != 0) { + DELAY(1); + if (us_left-- == 0) + panic("GICD Register write pending for too long"); + } +} + +/* CPU interface. */ +static __inline void +gic_v3_cpu_priority(uint64_t mask) +{ + + /* Set prority mask */ + gic_icc_write(PMR, mask & ICC_PMR_EL1_PRIO_MASK); +} + +static int +gic_v3_cpu_enable_sre(struct gic_v3_softc *sc) +{ + uint64_t sre; + u_int cpuid; + + cpuid = PCPU_GET(cpuid); + /* + * Set the SRE bit to enable access to GIC CPU interface + * via system registers. + */ + sre = READ_SPECIALREG(icc_sre_el1); + sre |= ICC_SRE_EL1_SRE; + WRITE_SPECIALREG(icc_sre_el1, sre); + isb(); + /* + * Now ensure that the bit is set. + */ + sre = READ_SPECIALREG(icc_sre_el1); + if ((sre & ICC_SRE_EL1_SRE) == 0) { + /* We are done. This was disabled in EL2 */ + device_printf(sc->dev, "ERROR: CPU%u cannot enable CPU interface " + "via system registers\n", cpuid); + return (ENXIO); + } else if (bootverbose) { + device_printf(sc->dev, + "CPU%u enabled CPU interface via system registers\n", + cpuid); + } + + return (0); +} + +static int +gic_v3_cpu_init(struct gic_v3_softc *sc) +{ + int err; + + /* Enable access to CPU interface via system registers */ + err = gic_v3_cpu_enable_sre(sc); + if (err != 0) + return (err); + /* Priority mask to minimum - accept all interrupts */ + gic_v3_cpu_priority(GIC_PRIORITY_MIN); + /* Disable EOI mode */ + gic_icc_clear(CTLR, ICC_CTLR_EL1_EOIMODE); + /* Enable group 1 (insecure) interrups */ + gic_icc_set(IGRPEN1, ICC_IGRPEN0_EL1_EN); + + return (0); +} + +/* Distributor */ +static int +gic_v3_dist_init(struct gic_v3_softc *sc) +{ + uint64_t aff; + u_int i; + + /* + * 1. Disable the Distributor + */ + gic_d_write(sc, 4, GICD_CTLR, 0); + gic_v3_wait_for_rwp(sc, DIST); + + /* + * 2. Configure the Distributor + */ + /* Set all global interrupts to be level triggered, active low. */ + for (i = GIC_FIRST_SPI; i < sc->gic_nirqs; i += GICD_I_PER_ICFGRn) + gic_d_write(sc, 4, GICD_ICFGR(i), 0x00000000); + + /* Set priority to all shared interrupts */ + for (i = GIC_FIRST_SPI; + i < sc->gic_nirqs; i += GICD_I_PER_IPRIORITYn) { + /* Set highest priority */ + gic_d_write(sc, 4, GICD_IPRIORITYR(i), GIC_PRIORITY_MAX); + } + + /* + * Disable all interrupts. Leave PPI and SGIs as they are enabled in + * Re-Distributor registers. + */ + for (i = GIC_FIRST_SPI; i < sc->gic_nirqs; i += GICD_I_PER_ISENABLERn) + gic_d_write(sc, 4, GICD_ICENABLER(i), 0xFFFFFFFF); + + gic_v3_wait_for_rwp(sc, DIST); + + /* + * 3. Enable Distributor + */ + /* Enable Distributor with ARE, Group 1 */ + gic_d_write(sc, 4, GICD_CTLR, GICD_CTLR_ARE_NS | GICD_CTLR_G1A | + GICD_CTLR_G1); + + /* + * 4. Route all interrupts to boot CPU. + */ + aff = CPU_AFFINITY(PCPU_GET(cpuid)); + for (i = GIC_FIRST_SPI; i < sc->gic_nirqs; i++) + gic_d_write(sc, 4, GICD_IROUTER(i), aff); + + return (0); +} + +/* Re-Distributor */ +static int +gic_v3_redist_find(struct gic_v3_softc *sc) +{ + struct resource r_res; + bus_space_handle_t r_bsh; + uint64_t aff; + uint64_t typer; + uint32_t pidr2; + u_int cpuid; + size_t i; + + cpuid = PCPU_GET(cpuid); + + /* Allocate struct resource for this CPU's Re-Distributor registers */ + sc->gic_redists.pcpu[cpuid] = + malloc(sizeof(*sc->gic_redists.pcpu[0]), M_GIC_V3, M_WAITOK); + + aff = CPU_AFFINITY(cpuid); + /* Affinity in format for comparison with typer */ + aff = (CPU_AFF3(aff) << 24) | (CPU_AFF2(aff) << 16) | + (CPU_AFF1(aff) << 8) | CPU_AFF0(aff); + + if (bootverbose) { + device_printf(sc->dev, + "Start searching for Re-Distributor\n"); + } + /* Iterate through Re-Distributor regions */ + for (i = 0; i < sc->gic_redists.nregions; i++) { + /* Take a copy of the region's resource */ + r_res = *sc->gic_redists.regions[i]; + r_bsh = rman_get_bushandle(&r_res); + + pidr2 = bus_read_4(&r_res, GICR_PIDR2); + switch (pidr2 & GICR_PIDR2_ARCH_MASK) { + case GICR_PIDR2_ARCH_GICv3: /* fall through */ + case GICR_PIDR2_ARCH_GICv4: + break; + default: + device_printf(sc->dev, + "No Re-Distributor found for CPU%u\n", cpuid); + free(sc->gic_redists.pcpu[cpuid], M_GIC_V3); + return (ENODEV); + } + + do { + typer = bus_read_8(&r_res, GICR_TYPER); + if ((typer >> GICR_TYPER_AFF_SHIFT) == aff) { + KASSERT(sc->gic_redists.pcpu[cpuid] != NULL, + ("Invalid pointer to per-CPU redistributor")); + /* Copy res contents to its final destination */ + *sc->gic_redists.pcpu[cpuid] = r_res; + if (bootverbose) { + device_printf(sc->dev, + "CPU%u Re-Distributor has been found\n", + cpuid); + } + return (0); + } + + r_bsh += (GICR_RD_BASE_SIZE + GICR_SGI_BASE_SIZE); + if ((typer & GICR_TYPER_VLPIS) != 0) { + r_bsh += + (GICR_VLPI_BASE_SIZE + GICR_RESERVED_SIZE); + } + + rman_set_bushandle(&r_res, r_bsh); + } while ((typer & GICR_TYPER_LAST) == 0); + } + + free(sc->gic_redists.pcpu[cpuid], M_GIC_V3); + device_printf(sc->dev, "No Re-Distributor found for CPU%u\n", cpuid); + return (ENXIO); +} + +static int +gic_v3_redist_wake(struct gic_v3_softc *sc) +{ + uint32_t waker; + size_t us_left = 1000000; + + waker = gic_r_read(sc, 4, GICR_WAKER); + /* Wake up Re-Distributor for this CPU */ + waker &= ~GICR_WAKER_PS; + gic_r_write(sc, 4, GICR_WAKER, waker); + /* + * When clearing ProcessorSleep bit it is required to wait for + * ChildrenAsleep to become zero following the processor power-on. + */ + while ((gic_r_read(sc, 4, GICR_WAKER) & GICR_WAKER_CA) != 0) { + DELAY(1); + if (us_left-- == 0) { + panic("Could not wake Re-Distributor for CPU%u", + PCPU_GET(cpuid)); + } + } + + if (bootverbose) { + device_printf(sc->dev, "CPU%u Re-Distributor woke up\n", + PCPU_GET(cpuid)); + } + + return (0); +} + +static int +gic_v3_redist_init(struct gic_v3_softc *sc) +{ + int err; + size_t i; + + err = gic_v3_redist_find(sc); + if (err != 0) + return (err); + + err = gic_v3_redist_wake(sc); + if (err != 0) + return (err); + + /* Disable SPIs */ + gic_r_write(sc, 4, GICR_SGI_BASE_SIZE + GICR_ICENABLER0, + GICR_I_ENABLER_PPI_MASK); + /* Enable SGIs */ + gic_r_write(sc, 4, GICR_SGI_BASE_SIZE + GICR_ISENABLER0, + GICR_I_ENABLER_SGI_MASK); + + /* Set priority for SGIs and PPIs */ + for (i = 0; i <= GIC_LAST_PPI; i += GICR_I_PER_IPRIORITYn) { + gic_r_write(sc, 4, GICR_SGI_BASE_SIZE + GICD_IPRIORITYR(i), + GIC_PRIORITY_MAX); + } + + gic_v3_wait_for_rwp(sc, REDIST); + + return (0); +} Added: head/sys/arm64/arm64/gic_v3_fdt.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm64/arm64/gic_v3_fdt.c Wed May 13 18:57:03 2015 (r282867) @@ -0,0 +1,124 @@ +/*- + * Copyright (c) 2015 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Semihalf under + * the sponsorship of the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include + +#include +#include +#include +#include + +#include "pic_if.h" + +#include "gic_v3_reg.h" +#include "gic_v3_var.h" + +/* + * FDT glue. + */ +static int gic_v3_fdt_probe(device_t); +static int gic_v3_fdt_attach(device_t); + +static device_method_t gic_v3_fdt_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, gic_v3_fdt_probe), + DEVMETHOD(device_attach, gic_v3_fdt_attach), + + /* End */ + DEVMETHOD_END +}; + +DEFINE_CLASS_1(gic_v3, gic_v3_fdt_driver, gic_v3_fdt_methods, + sizeof(struct gic_v3_softc), gic_v3_driver); + +static devclass_t gic_v3_fdt_devclass; + +EARLY_DRIVER_MODULE(gic_v3, simplebus, gic_v3_fdt_driver, gic_v3_fdt_devclass, + 0, 0, BUS_PASS_INTERRUPT + BUS_PASS_ORDER_MIDDLE); +EARLY_DRIVER_MODULE(gic_v3, ofwbus, gic_v3_fdt_driver, gic_v3_fdt_devclass, + 0, 0, BUS_PASS_INTERRUPT + BUS_PASS_ORDER_MIDDLE); + +/* + * Device interface. + */ +static int +gic_v3_fdt_probe(device_t dev) +{ + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (!ofw_bus_is_compatible(dev, "arm,gic-v3")) + return (ENXIO); + + device_set_desc(dev, GIC_V3_DEVSTR); + return (BUS_PROBE_DEFAULT); +} + +static int +gic_v3_fdt_attach(device_t dev) +{ + struct gic_v3_softc *sc; + pcell_t redist_regions; + int err; + + sc = device_get_softc(dev); + sc->dev = dev; + + /* + * Recover number of the Re-Distributor regions. + */ + if (OF_getencprop(ofw_bus_get_node(dev), "#redistributor-regions", + &redist_regions, sizeof(redist_regions)) <= 0) + sc->gic_redists.nregions = 1; + else + sc->gic_redists.nregions = redist_regions; + + err = gic_v3_attach(dev); + if (err) + goto error; + + return (err); + +error: + if (bootverbose) { + device_printf(dev, + "Failed to attach. Error %d\n", err); + } + /* Failure so free resources */ + gic_v3_detach(dev); + + return (err); +} Added: head/sys/arm64/arm64/gic_v3_reg.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm64/arm64/gic_v3_reg.h Wed May 13 18:57:03 2015 (r282867) @@ -0,0 +1,185 @@ +/*- + * Copyright (c) 2015 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Semihalf under + * the sponsorship of the FreeBSD Foundation. + * + * 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$ + */ + +#ifndef _GIC_V3_REG_H_ +#define _GIC_V3_REG_H_ + +/* + * Maximum number of interrupts + * supported by GIC (including SGIs, PPIs and SPIs) + */ +#define GIC_I_NUM_MAX (1020) +/* + * Priority MAX/MIN values + */ +#define GIC_PRIORITY_MAX (0x00UL) +/* Upper value is determined by LPI max priority */ +#define GIC_PRIORITY_MIN (0xFCUL) + +/* Numbers for software generated interrupts */ +#define GIC_FIRST_SGI (0) +#define GIC_LAST_SGI (15) +/* Numbers for private peripheral interrupts */ +#define GIC_FIRST_PPI (16) +#define GIC_LAST_PPI (31) +/* Numbers for spared peripheral interrupts */ +#define GIC_FIRST_SPI (32) +#define GIC_LAST_SPI (1019) +/* Numbers for local peripheral interrupts */ +#define GIC_FIRST_LPI (8192) + +/* + * Registers (v2/v3) + */ +#define GICD_CTLR (0x0000) +#define GICD_CTLR_G1 (1 << 0) +#define GICD_CTLR_G1A (1 << 1) +#define GICD_CTLR_ARE_NS (1 << 4) +#define GICD_CTLR_RWP (1 << 31) + +#define GICD_TYPER (0x0004) +#define GICD_TYPER_IDBITS(n) ((((n) >> 19) & 0x1F) + 1) +#define GICD_TYPER_I_NUM(n) ((((n) & 0xF1) + 1) * 32) + +#define GICD_ISENABLER(n) (0x0100 + (((n) >> 5) * 4)) +#define GICD_I_PER_ISENABLERn (32) + +#define GICD_ICENABLER(n) (0x0180 + (((n) >> 5) * 4)) +#define GICD_IPRIORITYR(n) (0x0400 + (((n) >> 2) * 4)) +#define GICD_I_PER_IPRIORITYn (4) + +#define GICD_I_MASK(n) (1 << ((n) % 32)) + +#define GICD_ICFGR(n) (0x0C00 + (((n) >> 4) * 4)) +/* First bit is a polarity bit (0 - low, 1 - high) */ +#define GICD_ICFGR_POL_LOW (0 << 0) +#define GICD_ICFGR_POL_HIGH (1 << 0) +#define GICD_ICFGR_POL_MASK (0x1) +/* Second bit is a trigger bit (0 - level, 1 - edge) */ +#define GICD_ICFGR_TRIG_LVL (0 << 1) +#define GICD_ICFGR_TRIG_EDGE (1 << 1) +#define GICD_ICFGR_TRIG_MASK (0x2) + +#define GICD_I_PER_ICFGRn (16) + +/* + * Registers (v3) + */ +#define GICD_IROUTER(n) (0x6000 + ((n) * 8)) +#define GICD_PIDR2 (0xFFE8) + +#define GICR_PIDR2_ARCH_MASK (0xF0) +#define GICR_PIDR2_ARCH_GICv3 (0x30) +#define GICR_PIDR2_ARCH_GICv4 (0x40) + +/* Redistributor registers */ +#define GICR_PIDR2 GICD_PIDR2 + +#define GICR_TYPER (0x0008) +#define GICR_TYPER_VLPIS (1 << 1) +#define GICR_TYPER_LAST (1 << 4) +#define GICR_TYPER_AFF_SHIFT (32) + +#define GICR_WAKER (0x0014) +#define GICR_WAKER_PS (1 << 1) /* Processor sleep */ +#define GICR_WAKER_CA (1 << 2) /* Children asleep */ + +/* Re-distributor registers for SGIs and PPIs */ +#define GICR_RD_BASE_SIZE PAGE_SIZE_64K +#define GICR_SGI_BASE_SIZE PAGE_SIZE_64K +#define GICR_VLPI_BASE_SIZE PAGE_SIZE_64K +#define GICR_RESERVED_SIZE PAGE_SIZE_64K + +#define GICR_ISENABLER0 (0x0100) +#define GICR_ICENABLER0 (0x0180) +#define GICR_I_ENABLER_SGI_MASK (0x0000FFFF) +#define GICR_I_ENABLER_PPI_MASK (0xFFFF0000) + +#define GICR_I_PER_IPRIORITYn (GICD_I_PER_IPRIORITYn) + +/* + * CPU interface + */ + +/* + * Registers list (ICC_xyz_EL1): + * + * PMR - Priority Mask Register + * * interrupts of priority higher than specified + * in this mask will be signalled to the CPU. + * (0xff - lowest possible prio., 0x00 - highest prio.) + * + * CTLR - Control Register + * * controls behavior of the CPU interface and displays + * implemented features. + * + * IGRPEN1 - Interrupt Group 1 Enable Register + * + * IAR1 - Interrupt Acknowledge Register Group 1 + * * contains number of the highest priority pending + * interrupt from the Group 1. + * + * EOIR1 - End of Interrupt Register Group 1 + * * Writes inform CPU interface about completed Group 1 + * interrupts processing. + */ + +#define gic_icc_write(reg, val) \ +do { \ + WRITE_SPECIALREG(ICC_ ##reg ##_EL1, val); \ + isb(); \ +} while (0) + +#define gic_icc_read(reg) \ +({ \ + uint64_t val; \ + \ + val = READ_SPECIALREG(ICC_ ##reg ##_EL1); \ + (val); \ +}) + +#define gic_icc_set(reg, mask) \ +do { \ + uint64_t val; \ + val = gic_icc_read(reg); \ + val |= (mask); \ + gic_icc_write(reg, val); \ +} while (0) + +#define gic_icc_clear(reg, mask) \ +do { \ + uint64_t val; \ + val = gic_icc_read(reg); \ + val &= ~(mask); \ + gic_icc_write(reg, val); \ +} while (0) + +#endif /* _GIC_V3_REG_H_ */ Added: head/sys/arm64/arm64/gic_v3_var.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm64/arm64/gic_v3_var.h Wed May 13 18:57:03 2015 (r282867) @@ -0,0 +1,106 @@ +/*- + * Copyright (c) 2015 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Semihalf under + * the sponsorship of the FreeBSD Foundation. + * + * 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$ + */ + +#ifndef _GIC_V3_VAR_H_ +#define _GIC_V3_VAR_H_ + +#define GIC_V3_DEVSTR "ARM Generic Interrupt Controller v3.0" + +DECLARE_CLASS(gic_v3_driver); + +struct gic_redists { + /* + * Re-Distributor region description. + * We will have few of those depending + * on the #redistributor-regions property in FDT. + */ + struct resource ** regions; + /* Number of Re-Distributor regions */ + u_int nregions; + /* Per-CPU Re-Distributor handler */ + struct resource * pcpu[MAXCPU]; +}; + +struct gic_v3_softc { + device_t dev; + struct resource ** gic_res; + struct mtx gic_mtx; + /* Distributor */ + struct resource * gic_dist; + /* Re-Distributors */ + struct gic_redists gic_redists; + + u_int gic_nirqs; + u_int gic_idbits; + + boolean_t gic_registered; +}; + +MALLOC_DECLARE(M_GIC_V3); + +/* Device methods */ +int gic_v3_attach(device_t dev); +int gic_v3_detach(device_t dev); + +/* + * GIC Distributor accessors. + * Notice that only GIC sofc can be passed. + */ +#define gic_d_read(sc, len, reg) \ +({ \ + bus_read_##len(sc->gic_dist, reg); \ +}) + +#define gic_d_write(sc, len, reg, val) \ +({ \ + bus_write_##len(sc->gic_dist, reg, val);\ +}) + +/* GIC Re-Distributor accessors (per-CPU) */ +#define gic_r_read(sc, len, reg) \ +({ \ + u_int cpu = PCPU_GET(cpuid); \ + \ + bus_read_##len( \ + sc->gic_redists.pcpu[cpu], \ + reg); \ +}) + +#define gic_r_write(sc, len, reg, val) \ +({ \ + u_int cpu = PCPU_GET(cpuid); \ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed May 13 20:50:59 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 813766DB; Wed, 13 May 2015 20:50:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6FB3314AC; Wed, 13 May 2015 20:50:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4DKoxJB006743; Wed, 13 May 2015 20:50:59 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4DKoxWq006742; Wed, 13 May 2015 20:50:59 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201505132050.t4DKoxWq006742@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Wed, 13 May 2015 20:50:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282868 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 13 May 2015 20:50:59 -0000 Author: bapt Date: Wed May 13 20:50:58 2015 New Revision: 282868 URL: https://svnweb.freebsd.org/changeset/base/282868 Log: Fix typo Reported by: Trond Endrestøl Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Wed May 13 18:57:03 2015 (r282867) +++ head/ObsoleteFiles.inc Wed May 13 20:50:58 2015 (r282868) @@ -468,7 +468,7 @@ OLD_FILES+=usr/lib/private/libldns.so OLD_FILES+=usr/lib/private/libldns_p.a OLD_FILES+=usr/lib/private/libssh.a OLD_FILES+=usr/lib/private/libssh.so -OLD_FILES+=usr/lib/private/libssh.p.a +OLD_FILES+=usr/lib/private/libssh_p.a OLD_FILES+=usr/lib/private/libunbound.a OLD_FILES+=usr/lib/private/libunbound.so OLD_FILES+=usr/lib/private/libunbound_p.a From owner-svn-src-all@FreeBSD.ORG Wed May 13 21:38:40 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0A3983FA; Wed, 13 May 2015 21:38:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D303B1989; Wed, 13 May 2015 21:38:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4DLcd0m029474; Wed, 13 May 2015 21:38:39 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4DLcd5o029473; Wed, 13 May 2015 21:38:39 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201505132138.t4DLcd5o029473@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Wed, 13 May 2015 21:38:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282869 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 13 May 2015 21:38:40 -0000 Author: bapt Date: Wed May 13 21:38:39 2015 New Revision: 282869 URL: https://svnweb.freebsd.org/changeset/base/282869 Log: Handle lib32 libraries which should have been removed in 20140807 Reported by: Trond Endrestøl Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Wed May 13 20:50:58 2015 (r282868) +++ head/ObsoleteFiles.inc Wed May 13 21:38:39 2015 (r282869) @@ -448,6 +448,33 @@ OLD_LIBS+=usr/lib32/libopie.so.7 OLD_FILES+=usr/bin/otp-sha OLD_FILES+=usr/share/man/man1/otp-sha.1.gz # 20140807: Remove private lib files that should not be installed. +OLD_FILES+=usr/lib32/private/libatf-c.a +OLD_FILES+=usr/lib32/private/libatf-c.so +OLD_FILES+=usr/lib32/private/libatf-c_p.a +OLD_FILES+=usr/lib32/private/libatf-c++.a +OLD_FILES+=usr/lib32/private/libatf-c++.so +OLD_FILES+=usr/lib32/private/libatf-c++_p.a +OLD_FILES+=usr/lib32/private/libbsdstat.a +OLD_FILES+=usr/lib32/private/libbsdstat.so +OLD_FILES+=usr/lib32/private/libbsdstat_p.a +OLD_FILES+=usr/lib32/private/libheimipcc.a +OLD_FILES+=usr/lib32/private/libheimipcc.so +OLD_FILES+=usr/lib32/private/libheimipcc_p.a +OLD_FILES+=usr/lib32/private/libheimipcs.a +OLD_FILES+=usr/lib32/private/libheimipcs.so +OLD_FILES+=usr/lib32/private/libheimipcs_p.a +OLD_FILES+=usr/lib32/private/libldns.a +OLD_FILES+=usr/lib32/private/libldns.so +OLD_FILES+=usr/lib32/private/libldns_p.a +OLD_FILES+=usr/lib32/private/libssh.a +OLD_FILES+=usr/lib32/private/libssh.so +OLD_FILES+=usr/lib32/private/libssh_p.a +OLD_FILES+=usr/lib32/private/libunbound.a +OLD_FILES+=usr/lib32/private/libunbound.so +OLD_FILES+=usr/lib32/private/libunbound_p.a +OLD_FILES+=usr/lib32/private/libucl.a +OLD_FILES+=usr/lib32/private/libucl.so +OLD_FILES+=usr/lib32/private/libucl_p.a OLD_FILES+=usr/lib/private/libatf-c.a OLD_FILES+=usr/lib/private/libatf-c.so OLD_FILES+=usr/lib/private/libatf-c_p.a From owner-svn-src-all@FreeBSD.ORG Wed May 13 22:36:01 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4D74A2D7; Wed, 13 May 2015 22:36:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2FE961045; Wed, 13 May 2015 22:36:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4DMa1LY058995; Wed, 13 May 2015 22:36:01 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4DMa0d1058992; Wed, 13 May 2015 22:36:00 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201505132236.t4DMa0d1058992@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 13 May 2015 22:36:00 +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: r282870 - stable/10/usr.sbin/freebsd-update 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.20 Precedence: list List-Id: "SVN commit messages 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, 13 May 2015 22:36:01 -0000 Author: delphij Date: Wed May 13 22:36:00 2015 New Revision: 282870 URL: https://svnweb.freebsd.org/changeset/base/282870 Log: MFC r279571,281563 (allanjude): Add a new safetly belt to freebsd-update to prevent a user doing a minor update (-pX) while having an unfinished major upgrade (9.x to 9.y) Safetly belt can be disabled with the -F flag Additionally, add the --not-running-from-cron flag they bypasses the TTY requirement, and allows freebsd-update to be invoked by orchestration frameworks, scripts, or otherwise. PR: 196760 Relnotes: yes Sponsored by: ScaleEngine Inc. Modified: stable/10/usr.sbin/freebsd-update/freebsd-update.8 stable/10/usr.sbin/freebsd-update/freebsd-update.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/freebsd-update/freebsd-update.8 ============================================================================== --- stable/10/usr.sbin/freebsd-update/freebsd-update.8 Wed May 13 21:38:39 2015 (r282869) +++ stable/10/usr.sbin/freebsd-update/freebsd-update.8 Wed May 13 22:36:00 2015 (r282870) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 14, 2010 +.Dd March 2, 2015 .Dt FREEBSD-UPDATE 8 .Os FreeBSD .Sh NAME @@ -36,10 +36,12 @@ .Op Fl b Ar basedir .Op Fl d Ar workdir .Op Fl f Ar conffile +.Op Fl F .Op Fl k Ar KEY .Op Fl r Ar newrelease .Op Fl s Ar server .Op Fl t Ar address +.Op Fl -not-running-from-cron .Cm command ... .Sh DESCRIPTION The @@ -54,16 +56,16 @@ by the .Fx Release Engineering Team, e.g., .Fx -7.3-RELEASE and +9.3-RELEASE and .Fx -8.0-RELEASE, but not +10.1-RELEASE, but not .Fx -6.3-STABLE or +9.3-STABLE or .Fx -9.0-CURRENT. +11-CURRENT. .Sh OPTIONS The following options are supported: -.Bl -tag -width "-f conffile" +.Bl -tag -width "-r newrelease" .It Fl b Ar basedir Operate on a system mounted at .Ar basedir . @@ -81,6 +83,10 @@ Read configuration options from .Ar conffile . (default: .Pa /etc/freebsd-update.conf ) +.It Fl F +Force +.Nm Cm fetch +to proceed where it normally would not, such as an unfinished upgrade .It Fl k Ar KEY Trust an RSA key with SHA256 of .Ar KEY . @@ -98,12 +104,21 @@ Mail output of command, if any, to .Ar address . (default: root, or as given in the configuration file.) +.It Fl -not-running-from-cron +Force +.Nm Cm fetch +to proceed when there is no controlling tty. +This is for use by automated scripts and orchestration tools. +Please do not run +.Nm Cm fetch +from crontab or similar using this flag, see: +.Nm Cm cron .El .Sh COMMANDS The .Cm command can be any one of the following: -.Bl -tag -width "-f conffile" +.Bl -tag -width "rollback" .It Cm fetch Based on the currently installed world and the configuration options set, fetch all available binary updates. Modified: stable/10/usr.sbin/freebsd-update/freebsd-update.sh ============================================================================== --- stable/10/usr.sbin/freebsd-update/freebsd-update.sh Wed May 13 21:38:39 2015 (r282869) +++ stable/10/usr.sbin/freebsd-update/freebsd-update.sh Wed May 13 22:36:00 2015 (r282870) @@ -43,12 +43,15 @@ Options: (default: /var/db/freebsd-update/) -f conffile -- Read configuration options from conffile (default: /etc/freebsd-update.conf) + -F -- Force a fetch operation to proceed -k KEY -- Trust an RSA key with SHA256 hash of KEY -r release -- Target for upgrade (e.g., 6.2-RELEASE) -s server -- Server from which to fetch updates (default: update.FreeBSD.org) -t address -- Mail output of cron command, if any, to address (default: root) + --not-running-from-cron + -- Run without a tty, for use by automated tools Commands: fetch -- Fetch updates from server cron -- Sleep rand(3600) seconds, fetch updates, and send an @@ -399,6 +402,12 @@ init_params () { # No commands specified yet COMMANDS="" + + # Force fetch to proceed + FORCEFETCH=0 + + # Run without a TTY + NOTTYOK=0 } # Parse the command line @@ -411,6 +420,12 @@ parse_cmdline () { if [ ! -z "${CONFFILE}" ]; then usage; fi shift; CONFFILE="$1" ;; + -F) + FORCEFETCH=1 + ;; + --not-running-from-cron) + NOTTYOK=1 + ;; # Configuration file equivalents -b) @@ -665,6 +680,14 @@ fetch_check_params () { echo "(Did you mean 'upgrade' instead?)" exit 1 fi + + # Check that we have updates ready to install + if [ -f ${BDHASH}-install/kerneldone -a $FORCEFETCH -eq 0 ]; then + echo "You have a partially completed upgrade pending" + echo "Run '$0 install' first." + echo "Run '$0 fetch -F' to proceed anyway." + exit 1 + fi } # Perform sanity checks etc. before fetching upgrades. @@ -3202,7 +3225,7 @@ get_params () { # Fetch command. Make sure that we're being called # interactively, then run fetch_check_params and fetch_run cmd_fetch () { - if [ ! -t 0 ]; then + if [ ! -t 0 -a $NOTTYOK -eq 0 ]; then echo -n "`basename $0` fetch should not " echo "be run non-interactively." echo "Run `basename $0` cron instead." From owner-svn-src-all@FreeBSD.ORG Wed May 13 22:36:53 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 86E5B427; Wed, 13 May 2015 22:36:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 68757105A; Wed, 13 May 2015 22:36:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4DMarmT059189; Wed, 13 May 2015 22:36:53 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4DMaqgD059187; Wed, 13 May 2015 22:36:52 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201505132236.t4DMaqgD059187@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 13 May 2015 22:36:52 +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: r282871 - stable/9/usr.sbin/freebsd-update 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.20 Precedence: list List-Id: "SVN commit messages 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, 13 May 2015 22:36:53 -0000 Author: delphij Date: Wed May 13 22:36:52 2015 New Revision: 282871 URL: https://svnweb.freebsd.org/changeset/base/282871 Log: MFC r279571,281563 (allanjude): Add a new safetly belt to freebsd-update to prevent a user doing a minor update (-pX) while having an unfinished major upgrade (9.x to 9.y) Safetly belt can be disabled with the -F flag Additionally, add the --not-running-from-cron flag they bypasses the TTY requirement, and allows freebsd-update to be invoked by orchestration frameworks, scripts, or otherwise. PR: 196760 Modified: stable/9/usr.sbin/freebsd-update/freebsd-update.8 stable/9/usr.sbin/freebsd-update/freebsd-update.sh Directory Properties: stable/9/usr.sbin/freebsd-update/ (props changed) Modified: stable/9/usr.sbin/freebsd-update/freebsd-update.8 ============================================================================== --- stable/9/usr.sbin/freebsd-update/freebsd-update.8 Wed May 13 22:36:00 2015 (r282870) +++ stable/9/usr.sbin/freebsd-update/freebsd-update.8 Wed May 13 22:36:52 2015 (r282871) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 14, 2010 +.Dd March 2, 2015 .Dt FREEBSD-UPDATE 8 .Os FreeBSD .Sh NAME @@ -36,10 +36,12 @@ .Op Fl b Ar basedir .Op Fl d Ar workdir .Op Fl f Ar conffile +.Op Fl F .Op Fl k Ar KEY .Op Fl r Ar newrelease .Op Fl s Ar server .Op Fl t Ar address +.Op Fl -not-running-from-cron .Cm command ... .Sh DESCRIPTION The @@ -54,16 +56,16 @@ by the .Fx Release Engineering Team, e.g., .Fx -7.3-RELEASE and +9.3-RELEASE and .Fx -8.0-RELEASE, but not +10.1-RELEASE, but not .Fx -6.3-STABLE or +9.3-STABLE or .Fx -9.0-CURRENT. +11-CURRENT. .Sh OPTIONS The following options are supported: -.Bl -tag -width "-f conffile" +.Bl -tag -width "-r newrelease" .It Fl b Ar basedir Operate on a system mounted at .Ar basedir . @@ -81,6 +83,10 @@ Read configuration options from .Ar conffile . (default: .Pa /etc/freebsd-update.conf ) +.It Fl F +Force +.Nm Cm fetch +to proceed where it normally would not, such as an unfinished upgrade .It Fl k Ar KEY Trust an RSA key with SHA256 of .Ar KEY . @@ -98,12 +104,21 @@ Mail output of command, if any, to .Ar address . (default: root, or as given in the configuration file.) +.It Fl -not-running-from-cron +Force +.Nm Cm fetch +to proceed when there is no controlling tty. +This is for use by automated scripts and orchestration tools. +Please do not run +.Nm Cm fetch +from crontab or similar using this flag, see: +.Nm Cm cron .El .Sh COMMANDS The .Cm command can be any one of the following: -.Bl -tag -width "-f conffile" +.Bl -tag -width "rollback" .It Cm fetch Based on the currently installed world and the configuration options set, fetch all available binary updates. Modified: stable/9/usr.sbin/freebsd-update/freebsd-update.sh ============================================================================== --- stable/9/usr.sbin/freebsd-update/freebsd-update.sh Wed May 13 22:36:00 2015 (r282870) +++ stable/9/usr.sbin/freebsd-update/freebsd-update.sh Wed May 13 22:36:52 2015 (r282871) @@ -43,12 +43,15 @@ Options: (default: /var/db/freebsd-update/) -f conffile -- Read configuration options from conffile (default: /etc/freebsd-update.conf) + -F -- Force a fetch operation to proceed -k KEY -- Trust an RSA key with SHA256 hash of KEY -r release -- Target for upgrade (e.g., 6.2-RELEASE) -s server -- Server from which to fetch updates (default: update.FreeBSD.org) -t address -- Mail output of cron command, if any, to address (default: root) + --not-running-from-cron + -- Run without a tty, for use by automated tools Commands: fetch -- Fetch updates from server cron -- Sleep rand(3600) seconds, fetch updates, and send an @@ -399,6 +402,12 @@ init_params () { # No commands specified yet COMMANDS="" + + # Force fetch to proceed + FORCEFETCH=0 + + # Run without a TTY + NOTTYOK=0 } # Parse the command line @@ -411,6 +420,12 @@ parse_cmdline () { if [ ! -z "${CONFFILE}" ]; then usage; fi shift; CONFFILE="$1" ;; + -F) + FORCEFETCH=1 + ;; + --not-running-from-cron) + NOTTYOK=1 + ;; # Configuration file equivalents -b) @@ -665,6 +680,14 @@ fetch_check_params () { echo "(Did you mean 'upgrade' instead?)" exit 1 fi + + # Check that we have updates ready to install + if [ -f ${BDHASH}-install/kerneldone -a $FORCEFETCH -eq 0 ]; then + echo "You have a partially completed upgrade pending" + echo "Run '$0 install' first." + echo "Run '$0 fetch -F' to proceed anyway." + exit 1 + fi } # Perform sanity checks etc. before fetching upgrades. @@ -3202,7 +3225,7 @@ get_params () { # Fetch command. Make sure that we're being called # interactively, then run fetch_check_params and fetch_run cmd_fetch () { - if [ ! -t 0 ]; then + if [ ! -t 0 -a $NOTTYOK -eq 0 ]; then echo -n "`basename $0` fetch should not " echo "be run non-interactively." echo "Run `basename $0` cron instead." From owner-svn-src-all@FreeBSD.ORG Wed May 13 22:39:31 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 30A1359A; Wed, 13 May 2015 22:39:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1DFB0107A; Wed, 13 May 2015 22:39:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4DMdUO0059632; Wed, 13 May 2015 22:39:30 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4DMdUCN059630; Wed, 13 May 2015 22:39:30 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201505132239.t4DMdUCN059630@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 13 May 2015 22:39:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r282872 - stable/8/usr.sbin/freebsd-update X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 13 May 2015 22:39:31 -0000 Author: delphij Date: Wed May 13 22:39:29 2015 New Revision: 282872 URL: https://svnweb.freebsd.org/changeset/base/282872 Log: MFC: Sync freebsd-update with -HEAD. Modified: stable/8/usr.sbin/freebsd-update/freebsd-update.8 stable/8/usr.sbin/freebsd-update/freebsd-update.sh Directory Properties: stable/8/usr.sbin/freebsd-update/ (props changed) Modified: stable/8/usr.sbin/freebsd-update/freebsd-update.8 ============================================================================== --- stable/8/usr.sbin/freebsd-update/freebsd-update.8 Wed May 13 22:36:52 2015 (r282871) +++ stable/8/usr.sbin/freebsd-update/freebsd-update.8 Wed May 13 22:39:29 2015 (r282872) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 14, 2010 +.Dd March 2, 2015 .Dt FREEBSD-UPDATE 8 .Os FreeBSD .Sh NAME @@ -36,10 +36,12 @@ .Op Fl b Ar basedir .Op Fl d Ar workdir .Op Fl f Ar conffile +.Op Fl F .Op Fl k Ar KEY .Op Fl r Ar newrelease .Op Fl s Ar server .Op Fl t Ar address +.Op Fl -not-running-from-cron .Cm command ... .Sh DESCRIPTION The @@ -49,21 +51,21 @@ updates to the FreeBSD base system. Note that updates are only available if they are being built for the FreeBSD release and architecture being used; in particular, the .Fx -Security Team only builds updates for releases shipped in binary form +Security Team only builds updates for releases shipped in binary form by the .Fx Release Engineering Team, e.g., .Fx -7.3-RELEASE and +9.3-RELEASE and .Fx -8.0, but not +10.1-RELEASE, but not .Fx -6.3-STABLE or +9.3-STABLE or .Fx -9.0-CURRENT. +11-CURRENT. .Sh OPTIONS The following options are supported: -.Bl -tag -width "-f conffile" +.Bl -tag -width "-r newrelease" .It Fl b Ar basedir Operate on a system mounted at .Ar basedir . @@ -81,6 +83,10 @@ Read configuration options from .Ar conffile . (default: .Pa /etc/freebsd-update.conf ) +.It Fl F +Force +.Nm Cm fetch +to proceed where it normally would not, such as an unfinished upgrade .It Fl k Ar KEY Trust an RSA key with SHA256 of .Ar KEY . @@ -98,13 +104,21 @@ Mail output of command, if any, to .Ar address . (default: root, or as given in the configuration file.) +.It Fl -not-running-from-cron +Force +.Nm Cm fetch +to proceed when there is no controlling tty. +This is for use by automated scripts and orchestration tools. +Please do not run +.Nm Cm fetch +from crontab or similar using this flag, see: +.Nm Cm cron .El .Sh COMMANDS The .Cm command can be any one of the following: -.Pp -.Bl -tag -width "-f conffile" +.Bl -tag -width "rollback" .It Cm fetch Based on the currently installed world and the configuration options set, fetch all available binary updates. @@ -128,6 +142,11 @@ Fetch files necessary for upgrading to a Before using this command, make sure that you read the announcement and release notes for the new release in case there are any special steps needed for upgrading. +Note that this command may require up to 500 MB of space in +.Ar workdir +depending on which components of the +.Fx +base system are installed. .It Cm install Install the most recently fetched updates or upgrade. .It Cm rollback @@ -149,7 +168,7 @@ other than 3AM, to avoid overly imposing on the server(s) hosting the updates. .It In spite of its name, -.Cm +.Nm IDS should not be relied upon as an "Intrusion Detection System", since if the system has been tampered with it cannot be trusted to operate correctly. @@ -158,11 +177,11 @@ purposes, make sure you boot from a secu .El .Sh FILES .Bl -tag -width "/etc/freebsd-update.conf" -.It /etc/freebsd-update.conf +.It Pa /etc/freebsd-update.conf Default location of the .Nm configuration file. -.It /var/db/freebsd-update/ +.It Pa /var/db/freebsd-update/ Default location where .Nm stores temporary files and downloaded updates. @@ -170,4 +189,4 @@ stores temporary files and downloaded up .Sh SEE ALSO .Xr freebsd-update.conf 5 .Sh AUTHORS -.An Colin Percival Aq cperciva@FreeBSD.org +.An Colin Percival Aq Mt cperciva@FreeBSD.org Modified: stable/8/usr.sbin/freebsd-update/freebsd-update.sh ============================================================================== --- stable/8/usr.sbin/freebsd-update/freebsd-update.sh Wed May 13 22:36:52 2015 (r282871) +++ stable/8/usr.sbin/freebsd-update/freebsd-update.sh Wed May 13 22:39:29 2015 (r282872) @@ -43,12 +43,15 @@ Options: (default: /var/db/freebsd-update/) -f conffile -- Read configuration options from conffile (default: /etc/freebsd-update.conf) + -F -- Force a fetch operation to proceed -k KEY -- Trust an RSA key with SHA256 hash of KEY -r release -- Target for upgrade (e.g., 6.2-RELEASE) -s server -- Server from which to fetch updates (default: update.FreeBSD.org) -t address -- Mail output of cron command, if any, to address (default: root) + --not-running-from-cron + -- Run without a tty, for use by automated tools Commands: fetch -- Fetch updates from server cron -- Sleep rand(3600) seconds, fetch updates, and send an @@ -284,6 +287,9 @@ config_TargetRelease () { else return 1 fi + if echo ${TARGETRELEASE} | grep -qE '^[0-9.]+$'; then + TARGETRELEASE="${TARGETRELEASE}-RELEASE" + fi } # Define what happens to output of utilities @@ -396,6 +402,12 @@ init_params () { # No commands specified yet COMMANDS="" + + # Force fetch to proceed + FORCEFETCH=0 + + # Run without a TTY + NOTTYOK=0 } # Parse the command line @@ -408,6 +420,12 @@ parse_cmdline () { if [ ! -z "${CONFFILE}" ]; then usage; fi shift; CONFFILE="$1" ;; + -F) + FORCEFETCH=1 + ;; + --not-running-from-cron) + NOTTYOK=1 + ;; # Configuration file equivalents -b) @@ -569,7 +587,7 @@ fetch_setup_verboselevel () { # running *-p[0-9]+, strip off the last part; if the # user is running -SECURITY, call it -RELEASE. Chdir # into the working directory. -fetch_check_params () { +fetchupgrade_check_params () { export HTTP_USER_AGENT="freebsd-update (${COMMAND}, `uname -r`)" _SERVERNAME_z=\ @@ -577,6 +595,7 @@ fetch_check_params () { _KEYPRINT_z="Key must be given via -k option or configuration file." _KEYPRINT_bad="Invalid key fingerprint: " _WORKDIR_bad="Directory does not exist or is not writable: " + _WORKDIR_bad2="Directory is not on a persistent filesystem: " if [ -z "${SERVERNAME}" ]; then echo -n "`basename $0`: " @@ -600,6 +619,13 @@ fetch_check_params () { echo ${WORKDIR} exit 1 fi + case `df -T ${WORKDIR}` in */dev/md[0-9]* | *tmpfs*) + echo -n "`basename $0`: " + echo -n "${_WORKDIR_bad2}" + echo ${WORKDIR} + exit 1 + ;; + esac chmod 700 ${WORKDIR} cd ${WORKDIR} || exit 1 @@ -652,9 +678,29 @@ fetch_check_params () { BDHASH=`echo ${BASEDIR} | sha256 -q` } +# Perform sanity checks etc. before fetching updates. +fetch_check_params () { + fetchupgrade_check_params + + if ! [ -z "${TARGETRELEASE}" ]; then + echo -n "`basename $0`: " + echo -n "-r option is meaningless with 'fetch' command. " + echo "(Did you mean 'upgrade' instead?)" + exit 1 + fi + + # Check that we have updates ready to install + if [ -f ${BDHASH}-install/kerneldone -a $FORCEFETCH -eq 0 ]; then + echo "You have a partially completed upgrade pending" + echo "Run '$0 install' first." + echo "Run '$0 fetch -F' to proceed anyway." + exit 1 + fi +} + # Perform sanity checks etc. before fetching upgrades. upgrade_check_params () { - fetch_check_params + fetchupgrade_check_params # Unless set otherwise, we're upgrading to the same kernel config. NKERNCONF=${KERNCONF} @@ -1185,7 +1231,7 @@ fetch_metadata_sanity () { # Some aliases to save space later: ${P} is a character which can # appear in a path; ${M} is the four numeric metadata fields; and # ${H} is a sha256 hash. - P="[-+./:=%@_[~[:alnum:]]" + P="[-+./:=,%@_[~[:alnum:]]" M="[0-9]+\|[0-9]+\|[0-9]+\|[0-9]+" H="[0-9a-f]{64}" @@ -1456,7 +1502,7 @@ fetch_inspect_system () { sort -k 3,3 -t '|' > $2.tmp rm filelist - # Check if an error occured during system inspection + # Check if an error occurred during system inspection if [ -f .err ]; then return 1 fi @@ -2240,6 +2286,19 @@ upgrade_oldall_to_oldnew () { mv $2 $3 } +# Helper for upgrade_merge: Return zero true iff the two files differ only +# in the contents of their RCS tags. +samef () { + X=`sed -E 's/\\$FreeBSD.*\\$/\$FreeBSD\$/' < $1 | ${SHA256}` + Y=`sed -E 's/\\$FreeBSD.*\\$/\$FreeBSD\$/' < $2 | ${SHA256}` + + if [ $X = $Y ]; then + return 0; + else + return 1; + fi +} + # From the list of "old" files in $1, merge changes in $2 with those in $3, # and update $3 to reflect the hashes of merged files. upgrade_merge () { @@ -2323,6 +2382,14 @@ upgrade_merge () { # Ask the user to handle any files which didn't merge. while read F; do + # If the installed file differs from the version in + # the old release only due to RCS tag expansion + # then just use the version in the new release. + if samef merge/old/${F} merge/${OLDRELNUM}/${F}; then + cp merge/${RELNUM}/${F} merge/new/${F} + continue + fi + cat <<-EOF The following file could not be merged automatically: ${F} @@ -2337,9 +2404,18 @@ manually... # Ask the user to confirm that he likes how the result # of merging files. while read F; do - # Skip files which haven't changed. - if [ -f merge/new/${F} ] && - cmp -s merge/old/${F} merge/new/${F}; then + # Skip files which haven't changed except possibly + # in their RCS tags. + if [ -f merge/old/${F} ] && [ -f merge/new/${F} ] && + samef merge/old/${F} merge/new/${F}; then + continue + fi + + # Skip files where the installed file differs from + # the old file only due to RCS tags. + if [ -f merge/old/${F} ] && + [ -f merge/${OLDRELNUM}/${F} ] && + samef merge/old/${F} merge/${OLDRELNUM}/${F}; then continue fi @@ -2526,6 +2602,10 @@ upgrade_run () { # Leave a note behind to tell the "install" command that the kernel # needs to be installed before the world. touch ${BDHASH}-install/kernelfirst + + # Remind the user that they need to run "freebsd-update install" + # to install the downloaded bits, in case they didn't RTFM. + echo "To install the downloaded upgrades, run \"$0 install\"." } # Make sure that all the file hashes mentioned in $@ have corresponding @@ -2577,14 +2657,14 @@ backup_kernel_finddir () { while true ; do # Pathname does not exist, so it is OK use that name # for backup directory. - if [ ! -e $BACKUPKERNELDIR ]; then + if [ ! -e $BASEDIR/$BACKUPKERNELDIR ]; then return 0 fi # If directory do exist, we only use if it has our # marker file. - if [ -d $BACKUPKERNELDIR -a \ - -e $BACKUPKERNELDIR/.freebsd-update ]; then + if [ -d $BASEDIR/$BACKUPKERNELDIR -a \ + -e $BASEDIR/$BACKUPKERNELDIR/.freebsd-update ]; then return 0 fi @@ -2592,7 +2672,7 @@ backup_kernel_finddir () { # the end and try again. CNT=$((CNT + 1)) if [ $CNT -gt 9 ]; then - echo "Could not find valid backup dir ($BACKUPKERNELDIR)" + echo "Could not find valid backup dir ($BASEDIR/$BACKUPKERNELDIR)" exit 1 fi BACKUPKERNELDIR="`echo $BACKUPKERNELDIR | sed -Ee 's/[0-9]\$//'`" @@ -2619,17 +2699,17 @@ backup_kernel () { # Remove old kernel backup files. If $BACKUPKERNELDIR was # "not ours", backup_kernel_finddir would have exited, so # deleting the directory content is as safe as we can make it. - if [ -d $BACKUPKERNELDIR ]; then - rm -fr $BACKUPKERNELDIR + if [ -d $BASEDIR/$BACKUPKERNELDIR ]; then + rm -fr $BASEDIR/$BACKUPKERNELDIR fi # Create directories for backup. - mkdir -p $BACKUPKERNELDIR - mtree -cdn -p "${KERNELDIR}" | \ - mtree -Ue -p "${BACKUPKERNELDIR}" > /dev/null + mkdir -p $BASEDIR/$BACKUPKERNELDIR + mtree -cdn -p "${BASEDIR}/${KERNELDIR}" | \ + mtree -Ue -p "${BASEDIR}/${BACKUPKERNELDIR}" > /dev/null # Mark the directory as having been created by freebsd-update. - touch $BACKUPKERNELDIR/.freebsd-update + touch $BASEDIR/$BACKUPKERNELDIR/.freebsd-update if [ $? -ne 0 ]; then echo "Could not create kernel backup directory" exit 1 @@ -2647,8 +2727,8 @@ backup_kernel () { fi # Backup all the kernel files using hardlinks. - (cd $KERNELDIR && find . -type f $FINDFILTER -exec \ - cp -pl '{}' ${BACKUPKERNELDIR}/'{}' \;) + (cd ${BASEDIR}/${KERNELDIR} && find . -type f $FINDFILTER -exec \ + cp -pl '{}' ${BASEDIR}/${BACKUPKERNELDIR}/'{}' \;) # Re-enable patchname expansion. set +f @@ -2746,7 +2826,7 @@ install_files () { # Update linker.hints if necessary if [ -s INDEX-OLD -o -s INDEX-NEW ]; then - kldxref -R /boot/ 2>/dev/null + kldxref -R ${BASEDIR}/boot/ 2>/dev/null fi # We've finished updating the kernel. @@ -2797,14 +2877,14 @@ Kernel updates have been installed. Ple install_delete INDEX-OLD INDEX-NEW || return 1 # Rebuild /etc/spwd.db and /etc/pwd.db if necessary. - if [ /etc/master.passwd -nt /etc/spwd.db ] || - [ /etc/master.passwd -nt /etc/pwd.db ]; then - pwd_mkdb /etc/master.passwd + if [ ${BASEDIR}/etc/master.passwd -nt ${BASEDIR}/etc/spwd.db ] || + [ ${BASEDIR}/etc/master.passwd -nt ${BASEDIR}/etc/pwd.db ]; then + pwd_mkdb -d ${BASEDIR}/etc ${BASEDIR}/etc/master.passwd fi # Rebuild /etc/login.conf.db if necessary. - if [ /etc/login.conf -nt /etc/login.conf.db ]; then - cap_mkdb /etc/login.conf + if [ ${BASEDIR}/etc/login.conf -nt ${BASEDIR}/etc/login.conf.db ]; then + cap_mkdb ${BASEDIR}/etc/login.conf fi # We've finished installing the world and deleting old files @@ -3011,21 +3091,8 @@ IDS_compare () { mv INDEX-NOTMATCHING.tmp INDEX-NOTMATCHING # Go through the lines and print warnings. - while read LINE; do - FPATH=`echo "${LINE}" | cut -f 1 -d '|'` - TYPE=`echo "${LINE}" | cut -f 2 -d '|'` - OWNER=`echo "${LINE}" | cut -f 3 -d '|'` - GROUP=`echo "${LINE}" | cut -f 4 -d '|'` - PERM=`echo "${LINE}" | cut -f 5 -d '|'` - HASH=`echo "${LINE}" | cut -f 6 -d '|'` - LINK=`echo "${LINE}" | cut -f 7 -d '|'` - P_TYPE=`echo "${LINE}" | cut -f 8 -d '|'` - P_OWNER=`echo "${LINE}" | cut -f 9 -d '|'` - P_GROUP=`echo "${LINE}" | cut -f 10 -d '|'` - P_PERM=`echo "${LINE}" | cut -f 11 -d '|'` - P_HASH=`echo "${LINE}" | cut -f 12 -d '|'` - P_LINK=`echo "${LINE}" | cut -f 13 -d '|'` - + local IFS='|' + while read FPATH TYPE OWNER GROUP PERM HASH LINK P_TYPE P_OWNER P_GROUP P_PERM P_HASH P_LINK; do # Warn about different object types. if ! [ "${TYPE}" = "${P_TYPE}" ]; then echo -n "${FPATH} is a " @@ -3153,7 +3220,7 @@ get_params () { # Fetch command. Make sure that we're being called # interactively, then run fetch_check_params and fetch_run cmd_fetch () { - if [ ! -t 0 ]; then + if [ ! -t 0 -a $NOTTYOK -eq 0 ]; then echo -n "`basename $0` fetch should not " echo "be run non-interactively." echo "Run `basename $0` cron instead." From owner-svn-src-all@FreeBSD.ORG Wed May 13 22:52:38 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0FA927C4; Wed, 13 May 2015 22:52:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F143C1251; Wed, 13 May 2015 22:52:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4DMqbAR068468; Wed, 13 May 2015 22:52:37 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4DMqaZq068459; Wed, 13 May 2015 22:52:36 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201505132252.t4DMqaZq068459@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 13 May 2015 22:52:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r282873 - in releng/10.1: . sys/conf sys/ufs/ffs usr.sbin/freebsd-update X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 13 May 2015 22:52:38 -0000 Author: delphij Date: Wed May 13 22:52:35 2015 New Revision: 282873 URL: https://svnweb.freebsd.org/changeset/base/282873 Log: Fix bug with freebsd-update(8) that does not ensure the previous upgrade was completed. [EN-15:04] Fix deadlock on reboot with UFS tuned with SU+J. [EN-15:05] Approved by: so Modified: releng/10.1/UPDATING releng/10.1/sys/conf/newvers.sh releng/10.1/sys/ufs/ffs/ffs_softdep.c releng/10.1/sys/ufs/ffs/ffs_vfsops.c releng/10.1/sys/ufs/ffs/softdep.h releng/10.1/usr.sbin/freebsd-update/freebsd-update.8 releng/10.1/usr.sbin/freebsd-update/freebsd-update.sh Modified: releng/10.1/UPDATING ============================================================================== --- releng/10.1/UPDATING Wed May 13 22:39:29 2015 (r282872) +++ releng/10.1/UPDATING Wed May 13 22:52:35 2015 (r282873) @@ -16,6 +16,14 @@ 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. +20150513: p10 FreeBSD-EN-15:04.freebsd-update + FreeBSD-EN-15:05.ufs + + Fix bug with freebsd-update(8) that does not ensure the previous + upgrade was completed. [EN-15:04] + + Fix deadlock on reboot with UFS tuned with SU+J. [EN-15:05] + 20150407: p9 FreeBSD-SA-15:04.igmp [revised] FreeBSD-SA-15:07.ntp FreeBSD-SA-15:08.bsdinstall Modified: releng/10.1/sys/conf/newvers.sh ============================================================================== --- releng/10.1/sys/conf/newvers.sh Wed May 13 22:39:29 2015 (r282872) +++ releng/10.1/sys/conf/newvers.sh Wed May 13 22:52:35 2015 (r282873) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="10.1" -BRANCH="RELEASE-p9" +BRANCH="RELEASE-p10" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi Modified: releng/10.1/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- releng/10.1/sys/ufs/ffs/ffs_softdep.c Wed May 13 22:39:29 2015 (r282872) +++ releng/10.1/sys/ufs/ffs/ffs_softdep.c Wed May 13 22:52:35 2015 (r282873) @@ -735,9 +735,10 @@ static struct malloc_type *memtype[] = { static void check_clear_deps(struct mount *); static void softdep_error(char *, int); static int softdep_process_worklist(struct mount *, int); -static int softdep_waitidle(struct mount *); +static int softdep_waitidle(struct mount *, int); static void drain_output(struct vnode *); static struct buf *getdirtybuf(struct buf *, struct rwlock *, int); +static int check_inodedep_free(struct inodedep *); static void clear_remove(struct mount *); static void clear_inodedeps(struct mount *); static void unlinked_inodedep(struct mount *, struct inodedep *); @@ -1377,6 +1378,10 @@ softdep_flush(addr) mp = (struct mount *)addr; ump = VFSTOUFS(mp); atomic_add_int(&stat_flush_threads, 1); + ACQUIRE_LOCK(ump); + ump->softdep_flags &= ~FLUSH_STARTING; + wakeup(&ump->softdep_flushtd); + FREE_LOCK(ump); if (print_threads) { if (stat_flush_threads == 1) printf("Running %s at pid %d\n", bufdaemonproc->p_comm, @@ -1389,7 +1394,7 @@ softdep_flush(addr) VFSTOUFS(mp)->softdep_jblocks->jb_suspended)) kthread_suspend_check(); ACQUIRE_LOCK(ump); - if ((ump->softdep_flags & FLUSH_CLEANUP) == 0) + if ((ump->softdep_flags & (FLUSH_CLEANUP | FLUSH_EXIT)) == 0) msleep(&ump->softdep_flushtd, LOCK_PTR(ump), PVM, "sdflush", hz / 2); ump->softdep_flags &= ~FLUSH_CLEANUP; @@ -1419,11 +1424,9 @@ worklist_speedup(mp) ump = VFSTOUFS(mp); LOCK_OWNED(ump); - if ((ump->softdep_flags & (FLUSH_CLEANUP | FLUSH_EXIT)) == 0) { + if ((ump->softdep_flags & (FLUSH_CLEANUP | FLUSH_EXIT)) == 0) ump->softdep_flags |= FLUSH_CLEANUP; - if (ump->softdep_flushtd->td_wchan == &ump->softdep_flushtd) - wakeup(&ump->softdep_flushtd); - } + wakeup(&ump->softdep_flushtd); } static int @@ -1468,14 +1471,10 @@ softdep_speedup(ump) TAILQ_INSERT_TAIL(&softdepmounts, sdp, sd_next); FREE_GBLLOCK(&lk); if ((altump->softdep_flags & - (FLUSH_CLEANUP | FLUSH_EXIT)) == 0) { + (FLUSH_CLEANUP | FLUSH_EXIT)) == 0) altump->softdep_flags |= FLUSH_CLEANUP; - altump->um_softdep->sd_cleanups++; - if (altump->softdep_flushtd->td_wchan == - &altump->softdep_flushtd) { - wakeup(&altump->softdep_flushtd); - } - } + altump->um_softdep->sd_cleanups++; + wakeup(&altump->softdep_flushtd); FREE_LOCK(altump); } } @@ -1887,8 +1886,8 @@ softdep_flushworklist(oldmnt, countp, td struct thread *td; { struct vnode *devvp; - int count, error = 0; struct ufsmount *ump; + int count, error; /* * Alternately flush the block device associated with the mount @@ -1897,6 +1896,7 @@ softdep_flushworklist(oldmnt, countp, td * are found. */ *countp = 0; + error = 0; ump = VFSTOUFS(oldmnt); devvp = ump->um_devvp; while ((count = softdep_process_worklist(oldmnt, 1)) > 0) { @@ -1904,36 +1904,47 @@ softdep_flushworklist(oldmnt, countp, td vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY); error = VOP_FSYNC(devvp, MNT_WAIT, td); VOP_UNLOCK(devvp, 0); - if (error) + if (error != 0) break; } return (error); } +#define SU_WAITIDLE_RETRIES 20 static int -softdep_waitidle(struct mount *mp) +softdep_waitidle(struct mount *mp, int flags __unused) { struct ufsmount *ump; - int error; - int i; + struct vnode *devvp; + struct thread *td; + int error, i; ump = VFSTOUFS(mp); + devvp = ump->um_devvp; + td = curthread; + error = 0; ACQUIRE_LOCK(ump); - for (i = 0; i < 10 && ump->softdep_deps; i++) { + for (i = 0; i < SU_WAITIDLE_RETRIES && ump->softdep_deps != 0; i++) { ump->softdep_req = 1; - if (ump->softdep_on_worklist) - panic("softdep_waitidle: work added after flush."); - msleep(&ump->softdep_deps, LOCK_PTR(ump), PVM, "softdeps", 1); + KASSERT((flags & FORCECLOSE) == 0 || + ump->softdep_on_worklist == 0, + ("softdep_waitidle: work added after flush")); + msleep(&ump->softdep_deps, LOCK_PTR(ump), PVM | PDROP, + "softdeps", 10 * hz); + vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY); + error = VOP_FSYNC(devvp, MNT_WAIT, td); + VOP_UNLOCK(devvp, 0); + if (error != 0) + break; + ACQUIRE_LOCK(ump); } ump->softdep_req = 0; - FREE_LOCK(ump); - error = 0; - if (i == 10) { + if (i == SU_WAITIDLE_RETRIES && error == 0 && ump->softdep_deps != 0) { error = EBUSY; printf("softdep_waitidle: Failed to flush worklist for %p\n", mp); } - + FREE_LOCK(ump); return (error); } @@ -1990,7 +2001,7 @@ retry_flush: error = EBUSY; } if (!error) - error = softdep_waitidle(oldmnt); + error = softdep_waitidle(oldmnt, flags); if (!error) { if (oldmnt->mnt_kern_flag & MNTK_UNMOUNT) { retry = 0; @@ -2490,9 +2501,18 @@ softdep_mount(devvp, mp, fs, cred) /* * Start our flushing thread in the bufdaemon process. */ + ACQUIRE_LOCK(ump); + ump->softdep_flags |= FLUSH_STARTING; + FREE_LOCK(ump); kproc_kthread_add(&softdep_flush, mp, &bufdaemonproc, &ump->softdep_flushtd, 0, 0, "softdepflush", "%s worker", mp->mnt_stat.f_mntonname); + ACQUIRE_LOCK(ump); + while ((ump->softdep_flags & FLUSH_STARTING) != 0) { + msleep(&ump->softdep_flushtd, LOCK_PTR(ump), PVM, "sdstart", + hz / 2); + } + FREE_LOCK(ump); /* * When doing soft updates, the counters in the * superblock may have gotten out of sync. Recomputation @@ -7629,17 +7649,13 @@ check_inode_unwritten(inodedep) return (1); } -/* - * Try to free an inodedep structure. Return 1 if it could be freed. - */ static int -free_inodedep(inodedep) +check_inodedep_free(inodedep) struct inodedep *inodedep; { LOCK_OWNED(VFSTOUFS(inodedep->id_list.wk_mp)); - if ((inodedep->id_state & (ONWORKLIST | UNLINKED)) != 0 || - (inodedep->id_state & ALLCOMPLETE) != ALLCOMPLETE || + if ((inodedep->id_state & ALLCOMPLETE) != ALLCOMPLETE || !LIST_EMPTY(&inodedep->id_dirremhd) || !LIST_EMPTY(&inodedep->id_pendinghd) || !LIST_EMPTY(&inodedep->id_bufwait) || @@ -7654,6 +7670,21 @@ free_inodedep(inodedep) inodedep->id_nlinkdelta != 0 || inodedep->id_savedino1 != NULL) return (0); + return (1); +} + +/* + * Try to free an inodedep structure. Return 1 if it could be freed. + */ +static int +free_inodedep(inodedep) + struct inodedep *inodedep; +{ + + LOCK_OWNED(VFSTOUFS(inodedep->id_list.wk_mp)); + if ((inodedep->id_state & (ONWORKLIST | UNLINKED)) != 0 || + !check_inodedep_free(inodedep)) + return (0); if (inodedep->id_state & ONDEPLIST) LIST_REMOVE(inodedep, id_deps); LIST_REMOVE(inodedep, id_hash); @@ -13838,7 +13869,8 @@ softdep_check_suspend(struct mount *mp, { struct bufobj *bo; struct ufsmount *ump; - int error; + struct inodedep *inodedep; + int error, unlinked; bo = &devvp->v_bufobj; ASSERT_BO_WLOCKED(bo); @@ -13899,6 +13931,20 @@ softdep_check_suspend(struct mount *mp, break; } + unlinked = 0; + if (MOUNTEDSUJ(mp)) { + for (inodedep = TAILQ_FIRST(&ump->softdep_unlinked); + inodedep != NULL; + inodedep = TAILQ_NEXT(inodedep, id_unlinked)) { + if ((inodedep->id_state & (UNLINKED | UNLINKLINKS | + UNLINKONLIST)) != (UNLINKED | UNLINKLINKS | + UNLINKONLIST) || + !check_inodedep_free(inodedep)) + continue; + unlinked++; + } + } + /* * Reasons for needing more work before suspend: * - Dirty buffers on devvp. @@ -13908,8 +13954,8 @@ softdep_check_suspend(struct mount *mp, error = 0; if (bo->bo_numoutput > 0 || bo->bo_dirty.bv_cnt > 0 || - softdep_depcnt != 0 || - ump->softdep_deps != 0 || + softdep_depcnt != unlinked || + ump->softdep_deps != unlinked || softdep_accdepcnt != ump->softdep_accdeps || secondary_writes != 0 || mp->mnt_secondary_writes != 0 || Modified: releng/10.1/sys/ufs/ffs/ffs_vfsops.c ============================================================================== --- releng/10.1/sys/ufs/ffs/ffs_vfsops.c Wed May 13 22:39:29 2015 (r282872) +++ releng/10.1/sys/ufs/ffs/ffs_vfsops.c Wed May 13 22:52:35 2015 (r282873) @@ -1502,8 +1502,11 @@ ffs_sync(mp, waitfor) if (fs->fs_fmod != 0 && fs->fs_ronly != 0 && ump->um_fsckpid == 0) panic("%s: ffs_sync: modification on read-only filesystem", fs->fs_fsmnt); - if (waitfor == MNT_LAZY) - return (ffs_sync_lazy(mp)); + if (waitfor == MNT_LAZY) { + if (!rebooting) + return (ffs_sync_lazy(mp)); + waitfor = MNT_NOWAIT; + } /* * Write back each (modified) inode. @@ -1560,7 +1563,7 @@ loop: /* * Force stale filesystem control information to be flushed. */ - if (waitfor == MNT_WAIT) { + if (waitfor == MNT_WAIT || rebooting) { if ((error = softdep_flushworklist(ump->um_mountp, &count, td))) allerror = error; /* Flushed work items may create new vnodes to clean */ @@ -1577,9 +1580,12 @@ loop: if (bo->bo_numoutput > 0 || bo->bo_dirty.bv_cnt > 0) { BO_UNLOCK(bo); vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY); - if ((error = VOP_FSYNC(devvp, waitfor, td)) != 0) - allerror = error; + error = VOP_FSYNC(devvp, waitfor, td); VOP_UNLOCK(devvp, 0); + if (MOUNTEDSOFTDEP(mp) && (error == 0 || error == EAGAIN)) + error = ffs_sbupdate(ump, waitfor, 0); + if (error != 0) + allerror = error; if (allerror == 0 && waitfor == MNT_WAIT) goto loop; } else if (suspend != 0) { Modified: releng/10.1/sys/ufs/ffs/softdep.h ============================================================================== --- releng/10.1/sys/ufs/ffs/softdep.h Wed May 13 22:39:29 2015 (r282872) +++ releng/10.1/sys/ufs/ffs/softdep.h Wed May 13 22:52:35 2015 (r282873) @@ -1063,6 +1063,8 @@ struct mount_softdeps { */ #define FLUSH_EXIT 0x0001 /* time to exit */ #define FLUSH_CLEANUP 0x0002 /* need to clear out softdep structures */ +#define FLUSH_STARTING 0x0004 /* flush thread not yet started */ + /* * Keep the old names from when these were in the ufsmount structure. */ Modified: releng/10.1/usr.sbin/freebsd-update/freebsd-update.8 ============================================================================== --- releng/10.1/usr.sbin/freebsd-update/freebsd-update.8 Wed May 13 22:39:29 2015 (r282872) +++ releng/10.1/usr.sbin/freebsd-update/freebsd-update.8 Wed May 13 22:52:35 2015 (r282873) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 14, 2010 +.Dd March 2, 2015 .Dt FREEBSD-UPDATE 8 .Os FreeBSD .Sh NAME @@ -36,10 +36,12 @@ .Op Fl b Ar basedir .Op Fl d Ar workdir .Op Fl f Ar conffile +.Op Fl F .Op Fl k Ar KEY .Op Fl r Ar newrelease .Op Fl s Ar server .Op Fl t Ar address +.Op Fl -not-running-from-cron .Cm command ... .Sh DESCRIPTION The @@ -54,16 +56,16 @@ by the .Fx Release Engineering Team, e.g., .Fx -7.3-RELEASE and +9.3-RELEASE and .Fx -8.0-RELEASE, but not +10.1-RELEASE, but not .Fx -6.3-STABLE or +9.3-STABLE or .Fx -9.0-CURRENT. +11-CURRENT. .Sh OPTIONS The following options are supported: -.Bl -tag -width "-f conffile" +.Bl -tag -width "-r newrelease" .It Fl b Ar basedir Operate on a system mounted at .Ar basedir . @@ -81,6 +83,10 @@ Read configuration options from .Ar conffile . (default: .Pa /etc/freebsd-update.conf ) +.It Fl F +Force +.Nm Cm fetch +to proceed where it normally would not, such as an unfinished upgrade .It Fl k Ar KEY Trust an RSA key with SHA256 of .Ar KEY . @@ -98,12 +104,21 @@ Mail output of command, if any, to .Ar address . (default: root, or as given in the configuration file.) +.It Fl -not-running-from-cron +Force +.Nm Cm fetch +to proceed when there is no controlling tty. +This is for use by automated scripts and orchestration tools. +Please do not run +.Nm Cm fetch +from crontab or similar using this flag, see: +.Nm Cm cron .El .Sh COMMANDS The .Cm command can be any one of the following: -.Bl -tag -width "-f conffile" +.Bl -tag -width "rollback" .It Cm fetch Based on the currently installed world and the configuration options set, fetch all available binary updates. Modified: releng/10.1/usr.sbin/freebsd-update/freebsd-update.sh ============================================================================== --- releng/10.1/usr.sbin/freebsd-update/freebsd-update.sh Wed May 13 22:39:29 2015 (r282872) +++ releng/10.1/usr.sbin/freebsd-update/freebsd-update.sh Wed May 13 22:52:35 2015 (r282873) @@ -43,12 +43,15 @@ Options: (default: /var/db/freebsd-update/) -f conffile -- Read configuration options from conffile (default: /etc/freebsd-update.conf) + -F -- Force a fetch operation to proceed -k KEY -- Trust an RSA key with SHA256 hash of KEY -r release -- Target for upgrade (e.g., 6.2-RELEASE) -s server -- Server from which to fetch updates (default: update.FreeBSD.org) -t address -- Mail output of cron command, if any, to address (default: root) + --not-running-from-cron + -- Run without a tty, for use by automated tools Commands: fetch -- Fetch updates from server cron -- Sleep rand(3600) seconds, fetch updates, and send an @@ -399,6 +402,12 @@ init_params () { # No commands specified yet COMMANDS="" + + # Force fetch to proceed + FORCEFETCH=0 + + # Run without a TTY + NOTTYOK=0 } # Parse the command line @@ -411,6 +420,12 @@ parse_cmdline () { if [ ! -z "${CONFFILE}" ]; then usage; fi shift; CONFFILE="$1" ;; + -F) + FORCEFETCH=1 + ;; + --not-running-from-cron) + NOTTYOK=1 + ;; # Configuration file equivalents -b) @@ -665,6 +680,14 @@ fetch_check_params () { echo "(Did you mean 'upgrade' instead?)" exit 1 fi + + # Check that we have updates ready to install + if [ -f ${BDHASH}-install/kerneldone -a $FORCEFETCH -eq 0 ]; then + echo "You have a partially completed upgrade pending" + echo "Run '$0 install' first." + echo "Run '$0 fetch -F' to proceed anyway." + exit 1 + fi } # Perform sanity checks etc. before fetching upgrades. @@ -3202,7 +3225,7 @@ get_params () { # Fetch command. Make sure that we're being called # interactively, then run fetch_check_params and fetch_run cmd_fetch () { - if [ ! -t 0 ]; then + if [ ! -t 0 -a $NOTTYOK -eq 0 ]; then echo -n "`basename $0` fetch should not " echo "be run non-interactively." echo "Run `basename $0` cron instead." From owner-svn-src-all@FreeBSD.ORG Wed May 13 22:52:53 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EDDE88EF; Wed, 13 May 2015 22:52:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DA5DE1256; Wed, 13 May 2015 22:52:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4DMqrE9068555; Wed, 13 May 2015 22:52:53 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4DMqpdI068543; Wed, 13 May 2015 22:52:51 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201505132252.t4DMqpdI068543@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 13 May 2015 22:52:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r282874 - in releng: 8.4 8.4/sys/conf 8.4/usr.sbin/freebsd-update 9.3 9.3/sys/conf 9.3/usr.sbin/freebsd-update X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 13 May 2015 22:52:54 -0000 Author: delphij Date: Wed May 13 22:52:51 2015 New Revision: 282874 URL: https://svnweb.freebsd.org/changeset/base/282874 Log: Fix bug with freebsd-update(8) that does not ensure the previous upgrade was completed. [EN-15:04] Approved by: so Modified: releng/8.4/UPDATING releng/8.4/sys/conf/newvers.sh releng/8.4/usr.sbin/freebsd-update/freebsd-update.8 releng/8.4/usr.sbin/freebsd-update/freebsd-update.sh releng/9.3/UPDATING releng/9.3/sys/conf/newvers.sh releng/9.3/usr.sbin/freebsd-update/freebsd-update.8 releng/9.3/usr.sbin/freebsd-update/freebsd-update.sh Modified: releng/8.4/UPDATING ============================================================================== --- releng/8.4/UPDATING Wed May 13 22:52:35 2015 (r282873) +++ releng/8.4/UPDATING Wed May 13 22:52:51 2015 (r282874) @@ -15,6 +15,11 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8. debugging tools present in HEAD were left in place because sun4v support still needs work to become production ready. +20150513: p28 FreeBSD-EN-15:04.freebsd-update + + Fix bug with freebsd-update(8) that does not ensure the previous + upgrade was completed. [EN-15:04] + 20150407: p27 FreeBSD-SA-15:04.igmp [revised] FreeBSD-SA-15:07.ntp FreeBSD-SA-15:09.ipv6 Modified: releng/8.4/sys/conf/newvers.sh ============================================================================== --- releng/8.4/sys/conf/newvers.sh Wed May 13 22:52:35 2015 (r282873) +++ releng/8.4/sys/conf/newvers.sh Wed May 13 22:52:51 2015 (r282874) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="8.4" -BRANCH="RELEASE-p27" +BRANCH="RELEASE-p28" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi Modified: releng/8.4/usr.sbin/freebsd-update/freebsd-update.8 ============================================================================== --- releng/8.4/usr.sbin/freebsd-update/freebsd-update.8 Wed May 13 22:52:35 2015 (r282873) +++ releng/8.4/usr.sbin/freebsd-update/freebsd-update.8 Wed May 13 22:52:51 2015 (r282874) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 14, 2010 +.Dd March 2, 2015 .Dt FREEBSD-UPDATE 8 .Os FreeBSD .Sh NAME @@ -36,10 +36,12 @@ .Op Fl b Ar basedir .Op Fl d Ar workdir .Op Fl f Ar conffile +.Op Fl F .Op Fl k Ar KEY .Op Fl r Ar newrelease .Op Fl s Ar server .Op Fl t Ar address +.Op Fl -not-running-from-cron .Cm command ... .Sh DESCRIPTION The @@ -49,21 +51,21 @@ updates to the FreeBSD base system. Note that updates are only available if they are being built for the FreeBSD release and architecture being used; in particular, the .Fx -Security Team only builds updates for releases shipped in binary form +Security Team only builds updates for releases shipped in binary form by the .Fx Release Engineering Team, e.g., .Fx -7.3-RELEASE and +9.3-RELEASE and .Fx -8.0, but not +10.1-RELEASE, but not .Fx -6.3-STABLE or +9.3-STABLE or .Fx -9.0-CURRENT. +11-CURRENT. .Sh OPTIONS The following options are supported: -.Bl -tag -width "-f conffile" +.Bl -tag -width "-r newrelease" .It Fl b Ar basedir Operate on a system mounted at .Ar basedir . @@ -81,6 +83,10 @@ Read configuration options from .Ar conffile . (default: .Pa /etc/freebsd-update.conf ) +.It Fl F +Force +.Nm Cm fetch +to proceed where it normally would not, such as an unfinished upgrade .It Fl k Ar KEY Trust an RSA key with SHA256 of .Ar KEY . @@ -98,13 +104,21 @@ Mail output of command, if any, to .Ar address . (default: root, or as given in the configuration file.) +.It Fl -not-running-from-cron +Force +.Nm Cm fetch +to proceed when there is no controlling tty. +This is for use by automated scripts and orchestration tools. +Please do not run +.Nm Cm fetch +from crontab or similar using this flag, see: +.Nm Cm cron .El .Sh COMMANDS The .Cm command can be any one of the following: -.Pp -.Bl -tag -width "-f conffile" +.Bl -tag -width "rollback" .It Cm fetch Based on the currently installed world and the configuration options set, fetch all available binary updates. @@ -128,6 +142,11 @@ Fetch files necessary for upgrading to a Before using this command, make sure that you read the announcement and release notes for the new release in case there are any special steps needed for upgrading. +Note that this command may require up to 500 MB of space in +.Ar workdir +depending on which components of the +.Fx +base system are installed. .It Cm install Install the most recently fetched updates or upgrade. .It Cm rollback @@ -149,7 +168,7 @@ other than 3AM, to avoid overly imposing on the server(s) hosting the updates. .It In spite of its name, -.Cm +.Nm IDS should not be relied upon as an "Intrusion Detection System", since if the system has been tampered with it cannot be trusted to operate correctly. @@ -158,11 +177,11 @@ purposes, make sure you boot from a secu .El .Sh FILES .Bl -tag -width "/etc/freebsd-update.conf" -.It /etc/freebsd-update.conf +.It Pa /etc/freebsd-update.conf Default location of the .Nm configuration file. -.It /var/db/freebsd-update/ +.It Pa /var/db/freebsd-update/ Default location where .Nm stores temporary files and downloaded updates. @@ -170,4 +189,4 @@ stores temporary files and downloaded up .Sh SEE ALSO .Xr freebsd-update.conf 5 .Sh AUTHORS -.An Colin Percival Aq cperciva@FreeBSD.org +.An Colin Percival Aq Mt cperciva@FreeBSD.org Modified: releng/8.4/usr.sbin/freebsd-update/freebsd-update.sh ============================================================================== --- releng/8.4/usr.sbin/freebsd-update/freebsd-update.sh Wed May 13 22:52:35 2015 (r282873) +++ releng/8.4/usr.sbin/freebsd-update/freebsd-update.sh Wed May 13 22:52:51 2015 (r282874) @@ -43,12 +43,15 @@ Options: (default: /var/db/freebsd-update/) -f conffile -- Read configuration options from conffile (default: /etc/freebsd-update.conf) + -F -- Force a fetch operation to proceed -k KEY -- Trust an RSA key with SHA256 hash of KEY -r release -- Target for upgrade (e.g., 6.2-RELEASE) -s server -- Server from which to fetch updates (default: update.FreeBSD.org) -t address -- Mail output of cron command, if any, to address (default: root) + --not-running-from-cron + -- Run without a tty, for use by automated tools Commands: fetch -- Fetch updates from server cron -- Sleep rand(3600) seconds, fetch updates, and send an @@ -284,6 +287,9 @@ config_TargetRelease () { else return 1 fi + if echo ${TARGETRELEASE} | grep -qE '^[0-9.]+$'; then + TARGETRELEASE="${TARGETRELEASE}-RELEASE" + fi } # Define what happens to output of utilities @@ -396,6 +402,12 @@ init_params () { # No commands specified yet COMMANDS="" + + # Force fetch to proceed + FORCEFETCH=0 + + # Run without a TTY + NOTTYOK=0 } # Parse the command line @@ -408,6 +420,12 @@ parse_cmdline () { if [ ! -z "${CONFFILE}" ]; then usage; fi shift; CONFFILE="$1" ;; + -F) + FORCEFETCH=1 + ;; + --not-running-from-cron) + NOTTYOK=1 + ;; # Configuration file equivalents -b) @@ -569,7 +587,7 @@ fetch_setup_verboselevel () { # running *-p[0-9]+, strip off the last part; if the # user is running -SECURITY, call it -RELEASE. Chdir # into the working directory. -fetch_check_params () { +fetchupgrade_check_params () { export HTTP_USER_AGENT="freebsd-update (${COMMAND}, `uname -r`)" _SERVERNAME_z=\ @@ -577,6 +595,7 @@ fetch_check_params () { _KEYPRINT_z="Key must be given via -k option or configuration file." _KEYPRINT_bad="Invalid key fingerprint: " _WORKDIR_bad="Directory does not exist or is not writable: " + _WORKDIR_bad2="Directory is not on a persistent filesystem: " if [ -z "${SERVERNAME}" ]; then echo -n "`basename $0`: " @@ -600,6 +619,13 @@ fetch_check_params () { echo ${WORKDIR} exit 1 fi + case `df -T ${WORKDIR}` in */dev/md[0-9]* | *tmpfs*) + echo -n "`basename $0`: " + echo -n "${_WORKDIR_bad2}" + echo ${WORKDIR} + exit 1 + ;; + esac chmod 700 ${WORKDIR} cd ${WORKDIR} || exit 1 @@ -652,9 +678,29 @@ fetch_check_params () { BDHASH=`echo ${BASEDIR} | sha256 -q` } +# Perform sanity checks etc. before fetching updates. +fetch_check_params () { + fetchupgrade_check_params + + if ! [ -z "${TARGETRELEASE}" ]; then + echo -n "`basename $0`: " + echo -n "-r option is meaningless with 'fetch' command. " + echo "(Did you mean 'upgrade' instead?)" + exit 1 + fi + + # Check that we have updates ready to install + if [ -f ${BDHASH}-install/kerneldone -a $FORCEFETCH -eq 0 ]; then + echo "You have a partially completed upgrade pending" + echo "Run '$0 install' first." + echo "Run '$0 fetch -F' to proceed anyway." + exit 1 + fi +} + # Perform sanity checks etc. before fetching upgrades. upgrade_check_params () { - fetch_check_params + fetchupgrade_check_params # Unless set otherwise, we're upgrading to the same kernel config. NKERNCONF=${KERNCONF} @@ -1185,7 +1231,7 @@ fetch_metadata_sanity () { # Some aliases to save space later: ${P} is a character which can # appear in a path; ${M} is the four numeric metadata fields; and # ${H} is a sha256 hash. - P="[-+./:=%@_[~[:alnum:]]" + P="[-+./:=,%@_[~[:alnum:]]" M="[0-9]+\|[0-9]+\|[0-9]+\|[0-9]+" H="[0-9a-f]{64}" @@ -1456,7 +1502,7 @@ fetch_inspect_system () { sort -k 3,3 -t '|' > $2.tmp rm filelist - # Check if an error occured during system inspection + # Check if an error occurred during system inspection if [ -f .err ]; then return 1 fi @@ -2240,6 +2286,19 @@ upgrade_oldall_to_oldnew () { mv $2 $3 } +# Helper for upgrade_merge: Return zero true iff the two files differ only +# in the contents of their RCS tags. +samef () { + X=`sed -E 's/\\$FreeBSD.*\\$/\$FreeBSD\$/' < $1 | ${SHA256}` + Y=`sed -E 's/\\$FreeBSD.*\\$/\$FreeBSD\$/' < $2 | ${SHA256}` + + if [ $X = $Y ]; then + return 0; + else + return 1; + fi +} + # From the list of "old" files in $1, merge changes in $2 with those in $3, # and update $3 to reflect the hashes of merged files. upgrade_merge () { @@ -2323,6 +2382,14 @@ upgrade_merge () { # Ask the user to handle any files which didn't merge. while read F; do + # If the installed file differs from the version in + # the old release only due to RCS tag expansion + # then just use the version in the new release. + if samef merge/old/${F} merge/${OLDRELNUM}/${F}; then + cp merge/${RELNUM}/${F} merge/new/${F} + continue + fi + cat <<-EOF The following file could not be merged automatically: ${F} @@ -2337,9 +2404,18 @@ manually... # Ask the user to confirm that he likes how the result # of merging files. while read F; do - # Skip files which haven't changed. - if [ -f merge/new/${F} ] && - cmp -s merge/old/${F} merge/new/${F}; then + # Skip files which haven't changed except possibly + # in their RCS tags. + if [ -f merge/old/${F} ] && [ -f merge/new/${F} ] && + samef merge/old/${F} merge/new/${F}; then + continue + fi + + # Skip files where the installed file differs from + # the old file only due to RCS tags. + if [ -f merge/old/${F} ] && + [ -f merge/${OLDRELNUM}/${F} ] && + samef merge/old/${F} merge/${OLDRELNUM}/${F}; then continue fi @@ -2526,6 +2602,10 @@ upgrade_run () { # Leave a note behind to tell the "install" command that the kernel # needs to be installed before the world. touch ${BDHASH}-install/kernelfirst + + # Remind the user that they need to run "freebsd-update install" + # to install the downloaded bits, in case they didn't RTFM. + echo "To install the downloaded upgrades, run \"$0 install\"." } # Make sure that all the file hashes mentioned in $@ have corresponding @@ -2577,14 +2657,14 @@ backup_kernel_finddir () { while true ; do # Pathname does not exist, so it is OK use that name # for backup directory. - if [ ! -e $BACKUPKERNELDIR ]; then + if [ ! -e $BASEDIR/$BACKUPKERNELDIR ]; then return 0 fi # If directory do exist, we only use if it has our # marker file. - if [ -d $BACKUPKERNELDIR -a \ - -e $BACKUPKERNELDIR/.freebsd-update ]; then + if [ -d $BASEDIR/$BACKUPKERNELDIR -a \ + -e $BASEDIR/$BACKUPKERNELDIR/.freebsd-update ]; then return 0 fi @@ -2592,7 +2672,7 @@ backup_kernel_finddir () { # the end and try again. CNT=$((CNT + 1)) if [ $CNT -gt 9 ]; then - echo "Could not find valid backup dir ($BACKUPKERNELDIR)" + echo "Could not find valid backup dir ($BASEDIR/$BACKUPKERNELDIR)" exit 1 fi BACKUPKERNELDIR="`echo $BACKUPKERNELDIR | sed -Ee 's/[0-9]\$//'`" @@ -2619,17 +2699,17 @@ backup_kernel () { # Remove old kernel backup files. If $BACKUPKERNELDIR was # "not ours", backup_kernel_finddir would have exited, so # deleting the directory content is as safe as we can make it. - if [ -d $BACKUPKERNELDIR ]; then - rm -fr $BACKUPKERNELDIR + if [ -d $BASEDIR/$BACKUPKERNELDIR ]; then + rm -fr $BASEDIR/$BACKUPKERNELDIR fi # Create directories for backup. - mkdir -p $BACKUPKERNELDIR - mtree -cdn -p "${KERNELDIR}" | \ - mtree -Ue -p "${BACKUPKERNELDIR}" > /dev/null + mkdir -p $BASEDIR/$BACKUPKERNELDIR + mtree -cdn -p "${BASEDIR}/${KERNELDIR}" | \ + mtree -Ue -p "${BASEDIR}/${BACKUPKERNELDIR}" > /dev/null # Mark the directory as having been created by freebsd-update. - touch $BACKUPKERNELDIR/.freebsd-update + touch $BASEDIR/$BACKUPKERNELDIR/.freebsd-update if [ $? -ne 0 ]; then echo "Could not create kernel backup directory" exit 1 @@ -2647,8 +2727,8 @@ backup_kernel () { fi # Backup all the kernel files using hardlinks. - (cd $KERNELDIR && find . -type f $FINDFILTER -exec \ - cp -pl '{}' ${BACKUPKERNELDIR}/'{}' \;) + (cd ${BASEDIR}/${KERNELDIR} && find . -type f $FINDFILTER -exec \ + cp -pl '{}' ${BASEDIR}/${BACKUPKERNELDIR}/'{}' \;) # Re-enable patchname expansion. set +f @@ -2746,7 +2826,7 @@ install_files () { # Update linker.hints if necessary if [ -s INDEX-OLD -o -s INDEX-NEW ]; then - kldxref -R /boot/ 2>/dev/null + kldxref -R ${BASEDIR}/boot/ 2>/dev/null fi # We've finished updating the kernel. @@ -2797,14 +2877,14 @@ Kernel updates have been installed. Ple install_delete INDEX-OLD INDEX-NEW || return 1 # Rebuild /etc/spwd.db and /etc/pwd.db if necessary. - if [ /etc/master.passwd -nt /etc/spwd.db ] || - [ /etc/master.passwd -nt /etc/pwd.db ]; then - pwd_mkdb /etc/master.passwd + if [ ${BASEDIR}/etc/master.passwd -nt ${BASEDIR}/etc/spwd.db ] || + [ ${BASEDIR}/etc/master.passwd -nt ${BASEDIR}/etc/pwd.db ]; then + pwd_mkdb -d ${BASEDIR}/etc ${BASEDIR}/etc/master.passwd fi # Rebuild /etc/login.conf.db if necessary. - if [ /etc/login.conf -nt /etc/login.conf.db ]; then - cap_mkdb /etc/login.conf + if [ ${BASEDIR}/etc/login.conf -nt ${BASEDIR}/etc/login.conf.db ]; then + cap_mkdb ${BASEDIR}/etc/login.conf fi # We've finished installing the world and deleting old files @@ -3011,21 +3091,8 @@ IDS_compare () { mv INDEX-NOTMATCHING.tmp INDEX-NOTMATCHING # Go through the lines and print warnings. - while read LINE; do - FPATH=`echo "${LINE}" | cut -f 1 -d '|'` - TYPE=`echo "${LINE}" | cut -f 2 -d '|'` - OWNER=`echo "${LINE}" | cut -f 3 -d '|'` - GROUP=`echo "${LINE}" | cut -f 4 -d '|'` - PERM=`echo "${LINE}" | cut -f 5 -d '|'` - HASH=`echo "${LINE}" | cut -f 6 -d '|'` - LINK=`echo "${LINE}" | cut -f 7 -d '|'` - P_TYPE=`echo "${LINE}" | cut -f 8 -d '|'` - P_OWNER=`echo "${LINE}" | cut -f 9 -d '|'` - P_GROUP=`echo "${LINE}" | cut -f 10 -d '|'` - P_PERM=`echo "${LINE}" | cut -f 11 -d '|'` - P_HASH=`echo "${LINE}" | cut -f 12 -d '|'` - P_LINK=`echo "${LINE}" | cut -f 13 -d '|'` - + local IFS='|' + while read FPATH TYPE OWNER GROUP PERM HASH LINK P_TYPE P_OWNER P_GROUP P_PERM P_HASH P_LINK; do # Warn about different object types. if ! [ "${TYPE}" = "${P_TYPE}" ]; then echo -n "${FPATH} is a " @@ -3153,7 +3220,7 @@ get_params () { # Fetch command. Make sure that we're being called # interactively, then run fetch_check_params and fetch_run cmd_fetch () { - if [ ! -t 0 ]; then + if [ ! -t 0 -a $NOTTYOK -eq 0 ]; then echo -n "`basename $0` fetch should not " echo "be run non-interactively." echo "Run `basename $0` cron instead." Modified: releng/9.3/UPDATING ============================================================================== --- releng/9.3/UPDATING Wed May 13 22:52:35 2015 (r282873) +++ releng/9.3/UPDATING Wed May 13 22:52:51 2015 (r282874) @@ -11,6 +11,11 @@ handbook: Items affecting the ports and packages system can be found in /usr/ports/UPDATING. Please read that file before running portupgrade. +20150513: p14 FreeBSD-EN-15:04.freebsd-update + + Fix bug with freebsd-update(8) that does not ensure the previous + upgrade was completed. [EN-15:04] + 20150407: p13 FreeBSD-SA-15:04.igmp [revised] FreeBSD-SA-15:07.ntp FreeBSD-SA-15:09.ipv6 Modified: releng/9.3/sys/conf/newvers.sh ============================================================================== --- releng/9.3/sys/conf/newvers.sh Wed May 13 22:52:35 2015 (r282873) +++ releng/9.3/sys/conf/newvers.sh Wed May 13 22:52:51 2015 (r282874) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="9.3" -BRANCH="RELEASE-p13" +BRANCH="RELEASE-p14" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi Modified: releng/9.3/usr.sbin/freebsd-update/freebsd-update.8 ============================================================================== --- releng/9.3/usr.sbin/freebsd-update/freebsd-update.8 Wed May 13 22:52:35 2015 (r282873) +++ releng/9.3/usr.sbin/freebsd-update/freebsd-update.8 Wed May 13 22:52:51 2015 (r282874) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 14, 2010 +.Dd March 2, 2015 .Dt FREEBSD-UPDATE 8 .Os FreeBSD .Sh NAME @@ -36,10 +36,12 @@ .Op Fl b Ar basedir .Op Fl d Ar workdir .Op Fl f Ar conffile +.Op Fl F .Op Fl k Ar KEY .Op Fl r Ar newrelease .Op Fl s Ar server .Op Fl t Ar address +.Op Fl -not-running-from-cron .Cm command ... .Sh DESCRIPTION The @@ -54,16 +56,16 @@ by the .Fx Release Engineering Team, e.g., .Fx -7.3-RELEASE and +9.3-RELEASE and .Fx -8.0-RELEASE, but not +10.1-RELEASE, but not .Fx -6.3-STABLE or +9.3-STABLE or .Fx -9.0-CURRENT. +11-CURRENT. .Sh OPTIONS The following options are supported: -.Bl -tag -width "-f conffile" +.Bl -tag -width "-r newrelease" .It Fl b Ar basedir Operate on a system mounted at .Ar basedir . @@ -81,6 +83,10 @@ Read configuration options from .Ar conffile . (default: .Pa /etc/freebsd-update.conf ) +.It Fl F +Force +.Nm Cm fetch +to proceed where it normally would not, such as an unfinished upgrade .It Fl k Ar KEY Trust an RSA key with SHA256 of .Ar KEY . @@ -98,12 +104,21 @@ Mail output of command, if any, to .Ar address . (default: root, or as given in the configuration file.) +.It Fl -not-running-from-cron +Force +.Nm Cm fetch +to proceed when there is no controlling tty. +This is for use by automated scripts and orchestration tools. +Please do not run +.Nm Cm fetch +from crontab or similar using this flag, see: +.Nm Cm cron .El .Sh COMMANDS The .Cm command can be any one of the following: -.Bl -tag -width "-f conffile" +.Bl -tag -width "rollback" .It Cm fetch Based on the currently installed world and the configuration options set, fetch all available binary updates. Modified: releng/9.3/usr.sbin/freebsd-update/freebsd-update.sh ============================================================================== --- releng/9.3/usr.sbin/freebsd-update/freebsd-update.sh Wed May 13 22:52:35 2015 (r282873) +++ releng/9.3/usr.sbin/freebsd-update/freebsd-update.sh Wed May 13 22:52:51 2015 (r282874) @@ -43,12 +43,15 @@ Options: (default: /var/db/freebsd-update/) -f conffile -- Read configuration options from conffile (default: /etc/freebsd-update.conf) + -F -- Force a fetch operation to proceed -k KEY -- Trust an RSA key with SHA256 hash of KEY -r release -- Target for upgrade (e.g., 6.2-RELEASE) -s server -- Server from which to fetch updates (default: update.FreeBSD.org) -t address -- Mail output of cron command, if any, to address (default: root) + --not-running-from-cron + -- Run without a tty, for use by automated tools Commands: fetch -- Fetch updates from server cron -- Sleep rand(3600) seconds, fetch updates, and send an @@ -399,6 +402,12 @@ init_params () { # No commands specified yet COMMANDS="" + + # Force fetch to proceed + FORCEFETCH=0 + + # Run without a TTY + NOTTYOK=0 } # Parse the command line @@ -411,6 +420,12 @@ parse_cmdline () { if [ ! -z "${CONFFILE}" ]; then usage; fi shift; CONFFILE="$1" ;; + -F) + FORCEFETCH=1 + ;; + --not-running-from-cron) + NOTTYOK=1 + ;; # Configuration file equivalents -b) @@ -665,6 +680,14 @@ fetch_check_params () { echo "(Did you mean 'upgrade' instead?)" exit 1 fi + + # Check that we have updates ready to install + if [ -f ${BDHASH}-install/kerneldone -a $FORCEFETCH -eq 0 ]; then + echo "You have a partially completed upgrade pending" + echo "Run '$0 install' first." + echo "Run '$0 fetch -F' to proceed anyway." + exit 1 + fi } # Perform sanity checks etc. before fetching upgrades. @@ -3202,7 +3225,7 @@ get_params () { # Fetch command. Make sure that we're being called # interactively, then run fetch_check_params and fetch_run cmd_fetch () { - if [ ! -t 0 ]; then + if [ ! -t 0 -a $NOTTYOK -eq 0 ]; then echo -n "`basename $0` fetch should not " echo "be run non-interactively." echo "Run `basename $0` cron instead." From owner-svn-src-all@FreeBSD.ORG Thu May 14 04:05:35 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 98618E9C; Thu, 14 May 2015 04:05:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 85AAA1574; Thu, 14 May 2015 04:05:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4E45ZB6023085; Thu, 14 May 2015 04:05:35 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4E45Zjm023084; Thu, 14 May 2015 04:05:35 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201505140405.t4E45Zjm023084@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 14 May 2015 04:05:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r282875 - in stable: 10/release/doc/share/xml 8/release/doc/share/xml 9/release/doc/share/xml X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 14 May 2015 04:05:35 -0000 Author: gjb Date: Thu May 14 04:05:34 2015 New Revision: 282875 URL: https://svnweb.freebsd.org/changeset/base/282875 Log: Document EN-15:04 and EN-15:05. Sponsored by: The FreeBSD Foundation Modified: stable/8/release/doc/share/xml/errata.xml Changes in other areas also in this revision: Modified: stable/10/release/doc/share/xml/errata.xml stable/9/release/doc/share/xml/errata.xml Modified: stable/8/release/doc/share/xml/errata.xml ============================================================================== --- stable/8/release/doc/share/xml/errata.xml Wed May 13 22:52:51 2015 (r282874) +++ stable/8/release/doc/share/xml/errata.xml Thu May 14 04:05:34 2015 (r282875) @@ -126,6 +126,14 @@ &man.freebsd-update.8; updates libraries in suboptimal order + + + FreeBSD-EN-15:04.freebsd-update + 13 May 2015 + &man.freebsd-update.8; does not ensure the + previous upgrade has completed + From owner-svn-src-all@FreeBSD.ORG Thu May 14 04:05:35 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 04518E9B; Thu, 14 May 2015 04:05:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E560A1572; Thu, 14 May 2015 04:05:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4E45YUB023079; Thu, 14 May 2015 04:05:34 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4E45Y74023078; Thu, 14 May 2015 04:05:34 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201505140405.t4E45Y74023078@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 14 May 2015 04:05: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: r282875 - in stable: 10/release/doc/share/xml 8/release/doc/share/xml 9/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.20 Precedence: list List-Id: "SVN commit messages 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, 14 May 2015 04:05:35 -0000 Author: gjb Date: Thu May 14 04:05:34 2015 New Revision: 282875 URL: https://svnweb.freebsd.org/changeset/base/282875 Log: Document EN-15:04 and EN-15:05. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/share/xml/errata.xml Changes in other areas also in this revision: Modified: stable/8/release/doc/share/xml/errata.xml stable/9/release/doc/share/xml/errata.xml Modified: stable/10/release/doc/share/xml/errata.xml ============================================================================== --- stable/10/release/doc/share/xml/errata.xml Wed May 13 22:52:51 2015 (r282874) +++ stable/10/release/doc/share/xml/errata.xml Thu May 14 04:05:34 2015 (r282875) @@ -48,6 +48,22 @@ &man.freebsd-update.8; updates libraries in suboptimal order + + + FreeBSD-EN-15:04.freebsd-update + 13 May 2015 + &man.freebsd-update.8; does not ensure the + previous upgrade has completed + + + + FreeBSD-EN-15:05.ufs + 13 May 2015 + Deadlock on reboot with UFS tuned with + SU+J + From owner-svn-src-all@FreeBSD.ORG Thu May 14 04:05:36 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3D024E9D; Thu, 14 May 2015 04:05:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2AF311575; Thu, 14 May 2015 04:05:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4E45at3023091; Thu, 14 May 2015 04:05:36 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4E45asG023090; Thu, 14 May 2015 04:05:36 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201505140405.t4E45asG023090@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 14 May 2015 04:05:36 +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: r282875 - in stable: 10/release/doc/share/xml 8/release/doc/share/xml 9/release/doc/share/xml 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.20 Precedence: list List-Id: "SVN commit messages 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, 14 May 2015 04:05:36 -0000 Author: gjb Date: Thu May 14 04:05:34 2015 New Revision: 282875 URL: https://svnweb.freebsd.org/changeset/base/282875 Log: Document EN-15:04 and EN-15:05. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/share/xml/errata.xml Changes in other areas also in this revision: Modified: stable/10/release/doc/share/xml/errata.xml stable/8/release/doc/share/xml/errata.xml Modified: stable/9/release/doc/share/xml/errata.xml ============================================================================== --- stable/9/release/doc/share/xml/errata.xml Wed May 13 22:52:51 2015 (r282874) +++ stable/9/release/doc/share/xml/errata.xml Thu May 14 04:05:34 2015 (r282875) @@ -71,6 +71,14 @@ &man.freebsd-update.8; updates libraries in suboptimal order + + + FreeBSD-EN-15:04.freebsd-update + 13 May 2015 + &man.freebsd-update.8; does not ensure the + previous upgrade has completed + From owner-svn-src-all@FreeBSD.ORG Thu May 14 04:21:05 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B2D5A4E6; Thu, 14 May 2015 04:21:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A13521724; Thu, 14 May 2015 04:21:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4E4L5hX030514; Thu, 14 May 2015 04:21:05 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4E4L53f030513; Thu, 14 May 2015 04:21:05 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201505140421.t4E4L53f030513@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 14 May 2015 04:21: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: r282877 - stable/10/release/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.20 Precedence: list List-Id: "SVN commit messages 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, 14 May 2015 04:21:05 -0000 Author: gjb Date: Thu May 14 04:21:04 2015 New Revision: 282877 URL: https://svnweb.freebsd.org/changeset/base/282877 Log: MFC r282772: Fix virtual machine disk format creating by passing VMFORMAT to mkimg(1) PR: 200068 Sponsored by: The FreeBSD Foundation Modified: stable/10/release/tools/vmimage.subr Modified: stable/10/release/tools/vmimage.subr ============================================================================== --- stable/10/release/tools/vmimage.subr Thu May 14 04:17:58 2015 (r282876) +++ stable/10/release/tools/vmimage.subr Thu May 14 04:21:04 2015 (r282877) @@ -23,14 +23,15 @@ write_partition_layout() { case "${TARGET}:${TARGET_ARCH}" in amd64:amd64 | i386:i386) - mkimg -s gpt -b ${BOOTFILES}/i386/pmbr/pmbr \ + mkimg -s gpt -f ${VMFORMAT} \ + -b ${BOOTFILES}/i386/pmbr/pmbr \ -p freebsd-boot/bootfs:=${BOOTFILES}/i386/gptboot/gptboot \ ${SWAPOPT} \ -p freebsd-ufs/rootfs:=${VMBASE} \ -o ${VMIMAGE} ;; powerpc:powerpc*) - mkimg -s apm \ + mkimg -s apm -f ${VMFORMAT} \ -p apple-boot/bootfs:=${BOOTFILES}/powerpc/boot1.chrp/boot1.hfs \ ${SWAPOPT} \ -p freebsd-ufs/rootfs:=${VMBASE} \ From owner-svn-src-all@FreeBSD.ORG Thu May 14 05:10:43 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6172A8B9; Thu, 14 May 2015 05:10:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4ED2B1BF3; Thu, 14 May 2015 05:10:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4E5AhBs053584; Thu, 14 May 2015 05:10:43 GMT (envelope-from yongari@FreeBSD.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4E5Ah7U053583; Thu, 14 May 2015 05:10:43 GMT (envelope-from yongari@FreeBSD.org) Message-Id: <201505140510.t4E5Ah7U053583@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: yongari set sender to yongari@FreeBSD.org using -f From: Pyun YongHyeon Date: Thu, 14 May 2015 05:10: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: r282878 - stable/10/sys/dev/mii 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.20 Precedence: list List-Id: "SVN commit messages 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, 14 May 2015 05:10:43 -0000 Author: yongari Date: Thu May 14 05:10:42 2015 New Revision: 282878 URL: https://svnweb.freebsd.org/changeset/base/282878 Log: MFC r281877: Add another variant of BCM5708S controller to IBM HS21 workaround list. PR: 118238 Modified: stable/10/sys/dev/mii/brgphy.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/mii/brgphy.c ============================================================================== --- stable/10/sys/dev/mii/brgphy.c Thu May 14 04:21:04 2015 (r282877) +++ stable/10/sys/dev/mii/brgphy.c Thu May 14 05:10:42 2015 (r282878) @@ -158,25 +158,33 @@ static const struct mii_phy_funcs brgphy brgphy_reset }; -#define HS21_PRODUCT_ID "IBM eServer BladeCenter HS21" -#define HS21_BCM_CHIPID 0x57081021 +static const struct hs21_type { + const uint32_t id; + const char *prod; +} hs21_type_lists[] = { + { 0x57081021, "IBM eServer BladeCenter HS21" }, + { 0x57081011, "IBM eServer BladeCenter HS21 -[8853PAU]-" }, +}; static int detect_hs21(struct bce_softc *bce_sc) { char *sysenv; - int found; + int found, i; found = 0; - if (bce_sc->bce_chipid == HS21_BCM_CHIPID) { - sysenv = getenv("smbios.system.product"); - if (sysenv != NULL) { - if (strncmp(sysenv, HS21_PRODUCT_ID, - strlen(HS21_PRODUCT_ID)) == 0) - found = 1; - freeenv(sysenv); + sysenv = getenv("smbios.system.product"); + if (sysenv == NULL) + return (found); + for (i = 0; i < nitems(hs21_type_lists); i++) { + if (bce_sc->bce_chipid == hs21_type_lists[i].id && + strncmp(sysenv, hs21_type_lists[i].prod, + strlen(hs21_type_lists[i].prod)) == 0) { + found++; + break; } } + freeenv(sysenv); return (found); } From owner-svn-src-all@FreeBSD.ORG Thu May 14 05:19:30 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BB4CAA6E; Thu, 14 May 2015 05:19:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A94401C2A; Thu, 14 May 2015 05:19:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4E5JU7i057797; Thu, 14 May 2015 05:19:30 GMT (envelope-from yongari@FreeBSD.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4E5JUNg057796; Thu, 14 May 2015 05:19:30 GMT (envelope-from yongari@FreeBSD.org) Message-Id: <201505140519.t4E5JUNg057796@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: yongari set sender to yongari@FreeBSD.org using -f From: Pyun YongHyeon Date: Thu, 14 May 2015 05:19:30 +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: r282879 - stable/9/sys/dev/mii 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.20 Precedence: list List-Id: "SVN commit messages 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, 14 May 2015 05:19:30 -0000 Author: yongari Date: Thu May 14 05:19:29 2015 New Revision: 282879 URL: https://svnweb.freebsd.org/changeset/base/282879 Log: MFC r281877: Add another variant of BCM5708S controller to IBM HS21 workaround list. PR: 118238 Modified: stable/9/sys/dev/mii/brgphy.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/dev/mii/brgphy.c ============================================================================== --- stable/9/sys/dev/mii/brgphy.c Thu May 14 05:10:42 2015 (r282878) +++ stable/9/sys/dev/mii/brgphy.c Thu May 14 05:19:29 2015 (r282879) @@ -158,25 +158,33 @@ static const struct mii_phy_funcs brgphy brgphy_reset }; -#define HS21_PRODUCT_ID "IBM eServer BladeCenter HS21" -#define HS21_BCM_CHIPID 0x57081021 +static const struct hs21_type { + const uint32_t id; + const char *prod; +} hs21_type_lists[] = { + { 0x57081021, "IBM eServer BladeCenter HS21" }, + { 0x57081011, "IBM eServer BladeCenter HS21 -[8853PAU]-" }, +}; static int detect_hs21(struct bce_softc *bce_sc) { char *sysenv; - int found; + int found, i; found = 0; - if (bce_sc->bce_chipid == HS21_BCM_CHIPID) { - sysenv = getenv("smbios.system.product"); - if (sysenv != NULL) { - if (strncmp(sysenv, HS21_PRODUCT_ID, - strlen(HS21_PRODUCT_ID)) == 0) - found = 1; - freeenv(sysenv); + sysenv = getenv("smbios.system.product"); + if (sysenv == NULL) + return (found); + for (i = 0; i < nitems(hs21_type_lists); i++) { + if (bce_sc->bce_chipid == hs21_type_lists[i].id && + strncmp(sysenv, hs21_type_lists[i].prod, + strlen(hs21_type_lists[i].prod)) == 0) { + found++; + break; } } + freeenv(sysenv); return (found); } From owner-svn-src-all@FreeBSD.ORG Thu May 14 08:13:02 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9F131A2E; Thu, 14 May 2015 08:13:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8D06F1DD9; Thu, 14 May 2015 08:13:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4E8D2Qf045645; Thu, 14 May 2015 08:13:02 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4E8D2j7045644; Thu, 14 May 2015 08:13:02 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201505140813.t4E8D2j7045644@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Thu, 14 May 2015 08:13:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282880 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 14 May 2015 08:13:02 -0000 Author: smh Date: Thu May 14 08:13:01 2015 New Revision: 282880 URL: https://svnweb.freebsd.org/changeset/base/282880 Log: Add copyright info missing from r282205 Add the copyright info missing from ZoL origin version. MFC after: 2 days Sponsored by: Multiplay Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c Thu May 14 05:19:29 2015 (r282879) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c Thu May 14 08:13:01 2015 (r282880) @@ -21,6 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012, 2014 by Delphix. All rights reserved. + * Copyright (c) 2015 Chunwei Chen. All rights reserved. */ #include From owner-svn-src-all@FreeBSD.ORG Thu May 14 10:04:43 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E7F52E8F; Thu, 14 May 2015 10:04:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D2AB81BC6; Thu, 14 May 2015 10:04:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4EA4gS3099874; Thu, 14 May 2015 10:04:42 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4EA4g3P099873; Thu, 14 May 2015 10:04:42 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201505141004.t4EA4g3P099873@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 14 May 2015 10:04:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282881 - head/sys/fs/nfsclient 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.20 Precedence: list List-Id: "SVN commit messages 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, 14 May 2015 10:04:43 -0000 Author: mav Date: Thu May 14 10:04:42 2015 New Revision: 282881 URL: https://svnweb.freebsd.org/changeset/base/282881 Log: Do not promote large async writes to sync. Present implementation of large sync writes is too strict and so can be quite slow. Instead of doing that, execute large async write in chunks, syncing each chunk separately. It would be good to fix large sync writes too, but I leave it to somebody with more skills in this area. Reviewed by: rmacklem MFC after: 1 week Modified: head/sys/fs/nfsclient/nfs_clbio.c Modified: head/sys/fs/nfsclient/nfs_clbio.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clbio.c Thu May 14 08:13:01 2015 (r282880) +++ head/sys/fs/nfsclient/nfs_clbio.c Thu May 14 10:04:42 2015 (r282881) @@ -864,7 +864,7 @@ ncl_write(struct vop_write_args *ap) struct nfsmount *nmp = VFSTONFS(vp->v_mount); daddr_t lbn; int bcount, noncontig_write, obcount; - int bp_cached, n, on, error = 0, error1; + int bp_cached, n, on, error = 0, error1, wouldcommit; size_t orig_resid, local_resid; off_t orig_size, tmp_off; @@ -908,7 +908,6 @@ ncl_write(struct vop_write_args *ap) if (ioflag & IO_NDELAY) return (EAGAIN); #endif -flush_and_restart: np->n_attrstamp = 0; KDTRACE_NFS_ATTRCACHE_FLUSH_DONE(vp); error = ncl_vinvalbuf(vp, V_SAVE, td, 1); @@ -965,27 +964,14 @@ flush_and_restart: * IO_UNIT -- we just make all writes atomic anyway, as there's * no point optimizing for something that really won't ever happen. */ + wouldcommit = 0; if (!(ioflag & IO_SYNC)) { int nflag; mtx_lock(&np->n_mtx); nflag = np->n_flag; mtx_unlock(&np->n_mtx); - int needrestart = 0; - if (nmp->nm_wcommitsize < uio->uio_resid) { - /* - * If this request could not possibly be completed - * without exceeding the maximum outstanding write - * commit size, see if we can convert it into a - * synchronous write operation. - */ - if (ioflag & IO_NDELAY) - return (EAGAIN); - ioflag |= IO_SYNC; - if (nflag & NMODIFIED) - needrestart = 1; - } else if (nflag & NMODIFIED) { - int wouldcommit = 0; + if (nflag & NMODIFIED) { BO_LOCK(&vp->v_bufobj); if (vp->v_bufobj.bo_dirty.bv_cnt != 0) { TAILQ_FOREACH(bp, &vp->v_bufobj.bo_dirty.bv_hd, @@ -995,27 +981,22 @@ flush_and_restart: } } BO_UNLOCK(&vp->v_bufobj); - /* - * Since we're not operating synchronously and - * bypassing the buffer cache, we are in a commit - * and holding all of these buffers whether - * transmitted or not. If not limited, this - * will lead to the buffer cache deadlocking, - * as no one else can flush our uncommitted buffers. - */ - wouldcommit += uio->uio_resid; - /* - * If we would initially exceed the maximum - * outstanding write commit size, flush and restart. - */ - if (wouldcommit > nmp->nm_wcommitsize) - needrestart = 1; } - if (needrestart) - goto flush_and_restart; } do { + if (!(ioflag & IO_SYNC)) { + wouldcommit += biosize; + if (wouldcommit > nmp->nm_wcommitsize) { + np->n_attrstamp = 0; + KDTRACE_NFS_ATTRCACHE_FLUSH_DONE(vp); + error = ncl_vinvalbuf(vp, V_SAVE, td, 1); + if (error) + return (error); + wouldcommit = biosize; + } + } + NFSINCRGLOBAL(newnfsstats.biocache_writes); lbn = uio->uio_offset / biosize; on = uio->uio_offset - (lbn * biosize); From owner-svn-src-all@FreeBSD.ORG Thu May 14 10:23:58 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A8C27A0A; Thu, 14 May 2015 10:23:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7E2671E7B; Thu, 14 May 2015 10:23:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4EANw8D033980; Thu, 14 May 2015 10:23:58 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4EANwFi033979; Thu, 14 May 2015 10:23:58 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201505141023.t4EANwFi033979@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Thu, 14 May 2015 10:23:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r282882 - svnadmin/conf X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 14 May 2015 10:23:58 -0000 Author: bapt Date: Thu May 14 10:23:57 2015 New Revision: 282882 URL: https://svnweb.freebsd.org/changeset/base/282882 Log: Bump my limit temporarily. Modified: svnadmin/conf/sizelimit.conf Modified: svnadmin/conf/sizelimit.conf ============================================================================== --- svnadmin/conf/sizelimit.conf Thu May 14 10:04:42 2015 (r282881) +++ svnadmin/conf/sizelimit.conf Thu May 14 10:23:57 2015 (r282882) @@ -19,6 +19,7 @@ #kan #lulf # adrian +bapt brooks # cy #delphij From owner-svn-src-all@FreeBSD.ORG Thu May 14 10:30:38 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9C3D7D53; Thu, 14 May 2015 10:30:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8B4301EDD; Thu, 14 May 2015 10:30:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4EAUcVY035077; Thu, 14 May 2015 10:30:38 GMT (envelope-from fanf@FreeBSD.org) Received: (from fanf@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4EAUcFS035076; Thu, 14 May 2015 10:30:38 GMT (envelope-from fanf@FreeBSD.org) Message-Id: <201505141030.t4EAUcFS035076@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: fanf set sender to fanf@FreeBSD.org using -f From: Tony Finch Date: Thu, 14 May 2015 10:30:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282883 - head/usr.bin/whois 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.20 Precedence: list List-Id: "SVN commit messages 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, 14 May 2015 10:30:38 -0000 Author: fanf Date: Thu May 14 10:30:37 2015 New Revision: 282883 URL: https://svnweb.freebsd.org/changeset/base/282883 Log: Clean up whois manual. Document the RA_SERVER environment variable. Remove the obsolete -R option, and discourage people from trying to use the Network Solutions server. Describe the default behaviour in the DESCRIPTION section, not buried in the options. Modified: head/usr.bin/whois/whois.1 Modified: head/usr.bin/whois/whois.1 ============================================================================== --- head/usr.bin/whois/whois.1 Thu May 14 10:23:57 2015 (r282882) +++ head/usr.bin/whois/whois.1 Thu May 14 10:30:37 2015 (r282883) @@ -47,6 +47,38 @@ utility looks up records in the database Network Information Centers .Pq Tn NICs . .Pp +By default +.Nm +constructs the name of a whois server to use from the top-level domain +.Pq Tn TLD +of the supplied (single) argument, and appending +.Qq Li .whois-servers.net . +This effectively allows a suitable whois server to be selected +automatically for a large number of +.Tn TLDs . +.Pp +In the event that an IP +address is specified, the whois server will default to the American +Registry for Internet Numbers +.Pq Tn ARIN . +If a query to +.Tn ARIN +references +.Tn APNIC , AfriNIC , LACNIC , +or +.Tn RIPE , +that server will be queried also, provided that the +.Fl Q +option is not specified. +.Pp +If the query is not a domain name or IP address, +.Nm +will fall back to +the host specified in the +.Ev RA_SERVER +environment variable, or if that is not set, it will use +.Pa whois.crsnic.net . +.Pp The options are as follows: .Bl -tag -width indent .It Fl a @@ -90,64 +122,10 @@ contact for subdomains of .It Fl h Ar host Use the specified host instead of the default variant. Either a host name or an IP address may be specified. -.Pp -By default -.Nm -constructs the name of a whois server to use from the top-level domain -.Pq Tn TLD -of the supplied (single) argument, and appending -.Qq Li .whois-servers.net . -This effectively allows a suitable whois server to be selected -automatically for a large number of -.Tn TLDs . -.Pp -In the event that an IP -address is specified, the whois server will default to the American -Registry for Internet Numbers -.Pq Tn ARIN . -If a query to -.Tn ARIN -references -.Tn APNIC , AfriNIC , LACNIC , -or -.Tn RIPE , -that server will be queried also, provided that the -.Fl Q -option is not specified. -.Pp -If the query is not a domain name or IP address, -.Nm -will fall back to -.Pa whois.crsnic.net . .It Fl i -Use the Network Solutions Registry for Internet Numbers +Use the obsolete Network Solutions Registry for Internet Numbers .Pq Pa whois.networksolutions.com database. -It contains network numbers and domain contact information for most of -.Pa .COM , .NET , .ORG -and -.Pa .EDU -domains. -.Pp -.Sy NOTE ! -The registration of these domains is now done by a number of -independent and competing registrars and this database holds no information -on the domains registered by organizations other than Network Solutions, Inc. -Also, note that the -.Tn InterNIC -database -.Pq Pa whois.internic.net -is no longer handled by Network Solutions, Inc. -For details, see -.Pa http://www.internic.net/ . -.Pp -(Hint: Contact information, identified by the term -.Em handle , -can be looked up by prefixing -.Qq Li "handle " -to the -.Tn NIC -handle in the query.) .It Fl I Use the Internet Assigned Numbers Authority .Pq Tn IANA @@ -190,24 +168,21 @@ Use the R\(aaeseaux IP Europ\(aaeens database. It contains network numbers and domain contact information for Europe. -.It Fl R -Use the Russia Network Information Center -.Pq Tn RIPN -database. -It contains network numbers and domain contact information -for subdomains of -.Pa .RU . -This option is deprecated; use the -.Fl c -option with an argument of -.Qq Li RU -instead. .El .Pp The operands specified to .Nm are treated independently and may be used as queries on different whois servers. +.Sh ENVIRONMENT +.Bl -tag +.It Ev RA_SERVER +The default whois server. +If this is unset, +.Nm +will use +.Pa whois.crsnic.net . +.El .Sh EXIT STATUS .Ex -std .Sh EXAMPLES From owner-svn-src-all@FreeBSD.ORG Thu May 14 10:31:38 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F246BEC0; Thu, 14 May 2015 10:31:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DF25F1FA7; Thu, 14 May 2015 10:31:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4EAVbmA038135; Thu, 14 May 2015 10:31:37 GMT (envelope-from fanf@FreeBSD.org) Received: (from fanf@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4EAVbJA038134; Thu, 14 May 2015 10:31:37 GMT (envelope-from fanf@FreeBSD.org) Message-Id: <201505141031.t4EAVbJA038134@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: fanf set sender to fanf@FreeBSD.org using -f From: Tony Finch Date: Thu, 14 May 2015 10:31:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282884 - head/usr.bin/whois 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.20 Precedence: list List-Id: "SVN commit messages 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, 14 May 2015 10:31:38 -0000 Author: fanf Date: Thu May 14 10:31:37 2015 New Revision: 282884 URL: https://svnweb.freebsd.org/changeset/base/282884 Log: whois: special case certain query suffixes This extends the existing support for -NORID handles to include -NICAT, -ARIN, and -RIPE handles. The suffix machinery is also used to work around a problem with lack of referrals from the Nominet server for .uk: names under .ac.uk need to be queried directly at JANET's whois server. Modified: head/usr.bin/whois/whois.c Modified: head/usr.bin/whois/whois.c ============================================================================== --- head/usr.bin/whois/whois.c Thu May 14 10:30:37 2015 (r282883) +++ head/usr.bin/whois/whois.c Thu May 14 10:31:37 2015 (r282884) @@ -71,7 +71,6 @@ __FBSDID("$FreeBSD$"); #define MNICHOST "whois.ra.net" #define QNICHOST_TAIL ".whois-servers.net" #define BNICHOST "whois.registro.br" -#define NORIDHOST "whois.norid.no" #define IANAHOST "whois.iana.org" #define GERMNICHOST "de.whois-servers.net" #define FNICHOST "whois.afrinic.net" @@ -84,6 +83,19 @@ __FBSDID("$FreeBSD$"); #define ishost(h) (isalnum((unsigned char)h) || h == '.' || h == '-') +static struct { + const char *suffix, *server; +} whoiswhere[] = { + /* Various handles */ + { "-ARIN", ANICHOST }, + { "-NICAT", "at" QNICHOST_TAIL }, + { "-NORID", "no" QNICHOST_TAIL }, + { "-RIPE", RNICHOST }, + /* Nominet's whois server doesn't return referrals to JANET */ + { ".ac.uk", "ac.uk" QNICHOST_TAIL }, + { NULL, NULL } +}; + static const char *ip_whois[] = { LNICHOST, RNICHOST, PNICHOST, BNICHOST, FNICHOST, NULL }; static const char *port = DEFAULT_PORT; @@ -176,10 +188,8 @@ main(int argc, char *argv[]) usage(); /* - * If no host or country is specified determine the top level domain - * from the query. If the TLD is a number, query ARIN. Otherwise, use - * TLD.whois-server.net. If the domain does not contain '.', fall - * back to NICHOST. + * If no host or country is specified, try to determine the top + * level domain from the query, or fall back to NICHOST. */ if (host == NULL && country == NULL) { if ((host = getenv("RA_SERVER")) == NULL) { @@ -210,25 +220,32 @@ main(int argc, char *argv[]) * returns a pointer to newly allocated memory containing the whois server to * be queried, or a NULL if the correct server couldn't be determined. The * caller must remember to free(3) the allocated memory. + * + * If the domain is an IPv6 address or has a known suffix, that determines + * the server, else if the TLD is a number, query ARIN, else use + * TLD.whois-server.net. Fail if the domain does not contain '.'. */ static char * choose_server(char *domain) { char *pos, *retval; + int i; if (strchr(domain, ':')) { s_asprintf(&retval, "%s", ANICHOST); return (retval); } - for (pos = strchr(domain, '\0'); pos > domain && *--pos == '.';) - *pos = '\0'; + for (pos = strchr(domain, '\0'); pos > domain && pos[-1] == '.';) + *--pos = '\0'; if (*domain == '\0') errx(EX_USAGE, "can't search for a null string"); - if (strlen(domain) > sizeof("-NORID")-1 && - strcasecmp(domain + strlen(domain) - sizeof("-NORID") + 1, - "-NORID") == 0) { - s_asprintf(&retval, "%s", NORIDHOST); - return (retval); + for (i = 0; whoiswhere[i].suffix != NULL; i++) { + size_t suffix_len = strlen(whoiswhere[i].suffix); + if (domain + suffix_len < pos && + strcasecmp(pos - suffix_len, whoiswhere[i].suffix) == 0) { + s_asprintf(&retval, "%s", whoiswhere[i].server); + return (retval); + } } while (pos > domain && *pos != '.') --pos; From owner-svn-src-all@FreeBSD.ORG Thu May 14 10:32:06 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BB5DF96; Thu, 14 May 2015 10:32:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AB0541FB1; Thu, 14 May 2015 10:32:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4EAW6Du038902; Thu, 14 May 2015 10:32:06 GMT (envelope-from fanf@FreeBSD.org) Received: (from fanf@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4EAW6Kk038901; Thu, 14 May 2015 10:32:06 GMT (envelope-from fanf@FreeBSD.org) Message-Id: <201505141032.t4EAW6Kk038901@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: fanf set sender to fanf@FreeBSD.org using -f From: Tony Finch Date: Thu, 14 May 2015 10:32:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282885 - head/usr.bin/whois 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.20 Precedence: list List-Id: "SVN commit messages 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, 14 May 2015 10:32:06 -0000 Author: fanf Date: Thu May 14 10:32:05 2015 New Revision: 282885 URL: https://svnweb.freebsd.org/changeset/base/282885 Log: whois: code cleanup Remove deprecated options. Use pedantically correct types. Modified: head/usr.bin/whois/whois.c Modified: head/usr.bin/whois/whois.c ============================================================================== --- head/usr.bin/whois/whois.c Thu May 14 10:31:37 2015 (r282884) +++ head/usr.bin/whois/whois.c Thu May 14 10:32:05 2015 (r282885) @@ -119,7 +119,7 @@ main(int argc, char *argv[]) country = host = qnichost = NULL; flags = use_qnichost = 0; - while ((ch = getopt(argc, argv, "aAbc:fgh:iIklmp:QrR6")) != -1) { + while ((ch = getopt(argc, argv, "aAbc:fgh:iIklmp:Qr")) != -1) { switch (ch) { case 'a': host = ANICHOST; @@ -166,15 +166,6 @@ main(int argc, char *argv[]) case 'r': host = RNICHOST; break; - case 'R': - warnx("-R is deprecated; use '-c ru' instead"); - country = "ru"; - break; - /* Remove in FreeBSD 10 */ - case '6': - errx(EX_USAGE, - "-6 is deprecated; use -[aAflr] instead"); - break; case '?': default: usage(); @@ -300,8 +291,9 @@ whois(const char *query, const char *hos FILE *fp; struct addrinfo *hostres, *res; char *buf, *host, *nhost, *p; - int i, j, s = -1, count; - size_t c, len; + int s = -1; + nfds_t i, j; + size_t c, len, count; struct pollfd *fds; int timeout = 180; @@ -497,7 +489,7 @@ static void usage(void) { fprintf(stderr, - "usage: whois [-aAbfgiIklmQrR6] [-c country-code | -h hostname] " + "usage: whois [-aAbfgiIklmQr] [-c country-code | -h hostname] " "[-p port] name ...\n"); exit(EX_USAGE); } From owner-svn-src-all@FreeBSD.ORG Thu May 14 10:32:36 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9FE6B213; Thu, 14 May 2015 10:32:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8F3191FC1; Thu, 14 May 2015 10:32:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4EAWa0M039018; Thu, 14 May 2015 10:32:36 GMT (envelope-from fanf@FreeBSD.org) Received: (from fanf@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4EAWam0039015; Thu, 14 May 2015 10:32:36 GMT (envelope-from fanf@FreeBSD.org) Message-Id: <201505141032.t4EAWam0039015@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: fanf set sender to fanf@FreeBSD.org using -f From: Tony Finch Date: Thu, 14 May 2015 10:32:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282886 - head/usr.bin/whois 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.20 Precedence: list List-Id: "SVN commit messages 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, 14 May 2015 10:32:36 -0000 Author: fanf Date: Thu May 14 10:32:35 2015 New Revision: 282886 URL: https://svnweb.freebsd.org/changeset/base/282886 Log: whois: check WHOIS_SERVER as well as RA_SERVER environment variables WHOIS_SERVER is used by Debian's whois client. Modified: head/usr.bin/whois/whois.1 head/usr.bin/whois/whois.c Modified: head/usr.bin/whois/whois.1 ============================================================================== --- head/usr.bin/whois/whois.1 Thu May 14 10:32:05 2015 (r282885) +++ head/usr.bin/whois/whois.1 Thu May 14 10:32:35 2015 (r282886) @@ -75,8 +75,10 @@ If the query is not a domain name or IP .Nm will fall back to the host specified in the +.Ev WHOIS_SERVER +or .Ev RA_SERVER -environment variable, or if that is not set, it will use +environment variables, or if those are not set, it will use .Pa whois.crsnic.net . .Pp The options are as follows: @@ -176,8 +178,15 @@ are treated independently and may be use as queries on different whois servers. .Sh ENVIRONMENT .Bl -tag +.It Ev WHOIS_SERVER +The primary default whois server. +If this is unset, +.Nm +uses the +.Ev RA_SERVER +environment variable. .It Ev RA_SERVER -The default whois server. +The secondary default whois server. If this is unset, .Nm will use Modified: head/usr.bin/whois/whois.c ============================================================================== --- head/usr.bin/whois/whois.c Thu May 14 10:32:05 2015 (r282885) +++ head/usr.bin/whois/whois.c Thu May 14 10:32:35 2015 (r282886) @@ -183,7 +183,8 @@ main(int argc, char *argv[]) * level domain from the query, or fall back to NICHOST. */ if (host == NULL && country == NULL) { - if ((host = getenv("RA_SERVER")) == NULL) { + if ((host = getenv("WHOIS_SERVER")) == NULL && + (host = getenv("RA_SERVER")) == NULL) { use_qnichost = 1; host = NICHOST; if (!(flags & WHOIS_QUICK)) From owner-svn-src-all@FreeBSD.ORG Thu May 14 10:33:02 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 68C0035F; Thu, 14 May 2015 10:33:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4AD351FCD; Thu, 14 May 2015 10:33:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4EAX2IX039154; Thu, 14 May 2015 10:33:02 GMT (envelope-from fanf@FreeBSD.org) Received: (from fanf@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4EAX1ls039152; Thu, 14 May 2015 10:33:01 GMT (envelope-from fanf@FreeBSD.org) Message-Id: <201505141033.t4EAX1ls039152@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: fanf set sender to fanf@FreeBSD.org using -f From: Tony Finch Date: Thu, 14 May 2015 10:33:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282887 - head/usr.bin/whois 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.20 Precedence: list List-Id: "SVN commit messages 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, 14 May 2015 10:33:02 -0000 Author: fanf Date: Thu May 14 10:33:01 2015 New Revision: 282887 URL: https://svnweb.freebsd.org/changeset/base/282887 Log: whois: try whois.nic.TLD if TLD.whois-servers.net does not exist Based on an idea from OpenBSD. Modified: head/usr.bin/whois/whois.1 head/usr.bin/whois/whois.c Modified: head/usr.bin/whois/whois.1 ============================================================================== --- head/usr.bin/whois/whois.1 Thu May 14 10:32:35 2015 (r282886) +++ head/usr.bin/whois/whois.1 Thu May 14 10:33:01 2015 (r282887) @@ -49,17 +49,18 @@ Network Information Centers .Pp By default .Nm -constructs the name of a whois server to use from the top-level domain +automatically discovers the name of a whois server to use +from the top-level domain .Pq Tn TLD -of the supplied (single) argument, and appending -.Qq Li .whois-servers.net . -This effectively allows a suitable whois server to be selected -automatically for a large number of -.Tn TLDs . -.Pp -In the event that an IP -address is specified, the whois server will default to the American -Registry for Internet Numbers +of the supplied (single) argument. +It tries +.Qq Va TLD Ns Li .whois-servers.net +and +.Qq Li whois.nic. Ns Va TLD +and if neither host exists it falls back to its default server. +.Pp +If an IP address is specified, the whois server will default to +the American Registry for Internet Numbers .Pq Tn ARIN . If a query to .Tn ARIN @@ -71,9 +72,10 @@ that server will be queried also, provid .Fl Q option is not specified. .Pp -If the query is not a domain name or IP address, +If .Nm -will fall back to +cannot automatically discover a server, +it will fall back to the host specified in the .Ev WHOIS_SERVER or @@ -122,7 +124,7 @@ Use the US non-military federal governme contact for subdomains of .Pa .GOV . .It Fl h Ar host -Use the specified host instead of the default variant. +Use the specified host instead of the default. Either a host name or an IP address may be specified. .It Fl i Use the obsolete Network Solutions Registry for Internet Numbers Modified: head/usr.bin/whois/whois.c ============================================================================== --- head/usr.bin/whois/whois.c Thu May 14 10:32:35 2015 (r282886) +++ head/usr.bin/whois/whois.c Thu May 14 10:33:01 2015 (r282887) @@ -69,6 +69,7 @@ __FBSDID("$FreeBSD$"); #define RNICHOST "whois.ripe.net" #define PNICHOST "whois.apnic.net" #define MNICHOST "whois.ra.net" +#define QNICHOST_HEAD "whois.nic." #define QNICHOST_TAIL ".whois-servers.net" #define BNICHOST "whois.registro.br" #define IANAHOST "whois.iana.org" @@ -101,7 +102,7 @@ static const char *ip_whois[] = { LNICHO static const char *port = DEFAULT_PORT; static char *choose_server(char *); -static struct addrinfo *gethostinfo(char const *host, int exit_on_error); +static struct addrinfo *gethostinfo(char const *host, int exitnoname); static void s_asprintf(char **ret, const char *format, ...) __printflike(2, 3); static void usage(void); static void whois(const char *, const char *, int); @@ -214,14 +215,15 @@ main(int argc, char *argv[]) * caller must remember to free(3) the allocated memory. * * If the domain is an IPv6 address or has a known suffix, that determines - * the server, else if the TLD is a number, query ARIN, else use - * TLD.whois-server.net. Fail if the domain does not contain '.'. + * the server, else if the TLD is a number, query ARIN, else try a couple of + * formulaic server names. Fail if the domain does not contain '.'. */ static char * choose_server(char *domain) { char *pos, *retval; int i; + struct addrinfo *res; if (strchr(domain, ':')) { s_asprintf(&retval, "%s", ANICHOST); @@ -243,15 +245,35 @@ choose_server(char *domain) --pos; if (pos <= domain) return (NULL); - if (isdigit((unsigned char)*++pos)) + if (isdigit((unsigned char)*++pos)) { s_asprintf(&retval, "%s", ANICHOST); - else - s_asprintf(&retval, "%s%s", pos, QNICHOST_TAIL); - return (retval); + return (retval); + } + /* Try possible alternative whois server name formulae. */ + for (i = 0; ; ++i) { + switch (i) { + case 0: + s_asprintf(&retval, "%s%s", pos, QNICHOST_TAIL); + break; + case 1: + s_asprintf(&retval, "%s%s", QNICHOST_HEAD, pos); + break; + default: + return (NULL); + } + res = gethostinfo(retval, 0); + if (res) { + freeaddrinfo(res); + return (retval); + } else { + free(retval); + continue; + } + } } static struct addrinfo * -gethostinfo(char const *host, int exit_on_error) +gethostinfo(char const *host, int exit_on_noname) { struct addrinfo hints, *res; int error; @@ -260,13 +282,10 @@ gethostinfo(char const *host, int exit_o hints.ai_flags = 0; hints.ai_family = AF_UNSPEC; hints.ai_socktype = SOCK_STREAM; + res = NULL; error = getaddrinfo(host, port, &hints, &res); - if (error) { - warnx("%s: %s", host, gai_strerror(error)); - if (exit_on_error) - exit(EX_NOHOST); - return (NULL); - } + if (error && (exit_on_noname || error != EAI_NONAME)) + err(EX_NOHOST, "%s: %s", host, gai_strerror(error)); return (res); } From owner-svn-src-all@FreeBSD.ORG Thu May 14 10:33:34 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 730424BD; Thu, 14 May 2015 10:33:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 627BD1FD9; Thu, 14 May 2015 10:33:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4EAXYkm039282; Thu, 14 May 2015 10:33:34 GMT (envelope-from fanf@FreeBSD.org) Received: (from fanf@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4EAXYll039281; Thu, 14 May 2015 10:33:34 GMT (envelope-from fanf@FreeBSD.org) Message-Id: <201505141033.t4EAXYll039281@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: fanf set sender to fanf@FreeBSD.org using -f From: Tony Finch Date: Thu, 14 May 2015 10:33:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282888 - head/usr.bin/whois 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.20 Precedence: list List-Id: "SVN commit messages 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, 14 May 2015 10:33:34 -0000 Author: fanf Date: Thu May 14 10:33:33 2015 New Revision: 282888 URL: https://svnweb.freebsd.org/changeset/base/282888 Log: whois: do not clobber command-line flags when tweaking O_NONBLOCK This can make whois fail to follow referrals when it should. The bug was introduced in r281959. Modified: head/usr.bin/whois/whois.c Modified: head/usr.bin/whois/whois.c ============================================================================== --- head/usr.bin/whois/whois.c Thu May 14 10:33:01 2015 (r282887) +++ head/usr.bin/whois/whois.c Thu May 14 10:33:33 2015 (r282888) @@ -311,7 +311,7 @@ whois(const char *query, const char *hos FILE *fp; struct addrinfo *hostres, *res; char *buf, *host, *nhost, *p; - int s = -1; + int s = -1, f; nfds_t i, j; size_t c, len, count; struct pollfd *fds; @@ -431,9 +431,9 @@ done: if (s != -1) { /* Restore default blocking behavior. */ - if ((flags = fcntl(s, F_GETFL)) != -1) { - flags &= ~O_NONBLOCK; - if (fcntl(s, F_SETFL, flags) == -1) + if ((f = fcntl(s, F_GETFL)) != -1) { + f &= ~O_NONBLOCK; + if (fcntl(s, F_SETFL, f) == -1) err(EX_OSERR, "fcntl()"); } else err(EX_OSERR, "fcntl()"); From owner-svn-src-all@FreeBSD.ORG Thu May 14 10:33:52 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A9CF1605; Thu, 14 May 2015 10:33:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9978A1FDE; Thu, 14 May 2015 10:33:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4EAXqsG039370; Thu, 14 May 2015 10:33:52 GMT (envelope-from fanf@FreeBSD.org) Received: (from fanf@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4EAXqgj039369; Thu, 14 May 2015 10:33:52 GMT (envelope-from fanf@FreeBSD.org) Message-Id: <201505141033.t4EAXqgj039369@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: fanf set sender to fanf@FreeBSD.org using -f From: Tony Finch Date: Thu, 14 May 2015 10:33:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282889 - head/usr.bin/whois 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.20 Precedence: list List-Id: "SVN commit messages 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, 14 May 2015 10:33:52 -0000 Author: fanf Date: Thu May 14 10:33:51 2015 New Revision: 282889 URL: https://svnweb.freebsd.org/changeset/base/282889 Log: whois: alphabetize whois server list Modified: head/usr.bin/whois/whois.c Modified: head/usr.bin/whois/whois.c ============================================================================== --- head/usr.bin/whois/whois.c Thu May 14 10:33:33 2015 (r282888) +++ head/usr.bin/whois/whois.c Thu May 14 10:33:51 2015 (r282889) @@ -60,22 +60,24 @@ __FBSDID("$FreeBSD$"); #include #define ABUSEHOST "whois.abuse.net" -#define NICHOST "whois.crsnic.net" -#define INICHOST "whois.networksolutions.com" -#define GNICHOST "whois.nic.gov" #define ANICHOST "whois.arin.net" -#define LNICHOST "whois.lacnic.net" +#define BNICHOST "whois.registro.br" +#define FNICHOST "whois.afrinic.net" +#define GERMNICHOST "de.whois-servers.net" +#define GNICHOST "whois.nic.gov" +#define IANAHOST "whois.iana.org" +#define INICHOST "whois.networksolutions.com" #define KNICHOST "whois.krnic.net" -#define RNICHOST "whois.ripe.net" -#define PNICHOST "whois.apnic.net" +#define LNICHOST "whois.lacnic.net" #define MNICHOST "whois.ra.net" +#define NICHOST "whois.crsnic.net" +#define PNICHOST "whois.apnic.net" #define QNICHOST_HEAD "whois.nic." #define QNICHOST_TAIL ".whois-servers.net" -#define BNICHOST "whois.registro.br" -#define IANAHOST "whois.iana.org" -#define GERMNICHOST "de.whois-servers.net" -#define FNICHOST "whois.afrinic.net" +#define RNICHOST "whois.ripe.net" + #define DEFAULT_PORT "whois" + #define WHOIS_SERVER_ID "Whois Server: " #define WHOIS_ORG_SERVER_ID "Registrant Street1:Whois Server:" From owner-svn-src-all@FreeBSD.ORG Thu May 14 10:46:21 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7DC82BD0; Thu, 14 May 2015 10:46:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 53BB01166; Thu, 14 May 2015 10:46:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4EAkLWO045103; Thu, 14 May 2015 10:46:21 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4EAkLCr045100; Thu, 14 May 2015 10:46:21 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201505141046.t4EAkLCr045100@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Thu, 14 May 2015 10:46: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: r282890 - stable/10/bin/cp 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.20 Precedence: list List-Id: "SVN commit messages 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, 14 May 2015 10:46:21 -0000 Author: jilles Date: Thu May 14 10:46:20 2015 New Revision: 282890 URL: https://svnweb.freebsd.org/changeset/base/282890 Log: MFC r282482: cp: Remove fts sorting. In an attempt to improve performance, cp reordered directories first (although the comment says directories last). This is not effective with new UFS layout policies. The sorting reorders multiple arguments passed to cp, which may be undesirable. Additionally, the comparison function does not induce a total order. Per POSIX, this causes undefined behaviour in qsort(). NetBSD removed the sorting in 2009. On filesystems that return directory entries in hash/btree order, sorting by d_fileno before statting improves performance on large directories. However, this can only be implemented in fts(3). PR: 53475 Reviewed by: bde (in 2004) Modified: stable/10/bin/cp/cp.c Directory Properties: stable/10/ (props changed) Modified: stable/10/bin/cp/cp.c ============================================================================== --- stable/10/bin/cp/cp.c Thu May 14 10:33:51 2015 (r282889) +++ stable/10/bin/cp/cp.c Thu May 14 10:46:20 2015 (r282890) @@ -90,7 +90,6 @@ volatile sig_atomic_t info; enum op { FILE_TO_FILE, FILE_TO_DIR, DIR_TO_DNE }; static int copy(char *[], enum op, int); -static int mastercmp(const FTSENT * const *, const FTSENT * const *); static void siginfo(int __unused); int @@ -274,7 +273,7 @@ copy(char *argv[], enum op type, int fts mask = ~umask(0777); umask(~mask); - if ((ftsp = fts_open(argv, fts_options, mastercmp)) == NULL) + if ((ftsp = fts_open(argv, fts_options, NULL)) == NULL) err(1, "fts_open"); for (badcp = rval = 0; (curr = fts_read(ftsp)) != NULL; badcp = 0) { switch (curr->fts_info) { @@ -488,32 +487,6 @@ copy(char *argv[], enum op type, int fts return (rval); } -/* - * mastercmp -- - * The comparison function for the copy order. The order is to copy - * non-directory files before directory files. The reason for this - * is because files tend to be in the same cylinder group as their - * parent directory, whereas directories tend not to be. Copying the - * files first reduces seeking. - */ -static int -mastercmp(const FTSENT * const *a, const FTSENT * const *b) -{ - int a_info, b_info; - - a_info = (*a)->fts_info; - if (a_info == FTS_ERR || a_info == FTS_NS || a_info == FTS_DNR) - return (0); - b_info = (*b)->fts_info; - if (b_info == FTS_ERR || b_info == FTS_NS || b_info == FTS_DNR) - return (0); - if (a_info == FTS_D) - return (-1); - if (b_info == FTS_D) - return (1); - return (0); -} - static void siginfo(int sig __unused) { From owner-svn-src-all@FreeBSD.ORG Thu May 14 11:25:19 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8CCA58EF; Thu, 14 May 2015 11:25:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7C2901630; Thu, 14 May 2015 11:25:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4EBPJD6065415; Thu, 14 May 2015 11:25:19 GMT (envelope-from fanf@FreeBSD.org) Received: (from fanf@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4EBPJFL065414; Thu, 14 May 2015 11:25:19 GMT (envelope-from fanf@FreeBSD.org) Message-Id: <201505141125.t4EBPJFL065414@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: fanf set sender to fanf@FreeBSD.org using -f From: Tony Finch Date: Thu, 14 May 2015 11:25:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282891 - head/usr.bin/whois 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.20 Precedence: list List-Id: "SVN commit messages 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, 14 May 2015 11:25:19 -0000 Author: fanf Date: Thu May 14 11:25:18 2015 New Revision: 282891 URL: https://svnweb.freebsd.org/changeset/base/282891 Log: Bump whois(1) date. (Thanks to bz@ for the reminder!) Modified: head/usr.bin/whois/whois.1 Modified: head/usr.bin/whois/whois.1 ============================================================================== --- head/usr.bin/whois/whois.1 Thu May 14 10:46:20 2015 (r282890) +++ head/usr.bin/whois/whois.1 Thu May 14 11:25:18 2015 (r282891) @@ -28,7 +28,7 @@ .\" From: @(#)whois.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd October 2, 2009 +.Dd May 14, 2015 .Dt WHOIS 1 .Os .Sh NAME From owner-svn-src-all@FreeBSD.ORG Thu May 14 11:33:32 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ABC5BD58; Thu, 14 May 2015 11:33:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9B12B173F; Thu, 14 May 2015 11:33:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4EBXWuf070017; Thu, 14 May 2015 11:33:32 GMT (envelope-from fanf@FreeBSD.org) Received: (from fanf@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4EBXWLD070016; Thu, 14 May 2015 11:33:32 GMT (envelope-from fanf@FreeBSD.org) Message-Id: <201505141133.t4EBXWLD070016@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: fanf set sender to fanf@FreeBSD.org using -f From: Tony Finch Date: Thu, 14 May 2015 11:33:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282892 - head/usr.bin/whois 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.20 Precedence: list List-Id: "SVN commit messages 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, 14 May 2015 11:33:32 -0000 Author: fanf Date: Thu May 14 11:33:31 2015 New Revision: 282892 URL: https://svnweb.freebsd.org/changeset/base/282892 Log: Update whois(1) synopsis. Modified: head/usr.bin/whois/whois.1 Modified: head/usr.bin/whois/whois.1 ============================================================================== --- head/usr.bin/whois/whois.1 Thu May 14 11:25:18 2015 (r282891) +++ head/usr.bin/whois/whois.1 Thu May 14 11:33:31 2015 (r282892) @@ -36,7 +36,7 @@ .Nd "Internet domain name and network number directory service" .Sh SYNOPSIS .Nm -.Op Fl aAbfgiIklmQrR +.Op Fl aAbfgiIklmPQr .Op Fl c Ar country-code | Fl h Ar host .Op Fl p Ar port .Ar name ... From owner-svn-src-all@FreeBSD.ORG Thu May 14 11:37:37 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C1D6D214; Thu, 14 May 2015 11:37:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 97357177F; Thu, 14 May 2015 11:37:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4EBbb4o070939; Thu, 14 May 2015 11:37:37 GMT (envelope-from fanf@FreeBSD.org) Received: (from fanf@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4EBbbvl070937; Thu, 14 May 2015 11:37:37 GMT (envelope-from fanf@FreeBSD.org) Message-Id: <201505141137.t4EBbbvl070937@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: fanf set sender to fanf@FreeBSD.org using -f From: Tony Finch Date: Thu, 14 May 2015 11:37:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282893 - head/usr.bin/whois 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.20 Precedence: list List-Id: "SVN commit messages 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, 14 May 2015 11:37:37 -0000 Author: fanf Date: Thu May 14 11:37:36 2015 New Revision: 282893 URL: https://svnweb.freebsd.org/changeset/base/282893 Log: whois: add an option to query the PeeringDB Modified: head/usr.bin/whois/whois.1 head/usr.bin/whois/whois.c Modified: head/usr.bin/whois/whois.1 ============================================================================== --- head/usr.bin/whois/whois.1 Thu May 14 11:33:31 2015 (r282892) +++ head/usr.bin/whois/whois.1 Thu May 14 11:37:36 2015 (r282893) @@ -159,6 +159,10 @@ Connect to the whois server on If this option is not specified, .Nm defaults to port 43. +.It Fl P +Use the PeeringDB database of AS numbers. +It contains details about presence at internet peering points +for many network operators. .It Fl Q Do a quick lookup. This means that Modified: head/usr.bin/whois/whois.c ============================================================================== --- head/usr.bin/whois/whois.c Thu May 14 11:33:31 2015 (r282892) +++ head/usr.bin/whois/whois.c Thu May 14 11:37:36 2015 (r282893) @@ -71,6 +71,7 @@ __FBSDID("$FreeBSD$"); #define LNICHOST "whois.lacnic.net" #define MNICHOST "whois.ra.net" #define NICHOST "whois.crsnic.net" +#define PDBHOST "whois.peeringdb.com" #define PNICHOST "whois.apnic.net" #define QNICHOST_HEAD "whois.nic." #define QNICHOST_TAIL ".whois-servers.net" @@ -122,7 +123,7 @@ main(int argc, char *argv[]) country = host = qnichost = NULL; flags = use_qnichost = 0; - while ((ch = getopt(argc, argv, "aAbc:fgh:iIklmp:Qr")) != -1) { + while ((ch = getopt(argc, argv, "aAbc:fgh:iIklmp:PQr")) != -1) { switch (ch) { case 'a': host = ANICHOST; @@ -163,6 +164,9 @@ main(int argc, char *argv[]) case 'p': port = optarg; break; + case 'P': + host = PDBHOST; + break; case 'Q': flags |= WHOIS_QUICK; break; @@ -511,7 +515,7 @@ static void usage(void) { fprintf(stderr, - "usage: whois [-aAbfgiIklmQr] [-c country-code | -h hostname] " + "usage: whois [-aAbfgiIklmPQr] [-c country-code | -h hostname] " "[-p port] name ...\n"); exit(EX_USAGE); } From owner-svn-src-all@FreeBSD.ORG Thu May 14 11:47:18 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ECDD573F; Thu, 14 May 2015 11:47:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DB53618AA; Thu, 14 May 2015 11:47:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4EBlIuN075839; Thu, 14 May 2015 11:47:18 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4EBlI2j075838; Thu, 14 May 2015 11:47:18 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201505141147.t4EBlI2j075838@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Thu, 14 May 2015 11:47:18 +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: r282894 - stable/10/sys/netinet6 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.20 Precedence: list List-Id: "SVN commit messages 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, 14 May 2015 11:47:19 -0000 Author: ae Date: Thu May 14 11:47:18 2015 New Revision: 282894 URL: https://svnweb.freebsd.org/changeset/base/282894 Log: MFC r282578: Mark data checksum as valid for multicast packets, that we send back to myself via simloop. Also remove duplicate check under #ifdef DIAGNOSTIC. PR: 180065 Modified: stable/10/sys/netinet6/ip6_output.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet6/ip6_output.c ============================================================================== --- stable/10/sys/netinet6/ip6_output.c Thu May 14 11:37:36 2015 (r282893) +++ stable/10/sys/netinet6/ip6_output.c Thu May 14 11:47:18 2015 (r282894) @@ -2816,14 +2816,6 @@ ip6_mloopback(struct ifnet *ifp, struct if (copym == NULL) return; } - -#ifdef DIAGNOSTIC - if (copym->m_len < sizeof(*ip6)) { - m_freem(copym); - return; - } -#endif - ip6 = mtod(copym, struct ip6_hdr *); /* * clear embedded scope identifiers if necessary. @@ -2831,7 +2823,11 @@ ip6_mloopback(struct ifnet *ifp, struct */ in6_clearscope(&ip6->ip6_src); in6_clearscope(&ip6->ip6_dst); - + if (copym->m_pkthdr.csum_flags & CSUM_DELAY_DATA_IPV6) { + copym->m_pkthdr.csum_flags |= CSUM_DATA_VALID_IPV6 | + CSUM_PSEUDO_HDR; + copym->m_pkthdr.csum_data = 0xffff; + } (void)if_simloop(ifp, copym, dst->sin6_family, 0); } From owner-svn-src-all@FreeBSD.ORG Thu May 14 11:52:27 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EB15BA9D; Thu, 14 May 2015 11:52:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D9CD9199A; Thu, 14 May 2015 11:52:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4EBqRcb080208; Thu, 14 May 2015 11:52:27 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4EBqRfR080206; Thu, 14 May 2015 11:52:27 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201505141152.t4EBqRfR080206@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Thu, 14 May 2015 11:52:27 +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: r282895 - stable/9/sys/netinet6 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.20 Precedence: list List-Id: "SVN commit messages 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, 14 May 2015 11:52:28 -0000 Author: ae Date: Thu May 14 11:52:27 2015 New Revision: 282895 URL: https://svnweb.freebsd.org/changeset/base/282895 Log: MFC r282578: Mark data checksum as valid for multicast packets, that we send back to myself via simloop. Also remove duplicate check under #ifdef DIAGNOSTIC. PR: 180065 Modified: stable/9/sys/netinet6/ip6_output.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet6/ip6_output.c ============================================================================== --- stable/9/sys/netinet6/ip6_output.c Thu May 14 11:47:18 2015 (r282894) +++ stable/9/sys/netinet6/ip6_output.c Thu May 14 11:52:27 2015 (r282895) @@ -3005,14 +3005,6 @@ ip6_mloopback(struct ifnet *ifp, struct if (copym == NULL) return; } - -#ifdef DIAGNOSTIC - if (copym->m_len < sizeof(*ip6)) { - m_freem(copym); - return; - } -#endif - ip6 = mtod(copym, struct ip6_hdr *); /* * clear embedded scope identifiers if necessary. @@ -3020,7 +3012,11 @@ ip6_mloopback(struct ifnet *ifp, struct */ in6_clearscope(&ip6->ip6_src); in6_clearscope(&ip6->ip6_dst); - + if (copym->m_pkthdr.csum_flags & CSUM_DELAY_DATA_IPV6) { + copym->m_pkthdr.csum_flags |= CSUM_DATA_VALID_IPV6 | + CSUM_PSEUDO_HDR; + copym->m_pkthdr.csum_data = 0xffff; + } (void)if_simloop(ifp, copym, dst->sin6_family, 0); } From owner-svn-src-all@FreeBSD.ORG Thu May 14 12:43:40 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AA016FAF; Thu, 14 May 2015 12:43:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 98A49111D; Thu, 14 May 2015 12:43:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4ECheYs005645; Thu, 14 May 2015 12:43:40 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4EChev2005644; Thu, 14 May 2015 12:43:40 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201505141243.t4EChev2005644@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 14 May 2015 12:43:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282896 - head/sys/boot/efi/loader/arch/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.20 Precedence: list List-Id: "SVN commit messages 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, 14 May 2015 12:43:40 -0000 Author: andrew Date: Thu May 14 12:43:39 2015 New Revision: 282896 URL: https://svnweb.freebsd.org/changeset/base/282896 Log: Remove OUTPUT_FORMAT from theARM EFI linker script, it breaks building for big-endian arm. Modified: head/sys/boot/efi/loader/arch/arm/ldscript.arm Modified: head/sys/boot/efi/loader/arch/arm/ldscript.arm ============================================================================== --- head/sys/boot/efi/loader/arch/arm/ldscript.arm Thu May 14 11:52:27 2015 (r282895) +++ head/sys/boot/efi/loader/arch/arm/ldscript.arm Thu May 14 12:43:39 2015 (r282896) @@ -1,6 +1,4 @@ /* $FreeBSD$ */ -OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", - "elf32-littlearm") OUTPUT_ARCH(arm) ENTRY(_start) SECTIONS From owner-svn-src-all@FreeBSD.ORG Thu May 14 12:59:17 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D84236B3; Thu, 14 May 2015 12:59:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C6A471448; Thu, 14 May 2015 12:59:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4ECxHJG011277; Thu, 14 May 2015 12:59:17 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4ECxHTR011276; Thu, 14 May 2015 12:59:17 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201505141259.t4ECxHTR011276@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Thu, 14 May 2015 12:59:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282897 - head/sys/dev/sfxge 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.20 Precedence: list List-Id: "SVN commit messages 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, 14 May 2015 12:59:18 -0000 Author: arybchik Date: Thu May 14 12:59:17 2015 New Revision: 282897 URL: https://svnweb.freebsd.org/changeset/base/282897 Log: sfxge: add missing const qualifier to sfxge_link_mode Sponsored by: Solarflare Communications, Inc. MFC after: 2 days Modified: head/sys/dev/sfxge/sfxge_port.c Modified: head/sys/dev/sfxge/sfxge_port.c ============================================================================== --- head/sys/dev/sfxge/sfxge_port.c Thu May 14 12:43:39 2015 (r282896) +++ head/sys/dev/sfxge/sfxge_port.c Thu May 14 12:59:17 2015 (r282897) @@ -686,7 +686,7 @@ fail: return (rc); } -static int sfxge_link_mode[EFX_PHY_MEDIA_NTYPES][EFX_LINK_NMODES] = { +static const int sfxge_link_mode[EFX_PHY_MEDIA_NTYPES][EFX_LINK_NMODES] = { [EFX_PHY_MEDIA_CX4] = { [EFX_LINK_10000FDX] = IFM_ETHER | IFM_FDX | IFM_10G_CX4, }, From owner-svn-src-all@FreeBSD.ORG Thu May 14 13:27:25 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 82157F4C; Thu, 14 May 2015 13:27:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7029E194C; Thu, 14 May 2015 13:27:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4EDRPH7025585; Thu, 14 May 2015 13:27:25 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4EDRP4a025584; Thu, 14 May 2015 13:27:25 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201505141327.t4EDRP4a025584@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 14 May 2015 13:27:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282898 - head/share/vt/keymaps 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.20 Precedence: list List-Id: "SVN commit messages 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, 14 May 2015 13:27:25 -0000 Author: emaste Date: Thu May 14 13:27:24 2015 New Revision: 282898 URL: https://svnweb.freebsd.org/changeset/base/282898 Log: Correct UTF-8 encoding in Británico One á was ISO 8859-1 0xE1 instead of UTF-8 0xC3 0xA1. Modified: head/share/vt/keymaps/INDEX.keymaps Modified: head/share/vt/keymaps/INDEX.keymaps ============================================================================== --- head/share/vt/keymaps/INDEX.keymaps Thu May 14 12:59:17 2015 (r282897) +++ head/share/vt/keymaps/INDEX.keymaps Thu May 14 13:27:24 2015 (r282898) @@ -517,7 +517,7 @@ uk.capsctrl.kbd:en:United Kingdom (Caps uk.capsctrl.kbd:de:Vereinigtes Königreich (Caps Lock als linke Strg) #uk.iso-ctrl.kbd:fr:Royaume Uni (caps lock acts as Left Ctrl) #uk.iso-ctrl.kbd:pt:Reino Unido (caps lock acts as Left Ctrl) -#uk.iso-ctrl.kbd:es:Británico (caps lock acts as Left Ctrl) +#uk.iso-ctrl.kbd:es:Británico (caps lock acts as Left Ctrl) uk.dvorak.kbd:en:United Kingdom Dvorak uk.dvorak.kbd:de:Vereinigtes Königreich Dvorak From owner-svn-src-all@FreeBSD.ORG Thu May 14 13:28:30 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 31E361FF; Thu, 14 May 2015 13:28:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1FE201961; Thu, 14 May 2015 13:28:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4EDST8O025766; Thu, 14 May 2015 13:28:29 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4EDST1J025765; Thu, 14 May 2015 13:28:29 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201505141328.t4EDST1J025765@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Thu, 14 May 2015 13:28:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282899 - head/sys/dev/sfxge 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.20 Precedence: list List-Id: "SVN commit messages 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, 14 May 2015 13:28:30 -0000 Author: arybchik Date: Thu May 14 13:28:29 2015 New Revision: 282899 URL: https://svnweb.freebsd.org/changeset/base/282899 Log: sfxge: add local variable with Rx descriptor flags Sponsored by: Solarflare Communications, Inc. MFC after: 2 days Modified: head/sys/dev/sfxge/sfxge_rx.c Modified: head/sys/dev/sfxge/sfxge_rx.c ============================================================================== --- head/sys/dev/sfxge/sfxge_rx.c Thu May 14 13:27:24 2015 (r282898) +++ head/sys/dev/sfxge/sfxge_rx.c Thu May 14 13:28:29 2015 (r282899) @@ -322,23 +322,24 @@ static void sfxge_rx_deliver(struct sfxge_softc *sc, struct sfxge_rx_sw_desc *rx_desc) { struct mbuf *m = rx_desc->mbuf; + int flags = rx_desc->flags; int csum_flags; /* Convert checksum flags */ - csum_flags = (rx_desc->flags & EFX_CKSUM_IPV4) ? + csum_flags = (flags & EFX_CKSUM_IPV4) ? (CSUM_IP_CHECKED | CSUM_IP_VALID) : 0; - if (rx_desc->flags & EFX_CKSUM_TCPUDP) + if (flags & EFX_CKSUM_TCPUDP) csum_flags |= CSUM_DATA_VALID | CSUM_PSEUDO_HDR; - if (rx_desc->flags & (EFX_PKT_IPV4 | EFX_PKT_IPV6)) { + if (flags & (EFX_PKT_IPV4 | EFX_PKT_IPV6)) { m->m_pkthdr.flowid = EFX_RX_HASH_VALUE(EFX_RX_HASHALG_TOEPLITZ, mtod(m, uint8_t *)); /* The hash covers a 4-tuple for TCP only */ M_HASHTYPE_SET(m, - (rx_desc->flags & EFX_PKT_IPV4) ? - ((rx_desc->flags & EFX_PKT_TCP) ? + (flags & EFX_PKT_IPV4) ? + ((flags & EFX_PKT_TCP) ? M_HASHTYPE_RSS_TCP_IPV4 : M_HASHTYPE_RSS_IPV4) : - ((rx_desc->flags & EFX_PKT_TCP) ? + ((flags & EFX_PKT_TCP) ? M_HASHTYPE_RSS_TCP_IPV6 : M_HASHTYPE_RSS_IPV6)); } m->m_data += sc->rx_prefix_size; From owner-svn-src-all@FreeBSD.ORG Thu May 14 13:49:01 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9E0F36BB; Thu, 14 May 2015 13:49:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8BBF31C1C; Thu, 14 May 2015 13:49:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4EDn1Px035410; Thu, 14 May 2015 13:49:01 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4EDn1LU035409; Thu, 14 May 2015 13:49:01 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201505141349.t4EDn1LU035409@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Thu, 14 May 2015 13:49:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282900 - head/sys/dev/sfxge 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.20 Precedence: list List-Id: "SVN commit messages 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, 14 May 2015 13:49:01 -0000 Author: arybchik Date: Thu May 14 13:49:00 2015 New Revision: 282900 URL: https://svnweb.freebsd.org/changeset/base/282900 Log: sfxge: IPv4 Tx checksum offload may be disabled in fact Split IFCAP_HWCSUM to IFCAP_RXCSUM and IFCAP_TXCSUM to highlight Tx and Rx. Sponsored by: Solarflare Communications, Inc. MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D2541 Modified: head/sys/dev/sfxge/sfxge.c Modified: head/sys/dev/sfxge/sfxge.c ============================================================================== --- head/sys/dev/sfxge/sfxge.c Thu May 14 13:28:29 2015 (r282899) +++ head/sys/dev/sfxge/sfxge.c Thu May 14 13:49:00 2015 (r282900) @@ -59,12 +59,12 @@ __FBSDID("$FreeBSD$"); #include "sfxge_rx.h" #include "sfxge_version.h" -#define SFXGE_CAP (IFCAP_VLAN_MTU | \ - IFCAP_HWCSUM | IFCAP_VLAN_HWCSUM | IFCAP_TSO | \ +#define SFXGE_CAP (IFCAP_VLAN_MTU | IFCAP_VLAN_HWCSUM | \ + IFCAP_RXCSUM | IFCAP_TXCSUM | IFCAP_TSO | \ IFCAP_JUMBO_MTU | IFCAP_LRO | \ IFCAP_VLAN_HWTSO | IFCAP_LINKSTATE | IFCAP_HWSTATS) #define SFXGE_CAP_ENABLE SFXGE_CAP -#define SFXGE_CAP_FIXED (IFCAP_VLAN_MTU | IFCAP_HWCSUM | IFCAP_VLAN_HWCSUM | \ +#define SFXGE_CAP_FIXED (IFCAP_VLAN_MTU | IFCAP_RXCSUM | IFCAP_VLAN_HWCSUM | \ IFCAP_JUMBO_MTU | IFCAP_LINKSTATE | IFCAP_HWSTATS) MALLOC_DEFINE(M_SFXGE, "sfxge", "Solarflare 10GigE driver"); From owner-svn-src-all@FreeBSD.ORG Thu May 14 14:03:59 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 17A73DA8; Thu, 14 May 2015 14:03:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 041281E75; Thu, 14 May 2015 14:03:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4EE3wSo044838; Thu, 14 May 2015 14:03:58 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4EE3utX044823; Thu, 14 May 2015 14:03:56 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201505141403.t4EE3utX044823@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 14 May 2015 14:03:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282901 - in head: sys/amd64/conf sys/arm64/conf sys/conf sys/i386/conf sys/kern sys/pc98/conf sys/powerpc/conf sys/sparc64/conf usr.bin/rctl 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.20 Precedence: list List-Id: "SVN commit messages 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, 14 May 2015 14:03:59 -0000 Author: trasz Date: Thu May 14 14:03:55 2015 New Revision: 282901 URL: https://svnweb.freebsd.org/changeset/base/282901 Log: Build GENERIC with RACCT/RCTL support by default. Note that it still needs to be enabled by adding "kern.racct.enable=1" to /boot/loader.conf. Differential Revision: https://reviews.freebsd.org/D2407 Reviewed by: emaste@, wblock@ MFC after: 1 month Relnotes: yes Sponsored by: The FreeBSD Foundation Modified: head/sys/amd64/conf/GENERIC head/sys/arm64/conf/GENERIC head/sys/conf/options head/sys/i386/conf/GENERIC head/sys/kern/kern_racct.c head/sys/pc98/conf/GENERIC head/sys/powerpc/conf/GENERIC head/sys/sparc64/conf/GENERIC head/usr.bin/rctl/rctl.8 Modified: head/sys/amd64/conf/GENERIC ============================================================================== --- head/sys/amd64/conf/GENERIC Thu May 14 13:49:00 2015 (r282900) +++ head/sys/amd64/conf/GENERIC Thu May 14 14:03:55 2015 (r282901) @@ -73,6 +73,9 @@ options KDTRACE_FRAME # Ensure frames options KDTRACE_HOOKS # Kernel DTrace hooks options DDB_CTF # Kernel ELF linker loads CTF data options INCLUDE_CONFIG_FILE # Include this file in kernel +options RACCT # Resource accounting framework +options RACCT_DEFAULT_TO_DISABLED # Set kern.racct.enable=0 by default +options RCTL # Resource limits # Debugging support. Always need this: options KDB # Enable kernel debugger support. Modified: head/sys/arm64/conf/GENERIC ============================================================================== --- head/sys/arm64/conf/GENERIC Thu May 14 13:49:00 2015 (r282900) +++ head/sys/arm64/conf/GENERIC Thu May 14 14:03:55 2015 (r282901) @@ -65,6 +65,9 @@ options MAC # TrustedBSD MAC Framewor options KDTRACE_FRAME # Ensure frames are compiled in options KDTRACE_HOOKS # Kernel DTrace hooks options VFP # Floating-point support +options RACCT # Resource accounting framework +options RACCT_DEFAULT_TO_DISABLED # Set kern.racct.enable=0 by default +options RCTL # Resource limits device virtio device virtio_mmio Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Thu May 14 13:49:00 2015 (r282900) +++ head/sys/conf/options Thu May 14 14:03:55 2015 (r282901) @@ -931,7 +931,7 @@ IPOIB_CM opt_ofed.h # Resource Accounting RACCT opt_global.h -RACCT_DISABLED opt_global.h +RACCT_DEFAULT_TO_DISABLED opt_global.h # Resource Limits RCTL opt_global.h Modified: head/sys/i386/conf/GENERIC ============================================================================== --- head/sys/i386/conf/GENERIC Thu May 14 13:49:00 2015 (r282900) +++ head/sys/i386/conf/GENERIC Thu May 14 14:03:55 2015 (r282901) @@ -73,6 +73,9 @@ options MAC # TrustedBSD MAC Framewor options KDTRACE_HOOKS # Kernel DTrace hooks options DDB_CTF # Kernel ELF linker loads CTF data options INCLUDE_CONFIG_FILE # Include this file in kernel +options RACCT # Resource accounting framework +options RACCT_DEFAULT_TO_DISABLED # Set kern.racct.enable=0 by default +options RCTL # Resource limits # Debugging support. Always need this: options KDB # Enable kernel debugger support. Modified: head/sys/kern/kern_racct.c ============================================================================== --- head/sys/kern/kern_racct.c Thu May 14 13:49:00 2015 (r282900) +++ head/sys/kern/kern_racct.c Thu May 14 14:03:55 2015 (r282901) @@ -70,7 +70,7 @@ FEATURE(racct, "Resource Accounting"); * Do not block processes that have their %cpu usage <= pcpu_threshold. */ static int pcpu_threshold = 1; -#ifdef RACCT_DISABLED +#ifdef RACCT_DEFAULT_TO_DISABLED int racct_enable = 0; #else int racct_enable = 1; Modified: head/sys/pc98/conf/GENERIC ============================================================================== --- head/sys/pc98/conf/GENERIC Thu May 14 13:49:00 2015 (r282900) +++ head/sys/pc98/conf/GENERIC Thu May 14 14:03:55 2015 (r282901) @@ -71,6 +71,9 @@ options CAPABILITY_MODE # Capsicum cap options CAPABILITIES # Capsicum capabilities options MAC # TrustedBSD MAC Framework options INCLUDE_CONFIG_FILE # Include this file in kernel +options RACCT # Resource accounting framework +options RACCT_DEFAULT_TO_DISABLED # Set kern.racct.enable=0 by default +options RCTL # Resource limits # Debugging support. Always need this: options KDB # Enable kernel debugger support. Modified: head/sys/powerpc/conf/GENERIC ============================================================================== --- head/sys/powerpc/conf/GENERIC Thu May 14 13:49:00 2015 (r282900) +++ head/sys/powerpc/conf/GENERIC Thu May 14 14:03:55 2015 (r282901) @@ -77,6 +77,9 @@ options MAC # TrustedBSD MAC Framewor options KDTRACE_HOOKS # Kernel DTrace hooks options DDB_CTF # Kernel ELF linker loads CTF data options INCLUDE_CONFIG_FILE # Include this file in kernel +options RACCT # Resource accounting framework +options RACCT_DEFAULT_TO_DISABLED # Set kern.racct.enable=0 by default +options RCTL # Resource limits # Debugging support. Always need this: options KDB # Enable kernel debugger support. Modified: head/sys/sparc64/conf/GENERIC ============================================================================== --- head/sys/sparc64/conf/GENERIC Thu May 14 13:49:00 2015 (r282900) +++ head/sys/sparc64/conf/GENERIC Thu May 14 14:03:55 2015 (r282901) @@ -67,6 +67,9 @@ options CAPABILITY_MODE # Capsicum cap options CAPABILITIES # Capsicum capabilities options MAC # TrustedBSD MAC Framework options INCLUDE_CONFIG_FILE # Include this file in kernel +options RACCT # Resource accounting framework +options RACCT_DEFAULT_TO_DISABLED # Set kern.racct.enable=0 by default +options RCTL # Resource limits # Debugging support. Always need this: options KDB # Enable kernel debugger support. Modified: head/usr.bin/rctl/rctl.8 ============================================================================== --- head/usr.bin/rctl/rctl.8 Thu May 14 13:49:00 2015 (r282900) +++ head/usr.bin/rctl/rctl.8 Thu May 14 14:03:55 2015 (r282901) @@ -233,6 +233,18 @@ for a list of supported signals Not all actions are supported for all resources. Attempting to add a rule with an action not supported by a given resource will result in error. +.Sh LOADER TUNABLES +Tunables can be set at the +.Xr loader 8 +prompt, or +.Xr loader.conf 5 . +.Bl -tag -width indent +.It Va kern.racct.enable: No 1 +Enable +.Nm . +This defaults to 1, unless +.Cd "options RACCT_DEFAULT_TO_DISABLED" +is set in the kernel configuration file. .Sh EXIT STATUS .Ex -std .Sh EXAMPLES From owner-svn-src-all@FreeBSD.ORG Thu May 14 14:07:45 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CF9B01D1; Thu, 14 May 2015 14:07:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A3EF81ECD; Thu, 14 May 2015 14:07:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4EE7jDI045474; Thu, 14 May 2015 14:07:45 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4EE7jRc045472; Thu, 14 May 2015 14:07:45 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201505141407.t4EE7jRc045472@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 14 May 2015 14:07:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282902 - in head/share: syscons/keymaps vt/keymaps 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.20 Precedence: list List-Id: "SVN commit messages 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, 14 May 2015 14:07:45 -0000 Author: emaste Date: Thu May 14 14:07:44 2015 New Revision: 282902 URL: https://svnweb.freebsd.org/changeset/base/282902 Log: Correct language code -- "Danish" is English The menu entry "Danish ISO-8859-1 (macbook)" was first added to the syscons(4) INDEX.keymaps in r241851 with no language code, and then in r256367 incorrectly tagged with "da". It is a Danish keyboard map, but the description is in English and therefore must be "en". This error subsequently propagated into the vt(4) INDEX.keymaps. PR: 146793, 193656 MFC after: 1 week Sponsored by: The FreeBSD Foundation Modified: head/share/syscons/keymaps/INDEX.keymaps head/share/vt/keymaps/INDEX.keymaps Modified: head/share/syscons/keymaps/INDEX.keymaps ============================================================================== --- head/share/syscons/keymaps/INDEX.keymaps Thu May 14 14:03:55 2015 (r282901) +++ head/share/syscons/keymaps/INDEX.keymaps Thu May 14 14:07:44 2015 (r282902) @@ -123,7 +123,7 @@ danish.cp865.kbd:fr:Danois Code page 865 danish.cp865.kbd:pt:Dinamarquês Codepage 865 danish.cp865.kbd:es:Danés Codepage 865 -danish.iso.macbook.kbd:da:Danish ISO-8859-1 (macbook) +danish.iso.macbook.kbd:en:Danish ISO-8859-1 (macbook) danish.iso.macbook.kbd:da:Dansk ISO-8859-1 (macbook) danish.iso.macbook.kbd:de:Dänisch ISO-8859-1 (Macbook) danish.iso.macbook.kbd:fr:Danois ISO-8859-1 (macbook) Modified: head/share/vt/keymaps/INDEX.keymaps ============================================================================== --- head/share/vt/keymaps/INDEX.keymaps Thu May 14 14:03:55 2015 (r282901) +++ head/share/vt/keymaps/INDEX.keymaps Thu May 14 14:07:44 2015 (r282902) @@ -121,7 +121,7 @@ dk.kbd.from-cp865:fr:Danois dk.kbd.from-cp865:pt:Dinamarquês dk.kbd.from-cp865:es:Danés -dk.macbook.kbd:da:Danish (macbook) +dk.macbook.kbd:en:Danish (macbook) dk.macbook.kbd:da:Dansk (macbook) dk.macbook.kbd:de:Dänisch (Macbook) dk.macbook.kbd:fr:Danois (macbook) From owner-svn-src-all@FreeBSD.ORG Thu May 14 14:16:11 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F3D215F8; Thu, 14 May 2015 14:16:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C7EEF1021; Thu, 14 May 2015 14:16:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4EEGA40050165; Thu, 14 May 2015 14:16:10 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4EEGAQX050163; Thu, 14 May 2015 14:16:10 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201505141416.t4EEGAQX050163@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Thu, 14 May 2015 14:16:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282903 - head/sys/dev/sfxge 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.20 Precedence: list List-Id: "SVN commit messages 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, 14 May 2015 14:16:11 -0000 Author: arybchik Date: Thu May 14 14:16:09 2015 New Revision: 282903 URL: https://svnweb.freebsd.org/changeset/base/282903 Log: sfxge: advertise IPv6 Rx and Tx checksum offload support Tx checksum offload may be enabled/disabled. Sponsored by: Solarflare Communications, Inc. MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D2543 Modified: head/sys/dev/sfxge/sfxge.c head/sys/dev/sfxge/sfxge_tx.c Modified: head/sys/dev/sfxge/sfxge.c ============================================================================== --- head/sys/dev/sfxge/sfxge.c Thu May 14 14:07:44 2015 (r282902) +++ head/sys/dev/sfxge/sfxge.c Thu May 14 14:16:09 2015 (r282903) @@ -61,10 +61,12 @@ __FBSDID("$FreeBSD$"); #define SFXGE_CAP (IFCAP_VLAN_MTU | IFCAP_VLAN_HWCSUM | \ IFCAP_RXCSUM | IFCAP_TXCSUM | IFCAP_TSO | \ + IFCAP_RXCSUM_IPV6 | IFCAP_TXCSUM_IPV6 | \ IFCAP_JUMBO_MTU | IFCAP_LRO | \ IFCAP_VLAN_HWTSO | IFCAP_LINKSTATE | IFCAP_HWSTATS) #define SFXGE_CAP_ENABLE SFXGE_CAP #define SFXGE_CAP_FIXED (IFCAP_VLAN_MTU | IFCAP_RXCSUM | IFCAP_VLAN_HWCSUM | \ + IFCAP_RXCSUM_IPV6 | \ IFCAP_JUMBO_MTU | IFCAP_LINKSTATE | IFCAP_HWSTATS) MALLOC_DEFINE(M_SFXGE, "sfxge", "Solarflare 10GigE driver"); @@ -276,6 +278,10 @@ sfxge_if_ioctl(struct ifnet *ifp, unsign ifp->if_hwassist |= (CSUM_IP | CSUM_TCP | CSUM_UDP); else ifp->if_hwassist &= ~(CSUM_IP | CSUM_TCP | CSUM_UDP); + if (ifp->if_capenable & IFCAP_TXCSUM_IPV6) + ifp->if_hwassist |= (CSUM_TCP_IPV6 | CSUM_UDP_IPV6); + else + ifp->if_hwassist &= ~(CSUM_TCP_IPV6 | CSUM_UDP_IPV6); if (ifp->if_capenable & IFCAP_TSO) ifp->if_hwassist |= CSUM_TSO; else @@ -326,7 +332,8 @@ sfxge_ifnet_init(struct ifnet *ifp, stru ifp->if_capabilities = SFXGE_CAP; ifp->if_capenable = SFXGE_CAP_ENABLE; - ifp->if_hwassist = CSUM_TCP | CSUM_UDP | CSUM_IP | CSUM_TSO; + ifp->if_hwassist = CSUM_TCP | CSUM_UDP | CSUM_IP | CSUM_TSO | + CSUM_TCP_IPV6 | CSUM_UDP_IPV6; ether_ifattach(ifp, encp->enc_mac_addr); Modified: head/sys/dev/sfxge/sfxge_tx.c ============================================================================== --- head/sys/dev/sfxge/sfxge_tx.c Thu May 14 14:07:44 2015 (r282902) +++ head/sys/dev/sfxge/sfxge_tx.c Thu May 14 14:16:09 2015 (r282903) @@ -699,7 +699,8 @@ sfxge_if_transmit(struct ifnet *ifp, str ("interface not up")); /* Pick the desired transmit queue. */ - if (m->m_pkthdr.csum_flags & (CSUM_DELAY_DATA | CSUM_TSO)) { + if (m->m_pkthdr.csum_flags & + (CSUM_DELAY_DATA | CSUM_TCP_IPV6 | CSUM_UDP_IPV6 | CSUM_TSO)) { int index = 0; /* check if flowid is set */ From owner-svn-src-all@FreeBSD.ORG Thu May 14 14:20:51 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6804F804; Thu, 14 May 2015 14:20:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 55E9F1143; Thu, 14 May 2015 14:20:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4EEKp4I053368; Thu, 14 May 2015 14:20:51 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4EEKptt053367; Thu, 14 May 2015 14:20:51 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201505141420.t4EEKptt053367@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 14 May 2015 14:20:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282904 - head/usr.sbin/kbdmap 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.20 Precedence: list List-Id: "SVN commit messages 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, 14 May 2015 14:20:51 -0000 Author: emaste Date: Thu May 14 14:20:50 2015 New Revision: 282904 URL: https://svnweb.freebsd.org/changeset/base/282904 Log: kbdmap(1): increase description size to 256 bytes After conversion to UTF-8 some INDEX.keymaps descriptions are longer than the previous limit of 64 bytes. PR: 193656 Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/kbdmap/kbdmap.c Modified: head/usr.sbin/kbdmap/kbdmap.c ============================================================================== --- head/usr.sbin/kbdmap/kbdmap.c Thu May 14 14:16:09 2015 (r282903) +++ head/usr.sbin/kbdmap/kbdmap.c Thu May 14 14:20:50 2015 (r282904) @@ -571,7 +571,7 @@ menu_read(void) char *p; int mark, num_keymaps, items, i; char buffer[256], filename[PATH_MAX]; - char keym[64], lng[64], desc[64]; + char keym[64], lng[64], desc[256]; char dialect[64], lang_abk[64]; struct keymap *km; struct keymap **km_sorted; @@ -616,7 +616,7 @@ menu_read(void) continue; /* Parse input, removing newline */ - matches = sscanf(p, "%64[^:]:%64[^:]:%64[^:\n]", + matches = sscanf(p, "%64[^:]:%64[^:]:%256[^:\n]", keym, lng, desc); if (matches == 3) { if (strcmp(keym, "FONT") From owner-svn-src-all@FreeBSD.ORG Thu May 14 14:40:01 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E4484D1B; Thu, 14 May 2015 14:40:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D291212C5; Thu, 14 May 2015 14:40:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4EEe1Jb060881; Thu, 14 May 2015 14:40:01 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4EEe1qE060879; Thu, 14 May 2015 14:40:01 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201505141440.t4EEe1qE060879@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 14 May 2015 14:40:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282905 - head/share/vt/keymaps 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.20 Precedence: list List-Id: "SVN commit messages 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, 14 May 2015 14:40:02 -0000 Author: emaste Date: Thu May 14 14:40:01 2015 New Revision: 282905 URL: https://svnweb.freebsd.org/changeset/base/282905 Log: Restore 'he' language code for Hebrew kbdmap(1) menu title MFC after: 1 week Sponsored by: The FreeBSD Foundation Modified: head/share/vt/keymaps/INDEX.keymaps Modified: head/share/vt/keymaps/INDEX.keymaps ============================================================================== --- head/share/vt/keymaps/INDEX.keymaps Thu May 14 14:20:50 2015 (r282904) +++ head/share/vt/keymaps/INDEX.keymaps Thu May 14 14:40:01 2015 (r282905) @@ -27,7 +27,7 @@ MENU:fr:Choisissez la nationalité de vo MENU:pl:Wybierz ukÅ‚ad klawiatury MENU:pt:Escolha o layout do teclado MENU:es:Seleccione el idioma de su teclado -MENU::ךלש תדלקמה תפש ×ª× ×¨×—×‘ +MENU:he:ךלש תדלקמה תפש ×ª× ×¨×—×‘ MENU:uk:Bиберіть розкладку клавіатури MENU:el:Επιλέξτε το πληκτÏολόγιο της κονσόλας MENU:hy:Ô¸Õ¶Õ¿Ö€Õ¥Ö„ Õ½Õ¿Õ¥Õ²Õ¶Õ¡Õ·Õ¡Ö€Õ« Õ¤Õ¡Õ½Õ¡Õ¾Õ¸Ö€Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶Õ¨ From owner-svn-src-all@FreeBSD.ORG Thu May 14 15:14:04 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 77B06C92; Thu, 14 May 2015 15:14:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 65D6F17C5; Thu, 14 May 2015 15:14:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4EFE4C5079023; Thu, 14 May 2015 15:14:04 GMT (envelope-from jonathan@FreeBSD.org) Received: (from jonathan@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4EFE4jm079022; Thu, 14 May 2015 15:14:04 GMT (envelope-from jonathan@FreeBSD.org) Message-Id: <201505141514.t4EFE4jm079022@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jonathan set sender to jonathan@FreeBSD.org using -f From: Jonathan Anderson Date: Thu, 14 May 2015 15:14:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282906 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 14 May 2015 15:14:04 -0000 Author: jonathan Date: Thu May 14 15:14:03 2015 New Revision: 282906 URL: https://svnweb.freebsd.org/changeset/base/282906 Log: Allow sizeof(cpuset_t) to be queried in capability mode. This allows functions that retrieve and inspect pthread_attr_t objects to work correctly: querying the cpuset_t size is part of querying CPU affinity information, which is part of creating a complete pthread_attr_t. Approved by: rwatson (mentor) Reviewed by: pjd Sponsored by: NSERC Modified: head/sys/kern/kern_cpuset.c Modified: head/sys/kern/kern_cpuset.c ============================================================================== --- head/sys/kern/kern_cpuset.c Thu May 14 14:40:01 2015 (r282905) +++ head/sys/kern/kern_cpuset.c Thu May 14 15:14:03 2015 (r282906) @@ -113,7 +113,7 @@ static struct unrhdr *cpuset_unr; static struct cpuset *cpuset_zero, *cpuset_default; /* Return the size of cpuset_t at the kernel level */ -SYSCTL_INT(_kern_sched, OID_AUTO, cpusetsize, CTLFLAG_RD, +SYSCTL_INT(_kern_sched, OID_AUTO, cpusetsize, CTLFLAG_RD | CTLFLAG_CAPRD, SYSCTL_NULL_INT_PTR, sizeof(cpuset_t), "sizeof(cpuset_t)"); cpuset_t *cpuset_root; From owner-svn-src-all@FreeBSD.ORG Thu May 14 15:49:49 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5A439A24; Thu, 14 May 2015 15:49:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 456321C68; Thu, 14 May 2015 15:49:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4EFnnAw094251; Thu, 14 May 2015 15:49:49 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4EFnnQg094250; Thu, 14 May 2015 15:49:49 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201505141549.t4EFnnQg094250@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Thu, 14 May 2015 15:49:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282907 - head/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.20 Precedence: list List-Id: "SVN commit messages 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, 14 May 2015 15:49:49 -0000 Author: pfg Date: Thu May 14 15:49:48 2015 New Revision: 282907 URL: https://svnweb.freebsd.org/changeset/base/282907 Log: Add new __unreachable() builtin This is one of the few post gcc4.2 builtins that has been implemented by clang: __builtin_unreachable is used to indicate that a specific point in the program cannot be reached, even if the compiler might otherwise think it can. This is useful to improve optimization and eliminates certain warnings. Hinted by: NetBSD Differential Revision: https://reviews.freebsd.org/D2536 Modified: head/sys/sys/cdefs.h Modified: head/sys/sys/cdefs.h ============================================================================== --- head/sys/sys/cdefs.h Thu May 14 15:14:03 2015 (r282906) +++ head/sys/sys/cdefs.h Thu May 14 15:49:48 2015 (r282907) @@ -388,6 +388,12 @@ #define __alloc_size(x) #endif +#if __has_builtin(__builtin_unreachable) || __GNUC_PREREQ__(4, 6) +#define __unreachable() __builtin_unreachable() +#else +#define __unreachable() do {} while (/*CONSTCOND*/0) +#endif + #if __has_attribute(alloc_align) || __GNUC_PREREQ__(4, 9) #define __alloc_align(x) __attribute__((__alloc_align__(x))) #else From owner-svn-src-all@FreeBSD.ORG Thu May 14 16:29:12 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7AD173C9; Thu, 14 May 2015 16:29:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 689A51171; Thu, 14 May 2015 16:29:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4EGTCLF014408; Thu, 14 May 2015 16:29:12 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4EGTCKx014407; Thu, 14 May 2015 16:29:12 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201505141629.t4EGTCKx014407@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: Roger Pau Monné Date: Thu, 14 May 2015 16:29:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282908 - head/sys/dev/xen/netfront 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.20 Precedence: list List-Id: "SVN commit messages 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, 14 May 2015 16:29:12 -0000 Author: royger Date: Thu May 14 16:29:11 2015 New Revision: 282908 URL: https://svnweb.freebsd.org/changeset/base/282908 Log: netfront: wait for backend to connect before sending ARP Netfront has to wait for the backend to switch to state XenbusStateConnected before sending the ARP request, or else the backend might not be connected and thus the packet will be lost. Sponsored by: Citrix Systems R&D MFC after: 1 week Modified: head/sys/dev/xen/netfront/netfront.c Modified: head/sys/dev/xen/netfront/netfront.c ============================================================================== --- head/sys/dev/xen/netfront/netfront.c Thu May 14 15:49:48 2015 (r282907) +++ head/sys/dev/xen/netfront/netfront.c Thu May 14 16:29:11 2015 (r282908) @@ -682,7 +682,6 @@ netfront_backend_changed(device_t dev, X switch (newstate) { case XenbusStateInitialising: case XenbusStateInitialised: - case XenbusStateConnected: case XenbusStateUnknown: case XenbusStateClosed: case XenbusStateReconfigured: @@ -694,13 +693,15 @@ netfront_backend_changed(device_t dev, X if (network_connect(sc) != 0) break; xenbus_set_state(dev, XenbusStateConnected); -#ifdef INET - netfront_send_fake_arp(dev, sc); -#endif break; case XenbusStateClosing: xenbus_set_state(dev, XenbusStateClosed); break; + case XenbusStateConnected: +#ifdef INET + netfront_send_fake_arp(dev, sc); +#endif + break; } } From owner-svn-src-all@FreeBSD.ORG Thu May 14 17:12:46 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C25FDC30; Thu, 14 May 2015 17:12:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A2C571758; Thu, 14 May 2015 17:12:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4EHCkO5037985; Thu, 14 May 2015 17:12:46 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4EHCjhU037982; Thu, 14 May 2015 17:12:45 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201505141712.t4EHCjhU037982@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 14 May 2015 17:12:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282909 - in head/lib/libc/aarch64: . 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.20 Precedence: list List-Id: "SVN commit messages 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, 14 May 2015 17:12:47 -0000 Author: emaste Date: Thu May 14 17:12:45 2015 New Revision: 282909 URL: https://svnweb.freebsd.org/changeset/base/282909 Log: Add fabs() to arm64 libc Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D2532 Added: head/lib/libc/aarch64/gen/fabs.S (contents, props changed) Modified: head/lib/libc/aarch64/Symbol.map head/lib/libc/aarch64/gen/Makefile.inc Modified: head/lib/libc/aarch64/Symbol.map ============================================================================== --- head/lib/libc/aarch64/Symbol.map Thu May 14 16:29:11 2015 (r282908) +++ head/lib/libc/aarch64/Symbol.map Thu May 14 17:12:45 2015 (r282909) @@ -13,6 +13,7 @@ FBSD_1.0 { _setjmp; _longjmp; + fabs; setjmp; longjmp; sigsetjmp; Modified: head/lib/libc/aarch64/gen/Makefile.inc ============================================================================== --- head/lib/libc/aarch64/gen/Makefile.inc Thu May 14 16:29:11 2015 (r282908) +++ head/lib/libc/aarch64/gen/Makefile.inc Thu May 14 17:12:45 2015 (r282909) @@ -1,6 +1,7 @@ # $FreeBSD$ -SRCS+= flt_rounds.c \ +SRCS+= fabs.S \ + flt_rounds.c \ ldexp.c \ _setjmp.S \ _set_tp.c \ Added: head/lib/libc/aarch64/gen/fabs.S ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/aarch64/gen/fabs.S Thu May 14 17:12:45 2015 (r282909) @@ -0,0 +1,33 @@ +/*- + * Copyright (c) 2015 The FreeBSD Foundation + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +ENTRY(fabs) + fabs d0, d0 + ret +END(fabs) From owner-svn-src-all@FreeBSD.ORG Thu May 14 17:37:11 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4AE23415; Thu, 14 May 2015 17:37:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 388BF1A5A; Thu, 14 May 2015 17:37:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4EHbBdJ048471; Thu, 14 May 2015 17:37:11 GMT (envelope-from rpaulo@FreeBSD.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4EHbBHA048470; Thu, 14 May 2015 17:37:11 GMT (envelope-from rpaulo@FreeBSD.org) Message-Id: <201505141737.t4EHbBHA048470@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rpaulo set sender to rpaulo@FreeBSD.org using -f From: Rui Paulo Date: Thu, 14 May 2015 17:37:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282910 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 14 May 2015 17:37:11 -0000 Author: rpaulo Date: Thu May 14 17:37:10 2015 New Revision: 282910 URL: https://svnweb.freebsd.org/changeset/base/282910 Log: ObsoleteFiles: add lib32 entries for libyaml missed in r262407. Pointy hat: bapt Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Thu May 14 17:12:45 2015 (r282909) +++ head/ObsoleteFiles.inc Thu May 14 17:37:10 2015 (r282910) @@ -649,6 +649,10 @@ OLD_FILES+=usr/lib/private/libyaml.a OLD_FILES+=usr/lib/private/libyaml.so OLD_FILES+=usr/lib/private/libyaml.so.1 OLD_FILES+=usr/lib/private/libyaml_p.a +OLD_FILES+=usr/lib32/private/libyaml.a +OLD_FILES+=usr/lib32/private/libyaml.so +OLD_FILES+=usr/lib32/private/libyaml.so.1 +OLD_FILES+=usr/lib32/private/libyaml_p.a # 20140216: new clang import which bumps version from 3.3 to 3.4. OLD_FILES+=usr/bin/llvm-prof OLD_FILES+=usr/bin/llvm-ranlib From owner-svn-src-all@FreeBSD.ORG Thu May 14 17:49:02 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 11C7576E; Thu, 14 May 2015 17:49:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F3F5F1BCF; Thu, 14 May 2015 17:49:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4EHn1Pf053644; Thu, 14 May 2015 17:49:01 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4EHn1VX053643; Thu, 14 May 2015 17:49:01 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201505141749.t4EHn1VX053643@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Thu, 14 May 2015 17:49:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282912 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 14 May 2015 17:49:02 -0000 Author: bapt Date: Thu May 14 17:49:01 2015 New Revision: 282912 URL: https://svnweb.freebsd.org/changeset/base/282912 Log: libyaml.so.1 are actually libraries and should only be removed during make delete-old-libs Reported by: rpaulo Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Thu May 14 17:48:57 2015 (r282911) +++ head/ObsoleteFiles.inc Thu May 14 17:49:01 2015 (r282912) @@ -647,11 +647,11 @@ OLD_FILES+=usr/libexec/bsdconfig/070.use # 20140223: Remove libyaml OLD_FILES+=usr/lib/private/libyaml.a OLD_FILES+=usr/lib/private/libyaml.so -OLD_FILES+=usr/lib/private/libyaml.so.1 +OLD_LIBS+=usr/lib/private/libyaml.so.1 OLD_FILES+=usr/lib/private/libyaml_p.a OLD_FILES+=usr/lib32/private/libyaml.a OLD_FILES+=usr/lib32/private/libyaml.so -OLD_FILES+=usr/lib32/private/libyaml.so.1 +OLD_LIBS+=usr/lib32/private/libyaml.so.1 OLD_FILES+=usr/lib32/private/libyaml_p.a # 20140216: new clang import which bumps version from 3.3 to 3.4. OLD_FILES+=usr/bin/llvm-prof From owner-svn-src-all@FreeBSD.ORG Thu May 14 17:49:09 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 92B1B8B1; Thu, 14 May 2015 17:49:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7CC751BD3; Thu, 14 May 2015 17:49:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4EHn9rs053729; Thu, 14 May 2015 17:49:09 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4EHmvgc053579; Thu, 14 May 2015 17:48:57 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201505141748.t4EHmvgc053579@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 14 May 2015 17:48:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r282911 - in vendor/elftoolchain/dist: . addr2line ar brandelf common cxxfilt elfcopy elfdump findtextrel isa libdwarf libelf libelftc nm readelf size strings test/ar/plugin test/elfcop... 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.20 Precedence: list List-Id: "SVN commit messages 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, 14 May 2015 17:49:09 -0000 Author: emaste Date: Thu May 14 17:48:57 2015 New Revision: 282911 URL: https://svnweb.freebsd.org/changeset/base/282911 Log: Import ELF Tool Chain revision 3197 From http://svn.code.sf.net/p/elftoolchain/code Modified: vendor/elftoolchain/dist/INSTALL vendor/elftoolchain/dist/addr2line/addr2line.1 vendor/elftoolchain/dist/addr2line/addr2line.c vendor/elftoolchain/dist/ar/ar.1 vendor/elftoolchain/dist/ar/ar.5 vendor/elftoolchain/dist/ar/ar.c vendor/elftoolchain/dist/ar/ranlib.1 vendor/elftoolchain/dist/ar/read.c vendor/elftoolchain/dist/ar/write.c vendor/elftoolchain/dist/brandelf/brandelf.1 vendor/elftoolchain/dist/common/native-elf-format vendor/elftoolchain/dist/cxxfilt/c++filt.1 vendor/elftoolchain/dist/elfcopy/elfcopy.1 vendor/elftoolchain/dist/elfcopy/sections.c vendor/elftoolchain/dist/elfcopy/segments.c vendor/elftoolchain/dist/elfcopy/symbols.c vendor/elftoolchain/dist/elfdump/elfdump.1 vendor/elftoolchain/dist/elfdump/elfdump.c vendor/elftoolchain/dist/findtextrel/findtextrel.1 vendor/elftoolchain/dist/isa/isa.1 vendor/elftoolchain/dist/isa/isa.5 vendor/elftoolchain/dist/libdwarf/dwarf.3 vendor/elftoolchain/dist/libdwarf/dwarf_add_line_entry.3 vendor/elftoolchain/dist/libdwarf/dwarf_def_macro.3 vendor/elftoolchain/dist/libdwarf/dwarf_expand_frame_instructions.3 vendor/elftoolchain/dist/libdwarf/dwarf_formblock.3 vendor/elftoolchain/dist/libdwarf/dwarf_formflag.3 vendor/elftoolchain/dist/libdwarf/dwarf_formref.3 vendor/elftoolchain/dist/libdwarf/dwarf_formsig8.3 vendor/elftoolchain/dist/libdwarf/dwarf_formudata.3 vendor/elftoolchain/dist/libdwarf/dwarf_get_fde_info_for_all_regs.3 vendor/elftoolchain/dist/libdwarf/dwarf_get_fde_info_for_reg.3 vendor/elftoolchain/dist/libdwarf/dwarf_get_ranges.3 vendor/elftoolchain/dist/libdwarf/dwarf_hasattr.3 vendor/elftoolchain/dist/libdwarf/dwarf_next_cu_header.3 vendor/elftoolchain/dist/libdwarf/dwarf_producer_init.3 vendor/elftoolchain/dist/libdwarf/dwarf_whatattr.3 vendor/elftoolchain/dist/libelf/elf.3 vendor/elftoolchain/dist/libelf/elf_begin.3 vendor/elftoolchain/dist/libelf/elf_cntl.3 vendor/elftoolchain/dist/libelf/elf_getdata.3 vendor/elftoolchain/dist/libelf/elf_open.3 vendor/elftoolchain/dist/libelf/elf_update.c vendor/elftoolchain/dist/libelf/gelf.3 vendor/elftoolchain/dist/libelftc/elftc_demangle.3 vendor/elftoolchain/dist/libelftc/elftc_symbol_table_create.3 vendor/elftoolchain/dist/libelftc/libelftc_dem_gnu3.c vendor/elftoolchain/dist/nm/nm.1 vendor/elftoolchain/dist/readelf/readelf.1 vendor/elftoolchain/dist/readelf/readelf.c vendor/elftoolchain/dist/size/size.1 vendor/elftoolchain/dist/size/size.c vendor/elftoolchain/dist/strings/strings.1 vendor/elftoolchain/dist/test/ar/plugin/Makefile vendor/elftoolchain/dist/test/elfcopy/plugin/Makefile Modified: vendor/elftoolchain/dist/INSTALL ============================================================================== --- vendor/elftoolchain/dist/INSTALL Thu May 14 17:37:10 2015 (r282910) +++ vendor/elftoolchain/dist/INSTALL Thu May 14 17:48:57 2015 (r282911) @@ -15,6 +15,7 @@ operating systems. ----------------- -------- ----------------------- `DragonFly BSD`_ 2.10.1 i386 FreeBSD_ v8.2 amd64 & i386 + FreeBSD_ v10.1 i386 Minix_ 3.0.2 i386 NetBSD_ v5.0.2 i386 OpenBSD_ v5.0 i386 @@ -75,6 +76,22 @@ Prerequisites % sudo pkg_add -r latex-pgf +:FreeBSD 10.1: + - The core libraries and utilities should build out of the box on + a stock install of FreeBSD. + + - To build and run the test suite: + + #. The current release of the `Test Execution Toolkit`_ needs to + be downloaded and unpacked into the ``test/tet/`` directory. + + #. The ``python`` and ``py27-yaml`` packages need to be installed:: + + % sudo pkg install python py27-yaml + + - Building additional documentation is not currently supported under + FreeBSD 10.1. + :Minix 3.2.0: - The following packages are pre-requisites for building the sources on Minix 3.2.0: @@ -299,7 +316,7 @@ website`_. .. _project website: http://elftoolchain.sourceforge.net/ -.. $Id: INSTALL 3165 2015-02-20 20:52:18Z emaste $ +.. $Id: INSTALL 3193 2015-05-04 17:47:14Z jkoshy $ .. Local Variables: .. mode: rst Modified: vendor/elftoolchain/dist/addr2line/addr2line.1 ============================================================================== --- vendor/elftoolchain/dist/addr2line/addr2line.1 Thu May 14 17:37:10 2015 (r282910) +++ vendor/elftoolchain/dist/addr2line/addr2line.1 Thu May 14 17:48:57 2015 (r282911) @@ -22,7 +22,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $Id: addr2line.1 2066 2011-10-26 15:40:28Z jkoshy $ +.\" $Id: addr2line.1 3195 2015-05-12 17:22:19Z emaste $ .\" .Dd July 25, 2010 .Os @@ -99,7 +99,7 @@ Print a help message. Print a version identifier and exit. .El .Sh OUTPUT FORMAT -If the +If the .Fl f option was not specified, .Nm @@ -156,4 +156,4 @@ its source file and line number use: The .Nm utility was written by -.An "Kai Wang" Aq kaiwang27@users.sourceforge.net . +.An Kai Wang Aq Mt kaiwang27@users.sourceforge.net . Modified: vendor/elftoolchain/dist/addr2line/addr2line.c ============================================================================== --- vendor/elftoolchain/dist/addr2line/addr2line.c Thu May 14 17:37:10 2015 (r282910) +++ vendor/elftoolchain/dist/addr2line/addr2line.c Thu May 14 17:48:57 2015 (r282911) @@ -39,7 +39,7 @@ #include "_elftc.h" -ELFTC_VCSID("$Id: addr2line.c 3174 2015-03-27 17:13:41Z emaste $"); +ELFTC_VCSID("$Id: addr2line.c 3197 2015-05-12 21:01:31Z emaste $"); static struct option longopts[] = { {"target" , required_argument, NULL, 'b'}, @@ -84,6 +84,44 @@ version(void) exit(0); } +/* + * Handle DWARF 4 'offset from' DW_AT_high_pc. Although we don't + * fully support DWARF 4, some compilers (like FreeBSD Clang 3.5.1) + * generate DW_AT_high_pc as an offset from DW_AT_low_pc. + * + * "If the value of the DW_AT_high_pc is of class address, it is the + * relocated address of the first location past the last instruction + * associated with the entity; if it is of class constant, the value + * is an unsigned integer offset which when added to the low PC gives + * the address of the first location past the last instruction + * associated with the entity." + * + * DWARF4 spec, section 2.17.2. + */ +static int +handle_high_pc(Dwarf_Die die, Dwarf_Unsigned lopc, Dwarf_Unsigned *hipc) +{ + Dwarf_Error de; + Dwarf_Half form; + Dwarf_Attribute at; + int ret; + + ret = dwarf_attr(die, DW_AT_high_pc, &at, &de); + if (ret == DW_DLV_ERROR) { + warnx("dwarf_attr failed: %s", dwarf_errmsg(de)); + return (ret); + } + ret = dwarf_whatform(at, &form, &de); + if (ret == DW_DLV_ERROR) { + warnx("dwarf_whatform failed: %s", dwarf_errmsg(de)); + return (ret); + } + if (dwarf_get_form_class(2, 0, 0, form) == DW_FORM_CLASS_CONSTANT) + *hipc += lopc; + + return (DW_DLV_OK); +} + static void search_func(Dwarf_Debug dbg, Dwarf_Die die, Dwarf_Addr addr, const char **rlt_func) @@ -108,6 +146,8 @@ search_func(Dwarf_Debug dbg, Dwarf_Die d if (dwarf_attrval_unsigned(die, DW_AT_low_pc, &lopc, &de) || dwarf_attrval_unsigned(die, DW_AT_high_pc, &hipc, &de)) goto cont_search; + if (handle_high_pc(die, lopc, &hipc) != DW_DLV_OK) + goto cont_search; if (addr < lopc || addr >= hipc) goto cont_search; @@ -202,6 +242,8 @@ translate(Dwarf_Debug dbg, const char* a * Check if the address falls into the PC range of * this CU. */ + if (handle_high_pc(die, lopc, &hipc) != DW_DLV_OK) + continue; if (addr < lopc || addr >= hipc) continue; } Modified: vendor/elftoolchain/dist/ar/ar.1 ============================================================================== --- vendor/elftoolchain/dist/ar/ar.1 Thu May 14 17:37:10 2015 (r282910) +++ vendor/elftoolchain/dist/ar/ar.1 Thu May 14 17:48:57 2015 (r282911) @@ -21,7 +21,7 @@ .\" out of the use of this software, even if advised of the possibility of .\" such damage. .\" -.\" $Id: ar.1 2742 2012-12-10 18:47:36Z jkoshy $ +.\" $Id: ar.1 3195 2015-05-12 17:22:19Z emaste $ .\" .Dd December 10, 2012 .Os @@ -194,11 +194,11 @@ from the archive specified by argument The archive's symbol table, if present, is updated to reflect the new contents of the archive. .It Fl D -When used in combination with the +When used in combination with the .Fl r or .Fl q -option, insert 0's instead of the real mtime, uid and gid values +option, insert 0's instead of the real mtime, uid and gid values and 0644 instead of file mode from the members named by arguments .Ar . This ensures that checksums on the resulting archives are reproducible @@ -346,7 +346,7 @@ or options, .Nm gives a file-by-file description of the archive modification being -performed, which consists of three white-space seperated fields: +performed, which consists of three white-space separated fields: the option letter, a dash .Dq "-" , and the file name. @@ -554,7 +554,7 @@ using MRI librarian commands, use the fo .Bd -literal -offset indent create ex.a * specify the output archive addmod ex1.o ex2.o * add modules -save * save pending changes +save * save pending changes end * exit the utility .Ed .Sh DIAGNOSTICS @@ -594,7 +594,7 @@ An command first appeared in AT&T UNIX Version 1. In .Fx 8.0 , -.An "Kai Wang" Aq kaiw@FreeBSD.org +.An Kai Wang Aq Mt kaiw@FreeBSD.org reimplemented .Nm using the Modified: vendor/elftoolchain/dist/ar/ar.5 ============================================================================== --- vendor/elftoolchain/dist/ar/ar.5 Thu May 14 17:37:10 2015 (r282910) +++ vendor/elftoolchain/dist/ar/ar.5 Thu May 14 17:48:57 2015 (r282911) @@ -21,7 +21,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $Id: ar.5 2066 2011-10-26 15:40:28Z jkoshy $ +.\" $Id: ar.5 3182 2015-04-10 16:08:10Z emaste $ .\" .Dd November 28, 2010 .Os @@ -126,7 +126,7 @@ The BSD and SVR4/GNU variants use differ names for members. .Bl -tag -width "SVR4/GNU" .It "BSD" -File names that are upto 16 bytes long and which do not contain +File names that are up to 16 bytes long and which do not contain embedded spaces are stored directly in the .Ar ar_name field of the archive header. @@ -164,7 +164,7 @@ ASCII .Dq "A BC D" .Pc . .It "SVR4/GNU" -File names that are upto 15 characters long are stored directly in the +File names that are up to 15 characters long are stored directly in the .Ar ar_name field of the header, terminated by a .Dq Li / @@ -237,7 +237,7 @@ the ASCII string No padding is used to separate adjacent file names. .Ss "Archive Symbol Tables" Archive symbol tables are used to speed up link editing by providing a -mapping between the program symbols defined in the archive +mapping between the program symbols defined in the archive and the corresponding archive members. Archive symbol tables are managed by the .Xr ranlib 1 Modified: vendor/elftoolchain/dist/ar/ar.c ============================================================================== --- vendor/elftoolchain/dist/ar/ar.c Thu May 14 17:37:10 2015 (r282910) +++ vendor/elftoolchain/dist/ar/ar.c Thu May 14 17:48:57 2015 (r282911) @@ -72,7 +72,7 @@ #include "ar.h" -ELFTC_VCSID("$Id: ar.c 3174 2015-03-27 17:13:41Z emaste $"); +ELFTC_VCSID("$Id: ar.c 3183 2015-04-10 16:18:42Z emaste $"); enum options { @@ -117,7 +117,7 @@ main(int argc, char **argv) /* * Act like ranlib if our name ends in "ranlib"; this - * accomodates names like "arm-freebsd7.1-ranlib", + * accommodates names like "arm-freebsd7.1-ranlib", * "bsdranlib", etc. */ len = strlen(bsdar->progname); Modified: vendor/elftoolchain/dist/ar/ranlib.1 ============================================================================== --- vendor/elftoolchain/dist/ar/ranlib.1 Thu May 14 17:37:10 2015 (r282910) +++ vendor/elftoolchain/dist/ar/ranlib.1 Thu May 14 17:48:57 2015 (r282911) @@ -21,7 +21,7 @@ .\" out of the use of this software, even if advised of the possibility of .\" such damage. .\" -.\" $Id: ranlib.1 2739 2012-12-09 17:07:46Z jkoshy $ +.\" $Id: ranlib.1 3195 2015-05-12 17:22:19Z emaste $ .\" .Dd December 9, 2012 .Os @@ -77,7 +77,7 @@ command first appeared in AT&T UNIX Vers .Pp In .Fx 8.0 , -.An "Kai Wang" Aq kaiw@FreeBSD.org +.An Kai Wang Aq Mt kaiw@FreeBSD.org reimplemented .Nm using the Modified: vendor/elftoolchain/dist/ar/read.c ============================================================================== --- vendor/elftoolchain/dist/ar/read.c Thu May 14 17:37:10 2015 (r282910) +++ vendor/elftoolchain/dist/ar/read.c Thu May 14 17:48:57 2015 (r282911) @@ -38,7 +38,7 @@ #include "ar.h" -ELFTC_VCSID("$Id: read.c 3174 2015-03-27 17:13:41Z emaste $"); +ELFTC_VCSID("$Id: read.c 3180 2015-04-09 15:13:57Z emaste $"); /* * Handle read modes: 'x', 't' and 'p'. @@ -181,7 +181,7 @@ ar_read_archive(struct bsdar *bsdar, int continue; } /* Basic path security flags. */ - flags = ARCHIVE_EXTRACT_SECURE_SYMLINKS | \ + flags = ARCHIVE_EXTRACT_SECURE_SYMLINKS | ARCHIVE_EXTRACT_SECURE_NODOTDOT; if (bsdar->options & AR_O) flags |= ARCHIVE_EXTRACT_TIME; Modified: vendor/elftoolchain/dist/ar/write.c ============================================================================== --- vendor/elftoolchain/dist/ar/write.c Thu May 14 17:37:10 2015 (r282910) +++ vendor/elftoolchain/dist/ar/write.c Thu May 14 17:48:57 2015 (r282911) @@ -40,7 +40,7 @@ #include "ar.h" -ELFTC_VCSID("$Id: write.c 3174 2015-03-27 17:13:41Z emaste $"); +ELFTC_VCSID("$Id: write.c 3183 2015-04-10 16:18:42Z emaste $"); #define _ARMAG_LEN 8 /* length of the magic string */ #define _ARHDR_LEN 60 /* length of the archive header */ @@ -69,7 +69,7 @@ static void write_objs(struct bsdar *bsd /* * Create an object from a file, and return the created object * descriptor. Return NULL if either an error occurs, or if the '-u' - * option was specifed and the member is not newer than the existing + * option was specified and the member is not newer than the existing * one in the archive. */ static struct ar_obj * @@ -426,7 +426,7 @@ ar_write_archive(struct bsdar *bsdar, in if (mode == 'A') { /* * Read objects from the target archive of the - * 'ADDLIB' command. If there are members spcified in + * 'ADDLIB' command. If there are members specified in * 'argv', read those members only, otherwise the * entire archive will be read. */ @@ -447,7 +447,7 @@ ar_write_archive(struct bsdar *bsdar, in /* * If we cannot find the position specified by the - * user, sliently insert objects at the tail of the + * user, silently insert objects at the tail of the * list. */ if (pos == NULL) Modified: vendor/elftoolchain/dist/brandelf/brandelf.1 ============================================================================== --- vendor/elftoolchain/dist/brandelf/brandelf.1 Thu May 14 17:37:10 2015 (r282910) +++ vendor/elftoolchain/dist/brandelf/brandelf.1 Thu May 14 17:48:57 2015 (r282911) @@ -26,7 +26,7 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD: src/usr.bin/brandelf/brandelf.1,v 1.17 2007/03/09 14:36:18 ru Exp $ -.\" $Id: brandelf.1 3101 2014-10-27 22:24:40Z jkoshy $ +.\" $Id: brandelf.1 3195 2015-05-12 17:22:19Z emaste $ .\" .Dd October 27, 2014 .Dt BRANDELF 1 @@ -148,4 +148,4 @@ manual page first appeared in .Fx 2.2 . .Sh AUTHORS This manual page was written by -.An John-Mark Gurney Aq gurney_j@efn.org . +.An John-Mark Gurney Aq Mt gurney_j@efn.org . Modified: vendor/elftoolchain/dist/common/native-elf-format ============================================================================== --- vendor/elftoolchain/dist/common/native-elf-format Thu May 14 17:37:10 2015 (r282910) +++ vendor/elftoolchain/dist/common/native-elf-format Thu May 14 17:48:57 2015 (r282911) @@ -1,6 +1,6 @@ #!/bin/sh # -# $Id: native-elf-format 3167 2015-02-24 19:10:08Z emaste $ +# $Id: native-elf-format 3186 2015-04-16 22:16:40Z emaste $ # # Find the native ELF format for a host platform by compiling a # test object and examining the resulting object. @@ -33,7 +33,7 @@ $1 ~ "Data:" { $1 ~ "Machine:" { if (match($0, "Intel.*386")) { elfarch = "EM_386"; - } else if (match($0, ".*X86-64")) { + } else if (match($0, ".*[xX]86-64")) { elfarch = "EM_X86_64"; } else { elfarch = "unknown"; Modified: vendor/elftoolchain/dist/cxxfilt/c++filt.1 ============================================================================== --- vendor/elftoolchain/dist/cxxfilt/c++filt.1 Thu May 14 17:37:10 2015 (r282910) +++ vendor/elftoolchain/dist/cxxfilt/c++filt.1 Thu May 14 17:48:57 2015 (r282911) @@ -22,7 +22,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $Id: c++filt.1 2175 2011-11-16 05:51:49Z jkoshy $ +.\" $Id: c++filt.1 3195 2015-05-12 17:22:19Z emaste $ .\" .Dd August 24, 2011 .Os @@ -106,4 +106,4 @@ and exit. The .Nm utility was written by -.An "Kai Wang" Aq kaiwang27@users.sourceforge.net . +.An Kai Wang Aq Mt kaiwang27@users.sourceforge.net . Modified: vendor/elftoolchain/dist/elfcopy/elfcopy.1 ============================================================================== --- vendor/elftoolchain/dist/elfcopy/elfcopy.1 Thu May 14 17:37:10 2015 (r282910) +++ vendor/elftoolchain/dist/elfcopy/elfcopy.1 Thu May 14 17:48:57 2015 (r282911) @@ -21,7 +21,7 @@ .\" out of the use of this software, even if advised of the possibility of .\" such damage. .\" -.\" $Id: elfcopy.1 3173 2015-03-27 16:46:13Z emaste $ +.\" $Id: elfcopy.1 3195 2015-05-12 17:22:19Z emaste $ .\" .Dd March 27, 2015 .Os @@ -330,4 +330,4 @@ Do not copy symbols that are not needed .Sh HISTORY .Nm has been implemented by -.An "Kai Wang" Aq kaiwang27@users.sourceforge.net . +.An Kai Wang Aq Mt kaiwang27@users.sourceforge.net . Modified: vendor/elftoolchain/dist/elfcopy/sections.c ============================================================================== --- vendor/elftoolchain/dist/elfcopy/sections.c Thu May 14 17:37:10 2015 (r282910) +++ vendor/elftoolchain/dist/elfcopy/sections.c Thu May 14 17:48:57 2015 (r282911) @@ -34,7 +34,7 @@ #include "elfcopy.h" -ELFTC_VCSID("$Id: sections.c 3174 2015-03-27 17:13:41Z emaste $"); +ELFTC_VCSID("$Id: sections.c 3185 2015-04-11 08:56:34Z kaiwang27 $"); static void add_gnu_debuglink(struct elfcopy *ecp); static uint32_t calc_crc32(const char *p, size_t len, uint32_t crc); @@ -1223,6 +1223,14 @@ update_shdr(struct elfcopy *ecp, int upd osh.sh_info != 0) osh.sh_info = ecp->secndx[osh.sh_info]; + /* + * sh_info of SHT_GROUP section needs to point to the correct + * string in the symbol table. + */ + if (s->type == SHT_GROUP && (ecp->flags & SYMTAB_EXIST) && + (ecp->flags & SYMTAB_INTACT) == 0) + osh.sh_info = ecp->symndx[osh.sh_info]; + if (!gelf_update_shdr(s->os, &osh)) errx(EXIT_FAILURE, "gelf_update_shdr() failed: %s", elf_errmsg(-1)); Modified: vendor/elftoolchain/dist/elfcopy/segments.c ============================================================================== --- vendor/elftoolchain/dist/elfcopy/segments.c Thu May 14 17:37:10 2015 (r282910) +++ vendor/elftoolchain/dist/elfcopy/segments.c Thu May 14 17:48:57 2015 (r282911) @@ -34,7 +34,7 @@ #include "elfcopy.h" -ELFTC_VCSID("$Id: segments.c 3177 2015-03-30 18:19:41Z emaste $"); +ELFTC_VCSID("$Id: segments.c 3196 2015-05-12 17:33:48Z emaste $"); static void insert_to_inseg_list(struct segment *seg, struct section *sec); @@ -442,7 +442,7 @@ copy_phdr(struct elfcopy *ecp) s = seg->v_sec[i]; seg->msz = s->vma + s->sz - seg->addr; if (s->type != SHT_NOBITS) - seg->fsz = seg->msz; + seg->fsz = s->off + s->sz - seg->off; } } Modified: vendor/elftoolchain/dist/elfcopy/symbols.c ============================================================================== --- vendor/elftoolchain/dist/elfcopy/symbols.c Thu May 14 17:37:10 2015 (r282910) +++ vendor/elftoolchain/dist/elfcopy/symbols.c Thu May 14 17:48:57 2015 (r282911) @@ -33,7 +33,7 @@ #include "elfcopy.h" -ELFTC_VCSID("$Id: symbols.c 3174 2015-03-27 17:13:41Z emaste $"); +ELFTC_VCSID("$Id: symbols.c 3191 2015-05-04 17:07:01Z jkoshy $"); /* Symbol table buffer structure. */ struct symbuf { @@ -1090,7 +1090,7 @@ str_hash(const char *s) { uint32_t hash; - for (hash = 2166136261; *s; s++) + for (hash = 2166136261UL; *s; s++) hash = (hash ^ *s) * 16777619; return (hash & (STHASHSIZE - 1)); Modified: vendor/elftoolchain/dist/elfdump/elfdump.1 ============================================================================== --- vendor/elftoolchain/dist/elfdump/elfdump.1 Thu May 14 17:37:10 2015 (r282910) +++ vendor/elftoolchain/dist/elfdump/elfdump.1 Thu May 14 17:48:57 2015 (r282911) @@ -23,7 +23,7 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD: src/usr.bin/elfdump/elfdump.1,v 1.6 2005/01/18 13:43:48 ru Exp $ -.\" $Id: elfdump.1 2069 2011-10-26 15:53:48Z jkoshy $ +.\" $Id: elfdump.1 3195 2015-05-12 17:22:19Z emaste $ .\" .Dd August 25, 2011 .Dt ELFDUMP 1 @@ -141,14 +141,14 @@ The .Nm utility was written by -.An Jake Burkholder Aq jake@FreeBSD.org . +.An Jake Burkholder Aq Mt jake@FreeBSD.org . Later it was rewritten based on the libelf library. This manual page was written by -.An David O'Brien Aq obrien@FreeBSD.org . +.An David O'Brien Aq Mt obrien@FreeBSD.org . .Pp -.An Kai Wang Aq kaiw@FreeBSD.org +.An Kai Wang Aq Mt kaiw@FreeBSD.org rewrote it using the .Lb libelf and implemented additional functionality. Modified: vendor/elftoolchain/dist/elfdump/elfdump.c ============================================================================== --- vendor/elftoolchain/dist/elfdump/elfdump.c Thu May 14 17:37:10 2015 (r282910) +++ vendor/elftoolchain/dist/elfdump/elfdump.c Thu May 14 17:48:57 2015 (r282911) @@ -50,7 +50,7 @@ #include "_elftc.h" -ELFTC_VCSID("$Id: elfdump.c 3174 2015-03-27 17:13:41Z emaste $"); +ELFTC_VCSID("$Id: elfdump.c 3189 2015-04-20 17:02:01Z emaste $"); #if defined(ELFTC_NEED_ELF_NOTE_DEFINITION) #include "native-elf-format.h" @@ -933,12 +933,11 @@ main(int ac, char **av) errx(EXIT_FAILURE, "ELF library initialization failed: %s", elf_errmsg(-1)); - for (i = 0; i < ac; i++) - if (av[i] != NULL) { - ed->filename = av[i]; - ed->archive = NULL; - elf_print_object(ed); - } + for (i = 0; i < ac; i++) { + ed->filename = av[i]; + ed->archive = NULL; + elf_print_object(ed); + } exit(EXIT_SUCCESS); } Modified: vendor/elftoolchain/dist/findtextrel/findtextrel.1 ============================================================================== --- vendor/elftoolchain/dist/findtextrel/findtextrel.1 Thu May 14 17:37:10 2015 (r282910) +++ vendor/elftoolchain/dist/findtextrel/findtextrel.1 Thu May 14 17:48:57 2015 (r282911) @@ -22,7 +22,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $Id: findtextrel.1 2069 2011-10-26 15:53:48Z jkoshy $ +.\" $Id: findtextrel.1 3195 2015-05-12 17:22:19Z emaste $ .\" .Dd August 25, 2011 .Os @@ -101,4 +101,4 @@ toolset from Red Hat, Inc. This implementation of the .Nm utility was created by -.An "Kai Wang" Aq kaiwang27@users.sourceforge.net . +.An Kai Wang Aq Mt kaiwang27@users.sourceforge.net . Modified: vendor/elftoolchain/dist/isa/isa.1 ============================================================================== --- vendor/elftoolchain/dist/isa/isa.1 Thu May 14 17:37:10 2015 (r282910) +++ vendor/elftoolchain/dist/isa/isa.1 Thu May 14 17:48:57 2015 (r282911) @@ -22,7 +22,7 @@ \" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, \" EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $Id: isa.1 2889 2013-01-13 15:36:04Z jkoshy $ +.\" $Id: isa.1 3195 2015-05-12 17:22:19Z emaste $ .\" .Dd January 13, 2013 .Os @@ -237,8 +237,7 @@ Elftoolchain project. The .Xr isa 1 utility was written by -.An Joseph Koshy -.Aq jkoshy@users.sourceforge.net . +.An Joseph Koshy Aq Mt jkoshy@users.sourceforge.net . .Sh BUGS The .Nm Modified: vendor/elftoolchain/dist/isa/isa.5 ============================================================================== --- vendor/elftoolchain/dist/isa/isa.5 Thu May 14 17:37:10 2015 (r282910) +++ vendor/elftoolchain/dist/isa/isa.5 Thu May 14 17:48:57 2015 (r282911) @@ -22,7 +22,7 @@ .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, .\" EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $Id: isa.5 2900 2013-01-16 12:27:01Z jkoshy $ +.\" $Id: isa.5 3195 2015-05-12 17:22:19Z emaste $ .\" .Dd January 16, 2013 .Os @@ -352,8 +352,7 @@ Elftoolchain project. The .Xr isa 1 utility was written by -.An Joseph Koshy -.Aq jkoshy@users.sourceforge.net . +.An Joseph Koshy Aq Mt jkoshy@users.sourceforge.net . .Sh BUGS The .Nm Modified: vendor/elftoolchain/dist/libdwarf/dwarf.3 ============================================================================== --- vendor/elftoolchain/dist/libdwarf/dwarf.3 Thu May 14 17:37:10 2015 (r282910) +++ vendor/elftoolchain/dist/libdwarf/dwarf.3 Thu May 14 17:48:57 2015 (r282911) @@ -21,7 +21,7 @@ .\" out of the use of this software, even if advised of the possibility of .\" such damage. .\" -.\" $Id: dwarf.3 3130 2014-12-21 20:06:29Z jkoshy $ +.\" $Id: dwarf.3 3195 2015-05-12 17:22:19Z emaste $ .\" .Dd December 21, 2014 .Os @@ -44,7 +44,7 @@ is defined by the DWARF standard, see .Xr dwarf 4 . .Pp The -.Xr DWARF 3 +.Xr DWARF 3 API has two parts: .Bl -bullet .It @@ -349,7 +349,7 @@ Retrieve a debugging information entry g .It Fn dwarf_siblingof , Fn dwarf_siblingof_b Retrieve the sibling descriptor for a debugging information entry. .It Fn dwarf_srclang -Retrive the source language attribute for a debugging information +Retrieve the source language attribute for a debugging information entry. .It Fn dwarf_tag Retrieve the tag for a debugging information entry. @@ -742,12 +742,12 @@ The DWARF standard is defined by The DWARF(3) API originated at Silicon Graphics Inc. .Pp A BSD-licensed implementation of a subset of the API was written by -.An "John Birrell" Aq jb@FreeBSD.org +.An John Birrell Aq Mt jb@FreeBSD.org for the FreeBSD project. The implementation was subsequently revised and completed by -.An "Kai Wang" Aq kaiwang27@users.sourceforge.net . +.An Kai Wang Aq Mt kaiwang27@users.sourceforge.net . .Pp Manual pages for this implementation were written by -.An "Joseph Koshy" Aq jkoshy@users.sourceforge.net +.An Joseph Koshy Aq Mt jkoshy@users.sourceforge.net and -.An "Kai Wang" Aq kaiwang27@users.sourceforge.net . +.An Kai Wang Aq Mt kaiwang27@users.sourceforge.net . Modified: vendor/elftoolchain/dist/libdwarf/dwarf_add_line_entry.3 ============================================================================== --- vendor/elftoolchain/dist/libdwarf/dwarf_add_line_entry.3 Thu May 14 17:37:10 2015 (r282910) +++ vendor/elftoolchain/dist/libdwarf/dwarf_add_line_entry.3 Thu May 14 17:48:57 2015 (r282911) @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $Id: dwarf_add_line_entry.3 2953 2013-06-30 20:21:38Z kaiwang27 $ +.\" $Id: dwarf_add_line_entry.3 3182 2015-04-10 16:08:10Z emaste $ .\" .Dd June 30, 2013 .Os @@ -66,7 +66,8 @@ Valid source file indices are those retu .Pp Argument .Ar off -specifies a relocatable program address. The ELF symbol to be used +specifies a relocatable program address. +The ELF symbol to be used for relocation is set by a prior call to the function .Xr dwarf_lne_set_address 3 . .Pp Modified: vendor/elftoolchain/dist/libdwarf/dwarf_def_macro.3 ============================================================================== --- vendor/elftoolchain/dist/libdwarf/dwarf_def_macro.3 Thu May 14 17:37:10 2015 (r282910) +++ vendor/elftoolchain/dist/libdwarf/dwarf_def_macro.3 Thu May 14 17:48:57 2015 (r282911) @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $Id: dwarf_def_macro.3 2122 2011-11-09 15:35:14Z jkoshy $ +.\" $Id: dwarf_def_macro.3 3182 2015-04-10 16:08:10Z emaste $ .\" .Dd November 9, 2011 .Os @@ -72,7 +72,7 @@ Argument .Ar value should point to a NUL-terminated string containing the value of the macro. -If the macro doesn't have a value, argument +If the macro does not have a value, argument .Ar value should be set to NULL. .Pp Modified: vendor/elftoolchain/dist/libdwarf/dwarf_expand_frame_instructions.3 ============================================================================== --- vendor/elftoolchain/dist/libdwarf/dwarf_expand_frame_instructions.3 Thu May 14 17:37:10 2015 (r282910) +++ vendor/elftoolchain/dist/libdwarf/dwarf_expand_frame_instructions.3 Thu May 14 17:48:57 2015 (r282911) @@ -22,14 +22,14 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $Id: dwarf_expand_frame_instructions.3 2122 2011-11-09 15:35:14Z jkoshy $ +.\" $Id: dwarf_expand_frame_instructions.3 3181 2015-04-10 13:22:51Z emaste $ .\" .Dd November 9, 2011 .Os .Dt DWARF_EXPAND_FRAME_INSTRUCTIONS 3 .Sh NAME .Nm dwarf_expand_frame_instructions -.Nd expand frame instructions +.Nd expand frame instructions .Sh LIBRARY .Lb libdwarf .Sh SYNOPSIS Modified: vendor/elftoolchain/dist/libdwarf/dwarf_formblock.3 ============================================================================== --- vendor/elftoolchain/dist/libdwarf/dwarf_formblock.3 Thu May 14 17:37:10 2015 (r282910) +++ vendor/elftoolchain/dist/libdwarf/dwarf_formblock.3 Thu May 14 17:48:57 2015 (r282911) @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $Id: dwarf_formblock.3 2073 2011-10-27 03:30:47Z jkoshy $ +.\" $Id: dwarf_formblock.3 3182 2015-04-10 16:08:10Z emaste $ .\" .Dd July 23, 2010 .Os @@ -69,7 +69,7 @@ the DWARF(3) library. The application should not attempt to free this memory area. Portable code may indicate that the memory area is to be freed by -by using +using .Xr dwarf_dealloc 3 . .Sh RETURN VALUES Function Modified: vendor/elftoolchain/dist/libdwarf/dwarf_formflag.3 ============================================================================== --- vendor/elftoolchain/dist/libdwarf/dwarf_formflag.3 Thu May 14 17:37:10 2015 (r282910) +++ vendor/elftoolchain/dist/libdwarf/dwarf_formflag.3 Thu May 14 17:48:57 2015 (r282911) @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $Id: dwarf_formflag.3 2073 2011-10-27 03:30:47Z jkoshy $ +.\" $Id: dwarf_formflag.3 3181 2015-04-10 13:22:51Z emaste $ .\" .Dd June 21, 2010 .Os @@ -58,7 +58,7 @@ or If argument .Ar err is not NULL, it will be used to return an error descriptor in case -of an error. +of an error. .Sh RETURN VALUES Function .Fn dwarf_formflag Modified: vendor/elftoolchain/dist/libdwarf/dwarf_formref.3 ============================================================================== --- vendor/elftoolchain/dist/libdwarf/dwarf_formref.3 Thu May 14 17:37:10 2015 (r282910) +++ vendor/elftoolchain/dist/libdwarf/dwarf_formref.3 Thu May 14 17:48:57 2015 (r282911) @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $Id: dwarf_formref.3 2073 2011-10-27 03:30:47Z jkoshy $ +.\" $Id: dwarf_formref.3 3181 2015-04-10 13:22:51Z emaste $ .\" .Dd June 21, 2010 .Os @@ -101,7 +101,7 @@ ELF section. If argument .Ar err is not NULL, it will be used to return an error descriptor in case -of an error. +of an error. .Sh RETURN VALUES These functions return .Dv DW_DLV_OK Modified: vendor/elftoolchain/dist/libdwarf/dwarf_formsig8.3 ============================================================================== --- vendor/elftoolchain/dist/libdwarf/dwarf_formsig8.3 Thu May 14 17:37:10 2015 (r282910) +++ vendor/elftoolchain/dist/libdwarf/dwarf_formsig8.3 Thu May 14 17:48:57 2015 (r282911) @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $Id: dwarf_formsig8.3 2073 2011-10-27 03:30:47Z jkoshy $ +.\" $Id: dwarf_formsig8.3 3181 2015-04-10 13:22:51Z emaste $ .\" .Dd July 24, 2010 .Os @@ -56,7 +56,7 @@ must be If argument .Ar err is not NULL, it will be used to return an error descriptor in case -of an error. +of an error. .Sh RETURN VALUES Function .Fn dwarf_formsig8 Modified: vendor/elftoolchain/dist/libdwarf/dwarf_formudata.3 ============================================================================== --- vendor/elftoolchain/dist/libdwarf/dwarf_formudata.3 Thu May 14 17:37:10 2015 (r282910) +++ vendor/elftoolchain/dist/libdwarf/dwarf_formudata.3 Thu May 14 17:48:57 2015 (r282911) @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $Id: dwarf_formudata.3 2073 2011-10-27 03:30:47Z jkoshy $ +.\" $Id: dwarf_formudata.3 3181 2015-04-10 13:22:51Z emaste $ .\" .Dd June 21, 2010 .Os @@ -88,7 +88,7 @@ and If argument .Ar err is not NULL, it will be used to return an error descriptor in case -of an error. +of an error. .Sh RETURN VALUES These functions return .Dv DW_DLV_OK Modified: vendor/elftoolchain/dist/libdwarf/dwarf_get_fde_info_for_all_regs.3 ============================================================================== --- vendor/elftoolchain/dist/libdwarf/dwarf_get_fde_info_for_all_regs.3 Thu May 14 17:37:10 2015 (r282910) +++ vendor/elftoolchain/dist/libdwarf/dwarf_get_fde_info_for_all_regs.3 Thu May 14 17:48:57 2015 (r282911) @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $Id: dwarf_get_fde_info_for_all_regs.3 2071 2011-10-27 03:20:00Z jkoshy $ +.\" $Id: dwarf_get_fde_info_for_all_regs.3 3182 2015-04-10 16:08:10Z emaste $ .\" .Dd June 4, 2011 .Os @@ -90,7 +90,8 @@ typedef struct { For each of the register rules returned, the .Va dw_offset_relevant -field is set to 1 if the register rule has a offset value. The +field is set to 1 if the register rule has a offset value. +The .Va dw_regnum field is set to the register number associated with the regsiter rule. The Modified: vendor/elftoolchain/dist/libdwarf/dwarf_get_fde_info_for_reg.3 ============================================================================== --- vendor/elftoolchain/dist/libdwarf/dwarf_get_fde_info_for_reg.3 Thu May 14 17:37:10 2015 (r282910) +++ vendor/elftoolchain/dist/libdwarf/dwarf_get_fde_info_for_reg.3 Thu May 14 17:48:57 2015 (r282911) @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $Id: dwarf_get_fde_info_for_reg.3 2071 2011-10-27 03:20:00Z jkoshy $ +.\" $Id: dwarf_get_fde_info_for_reg.3 3181 2015-04-10 13:22:51Z emaste $ .\" .Dd June 4, 2011 .Os @@ -99,7 +99,7 @@ counter address associated with the regi If argument .Ar err is not NULL, it will be used to return an error descriptor in case -of an error. +of an error. .Ss COMPATIBILITY Function .Fn dwarf_get_fde_info_for_reg Modified: vendor/elftoolchain/dist/libdwarf/dwarf_get_ranges.3 ============================================================================== --- vendor/elftoolchain/dist/libdwarf/dwarf_get_ranges.3 Thu May 14 17:37:10 2015 (r282910) +++ vendor/elftoolchain/dist/libdwarf/dwarf_get_ranges.3 Thu May 14 17:48:57 2015 (r282911) @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $Id: dwarf_get_ranges.3 2122 2011-11-09 15:35:14Z jkoshy $ +.\" $Id: dwarf_get_ranges.3 3182 2015-04-10 16:08:10Z emaste $ .\" .Dd November 9, 2011 .Os @@ -137,7 +137,7 @@ For this type of entry, the field .Va dwr_addr1 is the value of the largest representable address offset, and .Va dwr_addr2 -is a base address for the begining and ending address offsets of +is a base address for the beginning and ending address offsets of subsequent address range entries in the list. .It Dv DW_RANGES_END An end of list mark. Modified: vendor/elftoolchain/dist/libdwarf/dwarf_hasattr.3 ============================================================================== --- vendor/elftoolchain/dist/libdwarf/dwarf_hasattr.3 Thu May 14 17:37:10 2015 (r282910) +++ vendor/elftoolchain/dist/libdwarf/dwarf_hasattr.3 Thu May 14 17:48:57 2015 (r282911) @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $Id: dwarf_hasattr.3 3142 2015-01-29 23:11:14Z jkoshy $ +.\" $Id: dwarf_hasattr.3 3181 2015-04-10 13:22:51Z emaste $ .\" .Dd April 17, 2010 .Os @@ -64,7 +64,7 @@ If the named attribute is not present, a If argument .Ar err is not NULL, it will be used to return an error descriptor in case -of an error. +of an error. .Sh RETURN VALUES On success, function .Fn dwarf_hasattr Modified: vendor/elftoolchain/dist/libdwarf/dwarf_next_cu_header.3 ============================================================================== --- vendor/elftoolchain/dist/libdwarf/dwarf_next_cu_header.3 Thu May 14 17:37:10 2015 (r282910) +++ vendor/elftoolchain/dist/libdwarf/dwarf_next_cu_header.3 Thu May 14 17:48:57 2015 (r282911) @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $Id: dwarf_next_cu_header.3 3128 2014-12-21 20:06:22Z jkoshy $ +.\" $Id: dwarf_next_cu_header.3 3182 2015-04-10 16:08:10Z emaste $ .\" .Dd December 21, 2014 .Os @@ -220,8 +220,7 @@ unit in the section. .Ss Iterating Through Type Units in a Debug Context When a DWARF debug context is allocated using .Xr dwarf_init 3 , -an internal pointer assoicated with the context will point to the -fisrt +an internal pointer associated with the context will point to the first .Dq \&.debug_types section found in the debug object. The first call to function Modified: vendor/elftoolchain/dist/libdwarf/dwarf_producer_init.3 ============================================================================== --- vendor/elftoolchain/dist/libdwarf/dwarf_producer_init.3 Thu May 14 17:37:10 2015 (r282910) +++ vendor/elftoolchain/dist/libdwarf/dwarf_producer_init.3 Thu May 14 17:48:57 2015 (r282911) @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $Id: dwarf_producer_init.3 2074 2011-10-27 03:34:33Z jkoshy $ +.\" $Id: dwarf_producer_init.3 3182 2015-04-10 16:08:10Z emaste $ .\" .Dd August 20, 2011 .Os @@ -58,7 +58,7 @@ descriptor representing a DWARF producer .Pp The argument .Ar errhand -should contain the adddress of a function to be called in case of an +should contain the address of a function to be called in case of an error. If this argument is .Dv NULL , Modified: vendor/elftoolchain/dist/libdwarf/dwarf_whatattr.3 ============================================================================== --- vendor/elftoolchain/dist/libdwarf/dwarf_whatattr.3 Thu May 14 17:37:10 2015 (r282910) +++ vendor/elftoolchain/dist/libdwarf/dwarf_whatattr.3 Thu May 14 17:48:57 2015 (r282911) @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $Id: dwarf_whatattr.3 3142 2015-01-29 23:11:14Z jkoshy $ +.\" $Id: dwarf_whatattr.3 3181 2015-04-10 13:22:51Z emaste $ .\" .Dd May 22, 2010 .Os @@ -51,7 +51,7 @@ and writes it to the location pointed to If argument .Ar err is not NULL, it will be used to return an error descriptor in case -of an error. +of an error. .Sh RETURN VALUES On success, function .Fn dwarf_whatattr Modified: vendor/elftoolchain/dist/libelf/elf.3 ============================================================================== --- vendor/elftoolchain/dist/libelf/elf.3 Thu May 14 17:37:10 2015 (r282910) +++ vendor/elftoolchain/dist/libelf/elf.3 Thu May 14 17:48:57 2015 (r282911) @@ -21,7 +21,7 @@ .\" out of the use of this software, even if advised of the possibility of .\" such damage. .\" -.\" $Id: elf.3 3142 2015-01-29 23:11:14Z jkoshy $ +.\" $Id: elf.3 3195 2015-05-12 17:22:19Z emaste $ .\" .Dd July 28, 2014 .Os @@ -555,7 +555,7 @@ flag on an ELF descriptor using .Xr elf_flagelf 3 , following which the library will use the data offsets and alignments specified by the application when laying out the file. -Application control of file layout is described further in the +Application control of file layout is described further in the .Xr elf_update 3 manual page. .Pp @@ -608,5 +608,4 @@ The current implementation of the ELF(3) .Fx 7.0 . .Sh AUTHORS The ELF library was written by -.An "Joseph Koshy" -.Aq jkoshy@FreeBSD.org . +.An Joseph Koshy Aq Mt jkoshy@FreeBSD.org . Modified: vendor/elftoolchain/dist/libelf/elf_begin.3 ============================================================================== --- vendor/elftoolchain/dist/libelf/elf_begin.3 Thu May 14 17:37:10 2015 (r282910) +++ vendor/elftoolchain/dist/libelf/elf_begin.3 Thu May 14 17:48:57 2015 (r282911) @@ -21,7 +21,7 @@ .\" out of the use of this software, even if advised of the possibility of .\" such damage. .\" -.\" $Id: elf_begin.3 2313 2011-12-11 06:19:24Z jkoshy $ +.\" $Id: elf_begin.3 3182 2015-04-10 16:08:10Z emaste $ .\" .Dd December 11, 2011 .Os @@ -272,7 +272,7 @@ was created. .It Bq Er ELF_E_ARGUMENT An .Xr ar 1 -archive was opened with with +archive was opened with .Ar cmd set to .Dv ELF_C_RDWR . Modified: vendor/elftoolchain/dist/libelf/elf_cntl.3 ============================================================================== --- vendor/elftoolchain/dist/libelf/elf_cntl.3 Thu May 14 17:37:10 2015 (r282910) +++ vendor/elftoolchain/dist/libelf/elf_cntl.3 Thu May 14 17:48:57 2015 (r282911) @@ -21,7 +21,7 @@ .\" out of the use of this software, even if advised of the possibility of .\" such damage. .\" -.\" $Id: elf_cntl.3 289 2009-01-08 08:26:08Z jkoshy $ +.\" $Id: elf_cntl.3 3181 2015-04-10 13:22:51Z emaste $ .\" .Dd August 9, 2006 .Os Modified: vendor/elftoolchain/dist/libelf/elf_getdata.3 ============================================================================== --- vendor/elftoolchain/dist/libelf/elf_getdata.3 Thu May 14 17:37:10 2015 (r282910) +++ vendor/elftoolchain/dist/libelf/elf_getdata.3 Thu May 14 17:48:57 2015 (r282911) @@ -21,7 +21,7 @@ .\" out of the use of this software, even if advised of the possibility of .\" such damage. .\" -.\" $Id: elf_getdata.3 1766 2011-08-22 06:01:03Z jkoshy $ +.\" $Id: elf_getdata.3 3181 2015-04-10 13:22:51Z emaste $ .\" .Dd January 26, 2011 .Os *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu May 14 17:50:21 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 68EF09FB; Thu, 14 May 2015 17:50:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3D9ED1BE5; Thu, 14 May 2015 17:50:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4EHoLcu055626; Thu, 14 May 2015 17:50:21 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4EHoLLv055625; Thu, 14 May 2015 17:50:21 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201505141750.t4EHoLLv055625@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 14 May 2015 17:50:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r282913 - vendor/elftoolchain/elftoolchain-r3197 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.20 Precedence: list List-Id: "SVN commit messages 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, 14 May 2015 17:50:21 -0000 Author: emaste Date: Thu May 14 17:50:20 2015 New Revision: 282913 URL: https://svnweb.freebsd.org/changeset/base/282913 Log: Tag elftoolchain-r3197 Added: - copied from r282912, vendor/elftoolchain/dist/ Directory Properties: vendor/elftoolchain/elftoolchain-r3197/ (props changed) From owner-svn-src-all@FreeBSD.ORG Thu May 14 18:09:56 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D7D46EB0; Thu, 14 May 2015 18:09:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C5C901DF2; Thu, 14 May 2015 18:09:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4EI9uBl064099; Thu, 14 May 2015 18:09:56 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4EI9uEW064098; Thu, 14 May 2015 18:09:56 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201505141809.t4EI9uEW064098@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 14 May 2015 18:09:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282914 - head/share/vt/keymaps 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.20 Precedence: list List-Id: "SVN commit messages 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, 14 May 2015 18:09:57 -0000 Author: emaste Date: Thu May 14 18:09:56 2015 New Revision: 282914 URL: https://svnweb.freebsd.org/changeset/base/282914 Log: kbdmap(1): Correct menu title: keyboards have a layout, not a language MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D2545 Modified: head/share/vt/keymaps/INDEX.keymaps Modified: head/share/vt/keymaps/INDEX.keymaps ============================================================================== --- head/share/vt/keymaps/INDEX.keymaps Thu May 14 17:50:20 2015 (r282913) +++ head/share/vt/keymaps/INDEX.keymaps Thu May 14 18:09:56 2015 (r282914) @@ -20,15 +20,15 @@ # # Language support: MENU, FONT # -MENU:en:Choose your keyboard language +MENU:en:Choose your keyboard layout MENU:da,no,sv:Vælg dit keyboard layout MENU:de:Wählen Sie Ihre Tastaturbelegung -MENU:fr:Choisissez la nationalité de votre clavier +MENU:fr:Choisissez la disposition de votre clavier MENU:pl:Wybierz ukÅ‚ad klawiatury MENU:pt:Escolha o layout do teclado -MENU:es:Seleccione el idioma de su teclado +MENU:es:Seleccione la disposición de su teclado MENU:he:ךלש תדלקמה תפש ×ª× ×¨×—×‘ -MENU:uk:Bиберіть розкладку клавіатури +MENU:uk:ОберiÑ‚ÑŒ розкладку клавіатури MENU:el:Επιλέξτε το πληκτÏολόγιο της κονσόλας MENU:hy:Ô¸Õ¶Õ¿Ö€Õ¥Ö„ Õ½Õ¿Õ¥Õ²Õ¶Õ¡Õ·Õ¡Ö€Õ« Õ¤Õ¡Õ½Õ¡Õ¾Õ¸Ö€Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶Õ¨ From owner-svn-src-all@FreeBSD.ORG Thu May 14 18:15:22 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C39EB303; Thu, 14 May 2015 18:15:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B11A31F03; Thu, 14 May 2015 18:15:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4EIFMTJ068508; Thu, 14 May 2015 18:15:22 GMT (envelope-from sjg@FreeBSD.org) Received: (from sjg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4EIFMYi068507; Thu, 14 May 2015 18:15:22 GMT (envelope-from sjg@FreeBSD.org) Message-Id: <201505141815.t4EIFMYi068507@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: sjg set sender to sjg@FreeBSD.org using -f From: "Simon J. Gerraty" Date: Thu, 14 May 2015 18:15:22 +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: r282915 - stable/10/usr.sbin/mountd 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.20 Precedence: list List-Id: "SVN commit messages 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, 14 May 2015 18:15:22 -0000 Author: sjg Date: Thu May 14 18:15:21 2015 New Revision: 282915 URL: https://svnweb.freebsd.org/changeset/base/282915 Log: No need to delete export from filesystems which are not exported. Modified: stable/10/usr.sbin/mountd/mountd.c Modified: stable/10/usr.sbin/mountd/mountd.c ============================================================================== --- stable/10/usr.sbin/mountd/mountd.c Thu May 14 18:09:56 2015 (r282914) +++ stable/10/usr.sbin/mountd/mountd.c Thu May 14 18:15:21 2015 (r282915) @@ -1732,6 +1732,12 @@ get_exportlist(void) } /* + * We do not need to delete "export" flag from + * filesystems that do not have it set. + */ + if (!(fsp->f_flags & MNT_EXPORTED)) + continue; + /* * Do not delete export for network filesystem by * passing "export" arg to nmount(). * It only makes sense to do this for local filesystems. From owner-svn-src-all@FreeBSD.ORG Thu May 14 18:29:06 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B5250693; Thu, 14 May 2015 18:29:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A3968104B; Thu, 14 May 2015 18:29:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4EIT6Q5074026; Thu, 14 May 2015 18:29:06 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4EIT63x074024; Thu, 14 May 2015 18:29:06 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201505141829.t4EIT63x074024@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 14 May 2015 18:29:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282916 - in head: sys/sys usr.bin/elfdump 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.20 Precedence: list List-Id: "SVN commit messages 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, 14 May 2015 18:29:06 -0000 Author: emaste Date: Thu May 14 18:29:05 2015 New Revision: 282916 URL: https://svnweb.freebsd.org/changeset/base/282916 Log: Add ELF machine EM_IAMCU, 32-bit Intel MCU It is e_machine 6, which was previously reserved for 486. Modified: head/sys/sys/elf_common.h head/usr.bin/elfdump/elfdump.c Modified: head/sys/sys/elf_common.h ============================================================================== --- head/sys/sys/elf_common.h Thu May 14 18:15:21 2015 (r282915) +++ head/sys/sys/elf_common.h Thu May 14 18:29:05 2015 (r282916) @@ -202,6 +202,7 @@ typedef struct { #define EM_386 3 /* Intel i386. */ #define EM_68K 4 /* Motorola 68000. */ #define EM_88K 5 /* Motorola 88000. */ +#define EM_IAMCU 6 /* Intel MCU. */ #define EM_860 7 /* Intel i860. */ #define EM_MIPS 8 /* MIPS R3000 Big-Endian only. */ #define EM_S370 9 /* IBM System/370. */ Modified: head/usr.bin/elfdump/elfdump.c ============================================================================== --- head/usr.bin/elfdump/elfdump.c Thu May 14 18:15:21 2015 (r282915) +++ head/usr.bin/elfdump/elfdump.c Thu May 14 18:29:05 2015 (r282916) @@ -261,6 +261,7 @@ e_machines(u_int mach) case EM_386: return "EM_386"; case EM_68K: return "EM_68K"; case EM_88K: return "EM_88K"; + case EM_IAMCU: return "EM_IAMCU"; case EM_860: return "EM_860"; case EM_MIPS: return "EM_MIPS"; case EM_PPC: return "EM_PPC"; From owner-svn-src-all@FreeBSD.ORG Thu May 14 18:33:59 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 97AB4929; Thu, 14 May 2015 18:33:59 +0000 (UTC) Received: from mail-wi0-x236.google.com (mail-wi0-x236.google.com [IPv6:2a00:1450:400c:c05::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 43610115B; Thu, 14 May 2015 18:33:59 +0000 (UTC) Received: by wizk4 with SMTP id k4so252403723wiz.1; Thu, 14 May 2015 11:33:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=fCTmrOJAT/LQW5F8lfj2WFm26QdZw4H/V4k9H+C+EXI=; b=0ZF39YigJBbb+WgC1fAlHmAA3aduwnbZ2070ZDpjMSKQdAC/qnJl/PJ8LRhv17u5VX HirAoEivflHzo4ju6pW9rEp/RigLtqKhBaCzmgkuAsu8xL4621aHmsNOFqxZ1JEzFX9m 3Tbj+3SGjOeKHyNzdhCK/8ZmDqsODTE6YO6WqbjomRdTqbH/KxkII35AMX9xQSp6xYHU hVnSZDbl8i/dVekYO/JM+sLIvsVNZKJkyBFwfQpVuXU47ffiYE1e4i35TA2Hx0HcwdjA Bfeti2elz6ixj9111kuK2sVfXUOnUm4BI24gZpROWAiuyVmtiD8tIJUKeqsMzQZ1lrqJ ny/g== MIME-Version: 1.0 X-Received: by 10.194.236.33 with SMTP id ur1mr9396693wjc.77.1431628437705; Thu, 14 May 2015 11:33:57 -0700 (PDT) Sender: pluknet@gmail.com Received: by 10.27.100.214 with HTTP; Thu, 14 May 2015 11:33:57 -0700 (PDT) In-Reply-To: <201505141809.t4EI9uEW064098@svn.freebsd.org> References: <201505141809.t4EI9uEW064098@svn.freebsd.org> Date: Thu, 14 May 2015 21:33:57 +0300 X-Google-Sender-Auth: 0sO1o0DIWgrQX0wZZ_CzURHSQhQ Message-ID: Subject: Re: svn commit: r282914 - head/share/vt/keymaps From: Sergey Kandaurov To: Ed Maste Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 14 May 2015 18:33:59 -0000 On 14 May 2015 at 21:09, Ed Maste wrote: > Author: emaste > Date: Thu May 14 18:09:56 2015 > New Revision: 282914 > URL: https://svnweb.freebsd.org/changeset/base/282914 > > Log: > kbdmap(1): Correct menu title: keyboards have a layout, not a language > > MFC after: 2 weeks > Sponsored by: The FreeBSD Foundation > Differential Revision: https://reviews.freebsd.org/D2545 > > Modified: > head/share/vt/keymaps/INDEX.keymaps > What about syscons? -- wbr, pluknet From owner-svn-src-all@FreeBSD.ORG Thu May 14 18:53:30 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7EC3DE67; Thu, 14 May 2015 18:53:30 +0000 (UTC) Received: from mail-ie0-x22f.google.com (mail-ie0-x22f.google.com [IPv6:2607:f8b0:4001:c03::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 488551393; Thu, 14 May 2015 18:53:30 +0000 (UTC) Received: by iebpz10 with SMTP id pz10so68897929ieb.2; Thu, 14 May 2015 11:53:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=Tdk4OdSkgcwQgSfaNPG/RuDLe/ejWka39GtYp+4r8qI=; b=rD1IuBhMsT1pPc2Z6Sz6BBNCSSL/bQhDMkmKdrWFi/nkafOKasXOQU2j1yNrcVVvgb /9pTIbji6yS67XGTNAr8z1TvgLSd7mmg86ywXZX81Yr0EUvyWryYt9c+QVIj6WCRxNj+ WJENQ2vjvsyvDQRx4ttW8Z7G56Ei6MMYx/8nJzN8P8ja84fz3hchy00eRJNNkRiTY/o0 rkGOYZGj5uyKW3HZJkeuxbQ2SQacoVA2xCZDFwzMqxUriii07Bs/VwCaj3QyYEfQcqC6 JjB7ERhYREagrInjviOG4zgdMdhv+B7CnGIa3OaI5al4BH+nKdQ7f9sW2wZiDnuD50HA xuiw== X-Received: by 10.43.12.136 with SMTP id pi8mr3009604icb.6.1431629609759; Thu, 14 May 2015 11:53:29 -0700 (PDT) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.48.3 with HTTP; Thu, 14 May 2015 11:53:09 -0700 (PDT) In-Reply-To: References: <201505141809.t4EI9uEW064098@svn.freebsd.org> From: Ed Maste Date: Thu, 14 May 2015 14:53:09 -0400 X-Google-Sender-Auth: aGWILMWZyhtIpJqPYi5WenCJOeo Message-ID: Subject: Re: svn commit: r282914 - head/share/vt/keymaps To: Sergey Kandaurov 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.20 Precedence: list List-Id: "SVN commit messages 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, 14 May 2015 18:53:30 -0000 On 14 May 2015 at 14:33, Sergey Kandaurov wrote: > On 14 May 2015 at 21:09, Ed Maste wrote: >> Author: emaste >> Date: Thu May 14 18:09:56 2015 >> New Revision: 282914 >> URL: https://svnweb.freebsd.org/changeset/base/282914 >> >> Log: >> kbdmap(1): Correct menu title: keyboards have a layout, not a language >> >> MFC after: 2 weeks >> Sponsored by: The FreeBSD Foundation >> Differential Revision: https://reviews.freebsd.org/D2545 >> >> Modified: >> head/share/vt/keymaps/INDEX.keymaps >> > > What about syscons? Other than outright bugs (like r282902) I'm focused on the issues encountered using the installer with a vt(4) console. Syscons(4) INDEX.keymaps is awkward because it has a number of different (ISO-8859-*) encodings in the same file. From owner-svn-src-all@FreeBSD.ORG Thu May 14 19:32:14 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4E9E9910; Thu, 14 May 2015 19:32:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 234B71872; Thu, 14 May 2015 19:32:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4EJWEAd007979; Thu, 14 May 2015 19:32:14 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4EJWDIn007978; Thu, 14 May 2015 19:32:13 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201505141932.t4EJWDIn007978@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Thu, 14 May 2015 19:32:13 +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: r282917 - stable/9/bin/cp 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.20 Precedence: list List-Id: "SVN commit messages 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, 14 May 2015 19:32:14 -0000 Author: jilles Date: Thu May 14 19:32:13 2015 New Revision: 282917 URL: https://svnweb.freebsd.org/changeset/base/282917 Log: MFC r282482: cp: Remove fts sorting. In an attempt to improve performance, cp reordered directories first (although the comment says directories last). This is not effective with new UFS layout policies. The sorting reorders multiple arguments passed to cp, which may be undesirable. Additionally, the comparison function does not induce a total order. Per POSIX, this causes undefined behaviour in qsort(). NetBSD removed the sorting in 2009. On filesystems that return directory entries in hash/btree order, sorting by d_fileno before statting improves performance on large directories. However, this can only be implemented in fts(3). PR: 53475 Reviewed by: bde (in 2004) Modified: stable/9/bin/cp/cp.c Directory Properties: stable/9/bin/cp/ (props changed) Modified: stable/9/bin/cp/cp.c ============================================================================== --- stable/9/bin/cp/cp.c Thu May 14 18:29:05 2015 (r282916) +++ stable/9/bin/cp/cp.c Thu May 14 19:32:13 2015 (r282917) @@ -90,7 +90,6 @@ volatile sig_atomic_t info; enum op { FILE_TO_FILE, FILE_TO_DIR, DIR_TO_DNE }; static int copy(char *[], enum op, int); -static int mastercmp(const FTSENT * const *, const FTSENT * const *); static void siginfo(int __unused); int @@ -274,7 +273,7 @@ copy(char *argv[], enum op type, int fts mask = ~umask(0777); umask(~mask); - if ((ftsp = fts_open(argv, fts_options, mastercmp)) == NULL) + if ((ftsp = fts_open(argv, fts_options, NULL)) == NULL) err(1, "fts_open"); for (badcp = rval = 0; (curr = fts_read(ftsp)) != NULL; badcp = 0) { switch (curr->fts_info) { @@ -488,32 +487,6 @@ copy(char *argv[], enum op type, int fts return (rval); } -/* - * mastercmp -- - * The comparison function for the copy order. The order is to copy - * non-directory files before directory files. The reason for this - * is because files tend to be in the same cylinder group as their - * parent directory, whereas directories tend not to be. Copying the - * files first reduces seeking. - */ -static int -mastercmp(const FTSENT * const *a, const FTSENT * const *b) -{ - int a_info, b_info; - - a_info = (*a)->fts_info; - if (a_info == FTS_ERR || a_info == FTS_NS || a_info == FTS_DNR) - return (0); - b_info = (*b)->fts_info; - if (b_info == FTS_ERR || b_info == FTS_NS || b_info == FTS_DNR) - return (0); - if (a_info == FTS_D) - return (-1); - if (b_info == FTS_D) - return (1); - return (0); -} - static void siginfo(int sig __unused) { From owner-svn-src-all@FreeBSD.ORG Thu May 14 19:48:28 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ED8A7E37; Thu, 14 May 2015 19:48:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D8CE31A15; Thu, 14 May 2015 19:48:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4EJmRe9013835; Thu, 14 May 2015 19:48:27 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4EJmGC7013754; Thu, 14 May 2015 19:48:16 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201505141948.t4EJmGC7013754@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 14 May 2015 19:48:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282918 - in head: contrib/elftoolchain/addr2line contrib/elftoolchain/common contrib/elftoolchain/cxxfilt contrib/elftoolchain/elfcopy contrib/elftoolchain/libdwarf contrib/elftoolchai... 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.20 Precedence: list List-Id: "SVN commit messages 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, 14 May 2015 19:48:28 -0000 Author: emaste Date: Thu May 14 19:48:15 2015 New Revision: 282918 URL: https://svnweb.freebsd.org/changeset/base/282918 Log: Update to ELF Tool Chain r3197 Highlights: - Fix man page markup, whitespace, and typos - Fix sh_info of SHT_GROUP section to point to the correct string - Improve validation in readelf and elfcopy/strip - Handle DWARF 4's DW_AT_high_pc in addr2line Sponsored by: The FreeBSD Foundation Modified: head/contrib/elftoolchain/addr2line/addr2line.1 head/contrib/elftoolchain/addr2line/addr2line.c head/contrib/elftoolchain/common/native-elf-format head/contrib/elftoolchain/cxxfilt/c++filt.1 head/contrib/elftoolchain/elfcopy/elfcopy.1 head/contrib/elftoolchain/elfcopy/sections.c head/contrib/elftoolchain/elfcopy/segments.c head/contrib/elftoolchain/elfcopy/symbols.c head/contrib/elftoolchain/libdwarf/dwarf.3 head/contrib/elftoolchain/libdwarf/dwarf_add_line_entry.3 head/contrib/elftoolchain/libdwarf/dwarf_def_macro.3 head/contrib/elftoolchain/libdwarf/dwarf_expand_frame_instructions.3 head/contrib/elftoolchain/libdwarf/dwarf_formblock.3 head/contrib/elftoolchain/libdwarf/dwarf_formflag.3 head/contrib/elftoolchain/libdwarf/dwarf_formref.3 head/contrib/elftoolchain/libdwarf/dwarf_formsig8.3 head/contrib/elftoolchain/libdwarf/dwarf_formudata.3 head/contrib/elftoolchain/libdwarf/dwarf_get_fde_info_for_all_regs.3 head/contrib/elftoolchain/libdwarf/dwarf_get_fde_info_for_reg.3 head/contrib/elftoolchain/libdwarf/dwarf_get_ranges.3 head/contrib/elftoolchain/libdwarf/dwarf_hasattr.3 head/contrib/elftoolchain/libdwarf/dwarf_next_cu_header.3 head/contrib/elftoolchain/libdwarf/dwarf_producer_init.3 head/contrib/elftoolchain/libdwarf/dwarf_whatattr.3 head/contrib/elftoolchain/libelf/elf.3 head/contrib/elftoolchain/libelf/elf_begin.3 head/contrib/elftoolchain/libelf/elf_cntl.3 head/contrib/elftoolchain/libelf/elf_getdata.3 head/contrib/elftoolchain/libelf/elf_open.3 head/contrib/elftoolchain/libelf/elf_update.c head/contrib/elftoolchain/libelf/gelf.3 head/contrib/elftoolchain/libelftc/elftc_demangle.3 head/contrib/elftoolchain/libelftc/elftc_symbol_table_create.3 head/contrib/elftoolchain/libelftc/libelftc_dem_gnu3.c head/contrib/elftoolchain/nm/nm.1 head/contrib/elftoolchain/readelf/readelf.1 head/contrib/elftoolchain/readelf/readelf.c head/contrib/elftoolchain/size/size.1 head/contrib/elftoolchain/size/size.c head/contrib/elftoolchain/strings/strings.1 head/lib/libelftc/elftc_version.c Directory Properties: head/contrib/elftoolchain/ (props changed) Modified: head/contrib/elftoolchain/addr2line/addr2line.1 ============================================================================== --- head/contrib/elftoolchain/addr2line/addr2line.1 Thu May 14 19:32:13 2015 (r282917) +++ head/contrib/elftoolchain/addr2line/addr2line.1 Thu May 14 19:48:15 2015 (r282918) @@ -22,7 +22,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $Id: addr2line.1 2066 2011-10-26 15:40:28Z jkoshy $ +.\" $Id: addr2line.1 3195 2015-05-12 17:22:19Z emaste $ .\" .Dd July 25, 2010 .Os @@ -99,7 +99,7 @@ Print a help message. Print a version identifier and exit. .El .Sh OUTPUT FORMAT -If the +If the .Fl f option was not specified, .Nm @@ -156,4 +156,4 @@ its source file and line number use: The .Nm utility was written by -.An "Kai Wang" Aq kaiwang27@users.sourceforge.net . +.An Kai Wang Aq Mt kaiwang27@users.sourceforge.net . Modified: head/contrib/elftoolchain/addr2line/addr2line.c ============================================================================== --- head/contrib/elftoolchain/addr2line/addr2line.c Thu May 14 19:32:13 2015 (r282917) +++ head/contrib/elftoolchain/addr2line/addr2line.c Thu May 14 19:48:15 2015 (r282918) @@ -39,7 +39,7 @@ #include "_elftc.h" -ELFTC_VCSID("$Id: addr2line.c 3174 2015-03-27 17:13:41Z emaste $"); +ELFTC_VCSID("$Id: addr2line.c 3197 2015-05-12 21:01:31Z emaste $"); static struct option longopts[] = { {"target" , required_argument, NULL, 'b'}, @@ -84,6 +84,44 @@ version(void) exit(0); } +/* + * Handle DWARF 4 'offset from' DW_AT_high_pc. Although we don't + * fully support DWARF 4, some compilers (like FreeBSD Clang 3.5.1) + * generate DW_AT_high_pc as an offset from DW_AT_low_pc. + * + * "If the value of the DW_AT_high_pc is of class address, it is the + * relocated address of the first location past the last instruction + * associated with the entity; if it is of class constant, the value + * is an unsigned integer offset which when added to the low PC gives + * the address of the first location past the last instruction + * associated with the entity." + * + * DWARF4 spec, section 2.17.2. + */ +static int +handle_high_pc(Dwarf_Die die, Dwarf_Unsigned lopc, Dwarf_Unsigned *hipc) +{ + Dwarf_Error de; + Dwarf_Half form; + Dwarf_Attribute at; + int ret; + + ret = dwarf_attr(die, DW_AT_high_pc, &at, &de); + if (ret == DW_DLV_ERROR) { + warnx("dwarf_attr failed: %s", dwarf_errmsg(de)); + return (ret); + } + ret = dwarf_whatform(at, &form, &de); + if (ret == DW_DLV_ERROR) { + warnx("dwarf_whatform failed: %s", dwarf_errmsg(de)); + return (ret); + } + if (dwarf_get_form_class(2, 0, 0, form) == DW_FORM_CLASS_CONSTANT) + *hipc += lopc; + + return (DW_DLV_OK); +} + static void search_func(Dwarf_Debug dbg, Dwarf_Die die, Dwarf_Addr addr, const char **rlt_func) @@ -108,6 +146,8 @@ search_func(Dwarf_Debug dbg, Dwarf_Die d if (dwarf_attrval_unsigned(die, DW_AT_low_pc, &lopc, &de) || dwarf_attrval_unsigned(die, DW_AT_high_pc, &hipc, &de)) goto cont_search; + if (handle_high_pc(die, lopc, &hipc) != DW_DLV_OK) + goto cont_search; if (addr < lopc || addr >= hipc) goto cont_search; @@ -202,6 +242,8 @@ translate(Dwarf_Debug dbg, const char* a * Check if the address falls into the PC range of * this CU. */ + if (handle_high_pc(die, lopc, &hipc) != DW_DLV_OK) + continue; if (addr < lopc || addr >= hipc) continue; } Modified: head/contrib/elftoolchain/common/native-elf-format ============================================================================== --- head/contrib/elftoolchain/common/native-elf-format Thu May 14 19:32:13 2015 (r282917) +++ head/contrib/elftoolchain/common/native-elf-format Thu May 14 19:48:15 2015 (r282918) @@ -1,6 +1,6 @@ #!/bin/sh # -# $Id: native-elf-format 3167 2015-02-24 19:10:08Z emaste $ +# $Id: native-elf-format 3186 2015-04-16 22:16:40Z emaste $ # # Find the native ELF format for a host platform by compiling a # test object and examining the resulting object. @@ -33,7 +33,7 @@ $1 ~ "Data:" { $1 ~ "Machine:" { if (match($0, "Intel.*386")) { elfarch = "EM_386"; - } else if (match($0, ".*X86-64")) { + } else if (match($0, ".*[xX]86-64")) { elfarch = "EM_X86_64"; } else { elfarch = "unknown"; Modified: head/contrib/elftoolchain/cxxfilt/c++filt.1 ============================================================================== --- head/contrib/elftoolchain/cxxfilt/c++filt.1 Thu May 14 19:32:13 2015 (r282917) +++ head/contrib/elftoolchain/cxxfilt/c++filt.1 Thu May 14 19:48:15 2015 (r282918) @@ -22,7 +22,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $Id: c++filt.1 2175 2011-11-16 05:51:49Z jkoshy $ +.\" $Id: c++filt.1 3195 2015-05-12 17:22:19Z emaste $ .\" .Dd August 24, 2011 .Os @@ -106,4 +106,4 @@ and exit. The .Nm utility was written by -.An "Kai Wang" Aq kaiwang27@users.sourceforge.net . +.An Kai Wang Aq Mt kaiwang27@users.sourceforge.net . Modified: head/contrib/elftoolchain/elfcopy/elfcopy.1 ============================================================================== --- head/contrib/elftoolchain/elfcopy/elfcopy.1 Thu May 14 19:32:13 2015 (r282917) +++ head/contrib/elftoolchain/elfcopy/elfcopy.1 Thu May 14 19:48:15 2015 (r282918) @@ -21,7 +21,7 @@ .\" out of the use of this software, even if advised of the possibility of .\" such damage. .\" -.\" $Id: elfcopy.1 3173 2015-03-27 16:46:13Z emaste $ +.\" $Id: elfcopy.1 3195 2015-05-12 17:22:19Z emaste $ .\" .Dd March 27, 2015 .Os @@ -330,4 +330,4 @@ Do not copy symbols that are not needed .Sh HISTORY .Nm has been implemented by -.An "Kai Wang" Aq kaiwang27@users.sourceforge.net . +.An Kai Wang Aq Mt kaiwang27@users.sourceforge.net . Modified: head/contrib/elftoolchain/elfcopy/sections.c ============================================================================== --- head/contrib/elftoolchain/elfcopy/sections.c Thu May 14 19:32:13 2015 (r282917) +++ head/contrib/elftoolchain/elfcopy/sections.c Thu May 14 19:48:15 2015 (r282918) @@ -34,7 +34,7 @@ #include "elfcopy.h" -ELFTC_VCSID("$Id: sections.c 3174 2015-03-27 17:13:41Z emaste $"); +ELFTC_VCSID("$Id: sections.c 3185 2015-04-11 08:56:34Z kaiwang27 $"); static void add_gnu_debuglink(struct elfcopy *ecp); static uint32_t calc_crc32(const char *p, size_t len, uint32_t crc); @@ -1223,6 +1223,14 @@ update_shdr(struct elfcopy *ecp, int upd osh.sh_info != 0) osh.sh_info = ecp->secndx[osh.sh_info]; + /* + * sh_info of SHT_GROUP section needs to point to the correct + * string in the symbol table. + */ + if (s->type == SHT_GROUP && (ecp->flags & SYMTAB_EXIST) && + (ecp->flags & SYMTAB_INTACT) == 0) + osh.sh_info = ecp->symndx[osh.sh_info]; + if (!gelf_update_shdr(s->os, &osh)) errx(EXIT_FAILURE, "gelf_update_shdr() failed: %s", elf_errmsg(-1)); Modified: head/contrib/elftoolchain/elfcopy/segments.c ============================================================================== --- head/contrib/elftoolchain/elfcopy/segments.c Thu May 14 19:32:13 2015 (r282917) +++ head/contrib/elftoolchain/elfcopy/segments.c Thu May 14 19:48:15 2015 (r282918) @@ -34,7 +34,7 @@ #include "elfcopy.h" -ELFTC_VCSID("$Id: segments.c 3177 2015-03-30 18:19:41Z emaste $"); +ELFTC_VCSID("$Id: segments.c 3196 2015-05-12 17:33:48Z emaste $"); static void insert_to_inseg_list(struct segment *seg, struct section *sec); @@ -442,7 +442,7 @@ copy_phdr(struct elfcopy *ecp) s = seg->v_sec[i]; seg->msz = s->vma + s->sz - seg->addr; if (s->type != SHT_NOBITS) - seg->fsz = seg->msz; + seg->fsz = s->off + s->sz - seg->off; } } Modified: head/contrib/elftoolchain/elfcopy/symbols.c ============================================================================== --- head/contrib/elftoolchain/elfcopy/symbols.c Thu May 14 19:32:13 2015 (r282917) +++ head/contrib/elftoolchain/elfcopy/symbols.c Thu May 14 19:48:15 2015 (r282918) @@ -33,7 +33,7 @@ #include "elfcopy.h" -ELFTC_VCSID("$Id: symbols.c 3174 2015-03-27 17:13:41Z emaste $"); +ELFTC_VCSID("$Id: symbols.c 3191 2015-05-04 17:07:01Z jkoshy $"); /* Symbol table buffer structure. */ struct symbuf { @@ -1090,7 +1090,7 @@ str_hash(const char *s) { uint32_t hash; - for (hash = 2166136261; *s; s++) + for (hash = 2166136261UL; *s; s++) hash = (hash ^ *s) * 16777619; return (hash & (STHASHSIZE - 1)); Modified: head/contrib/elftoolchain/libdwarf/dwarf.3 ============================================================================== --- head/contrib/elftoolchain/libdwarf/dwarf.3 Thu May 14 19:32:13 2015 (r282917) +++ head/contrib/elftoolchain/libdwarf/dwarf.3 Thu May 14 19:48:15 2015 (r282918) @@ -21,7 +21,7 @@ .\" out of the use of this software, even if advised of the possibility of .\" such damage. .\" -.\" $Id: dwarf.3 3130 2014-12-21 20:06:29Z jkoshy $ +.\" $Id: dwarf.3 3195 2015-05-12 17:22:19Z emaste $ .\" .Dd December 21, 2014 .Os @@ -44,7 +44,7 @@ is defined by the DWARF standard, see .Xr dwarf 4 . .Pp The -.Xr DWARF 3 +.Xr DWARF 3 API has two parts: .Bl -bullet .It @@ -349,7 +349,7 @@ Retrieve a debugging information entry g .It Fn dwarf_siblingof , Fn dwarf_siblingof_b Retrieve the sibling descriptor for a debugging information entry. .It Fn dwarf_srclang -Retrive the source language attribute for a debugging information +Retrieve the source language attribute for a debugging information entry. .It Fn dwarf_tag Retrieve the tag for a debugging information entry. @@ -742,12 +742,12 @@ The DWARF standard is defined by The DWARF(3) API originated at Silicon Graphics Inc. .Pp A BSD-licensed implementation of a subset of the API was written by -.An "John Birrell" Aq jb@FreeBSD.org +.An John Birrell Aq Mt jb@FreeBSD.org for the FreeBSD project. The implementation was subsequently revised and completed by -.An "Kai Wang" Aq kaiwang27@users.sourceforge.net . +.An Kai Wang Aq Mt kaiwang27@users.sourceforge.net . .Pp Manual pages for this implementation were written by -.An "Joseph Koshy" Aq jkoshy@users.sourceforge.net +.An Joseph Koshy Aq Mt jkoshy@users.sourceforge.net and -.An "Kai Wang" Aq kaiwang27@users.sourceforge.net . +.An Kai Wang Aq Mt kaiwang27@users.sourceforge.net . Modified: head/contrib/elftoolchain/libdwarf/dwarf_add_line_entry.3 ============================================================================== --- head/contrib/elftoolchain/libdwarf/dwarf_add_line_entry.3 Thu May 14 19:32:13 2015 (r282917) +++ head/contrib/elftoolchain/libdwarf/dwarf_add_line_entry.3 Thu May 14 19:48:15 2015 (r282918) @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $Id: dwarf_add_line_entry.3 2953 2013-06-30 20:21:38Z kaiwang27 $ +.\" $Id: dwarf_add_line_entry.3 3182 2015-04-10 16:08:10Z emaste $ .\" .Dd June 30, 2013 .Os @@ -66,7 +66,8 @@ Valid source file indices are those retu .Pp Argument .Ar off -specifies a relocatable program address. The ELF symbol to be used +specifies a relocatable program address. +The ELF symbol to be used for relocation is set by a prior call to the function .Xr dwarf_lne_set_address 3 . .Pp Modified: head/contrib/elftoolchain/libdwarf/dwarf_def_macro.3 ============================================================================== --- head/contrib/elftoolchain/libdwarf/dwarf_def_macro.3 Thu May 14 19:32:13 2015 (r282917) +++ head/contrib/elftoolchain/libdwarf/dwarf_def_macro.3 Thu May 14 19:48:15 2015 (r282918) @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $Id: dwarf_def_macro.3 2122 2011-11-09 15:35:14Z jkoshy $ +.\" $Id: dwarf_def_macro.3 3182 2015-04-10 16:08:10Z emaste $ .\" .Dd November 9, 2011 .Os @@ -72,7 +72,7 @@ Argument .Ar value should point to a NUL-terminated string containing the value of the macro. -If the macro doesn't have a value, argument +If the macro does not have a value, argument .Ar value should be set to NULL. .Pp Modified: head/contrib/elftoolchain/libdwarf/dwarf_expand_frame_instructions.3 ============================================================================== --- head/contrib/elftoolchain/libdwarf/dwarf_expand_frame_instructions.3 Thu May 14 19:32:13 2015 (r282917) +++ head/contrib/elftoolchain/libdwarf/dwarf_expand_frame_instructions.3 Thu May 14 19:48:15 2015 (r282918) @@ -22,14 +22,14 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $Id: dwarf_expand_frame_instructions.3 2122 2011-11-09 15:35:14Z jkoshy $ +.\" $Id: dwarf_expand_frame_instructions.3 3181 2015-04-10 13:22:51Z emaste $ .\" .Dd November 9, 2011 .Os .Dt DWARF_EXPAND_FRAME_INSTRUCTIONS 3 .Sh NAME .Nm dwarf_expand_frame_instructions -.Nd expand frame instructions +.Nd expand frame instructions .Sh LIBRARY .Lb libdwarf .Sh SYNOPSIS Modified: head/contrib/elftoolchain/libdwarf/dwarf_formblock.3 ============================================================================== --- head/contrib/elftoolchain/libdwarf/dwarf_formblock.3 Thu May 14 19:32:13 2015 (r282917) +++ head/contrib/elftoolchain/libdwarf/dwarf_formblock.3 Thu May 14 19:48:15 2015 (r282918) @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $Id: dwarf_formblock.3 2073 2011-10-27 03:30:47Z jkoshy $ +.\" $Id: dwarf_formblock.3 3182 2015-04-10 16:08:10Z emaste $ .\" .Dd July 23, 2010 .Os @@ -69,7 +69,7 @@ the DWARF(3) library. The application should not attempt to free this memory area. Portable code may indicate that the memory area is to be freed by -by using +using .Xr dwarf_dealloc 3 . .Sh RETURN VALUES Function Modified: head/contrib/elftoolchain/libdwarf/dwarf_formflag.3 ============================================================================== --- head/contrib/elftoolchain/libdwarf/dwarf_formflag.3 Thu May 14 19:32:13 2015 (r282917) +++ head/contrib/elftoolchain/libdwarf/dwarf_formflag.3 Thu May 14 19:48:15 2015 (r282918) @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $Id: dwarf_formflag.3 2073 2011-10-27 03:30:47Z jkoshy $ +.\" $Id: dwarf_formflag.3 3181 2015-04-10 13:22:51Z emaste $ .\" .Dd June 21, 2010 .Os @@ -58,7 +58,7 @@ or If argument .Ar err is not NULL, it will be used to return an error descriptor in case -of an error. +of an error. .Sh RETURN VALUES Function .Fn dwarf_formflag Modified: head/contrib/elftoolchain/libdwarf/dwarf_formref.3 ============================================================================== --- head/contrib/elftoolchain/libdwarf/dwarf_formref.3 Thu May 14 19:32:13 2015 (r282917) +++ head/contrib/elftoolchain/libdwarf/dwarf_formref.3 Thu May 14 19:48:15 2015 (r282918) @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $Id: dwarf_formref.3 2073 2011-10-27 03:30:47Z jkoshy $ +.\" $Id: dwarf_formref.3 3181 2015-04-10 13:22:51Z emaste $ .\" .Dd June 21, 2010 .Os @@ -101,7 +101,7 @@ ELF section. If argument .Ar err is not NULL, it will be used to return an error descriptor in case -of an error. +of an error. .Sh RETURN VALUES These functions return .Dv DW_DLV_OK Modified: head/contrib/elftoolchain/libdwarf/dwarf_formsig8.3 ============================================================================== --- head/contrib/elftoolchain/libdwarf/dwarf_formsig8.3 Thu May 14 19:32:13 2015 (r282917) +++ head/contrib/elftoolchain/libdwarf/dwarf_formsig8.3 Thu May 14 19:48:15 2015 (r282918) @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $Id: dwarf_formsig8.3 2073 2011-10-27 03:30:47Z jkoshy $ +.\" $Id: dwarf_formsig8.3 3181 2015-04-10 13:22:51Z emaste $ .\" .Dd July 24, 2010 .Os @@ -56,7 +56,7 @@ must be If argument .Ar err is not NULL, it will be used to return an error descriptor in case -of an error. +of an error. .Sh RETURN VALUES Function .Fn dwarf_formsig8 Modified: head/contrib/elftoolchain/libdwarf/dwarf_formudata.3 ============================================================================== --- head/contrib/elftoolchain/libdwarf/dwarf_formudata.3 Thu May 14 19:32:13 2015 (r282917) +++ head/contrib/elftoolchain/libdwarf/dwarf_formudata.3 Thu May 14 19:48:15 2015 (r282918) @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $Id: dwarf_formudata.3 2073 2011-10-27 03:30:47Z jkoshy $ +.\" $Id: dwarf_formudata.3 3181 2015-04-10 13:22:51Z emaste $ .\" .Dd June 21, 2010 .Os @@ -88,7 +88,7 @@ and If argument .Ar err is not NULL, it will be used to return an error descriptor in case -of an error. +of an error. .Sh RETURN VALUES These functions return .Dv DW_DLV_OK Modified: head/contrib/elftoolchain/libdwarf/dwarf_get_fde_info_for_all_regs.3 ============================================================================== --- head/contrib/elftoolchain/libdwarf/dwarf_get_fde_info_for_all_regs.3 Thu May 14 19:32:13 2015 (r282917) +++ head/contrib/elftoolchain/libdwarf/dwarf_get_fde_info_for_all_regs.3 Thu May 14 19:48:15 2015 (r282918) @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $Id: dwarf_get_fde_info_for_all_regs.3 2071 2011-10-27 03:20:00Z jkoshy $ +.\" $Id: dwarf_get_fde_info_for_all_regs.3 3182 2015-04-10 16:08:10Z emaste $ .\" .Dd June 4, 2011 .Os @@ -90,7 +90,8 @@ typedef struct { For each of the register rules returned, the .Va dw_offset_relevant -field is set to 1 if the register rule has a offset value. The +field is set to 1 if the register rule has a offset value. +The .Va dw_regnum field is set to the register number associated with the regsiter rule. The Modified: head/contrib/elftoolchain/libdwarf/dwarf_get_fde_info_for_reg.3 ============================================================================== --- head/contrib/elftoolchain/libdwarf/dwarf_get_fde_info_for_reg.3 Thu May 14 19:32:13 2015 (r282917) +++ head/contrib/elftoolchain/libdwarf/dwarf_get_fde_info_for_reg.3 Thu May 14 19:48:15 2015 (r282918) @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $Id: dwarf_get_fde_info_for_reg.3 2071 2011-10-27 03:20:00Z jkoshy $ +.\" $Id: dwarf_get_fde_info_for_reg.3 3181 2015-04-10 13:22:51Z emaste $ .\" .Dd June 4, 2011 .Os @@ -99,7 +99,7 @@ counter address associated with the regi If argument .Ar err is not NULL, it will be used to return an error descriptor in case -of an error. +of an error. .Ss COMPATIBILITY Function .Fn dwarf_get_fde_info_for_reg Modified: head/contrib/elftoolchain/libdwarf/dwarf_get_ranges.3 ============================================================================== --- head/contrib/elftoolchain/libdwarf/dwarf_get_ranges.3 Thu May 14 19:32:13 2015 (r282917) +++ head/contrib/elftoolchain/libdwarf/dwarf_get_ranges.3 Thu May 14 19:48:15 2015 (r282918) @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $Id: dwarf_get_ranges.3 2122 2011-11-09 15:35:14Z jkoshy $ +.\" $Id: dwarf_get_ranges.3 3182 2015-04-10 16:08:10Z emaste $ .\" .Dd November 9, 2011 .Os @@ -137,7 +137,7 @@ For this type of entry, the field .Va dwr_addr1 is the value of the largest representable address offset, and .Va dwr_addr2 -is a base address for the begining and ending address offsets of +is a base address for the beginning and ending address offsets of subsequent address range entries in the list. .It Dv DW_RANGES_END An end of list mark. Modified: head/contrib/elftoolchain/libdwarf/dwarf_hasattr.3 ============================================================================== --- head/contrib/elftoolchain/libdwarf/dwarf_hasattr.3 Thu May 14 19:32:13 2015 (r282917) +++ head/contrib/elftoolchain/libdwarf/dwarf_hasattr.3 Thu May 14 19:48:15 2015 (r282918) @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $Id: dwarf_hasattr.3 3142 2015-01-29 23:11:14Z jkoshy $ +.\" $Id: dwarf_hasattr.3 3181 2015-04-10 13:22:51Z emaste $ .\" .Dd April 17, 2010 .Os @@ -64,7 +64,7 @@ If the named attribute is not present, a If argument .Ar err is not NULL, it will be used to return an error descriptor in case -of an error. +of an error. .Sh RETURN VALUES On success, function .Fn dwarf_hasattr Modified: head/contrib/elftoolchain/libdwarf/dwarf_next_cu_header.3 ============================================================================== --- head/contrib/elftoolchain/libdwarf/dwarf_next_cu_header.3 Thu May 14 19:32:13 2015 (r282917) +++ head/contrib/elftoolchain/libdwarf/dwarf_next_cu_header.3 Thu May 14 19:48:15 2015 (r282918) @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $Id: dwarf_next_cu_header.3 3128 2014-12-21 20:06:22Z jkoshy $ +.\" $Id: dwarf_next_cu_header.3 3182 2015-04-10 16:08:10Z emaste $ .\" .Dd December 21, 2014 .Os @@ -220,8 +220,7 @@ unit in the section. .Ss Iterating Through Type Units in a Debug Context When a DWARF debug context is allocated using .Xr dwarf_init 3 , -an internal pointer assoicated with the context will point to the -fisrt +an internal pointer associated with the context will point to the first .Dq \&.debug_types section found in the debug object. The first call to function Modified: head/contrib/elftoolchain/libdwarf/dwarf_producer_init.3 ============================================================================== --- head/contrib/elftoolchain/libdwarf/dwarf_producer_init.3 Thu May 14 19:32:13 2015 (r282917) +++ head/contrib/elftoolchain/libdwarf/dwarf_producer_init.3 Thu May 14 19:48:15 2015 (r282918) @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $Id: dwarf_producer_init.3 2074 2011-10-27 03:34:33Z jkoshy $ +.\" $Id: dwarf_producer_init.3 3182 2015-04-10 16:08:10Z emaste $ .\" .Dd August 20, 2011 .Os @@ -58,7 +58,7 @@ descriptor representing a DWARF producer .Pp The argument .Ar errhand -should contain the adddress of a function to be called in case of an +should contain the address of a function to be called in case of an error. If this argument is .Dv NULL , Modified: head/contrib/elftoolchain/libdwarf/dwarf_whatattr.3 ============================================================================== --- head/contrib/elftoolchain/libdwarf/dwarf_whatattr.3 Thu May 14 19:32:13 2015 (r282917) +++ head/contrib/elftoolchain/libdwarf/dwarf_whatattr.3 Thu May 14 19:48:15 2015 (r282918) @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $Id: dwarf_whatattr.3 3142 2015-01-29 23:11:14Z jkoshy $ +.\" $Id: dwarf_whatattr.3 3181 2015-04-10 13:22:51Z emaste $ .\" .Dd May 22, 2010 .Os @@ -51,7 +51,7 @@ and writes it to the location pointed to If argument .Ar err is not NULL, it will be used to return an error descriptor in case -of an error. +of an error. .Sh RETURN VALUES On success, function .Fn dwarf_whatattr Modified: head/contrib/elftoolchain/libelf/elf.3 ============================================================================== --- head/contrib/elftoolchain/libelf/elf.3 Thu May 14 19:32:13 2015 (r282917) +++ head/contrib/elftoolchain/libelf/elf.3 Thu May 14 19:48:15 2015 (r282918) @@ -21,7 +21,7 @@ .\" out of the use of this software, even if advised of the possibility of .\" such damage. .\" -.\" $Id: elf.3 3142 2015-01-29 23:11:14Z jkoshy $ +.\" $Id: elf.3 3195 2015-05-12 17:22:19Z emaste $ .\" .Dd July 28, 2014 .Os @@ -555,7 +555,7 @@ flag on an ELF descriptor using .Xr elf_flagelf 3 , following which the library will use the data offsets and alignments specified by the application when laying out the file. -Application control of file layout is described further in the +Application control of file layout is described further in the .Xr elf_update 3 manual page. .Pp @@ -608,5 +608,4 @@ The current implementation of the ELF(3) .Fx 7.0 . .Sh AUTHORS The ELF library was written by -.An "Joseph Koshy" -.Aq jkoshy@FreeBSD.org . +.An Joseph Koshy Aq Mt jkoshy@FreeBSD.org . Modified: head/contrib/elftoolchain/libelf/elf_begin.3 ============================================================================== --- head/contrib/elftoolchain/libelf/elf_begin.3 Thu May 14 19:32:13 2015 (r282917) +++ head/contrib/elftoolchain/libelf/elf_begin.3 Thu May 14 19:48:15 2015 (r282918) @@ -21,7 +21,7 @@ .\" out of the use of this software, even if advised of the possibility of .\" such damage. .\" -.\" $Id: elf_begin.3 2313 2011-12-11 06:19:24Z jkoshy $ +.\" $Id: elf_begin.3 3182 2015-04-10 16:08:10Z emaste $ .\" .Dd December 11, 2011 .Os @@ -272,7 +272,7 @@ was created. .It Bq Er ELF_E_ARGUMENT An .Xr ar 1 -archive was opened with with +archive was opened with .Ar cmd set to .Dv ELF_C_RDWR . Modified: head/contrib/elftoolchain/libelf/elf_cntl.3 ============================================================================== --- head/contrib/elftoolchain/libelf/elf_cntl.3 Thu May 14 19:32:13 2015 (r282917) +++ head/contrib/elftoolchain/libelf/elf_cntl.3 Thu May 14 19:48:15 2015 (r282918) @@ -21,7 +21,7 @@ .\" out of the use of this software, even if advised of the possibility of .\" such damage. .\" -.\" $Id: elf_cntl.3 289 2009-01-08 08:26:08Z jkoshy $ +.\" $Id: elf_cntl.3 3181 2015-04-10 13:22:51Z emaste $ .\" .Dd August 9, 2006 .Os Modified: head/contrib/elftoolchain/libelf/elf_getdata.3 ============================================================================== --- head/contrib/elftoolchain/libelf/elf_getdata.3 Thu May 14 19:32:13 2015 (r282917) +++ head/contrib/elftoolchain/libelf/elf_getdata.3 Thu May 14 19:48:15 2015 (r282918) @@ -21,7 +21,7 @@ .\" out of the use of this software, even if advised of the possibility of .\" such damage. .\" -.\" $Id: elf_getdata.3 1766 2011-08-22 06:01:03Z jkoshy $ +.\" $Id: elf_getdata.3 3181 2015-04-10 13:22:51Z emaste $ .\" .Dd January 26, 2011 .Os @@ -174,7 +174,7 @@ These functions return a valid pointer t NULL if an error occurs. .Sh ERRORS These functions may fail with the following errors: -.Bl -tag -width "[ELF_E_RESOURCE]" +.Bl -tag -width "[ELF_E_RESOURCE]" .It Bq Er ELF_E_ARGUMENT Either of the arguments .Ar scn Modified: head/contrib/elftoolchain/libelf/elf_open.3 ============================================================================== --- head/contrib/elftoolchain/libelf/elf_open.3 Thu May 14 19:32:13 2015 (r282917) +++ head/contrib/elftoolchain/libelf/elf_open.3 Thu May 14 19:48:15 2015 (r282918) @@ -21,11 +21,11 @@ .\" out of the use of this software, even if advised of the possibility of .\" such damage. .\" -.\" $Id: elf_open.3 2512 2012-05-31 06:15:57Z jkoshy $ +.\" $Id: elf_open.3 3181 2015-04-10 13:22:51Z emaste $ .\" .Dd May 31, 2012 .Os -.Dt ELF_OPEN 3 +.Dt ELF_OPEN 3 .Sh NAME .Nm elf_open .Nd open ELF objects and ar(1) archives Modified: head/contrib/elftoolchain/libelf/elf_update.c ============================================================================== --- head/contrib/elftoolchain/libelf/elf_update.c Thu May 14 19:32:13 2015 (r282917) +++ head/contrib/elftoolchain/libelf/elf_update.c Thu May 14 19:48:15 2015 (r282918) @@ -41,7 +41,7 @@ #include #endif -ELFTC_VCSID("$Id: elf_update.c 3013 2014-03-23 06:16:59Z jkoshy $"); +ELFTC_VCSID("$Id: elf_update.c 3190 2015-05-04 15:23:08Z jkoshy $"); /* * Layout strategy: @@ -271,8 +271,10 @@ _libelf_compute_section_extents(Elf *e, * offsets and alignment for sanity. */ if (e->e_flags & ELF_F_LAYOUT) { - if (scn_alignment > sh_align || sh_offset % sh_align || - sh_size < scn_size) { + if (scn_alignment > sh_align || + sh_offset % sh_align || + sh_size < scn_size || + sh_offset % _libelf_falign(elftype, ec)) { LIBELF_SET_ERROR(LAYOUT, 0); return (0); } Modified: head/contrib/elftoolchain/libelf/gelf.3 ============================================================================== --- head/contrib/elftoolchain/libelf/gelf.3 Thu May 14 19:32:13 2015 (r282917) +++ head/contrib/elftoolchain/libelf/gelf.3 Thu May 14 19:48:15 2015 (r282918) @@ -21,7 +21,7 @@ .\" out of the use of this software, even if advised of the possibility of .\" such damage. .\" -.\" $Id: gelf.3 189 2008-07-20 10:38:08Z jkoshy $ +.\" $Id: gelf.3 3195 2015-05-12 17:22:19Z emaste $ .\" .Dd September 1, 2006 .Os @@ -197,5 +197,4 @@ This implementation of the API first app .Fx 7.0 . .Sh AUTHORS The GElf API was implemented by -.An "Joseph Koshy" -.Aq jkoshy@FreeBSD.org . +.An Joseph Koshy Aq Mt jkoshy@FreeBSD.org . Modified: head/contrib/elftoolchain/libelftc/elftc_demangle.3 ============================================================================== --- head/contrib/elftoolchain/libelftc/elftc_demangle.3 Thu May 14 19:32:13 2015 (r282917) +++ head/contrib/elftoolchain/libelftc/elftc_demangle.3 Thu May 14 19:48:15 2015 (r282918) @@ -21,7 +21,7 @@ .\" out of the use of this software, even if advised of the possibility of .\" such damage. .\" -.\" $Id: elftc_demangle.3 2065 2011-10-26 15:24:47Z jkoshy $ +.\" $Id: elftc_demangle.3 3182 2015-04-10 16:08:10Z emaste $ .\" .Dd August 24, 2011 .Os @@ -88,7 +88,7 @@ To decode a name that uses an unknown en .Bd -literal -offset indent char buffer[1024]; const char *funcname; - + funcname = ...; /* points to string to be demangled */ if (elftc_demangle(funcname, buffer, sizeof(buffer), 0) == 0) printf("Demangled name: %\\n", buffer); Modified: head/contrib/elftoolchain/libelftc/elftc_symbol_table_create.3 ============================================================================== --- head/contrib/elftoolchain/libelftc/elftc_symbol_table_create.3 Thu May 14 19:32:13 2015 (r282917) +++ head/contrib/elftoolchain/libelftc/elftc_symbol_table_create.3 Thu May 14 19:48:15 2015 (r282918) @@ -21,7 +21,7 @@ .\" out of the use of this software, even if advised of the possibility of .\" such damage. .\" -.\" $Id: elftc_symbol_table_create.3 2825 2012-12-29 14:25:33Z jkoshy $ +.\" $Id: elftc_symbol_table_create.3 3182 2015-04-10 16:08:10Z emaste $ .\" .Dd December 29, 2012 .Os @@ -224,7 +224,7 @@ should point to a location that will be the following values: .Bl -tag -width indent -compact -offset indent .It Dv ELFTC_INSERT_ERROR -An error occured during insertion of the symbol. +An error occurred during insertion of the symbol. .It Dv ELFTC_INSERT_EXISTING The name in argument .Ar symbolname Modified: head/contrib/elftoolchain/libelftc/libelftc_dem_gnu3.c ============================================================================== --- head/contrib/elftoolchain/libelftc/libelftc_dem_gnu3.c Thu May 14 19:32:13 2015 (r282917) +++ head/contrib/elftoolchain/libelftc/libelftc_dem_gnu3.c Thu May 14 19:48:15 2015 (r282918) @@ -36,7 +36,7 @@ #include "_libelftc.h" -ELFTC_VCSID("$Id: libelftc_dem_gnu3.c 3123 2014-12-21 05:46:19Z kaiwang27 $"); +ELFTC_VCSID("$Id: libelftc_dem_gnu3.c 3194 2015-05-05 17:55:16Z emaste $"); /** * @file cpp_demangle.c @@ -316,7 +316,7 @@ cpp_demangle_push_fp(struct cpp_demangle rtn = 0; if ((len = strlen(f)) > 0) - rtn = cpp_demangle_push_str(ddata, f, len); + rtn = cpp_demangle_push_str(ddata, f, len); free(f); Modified: head/contrib/elftoolchain/nm/nm.1 ============================================================================== --- head/contrib/elftoolchain/nm/nm.1 Thu May 14 19:32:13 2015 (r282917) +++ head/contrib/elftoolchain/nm/nm.1 Thu May 14 19:48:15 2015 (r282918) @@ -22,7 +22,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $Id: nm.1 3145 2015-02-15 18:04:37Z emaste $ +.\" $Id: nm.1 3195 2015-05-12 17:22:19Z emaste $ .\" .Dd February 15, 2015 .Os @@ -335,4 +335,4 @@ were specified. The .Nm utility and this manual page were written by -.An Hyogeol Lee Aq hyogeollee@gmail.com . +.An Hyogeol Lee Aq Mt hyogeollee@gmail.com . Modified: head/contrib/elftoolchain/readelf/readelf.1 ============================================================================== --- head/contrib/elftoolchain/readelf/readelf.1 Thu May 14 19:32:13 2015 (r282917) +++ head/contrib/elftoolchain/readelf/readelf.1 Thu May 14 19:48:15 2015 (r282918) @@ -22,7 +22,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $Id: readelf.1 3059 2014-06-02 00:42:32Z kaiwang27 $ +.\" $Id: readelf.1 3195 2015-05-12 17:22:19Z emaste $ .\" .Dd September 13, 2012 .Os @@ -194,4 +194,4 @@ separate lines. The .Nm utility was written by -.An "Kai Wang" Aq kaiwang27@users.sourceforge.net . +.An Kai Wang Aq Mt kaiwang27@users.sourceforge.net . Modified: head/contrib/elftoolchain/readelf/readelf.c ============================================================================== --- head/contrib/elftoolchain/readelf/readelf.c Thu May 14 19:32:13 2015 (r282917) +++ head/contrib/elftoolchain/readelf/readelf.c Thu May 14 19:48:15 2015 (r282918) @@ -46,7 +46,7 @@ #include "_elftc.h" -ELFTC_VCSID("$Id: readelf.c 3178 2015-03-30 18:29:13Z emaste $"); +ELFTC_VCSID("$Id: readelf.c 3189 2015-04-20 17:02:01Z emaste $"); /* * readelf(1) options. @@ -2673,7 +2673,7 @@ dump_phdr(struct readelf *re) { const char *rawfile; GElf_Phdr phdr; - size_t phnum; + size_t phnum, size; int i, j; #define PH_HDR "Type", "Offset", "VirtAddr", "PhysAddr", "FileSiz", \ @@ -2726,10 +2726,14 @@ dump_phdr(struct readelf *re) " 0x%16.16jx 0x%16.16jx %c%c%c" " %#jx\n", PH_CT); if (phdr.p_type == PT_INTERP) { - if ((rawfile = elf_rawfile(re->elf, NULL)) == NULL) { + if ((rawfile = elf_rawfile(re->elf, &size)) == NULL) { warnx("elf_rawfile failed: %s", elf_errmsg(-1)); continue; } + if (phdr.p_offset >= size) { + warnx("invalid program header offset"); + continue; + } printf(" [Requesting program interpreter: %s]\n", rawfile + phdr.p_offset); } @@ -4378,13 +4382,22 @@ dump_mips_options(struct readelf *re, st p = d->d_buf; pe = p + d->d_size; while (p < pe) { + if (pe - p < 8) { + warnx("Truncated MIPS option header"); + return; + } kind = re->dw_decode(&p, 1); size = re->dw_decode(&p, 1); sndx = re->dw_decode(&p, 2); info = re->dw_decode(&p, 4); + if (size < 8 || size - 8 > pe - p) { + warnx("Malformed MIPS option header"); + return; + } + size -= 8; switch (kind) { case ODK_REGINFO: - dump_mips_odk_reginfo(re, p, size - 8); + dump_mips_odk_reginfo(re, p, size); break; case ODK_EXCEPTIONS: printf(" EXCEPTIONS FPU_MIN: %#x\n", @@ -4435,7 +4448,7 @@ dump_mips_options(struct readelf *re, st default: break; } - p += size - 8; + p += size; } } @@ -7458,11 +7471,10 @@ main(int argc, char **argv) errx(EXIT_FAILURE, "ELF library initialization failed: %s", elf_errmsg(-1)); - for (i = 0; i < argc; i++) - if (argv[i] != NULL) { - re->filename = argv[i]; - dump_object(re); - } + for (i = 0; i < argc; i++) { + re->filename = argv[i]; + dump_object(re); + } exit(EXIT_SUCCESS); } Modified: head/contrib/elftoolchain/size/size.1 ============================================================================== --- head/contrib/elftoolchain/size/size.1 Thu May 14 19:32:13 2015 (r282917) +++ head/contrib/elftoolchain/size/size.1 Thu May 14 19:48:15 2015 (r282918) @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $Id: size.1 2043 2011-10-23 14:49:16Z jkoshy $ +.\" $Id: size.1 3195 2015-05-12 17:22:19Z emaste $ .\" .Dd August 25, 2011 .Dt SIZE 1 @@ -252,6 +252,6 @@ utility first appeared in The .Nm utility was re-written by -.An S. Sam Arun Raj Aq samarunraj@gmail.com +.An S. Sam Arun Raj Aq Mt samarunraj@gmail.com This manual page was written by -.An S. Sam Arun Raj Aq samarunraj@gmail.com +.An S. Sam Arun Raj Aq Mt samarunraj@gmail.com Modified: head/contrib/elftoolchain/size/size.c ============================================================================== --- head/contrib/elftoolchain/size/size.c Thu May 14 19:32:13 2015 (r282917) +++ head/contrib/elftoolchain/size/size.c Thu May 14 19:48:15 2015 (r282918) @@ -38,7 +38,7 @@ #include "_elftc.h" -ELFTC_VCSID("$Id: size.c 3174 2015-03-27 17:13:41Z emaste $"); +ELFTC_VCSID("$Id: size.c 3183 2015-04-10 16:18:42Z emaste $"); #define BUF_SIZE 1024 #define ELF_ALIGN(val,x) (((val)+(x)-1) & ~((x)-1)) @@ -604,7 +604,7 @@ handle_elf(char const *name) arhdr->ar_name); continue; } - /* Core dumps are handled seperately */ + /* Core dumps are handled separately */ if (elfhdr.e_shnum == 0 && elfhdr.e_type == ET_CORE) { exit_code = handle_core(name, elf, &elfhdr); (void) elf_end(elf); Modified: head/contrib/elftoolchain/strings/strings.1 ============================================================================== --- head/contrib/elftoolchain/strings/strings.1 Thu May 14 19:32:13 2015 (r282917) +++ head/contrib/elftoolchain/strings/strings.1 Thu May 14 19:48:15 2015 (r282918) @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $Id: strings.1 2352 2011-12-19 11:21:10Z jkoshy $ +.\" $Id: strings.1 3195 2015-05-12 17:22:19Z emaste $ .\" .Dd December 19, 2011 .Dt STRINGS 1 @@ -157,6 +157,6 @@ when i386-only a.out format was dropped The .Nm utility was re-written by -.An S.Sam Arun Raj Aq samarunraj@gmail.com . +.An S.Sam Arun Raj Aq Mt samarunraj@gmail.com . This manual page was written by -.An S.Sam Arun Raj Aq samarunraj@gmail.com . +.An S.Sam Arun Raj Aq Mt samarunraj@gmail.com . Modified: head/lib/libelftc/elftc_version.c ============================================================================== --- head/lib/libelftc/elftc_version.c Thu May 14 19:32:13 2015 (r282917) +++ head/lib/libelftc/elftc_version.c Thu May 14 19:48:15 2015 (r282918) @@ -6,5 +6,5 @@ const char * elftc_version(void) { - return "elftoolchain r3179M"; + return "elftoolchain r3197M"; } From owner-svn-src-all@FreeBSD.ORG Thu May 14 20:17:54 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 261A9685; Thu, 14 May 2015 20:17:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EF1F31D6A; Thu, 14 May 2015 20:17:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4EKHrYB028785; Thu, 14 May 2015 20:17:53 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4EKHrQv028784; Thu, 14 May 2015 20:17:53 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201505142017.t4EKHrQv028784@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 14 May 2015 20:17:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282920 - head/usr.bin/vtfontcvt 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.20 Precedence: list List-Id: "SVN commit messages 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, 14 May 2015 20:17:54 -0000 Author: emaste Date: Thu May 14 20:17:53 2015 New Revision: 282920 URL: https://svnweb.freebsd.org/changeset/base/282920 Log: vtfontcvt: Allow 6 digits in verbose output Some fonts (e.g. GNU Unifont) have more than 100,000 (half-)glyphs. Sponsored by: The FreeBSD Foundation Modified: head/usr.bin/vtfontcvt/vtfontcvt.c Modified: head/usr.bin/vtfontcvt/vtfontcvt.c ============================================================================== --- head/usr.bin/vtfontcvt/vtfontcvt.c Thu May 14 19:48:57 2015 (r282919) +++ head/usr.bin/vtfontcvt/vtfontcvt.c Thu May 14 20:17:53 2015 (r282920) @@ -473,24 +473,24 @@ print_font_info(void) { printf( "Statistics:\n" -"- glyph_total: %5u\n" -"- glyph_normal: %5u\n" -"- glyph_normal_right: %5u\n" -"- glyph_bold: %5u\n" -"- glyph_bold_right: %5u\n" -"- glyph_unique: %5u\n" -"- glyph_dupe: %5u\n" -"- mapping_total: %5u\n" -"- mapping_normal: %5u\n" -"- mapping_normal_folded: %5u\n" -"- mapping_normal_right: %5u\n" -"- mapping_normal_right_folded: %5u\n" -"- mapping_bold: %5u\n" -"- mapping_bold_folded: %5u\n" -"- mapping_bold_right: %5u\n" -"- mapping_bold_right_folded: %5u\n" -"- mapping_unique: %5u\n" -"- mapping_dupe: %5u\n", +"- glyph_total: %6u\n" +"- glyph_normal: %6u\n" +"- glyph_normal_right: %6u\n" +"- glyph_bold: %6u\n" +"- glyph_bold_right: %6u\n" +"- glyph_unique: %6u\n" +"- glyph_dupe: %6u\n" +"- mapping_total: %6u\n" +"- mapping_normal: %6u\n" +"- mapping_normal_folded: %6u\n" +"- mapping_normal_right: %6u\n" +"- mapping_normal_right_folded: %6u\n" +"- mapping_bold: %6u\n" +"- mapping_bold_folded: %6u\n" +"- mapping_bold_right: %6u\n" +"- mapping_bold_right_folded: %6u\n" +"- mapping_unique: %6u\n" +"- mapping_dupe: %6u\n", glyph_total, glyph_count[0], glyph_count[1], From owner-svn-src-all@FreeBSD.ORG Thu May 14 20:18:44 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6E805877; Thu, 14 May 2015 20:18:44 +0000 (UTC) Received: from duke.cs.duke.edu (duke.cs.duke.edu [152.3.140.1]) (using TLSv1.1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3C6581D7F; Thu, 14 May 2015 20:18:44 +0000 (UTC) Received: from viserion.mtv.corp.google.com (unknown [216.239.45.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: gallatin) by duke.cs.duke.edu (Postfix) with ESMTPSA id BD1CAF80564; Thu, 14 May 2015 16:12:39 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=cs.duke.edu; s=mail; t=1431634360; bh=9QMJJGROJCWUs1R1rlyIbbZuIT5lc93xSKI/+qp07mE=; h=Date:From:To:Subject; b=T5EcDWiMmg/OG1bAn2HF9ZG8amiQ0JBADFI9sGPVRX8tnSQwbAlGI9Q9SozVpwHyS 4zIiMzip7ozb3OZDAO6UrbnP3qnoTFcukywcW5eXQNCK/t5O0zd3rYc7nWJPp+4+wF tbD1rl9QSckg3knlf85xRNzueRCRC5cQ4J9h7u4ONVANq7yyrsy/TBXoXDfBrLR8AJ VZzjgxZLen8cJdoTyzWlF0mwis3KwDVgOOf5QT5NURx9XlQr4s7lQfJlpvZdKffafj NQ26mjfuECLpfY/pQL5aqNtO9GqCq3r38ZTOQxOEBhrQtMeFnWihe0NZHEBpQiFZAl 6FW+q2/g1+7WQ== Message-ID: <555501B6.5080106@cs.duke.edu> Date: Thu, 14 May 2015 13:12:38 -0700 From: Andrew Gallatin User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Hans Petter Selasky , Robert Watson , Mateusz Guzik CC: Gleb Smirnoff , Ian Lepore , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r280971 - in head: contrib/ipfilter/tools share/man/man4 sys/contrib/ipfilter/netinet sys/netinet sys/netipsec sys/netpfil/pf References: <201504012226.t31MQedN044443@svn.freebsd.org> <1427929676.82583.103.camel@freebsd.org> <20150402123522.GC64665@FreeBSD.org> <20150402133751.GA549@dft-labs.eu> <20150402134217.GG64665@FreeBSD.org> <20150402135157.GB549@dft-labs.eu> <1427983109.82583.115.camel@freebsd.org> <20150402142318.GC549@dft-labs.eu> <20150402143420.GI64665@FreeBSD.org> <20150402153805.GD549@dft-labs.eu> <551D8143.4060509@selasky.org> <551D8945.8050906@selasky.org> In-Reply-To: <551D8945.8050906@selasky.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 14 May 2015 20:18:44 -0000 On 04/02/2015 11:24 AM, Hans Petter Selasky wrote: > If we are transmitting using TSO, will the network adapter increment the > IP ID field somehow? What happens if an outgoing IP packet resulting Sorry for the delayed reply; I was just catching up on FreeBSD email, and I'm not sure that the above question was ever answered. The NIC is *required* to increment the IP ID by the Microsoft NDIS LSO spec. As I recall, this is checked for by WHQL tests. So any NIC whose vendor ships Windows drivers & supports TSO should be incrementing the IP ID. Even vendors who do not ship Windows drivers often refer to these NDIS specs, since they are the best documentation of many stateless offloads. Also note that NICs which support the "newer" LSOv2 spec only use the lower 15 bits of the IP ID space. See: "Offloading the Segmentation of Large TCP Packets" at https://msdn.microsoft.com/en-us/library/windows/hardware/ff568840(v=vs.85).aspx Best regards, Drew From owner-svn-src-all@FreeBSD.ORG Thu May 14 20:19:23 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 695E39C4; Thu, 14 May 2015 20:19:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 57CDF1D88; Thu, 14 May 2015 20:19:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4EKJNnG029031; Thu, 14 May 2015 20:19:23 GMT (envelope-from jimharris@FreeBSD.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4EKJMEj029029; Thu, 14 May 2015 20:19:22 GMT (envelope-from jimharris@FreeBSD.org) Message-Id: <201505142019.t4EKJMEj029029@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jimharris set sender to jimharris@FreeBSD.org using -f From: Jim Harris Date: Thu, 14 May 2015 20:19:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282921 - in head/sys: amd64/conf i386/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.20 Precedence: list List-Id: "SVN commit messages 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, 14 May 2015 20:19:23 -0000 Author: jimharris Date: Thu May 14 20:19:22 2015 New Revision: 282921 URL: https://svnweb.freebsd.org/changeset/base/282921 Log: Add nvme and nvd drivers to GENERIC for amd64 and i386. MFC after: 3 days Sponsored by: Intel Modified: head/sys/amd64/conf/GENERIC head/sys/i386/conf/GENERIC Modified: head/sys/amd64/conf/GENERIC ============================================================================== --- head/sys/amd64/conf/GENERIC Thu May 14 20:17:53 2015 (r282920) +++ head/sys/amd64/conf/GENERIC Thu May 14 20:19:22 2015 (r282921) @@ -173,6 +173,10 @@ device mrsas # LSI/Avago MegaRAID SAS #device pst # Promise Supertrak SX6000 device twe # 3ware ATA RAID +# NVM Express (NVMe) support +device nvme # base NVMe driver +device nvd # expose NVMe namespaces as disks, depends on nvme + # atkbdc0 controls both the keyboard and the PS/2 mouse device atkbdc # AT keyboard controller device atkbd # AT keyboard Modified: head/sys/i386/conf/GENERIC ============================================================================== --- head/sys/i386/conf/GENERIC Thu May 14 20:17:53 2015 (r282920) +++ head/sys/i386/conf/GENERIC Thu May 14 20:19:22 2015 (r282921) @@ -177,6 +177,10 @@ device mrsas # LSI/Avago MegaRAID SAS device pst # Promise Supertrak SX6000 device twe # 3ware ATA RAID +# NVM Express (NVMe) support +device nvme # base NVMe driver +device nvd # expose NVMe namespace as disks, depends on nvme + # atkbdc0 controls both the keyboard and the PS/2 mouse device atkbdc # AT keyboard controller device atkbd # AT keyboard From owner-svn-src-all@FreeBSD.ORG Thu May 14 21:08:49 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2320953F; Thu, 14 May 2015 21:08:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 122E21329; Thu, 14 May 2015 21:08:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4EL8mOZ053585; Thu, 14 May 2015 21:08:48 GMT (envelope-from grehan@FreeBSD.org) Received: (from grehan@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4EL8mYx053584; Thu, 14 May 2015 21:08:48 GMT (envelope-from grehan@FreeBSD.org) Message-Id: <201505142108.t4EL8mYx053584@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: grehan set sender to grehan@FreeBSD.org using -f From: Peter Grehan Date: Thu, 14 May 2015 21:08:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282922 - head/usr.sbin/bhyve 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.20 Precedence: list List-Id: "SVN commit messages 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, 14 May 2015 21:08:49 -0000 Author: grehan Date: Thu May 14 21:08:48 2015 New Revision: 282922 URL: https://svnweb.freebsd.org/changeset/base/282922 Log: Bump the size of the blockif scatter-gather list to 67. The Windows virtio driver ignores the advertized seg_max field and assumes the host can accept up to 67 segments in indirect descriptors, triggering an assert in the bhyve process. No objection from: mav Reviewed by: neel Reported and tested by: Leon Dang (ldang@nahannisys.com) MFC after: 2 weeks Modified: head/usr.sbin/bhyve/block_if.h Modified: head/usr.sbin/bhyve/block_if.h ============================================================================== --- head/usr.sbin/bhyve/block_if.h Thu May 14 20:19:22 2015 (r282921) +++ head/usr.sbin/bhyve/block_if.h Thu May 14 21:08:48 2015 (r282922) @@ -39,7 +39,7 @@ #include #include -#define BLOCKIF_IOV_MAX 33 /* not practical to be IOV_MAX */ +#define BLOCKIF_IOV_MAX 67 /* not practical to be IOV_MAX */ struct blockif_req { struct iovec br_iov[BLOCKIF_IOV_MAX]; From owner-svn-src-all@FreeBSD.ORG Thu May 14 21:27:32 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 69F9DC82; Thu, 14 May 2015 21:27:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 57CDE15FE; Thu, 14 May 2015 21:27:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4ELRWnN063431; Thu, 14 May 2015 21:27:32 GMT (envelope-from jimharris@FreeBSD.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4ELRWIb063430; Thu, 14 May 2015 21:27:32 GMT (envelope-from jimharris@FreeBSD.org) Message-Id: <201505142127.t4ELRWIb063430@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jimharris set sender to jimharris@FreeBSD.org using -f From: Jim Harris Date: Thu, 14 May 2015 21:27: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: r282923 - stable/10/sys/dev/nvme 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.20 Precedence: list List-Id: "SVN commit messages 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, 14 May 2015 21:27:32 -0000 Author: jimharris Date: Thu May 14 21:27:31 2015 New Revision: 282923 URL: https://svnweb.freebsd.org/changeset/base/282923 Log: MFC r281280: nvme: fall back to a smaller MSI-X vector allocation if necessary Previously, if per-CPU MSI-X vectors could not be allocated, nvme(4) would fall back to INTx with a single I/O queue pair. This change will still fall back to a single I/O queue pair, but allocate MSI-X vectors instead of reverting to INTx. Sponsored by: Intel Modified: stable/10/sys/dev/nvme/nvme_ctrlr.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/nvme/nvme_ctrlr.c ============================================================================== --- stable/10/sys/dev/nvme/nvme_ctrlr.c Thu May 14 21:08:48 2015 (r282922) +++ stable/10/sys/dev/nvme/nvme_ctrlr.c Thu May 14 21:27:31 2015 (r282923) @@ -1144,9 +1144,17 @@ nvme_ctrlr_construct(struct nvme_control /* One vector per IO queue, plus one vector for admin queue. */ num_vectors = ctrlr->num_io_queues + 1; - if (pci_msix_count(dev) < num_vectors) { + /* + * If we cannot even allocate 2 vectors (one for admin, one for + * I/O), then revert to INTx. + */ + if (pci_msix_count(dev) < 2) { ctrlr->msix_enabled = 0; goto intx; + } else if (pci_msix_count(dev) < num_vectors) { + ctrlr->per_cpu_io_queues = FALSE; + ctrlr->num_io_queues = 1; + num_vectors = 2; /* one for admin, one for I/O */ } if (pci_alloc_msix(dev, &num_vectors) != 0) { From owner-svn-src-all@FreeBSD.ORG Thu May 14 21:28:47 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5C700EC5; Thu, 14 May 2015 21:28:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3DE141615; Thu, 14 May 2015 21:28:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4ELSllp063845; Thu, 14 May 2015 21:28:47 GMT (envelope-from jimharris@FreeBSD.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4ELSkkA063843; Thu, 14 May 2015 21:28:46 GMT (envelope-from jimharris@FreeBSD.org) Message-Id: <201505142128.t4ELSkkA063843@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jimharris set sender to jimharris@FreeBSD.org using -f From: Jim Harris Date: Thu, 14 May 2015 21:28: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: r282924 - stable/10/sys/dev/nvme 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.20 Precedence: list List-Id: "SVN commit messages 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, 14 May 2015 21:28:47 -0000 Author: jimharris Date: Thu May 14 21:28:46 2015 New Revision: 282924 URL: https://svnweb.freebsd.org/changeset/base/282924 Log: MFC r281281, r281285: nvme: create separate DMA tag for non-payload DMA buffers Submission and completion queue memory need to use a separate DMA tag for mappings than payload buffers, to ensure mappings remain contiguous even with DMAR enabled. Sponsored by: Intel Modified: stable/10/sys/dev/nvme/nvme_private.h stable/10/sys/dev/nvme/nvme_qpair.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/nvme/nvme_private.h ============================================================================== --- stable/10/sys/dev/nvme/nvme_private.h Thu May 14 21:27:31 2015 (r282923) +++ stable/10/sys/dev/nvme/nvme_private.h Thu May 14 21:28:46 2015 (r282924) @@ -211,6 +211,7 @@ struct nvme_qpair { struct nvme_completion *cpl; bus_dma_tag_t dma_tag; + bus_dma_tag_t dma_tag_payload; bus_dmamap_t cmd_dma_map; uint64_t cmd_bus_addr; @@ -491,6 +492,8 @@ nvme_single_map(void *arg, bus_dma_segme { uint64_t *bus_addr = (uint64_t *)arg; + if (error != 0) + printf("nvme_single_map err %d\n", error); *bus_addr = seg[0].ds_addr; } Modified: stable/10/sys/dev/nvme/nvme_qpair.c ============================================================================== --- stable/10/sys/dev/nvme/nvme_qpair.c Thu May 14 21:27:31 2015 (r282923) +++ stable/10/sys/dev/nvme/nvme_qpair.c Thu May 14 21:28:46 2015 (r282924) @@ -294,7 +294,7 @@ nvme_qpair_construct_tracker(struct nvme uint16_t cid) { - bus_dmamap_create(qpair->dma_tag, 0, &tr->payload_dma_map); + bus_dmamap_create(qpair->dma_tag_payload, 0, &tr->payload_dma_map); bus_dmamap_create(qpair->dma_tag, 0, &tr->prp_dma_map); bus_dmamap_load(qpair->dma_tag, tr->prp_dma_map, tr->prp, @@ -337,7 +337,7 @@ nvme_qpair_complete_tracker(struct nvme_ nvme_qpair_submit_tracker(qpair, tr); } else { if (req->type != NVME_REQUEST_NULL) - bus_dmamap_unload(qpair->dma_tag, + bus_dmamap_unload(qpair->dma_tag_payload, tr->payload_dma_map); nvme_free_request(req); @@ -464,6 +464,7 @@ nvme_qpair_construct(struct nvme_qpair * { struct nvme_tracker *tr; uint32_t i; + int err; qpair->id = id; qpair->vector = vector; @@ -497,11 +498,20 @@ nvme_qpair_construct(struct nvme_qpair * mtx_init(&qpair->lock, "nvme qpair lock", NULL, MTX_DEF); /* Note: NVMe PRP format is restricted to 4-byte alignment. */ - bus_dma_tag_create(bus_get_dma_tag(ctrlr->dev), + err = bus_dma_tag_create(bus_get_dma_tag(ctrlr->dev), 4, PAGE_SIZE, BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, NULL, NULL, NVME_MAX_XFER_SIZE, (NVME_MAX_XFER_SIZE/PAGE_SIZE)+1, PAGE_SIZE, 0, + NULL, NULL, &qpair->dma_tag_payload); + if (err != 0) + nvme_printf(ctrlr, "payload tag create failed %d\n", err); + + err = bus_dma_tag_create(bus_get_dma_tag(ctrlr->dev), + 4, 0, BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, NULL, NULL, + BUS_SPACE_MAXSIZE, 1, BUS_SPACE_MAXSIZE, 0, NULL, NULL, &qpair->dma_tag); + if (err != 0) + nvme_printf(ctrlr, "tag create failed %d\n", err); qpair->num_cmds = 0; qpair->num_intr_handler_calls = 0; @@ -513,8 +523,13 @@ nvme_qpair_construct(struct nvme_qpair * sizeof(struct nvme_completion), M_NVME, M_ZERO, 0, BUS_SPACE_MAXADDR, PAGE_SIZE, 0); - bus_dmamap_create(qpair->dma_tag, 0, &qpair->cmd_dma_map); - bus_dmamap_create(qpair->dma_tag, 0, &qpair->cpl_dma_map); + err = bus_dmamap_create(qpair->dma_tag, 0, &qpair->cmd_dma_map); + if (err != 0) + nvme_printf(ctrlr, "cmd_dma_map create failed %d\n", err); + + err = bus_dmamap_create(qpair->dma_tag, 0, &qpair->cpl_dma_map); + if (err != 0) + nvme_printf(ctrlr, "cpl_dma_map create failed %d\n", err); bus_dmamap_load(qpair->dma_tag, qpair->cmd_dma_map, qpair->cmd, qpair->num_entries * sizeof(struct nvme_command), @@ -570,6 +585,9 @@ nvme_qpair_destroy(struct nvme_qpair *qp if (qpair->dma_tag) bus_dma_tag_destroy(qpair->dma_tag); + if (qpair->dma_tag_payload) + bus_dma_tag_destroy(qpair->dma_tag_payload); + if (qpair->act_tr) free(qpair->act_tr, M_NVME); @@ -707,8 +725,11 @@ nvme_payload_map(void *arg, bus_dma_segm * is responsible for detecting the error status and failing the * tracker manually. */ - if (error != 0) + if (error != 0) { + nvme_printf(tr->qpair->ctrlr, + "nvme_payload_map err %d\n", error); return; + } /* * Note that we specified PAGE_SIZE for alignment and max @@ -728,6 +749,13 @@ nvme_payload_map(void *arg, bus_dma_segm (uint64_t)seg[cur_nseg].ds_addr; cur_nseg++; } + } else { + /* + * prp2 should not be used by the controller + * since there is only one segment, but set + * to 0 just to be safe. + */ + tr->req->cmd.prp2 = 0; } nvme_qpair_submit_tracker(tr->qpair, tr); @@ -780,8 +808,9 @@ _nvme_qpair_submit_request(struct nvme_q KASSERT(req->payload_size <= qpair->ctrlr->max_xfer_size, ("payload_size (%d) exceeds max_xfer_size (%d)\n", req->payload_size, qpair->ctrlr->max_xfer_size)); - err = bus_dmamap_load(tr->qpair->dma_tag, tr->payload_dma_map, - req->u.payload, req->payload_size, nvme_payload_map, tr, 0); + err = bus_dmamap_load(tr->qpair->dma_tag_payload, + tr->payload_dma_map, req->u.payload, req->payload_size, + nvme_payload_map, tr, 0); if (err != 0) nvme_printf(qpair->ctrlr, "bus_dmamap_load returned 0x%x!\n", err); @@ -795,7 +824,7 @@ _nvme_qpair_submit_request(struct nvme_q ("bio->bio_bcount (%jd) exceeds max_xfer_size (%d)\n", (intmax_t)req->u.bio->bio_bcount, qpair->ctrlr->max_xfer_size)); - err = bus_dmamap_load_bio(tr->qpair->dma_tag, + err = bus_dmamap_load_bio(tr->qpair->dma_tag_payload, tr->payload_dma_map, req->u.bio, nvme_payload_map, tr, 0); if (err != 0) nvme_printf(qpair->ctrlr, From owner-svn-src-all@FreeBSD.ORG Thu May 14 21:29:42 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D5A6280; Thu, 14 May 2015 21:29:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A9E50161E; Thu, 14 May 2015 21:29:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4ELTg0Q064026; Thu, 14 May 2015 21:29:42 GMT (envelope-from jimharris@FreeBSD.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4ELTgsf064025; Thu, 14 May 2015 21:29:42 GMT (envelope-from jimharris@FreeBSD.org) Message-Id: <201505142129.t4ELTgsf064025@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jimharris set sender to jimharris@FreeBSD.org using -f From: Jim Harris Date: Thu, 14 May 2015 21:29: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: r282925 - stable/10/sys/dev/nvme 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.20 Precedence: list List-Id: "SVN commit messages 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, 14 May 2015 21:29:43 -0000 Author: jimharris Date: Thu May 14 21:29:42 2015 New Revision: 282925 URL: https://svnweb.freebsd.org/changeset/base/282925 Log: MFC r281282: nvme: add device strings for Intel DC series NVMe SSDs Sponsored by: Intel Modified: stable/10/sys/dev/nvme/nvme.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/nvme/nvme.c ============================================================================== --- stable/10/sys/dev/nvme/nvme.c Thu May 14 21:28:46 2015 (r282924) +++ stable/10/sys/dev/nvme/nvme.c Thu May 14 21:29:42 2015 (r282925) @@ -81,27 +81,55 @@ MODULE_VERSION(nvme, 1); static struct _pcsid { - u_int32_t type; - const char *desc; + uint32_t devid; + int match_subdevice; + uint16_t subdevice; + const char *desc; } pci_ids[] = { - { 0x01118086, "NVMe Controller" }, - { CHATHAM_PCI_ID, "Chatham Prototype NVMe Controller" }, - { IDT32_PCI_ID, "IDT NVMe Controller (32 channel)" }, - { IDT8_PCI_ID, "IDT NVMe Controller (8 channel)" }, - { 0x00000000, NULL } + { 0x01118086, 0, 0, "NVMe Controller" }, + { CHATHAM_PCI_ID, 0, 0, "Chatham Prototype NVMe Controller" }, + { IDT32_PCI_ID, 0, 0, "IDT NVMe Controller (32 channel)" }, + { IDT8_PCI_ID, 0, 0, "IDT NVMe Controller (8 channel)" }, + { 0x09538086, 1, 0x3702, "DC P3700 SSD" }, + { 0x09538086, 1, 0x3703, "DC P3700 SSD [2.5\" SFF]" }, + { 0x09538086, 1, 0x3704, "DC P3500 SSD [Add-in Card]" }, + { 0x09538086, 1, 0x3705, "DC P3500 SSD [2.5\" SFF]" }, + { 0x09538086, 1, 0x3709, "DC P3600 SSD [Add-in Card]" }, + { 0x09538086, 1, 0x370a, "DC P3600 SSD [2.5\" SFF]" }, + { 0x00000000, 0, 0, NULL } }; static int +nvme_match(uint32_t devid, uint16_t subdevice, struct _pcsid *ep) +{ + if (devid != ep->devid) + return 0; + + if (!ep->match_subdevice) + return 1; + + if (subdevice == ep->subdevice) + return 1; + else + return 0; +} + +static int nvme_probe (device_t device) { struct _pcsid *ep; - u_int32_t type; + uint32_t devid; + uint16_t subdevice; - type = pci_get_devid(device); + devid = pci_get_devid(device); + subdevice = pci_get_subdevice(device); ep = pci_ids; - while (ep->type && ep->type != type) + while (ep->devid) { + if (nvme_match(devid, subdevice, ep)) + break; ++ep; + } if (ep->desc) { device_set_desc(device, ep->desc); From owner-svn-src-all@FreeBSD.ORG Thu May 14 21:30:38 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 43E671DB; Thu, 14 May 2015 21:30:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 30F48162B; Thu, 14 May 2015 21:30:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4ELUctR065294; Thu, 14 May 2015 21:30:38 GMT (envelope-from jimharris@FreeBSD.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4ELUaYU065286; Thu, 14 May 2015 21:30:36 GMT (envelope-from jimharris@FreeBSD.org) Message-Id: <201505142130.t4ELUaYU065286@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jimharris set sender to jimharris@FreeBSD.org using -f From: Jim Harris Date: Thu, 14 May 2015 21:30:36 +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: r282926 - stable/10/sys/dev/nvme 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.20 Precedence: list List-Id: "SVN commit messages 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, 14 May 2015 21:30:38 -0000 Author: jimharris Date: Thu May 14 21:30:36 2015 New Revision: 282926 URL: https://svnweb.freebsd.org/changeset/base/282926 Log: MFC r281283: nvme: remove CHATHAM related code Chatham was an internal NVMe prototype board used for early driver development. Sponsored by: Intel Modified: stable/10/sys/dev/nvme/nvme.c stable/10/sys/dev/nvme/nvme_ctrlr.c stable/10/sys/dev/nvme/nvme_ns.c stable/10/sys/dev/nvme/nvme_private.h stable/10/sys/dev/nvme/nvme_qpair.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/nvme/nvme.c ============================================================================== --- stable/10/sys/dev/nvme/nvme.c Thu May 14 21:29:42 2015 (r282925) +++ stable/10/sys/dev/nvme/nvme.c Thu May 14 21:30:36 2015 (r282926) @@ -87,7 +87,6 @@ static struct _pcsid const char *desc; } pci_ids[] = { { 0x01118086, 0, 0, "NVMe Controller" }, - { CHATHAM_PCI_ID, 0, 0, "Chatham Prototype NVMe Controller" }, { IDT32_PCI_ID, 0, 0, "IDT NVMe Controller (32 channel)" }, { IDT8_PCI_ID, 0, 0, "IDT NVMe Controller (8 channel)" }, { 0x09538086, 1, 0x3702, "DC P3700 SSD" }, Modified: stable/10/sys/dev/nvme/nvme_ctrlr.c ============================================================================== --- stable/10/sys/dev/nvme/nvme_ctrlr.c Thu May 14 21:29:42 2015 (r282925) +++ stable/10/sys/dev/nvme/nvme_ctrlr.c Thu May 14 21:30:36 2015 (r282926) @@ -49,11 +49,7 @@ static int nvme_ctrlr_allocate_bar(struct nvme_controller *ctrlr) { - /* Chatham puts the NVMe MMRs behind BAR 2/3, not BAR 0/1. */ - if (pci_get_devid(ctrlr->dev) == CHATHAM_PCI_ID) - ctrlr->resource_id = PCIR_BAR(2); - else - ctrlr->resource_id = PCIR_BAR(0); + ctrlr->resource_id = PCIR_BAR(0); ctrlr->resource = bus_alloc_resource(ctrlr->dev, SYS_RES_MEMORY, &ctrlr->resource_id, 0, ~0, 1, RF_ACTIVE); @@ -81,117 +77,6 @@ nvme_ctrlr_allocate_bar(struct nvme_cont return (0); } -#ifdef CHATHAM2 -static int -nvme_ctrlr_allocate_chatham_bar(struct nvme_controller *ctrlr) -{ - - ctrlr->chatham_resource_id = PCIR_BAR(CHATHAM_CONTROL_BAR); - ctrlr->chatham_resource = bus_alloc_resource(ctrlr->dev, - SYS_RES_MEMORY, &ctrlr->chatham_resource_id, 0, ~0, 1, - RF_ACTIVE); - - if(ctrlr->chatham_resource == NULL) { - nvme_printf(ctrlr, "unable to alloc pci resource\n"); - return (ENOMEM); - } - - ctrlr->chatham_bus_tag = rman_get_bustag(ctrlr->chatham_resource); - ctrlr->chatham_bus_handle = - rman_get_bushandle(ctrlr->chatham_resource); - - return (0); -} - -static void -nvme_ctrlr_setup_chatham(struct nvme_controller *ctrlr) -{ - uint64_t reg1, reg2, reg3; - uint64_t temp1, temp2; - uint32_t temp3; - uint32_t use_flash_timings = 0; - - DELAY(10000); - - temp3 = chatham_read_4(ctrlr, 0x8080); - - device_printf(ctrlr->dev, "Chatham version: 0x%x\n", temp3); - - ctrlr->chatham_lbas = chatham_read_4(ctrlr, 0x8068) - 0x110; - ctrlr->chatham_size = ctrlr->chatham_lbas * 512; - - device_printf(ctrlr->dev, "Chatham size: %jd\n", - (intmax_t)ctrlr->chatham_size); - - reg1 = reg2 = reg3 = ctrlr->chatham_size - 1; - - TUNABLE_INT_FETCH("hw.nvme.use_flash_timings", &use_flash_timings); - if (use_flash_timings) { - device_printf(ctrlr->dev, "Chatham: using flash timings\n"); - temp1 = 0x00001b58000007d0LL; - temp2 = 0x000000cb00000131LL; - } else { - device_printf(ctrlr->dev, "Chatham: using DDR timings\n"); - temp1 = temp2 = 0x0LL; - } - - chatham_write_8(ctrlr, 0x8000, reg1); - chatham_write_8(ctrlr, 0x8008, reg2); - chatham_write_8(ctrlr, 0x8010, reg3); - - chatham_write_8(ctrlr, 0x8020, temp1); - temp3 = chatham_read_4(ctrlr, 0x8020); - - chatham_write_8(ctrlr, 0x8028, temp2); - temp3 = chatham_read_4(ctrlr, 0x8028); - - chatham_write_8(ctrlr, 0x8030, temp1); - chatham_write_8(ctrlr, 0x8038, temp2); - chatham_write_8(ctrlr, 0x8040, temp1); - chatham_write_8(ctrlr, 0x8048, temp2); - chatham_write_8(ctrlr, 0x8050, temp1); - chatham_write_8(ctrlr, 0x8058, temp2); - - DELAY(10000); -} - -static void -nvme_chatham_populate_cdata(struct nvme_controller *ctrlr) -{ - struct nvme_controller_data *cdata; - - cdata = &ctrlr->cdata; - - cdata->vid = 0x8086; - cdata->ssvid = 0x2011; - - /* - * Chatham2 puts garbage data in these fields when we - * invoke IDENTIFY_CONTROLLER, so we need to re-zero - * the fields before calling bcopy(). - */ - memset(cdata->sn, 0, sizeof(cdata->sn)); - memcpy(cdata->sn, "2012", strlen("2012")); - memset(cdata->mn, 0, sizeof(cdata->mn)); - memcpy(cdata->mn, "CHATHAM2", strlen("CHATHAM2")); - memset(cdata->fr, 0, sizeof(cdata->fr)); - memcpy(cdata->fr, "0", strlen("0")); - cdata->rab = 8; - cdata->aerl = 3; - cdata->lpa.ns_smart = 1; - cdata->sqes.min = 6; - cdata->sqes.max = 6; - cdata->cqes.min = 4; - cdata->cqes.max = 4; - cdata->nn = 1; - - /* Chatham2 doesn't support DSM command */ - cdata->oncs.dsm = 0; - - cdata->vwc.present = 1; -} -#endif /* CHATHAM2 */ - static void nvme_ctrlr_construct_admin_qpair(struct nvme_controller *ctrlr) { @@ -461,11 +346,6 @@ nvme_ctrlr_identify(struct nvme_controll return (ENXIO); } -#ifdef CHATHAM2 - if (pci_get_devid(ctrlr->dev) == CHATHAM_PCI_ID) - nvme_chatham_populate_cdata(ctrlr); -#endif - /* * Use MDTS to ensure our default max_xfer_size doesn't exceed what the * controller supports. @@ -779,10 +659,6 @@ nvme_ctrlr_configure_aer(struct nvme_con /* aerl is a zero-based value, so we need to add 1 here. */ ctrlr->num_aers = min(NVME_MAX_ASYNC_EVENTS, (ctrlr->cdata.aerl+1)); - /* Chatham doesn't support AERs. */ - if (pci_get_devid(ctrlr->dev) == CHATHAM_PCI_ID) - ctrlr->num_aers = 0; - for (i = 0; i < ctrlr->num_aers; i++) { aer = &ctrlr->aer[i]; nvme_ctrlr_construct_and_submit_aer(ctrlr, aer); @@ -1034,27 +910,6 @@ nvme_ctrlr_ioctl(struct cdev *cdev, u_lo break; case NVME_PASSTHROUGH_CMD: pt = (struct nvme_pt_command *)arg; -#ifdef CHATHAM2 - /* - * Chatham IDENTIFY data is spoofed, so copy the spoofed data - * rather than issuing the command to the Chatham controller. - */ - if (pci_get_devid(ctrlr->dev) == CHATHAM_PCI_ID && - pt->cmd.opc == NVME_OPC_IDENTIFY) { - if (pt->cmd.cdw10 == 1) { - if (pt->len != sizeof(ctrlr->cdata)) - return (EINVAL); - return (copyout(&ctrlr->cdata, pt->buf, - pt->len)); - } else { - if (pt->len != sizeof(ctrlr->ns[0].data) || - pt->cmd.nsid != 1) - return (EINVAL); - return (copyout(&ctrlr->ns[0].data, pt->buf, - pt->len)); - } - } -#endif return (nvme_ctrlr_passthrough_cmd(ctrlr, pt, pt->cmd.nsid, 1 /* is_user_buffer */, 1 /* is_admin_cmd */)); default: @@ -1087,15 +942,6 @@ nvme_ctrlr_construct(struct nvme_control if (status != 0) return (status); -#ifdef CHATHAM2 - if (pci_get_devid(dev) == CHATHAM_PCI_ID) { - status = nvme_ctrlr_allocate_chatham_bar(ctrlr); - if (status != 0) - return (status); - nvme_ctrlr_setup_chatham(ctrlr); - } -#endif - /* * Software emulators may set the doorbell stride to something * other than zero, but this driver is not set up to handle that. @@ -1244,14 +1090,8 @@ nvme_ctrlr_destruct(struct nvme_controll * during shutdown). This ensures the controller receives a * shutdown notification in case the system is shutdown before * reloading the driver. - * - * Chatham does not let you re-enable the controller after shutdown - * notification has been received, so do not send it in this case. - * This is OK because Chatham does not depend on the shutdown - * notification anyways. */ - if (pci_get_devid(ctrlr->dev) != CHATHAM_PCI_ID) - nvme_ctrlr_shutdown(ctrlr); + nvme_ctrlr_shutdown(ctrlr); nvme_ctrlr_disable(ctrlr); taskqueue_free(ctrlr->taskqueue); @@ -1280,13 +1120,6 @@ nvme_ctrlr_destruct(struct nvme_controll ctrlr->bar4_resource_id, ctrlr->bar4_resource); } -#ifdef CHATHAM2 - if (ctrlr->chatham_resource != NULL) { - bus_release_resource(dev, SYS_RES_MEMORY, - ctrlr->chatham_resource_id, ctrlr->chatham_resource); - } -#endif - if (ctrlr->tag) bus_teardown_intr(ctrlr->dev, ctrlr->res, ctrlr->tag); Modified: stable/10/sys/dev/nvme/nvme_ns.c ============================================================================== --- stable/10/sys/dev/nvme/nvme_ns.c Thu May 14 21:29:42 2015 (r282925) +++ stable/10/sys/dev/nvme/nvme_ns.c Thu May 14 21:30:36 2015 (r282926) @@ -465,28 +465,6 @@ nvme_ns_bio_process(struct nvme_namespac return (err); } -#ifdef CHATHAM2 -static void -nvme_ns_populate_chatham_data(struct nvme_namespace *ns) -{ - struct nvme_controller *ctrlr; - struct nvme_namespace_data *nsdata; - - ctrlr = ns->ctrlr; - nsdata = &ns->data; - - nsdata->nsze = ctrlr->chatham_lbas; - nsdata->ncap = ctrlr->chatham_lbas; - nsdata->nuse = ctrlr->chatham_lbas; - - /* Chatham2 doesn't support thin provisioning. */ - nsdata->nsfeat.thin_prov = 0; - - /* Set LBA size to 512 bytes. */ - nsdata->lbaf[0].lbads = 9; -} -#endif /* CHATHAM2 */ - int nvme_ns_construct(struct nvme_namespace *ns, uint16_t id, struct nvme_controller *ctrlr) @@ -513,23 +491,15 @@ nvme_ns_construct(struct nvme_namespace if (!mtx_initialized(&ns->lock)) mtx_init(&ns->lock, "nvme ns lock", NULL, MTX_DEF); -#ifdef CHATHAM2 - if (pci_get_devid(ctrlr->dev) == CHATHAM_PCI_ID) - nvme_ns_populate_chatham_data(ns); - else { -#endif - status.done = FALSE; - nvme_ctrlr_cmd_identify_namespace(ctrlr, id, &ns->data, - nvme_completion_poll_cb, &status); - while (status.done == FALSE) - DELAY(5); - if (nvme_completion_is_error(&status.cpl)) { - nvme_printf(ctrlr, "nvme_identify_namespace failed\n"); - return (ENXIO); - } -#ifdef CHATHAM2 + status.done = FALSE; + nvme_ctrlr_cmd_identify_namespace(ctrlr, id, &ns->data, + nvme_completion_poll_cb, &status); + while (status.done == FALSE) + DELAY(5); + if (nvme_completion_is_error(&status.cpl)) { + nvme_printf(ctrlr, "nvme_identify_namespace failed\n"); + return (ENXIO); } -#endif /* * Note: format is a 0-based value, so > is appropriate here, Modified: stable/10/sys/dev/nvme/nvme_private.h ============================================================================== --- stable/10/sys/dev/nvme/nvme_private.h Thu May 14 21:29:42 2015 (r282925) +++ stable/10/sys/dev/nvme/nvme_private.h Thu May 14 21:30:36 2015 (r282926) @@ -50,13 +50,6 @@ MALLOC_DECLARE(M_NVME); -#define CHATHAM2 - -#ifdef CHATHAM2 -#define CHATHAM_PCI_ID 0x20118086 -#define CHATHAM_CONTROL_BAR 0 -#endif - #define IDT32_PCI_ID 0x80d0111d /* 32 channel board */ #define IDT8_PCI_ID 0x80d2111d /* 8 channel board */ @@ -267,13 +260,6 @@ struct nvme_controller { int bar4_resource_id; struct resource *bar4_resource; -#ifdef CHATHAM2 - bus_space_tag_t chatham_bus_tag; - bus_space_handle_t chatham_bus_handle; - int chatham_resource_id; - struct resource *chatham_resource; -#endif - uint32_t msix_enabled; uint32_t force_intx; uint32_t enable_aborts; @@ -339,11 +325,6 @@ struct nvme_controller { boolean_t is_failed; STAILQ_HEAD(, nvme_request) fail_req; - -#ifdef CHATHAM2 - uint64_t chatham_size; - uint64_t chatham_lbas; -#endif }; #define nvme_mmio_offsetof(reg) \ @@ -366,22 +347,6 @@ struct nvme_controller { (val & 0xFFFFFFFF00000000UL) >> 32); \ } while (0); -#ifdef CHATHAM2 -#define chatham_read_4(softc, reg) \ - bus_space_read_4((softc)->chatham_bus_tag, \ - (softc)->chatham_bus_handle, reg) - -#define chatham_write_8(sc, reg, val) \ - do { \ - bus_space_write_4((sc)->chatham_bus_tag, \ - (sc)->chatham_bus_handle, reg, val & 0xffffffff); \ - bus_space_write_4((sc)->chatham_bus_tag, \ - (sc)->chatham_bus_handle, reg+4, \ - (val & 0xFFFFFFFF00000000UL) >> 32); \ - } while (0); - -#endif /* CHATHAM2 */ - #if __FreeBSD_version < 800054 #define wmb() __asm volatile("sfence" ::: "memory") #define mb() __asm volatile("mfence" ::: "memory") Modified: stable/10/sys/dev/nvme/nvme_qpair.c ============================================================================== --- stable/10/sys/dev/nvme/nvme_qpair.c Thu May 14 21:29:42 2015 (r282925) +++ stable/10/sys/dev/nvme/nvme_qpair.c Thu May 14 21:30:36 2015 (r282926) @@ -469,15 +469,6 @@ nvme_qpair_construct(struct nvme_qpair * qpair->id = id; qpair->vector = vector; qpair->num_entries = num_entries; -#ifdef CHATHAM2 - /* - * Chatham prototype board starts having issues at higher queue - * depths. So use a conservative estimate here of no more than 64 - * outstanding I/O per queue at any one point. - */ - if (pci_get_devid(ctrlr->dev) == CHATHAM_PCI_ID) - num_trackers = min(num_trackers, 64); -#endif qpair->num_trackers = num_trackers; qpair->ctrlr = ctrlr; From owner-svn-src-all@FreeBSD.ORG Thu May 14 21:33:34 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3B5C1374; Thu, 14 May 2015 21:33:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0F18A16EA; Thu, 14 May 2015 21:33:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4ELXXnn068288; Thu, 14 May 2015 21:33:33 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4ELXXqA068287; Thu, 14 May 2015 21:33:33 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201505142133.t4ELXXqA068287@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Thu, 14 May 2015 21:33:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r282927 - vendor/libarchive/dist/libarchive 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.20 Precedence: list List-Id: "SVN commit messages 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, 14 May 2015 21:33:34 -0000 Author: delphij Date: Thu May 14 21:33:33 2015 New Revision: 282927 URL: https://svnweb.freebsd.org/changeset/base/282927 Log: Apply upstream changeset 3865cf2: Issue 394: Segfault when reading malformed old-style cpio archives Root cause here was an implicit cast that resulted in reading very large file sizes as negative numbers. Modified: vendor/libarchive/dist/libarchive/archive_read_support_format_cpio.c Modified: vendor/libarchive/dist/libarchive/archive_read_support_format_cpio.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_read_support_format_cpio.c Thu May 14 21:30:36 2015 (r282926) +++ vendor/libarchive/dist/libarchive/archive_read_support_format_cpio.c Thu May 14 21:33:33 2015 (r282927) @@ -198,7 +198,7 @@ static int archive_read_format_cpio_read static int archive_read_format_cpio_read_header(struct archive_read *, struct archive_entry *); static int archive_read_format_cpio_skip(struct archive_read *); -static int be4(const unsigned char *); +static int64_t be4(const unsigned char *); static int find_odc_header(struct archive_read *); static int find_newc_header(struct archive_read *); static int header_bin_be(struct archive_read *, struct cpio *, @@ -213,7 +213,7 @@ static int header_afiol(struct archive_r struct archive_entry *, size_t *, size_t *); static int is_octal(const char *, size_t); static int is_hex(const char *, size_t); -static int le4(const unsigned char *); +static int64_t le4(const unsigned char *); static int record_hardlink(struct archive_read *a, struct cpio *cpio, struct archive_entry *entry); @@ -944,17 +944,17 @@ archive_read_format_cpio_cleanup(struct return (ARCHIVE_OK); } -static int +static int64_t le4(const unsigned char *p) { - return ((p[0]<<16) + (p[1]<<24) + (p[2]<<0) + (p[3]<<8)); + return ((p[0] << 16) + (((int64_t)p[1]) << 24) + (p[2] << 0) + (p[3] << 8)); } -static int +static int64_t be4(const unsigned char *p) { - return ((p[0]<<24) + (p[1]<<16) + (p[2]<<8) + (p[3])); + return ((((int64_t)p[0]) << 24) + (p[1] << 16) + (p[2] << 8) + (p[3])); } /* From owner-svn-src-all@FreeBSD.ORG Thu May 14 21:34:21 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 78FD94CF; Thu, 14 May 2015 21:34:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6752B16F4; Thu, 14 May 2015 21:34:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4ELYLQV068431; Thu, 14 May 2015 21:34:21 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4ELYLbw068430; Thu, 14 May 2015 21:34:21 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201505142134.t4ELYLbw068430@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Thu, 14 May 2015 21:34:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r282928 - vendor/libarchive/dist/libarchive 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.20 Precedence: list List-Id: "SVN commit messages 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, 14 May 2015 21:34:21 -0000 Author: delphij Date: Thu May 14 21:34:20 2015 New Revision: 282928 URL: https://svnweb.freebsd.org/changeset/base/282928 Log: Apply upstream changeset e6c9668: Add a check to archive_read_filter_consume to reject any attempts to move the file pointer by a negative amount. Note: Either this or commit 3865cf2 provides a fix for Issue 394. Modified: vendor/libarchive/dist/libarchive/archive_read.c Modified: vendor/libarchive/dist/libarchive/archive_read.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_read.c Thu May 14 21:33:33 2015 (r282927) +++ vendor/libarchive/dist/libarchive/archive_read.c Thu May 14 21:34:20 2015 (r282928) @@ -1394,6 +1394,8 @@ __archive_read_filter_consume(struct arc { int64_t skipped; + if (request < 0) + return ARCHIVE_FATAL; if (request == 0) return 0; From owner-svn-src-all@FreeBSD.ORG Thu May 14 21:39:04 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9B17E71F; Thu, 14 May 2015 21:39:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8A4CF1722; Thu, 14 May 2015 21:39:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4ELd4gt069098; Thu, 14 May 2015 21:39:04 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4ELd4hf069097; Thu, 14 May 2015 21:39:04 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201505142139.t4ELd4hf069097@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Thu, 14 May 2015 21:39:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r282930 - vendor/libarchive/dist/libarchive 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.20 Precedence: list List-Id: "SVN commit messages 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, 14 May 2015 21:39:04 -0000 Author: delphij Date: Thu May 14 21:39:03 2015 New Revision: 282930 URL: https://svnweb.freebsd.org/changeset/base/282930 Log: Apply upstream changeset 24f5de6: Set a proper error message if we hit end-of-file when trying to read a cpio header. Suggested by Issue #395, although the actual problem there seems to have been the same as Issue #394. Modified: vendor/libarchive/dist/libarchive/archive_read_support_format_cpio.c Modified: vendor/libarchive/dist/libarchive/archive_read_support_format_cpio.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_read_support_format_cpio.c Thu May 14 21:35:45 2015 (r282929) +++ vendor/libarchive/dist/libarchive/archive_read_support_format_cpio.c Thu May 14 21:39:03 2015 (r282930) @@ -864,8 +864,11 @@ header_bin_le(struct archive_read *a, st /* Read fixed-size portion of header. */ h = __archive_read_ahead(a, bin_header_size, NULL); - if (h == NULL) + if (h == NULL) { + archive_set_error(&a->archive, 0, + "End of file trying to read next cpio header"); return (ARCHIVE_FATAL); + } /* Parse out binary fields. */ header = (const unsigned char *)h; @@ -900,8 +903,11 @@ header_bin_be(struct archive_read *a, st /* Read fixed-size portion of header. */ h = __archive_read_ahead(a, bin_header_size, NULL); - if (h == NULL) + if (h == NULL) { + archive_set_error(&a->archive, 0, + "End of file trying to read next cpio header"); return (ARCHIVE_FATAL); + } /* Parse out binary fields. */ header = (const unsigned char *)h; From owner-svn-src-all@FreeBSD.ORG Thu May 14 22:35:27 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8B6E8EF0; Thu, 14 May 2015 22:35:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 799901D46; Thu, 14 May 2015 22:35:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4EMZRrM098051; Thu, 14 May 2015 22:35:27 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4EMZR3l098049; Thu, 14 May 2015 22:35:27 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201505142235.t4EMZR3l098049@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Thu, 14 May 2015 22:35:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282932 - head/contrib/libarchive/libarchive 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.20 Precedence: list List-Id: "SVN commit messages 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, 14 May 2015 22:35:27 -0000 Author: delphij Date: Thu May 14 22:35:26 2015 New Revision: 282932 URL: https://svnweb.freebsd.org/changeset/base/282932 Log: MFV r282927,r282928,r282930 (kientzle): Don't segfault when reading malformed cpio archives. MFC after: 3 days Modified: head/contrib/libarchive/libarchive/archive_read.c head/contrib/libarchive/libarchive/archive_read_support_format_cpio.c Directory Properties: head/contrib/libarchive/ (props changed) head/contrib/libarchive/libarchive/ (props changed) Modified: head/contrib/libarchive/libarchive/archive_read.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read.c Thu May 14 22:21:50 2015 (r282931) +++ head/contrib/libarchive/libarchive/archive_read.c Thu May 14 22:35:26 2015 (r282932) @@ -1395,6 +1395,8 @@ __archive_read_filter_consume(struct arc { int64_t skipped; + if (request < 0) + return ARCHIVE_FATAL; if (request == 0) return 0; Modified: head/contrib/libarchive/libarchive/archive_read_support_format_cpio.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_support_format_cpio.c Thu May 14 22:21:50 2015 (r282931) +++ head/contrib/libarchive/libarchive/archive_read_support_format_cpio.c Thu May 14 22:35:26 2015 (r282932) @@ -198,7 +198,7 @@ static int archive_read_format_cpio_read static int archive_read_format_cpio_read_header(struct archive_read *, struct archive_entry *); static int archive_read_format_cpio_skip(struct archive_read *); -static int be4(const unsigned char *); +static int64_t be4(const unsigned char *); static int find_odc_header(struct archive_read *); static int find_newc_header(struct archive_read *); static int header_bin_be(struct archive_read *, struct cpio *, @@ -213,7 +213,7 @@ static int header_afiol(struct archive_r struct archive_entry *, size_t *, size_t *); static int is_octal(const char *, size_t); static int is_hex(const char *, size_t); -static int le4(const unsigned char *); +static int64_t le4(const unsigned char *); static int record_hardlink(struct archive_read *a, struct cpio *cpio, struct archive_entry *entry); @@ -864,8 +864,11 @@ header_bin_le(struct archive_read *a, st /* Read fixed-size portion of header. */ h = __archive_read_ahead(a, bin_header_size, NULL); - if (h == NULL) + if (h == NULL) { + archive_set_error(&a->archive, 0, + "End of file trying to read next cpio header"); return (ARCHIVE_FATAL); + } /* Parse out binary fields. */ header = (const unsigned char *)h; @@ -900,8 +903,11 @@ header_bin_be(struct archive_read *a, st /* Read fixed-size portion of header. */ h = __archive_read_ahead(a, bin_header_size, NULL); - if (h == NULL) + if (h == NULL) { + archive_set_error(&a->archive, 0, + "End of file trying to read next cpio header"); return (ARCHIVE_FATAL); + } /* Parse out binary fields. */ header = (const unsigned char *)h; @@ -944,17 +950,17 @@ archive_read_format_cpio_cleanup(struct return (ARCHIVE_OK); } -static int +static int64_t le4(const unsigned char *p) { - return ((p[0]<<16) + (p[1]<<24) + (p[2]<<0) + (p[3]<<8)); + return ((p[0] << 16) + (((int64_t)p[1]) << 24) + (p[2] << 0) + (p[3] << 8)); } -static int +static int64_t be4(const unsigned char *p) { - return ((p[0]<<24) + (p[1]<<16) + (p[2]<<8) + (p[3])); + return ((((int64_t)p[0]) << 24) + (p[1] << 16) + (p[2] << 8) + (p[3])); } /* From owner-svn-src-all@FreeBSD.ORG Thu May 14 22:50:09 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6773C33C; Thu, 14 May 2015 22:50:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 498E01E73; Thu, 14 May 2015 22:50:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4EMo9fo003907; Thu, 14 May 2015 22:50:09 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4EMo8of003902; Thu, 14 May 2015 22:50:08 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201505142250.t4EMo8of003902@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Thu, 14 May 2015 22:50:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r282933 - in stable/10/sys: fs/nfs fs/nfsclient kern 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.20 Precedence: list List-Id: "SVN commit messages 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, 14 May 2015 22:50:09 -0000 Author: rmacklem Date: Thu May 14 22:50:07 2015 New Revision: 282933 URL: https://svnweb.freebsd.org/changeset/base/282933 Log: MFC: r281960 MAXBSIZE defines both the largest UFS block size and the largest size for a buffer in the buffer cache. This patch defines a new constant MAXBCACHEBUF, which is the largest size for a buffer in the buffer cache. Having a separate constant allows MAXBCACHEBUF to be set larger than MAXBSIZE on a per-architecture basis, so that NFS can do larger read/writes for these architectures. It modifies sys/param.h so that BKVASIZE can also be set on a per-architecture basis. A couple of cases where NFS used MAXBSIZE instead of NFS_MAXBSIZE is fixed as well. Modified: stable/10/sys/fs/nfs/nfsport.h stable/10/sys/fs/nfsclient/nfs_clvfsops.c stable/10/sys/kern/vfs_bio.c stable/10/sys/sys/param.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/nfs/nfsport.h ============================================================================== --- stable/10/sys/fs/nfs/nfsport.h Thu May 14 22:35:26 2015 (r282932) +++ stable/10/sys/fs/nfs/nfsport.h Thu May 14 22:50:07 2015 (r282933) @@ -967,7 +967,7 @@ struct nfsreq { }; #ifndef NFS_MAXBSIZE -#define NFS_MAXBSIZE MAXBSIZE +#define NFS_MAXBSIZE MAXBCACHEBUF #endif /* Modified: stable/10/sys/fs/nfsclient/nfs_clvfsops.c ============================================================================== --- stable/10/sys/fs/nfsclient/nfs_clvfsops.c Thu May 14 22:35:26 2015 (r282932) +++ stable/10/sys/fs/nfsclient/nfs_clvfsops.c Thu May 14 22:50:07 2015 (r282933) @@ -196,16 +196,16 @@ newnfs_iosize(struct nfsmount *nmp) } if (nmp->nm_rsize > maxio || nmp->nm_rsize == 0) nmp->nm_rsize = maxio; - if (nmp->nm_rsize > MAXBSIZE) - nmp->nm_rsize = MAXBSIZE; + if (nmp->nm_rsize > NFS_MAXBSIZE) + nmp->nm_rsize = NFS_MAXBSIZE; if (nmp->nm_readdirsize > maxio || nmp->nm_readdirsize == 0) nmp->nm_readdirsize = maxio; if (nmp->nm_readdirsize > nmp->nm_rsize) nmp->nm_readdirsize = nmp->nm_rsize; if (nmp->nm_wsize > maxio || nmp->nm_wsize == 0) nmp->nm_wsize = maxio; - if (nmp->nm_wsize > MAXBSIZE) - nmp->nm_wsize = MAXBSIZE; + if (nmp->nm_wsize > NFS_MAXBSIZE) + nmp->nm_wsize = NFS_MAXBSIZE; /* * Calculate the size used for io buffers. Use the larger Modified: stable/10/sys/kern/vfs_bio.c ============================================================================== --- stable/10/sys/kern/vfs_bio.c Thu May 14 22:35:26 2015 (r282932) +++ stable/10/sys/kern/vfs_bio.c Thu May 14 22:50:07 2015 (r282933) @@ -774,6 +774,7 @@ bufinit(void) struct buf *bp; int i; + CTASSERT(MAXBCACHEBUF >= MAXBSIZE); mtx_init(&bqclean, "bufq clean lock", NULL, MTX_DEF); mtx_init(&bqdirty, "bufq dirty lock", NULL, MTX_DEF); mtx_init(&rbreqlock, "runningbufspace lock", NULL, MTX_DEF); @@ -815,8 +816,8 @@ bufinit(void) * by the system. */ maxbufspace = (long)nbuf * BKVASIZE; - hibufspace = lmax(3 * maxbufspace / 4, maxbufspace - MAXBSIZE * 10); - lobufspace = hibufspace - MAXBSIZE; + hibufspace = lmax(3 * maxbufspace / 4, maxbufspace - MAXBCACHEBUF * 10); + lobufspace = hibufspace - MAXBCACHEBUF; /* * Note: The 16 MiB upper limit for hirunningspace was chosen @@ -826,9 +827,9 @@ bufinit(void) * The lower 1 MiB limit is the historical upper limit for * hirunningspace. */ - hirunningspace = lmax(lmin(roundup(hibufspace / 64, MAXBSIZE), + hirunningspace = lmax(lmin(roundup(hibufspace / 64, MAXBCACHEBUF), 16 * 1024 * 1024), 1024 * 1024); - lorunningspace = roundup((hirunningspace * 2) / 3, MAXBSIZE); + lorunningspace = roundup((hirunningspace * 2) / 3, MAXBCACHEBUF); /* * Limit the amount of malloc memory since it is wired permanently into @@ -3076,8 +3077,9 @@ getblk(struct vnode *vp, daddr_t blkno, KASSERT((flags & (GB_UNMAPPED | GB_KVAALLOC)) != GB_KVAALLOC, ("GB_KVAALLOC only makes sense with GB_UNMAPPED")); ASSERT_VOP_LOCKED(vp, "getblk"); - if (size > MAXBSIZE) - panic("getblk: size(%d) > MAXBSIZE(%d)\n", size, MAXBSIZE); + if (size > MAXBCACHEBUF) + panic("getblk: size(%d) > MAXBCACHEBUF(%d)\n", size, + MAXBCACHEBUF); if (!unmapped_buf_allowed) flags &= ~(GB_UNMAPPED | GB_KVAALLOC); Modified: stable/10/sys/sys/param.h ============================================================================== --- stable/10/sys/sys/param.h Thu May 14 22:35:26 2015 (r282932) +++ stable/10/sys/sys/param.h Thu May 14 22:50:07 2015 (r282933) @@ -232,10 +232,19 @@ * and may be made smaller at the risk of not being able to use * filesystems which require a block size exceeding MAXBSIZE. * + * MAXBCACHEBUF - Maximum size of a buffer in the buffer cache. This must + * be >= MAXBSIZE and can be set differently for different + * architectures by defining it in . + * Making this larger allows NFS to do larger reads/writes. + * * BKVASIZE - Nominal buffer space per buffer, in bytes. BKVASIZE is the * minimum KVM memory reservation the kernel is willing to make. * Filesystems can of course request smaller chunks. Actual * backing memory uses a chunk size of a page (PAGE_SIZE). + * The default value here can be overridden on a per-architecture + * basis by defining it in . This should + * probably be done to increase its value, when MAXBCACHEBUF is + * defined as a larger value in . * * If you make BKVASIZE too small you risk seriously fragmenting * the buffer KVM map which may slow things down a bit. If you @@ -247,7 +256,12 @@ * normal UFS filesystem. */ #define MAXBSIZE 65536 /* must be power of 2 */ +#ifndef MAXBCACHEBUF +#define MAXBCACHEBUF MAXBSIZE /* must be a power of 2 >= MAXBSIZE */ +#endif +#ifndef BKVASIZE #define BKVASIZE 16384 /* must be power of 2 */ +#endif #define BKVAMASK (BKVASIZE-1) /* From owner-svn-src-all@FreeBSD.ORG Fri May 15 00:39:53 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2516CFE1; Fri, 15 May 2015 00:39:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ECA5B1934; Fri, 15 May 2015 00:39:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4F0dqNa058096; Fri, 15 May 2015 00:39:52 GMT (envelope-from ganbold@FreeBSD.org) Received: (from ganbold@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4F0dqbA058093; Fri, 15 May 2015 00:39:52 GMT (envelope-from ganbold@FreeBSD.org) Message-Id: <201505150039.t4F0dqbA058093@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ganbold set sender to ganbold@FreeBSD.org using -f From: Ganbold Tsagaankhuu Date: Fri, 15 May 2015 00:39:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282934 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 15 May 2015 00:39:53 -0000 Author: ganbold Date: Fri May 15 00:39:51 2015 New Revision: 282934 URL: https://svnweb.freebsd.org/changeset/base/282934 Log: It appears to be armv7_sleep is a duplication of armv7_cpu_sleep. For consistency with the naming conventions used by the other implementations kill armv7_sleep and keep armv7_cpu_sleep. Differential Revision: https://reviews.freebsd.org/D2537 Submitted by: John Wehle Reviewed by: ian@, andrew@ Modified: head/sys/arm/arm/cpufunc.c head/sys/arm/arm/cpufunc_asm_armv7.S head/sys/arm/include/cpufunc.h Modified: head/sys/arm/arm/cpufunc.c ============================================================================== --- head/sys/arm/arm/cpufunc.c Thu May 14 22:50:07 2015 (r282933) +++ head/sys/arm/arm/cpufunc.c Fri May 15 00:39:51 2015 (r282934) @@ -673,7 +673,7 @@ struct cpu_functions cortexa_cpufuncs = cpufunc_nullop, /* flush_brnchtgt_C */ (void *)cpufunc_nullop, /* flush_brnchtgt_E */ - armv7_sleep, /* sleep */ + armv7_cpu_sleep, /* sleep */ /* Soft functions */ Modified: head/sys/arm/arm/cpufunc_asm_armv7.S ============================================================================== --- head/sys/arm/arm/cpufunc_asm_armv7.S Thu May 14 22:50:07 2015 (r282933) +++ head/sys/arm/arm/cpufunc_asm_armv7.S Fri May 15 00:39:51 2015 (r282934) @@ -366,9 +366,3 @@ ENTRY(armv7_idcache_inv_all) bx lr @ return END(armv7_idcache_inv_all) -ENTRY_NP(armv7_sleep) - dsb - wfi - bx lr -END(armv7_sleep) - Modified: head/sys/arm/include/cpufunc.h ============================================================================== --- head/sys/arm/include/cpufunc.h Thu May 14 22:50:07 2015 (r282933) +++ head/sys/arm/include/cpufunc.h Fri May 15 00:39:51 2015 (r282934) @@ -376,7 +376,6 @@ void armv7_setup (void); void armv7_context_switch (void); void armv7_drain_writebuf (void); void armv7_sev (void); -void armv7_sleep (int unused); u_int armv7_auxctrl (u_int, u_int); void armadaxp_idcache_wbinv_all (void); From owner-svn-src-all@FreeBSD.ORG Fri May 15 06:11:48 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CEAC279F; Fri, 15 May 2015 06:11:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BD23D1A27; Fri, 15 May 2015 06:11:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4F6BmpR024092; Fri, 15 May 2015 06:11:48 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4F6BmCI024091; Fri, 15 May 2015 06:11:48 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201505150611.t4F6BmCI024091@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Fri, 15 May 2015 06:11:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282939 - head/sys/dev/ixl 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.20 Precedence: list List-Id: "SVN commit messages 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, 15 May 2015 06:11:48 -0000 Author: araujo (ports committer) Date: Fri May 15 06:11:47 2015 New Revision: 282939 URL: https://svnweb.freebsd.org/changeset/base/282939 Log: Free vsi->queues after use. Differential Revision: D2344 Reviewed by: erj Modified: head/sys/dev/ixl/if_ixlv.c Modified: head/sys/dev/ixl/if_ixlv.c ============================================================================== --- head/sys/dev/ixl/if_ixlv.c Fri May 15 06:05:30 2015 (r282938) +++ head/sys/dev/ixl/if_ixlv.c Fri May 15 06:11:47 2015 (r282939) @@ -1693,7 +1693,6 @@ ixlv_setup_queues(struct ixlv_sc *sc) return (0); fail: - free(vsi->queues, M_DEVBUF); for (int i = 0; i < vsi->num_queues; i++) { que = &vsi->queues[i]; rxr = &que->rxr; @@ -1703,6 +1702,7 @@ fail: if (txr->base) i40e_free_dma_mem(&sc->hw, &txr->dma); } + free(vsi->queues, M_DEVBUF); early: return (error); From owner-svn-src-all@FreeBSD.ORG Fri May 15 06:28:10 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id CEB7FBFB; Fri, 15 May 2015 06:28:10 +0000 (UTC) Date: Fri, 15 May 2015 06:28:10 +0000 From: Alexey Dokuchaev To: Jilles Tjoelker Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: Re: svn commit: r282917 - stable/9/bin/cp Message-ID: <20150515062810.GA76007@FreeBSD.org> References: <201505141932.t4EJWDIn007978@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201505141932.t4EJWDIn007978@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 15 May 2015 06:28:10 -0000 On Thu, May 14, 2015 at 07:32:13PM +0000, Jilles Tjoelker wrote: > Author: jilles > Date: Thu May 14 19:32:13 2015 > New Revision: 282917 > URL: https://svnweb.freebsd.org/changeset/base/282917 > > Log: > MFC r282482: cp: Remove fts sorting. > > [...] Could (if should) it be MFCed to stable/8 as well? ./danfe From owner-svn-src-all@FreeBSD.ORG Fri May 15 06:48:37 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CB513174; Fri, 15 May 2015 06:48:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9F8761DA4; Fri, 15 May 2015 06:48:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4F6mbDl042684; Fri, 15 May 2015 06:48:37 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4F6mbtN042682; Fri, 15 May 2015 06:48:37 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201505150648.t4F6mbtN042682@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Fri, 15 May 2015 06:48:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282940 - head/sys/dev/sfxge 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.20 Precedence: list List-Id: "SVN commit messages 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, 15 May 2015 06:48:37 -0000 Author: arybchik Date: Fri May 15 06:48:36 2015 New Revision: 282940 URL: https://svnweb.freebsd.org/changeset/base/282940 Log: sfxge: LRO may be done only if checksums are OK Also it is cheaper to check Rx descriptor flags than TCP protocol in IP header. Reviewed by: gnn Sponsored by: Solarflare Communications, Inc. MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D2542 Modified: head/sys/dev/sfxge/sfxge_rx.c Modified: head/sys/dev/sfxge/sfxge_rx.c ============================================================================== --- head/sys/dev/sfxge/sfxge_rx.c Fri May 15 06:11:47 2015 (r282939) +++ head/sys/dev/sfxge/sfxge_rx.c Fri May 15 06:48:36 2015 (r282940) @@ -688,15 +688,18 @@ sfxge_lro(struct sfxge_rxq *rxq, struct */ if (l3_proto == htons(ETHERTYPE_IP)) { struct ip *iph = nh; - if ((iph->ip_p - IPPROTO_TCP) | - (iph->ip_hl - (sizeof(*iph) >> 2u)) | + + KASSERT(iph->ip_p == IPPROTO_TCP, + ("IPv4 protocol is not TCP, but packet marker is set")); + if ((iph->ip_hl - (sizeof(*iph) >> 2u)) | (iph->ip_off & htons(IP_MF | IP_OFFMASK))) goto deliver_now; th = (struct tcphdr *)(iph + 1); } else if (l3_proto == htons(ETHERTYPE_IPV6)) { struct ip6_hdr *iph = nh; - if (iph->ip6_nxt != IPPROTO_TCP) - goto deliver_now; + + KASSERT(iph->ip6_nxt == IPPROTO_TCP, + ("IPv6 next header is not TCP, but packet marker is set")); l2_id |= SFXGE_LRO_L2_ID_IPV6; th = (struct tcphdr *)(iph + 1); } else { @@ -841,7 +844,9 @@ sfxge_rx_qcomplete(struct sfxge_rxq *rxq /* Pass packet up the stack or into LRO (pipelined) */ if (prev != NULL) { - if (lro_enabled) + if (lro_enabled && + ((prev->flags & (EFX_PKT_TCP | EFX_CKSUM_TCPUDP)) == + (EFX_PKT_TCP | EFX_CKSUM_TCPUDP))) sfxge_lro(rxq, prev); else sfxge_rx_deliver(sc, prev); @@ -860,7 +865,9 @@ discard: /* Pass last packet up the stack or into LRO */ if (prev != NULL) { - if (lro_enabled) + if (lro_enabled && + ((prev->flags & (EFX_PKT_TCP | EFX_CKSUM_TCPUDP)) == + (EFX_PKT_TCP | EFX_CKSUM_TCPUDP))) sfxge_lro(rxq, prev); else sfxge_rx_deliver(sc, prev); From owner-svn-src-all@FreeBSD.ORG Fri May 15 06:49:44 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5C9412DF; Fri, 15 May 2015 06:49:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4A4FF1DBF; Fri, 15 May 2015 06:49:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4F6niEG042895; Fri, 15 May 2015 06:49:44 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4F6niTp042894; Fri, 15 May 2015 06:49:44 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201505150649.t4F6niTp042894@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Fri, 15 May 2015 06:49:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282941 - head/sys/dev/sfxge 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.20 Precedence: list List-Id: "SVN commit messages 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, 15 May 2015 06:49:44 -0000 Author: arybchik Date: Fri May 15 06:49:43 2015 New Revision: 282941 URL: https://svnweb.freebsd.org/changeset/base/282941 Log: sfxge: do not change CSUM_TSO when IFCAP_TSOx is changed It is simply not required since the kernel checks corresponding IFCAP_TSOx capability and CSUM_TSO in hw-assisted offloads. Note that CSUM_TSO is two bits (CSUM_IP_TSO|CSUM_IP6_TSO) and both bits are set in IPv4 and IPv6 mbufs. Reviewed by: gnn Sponsored by: Solarflare Communications, Inc. MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D2546 Modified: head/sys/dev/sfxge/sfxge.c Modified: head/sys/dev/sfxge/sfxge.c ============================================================================== --- head/sys/dev/sfxge/sfxge.c Fri May 15 06:48:36 2015 (r282940) +++ head/sys/dev/sfxge/sfxge.c Fri May 15 06:49:43 2015 (r282941) @@ -282,10 +282,14 @@ sfxge_if_ioctl(struct ifnet *ifp, unsign ifp->if_hwassist |= (CSUM_TCP_IPV6 | CSUM_UDP_IPV6); else ifp->if_hwassist &= ~(CSUM_TCP_IPV6 | CSUM_UDP_IPV6); - if (ifp->if_capenable & IFCAP_TSO) - ifp->if_hwassist |= CSUM_TSO; - else - ifp->if_hwassist &= ~CSUM_TSO; + + /* + * The kernel takes both IFCAP_TSOx and CSUM_TSO into + * account before using TSO. So, we do not touch + * checksum flags when IFCAP_TSOx is modified. + * Note that CSUM_TSO is (CSUM_IP_TSO|CSUM_IP6_TSO), + * but both bits are set in IPv4 and IPv6 mbufs. + */ SFXGE_ADAPTER_UNLOCK(sc); break; From owner-svn-src-all@FreeBSD.ORG Fri May 15 06:51:00 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A45CC45E; Fri, 15 May 2015 06:51:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 84CB31E81; Fri, 15 May 2015 06:51:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4F6p0fr044162; Fri, 15 May 2015 06:51:00 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4F6p0sX044157; Fri, 15 May 2015 06:51:00 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201505150651.t4F6p0sX044157@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Fri, 15 May 2015 06:51:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282942 - head/sys/dev/sfxge 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.20 Precedence: list List-Id: "SVN commit messages 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, 15 May 2015 06:51:00 -0000 Author: arybchik Date: Fri May 15 06:50:59 2015 New Revision: 282942 URL: https://svnweb.freebsd.org/changeset/base/282942 Log: sfxge: split sfxge_tx_qdpl_put() into *_locked() and *_unlocked() It simplifies understanding of the sfxge_tx_packet_add() logic and avoids passing of 'locked' to called function. Reviewed by: gnn Sponsored by: Solarflare Communications, Inc. MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D2547 Modified: head/sys/dev/sfxge/sfxge_tx.c head/sys/dev/sfxge/sfxge_tx.h Modified: head/sys/dev/sfxge/sfxge_tx.c ============================================================================== --- head/sys/dev/sfxge/sfxge_tx.c Fri May 15 06:49:43 2015 (r282941) +++ head/sys/dev/sfxge/sfxge_tx.c Fri May 15 06:50:59 2015 (r282942) @@ -521,18 +521,10 @@ sfxge_tx_qdpl_service(struct sfxge_txq * } /* - * Put a packet on the deferred packet list. - * - * If we are called with the txq lock held, we put the packet on the "get - * list", otherwise we atomically push it on the "put list". The swizzle - * function takes care of ordering. - * - * The length of the put list is bounded by SFXGE_TX_MAX_DEFERRED. We - * overload the csum_data field in the mbuf to keep track of this length - * because there is no cheap alternative to avoid races. + * Put a packet on the deferred packet get-list. */ static int -sfxge_tx_qdpl_put(struct sfxge_txq *txq, struct mbuf *mbuf, int locked) +sfxge_tx_qdpl_put_locked(struct sfxge_txq *txq, struct mbuf *mbuf) { struct sfxge_tx_dpl *stdp; @@ -540,52 +532,66 @@ sfxge_tx_qdpl_put(struct sfxge_txq *txq, KASSERT(mbuf->m_nextpkt == NULL, ("mbuf->m_nextpkt != NULL")); - if (locked) { - SFXGE_TXQ_LOCK_ASSERT_OWNED(txq); - - sfxge_tx_qdpl_swizzle(txq); + SFXGE_TXQ_LOCK_ASSERT_OWNED(txq); - if (stdp->std_get_count >= stdp->std_get_max) { - txq->get_overflow++; + if (stdp->std_get_count >= stdp->std_get_max) { + txq->get_overflow++; + return (ENOBUFS); + } + if (sfxge_is_mbuf_non_tcp(mbuf)) { + if (stdp->std_get_non_tcp_count >= + stdp->std_get_non_tcp_max) { + txq->get_non_tcp_overflow++; return (ENOBUFS); } - if (sfxge_is_mbuf_non_tcp(mbuf)) { - if (stdp->std_get_non_tcp_count >= - stdp->std_get_non_tcp_max) { - txq->get_non_tcp_overflow++; - return (ENOBUFS); - } - stdp->std_get_non_tcp_count++; - } - - *(stdp->std_getp) = mbuf; - stdp->std_getp = &mbuf->m_nextpkt; - stdp->std_get_count++; - } else { - volatile uintptr_t *putp; - uintptr_t old; - uintptr_t new; - unsigned old_len; - - putp = &stdp->std_put; - new = (uintptr_t)mbuf; - - do { - old = *putp; - if (old != 0) { - struct mbuf *mp = (struct mbuf *)old; - old_len = mp->m_pkthdr.csum_data; - } else - old_len = 0; - if (old_len >= stdp->std_put_max) { - atomic_add_long(&txq->put_overflow, 1); - return (ENOBUFS); - } - mbuf->m_pkthdr.csum_data = old_len + 1; - mbuf->m_nextpkt = (void *)old; - } while (atomic_cmpset_ptr(putp, old, new) == 0); + stdp->std_get_non_tcp_count++; } + *(stdp->std_getp) = mbuf; + stdp->std_getp = &mbuf->m_nextpkt; + stdp->std_get_count++; + + return (0); +} + +/* + * Put a packet on the deferred packet put-list. + * + * We overload the csum_data field in the mbuf to keep track of this length + * because there is no cheap alternative to avoid races. + */ +static int +sfxge_tx_qdpl_put_unlocked(struct sfxge_txq *txq, struct mbuf *mbuf) +{ + struct sfxge_tx_dpl *stdp; + volatile uintptr_t *putp; + uintptr_t old; + uintptr_t new; + unsigned old_len; + + KASSERT(mbuf->m_nextpkt == NULL, ("mbuf->m_nextpkt != NULL")); + + SFXGE_TXQ_LOCK_ASSERT_NOTOWNED(txq); + + stdp = &txq->dpl; + putp = &stdp->std_put; + new = (uintptr_t)mbuf; + + do { + old = *putp; + if (old != 0) { + struct mbuf *mp = (struct mbuf *)old; + old_len = mp->m_pkthdr.csum_data; + } else + old_len = 0; + if (old_len >= stdp->std_put_max) { + atomic_add_long(&txq->put_overflow, 1); + return (ENOBUFS); + } + mbuf->m_pkthdr.csum_data = old_len + 1; + mbuf->m_nextpkt = (void *)old; + } while (atomic_cmpset_ptr(putp, old, new) == 0); + return (0); } @@ -612,22 +618,29 @@ sfxge_tx_packet_add(struct sfxge_txq *tx */ locked = SFXGE_TXQ_TRYLOCK(txq); - if (sfxge_tx_qdpl_put(txq, m, locked) != 0) { - if (locked) + if (locked) { + /* First swizzle put-list to get-list to keep order */ + sfxge_tx_qdpl_swizzle(txq); + + rc = sfxge_tx_qdpl_put_locked(txq, m); + if (rc != 0) { SFXGE_TXQ_UNLOCK(txq); - rc = ENOBUFS; - goto fail; - } + goto fail; + } + } else { + rc = sfxge_tx_qdpl_put_unlocked(txq, m); + if (rc != 0) + goto fail; - /* - * Try to grab the lock again. - * - * If we are able to get the lock, we need to process the deferred - * packet list. If we are not able to get the lock, another thread - * is processing the list. - */ - if (!locked) + /* + * Try to grab the lock again. + * + * If we are able to get the lock, we need to process + * the deferred packet list. If we are not able to get + * the lock, another thread is processing the list. + */ locked = SFXGE_TXQ_TRYLOCK(txq); + } if (locked) { /* Try to service the list. */ Modified: head/sys/dev/sfxge/sfxge_tx.h ============================================================================== --- head/sys/dev/sfxge/sfxge_tx.h Fri May 15 06:49:43 2015 (r282941) +++ head/sys/dev/sfxge/sfxge_tx.h Fri May 15 06:50:59 2015 (r282942) @@ -148,6 +148,8 @@ enum sfxge_txq_type { mtx_unlock(&(_txq)->lock) #define SFXGE_TXQ_LOCK_ASSERT_OWNED(_txq) \ mtx_assert(&(_txq)->lock, MA_OWNED) +#define SFXGE_TXQ_LOCK_ASSERT_NOTOWNED(_txq) \ + mtx_assert(&(_txq)->lock, MA_NOTOWNED) struct sfxge_txq { From owner-svn-src-all@FreeBSD.ORG Fri May 15 07:07:38 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 54DD172D; Fri, 15 May 2015 07:07:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 42E0C1FFF; Fri, 15 May 2015 07:07:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4F77cJZ052599; Fri, 15 May 2015 07:07:38 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4F77cLh052598; Fri, 15 May 2015 07:07:38 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201505150707.t4F77cLh052598@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Fri, 15 May 2015 07:07:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r282943 - stable/10/sys/dev/ixl 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.20 Precedence: list List-Id: "SVN commit messages 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, 15 May 2015 07:07:38 -0000 Author: araujo (ports committer) Date: Fri May 15 07:07:37 2015 New Revision: 282943 URL: https://svnweb.freebsd.org/changeset/base/282943 Log: MFC r282939: Free vsi->queues after use. Modified: stable/10/sys/dev/ixl/if_ixlv.c Modified: stable/10/sys/dev/ixl/if_ixlv.c ============================================================================== --- stable/10/sys/dev/ixl/if_ixlv.c Fri May 15 06:50:59 2015 (r282942) +++ stable/10/sys/dev/ixl/if_ixlv.c Fri May 15 07:07:37 2015 (r282943) @@ -1646,7 +1646,6 @@ ixlv_setup_queues(struct ixlv_sc *sc) return (0); fail: - free(vsi->queues, M_DEVBUF); for (int i = 0; i < vsi->num_queues; i++) { que = &vsi->queues[i]; rxr = &que->rxr; @@ -1656,6 +1655,7 @@ fail: if (txr->base) i40e_free_dma_mem(&sc->hw, &txr->dma); } + free(vsi->queues, M_DEVBUF); early: return (error); From owner-svn-src-all@FreeBSD.ORG Fri May 15 07:54:33 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 235DB1AE; Fri, 15 May 2015 07:54:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0595715FB; Fri, 15 May 2015 07:54:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4F7sW0Q077440; Fri, 15 May 2015 07:54:32 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4F7sWsq077437; Fri, 15 May 2015 07:54:32 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201505150754.t4F7sWsq077437@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 15 May 2015 07:54:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282944 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 15 May 2015 07:54:33 -0000 Author: kib Date: Fri May 15 07:54:31 2015 New Revision: 282944 URL: https://svnweb.freebsd.org/changeset/base/282944 Log: Right now, the process' p_boundary_count counter is decremented by the suspended thread itself, on the return path from thread_suspend_check(). A consequence is that return from thread_single_end(SINGLE_BOUNDARY) may leave p_boundary_count non-zero, it might be even equal to the threads count. Now, assume that we have two threads in the process, both calling execve(2). Suppose that the first thread won the race to be the suspension thread, and that afterward its exec failed for any reason. After the first thread did thread_single_end(SINGLE_BOUNDARY), second thread becomes the process suspension thread and checks p_boundary_count. The non-zero value of the count allows the suspension loop to finish without actually suspending some threads. In other words, we enter exec code with some threads not suspended. Fix this by decrementing p_boundary_count in the thread_single_end()->thread_unsuspend_one() during marking the thread as runnable. This way, a return from thread_single_end() guarantees that the counter is cleared. We do not care whether the unsuspended thread has a chance to run. Add some asserts to ensure the state of the process when single boundary suspension is lifted. Also make thread_unuspend_one() static. In collaboration with: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/kern/kern_thread.c head/sys/sys/proc.h Modified: head/sys/kern/kern_thread.c ============================================================================== --- head/sys/kern/kern_thread.c Fri May 15 07:07:37 2015 (r282943) +++ head/sys/kern/kern_thread.c Fri May 15 07:54:31 2015 (r282944) @@ -74,6 +74,8 @@ static struct mtx zombie_lock; MTX_SYSINIT(zombie_lock, &zombie_lock, "zombie lock", MTX_SPIN); static void thread_zombie(struct thread *); +static int thread_unsuspend_one(struct thread *td, struct proc *p, + bool boundary); #define TID_BUFFER_SIZE 1024 @@ -445,7 +447,7 @@ thread_exit(void) if (p->p_numthreads == p->p_suspcount) { thread_lock(p->p_singlethread); wakeup_swapper = thread_unsuspend_one( - p->p_singlethread, p); + p->p_singlethread, p, false); thread_unlock(p->p_singlethread); if (wakeup_swapper) kick_proc0(); @@ -603,19 +605,19 @@ weed_inhib(int mode, struct thread *td2, switch (mode) { case SINGLE_EXIT: if (TD_IS_SUSPENDED(td2)) - wakeup_swapper |= thread_unsuspend_one(td2, p); + wakeup_swapper |= thread_unsuspend_one(td2, p, true); if (TD_ON_SLEEPQ(td2) && (td2->td_flags & TDF_SINTR) != 0) wakeup_swapper |= sleepq_abort(td2, EINTR); break; case SINGLE_BOUNDARY: if (TD_IS_SUSPENDED(td2) && (td2->td_flags & TDF_BOUNDARY) == 0) - wakeup_swapper |= thread_unsuspend_one(td2, p); + wakeup_swapper |= thread_unsuspend_one(td2, p, false); if (TD_ON_SLEEPQ(td2) && (td2->td_flags & TDF_SINTR) != 0) wakeup_swapper |= sleepq_abort(td2, ERESTART); break; case SINGLE_NO_EXIT: if (TD_IS_SUSPENDED(td2) && (td2->td_flags & TDF_BOUNDARY) == 0) - wakeup_swapper |= thread_unsuspend_one(td2, p); + wakeup_swapper |= thread_unsuspend_one(td2, p, false); if (TD_ON_SLEEPQ(td2) && (td2->td_flags & TDF_SINTR) != 0) wakeup_swapper |= sleepq_abort(td2, ERESTART); break; @@ -630,7 +632,7 @@ weed_inhib(int mode, struct thread *td2, */ if (TD_IS_SUSPENDED(td2) && (td2->td_flags & (TDF_BOUNDARY | TDF_ALLPROCSUSP)) == 0) - wakeup_swapper |= thread_unsuspend_one(td2, p); + wakeup_swapper |= thread_unsuspend_one(td2, p, false); if (TD_ON_SLEEPQ(td2) && (td2->td_flags & TDF_SINTR) != 0) { if ((td2->td_flags & TDF_SBDRY) == 0) { thread_suspend_one(td2); @@ -898,8 +900,8 @@ thread_suspend_check(int return_instead) if (P_SHOULDSTOP(p) == P_STOPPED_SINGLE) { if (p->p_numthreads == p->p_suspcount + 1) { thread_lock(p->p_singlethread); - wakeup_swapper = - thread_unsuspend_one(p->p_singlethread, p); + wakeup_swapper = thread_unsuspend_one( + p->p_singlethread, p, false); thread_unlock(p->p_singlethread); if (wakeup_swapper) kick_proc0(); @@ -918,15 +920,8 @@ thread_suspend_check(int return_instead) } PROC_SUNLOCK(p); mi_switch(SW_INVOL | SWT_SUSPEND, NULL); - if (return_instead == 0) - td->td_flags &= ~TDF_BOUNDARY; thread_unlock(td); PROC_LOCK(p); - if (return_instead == 0) { - PROC_SLOCK(p); - p->p_boundary_count--; - PROC_SUNLOCK(p); - } } return (0); } @@ -975,8 +970,8 @@ thread_suspend_one(struct thread *td) sched_sleep(td, 0); } -int -thread_unsuspend_one(struct thread *td, struct proc *p) +static int +thread_unsuspend_one(struct thread *td, struct proc *p, bool boundary) { THREAD_LOCK_ASSERT(td, MA_OWNED); @@ -986,6 +981,10 @@ thread_unsuspend_one(struct thread *td, if (td->td_proc == p) { PROC_SLOCK_ASSERT(p, MA_OWNED); p->p_suspcount--; + if (boundary && (td->td_flags & TDF_BOUNDARY) != 0) { + td->td_flags &= ~TDF_BOUNDARY; + p->p_boundary_count--; + } } return (setrunnable(td)); } @@ -1006,12 +1005,13 @@ thread_unsuspend(struct proc *p) FOREACH_THREAD_IN_PROC(p, td) { thread_lock(td); if (TD_IS_SUSPENDED(td)) { - wakeup_swapper |= thread_unsuspend_one(td, p); + wakeup_swapper |= thread_unsuspend_one(td, p, + true); } thread_unlock(td); } - } else if ((P_SHOULDSTOP(p) == P_STOPPED_SINGLE) && - (p->p_numthreads == p->p_suspcount)) { + } else if (P_SHOULDSTOP(p) == P_STOPPED_SINGLE && + p->p_numthreads == p->p_suspcount) { /* * Stopping everything also did the job for the single * threading request. Now we've downgraded to single-threaded, @@ -1020,7 +1020,7 @@ thread_unsuspend(struct proc *p) if (p->p_singlethread->td_proc == p) { thread_lock(p->p_singlethread); wakeup_swapper = thread_unsuspend_one( - p->p_singlethread, p); + p->p_singlethread, p, false); thread_unlock(p->p_singlethread); } } @@ -1044,6 +1044,12 @@ thread_single_end(struct proc *p, int mo KASSERT((mode == SINGLE_ALLPROC && (p->p_flag & P_TOTAL_STOP) != 0) || (mode != SINGLE_ALLPROC && (p->p_flag & P_TOTAL_STOP) == 0), ("mode %d does not match P_TOTAL_STOP", mode)); + KASSERT(mode == SINGLE_ALLPROC || p->p_singlethread == curthread, + ("thread_single_end from other thread %p %p", + curthread, p->p_singlethread)); + KASSERT(mode != SINGLE_BOUNDARY || + (p->p_flag & P_SINGLE_BOUNDARY) != 0, + ("mis-matched SINGLE_BOUNDARY flags %x", p->p_flag)); p->p_flag &= ~(P_STOPPED_SINGLE | P_SINGLE_EXIT | P_SINGLE_BOUNDARY | P_TOTAL_STOP); PROC_SLOCK(p); @@ -1059,11 +1065,14 @@ thread_single_end(struct proc *p, int mo FOREACH_THREAD_IN_PROC(p, td) { thread_lock(td); if (TD_IS_SUSPENDED(td)) { - wakeup_swapper |= thread_unsuspend_one(td, p); + wakeup_swapper |= thread_unsuspend_one(td, p, + mode == SINGLE_BOUNDARY); } thread_unlock(td); } } + KASSERT(mode != SINGLE_BOUNDARY || p->p_boundary_count == 0, + ("inconsistent boundary count %d", p->p_boundary_count)); PROC_SUNLOCK(p); if (wakeup_swapper) kick_proc0(); Modified: head/sys/sys/proc.h ============================================================================== --- head/sys/sys/proc.h Fri May 15 07:07:37 2015 (r282943) +++ head/sys/sys/proc.h Fri May 15 07:54:31 2015 (r282944) @@ -991,7 +991,6 @@ void thread_suspend_switch(struct thread void thread_suspend_one(struct thread *td); void thread_unlink(struct thread *td); void thread_unsuspend(struct proc *p); -int thread_unsuspend_one(struct thread *td, struct proc *p); void thread_wait(struct proc *p); struct thread *thread_find(struct proc *p, lwpid_t tid); From owner-svn-src-all@FreeBSD.ORG Fri May 15 07:57:48 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 48E1E518; Fri, 15 May 2015 07:57:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 377BA162A; Fri, 15 May 2015 07:57:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4F7vm9O078110; Fri, 15 May 2015 07:57:48 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4F7vm4r078109; Fri, 15 May 2015 07:57:48 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201505150757.t4F7vm4r078109@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 15 May 2015 07:57:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282945 - head/sys/amd64/amd64 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.20 Precedence: list List-Id: "SVN commit messages 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, 15 May 2015 07:57:48 -0000 Author: kib Date: Fri May 15 07:57:47 2015 New Revision: 282945 URL: https://svnweb.freebsd.org/changeset/base/282945 Log: Implement the support for PCID in UP kernels. Requested by: alc Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 3 weeks Modified: head/sys/amd64/amd64/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Fri May 15 07:54:31 2015 (r282944) +++ head/sys/amd64/amd64/pmap.c Fri May 15 07:57:47 2015 (r282945) @@ -909,11 +909,7 @@ pmap_bootstrap(vm_paddr_t *firstaddr) * pc_pcid_next and pc_pcid_gen are initialized by AP * during pcpu setup. */ -#ifdef SMP load_cr4(rcr4() | CR4_PCIDE); -#else - pmap_pcid_enabled = 0; -#endif } else { pmap_pcid_enabled = 0; } @@ -1559,61 +1555,79 @@ pmap_update_pde(pmap_t pmap, vm_offset_t #else /* !SMP */ /* * Normal, non-SMP, invalidation functions. - * We inline these within pmap.c for speed. */ -PMAP_INLINE void +void pmap_invalidate_page(pmap_t pmap, vm_offset_t va) { - switch (pmap->pm_type) { - case PT_X86: - if (pmap == kernel_pmap || !CPU_EMPTY(&pmap->pm_active)) - invlpg(va); - break; - case PT_RVI: - case PT_EPT: + if (pmap->pm_type == PT_RVI || pmap->pm_type == PT_EPT) { pmap->pm_eptgen++; - break; - default: - panic("pmap_invalidate_page: unknown type: %d", pmap->pm_type); + return; } + KASSERT(pmap->pm_type == PT_X86, + ("pmap_invalidate_range: unknown type %d", pmap->pm_type)); + + if (pmap == kernel_pmap || pmap == PCPU_GET(curpmap)) + invlpg(va); + else if (pmap_pcid_enabled) + pmap->pm_pcids[0].pm_gen = 0; } -PMAP_INLINE void +void pmap_invalidate_range(pmap_t pmap, vm_offset_t sva, vm_offset_t eva) { vm_offset_t addr; - switch (pmap->pm_type) { - case PT_X86: - if (pmap == kernel_pmap || !CPU_EMPTY(&pmap->pm_active)) - for (addr = sva; addr < eva; addr += PAGE_SIZE) - invlpg(addr); - break; - case PT_RVI: - case PT_EPT: + if (pmap->pm_type == PT_RVI || pmap->pm_type == PT_EPT) { pmap->pm_eptgen++; - break; - default: - panic("pmap_invalidate_range: unknown type: %d", pmap->pm_type); + return; + } + KASSERT(pmap->pm_type == PT_X86, + ("pmap_invalidate_range: unknown type %d", pmap->pm_type)); + + if (pmap == kernel_pmap || pmap == PCPU_GET(curpmap)) { + for (addr = sva; addr < eva; addr += PAGE_SIZE) + invlpg(addr); + } else if (pmap_pcid_enabled) { + pmap->pm_pcids[0].pm_gen = 0; } } -PMAP_INLINE void +void pmap_invalidate_all(pmap_t pmap) { + struct invpcid_descr d; - switch (pmap->pm_type) { - case PT_X86: - if (pmap == kernel_pmap || !CPU_EMPTY(&pmap->pm_active)) - invltlb(); - break; - case PT_RVI: - case PT_EPT: + if (pmap->pm_type == PT_RVI || pmap->pm_type == PT_EPT) { pmap->pm_eptgen++; - break; - default: - panic("pmap_invalidate_all: unknown type %d", pmap->pm_type); + return; + } + KASSERT(pmap->pm_type == PT_X86, + ("pmap_invalidate_all: unknown type %d", pmap->pm_type)); + + if (pmap == kernel_pmap) { + if (pmap_pcid_enabled && invpcid_works) { + bzero(&d, sizeof(d)); + invpcid(&d, INVPCID_CTXGLOB); + } else { + invltlb_globpcid(); + } + } else if (pmap == PCPU_GET(curpmap)) { + if (pmap_pcid_enabled) { + if (invpcid_works) { + d.pcid = pmap->pm_pcids[0].pm_pcid; + d.pad = 0; + d.addr = 0; + invpcid(&d, INVPCID_CTX); + } else { + load_cr3(pmap->pm_cr3 | pmap->pm_pcids[0]. + pm_pcid); + } + } else { + invltlb(); + } + } else if (pmap_pcid_enabled) { + pmap->pm_pcids[0].pm_gen = 0; } } @@ -1629,10 +1643,10 @@ pmap_update_pde(pmap_t pmap, vm_offset_t { pmap_update_pde_store(pmap, pde, newpde); - if (pmap == kernel_pmap || !CPU_EMPTY(&pmap->pm_active)) + if (pmap == kernel_pmap || pmap == PCPU_GET(curpmap)) pmap_update_pde_invalidate(pmap, va, newpde); else - CPU_ZERO(&pmap->pm_save); + pmap->pm_pcids[0].pm_gen = 0; } #endif /* !SMP */ From owner-svn-src-all@FreeBSD.ORG Fri May 15 08:30:31 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1E759CB7; Fri, 15 May 2015 08:30:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E6E3B1AA9; Fri, 15 May 2015 08:30:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4F8UU3B093363; Fri, 15 May 2015 08:30:30 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4F8UU5o093361; Fri, 15 May 2015 08:30:30 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201505150830.t4F8UU5o093361@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 15 May 2015 08:30:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282947 - in head/sys: amd64/amd64 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.20 Precedence: list List-Id: "SVN commit messages 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, 15 May 2015 08:30:31 -0000 Author: kib Date: Fri May 15 08:30:29 2015 New Revision: 282947 URL: https://svnweb.freebsd.org/changeset/base/282947 Log: On amd64, make proc0 pmap initialization slightly more correct. In particular, switch to the proc0 pmap to have expected %cr3 and PCID for the thread0 during initialization, and the up to date pm_active mask. pmap_pinit0() should be done after proc0->p_vmspace is assigned so that the amd64 pmap_activate() find the correct curproc pmap. Sponsored by: The FreeBSD Foundation MFC after: 3 weeks Modified: head/sys/amd64/amd64/pmap.c head/sys/kern/init_main.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Fri May 15 08:29:24 2015 (r282946) +++ head/sys/amd64/amd64/pmap.c Fri May 15 08:30:29 2015 (r282947) @@ -2129,7 +2129,6 @@ pmap_pinit0(pmap_t pmap) pmap->pm_cr3 = KPML4phys; pmap->pm_root.rt_root = 0; CPU_ZERO(&pmap->pm_active); - PCPU_SET(curpmap, pmap); TAILQ_INIT(&pmap->pm_pvchunk); bzero(&pmap->pm_stats, sizeof pmap->pm_stats); pmap->pm_flags = pmap_flags; @@ -2137,6 +2136,9 @@ pmap_pinit0(pmap_t pmap) pmap->pm_pcids[i].pm_pcid = PMAP_PCID_NONE; pmap->pm_pcids[i].pm_gen = 0; } + PCPU_SET(curpmap, kernel_pmap); + pmap_activate(curthread); + CPU_FILL(&kernel_pmap->pm_active); } /* Modified: head/sys/kern/init_main.c ============================================================================== --- head/sys/kern/init_main.c Fri May 15 08:29:24 2015 (r282946) +++ head/sys/kern/init_main.c Fri May 15 08:30:29 2015 (r282947) @@ -561,9 +561,9 @@ proc0_init(void *dummy __unused) p->p_stats = pstats_alloc(); /* Allocate a prototype map so we have something to fork. */ - pmap_pinit0(vmspace_pmap(&vmspace0)); p->p_vmspace = &vmspace0; vmspace0.vm_refcnt = 1; + pmap_pinit0(vmspace_pmap(&vmspace0)); /* * proc0 is not expected to enter usermode, so there is no special From owner-svn-src-all@FreeBSD.ORG Fri May 15 08:40:18 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 36861F64; Fri, 15 May 2015 08:40:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 16CBC1B33; Fri, 15 May 2015 08:40:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4F8eH48000805; Fri, 15 May 2015 08:40:17 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4F8eHhM000804; Fri, 15 May 2015 08:40:17 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201505150840.t4F8eHhM000804@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 15 May 2015 08:40:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282948 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 15 May 2015 08:40:18 -0000 Author: kib Date: Fri May 15 08:40:17 2015 New Revision: 282948 URL: https://svnweb.freebsd.org/changeset/base/282948 Log: Some third-party malloc(3) implementations use pthread_setspecific(3) to handle per-thread information. Since our pthread_setspecific() implementation calls calloc(3) to allocate per-thread specific data storage, things get complicated. Switch the allocator to use bare mmap(2). There is some loss of the allocated page, since e.g. on amd64, PTHREAD_KEYS_MAX * sizeof(struct pthread_specific_elem) is 3K (it actually spans whole page due to padding), but I believe it is more acceptable than additional code for specialized allocator(). The alternatives would either to make the specific data array be part of the struct thread, or use internal bindings to call the libc malloc, avoiding interposing. Also do the style pass over the thr_spec.c, esp. simplify the conditionals nesting by returning early when an error detected. Remove trivial comments. Found by: yuri@rawbw.com PR: 200138 Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Modified: head/lib/libthr/thread/thr_spec.c Modified: head/lib/libthr/thread/thr_spec.c ============================================================================== --- head/lib/libthr/thread/thr_spec.c Fri May 15 08:30:29 2015 (r282947) +++ head/lib/libthr/thread/thr_spec.c Fri May 15 08:40:17 2015 (r282948) @@ -30,6 +30,7 @@ */ #include "namespace.h" +#include #include #include #include @@ -40,7 +41,6 @@ #include "thr_private.h" -/* Static variables: */ struct pthread_key _thread_keytable[PTHREAD_KEYS_MAX]; __weak_reference(_pthread_key_create, pthread_key_create); @@ -50,7 +50,7 @@ __weak_reference(_pthread_setspecific, p int -_pthread_key_create(pthread_key_t *key, void (*destructor) (void *)) +_pthread_key_create(pthread_key_t *key, void (*destructor)(void *)) { struct pthread *curthread; int i; @@ -59,7 +59,6 @@ _pthread_key_create(pthread_key_t *key, curthread = _get_curthread(); - /* Lock the key table: */ THR_LOCK_ACQUIRE(curthread, &_keytable_lock); for (i = 0; i < PTHREAD_KEYS_MAX; i++) { @@ -68,14 +67,12 @@ _pthread_key_create(pthread_key_t *key, _thread_keytable[i].destructor = destructor; _thread_keytable[i].seqno++; - /* Unlock the key table: */ THR_LOCK_RELEASE(curthread, &_keytable_lock); *key = i + 1; return (0); } } - /* Unlock the key table: */ THR_LOCK_RELEASE(curthread, &_keytable_lock); return (EAGAIN); } @@ -83,44 +80,40 @@ _pthread_key_create(pthread_key_t *key, int _pthread_key_delete(pthread_key_t userkey) { - struct pthread *curthread = _get_curthread(); - int key = userkey - 1; - int ret = 0; - - if ((unsigned int)key < PTHREAD_KEYS_MAX) { - /* Lock the key table: */ - THR_LOCK_ACQUIRE(curthread, &_keytable_lock); - - if (_thread_keytable[key].allocated) - _thread_keytable[key].allocated = 0; - else - ret = EINVAL; - - /* Unlock the key table: */ - THR_LOCK_RELEASE(curthread, &_keytable_lock); - } else + struct pthread *curthread; + int key, ret; + + key = userkey - 1; + if ((unsigned int)key >= PTHREAD_KEYS_MAX) + return (EINVAL); + curthread = _get_curthread(); + THR_LOCK_ACQUIRE(curthread, &_keytable_lock); + if (_thread_keytable[key].allocated) { + _thread_keytable[key].allocated = 0; + ret = 0; + } else { ret = EINVAL; + } + THR_LOCK_RELEASE(curthread, &_keytable_lock); return (ret); } void _thread_cleanupspecific(void) { - struct pthread *curthread = _get_curthread(); - void (*destructor)( void *); - const void *data = NULL; - int key; - int i; + struct pthread *curthread; + void (*destructor)(void *); + const void *data; + int i, key; + curthread = _get_curthread(); if (curthread->specific == NULL) return; - - /* Lock the key table: */ THR_LOCK_ACQUIRE(curthread, &_keytable_lock); - for (i = 0; (i < PTHREAD_DESTRUCTOR_ITERATIONS) && - (curthread->specific_data_count > 0); i++) { - for (key = 0; (key < PTHREAD_KEYS_MAX) && - (curthread->specific_data_count > 0); key++) { + for (i = 0; i < PTHREAD_DESTRUCTOR_ITERATIONS && + curthread->specific_data_count > 0; i++) { + for (key = 0; key < PTHREAD_KEYS_MAX && + curthread->specific_data_count > 0; key++) { destructor = NULL; if (_thread_keytable[key].allocated && @@ -128,31 +121,29 @@ _thread_cleanupspecific(void) if (curthread->specific[key].seqno == _thread_keytable[key].seqno) { data = curthread->specific[key].data; - destructor = _thread_keytable[key].destructor; + destructor = _thread_keytable[key]. + destructor; } curthread->specific[key].data = NULL; curthread->specific_data_count--; - } - else if (curthread->specific[key].data != NULL) { + } else if (curthread->specific[key].data != NULL) { /* - * This can happen if the key is deleted via - * pthread_key_delete without first setting the value - * to NULL in all threads. POSIX says that the - * destructor is not invoked in this case. + * This can happen if the key is + * deleted via pthread_key_delete + * without first setting the value to + * NULL in all threads. POSIX says + * that the destructor is not invoked + * in this case. */ curthread->specific[key].data = NULL; curthread->specific_data_count--; } /* - * If there is a destructor, call it - * with the key table entry unlocked: + * If there is a destructor, call it with the + * key table entry unlocked. */ if (destructor != NULL) { - /* - * Don't hold the lock while calling the - * destructor: - */ THR_LOCK_RELEASE(curthread, &_keytable_lock); destructor(__DECONST(void *, data)); THR_LOCK_ACQUIRE(curthread, &_keytable_lock); @@ -160,102 +151,92 @@ _thread_cleanupspecific(void) } } THR_LOCK_RELEASE(curthread, &_keytable_lock); - free(curthread->specific); + munmap(curthread->specific, PTHREAD_KEYS_MAX * sizeof(struct + pthread_specific_elem)); curthread->specific = NULL; - if (curthread->specific_data_count > 0) + if (curthread->specific_data_count > 0) { stderr_debug("Thread %p has exited with leftover " "thread-specific data after %d destructor iterations\n", curthread, PTHREAD_DESTRUCTOR_ITERATIONS); -} - -static inline struct pthread_specific_elem * -pthread_key_allocate_data(void) -{ - struct pthread_specific_elem *new_data; - - new_data = (struct pthread_specific_elem *) - calloc(1, sizeof(struct pthread_specific_elem) * PTHREAD_KEYS_MAX); - return (new_data); + } } int _pthread_setspecific(pthread_key_t userkey, const void *value) { - struct pthread *pthread; - pthread_key_t key = userkey - 1; - int ret = 0; + struct pthread *pthread; + void *tmp; + pthread_key_t key; + + key = userkey - 1; + if ((unsigned int)key >= PTHREAD_KEYS_MAX || + !_thread_keytable[key].allocated) + return (EINVAL); - /* Point to the running thread: */ pthread = _get_curthread(); - - if ((pthread->specific) || - (pthread->specific = pthread_key_allocate_data())) { - if ((unsigned int)key < PTHREAD_KEYS_MAX) { - if (_thread_keytable[key].allocated) { - if (pthread->specific[key].data == NULL) { - if (value != NULL) - pthread->specific_data_count++; - } else if (value == NULL) - pthread->specific_data_count--; - pthread->specific[key].data = value; - pthread->specific[key].seqno = - _thread_keytable[key].seqno; - ret = 0; - } else - ret = EINVAL; - } else - ret = EINVAL; - } else - ret = ENOMEM; - return (ret); + if (pthread->specific == NULL) { + tmp = mmap(NULL, PTHREAD_KEYS_MAX * + sizeof(struct pthread_specific_elem), + PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON, -1, 0); + if (tmp == MAP_FAILED) + return (ENOMEM); + pthread->specific = tmp; + } + if (pthread->specific[key].data == NULL) { + if (value != NULL) + pthread->specific_data_count++; + } else if (value == NULL) + pthread->specific_data_count--; + pthread->specific[key].data = value; + pthread->specific[key].seqno = _thread_keytable[key].seqno; + return (0); } void * _pthread_getspecific(pthread_key_t userkey) { - struct pthread *pthread; - pthread_key_t key = userkey - 1; - const void *data; + struct pthread *pthread; + const void *data; + pthread_key_t key; + + /* Check if there is specific data. */ + key = userkey - 1; + if ((unsigned int)key >= PTHREAD_KEYS_MAX) + return (NULL); - /* Point to the running thread: */ pthread = _get_curthread(); - - /* Check if there is specific data: */ - if (pthread->specific != NULL && (unsigned int)key < PTHREAD_KEYS_MAX) { - /* Check if this key has been used before: */ - if (_thread_keytable[key].allocated && - (pthread->specific[key].seqno == _thread_keytable[key].seqno)) { - /* Return the value: */ - data = pthread->specific[key].data; - } else { - /* - * This key has not been used before, so return NULL - * instead: - */ - data = NULL; - } - } else - /* No specific data has been created, so just return NULL: */ + /* Check if this key has been used before. */ + if (_thread_keytable[key].allocated && pthread->specific != NULL && + pthread->specific[key].seqno == _thread_keytable[key].seqno) { + /* Return the value: */ + data = pthread->specific[key].data; + } else { + /* + * This key has not been used before, so return NULL + * instead. + */ data = NULL; + } return (__DECONST(void *, data)); } void _thr_tsd_unload(struct dl_phdr_info *phdr_info) { - struct pthread *curthread = _get_curthread(); + struct pthread *curthread; void (*destructor)(void *); int key; + curthread = _get_curthread(); THR_LOCK_ACQUIRE(curthread, &_keytable_lock); for (key = 0; key < PTHREAD_KEYS_MAX; key++) { - if (_thread_keytable[key].allocated) { - destructor = _thread_keytable[key].destructor; - if (destructor != NULL) { - if (__elf_phdr_match_addr(phdr_info, destructor)) - _thread_keytable[key].destructor = NULL; - } - } + if (!_thread_keytable[key].allocated) + continue; + destructor = _thread_keytable[key].destructor; + if (destructor == NULL) + continue; + if (__elf_phdr_match_addr(phdr_info, destructor)) + _thread_keytable[key].destructor = NULL; } THR_LOCK_RELEASE(curthread, &_keytable_lock); } From owner-svn-src-all@FreeBSD.ORG Fri May 15 08:45:57 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D5E862F5; Fri, 15 May 2015 08:45:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C33301C43; Fri, 15 May 2015 08:45:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4F8juqP002809; Fri, 15 May 2015 08:45:56 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4F8juRd002806; Fri, 15 May 2015 08:45:56 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201505150845.t4F8juRd002806@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Fri, 15 May 2015 08:45:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r282949 - stable/10/usr.bin/col 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.20 Precedence: list List-Id: "SVN commit messages 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, 15 May 2015 08:45:57 -0000 Author: bapt Date: Fri May 15 08:45:55 2015 New Revision: 282949 URL: https://svnweb.freebsd.org/changeset/base/282949 Log: MFC: r282305, r282309, r282342, r282669, r282722 r282305: col: fixing 25 year old bug Makes col(1) respect POSIX again for escape sequences as decribed in its manpage The bug was introduced in CSRG in 1990 r282309: Use defines to improve clarity r282342: Capsicumize col(1) r282669: Fix about ten integer overflows and underflows and a handful of logic errors in line number handling. Submitted by: schwarze at OpenBSD Discussed with: schwarze at OpenBSD Obtained from: OpenBSD r282722: For half and reverse line feeds, recognize both SUSv2-style escape-digit and BSD-style escape-control-char sequences in the input stream. Submitted by: schwarze at OpenBSD Discussed with: schwarze at OpenBSD Obtained from: OpenBSD Modified: stable/10/usr.bin/col/col.1 stable/10/usr.bin/col/col.c Modified: stable/10/usr.bin/col/col.1 ============================================================================== --- stable/10/usr.bin/col/col.1 Fri May 15 08:40:17 2015 (r282948) +++ stable/10/usr.bin/col/col.1 Fri May 15 08:45:55 2015 (r282949) @@ -31,7 +31,7 @@ .\" @(#)col.1 8.1 (Berkeley) 6/29/93 .\" $FreeBSD$ .\" -.Dd August 4, 2004 +.Dd May 10, 2015 .Dt COL 1 .Os .Sh NAME @@ -82,18 +82,33 @@ recognized and interpreted by itself, wh Output multiple spaces instead of tabs. .El .Pp -The control sequences for carriage motion that +In the input stream, .Nm -understands and their decimal values are listed in the following -table: +understands both the escape sequences of the form escape-digit +mandated by +.St -susv2 +and the traditional +.Bx +format escape-control-character. +The control sequences for carriage motion and their ASCII values +are as follows: .Pp .Bl -tag -width "carriage return" -compact +.It ESC\-BELL +reverse line feed (escape then bell). .It ESC\-7 -reverse line feed (escape then 7) +reverse line feed (escape then 7). +.It ESC\-BACKSPACE +half reverse line feed (escape then backspace). .It ESC\-8 -half reverse line feed (escape then 8) +half reverse line feed (escape then 8). +.It ESC\-TAB +half forward line feed (escape than tab). .It ESC\-9 -half forward line feed (escape then 9) +half forward line feed (escape then 9). +In +.Fl f +mode, this sequence may also occur in the output stream. .It backspace moves back one column (8); ignored in the first column .It carriage return Modified: stable/10/usr.bin/col/col.c ============================================================================== --- stable/10/usr.bin/col/col.c Fri May 15 08:40:17 2015 (r282948) +++ stable/10/usr.bin/col/col.c Fri May 15 08:45:55 2015 (r282949) @@ -45,11 +45,15 @@ static char sccsid[] = "@(#)col.c 8.5 (B #include __FBSDID("$FreeBSD$"); +#include + #include +#include #include #include #include #include +#include #include #include #include @@ -63,9 +67,9 @@ __FBSDID("$FreeBSD$"); #define SI '\017' /* shift in to normal character set */ #define SO '\016' /* shift out to alternate character set */ #define VT '\013' /* vertical tab (aka reverse line feed) */ -#define RLF '\007' /* ESC-07 reverse line feed */ -#define RHLF '\010' /* ESC-010 reverse half-line feed */ -#define FHLF '\011' /* ESC-011 forward half-line feed */ +#define RLF '7' /* ESC-7 reverse line feed */ +#define RHLF '8' /* ESC-8 reverse half-line feed */ +#define FHLF '9' /* ESC-9 forward half-line feed */ /* build up at least this many lines before flushing them out */ #define BUFFER_MARGIN 32 @@ -92,6 +96,7 @@ struct line_str { int l_max_col; /* max column in the line */ }; +static void addto_lineno(int *, int); static LINE *alloc_line(void); static void dowarn(int); static void flush_line(LINE *); @@ -104,7 +109,7 @@ static CSET last_set; /* char_set of la static LINE *lines; static int compress_spaces; /* if doing space -> tab conversion */ static int fine; /* if `fine' resolution (half lines) */ -static int max_bufd_lines; /* max # lines to keep in memory */ +static int max_bufd_lines; /* max # of half lines to keep in memory */ static int nblank_lines; /* # blanks after last flushed line */ static int no_backspaces; /* if not to output any backspaces */ static int pass_unknown_seqs; /* pass unknown control sequences */ @@ -129,10 +134,26 @@ main(int argc, char **argv) int this_line; /* line l points to */ int nflushd_lines; /* number of lines that were flushed */ int adjust, opt, warned, width; + const char *errstr; + cap_rights_t rights; + unsigned long cmd; (void)setlocale(LC_CTYPE, ""); - max_bufd_lines = 128; + cap_rights_init(&rights, CAP_FSTAT, CAP_READ); + if (cap_rights_limit(STDIN_FILENO, &rights) < 0 && errno != ENOSYS) + err(1, "unable to limit rights for stdin"); + cap_rights_init(&rights, CAP_FSTAT, CAP_WRITE, CAP_IOCTL); + if (cap_rights_limit(STDOUT_FILENO, &rights) < 0 && errno != ENOSYS) + err(1, "unable to limit rights for stdout"); + cmd = TIOCGETA; /* required by isatty(3) in printf(3) */ + if (cap_ioctls_limit(STDOUT_FILENO, &cmd, 1) < 0 && errno != ENOSYS) + err(1, "unable to limit ioctls for stdout"); + + if (cap_enter() < 0 && errno != ENOSYS) + err(1, "unable to enter capability mode"); + + max_bufd_lines = 256; compress_spaces = 1; /* compress spaces into tabs */ while ((opt = getopt(argc, argv, "bfhl:px")) != -1) switch (opt) { @@ -146,8 +167,11 @@ main(int argc, char **argv) compress_spaces = 1; break; case 'l': /* buffered line count */ - if ((max_bufd_lines = atoi(optarg)) <= 0) - errx(1, "bad -l argument %s", optarg); + max_bufd_lines = strtonum(optarg, 1, + (INT_MAX - BUFFER_MARGIN) / 2, &errstr) * 2; + if (errstr != NULL) + errx(1, "bad -l argument, %s: %s", errstr, + optarg); break; case 'p': /* pass unknown control sequences */ pass_unknown_seqs = 1; @@ -163,9 +187,6 @@ main(int argc, char **argv) if (optind != argc) usage(); - /* this value is in half lines */ - max_bufd_lines *= 2; - adjust = cur_col = extra_lines = warned = 0; cur_line = max_line = nflushd_lines = this_line = 0; cur_set = last_set = CS_NORMAL; @@ -184,20 +205,31 @@ main(int argc, char **argv) continue; case ESC: /* just ignore EOF */ switch(getwchar()) { + /* + * In the input stream, accept both the + * XPG5 sequences ESC-digit and the + * traditional BSD sequences ESC-ctrl. + */ + case '\007': + /* FALLTHROUGH */ case RLF: - cur_line -= 2; + addto_lineno(&cur_line, -2); break; + case '\010': + /* FALLTHROUGH */ case RHLF: - cur_line--; + addto_lineno(&cur_line, -1); break; + case '\011': + /* FALLTHROUGH */ case FHLF: - cur_line++; + addto_lineno(&cur_line, 1); if (cur_line > max_line) max_line = cur_line; } continue; case NL: - cur_line += 2; + addto_lineno(&cur_line, 2); if (cur_line > max_line) max_line = cur_line; cur_col = 0; @@ -216,7 +248,7 @@ main(int argc, char **argv) ++cur_col; continue; case VT: - cur_line -= 2; + addto_lineno(&cur_line, -2); continue; } if (iswspace(ch)) { @@ -229,58 +261,61 @@ main(int argc, char **argv) } /* Must stuff ch in a line - are we at the right one? */ - if (cur_line != this_line - adjust) { + if (cur_line + adjust != this_line) { LINE *lnew; - int nmove; - adjust = 0; - nmove = cur_line - this_line; - if (!fine) { - /* round up to next line */ - if (cur_line & 1) { - adjust = 1; - nmove++; - } - } - if (nmove < 0) { - for (; nmove < 0 && l->l_prev; nmove++) + /* round up to next line */ + adjust = !fine && (cur_line & 1); + + if (cur_line + adjust < this_line) { + while (cur_line + adjust < this_line && + l->l_prev != NULL) { l = l->l_prev; - if (nmove) { + this_line--; + } + if (cur_line + adjust < this_line) { if (nflushd_lines == 0) { /* * Allow backup past first * line if nothing has been * flushed yet. */ - for (; nmove < 0; nmove++) { + while (cur_line + adjust + < this_line) { lnew = alloc_line(); l->l_prev = lnew; lnew->l_next = l; l = lines = lnew; extra_lines++; + this_line--; } } else { if (!warned++) dowarn(cur_line); - cur_line -= nmove; + cur_line = this_line - adjust; } } } else { /* may need to allocate here */ - for (; nmove > 0 && l->l_next; nmove--) + while (cur_line + adjust > this_line) { + if (l->l_next == NULL) { + l->l_next = alloc_line(); + l->l_next->l_prev = l; + } l = l->l_next; - for (; nmove > 0; nmove--) { - lnew = alloc_line(); - lnew->l_prev = l; - l->l_next = lnew; - l = lnew; + this_line++; } } - this_line = cur_line + adjust; - nmove = this_line - nflushd_lines; - if (nmove >= max_bufd_lines + BUFFER_MARGIN) { - nflushd_lines += nmove - max_bufd_lines; - flush_lines(nmove - max_bufd_lines); + if (this_line > nflushd_lines && + this_line - nflushd_lines >= + max_bufd_lines + BUFFER_MARGIN) { + if (extra_lines) { + flush_lines(extra_lines); + extra_lines = 0; + } + flush_lines(this_line - nflushd_lines - + max_bufd_lines); + nflushd_lines = this_line - max_bufd_lines; } } /* grow line's buffer? */ @@ -311,25 +346,23 @@ main(int argc, char **argv) } if (ferror(stdin)) err(1, NULL); - if (max_line == 0) - exit(0); /* no lines, so just exit */ + if (extra_lines) + flush_lines(extra_lines); /* goto the last line that had a character on it */ for (; l->l_next; l = l->l_next) this_line++; - flush_lines(this_line - nflushd_lines + extra_lines + 1); + flush_lines(this_line - nflushd_lines + 1); /* make sure we leave things in a sane state */ if (last_set != CS_NORMAL) - PUTC('\017'); + PUTC(SI); /* flush out the last few blank lines */ - nblank_lines = max_line - this_line; + if (max_line > this_line) + nblank_lines = max_line - this_line; if (max_line & 1) nblank_lines++; - else if (!nblank_lines) - /* missing a \n on the last line? */ - nblank_lines = 2; flush_blanks(); exit(0); } @@ -346,7 +379,8 @@ flush_lines(int nflush) flush_blanks(); flush_line(l); } - nblank_lines++; + if (l->l_line || l->l_next) + nblank_lines++; if (l->l_line) (void)free(l->l_line); free_line(l); @@ -377,8 +411,8 @@ flush_blanks(void) for (i = nb; --i >= 0;) PUTC('\n'); if (half) { - PUTC('\033'); - PUTC('9'); + PUTC(ESC); + PUTC(FHLF); if (!nb) PUTC('\r'); } @@ -480,10 +514,10 @@ flush_line(LINE *l) if (c->c_set != last_set) { switch (c->c_set) { case CS_NORMAL: - PUTC('\017'); + PUTC(SI); break; case CS_ALTERNATE: - PUTC('\016'); + PUTC(SO); } last_set = c->c_set; } @@ -498,6 +532,23 @@ flush_line(LINE *l) } } +/* + * Increment or decrement a line number, checking for overflow. + * Stop one below INT_MAX such that the adjust variable is safe. + */ +void +addto_lineno(int *lno, int offset) +{ + if (offset > 0) { + if (*lno >= INT_MAX - offset) + errx(1, "too many lines"); + } else { + if (*lno < INT_MIN - offset) + errx(1, "too many reverse line feeds"); + } + *lno += offset; +} + #define NALLOC 64 static LINE *line_freelist; From owner-svn-src-all@FreeBSD.ORG Fri May 15 08:53:54 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2992F50E; Fri, 15 May 2015 08:53:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 16B2C1D44; Fri, 15 May 2015 08:53:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4F8rsCe007449; Fri, 15 May 2015 08:53:54 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4F8rqOI007444; Fri, 15 May 2015 08:53:52 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201505150853.t4F8rqOI007444@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Fri, 15 May 2015 08:53:52 +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: r282950 - stable/10/usr.bin/vgrind 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.20 Precedence: list List-Id: "SVN commit messages 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, 15 May 2015 08:53:54 -0000 Author: bapt Date: Fri May 15 08:53:52 2015 New Revision: 282950 URL: https://svnweb.freebsd.org/changeset/base/282950 Log: MFC: r282449, r282450, r282451, r282452, r282453, r282454, r282455, r282457, r282459, r282460, r282461 Modernize code: ansification, use c99 features Improve style(9) Better memory checking Modified: stable/10/usr.bin/vgrind/Makefile stable/10/usr.bin/vgrind/extern.h stable/10/usr.bin/vgrind/regexp.c stable/10/usr.bin/vgrind/vfontedpr.c stable/10/usr.bin/vgrind/vgrindefs.c Modified: stable/10/usr.bin/vgrind/Makefile ============================================================================== --- stable/10/usr.bin/vgrind/Makefile Fri May 15 08:45:55 2015 (r282949) +++ stable/10/usr.bin/vgrind/Makefile Fri May 15 08:53:52 2015 (r282950) @@ -11,7 +11,7 @@ FILESDIR= ${SHAREDIR}/misc FILESDIR_tmac.vgrind= ${SHAREDIR}/tmac MAN= vgrind.1 vgrindefs.5 -WARNS?= 2 +WARNS?= 3 BINDIR= /usr/libexec SCRIPTSDIR=/usr/bin Modified: stable/10/usr.bin/vgrind/extern.h ============================================================================== --- stable/10/usr.bin/vgrind/extern.h Fri May 15 08:45:55 2015 (r282949) +++ stable/10/usr.bin/vgrind/extern.h Fri May 15 08:53:52 2015 (r282950) @@ -31,9 +31,7 @@ * $FreeBSD$ */ -typedef int boolean; - -extern boolean _escaped; /* if last character was an escape */ +extern bool _escaped; /* if last character was an escape */ extern char *s_start; /* start of the current string */ extern char *l_acmbeg; /* string introducing a comment */ extern char *l_acmend; /* string ending a comment */ @@ -45,11 +43,11 @@ extern char *l_combeg; / extern char *l_comend; /* string ending a comment */ extern char l_escape; /* character used to escape characters */ extern char *l_keywds[]; /* keyword table address */ -extern boolean l_onecase; /* upper and lower case are equivalent */ +extern bool l_onecase; /* upper and lower case are equivalent */ extern char *l_prcbeg; /* regular expr for procedure begin */ extern char *l_strbeg; /* delimiter for string constant */ extern char *l_strend; /* delimiter for string constant */ -extern boolean l_toplex; /* procedures only defined at top lex level */ +extern bool l_toplex; /* procedures only defined at top lex level */ extern const char *language; /* the language indicator */ #include Modified: stable/10/usr.bin/vgrind/regexp.c ============================================================================== --- stable/10/usr.bin/vgrind/regexp.c Fri May 15 08:45:55 2015 (r282949) +++ stable/10/usr.bin/vgrind/regexp.c Fri May 15 08:53:52 2015 (r282950) @@ -44,19 +44,16 @@ static const char sccsid[] = "@(#)regexp #include #include +#include #include #include "extern.h" -#define FALSE 0 -#define TRUE !(FALSE) -#define NIL 0 - static void expconv(void); -boolean _escaped; /* true if we are currently _escaped */ +bool _escaped; /* true if we are currently x_escaped */ char *s_start; /* start of string */ -boolean l_onecase; /* true if upper and lower equivalent */ +bool l_onecase; /* true if upper and lower equivalent */ #define makelower(c) (isupper((c)) ? tolower((c)) : (c)) @@ -66,9 +63,7 @@ boolean l_onecase; /* true if upper and */ int -STRNCMP(s1, s2, len) - register char *s1,*s2; - register int len; +STRNCMP(register char *s1, register char *s2, register int len) { if (l_onecase) { do @@ -147,18 +142,18 @@ STRNCMP(s1, s2, len) static char *ccre; /* pointer to current position in converted exp*/ static char *ure; /* pointer current position in unconverted exp */ +/* re: unconverted irregular expression */ char * -convexp(re) - char *re; /* unconverted irregular expression */ +convexp(char *re) { register char *cre; /* pointer to converted regular expression */ /* allocate room for the converted expression */ - if (re == NIL) - return (NIL); + if (re == NULL) + return (NULL); if (*re == '\0') - return (NIL); - cre = malloc (4 * strlen(re) + 3); + return (NULL); + cre = malloc(4 * strlen(re) + 3); ccre = cre; ure = re; @@ -182,9 +177,9 @@ expconv() register int temp; /* let the conversion begin */ - acs = NIL; - cs = NIL; - while (*ure != NIL) { + acs = NULL; + cs = NULL; + while (*ure) { switch (c = *ure++) { case '\\': @@ -192,7 +187,7 @@ expconv() /* escaped characters are just characters */ default: - if (cs == NIL || (*cs & STR) == 0) { + if (cs == NULL || (*cs & STR) == 0) { cs = ccre; *cs = STR; SCNT(cs) = 1; @@ -207,13 +202,13 @@ expconv() case 'd': case 'e': case 'p': - if (acs != NIL && acs != cs) { + if (acs != NULL && acs != cs) { do { temp = OCNT(acs); OCNT(acs) = ccre - acs; acs -= temp; } while (temp != 0); - acs = NIL; + acs = NULL; } cs = ccre; *cs = META; @@ -226,13 +221,13 @@ expconv() /* just put the symbol in */ case '^': case '$': - if (acs != NIL && acs != cs) { + if (acs != NULL && acs != cs) { do { temp = OCNT(acs); OCNT(acs) = ccre - acs; acs -= temp; } while (temp != 0); - acs = NIL; + acs = NULL; } cs = ccre; *cs = META; @@ -248,31 +243,31 @@ expconv() /* recurse and define a subexpression */ case '(': - if (acs != NIL && acs != cs) { + if (acs != NULL && acs != cs) { do { temp = OCNT(acs); OCNT(acs) = ccre - acs; acs -= temp; } while (temp != 0); - acs = NIL; + acs = NULL; } cs = ccre; *cs = OPER; OSYM(cs) = '('; ccre = ONEXT(cs); - expconv (); + expconv(); OCNT(cs) = ccre - cs; /* offset to next symbol */ break; /* return from a recursion */ case ')': - if (acs != NIL) { + if (acs != NULL) { do { temp = OCNT(acs); OCNT(acs) = ccre - acs; acs -= temp; } while (temp != 0); - acs = NIL; + acs = NULL; } cs = ccre; *cs = META; @@ -284,7 +279,7 @@ expconv() /* the third byte will contain an offset to jump over the */ /* alternate match in case the first did not fail */ case '|': - if (acs != NIL && acs != cs) + if (acs != NULL && acs != cs) OCNT(ccre) = ccre - acs; /* make a back pointer */ else OCNT(ccre) = 0; @@ -298,7 +293,7 @@ expconv() /* if its not a metasymbol just build a scharacter string */ default: - if (cs == NIL || (*cs & STR) == 0) { + if (cs == NULL || (*cs & STR) == 0) { cs = ccre; *cs = STR; SCNT(cs) = 1; @@ -309,13 +304,13 @@ expconv() break; } } - if (acs != NIL) { + if (acs != NULL) { do { temp = OCNT(acs); OCNT(acs) = ccre - acs; acs -= temp; } while (temp != 0); - acs = NIL; + acs = NULL; } return; } @@ -344,21 +339,23 @@ expconv() * character matched. */ +/* + * s: string to check for a match in + * re: a converted irregular expression + * mstring: where to put whatever matches a \p + */ char * -expmatch (s, re, mstring) - register char *s; /* string to check for a match in */ - register char *re; /* a converted irregular expression */ - register char *mstring; /* where to put whatever matches a \p */ +expmatch (register char *s, register char *re, register char *mstring) { register char *cs; /* the current symbol */ register char *ptr,*s1; /* temporary pointer */ - boolean matched; /* a temporary boolean */ + bool matched; /* a temporary bool */ /* initial conditions */ - if (re == NIL) - return (NIL); + if (re == NULL) + return (NULL); cs = re; - matched = FALSE; + matched = false; /* loop till expression string is exhausted (or at least pretty tired) */ while (*cs) { @@ -384,7 +381,7 @@ expmatch (s, re, mstring) } else { /* no match, error return */ - return (NIL); + return (NULL); } break; @@ -406,8 +403,8 @@ expmatch (s, re, mstring) /* this is a grouping, recurse */ case '(': - ptr = expmatch (s, ONEXT(cs), mstring); - if (ptr != NIL) { + ptr = expmatch(s, ONEXT(cs), mstring); + if (ptr != NULL) { /* the subexpression matched */ matched = 1; @@ -423,7 +420,7 @@ expmatch (s, re, mstring) } else { /* no match, error return */ - return (NIL); + return (NULL); } cs = OPTR(cs); break; @@ -443,35 +440,35 @@ expmatch (s, re, mstring) */ s1 = s; do { - ptr = expmatch (s1, MNEXT(cs), mstring); - if (ptr != NIL && s1 != s) { + ptr = expmatch(s1, MNEXT(cs), mstring); + if (ptr != NULL && s1 != s) { /* we have a match, remember the match */ strncpy (mstring, s, s1 - s); mstring[s1 - s] = '\0'; return (ptr); - } else if (ptr != NIL && (*cs & OPT)) { + } else if (ptr != NULL && (*cs & OPT)) { /* it was aoptional so no match is ok */ return (ptr); - } else if (ptr != NIL) { + } else if (ptr != NULL) { /* not optional and we still matched */ - return (NIL); + return (NULL); } if (!(isalnum(*s1) || *s1 == '_' || /* C++ destructor */ *s1 == '~' || /* C++ scope operator */ (strlen(s1) > 1 && *s1 == ':' && s1[1] == ':' && - (s1++, TRUE)))) - return (NIL); + (s1++, true)))) + return (NULL); if (*s1 == '\\') - _escaped = _escaped ? FALSE : TRUE; + _escaped = _escaped ? false : true; else - _escaped = FALSE; + _escaped = false; } while (*s1++); - return (NIL); + return (NULL); /* try to match anything */ case 'a': @@ -482,31 +479,31 @@ expmatch (s, re, mstring) */ s1 = s; do { - ptr = expmatch (s1, MNEXT(cs), mstring); - if (ptr != NIL && s1 != s) { + ptr = expmatch(s1, MNEXT(cs), mstring); + if (ptr != NULL && s1 != s) { /* we have a match */ return (ptr); - } else if (ptr != NIL && (*cs & OPT)) { + } else if (ptr != NULL && (*cs & OPT)) { /* it was aoptional so no match is ok */ return (ptr); - } else if (ptr != NIL) { + } else if (ptr != NULL) { /* not optional and we still matched */ - return (NIL); + return (NULL); } if (*s1 == '\\') - _escaped = _escaped ? FALSE : TRUE; + _escaped = _escaped ? false : true; else - _escaped = FALSE; + _escaped = false; } while (*s1++); - return (NIL); + return (NULL); /* fail if we are currently _escaped */ case 'e': if (_escaped) - return(NIL); + return(NULL); cs = MNEXT(cs); break; @@ -538,7 +535,7 @@ expmatch (s, re, mstring) } else /* no match, error return */ - return (NIL); + return (NULL); break; /* check for end of line */ @@ -562,7 +559,7 @@ expmatch (s, re, mstring) } else /* no match, error return */ - return (NIL); + return (NULL); break; /* check for start of line */ @@ -585,7 +582,7 @@ expmatch (s, re, mstring) } else /* no match, error return */ - return (NIL); + return (NULL); break; /* end of a subexpression, return success */ Modified: stable/10/usr.bin/vgrind/vfontedpr.c ============================================================================== --- stable/10/usr.bin/vgrind/vfontedpr.c Fri May 15 08:45:55 2015 (r282949) +++ stable/10/usr.bin/vgrind/vfontedpr.c Fri May 15 08:53:52 2015 (r282950) @@ -47,14 +47,12 @@ static const char sccsid[] = "@(#)vfonte #include #include #include +#include #include #include #include "pathnames.h" #include "extern.h" -#define FALSE 0 -#define TRUE !(FALSE) -#define NIL 0 #define STANDARD 0 #define ALTERNATE 1 @@ -70,8 +68,8 @@ static const char sccsid[] = "@(#)vfonte #define PSMAX 20 /* size of procedure name stacking */ static int iskw(char *); -static boolean isproc(char *); -static void putKcp(char *, char *, boolean); +static bool isproc(char *); +static void putKcp(char *, char *, bool); static void putScp(char *); static void putcp(int); static int tabs(char *, char *); @@ -81,13 +79,13 @@ static int width(char *, char *); * The state variables */ -static boolean filter = FALSE; /* act as a filter (like eqn) */ -static boolean inchr; /* in a string constant */ -static boolean incomm; /* in a comment of the primary type */ -static boolean idx = FALSE; /* form an index */ -static boolean instr; /* in a string constant */ -static boolean nokeyw = FALSE; /* no keywords being flagged */ -static boolean pass = FALSE; /* +static bool filter = false; /* act as a filter (like eqn) */ +static bool inchr; /* in a string constant */ +static bool incomm; /* in a comment of the primary type */ +static bool idx = false; /* form an index */ +static bool instr; /* in a string constant */ +static bool nokeyw = false; /* no keywords being flagged */ +static bool pass = false; /* * when acting as a filter, pass indicates * whether we are currently processing * input. @@ -100,7 +98,7 @@ static char * defsfile[2] = { _PATH_VGRI static int margin; static int plstack[PSMAX]; /* the procedure nesting level stack */ static char pname[BUFSIZ+1]; -static boolean prccont; /* continue last procedure */ +static bool prccont; /* continue last procedure */ static int psptr; /* the stack index of the current procedure */ static char pstack[PSMAX][PNAMELEN+1]; /* the procedure name stack */ @@ -122,15 +120,15 @@ char *l_nocom; /* regexp for non-commen char *l_prcbeg; /* regular expr for procedure begin */ char *l_strbeg; /* delimiter for string constant */ char *l_strend; /* delimiter for string constant */ -boolean l_toplex; /* procedures only defined at top lex level */ +bool l_toplex; /* procedures only defined at top lex level */ const char *language = "c"; /* the language indicator */ #define ps(x) printf("%s", x) +static char minus[] = "-"; +static char minusn[] = "-n"; int -main(argc, argv) - int argc; - char *argv[]; +main(int argc, char **argv) { const char *fname = ""; struct stat stbuf; @@ -160,9 +158,9 @@ main(argc, argv) /* act as a filter like eqn */ if (!strcmp(argv[0], "-f")) { - filter++; + filter = true; argv[0] = argv[argc-1]; - argv[argc-1] = strdup("-"); + argv[argc-1] = minus; continue; } @@ -174,13 +172,13 @@ main(argc, argv) /* build an index */ if (!strcmp(argv[0], "-x")) { - idx++; - argv[0] = strdup("-n"); + idx = true; + argv[0] = minusn; } /* indicate no keywords */ if (!strcmp(argv[0], "-n")) { - nokeyw++; + nokeyw = true; argc--, argv++; continue; } @@ -227,17 +225,17 @@ main(argc, argv) i = cgetent(&defs, defsfile, language); if (i == -1) { fprintf (stderr, "no entry for language %s\n", language); - exit (0); + exit(0); } else if (i == -2) { fprintf(stderr, "cannot find vgrindefs file %s\n", defsfile[0]); - exit (0); + exit(0); } else if (i == -3) { fprintf(stderr, "potential reference loop detected in vgrindefs file %s\n", defsfile[0]); exit(0); } if (cgetustr(defs, "kw", &cp) == -1) - nokeyw = TRUE; + nokeyw = true; else { char **cpp; @@ -250,7 +248,7 @@ main(argc, argv) while (*cp != ' ' && *cp != '\t' && *cp) cp++; } - *cpp = NIL; + *cpp = NULL; } cgetustr(defs, "pb", &cp); l_prcbeg = convexp(cp); @@ -282,10 +280,10 @@ main(argc, argv) /* initialize the program */ - incomm = FALSE; - instr = FALSE; - inchr = FALSE; - _escaped = FALSE; + incomm = false; + instr = false; + inchr = false; + _escaped = false; blklevel = 0; for (psptr=0; psptr 0 /* sanity */) blklevel--; @@ -465,13 +462,13 @@ skip: /* end of current procedure */ if (s != os) - ps ("\\c"); - ps ("\\c\n'-F\n"); + ps("\\c"); + ps("\\c\n'-F\n"); blklevel = plstack[psptr]; /* see if we should print the last proc name */ if (--psptr >= 0) - prccont = TRUE; + prccont = true; else psptr = -1; } @@ -480,8 +477,8 @@ skip: } /* start of a lexical block */ - if (blksptr != NIL) { - putKcp (s, blksptr - 1, FALSE); + if (blksptr != NULL) { + putKcp(s, blksptr - 1, false); s = blksptr; blklevel++; continue; @@ -489,64 +486,66 @@ skip: /* check for end of comment */ } else if (incomm) { - comptr = expmatch (s, l_comend, dummy); - acmptr = expmatch (s, l_acmend, dummy); - if (((comtype == STANDARD) && (comptr != NIL)) || - ((comtype == ALTERNATE) && (acmptr != NIL))) { + comptr = expmatch(s, l_comend, dummy); + acmptr = expmatch(s, l_acmend, dummy); + if (((comtype == STANDARD) && (comptr != NULL)) || + ((comtype == ALTERNATE) && (acmptr != NULL))) { if (comtype == STANDARD) { - putKcp (s, comptr-1, TRUE); + putKcp(s, comptr-1, true); s = comptr; } else { - putKcp (s, acmptr-1, TRUE); + putKcp(s, acmptr-1, true); s = acmptr; } - incomm = FALSE; + incomm = false; ps("\\c\n'-C\n"); continue; } else { - putKcp (s, s + strlen(s) -1, TRUE); + putKcp(s, s + strlen(s) -1, true); s = s + strlen(s); continue; } /* check for end of string */ } else if (instr) { - if ((strptr = expmatch (s, l_strend, dummy)) != NIL) { - putKcp (s, strptr-1, TRUE); + if ((strptr = expmatch(s, l_strend, dummy)) != NULL) { + putKcp(s, strptr-1, true); s = strptr; - instr = FALSE; + instr = false; continue; } else { - putKcp (s, s+strlen(s)-1, TRUE); + putKcp(s, s+strlen(s)-1, true); s = s + strlen(s); continue; } /* check for end of character string */ } else if (inchr) { - if ((chrptr = expmatch (s, l_chrend, dummy)) != NIL) { - putKcp (s, chrptr-1, TRUE); + if ((chrptr = expmatch(s, l_chrend, dummy)) != NULL) { + putKcp(s, chrptr-1, true); s = chrptr; - inchr = FALSE; + inchr = false; continue; } else { - putKcp (s, s+strlen(s)-1, TRUE); + putKcp(s, s+strlen(s)-1, true); s = s + strlen(s); continue; } } /* print out the line */ - putKcp (s, s + strlen(s) -1, FALSE); + putKcp(s, s + strlen(s) -1, false); s = s + strlen(s); } while (*s); } +/* + * start: start of string to write + * end: end of string to write + * force: true if we should force nokeyw + */ static void -putKcp (start, end, force) - char *start; /* start of string to write */ - char *end; /* end of string to write */ - boolean force; /* true if we should force nokeyw */ +putKcp(char *start, char *end, bool force) { int i; int xfld = 0; @@ -587,22 +586,20 @@ putKcp (start, end, force) } } - putcp ((unsigned char)*start++); + putcp((unsigned char)*start++); } } static int -tabs(s, os) - char *s, *os; +tabs(char *s, char *os) { return (width(s, os) / 8); } static int -width(s, os) - register char *s, *os; +width(register char *s, register char *os) { register int i = 0; @@ -622,8 +619,7 @@ width(s, os) } static void -putcp(c) - register int c; +putcp(register int c) { switch(c) { @@ -689,16 +685,15 @@ putcp(c) /* * look for a process beginning on this line */ -static boolean -isproc(s) - char *s; +static bool +isproc(char *s) { pname[0] = '\0'; if (!l_toplex || blklevel == 0) - if (expmatch (s, l_prcbeg, pname) != NIL) { - return (TRUE); + if (expmatch(s, l_prcbeg, pname) != NULL) { + return (true); } - return (FALSE); + return (false); } @@ -706,8 +701,7 @@ isproc(s) */ static int -iskw(s) - register char *s; +iskw(register char *s) { register char **ss = l_keywds; register int i = 1; @@ -720,4 +714,3 @@ iskw(s) return (i); return (0); } - Modified: stable/10/usr.bin/vgrind/vgrindefs.c ============================================================================== --- stable/10/usr.bin/vgrind/vgrindefs.c Fri May 15 08:45:55 2015 (r282949) +++ stable/10/usr.bin/vgrind/vgrindefs.c Fri May 15 08:53:52 2015 (r282950) @@ -55,30 +55,30 @@ __FBSDID("$FreeBSD$"); static char *tbuf; static char *filename; static int hopcount; /* detect infinite loops in termcap, init 0 */ -char *tskip(); -char *tgetstr(); -char *tdecode(); -char *getenv(); + +static int tnchktc(void); +static int tnamatch(char *); +static char *tskip(register char *); +static char *tdecode(register char *, char **); /* * Get an entry for terminal name in buffer bp, * from the termcap file. Parse is very rudimentary; * we just notice escaped newlines. */ -tgetent(bp, name, file) - char *bp, *name, *file; +int +tgetent(char *bp, char *name, char *file) { register char *cp; register int c; register int i = 0, cnt = 0; char ibuf[BUFSIZ]; - char *cp2; int tf; tbuf = bp; tf = 0; filename = file; - tf = open(filename, 0); + tf = open(filename, O_RDONLY); if (tf < 0) return (-1); for (;;) { @@ -125,7 +125,8 @@ tgetent(bp, name, file) * entries to say "like an HP2621 but doesn't turn on the labels". * Note that this works because of the left to right scan. */ -tnchktc() +static int +tnchktc(void) { register char *p, *q; char tcname[16]; /* name of similar terminal */ @@ -143,7 +144,7 @@ tnchktc() /* p now points to beginning of last field */ if (p[0] != 't' || p[1] != 'c') return(1); - strcpy(tcname,p+3); + strlcpy(tcname, p+3, 16); q = tcname; while (q && *q != ':') q++; @@ -161,7 +162,7 @@ tnchktc() write(STDERR_FILENO, "Vgrind entry too long\n", 23); q[BUFSIZ - (p-tbuf)] = 0; } - strcpy(p, q+1); + strlcpy(p, q+1, BUFSIZ - (p - holdtbuf)); tbuf = holdtbuf; return(1); } @@ -172,8 +173,8 @@ tnchktc() * against each such name. The normal : terminator after the last * name (before the first field) stops us. */ -tnamatch(np) - char *np; +static int +tnamatch(char *np) { register char *Np, *Bp; @@ -199,8 +200,7 @@ tnamatch(np) * into the termcap file in octal. */ static char * -tskip(bp) - register char *bp; +tskip(register char *bp) { while (*bp && *bp != ':') @@ -218,8 +218,8 @@ tskip(bp) * a # character. If the option is not found we return -1. * Note that we handle octal numbers beginning with 0. */ -tgetnum(id) - char *id; +int +tgetnum(char *id) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri May 15 09:00:21 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A6CD6754; Fri, 15 May 2015 09:00:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9305E1D70; Fri, 15 May 2015 09:00:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4F90L7U008547; Fri, 15 May 2015 09:00:21 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4F90LBa008545; Fri, 15 May 2015 09:00:21 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201505150900.t4F90LBa008545@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Fri, 15 May 2015 09:00: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: r282951 - stable/10/usr.bin/checknr 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.20 Precedence: list List-Id: "SVN commit messages 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, 15 May 2015 09:00:21 -0000 Author: bapt Date: Fri May 15 09:00:20 2015 New Revision: 282951 URL: https://svnweb.freebsd.org/changeset/base/282951 Log: MFC: r282437, r282438, r282439, r282462, r282463, r282464, r282466, r282467, r282468, r282609 Update the list of known roff commands (both from NetBSD and heirloom doctools) Improve memory checking Remove limitation on input lines by using getline(3) Modified: stable/10/usr.bin/checknr/checknr.1 stable/10/usr.bin/checknr/checknr.c Modified: stable/10/usr.bin/checknr/checknr.1 ============================================================================== --- stable/10/usr.bin/checknr/checknr.1 Fri May 15 08:53:52 2015 (r282950) +++ stable/10/usr.bin/checknr/checknr.1 Fri May 15 09:00:20 2015 (r282951) @@ -28,7 +28,7 @@ .\" @(#)checknr.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd January 26, 2005 +.Dd May 5, 2015 .Dt CHECKNR 1 .Os .Sh NAME @@ -157,7 +157,3 @@ There is no way to define a 1 character .Pp Does not correctly recognize certain reasonable constructs, such as conditionals. -.Pp -Input lines are limited to -.Dv LINE_MAX -(2048) bytes in length. Modified: stable/10/usr.bin/checknr/checknr.c ============================================================================== --- stable/10/usr.bin/checknr/checknr.c Fri May 15 08:53:52 2015 (r282950) +++ stable/10/usr.bin/checknr/checknr.c Fri May 15 09:00:20 2015 (r282951) @@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$"); * structured typesetting. */ #include +#define _WITH_GETLINE #include #include #include @@ -57,7 +58,7 @@ __FBSDID("$FreeBSD$"); #define MAXSTK 100 /* Stack size */ #define MAXBR 100 /* Max number of bracket pairs known */ -#define MAXCMDS 500 /* Max number of commands known */ +#define MAXCMDS 600 /* Max number of commands known */ static void addcmd(char *); static void addmac(const char *); @@ -133,6 +134,19 @@ static struct brstr { {"(q", ")q"}, {"(x", ")x"}, {"(z", ")z"}, + /* The -mdoc package */ + {"Ao", "Ac"}, + {"Bd", "Ed"}, + {"Bk", "Ek"}, + {"Bo", "Bc"}, + {"Do", "Dc"}, + {"Fo", "Fc"}, + {"Oo", "Oc"}, + {"Po", "Pc"}, + {"Qo", "Qc"}, + {"Rs", "Re"}, + {"So", "Sc"}, + {"Xo", "Xc"}, /* Things needed by preprocessors */ {"EQ", "EN"}, {"TS", "TE"}, @@ -146,37 +160,47 @@ static struct brstr { * Used so we can complain about unrecognized commands. */ static const char *knowncmds[MAXCMDS] = { -"$c", "$f", "$h", "$p", "$s", "(b", "(c", "(d", "(f", "(l", "(q", "(t", -"(x", "(z", ")b", ")c", ")d", ")f", ")l", ")q", ")t", ")x", ")z", "++", -"+c", "1C", "1c", "2C", "2c", "@(", "@)", "@C", "@D", "@F", "@I", "@M", -"@c", "@e", "@f", "@h", "@m", "@n", "@o", "@p", "@r", "@t", "@z", "AB", -"AE", "AF", "AI", "AL", "AM", "AS", "AT", "AU", "AX", "B", "B1", "B2", -"BD", "BE", "BG", "BL", "BS", "BT", "BX", "C1", "C2", "CD", "CM", "CT", -"D", "DA", "DE", "DF", "DL", "DS", "DT", "EC", "EF", "EG", "EH", "EM", -"EN", "EQ", "EX", "FA", "FD", "FE", "FG", "FJ", "FK", "FL", "FN", "FO", -"FQ", "FS", "FV", "FX", "H", "HC", "HD", "HM", "HO", "HU", "I", "ID", -"IE", "IH", "IM", "IP", "IX", "IZ", "KD", "KE", "KF", "KQ", "KS", "LB", -"LC", "LD", "LE", "LG", "LI", "LP", "MC", "ME", "MF", "MH", "ML", "MR", -"MT", "ND", "NE", "NH", "NL", "NP", "NS", "OF", "OH", "OK", "OP", "P", -"P1", "PF", "PH", "PP", "PT", "PX", "PY", "QE", "QP", "QS", "R", "RA", -"RC", "RE", "RL", "RP", "RQ", "RS", "RT", "S", "S0", "S2", "S3", "SA", -"SG", "SH", "SK", "SM", "SP", "SY", "T&", "TA", "TB", "TC", "TD", "TE", -"TH", "TL", "TM", "TP", "TQ", "TR", "TS", "TX", "UL", "US", "UX", "VL", -"WC", "WH", "XA", "XD", "XE", "XF", "XK", "XP", "XS", "[", "[-", "[0", -"[1", "[2", "[3", "[4", "[5", "[<", "[>", "[]", "]", "]-", "]<", "]>", -"][", "ab", "ac", "ad", "af", "am", "ar", "as", "b", "ba", "bc", "bd", -"bi", "bl", "bp", "br", "bx", "c.", "c2", "cc", "ce", "cf", "ch", "cs", -"ct", "cu", "da", "de", "di", "dl", "dn", "ds", "dt", "dw", "dy", "ec", -"ef", "eh", "el", "em", "eo", "ep", "ev", "ex", "fc", "fi", "fl", "fo", -"fp", "ft", "fz", "hc", "he", "hl", "hp", "ht", "hw", "hx", "hy", "i", -"ie", "if", "ig", "in", "ip", "it", "ix", "lc", "lg", "li", "ll", "ln", -"lo", "lp", "ls", "lt", "m1", "m2", "m3", "m4", "mc", "mk", "mo", "n1", -"n2", "na", "ne", "nf", "nh", "nl", "nm", "nn", "np", "nr", "ns", "nx", -"of", "oh", "os", "pa", "pc", "pi", "pl", "pm", "pn", "po", "pp", "ps", -"q", "r", "rb", "rd", "re", "rm", "rn", "ro", "rr", "rs", "rt", "sb", -"sc", "sh", "sk", "so", "sp", "ss", "st", "sv", "sz", "ta", "tc", "th", -"ti", "tl", "tm", "tp", "tr", "u", "uf", "uh", "ul", "vs", "wh", "xp", -"yr", 0 +"$c", "$f", "$h", "$p", "$s", "%A", "%B", "%C", "%D", "%I", "%J", "%N", "%O", +"%P", "%Q", "%R", "%T", "%V", "(b", "(c", "(d", "(f", "(l", "(q", "(t", "(x", +"(z", ")b", ")c", ")d", ")f", ")l", ")q", ")t", ")x", ")z", "++", "+c", "1C", +"1c", "2C", "2c", "@(", "@)", "@C", "@D", "@F", "@I", "@M", "@c", "@e", "@f", +"@h", "@m", "@n", "@o", "@p", "@r", "@t", "@z", "AB", "AE", "AF", "AI", "AL", +"AM", "AS", "AT", "AU", "AX", "Ac", "Ad", "An", "Ao", "Ap", "Aq", "Ar", "At", +"B", "B" , "B1", "B2", "BD", "BE", "BG", "BL", "BS", "BT", "BX", "Bc", "Bd", +"Bf", "Bk", "Bl", "Bo", "Bq", "Bsx", "Bx", "C1", "C2", "CD", "CM", "CT", "Cd", +"Cm", "D", "D" , "D1", "DA", "DE", "DF", "DL", "DS", "DT", "Db", "Dc", "Dd", +"Dl", "Do", "Dq", "Dt", "Dv", "EC", "EF", "EG", "EH", "EM", "EN", "EQ", "EX", +"Ec", "Ed", "Ef", "Ek", "El", "Em", "Eo", "Er", "Ev", "FA", "FD", "FE", "FG", +"FJ", "FK", "FL", "FN", "FO", "FQ", "FS", "FV", "FX", "Fa", "Fc", "Fd", "Fl", +"Fn", "Fo", "Ft", "Fx", "H", "H" , "HC", "HD", "HM", "HO", "HU", "I", "I" , +"ID", "IE", "IH", "IM", "IP", "IX", "IZ", "Ic", "In", "It", "KD", "KE", "KF", +"KQ", "KS", "LB", "LC", "LD", "LE", "LG", "LI", "LP", "Lb", "Li", "MC", "ME", +"MF", "MH", "ML", "MR", "MT", "ND", "NE", "NH", "NL", "NP", "NS", "Nd", "Nm", +"No", "Ns", "Nx", "OF", "OH", "OK", "OP", "Oc", "Oo", "Op", "Os", "Ot", "Ox", +"P", "P" , "P1", "PF", "PH", "PP", "PT", "PX", "PY", "Pa", "Pc", "Pf", "Po", +"Pp", "Pq", "QE", "QP", "QS", "Qc", "Ql", "Qo", "Qq", "R", "R" , "RA", "RC", +"RE", "RL", "RP", "RQ", "RS", "RT", "Re", "Rs", "S", "S" , "S0", "S2", "S3", +"SA", "SG", "SH", "SK", "SM", "SP", "SY", "Sc", "Sh", "Sm", "So", "Sq", "Ss", +"St", "Sx", "Sy", "T&", "TA", "TB", "TC", "TD", "TE", "TH", "TL", "TM", "TP", +"TQ", "TR", "TS", "TX", "Tn", "UL", "US", "UX", "Ud", "Ux", "VL", "Va", "Vt", +"WC", "WH", "XA", "XD", "XE", "XF", "XK", "XP", "XS", "Xc", "Xo", "Xr", "[", +"[" , "[-", "[0", "[1", "[2", "[3", "[4", "[5", "[<", "[>", "[]", "\\{", "\\}", +"]", "]" , "]-", "]<", "]>", "][", "ab", "ac", "ad", "af", "am", "ar", "as", +"b", "b" , "ba", "bc", "bd", "bi", "bl", "bp", "br", "bx", "c.", "c2", "cc", +"ce", "cf", "ch", "chop", "cs", "ct", "cu", "da", "de", "di", "dl", "dn", "do", +"ds", "dt", "dw", "dy", "ec", "ef", "eh", "el", "em", "eo", "ep", "ev", "evc", +"ex", "fallback", "fc", "feature", "fi", "fl", "flig", "fo", "fp", "ft", "ftr", +"fz", "fzoom", "hc", "he", "hidechar", "hl", "hp", "ht", "hw", "hx", "hy", +"hylang", "i", "i" , "ie", "if", "ig", "in", "ip", "it", "ix", "kern", +"kernafter", "kernbefore", "kernpair", "lc", "lc_ctype", "lg", "lhang", "li", +"ll", "ln", "lo", "lp", "ls", "lt", "m1", "m2", "m3", "m4", "mc", "mk", "mo", +"n1", "n2", "na", "ne", "nf", "nh", "nl", "nm", "nn", "np", "nr", "ns", "nx", +"of", "oh", "os", "pa", "papersize", "pc", "pi", "pl", "pm", "pn", "po", "pp", +"ps", "q", "q" , "r", "r" , "rb", "rd", "re", "recursionlimit", "return", +"rhang", "rm", "rn", "ro", "rr", "rs", "rt", "sb", "sc", "sh", "shift", "sk", +"so", "sp", "ss", "st", "sv", "sz", "ta", "tc", "th", "ti", "tl", "tm", "tp", +"tr", "track", "u", "uf", "uh", "ul", "vs", "wh", "xflag", "xp", "yr", +0 }; static int lineno; /* current line number in input file */ @@ -210,8 +234,18 @@ main(int argc, char **argv) for (i=0; br[i].opbr; i++) ; for (cp=argv[1]+3; cp[-1]; cp += 6) { - br[i].opbr = strncpy(malloc(3), cp, 2); - br[i].clbr = strncpy(malloc(3), cp+3, 2); + char *tmp; + + if (i >= MAXBR) + errx(1, "too many pairs"); + if ((tmp = malloc(3)) == NULL) + err(1, "malloc"); + strlcpy(tmp, cp, 3); + br[i].opbr = tmp; + if ((tmp = malloc(3)) == NULL) + err(1, "malloc"); + strlcpy(tmp, cp+3, 3); + br[i].clbr = tmp; addmac(br[i].opbr); /* knows pairs are also known cmds */ addmac(br[i].clbr); i++; @@ -250,7 +284,7 @@ main(int argc, char **argv) nfiles = argc - 1; if (nfiles > 0) { - for (i=1; i 0; lineno++) { if (line[0] == '.') { /* * find and isolate the macro/command name. @@ -320,9 +357,9 @@ process(FILE *f) * At this point we process the line looking * for \s and \f. */ - for (i=0; line[i]; i++) - if (line[i]=='\\' && (i==0 || line[i-1]!='\\')) { - if (!sflag && line[++i]=='s') { + for (i = 0; line[i]; i++) + if (line[i] == '\\' && (i == 0 || line[i-1] != '\\')) { + if (!sflag && line[++i] == 's') { pl = line[++i]; if (isdigit(pl)) { n = pl - '0'; @@ -333,7 +370,8 @@ process(FILE *f) n = 10 * n + line[i] - '0'; i--; if (n == 0) { - if (stk[stktop].opno == SZ) { + if (stktop >= 0 && + stk[stktop].opno == SZ) { stktop--; } else { pe(lineno); @@ -345,10 +383,11 @@ process(FILE *f) stk[stktop].parm = n; stk[stktop].lno = lineno; } - } else if (!fflag && line[i]=='f') { + } else if (!fflag && line[i] == 'f') { n = line[++i]; if (n == 'P') { - if (stk[stktop].opno == FT) { + if (stktop >= 0 && + stk[stktop].opno == FT) { stktop--; } else { pe(lineno); @@ -363,11 +402,12 @@ process(FILE *f) } } } + free(line); /* * We've hit the end and look at all this stuff that hasn't been * matched yet! Complain, complain. */ - for (i=stktop; i>=0; i--) { + for (i = stktop; i >= 0; i--) { complain(i); } } @@ -395,7 +435,8 @@ prop(int i) break; default: printf("Bug: stk[%d].opno = %d = .%s, .%s", - i, stk[i].opno, br[stk[i].opno].opbr, br[stk[i].opno].clbr); + i, stk[i].opno, br[stk[i].opno].opbr, + br[stk[i].opno].clbr); } } @@ -557,17 +598,20 @@ addmac(const char *mac) } /* binsrch sets slot as a side effect */ #ifdef DEBUG -printf("binsrch(%s) -> %d\n", mac, slot); + printf("binsrch(%s) -> %d\n", mac, slot); #endif loc = &knowncmds[slot]; src = &knowncmds[ncmds-1]; dest = src+1; while (dest > loc) *dest-- = *src--; - *loc = strcpy(malloc(3), mac); + if ((*loc = strdup(mac)) == NULL) + err(1, "strdup"); ncmds++; #ifdef DEBUG -printf("after: %s %s %s %s %s, %d cmds\n", knowncmds[slot-2], knowncmds[slot-1], knowncmds[slot], knowncmds[slot+1], knowncmds[slot+2], ncmds); + printf("after: %s %s %s %s %s, %d cmds\n", + knowncmds[slot-2], knowncmds[slot-1], knowncmds[slot], + knowncmds[slot+1], knowncmds[slot+2], ncmds); #endif } @@ -592,12 +636,12 @@ binsrch(const char *mac) if (d == 0) d = p[1] - mac[1]; if (d == 0) - return mid; + return (mid); if (d < 0) bot = mid + 1; else top = mid - 1; } slot = bot; /* place it would have gone */ - return -1; + return (-1); } From owner-svn-src-all@FreeBSD.ORG Fri May 15 09:57:01 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0B37CEA3; Fri, 15 May 2015 09:57:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ED17113A1; Fri, 15 May 2015 09:57:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4F9v047037283; Fri, 15 May 2015 09:57:00 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4F9v0I5037280; Fri, 15 May 2015 09:57:00 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201505150957.t4F9v0I5037280@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Fri, 15 May 2015 09:57:00 +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: r282952 - in stable/10: usr.bin/man usr.sbin/bhyve 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.20 Precedence: list List-Id: "SVN commit messages 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, 15 May 2015 09:57:01 -0000 Author: trasz Date: Fri May 15 09:56:59 2015 New Revision: 282952 URL: https://svnweb.freebsd.org/changeset/base/282952 Log: MFC r274720: Fix improper .Fx macro usage. Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.bin/man/man.1 stable/10/usr.sbin/bhyve/bhyve.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/man/man.1 ============================================================================== --- stable/10/usr.bin/man/man.1 Fri May 15 09:00:20 2015 (r282951) +++ stable/10/usr.bin/man/man.1 Fri May 15 09:56:59 2015 (r282952) @@ -61,23 +61,32 @@ restricts the search to the specific sec The sections of the manual are: .Bl -enum -offset indent -compact .It -.Fx General Commands Manual +.Fx +General Commands Manual .It -.Fx System Calls Manual +.Fx +System Calls Manual .It -.Fx Library Functions Manual +.Fx +Library Functions Manual .It -.Fx Kernel Interfaces Manual +.Fx +Kernel Interfaces Manual .It -.Fx File Formats Manual +.Fx +File Formats Manual .It -.Fx Games Manual +.Fx +Games Manual .It -.Fx Miscellaneous Information Manual +.Fx +Miscellaneous Information Manual .It -.Fx System Manager's Manual +.Fx +System Manager's Manual .It -.Fx Kernel Developer's Manual +.Fx +Kernel Developer's Manual .El .Pp Options that Modified: stable/10/usr.sbin/bhyve/bhyve.8 ============================================================================== --- stable/10/usr.sbin/bhyve/bhyve.8 Fri May 15 09:00:20 2015 (r282951) +++ stable/10/usr.sbin/bhyve/bhyve.8 Fri May 15 09:56:59 2015 (r282952) @@ -70,7 +70,8 @@ Required for guests. .It Fl b Enable a low-level console device supported by -.Fx kernels compiled with +.Fx +kernels compiled with .Cd "device bvmconsole" . This option will be deprecated in a future version. .It Fl c Ar numcpus From owner-svn-src-all@FreeBSD.ORG Fri May 15 10:34:41 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 44DDD2D3; Fri, 15 May 2015 10:34:41 +0000 (UTC) Received: from mailrelay105.isp.belgacom.be (mailrelay105.isp.belgacom.be [195.238.20.132]) by mx1.freebsd.org (Postfix) with ESMTP id 5687B1788; Fri, 15 May 2015 10:34:39 +0000 (UTC) X-Belgacom-Dynamic: yes X-Cloudmark-SP-Filtered: true X-Cloudmark-SP-Result: v=1.1 cv=KjSUzZxnmGSQ+6+vr4Kd0OSSUs/Ia9ciENKrYVIfwLU= c=1 sm=2 a=kj9zAlcOel0A:10 a=6I5d2MoRAAAA:8 a=sqNYIKBhKFaNiZG62HEA:9 a=CjuIK1q_8ugA:10 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2B0BgB9ylVV//KPsFtcgw9UUQ23PY59hXYCgTtNAQEBAQEBgQuEIwEBBDocIxALFAQJJQ8qHgYTiDABCNYfAQEBAQEBAQMBAQEBAQEBFwSLOoRSMweELQEElwqGSZcAI4IKHIFUPDGCRgEBAQ Received: from 242.143-176-91.adsl-dyn.isp.belgacom.be (HELO kalimero.tijl.coosemans.org) ([91.176.143.242]) by relay.skynet.be with ESMTP; 15 May 2015 12:33:31 +0200 Received: from kalimero.tijl.coosemans.org (kalimero.tijl.coosemans.org [127.0.0.1]) by kalimero.tijl.coosemans.org (8.14.9/8.14.9) with ESMTP id t4FAXRub091613; Fri, 15 May 2015 12:33:28 +0200 (CEST) (envelope-from tijl@FreeBSD.org) Date: Fri, 15 May 2015 12:33:27 +0200 From: Tijl Coosemans To: "Pedro F. Giffuni" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r282907 - head/sys/sys Message-ID: <20150515123327.45621037@kalimero.tijl.coosemans.org> In-Reply-To: <201505141549.t4EFnnQg094250@svn.freebsd.org> References: <201505141549.t4EFnnQg094250@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 15 May 2015 10:34:41 -0000 On Thu, 14 May 2015 15:49:49 +0000 (UTC) "Pedro F. Giffuni" wrote: > Author: pfg > Date: Thu May 14 15:49:48 2015 > New Revision: 282907 > URL: https://svnweb.freebsd.org/changeset/base/282907 > > Log: > Add new __unreachable() builtin > > This is one of the few post gcc4.2 builtins that has been implemented by > clang: > > __builtin_unreachable is used to indicate that a specific point in the > program cannot be reached, even if the compiler might otherwise think it > can. This is useful to improve optimization and eliminates certain > warnings. > > Hinted by: NetBSD > Differential Revision: https://reviews.freebsd.org/D2536 > > Modified: > head/sys/sys/cdefs.h > > Modified: head/sys/sys/cdefs.h > ============================================================================== > --- head/sys/sys/cdefs.h Thu May 14 15:14:03 2015 (r282906) > +++ head/sys/sys/cdefs.h Thu May 14 15:49:48 2015 (r282907) > @@ -388,6 +388,12 @@ > #define __alloc_size(x) > #endif > > +#if __has_builtin(__builtin_unreachable) || __GNUC_PREREQ__(4, 6) > +#define __unreachable() __builtin_unreachable() > +#else > +#define __unreachable() do {} while (/*CONSTCOND*/0) __builtin_unreachable() can be used in expressions so I think it's better to replace do-while with ((void)0). You can then do things like this: #define assume(e) ((e) ? (void)0 : __unreachable()) (like assert(e) but without error) From owner-svn-src-all@FreeBSD.ORG Fri May 15 10:42:50 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E7FD371A; Fri, 15 May 2015 10:42:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D59E0188D; Fri, 15 May 2015 10:42:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4FAgnLM061452; Fri, 15 May 2015 10:42:49 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4FAgn6S061450; Fri, 15 May 2015 10:42:49 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201505151042.t4FAgn6S061450@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Fri, 15 May 2015 10:42:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r282953 - in stable/10: sbin/devd sys/geom 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.20 Precedence: list List-Id: "SVN commit messages 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, 15 May 2015 10:42:50 -0000 Author: trasz Date: Fri May 15 10:42:48 2015 New Revision: 282953 URL: https://svnweb.freebsd.org/changeset/base/282953 Log: MFC r277170: Add devd(8) notifications for creation and destruction of GEOM devices. Sponsored by: The FreeBSD Foundation Modified: stable/10/sbin/devd/devd.conf.5 stable/10/sys/geom/geom_dev.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/devd/devd.conf.5 ============================================================================== --- stable/10/sbin/devd/devd.conf.5 Fri May 15 09:56:59 2015 (r282952) +++ stable/10/sbin/devd/devd.conf.5 Fri May 15 10:42:48 2015 (r282953) @@ -41,7 +41,7 @@ .\" ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS .\" SOFTWARE. .\" -.Dd February 22, 2013 +.Dd January 14, 2015 .Dt DEVD.CONF 5 .Os .Sh NAME @@ -370,6 +370,33 @@ node is destroyed. .El .El .Pp +.It Li GEOM +Events related to the +.Xr geom 4 +framework. +The difference compared to +.Li DEVFS +is that +.Li GEOM +only includes disk-like devices. +.Bl -tag -width ".Sy Subsystem" -compact +.It Sy Subsystem +.It Li DEV +.Bl -tag -width ".Li MEDIACHANGE" -compact +.It Sy Type +.It Li CREATE +A +.Xr geom 4 +device node is created. +.It Li DESTROY +A +.Xr geom 4 +device node is destroyed. +.It Li MEDIACHANGE +Physical media has changed. +.El +.El +.Pp .It Li USB Events related to the USB subsystem. .Bl -tag -width ".Sy Subsystem" -compact Modified: stable/10/sys/geom/geom_dev.c ============================================================================== --- stable/10/sys/geom/geom_dev.c Fri May 15 09:56:59 2015 (r282952) +++ stable/10/sys/geom/geom_dev.c Fri May 15 10:42:48 2015 (r282953) @@ -169,12 +169,15 @@ g_dev_destroy(void *arg, int flags __unu struct g_consumer *cp; struct g_geom *gp; struct g_dev_softc *sc; + char buf[SPECNAMELEN + 6]; g_topology_assert(); cp = arg; gp = cp->geom; sc = cp->private; g_trace(G_T_TOPOLOGY, "g_dev_destroy(%p(%s))", cp, gp->name); + snprintf(buf, sizeof(buf), "cdev=%s", gp->name); + devctl_notify_f("GEOM", "DEV", "DESTROY", buf, M_WAITOK); if (cp->acr > 0 || cp->acw > 0 || cp->ace > 0) g_access(cp, -cp->acr, -cp->acw, -cp->ace); g_detach(cp); @@ -209,11 +212,14 @@ g_dev_attrchanged(struct g_consumer *cp, dev = sc->sc_dev; snprintf(buf, sizeof(buf), "cdev=%s", dev->si_name); devctl_notify_f("DEVFS", "CDEV", "MEDIACHANGE", buf, M_WAITOK); + devctl_notify_f("GEOM", "DEV", "MEDIACHANGE", buf, M_WAITOK); dev = sc->sc_alias; if (dev != NULL) { snprintf(buf, sizeof(buf), "cdev=%s", dev->si_name); devctl_notify_f("DEVFS", "CDEV", "MEDIACHANGE", buf, M_WAITOK); + devctl_notify_f("GEOM", "DEV", "MEDIACHANGE", buf, + M_WAITOK); } return; } @@ -269,7 +275,7 @@ g_dev_taste(struct g_class *mp, struct g struct g_dev_softc *sc; int error, len; struct cdev *dev, *adev; - char buf[64], *val; + char buf[SPECNAMELEN + 6], *val; g_trace(G_T_TOPOLOGY, "dev_taste(%s,%s)", mp->name, pp->name); g_topology_assert(); @@ -324,6 +330,8 @@ g_dev_taste(struct g_class *mp, struct g } g_dev_attrchanged(cp, "GEOM::physpath"); + snprintf(buf, sizeof(buf), "cdev=%s", gp->name); + devctl_notify_f("GEOM", "DEV", "CREATE", buf, M_WAITOK); return (gp); } From owner-svn-src-all@FreeBSD.ORG Fri May 15 10:47:26 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6E877A32; Fri, 15 May 2015 10:47:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5D09318C7; Fri, 15 May 2015 10:47:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4FAlQLU062304; Fri, 15 May 2015 10:47:26 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4FAlQDF062303; Fri, 15 May 2015 10:47:26 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201505151047.t4FAlQDF062303@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Fri, 15 May 2015 10:47: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: r282954 - stable/10/sys/dev/iscsi 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.20 Precedence: list List-Id: "SVN commit messages 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, 15 May 2015 10:47:26 -0000 Author: trasz Date: Fri May 15 10:47:25 2015 New Revision: 282954 URL: https://svnweb.freebsd.org/changeset/base/282954 Log: MFC r278233: Fix error handling. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/dev/iscsi/iscsi.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/iscsi/iscsi.c ============================================================================== --- stable/10/sys/dev/iscsi/iscsi.c Fri May 15 10:42:48 2015 (r282953) +++ stable/10/sys/dev/iscsi/iscsi.c Fri May 15 10:47:25 2015 (r282954) @@ -1754,15 +1754,17 @@ iscsi_ioctl_session_add(struct iscsi_sof arc4rand(&is->is_isid[1], 5, 0); is->is_tsih = 0; callout_init(&is->is_callout, 1); - callout_reset(&is->is_callout, 1 * hz, iscsi_callout, is); - TAILQ_INSERT_TAIL(&sc->sc_sessions, is, is_next); error = kthread_add(iscsi_maintenance_thread, is, NULL, NULL, 0, 0, "iscsimt"); if (error != 0) { ISCSI_SESSION_WARN(is, "kthread_add(9) failed with error %d", error); + sx_xunlock(&sc->sc_lock); return (error); } + callout_reset(&is->is_callout, 1 * hz, iscsi_callout, is); + TAILQ_INSERT_TAIL(&sc->sc_sessions, is, is_next); + /* * Trigger immediate reconnection. */ From owner-svn-src-all@FreeBSD.ORG Fri May 15 10:50:59 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 845A7BD6; Fri, 15 May 2015 10:50:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 731CF1984; Fri, 15 May 2015 10:50:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4FAoxi3066382; Fri, 15 May 2015 10:50:59 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4FAoxxr066381; Fri, 15 May 2015 10:50:59 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201505151050.t4FAoxxr066381@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Fri, 15 May 2015 10:50: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: r282955 - stable/10/sys/dev/iscsi 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.20 Precedence: list List-Id: "SVN commit messages 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, 15 May 2015 10:50:59 -0000 Author: trasz Date: Fri May 15 10:50:58 2015 New Revision: 282955 URL: https://svnweb.freebsd.org/changeset/base/282955 Log: MFC r278237: Don't call callout_drain() with iscsi mutex held; this fixes a warning that was introduced recently. While here, don't try to access is_terminating without lock. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/dev/iscsi/iscsi.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/iscsi/iscsi.c ============================================================================== --- stable/10/sys/dev/iscsi/iscsi.c Fri May 15 10:47:25 2015 (r282954) +++ stable/10/sys/dev/iscsi/iscsi.c Fri May 15 10:50:58 2015 (r282955) @@ -425,6 +425,7 @@ iscsi_maintenance_thread_terminate(struc sx_xunlock(&sc->sc_lock); icl_conn_close(is->is_conn); + callout_drain(&is->is_callout); ISCSI_SESSION_LOCK(is); @@ -438,8 +439,6 @@ iscsi_maintenance_thread_terminate(struc cv_signal(&is->is_login_cv); #endif - callout_drain(&is->is_callout); - iscsi_session_cleanup(is, true); KASSERT(TAILQ_EMPTY(&is->is_outstanding), @@ -515,6 +514,7 @@ iscsi_session_reconnect(struct iscsi_ses static void iscsi_session_terminate(struct iscsi_session *is) { + if (is->is_terminating) return; @@ -536,12 +536,14 @@ iscsi_callout(void *context) is = context; - if (is->is_terminating) + ISCSI_SESSION_LOCK(is); + if (is->is_terminating) { + ISCSI_SESSION_UNLOCK(is); return; + } callout_schedule(&is->is_callout, 1 * hz); - ISCSI_SESSION_LOCK(is); is->is_timeout++; if (is->is_waiting_for_iscsid) { From owner-svn-src-all@FreeBSD.ORG Fri May 15 10:53:07 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6A454D3E; Fri, 15 May 2015 10:53:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5920B19E6; Fri, 15 May 2015 10:53:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4FAr7op066721; Fri, 15 May 2015 10:53:07 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4FAr7jc066720; Fri, 15 May 2015 10:53:07 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201505151053.t4FAr7jc066720@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Fri, 15 May 2015 10:53:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r282956 - stable/10/usr.sbin/ctladm 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.20 Precedence: list List-Id: "SVN commit messages 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, 15 May 2015 10:53:07 -0000 Author: trasz Date: Fri May 15 10:53:06 2015 New Revision: 282956 URL: https://svnweb.freebsd.org/changeset/base/282956 Log: MFC r278316: Make "ctladm islist" ignore unknown elements, so the old version continues to work with newer kernel. Other ctladm(8) "*list" subcommands seem to already handle it in a reasonable way. Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.sbin/ctladm/ctladm.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/ctladm/ctladm.c ============================================================================== --- stable/10/usr.sbin/ctladm/ctladm.c Fri May 15 10:50:58 2015 (r282955) +++ stable/10/usr.sbin/ctladm/ctladm.c Fri May 15 10:53:06 2015 (r282956) @@ -3559,8 +3559,12 @@ cctl_islist_end_element(void *user_data, } else if (strcmp(name, "connection") == 0) { islist->cur_conn = NULL; } else if (strcmp(name, "ctlislist") == 0) { - } else - errx(1, "unknown element %s", name); + /* Nothing. */ + } else { + /* + * Unknown element; ignore it for forward compatiblity. + */ + } free(str); } From owner-svn-src-all@FreeBSD.ORG Fri May 15 10:54:41 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3DB57F59; Fri, 15 May 2015 10:54:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2C2E019F7; Fri, 15 May 2015 10:54:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4FAsfDK067099; Fri, 15 May 2015 10:54:41 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4FAsf03067098; Fri, 15 May 2015 10:54:41 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201505151054.t4FAsf03067098@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Fri, 15 May 2015 10:54:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r282957 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 15 May 2015 10:54:41 -0000 Author: trasz Date: Fri May 15 10:54:40 2015 New Revision: 282957 URL: https://svnweb.freebsd.org/changeset/base/282957 Log: MFC r278352: Remove useless comment. Sponsored by: The FreeBSD Foundation Modified: stable/10/lib/libc/sys/setresuid.2 Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/sys/setresuid.2 ============================================================================== --- stable/10/lib/libc/sys/setresuid.2 Fri May 15 10:53:06 2015 (r282956) +++ stable/10/lib/libc/sys/setresuid.2 Fri May 15 10:54:40 2015 (r282957) @@ -19,7 +19,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 13, 2001 +.Dd February 7, 2015 .Dt SETRESUID 2 .Os .Sh NAME @@ -90,10 +90,5 @@ was invalid. .Xr setregid 2 , .Xr setreuid 2 , .Xr setuid 2 -.Sh STANDARDS -These system calls are not available on many platforms. -They exist in -.Fx -to support Linux binaries linked against GNU libc2. .Sh HISTORY These functions first appeared in HP-UX. From owner-svn-src-all@FreeBSD.ORG Fri May 15 10:56:23 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C1F93175; Fri, 15 May 2015 10:56:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B013C1A0D; Fri, 15 May 2015 10:56:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4FAuNJs067432; Fri, 15 May 2015 10:56:23 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4FAuNSa067429; Fri, 15 May 2015 10:56:23 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201505151056.t4FAuNSa067429@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Fri, 15 May 2015 10:56: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: r282958 - in stable/10/usr.sbin/bluetooth: hccontrol sdpcontrol 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.20 Precedence: list List-Id: "SVN commit messages 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, 15 May 2015 10:56:23 -0000 Author: trasz Date: Fri May 15 10:56:22 2015 New Revision: 282958 URL: https://svnweb.freebsd.org/changeset/base/282958 Log: MFC r278360: Make hccontrol(8) and sdpcontrol(8) appear in "man -k bluetooth" output. Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.sbin/bluetooth/hccontrol/hccontrol.8 stable/10/usr.sbin/bluetooth/sdpcontrol/sdpcontrol.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bluetooth/hccontrol/hccontrol.8 ============================================================================== --- stable/10/usr.sbin/bluetooth/hccontrol/hccontrol.8 Fri May 15 10:54:40 2015 (r282957) +++ stable/10/usr.sbin/bluetooth/hccontrol/hccontrol.8 Fri May 15 10:56:22 2015 (r282958) @@ -25,12 +25,12 @@ .\" $Id: hccontrol.8,v 1.6 2003/08/06 21:26:38 max Exp $ .\" $FreeBSD$ .\" -.Dd June 14, 2002 +.Dd February 7, 2015 .Dt HCCONTROL 8 .Os .Sh NAME .Nm hccontrol -.Nd HCI configuration utility +.Nd Bluetooth HCI configuration utility .Sh SYNOPSIS .Nm .Op Fl hN Modified: stable/10/usr.sbin/bluetooth/sdpcontrol/sdpcontrol.8 ============================================================================== --- stable/10/usr.sbin/bluetooth/sdpcontrol/sdpcontrol.8 Fri May 15 10:54:40 2015 (r282957) +++ stable/10/usr.sbin/bluetooth/sdpcontrol/sdpcontrol.8 Fri May 15 10:56:22 2015 (r282958) @@ -25,12 +25,12 @@ .\" $Id: sdpcontrol.8,v 1.1 2003/09/08 02:27:27 max Exp $ .\" $FreeBSD$ .\" -.Dd September 7, 2003 +.Dd February 7, 2015 .Dt SDPCONTROL 8 .Os .Sh NAME .Nm sdpcontrol -.Nd SDP query utility +.Nd Bluetooth Service Discovery Protocol query utility .Sh SYNOPSIS .Nm .Fl h From owner-svn-src-all@FreeBSD.ORG Fri May 15 11:00:13 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 30C1A304; Fri, 15 May 2015 11:00:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1F5411A3E; Fri, 15 May 2015 11:00:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4FB0C8w068100; Fri, 15 May 2015 11:00:12 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4FB0C8k068099; Fri, 15 May 2015 11:00:12 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201505151100.t4FB0C8k068099@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Fri, 15 May 2015 11:00:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r282959 - stable/10/sbin/mount_fusefs 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.20 Precedence: list List-Id: "SVN commit messages 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, 15 May 2015 11:00:13 -0000 Author: trasz Date: Fri May 15 11:00:12 2015 New Revision: 282959 URL: https://svnweb.freebsd.org/changeset/base/282959 Log: MFC r279489: Make the "automounted" flag work for FUSE filesystems. PR: 192852 Submitted by: taku at tackymt.homeip.net (earlier version) Sponsored by: The FreeBSD Foundation Modified: stable/10/sbin/mount_fusefs/mount_fusefs.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/mount_fusefs/mount_fusefs.c ============================================================================== --- stable/10/sbin/mount_fusefs/mount_fusefs.c Fri May 15 10:56:22 2015 (r282958) +++ stable/10/sbin/mount_fusefs/mount_fusefs.c Fri May 15 11:00:12 2015 (r282959) @@ -73,6 +73,13 @@ static struct mntopt mopts[] = { { "subtype=", 0, ALTF_SUBTYPE, 1 }, #define ALTF_SYNC_UNMOUNT 0x80 { "sync_unmount", 0, ALTF_SYNC_UNMOUNT, 1 }, + /* + * MOPT_AUTOMOUNTED, included by MOPT_STDOPTS, does not fit into + * the 'flags' argument to nmount(2). We have to abuse altflags + * to pass it, as string, via iovec. + */ + #define ALTF_AUTOMOUNTED 0x100 + { "automounted", 0, ALTF_AUTOMOUNTED, 1 }, /* Linux specific options, we silently ignore them */ { "fsname=", 0, 0x00, 1 }, { "fd=", 0, 0x00, 1 }, From owner-svn-src-all@FreeBSD.ORG Fri May 15 11:03:20 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A8872471; Fri, 15 May 2015 11:03:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8A7071B01; Fri, 15 May 2015 11:03:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4FB3KTX072116; Fri, 15 May 2015 11:03:20 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4FB3JeS072113; Fri, 15 May 2015 11:03:19 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201505151103.t4FB3JeS072113@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Fri, 15 May 2015 11:03:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r282960 - stable/10/sys/fs/fuse 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.20 Precedence: list List-Id: "SVN commit messages 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, 15 May 2015 11:03:20 -0000 Author: trasz Date: Fri May 15 11:03:19 2015 New Revision: 282960 URL: https://svnweb.freebsd.org/changeset/base/282960 Log: MFC r279536: Make fuse(4) respect FOPEN_DIRECT_IO. This is required for correct operation of GlusterFS. PR: 192701 Submitted by: harsha at harshavardhana.net Reviewed by: kib@ Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/fs/fuse/fuse_node.c stable/10/sys/fs/fuse/fuse_node.h stable/10/sys/fs/fuse/fuse_vnops.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/fuse/fuse_node.c ============================================================================== --- stable/10/sys/fs/fuse/fuse_node.c Fri May 15 11:00:12 2015 (r282959) +++ stable/10/sys/fs/fuse/fuse_node.c Fri May 15 11:03:19 2015 (r282960) @@ -273,8 +273,26 @@ fuse_vnode_open(struct vnode *vp, int32_ * Funcation is called for every vnode open. * Merge fuse_open_flags it may be 0 * - * XXXIP: Handle FOPEN_DIRECT_IO and FOPEN_KEEP_CACHE + * XXXIP: Handle FOPEN_KEEP_CACHE */ + /* + * Ideally speaking, direct io should be enabled on + * fd's but do not see of any way of providing that + * this implementation. + + * Also cannot think of a reason why would two + * different fd's on same vnode would like + * have DIRECT_IO turned on and off. But linux + * based implementation works on an fd not an + * inode and provides such a feature. + * + * XXXIP: Handle fd based DIRECT_IO + */ + if (fuse_open_flags & FOPEN_DIRECT_IO) { + VTOFUD(vp)->flag |= FN_DIRECTIO; + } else { + VTOFUD(vp)->flag &= ~FN_DIRECTIO; + } if (vnode_vtype(vp) == VREG) { /* XXXIP prevent getattr, by using cached node size */ Modified: stable/10/sys/fs/fuse/fuse_node.h ============================================================================== --- stable/10/sys/fs/fuse/fuse_node.h Fri May 15 11:00:12 2015 (r282959) +++ stable/10/sys/fs/fuse/fuse_node.h Fri May 15 11:03:19 2015 (r282960) @@ -67,6 +67,7 @@ #define FN_FLUSHINPROG 0x00000040 #define FN_FLUSHWANT 0x00000080 #define FN_SIZECHANGE 0x00000100 +#define FN_DIRECTIO 0x00000200 struct fuse_vnode_data { /** self **/ Modified: stable/10/sys/fs/fuse/fuse_vnops.c ============================================================================== --- stable/10/sys/fs/fuse/fuse_vnops.c Fri May 15 11:00:12 2015 (r282959) +++ stable/10/sys/fs/fuse/fuse_vnops.c Fri May 15 11:03:19 2015 (r282960) @@ -1173,6 +1173,11 @@ fuse_vnop_read(struct vop_read_args *ap) if (fuse_isdeadfs(vp)) { return ENXIO; } + + if (VTOFUD(vp)->flag & FN_DIRECTIO) { + ioflag |= IO_DIRECT; + } + return fuse_io_dispatch(vp, uio, ioflag, cred); } @@ -1712,6 +1717,10 @@ fuse_vnop_write(struct vop_write_args *a } fuse_vnode_refreshsize(vp, cred); + if (VTOFUD(vp)->flag & FN_DIRECTIO) { + ioflag |= IO_DIRECT; + } + return fuse_io_dispatch(vp, uio, ioflag, cred); } From owner-svn-src-all@FreeBSD.ORG Fri May 15 11:06:11 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2AEB6606; Fri, 15 May 2015 11:06:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 198791B29; Fri, 15 May 2015 11:06:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4FB6A6g072577; Fri, 15 May 2015 11:06:10 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4FB6AXG072576; Fri, 15 May 2015 11:06:10 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201505151106.t4FB6AXG072576@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Fri, 15 May 2015 11:06: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: r282961 - stable/10/etc/autofs 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.20 Precedence: list List-Id: "SVN commit messages 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, 15 May 2015 11:06:11 -0000 Author: trasz Date: Fri May 15 11:06:10 2015 New Revision: 282961 URL: https://svnweb.freebsd.org/changeset/base/282961 Log: MFC r280321: Make the autofs LDAP script cope with server returning entries with ENTRY_ATTRIBUTE (eg cn) after the VALUE_ATTRIBUTE (eg automountInformation), instead of before. PR: 198557 Sponsored by: The FreeBSD Foundation Modified: stable/10/etc/autofs/include_ldap Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/autofs/include_ldap ============================================================================== --- stable/10/etc/autofs/include_ldap Fri May 15 11:03:19 2015 (r282960) +++ stable/10/etc/autofs/include_ldap Fri May 15 11:06:10 2015 (r282961) @@ -15,24 +15,41 @@ $1 == "'$ENTRY_ATTRIBUTE':" { key = $2 } -$1 == "'$VALUE_ATTRIBUTE':" && key { - printf "%s%s", key, OFS - key = "" - for (i=2; i 0 { printf "%s%s", key, OFS - key = "" - for (i=2; i Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1A39F753; Fri, 15 May 2015 11:07:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 08FDD1B40; Fri, 15 May 2015 11:07:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4FB7nWd072847; Fri, 15 May 2015 11:07:49 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4FB7nS6072846; Fri, 15 May 2015 11:07:49 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201505151107.t4FB7nS6072846@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Fri, 15 May 2015 11:07:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r282962 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 15 May 2015 11:07:50 -0000 Author: trasz Date: Fri May 15 11:07:49 2015 New Revision: 282962 URL: https://svnweb.freebsd.org/changeset/base/282962 Log: MFC r280983: Update open(2) to make it more obvious that O_NOCTTY and O_TTY_INIT are ignored. Sponsored by: The FreeBSD Foundation Modified: stable/10/lib/libc/sys/open.2 Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/sys/open.2 ============================================================================== --- stable/10/lib/libc/sys/open.2 Fri May 15 11:06:10 2015 (r282961) +++ stable/10/lib/libc/sys/open.2 Fri May 15 11:07:49 2015 (r282962) @@ -28,7 +28,7 @@ .\" @(#)open.2 8.2 (Berkeley) 11/16/93 .\" $FreeBSD$ .\" -.Dd February 7, 2013 +.Dd April 2, 2015 .Dt OPEN 2 .Os .Sh NAME @@ -115,8 +115,8 @@ O_DIRECT eliminate or reduce cache effec O_FSYNC synchronous writes O_SYNC synchronous writes O_NOFOLLOW do not follow symlinks -O_NOCTTY don't assign controlling terminal -O_TTY_INIT restore default terminal attributes +O_NOCTTY ignored +O_TTY_INIT ignored O_DIRECTORY error if file is not a directory O_CLOEXEC set FD_CLOEXEC upon open .Ed From owner-svn-src-all@FreeBSD.ORG Fri May 15 11:10:02 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0D70C8C7; Fri, 15 May 2015 11:10:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F028C1B78; Fri, 15 May 2015 11:10:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4FBA1pr073248; Fri, 15 May 2015 11:10:01 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4FBA1Jt073247; Fri, 15 May 2015 11:10:01 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201505151110.t4FBA1Jt073247@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Fri, 15 May 2015 11:10: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: r282963 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 15 May 2015 11:10:02 -0000 Author: trasz Date: Fri May 15 11:10:01 2015 New Revision: 282963 URL: https://svnweb.freebsd.org/changeset/base/282963 Log: MFC r281265: Add a hint that "device ctl" kind of depends on "device iscsi". It actually doesn't - "device ctl" automatically pulls in ICL, which would normally be a part of iscsi.ko. However, doing it that way makes iscsi.ko unloadable, and building ctl.ko without iscsi.ko (using MODULES_OVERRIDE) results in ctl.ko that is unloadable, due to missing symbols that would be resolved to iscsi.ko. And since the symbols are named "icl_whatever", it's not obvious that it's iscsi.ko that's required. If there is a better way - let me know. Sponsored by: The FreeBSD Foundation Modified: stable/10/share/man/man4/ctl.4 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/ctl.4 ============================================================================== --- stable/10/share/man/man4/ctl.4 Fri May 15 11:07:49 2015 (r282962) +++ stable/10/share/man/man4/ctl.4 Fri May 15 11:10:01 2015 (r282963) @@ -23,7 +23,7 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD$ -.Dd October 23, 2014 +.Dd April 8, 2015 .Dt CTL 4 .Os .Sh NAME @@ -34,6 +34,7 @@ To compile this driver into the kernel, place the following line in your kernel configuration file: .Bd -ragged -offset indent +.Cd "device iscsi" .Cd "device ctl" .Ed .Pp From owner-svn-src-all@FreeBSD.ORG Fri May 15 12:07:45 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4C77C5F2; Fri, 15 May 2015 12:07:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3A280121C; Fri, 15 May 2015 12:07:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4FC7jK5002455; Fri, 15 May 2015 12:07:45 GMT (envelope-from jch@FreeBSD.org) Received: (from jch@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4FC7iEH002451; Fri, 15 May 2015 12:07:44 GMT (envelope-from jch@FreeBSD.org) Message-Id: <201505151207.t4FC7iEH002451@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jch set sender to jch@FreeBSD.org using -f From: Julien Charbon Date: Fri, 15 May 2015 12:07:44 +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: r282964 - stable/10/sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 15 May 2015 12:07:45 -0000 Author: jch Date: Fri May 15 12:07:43 2015 New Revision: 282964 URL: https://svnweb.freebsd.org/changeset/base/282964 Log: MFC: r280904, r280990, r281599 r280904: Use appropriate timeout_t* instead of void* in tcp_timer_activate() Suggested by: imp Differential Revision: https://reviews.freebsd.org/D2154 Reviewed by: imp, jhb Approved by: jhb r280990: Provide better debugging information in tcp_timer_activate() and tcp_timer_active() Differential Revision: https://reviews.freebsd.org/D2179 Suggested by: bz Reviewed by: jhb Approved by: jhb r281599: Fix an old and well-documented use-after-free race condition in TCP timers: - Add a reference from tcpcb to its inpcb - Defer tcpcb deletion until TCP timers have finished Differential Revision: https://reviews.freebsd.org/D2079 Submitted by: jch, Marc De La Gueronniere Reviewed by: imp, rrs, adrian, jhb, bz Approved by: jhb Sponsored by: Verisign, Inc. Modified: stable/10/sys/netinet/tcp_subr.c stable/10/sys/netinet/tcp_timer.c stable/10/sys/netinet/tcp_timer.h stable/10/sys/netinet/tcp_var.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/tcp_subr.c ============================================================================== --- stable/10/sys/netinet/tcp_subr.c Fri May 15 11:10:01 2015 (r282963) +++ stable/10/sys/netinet/tcp_subr.c Fri May 15 12:07:43 2015 (r282964) @@ -230,6 +230,7 @@ static struct inpcb *tcp_notify(struct i static struct inpcb *tcp_mtudisc_notify(struct inpcb *, int); static char * tcp_log_addr(struct in_conninfo *inc, struct tcphdr *th, void *ip4hdr, const void *ip6hdr); +static void tcp_timer_discard(struct tcpcb *, uint32_t); /* * Target size of TCP PCB hash tables. Must be a power of two. @@ -790,7 +791,13 @@ tcp_newtcpcb(struct inpcb *inp) if (V_tcp_do_sack) tp->t_flags |= TF_SACK_PERMIT; TAILQ_INIT(&tp->snd_holes); - tp->t_inpcb = inp; /* XXX */ + /* + * The tcpcb will hold a reference on its inpcb until tcp_discardcb() + * is called. + */ + in_pcbref(inp); /* Reference for tcpcb */ + tp->t_inpcb = inp; + /* * Init srtt to TCPTV_SRTTBASE (0), so we can tell that we have no * rtt estimate. Set rttvar so that srtt + 4 * rttvar gives @@ -909,6 +916,7 @@ tcp_discardcb(struct tcpcb *tp) #ifdef INET6 int isipv6 = (inp->inp_vflag & INP_IPV6) != 0; #endif /* INET6 */ + int released; INP_WLOCK_ASSERT(inp); @@ -916,22 +924,15 @@ tcp_discardcb(struct tcpcb *tp) * Make sure that all of our timers are stopped before we delete the * PCB. * - * XXXRW: Really, we would like to use callout_drain() here in order - * to avoid races experienced in tcp_timer.c where a timer is already - * executing at this point. However, we can't, both because we're - * running in a context where we can't sleep, and also because we - * hold locks required by the timers. What we instead need to do is - * test to see if callout_drain() is required, and if so, defer some - * portion of the remainder of tcp_discardcb() to an asynchronous - * context that can callout_drain() and then continue. Some care - * will be required to ensure that no further processing takes place - * on the tcpcb, even though it hasn't been freed (a flag?). - */ - callout_stop(&tp->t_timers->tt_rexmt); - callout_stop(&tp->t_timers->tt_persist); - callout_stop(&tp->t_timers->tt_keep); - callout_stop(&tp->t_timers->tt_2msl); - callout_stop(&tp->t_timers->tt_delack); + * If stopping a timer fails, we schedule a discard function in same + * callout, and the last discard function called will take care of + * deleting the tcpcb. + */ + tcp_timer_stop(tp, TT_REXMT); + tcp_timer_stop(tp, TT_PERSIST); + tcp_timer_stop(tp, TT_KEEP); + tcp_timer_stop(tp, TT_2MSL); + tcp_timer_stop(tp, TT_DELACK); /* * If we got enough samples through the srtt filter, @@ -1008,8 +1009,80 @@ tcp_discardcb(struct tcpcb *tp) CC_ALGO(tp) = NULL; inp->inp_ppcb = NULL; - tp->t_inpcb = NULL; - uma_zfree(V_tcpcb_zone, tp); + if ((tp->t_timers->tt_flags & TT_MASK) == 0) { + /* We own the last reference on tcpcb, let's free it. */ + tp->t_inpcb = NULL; + uma_zfree(V_tcpcb_zone, tp); + released = in_pcbrele_wlocked(inp); + KASSERT(!released, ("%s: inp %p should not have been released " + "here", __func__, inp)); + } +} + +void +tcp_timer_2msl_discard(void *xtp) +{ + + tcp_timer_discard((struct tcpcb *)xtp, TT_2MSL); +} + +void +tcp_timer_keep_discard(void *xtp) +{ + + tcp_timer_discard((struct tcpcb *)xtp, TT_KEEP); +} + +void +tcp_timer_persist_discard(void *xtp) +{ + + tcp_timer_discard((struct tcpcb *)xtp, TT_PERSIST); +} + +void +tcp_timer_rexmt_discard(void *xtp) +{ + + tcp_timer_discard((struct tcpcb *)xtp, TT_REXMT); +} + +void +tcp_timer_delack_discard(void *xtp) +{ + + tcp_timer_discard((struct tcpcb *)xtp, TT_DELACK); +} + +void +tcp_timer_discard(struct tcpcb *tp, uint32_t timer_type) +{ + struct inpcb *inp; + + CURVNET_SET(tp->t_vnet); + INP_INFO_WLOCK(&V_tcbinfo); + inp = tp->t_inpcb; + KASSERT(inp != NULL, ("%s: tp %p tp->t_inpcb == NULL", + __func__, tp)); + INP_WLOCK(inp); + KASSERT((tp->t_timers->tt_flags & TT_STOPPED) != 0, + ("%s: tcpcb has to be stopped here", __func__)); + KASSERT((tp->t_timers->tt_flags & timer_type) != 0, + ("%s: discard callout should be running", __func__)); + tp->t_timers->tt_flags &= ~timer_type; + if ((tp->t_timers->tt_flags & TT_MASK) == 0) { + /* We own the last reference on this tcpcb, let's free it. */ + tp->t_inpcb = NULL; + uma_zfree(V_tcpcb_zone, tp); + if (in_pcbrele_wlocked(inp)) { + INP_INFO_WUNLOCK(&V_tcbinfo); + CURVNET_RESTORE(); + return; + } + } + INP_WUNLOCK(inp); + INP_INFO_WUNLOCK(&V_tcbinfo); + CURVNET_RESTORE(); } /* Modified: stable/10/sys/netinet/tcp_timer.c ============================================================================== --- stable/10/sys/netinet/tcp_timer.c Fri May 15 11:10:01 2015 (r282963) +++ stable/10/sys/netinet/tcp_timer.c Fri May 15 12:07:43 2015 (r282964) @@ -209,10 +209,6 @@ int tcp_backoff[TCP_MAXRXTSHIFT + 1] = static int tcp_totbackoff = 2559; /* sum of tcp_backoff[] */ -static int tcp_timer_race; -SYSCTL_INT(_net_inet_tcp, OID_AUTO, timer_race, CTLFLAG_RD, &tcp_timer_race, - 0, "Count of t_inpcb races on tcp_discardcb"); - /* * TCP timer processing. */ @@ -225,18 +221,7 @@ tcp_timer_delack(void *xtp) CURVNET_SET(tp->t_vnet); inp = tp->t_inpcb; - /* - * XXXRW: While this assert is in fact correct, bugs in the tcpcb - * tear-down mean we need it as a work-around for races between - * timers and tcp_discardcb(). - * - * KASSERT(inp != NULL, ("tcp_timer_delack: inp == NULL")); - */ - if (inp == NULL) { - tcp_timer_race++; - CURVNET_RESTORE(); - return; - } + KASSERT(inp != NULL, ("%s: tp %p tp->t_inpcb == NULL", __func__, tp)); INP_WLOCK(inp); if (callout_pending(&tp->t_timers->tt_delack) || !callout_active(&tp->t_timers->tt_delack)) { @@ -250,6 +235,10 @@ tcp_timer_delack(void *xtp) CURVNET_RESTORE(); return; } + KASSERT((tp->t_timers->tt_flags & TT_STOPPED) == 0, + ("%s: tp %p tcpcb can't be stopped here", __func__, tp)); + KASSERT((tp->t_timers->tt_flags & TT_DELACK) != 0, + ("%s: tp %p delack callout should be running", __func__, tp)); tp->t_flags |= TF_ACKNOW; TCPSTAT_INC(tcps_delack); @@ -269,24 +258,9 @@ tcp_timer_2msl(void *xtp) ostate = tp->t_state; #endif - /* - * XXXRW: Does this actually happen? - */ INP_INFO_WLOCK(&V_tcbinfo); inp = tp->t_inpcb; - /* - * XXXRW: While this assert is in fact correct, bugs in the tcpcb - * tear-down mean we need it as a work-around for races between - * timers and tcp_discardcb(). - * - * KASSERT(inp != NULL, ("tcp_timer_2msl: inp == NULL")); - */ - if (inp == NULL) { - tcp_timer_race++; - INP_INFO_WUNLOCK(&V_tcbinfo); - CURVNET_RESTORE(); - return; - } + KASSERT(inp != NULL, ("%s: tp %p tp->t_inpcb == NULL", __func__, tp)); INP_WLOCK(inp); tcp_free_sackholes(tp); if (callout_pending(&tp->t_timers->tt_2msl) || @@ -303,6 +277,10 @@ tcp_timer_2msl(void *xtp) CURVNET_RESTORE(); return; } + KASSERT((tp->t_timers->tt_flags & TT_STOPPED) == 0, + ("%s: tp %p tcpcb can't be stopped here", __func__, tp)); + KASSERT((tp->t_timers->tt_flags & TT_2MSL) != 0, + ("%s: tp %p 2msl callout should be running", __func__, tp)); /* * 2 MSL timeout in shutdown went off. If we're closed but * still waiting for peer to close and connection has been idle @@ -352,19 +330,7 @@ tcp_timer_keep(void *xtp) #endif INP_INFO_WLOCK(&V_tcbinfo); inp = tp->t_inpcb; - /* - * XXXRW: While this assert is in fact correct, bugs in the tcpcb - * tear-down mean we need it as a work-around for races between - * timers and tcp_discardcb(). - * - * KASSERT(inp != NULL, ("tcp_timer_keep: inp == NULL")); - */ - if (inp == NULL) { - tcp_timer_race++; - INP_INFO_WUNLOCK(&V_tcbinfo); - CURVNET_RESTORE(); - return; - } + KASSERT(inp != NULL, ("%s: tp %p tp->t_inpcb == NULL", __func__, tp)); INP_WLOCK(inp); if (callout_pending(&tp->t_timers->tt_keep) || !callout_active(&tp->t_timers->tt_keep)) { @@ -380,6 +346,10 @@ tcp_timer_keep(void *xtp) CURVNET_RESTORE(); return; } + KASSERT((tp->t_timers->tt_flags & TT_STOPPED) == 0, + ("%s: tp %p tcpcb can't be stopped here", __func__, tp)); + KASSERT((tp->t_timers->tt_flags & TT_KEEP) != 0, + ("%s: tp %p keep callout should be running", __func__, tp)); /* * Keep-alive timer went off; send something * or drop connection if idle for too long. @@ -455,19 +425,7 @@ tcp_timer_persist(void *xtp) #endif INP_INFO_WLOCK(&V_tcbinfo); inp = tp->t_inpcb; - /* - * XXXRW: While this assert is in fact correct, bugs in the tcpcb - * tear-down mean we need it as a work-around for races between - * timers and tcp_discardcb(). - * - * KASSERT(inp != NULL, ("tcp_timer_persist: inp == NULL")); - */ - if (inp == NULL) { - tcp_timer_race++; - INP_INFO_WUNLOCK(&V_tcbinfo); - CURVNET_RESTORE(); - return; - } + KASSERT(inp != NULL, ("%s: tp %p tp->t_inpcb == NULL", __func__, tp)); INP_WLOCK(inp); if (callout_pending(&tp->t_timers->tt_persist) || !callout_active(&tp->t_timers->tt_persist)) { @@ -483,6 +441,10 @@ tcp_timer_persist(void *xtp) CURVNET_RESTORE(); return; } + KASSERT((tp->t_timers->tt_flags & TT_STOPPED) == 0, + ("%s: tp %p tcpcb can't be stopped here", __func__, tp)); + KASSERT((tp->t_timers->tt_flags & TT_PERSIST) != 0, + ("%s: tp %p persist callout should be running", __func__, tp)); /* * Persistance timer into zero window. * Force a byte to be output, if possible. @@ -544,19 +506,7 @@ tcp_timer_rexmt(void * xtp) INP_INFO_RLOCK(&V_tcbinfo); inp = tp->t_inpcb; - /* - * XXXRW: While this assert is in fact correct, bugs in the tcpcb - * tear-down mean we need it as a work-around for races between - * timers and tcp_discardcb(). - * - * KASSERT(inp != NULL, ("tcp_timer_rexmt: inp == NULL")); - */ - if (inp == NULL) { - tcp_timer_race++; - INP_INFO_RUNLOCK(&V_tcbinfo); - CURVNET_RESTORE(); - return; - } + KASSERT(inp != NULL, ("%s: tp %p tp->t_inpcb == NULL", __func__, tp)); INP_WLOCK(inp); if (callout_pending(&tp->t_timers->tt_rexmt) || !callout_active(&tp->t_timers->tt_rexmt)) { @@ -572,6 +522,10 @@ tcp_timer_rexmt(void * xtp) CURVNET_RESTORE(); return; } + KASSERT((tp->t_timers->tt_flags & TT_STOPPED) == 0, + ("%s: tp %p tcpcb can't be stopped here", __func__, tp)); + KASSERT((tp->t_timers->tt_flags & TT_REXMT) != 0, + ("%s: tp %p rexmt callout should be running", __func__, tp)); tcp_free_sackholes(tp); /* * Retransmission timer went off. Message has not @@ -800,10 +754,10 @@ out: } void -tcp_timer_activate(struct tcpcb *tp, int timer_type, u_int delta) +tcp_timer_activate(struct tcpcb *tp, uint32_t timer_type, u_int delta) { struct callout *t_callout; - void *f_callout; + timeout_t *f_callout; struct inpcb *inp = tp->t_inpcb; int cpu = INP_CPU(inp); @@ -812,6 +766,9 @@ tcp_timer_activate(struct tcpcb *tp, int return; #endif + if (tp->t_timers->tt_flags & TT_STOPPED) + return; + switch (timer_type) { case TT_DELACK: t_callout = &tp->t_timers->tt_delack; @@ -834,17 +791,26 @@ tcp_timer_activate(struct tcpcb *tp, int f_callout = tcp_timer_2msl; break; default: - panic("bad timer_type"); + panic("tp %p bad timer_type %#x", tp, timer_type); } if (delta == 0) { - callout_stop(t_callout); + if ((tp->t_timers->tt_flags & timer_type) && + callout_stop(t_callout)) { + tp->t_timers->tt_flags &= ~timer_type; + } } else { - callout_reset_on(t_callout, delta, f_callout, tp, cpu); + if ((tp->t_timers->tt_flags & timer_type) == 0) { + tp->t_timers->tt_flags |= timer_type; + callout_reset_on(t_callout, delta, f_callout, tp, cpu); + } else { + /* Reset already running callout on the same CPU. */ + callout_reset(t_callout, delta, f_callout, tp); + } } } int -tcp_timer_active(struct tcpcb *tp, int timer_type) +tcp_timer_active(struct tcpcb *tp, uint32_t timer_type) { struct callout *t_callout; @@ -865,11 +831,63 @@ tcp_timer_active(struct tcpcb *tp, int t t_callout = &tp->t_timers->tt_2msl; break; default: - panic("bad timer_type"); + panic("tp %p bad timer_type %#x", tp, timer_type); } return callout_active(t_callout); } +void +tcp_timer_stop(struct tcpcb *tp, uint32_t timer_type) +{ + struct callout *t_callout; + timeout_t *f_callout; + + tp->t_timers->tt_flags |= TT_STOPPED; + + switch (timer_type) { + case TT_DELACK: + t_callout = &tp->t_timers->tt_delack; + f_callout = tcp_timer_delack_discard; + break; + case TT_REXMT: + t_callout = &tp->t_timers->tt_rexmt; + f_callout = tcp_timer_rexmt_discard; + break; + case TT_PERSIST: + t_callout = &tp->t_timers->tt_persist; + f_callout = tcp_timer_persist_discard; + break; + case TT_KEEP: + t_callout = &tp->t_timers->tt_keep; + f_callout = tcp_timer_keep_discard; + break; + case TT_2MSL: + t_callout = &tp->t_timers->tt_2msl; + f_callout = tcp_timer_2msl_discard; + break; + default: + panic("tp %p bad timer_type %#x", tp, timer_type); + } + + if (tp->t_timers->tt_flags & timer_type) { + if (callout_stop(t_callout)) { + tp->t_timers->tt_flags &= ~timer_type; + } else { + /* + * Can't stop the callout, defer tcpcb actual deletion + * to the last tcp timer discard callout. + * The TT_STOPPED flag will ensure that no tcp timer + * callouts can be restarted on our behalf, and + * past this point currently running callouts waiting + * on inp lock will return right away after the + * classical check for callout reset/stop events: + * callout_pending() || !callout_active() + */ + callout_reset(t_callout, 1, f_callout, tp); + } + } +} + #define ticks_to_msecs(t) (1000*(t) / hz) void Modified: stable/10/sys/netinet/tcp_timer.h ============================================================================== --- stable/10/sys/netinet/tcp_timer.h Fri May 15 11:10:01 2015 (r282963) +++ stable/10/sys/netinet/tcp_timer.h Fri May 15 12:07:43 2015 (r282964) @@ -146,12 +146,21 @@ struct tcp_timer { struct callout tt_keep; /* keepalive */ struct callout tt_2msl; /* 2*msl TIME_WAIT timer */ struct callout tt_delack; /* delayed ACK timer */ + uint32_t tt_flags; /* Timers flags */ + uint32_t tt_spare; /* TDB */ }; -#define TT_DELACK 0x01 -#define TT_REXMT 0x02 -#define TT_PERSIST 0x04 -#define TT_KEEP 0x08 -#define TT_2MSL 0x10 + +/* + * Flags for the tt_flags field. + */ +#define TT_DELACK 0x0001 +#define TT_REXMT 0x0002 +#define TT_PERSIST 0x0004 +#define TT_KEEP 0x0008 +#define TT_2MSL 0x0010 +#define TT_MASK (TT_DELACK|TT_REXMT|TT_PERSIST|TT_KEEP|TT_2MSL) + +#define TT_STOPPED 0x00010000 #define TP_KEEPINIT(tp) ((tp)->t_keepinit ? (tp)->t_keepinit : tcp_keepinit) #define TP_KEEPIDLE(tp) ((tp)->t_keepidle ? (tp)->t_keepidle : tcp_keepidle) @@ -183,6 +192,11 @@ void tcp_timer_keep(void *xtp); void tcp_timer_persist(void *xtp); void tcp_timer_rexmt(void *xtp); void tcp_timer_delack(void *xtp); +void tcp_timer_2msl_discard(void *xtp); +void tcp_timer_keep_discard(void *xtp); +void tcp_timer_persist_discard(void *xtp); +void tcp_timer_rexmt_discard(void *xtp); +void tcp_timer_delack_discard(void *xtp); void tcp_timer_to_xtimer(struct tcpcb *tp, struct tcp_timer *timer, struct xtcp_timer *xtimer); Modified: stable/10/sys/netinet/tcp_var.h ============================================================================== --- stable/10/sys/netinet/tcp_var.h Fri May 15 11:10:01 2015 (r282963) +++ stable/10/sys/netinet/tcp_var.h Fri May 15 12:07:43 2015 (r282964) @@ -718,8 +718,9 @@ void tcp_slowtimo(void); struct tcptemp * tcpip_maketemplate(struct inpcb *); void tcpip_fillheaders(struct inpcb *, void *, void *); -void tcp_timer_activate(struct tcpcb *, int, u_int); -int tcp_timer_active(struct tcpcb *, int); +void tcp_timer_activate(struct tcpcb *, uint32_t, u_int); +int tcp_timer_active(struct tcpcb *, uint32_t); +void tcp_timer_stop(struct tcpcb *, uint32_t); void tcp_trace(short, short, struct tcpcb *, void *, struct tcphdr *, int); /* * All tcp_hc_* functions are IPv4 and IPv6 (via in_conninfo) From owner-svn-src-all@FreeBSD.ORG Fri May 15 12:19:47 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 16879AC3; Fri, 15 May 2015 12:19:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EBE34132C; Fri, 15 May 2015 12:19:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4FCJkZF008089; Fri, 15 May 2015 12:19:46 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4FCJjAL008079; Fri, 15 May 2015 12:19:45 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201505151219.t4FCJjAL008079@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Fri, 15 May 2015 12:19:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282965 - in head: sbin/ifconfig sys/net sys/netinet 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.20 Precedence: list List-Id: "SVN commit messages 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, 15 May 2015 12:19:47 -0000 Author: ae Date: Fri May 15 12:19:45 2015 New Revision: 282965 URL: https://svnweb.freebsd.org/changeset/base/282965 Log: Add an ability accept encapsulated packets from different sources by one gif(4) interface. Add new option "ignore_source" for gif(4) interface. When it is enabled, gif's encapcheck function requires match only for packet's destination address. Differential Revision: https://reviews.freebsd.org/D2004 Obtained from: Yandex LLC MFC after: 2 weeks Sponsored by: Yandex LLC Modified: head/sbin/ifconfig/ifconfig.8 head/sbin/ifconfig/ifgif.c head/sys/net/if_gif.h head/sys/netinet/in_gif.c head/sys/netinet6/in6_gif.c Modified: head/sbin/ifconfig/ifconfig.8 ============================================================================== --- head/sbin/ifconfig/ifconfig.8 Fri May 15 12:07:43 2015 (r282964) +++ head/sbin/ifconfig/ifconfig.8 Fri May 15 12:19:45 2015 (r282965) @@ -28,7 +28,7 @@ .\" From: @(#)ifconfig.8 8.3 (Berkeley) 1/5/94 .\" $FreeBSD$ .\" -.Dd May 12, 2015 +.Dd May 15, 2015 .Dt IFCONFIG 8 .Os .Sh NAME @@ -2428,6 +2428,14 @@ This is for backward compatibility with .It Cm -accept_rev_ethip_ver Clear a flag .Cm accept_rev_ethip_ver . +.It Cm ignore_source +Set a flag to accept encapsulated packets destined to this host +independently from source address. +This may be useful for hosts, that receive encapsulated packets +from the load balancers. +.It Cm -ignore_source +Clear a flag +.Cm ignore_source . .It Cm send_rev_ethip_ver Set a flag to send EtherIP packets with reversed version field intentionally. Modified: head/sbin/ifconfig/ifgif.c ============================================================================== --- head/sbin/ifconfig/ifgif.c Fri May 15 12:07:43 2015 (r282964) +++ head/sbin/ifconfig/ifgif.c Fri May 15 12:19:45 2015 (r282965) @@ -51,7 +51,7 @@ static const char rcsid[] = #include "ifconfig.h" -#define GIFBITS "\020\1ACCEPT_REV_ETHIP_VER\5SEND_REV_ETHIP_VER" +#define GIFBITS "\020\1ACCEPT_REV_ETHIP_VER\2IGNORE_SOURCE\5SEND_REV_ETHIP_VER" static void gif_status(int); @@ -95,6 +95,8 @@ setgifopts(const char *val, static struct cmd gif_cmds[] = { DEF_CMD("accept_rev_ethip_ver", GIF_ACCEPT_REVETHIP, setgifopts), DEF_CMD("-accept_rev_ethip_ver",-GIF_ACCEPT_REVETHIP, setgifopts), + DEF_CMD("ignore_source", GIF_IGNORE_SOURCE, setgifopts), + DEF_CMD("-ignore_source", -GIF_IGNORE_SOURCE, setgifopts), DEF_CMD("send_rev_ethip_ver", GIF_SEND_REVETHIP, setgifopts), DEF_CMD("-send_rev_ethip_ver", -GIF_SEND_REVETHIP, setgifopts), }; Modified: head/sys/net/if_gif.h ============================================================================== --- head/sys/net/if_gif.h Fri May 15 12:07:43 2015 (r282964) +++ head/sys/net/if_gif.h Fri May 15 12:19:45 2015 (r282965) @@ -127,7 +127,9 @@ int in6_gif_attach(struct gif_softc *); #define GIFSOPTS _IOW('i', 151, struct ifreq) #define GIF_ACCEPT_REVETHIP 0x0001 +#define GIF_IGNORE_SOURCE 0x0002 #define GIF_SEND_REVETHIP 0x0010 -#define GIF_OPTMASK (GIF_ACCEPT_REVETHIP|GIF_SEND_REVETHIP) +#define GIF_OPTMASK (GIF_ACCEPT_REVETHIP|GIF_SEND_REVETHIP| \ + GIF_IGNORE_SOURCE) #endif /* _NET_IF_GIF_H_ */ Modified: head/sys/netinet/in_gif.c ============================================================================== --- head/sys/netinet/in_gif.c Fri May 15 12:07:43 2015 (r282964) +++ head/sys/netinet/in_gif.c Fri May 15 12:19:45 2015 (r282965) @@ -168,13 +168,19 @@ in_gif_input(struct mbuf **mp, int *offp static int gif_validate4(const struct ip *ip, struct gif_softc *sc, struct ifnet *ifp) { + int ret; GIF_RLOCK_ASSERT(sc); /* check for address match */ - if (sc->gif_iphdr->ip_src.s_addr != ip->ip_dst.s_addr || - sc->gif_iphdr->ip_dst.s_addr != ip->ip_src.s_addr) + if (sc->gif_iphdr->ip_src.s_addr != ip->ip_dst.s_addr) return (0); + ret = 32; + if (sc->gif_iphdr->ip_dst.s_addr != ip->ip_src.s_addr) { + if ((sc->gif_options & GIF_IGNORE_SOURCE) == 0) + return (0); + } else + ret += 32; /* martian filters on outer source - NOT done in ip_input! */ if (IN_MULTICAST(ntohl(ip->ip_src.s_addr))) @@ -205,7 +211,7 @@ gif_validate4(const struct ip *ip, struc } RTFREE_LOCKED(rt); } - return (32 * 2); + return (ret); } /* Modified: head/sys/netinet6/in6_gif.c ============================================================================== --- head/sys/netinet6/in6_gif.c Fri May 15 12:07:43 2015 (r282964) +++ head/sys/netinet6/in6_gif.c Fri May 15 12:19:45 2015 (r282965) @@ -180,6 +180,7 @@ static int gif_validate6(const struct ip6_hdr *ip6, struct gif_softc *sc, struct ifnet *ifp) { + int ret; GIF_RLOCK_ASSERT(sc); /* @@ -187,9 +188,14 @@ gif_validate6(const struct ip6_hdr *ip6, * packet. We should compare the *source* address in our configuration * and the *destination* address of the packet, and vice versa. */ - if (!IN6_ARE_ADDR_EQUAL(&sc->gif_ip6hdr->ip6_src, &ip6->ip6_dst) || - !IN6_ARE_ADDR_EQUAL(&sc->gif_ip6hdr->ip6_dst, &ip6->ip6_src)) + if (!IN6_ARE_ADDR_EQUAL(&sc->gif_ip6hdr->ip6_src, &ip6->ip6_dst)) return (0); + ret = 128; + if (!IN6_ARE_ADDR_EQUAL(&sc->gif_ip6hdr->ip6_dst, &ip6->ip6_src)) { + if ((sc->gif_options & GIF_IGNORE_SOURCE) == 0) + return (0); + } else + ret += 128; /* martian filters on outer source - done in ip6_input */ @@ -214,7 +220,7 @@ gif_validate6(const struct ip6_hdr *ip6, RTFREE_LOCKED(rt); } - return (128 * 2); + return (ret); } /* From owner-svn-src-all@FreeBSD.ORG Fri May 15 12:28:18 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 346B6E32; Fri, 15 May 2015 12:28:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 15EE314B4; Fri, 15 May 2015 12:28:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4FCSHP7012962; Fri, 15 May 2015 12:28:17 GMT (envelope-from jah@FreeBSD.org) Received: (from jah@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4FCSHbl012961; Fri, 15 May 2015 12:28:17 GMT (envelope-from jah@FreeBSD.org) Message-Id: <201505151228.t4FCSHbl012961@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jah set sender to jah@FreeBSD.org using -f From: "Jason A. Harmening" Date: Fri, 15 May 2015 12:28:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282966 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 15 May 2015 12:28:18 -0000 Author: jah Date: Fri May 15 12:28:17 2015 New Revision: 282966 URL: https://svnweb.freebsd.org/changeset/base/282966 Log: Update iic(4) man page to reflect recent changes Differential Revision: https://reviews.freebsd.org/D2461 Reviewed by: wblock Approved by: kib (mentor) Modified: head/share/man/man4/iic.4 Modified: head/share/man/man4/iic.4 ============================================================================== --- head/share/man/man4/iic.4 Fri May 15 12:19:45 2015 (r282965) +++ head/share/man/man4/iic.4 Fri May 15 12:28:17 2015 (r282966) @@ -54,10 +54,12 @@ element to the bus. The .Va slave element consists of a 7-bit address and a read/write bit -(i.e., 7-bit address << 1 | r/w). -If the read/write bit is set a read operation is initiated, if the read/write -bit is cleared a write operation is initiated. +(that is, a 7-bit address << 1 | r/w). +A read operation is initiated when the read/write bit is set, or a write +operation when it is cleared. All other elements are ignored. +If successful, the file descriptor receives exclusive +ownership of the underlying iicbus instance. .It Dv I2CRPTSTART .Pq Vt "struct iiccmd" Sends the repeated start condition to the slave specified by the @@ -66,19 +68,33 @@ element to the bus. The slave address should be specified as in .Dv I2CSTART . All other elements are ignored. +.Dv I2CSTART +must have previously been issued on the same file descriptor. .It Dv I2CSTOP No argument is passed. Sends the stop condition to the bus. -This terminates the current transaction. +If +.Dv I2CSTART +was previously issued on the file descriptor, the current transaction is +terminated and exclusive ownership of the underlying iicbus instance is +released. +Otherwise, no action is performed. .It Dv I2CRSTCARD .Pq Vt "struct iiccmd" Resets the bus. The argument is completely ignored. +This command does not require +.Dv I2CSTART +to have been previously issued on the file descriptor. +If it was previously issued, exclusive ownership of the underlying iicbus +instance is released. .It Dv I2CWRITE .Pq Vt "struct iiccmd" Writes data to the .Xr iicbus 4 . -The bus should already be started. +The bus must already be started by a previous +.Dv I2CSTART +on the file descriptor. The .Va slave element is ignored. @@ -96,7 +112,9 @@ element is a pointer to the data to writ .Pq Vt "struct iiccmd" Reads data from the .Xr iicbus 4 . -The bus should already be started. +The bus must already be started by a previous +.Dv I2CSTART +on the file descriptor. The .Va slave element is ignored. @@ -116,6 +134,15 @@ Short reads on the bus produce undefined Generic read/write interface. Allows for an arbitrary number of commands to be sent to an arbitrary number of devices on the bus. +Any previous transaction started by +.Dv I2CSTART +must be terminated by +.Dv I2CSTOP +or +.Dv I2CRSTCARD +before +.Dv I2CRDWR +can be issued on the same file descriptor. A read transfer is specified if .Dv IIC_M_RD is set in @@ -138,6 +165,17 @@ element is a buffer for that data. This ioctl is intended to be .Tn Linux compatible. +.It Dv I2CSADDR +.Pq Vt "uint8_t" +Associate the specified address with the file descriptor for use by +subsequent +.Xr read 2 +or +.Xr write 2 +calls. +The argument is an 8-bit address (that is, a 7-bit address << 1). +The read/write bit in the least-significant position is ignored. +Any subsequent read or write operation will set or clear that bit as needed. .El .Pp The following data structures are defined in @@ -156,7 +194,10 @@ struct iic_msg { uint16_t slave; uint16_t flags; -#define IIC_M_RD 0x0001 /* read vs write */ +#define IIC_M_WR 0 /* Fake flag for write */ +#define IIC_M_RD 0x0001 /* read vs write */ +#define IIC_M_NOSTOP 0x0002 /* do not send a I2C stop after message */ +#define IIC_M_NOSTART 0x0004 /* do not send a I2C start before message */ uint16_t len; /* msg length */ uint8_t * buf; }; @@ -167,15 +208,37 @@ struct iic_rdwr_data { }; .Ed .Pp -It is also possible to use read/write routines, then I2C start/stop handshake is -managed by the -.Xr iicbus 4 -system. -However, the address used for the read/write routines is the one -passed to last +It is also possible to use +.Xr read 2 +or +.Xr write 2 , +in which case the I2C start/stop handshake is managed by +.Xr iicbus 4 . +The address used for the read/write operation is the one passed to the most +recent .Dv I2CSTART .Xr ioctl 2 -to this device. +or +.Dv I2CSADDR +.Xr ioctl 2 +on the open +.Pa /dev/iic? +file descriptor. +Closing the file descriptor clears any addressing state established by a +previous +.Dv I2CSTART +or +.Dv I2CSADDR , +stops any transaction established by a not-yet-terminated +.Dv I2CSTART , +and releases iicbus ownership. +Because addressing state is stored on a per-file-descriptor basis, it is +permissible for multiple file descriptors to be simultaneously open on the +same +.Pa /dev/iic? +device. +Concurrent transactions on those descriptors are synchronized by the +exclusive-ownership requests issued to the underlying iicbus instance. .Sh SEE ALSO .Xr ioctl 2 , .Xr read 2 , @@ -193,9 +256,3 @@ manual page was written by .An Nicolas Souchu and .An M. Warner Losh . -.Sh BUGS -Only the -.Dv I2CRDWR -.Xr ioctl 2 -is thread safe. -All other interfaces suffer from some kind of race. From owner-svn-src-all@FreeBSD.ORG Fri May 15 12:32:18 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 528FEFC6; Fri, 15 May 2015 12:32:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3FBA715B0; Fri, 15 May 2015 12:32:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4FCWIxu017201; Fri, 15 May 2015 12:32:18 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4FCWImW017200; Fri, 15 May 2015 12:32:18 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201505151232.t4FCWImW017200@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Fri, 15 May 2015 12:32:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282967 - head/sbin/ifconfig 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.20 Precedence: list List-Id: "SVN commit messages 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, 15 May 2015 12:32:18 -0000 Author: melifaro Date: Fri May 15 12:32:17 2015 New Revision: 282967 URL: https://svnweb.freebsd.org/changeset/base/282967 Log: Simplify i2c reader: we don't need per-NIC handler anymore. Make code use read_i2c() function instead of callback. Simplify&document struct i2c_info. Consistently use uint8_t to read from i2c. Modified: head/sbin/ifconfig/sfp.c Modified: head/sbin/ifconfig/sfp.c ============================================================================== --- head/sbin/ifconfig/sfp.c Fri May 15 12:28:17 2015 (r282966) +++ head/sbin/ifconfig/sfp.c Fri May 15 12:32:17 2015 (r282967) @@ -48,25 +48,16 @@ static const char rcsid[] = #include "ifconfig.h" -struct i2c_info; -typedef int (read_i2c)(struct i2c_info *ii, uint8_t addr, uint8_t off, - uint8_t len, caddr_t buf); - struct i2c_info { - int s; - int error; - int bshift; - int qsfp; - int do_diag; - struct ifreq *ifr; - read_i2c *f; - char *textbuf; - size_t bufsize; - int cfd; - int port_id; - int chip_id; + int fd; /* fd to issue SIOCGI2C */ + int error; /* Store first error */ + int qsfp; /* True if transceiver is QSFP */ + int do_diag; /* True if we need to request DDM */ + struct ifreq *ifr; /* Pointer to pre-filled ifreq */ }; +static int read_i2c(struct i2c_info *ii, uint8_t addr, uint8_t off, + uint8_t len, uint8_t *buf); static void dump_i2c_data(struct i2c_info *ii, uint8_t addr, uint8_t off, uint8_t len); @@ -259,7 +250,7 @@ get_sfp_identifier(struct i2c_info *ii, { uint8_t data; - ii->f(ii, SFF_8472_BASE, SFF_8472_ID, 1, (caddr_t)&data); + read_i2c(ii, SFF_8472_BASE, SFF_8472_ID, 1, &data); convert_sff_identifier(buf, size, data); } @@ -268,7 +259,7 @@ get_sfp_connector(struct i2c_info *ii, c { uint8_t data; - ii->f(ii, SFF_8472_BASE, SFF_8472_CONNECTOR, 1, (caddr_t)&data); + read_i2c(ii, SFF_8472_BASE, SFF_8472_CONNECTOR, 1, &data); convert_sff_connector(buf, size, data); } @@ -277,7 +268,7 @@ get_qsfp_identifier(struct i2c_info *ii, { uint8_t data; - ii->f(ii, SFF_8436_BASE, SFF_8436_ID, 1, (caddr_t)&data); + read_i2c(ii, SFF_8436_BASE, SFF_8436_ID, 1, &data); convert_sff_identifier(buf, size, data); } @@ -286,7 +277,7 @@ get_qsfp_connector(struct i2c_info *ii, { uint8_t data; - ii->f(ii, SFF_8436_BASE, SFF_8436_CONNECTOR, 1, (caddr_t)&data); + read_i2c(ii, SFF_8436_BASE, SFF_8436_CONNECTOR, 1, &data); convert_sff_connector(buf, size, data); } @@ -303,7 +294,7 @@ printf_sfp_transceiver_descr(struct i2c_ tech_speed = NULL; /* Read bytes 3-10 at once */ - ii->f(ii, SFF_8472_BASE, SFF_8472_TRANS_START, 8, &xbuf[3]); + read_i2c(ii, SFF_8472_BASE, SFF_8472_TRANS_START, 8, &xbuf[3]); /* Check 10G ethernet first */ tech_class = find_zero_bit(eth_10g, xbuf[3], 1); @@ -331,14 +322,14 @@ get_sfp_transceiver_class(struct i2c_inf uint8_t code; unsigned char qbuf[8]; - ii->f(ii, SFF_8472_BASE, SFF_8472_TRANS_START, 8, (caddr_t)qbuf); + read_i2c(ii, SFF_8472_BASE, SFF_8472_TRANS_START, 8, (uint8_t *)qbuf); /* Check 10G Ethernet/IB first */ - ii->f(ii, SFF_8472_BASE, SFF_8472_TRANS_START, 1, (caddr_t)&code); + read_i2c(ii, SFF_8472_BASE, SFF_8472_TRANS_START, 1, &code); tech_class = find_zero_bit(eth_10g, code, 1); if (tech_class == NULL) { /* No match. Try Ethernet 1G */ - ii->f(ii, SFF_8472_BASE, SFF_8472_TRANS_START + 3, + read_i2c(ii, SFF_8472_BASE, SFF_8472_TRANS_START + 3, 1, (caddr_t)&code); tech_class = find_zero_bit(eth_compat, code, 1); } @@ -356,7 +347,7 @@ get_qsfp_transceiver_class(struct i2c_in uint8_t code; /* Check 10/40G Ethernet class only */ - ii->f(ii, SFF_8436_BASE, SFF_8436_CODE_E1040G, 1, (caddr_t)&code); + read_i2c(ii, SFF_8436_BASE, SFF_8436_CODE_E1040G, 1, &code); tech_class = find_zero_bit(eth_1040g, code, 1); if (tech_class == NULL) tech_class = "Unknown"; @@ -393,7 +384,7 @@ get_sfp_vendor_name(struct i2c_info *ii, char xbuf[17]; memset(xbuf, 0, sizeof(xbuf)); - ii->f(ii, SFF_8472_BASE, SFF_8472_VENDOR_START, 16, xbuf); + read_i2c(ii, SFF_8472_BASE, SFF_8472_VENDOR_START, 16, (uint8_t *)xbuf); convert_sff_name(buf, size, xbuf); } @@ -403,7 +394,7 @@ get_sfp_vendor_pn(struct i2c_info *ii, c char xbuf[17]; memset(xbuf, 0, sizeof(xbuf)); - ii->f(ii, SFF_8472_BASE, SFF_8472_PN_START, 16, xbuf); + read_i2c(ii, SFF_8472_BASE, SFF_8472_PN_START, 16, (uint8_t *)xbuf); convert_sff_name(buf, size, xbuf); } @@ -413,7 +404,7 @@ get_sfp_vendor_sn(struct i2c_info *ii, c char xbuf[17]; memset(xbuf, 0, sizeof(xbuf)); - ii->f(ii, SFF_8472_BASE, SFF_8472_SN_START, 16, xbuf); + read_i2c(ii, SFF_8472_BASE, SFF_8472_SN_START, 16, (uint8_t *)xbuf); convert_sff_name(buf, size, xbuf); } @@ -424,7 +415,7 @@ get_sfp_vendor_date(struct i2c_info *ii, memset(xbuf, 0, sizeof(xbuf)); /* Date code, see Table 3.8 for description */ - ii->f(ii, SFF_8472_BASE, SFF_8472_DATE_START, 6, xbuf); + read_i2c(ii, SFF_8472_BASE, SFF_8472_DATE_START, 6, (uint8_t *)xbuf); convert_sff_date(buf, size, xbuf); } @@ -434,7 +425,7 @@ get_qsfp_vendor_name(struct i2c_info *ii char xbuf[17]; memset(xbuf, 0, sizeof(xbuf)); - ii->f(ii, SFF_8436_BASE, SFF_8436_VENDOR_START, 16, xbuf); + read_i2c(ii, SFF_8436_BASE, SFF_8436_VENDOR_START, 16, (uint8_t *)xbuf); convert_sff_name(buf, size, xbuf); } @@ -444,7 +435,7 @@ get_qsfp_vendor_pn(struct i2c_info *ii, char xbuf[17]; memset(xbuf, 0, sizeof(xbuf)); - ii->f(ii, SFF_8436_BASE, SFF_8436_PN_START, 16, xbuf); + read_i2c(ii, SFF_8436_BASE, SFF_8436_PN_START, 16, (uint8_t *)xbuf); convert_sff_name(buf, size, xbuf); } @@ -454,7 +445,7 @@ get_qsfp_vendor_sn(struct i2c_info *ii, char xbuf[17]; memset(xbuf, 0, sizeof(xbuf)); - ii->f(ii, SFF_8436_BASE, SFF_8436_SN_START, 16, xbuf); + read_i2c(ii, SFF_8436_BASE, SFF_8436_SN_START, 16, (uint8_t *)xbuf); convert_sff_name(buf, size, xbuf); } @@ -464,7 +455,7 @@ get_qsfp_vendor_date(struct i2c_info *ii char xbuf[6]; memset(xbuf, 0, sizeof(xbuf)); - ii->f(ii, SFF_8436_BASE, SFF_8436_DATE_START, 6, xbuf); + read_i2c(ii, SFF_8436_BASE, SFF_8436_DATE_START, 6, (uint8_t *)xbuf); convert_sff_date(buf, size, xbuf); } @@ -501,12 +492,12 @@ print_sfp_vendor(struct i2c_info *ii, ch * */ static void -convert_sff_temp(char *buf, size_t size, char *xbuf) +convert_sff_temp(char *buf, size_t size, uint8_t *xbuf) { double d; - d = (double)(int8_t)xbuf[0]; - d += (double)(uint8_t)xbuf[1] / 256; + d = (double)xbuf[0]; + d += (double)xbuf[1] / 256; snprintf(buf, size, "%.2f C", d); } @@ -516,11 +507,11 @@ convert_sff_temp(char *buf, size_t size, * 16-bit usigned value, treated as range 0..+6.55 Volts */ static void -convert_sff_voltage(char *buf, size_t size, char *xbuf) +convert_sff_voltage(char *buf, size_t size, uint8_t *xbuf) { double d; - d = (double)(((uint8_t)xbuf[0] << 8) | (uint8_t)xbuf[1]); + d = (double)((xbuf[0] << 8) | xbuf[1]); snprintf(buf, size, "%.2f Volts", d / 10000); } @@ -529,12 +520,12 @@ convert_sff_voltage(char *buf, size_t si * human representation. */ static void -convert_sff_power(struct i2c_info *ii, char *buf, size_t size, char *xbuf) +convert_sff_power(struct i2c_info *ii, char *buf, size_t size, uint8_t *xbuf) { uint16_t mW; double dbm; - mW = ((uint8_t)xbuf[0] << 8) + (uint8_t)xbuf[1]; + mW = (xbuf[0] << 8) + xbuf[1]; /* Convert mw to dbm */ dbm = 10.0 * log10(1.0 * mW / 10000); @@ -553,60 +544,60 @@ convert_sff_power(struct i2c_info *ii, c static void get_sfp_temp(struct i2c_info *ii, char *buf, size_t size) { - char xbuf[2]; + uint8_t xbuf[2]; memset(xbuf, 0, sizeof(xbuf)); - ii->f(ii, SFF_8472_DIAG, SFF_8472_TEMP, 2, xbuf); + read_i2c(ii, SFF_8472_DIAG, SFF_8472_TEMP, 2, xbuf); convert_sff_temp(buf, size, xbuf); } static void get_sfp_voltage(struct i2c_info *ii, char *buf, size_t size) { - char xbuf[2]; + uint8_t xbuf[2]; memset(xbuf, 0, sizeof(xbuf)); - ii->f(ii, SFF_8472_DIAG, SFF_8472_VCC, 2, xbuf); + read_i2c(ii, SFF_8472_DIAG, SFF_8472_VCC, 2, xbuf); convert_sff_voltage(buf, size, xbuf); } static void get_qsfp_temp(struct i2c_info *ii, char *buf, size_t size) { - char xbuf[2]; + uint8_t xbuf[2]; memset(xbuf, 0, sizeof(xbuf)); - ii->f(ii, SFF_8436_BASE, SFF_8436_TEMP, 2, xbuf); + read_i2c(ii, SFF_8436_BASE, SFF_8436_TEMP, 2, xbuf); convert_sff_temp(buf, size, xbuf); } static void get_qsfp_voltage(struct i2c_info *ii, char *buf, size_t size) { - char xbuf[2]; + uint8_t xbuf[2]; memset(xbuf, 0, sizeof(xbuf)); - ii->f(ii, SFF_8436_BASE, SFF_8436_VCC, 2, xbuf); + read_i2c(ii, SFF_8436_BASE, SFF_8436_VCC, 2, xbuf); convert_sff_voltage(buf, size, xbuf); } static void get_sfp_rx_power(struct i2c_info *ii, char *buf, size_t size) { - char xbuf[2]; + uint8_t xbuf[2]; memset(xbuf, 0, sizeof(xbuf)); - ii->f(ii, SFF_8472_DIAG, SFF_8472_RX_POWER, 2, xbuf); + read_i2c(ii, SFF_8472_DIAG, SFF_8472_RX_POWER, 2, xbuf); convert_sff_power(ii, buf, size, xbuf); } static void get_sfp_tx_power(struct i2c_info *ii, char *buf, size_t size) { - char xbuf[2]; + uint8_t xbuf[2]; memset(xbuf, 0, sizeof(xbuf)); - ii->f(ii, SFF_8472_DIAG, SFF_8472_TX_POWER, 2, xbuf); + read_i2c(ii, SFF_8472_DIAG, SFF_8472_TX_POWER, 2, xbuf); convert_sff_power(ii, buf, size, xbuf); } @@ -616,7 +607,7 @@ get_qsfp_rx_power(struct i2c_info *ii, c char xbuf[2]; memset(xbuf, 0, sizeof(xbuf)); - ii->f(ii, SFF_8436_BASE, SFF_8436_RX_CH1_MSB + (chan - 1) * 2, 2, xbuf); + read_i2c(ii, SFF_8436_BASE, SFF_8436_RX_CH1_MSB + (chan - 1) * 2, 2, xbuf); convert_sff_power(ii, buf, size, xbuf); } @@ -626,14 +617,16 @@ get_qsfp_tx_power(struct i2c_info *ii, c char xbuf[2]; memset(xbuf, 0, sizeof(xbuf)); - ii->f(ii, SFF_8436_BASE, SFF_8436_TX_CH1_MSB + (chan -1) * 2, 2, xbuf); + read_i2c(ii, SFF_8436_BASE, SFF_8436_TX_CH1_MSB + (chan -1) * 2, 2, xbuf); convert_sff_power(ii, buf, size, xbuf); } -/* Generic handler */ +/* + * Reads i2c data from opened kernel socket. + */ static int -read_i2c_generic(struct i2c_info *ii, uint8_t addr, uint8_t off, uint8_t len, - caddr_t buf) +read_i2c(struct i2c_info *ii, uint8_t addr, uint8_t off, uint8_t len, + uint8_t *buf) { struct ifi2creq req; int i, l; @@ -653,7 +646,7 @@ read_i2c_generic(struct i2c_info *ii, ui while (len > 0) { l = (len > sizeof(req.data)) ? sizeof(req.data) : len; req.len = l; - if (ioctl(ii->s, SIOCGI2C, ii->ifr) != 0) { + if (ioctl(ii->fd, SIOCGI2C, ii->ifr) != 0) { ii->error = errno; return (errno); } @@ -676,7 +669,7 @@ dump_i2c_data(struct i2c_info *ii, uint8 while (len > 0) { memset(buf, 0, sizeof(buf)); read = (len > sizeof(buf)) ? sizeof(buf) : len; - ii->f(ii, addr, off, read, buf); + read_i2c(ii, addr, off, read, buf); if (ii->error != 0) { fprintf(stderr, "Error reading i2c info\n"); return; @@ -699,7 +692,7 @@ print_qsfp_status(struct i2c_info *ii, i int i; /* Read diagnostic monitoring type */ - ii->f(ii, SFF_8436_BASE, SFF_8436_DIAG_TYPE, 1, (caddr_t)&diag_type); + read_i2c(ii, SFF_8436_BASE, SFF_8436_DIAG_TYPE, 1, (caddr_t)&diag_type); if (ii->error != 0) return; @@ -749,7 +742,7 @@ print_sfp_status(struct i2c_info *ii, in uint8_t diag_type, flags; /* Read diagnostic monitoring type */ - ii->f(ii, SFF_8472_BASE, SFF_8472_DIAG_TYPE, 1, (caddr_t)&diag_type); + read_i2c(ii, SFF_8472_BASE, SFF_8472_DIAG_TYPE, 1, (caddr_t)&diag_type); if (ii->error != 0) return; @@ -797,11 +790,10 @@ sfp_status(int s, struct ifreq *ifr, int struct i2c_info ii; uint8_t id_byte; + /* Prepare necessary into pass to i2c reader */ memset(&ii, 0, sizeof(ii)); - /* Prepare necessary into to pass to NIC handler */ - ii.s = s; + ii.fd = s; ii.ifr = ifr; - ii.f = read_i2c_generic; /* * Try to read byte 0 from i2c: @@ -811,7 +803,7 @@ sfp_status(int s, struct ifreq *ifr, int * this might happen in case of empty transceiver slot. */ id_byte = 0; - ii.f(&ii, SFF_8472_BASE, SFF_8472_ID, 1, (caddr_t)&id_byte); + read_i2c(&ii, SFF_8472_BASE, SFF_8472_ID, 1, (caddr_t)&id_byte); if (ii.error != 0 || id_byte == 0) return; From owner-svn-src-all@FreeBSD.ORG Fri May 15 12:35:19 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 46AFD1BC; Fri, 15 May 2015 12:35:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3516315C2; Fri, 15 May 2015 12:35:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4FCZJOr017696; Fri, 15 May 2015 12:35:19 GMT (envelope-from jch@FreeBSD.org) Received: (from jch@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4FCZJTw017695; Fri, 15 May 2015 12:35:19 GMT (envelope-from jch@FreeBSD.org) Message-Id: <201505151235.t4FCZJTw017695@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jch set sender to jch@FreeBSD.org using -f From: Julien Charbon Date: Fri, 15 May 2015 12:35:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r282968 - stable/10/sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 15 May 2015 12:35:19 -0000 Author: jch Date: Fri May 15 12:35:18 2015 New Revision: 282968 URL: https://svnweb.freebsd.org/changeset/base/282968 Log: MFC r279821: In TCP, connect() can return incorrect error code EINVAL instead of EADDRINUSE or ECONNREFUSED PR: 196035 Differential Revision: https://reviews.freebsd.org/D1982 Reported by: Mark Nunberg Submitted by: Harrison Grundy Reviewed by: adrian, jch, glebius, gnn Approved by: jhb Modified: stable/10/sys/netinet/tcp_usrreq.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/tcp_usrreq.c ============================================================================== --- stable/10/sys/netinet/tcp_usrreq.c Fri May 15 12:32:17 2015 (r282967) +++ stable/10/sys/netinet/tcp_usrreq.c Fri May 15 12:35:18 2015 (r282968) @@ -475,8 +475,12 @@ tcp_usr_connect(struct socket *so, struc inp = sotoinpcb(so); KASSERT(inp != NULL, ("tcp_usr_connect: inp == NULL")); INP_WLOCK(inp); - if (inp->inp_flags & (INP_TIMEWAIT | INP_DROPPED)) { - error = EINVAL; + if (inp->inp_flags & INP_TIMEWAIT) { + error = EADDRINUSE; + goto out; + } + if (inp->inp_flags & INP_DROPPED) { + error = ECONNREFUSED; goto out; } tp = intotcpcb(inp); @@ -522,8 +526,12 @@ tcp6_usr_connect(struct socket *so, stru inp = sotoinpcb(so); KASSERT(inp != NULL, ("tcp6_usr_connect: inp == NULL")); INP_WLOCK(inp); - if (inp->inp_flags & (INP_TIMEWAIT | INP_DROPPED)) { - error = EINVAL; + if (inp->inp_flags & INP_TIMEWAIT) { + error = EADDRINUSE; + goto out; + } + if (inp->inp_flags & INP_DROPPED) { + error = ECONNREFUSED; goto out; } tp = intotcpcb(inp); From owner-svn-src-all@FreeBSD.ORG Fri May 15 13:04:15 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0F15F841; Fri, 15 May 2015 13:04:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D85041903; Fri, 15 May 2015 13:04:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4FD4Efm032427; Fri, 15 May 2015 13:04:14 GMT (envelope-from jah@FreeBSD.org) Received: (from jah@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4FD4Epn032426; Fri, 15 May 2015 13:04:14 GMT (envelope-from jah@FreeBSD.org) Message-Id: <201505151304.t4FD4Epn032426@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jah set sender to jah@FreeBSD.org using -f From: "Jason A. Harmening" Date: Fri, 15 May 2015 13:04:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282969 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 15 May 2015 13:04:15 -0000 Author: jah Date: Fri May 15 13:04:14 2015 New Revision: 282969 URL: https://svnweb.freebsd.org/changeset/base/282969 Log: Bump date for iic.4 Modified: head/share/man/man4/iic.4 Modified: head/share/man/man4/iic.4 ============================================================================== --- head/share/man/man4/iic.4 Fri May 15 12:35:18 2015 (r282968) +++ head/share/man/man4/iic.4 Fri May 15 13:04:14 2015 (r282969) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 24, 2014 +.Dd May 15, 2015 .Dt IIC 4 .Os .Sh NAME From owner-svn-src-all@FreeBSD.ORG Fri May 15 13:36:51 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2A709EA8; Fri, 15 May 2015 13:36:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 189F91CAE; Fri, 15 May 2015 13:36:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4FDaoWj047631; Fri, 15 May 2015 13:36:50 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4FDao9R047630; Fri, 15 May 2015 13:36:50 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201505151336.t4FDao9R047630@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 15 May 2015 13:36:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282970 - head/sys/dev/iscsi 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.20 Precedence: list List-Id: "SVN commit messages 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, 15 May 2015 13:36:51 -0000 Author: mav Date: Fri May 15 13:36:50 2015 New Revision: 282970 URL: https://svnweb.freebsd.org/changeset/base/282970 Log: Close some potential races around socket start/close. There are some reports about panics on ic->ic_socket NULL derefence. This kind of races is the only way I can imagine it to happen. MFC after: 2 weeks Modified: head/sys/dev/iscsi/icl_soft.c Modified: head/sys/dev/iscsi/icl_soft.c ============================================================================== --- head/sys/dev/iscsi/icl_soft.c Fri May 15 13:04:14 2015 (r282969) +++ head/sys/dev/iscsi/icl_soft.c Fri May 15 13:36:50 2015 (r282970) @@ -773,10 +773,6 @@ icl_receive_thread(void *arg) ic = arg; so = ic->ic_socket; - ICL_CONN_LOCK(ic); - ic->ic_receive_running = true; - ICL_CONN_UNLOCK(ic); - for (;;) { if (ic->ic_disconnecting) { //ICL_DEBUG("terminating"); @@ -998,8 +994,6 @@ icl_send_thread(void *arg) STAILQ_INIT(&queue); ICL_CONN_LOCK(ic); - ic->ic_send_running = true; - for (;;) { for (;;) { /* @@ -1275,35 +1269,45 @@ icl_conn_start(struct icl_conn *ic) } /* + * Register socket upcall, to get notified about incoming PDUs + * and free space to send outgoing ones. + */ + SOCKBUF_LOCK(&ic->ic_socket->so_snd); + soupcall_set(ic->ic_socket, SO_SND, icl_soupcall_send, ic); + SOCKBUF_UNLOCK(&ic->ic_socket->so_snd); + SOCKBUF_LOCK(&ic->ic_socket->so_rcv); + soupcall_set(ic->ic_socket, SO_RCV, icl_soupcall_receive, ic); + SOCKBUF_UNLOCK(&ic->ic_socket->so_rcv); + + /* * Start threads. */ + ICL_CONN_LOCK(ic); + ic->ic_send_running = ic->ic_receive_running = true; + ICL_CONN_UNLOCK(ic); error = kthread_add(icl_send_thread, ic, NULL, NULL, 0, 0, "%stx", ic->ic_name); if (error != 0) { ICL_WARN("kthread_add(9) failed with error %d", error); + ICL_CONN_LOCK(ic); + ic->ic_send_running = ic->ic_receive_running = false; + cv_signal(&ic->ic_send_cv); + ICL_CONN_UNLOCK(ic); icl_soft_conn_close(ic); return (error); } - error = kthread_add(icl_receive_thread, ic, NULL, NULL, 0, 0, "%srx", ic->ic_name); if (error != 0) { ICL_WARN("kthread_add(9) failed with error %d", error); + ICL_CONN_LOCK(ic); + ic->ic_receive_running = false; + cv_signal(&ic->ic_send_cv); + ICL_CONN_UNLOCK(ic); icl_soft_conn_close(ic); return (error); } - /* - * Register socket upcall, to get notified about incoming PDUs - * and free space to send outgoing ones. - */ - SOCKBUF_LOCK(&ic->ic_socket->so_snd); - soupcall_set(ic->ic_socket, SO_SND, icl_soupcall_send, ic); - SOCKBUF_UNLOCK(&ic->ic_socket->so_snd); - SOCKBUF_LOCK(&ic->ic_socket->so_rcv); - soupcall_set(ic->ic_socket, SO_RCV, icl_soupcall_receive, ic); - SOCKBUF_UNLOCK(&ic->ic_socket->so_rcv); - return (0); } @@ -1357,46 +1361,42 @@ void icl_soft_conn_close(struct icl_conn *ic) { struct icl_pdu *pdu; + struct socket *so; - ICL_CONN_LOCK_ASSERT_NOT(ic); - - ICL_CONN_LOCK(ic); - if (ic->ic_socket == NULL) { - ICL_CONN_UNLOCK(ic); - return; - } - - /* - * Deregister socket upcalls. - */ - ICL_CONN_UNLOCK(ic); - SOCKBUF_LOCK(&ic->ic_socket->so_snd); - if (ic->ic_socket->so_snd.sb_upcall != NULL) - soupcall_clear(ic->ic_socket, SO_SND); - SOCKBUF_UNLOCK(&ic->ic_socket->so_snd); - SOCKBUF_LOCK(&ic->ic_socket->so_rcv); - if (ic->ic_socket->so_rcv.sb_upcall != NULL) - soupcall_clear(ic->ic_socket, SO_RCV); - SOCKBUF_UNLOCK(&ic->ic_socket->so_rcv); ICL_CONN_LOCK(ic); - ic->ic_disconnecting = true; - /* * Wake up the threads, so they can properly terminate. */ + ic->ic_disconnecting = true; while (ic->ic_receive_running || ic->ic_send_running) { - //ICL_DEBUG("waiting for send/receive threads to terminate"); cv_signal(&ic->ic_receive_cv); cv_signal(&ic->ic_send_cv); cv_wait(&ic->ic_send_cv, ic->ic_lock); } - //ICL_DEBUG("send/receive threads terminated"); + /* Some other thread could close the connection same time. */ + so = ic->ic_socket; + if (so == NULL) { + ICL_CONN_UNLOCK(ic); + return; + } + ic->ic_socket = NULL; + + /* + * Deregister socket upcalls. + */ ICL_CONN_UNLOCK(ic); - soclose(ic->ic_socket); + SOCKBUF_LOCK(&so->so_snd); + if (so->so_snd.sb_upcall != NULL) + soupcall_clear(so, SO_SND); + SOCKBUF_UNLOCK(&so->so_snd); + SOCKBUF_LOCK(&so->so_rcv); + if (so->so_rcv.sb_upcall != NULL) + soupcall_clear(so, SO_RCV); + SOCKBUF_UNLOCK(&so->so_rcv); + soclose(so); ICL_CONN_LOCK(ic); - ic->ic_socket = NULL; if (ic->ic_receive_pdu != NULL) { //ICL_DEBUG("freeing partially received PDU"); From owner-svn-src-all@FreeBSD.ORG Fri May 15 13:50:38 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 99E8350E; Fri, 15 May 2015 13:50:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7AA4D1E16; Fri, 15 May 2015 13:50:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4FDocDU054146; Fri, 15 May 2015 13:50:38 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4FDocQT054144; Fri, 15 May 2015 13:50:38 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201505151350.t4FDocQT054144@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 15 May 2015 13:50:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282971 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 15 May 2015 13:50:38 -0000 Author: jhb Date: Fri May 15 13:50:37 2015 New Revision: 282971 URL: https://svnweb.freebsd.org/changeset/base/282971 Log: Previously, cv_waiters was only updated by cv_signal or cv_wait. If a thread awakened due to a time out, then cv_waiters was not decremented. If INT_MAX threads timed out on a cv without an intervening cv_broadcast, then cv_waiters could overflow. To fix this, have each sleeping thread decrement cv_waiters when it resumes. Note that previously cv_waiters was protected by the sleepq chain lock. However, that lock is not held when threads resume from sleep. In addition, the interlock is also not always reacquired after resuming (cv_wait_unlock), nor is it always held by callers of cv_signal() or cv_broadcast(). Instead, use atomic ops to update cv_waiters. Since the sleepq chain lock is still held on every increment, it should still be safe to compare cv_waiters against zero while holding the lock in the wakeup routines as the only way the race should be lost would result in extra calls to sleepq_signal() or sleepq_broadcast(). Differential Revision: https://reviews.freebsd.org/D2427 Reviewed by: benno Reported by: benno (wrap of cv_waiters in the field) MFC after: 2 weeks Modified: head/sys/kern/kern_condvar.c head/sys/sys/condvar.h Modified: head/sys/kern/kern_condvar.c ============================================================================== --- head/sys/kern/kern_condvar.c Fri May 15 13:36:50 2015 (r282970) +++ head/sys/kern/kern_condvar.c Fri May 15 13:50:37 2015 (r282971) @@ -122,7 +122,7 @@ _cv_wait(struct cv *cvp, struct lock_obj sleepq_lock(cvp); - cvp->cv_waiters++; + atomic_add_int(&cvp->cv_waiters, 1); if (lock == &Giant.lock_object) mtx_assert(&Giant, MA_OWNED); DROP_GIANT(); @@ -137,6 +137,7 @@ _cv_wait(struct cv *cvp, struct lock_obj sleepq_lock(cvp); } sleepq_wait(cvp, 0); + atomic_subtract_int(&cvp->cv_waiters, 1); #ifdef KTRACE if (KTRPOINT(td, KTR_CSW)) @@ -184,7 +185,7 @@ _cv_wait_unlock(struct cv *cvp, struct l sleepq_lock(cvp); - cvp->cv_waiters++; + atomic_add_int(&cvp->cv_waiters, 1); DROP_GIANT(); sleepq_add(cvp, lock, cvp->cv_description, SLEEPQ_CONDVAR, 0); @@ -194,6 +195,7 @@ _cv_wait_unlock(struct cv *cvp, struct l if (class->lc_flags & LC_SLEEPABLE) sleepq_lock(cvp); sleepq_wait(cvp, 0); + atomic_subtract_int(&cvp->cv_waiters, 1); #ifdef KTRACE if (KTRPOINT(td, KTR_CSW)) @@ -240,7 +242,7 @@ _cv_wait_sig(struct cv *cvp, struct lock sleepq_lock(cvp); - cvp->cv_waiters++; + atomic_add_int(&cvp->cv_waiters, 1); if (lock == &Giant.lock_object) mtx_assert(&Giant, MA_OWNED); DROP_GIANT(); @@ -256,6 +258,7 @@ _cv_wait_sig(struct cv *cvp, struct lock sleepq_lock(cvp); } rval = sleepq_wait_sig(cvp, 0); + atomic_subtract_int(&cvp->cv_waiters, 1); #ifdef KTRACE if (KTRPOINT(td, KTR_CSW)) @@ -307,7 +310,7 @@ _cv_timedwait_sbt(struct cv *cvp, struct sleepq_lock(cvp); - cvp->cv_waiters++; + atomic_add_int(&cvp->cv_waiters, 1); if (lock == &Giant.lock_object) mtx_assert(&Giant, MA_OWNED); DROP_GIANT(); @@ -323,6 +326,7 @@ _cv_timedwait_sbt(struct cv *cvp, struct sleepq_lock(cvp); } rval = sleepq_timedwait(cvp, 0); + atomic_subtract_int(&cvp->cv_waiters, 1); #ifdef KTRACE if (KTRPOINT(td, KTR_CSW)) @@ -376,7 +380,7 @@ _cv_timedwait_sig_sbt(struct cv *cvp, st sleepq_lock(cvp); - cvp->cv_waiters++; + atomic_add_int(&cvp->cv_waiters, 1); if (lock == &Giant.lock_object) mtx_assert(&Giant, MA_OWNED); DROP_GIANT(); @@ -393,6 +397,7 @@ _cv_timedwait_sig_sbt(struct cv *cvp, st sleepq_lock(cvp); } rval = sleepq_timedwait_sig(cvp, 0); + atomic_subtract_int(&cvp->cv_waiters, 1); #ifdef KTRACE if (KTRPOINT(td, KTR_CSW)) @@ -421,10 +426,8 @@ cv_signal(struct cv *cvp) wakeup_swapper = 0; sleepq_lock(cvp); - if (cvp->cv_waiters > 0) { - cvp->cv_waiters--; + if (cvp->cv_waiters > 0) wakeup_swapper = sleepq_signal(cvp, SLEEPQ_CONDVAR, 0, 0); - } sleepq_release(cvp); if (wakeup_swapper) kick_proc0(); @@ -447,10 +450,8 @@ cv_broadcastpri(struct cv *cvp, int pri) if (pri == -1) pri = 0; sleepq_lock(cvp); - if (cvp->cv_waiters > 0) { - cvp->cv_waiters = 0; + if (cvp->cv_waiters > 0) wakeup_swapper = sleepq_broadcast(cvp, SLEEPQ_CONDVAR, pri, 0); - } sleepq_release(cvp); if (wakeup_swapper) kick_proc0(); Modified: head/sys/sys/condvar.h ============================================================================== --- head/sys/sys/condvar.h Fri May 15 13:36:50 2015 (r282970) +++ head/sys/sys/condvar.h Fri May 15 13:50:37 2015 (r282971) @@ -45,7 +45,7 @@ TAILQ_HEAD(cv_waitq, thread); */ struct cv { const char *cv_description; - int cv_waiters; + volatile int cv_waiters; }; #ifdef _KERNEL From owner-svn-src-all@FreeBSD.ORG Fri May 15 13:55:21 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B034B7B8; Fri, 15 May 2015 13:55:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 913B61EFD; Fri, 15 May 2015 13:55:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4FDtLAu057220; Fri, 15 May 2015 13:55:21 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4FDtJX1057202; Fri, 15 May 2015 13:55:19 GMT (envelope-from br@FreeBSD.org) Message-Id: <201505151355.t4FDtJX1057202@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Fri, 15 May 2015 13:55:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282972 - in head/sys: dev/fdt dev/gpio dev/ofw mips/beri powerpc/ofw powerpc/pseries 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.20 Precedence: list List-Id: "SVN commit messages 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, 15 May 2015 13:55:21 -0000 Author: br Date: Fri May 15 13:55:18 2015 New Revision: 282972 URL: https://svnweb.freebsd.org/changeset/base/282972 Log: Provide the number of interrupt resources added to the list by using extra argument, so caller will know that. Modified: head/sys/dev/fdt/simplebus.c head/sys/dev/gpio/ofw_gpiobus.c head/sys/dev/ofw/ofw_bus_subr.c head/sys/dev/ofw/ofw_bus_subr.h head/sys/dev/ofw/ofw_iicbus.c head/sys/mips/beri/beri_simplebus.c head/sys/powerpc/ofw/ofw_pcibus.c head/sys/powerpc/pseries/vdevice.c Modified: head/sys/dev/fdt/simplebus.c ============================================================================== --- head/sys/dev/fdt/simplebus.c Fri May 15 13:50:37 2015 (r282971) +++ head/sys/dev/fdt/simplebus.c Fri May 15 13:55:18 2015 (r282972) @@ -251,7 +251,7 @@ simplebus_setup_dinfo(device_t dev, phan resource_list_init(&ndi->rl); ofw_bus_reg_to_rl(dev, node, sc->acells, sc->scells, &ndi->rl); - ofw_bus_intr_to_rl(dev, node, &ndi->rl); + ofw_bus_intr_to_rl(dev, node, &ndi->rl, NULL); return (ndi); } Modified: head/sys/dev/gpio/ofw_gpiobus.c ============================================================================== --- head/sys/dev/gpio/ofw_gpiobus.c Fri May 15 13:50:37 2015 (r282971) +++ head/sys/dev/gpio/ofw_gpiobus.c Fri May 15 13:55:18 2015 (r282972) @@ -147,7 +147,7 @@ ofw_gpiobus_setup_devinfo(device_t bus, } free(pins, M_DEVBUF); /* Parse the interrupt resources. */ - if (ofw_bus_intr_to_rl(bus, node, &dinfo->opd_dinfo.rl) != 0) { + if (ofw_bus_intr_to_rl(bus, node, &dinfo->opd_dinfo.rl, NULL) != 0) { ofw_gpiobus_destroy_devinfo(bus, dinfo); return (NULL); } Modified: head/sys/dev/ofw/ofw_bus_subr.c ============================================================================== --- head/sys/dev/ofw/ofw_bus_subr.c Fri May 15 13:50:37 2015 (r282971) +++ head/sys/dev/ofw/ofw_bus_subr.c Fri May 15 13:55:18 2015 (r282972) @@ -430,7 +430,8 @@ ofw_bus_reg_to_rl(device_t dev, phandle_ } int -ofw_bus_intr_to_rl(device_t dev, phandle_t node, struct resource_list *rl) +ofw_bus_intr_to_rl(device_t dev, phandle_t node, + struct resource_list *rl, int *rlen) { phandle_t iparent; uint32_t icells, *intr; @@ -495,6 +496,8 @@ ofw_bus_intr_to_rl(device_t dev, phandle irqnum = ofw_bus_map_intr(dev, iparent, icells, &intr[i]); resource_list_add(rl, SYS_RES_IRQ, rid++, irqnum, irqnum, 1); } + if (rlen != NULL) + *rlen = rid; free(intr, M_OFWPROP); return (err); } Modified: head/sys/dev/ofw/ofw_bus_subr.h ============================================================================== --- head/sys/dev/ofw/ofw_bus_subr.h Fri May 15 13:50:37 2015 (r282971) +++ head/sys/dev/ofw/ofw_bus_subr.h Fri May 15 13:55:18 2015 (r282972) @@ -75,7 +75,7 @@ int ofw_bus_search_intrmap(void *, int, /* Routines for parsing device-tree data into resource lists. */ int ofw_bus_reg_to_rl(device_t, phandle_t, pcell_t, pcell_t, struct resource_list *); -int ofw_bus_intr_to_rl(device_t, phandle_t, struct resource_list *); +int ofw_bus_intr_to_rl(device_t, phandle_t, struct resource_list *, int *); /* Helper to get device status property */ const char *ofw_bus_get_status(device_t dev); Modified: head/sys/dev/ofw/ofw_iicbus.c ============================================================================== --- head/sys/dev/ofw/ofw_iicbus.c Fri May 15 13:50:37 2015 (r282971) +++ head/sys/dev/ofw/ofw_iicbus.c Fri May 15 13:55:18 2015 (r282972) @@ -156,7 +156,8 @@ ofw_iicbus_attach(device_t dev) childdev = device_add_child(dev, NULL, -1); resource_list_init(&dinfo->opd_dinfo.rl); - ofw_bus_intr_to_rl(childdev, child, &dinfo->opd_dinfo.rl); + ofw_bus_intr_to_rl(childdev, child, + &dinfo->opd_dinfo.rl, NULL); device_set_ivars(childdev, dinfo); } Modified: head/sys/mips/beri/beri_simplebus.c ============================================================================== --- head/sys/mips/beri/beri_simplebus.c Fri May 15 13:50:37 2015 (r282971) +++ head/sys/mips/beri/beri_simplebus.c Fri May 15 13:55:18 2015 (r282972) @@ -198,7 +198,7 @@ simplebus_attach(device_t dev) continue; } - if (ofw_bus_intr_to_rl(dev, dt_child, &di->di_res)) { + if (ofw_bus_intr_to_rl(dev, dt_child, &di->di_res, NULL)) { device_printf(dev, "%s: could not process " "'interrupts' property\n", di->di_ofw.obd_name); resource_list_free(&di->di_res); Modified: head/sys/powerpc/ofw/ofw_pcibus.c ============================================================================== --- head/sys/powerpc/ofw/ofw_pcibus.c Fri May 15 13:50:37 2015 (r282971) +++ head/sys/powerpc/ofw/ofw_pcibus.c Fri May 15 13:55:18 2015 (r282972) @@ -201,7 +201,8 @@ ofw_pcibus_enum_devtree(device_t dev, u_ * resource list. */ if (dinfo->opd_dinfo.cfg.intpin == 0) - ofw_bus_intr_to_rl(dev, child, &dinfo->opd_dinfo.resources); + ofw_bus_intr_to_rl(dev, child, + &dinfo->opd_dinfo.resources, NULL); } } Modified: head/sys/powerpc/pseries/vdevice.c ============================================================================== --- head/sys/powerpc/pseries/vdevice.c Fri May 15 13:50:37 2015 (r282971) +++ head/sys/powerpc/pseries/vdevice.c Fri May 15 13:55:18 2015 (r282972) @@ -146,7 +146,7 @@ vdevice_attach(device_t dev) } resource_list_init(&dinfo->mdi_resources); - ofw_bus_intr_to_rl(dev, child, &dinfo->mdi_resources); + ofw_bus_intr_to_rl(dev, child, &dinfo->mdi_resources, NULL); cdev = device_add_child(dev, NULL, -1); if (cdev == NULL) { From owner-svn-src-all@FreeBSD.ORG Fri May 15 14:22:34 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 957EDF30; Fri, 15 May 2015 14:22:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6A72F127D; Fri, 15 May 2015 14:22:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4FEMYeY071953; Fri, 15 May 2015 14:22:34 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4FEMXcI071951; Fri, 15 May 2015 14:22:33 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201505151422.t4FEMXcI071951@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 15 May 2015 14:22:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282973 - in head: gnu/lib 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.20 Precedence: list List-Id: "SVN commit messages 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, 15 May 2015 14:22:34 -0000 Author: emaste Date: Fri May 15 14:22:33 2015 New Revision: 282973 URL: https://svnweb.freebsd.org/changeset/base/282973 Log: Build libgomp only if we're also building base system GCC Clang's OpenMP support will emit Intel OpenMP API library calls, and will therefore require libiomp (or whatever name is settled on). An up-to-date version of libgomp is included in ports or pkg GCC. Thus, there is no reason to build base libgomp without base system GCC. PR: 199979 (exp-run) Reviewed by: pfg Relnotes: Yes Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D2459 Modified: head/gnu/lib/Makefile head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/gnu/lib/Makefile ============================================================================== --- head/gnu/lib/Makefile Fri May 15 13:55:18 2015 (r282972) +++ head/gnu/lib/Makefile Fri May 15 14:22:33 2015 (r282973) @@ -2,7 +2,11 @@ .include -SUBDIR= csu libgcc libgcov libdialog libgomp libregex libreadline +SUBDIR= csu libgcc libgcov libdialog libregex libreadline + +.if ${MK_GCC} != "no" +SUBDIR+= libgomp +.endif .if ${MK_SSP} != "no" SUBDIR+= libssp Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Fri May 15 13:55:18 2015 (r282972) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Fri May 15 14:22:33 2015 (r282973) @@ -1743,6 +1743,11 @@ OLD_FILES+=usr/include/gcc/4.2/altivec.h OLD_FILES+=usr/include/gcc/4.2/ppc-asm.h OLD_FILES+=usr/include/gcc/4.2/spe.h .endif +OLD_FILES+=usr/include/omp.h +OLD_FILES+=usr/lib/libgomp.a +OLD_FILES+=usr/lib/libgomp.so +OLD_FILES+=usr/lib/libgomp.so.1 +OLD_FILES+=usr/lib/libgomp_p.a OLD_FILES+=usr/libexec/cc1 OLD_FILES+=usr/libexec/cc1plus OLD_FILES+=usr/share/info/cpp.info.gz From owner-svn-src-all@FreeBSD.ORG Fri May 15 15:08:38 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 360B1D0E; Fri, 15 May 2015 15:08:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2306117D2; Fri, 15 May 2015 15:08:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4FF8c33092659; Fri, 15 May 2015 15:08:38 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4FF8cED092658; Fri, 15 May 2015 15:08:38 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201505151508.t4FF8cED092658@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Fri, 15 May 2015 15:08:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r282974 - in stable/10/usr.sbin: . uefisign 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.20 Precedence: list List-Id: "SVN commit messages 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, 15 May 2015 15:08:38 -0000 Author: trasz Date: Fri May 15 15:08:37 2015 New Revision: 282974 URL: https://svnweb.freebsd.org/changeset/base/282974 Log: MFC r279315: Add uefisign(8), UEFI Secure Boot signing utility. Relnotes: yes Sponsored by: The FreeBSD Foundation Added: stable/10/usr.sbin/uefisign/ - copied from r279315, head/usr.sbin/uefisign/ Modified: stable/10/usr.sbin/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/Makefile ============================================================================== --- stable/10/usr.sbin/Makefile Fri May 15 14:22:33 2015 (r282973) +++ stable/10/usr.sbin/Makefile Fri May 15 15:08:37 2015 (r282974) @@ -86,6 +86,7 @@ SUBDIR= adduser \ traceroute \ trpt \ tzsetup \ + uefisign \ ugidfw \ vipw \ wake \ From owner-svn-src-all@FreeBSD.ORG Fri May 15 15:10:35 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 285D0E73; Fri, 15 May 2015 15:10:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 14C2617F8; Fri, 15 May 2015 15:10:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4FFAYKd094038; Fri, 15 May 2015 15:10:34 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4FFAYFX094036; Fri, 15 May 2015 15:10:34 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201505151510.t4FFAYFX094036@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Fri, 15 May 2015 15:10: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: r282975 - in stable/10: etc/mtree share/examples share/examples/uefisign 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.20 Precedence: list List-Id: "SVN commit messages 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, 15 May 2015 15:10:35 -0000 Author: trasz Date: Fri May 15 15:10:34 2015 New Revision: 282975 URL: https://svnweb.freebsd.org/changeset/base/282975 Log: MFC r279317: Add key/cert generation script for uefisign(8). Sponsored by: The FreeBSD Foundation Added: stable/10/share/examples/uefisign/ - copied from r279317, head/share/examples/uefisign/ Modified: stable/10/etc/mtree/BSD.usr.dist stable/10/share/examples/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/mtree/BSD.usr.dist ============================================================================== --- stable/10/etc/mtree/BSD.usr.dist Fri May 15 15:08:37 2015 (r282974) +++ stable/10/etc/mtree/BSD.usr.dist Fri May 15 15:10:34 2015 (r282975) @@ -409,6 +409,8 @@ .. tcsh .. + uefisign + .. .. games fortune Modified: stable/10/share/examples/Makefile ============================================================================== --- stable/10/share/examples/Makefile Fri May 15 15:08:37 2015 (r282974) +++ stable/10/share/examples/Makefile Fri May 15 15:10:34 2015 (r282975) @@ -27,7 +27,8 @@ LDIRS= BSD_daemon \ printing \ ses \ scsi_target \ - sunrpc + sunrpc \ + uefisign XFILES= BSD_daemon/FreeBSD.pfa \ BSD_daemon/README \ @@ -181,7 +182,8 @@ XFILES= BSD_daemon/FreeBSD.pfa \ sunrpc/sort/Makefile \ sunrpc/sort/rsort.c \ sunrpc/sort/sort.x \ - sunrpc/sort/sort_proc.c + sunrpc/sort/sort_proc.c \ + uefisign/uefikeys BINDIR= ${SHAREDIR}/examples From owner-svn-src-all@FreeBSD.ORG Fri May 15 15:12:13 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DA298FC3; Fri, 15 May 2015 15:12:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ADBFA18BB; Fri, 15 May 2015 15:12:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4FFCD0m096965; Fri, 15 May 2015 15:12:13 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4FFCDsV096964; Fri, 15 May 2015 15:12:13 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201505151512.t4FFCDsV096964@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Fri, 15 May 2015 15:12: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: r282976 - stable/10/share/examples/uefisign 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.20 Precedence: list List-Id: "SVN commit messages 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, 15 May 2015 15:12:14 -0000 Author: trasz Date: Fri May 15 15:12:12 2015 New Revision: 282976 URL: https://svnweb.freebsd.org/changeset/base/282976 Log: MFC r279321: Make the uefikeys script output slightly more obvious. Sponsored by: The FreeBSD Foundation Modified: stable/10/share/examples/uefisign/uefikeys Directory Properties: stable/10/ (props changed) Modified: stable/10/share/examples/uefisign/uefikeys ============================================================================== --- stable/10/share/examples/uefisign/uefikeys Fri May 15 15:10:34 2015 (r282975) +++ stable/10/share/examples/uefisign/uefikeys Fri May 15 15:12:12 2015 (r282976) @@ -18,7 +18,6 @@ fi certfile="${1}.pem" efifile="${1}.cer" keyfile="${1}.key" -p12file="${1}.p12" # XXX: Set this to ten years; we don't want system to suddenly stop booting # due to certificate expiration. Better way would be to use Authenticode # Timestamp. That said, the rumor is UEFI implementations ignore it anyway. @@ -28,13 +27,11 @@ subj="/CN=${1}" [ ! -e "${certfile}" ] || die "${certfile} already exists" [ ! -e "${efifile}" ] || die "${efifile} already exists" [ ! -e "${keyfile}" ] || die "${keyfile} already exists" -[ ! -e "${p12file}" ] || die "${p12file} already exists" umask 077 || die "umask 077 failed" openssl genrsa -out "${keyfile}" 2048 2> /dev/null || die "openssl genrsa failed" openssl req -new -x509 -sha256 -days "${days}" -subj "${subj}" -key "${keyfile}" -out "${certfile}" || die "openssl req failed" openssl x509 -inform PEM -outform DER -in "${certfile}" -out "${efifile}" || die "openssl x509 failed" -openssl pkcs12 -export -out "${p12file}" -inkey "${keyfile}" -in "${certfile}" -password 'pass:' || die "openssl pkcs12 failed" -echo "certificate: ${certfile}; private key: ${keyfile}; UEFI public key: ${efifile}; private key with empty password for pesign: ${p12file}" +echo "certificate: ${certfile}; private key: ${keyfile}; certificate to enroll in UEFI: ${efifile}" From owner-svn-src-all@FreeBSD.ORG Fri May 15 15:13:52 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 67AB626A; Fri, 15 May 2015 15:13:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 54CEB18C8; Fri, 15 May 2015 15:13:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4FFDqqO097359; Fri, 15 May 2015 15:13:52 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4FFDqmd097358; Fri, 15 May 2015 15:13:52 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201505151513.t4FFDqmd097358@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Fri, 15 May 2015 15:13:52 +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: r282977 - stable/10/share/man/man8 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.20 Precedence: list List-Id: "SVN commit messages 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, 15 May 2015 15:13:52 -0000 Author: trasz Date: Fri May 15 15:13:51 2015 New Revision: 282977 URL: https://svnweb.freebsd.org/changeset/base/282977 Log: MFC r279316: Add uefisign(8) reference to uefi(8) manual page. Sponsored by: The FreeBSD Foundation Modified: stable/10/share/man/man8/uefi.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man8/uefi.8 ============================================================================== --- stable/10/share/man/man8/uefi.8 Fri May 15 15:12:12 2015 (r282976) +++ stable/10/share/man/man8/uefi.8 Fri May 15 15:13:51 2015 (r282977) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 17, 2014 +.Dd February 26, 2015 .Dt UEFI 8 .Os .Sh NAME @@ -114,7 +114,8 @@ typical non-default kernel (optional) .Xr vt 4 , .Xr msdosfs 5 , .Xr boot 8 , -.Xr gpart 8 +.Xr gpart 8 , +.Xr uefisign 8 .Sh HISTORY .Nm boot support first appeared in From owner-svn-src-all@FreeBSD.ORG Fri May 15 15:34:02 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 237AEC3D; Fri, 15 May 2015 15:34:02 +0000 (UTC) Received: from bigwig.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 F26C41B8B; Fri, 15 May 2015 15:34:01 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 641CDB95E; Fri, 15 May 2015 11:34:00 -0400 (EDT) From: John Baldwin To: src-committers@freebsd.org Cc: svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r282971 - in head/sys: kern sys Date: Fri, 15 May 2015 09:55:07 -0400 Message-ID: <6021980.e9743X4Cvi@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.1-STABLE; KDE/4.14.3; amd64; ; ) In-Reply-To: <201505151350.t4FDocQT054144@svn.freebsd.org> References: <201505151350.t4FDocQT054144@svn.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.2.7 (bigwig.baldwin.cx); Fri, 15 May 2015 11:34:00 -0400 (EDT) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 15 May 2015 15:34:02 -0000 On Friday, May 15, 2015 01:50:38 PM John Baldwin wrote: > Author: jhb > Date: Fri May 15 13:50:37 2015 > New Revision: 282971 > URL: https://svnweb.freebsd.org/changeset/base/282971 > > Log: > Previously, cv_waiters was only updated by cv_signal or cv_wait. If a > thread awakened due to a time out, then cv_waiters was not decremented. > If INT_MAX threads timed out on a cv without an intervening cv_broadcast, > then cv_waiters could overflow. To fix this, have each sleeping thread > decrement cv_waiters when it resumes. > > Note that previously cv_waiters was protected by the sleepq chain lock. > However, that lock is not held when threads resume from sleep. In > addition, the interlock is also not always reacquired after resuming > (cv_wait_unlock), nor is it always held by callers of cv_signal() or > cv_broadcast(). Instead, use atomic ops to update cv_waiters. Since > the sleepq chain lock is still held on every increment, it should > still be safe to compare cv_waiters against zero while holding the > lock in the wakeup routines as the only way the race should be lost > would result in extra calls to sleepq_signal() or sleepq_broadcast(). > > Differential Revision: https://reviews.freebsd.org/D2427 > Reviewed by: benno > Reported by: benno (wrap of cv_waiters in the field) > MFC after: 2 weeks With the additional overhead of the atomic ops it might be worth running some benchmarks to compare this with removing cv_waiters entirely. The theoretical gain from cv_waiters is avoiding looking in the hash table for a matching sleepqueue when there are no waiters. When cv_waiters was a simple integer the cost of having it around was very small, so even a tiny gain was worth having. (It is worth noting that in pre-SMPng code it was fairly common practice to keep a "WANTED" flag around that was set by waiters and would result in wakeup() being skipped if it wasn't set. These flags were maintained by each caller, not centrally. cv_waiters makes this sort of thing centrally maintained rather than something that each caller has to do.) Now that cv_waiters is updated with atomics, the cost is not quite as small. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Fri May 15 15:36:58 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F3B06DE5; Fri, 15 May 2015 15:36:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D417D1BB3; Fri, 15 May 2015 15:36:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4FFavVZ008569; Fri, 15 May 2015 15:36:57 GMT (envelope-from pkelsey@FreeBSD.org) Received: (from pkelsey@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4FFav3d008568; Fri, 15 May 2015 15:36:57 GMT (envelope-from pkelsey@FreeBSD.org) Message-Id: <201505151536.t4FFav3d008568@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pkelsey set sender to pkelsey@FreeBSD.org using -f From: Patrick Kelsey Date: Fri, 15 May 2015 15:36:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282978 - head/sys/dev/netmap 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.20 Precedence: list List-Id: "SVN commit messages 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, 15 May 2015 15:36:58 -0000 Author: pkelsey Date: Fri May 15 15:36:57 2015 New Revision: 282978 URL: https://svnweb.freebsd.org/changeset/base/282978 Log: When a netmap process terminates without the full set of buffers it was granted via rings and ni_bufs_list_head represented in those rings and lists (e.g., via SIGKILL), those buffers are no longer available for subsequent users for the lifetime of the system. To mitigate this resource leak, reset the allocator state when the last ref to that allocator is released. Note that this only recovers leaked resources for an allocator when there are no longer any users of that allocator, so there remain circumstances in which leaked allocator resources may not ever be recovered - consider a set of multiple netmap processes that are all using the same allocator (say, the global allocator) where members of that set may be killed and restarted over time but at any given point there is one member of that set running. Based on intial work by adrian@. Reviewed by: Giuseppe Lettieri (g.lettieri@iet.unipi.it), luigi Approved by: jmallett (mentor) MFC after: 1 week Sponsored by: Norse Corp, Inc. Modified: head/sys/dev/netmap/netmap_mem2.c Modified: head/sys/dev/netmap/netmap_mem2.c ============================================================================== --- head/sys/dev/netmap/netmap_mem2.c Fri May 15 15:13:51 2015 (r282977) +++ head/sys/dev/netmap/netmap_mem2.c Fri May 15 15:36:57 2015 (r282978) @@ -130,9 +130,9 @@ struct netmap_mem_d { /* the three allocators */ struct netmap_obj_pool pools[NETMAP_POOLS_NR]; - netmap_mem_config_t config; - netmap_mem_finalize_t finalize; - netmap_mem_deref_t deref; + netmap_mem_config_t config; /* called with NMA_LOCK held */ + netmap_mem_finalize_t finalize; /* called with NMA_LOCK held */ + netmap_mem_deref_t deref; /* called with NMA_LOCK held */ nm_memid_t nm_id; /* allocator identifier */ int nm_grp; /* iommu groupd id */ @@ -751,6 +751,12 @@ netmap_reset_obj_allocator(struct netmap u_int i; size_t sz = p->_clustsize; + /* + * Free each cluster allocated in + * netmap_finalize_obj_allocator(). The cluster start + * addresses are stored at multiples of p->_clusterentries + * in the lut. + */ for (i = 0; i < p->objtotal; i += p->_clustentries) { if (p->lut[i].vaddr) contigfree(p->lut[i].vaddr, sz, M_NETMAP); @@ -929,6 +935,7 @@ netmap_finalize_obj_allocator(struct net if (i % p->_clustentries == 0 && p->lut[i].vaddr) contigfree(p->lut[i].vaddr, n, M_NETMAP); + p->lut[i].vaddr = NULL; } out: p->objtotal = i; @@ -936,6 +943,17 @@ netmap_finalize_obj_allocator(struct net p->numclusters = (i + p->_clustentries - 1) / p->_clustentries; break; } + /* + * Set bitmap and lut state for all buffers in the current + * cluster. + * + * [i, lim) is the set of buffer indexes that cover the + * current cluster. + * + * 'clust' is really the address of the current buffer in + * the current cluster as we index through it with a stride + * of p->_objsize. + */ for (; i < lim; i++, clust += p->_objsize) { p->bitmap[ (i>>5) ] |= ( 1 << (i & 31) ); p->lut[i].vaddr = clust; @@ -1092,10 +1110,8 @@ static int netmap_mem_private_finalize(struct netmap_mem_d *nmd) { int err; - NMA_LOCK(nmd); nmd->refcount++; err = netmap_mem_finalize_all(nmd); - NMA_UNLOCK(nmd); return err; } @@ -1103,10 +1119,8 @@ netmap_mem_private_finalize(struct netma static void netmap_mem_private_deref(struct netmap_mem_d *nmd) { - NMA_LOCK(nmd); if (--nmd->refcount <= 0) netmap_mem_reset_all(nmd); - NMA_UNLOCK(nmd); } @@ -1242,10 +1256,7 @@ static int netmap_mem_global_finalize(struct netmap_mem_d *nmd) { int err; - - NMA_LOCK(nmd); - - + /* update configuration if changed */ if (netmap_mem_global_config(nmd)) goto out; @@ -1268,8 +1279,6 @@ out: nmd->refcount--; err = nmd->lasterr; - NMA_UNLOCK(nmd); - return err; } @@ -1518,7 +1527,6 @@ netmap_mem_if_delete(struct netmap_adapt static void netmap_mem_global_deref(struct netmap_mem_d *nmd) { - NMA_LOCK(nmd); nmd->refcount--; if (!nmd->refcount) @@ -1526,7 +1534,6 @@ netmap_mem_global_deref(struct netmap_me if (netmap_verbose) D("refcount = %d", nmd->refcount); - NMA_UNLOCK(nmd); } int @@ -1535,7 +1542,9 @@ netmap_mem_finalize(struct netmap_mem_d if (nm_mem_assign_group(nmd, na->pdev) < 0) { return ENOMEM; } else { + NMA_LOCK(nmd); nmd->finalize(nmd); + NMA_UNLOCK(nmd); } if (!nmd->lasterr && na->pdev) @@ -1549,6 +1558,48 @@ netmap_mem_deref(struct netmap_mem_d *nm { NMA_LOCK(nmd); netmap_mem_unmap(&nmd->pools[NETMAP_BUF_POOL], na); + if (nmd->refcount == 1) { + u_int i; + + /* + * Reset the allocator when it falls out of use so that any + * pool resources leaked by unclean application exits are + * reclaimed. + */ + for (i = 0; i < NETMAP_POOLS_NR; i++) { + struct netmap_obj_pool *p; + u_int j; + + p = &nmd->pools[i]; + p->objfree = p->objtotal; + /* + * Reproduce the net effect of the M_ZERO malloc() + * and marking of free entries in the bitmap that + * occur in finalize_obj_allocator() + */ + memset(p->bitmap, + '\0', + sizeof(uint32_t) * ((p->objtotal + 31) / 32)); + + /* + * Set all the bits in the bitmap that have + * corresponding buffers to 1 to indicate they are + * free. + */ + for (j = 0; j < p->objtotal; j++) { + if (p->lut[j].vaddr != NULL) { + p->bitmap[ (j>>5) ] |= ( 1 << (j & 31) ); + } + } + } + + /* + * Per netmap_mem_finalize_all(), + * buffers 0 and 1 are reserved + */ + nmd->pools[NETMAP_BUF_POOL].objfree -= 2; + nmd->pools[NETMAP_BUF_POOL].bitmap[0] = ~3; + } + nmd->deref(nmd); NMA_UNLOCK(nmd); - return nmd->deref(nmd); } From owner-svn-src-all@FreeBSD.ORG Fri May 15 15:49:26 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9AD14357; Fri, 15 May 2015 15:49:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 86EAB1CE2; Fri, 15 May 2015 15:49:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4FFnQhH014255; Fri, 15 May 2015 15:49:26 GMT (envelope-from julian@FreeBSD.org) Received: (from julian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4FFnPfS014249; Fri, 15 May 2015 15:49:25 GMT (envelope-from julian@FreeBSD.org) Message-Id: <201505151549.t4FFnPfS014249@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: julian set sender to julian@FreeBSD.org using -f From: Julian Elischer Date: Fri, 15 May 2015 15:49:25 +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: r282979 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 15 May 2015 15:49:26 -0000 Author: julian Date: Fri May 15 15:49:24 2015 New Revision: 282979 URL: https://svnweb.freebsd.org/changeset/base/282979 Log: MFH: r282485 Tweak seekdir, telldir and readdir so that when htere are deletes going on, as seek to teh last location saved will still work. This is needed for Samba to be able to correctly handle delete requests from windows. This does not completely fix seekdir when deletes are present but fixes the worst of the problems. The real solution must involve some changes to the API for eh VFS and getdirentries(2). Obtained from: Panzura inc MFH: r282550 (jhb@) A few style fixes and expand the comment a bit on what _fixtelldir() is doing. MFH: r282560 (jhb@) Tweak the comment here some more. In particular, the previous opening sentence was a bit confusing. Noted by: kib Modified: stable/10/lib/libc/gen/directory.3 stable/10/lib/libc/gen/readdir.c stable/10/lib/libc/gen/rewinddir.c stable/10/lib/libc/gen/telldir.c stable/10/lib/libc/gen/telldir.h Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/gen/directory.3 ============================================================================== --- stable/10/lib/libc/gen/directory.3 Fri May 15 15:36:57 2015 (r282978) +++ stable/10/lib/libc/gen/directory.3 Fri May 15 15:49:24 2015 (r282979) @@ -267,4 +267,27 @@ The invalidation of .Fn telldir tokens when calling .Fn seekdir -is non-standard. +is non-standard. This is a compile time option. +.Pp +The behaviour of +.Fn telldir +and +.Fn seekdir +is likely to be wrong if there are parallel unlinks happening +and the directory is larger than one page. +There is code to ensure that a +.Fn seekdir +to the location given by a +.Fn telldir +immediately before the last +.Fn readdir +will always set the correct location to return the same value as that last +.Fn readdir +performed. +This is enough for some applications which want to "push back the last entry read" E.g. Samba. +Seeks back to any other location, +other than the beginning of the directory, +may result in unexpected behaviour if deletes are present. +It is hoped that this situation will be resolved with changes to +.Fn getdirentries +and the VFS. Modified: stable/10/lib/libc/gen/readdir.c ============================================================================== --- stable/10/lib/libc/gen/readdir.c Fri May 15 15:36:57 2015 (r282978) +++ stable/10/lib/libc/gen/readdir.c Fri May 15 15:49:24 2015 (r282979) @@ -54,19 +54,25 @@ _readdir_unlocked(dirp, skip) int skip; { struct dirent *dp; + long initial_seek; + long initial_loc = 0; for (;;) { if (dirp->dd_loc >= dirp->dd_size) { if (dirp->dd_flags & __DTF_READALL) return (NULL); + initial_loc = dirp->dd_loc; + dirp->dd_flags &= ~__DTF_SKIPREAD; dirp->dd_loc = 0; } if (dirp->dd_loc == 0 && !(dirp->dd_flags & (__DTF_READALL | __DTF_SKIPREAD))) { + initial_seek = dirp->dd_seek; dirp->dd_size = _getdirentries(dirp->dd_fd, dirp->dd_buf, dirp->dd_len, &dirp->dd_seek); if (dirp->dd_size <= 0) return (NULL); + _fixtelldir(dirp, initial_seek, initial_loc); } dirp->dd_flags &= ~__DTF_SKIPREAD; dp = (struct dirent *)(dirp->dd_buf + dirp->dd_loc); Modified: stable/10/lib/libc/gen/rewinddir.c ============================================================================== --- stable/10/lib/libc/gen/rewinddir.c Fri May 15 15:36:57 2015 (r282978) +++ stable/10/lib/libc/gen/rewinddir.c Fri May 15 15:49:24 2015 (r282979) @@ -51,6 +51,7 @@ rewinddir(dirp) if (__isthreaded) _pthread_mutex_lock(&dirp->dd_lock); + dirp->dd_flags &= ~__DTF_SKIPREAD; /* current contents are invalid */ if (dirp->dd_flags & __DTF_READALL) _filldir(dirp, false); else { Modified: stable/10/lib/libc/gen/telldir.c ============================================================================== --- stable/10/lib/libc/gen/telldir.c Fri May 15 15:36:57 2015 (r282978) +++ stable/10/lib/libc/gen/telldir.c Fri May 15 15:49:24 2015 (r282979) @@ -101,9 +101,22 @@ _seekdir(dirp, loc) return; if (lp->loc_loc == dirp->dd_loc && lp->loc_seek == dirp->dd_seek) return; + + /* If it's within the same chunk of data, don't bother reloading. */ + if (lp->loc_seek == dirp->dd_seek) { + /* + * If we go back to 0 don't make the next readdir + * trigger a call to getdirentries(). + */ + if (lp->loc_loc == 0) + dirp->dd_flags |= __DTF_SKIPREAD; + dirp->dd_loc = lp->loc_loc; + return; + } (void) lseek(dirp->dd_fd, (off_t)lp->loc_seek, SEEK_SET); dirp->dd_seek = lp->loc_seek; dirp->dd_loc = 0; + dirp->dd_flags &= ~__DTF_SKIPREAD; /* current contents are invalid */ while (dirp->dd_loc < lp->loc_loc) { dp = _readdir_unlocked(dirp, 0); if (dp == NULL) @@ -112,6 +125,30 @@ _seekdir(dirp, loc) } /* + * After readdir returns the last entry in a block, a call to telldir + * returns a location that is after the end of that last entry. + * However, that location doesn't refer to a valid directory entry. + * Ideally, the call to telldir would return a location that refers to + * the first entry in the next block. That location is not known + * until the next block is read, so readdir calls this function after + * fetching a new block to fix any such telldir locations. + */ +void +_fixtelldir(DIR *dirp, long oldseek, long oldloc) +{ + struct ddloc *lp; + + lp = LIST_FIRST(&dirp->dd_td->td_locq); + if (lp != NULL) { + if (lp->loc_loc == oldloc && + lp->loc_seek == oldseek) { + lp->loc_seek = dirp->dd_seek; + lp->loc_loc = dirp->dd_loc; + } + } +} + +/* * Reclaim memory for telldir cookies which weren't used. */ void Modified: stable/10/lib/libc/gen/telldir.h ============================================================================== --- stable/10/lib/libc/gen/telldir.h Fri May 15 15:36:57 2015 (r282978) +++ stable/10/lib/libc/gen/telldir.h Fri May 15 15:49:24 2015 (r282979) @@ -64,5 +64,6 @@ bool _filldir(DIR *, bool); struct dirent *_readdir_unlocked(DIR *, int); void _reclaim_telldir(DIR *); void _seekdir(DIR *, long); +void _fixtelldir(DIR *dirp, long oldseek, long oldloc); #endif From owner-svn-src-all@FreeBSD.ORG Fri May 15 15:56:28 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D8F50752; Fri, 15 May 2015 15:56:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C6AAE1DE4; Fri, 15 May 2015 15:56:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4FFuSL5018766; Fri, 15 May 2015 15:56:28 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4FFuSrW018765; Fri, 15 May 2015 15:56:28 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201505151556.t4FFuSrW018765@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Fri, 15 May 2015 15:56:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282980 - head/usr.bin/man 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.20 Precedence: list List-Id: "SVN commit messages 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, 15 May 2015 15:56:29 -0000 Author: bapt Date: Fri May 15 15:56:28 2015 New Revision: 282980 URL: https://svnweb.freebsd.org/changeset/base/282980 Log: Allow MANWIDTH to work with mandoc(1) Reported by: bdrewery Modified: head/usr.bin/man/man.sh Modified: head/usr.bin/man/man.sh ============================================================================== --- head/usr.bin/man/man.sh Fri May 15 15:49:24 2015 (r282979) +++ head/usr.bin/man/man.sh Fri May 15 15:56:28 2015 (r282980) @@ -311,8 +311,11 @@ man_display_page() { return fi + if [ -n "$use_width" ]; then + mandoc_args="-O width=${use_width}" + fi testline="mandoc -Tlint -Wunsupp 2>/dev/null" - pipeline="mandoc | $MANPAGER" + pipeline="mandoc $mandoc_args | $MANPAGER" if ! eval "$cattool $manpage | $testline" ;then if which -s groff; then From owner-svn-src-all@FreeBSD.ORG Fri May 15 17:34:44 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7C400F29 for ; Fri, 15 May 2015 17:34:44 +0000 (UTC) Received: from nm4.bullet.mail.bf1.yahoo.com (nm4.bullet.mail.bf1.yahoo.com [98.139.212.163]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2C0AA1AE3 for ; Fri, 15 May 2015 17:34:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1431711276; bh=PMnD3SdmT84hGqBSp6NsuLJkqwSeg5Q8/VFmmmWd0HE=; h=Date:From:To:CC:Subject:References:In-Reply-To:From:Subject; b=unPrd6MvU1ldlgPh1eOi0r/UIRf86+jgsD0sYN8OZ4WSORI9qGZd3/+Ew+tSgRVWLPcE4wiDvt+9jHeu62cHYb62zv/oR3V3tp9fePhS/UWWJy5v1hyeevvZ6FQmq1br09eskvXoKyLguOT+IprBsU7cqLDS2AC/U5FJC9Nez/gtko9xmklAzRIuNp6nwMXVnqo7bT9G5tjALqwVs5hIypjCOzt2CJtjB69zrppWTejockVvvYmdPFrdBTcGhecoqrv1a1URfVOdkHXlBrudit8CilAabICAaQhR0LNs6I9oS4IzjKLukbZZEGkJGQyWt6JJelFm2+ybLf4W1NNVqQ== Received: from [66.196.81.171] by nm4.bullet.mail.bf1.yahoo.com with NNFMP; 15 May 2015 17:34:36 -0000 Received: from [98.139.211.194] by tm17.bullet.mail.bf1.yahoo.com with NNFMP; 15 May 2015 17:34:36 -0000 Received: from [127.0.0.1] by smtp203.mail.bf1.yahoo.com with NNFMP; 15 May 2015 17:34:36 -0000 X-Yahoo-Newman-Id: 717744.9126.bm@smtp203.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: v7lF6LcVM1ks4febOiDDDYC5icX_Rv.WMuGYK9Wzkhh4GzX 3uK4TTrQ3vImBOzrCjvMTH1bcwE6Fc_8Mlq4NsgrxUUYg7o_ZHnha5noSfS5 EIEjMizySITSM3ZoPNHNoK8TIL6C5T2fynTgg27BMgG1Ip1LQvrMBefQ2yny wFQqjZ0ZdXIvp6W0_RH3QxStGd03a0Z4zzgGXuXpNJr3sJjZ5U6_2MOhVRBB vm0VPhFdO5Fa7gRy4K_HGsMkpEmv3oIT3ACOLrvp6QMAQCMyjqi3BwuuzPUj .fskIOTgIl6qIXcxZIsqtjzq9_rFCJRUx7MgNJ3Iib6IOLWqowwBsYkTztRs J1f9FP7TpJTSg6y5GeXV4MEJeZ_BhFMJSl0Jsnzue6lSK8pceOWMUrGc98AT 6rv17Vdqiaj3X3ciQosOpno2n64gWgTVrq5LcjPsEPS8bv4YOLVYzcTrxzJG QGtyiDTdAGO9vwgnmNQ3Sl9HBpy9aWhivrfwlQ9A2T9n_31lTmS7496ux3gy md2msRMg4bX_r0Nu3MsvmYvyrdTD9XMhP X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Message-ID: <55562E36.1000304@FreeBSD.org> Date: Fri, 15 May 2015 12:34:46 -0500 From: Pedro Giffuni User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Tijl Coosemans CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r282907 - head/sys/sys References: <201505141549.t4EFnnQg094250@svn.freebsd.org> <20150515123327.45621037@kalimero.tijl.coosemans.org> In-Reply-To: <20150515123327.45621037@kalimero.tijl.coosemans.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 15 May 2015 17:34:44 -0000 On 05/15/15 05:33, Tijl Coosemans wrote: > Modified: head/sys/sys/cdefs.h > ============================================================================== > --- head/sys/sys/cdefs.h Thu May 14 15:14:03 2015 (r282906) > +++ head/sys/sys/cdefs.h Thu May 14 15:49:48 2015 (r282907) > @@ -388,6 +388,12 @@ > #define __alloc_size(x) > #endif > > +#if __has_builtin(__builtin_unreachable) || __GNUC_PREREQ__(4, 6) > +#define __unreachable() __builtin_unreachable() > +#else > +#define __unreachable() do {} while (/*CONSTCOND*/0) > __builtin_unreachable() can be used in expressions so I think it's better > to replace do-while with ((void)0). You can then do things like this: > > #define assume(e) ((e) ? (void)0 : __unreachable()) > (like assert(e) but without error) Looks reasonable, thanks! FWIW, there was some discussion about having a debugging macro that warns when such unreachable code is reached. We are just not sure where such a macro belongs, probably not in cdefs. Pedro. From owner-svn-src-all@FreeBSD.ORG Fri May 15 17:51:04 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8445544E; Fri, 15 May 2015 17:51:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7382A1CDB; Fri, 15 May 2015 17:51:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4FHp4JI079709; Fri, 15 May 2015 17:51:04 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4FHp4Kx079707; Fri, 15 May 2015 17:51:04 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201505151751.t4FHp4Kx079707@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Fri, 15 May 2015 17:51:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282981 - head/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.20 Precedence: list List-Id: "SVN commit messages 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, 15 May 2015 17:51:04 -0000 Author: pfg Date: Fri May 15 17:51:03 2015 New Revision: 282981 URL: https://svnweb.freebsd.org/changeset/base/282981 Log: Replace a CONSTCOND for a void value as a replacement for __unreachable builtin This only applies if we are not using clang or gcc but it lets us use the __unreachable() buitin in expressions. Suggested by: tijl Modified: head/sys/sys/cdefs.h Modified: head/sys/sys/cdefs.h ============================================================================== --- head/sys/sys/cdefs.h Fri May 15 15:56:28 2015 (r282980) +++ head/sys/sys/cdefs.h Fri May 15 17:51:03 2015 (r282981) @@ -391,7 +391,7 @@ #if __has_builtin(__builtin_unreachable) || __GNUC_PREREQ__(4, 6) #define __unreachable() __builtin_unreachable() #else -#define __unreachable() do {} while (/*CONSTCOND*/0) +#define __unreachable() ((void)0) #endif #if __has_attribute(alloc_align) || __GNUC_PREREQ__(4, 9) From owner-svn-src-all@FreeBSD.ORG Fri May 15 18:04:50 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1C296BF; Fri, 15 May 2015 18:04:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0B9AA1E2E; Fri, 15 May 2015 18:04:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4FI4n7f086724; Fri, 15 May 2015 18:04:49 GMT (envelope-from gnn@FreeBSD.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4FI4nn2086720; Fri, 15 May 2015 18:04:49 GMT (envelope-from gnn@FreeBSD.org) Message-Id: <201505151804.t4FI4nn2086720@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gnn set sender to gnn@FreeBSD.org using -f From: "George V. Neville-Neil" Date: Fri, 15 May 2015 18:04:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282982 - head/sys/netipsec 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.20 Precedence: list List-Id: "SVN commit messages 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, 15 May 2015 18:04:50 -0000 Author: gnn Date: Fri May 15 18:04:49 2015 New Revision: 282982 URL: https://svnweb.freebsd.org/changeset/base/282982 Log: Summary: Remove spurious, extra, next header comments. Correct the name of the pad length field. Modified: head/sys/netipsec/esp.h Modified: head/sys/netipsec/esp.h ============================================================================== --- head/sys/netipsec/esp.h Fri May 15 17:51:03 2015 (r282981) +++ head/sys/netipsec/esp.h Fri May 15 18:04:49 2015 (r282982) @@ -42,8 +42,7 @@ struct esp { /*variable size, 32bit bound*/ /* Initialization Vector */ /*variable size*/ /* Payload data */ /*variable size*/ /* padding */ - /*8bit*/ /* pad size */ - /*8bit*/ /* next header */ + /*8bit*/ /* pad length */ /*8bit*/ /* next header */ /*variable size, 32bit bound*/ /* Authentication data (new IPsec) */ }; @@ -53,8 +52,7 @@ struct newesp { u_int32_t esp_seq; /* Sequence number */ /*variable size*/ /* (IV and) Payload data */ /*variable size*/ /* padding */ - /*8bit*/ /* pad size */ - /*8bit*/ /* next header */ + /*8bit*/ /* pad length */ /*8bit*/ /* next header */ /*variable size, 32bit bound*/ /* Authentication data */ }; From owner-svn-src-all@FreeBSD.ORG Fri May 15 18:07:58 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CB799E2B; Fri, 15 May 2015 18:07:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B9E731E83; Fri, 15 May 2015 18:07:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4FI7wiN088676; Fri, 15 May 2015 18:07:58 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4FI7w2B088675; Fri, 15 May 2015 18:07:58 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201505151807.t4FI7w2B088675@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 15 May 2015 18:07:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282983 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 15 May 2015 18:07:58 -0000 Author: ian Date: Fri May 15 18:07:58 2015 New Revision: 282983 URL: https://svnweb.freebsd.org/changeset/base/282983 Log: Retrieve the cache parms in the proper arch-specific way. Submitted by: Michal Meloun Modified: head/sys/arm/arm/cpuinfo.c Modified: head/sys/arm/arm/cpuinfo.c ============================================================================== --- head/sys/arm/arm/cpuinfo.c Fri May 15 18:04:49 2015 (r282982) +++ head/sys/arm/arm/cpuinfo.c Fri May 15 18:07:58 2015 (r282983) @@ -131,8 +131,17 @@ cpuinfo_init(void) cpuinfo.security_ext = (cpuinfo.id_pfr1 >> 4) & 0xF; /* L1 Cache sizes */ - cpuinfo.dcache_line_size = 1 << (CPU_CT_DMINLINE(cpuinfo.ctr ) + 2); + if (CPU_CT_FORMAT(cpuinfo.ctr) == CPU_CT_ARMV7) { + cpuinfo.dcache_line_size = + 1 << (CPU_CT_DMINLINE(cpuinfo.ctr) + 2); + cpuinfo.icache_line_size = + 1 << (CPU_CT_IMINLINE(cpuinfo.ctr) + 2); + } else { + cpuinfo.dcache_line_size = + 1 << (CPU_CT_xSIZE_LEN(CPU_CT_DSIZE(cpuinfo.ctr)) + 3); + cpuinfo.icache_line_size = + 1 << (CPU_CT_xSIZE_LEN(CPU_CT_ISIZE(cpuinfo.ctr)) + 3); + } cpuinfo.dcache_line_mask = cpuinfo.dcache_line_size - 1; - cpuinfo.icache_line_size= 1 << (CPU_CT_IMINLINE(cpuinfo.ctr ) + 2); cpuinfo.icache_line_mask = cpuinfo.icache_line_size - 1; } From owner-svn-src-all@FreeBSD.ORG Fri May 15 18:10:01 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 60207FE; Fri, 15 May 2015 18:10:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4EEEF1E98; Fri, 15 May 2015 18:10:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4FIA13f089229; Fri, 15 May 2015 18:10:01 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4FIA1PG089228; Fri, 15 May 2015 18:10:01 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201505151810.t4FIA1PG089228@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 15 May 2015 18:10:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282984 - head/sys/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.20 Precedence: list List-Id: "SVN commit messages 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, 15 May 2015 18:10:01 -0000 Author: ian Date: Fri May 15 18:10:00 2015 New Revision: 282984 URL: https://svnweb.freebsd.org/changeset/base/282984 Log: Add assertions that the addresses passed to tlb maintenance are page-aligned. Perform cache writebacks and invalidations in the correct (inner to outer or vice versa) order, and add comments that explain that. Consistantly use 'va' as the variable name for virtual addresses. Submitted by: Michal Meloun Modified: head/sys/arm/include/cpu-v6.h Modified: head/sys/arm/include/cpu-v6.h ============================================================================== --- head/sys/arm/include/cpu-v6.h Fri May 15 18:07:58 2015 (r282983) +++ head/sys/arm/include/cpu-v6.h Fri May 15 18:10:00 2015 (r282984) @@ -39,7 +39,6 @@ #include "machine/cpuinfo.h" #include "machine/sysreg.h" - #define CPU_ASID_KERNEL 0 vm_offset_t dcache_wb_pou_checked(vm_offset_t, vm_size_t); @@ -281,24 +280,29 @@ tlb_flush_all_ng_local(void) /* Flush single TLB entry (even global). */ static __inline void -tlb_flush_local(vm_offset_t sva) +tlb_flush_local(vm_offset_t va) { + KASSERT((va & PAGE_MASK) == 0, ("%s: va %#x not aligned", __func__, va)); + dsb(); - _CP15_TLBIMVA((sva & ~PAGE_MASK ) | CPU_ASID_KERNEL); + _CP15_TLBIMVA(va | CPU_ASID_KERNEL); dsb(); } /* Flush range of TLB entries (even global). */ static __inline void -tlb_flush_range_local(vm_offset_t sva, vm_size_t size) +tlb_flush_range_local(vm_offset_t va, vm_size_t size) { - vm_offset_t va; - vm_offset_t eva = sva + size; + vm_offset_t eva = va + size; + + KASSERT((va & PAGE_MASK) == 0, ("%s: va %#x not aligned", __func__, va)); + KASSERT((size & PAGE_MASK) == 0, ("%s: size %#x not aligned", __func__, + size)); dsb(); - for (va = sva; va < eva; va += PAGE_SIZE) - _CP15_TLBIMVA((va & ~PAGE_MASK ) | CPU_ASID_KERNEL); + for (; va < eva; va += PAGE_SIZE) + _CP15_TLBIMVA(va | CPU_ASID_KERNEL); dsb(); } @@ -324,22 +328,27 @@ tlb_flush_all_ng(void) } static __inline void -tlb_flush(vm_offset_t sva) +tlb_flush(vm_offset_t va) { + KASSERT((va & PAGE_MASK) == 0, ("%s: va %#x not aligned", __func__, va)); + dsb(); - _CP15_TLBIMVAAIS(sva); + _CP15_TLBIMVAAIS(va); dsb(); } static __inline void -tlb_flush_range(vm_offset_t sva, vm_size_t size) +tlb_flush_range(vm_offset_t va, vm_size_t size) { - vm_offset_t va; - vm_offset_t eva = sva + size; + vm_offset_t eva = va + size; + + KASSERT((va & PAGE_MASK) == 0, ("%s: va %#x not aligned", __func__, va)); + KASSERT((size & PAGE_MASK) == 0, ("%s: size %#x not aligned", __func__, + size)); dsb(); - for (va = sva; va < eva; va += PAGE_SIZE) + for (; va < eva; va += PAGE_SIZE) _CP15_TLBIMVAAIS(va); dsb(); } @@ -347,8 +356,8 @@ tlb_flush_range(vm_offset_t sva, vm_siz #define tlb_flush_all() tlb_flush_all_local() #define tlb_flush_all_ng() tlb_flush_all_ng_local() -#define tlb_flush(sva) tlb_flush_local(sva) -#define tlb_flush_range(sva, size) tlb_flush_range_local(sva, size) +#define tlb_flush(va) tlb_flush_local(va) +#define tlb_flush_range(va, size) tlb_flush_range_local(va, size) #endif /* SMP */ @@ -358,13 +367,13 @@ tlb_flush_range(vm_offset_t sva, vm_siz /* Sync I and D caches to PoU */ static __inline void -icache_sync(vm_offset_t sva, vm_size_t size) +icache_sync(vm_offset_t va, vm_size_t size) { - vm_offset_t va; - vm_offset_t eva = sva + size; + vm_offset_t eva = va + size; dsb(); - for (va = sva; va < eva; va += cpuinfo.dcache_line_size) { + va &= ~cpuinfo.dcache_line_mask; + for ( ; va < eva; va += cpuinfo.dcache_line_size) { #if __ARM_ARCH >= 7 && defined SMP _CP15_DCCMVAU(va); #else @@ -409,13 +418,13 @@ bpb_inv_all(void) /* Write back D-cache to PoU */ static __inline void -dcache_wb_pou(vm_offset_t sva, vm_size_t size) +dcache_wb_pou(vm_offset_t va, vm_size_t size) { - vm_offset_t va; - vm_offset_t eva = sva + size; + vm_offset_t eva = va + size; dsb(); - for (va = sva; va < eva; va += cpuinfo.dcache_line_size) { + va &= ~cpuinfo.dcache_line_mask; + for ( ; va < eva; va += cpuinfo.dcache_line_size) { #if __ARM_ARCH >= 7 && defined SMP _CP15_DCCMVAU(va); #else @@ -425,40 +434,46 @@ dcache_wb_pou(vm_offset_t sva, vm_size_t dsb(); } -/* Invalidate D-cache to PoC */ +/* + * Invalidate D-cache to PoC + * + * Caches are invalidated from outermost to innermost as fresh cachelines + * flow in this direction. In given range, if there was no dirty cacheline + * in any cache before, no stale cacheline should remain in them after this + * operation finishes. + */ static __inline void -dcache_inv_poc(vm_offset_t sva, vm_paddr_t pa, vm_size_t size) +dcache_inv_poc(vm_offset_t va, vm_paddr_t pa, vm_size_t size) { - vm_offset_t va; - vm_offset_t eva = sva + size; - - /* invalidate L1 first */ - for (va = sva; va < eva; va += cpuinfo.dcache_line_size) { - _CP15_DCIMVAC(va); - } - dsb(); + vm_offset_t eva = va + size; - /* then L2 */ - cpu_l2cache_inv_range(pa, size); dsb(); + /* invalidate L2 first */ + cpu_l2cache_inv_range(pa, size); - /* then L1 again */ - for (va = sva; va < eva; va += cpuinfo.dcache_line_size) { + /* then L1 */ + va &= ~cpuinfo.dcache_line_mask; + for ( ; va < eva; va += cpuinfo.dcache_line_size) { _CP15_DCIMVAC(va); } dsb(); } -/* Write back D-cache to PoC */ +/* + * Write back D-cache to PoC + * + * Caches are written back from innermost to outermost as dirty cachelines + * flow in this direction. In given range, no dirty cacheline should remain + * in any cache after this operation finishes. + */ static __inline void -dcache_wb_poc(vm_offset_t sva, vm_paddr_t pa, vm_size_t size) +dcache_wb_poc(vm_offset_t va, vm_paddr_t pa, vm_size_t size) { - vm_offset_t va; - vm_offset_t eva = sva + size; + vm_offset_t eva = va + size; dsb(); - - for (va = sva; va < eva; va += cpuinfo.dcache_line_size) { + va &= ~cpuinfo.dcache_line_mask; + for ( ; va < eva; va += cpuinfo.dcache_line_size) { _CP15_DCCMVAC(va); } dsb(); @@ -474,9 +489,9 @@ dcache_wbinv_poc(vm_offset_t sva, vm_pad vm_offset_t eva = sva + size; dsb(); - /* write back L1 first */ - for (va = sva; va < eva; va += cpuinfo.dcache_line_size) { + va = sva & ~cpuinfo.dcache_line_mask; + for ( ; va < eva; va += cpuinfo.dcache_line_size) { _CP15_DCCMVAC(va); } dsb(); @@ -485,7 +500,8 @@ dcache_wbinv_poc(vm_offset_t sva, vm_pad cpu_l2cache_wbinv_range(pa, size); /* then invalidate L1 */ - for (va = sva; va < eva; va += cpuinfo.dcache_line_size) { + va = sva & ~cpuinfo.dcache_line_mask; + for ( ; va < eva; va += cpuinfo.dcache_line_size) { _CP15_DCIMVAC(va); } dsb(); From owner-svn-src-all@FreeBSD.ORG Fri May 15 18:25:51 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5F764507; Fri, 15 May 2015 18:25:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4C3D810DC; Fri, 15 May 2015 18:25:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4FIPp1j099650; Fri, 15 May 2015 18:25:51 GMT (envelope-from zbb@FreeBSD.org) Received: (from zbb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4FIPnxJ099637; Fri, 15 May 2015 18:25:49 GMT (envelope-from zbb@FreeBSD.org) Message-Id: <201505151825.t4FIPnxJ099637@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: zbb set sender to zbb@FreeBSD.org using -f From: Zbigniew Bodek Date: Fri, 15 May 2015 18:25:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282985 - in head/sys: arm/annapurna arm/annapurna/alpine arm/annapurna/alpine/hal arm/conf boot/fdt/dts/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.20 Precedence: list List-Id: "SVN commit messages 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, 15 May 2015 18:25:51 -0000 Author: zbb Date: Fri May 15 18:25:48 2015 New Revision: 282985 URL: https://svnweb.freebsd.org/changeset/base/282985 Log: Introduce support for the Alpine PoC from Annapurna Labs The Alpine Platform-On-Chip offers multicore processing (quad ARM Cortex-A15), 1/10Gb Ethernet, SATA 3, PCI-E 3, DMA engines, Virtualization, Advanced Power Management and other. This code drop involves basic platform support including: SMP, IRQs, SerDes, SATA. As of now it is missing the PCIe support. Part of the functionality is provided by the low-level code (HAL) delivered by the chip vendor (Annapurna Labs) and is a subject to change in the future (is planned to be moved to sys/contrib directory). The review log for this commit is available here: https://reviews.freebsd.org/D2340 Reviewed by: andrew, ian, imp Obtained from: Semihalf Sponsored by: Annapurna Labs Added: head/sys/arm/annapurna/ head/sys/arm/annapurna/alpine/ head/sys/arm/annapurna/alpine/alpine_machdep.c (contents, props changed) head/sys/arm/annapurna/alpine/alpine_machdep_mp.c (contents, props changed) head/sys/arm/annapurna/alpine/common.c (contents, props changed) head/sys/arm/annapurna/alpine/files.alpine (contents, props changed) head/sys/arm/annapurna/alpine/hal/ head/sys/arm/annapurna/alpine/hal/al_hal_common.h (contents, props changed) head/sys/arm/annapurna/alpine/hal/al_hal_iofic.h (contents, props changed) head/sys/arm/annapurna/alpine/hal/al_hal_iofic_regs.h (contents, props changed) head/sys/arm/annapurna/alpine/hal/al_hal_nb_regs.h (contents, props changed) head/sys/arm/annapurna/alpine/hal/al_hal_pbs_regs.h (contents, props changed) head/sys/arm/annapurna/alpine/hal/al_hal_pcie.c (contents, props changed) head/sys/arm/annapurna/alpine/hal/al_hal_pcie.h (contents, props changed) head/sys/arm/annapurna/alpine/hal/al_hal_pcie_axi_reg.h (contents, props changed) head/sys/arm/annapurna/alpine/hal/al_hal_pcie_interrupts.h (contents, props changed) head/sys/arm/annapurna/alpine/hal/al_hal_pcie_regs.h (contents, props changed) head/sys/arm/annapurna/alpine/hal/al_hal_pcie_w_reg.h (contents, props changed) head/sys/arm/annapurna/alpine/hal/al_hal_plat_services.h (contents, props changed) head/sys/arm/annapurna/alpine/hal/al_hal_plat_types.h (contents, props changed) head/sys/arm/annapurna/alpine/hal/al_hal_reg_utils.h (contents, props changed) head/sys/arm/annapurna/alpine/hal/al_hal_types.h (contents, props changed) head/sys/arm/annapurna/alpine/hal/al_hal_unit_adapter_regs.h (contents, props changed) head/sys/arm/annapurna/alpine/std.alpine (contents, props changed) head/sys/arm/conf/ALPINE (contents, props changed) head/sys/boot/fdt/dts/arm/annapurna-alpine.dts (contents, props changed) Added: head/sys/arm/annapurna/alpine/alpine_machdep.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/annapurna/alpine/alpine_machdep.c Fri May 15 18:25:48 2015 (r282985) @@ -0,0 +1,148 @@ +/*- + * Copyright (c) 2013 Ruslan Bukin + * Copyright (c) 2015 Semihalf + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + */ + +#include +__FBSDID("$FreeBSD$"); + +#define _ARM32_BUS_DMA_PRIVATE +#include +#include +#include +#include +#include + +#include +#include + +#include +#include /* For trapframe_t, used in */ +#include +#include +#include +#include +#include + +#include + +#include "opt_ddb.h" +#include "opt_platform.h" + +struct mtx al_dbg_lock; + +#define DEVMAP_MAX_VA_ADDRESS 0xF0000000 +bus_addr_t al_devmap_pa; +bus_addr_t al_devmap_size; + +#define AL_NB_SERVICE_OFFSET 0x70000 +#define AL_NB_CCU_OFFSET 0x90000 +#define AL_CCU_SNOOP_CONTROL_IOFAB_0_OFFSET 0x4000 +#define AL_CCU_SNOOP_CONTROL_IOFAB_1_OFFSET 0x5000 +#define AL_CCU_SPECULATION_CONTROL_OFFSET 0x4 + +#define AL_NB_ACF_MISC_OFFSET 0xD0 +#define AL_NB_ACF_MISC_READ_BYPASS (1 << 30) + +int alpine_get_devmap_base(bus_addr_t *pa, bus_addr_t *size); + +vm_offset_t +platform_lastaddr(void) +{ + + return (DEVMAP_MAX_VA_ADDRESS); +} + +void +platform_probe_and_attach(void) +{ + +} + +void +platform_gpio_init(void) +{ + +} + +void +platform_late_init(void) +{ + bus_addr_t reg_baddr; + uint32_t val; + + if (!mtx_initialized(&al_dbg_lock)) + mtx_init(&al_dbg_lock, "ALDBG", "ALDBG", MTX_SPIN); + + /* configure system fabric */ + if (bus_space_map(fdtbus_bs_tag, al_devmap_pa, al_devmap_size, 0, + ®_baddr)) + panic("Couldn't map Register Space area"); + + /* do not allow reads to bypass writes to different addresses */ + val = bus_space_read_4(fdtbus_bs_tag, reg_baddr, + AL_NB_SERVICE_OFFSET + AL_NB_ACF_MISC_OFFSET); + val &= ~AL_NB_ACF_MISC_READ_BYPASS; + bus_space_write_4(fdtbus_bs_tag, reg_baddr, + AL_NB_SERVICE_OFFSET + AL_NB_ACF_MISC_OFFSET, val); + + /* enable cache snoop */ + bus_space_write_4(fdtbus_bs_tag, reg_baddr, + AL_NB_CCU_OFFSET + AL_CCU_SNOOP_CONTROL_IOFAB_0_OFFSET, 1); + bus_space_write_4(fdtbus_bs_tag, reg_baddr, + AL_NB_CCU_OFFSET + AL_CCU_SNOOP_CONTROL_IOFAB_1_OFFSET, 1); + + /* disable speculative fetches from masters */ + bus_space_write_4(fdtbus_bs_tag, reg_baddr, + AL_NB_CCU_OFFSET + AL_CCU_SPECULATION_CONTROL_OFFSET, 7); + + bus_space_unmap(fdtbus_bs_tag, reg_baddr, al_devmap_size); +} + +/* + * Construct pmap_devmap[] with DT-derived config data. + */ +int +platform_devmap_init(void) +{ + alpine_get_devmap_base(&al_devmap_pa, &al_devmap_size); + arm_devmap_add_entry(al_devmap_pa, al_devmap_size); + return (0); +} + +struct arm32_dma_range * +bus_dma_get_range(void) +{ + + return (NULL); +} + +int +bus_dma_get_range_nb(void) +{ + + return (0); +} Added: head/sys/arm/annapurna/alpine/alpine_machdep_mp.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/annapurna/alpine/alpine_machdep_mp.c Fri May 15 18:25:48 2015 (r282985) @@ -0,0 +1,335 @@ +/*- + * Copyright (c) 2013 Ruslan Bukin + * Copyright (c) 2015 Semihalf + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + */ + +#include +__FBSDID("$FreeBSD$"); +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include + +#include +#include +#include + +#define AL_CPU_RESUME_WATERMARK_REG 0x00 +#define AL_CPU_RESUME_FLAGS_REG 0x04 +#define AL_CPU_RESUME_PCPU_RADDR_REG(cpu) (0x08 + 0x04 + 8*(cpu)) +#define AL_CPU_RESUME_PCPU_FLAGS(cpu) (0x08 + 8*(cpu)) + +/* Per-CPU flags */ +#define AL_CPU_RESUME_FLG_PERCPU_DONT_RESUME (1 << 2) + +/* The expected magic number for validating the resume addresses */ +#define AL_CPU_RESUME_MAGIC_NUM 0xf0e1d200 +#define AL_CPU_RESUME_MAGIC_NUM_MASK 0xffffff00 + +/* The expected minimal version number for validating the capabilities */ +#define AL_CPU_RESUME_MIN_VER 0x000000c3 +#define AL_CPU_RESUME_MIN_VER_MASK 0x000000ff + +/* Field controlling the boot-up of companion cores */ +#define AL_NB_INIT_CONTROL (0x8) +#define AL_NB_CONFIG_STATUS_PWR_CTRL(cpu) (0x2020 + (cpu)*0x100) + +#define SERDES_NUM_GROUPS 4 +#define SERDES_GROUP_SIZE 0x400 + +extern bus_addr_t al_devmap_pa; +extern bus_addr_t al_devmap_size; + +extern void mpentry(void); + +int alpine_serdes_resource_get(uint32_t group, bus_space_tag_t *tag, + bus_addr_t *baddr); +static int platform_mp_get_core_cnt(void); +static int alpine_get_cpu_resume_base(u_long *pbase, u_long *psize); +static int alpine_get_nb_base(u_long *pbase, u_long *psize); +static int alpine_get_serdes_base(u_long *pbase, u_long *psize); +int alpine_serdes_resource_get(uint32_t group, bus_space_tag_t *tag, + bus_addr_t *baddr); +static boolean_t alpine_validate_cpu(u_int, phandle_t, u_int, pcell_t *); + +static boolean_t +alpine_validate_cpu(u_int id, phandle_t child, u_int addr_cell, pcell_t *reg) +{ + return fdt_is_compatible(child, "arm,cortex-a15"); +} + +static int +platform_mp_get_core_cnt(void) +{ + static int ncores = 0; + int nchilds; + uint32_t reg; + + /* Calculate ncores value only once */ + if (ncores) + return (ncores); + + reg = cp15_l2ctlr_get(); + ncores = CPUV7_L2CTLR_NPROC(reg); + + nchilds = ofw_cpu_early_foreach(alpine_validate_cpu, false); + + /* Limit CPUs if DTS has configured less than available */ + if ((nchilds > 0) && (nchilds < ncores)) { + printf("SMP: limiting number of active CPUs to %d out of %d\n", + nchilds, ncores); + ncores = nchilds; + } + + return (ncores); +} + +void +platform_mp_init_secondary(void) +{ + + arm_init_secondary_ic(); +} + +void +platform_mp_setmaxid(void) +{ + int core_cnt; + + core_cnt = platform_mp_get_core_cnt(); + mp_maxid = core_cnt - 1; +} + +int +platform_mp_probe(void) +{ + mp_ncpus = platform_mp_get_core_cnt(); + return (1); +} + +static int +alpine_get_cpu_resume_base(u_long *pbase, u_long *psize) +{ + phandle_t node; + u_long base = 0; + u_long size = 0; + + if (pbase == NULL || psize == NULL) + return (EINVAL); + + if ((node = OF_finddevice("/")) == -1) + return (EFAULT); + + if ((node = + ofw_bus_find_compatible(node, "annapurna-labs,al-cpu-resume")) == 0) + return (EFAULT); + + if (fdt_regsize(node, &base, &size)) + return (EFAULT); + + *pbase = base; + *psize = size; + + return (0); +} + +static int +alpine_get_nb_base(u_long *pbase, u_long *psize) +{ + phandle_t node; + u_long base = 0; + u_long size = 0; + + if (pbase == NULL || psize == NULL) + return (EINVAL); + + if ((node = OF_finddevice("/")) == -1) + return (EFAULT); + + if ((node = + ofw_bus_find_compatible(node, "annapurna-labs,al-nb-service")) == 0) + return (EFAULT); + + if (fdt_regsize(node, &base, &size)) + return (EFAULT); + + *pbase = base; + *psize = size; + + return (0); +} + +void +platform_mp_start_ap(void) +{ + uint32_t physaddr; + vm_offset_t vaddr; + uint32_t val; + uint32_t start_mask; + u_long cpu_resume_base; + u_long nb_base; + u_long cpu_resume_size; + u_long nb_size; + bus_addr_t cpu_resume_baddr; + bus_addr_t nb_baddr; + int a; + + if (alpine_get_cpu_resume_base(&cpu_resume_base, &cpu_resume_size)) + panic("Couldn't resolve cpu_resume_base address\n"); + + if (alpine_get_nb_base(&nb_base, &nb_size)) + panic("Couldn't resolve_nb_base address\n"); + + /* Proceed with start addresses for additional CPUs */ + if (bus_space_map(fdtbus_bs_tag, al_devmap_pa + cpu_resume_base, + cpu_resume_size, 0, &cpu_resume_baddr)) + panic("Couldn't map CPU-resume area"); + if (bus_space_map(fdtbus_bs_tag, al_devmap_pa + nb_base, + nb_size, 0, &nb_baddr)) + panic("Couldn't map NB-service area"); + + /* Proceed with start addresses for additional CPUs */ + val = bus_space_read_4(fdtbus_bs_tag, cpu_resume_baddr, + AL_CPU_RESUME_WATERMARK_REG); + if (((val & AL_CPU_RESUME_MAGIC_NUM_MASK) != AL_CPU_RESUME_MAGIC_NUM) || + ((val & AL_CPU_RESUME_MIN_VER_MASK) < AL_CPU_RESUME_MIN_VER)) { + panic("CPU-resume device is not compatible"); + } + + vaddr = (vm_offset_t)mpentry; + physaddr = pmap_kextract(vaddr); + + for (a = 1; a < platform_mp_get_core_cnt(); a++) { + /* Power up the core */ + bus_space_write_4(fdtbus_bs_tag, nb_baddr, + AL_NB_CONFIG_STATUS_PWR_CTRL(a), 0); + mb(); + + /* Enable resume */ + val = bus_space_read_4(fdtbus_bs_tag, cpu_resume_baddr, + AL_CPU_RESUME_PCPU_FLAGS(a)); + val &= ~AL_CPU_RESUME_FLG_PERCPU_DONT_RESUME; + bus_space_write_4(fdtbus_bs_tag, cpu_resume_baddr, + AL_CPU_RESUME_PCPU_FLAGS(a), val); + mb(); + + /* Set resume physical address */ + bus_space_write_4(fdtbus_bs_tag, cpu_resume_baddr, + AL_CPU_RESUME_PCPU_RADDR_REG(a), physaddr); + mb(); + } + + /* Release cores from reset */ + if (bus_space_map(fdtbus_bs_tag, al_devmap_pa + nb_base, + nb_size, 0, &nb_baddr)) + panic("Couldn't map NB-service area"); + + start_mask = (1 << platform_mp_get_core_cnt()) - 1; + + /* Release cores from reset */ + val = bus_space_read_4(fdtbus_bs_tag, nb_baddr, AL_NB_INIT_CONTROL); + val |= start_mask; + bus_space_write_4(fdtbus_bs_tag, nb_baddr, AL_NB_INIT_CONTROL, val); + dsb(); + + bus_space_unmap(fdtbus_bs_tag, nb_baddr, nb_size); + bus_space_unmap(fdtbus_bs_tag, cpu_resume_baddr, cpu_resume_size); +} + +static int +alpine_get_serdes_base(u_long *pbase, u_long *psize) +{ + phandle_t node; + u_long base = 0; + u_long size = 0; + + if (pbase == NULL || psize == NULL) + return (EINVAL); + + if ((node = OF_finddevice("/")) == -1) + return (EFAULT); + + if ((node = + ofw_bus_find_compatible(node, "annapurna-labs,al-serdes")) == 0) + return (EFAULT); + + if (fdt_regsize(node, &base, &size)) + return (EFAULT); + + *pbase = base; + *psize = size; + + return (0); +} + +int +alpine_serdes_resource_get(uint32_t group, bus_space_tag_t *tag, bus_addr_t *baddr) +{ + u_long serdes_base, serdes_size; + int ret; + static bus_addr_t baddr_mapped[SERDES_NUM_GROUPS]; + + if (group >= SERDES_NUM_GROUPS) + return (EINVAL); + + if (baddr_mapped[group]) { + *tag = fdtbus_bs_tag; + *baddr = baddr_mapped[group]; + return (0); + } + + ret = alpine_get_serdes_base(&serdes_base, &serdes_size); + if (ret) + return (ret); + + ret = bus_space_map(fdtbus_bs_tag, + al_devmap_pa + serdes_base + group * SERDES_GROUP_SIZE, + (SERDES_NUM_GROUPS - group) * SERDES_GROUP_SIZE, 0, baddr); + if (ret) + return (ret); + + baddr_mapped[group] = *baddr; + + return (0); +} + +void +platform_ipi_send(cpuset_t cpus, u_int ipi) +{ + + pic_ipi_send(cpus, ipi); +} Added: head/sys/arm/annapurna/alpine/common.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/annapurna/alpine/common.c Fri May 15 18:25:48 2015 (r282985) @@ -0,0 +1,158 @@ +/*- + * Copyright (c) 2013 Ruslan Bukin + * Copyright (c) 2015 Semihalf. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include + +#include +#include + +#include +#include +#include + +#define WDTLOAD 0x000 +#define LOAD_MIN 0x00000001 +#define LOAD_MAX 0xFFFFFFFF +#define WDTVALUE 0x004 +#define WDTCONTROL 0x008 +/* control register masks */ +#define INT_ENABLE (1 << 0) +#define RESET_ENABLE (1 << 1) +#define WDTLOCK 0xC00 +#define UNLOCK 0x1ACCE551 +#define LOCK 0x00000001 + +extern bus_addr_t al_devmap_pa; +struct fdt_fixup_entry fdt_fixup_table[] = { + { NULL, NULL } +}; + +static int alpine_get_wdt_base(uint32_t *pbase, uint32_t *psize); +static int alpine_pic_decode_fdt(uint32_t iparent, uint32_t *intr, + int *interrupt, int *trig, int *pol); + +int alpine_get_devmap_base(bus_addr_t *pa, bus_addr_t *size); + +int alpine_get_devmap_base(bus_addr_t *pa, bus_addr_t *size) +{ + phandle_t node; + + if ((node = OF_finddevice("/")) == 0) + return (ENXIO); + + if ((node = fdt_find_compatible(node, "simple-bus", 1)) == 0) + return (ENXIO); + + return fdt_get_range(node, 0, pa, size); +} + +static int +alpine_get_wdt_base(uint32_t *pbase, uint32_t *psize) +{ + phandle_t node; + u_long base = 0; + u_long size = 0; + + if (pbase == NULL || psize == NULL) + return (EINVAL); + + if ((node = OF_finddevice("/")) == -1) + return (EFAULT); + + if ((node = fdt_find_compatible(node, "simple-bus", 1)) == 0) + return (EFAULT); + + if ((node = + fdt_find_compatible(node, "arm,sp805", 1)) == 0) + return (EFAULT); + + if (fdt_regsize(node, &base, &size)) + return (EFAULT); + + *pbase = base; + *psize = size; + + return (0); +} + +void +cpu_reset(void) +{ + uint32_t wdbase, wdsize; + bus_addr_t wdbaddr; + int ret; + + ret = alpine_get_wdt_base(&wdbase, &wdsize); + if (ret) { + printf("Unable to get WDT base, do power down manually..."); + goto infinite; + } + + ret = bus_space_map(fdtbus_bs_tag, al_devmap_pa + wdbase, + wdsize, 0, &wdbaddr); + if (ret) { + printf("Unable to map WDT base, do power down manually..."); + goto infinite; + } + + bus_space_write_4(fdtbus_bs_tag, wdbaddr, WDTLOCK, UNLOCK); + bus_space_write_4(fdtbus_bs_tag, wdbaddr, WDTLOAD, LOAD_MIN); + bus_space_write_4(fdtbus_bs_tag, wdbaddr, WDTCONTROL, INT_ENABLE | RESET_ENABLE); + +infinite: + while (1) {} +} + +static int +alpine_pic_decode_fdt(uint32_t iparent, uint32_t *intr, int *interrupt, + int *trig, int *pol) +{ + int rv = 0; + + rv = gic_decode_fdt(iparent, intr, interrupt, trig, pol); + if (rv == 0) { + /* This was recognized as our PIC and decoded. */ + interrupt = FDT_MAP_IRQ(iparent, interrupt); + + /* Configure the interrupt if callback provided */ + if (arm_config_irq) + (*arm_config_irq)(*interrupt, *trig, *pol); + } + return (rv); +} + +fdt_pic_decode_t fdt_pic_table[] = { + &alpine_pic_decode_fdt, + NULL +}; Added: head/sys/arm/annapurna/alpine/files.alpine ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/annapurna/alpine/files.alpine Fri May 15 18:25:48 2015 (r282985) @@ -0,0 +1,16 @@ +# $FreeBSD$ + +kern/kern_clocksource.c standard + +arm/arm/bus_space_base.c standard +arm/arm/bus_space_generic.c standard +arm/arm/bus_space_asm_generic.S standard + +arm/versatile/sp804.c standard +arm/versatile/versatile_timer.c standard +dev/uart/uart_dev_ns8250.c optional uart +dev/ofw/ofw_cpu.c standard + +arm/annapurna/alpine/common.c standard +arm/annapurna/alpine/alpine_machdep.c standard +arm/annapurna/alpine/alpine_machdep_mp.c optional smp Added: head/sys/arm/annapurna/alpine/hal/al_hal_common.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/annapurna/alpine/hal/al_hal_common.h Fri May 15 18:25:48 2015 (r282985) @@ -0,0 +1,70 @@ +/*- +******************************************************************************** +Copyright (C) 2015 Annapurna Labs Ltd. + +This file may be licensed under the terms of the Annapurna Labs Commercial +License Agreement. + +Alternatively, this file can be distributed under the terms of the GNU General +Public License V2 as published by the Free Software Foundation and can be +found at http://www.gnu.org/licenses/gpl-2.0.html + +Alternatively, 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. + +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. + +*******************************************************************************/ + +/** + * @defgroup group_common HAL Common Layer + * Includes all common header files used by HAL + * @{ + * @file al_hal_common.h + * + */ + +#ifndef __AL_HAL_COMMON_H__ +#define __AL_HAL_COMMON_H__ + +#include "al_hal_plat_types.h" +#include "al_hal_plat_services.h" + +#include "al_hal_types.h" +#include "al_hal_reg_utils.h" + +/* Get the maximal value out of two typed values */ +#define al_max_t(type, x, y) ({ \ + type __max1 = (x); \ + type __max2 = (y); \ + __max1 > __max2 ? __max1 : __max2; }) + +/* Get the minimal value out of two typed values */ +#define al_min_t(type, x, y) ({ \ + type __min1 = (x); \ + type __min2 = (y); \ + __min1 < __min2 ? __min1 : __min2; }) + +/* Get the number of elements in an array */ +#define AL_ARR_SIZE(arr) (sizeof(arr) / sizeof((arr)[0])) + +/** @} end of Common group */ +#endif /* __AL_HAL_COMMON_H__ */ Added: head/sys/arm/annapurna/alpine/hal/al_hal_iofic.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/annapurna/alpine/hal/al_hal_iofic.h Fri May 15 18:25:48 2015 (r282985) @@ -0,0 +1,222 @@ +/*- +******************************************************************************** +Copyright (C) 2015 Annapurna Labs Ltd. + +This file may be licensed under the terms of the Annapurna Labs Commercial +License Agreement. + +Alternatively, this file can be distributed under the terms of the GNU General +Public License V2 as published by the Free Software Foundation and can be +found at http://www.gnu.org/licenses/gpl-2.0.html + +Alternatively, 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. + +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. + +*******************************************************************************/ + +/** + * @defgroup group_interrupts Common I/O Fabric Interrupt Controller + * This HAL provides the API for programming the Common I/O Fabric Interrupt + * Controller (IOFIC) found in most of the units attached to the I/O Fabric of + * Alpine platform + * @{ + * @file al_hal_iofic.h + * + * @brief Header file for the interrupt controller that's embedded in various units + * + */ + +#ifndef __AL_HAL_IOFIC_H__ +#define __AL_HAL_IOFIC_H__ + +#include + +/* *INDENT-OFF* */ +#ifdef __cplusplus +extern "C" { +#endif +/* *INDENT-ON* */ + +#define AL_IOFIC_MAX_GROUPS 4 + +/* + * Configurations + */ + +/** + * Configure the interrupt controller registers, actual interrupts are still + * masked at this stage. + * + * @param regs_base regs pointer to interrupt controller registers + * @param group the interrupt group. + * @param flags flags of Interrupt Control Register + * + * @return 0 on success. -EINVAL otherwise. + */ +int al_iofic_config(void __iomem *regs_base, int group, + uint32_t flags); + +/** + * configure the moderation timer resolution for a given group + * Applies for both msix and legacy mode. + * + * @param regs_base pointer to unit registers + * @param group the interrupt group + * @param resolution resolution of the timer interval, the resolution determines the rate + * of decrementing the interval timer, setting value N means that the interval + * timer will be decremented each (N+1) * (0.68) micro seconds. + * + * @return 0 on success. -EINVAL otherwise. + */ +int al_iofic_moder_res_config(void __iomem *regs_base, int group, + uint8_t resolution); + +/** + * configure the moderation timer interval for a given legacy interrupt group + * + * @param regs_base regs pointer to unit registers + * @param group the interrupt group + * @param interval between interrupts in resolution units. 0 disable + * + * @return 0 on success. -EINVAL otherwise. + */ +int al_iofic_legacy_moder_interval_config(void __iomem *regs_base, int group, + uint8_t interval); + +/** + * configure the moderation timer interval for a given msix vector + * + * @param regs_base pointer to unit registers + * @param group the interrupt group + * @param vector vector index + * @param interval interval between interrupts, 0 disable + * + * @return 0 on success. -EINVAL otherwise. + */ +int al_iofic_msix_moder_interval_config(void __iomem *regs_base, int group, + uint8_t vector, uint8_t interval); + +/** +* configure the vmid attributes for a given msix vector. +* +* @param group the interrupt group +* @param vector index +* @param vmid the vmid value +* @param vmid_en take vmid from the intc +* +* @return 0 on success. -EINVAL otherwise. +*/ +int al_iofic_msix_vmid_attributes_config(void __iomem *regs_base, int group, + uint8_t vector, uint32_t vmid, uint8_t vmid_en); + +/** + * return the offset of the unmask register for a given group. + * this function can be used when the upper layer wants to directly + * access the unmask regiter and bypass the al_iofic_unmask() API. + * + * @param regs_base regs pointer to unit registers + * @param group the interrupt group + * @return the offset of the unmask register. + */ +uint32_t __iomem * al_iofic_unmask_offset_get(void __iomem *regs_base, int group); + +/** + * unmask specific interrupts for a given group + * this functions guarantees atomic operations, it is performance optimized as + * it will not require read-modify-write. The unmask done using the interrupt + * mask clear register, so it's safe to call it while the mask is changed by + * the HW (auto mask) or another core. + * + * @param regs_base pointer to unit registers + * @param group the interrupt group + * @param mask bitwise of interrupts to unmask, set bits will be unmasked. + */ +void al_iofic_unmask(void __iomem *regs_base, int group, uint32_t mask); + +/** + * mask specific interrupts for a given group + * this functions modifies interrupt mask register, the callee must make sure + * the mask is not changed by another cpu. + * + * @param regs_base pointer to unit registers + * @param group the interrupt group + * @param mask bitwise of interrupts to mask, set bits will be masked. + */ +void al_iofic_mask(void __iomem *regs_base, int group, uint32_t mask); + +/** + * read the mask register for a given group + * this functions return the interrupt mask register + * + * @param regs_base pointer to unit registers + * @param group the interrupt group + */ +uint32_t al_iofic_read_mask(void __iomem *regs_base, int group); + +/** + * read interrupt cause register for a given group + * this will clear the set bits if the Clear on Read mode enabled. + * @param regs_base pointer to unit registers + * @param group the interrupt group + */ +uint32_t al_iofic_read_cause(void __iomem *regs_base, int group); + +/** + * clear bits in the interrupt cause register for a given group + * + * @param regs_base pointer to unit registers + * @param group the interrupt group + * @param mask bitwise of bits to be cleared, set bits will be cleared. + */ +void al_iofic_clear_cause(void __iomem *regs_base, int group, uint32_t mask); + +/** + * set the cause register for a given group + * this function set the cause register. It will generate an interrupt (if + * the the interrupt isn't masked ) + * + * @param regs_base pointer to unit registers + * @param group the interrupt group + * @param mask bitwise of bits to be set. + */ +void al_iofic_set_cause(void __iomem *regs_base, int group, uint32_t mask); + +/** + * unmask specific interrupts from aborting the udma a given group + * + * @param regs_base pointer to unit registers + * @param group the interrupt group + * @param mask bitwise of interrupts to mask + */ +void al_iofic_abort_mask(void __iomem *regs_base, int group, uint32_t mask); + +/** + * trigger all interrupts that are waiting for moderation timers to expire + * + * @param regs_base pointer to unit registers + * @param group the interrupt group + */ +void al_iofic_interrupt_moderation_reset(void __iomem *regs_base, int group); + +#endif +/** @} end of interrupt controller group */ Added: head/sys/arm/annapurna/alpine/hal/al_hal_iofic_regs.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/annapurna/alpine/hal/al_hal_iofic_regs.h Fri May 15 18:25:48 2015 (r282985) @@ -0,0 +1,127 @@ +/*_ +******************************************************************************** +Copyright (C) 2015 Annapurna Labs Ltd. + +This file may be licensed under the terms of the Annapurna Labs Commercial +License Agreement. + +Alternatively, this file can be distributed under the terms of the GNU General +Public License V2 as published by the Free Software Foundation and can be +found at http://www.gnu.org/licenses/gpl-2.0.html + +Alternatively, 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. + +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 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri May 15 19:37:17 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D9D5DB98; Fri, 15 May 2015 19:37:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C9D421988; Fri, 15 May 2015 19:37:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4FJbH8g036865; Fri, 15 May 2015 19:37:17 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4FJbHGY036864; Fri, 15 May 2015 19:37:17 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201505151937.t4FJbHGY036864@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Fri, 15 May 2015 19:37:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282986 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 15 May 2015 19:37:18 -0000 Author: cy Date: Fri May 15 19:37:17 2015 New Revision: 282986 URL: https://svnweb.freebsd.org/changeset/base/282986 Log: Correct location for libntpevent.a. Modified: head/share/mk/src.libnames.mk Modified: head/share/mk/src.libnames.mk ============================================================================== --- head/share/mk/src.libnames.mk Fri May 15 18:25:48 2015 (r282985) +++ head/share/mk/src.libnames.mk Fri May 15 19:37:17 2015 (r282986) @@ -340,7 +340,7 @@ LIBNTPDIR= ${ROOTOBJDIR}/usr.sbin/ntp/li LIBNTP?= ${LIBNTPDIR}/libntp.a LIBNTPEVENTDIR= ${ROOTOBJDIR}/usr.sbin/ntp/libntpevent -LIBNTPEVENT?= ${LIBNTPDIR}/libntpevent.a +LIBNTPEVENT?= ${LIBNTPEVENTDIR}/libntpevent.a LIBOPTSDIR= ${ROOTOBJDIR}/usr.sbin/ntp/libopts LIBOTPS?= ${LIBOPTSDIR}/libopts.a From owner-svn-src-all@FreeBSD.ORG Fri May 15 19:51:06 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DA81AE57; Fri, 15 May 2015 19:51:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B09301BB9; Fri, 15 May 2015 19:51:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4FJp6bk043074; Fri, 15 May 2015 19:51:06 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4FJp6Gj043073; Fri, 15 May 2015 19:51:06 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201505151951.t4FJp6Gj043073@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Fri, 15 May 2015 19:51:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282987 - head/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.20 Precedence: list List-Id: "SVN commit messages 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, 15 May 2015 19:51:07 -0000 Author: pfg Date: Fri May 15 19:51:05 2015 New Revision: 282987 URL: https://svnweb.freebsd.org/changeset/base/282987 Log: Break apart the gnu_inline attribute and use "artificial" if available. In general it is bad practice to use the gnu_inline attribute but we will need it in special cases like FORTIFY_SOURCE. In this specific case it is also useful to have the "artificial" attribute: "This attribute is useful for small inline wrappers which if possible should appear during debugging as a unit, depending on the debug info format it will either mean marking the function as artificial or using the caller location for all instructions within the inlined body." This attribute appears to be currently implemented only in GCC. Use it only in conjuntion with gnu_inline in the cases where it is available, which is similar in spirit in how it's used in glibc. Modified: head/sys/sys/cdefs.h Modified: head/sys/sys/cdefs.h ============================================================================== --- head/sys/sys/cdefs.h Fri May 15 19:37:17 2015 (r282986) +++ head/sys/sys/cdefs.h Fri May 15 19:51:05 2015 (r282987) @@ -375,10 +375,8 @@ #endif #if __GNUC_PREREQ__(4, 1) -#define __gnu_inline __attribute__((__gnu_inline__)) #define __returns_twice __attribute__((__returns_twice__)) #else -#define __gnu_inline #define __returns_twice #endif @@ -538,6 +536,21 @@ __attribute__((__format__ (__strftime__, fmtarg, firstvararg))) #endif +/* + * FORTIFY_SOURCE, and perhaps other compiler-specific features, require + * the use of non-standard inlining. In general we should try to avoid + * using these but GCC-compatible compilers tend to support the extensions + * well enough to use them in limited cases. + */ +#if __GNUC_PREREQ__(4, 1) +#if __has_attribute(artificial) || __GNUC_PREREQ__(4, 3) +#define __gnu_inline __attribute__((__gnu_inline__, __artificial__)) +#else +#define __gnu_inline __attribute__((__gnu_inline__)) +#else +#define __gnu_inline +#endif + /* Compiler-dependent macros that rely on FreeBSD-specific extensions. */ #if defined(__FreeBSD_cc_version) && __FreeBSD_cc_version >= 300001 && \ defined(__GNUC__) && !defined(__INTEL_COMPILER) From owner-svn-src-all@FreeBSD.ORG Fri May 15 20:35:07 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 03ABAC52; Fri, 15 May 2015 20:35:07 +0000 (UTC) Received: from bigwig.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 D4176102F; Fri, 15 May 2015 20:35:06 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 13898B926; Fri, 15 May 2015 16:35:05 -0400 (EDT) From: John Baldwin To: "Pedro F. Giffuni" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r282987 - head/sys/sys Date: Fri, 15 May 2015 16:35:04 -0400 Message-ID: <2535986.nxztlW3efp@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.1-STABLE; KDE/4.14.3; amd64; ; ) In-Reply-To: <201505151951.t4FJp6Gj043073@svn.freebsd.org> References: <201505151951.t4FJp6Gj043073@svn.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.2.7 (bigwig.baldwin.cx); Fri, 15 May 2015 16:35:05 -0400 (EDT) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 15 May 2015 20:35:07 -0000 On Friday, May 15, 2015 07:51:06 PM Pedro F. Giffuni wrote: > Author: pfg > Date: Fri May 15 19:51:05 2015 > New Revision: 282987 > URL: https://svnweb.freebsd.org/changeset/base/282987 > > Log: > Break apart the gnu_inline attribute and use "artificial" if available. > > In general it is bad practice to use the gnu_inline attribute but we > will need it in special cases like FORTIFY_SOURCE. In this specific > case it is also useful to have the "artificial" attribute: > > "This attribute is useful for small inline wrappers which if possible > should appear during debugging as a unit, depending on the debug info > format it will either mean marking the function as artificial or using the > caller location for all instructions within the inlined body." > > This attribute appears to be currently implemented only in GCC. Use it > only in conjuntion with gnu_inline in the cases where it is available, > which is similar in spirit in how it's used in glibc. > > Modified: > head/sys/sys/cdefs.h > > Modified: head/sys/sys/cdefs.h > ============================================================================== > --- head/sys/sys/cdefs.h Fri May 15 19:37:17 2015 (r282986) > +++ head/sys/sys/cdefs.h Fri May 15 19:51:05 2015 (r282987) > @@ -375,10 +375,8 @@ > #endif > > #if __GNUC_PREREQ__(4, 1) > -#define __gnu_inline __attribute__((__gnu_inline__)) > #define __returns_twice __attribute__((__returns_twice__)) > #else > -#define __gnu_inline > #define __returns_twice > #endif > > @@ -538,6 +536,21 @@ > __attribute__((__format__ (__strftime__, fmtarg, firstvararg))) > #endif > > +/* > + * FORTIFY_SOURCE, and perhaps other compiler-specific features, require > + * the use of non-standard inlining. In general we should try to avoid > + * using these but GCC-compatible compilers tend to support the extensions > + * well enough to use them in limited cases. > + */ > +#if __GNUC_PREREQ__(4, 1) > +#if __has_attribute(artificial) || __GNUC_PREREQ__(4, 3) > +#define __gnu_inline __attribute__((__gnu_inline__, __artificial__)) > +#else > +#define __gnu_inline __attribute__((__gnu_inline__)) ^^^^ missing an #endif here? I'm getting this error from buildworld: /usr/obj/usr/src/tmp/usr/include/sys/cdefs.h:550:2: error: #else after #else #else ^ /usr/obj/usr/src/tmp/usr/include/sys/cdefs.h:36:2: error: unterminated conditional directive #ifndef _SYS_CDEFS_H_ ^ 14 errors generated. mkdep: compile failed -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Fri May 15 20:43:38 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B55EE8F; Fri, 15 May 2015 20:43:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8ACCD115A; Fri, 15 May 2015 20:43:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4FKhc8P072298; Fri, 15 May 2015 20:43:38 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4FKhcMR072296; Fri, 15 May 2015 20:43:38 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201505152043.t4FKhcMR072296@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Fri, 15 May 2015 20:43:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282988 - in head: include 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.20 Precedence: list List-Id: "SVN commit messages 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, 15 May 2015 20:43:38 -0000 Author: pfg Date: Fri May 15 20:43:37 2015 New Revision: 282988 URL: https://svnweb.freebsd.org/changeset/base/282988 Log: Make use of GCC alloc_align attribute This lets the compiler know about the alignment of pointers returned by aligned_alloc(3), posix_memalign(3). and contigmalloc(9) Currently this is only supported in recent gcc but we are ready to use it if clang implements it. Relnotes: yes Modified: head/include/stdlib.h head/sys/sys/malloc.h Modified: head/include/stdlib.h ============================================================================== --- head/include/stdlib.h Fri May 15 19:51:05 2015 (r282987) +++ head/include/stdlib.h Fri May 15 20:43:37 2015 (r282988) @@ -156,7 +156,8 @@ _Noreturn void _Exit(int); * If we're in a mode greater than C99, expose C11 functions. */ #if __ISO_C_VISIBLE >= 2011 || __cplusplus >= 201103L -void * aligned_alloc(size_t, size_t) __malloc_like __alloc_size(2); +void * aligned_alloc(size_t, size_t) __malloc_like __alloc_align(1) + __alloc_size(2); int at_quick_exit(void (*)(void)); _Noreturn void quick_exit(int); @@ -171,7 +172,7 @@ char *realpath(const char * __restrict, int rand_r(unsigned *); /* (TSF) */ #endif #if __POSIX_VISIBLE >= 200112 -int posix_memalign(void **, size_t, size_t) __nonnull(1) +int posix_memalign(void **, size_t, size_t) __nonnull(1) __alloc_align(2) __alloc_size(3); /* (ADV) */ int setenv(const char *, const char *, int); int unsetenv(const char *); Modified: head/sys/sys/malloc.h ============================================================================== --- head/sys/sys/malloc.h Fri May 15 19:51:05 2015 (r282987) +++ head/sys/sys/malloc.h Fri May 15 20:43:37 2015 (r282988) @@ -174,7 +174,7 @@ void contigfree(void *addr, unsigned lon void *contigmalloc(unsigned long size, struct malloc_type *type, int flags, vm_paddr_t low, vm_paddr_t high, unsigned long alignment, vm_paddr_t boundary) __malloc_like __result_use_check - __alloc_size(1); + __alloc_size(1) __alloc_align(6); void free(void *addr, struct malloc_type *type); void *malloc(unsigned long size, struct malloc_type *type, int flags) __malloc_like __result_use_check __alloc_size(1); From owner-svn-src-all@FreeBSD.ORG Fri May 15 20:47:26 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0E799222; Fri, 15 May 2015 20:47:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F27091183; Fri, 15 May 2015 20:47:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4FKlPNN072910; Fri, 15 May 2015 20:47:25 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4FKlPTT072908; Fri, 15 May 2015 20:47:25 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201505152047.t4FKlPTT072908@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Fri, 15 May 2015 20:47:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282989 - head/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.20 Precedence: list List-Id: "SVN commit messages 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, 15 May 2015 20:47:26 -0000 Author: pfg Date: Fri May 15 20:47:25 2015 New Revision: 282989 URL: https://svnweb.freebsd.org/changeset/base/282989 Log: Break apart the gnu_inline attribute and use "artificial" if available. Missing #endif Reported by: jhb, jenkins Pointed hat: me Modified: head/sys/sys/cdefs.h Modified: head/sys/sys/cdefs.h ============================================================================== --- head/sys/sys/cdefs.h Fri May 15 20:43:37 2015 (r282988) +++ head/sys/sys/cdefs.h Fri May 15 20:47:25 2015 (r282989) @@ -550,6 +550,7 @@ #else #define __gnu_inline #endif +#endif /* Compiler-dependent macros that rely on FreeBSD-specific extensions. */ #if defined(__FreeBSD_cc_version) && __FreeBSD_cc_version >= 300001 && \ From owner-svn-src-all@FreeBSD.ORG Fri May 15 20:53:44 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B931C49B; Fri, 15 May 2015 20:53:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A8B16125A; Fri, 15 May 2015 20:53:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4FKriC6077521; Fri, 15 May 2015 20:53:44 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4FKrinM077520; Fri, 15 May 2015 20:53:44 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201505152053.t4FKrinM077520@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Fri, 15 May 2015 20:53:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282990 - head/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.20 Precedence: list List-Id: "SVN commit messages 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, 15 May 2015 20:53:44 -0000 Author: pfg Date: Fri May 15 20:53:43 2015 New Revision: 282990 URL: https://svnweb.freebsd.org/changeset/base/282990 Log: Break apart the gnu_inline attribute and use "artificial" if available. Missing #endif (in wrong place) Pointed hat: me Modified: head/sys/sys/cdefs.h Modified: head/sys/sys/cdefs.h ============================================================================== --- head/sys/sys/cdefs.h Fri May 15 20:47:25 2015 (r282989) +++ head/sys/sys/cdefs.h Fri May 15 20:53:43 2015 (r282990) @@ -547,10 +547,10 @@ #define __gnu_inline __attribute__((__gnu_inline__, __artificial__)) #else #define __gnu_inline __attribute__((__gnu_inline__)) +#endif /* artificial */ #else #define __gnu_inline #endif -#endif /* Compiler-dependent macros that rely on FreeBSD-specific extensions. */ #if defined(__FreeBSD_cc_version) && __FreeBSD_cc_version >= 300001 && \ From owner-svn-src-all@FreeBSD.ORG Fri May 15 20:54:14 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1A3065DD for ; Fri, 15 May 2015 20:54:14 +0000 (UTC) Received: from nm44-vm7.bullet.mail.bf1.yahoo.com (nm44-vm7.bullet.mail.bf1.yahoo.com [216.109.115.31]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CEFE81260 for ; Fri, 15 May 2015 20:54:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1431723246; bh=DEIUI+VhC0dSiUzZ2zENmtHhMUHCQdaLUQdR6b9C15g=; h=Date:From:To:CC:Subject:References:In-Reply-To:From:Subject; b=JbYB0UpQtoY0rcXRMGx4vLNezEub5b8W4GTguk5ANjjTmuD+fUBpJ9QU8ABoKtwZFeal4wryKGuMRB5Qm2FQ0TBr+SQToXVsin3ZrUcfjy6cruDjkapvn2u1RBOGhGInyNiKfP3Gqc2nEWK0Ys9+W7SpTg/DGemQHb98ArifpkmRVksx3vgBOdnW6aiyK8p5iyMRvL0BWU0WdWl82UmXzhxgYR7GLZ/KKoRL7jilLJxB3rNCI5SymRbGxVy16DkL31Jb+UhUGnFBxZdZo/kKcXeHX+IjJ+PzGDnqkykyla3EFUqhoLIQhUs2E2lpUFAhzInAH02jAAadm9k/v7ANVA== Received: from [66.196.81.172] by nm44.bullet.mail.bf1.yahoo.com with NNFMP; 15 May 2015 20:54:06 -0000 Received: from [98.139.213.10] by tm18.bullet.mail.bf1.yahoo.com with NNFMP; 15 May 2015 20:54:06 -0000 Received: from [127.0.0.1] by smtp110.mail.bf1.yahoo.com with NNFMP; 15 May 2015 20:54:06 -0000 X-Yahoo-Newman-Id: 792581.33443.bm@smtp110.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: CbAlzYAVM1kFFPssPXL.f.DVIrFYSKbmo.iYr2hesJeRb4V uohv.EZkOsUOmuc.Y2lfxXK5InVv92XHVU9rQFjJ3Hv6BRncYwhdwgf8gAtZ bDKTY6gdBzGLSOdVb6hcvWxWpVSUSeMs9gsE7RzvWMDGmkHO.yVNtYrs_x8C ZSKBOgFq1c80N5ECA9ua8BXE93tUaMX3BNaWH.e96P1qJuUgDjjKBVALXYG_ 08jRzp0lxfQ4NIyrkdOLFgyUOFbdaUDPf4E0IZM0v_iUKOyHgZpgTB4kzirM zHYMZ_wE5FvJyDyE.yAsgrHWLYEebYhvrAoSY38EBm6G5q1gH3GshgEp4x.B 0hHNj4XWqZKAyOsM4GYTa_74DIYPg3HxaFD06wH44PDkqY76pK_neXv1YoWA A1vwb17nZVvOishMN1oP.4h31iUJZaY8C_nnYRl49dClfSD0QRngI6DUgSUb qRPvxRC_ubck9kModfcQ8l.JKj3T.dWybVBAN7vzS.Afe45_XrmvY5L2yZHI ALy60orHKtpnYhXePY_OIlMrK3smEGpvI X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Message-ID: <55565CF6.80101@FreeBSD.org> Date: Fri, 15 May 2015 15:54:14 -0500 From: Pedro Giffuni User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: John Baldwin CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r282987 - head/sys/sys References: <201505151951.t4FJp6Gj043073@svn.freebsd.org> <2535986.nxztlW3efp@ralph.baldwin.cx> In-Reply-To: <2535986.nxztlW3efp@ralph.baldwin.cx> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 15 May 2015 20:54:14 -0000 On 05/15/15 15:35, John Baldwin wrote: > On Friday, May 15, 2015 07:51:06 PM Pedro F. Giffuni wrote: >> Author: pfg >> Date: Fri May 15 19:51:05 2015 >> New Revision: 282987 >> URL: https://svnweb.freebsd.org/changeset/base/282987 >> >> Log: >> Break apart the gnu_inline attribute and use "artificial" if available. >> >> In general it is bad practice to use the gnu_inline attribute but we >> will need it in special cases like FORTIFY_SOURCE. In this specific >> case it is also useful to have the "artificial" attribute: >> >> "This attribute is useful for small inline wrappers which if possible >> should appear during debugging as a unit, depending on the debug info >> format it will either mean marking the function as artificial or using the >> caller location for all instructions within the inlined body." >> >> This attribute appears to be currently implemented only in GCC. Use it >> only in conjuntion with gnu_inline in the cases where it is available, >> which is similar in spirit in how it's used in glibc. >> >> Modified: >> head/sys/sys/cdefs.h >> >> Modified: head/sys/sys/cdefs.h >> ============================================================================== >> --- head/sys/sys/cdefs.h Fri May 15 19:37:17 2015 (r282986) >> +++ head/sys/sys/cdefs.h Fri May 15 19:51:05 2015 (r282987) >> @@ -375,10 +375,8 @@ >> #endif >> >> #if __GNUC_PREREQ__(4, 1) >> -#define __gnu_inline __attribute__((__gnu_inline__)) >> #define __returns_twice __attribute__((__returns_twice__)) >> #else >> -#define __gnu_inline >> #define __returns_twice >> #endif >> >> @@ -538,6 +536,21 @@ >> __attribute__((__format__ (__strftime__, fmtarg, firstvararg))) >> #endif >> >> +/* >> + * FORTIFY_SOURCE, and perhaps other compiler-specific features, require >> + * the use of non-standard inlining. In general we should try to avoid >> + * using these but GCC-compatible compilers tend to support the extensions >> + * well enough to use them in limited cases. >> + */ >> +#if __GNUC_PREREQ__(4, 1) >> +#if __has_attribute(artificial) || __GNUC_PREREQ__(4, 3) >> +#define __gnu_inline __attribute__((__gnu_inline__, __artificial__)) >> +#else >> +#define __gnu_inline __attribute__((__gnu_inline__)) > ^^^^ missing an #endif here? > > I'm getting this error from buildworld: > > /usr/obj/usr/src/tmp/usr/include/sys/cdefs.h:550:2: error: #else after #else > #else > ^ > /usr/obj/usr/src/tmp/usr/include/sys/cdefs.h:36:2: error: unterminated conditional directive > #ifndef _SYS_CDEFS_H_ > ^ > 14 errors generated. > mkdep: compile failed > (Bah... you guys beat my tinderbox.) Fixed sorry. Pedro. From owner-svn-src-all@FreeBSD.ORG Fri May 15 21:33:20 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A9706D8E; Fri, 15 May 2015 21:33:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 986D916F8; Fri, 15 May 2015 21:33:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4FLXKkR097628; Fri, 15 May 2015 21:33:20 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4FLXKpq097627; Fri, 15 May 2015 21:33:20 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201505152133.t4FLXKpq097627@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 15 May 2015 21:33:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282991 - head/sys/x86/acpica 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.20 Precedence: list List-Id: "SVN commit messages 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, 15 May 2015 21:33:20 -0000 Author: adrian Date: Fri May 15 21:33:19 2015 New Revision: 282991 URL: https://svnweb.freebsd.org/changeset/base/282991 Log: Update the comments to match what the code ended up becoming. -1 is now "no locality information available". Sponsored by: Norse Corp, Inc. Modified: head/sys/x86/acpica/srat.c Modified: head/sys/x86/acpica/srat.c ============================================================================== --- head/sys/x86/acpica/srat.c Fri May 15 20:53:43 2015 (r282990) +++ head/sys/x86/acpica/srat.c Fri May 15 21:33:19 2015 (r282991) @@ -428,7 +428,7 @@ init_mem_locality(void) int i; /* - * For now, assume 255 == "no locality information for + * For now, assume -1 == "no locality information for * this pairing. */ for (i = 0; i < MAXMEMDOM * MAXMEMDOM; i++) From owner-svn-src-all@FreeBSD.ORG Fri May 15 22:13:12 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D71E266F; Fri, 15 May 2015 22:13:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B901F1B55; Fri, 15 May 2015 22:13:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4FMDCZF017334; Fri, 15 May 2015 22:13:12 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4FMDBA4017329; Fri, 15 May 2015 22:13:11 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201505152213.t4FMDBA4017329@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 15 May 2015 22:13:11 +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: r282992 - in stable/9/tools/regression/aio/kqueue: . lio 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.20 Precedence: list List-Id: "SVN commit messages 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, 15 May 2015 22:13:13 -0000 Author: ngie Date: Fri May 15 22:13:11 2015 New Revision: 282992 URL: https://svnweb.freebsd.org/changeset/base/282992 Log: MFC r280893,r280894,r280895: r280893: Cleanup and do minor refactoring before converting testcases to ATF - Convert errx(-1, ..) to errx(1, ..) - Move the aio(4) checks to a single function (aio_available); use modfind(2) instead of depending on SIGSYS (doesn't work when aio(4) support is missing, not documented in the aio syscall manpages). - Use aio_available liberally in the testcase functions - Use mkstemp(3) + unlink(2) instead of mktemp(3) - Fix some -Wunused warnings - Bump WARNS to 6 Submitted by: mjohnston [*] Sponsored by: EMC / Isilon Storage Division r280894: Minor cleanup before converting to ATF testcases - Remove blank (tab-only) lines. - Fix -Wunused warnings. - Bump up to WARNS= 6 r280895: - Fix -Wsign issue - Bump up to WARNS=6 Modified: stable/9/tools/regression/aio/kqueue/Makefile stable/9/tools/regression/aio/kqueue/aio_kqueue.c stable/9/tools/regression/aio/kqueue/lio/Makefile stable/9/tools/regression/aio/kqueue/lio/lio_kqueue.c Directory Properties: stable/9/ (props changed) stable/9/tools/ (props changed) stable/9/tools/regression/ (props changed) stable/9/tools/regression/aio/aiotest/ (props changed) Modified: stable/9/tools/regression/aio/kqueue/Makefile ============================================================================== --- stable/9/tools/regression/aio/kqueue/Makefile Fri May 15 21:33:19 2015 (r282991) +++ stable/9/tools/regression/aio/kqueue/Makefile Fri May 15 22:13:11 2015 (r282992) @@ -3,4 +3,8 @@ PROG= aio_kqueue NO_MAN= +WARNS?= 6 + +SUBDIR+= lio + .include Modified: stable/9/tools/regression/aio/kqueue/aio_kqueue.c ============================================================================== --- stable/9/tools/regression/aio/kqueue/aio_kqueue.c Fri May 15 21:33:19 2015 (r282991) +++ stable/9/tools/regression/aio/kqueue/aio_kqueue.c Fri May 15 22:13:11 2015 (r282992) @@ -177,7 +177,7 @@ main (int argc, char *argv[]) #endif if (result != sizeof(buffer)) { printf("FAIL: run %d, operation %d, result %d " - " (errno=%d) should be %d\n", run, pending, + " (errno=%d) should be %zu\n", run, pending, result, errno, sizeof(buffer)); failed++; } else Modified: stable/9/tools/regression/aio/kqueue/lio/Makefile ============================================================================== --- stable/9/tools/regression/aio/kqueue/lio/Makefile Fri May 15 21:33:19 2015 (r282991) +++ stable/9/tools/regression/aio/kqueue/lio/Makefile Fri May 15 22:13:11 2015 (r282992) @@ -3,4 +3,6 @@ PROG= lio_kqueue NO_MAN= +WARNS?= 6 + .include Modified: stable/9/tools/regression/aio/kqueue/lio/lio_kqueue.c ============================================================================== --- stable/9/tools/regression/aio/kqueue/lio/lio_kqueue.c Fri May 15 21:33:19 2015 (r282991) +++ stable/9/tools/regression/aio/kqueue/lio/lio_kqueue.c Fri May 15 22:13:11 2015 (r282992) @@ -37,13 +37,15 @@ * http://www.ambrisko.com/doug/listio_kqueue/listio_kqueue.patch */ -#include -#include -#include -#include #include #include #include +#include +#include +#include +#include +#include +#include #include #define PATH_TEMPLATE "/tmp/aio.XXXXXXXXXX" @@ -52,9 +54,10 @@ #define MAX LIO_MAX * 16 #define MAX_RUNS 300 +int main(int argc, char *argv[]){ int fd; - struct aiocb *iocb[MAX], *kq_iocb; + struct aiocb *iocb[MAX]; struct aiocb **lio[LIO_MAX], **lio_element, **kq_lio; int i, result, run, error, j, k; char buffer[32768]; @@ -65,7 +68,7 @@ main(int argc, char *argv[]){ time_t time1, time2; char *file, pathname[sizeof(PATH_TEMPLATE)-1]; int tmp_file = 0, failed = 0; - + if (kq < 0) { perror("No kqeueue\n"); exit(1); @@ -89,7 +92,7 @@ main(int argc, char *argv[]){ #ifdef DEBUG printf("Hello kq %d fd %d\n", kq, fd); #endif - + for (run = 0; run < MAX_RUNS; run++){ #ifdef DEBUG printf("Run %d\n", run); @@ -137,13 +140,13 @@ main(int argc, char *argv[]){ printf("write %d is at %p\n", j, lio[j]); #endif } - + for(i = 0; i < LIO_MAX; i++) { for(j = LIO_MAX - 1; j >=0; j--) { if (lio[j]) break; } - + for(;;) { bzero(&ke, sizeof(ke)); bzero(&kq_returned, sizeof(ke)); @@ -169,18 +172,18 @@ main(int argc, char *argv[]){ kq_returned.udata, lio[j]); #endif - + if(kq_lio) break; #ifdef DEBUG printf("Try again\n"); #endif - } - + } + #ifdef DEBUG printf("lio %p\n", lio); #endif - + for (j = 0; j < LIO_MAX; j++) { if (lio[j] == kq_lio) { break; @@ -201,12 +204,12 @@ main(int argc, char *argv[]){ printf("PASS: run %d, operation %d result %d \n", run, LIO_MAX - i -1, result); } for(k = 0; k < MAX / LIO_MAX; k++){ - result = aio_return(kq_lio[k]); + result = aio_return(kq_lio[k]); #ifdef DEBUG printf("Return Resulto for %d %d is %d\n", j, k, result); #endif if (result != sizeof(buffer)) { - printf("FAIL: run %d, operation %d sub-opt %d result %d (errno=%d) should be %d\n", + printf("FAIL: run %d, operation %d sub-opt %d result %d (errno=%d) should be %zu\n", run, LIO_MAX - i -1, k, result, errno, sizeof(buffer)); } else { printf("PASS: run %d, operation %d sub-opt %d result %d\n", @@ -216,13 +219,13 @@ main(int argc, char *argv[]){ #ifdef DEBUG printf("\n"); #endif - + for(k = 0; k < MAX / LIO_MAX; k++) { free(lio[j][k]); } free(lio[j]); lio[j] = NULL; - } + } } #ifdef DEBUG printf("Done\n"); From owner-svn-src-all@FreeBSD.ORG Fri May 15 22:14:43 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5F1857B9; Fri, 15 May 2015 22:14:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 34A811B6F; Fri, 15 May 2015 22:14:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4FMEhWa017739; Fri, 15 May 2015 22:14:43 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4FMEhbO017738; Fri, 15 May 2015 22:14:43 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201505152214.t4FMEhbO017738@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 15 May 2015 22:14:43 +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: r282993 - stable/9/tools/regression/aio/aiotest 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.20 Precedence: list List-Id: "SVN commit messages 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, 15 May 2015 22:14:43 -0000 Author: ngie Date: Fri May 15 22:14:42 2015 New Revision: 282993 URL: https://svnweb.freebsd.org/changeset/base/282993 Log: Remove mergeinfo for r280893 It wasn't actually committed to stable/9 in r282992 Modified: Directory Properties: stable/9/tools/regression/aio/aiotest/ (props changed) From owner-svn-src-all@FreeBSD.ORG Fri May 15 22:15:58 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E7ED38F9; Fri, 15 May 2015 22:15:57 +0000 (UTC) Received: from mail-ie0-x232.google.com (mail-ie0-x232.google.com [IPv6:2607:f8b0:4001:c03::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 AB7821B7C; Fri, 15 May 2015 22:15:57 +0000 (UTC) Received: by ieczm2 with SMTP id zm2so60280010iec.1; Fri, 15 May 2015 15:15:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:mime-version:content-type:from:in-reply-to:date:cc :message-id:references:to; bh=o59CIXkaoYExbQfTBPdMwESWDU7Iw9EIklEesU/BiqE=; b=zN6YgKvmevSUfs0XJ/x4NsjSC+ZxKCgnBeh2scTwCGHODuhzKrBBhiPKVez1yum1Y/ K/noNBkTkVj8UV1e7ECt2JmxvSEbSfEOAiUJ5DAcPjB/G/0inNfqs8lMAfWbsBgUpE+b cZQ6bWx026kqpJYISR7eXuw2cINWkh7kvqMsjmLjkzhrm1733CXq6W6JTCmt52QIUmCz KI8XBuSUQTpsc184cnBMtede3jpuQkRBMPxmSNIMWQN+tmMZa7mexLgKd5WQNGY+HbYo jat9b4EHVWaqObYKZZigd2i1OO6QgSxJblu+s1WvCI47W8w82Ch73kWtu6bJUvkpo6s6 9MsA== X-Received: by 10.68.186.1 with SMTP id fg1mr22264363pbc.147.1431728157161; Fri, 15 May 2015 15:15:57 -0700 (PDT) Received: from ?IPv6:2601:8:ab80:7d6:10d2:46bc:67b9:c8b3? ([2601:8:ab80:7d6:10d2:46bc:67b9:c8b3]) by mx.google.com with ESMTPSA id ld1sm2833767pbc.26.2015.05.15.15.15.55 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 15 May 2015 15:15:56 -0700 (PDT) Subject: Re: svn commit: r282992 - in stable/9/tools/regression/aio/kqueue: . lio Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Content-Type: multipart/signed; boundary="Apple-Mail=_E707D0D5-567F-4694-9911-7C8CB52F4DED"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5b6 From: Garrett Cooper In-Reply-To: <201505152213.t4FMDBA4017329@svn.freebsd.org> Date: Fri, 15 May 2015 15:15:53 -0700 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Message-Id: <7E44829A-A926-4076-A3DD-AD7A8F3E3B16@gmail.com> References: <201505152213.t4FMDBA4017329@svn.freebsd.org> To: Garrett Cooper X-Mailer: Apple Mail (2.1878.6) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 15 May 2015 22:15:58 -0000 --Apple-Mail=_E707D0D5-567F-4694-9911-7C8CB52F4DED Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 On May 15, 2015, at 15:13, Garrett Cooper wrote: > Author: ngie > Date: Fri May 15 22:13:11 2015 > New Revision: 282992 > URL: https://svnweb.freebsd.org/changeset/base/282992 >=20 > Log: > MFC r280893,r280894,r280895: >=20 > r280893: >=20 > Cleanup and do minor refactoring before converting testcases to ATF >=20 > - Convert errx(-1, ..) to errx(1, ..) > - Move the aio(4) checks to a single function (aio_available); use = modfind(2) > instead of depending on SIGSYS (doesn't work when aio(4) support is = missing, > not documented in the aio syscall manpages). > - Use aio_available liberally in the testcase functions > - Use mkstemp(3) + unlink(2) instead of mktemp(3) > - Fix some -Wunused warnings > - Bump WARNS to 6 >=20 > Submitted by: mjohnston [*] > Sponsored by: EMC / Isilon Storage Division I forgot to remove this portion of the commit (fixed in r282993) -- I = ran into conflicts and couldn=92t do a simple merge. Will retry after I = figure out what revisions are missing from stable/10 and head=85 -NGie --Apple-Mail=_E707D0D5-567F-4694-9911-7C8CB52F4DED 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 iQEcBAEBCgAGBQJVVnAaAAoJEMZr5QU6S73eJN0H/0+suNX1Ant0JiFqFAvKbYzx tESKzalYF36V9es8vApR/jq0X3qHBcJ2J7NCde8rM/QjgmU5AKjcMr5BzvuU2fU7 3jMXH9e8PvSxk8nQcnSQlsUCCBQJYFgd94KpjCsUY1mhbqU5SW3d21mlYwER8eTi DcoP3QJCewkuabCAWEoHiMRvAkW8Ez+orH1dlHZR0ZhrzQuEgNA8YWSvUpo+FxNz UR+tk8+gMC4x+QqRt6BCGEu2bPJ52IEBX8aqtIssQzAyB+tAaPSf+9P4DjcIGbkv 1y4BX3DE5xwyiwR9GQE066VaiQaoPCFJtwqL2A1Q7/zziZcYqegVAYOQPjkffYE= =ThDT -----END PGP SIGNATURE----- --Apple-Mail=_E707D0D5-567F-4694-9911-7C8CB52F4DED-- From owner-svn-src-all@FreeBSD.ORG Fri May 15 22:19:36 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A374EB20; Fri, 15 May 2015 22:19:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 844EF1BB6; Fri, 15 May 2015 22:19:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4FMJaEa018432; Fri, 15 May 2015 22:19:36 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4FMJaAS018429; Fri, 15 May 2015 22:19:36 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201505152219.t4FMJaAS018429@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 15 May 2015 22:19:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282994 - head/tools/build 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.20 Precedence: list List-Id: "SVN commit messages 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, 15 May 2015 22:19:36 -0000 Author: dim Date: Fri May 15 22:19:35 2015 New Revision: 282994 URL: https://svnweb.freebsd.org/changeset/base/282994 Log: Provide reallocarray() in -legacy, if needed, to allow building head on previous releases. Also add a stdlib.h wrapper, which declares the function, otherwise the compiler may assume it returns int, which can cause segfaults on LP64 architectures. Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D2558 Added: head/tools/build/stdlib.h (contents, props changed) Modified: head/tools/build/Makefile Modified: head/tools/build/Makefile ============================================================================== --- head/tools/build/Makefile Fri May 15 22:14:42 2015 (r282993) +++ head/tools/build/Makefile Fri May 15 22:19:35 2015 (r282994) @@ -25,6 +25,14 @@ CFLAGS+= -I${.CURDIR}/../../contrib/libc -I${.CURDIR}/../../lib/libc/include .endif +_WITH_REALLOCARRAY!= grep -c reallocarray /usr/include/stdlib.h || true +.if ${_WITH_REALLOCARRAY} == 0 +.PATH: ${.CURDIR}/../../lib/libc/stdlib +INCS+= stdlib.h +SRCS+= reallocarray.c +CFLAGS+= -I${.CURDIR}/../../lib/libc/include +.endif + .if empty(SRCS) SRCS= dummy.c .endif Added: head/tools/build/stdlib.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/stdlib.h Fri May 15 22:19:35 2015 (r282994) @@ -0,0 +1,42 @@ +/*- + * Copyright (c) 2015 Dimitry Andric + * 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$ + */ + +#ifndef _LEGACY_STDLIB_H_ +#define _LEGACY_STDLIB_H_ + +#include_next + +__BEGIN_DECLS + +#if __BSD_VISIBLE +void *reallocarray(void *, size_t, size_t); +#endif /* __BSD_VISIBLE */ + +__END_DECLS + +#endif /* !_LEGACY_STDLIB_H_ */ From owner-svn-src-all@FreeBSD.ORG Sat May 16 01:13:38 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8681C9FC; Sat, 16 May 2015 01:13:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7366A1E70; Sat, 16 May 2015 01:13:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4G1Dc6H008041; Sat, 16 May 2015 01:13:38 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4G1DcAO008040; Sat, 16 May 2015 01:13:38 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201505160113.t4G1DcAO008040@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Sat, 16 May 2015 01:13:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r282995 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs 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.20 Precedence: list List-Id: "SVN commit messages 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, 16 May 2015 01:13:38 -0000 Author: smh Date: Sat May 16 01:13:37 2015 New Revision: 282995 URL: https://svnweb.freebsd.org/changeset/base/282995 Log: MFC r282880: Add copyright info missing from r282205 Sponsored by: Multiplay Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c Fri May 15 22:19:35 2015 (r282994) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c Sat May 16 01:13:37 2015 (r282995) @@ -21,6 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012, 2014 by Delphix. All rights reserved. + * Copyright (c) 2015 Chunwei Chen. All rights reserved. */ #include From owner-svn-src-all@FreeBSD.ORG Sat May 16 02:31:45 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 65CA95BA; Sat, 16 May 2015 02:31:45 +0000 (UTC) Received: from st11p00im-asmtp001.me.com (st11p00im-asmtp001.me.com [17.172.80.95]) (using TLSv1.2 with cipher DHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3F8B11645; Sat, 16 May 2015 02:31:45 +0000 (UTC) Received: from akita.localnet (c-73-162-13-215.hsd1.ca.comcast.net [73.162.13.215]) by st11p00im-asmtp001.me.com (Oracle Communications Messaging Server 7.0.5.35.0 64bit (built Dec 4 2014)) with ESMTPSA id <0NOF00KFQ5KPX430@st11p00im-asmtp001.me.com>; Sat, 16 May 2015 01:31:38 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.14.151,1.0.33,0.0.0000 definitions=2015-05-15_05:2015-05-15,2015-05-15,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=2 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1412110000 definitions=main-1505160019 From: Rui Paulo To: Konstantin Belousov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r282948 - head/lib/libthr/thread Date: Fri, 15 May 2015 18:31:36 -0700 Message-id: <2876732.7TSEeLUW1T@akita> User-Agent: KMail/4.14.3 (FreeBSD/11.0-CURRENT; KDE/4.14.3; amd64; ; ) In-reply-to: <201505150840.t4F8eHhM000804@svn.freebsd.org> References: <201505150840.t4F8eHhM000804@svn.freebsd.org> 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.20 Precedence: list List-Id: "SVN commit messages 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, 16 May 2015 02:31:45 -0000 On Friday 15 May 2015 08:40:17 Konstantin Belousov wrote: > Author: kib > Date: Fri May 15 08:40:17 2015 > New Revision: 282948 > URL: https://svnweb.freebsd.org/changeset/base/282948 > > Log: > Some third-party malloc(3) implementations use pthread_setspecific(3) > to handle per-thread information. Since our pthread_setspecific() > implementation calls calloc(3) to allocate per-thread specific data > storage, things get complicated. > > Switch the allocator to use bare mmap(2). There is some loss of the > allocated page, since e.g. on amd64, PTHREAD_KEYS_MAX * sizeof(struct > pthread_specific_elem) is 3K (it actually spans whole page due to > padding), but I believe it is more acceptable than additional code for > specialized allocator(). > > The alternatives would either to make the specific data array be part of > the struct thread, or use internal bindings to call the libc malloc, > avoiding interposing. > > Also do the style pass over the thr_spec.c, esp. simplify the > conditionals nesting by returning early when an error detected. > Remove trivial comments. > > Found by: yuri@rawbw.com > PR: 200138 > Sponsored by: The FreeBSD Foundation > MFC after: 2 weeks Thanks! I think umem might be affected as well. -- Rui Paulo From owner-svn-src-all@FreeBSD.ORG Sat May 16 05:36:42 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DA36A869; Sat, 16 May 2015 05:36:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BBCF5188F; Sat, 16 May 2015 05:36:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4G5afgi036069; Sat, 16 May 2015 05:36:41 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4G5afIM036067; Sat, 16 May 2015 05:36:41 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201505160536.t4G5afIM036067@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Sat, 16 May 2015 05:36:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282996 - head/sys/dev/sfxge 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.20 Precedence: list List-Id: "SVN commit messages 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, 16 May 2015 05:36:42 -0000 Author: arybchik Date: Sat May 16 05:36:40 2015 New Revision: 282996 URL: https://svnweb.freebsd.org/changeset/base/282996 Log: sfxge: support Rx checksum offloads disabling We can't disable it in HW, but we can ignore result. Discard Rx descriptor checksum flags if Rx checksum offload is off. Reviewed by: gnn Sponsored by: Solarflare Communications, Inc. MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D2544 Modified: head/sys/dev/sfxge/sfxge.c head/sys/dev/sfxge/sfxge_rx.c Modified: head/sys/dev/sfxge/sfxge.c ============================================================================== --- head/sys/dev/sfxge/sfxge.c Sat May 16 01:13:37 2015 (r282995) +++ head/sys/dev/sfxge/sfxge.c Sat May 16 05:36:40 2015 (r282996) @@ -65,8 +65,7 @@ __FBSDID("$FreeBSD$"); IFCAP_JUMBO_MTU | IFCAP_LRO | \ IFCAP_VLAN_HWTSO | IFCAP_LINKSTATE | IFCAP_HWSTATS) #define SFXGE_CAP_ENABLE SFXGE_CAP -#define SFXGE_CAP_FIXED (IFCAP_VLAN_MTU | IFCAP_RXCSUM | IFCAP_VLAN_HWCSUM | \ - IFCAP_RXCSUM_IPV6 | \ +#define SFXGE_CAP_FIXED (IFCAP_VLAN_MTU | IFCAP_VLAN_HWCSUM | \ IFCAP_JUMBO_MTU | IFCAP_LINKSTATE | IFCAP_HWSTATS) MALLOC_DEFINE(M_SFXGE, "sfxge", "Solarflare 10GigE driver"); Modified: head/sys/dev/sfxge/sfxge_rx.c ============================================================================== --- head/sys/dev/sfxge/sfxge_rx.c Sat May 16 01:13:37 2015 (r282995) +++ head/sys/dev/sfxge/sfxge_rx.c Sat May 16 05:36:40 2015 (r282996) @@ -795,7 +795,8 @@ void sfxge_rx_qcomplete(struct sfxge_rxq *rxq, boolean_t eop) { struct sfxge_softc *sc = rxq->sc; - int lro_enabled = sc->ifnet->if_capenable & IFCAP_LRO; + int if_capenable = sc->ifnet->if_capenable; + int lro_enabled = if_capenable & IFCAP_LRO; unsigned int index; struct sfxge_evq *evq; unsigned int completed; @@ -825,21 +826,37 @@ sfxge_rx_qcomplete(struct sfxge_rxq *rxq prefetch_read_many(mtod(m, caddr_t)); - /* Check for loopback packets */ - if (!(rx_desc->flags & EFX_PKT_IPV4) && - !(rx_desc->flags & EFX_PKT_IPV6)) { - struct ether_header *etherhp; - - /*LINTED*/ - etherhp = mtod(m, struct ether_header *); - - if (etherhp->ether_type == - htons(SFXGE_ETHERTYPE_LOOPBACK)) { - EFSYS_PROBE(loopback); - - rxq->loopback++; - goto discard; + switch (rx_desc->flags & (EFX_PKT_IPV4 | EFX_PKT_IPV6)) { + case EFX_PKT_IPV4: + if (~if_capenable & IFCAP_RXCSUM) + rx_desc->flags &= + ~(EFX_CKSUM_IPV4 | EFX_CKSUM_TCPUDP); + break; + case EFX_PKT_IPV6: + if (~if_capenable & IFCAP_RXCSUM_IPV6) + rx_desc->flags &= ~EFX_CKSUM_TCPUDP; + break; + case 0: + /* Check for loopback packets */ + { + struct ether_header *etherhp; + + /*LINTED*/ + etherhp = mtod(m, struct ether_header *); + + if (etherhp->ether_type == + htons(SFXGE_ETHERTYPE_LOOPBACK)) { + EFSYS_PROBE(loopback); + + rxq->loopback++; + goto discard; + } } + break; + default: + KASSERT(B_FALSE, + ("Rx descriptor with both IPv4 and IPv6 flags")); + goto discard; } /* Pass packet up the stack or into LRO (pipelined) */ From owner-svn-src-all@FreeBSD.ORG Sat May 16 05:37:48 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B6D7C9EB; Sat, 16 May 2015 05:37:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8C94018C4; Sat, 16 May 2015 05:37:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4G5bmho036259; Sat, 16 May 2015 05:37:48 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4G5bm7w036258; Sat, 16 May 2015 05:37:48 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201505160537.t4G5bm7w036258@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Sat, 16 May 2015 05:37:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282997 - head/sys/dev/sfxge 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.20 Precedence: list List-Id: "SVN commit messages 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, 16 May 2015 05:37:48 -0000 Author: arybchik Date: Sat May 16 05:37:47 2015 New Revision: 282997 URL: https://svnweb.freebsd.org/changeset/base/282997 Log: sfxge: get rid of locked variable in sfxge_tx_packet_add() Now each branch has one and only one possible TxQ lock state. It simplifies understanding of the code. Reviewed by: gnn Sponsored by: Solarflare Communications, Inc. MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D2551 Modified: head/sys/dev/sfxge/sfxge_tx.c Modified: head/sys/dev/sfxge/sfxge_tx.c ============================================================================== --- head/sys/dev/sfxge/sfxge_tx.c Sat May 16 05:36:40 2015 (r282996) +++ head/sys/dev/sfxge/sfxge_tx.c Sat May 16 05:37:47 2015 (r282997) @@ -602,7 +602,6 @@ sfxge_tx_qdpl_put_unlocked(struct sfxge_ int sfxge_tx_packet_add(struct sfxge_txq *txq, struct mbuf *m) { - int locked; int rc; if (!SFXGE_LINK_UP(txq->sc)) { @@ -616,9 +615,7 @@ sfxge_tx_packet_add(struct sfxge_txq *tx * the packet will be appended to the "get list" of the deferred * packet list. Otherwise, it will be pushed on the "put list". */ - locked = SFXGE_TXQ_TRYLOCK(txq); - - if (locked) { + if (SFXGE_TXQ_TRYLOCK(txq)) { /* First swizzle put-list to get-list to keep order */ sfxge_tx_qdpl_swizzle(txq); @@ -627,6 +624,10 @@ sfxge_tx_packet_add(struct sfxge_txq *tx SFXGE_TXQ_UNLOCK(txq); goto fail; } + + /* Try to service the list. */ + sfxge_tx_qdpl_service(txq); + /* Lock has been dropped. */ } else { rc = sfxge_tx_qdpl_put_unlocked(txq, m); if (rc != 0) @@ -639,14 +640,13 @@ sfxge_tx_packet_add(struct sfxge_txq *tx * the deferred packet list. If we are not able to get * the lock, another thread is processing the list. */ - locked = SFXGE_TXQ_TRYLOCK(txq); + if (SFXGE_TXQ_TRYLOCK(txq)) { + sfxge_tx_qdpl_service(txq); + /* Lock has been dropped. */ + } } - if (locked) { - /* Try to service the list. */ - sfxge_tx_qdpl_service(txq); - /* Lock has been dropped. */ - } + SFXGE_TXQ_LOCK_ASSERT_NOTOWNED(txq); return (0); From owner-svn-src-all@FreeBSD.ORG Sat May 16 05:43:21 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 55BC6BC1; Sat, 16 May 2015 05:43:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 444E1199F; Sat, 16 May 2015 05:43:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4G5hLSY040581; Sat, 16 May 2015 05:43:21 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4G5hLPh040580; Sat, 16 May 2015 05:43:21 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201505160543.t4G5hLPh040580@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Sat, 16 May 2015 05:43:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282998 - head/sys/dev/sfxge 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.20 Precedence: list List-Id: "SVN commit messages 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, 16 May 2015 05:43:21 -0000 Author: arybchik Date: Sat May 16 05:43:20 2015 New Revision: 282998 URL: https://svnweb.freebsd.org/changeset/base/282998 Log: sfxge: move mbuf free to sfxge_if_transmit() It is a preparation to the next patch which will service packet queue even if packet addtion fails. Reviewed by: gnn Sponsored by: Solarflare Communications, Inc. MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D2552 Modified: head/sys/dev/sfxge/sfxge_tx.c Modified: head/sys/dev/sfxge/sfxge_tx.c ============================================================================== --- head/sys/dev/sfxge/sfxge_tx.c Sat May 16 05:37:47 2015 (r282997) +++ head/sys/dev/sfxge/sfxge_tx.c Sat May 16 05:43:20 2015 (r282998) @@ -605,9 +605,8 @@ sfxge_tx_packet_add(struct sfxge_txq *tx int rc; if (!SFXGE_LINK_UP(txq->sc)) { - rc = ENETDOWN; atomic_add_long(&txq->netdown_drops, 1); - goto fail; + return (ENETDOWN); } /* @@ -622,7 +621,7 @@ sfxge_tx_packet_add(struct sfxge_txq *tx rc = sfxge_tx_qdpl_put_locked(txq, m); if (rc != 0) { SFXGE_TXQ_UNLOCK(txq); - goto fail; + return (rc); } /* Try to service the list. */ @@ -631,7 +630,7 @@ sfxge_tx_packet_add(struct sfxge_txq *tx } else { rc = sfxge_tx_qdpl_put_unlocked(txq, m); if (rc != 0) - goto fail; + return (rc); /* * Try to grab the lock again. @@ -649,10 +648,6 @@ sfxge_tx_packet_add(struct sfxge_txq *tx SFXGE_TXQ_LOCK_ASSERT_NOTOWNED(txq); return (0); - -fail: - m_freem(m); - return (rc); } static void @@ -730,6 +725,8 @@ sfxge_if_transmit(struct ifnet *ifp, str } rc = sfxge_tx_packet_add(txq, m); + if (rc != 0) + m_freem(m); return (rc); } From owner-svn-src-all@FreeBSD.ORG Sat May 16 05:59:26 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CCBCDE34; Sat, 16 May 2015 05:59:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ADE0A1B10; Sat, 16 May 2015 05:59:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4G5xQuY046167; Sat, 16 May 2015 05:59:26 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4G5xQ3A046165; Sat, 16 May 2015 05:59:26 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201505160559.t4G5xQ3A046165@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 16 May 2015 05:59:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282999 - head/sys/dev/iwn 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.20 Precedence: list List-Id: "SVN commit messages 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, 16 May 2015 05:59:26 -0000 Author: adrian Date: Sat May 16 05:59:25 2015 New Revision: 282999 URL: https://svnweb.freebsd.org/changeset/base/282999 Log: Various iwn(4) fixes. * simplify channel logic for determining RF gain setting in scan setup * don't set TX timer on error * free node references for unsent frames on device stop * set maxfrags to IWN_MAX_SCATTER-1 (first segment is used by TX command) * add missing IWN_UNLOCK() from interrupt path when the hardware disappears. * pass control frames to host * nitems() instead of local macro Tested: * Intel 5100, STA mode PR: kern/196264 Submitted by: Andriy Voskoboinyk Modified: head/sys/dev/iwn/if_iwn.c Modified: head/sys/dev/iwn/if_iwn.c ============================================================================== --- head/sys/dev/iwn/if_iwn.c Sat May 16 05:43:20 2015 (r282998) +++ head/sys/dev/iwn/if_iwn.c Sat May 16 05:59:25 2015 (r282999) @@ -1875,7 +1875,7 @@ iwn_alloc_rx_ring(struct iwn_softc *sc, &paddr, BUS_DMA_NOWAIT); if (error != 0 && error != EFBIG) { device_printf(sc->sc_dev, - "%s: can't not map mbuf, error %d\n", __func__, + "%s: can't map mbuf, error %d\n", __func__, error); goto fail; } @@ -2036,6 +2036,10 @@ iwn_reset_tx_ring(struct iwn_softc *sc, m_freem(data->m); data->m = NULL; } + if (data->ni != NULL) { + ieee80211_free_node(data->ni); + data->ni = NULL; + } } /* Clear TX descriptors. */ memset(ring->desc, 0, ring->desc_dma.size); @@ -2969,7 +2973,7 @@ iwn_rx_done(struct iwn_softc *sc, struct return; } /* Discard frames that are too short. */ - if (len < sizeof (*wh)) { + if (len < sizeof (struct ieee80211_frame_ack)) { DPRINTF(sc, IWN_DEBUG_RECV, "%s: frame too short: %d\n", __func__, len); if_inc_counter(ifp, IFCOUNTER_IERRORS, 1); @@ -3021,7 +3025,10 @@ iwn_rx_done(struct iwn_softc *sc, struct /* Grab a reference to the source node. */ wh = mtod(m, struct ieee80211_frame *); - ni = ieee80211_find_rxnode(ic, (struct ieee80211_frame_min *)wh); + if (len >= sizeof(struct ieee80211_frame_min)) + ni = ieee80211_find_rxnode(ic, (struct ieee80211_frame_min *)wh); + else + ni = NULL; nf = (ni != NULL && ni->ni_vap->iv_state == IEEE80211_S_RUN && (ic->ic_flags & IEEE80211_F_SCAN) == 0) ? sc->noise : -95; @@ -4047,8 +4054,10 @@ iwn_intr(void *arg) r2 = 0; /* Unused. */ } else { r1 = IWN_READ(sc, IWN_INT); - if (r1 == 0xffffffff || (r1 & 0xfffffff0) == 0xa5a5a5a0) + if (r1 == 0xffffffff || (r1 & 0xfffffff0) == 0xa5a5a5a0) { + IWN_UNLOCK(sc); return; /* Hardware gone! */ + } r2 = IWN_READ(sc, IWN_FH_INT); } @@ -4519,7 +4528,7 @@ iwn_tx_data(struct iwn_softc *sc, struct return error; } /* Too many DMA segments, linearize mbuf. */ - m1 = m_collapse(m, M_NOWAIT, IWN_MAX_SCATTER); + m1 = m_collapse(m, M_NOWAIT, IWN_MAX_SCATTER - 1); if (m1 == NULL) { device_printf(sc->sc_dev, "%s: could not defrag mbuf\n", __func__); @@ -4725,7 +4734,7 @@ iwn_tx_data_raw(struct iwn_softc *sc, st return error; } /* Too many DMA segments, linearize mbuf. */ - m1 = m_collapse(m, M_NOWAIT, IWN_MAX_SCATTER); + m1 = m_collapse(m, M_NOWAIT, IWN_MAX_SCATTER - 1); if (m1 == NULL) { device_printf(sc->sc_dev, "%s: could not defrag mbuf\n", __func__); @@ -4825,8 +4834,8 @@ iwn_raw_xmit(struct ieee80211_node *ni, /* NB: m is reclaimed on tx failure */ ieee80211_free_node(ni); if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); - } - sc->sc_tx_timer = 5; + } else + sc->sc_tx_timer = 5; IWN_UNLOCK(sc); @@ -4872,9 +4881,8 @@ iwn_start_locked(struct ifnet *ifp) if (iwn_tx_data(sc, m, ni) != 0) { ieee80211_free_node(ni); if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); - continue; - } - sc->sc_tx_timer = 5; + } else + sc->sc_tx_timer = 5; } DPRINTF(sc, IWN_DEBUG_XMIT, "%s: done\n", __func__); @@ -4950,7 +4958,6 @@ iwn_ioctl(struct ifnet *ifp, u_long cmd, IWN_LOCK(sc); memset(&sc->last_stat, 0, sizeof(struct iwn_stats)); IWN_UNLOCK(sc); - error = 0; break; default: error = EINVAL; @@ -6818,16 +6825,10 @@ iwn_scan(struct iwn_softc *sc, struct ie chan->active = htole16(dwell_active); chan->passive = htole16(dwell_passive); - if (IEEE80211_IS_CHAN_5GHZ(c) && - !(c->ic_flags & IEEE80211_CHAN_PASSIVE)) { - chan->rf_gain = 0x3b; - } else if (IEEE80211_IS_CHAN_5GHZ(c)) { + if (IEEE80211_IS_CHAN_5GHZ(c)) chan->rf_gain = 0x3b; - } else if (!(c->ic_flags & IEEE80211_CHAN_PASSIVE)) { - chan->rf_gain = 0x28; - } else { + else chan->rf_gain = 0x28; - } DPRINTF(sc, IWN_DEBUG_STATE, "%s: chan %u flags 0x%x rf_gain 0x%x " @@ -8809,7 +8810,6 @@ iwn_hw_reset(void *arg0, int pending) } #ifdef IWN_DEBUG #define IWN_DESC(x) case x: return #x -#define COUNTOF(array) (sizeof(array) / sizeof(array[0])) /* * Translate CSR code to string @@ -8880,7 +8880,7 @@ iwn_debug_register(struct iwn_softc *sc) DPRINTF(sc, IWN_DEBUG_REGISTER, "CSR values: (2nd byte of IWN_INT_COALESCING is IWN_INT_PERIODIC)%s", "\n"); - for (i = 0; i < COUNTOF(csr_tbl); i++){ + for (i = 0; i < nitems(csr_tbl); i++){ DPRINTF(sc, IWN_DEBUG_REGISTER," %10s: 0x%08x ", iwn_get_csr_string(csr_tbl[i]), IWN_READ(sc, csr_tbl[i])); if ((i+1) % 3 == 0) From owner-svn-src-all@FreeBSD.ORG Sat May 16 06:04:54 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 27C4FFFC; Sat, 16 May 2015 06:04:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F05411BF6; Sat, 16 May 2015 06:04:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4G64r3n050691; Sat, 16 May 2015 06:04:53 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4G64rPi050690; Sat, 16 May 2015 06:04:53 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201505160604.t4G64rPi050690@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Sat, 16 May 2015 06:04:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283000 - head/sys/dev/sfxge 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.20 Precedence: list List-Id: "SVN commit messages 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, 16 May 2015 06:04:54 -0000 Author: arybchik Date: Sat May 16 06:04:53 2015 New Revision: 283000 URL: https://svnweb.freebsd.org/changeset/base/283000 Log: sfxge: add local variable with changed capabilities mask It is required for the next patch which adds dependency of TSO capabilities from Tx checksum offloads. Reviewed by: gnn Sponsored by: Solarflare Communications, Inc. MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D2553 Modified: head/sys/dev/sfxge/sfxge.c Modified: head/sys/dev/sfxge/sfxge.c ============================================================================== --- head/sys/dev/sfxge/sfxge.c Sat May 16 05:59:25 2015 (r282999) +++ head/sys/dev/sfxge/sfxge.c Sat May 16 06:04:53 2015 (r283000) @@ -258,26 +258,36 @@ sfxge_if_ioctl(struct ifnet *ifp, unsign sfxge_mac_filter_set(sc); break; case SIOCSIFCAP: + { + int reqcap = ifr->ifr_reqcap; + int capchg_mask; + SFXGE_ADAPTER_LOCK(sc); + /* Capabilities to be changed in accordance with request */ + capchg_mask = ifp->if_capenable ^ reqcap; + /* * The networking core already rejects attempts to * enable capabilities we don't have. We still have * to reject attempts to disable capabilities that we * can't (yet) disable. */ - if (~ifr->ifr_reqcap & SFXGE_CAP_FIXED) { + KASSERT((reqcap & ~ifp->if_capabilities) == 0, + ("Unsupported capabilities %x requested %x vs %x", + reqcap & ~ifp->if_capabilities, + reqcap , ifp->if_capabilities)); + if (capchg_mask & SFXGE_CAP_FIXED) { error = EINVAL; SFXGE_ADAPTER_UNLOCK(sc); break; } - ifp->if_capenable = ifr->ifr_reqcap; - if (ifp->if_capenable & IFCAP_TXCSUM) + if (reqcap & IFCAP_TXCSUM) ifp->if_hwassist |= (CSUM_IP | CSUM_TCP | CSUM_UDP); else ifp->if_hwassist &= ~(CSUM_IP | CSUM_TCP | CSUM_UDP); - if (ifp->if_capenable & IFCAP_TXCSUM_IPV6) + if (reqcap & IFCAP_TXCSUM_IPV6) ifp->if_hwassist |= (CSUM_TCP_IPV6 | CSUM_UDP_IPV6); else ifp->if_hwassist &= ~(CSUM_TCP_IPV6 | CSUM_UDP_IPV6); @@ -290,8 +300,11 @@ sfxge_if_ioctl(struct ifnet *ifp, unsign * but both bits are set in IPv4 and IPv6 mbufs. */ + ifp->if_capenable = reqcap; + SFXGE_ADAPTER_UNLOCK(sc); break; + } case SIOCSIFMEDIA: case SIOCGIFMEDIA: error = ifmedia_ioctl(ifp, ifr, &sc->media, command); From owner-svn-src-all@FreeBSD.ORG Sat May 16 06:15:49 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DB437296; Sat, 16 May 2015 06:15:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C93851D10; Sat, 16 May 2015 06:15:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4G6Fnis055766; Sat, 16 May 2015 06:15:49 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4G6FnrP055765; Sat, 16 May 2015 06:15:49 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201505160615.t4G6FnrP055765@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Sat, 16 May 2015 06:15:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283001 - head/usr.bin/ssh-copy-id 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.20 Precedence: list List-Id: "SVN commit messages 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, 16 May 2015 06:15:50 -0000 Author: eadler Date: Sat May 16 06:15:49 2015 New Revision: 283001 URL: https://svnweb.freebsd.org/changeset/base/283001 Log: ssh-copy-id: Add missing line continuation PR: 194301 Reported by: pkubaj@riseup.net Patch by: Ross Kilgariff Modified: head/usr.bin/ssh-copy-id/ssh-copy-id.sh Modified: head/usr.bin/ssh-copy-id/ssh-copy-id.sh ============================================================================== --- head/usr.bin/ssh-copy-id/ssh-copy-id.sh Sat May 16 06:04:53 2015 (r283000) +++ head/usr.bin/ssh-copy-id/ssh-copy-id.sh Sat May 16 06:15:49 2015 (r283001) @@ -48,7 +48,7 @@ sendkey() { done ; \ if [ -x /sbin/restorecon ]; then \ /sbin/restorecon -F "$HOME/.ssh/" "$keyfile" >/dev/null 2>&1 || true ; \ - fi + fi \ '\' } From owner-svn-src-all@FreeBSD.ORG Sat May 16 06:18:41 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4063140F; Sat, 16 May 2015 06:18:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2151B1D36; Sat, 16 May 2015 06:18:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4G6Ie2p056192; Sat, 16 May 2015 06:18:41 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4G6IdXX056180; Sat, 16 May 2015 06:18:39 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201505160618.t4G6IdXX056180@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 16 May 2015 06:18:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283002 - in head/tools/tools: ath/athaggrstats ath/athstats mwl/mwlstats net80211/wlanstats npe/npestats 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.20 Precedence: list List-Id: "SVN commit messages 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, 16 May 2015 06:18:41 -0000 Author: adrian Date: Sat May 16 06:18:39 2015 New Revision: 283002 URL: https://svnweb.freebsd.org/changeset/base/283002 Log: Make these all work with the new way of doing privatelib. Without these CFLAGS settings a cross-compile won't find the headers anywhere. Tested: * mips (32, big endian) cross-build w/ LOCAL_DIRS including these tools. Modified: head/tools/tools/ath/athaggrstats/Makefile head/tools/tools/ath/athstats/Makefile head/tools/tools/mwl/mwlstats/Makefile head/tools/tools/net80211/wlanstats/Makefile head/tools/tools/npe/npestats/Makefile Modified: head/tools/tools/ath/athaggrstats/Makefile ============================================================================== --- head/tools/tools/ath/athaggrstats/Makefile Sat May 16 06:15:49 2015 (r283001) +++ head/tools/tools/ath/athaggrstats/Makefile Sat May 16 06:18:39 2015 (r283002) @@ -12,6 +12,7 @@ CLEANFILES+= opt_ah.h CFLAGS+=-DATH_SUPPORT_ANI CFLAGS+=-DATH_SUPPORT_TDMA +CFLAGS+=-I${.CURDIR}/../../../../lib/libbsdstat/ LIBADD+= bsdstat opt_ah.h: Modified: head/tools/tools/ath/athstats/Makefile ============================================================================== --- head/tools/tools/ath/athstats/Makefile Sat May 16 06:15:49 2015 (r283001) +++ head/tools/tools/ath/athstats/Makefile Sat May 16 06:18:39 2015 (r283002) @@ -8,10 +8,6 @@ MAN= PROG= athstats -# Because of a clang preprocessor parser limitation causing this -# to not compile, use gcc for now. -#CC= gcc - SRCS= main.c athstats.c opt_ah.h ah_osdep.h CLEANFILES+= opt_ah.h @@ -21,6 +17,8 @@ CLEANFILES+= opt_ah.h CFLAGS+=-DATH_SUPPORT_ANI CFLAGS+=-DATH_SUPPORT_TDMA +CFLAGS+=-I${.CURDIR}/../../../../lib/libbsdstat/ + CFLAGS.clang+= -fbracket-depth=512 LIBADD= bsdstat Modified: head/tools/tools/mwl/mwlstats/Makefile ============================================================================== --- head/tools/tools/mwl/mwlstats/Makefile Sat May 16 06:15:49 2015 (r283001) +++ head/tools/tools/mwl/mwlstats/Makefile Sat May 16 06:18:39 2015 (r283002) @@ -6,6 +6,7 @@ MAN= SRCS= main.c mwlstats.c LIBADD= bsdstat +CFLAGS+=-I${.CURDIR}/../../../../lib/libbsdstat/ .include Modified: head/tools/tools/net80211/wlanstats/Makefile ============================================================================== --- head/tools/tools/net80211/wlanstats/Makefile Sat May 16 06:15:49 2015 (r283001) +++ head/tools/tools/net80211/wlanstats/Makefile Sat May 16 06:18:39 2015 (r283002) @@ -6,6 +6,7 @@ PROG= wlanstats BINDIR= /usr/local/bin MAN= LIBADD= bsdstat +CFLAGS+=-I${.CURDIR}/../../../../lib/libbsdstat/ SRCS= wlanstats.c main.c Modified: head/tools/tools/npe/npestats/Makefile ============================================================================== --- head/tools/tools/npe/npestats/Makefile Sat May 16 06:15:49 2015 (r283001) +++ head/tools/tools/npe/npestats/Makefile Sat May 16 06:18:39 2015 (r283002) @@ -5,5 +5,6 @@ SRCS= main.c npestats.c BINDIR= /usr/local/bin MAN= LIBADD= bsdstat +CFLAGS+=-I${.CURDIR}/../../../../lib/libbsdstat/ .include From owner-svn-src-all@FreeBSD.ORG Sat May 16 08:12:01 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A1738153; Sat, 16 May 2015 08:12:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8F44B17D2; Sat, 16 May 2015 08:12:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4G8C1GL014509; Sat, 16 May 2015 08:12:01 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4G8C193014508; Sat, 16 May 2015 08:12:01 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201505160812.t4G8C193014508@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 16 May 2015 08:12:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283003 - head/usr.sbin/syslogd 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.20 Precedence: list List-Id: "SVN commit messages 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, 16 May 2015 08:12:01 -0000 Author: delphij Date: Sat May 16 08:12:00 2015 New Revision: 283003 URL: https://svnweb.freebsd.org/changeset/base/283003 Log: path.h is not needed here. Modified: head/usr.sbin/syslogd/pathnames.h Modified: head/usr.sbin/syslogd/pathnames.h ============================================================================== --- head/usr.sbin/syslogd/pathnames.h Sat May 16 06:18:39 2015 (r283002) +++ head/usr.sbin/syslogd/pathnames.h Sat May 16 08:12:00 2015 (r283003) @@ -30,8 +30,6 @@ * $FreeBSD$ */ -#include - #define _PATH_KLOG "/dev/klog" #define _PATH_LOGCONF "/etc/syslog.conf" #define _PATH_LOGPID "/var/run/syslog.pid" From owner-svn-src-all@FreeBSD.ORG Sat May 16 09:13:56 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EBB918BC; Sat, 16 May 2015 09:13:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D979D1DE5; Sat, 16 May 2015 09:13:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4G9DuUK044002; Sat, 16 May 2015 09:13:56 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4G9DuKi044001; Sat, 16 May 2015 09:13:56 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201505160913.t4G9DuKi044001@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 16 May 2015 09:13:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283004 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 16 May 2015 09:13:57 -0000 Author: kib Date: Sat May 16 09:13:56 2015 New Revision: 283004 URL: https://svnweb.freebsd.org/changeset/base/283004 Log: MFC r282679: Do not return from thread_single(SINGLE_BOUNDARY) until all stopped thread are guarenteed to be removed from the processors. Modified: stable/10/sys/kern/kern_thread.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_thread.c ============================================================================== --- stable/10/sys/kern/kern_thread.c Sat May 16 08:12:00 2015 (r283003) +++ stable/10/sys/kern/kern_thread.c Sat May 16 09:13:56 2015 (r283004) @@ -758,6 +758,29 @@ stopme: PROC_LOCK(p); PROC_SLOCK(p); } + } else if (mode == SINGLE_BOUNDARY) { + /* + * Wait until all suspended threads are removed from + * the processors. The thread_suspend_check() + * increments p_boundary_count while it is still + * running, which makes it possible for the execve() + * to destroy vmspace while our other threads are + * still using the address space. + * + * We lock the thread, which is only allowed to + * succeed after context switch code finished using + * the address space. + */ + FOREACH_THREAD_IN_PROC(p, td2) { + if (td2 == td) + continue; + thread_lock(td2); + KASSERT((td2->td_flags & TDF_BOUNDARY) != 0, + ("td %p not on boundary", td2)); + KASSERT(TD_IS_SUSPENDED(td2), + ("td %p is not suspended", td2)); + thread_unlock(td2); + } } PROC_SUNLOCK(p); return (0); From owner-svn-src-all@FreeBSD.ORG Sat May 16 10:27:28 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 83ABF941; Sat, 16 May 2015 10:27:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 652FF14BD; Sat, 16 May 2015 10:27:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4GARSde079634; Sat, 16 May 2015 10:27:28 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4GARSw3079633; Sat, 16 May 2015 10:27:28 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201505161027.t4GARSw3079633@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Sat, 16 May 2015 10:27:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283005 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 16 May 2015 10:27:28 -0000 Author: bz Date: Sat May 16 10:27:27 2015 New Revision: 283005 URL: https://svnweb.freebsd.org/changeset/base/283005 Log: tr -d '\r' makes config a lot more happy. Modified: head/sys/arm/conf/ALPINE Modified: head/sys/arm/conf/ALPINE ============================================================================== --- head/sys/arm/conf/ALPINE Sat May 16 09:13:56 2015 (r283004) +++ head/sys/arm/conf/ALPINE Sat May 16 10:27:27 2015 (r283005) @@ -1,83 +1,83 @@ -# Kernel configuration for Alpine Board. -# -# For more information on this file, please read the config(5) manual page, -# and/or the handbook section on Kernel Configuration Files: -# -# http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html -# -# The handbook is also available locally in /usr/share/doc/handbook -# if you've installed the doc distribution, otherwise always see the -# FreeBSD World Wide Web server (http://www.FreeBSD.org/) for the -# latest information. -# -# An exhaustive list of options and more detailed explanations of the -# device lines is also present in the ../../conf/NOTES and NOTES files. -# If you are in doubt as to the purpose or necessity of a line, check first -# in NOTES. -# -# $FreeBSD$ - -ident ALPINE - -include "std.armv6" -include "../annapurna/alpine/std.alpine" - -makeoptions MODULES_OVERRIDE="" -makeoptions WERROR="-Werror" - -options HZ=100 -options SCHED_4BSD # 4BSD scheduler -options SMP # Enable multiple cores - -# Debugging -makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols -options BREAK_TO_DEBUGGER -options KDB -options DDB #Enable the kernel debugger - -# NFS support -options NFSCL #Network Filesystem Client -options NFSLOCKD #Network Lock Manager -options NFS_ROOT #NFS usable as /, requires NFSCLIENT - -# Interrupt controller -device gic - -# Pseudo devices -device loop -device random -device pty -device md -device gpio - -# ATA controllers -device ahci # AHCI-compatible SATA controllers -device ata # Legacy ATA/SATA controllers -options ATA_STATIC_ID # Static device numbering - -# ATA/SCSI peripherals -device scbus # SCSI bus (required for ATA/SCSI) -device ch # SCSI media changers -device da # Direct Access (disks) -device sa # Sequential Access (tape etc) -device cd # CD -device pass # Passthrough device (direct ATA/SCSI access) -device ses # Enclosure Services (SES and SAF-TE) -#device ctl # CAM Target Layer - -# Serial ports -device uart - -# Ethernet -device ether -device mii -device bpf -options DEVICE_POLLING - -# USB ethernet support, requires miibus -device miibus - -#FDT -options FDT -options FDT_DTB_STATIC -makeoptions FDT_DTS_FILE=annapurna-alpine.dts +# Kernel configuration for Alpine Board. +# +# For more information on this file, please read the config(5) manual page, +# and/or the handbook section on Kernel Configuration Files: +# +# http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html +# +# The handbook is also available locally in /usr/share/doc/handbook +# if you've installed the doc distribution, otherwise always see the +# FreeBSD World Wide Web server (http://www.FreeBSD.org/) for the +# latest information. +# +# An exhaustive list of options and more detailed explanations of the +# device lines is also present in the ../../conf/NOTES and NOTES files. +# If you are in doubt as to the purpose or necessity of a line, check first +# in NOTES. +# +# $FreeBSD$ + +ident ALPINE + +include "std.armv6" +include "../annapurna/alpine/std.alpine" + +makeoptions MODULES_OVERRIDE="" +makeoptions WERROR="-Werror" + +options HZ=100 +options SCHED_4BSD # 4BSD scheduler +options SMP # Enable multiple cores + +# Debugging +makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols +options BREAK_TO_DEBUGGER +options KDB +options DDB #Enable the kernel debugger + +# NFS support +options NFSCL #Network Filesystem Client +options NFSLOCKD #Network Lock Manager +options NFS_ROOT #NFS usable as /, requires NFSCLIENT + +# Interrupt controller +device gic + +# Pseudo devices +device loop +device random +device pty +device md +device gpio + +# ATA controllers +device ahci # AHCI-compatible SATA controllers +device ata # Legacy ATA/SATA controllers +options ATA_STATIC_ID # Static device numbering + +# ATA/SCSI peripherals +device scbus # SCSI bus (required for ATA/SCSI) +device ch # SCSI media changers +device da # Direct Access (disks) +device sa # Sequential Access (tape etc) +device cd # CD +device pass # Passthrough device (direct ATA/SCSI access) +device ses # Enclosure Services (SES and SAF-TE) +#device ctl # CAM Target Layer + +# Serial ports +device uart + +# Ethernet +device ether +device mii +device bpf +options DEVICE_POLLING + +# USB ethernet support, requires miibus +device miibus + +#FDT +options FDT +options FDT_DTB_STATIC +makeoptions FDT_DTS_FILE=annapurna-alpine.dts From owner-svn-src-all@FreeBSD.ORG Sat May 16 10:31:16 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 45C6EB24; Sat, 16 May 2015 10:31:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3530F15AE; Sat, 16 May 2015 10:31:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4GAVGqr080753; Sat, 16 May 2015 10:31:16 GMT (envelope-from thomas@FreeBSD.org) Received: (from thomas@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4GAVGvO080752; Sat, 16 May 2015 10:31:16 GMT (envelope-from thomas@FreeBSD.org) Message-Id: <201505161031.t4GAVGvO080752@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: thomas set sender to thomas@FreeBSD.org using -f From: Thomas Quinot Date: Sat, 16 May 2015 10:31:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283006 - head/sys/boot/i386/boot0 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.20 Precedence: list List-Id: "SVN commit messages 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, 16 May 2015 10:31:16 -0000 Author: thomas Date: Sat May 16 10:31:15 2015 New Revision: 283006 URL: https://svnweb.freebsd.org/changeset/base/283006 Log: Minor comments fixes Modified: head/sys/boot/i386/boot0/boot0.S Modified: head/sys/boot/i386/boot0/boot0.S ============================================================================== --- head/sys/boot/i386/boot0/boot0.S Sat May 16 10:27:27 2015 (r283005) +++ head/sys/boot/i386/boot0/boot0.S Sat May 16 10:31:15 2015 (r283006) @@ -541,11 +541,11 @@ putchr: int $0x10 # character popw %bx # Restore #else /* SIO */ - movb $0x01,%ah # BIOS: Send + movb $0x01,%ah # BIOS: Send character bioscom: pushw %dx # Save xorw %dx,%dx # Use COM1 - int $0x14 # Character + int $0x14 # BIOS: Serial I/O popw %dx # Restore #endif /* SIO */ retw # To caller From owner-svn-src-all@FreeBSD.ORG Sat May 16 10:35:31 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 31052D36; Sat, 16 May 2015 10:35:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1FB8115D8; Sat, 16 May 2015 10:35:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4GAZUrH084399; Sat, 16 May 2015 10:35:30 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4GAZUAk084398; Sat, 16 May 2015 10:35:30 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201505161035.t4GAZUAk084398@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Sat, 16 May 2015 10:35:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283007 - head/sys/dev/sfxge 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.20 Precedence: list List-Id: "SVN commit messages 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, 16 May 2015 10:35:31 -0000 Author: arybchik Date: Sat May 16 10:35:30 2015 New Revision: 283007 URL: https://svnweb.freebsd.org/changeset/base/283007 Log: sfxge: avoid usage of ifm_data The driver uses ifm_data to save capabilities mask calculated during initialization when supported phy modes are discovered. The patch simply calculates it when either media or options are changed. Reviewed by: glebius Sponsored by: Solarflare Communications, Inc. MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D2540 Modified: head/sys/dev/sfxge/sfxge_port.c Modified: head/sys/dev/sfxge/sfxge_port.c ============================================================================== --- head/sys/dev/sfxge/sfxge_port.c Sat May 16 10:31:15 2015 (r283006) +++ head/sys/dev/sfxge/sfxge_port.c Sat May 16 10:35:30 2015 (r283007) @@ -39,6 +39,8 @@ __FBSDID("$FreeBSD$"); #include "sfxge.h" +static int sfxge_phy_cap_mask(struct sfxge_softc *, int, uint32_t *); + static int sfxge_mac_stat_update(struct sfxge_softc *sc) { @@ -443,6 +445,7 @@ sfxge_port_start(struct sfxge_softc *sc) efx_nic_t *enp; size_t pdu; int rc; + uint32_t phy_cap_mask; port = &sc->port; enp = sc->enp; @@ -483,10 +486,13 @@ sfxge_port_start(struct sfxge_softc *sc) if ((rc = efx_mac_drain(enp, B_FALSE)) != 0) goto fail3; - if ((rc = efx_phy_adv_cap_set(sc->enp, sc->media.ifm_cur->ifm_data)) - != 0) + if ((rc = sfxge_phy_cap_mask(sc, sc->media.ifm_cur->ifm_media, + &phy_cap_mask)) != 0) goto fail4; + if ((rc = efx_phy_adv_cap_set(sc->enp, phy_cap_mask)) != 0) + goto fail5; + port->init_state = SFXGE_PORT_STARTED; /* Single poll in case there were missing initial events */ @@ -495,6 +501,7 @@ sfxge_port_start(struct sfxge_softc *sc) return (0); +fail5: fail4: (void)efx_mac_drain(enp, B_TRUE); fail3: @@ -738,12 +745,95 @@ sfxge_media_status(struct ifnet *ifp, st SFXGE_ADAPTER_UNLOCK(sc); } +static efx_phy_cap_type_t +sfxge_link_mode_to_phy_cap(efx_link_mode_t mode) +{ + switch (mode) { + case EFX_LINK_10HDX: + return (EFX_PHY_CAP_10HDX); + case EFX_LINK_10FDX: + return (EFX_PHY_CAP_10FDX); + case EFX_LINK_100HDX: + return (EFX_PHY_CAP_100HDX); + case EFX_LINK_100FDX: + return (EFX_PHY_CAP_100FDX); + case EFX_LINK_1000HDX: + return (EFX_PHY_CAP_1000HDX); + case EFX_LINK_1000FDX: + return (EFX_PHY_CAP_1000FDX); + case EFX_LINK_10000FDX: + return (EFX_PHY_CAP_10000FDX); + default: + EFSYS_ASSERT(B_FALSE); + return (EFX_PHY_CAP_INVALID); + } +} + +static int +sfxge_phy_cap_mask(struct sfxge_softc *sc, int ifmedia, uint32_t *phy_cap_mask) +{ + efx_phy_media_type_t medium_type; + boolean_t mode_found = B_FALSE; + uint32_t cap_mask, mode_cap_mask; + efx_link_mode_t mode; + efx_phy_cap_type_t phy_cap; + + efx_phy_media_type_get(sc->enp, &medium_type); + if (medium_type >= nitems(sfxge_link_mode)) { + if_printf(sc->ifnet, "unexpected media type %d\n", medium_type); + return (EINVAL); + } + + efx_phy_adv_cap_get(sc->enp, EFX_PHY_CAP_PERM, &cap_mask); + + for (mode = EFX_LINK_10HDX; mode < EFX_LINK_NMODES; mode++) { + if (ifmedia == sfxge_link_mode[medium_type][mode]) { + mode_found = B_TRUE; + break; + } + } + + if (!mode_found) { + /* + * If media is not in the table, it must be IFM_AUTO. + */ + KASSERT((cap_mask & (1 << EFX_PHY_CAP_AN)) && + ifmedia == (IFM_ETHER | IFM_AUTO), + ("%s: no mode for media %d", __func__, ifmedia)); + *phy_cap_mask = (cap_mask & ~(1 << EFX_PHY_CAP_ASYM)); + return (0); + } + + phy_cap = sfxge_link_mode_to_phy_cap(mode); + if (phy_cap == EFX_PHY_CAP_INVALID) { + if_printf(sc->ifnet, + "cannot map link mode %d to phy capability\n", + mode); + return (EINVAL); + } + + mode_cap_mask = (1 << phy_cap); + mode_cap_mask |= cap_mask & (1 << EFX_PHY_CAP_AN); +#ifdef SFXGE_HAVE_PAUSE_MEDIAOPTS + if (ifmedia & IFM_ETH_RXPAUSE) + mode_cap_mask |= cap_mask & (1 << EFX_PHY_CAP_PAUSE); + if (!(ifmedia & IFM_ETH_TXPAUSE)) + mode_cap_mask |= cap_mask & (1 << EFX_PHY_CAP_ASYM); +#else + mode_cap_mask |= cap_mask & (1 << EFX_PHY_CAP_PAUSE); +#endif + + *phy_cap_mask = mode_cap_mask; + return (0); +} + static int sfxge_media_change(struct ifnet *ifp) { struct sfxge_softc *sc; struct ifmedia_entry *ifm; int rc; + uint32_t phy_cap_mask; sc = ifp->if_softc; ifm = sc->media.ifm_cur; @@ -759,7 +849,10 @@ sfxge_media_change(struct ifnet *ifp) if (rc != 0) goto out; - rc = efx_phy_adv_cap_set(sc->enp, ifm->ifm_data); + if ((rc = sfxge_phy_cap_mask(sc, ifm->ifm_media, &phy_cap_mask)) != 0) + goto out; + + rc = efx_phy_adv_cap_set(sc->enp, phy_cap_mask); out: SFXGE_ADAPTER_UNLOCK(sc); @@ -771,6 +864,7 @@ int sfxge_port_ifmedia_init(struct sfxge efx_phy_media_type_t medium_type; uint32_t cap_mask, mode_cap_mask; efx_link_mode_t mode; + efx_phy_cap_type_t phy_cap; int mode_ifm, best_mode_ifm = 0; int rc; @@ -801,41 +895,30 @@ int sfxge_port_ifmedia_init(struct sfxge efx_phy_media_type_get(sc->enp, &medium_type); efx_phy_adv_cap_get(sc->enp, EFX_PHY_CAP_PERM, &cap_mask); - EFX_STATIC_ASSERT(EFX_LINK_10HDX == EFX_PHY_CAP_10HDX + 1); - EFX_STATIC_ASSERT(EFX_LINK_10FDX == EFX_PHY_CAP_10FDX + 1); - EFX_STATIC_ASSERT(EFX_LINK_100HDX == EFX_PHY_CAP_100HDX + 1); - EFX_STATIC_ASSERT(EFX_LINK_100FDX == EFX_PHY_CAP_100FDX + 1); - EFX_STATIC_ASSERT(EFX_LINK_1000HDX == EFX_PHY_CAP_1000HDX + 1); - EFX_STATIC_ASSERT(EFX_LINK_1000FDX == EFX_PHY_CAP_1000FDX + 1); - EFX_STATIC_ASSERT(EFX_LINK_10000FDX == EFX_PHY_CAP_10000FDX + 1); + for (mode = EFX_LINK_10HDX; mode < EFX_LINK_NMODES; mode++) { + phy_cap = sfxge_link_mode_to_phy_cap(mode); + if (phy_cap == EFX_PHY_CAP_INVALID) + continue; - for (mode = EFX_LINK_10HDX; mode <= EFX_LINK_10000FDX; mode++) { - mode_cap_mask = 1 << (mode - 1); + mode_cap_mask = (1 << phy_cap); mode_ifm = sfxge_link_mode[medium_type][mode]; if ((cap_mask & mode_cap_mask) && mode_ifm) { - mode_cap_mask |= cap_mask & (1 << EFX_PHY_CAP_AN); - -#ifdef SFXGE_HAVE_PAUSE_MEDIAOPTS /* No flow-control */ - ifmedia_add(&sc->media, mode_ifm, mode_cap_mask, NULL); + ifmedia_add(&sc->media, mode_ifm, 0, NULL); +#ifdef SFXGE_HAVE_PAUSE_MEDIAOPTS /* Respond-only. If using AN, we implicitly * offer symmetric as well, but that doesn't * mean we *have* to generate pause frames. */ - mode_cap_mask |= cap_mask & ((1 << EFX_PHY_CAP_PAUSE) | - (1 << EFX_PHY_CAP_ASYM)); mode_ifm |= IFM_ETH_RXPAUSE; - ifmedia_add(&sc->media, mode_ifm, mode_cap_mask, NULL); + ifmedia_add(&sc->media, mode_ifm, 0, NULL); /* Symmetric */ - mode_cap_mask &= ~(1 << EFX_PHY_CAP_ASYM); mode_ifm |= IFM_ETH_TXPAUSE; -#else /* !SFXGE_HAVE_PAUSE_MEDIAOPTS */ - mode_cap_mask |= cap_mask & (1 << EFX_PHY_CAP_PAUSE); + ifmedia_add(&sc->media, mode_ifm, 0, NULL); #endif - ifmedia_add(&sc->media, mode_ifm, mode_cap_mask, NULL); /* Link modes are numbered in order of speed, * so assume the last one available is the best. @@ -847,8 +930,7 @@ int sfxge_port_ifmedia_init(struct sfxge if (cap_mask & (1 << EFX_PHY_CAP_AN)) { /* Add autoselect mode. */ mode_ifm = IFM_ETHER | IFM_AUTO; - ifmedia_add(&sc->media, mode_ifm, - cap_mask & ~(1 << EFX_PHY_CAP_ASYM), NULL); + ifmedia_add(&sc->media, mode_ifm, 0, NULL); best_mode_ifm = mode_ifm; } From owner-svn-src-all@FreeBSD.ORG Sat May 16 12:05:27 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 39160B2; Sat, 16 May 2015 12:05:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 286451E3A; Sat, 16 May 2015 12:05:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4GC5RPs029804; Sat, 16 May 2015 12:05:27 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4GC5RPG029803; Sat, 16 May 2015 12:05:27 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201505161205.t4GC5RPG029803@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Sat, 16 May 2015 12:05:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283008 - head/usr.sbin/mountd 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.20 Precedence: list List-Id: "SVN commit messages 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, 16 May 2015 12:05:27 -0000 Author: rmacklem Date: Sat May 16 12:05:26 2015 New Revision: 283008 URL: https://svnweb.freebsd.org/changeset/base/283008 Log: Add a warning message to mountd for exported file systems that are automounted, since that configuration isn't supported. This still allows the export, since two emails I received felt that this should not be disabled. It sends the message to syslog(LOG_ERR..), so that it goes to the same places as the other messages related to /etc/exports problems, even though it is a warning and not an error. Reviewed by: trasz MFC after: 2 weeks Modified: head/usr.sbin/mountd/mountd.c Modified: head/usr.sbin/mountd/mountd.c ============================================================================== --- head/usr.sbin/mountd/mountd.c Sat May 16 10:35:30 2015 (r283007) +++ head/usr.sbin/mountd/mountd.c Sat May 16 12:05:26 2015 (r283008) @@ -1410,6 +1410,9 @@ get_exportlist_one(void) } if (check_dirpath(cp) && statfs(cp, &fsb) >= 0) { + if ((fsb.f_flags & MNT_AUTOMOUNTED) != 0) + syslog(LOG_ERR, "Warning: exporting of " + "automounted fs %s not supported", cp); if (got_nondir) { syslog(LOG_ERR, "dirs must be first"); getexp_err(ep, tgrp); From owner-svn-src-all@FreeBSD.ORG Sat May 16 13:11:37 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 05126D6A; Sat, 16 May 2015 13:11:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C134D1516; Sat, 16 May 2015 13:11:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4GDBaN7064244; Sat, 16 May 2015 13:11:36 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4GDBa39064241; Sat, 16 May 2015 13:11:36 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201505161311.t4GDBa39064241@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Sat, 16 May 2015 13:11:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283009 - in head: sbin/ifconfig 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.20 Precedence: list List-Id: "SVN commit messages 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, 16 May 2015 13:11:37 -0000 Author: melifaro Date: Sat May 16 13:11:35 2015 New Revision: 283009 URL: https://svnweb.freebsd.org/changeset/base/283009 Log: * Update SFF-8024 Identifier constants. * Fix SFF_8436_CC_EXT in SFF-8436 memory map. * Add SFF-8436/8636 bits (revision compliance/nominal bitrate). * Do some small style/type fixes. Modified: head/sbin/ifconfig/sfp.c head/sys/net/sff8436.h head/sys/net/sff8472.h Modified: head/sbin/ifconfig/sfp.c ============================================================================== --- head/sbin/ifconfig/sfp.c Sat May 16 12:05:26 2015 (r283008) +++ head/sbin/ifconfig/sfp.c Sat May 16 13:11:35 2015 (r283009) @@ -182,6 +182,18 @@ static struct _nv eth_1040g[] = { { 0, NULL } }; +/* SFF-8636 Rev. 2.5 table 6.3: Revision compliance */ +static struct _nv rev_compl[] = { + { 0x1, "SFF-8436 rev <=4.8" }, + { 0x2, "SFF-8436 rev <=4.8" }, + { 0x3, "SFF-8636 rev <=1.3" }, + { 0x4, "SFF-8636 rev <=1.4" }, + { 0x5, "SFF-8636 rev <=1.5" }, + { 0x6, "SFF-8636 rev <=2.0" }, + { 0x7, "SFF-8636 rev <=2.5" }, + { 0x0, "Unspecified" } +}; + const char * find_value(struct _nv *x, int value) { @@ -246,6 +258,19 @@ convert_sff_connector(char *buf, size_t } static void +convert_sff_rev_compliance(char *buf, size_t size, uint8_t value) +{ + const char *x; + + if (value > 0x07) + x = "Unallocated"; + else + x = find_value(rev_compl, value); + + snprintf(buf, size, "%s", x); +} + +static void get_sfp_identifier(struct i2c_info *ii, char *buf, size_t size) { uint8_t data; @@ -604,23 +629,50 @@ get_sfp_tx_power(struct i2c_info *ii, ch static void get_qsfp_rx_power(struct i2c_info *ii, char *buf, size_t size, int chan) { - char xbuf[2]; + uint8_t xbuf[2]; memset(xbuf, 0, sizeof(xbuf)); - read_i2c(ii, SFF_8436_BASE, SFF_8436_RX_CH1_MSB + (chan - 1) * 2, 2, xbuf); + read_i2c(ii, SFF_8436_BASE, SFF_8436_RX_CH1_MSB + (chan-1)*2, 2, xbuf); convert_sff_power(ii, buf, size, xbuf); } static void get_qsfp_tx_power(struct i2c_info *ii, char *buf, size_t size, int chan) { - char xbuf[2]; + uint8_t xbuf[2]; memset(xbuf, 0, sizeof(xbuf)); - read_i2c(ii, SFF_8436_BASE, SFF_8436_TX_CH1_MSB + (chan -1) * 2, 2, xbuf); + read_i2c(ii, SFF_8436_BASE, SFF_8436_TX_CH1_MSB + (chan-1)*2, 2, xbuf); convert_sff_power(ii, buf, size, xbuf); } +static void +get_qsfp_rev_compliance(struct i2c_info *ii, char *buf, size_t size) +{ + uint8_t xbuf; + + xbuf = 0; + read_i2c(ii, SFF_8436_BASE, SFF_8436_STATUS, 1, &xbuf); + convert_sff_rev_compliance(buf, size, xbuf); +} + +static uint32_t +get_qsfp_br(struct i2c_info *ii) +{ + uint8_t xbuf; + uint32_t rate; + + xbuf = 0; + read_i2c(ii, SFF_8436_BASE, SFF_8436_BITRATE, 1, &xbuf); + rate = xbuf * 100; + if (xbuf == 0xFF) { + read_i2c(ii, SFF_8436_BASE, SFF_8636_BITRATE, 1, &xbuf); + rate = xbuf * 250; + } + + return (rate); +} + /* * Reads i2c data from opened kernel socket. */ @@ -689,6 +741,7 @@ print_qsfp_status(struct i2c_info *ii, i { char buf[80], buf2[40], buf3[40]; uint8_t diag_type; + uint32_t bitrate; int i; /* Read diagnostic monitoring type */ @@ -715,6 +768,16 @@ print_qsfp_status(struct i2c_info *ii, i if (ii->error == 0) printf("\t%s\n", buf); + if (verbose > 1) { + get_qsfp_rev_compliance(ii, buf, sizeof(buf)); + if (ii->error == 0) + printf("\tcompliance level: %s\n", buf); + + bitrate = get_qsfp_br(ii); + if (ii->error == 0 && bitrate > 0) + printf("\tnominal bitrate: %u Mbps\n", bitrate); + } + /* Request current measurements if they are provided: */ if (ii->do_diag != 0) { get_qsfp_temp(ii, buf, sizeof(buf)); Modified: head/sys/net/sff8436.h ============================================================================== --- head/sys/net/sff8436.h Sat May 16 12:05:26 2015 (r283008) +++ head/sys/net/sff8436.h Sat May 16 13:11:35 2015 (r283009) @@ -202,7 +202,9 @@ enum { * optional features are implemented * (if any) in the transceiver * (see Table 42) */ - SFF_8436_CC_EXT = 222, /* Check code for the Extended ID + SFF_8636_BITRATE = 222, /* Nominal bit rate per channel, units + * of 250 Mbps */ + SFF_8436_CC_EXT = 223, /* Check code for the Extended ID * Fields (bytes 192-222 incl) */ SFF_8436_VENDOR_RSRVD_START = 224, SFF_8436_VENDOR_RSRVD_END = 255, Modified: head/sys/net/sff8472.h ============================================================================== --- head/sys/net/sff8472.h Sat May 16 12:05:26 2015 (r283008) +++ head/sys/net/sff8472.h Sat May 16 13:11:35 2015 (r283009) @@ -377,7 +377,7 @@ enum { /* * Table 3.2 Identifier values. - * Identifier constants has taken from SFF-8024 rev 2.2 table 4.1 + * Identifier constants has taken from SFF-8024 rev 2.9 table 4.1 * (as referenced by table 3.2 footer) * */ enum { @@ -400,28 +400,36 @@ enum { SFF_8024_ID_HD8X = 0x10, /* Shielded Mini Multilane HD 8X */ SFF_8024_ID_QSFP28 = 0x11, /* QSFP28 */ SFF_8024_ID_CXP2 = 0x12, /* CXP2 (aka CXP28) */ - SFF_8024_ID_LAST = SFF_8024_ID_CXP2 + SFF_8024_ID_CDFP = 0x13, /* CDFP (Style 1/Style 2) */ + SFF_8024_ID_SMM4 = 0x14, /* Shielded Mini Multilate HD 4X Fanout */ + SFF_8024_ID_SMM8 = 0x15, /* Shielded Mini Multilate HD 8X Fanout */ + SFF_8024_ID_CDFP3 = 0x16, /* CDFP (Style3) */ + SFF_8024_ID_LAST = SFF_8024_ID_CDFP3 }; static const char *sff_8024_id[SFF_8024_ID_LAST + 1] = {"Unknown", "GBIC", "SFF", - "SFP/SFP+", + "SFP/SFP+/SFP28", "XBI", "Xenpak", "XFP", "XFF", "XFP-E", - "XPAk", + "XPAK", "X2", - "DWDM-SFP", + "DWDM-SFP/SFP+", "QSFP", "QSFP+", "CXP", "HD4X", "HD8X", "QSFP28", - "CXP2"}; + "CXP2", + "CDFP", + "SMM4", + "SMM8", + "CDFP3"}; /* Keep compability with old definitions */ #define SFF_8472_ID_UNKNOWN SFF_8024_ID_UNKNOWN From owner-svn-src-all@FreeBSD.ORG Sat May 16 15:44:15 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D27F3176; Sat, 16 May 2015 15:44:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BBB6E13C1; Sat, 16 May 2015 15:44:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4GFiFj7039750; Sat, 16 May 2015 15:44:15 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4GFiEfq039738; Sat, 16 May 2015 15:44:14 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201505161544.t4GFiEfq039738@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sat, 16 May 2015 15:44:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283010 - in stable/10: contrib/gcclibs/libgomp contrib/gcclibs/libgomp/config/bsd contrib/gcclibs/libgomp/config/linux contrib/gcclibs/libgomp/config/mingw32 contrib/gcclibs/libgomp/co... 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.20 Precedence: list List-Id: "SVN commit messages 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, 16 May 2015 15:44:15 -0000 Author: pfg Date: Sat May 16 15:44:13 2015 New Revision: 283010 URL: https://svnweb.freebsd.org/changeset/base/283010 Log: MFC r282115, r282152, r282201 MFV r282150 libgomp: Update to version 4.3.5. bring initial BSD support from upstream. This was not meant to be MFC'd at first but the original OMP support for FreeBSD was in very poor shape. The effect of this change should be minimal as all ports are already using the version of libgomp that comes with the gcc ports. The local libgomp is planned to be disabled for platforms that are not using older gcc by default so this version of libgomp will not be shipped in tier-1 platform releases. Discussed with: emaste Added: stable/10/contrib/gcclibs/libgomp/ChangeLog.gcc44 - copied unchanged from r282201, head/contrib/gcclibs/libgomp/ChangeLog.gcc44 stable/10/contrib/gcclibs/libgomp/config/bsd/ - copied from r282201, head/contrib/gcclibs/libgomp/config/bsd/ stable/10/contrib/gcclibs/libgomp/config/linux/affinity.c - copied unchanged from r282152, head/contrib/gcclibs/libgomp/config/linux/affinity.c stable/10/contrib/gcclibs/libgomp/config/linux/proc.c - copied unchanged from r282152, head/contrib/gcclibs/libgomp/config/linux/proc.c stable/10/contrib/gcclibs/libgomp/config/mingw32/proc.c - copied unchanged from r282152, head/contrib/gcclibs/libgomp/config/mingw32/proc.c stable/10/contrib/gcclibs/libgomp/config/posix/affinity.c - copied unchanged from r282152, head/contrib/gcclibs/libgomp/config/posix/affinity.c Modified: stable/10/contrib/gcclibs/libgomp/ChangeLog stable/10/contrib/gcclibs/libgomp/Makefile.am stable/10/contrib/gcclibs/libgomp/Makefile.in stable/10/contrib/gcclibs/libgomp/aclocal.m4 stable/10/contrib/gcclibs/libgomp/config.h.in stable/10/contrib/gcclibs/libgomp/configure stable/10/contrib/gcclibs/libgomp/configure.ac stable/10/contrib/gcclibs/libgomp/configure.tgt stable/10/contrib/gcclibs/libgomp/env.c stable/10/contrib/gcclibs/libgomp/iter.c stable/10/contrib/gcclibs/libgomp/libgomp.h stable/10/contrib/gcclibs/libgomp/libgomp.texi stable/10/contrib/gcclibs/libgomp/omp.h.in stable/10/contrib/gcclibs/libgomp/omp_lib.h.in stable/10/contrib/gcclibs/libgomp/team.c stable/10/gnu/lib/libgomp/Makefile stable/10/gnu/lib/libgomp/config.h Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/gcclibs/libgomp/ChangeLog ============================================================================== --- stable/10/contrib/gcclibs/libgomp/ChangeLog Sat May 16 13:11:35 2015 (r283009) +++ stable/10/contrib/gcclibs/libgomp/ChangeLog Sat May 16 15:44:13 2015 (r283010) @@ -1,6 +1,223 @@ -2007-07-19 Release Manager +2010-05-22 Release Manager - * GCC 4.2.1 released. + * GCC 4.3.5 released. + +2010-05-06 Ralf Wildenhues + + PR other/43620 + * configure.ac (AM_INIT_AUTOMAKE): Add no-dist. + * configure: Regenerate. + * aclocal.m4: Regenerate. + * config.h.in: Regenerate. + * Makefile.in: Regenerate. + * testsuite/Makefile.in: Regenerate. + +2009-08-19 Tobias Burnus + + PR fortran/41102 + omp_lib.h.in: Fix -std=f95 errors. + +2009-08-14 Uros Bizjak + + Backport from mainline: + 2008-12-26 Uros Bizjak + + * testsuite/libgomp.c/atomic-6.c: Add -mieee for alpha*-*-* targets. + +2009-08-04 Release Manager + + * GCC 4.3.4 released. + +2009-01-24 Release Manager + + * GCC 4.3.3 released. + +2008-12-05 Janis Johnson + + Backport from mainline: + 2008-05-15 Janis Johnson + + * testsuite/lib/libgomp.exp: Load new torture support. + +2008-12-02 Janis Johnson + + Backport from mainline: + 2008-11-26 Janis Johnson + + PR testsuite/28870 + * testsuite/lib/libgomp.exp: Include new timeout library files. + (libgomp_target_compile): Set timeout value from new proc. + +2008-08-27 Release Manager + + * GCC 4.3.2 released. + +2008-06-12 Jakub Jelinek + + PR middle-end/36506 + * testsuite/libgomp.c/reduction-5.c: New test. + +2008-06-06 Release Manager + + * GCC 4.3.1 released. + +2008-05-23 Jakub Jelinek + + PR c++/36308 + * testsuite/libgomp.c++/ctor-11.C: New test. + * testsuite/libgomp.c++/ctor-12.C: New test. + +2008-05-07 Jakub Jelinek + + PR middle-end/36106 + * testsuite/libgomp.c/atomic-5.c: New test. + * testsuite/libgomp.c/atomic-6.c: New test. + * testsuite/libgomp.c/autopar-1.c: New test. + +2008-03-18 Jakub Jelinek + + PR middle-end/35611 + * testsuite/libgomp.c/atomic-4.c: New test. + + PR libgomp/35625 + * iter.c (gomp_iter_guided_next_locked): If q > n, set end to ws->end. + (gomp_iter_guided_next): Likewise. + * testsuite/libgomp.c/pr35625.c: New test. + +2008-03-13 Jakub Jelinek + + PR middle-end/35185 + * testsuite/libgomp.c++/pr35185.C: New test. + +2008-03-12 Jakub Jelinek + + PR middle-end/35549 + * testsuite/libgomp.c/pr35549.c: New test. + +2008-03-06 Jakub Jelinek + + * testsuite/libgomp.c/atomic-3.c: New test. + +2008-03-05 Release Manager + + * GCC 4.3.0 released. + +2008-02-15 Jakub Jelinek + + PR middle-end/35196 + * testsuite/libgomp.c/pr35196.c: New test. + + PR middle-end/35130 + * testsuite/libgomp.fortran/pr35130.f90: New test. + * testsuite/libgomp.c/pr35130.c: New test. + +2008-01-25 Jakub Jelinek + + PR middle-end/33880 + * testsuite/libgomp.c/pr33880.c: New test. + * testsuite/libgomp.fortran/pr33880.f90: New test. + +2008-01-24 David Edelsohn + + * configure: Regenerate. + +2008-01-08 Jakub Jelinek + + * configure.ac: Move futex checking into ../config/futex.m4. + * configure: Rebuilt. + * aclocal.m4: Rebuilt. + * Makefile.in: Rebuilt. + + * configure.tgt: Rename have_tls to gcc_cv_have_tls to match + 2007-10-15 ../config/tls.m4 change. + +2007-12-19 Jakub Jelinek + + PR c++/34513 + * testsuite/libgomp.c/pr34513.c: New test. + * testsuite/libgomp.c++/pr34513.C: New test. + +2007-12-17 Jack Howarth + + PR target/32765 + * testsuite/libgomp.fortran/crayptr2.f90: Move dg-options for darwin. + +2007-12-04 Jakub Jelinek + + * omp.h.in (__GOMP_NOTHROW): Define. Use it on omp_* prototypes. + +2007-12-03 Jakub Jelinek + + * testsuite/libgomp.c/private-1.c: New test. + +2007-11-29 Andris Pavenis + Paolo Bonzini + + * Makefile.am: Use space as vpath separator. Use 'vpath %' + instead of 'VPATH ='. + * Makefile.in: Regenerate. + +2007-11-23 Matthias Klose + + * configure.ac: Adjust makeinfo version check. + * configure: Regenerate. + +2007-11-10 Jakub Jelinek + + PR fortran/34020 + * testsuite/libgomp.fortran/pr34020.f90: New test. + +2007-11-06 Jakub Jelinek + + PR c++/33894 + * testsuite/libgomp.c++/atomic-1.C: New test. + +2007-10-25 Jakub Jelinek + + PR libgomp/33275 + * testsuite/libgomp.fortran/omp_parse3.f90 (test_threadprivate): + Make x and y integers rather than (implicit) reals. Add private (j) + clause to the last omp parallel. + +2007-10-15 Maciej W. Rozycki + + * configure: Regenerate following changes to ../config/tls.m4. + +2007-09-28 Jakub Jelinek + + * testsuite/libgomp.fortran/stack.f90: New test. + +2007-09-10 Danny Smith + + * config/mingw32/proc.c: New file. + +2007-09-05 Uros Bizjak + + * testsuite/libgomp.c/atomic-1.c: Include cpuid.h for i386 targets. + (main): Use __get_cpuid to get i386 target fetaures. + * testsuite/libgomp.c/atomic-2.c: Include cpuid.h for x86_64 targets. + (main): Use __get_cpuid to get x86_64 target fetaures. + +2007-08-15 Jack Howarth + + PR target/32765 + * testsuite/libgomp.fortran/pr32550.f90: Use -static-libgcc on Darwin. + * testsuite/libgomp.fortran/crayptr2.f90: Likwise. + +2007-07-12 Jakub Jelinek + + PR fortran/32550 + * testsuite/libgomp.fortran/pr32550.f90: New test. + * testsuite/libgomp.fortran/crayptr2.f90: New test. + +2007-07-05 H.J. Lu + + * aclocal.m4: Regenerated. + +2007-07-05 Tobias Burnus + + PR fortran/32359 + * testsuite/libgomp.fortran/pr32359.f90: New. 2007-07-02 Jakub Jelinek @@ -21,9 +238,117 @@ * testsuite/libgomp.c/pr32362-2.c: New test. * testsuite/libgomp.c/pr32362-3.c: New test. -2007-05-13 Release Manager +2007-06-07 Jakub Jelinek + + * team.c (gomp_team_start): Fix setting up thread_attr + stack size. + +2007-06-02 Paolo Bonzini + + * configure: Regenerate. + +2007-05-23 Steve Ellcey + + * Makefile.in: Regenerate. + * configure: Regenerate. + * aclocal.m4: Regenerate. + * testsuite/Makefile.in: Regenerate. + +2007-05-04 Jakub Jelinek + + * config/linux/proc.c: New file. + + PR libgomp/28482 + * configure.tgt: Don't link with -Wl,-z,nodlopen even on Linux. + +2007-04-19 Daniel Franke + + * libgomp.texi (GOMP_CPU_AFFINITY): Updated. - * GCC 4.2.0 released. +2007-04-16 Matthias Klose + + * configure.tgt (i[456]86-*-linux*): Only add ia32 specific + flags if not building with -m64. + * testsuite/lib/libgomp-dg.exp (libgomp_init): Don't add -march + flag for i?86-*-* targets, if current target matches -m64. + +2007-04-14 Steve Ellcey + + * Makefile.am: Add -I .. to ACLOCAL_AMFLAGS. + * Makefile.in: Regenerate. + +2007-04-07 John David Anglin + + PR testsuite/31369 + * testsuite/libgomp.c++/c++.exp: Don't use concat when setting + ld_library_path. + * testsuite/libgomp.fortran/fortran.exp: Likewise. + +2007-04-04 Jakub Jelinek + + * libgomp.h (gomp_cpu_affinity, gomp_cpu_affinity_len): New extern + decls. + (gomp_init_affinity, gomp_init_thread_affinity): New prototypes. + * env.c (gomp_cpu_affinity, gomp_cpu_affinity_len): New variables. + (parse_affinity): New function. + (initialize_env): Call it and gomp_init_affinity. + * team.c (gomp_team_start): If gomp_cpu_affinity != NULL, + create new pthread_attr_t and call gomp_init_thread_affinity + on it for each thread before passing the attribute to pthread_create. + * config/linux/affinity.c: New file. + * config/posix/affinity.c: New file. + * configure.ac (HAVE_PTHREAD_AFFINITY_NP): New test. + * configure: Rebuilt. + * config.h.in: Rebuilt. + * Makefile.am (libgomp_la_SOURCES): Add affinity.c. + * Makefile.in: Rebuilt. + +2007-03-23 Andreas Tobler + + * testsuite/lib/libgomp.exp (libgomp_init): Add -shared-libgcc for + *-*-darwin*. + * testsuite/libgomp.c++/c++.exp: Look for shared libstdc++ library + and use it if found. + +2007-03-18 Uros Bizjak + + * testsuite/config/default.exp: New file. + * testsuite/lib/libgomp.exp: New file. + * testsuite/lib/libgomp.dg (load_gcc_lib, libgomp_init, + libgomp_target_compile, libgomp_option_help, libgomp_option_proc, + load_lib *, load_gcc_lib *): Move to libgomp.exp. + (libgomp_load): Remove. + * testsuite/lib/libgomp.exp (libgomp_init): Compute + always_ld_library_path, not ld_library_path. Set additional_flags + to -march=i486 for ilp32 x86_64-*-* and i386-*-* targets. + (target_compile): Do not call libgomp_init. Append lang_library_path + and lang_link_flags to options. + * testsuite/libgomp.c/c.exp: Set DEFAULT_FLAGS to -O2. Set + ld_library_path from always_ld_library_path. Set LD_LIBRARY_PATH + here. + * testsuite/libgomp.c++/c++.exp: Set ld_library_path from + always_ld_library_path. Set LD_LIBRARY_PATH here. + * testsuite/libgomp.fortran/fortran.exp: Ditto. + * testsuite/libgomp.c/atomic-1.c: Set dg-options to + "-O2 -march=pentium" for ilp32 x86 targets. Simplify check for + CX8 flag. + * testsuite/libgomp.c/atomic-2.c: Set dg-options to "-O2 -mcx16" for + lp64 x86 targets. Do not check for SSE3 bit. Do not define bit_SSE3. + * testsuite/libgomp.c/pr29947-1.c: Remove default dg-options. + * testsuite/libgomp.c/pr29947-1.c: Ditto. + * testsuite/libgomp.c/atomic-10.c: Ditto. + +2007-03-21 Jakub Jelinek + + * testsuite/libgomp.fortran/appendix-a/a.22.8.f90: Add + dg-final cleanup-modules line. + * testsuite/libgomp.fortran/appendix-a/a.40.1.f90: Likewise. + * testsuite/libgomp.fortran/appendix-a/a.31.5.f90: Likewise. + * testsuite/libgomp.fortran/appendix-a/a.31.4.f90: Likewise. + * testsuite/libgomp.fortran/threadprivate2.f90: Likewise. + * testsuite/libgomp.fortran/reduction5.f90: Likewise. + * testsuite/libgomp.fortran/threadprivate3.f90: Likewise. + * testsuite/libgomp.fortran/threadprivate1.f90: Likewise. 2007-03-18 Andreas Schwab @@ -31,15 +356,32 @@ extraction. * configure: Regenerate. +2007-03-01 Brooks Moses + + * Makefile.am: Add install-pdf target as copied from + automake v1.10 rules. + * Makefile.in: Regenerate + 2007-02-07 Jakub Jelinek + PR libgomp/28486 + * configure: Regenerate. + PR c++/30703 * testsuite/libgomp.c++/pr30703.C: New test. -2007-02-07 Daniel Franke +2007-02-02 Jakub Jelinek - Backport from mainline: - 2007-01-31 Daniel Franke + Revert: + 2006-07-05 Eric Christopher + * configure.ac: Depend addition of -pthread on host OS. + * configure: Regenerate. + +2007-01-31 Ralf Wildenhues + + * libgomp.texi: Fix spacing after abbreviations. + +2007-01-31 Daniel Franke PR libgomp/30546 * configure.ac: Add check for makeinfo @@ -50,74 +392,47 @@ * Makefile.in: Regenerated. * testsuite/Makefile.in: Regenerated. -2007-02-07 Daniel Franke - - Backport from mainline: - 2007-01-31 Ralf Wildenhues - - * libgomp.texi: Fix spacing after abbreviations. - - Backport from mainline: - 2007-01-29 Daniel Franke +2007-01-29 Daniel Franke PR libgomp/30540 * libgomp.texi: More about implementation-dependent settings. -2007-02-06 Roger Sayle +2007-01-26 Tobias Burnus - PR libgomp/28296 - Backport from mainline. - Revert: - 2006-07-05 Eric Christopher - * configure.ac: Depend addition of -pthread on host OS. - * configure: Regenerate. + * testsuite/libgomp.fortran/fortran.exp: Support .f03 extension. -2007-01-30 Tobias Burnus +2007-01-24 Jakub Jelinek - Backport from mainline. - 2007-01-26 Tobias Burnus + PR middle-end/30494 + * testsuite/libgomp.c/pr30494.c: New test. - * testsuite/libgomp.fortran/fortran.exp: Support .f03 extension. +2007-01-15 Tom Tromey -2007-01-25 Daniel Franke + * configure: Rebuilt. + * configure.ac: Fixed comment. - Backport from mainline: - 2006-12-21 Daniel Franke +2007-01-14 Daniel Franke + + * libgomp.texi: Document implementation specific default values of + environment variables. + +2006-12-21 Daniel Franke PR libgomp/28209 * libgomp.texi: New file. * configure.ac: Add --enable-generated-files-in-srcdir option. - * Makefile.am: Add info, dvi, pdf, html targets. On request, - copy files to srcdir. + * Makefile.am: Add info, dvi, pdf, html targets. On request, copy + files to srcdir. * Makefile.in: Regenerated. + * config.h.in: Regenerated. * testsuite/Makefile.in: Regenerated. * NOTES: Removed. - Backport from mainline: - 2007-01-14 Daniel Franke - * libgomp.texi: Document implementation specific default values of - environment variables. - -2007-01-24 Jakub Jelinek - - PR middle-end/30494 - * testsuite/libgomp.c/pr30494.c: New test. - -2006-12-18 Daniel Franke - - Backport from mainline: - 2006-12-04 Daniel Franke +2006-12-04 Daniel Franke PR libgomp/29949 * env.c (omp_set_num_threads): Set illegal thread count to 1. - Backport from mainline: - 2006-11-09 Uros Bizjak - - * env.c (parse_schedule): Reject out of range values. - (parse_unsigned_long): Reject out of range, negative - or zero values. - 2006-12-04 Eric Botcazou * configure: Regenerate. @@ -135,6 +450,15 @@ * configure.tgt: Force initial-exec TLS model on Linux only. +2006-11-13 Daniel Jacobowitz + + * configure: Regenerated. + +2006-11-09 Uros Bizjak + + * env.c (parse_schedule): Reject out of range values. + (parse_unsigned_long): Reject out of range, negative or zero values. + 2006-10-29 Jakub Jelinek PR fortran/29629 Copied: stable/10/contrib/gcclibs/libgomp/ChangeLog.gcc44 (from r282201, head/contrib/gcclibs/libgomp/ChangeLog.gcc44) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/contrib/gcclibs/libgomp/ChangeLog.gcc44 Sat May 16 15:44:13 2015 (r283010, copy of r282201, head/contrib/gcclibs/libgomp/ChangeLog.gcc44) @@ -0,0 +1,8 @@ +2008-09-19 Jakub Jelinek (r140497) + Andreas Tobler + + * config/bsd/proc.c: New file. + * configure.tgt (*-*-darwin*): Use config_path "darwin posix". + * configure.ac: Check for header + * configure: Regenerate. + * config.h.in: Likewise. Modified: stable/10/contrib/gcclibs/libgomp/Makefile.am ============================================================================== --- stable/10/contrib/gcclibs/libgomp/Makefile.am Sat May 16 13:11:35 2015 (r283009) +++ stable/10/contrib/gcclibs/libgomp/Makefile.am Sat May 16 15:44:13 2015 (r283010) @@ -1,6 +1,6 @@ ## Process this file with automake to produce Makefile.in -ACLOCAL_AMFLAGS = -I ../config +ACLOCAL_AMFLAGS = -I .. -I ../config SUBDIRS = testsuite ## May be used by toolexeclibdir. @@ -12,9 +12,7 @@ search_path = $(addprefix $(top_srcdir)/ fincludedir = $(libdir)/gcc/$(target_alias)/$(gcc_version)/finclude libsubincludedir = $(libdir)/gcc/$(target_alias)/$(gcc_version)/include -empty = -space = $(empty) $(empty) -VPATH = $(subst $(space),:,$(strip $(search_path))) +vpath % $(strip $(search_path)) AM_CPPFLAGS = $(addprefix -I, $(search_path)) AM_CFLAGS = $(XCFLAGS) @@ -33,7 +31,7 @@ libgomp_la_LDFLAGS = $(libgomp_version_i libgomp_la_SOURCES = alloc.c barrier.c critical.c env.c error.c iter.c \ loop.c ordered.c parallel.c sections.c single.c team.c work.c \ - lock.c mutex.c proc.c sem.c bar.c time.c fortran.c + lock.c mutex.c proc.c sem.c bar.c time.c fortran.c affinity.c nodist_noinst_HEADERS = libgomp_f.h nodist_libsubinclude_HEADERS = omp.h @@ -51,10 +49,19 @@ env.lo: libgomp_f.h env.o: libgomp_f.h -# No install-html target -.PHONY: install-html +# No install-html or install-pdf support in automake yet +.PHONY: install-html install-pdf install-html: +install-pdf: $(PDFS) + @$(NORMAL_INSTALL) + test -z "$(pdfdir)" || $(mkinstalldirs) "$(DESTDIR)$(pdfdir)" + @list='$(PDFS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(pdfdir)/$$f'"; \ + $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(pdfdir)/$$f"; \ + done # Automake Documentation: # If your package has Texinfo files in many directories, you can use the Modified: stable/10/contrib/gcclibs/libgomp/Makefile.in ============================================================================== --- stable/10/contrib/gcclibs/libgomp/Makefile.in Sat May 16 13:11:35 2015 (r283009) +++ stable/10/contrib/gcclibs/libgomp/Makefile.in Sat May 16 15:44:13 2015 (r283010) @@ -17,6 +17,7 @@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ +VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ @@ -37,24 +38,27 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ -DIST_COMMON = $(am__configure_deps) $(srcdir)/../config.guess \ - $(srcdir)/../config.sub $(srcdir)/../depcomp \ - $(srcdir)/../install-sh $(srcdir)/../ltmain.sh \ - $(srcdir)/../missing $(srcdir)/../mkinstalldirs \ - $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(srcdir)/config.h.in $(srcdir)/libgomp.spec.in \ - $(srcdir)/libgomp_f.h.in $(srcdir)/omp.h.in \ - $(srcdir)/omp_lib.f90.in $(srcdir)/omp_lib.h.in \ - $(top_srcdir)/configure ChangeLog +DIST_COMMON = $(srcdir)/../config.guess $(srcdir)/../config.sub \ + ChangeLog $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/configure $(am__configure_deps) \ + $(srcdir)/config.h.in $(srcdir)/../mkinstalldirs \ + $(srcdir)/omp.h.in $(srcdir)/omp_lib.h.in \ + $(srcdir)/omp_lib.f90.in $(srcdir)/libgomp_f.h.in \ + $(srcdir)/libgomp.spec.in $(srcdir)/../depcomp \ + $(srcdir)/../ltmain.sh $(srcdir)/../config.guess \ + $(srcdir)/../config.sub subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \ $(top_srcdir)/../config/depstand.m4 \ $(top_srcdir)/../config/enable.m4 \ + $(top_srcdir)/../config/futex.m4 \ $(top_srcdir)/../config/lead-dot.m4 \ $(top_srcdir)/../config/multi.m4 \ $(top_srcdir)/../config/stdint.m4 \ - $(top_srcdir)/../config/tls.m4 $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/../config/tls.m4 $(top_srcdir)/../ltoptions.m4 \ + $(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \ + $(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/../libtool.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) @@ -79,21 +83,20 @@ libgomp_la_LIBADD = am_libgomp_la_OBJECTS = alloc.lo barrier.lo critical.lo env.lo \ error.lo iter.lo loop.lo ordered.lo parallel.lo sections.lo \ single.lo team.lo work.lo lock.lo mutex.lo proc.lo sem.lo \ - bar.lo time.lo fortran.lo + bar.lo time.lo fortran.lo affinity.lo libgomp_la_OBJECTS = $(am_libgomp_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I. depcomp = $(SHELL) $(top_srcdir)/../depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) \ +LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) -LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ +LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libgomp_la_SOURCES) -DIST_SOURCES = $(libgomp_la_SOURCES) MULTISRCTOP = MULTIBUILDTOP = MULTIDIRS = @@ -126,18 +129,6 @@ HEADERS = $(nodist_finclude_HEADERS) $(n ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -distdir = $(PACKAGE)-$(VERSION) -top_distdir = $(distdir) -am__remove_distdir = \ - { test ! -d $(distdir) \ - || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -fr $(distdir); }; } -DIST_ARCHIVES = $(distdir).tar.gz -GZIP_ENV = --best -distuninstallcheck_listfiles = find . -type f -print -distcleancheck_listfiles = find . -type f -print -VPATH = $(subst $(space),:,$(strip $(search_path))) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ @@ -157,6 +148,7 @@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ @@ -164,12 +156,15 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FC = @FC@ FCFLAGS = @FCFLAGS@ +FGREP = @FGREP@ GENINSRC_FALSE = @GENINSRC_FALSE@ GENINSRC_TRUE = @GENINSRC_TRUE@ +GREP = @GREP@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LIBGOMP_BUILD_VERSIONED_SHLIB_FALSE = @LIBGOMP_BUILD_VERSIONED_SHLIB_FALSE@ LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE = @LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@ @@ -182,6 +177,7 @@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ +NM = @NM@ OBJEXT = @OBJEXT@ OMP_LOCK_ALIGN = @OMP_LOCK_ALIGN@ OMP_LOCK_KIND = @OMP_LOCK_KIND@ @@ -200,6 +196,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ RANLIB = @RANLIB@ SECTION_LDFLAGS = @SECTION_LDFLAGS@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ @@ -210,6 +207,7 @@ XCFLAGS = @XCFLAGS@ XLDFLAGS = @XLDFLAGS@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_FC = @ac_ct_FC@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ @@ -244,6 +242,7 @@ libexecdir = @libexecdir@ libtool_VERSION = @libtool_VERSION@ link_gomp = @link_gomp@ localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ multi_basedir = @multi_basedir@ @@ -260,14 +259,12 @@ target_os = @target_os@ target_vendor = @target_vendor@ toolexecdir = @toolexecdir@ toolexeclibdir = @toolexeclibdir@ -ACLOCAL_AMFLAGS = -I ../config +ACLOCAL_AMFLAGS = -I .. -I ../config SUBDIRS = testsuite gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER) search_path = $(addprefix $(top_srcdir)/config/, $(config_path)) $(top_srcdir) fincludedir = $(libdir)/gcc/$(target_alias)/$(gcc_version)/finclude libsubincludedir = $(libdir)/gcc/$(target_alias)/$(gcc_version)/include -empty = -space = $(empty) $(empty) AM_CPPFLAGS = $(addprefix -I, $(search_path)) AM_CFLAGS = $(XCFLAGS) AM_LDFLAGS = $(XLDFLAGS) $(SECTION_LDFLAGS) $(OPT_LDFLAGS) @@ -279,7 +276,7 @@ libgomp_version_info = -version-info $(l libgomp_la_LDFLAGS = $(libgomp_version_info) $(libgomp_version_script) libgomp_la_SOURCES = alloc.c barrier.c critical.c env.c error.c iter.c \ loop.c ordered.c parallel.c sections.c single.c team.c work.c \ - lock.c mutex.c proc.c sem.c bar.c time.c fortran.c + lock.c mutex.c proc.c sem.c bar.c time.c fortran.c affinity.c nodist_noinst_HEADERS = libgomp_f.h nodist_libsubinclude_HEADERS = omp.h @@ -406,6 +403,7 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/affinity.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alloc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/barrier.Plo@am__quote@ @@ -733,152 +731,6 @@ GTAGS: distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - $(am__remove_distdir) - mkdir $(distdir) - $(mkdir_p) $(distdir)/. $(distdir)/.. $(distdir)/../config - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ - if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(mkdir_p) "$(distdir)/$$subdir" \ - || exit 1; \ - distdir=`$(am__cd) $(distdir) && pwd`; \ - top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ - (cd $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$top_distdir" \ - distdir="$$distdir/$$subdir" \ - distdir) \ - || exit 1; \ - fi; \ - done - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$(top_distdir)" distdir="$(distdir)" \ - dist-info - -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ - ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ - || chmod -R a+r $(distdir) -dist-gzip: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) - -dist-bzip2: distdir - tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 - $(am__remove_distdir) - -dist-tarZ: distdir - tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z - $(am__remove_distdir) - -dist-shar: distdir - shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz - $(am__remove_distdir) - -dist-zip: distdir - -rm -f $(distdir).zip - zip -rq $(distdir).zip $(distdir) - $(am__remove_distdir) - -dist dist-all: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) - -# This target untars the dist file and tries a VPATH configuration. Then -# it guarantees that the distribution is self-contained by making another -# tarfile. -distcheck: dist - case '$(DIST_ARCHIVES)' in \ - *.tar.gz*) \ - GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ - *.tar.bz2*) \ - bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ - *.tar.Z*) \ - uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ - *.shar.gz*) \ - GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ - *.zip*) \ - unzip $(distdir).zip ;;\ - esac - chmod -R a-w $(distdir); chmod a+w $(distdir) - mkdir $(distdir)/_build - mkdir $(distdir)/_inst - chmod a-w $(distdir) - dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ - && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ - && cd $(distdir)/_build \ - && ../configure --srcdir=.. --prefix="$$dc_install_base" \ - $(DISTCHECK_CONFIGURE_FLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) dvi \ - && $(MAKE) $(AM_MAKEFLAGS) check \ - && $(MAKE) $(AM_MAKEFLAGS) install \ - && $(MAKE) $(AM_MAKEFLAGS) installcheck \ - && $(MAKE) $(AM_MAKEFLAGS) uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ - distuninstallcheck \ - && chmod -R a-w "$$dc_install_base" \ - && ({ \ - (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ - distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ - } || { rm -rf "$$dc_destdir"; exit 1; }) \ - && rm -rf "$$dc_destdir" \ - && $(MAKE) $(AM_MAKEFLAGS) dist \ - && rm -rf $(DIST_ARCHIVES) \ - && $(MAKE) $(AM_MAKEFLAGS) distcleancheck - $(am__remove_distdir) - @(echo "$(distdir) archives ready for distribution: "; \ - list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ - sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}' -distuninstallcheck: - @cd $(distuninstallcheck_dir) \ - && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ - || { echo "ERROR: files left after uninstall:" ; \ - if test -n "$(DESTDIR)"; then \ - echo " (check DESTDIR support)"; \ - fi ; \ - $(distuninstallcheck_listfiles) ; \ - exit 1; } >&2 -distcleancheck: distclean - @if test '$(srcdir)' = . ; then \ - echo "ERROR: distcleancheck can only run from a VPATH build" ; \ - exit 1 ; \ - fi - @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ - || { echo "ERROR: files left in build directory after distclean:" ; \ - $(distcleancheck_listfiles) ; \ - exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile $(INFO_DEPS) $(LTLIBRARIES) all-multi $(HEADERS) \ @@ -1011,16 +863,13 @@ uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am all-local \ all-multi am--refresh check check-am clean clean-generic \ clean-libtool clean-multi clean-recursive \ - clean-toolexeclibLTLIBRARIES ctags ctags-recursive dist \ - dist-all dist-bzip2 dist-gzip dist-info dist-shar dist-tarZ \ - dist-zip distcheck distclean distclean-compile \ - distclean-generic distclean-hdr distclean-libtool \ - distclean-multi distclean-recursive distclean-tags \ - distcleancheck distdir distuninstallcheck dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-exec install-exec-am install-info \ - install-info-am install-man install-multi \ - install-nodist_fincludeHEADERS \ + clean-toolexeclibLTLIBRARIES ctags ctags-recursive dist-info \ + distclean distclean-compile distclean-generic distclean-hdr \ + distclean-libtool distclean-multi distclean-recursive \ + distclean-tags dvi dvi-am html html-am info info-am install \ + install-am install-data install-data-am install-exec \ + install-exec-am install-info install-info-am install-man \ + install-multi install-nodist_fincludeHEADERS \ install-nodist_libsubincludeHEADERS \ install-nodist_toolexeclibHEADERS install-strip \ install-toolexeclibLTLIBRARIES installcheck installcheck-am \ @@ -1036,6 +885,8 @@ uninstall-info: uninstall-info-recursive uninstall-toolexeclibLTLIBRARIES +vpath % $(strip $(search_path)) + omp_lib_kinds.mod: omp_lib.mod : omp_lib.mod: omp_lib.f90 @@ -1045,10 +896,20 @@ fortran.o: libgomp_f.h env.lo: libgomp_f.h env.o: libgomp_f.h -# No install-html target -.PHONY: install-html +# No install-html or install-pdf support in automake yet +.PHONY: install-html install-pdf install-html: +install-pdf: $(PDFS) + @$(NORMAL_INSTALL) + test -z "$(pdfdir)" || $(mkinstalldirs) "$(DESTDIR)$(pdfdir)" + @list='$(PDFS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(pdfdir)/$$f'"; \ + $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(pdfdir)/$$f"; \ + done + all-local: $(STAMP_GENINSRC) stamp-geninsrc: libgomp.info Modified: stable/10/contrib/gcclibs/libgomp/aclocal.m4 ============================================================================== --- stable/10/contrib/gcclibs/libgomp/aclocal.m4 Sat May 16 13:11:35 2015 (r283009) +++ stable/10/contrib/gcclibs/libgomp/aclocal.m4 Sat May 16 15:44:13 2015 (r283010) @@ -859,8 +859,13 @@ AC_SUBST([am__untar]) m4_include([../config/acx.m4]) m4_include([../config/depstand.m4]) m4_include([../config/enable.m4]) +m4_include([../config/futex.m4]) m4_include([../config/lead-dot.m4]) m4_include([../config/multi.m4]) m4_include([../config/stdint.m4]) m4_include([../config/tls.m4]) +m4_include([../ltoptions.m4]) +m4_include([../ltsugar.m4]) +m4_include([../ltversion.m4]) +m4_include([../lt~obsolete.m4]) m4_include([acinclude.m4]) Modified: stable/10/contrib/gcclibs/libgomp/config.h.in ============================================================================== --- stable/10/contrib/gcclibs/libgomp/config.h.in Sat May 16 13:11:35 2015 (r283009) +++ stable/10/contrib/gcclibs/libgomp/config.h.in Sat May 16 15:44:13 2015 (r283010) @@ -12,9 +12,15 @@ /* Define if the POSIX Semaphores do not work on your system. */ #undef HAVE_BROKEN_POSIX_SEMAPHORES +/* Define to 1 if the target assembler supports thread-local storage. */ +#undef HAVE_CC_TLS + /* Define to 1 if you have the `clock_gettime' function. */ #undef HAVE_CLOCK_GETTIME +/* Define to 1 if you have the header file. */ +#undef HAVE_DLFCN_H + /* Define to 1 if you have the `getloadavg' function. */ #undef HAVE_GETLOADAVG @@ -24,6 +30,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H +/* Define if pthread_{,attr_}{g,s}etaffinity_np is supported. */ +#undef HAVE_PTHREAD_AFFINITY_NP + /* Define to 1 if you have the header file. */ #undef HAVE_SEMAPHORE_H @@ -48,6 +57,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_SYSCTL_H + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TIME_H *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sat May 16 16:40:22 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CBEAF427 for ; Sat, 16 May 2015 16:40:22 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AED3419EC for ; Sat, 16 May 2015 16:40:22 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.9/8.14.9) with ESMTP id t4GGeMq1010049 for ; Sat, 16 May 2015 16:40:22 GMT (envelope-from bdrewery@freefall.freebsd.org) Received: (from bdrewery@localhost) by freefall.freebsd.org (8.14.9/8.14.9/Submit) id t4GGeMU9010045 for svn-src-all@freebsd.org; Sat, 16 May 2015 16:40:22 GMT (envelope-from bdrewery) Received: (qmail 3910 invoked from network); 16 May 2015 11:40:21 -0500 Received: from unknown (HELO ?10.10.1.139?) (freebsd@shatow.net@10.10.1.139) by sweb.xzibition.com with ESMTPA; 16 May 2015 11:40:21 -0500 Message-ID: <555772FA.2080408@FreeBSD.org> Date: Sat, 16 May 2015 11:40:26 -0500 From: Bryan Drewery Organization: FreeBSD User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Konstantin Belousov , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r282948 - head/lib/libthr/thread References: <201505150840.t4F8eHhM000804@svn.freebsd.org> In-Reply-To: <201505150840.t4F8eHhM000804@svn.freebsd.org> OpenPGP: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="V2VQqCUxc38WfvmkBeTmRbEMAdALPOMfx" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 16 May 2015 16:40:23 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --V2VQqCUxc38WfvmkBeTmRbEMAdALPOMfx Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 5/15/2015 3:40 AM, Konstantin Belousov wrote: > Author: kib > Date: Fri May 15 08:40:17 2015 > New Revision: 282948 > URL: https://svnweb.freebsd.org/changeset/base/282948 >=20 > Log: > Some third-party malloc(3) implementations use pthread_setspecific(3)= > to handle per-thread information. Since our pthread_setspecific() > implementation calls calloc(3) to allocate per-thread specific data > storage, things get complicated. > =20 > Switch the allocator to use bare mmap(2). There is some loss of the > allocated page, since e.g. on amd64, PTHREAD_KEYS_MAX * sizeof(struct= > pthread_specific_elem) is 3K (it actually spans whole page due to > padding), but I believe it is more acceptable than additional code fo= r > specialized allocator(). > =20 > The alternatives would either to make the specific data array be part= of > the struct thread, or use internal bindings to call the libc malloc, > avoiding interposing. > =20 > Also do the style pass over the thr_spec.c, esp. simplify the > conditionals nesting by returning early when an error detected. > Remove trivial comments. > =20 > Found by: yuri@rawbw.com > PR: 200138 > Sponsored by: The FreeBSD Foundation > MFC after: 2 weeks >=20 > Modified: > head/lib/libthr/thread/thr_spec.c >=20 Thank you for this! I have a lot of patches at Isilon for adding a libc cleanup function to free all caching, for use in memory leak detectors such as valgrind. I even fixed valgrind to utilize it. This particular code was problematic. I wrote up an arch mail about my patch a few months ago and it ended up being several pages about libthr. I never sent it because it became too long. I need to revisit that work and get an arch@ discussion going on my proposal and the various issues I ran into with libthr. While developing this cleanup feature, and working on a malloc wrapper (dmalloc), I had a lot of problems with pthread_mutext_t (and similar primitives) using calloc(3). I found that David Xu actually did do most of the work to change this but abandoned it (it's all in SVN still). Using pthreads from a malloc wrapper is really painful to get right. --=20 Regards, Bryan Drewery --V2VQqCUxc38WfvmkBeTmRbEMAdALPOMfx Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJVV3L6AAoJEDXXcbtuRpfPV5IIAOET2XsUZhEavP/dvKuBQK46 L0HGVyexgUcx/2Zmb9HhI21xaPl6uTsgc7wycJgJXGjXNpqRipSursGogvqEcrTW c50aTnPgzGj2jC9hOWcjK34MdVU0Q/Amkj/mkeToYDAaxRVYszdOuc1Xvg3nlnDn ZFioXGT6FzpjYcyZAOaKi9xeKJm+4Y2f65fEOF4kXjwhXbFtDdQ9QDPUQ/avzL5x Ddladk6VAbKssJKWmuJkR7zVRWHHlAGcmPOZ5v2NPP/aXyaYE/429rGsmDMwqMdR uHhN0j4QdJ+wjWT29lyneDUS9FQVJIAEnpaHbJJqyGEzoeU7dkIkMQbAcxMADIQ= =roz7 -----END PGP SIGNATURE----- --V2VQqCUxc38WfvmkBeTmRbEMAdALPOMfx-- From owner-svn-src-all@FreeBSD.ORG Sat May 16 17:31:43 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7362624B for ; Sat, 16 May 2015 17:31:43 +0000 (UTC) Received: from nm28.bullet.mail.bf1.yahoo.com (nm28.bullet.mail.bf1.yahoo.com [98.139.212.187]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 214B91EBC for ; Sat, 16 May 2015 17:31:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1431797495; bh=YdVg3s27CTyT24yGPh6LVWyhRZMxjSa1WfQ7QKieoWc=; h=Date:From:To:Subject:References:In-Reply-To:From:Subject; b=ZS6O3sH03K+rsFBGuiYz5ERyGcAKPnfsIfz1Nxztjfqwa8dpEJwRX+HJztv9P2R0ZVE7VCrs0c3zVVBN/yyMp9oR+bCcw3aIJL7PYn+Yru7oAfmFosj514C+1mRTMFV6bBRl+G1p/Suck5uE3x/ww7vnsAMPyWFlINapy4kISvCojXI8nVZK/qlgPJi89STPqsnF4vORDzUaV7pFp1OnnWt5ghAaC2eF82IkhTf1w+zyRhQARUAfz59x2lsOnwADILUg+ZfqWKHGc3lv1l4Iw5gKS13oHC81pViVxves19YrF6IkUufU8XwZuDIJEYmW+w6ewGCT3zNIW70CZcsvQw== Received: from [98.139.170.181] by nm28.bullet.mail.bf1.yahoo.com with NNFMP; 16 May 2015 17:31:35 -0000 Received: from [98.139.213.9] by tm24.bullet.mail.bf1.yahoo.com with NNFMP; 16 May 2015 17:31:35 -0000 Received: from [127.0.0.1] by smtp109.mail.bf1.yahoo.com with NNFMP; 16 May 2015 17:31:35 -0000 X-Yahoo-Newman-Id: 138886.14803.bm@smtp109.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: HDUk0IAVM1mWqFwH17nuX4BT64erRrCFyoFepu1CV2bxof1 kKZIt7qnOiQxqIHWt1Df5zpwqo5fXOxqQqsPNaaiVfWtO.BKx2QFjeOozFg6 blpnsj3yE65eV2PpNhoHF0X9M8naZUYJgTm3QKu8pSmg0rERXyrVY0KEcjSa _iEnWi6IZEtu5vj79Rr8DKOTniMs.YdVKOubuKjJkYABVrVnhuPtnPN_6X0. vtLMeguzxLfoQlrhl4_dP8zChFv_RvuSo.8NGJeOo6iyUJSC0L5qw5J78Yki B8mQAM9oOxgIsL9uArQFZQMhwLZrasWQV2BWcyboLoF4TgHpXogzBr3SuKaJ a3TWf5E2xEr1I.aeNyzLfNIYFiv0phRbDLBjMxE27ixyxhK_pk.wt7zaYRTC FHtfCS2gOddQsdU9A1cMTSxCFnC.cknbuoOKgHqj3DICZTOfh8WTvIBKR3RU wfhg32rNMRmjxthzP2pJEA0CVjAxMq4i9Dh_6xQJZeIS.lTs4dCAzHG6.hNC F6xjd_pM4Ir61UPRox0R0xKMA2043reU- X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Message-ID: <55577F01.7030101@FreeBSD.org> Date: Sat, 16 May 2015 12:31:45 -0500 From: Pedro Giffuni User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Bryan Drewery , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: kasan (was Re: svn commit: r282948 - head/lib/libthr/thread) References: <201505150840.t4F8eHhM000804@svn.freebsd.org> <555772FA.2080408@FreeBSD.org> In-Reply-To: <555772FA.2080408@FreeBSD.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 16 May 2015 17:31:43 -0000 FWIW, and somewhat off-topic ... On 05/16/15 11:40, Bryan Drewery wrote: > ... > Modified: > head/lib/libthr/thread/thr_spec.c > > Thank you for this! > > I have a lot of patches at Isilon for adding a libc cleanup function to > free all caching, for use in memory leak detectors such as valgrind. I > even fixed valgrind to utilize it. Valgrind is good but it would be nicer to have the Kernel AddressSANitizer: https://github.com/google/kasan/wiki Cheers, Pedro. From owner-svn-src-all@FreeBSD.ORG Sat May 16 19:01:39 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F2900238 for ; Sat, 16 May 2015 19:01:39 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B867F17AE for ; Sat, 16 May 2015 19:01:39 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.9/8.14.9) with ESMTP id t4GJ1dU2004942 for ; Sat, 16 May 2015 19:01:39 GMT (envelope-from bdrewery@freefall.freebsd.org) Received: (from bdrewery@localhost) by freefall.freebsd.org (8.14.9/8.14.9/Submit) id t4GJ1dDv004932 for svn-src-all@freebsd.org; Sat, 16 May 2015 19:01:39 GMT (envelope-from bdrewery) Received: (qmail 83577 invoked from network); 16 May 2015 14:01:37 -0500 Received: from unknown (HELO ?10.10.1.139?) (freebsd@shatow.net@10.10.1.139) by sweb.xzibition.com with ESMTPA; 16 May 2015 14:01:37 -0500 Message-ID: <55579417.4020508@FreeBSD.org> Date: Sat, 16 May 2015 14:01:43 -0500 From: Bryan Drewery Organization: FreeBSD User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Pedro Giffuni , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: kasan (was Re: svn commit: r282948 - head/lib/libthr/thread) References: <201505150840.t4F8eHhM000804@svn.freebsd.org> <555772FA.2080408@FreeBSD.org> <55577F01.7030101@FreeBSD.org> In-Reply-To: <55577F01.7030101@FreeBSD.org> OpenPGP: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="jULkp0NVOwvSQeCLF2jfD35oE4hWbSTiA" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 16 May 2015 19:01:40 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --jULkp0NVOwvSQeCLF2jfD35oE4hWbSTiA Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 5/16/2015 12:31 PM, Pedro Giffuni wrote: > FWIW, and somewhat off-topic ... >=20 > On 05/16/15 11:40, Bryan Drewery wrote: >> ... >> Modified: >> head/lib/libthr/thread/thr_spec.c >> >> Thank you for this! >> >> I have a lot of patches at Isilon for adding a libc cleanup function t= o >> free all caching, for use in memory leak detectors such as valgrind. I= >> even fixed valgrind to utilize it. >=20 > Valgrind is good but it would be nicer to have the > Kernel AddressSANitizer: >=20 > https://github.com/google/kasan/wiki >=20 Doesn't memguard(9) basically do this? I don't like that memguard is so limited in its scope but it seems to be for this. --=20 Regards, Bryan Drewery --jULkp0NVOwvSQeCLF2jfD35oE4hWbSTiA Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJVV5QXAAoJEDXXcbtuRpfPhiEH/iyua1UEgElfP91PV/Onvwha fGMm/lkSjgWlU9ej64Xwapgy++VeBRWreqn2xdVXqyi2UXk0po893v3YHE+SP1pD 4cJ+v70IyhnI3cuqLIJpGmkD5BFz9dRv3PJh3L/9IzEF7urW3VmlhQqWH27q1BbG 4hn/OV7Gdt/ZhIjxshbZnDgA1UvFVzyWugDfh32sC2fZYKmUFE9VvVUON5reO3Xu x/30L/k+rTXzHAgVVa9PZKLrsDyjJyfPZd1GjqYWs3uBOhcdkowM2A2OBrowrWBz BNI3tn90HPMvxu7lITi3SeHBEcx2L8jj7OPosYEBUu4wKuYtn1Cn1p65G3Ph23A= =wtDu -----END PGP SIGNATURE----- --jULkp0NVOwvSQeCLF2jfD35oE4hWbSTiA-- From owner-svn-src-all@FreeBSD.ORG Sat May 16 19:32:43 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AE20C890 for ; Sat, 16 May 2015 19:32:43 +0000 (UTC) Received: from nm37-vm2.bullet.mail.bf1.yahoo.com (nm37-vm2.bullet.mail.bf1.yahoo.com [72.30.238.202]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6B75D1AED for ; Sat, 16 May 2015 19:32:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1431804421; bh=rLHkbokncw5WhJ9SDwDEZqhOX0LH7l2W09hct9/QHlM=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject; b=aXgP85tRR2cZSUBnhsQFtorn0sAkiOM6P4BkaWtfYg3Om0DbOu90lOAN4ZP+zJA7C9bg5Om1/RE7CUwgMMXirtNlMRTfoQ3CenmxmleftUD4g+QBr+9unZ3i+XuCiZM2ifrwkl7pX0+kOfVXNT84/gL9vZXlzAw0pX17u0etVhLcXGc4dRVqvZceHgCcvMUegs1QrpRYJytJMtYqWzvM5P3+Weq2bAMB9mp0z9JBKGkeTl5wXL4arH6wiHoarYrUE0lN+ULOEX6b8KKXUSuBcSKg5UetaX6JpO2Bn3l4g7+eW/soKusXGmqeapwPVHCeDcICFlGfGJaVqdd/dbqIvA== Received: from [98.139.170.182] by nm37.bullet.mail.bf1.yahoo.com with NNFMP; 16 May 2015 19:27:01 -0000 Received: from [98.139.213.11] by tm25.bullet.mail.bf1.yahoo.com with NNFMP; 16 May 2015 19:27:01 -0000 Received: from [127.0.0.1] by smtp111.mail.bf1.yahoo.com with NNFMP; 16 May 2015 19:27:01 -0000 X-Yahoo-Newman-Id: 58276.9841.bm@smtp111.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: mmbIYoAVM1lVUGcj53UXZ0rrp7uia48yUvIKetvnffm6Hl_ WqyYfiIFpvZhX.4SgWm4dYCavKAen9RBSpZTHdORxaM3tON1KKgGbb2PR_Lc g5Bf.Z1I_hQCs5xRkE03glA27QHavxIa2OCRj6XAc2dlGl_X7jkdSBtFLXYv Nh3hvhBAlvmJURNUxs.wPEwZHd48njQIEiv7h6mIjGBKl5EGFfaxqGzMq_Hh xyXCuiZwA6g5dUaUc.HJSWyKrdL901wlByMZxEPntZLtty7UkvtpotI4a9Ap zHdy2rveBJjmO.BwTh3iyaX_bZhY_bsg7zKUhUnawPIesJULBegVcv3CRtjc uoMi.K_zYr0qF1ZIAT4D6GCrqDmMtb977gTG7A4CKfOjYAZe6kGLAup.ZwCx beAjeHs07fJJnHQXIWayKgbnDXfM.E3w.i6sYXadMupL2HqTQgs5hu4HQGw9 yo1CHcK9J5fMYwvn4lc5pYqiWLsvIm98HWlh_NUOka9wDXyImKFd_Ab_ERZE jKH_6_TdIsOSgrt0iqRyrYM_kgaScSh0- X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) Subject: Re: kasan (was Re: svn commit: r282948 - head/lib/libthr/thread) From: Pedro Giffuni In-Reply-To: <55579417.4020508@FreeBSD.org> Date: Sat, 16 May 2015 14:26:52 -0500 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: References: <201505150840.t4F8eHhM000804@svn.freebsd.org> <555772FA.2080408@FreeBSD.org> <55577F01.7030101@FreeBSD.org> <55579417.4020508@FreeBSD.org> To: Bryan Drewery X-Mailer: Apple Mail (2.2098) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 16 May 2015 19:32:43 -0000 > Il giorno 16/mag/2015, alle ore 14:01, Bryan Drewery = ha scritto: >=20 > On 5/16/2015 12:31 PM, Pedro Giffuni wrote: >> FWIW, and somewhat off-topic ... >>=20 >> On 05/16/15 11:40, Bryan Drewery wrote: >>> ... >>> Modified: >>> head/lib/libthr/thread/thr_spec.c >>>=20 >>> Thank you for this! >>>=20 >>> I have a lot of patches at Isilon for adding a libc cleanup function = to >>> free all caching, for use in memory leak detectors such as valgrind. = I >>> even fixed valgrind to utilize it. >>=20 >> Valgrind is good but it would be nicer to have the >> Kernel AddressSANitizer: >>=20 >> https://github.com/google/kasan/wiki >>=20 >=20 > Doesn't memguard(9) basically do this? I don't like that memguard is = so > limited in its scope but it seems to be for this. >=20 >=20 Somewhat, but this one is based on the Google Address Sanitizer (the userland version is already supported in FreeBSD). It is compiler assisted and it compares favorably to Valgrind plus it also has an interesting record already. There are several talks about it in youtube, for example: https://youtu.be/capbD_aRz40 (audio is = poor the first half) https://youtu.be/Q2C2lP8_tNE Pedro. From owner-svn-src-all@FreeBSD.ORG Sat May 16 20:04:50 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E86E814A; Sat, 16 May 2015 20:04:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BB51D1DF8; Sat, 16 May 2015 20:04:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4GK4oZJ070766; Sat, 16 May 2015 20:04:50 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4GK4oMK070764; Sat, 16 May 2015 20:04:50 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201505162004.t4GK4oMK070764@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Sat, 16 May 2015 20:04:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283011 - head/sys/arm/annapurna/alpine 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.20 Precedence: list List-Id: "SVN commit messages 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, 16 May 2015 20:04:51 -0000 Author: bz Date: Sat May 16 20:04:49 2015 New Revision: 283011 URL: https://svnweb.freebsd.org/changeset/base/283011 Log: More tr -d '\r' t make config happy and some re-alignment whitespace changes. Modified: head/sys/arm/annapurna/alpine/files.alpine head/sys/arm/annapurna/alpine/std.alpine Modified: head/sys/arm/annapurna/alpine/files.alpine ============================================================================== --- head/sys/arm/annapurna/alpine/files.alpine Sat May 16 15:44:13 2015 (r283010) +++ head/sys/arm/annapurna/alpine/files.alpine Sat May 16 20:04:49 2015 (r283011) @@ -1,16 +1,16 @@ -# $FreeBSD$ - -kern/kern_clocksource.c standard - -arm/arm/bus_space_base.c standard -arm/arm/bus_space_generic.c standard -arm/arm/bus_space_asm_generic.S standard - -arm/versatile/sp804.c standard -arm/versatile/versatile_timer.c standard -dev/uart/uart_dev_ns8250.c optional uart -dev/ofw/ofw_cpu.c standard - -arm/annapurna/alpine/common.c standard -arm/annapurna/alpine/alpine_machdep.c standard -arm/annapurna/alpine/alpine_machdep_mp.c optional smp +# $FreeBSD$ + +kern/kern_clocksource.c standard + +arm/arm/bus_space_base.c standard +arm/arm/bus_space_generic.c standard +arm/arm/bus_space_asm_generic.S standard + +arm/versatile/sp804.c standard +arm/versatile/versatile_timer.c standard +dev/uart/uart_dev_ns8250.c optional uart +dev/ofw/ofw_cpu.c standard + +arm/annapurna/alpine/common.c standard +arm/annapurna/alpine/alpine_machdep.c standard +arm/annapurna/alpine/alpine_machdep_mp.c optional smp Modified: head/sys/arm/annapurna/alpine/std.alpine ============================================================================== --- head/sys/arm/annapurna/alpine/std.alpine Sat May 16 15:44:13 2015 (r283010) +++ head/sys/arm/annapurna/alpine/std.alpine Sat May 16 20:04:49 2015 (r283011) @@ -1,23 +1,23 @@ -# $FreeBSD$ - -makeoption ARM_LITTLE_ENDIAN - -cpu CPU_CORTEXA -machine arm armv6 -makeoptions CONF_CFLAGS="-march=armv7a -DAL_HAVE_TYPES" - -makeoptions KERNPHYSADDR=0x00200000 -options KERNPHYSADDR=0x00200000 - -makeoptions KERNVIRTADDR=0xa0200000 -options KERNVIRTADDR=0xa0200000 - -makeoptions KERNBASE=0xa0000000 -options KERNBASE=0xa0000000 - -options ARM_L2_PIPT - -options IPI_IRQ_START=0 -options IPI_IRQ_END=15 - -files "../annapurna/alpine/files.alpine" +# $FreeBSD$ + +makeoption ARM_LITTLE_ENDIAN + +cpu CPU_CORTEXA +machine arm armv6 +makeoptions CONF_CFLAGS="-march=armv7a -DAL_HAVE_TYPES" + +makeoptions KERNPHYSADDR=0x00200000 +options KERNPHYSADDR=0x00200000 + +makeoptions KERNVIRTADDR=0xa0200000 +options KERNVIRTADDR=0xa0200000 + +makeoptions KERNBASE=0xa0000000 +options KERNBASE=0xa0000000 + +options ARM_L2_PIPT + +options IPI_IRQ_START=0 +options IPI_IRQ_END=15 + +files "../annapurna/alpine/files.alpine" From owner-svn-src-all@FreeBSD.ORG Sat May 16 20:06:37 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 95F2E300 for ; Sat, 16 May 2015 20:06:37 +0000 (UTC) Received: from mail-ig0-f176.google.com (mail-ig0-f176.google.com [209.85.213.176]) (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 67E4D1E10 for ; Sat, 16 May 2015 20:06:37 +0000 (UTC) Received: by igbpi8 with SMTP id pi8so61075789igb.0 for ; Sat, 16 May 2015 13:06:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=uWeKSKDH+uYj1hrNQcC6UKIZLOSmi33oL2jWmsAVJy0=; b=XQ5dI11cNnbcTpKMbWkiWyqNZ10zkY1ZkbVd8XDNiPLSwRN1wf3uI2Hi3m2A+3FOdJ ZxfoJnN1Pn5dK1U0bKW0jfNvuXqhMKJY8j2l8kyMqxC66ac1oAQ07n413abfUd+QvRAx 7OBEb6myumvUWBOJAP1gA+IlO7gf0pPaEtWvIcsHbuWbL/XPz0Cge17VW+eJdmvT92Pt MURBPCkI6Y0MX/uQlErj/depYVSlOjL18ECDBHOFlvMXNzhZ7qcYJgfe/o2DTlvz6TU0 hBwnrL7h0glXUmTYAsqsAd/LCFIze/co2WIsn8S/kA6B4TSNkzUJsS9hLXQ6LHY/4d+P nuIQ== X-Gm-Message-State: ALoCoQnioyCrLJ1ajFFdGVXnX/hltyMehplKXaU2sC/BXp0QQEOUiC5Tyz/VvtFxce1MVtpARsIv MIME-Version: 1.0 X-Received: by 10.107.137.89 with SMTP id l86mr5623285iod.92.1431806796545; Sat, 16 May 2015 13:06:36 -0700 (PDT) Received: by 10.79.11.6 with HTTP; Sat, 16 May 2015 13:06:36 -0700 (PDT) In-Reply-To: References: <201505011832.t41IWGSs002284@svn.freebsd.org> <20150503140634.GA80213@ivaldir.etoilebsd.net> Date: Sat, 16 May 2015 22:06:36 +0200 Message-ID: Subject: Re: svn commit: r282314 - in head: include lib/libc/stdlib From: Oliver Pinter To: Baptiste Daroussin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, fichtner@opnsense.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 16 May 2015 20:06:37 -0000 On 5/3/15, Oliver Pinter wrote: > On 5/3/15, Baptiste Daroussin wrote: >> On Sun, May 03, 2015 at 04:00:15PM +0200, Oliver Pinter wrote: >>> On 5/1/15, Baptiste Daroussin wrote: >>> > Author: bapt >>> > Date: Fri May 1 18:32:16 2015 >>> > New Revision: 282314 >>> > URL: https://svnweb.freebsd.org/changeset/base/282314 >>> > >>> > Log: >>> > Import reallocarray(3) from OpenBSD >>> > >>> > Add a manpage for it, assign the copyright to the OpenBSD project on >>> > it >>> > since it >>> > is mostly copy/paste from OpenBSD manpage. >>> > style(9) fixes >>> > >>> > Differential Revision: https://reviews.freebsd.org/D2420 >>> > Reviewed by: kib >>> > >>> > Added: >>> > head/lib/libc/stdlib/reallocarray.3 (contents, props changed) >>> > head/lib/libc/stdlib/reallocarray.c (contents, props changed) >>> > Modified: >>> > head/include/stdlib.h >>> > head/lib/libc/stdlib/Makefile.inc >>> > head/lib/libc/stdlib/Symbol.map >>> > >>> > Modified: head/include/stdlib.h >>> > ... >>> > +} >>> >>> Hey Bapt! >>> >>> Do you have any plan to MFC these changes to 10-STABLE? >> >> I had no plan to but you are the 5th one to ask me about that :) >> So yes I may MFC that in a couple of weeks. >> > Cool! Thanks! Hi Baptiste! Is the any ongoing efforts to merge this stuff to 10-STABLE? If you have a patch and you need help, then ping me. > >> Best regards, >> Bapt >> > From owner-svn-src-all@FreeBSD.ORG Sat May 16 20:06:40 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2FE3C304; Sat, 16 May 2015 20:06:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1F16B1E12; Sat, 16 May 2015 20:06:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4GK6dcE071086; Sat, 16 May 2015 20:06:39 GMT (envelope-from rpaulo@FreeBSD.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4GK6diA071085; Sat, 16 May 2015 20:06:39 GMT (envelope-from rpaulo@FreeBSD.org) Message-Id: <201505162006.t4GK6diA071085@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rpaulo set sender to rpaulo@FreeBSD.org using -f From: Rui Paulo Date: Sat, 16 May 2015 20:06:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283012 - head/sys/dev/acpi_support 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.20 Precedence: list List-Id: "SVN commit messages 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, 16 May 2015 20:06:40 -0000 Author: rpaulo Date: Sat May 16 20:06:39 2015 New Revision: 283012 URL: https://svnweb.freebsd.org/changeset/base/283012 Log: acpi_ibm: whitespace. Modified: head/sys/dev/acpi_support/acpi_ibm.c Modified: head/sys/dev/acpi_support/acpi_ibm.c ============================================================================== --- head/sys/dev/acpi_support/acpi_ibm.c Sat May 16 20:04:49 2015 (r283011) +++ head/sys/dev/acpi_support/acpi_ibm.c Sat May 16 20:06:39 2015 (r283012) @@ -530,7 +530,7 @@ acpi_ibm_sysctl(SYSCTL_HANDLER_ARGS) int error = 0; int function; int method; - + ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); sc = (struct acpi_ibm_softc *)oidp->oid_arg1; @@ -823,7 +823,7 @@ acpi_ibm_sysctl_init(struct acpi_ibm_sof return (FALSE); case ACPI_IBM_METHOD_FANSPEED: - /* + /* * Some models report the fan speed in levels from 0-7 * Newer models report it contiguously */ @@ -834,7 +834,7 @@ acpi_ibm_sysctl_init(struct acpi_ibm_sof case ACPI_IBM_METHOD_FANLEVEL: case ACPI_IBM_METHOD_FANSTATUS: - /* + /* * Fan status is only supported on those models, * which report fan RPM contiguously, not in levels */ @@ -871,10 +871,10 @@ acpi_ibm_thermal_sysctl(SYSCTL_HANDLER_A for (int i = 0; i < 8; ++i) { temp_cmd[3] = '0' + i; - - /* + + /* * The TMPx methods seem to return +/- 128 or 0 - * when the respecting sensor is not available + * when the respecting sensor is not available */ if (ACPI_FAILURE(acpi_GetInteger(sc->ec_handle, temp_cmd, &temp[i])) || ABS(temp[i]) == 128 || temp[i] == 0) From owner-svn-src-all@FreeBSD.ORG Sat May 16 21:08:33 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D9F0DF76; Sat, 16 May 2015 21:08:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C9AB413BE; Sat, 16 May 2015 21:08:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4GL8XB3002067; Sat, 16 May 2015 21:08:33 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4GL8XjR002066; Sat, 16 May 2015 21:08:33 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201505162108.t4GL8XjR002066@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 16 May 2015 21:08:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283013 - head/sys/boot/arm/uboot 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.20 Precedence: list List-Id: "SVN commit messages 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, 16 May 2015 21:08:34 -0000 Author: ian Date: Sat May 16 21:08:33 2015 New Revision: 283013 URL: https://svnweb.freebsd.org/changeset/base/283013 Log: Re-link ubldr when any of its libraries change. Modified: head/sys/boot/arm/uboot/Makefile Modified: head/sys/boot/arm/uboot/Makefile ============================================================================== --- head/sys/boot/arm/uboot/Makefile Sat May 16 20:06:39 2015 (r283012) +++ head/sys/boot/arm/uboot/Makefile Sat May 16 21:08:33 2015 (r283013) @@ -130,11 +130,11 @@ ldscript.abs: ldscript.pie: echo "UBLDR_LOADADDR = 0;" >${.TARGET} -ubldr: ${OBJS} ldscript.abs ${.CURDIR}/ldscript.${MACHINE_CPUARCH} +ubldr: ${OBJS} ldscript.abs ${.CURDIR}/ldscript.${MACHINE_CPUARCH} ${DPADD} ${CC} ${CFLAGS} -T ldscript.abs ${LDFLAGS} \ -o ${.TARGET} ${OBJS} ${LDADD} -ubldr.pie: ${OBJS} ldscript.pie ${.CURDIR}/ldscript.${MACHINE_CPUARCH} +ubldr.pie: ${OBJS} ldscript.pie ${.CURDIR}/ldscript.${MACHINE_CPUARCH} ${DPADD} ${CC} ${CFLAGS} -T ldscript.pie ${LDFLAGS} -pie -Wl,-Bsymbolic \ -o ${.TARGET} ${OBJS} ${LDADD} From owner-svn-src-all@FreeBSD.ORG Sat May 16 21:24:33 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2C09F349; Sat, 16 May 2015 21:24:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1BADC15EE; Sat, 16 May 2015 21:24:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4GLOWUw011462; Sat, 16 May 2015 21:24:32 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4GLOWml011461; Sat, 16 May 2015 21:24:32 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201505162124.t4GLOWml011461@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 16 May 2015 21:24:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283014 - 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.20 Precedence: list List-Id: "SVN commit messages 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, 16 May 2015 21:24:33 -0000 Author: imp Date: Sat May 16 21:24:32 2015 New Revision: 283014 URL: https://svnweb.freebsd.org/changeset/base/283014 Log: Don't allow unmapped I/O. The pmap isn't quite up to the task. Add a comment to this effect and switch the default. My old AT91SAM9G20 now boots, fsck's the SD card and runs w/o an issue for the first time since a 9.1-ish stable build I did a few years ago. Problems with unmapped I/O: o un-page-aligned I/O requests to devices fail (notably fsck and newfs). o write-back caching was totally broken. write-through caching needed to be enabled. o Even page-aligned I/O requests sometimes failed for reasons not thoroughly investigated. Suggested by: ian@ MFC after: 2 days Modified: head/sys/arm/arm/pmap.c Modified: head/sys/arm/arm/pmap.c ============================================================================== --- head/sys/arm/arm/pmap.c Sat May 16 21:08:33 2015 (r283013) +++ head/sys/arm/arm/pmap.c Sat May 16 21:24:32 2015 (r283014) @@ -4310,7 +4310,13 @@ pmap_copy_page(vm_page_t src, vm_page_t pmap_copy_page_func(VM_PAGE_TO_PHYS(src), VM_PAGE_TO_PHYS(dst)); } -int unmapped_buf_allowed = 1; +/* + * We have code to do unmapped I/O. However, it isn't quite right + * an causes un-page-aligned I/O to devices to fail (most notably + * newfs or fsck). We give up a little performance to do this, but + * we trade that for rock-solid stability so it is a good trade. + */ +int unmapped_buf_allowed = 0; void pmap_copy_pages(vm_page_t ma[], vm_offset_t a_offset, vm_page_t mb[], From owner-svn-src-all@FreeBSD.ORG Sat May 16 22:06:42 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 70769BDE; Sat, 16 May 2015 22:06:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5DDA91A0C; Sat, 16 May 2015 22:06:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4GM6grE031614; Sat, 16 May 2015 22:06:42 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4GM6fLw031597; Sat, 16 May 2015 22:06:41 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201505162206.t4GM6fLw031597@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 16 May 2015 22:06:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283015 - stable/10/contrib/llvm/patches 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.20 Precedence: list List-Id: "SVN commit messages 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, 16 May 2015 22:06:42 -0000 Author: dim Date: Sat May 16 22:06:40 2015 New Revision: 283015 URL: https://svnweb.freebsd.org/changeset/base/283015 Log: Bring the contrib/llvm/patches directory up-to-date. MFC r263892: Add the llvm/clang patch for r263891. MFC r264350: Update the llvm/clang patch for r264345. MFC r266675: Add the clang patch for r266674. MFC r275651: Add llvm patch corresponding to r275633. MFC r275747: Update llvm patches for r274286 and r275633 so all the tests will pass. MFC r275760: Add clang patch corresponding to r275759. MFC r275772: Update clang patch for r275759 to use correct test cases. Additionally: * Remove the clang patch corresponding to r263619, as ARM EABI hard-float support was never MFC'd. * Add clang patch corresponding to r279302. Added: stable/10/contrib/llvm/patches/patch-r264345-dwarf2-freebsd10.diff - copied unchanged from r264350, head/contrib/llvm/patches/patch-r264345-dwarf2-freebsd10.diff stable/10/contrib/llvm/patches/patch-r266674-clang-r209489-fix-xmmintrin.diff - copied unchanged from r266675, head/contrib/llvm/patches/patch-r266674-clang-r209489-fix-xmmintrin.diff stable/10/contrib/llvm/patches/patch-r275633-llvm-r223171-fix-vectorizer.diff - copied, changed from r275651, head/contrib/llvm/patches/patch-r275633-llvm-r223171-fix-vectorizer.diff stable/10/contrib/llvm/patches/patch-r275759-clang-r221170-ppc-vaarg.diff - copied, changed from r275760, head/contrib/llvm/patches/patch-r275759-clang-r221170-ppc-vaarg.diff stable/10/contrib/llvm/patches/patch-r279302-clang-r211785-add-fuse-ld.diff Deleted: stable/10/contrib/llvm/patches/patch-r263619-clang-r201662-arm-gnueabihf.diff Modified: stable/10/contrib/llvm/patches/patch-r274286-llvm-r201784-asm-dollar.diff Directory Properties: stable/10/ (props changed) Copied: stable/10/contrib/llvm/patches/patch-r264345-dwarf2-freebsd10.diff (from r264350, head/contrib/llvm/patches/patch-r264345-dwarf2-freebsd10.diff) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/contrib/llvm/patches/patch-r264345-dwarf2-freebsd10.diff Sat May 16 22:06:40 2015 (r283015, copy of r264350, head/contrib/llvm/patches/patch-r264345-dwarf2-freebsd10.diff) @@ -0,0 +1,20 @@ +This patch makes clang default to DWARF2 debug info format for FreeBSD. + +Introduced here: http://svnweb.freebsd.org/changeset/base/264345 + +Index: tools/clang/lib/Driver/Tools.cpp +=================================================================== +--- tools/clang/lib/Driver/Tools.cpp ++++ tools/clang/lib/Driver/Tools.cpp +@@ -2627,8 +2635,9 @@ void Clang::ConstructJob(Compilation &C, const Job + CmdArgs.push_back("-gdwarf-4"); + else if (!A->getOption().matches(options::OPT_g0) && + !A->getOption().matches(options::OPT_ggdb0)) { +- // Default is dwarf-2 for darwin. +- if (getToolChain().getTriple().isOSDarwin()) ++ // Default is dwarf-2 for darwin and FreeBSD. ++ const llvm::Triple &Triple = getToolChain().getTriple(); ++ if (Triple.isOSDarwin() || Triple.getOS() == llvm::Triple::FreeBSD) + CmdArgs.push_back("-gdwarf-2"); + else + CmdArgs.push_back("-g"); Copied: stable/10/contrib/llvm/patches/patch-r266674-clang-r209489-fix-xmmintrin.diff (from r266675, head/contrib/llvm/patches/patch-r266674-clang-r209489-fix-xmmintrin.diff) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/contrib/llvm/patches/patch-r266674-clang-r209489-fix-xmmintrin.diff Sat May 16 22:06:40 2015 (r283015, copy of r266675, head/contrib/llvm/patches/patch-r266674-clang-r209489-fix-xmmintrin.diff) @@ -0,0 +1,49 @@ +Pull in r209489 from upstream clang trunk (by Akira Hatanaka): + + Fix a bug in xmmintrin.h. + + The last step of _mm_cvtps_pi16 should use _mm_packs_pi32, which is a function + that reads two __m64 values and packs four 32-bit values into four 16-bit + values. + + + +Pull in r209559 from upstream clang trunk (by Akira Hatanaka): + + Recommit r209532 with -ffreestanding. + + This is a test case for r209489. + +Introduced here: http://svnweb.freebsd.org/changeset/base/266674 + +Index: tools/clang/lib/Headers/xmmintrin.h +=================================================================== +--- tools/clang/lib/Headers/xmmintrin.h ++++ tools/clang/lib/Headers/xmmintrin.h +@@ -903,7 +903,7 @@ _mm_cvtps_pi16(__m128 __a) + __a = _mm_movehl_ps(__a, __a); + __c = _mm_cvtps_pi32(__a); + +- return _mm_packs_pi16(__b, __c); ++ return _mm_packs_pi32(__b, __c); + } + + static __inline__ __m64 __attribute__((__always_inline__, __nodebug__)) +Index: tools/clang/test/Headers/xmmintrin.c +=================================================================== +--- tools/clang/test/Headers/xmmintrin.c ++++ tools/clang/test/Headers/xmmintrin.c +@@ -0,0 +1,13 @@ ++// RUN: %clang_cc1 %s -ffreestanding -triple x86_64-apple-macosx10.9.0 -emit-llvm -o - | FileCheck %s ++ ++#include ++ ++// Make sure the last step of _mm_cvtps_pi16 converts <4 x i32> to <4 x i16> by ++// checking that clang emits PACKSSDW instead of PACKSSWB. ++ ++// CHECK: define i64 @test_mm_cvtps_pi16 ++// CHECK: call x86_mmx @llvm.x86.mmx.packssdw ++ ++__m64 test_mm_cvtps_pi16(__m128 a) { ++ return _mm_cvtps_pi16(a); ++} Modified: stable/10/contrib/llvm/patches/patch-r274286-llvm-r201784-asm-dollar.diff ============================================================================== --- stable/10/contrib/llvm/patches/patch-r274286-llvm-r201784-asm-dollar.diff Sat May 16 21:24:32 2015 (r283014) +++ stable/10/contrib/llvm/patches/patch-r274286-llvm-r201784-asm-dollar.diff Sat May 16 22:06:40 2015 (r283015) @@ -1,3 +1,14 @@ +Pull in r200383 from upstream llvm trunk (by David Majnemer): + + MC: Reorganize macro MC test along dialect lines + + This commit seeks to do two things: + - Run the surfeit of tests under the Darwin dialect. This ends up + affecting tests which assumed that spaces could deliminate arguments. + - The GAS dialect tests should limit their surface area to things that + could plausibly work under GAS. For example, Darwin style arguments + have no business being in such a test. + Pull in r201784 from upstream llvm trunk (by Benjamin Kramer): AsmParser: Disable Darwin-style macro argument expansion on non-darwin targets. @@ -53,3 +64,208 @@ Index: test/MC/AsmParser/exprs.s .macro check_expr .if ($0) != ($1) +Index: test/MC/AsmParser/macros.s (deleted) +=================================================================== +Index: test/MC/AsmParser/macros-darwin.s +=================================================================== +--- test/MC/AsmParser/macros-darwin.s ++++ test/MC/AsmParser/macros-darwin.s +@@ -1,9 +1,97 @@ +-// RUN: llvm-mc -triple i386-apple-darwin10 %s | FileCheck %s ++// RUN: not llvm-mc -triple i386-apple-darwin10 %s 2> %t.err | FileCheck %s ++// RUN: FileCheck --check-prefix=CHECK-ERRORS %s < %t.err + +-.macro test1 ++.macro .test0 ++.macrobody0 ++.endmacro ++.macro .test1 ++.test0 ++.endmacro ++ ++.test1 ++// CHECK-ERRORS: :1:1: error: unknown directive ++// CHECK-ERRORS-NEXT: macrobody0 ++// CHECK-ERRORS-NEXT: ^ ++// CHECK-ERRORS: :1:1: note: while in macro instantiation ++// CHECK-ERRORS-NEXT: .test0 ++// CHECK-ERRORS-NEXT: ^ ++// CHECK-ERRORS: 11:1: note: while in macro instantiation ++// CHECK-ERRORS-NEXT: .test1 ++// CHECK-ERRORS-NEXT: ^ ++ ++.macro test2 ++.byte $0 ++.endmacro ++// CHECK: .byte 10 ++test2 10 ++ ++.macro test3 + .globl "$0 $1 $2 $$3 $n" + .endmacro + + // CHECK: .globl "1 23 $3 2" +-test1 1, 2 3 ++test3 1, 2 3 + ++// CHECK: .globl "1 (23) $3 2" ++test3 1, (2 3) ++ ++// CHECK: .globl "12 $3 1" ++test3 1 2 ++ ++.macro test4 ++.globl "$0 -- $1" ++.endmacro ++ ++// CHECK: .globl "(ab)(,)) -- (cd)" ++test4 (a b)(,)),(cd) ++ ++// CHECK: .globl "(ab)(,)) -- (cd)" ++test4 (a b)(,)),(cd) ++ ++.macro test5 _a ++.globl "\_a" ++.endm ++ ++// CHECK: .globl zed1 ++test5 zed1 ++ ++.macro test6 $a ++.globl "\$a" ++.endm ++ ++// CHECK: .globl zed2 ++test6 zed2 ++ ++.macro test7 .a ++.globl "\.a" ++.endm ++ ++// CHECK: .globl zed3 ++test7 zed3 ++ ++.macro test8 _a, _b, _c ++.globl "\_a,\_b,\_c" ++.endmacro ++ ++.macro test9 _a _b _c ++.globl "\_a \_b \_c" ++.endmacro ++ ++// CHECK: .globl "a,b,c" ++test8 a, b, c ++// CHECK: .globl "%1,%2,%3" ++test8 %1, %2, %3 #a comment ++// CHECK: .globl "x-y,z,1" ++test8 x - y, z, 1 ++// CHECK: .globl "1 2 3" ++test9 1, 2,3 ++ ++test8 1,2 3 ++// CHECK-ERRORS: error: macro argument '_c' is missing ++// CHECK-ERRORS-NEXT: test8 1,2 3 ++// CHECK-ERRORS-NEXT: ^ ++ ++test8 1 2, 3 ++// CHECK-ERRORS: error: macro argument '_c' is missing ++// CHECK-ERRORS-NEXT:test8 1 2, 3 ++// CHECK-ERRORS-NEXT: ^ +Index: test/MC/AsmParser/macros-gas.s +=================================================================== +--- test/MC/AsmParser/macros-gas.s ++++ test/MC/AsmParser/macros-gas.s +@@ -0,0 +1,93 @@ ++// RUN: not llvm-mc -triple i386-linux-gnu %s 2> %t.err | FileCheck %s ++// RUN: FileCheck --check-prefix=CHECK-ERRORS %s < %t.err ++ ++.macro .test0 ++.macrobody0 ++.endm ++.macro .test1 ++.test0 ++.endm ++ ++.test1 ++// CHECK-ERRORS: :1:1: error: unknown directive ++// CHECK-ERRORS-NEXT: macrobody0 ++// CHECK-ERRORS-NEXT: ^ ++// CHECK-ERRORS: :1:1: note: while in macro instantiation ++// CHECK-ERRORS-NEXT: .test0 ++// CHECK-ERRORS-NEXT: ^ ++// CHECK-ERRORS: 11:1: note: while in macro instantiation ++// CHECK-ERRORS-NEXT: .test1 ++// CHECK-ERRORS-NEXT: ^ ++ ++.macro test2 _a ++.byte \_a ++.endm ++// CHECK: .byte 10 ++test2 10 ++ ++.macro test3 _a _b _c ++.ascii "\_a \_b \_c \\_c" ++.endm ++ ++// CHECK: .ascii "1 2 3 \003" ++test3 1, 2, 3 ++ ++// FIXME: test3 1, 2 3 should be treated like test 1, 2, 3 ++ ++// FIXME: remove the n argument from the remaining test3 examples ++// CHECK: .ascii "1 (23) n \n" ++test3 1, (2 3), n ++ ++// CHECK: .ascii "1 (23) n \n" ++test3 1 (2 3) n ++ ++// CHECK: .ascii "1 2 n \n" ++test3 1 2 n ++ ++.macro test5 _a ++.globl \_a ++.endm ++ ++// CHECK: .globl zed1 ++test5 zed1 ++ ++.macro test6 $a ++.globl \$a ++.endm ++ ++// CHECK: .globl zed2 ++test6 zed2 ++ ++.macro test7 .a ++.globl \.a ++.endm ++ ++// CHECK: .globl zed3 ++test7 zed3 ++ ++.macro test8 _a, _b, _c ++.ascii "\_a,\_b,\_c" ++.endm ++ ++.macro test9 _a _b _c ++.ascii "\_a \_b \_c" ++.endm ++ ++// CHECK: .ascii "a,b,c" ++test8 a, b, c ++// CHECK: .ascii "%1,%2,%3" ++test8 %1 %2 %3 #a comment ++// CHECK: .ascii "x-y,z,1" ++test8 x - y z 1 ++// CHECK: .ascii "1 2 3" ++test9 1, 2,3 ++ ++test8 1,2 3 ++// CHECK-ERRORS: error: macro argument '_c' is missing ++// CHECK-ERRORS-NEXT: test8 1,2 3 ++// CHECK-ERRORS-NEXT: ^ ++ ++test8 1 2, 3 ++// CHECK-ERRORS: error: expected ' ' for macro argument separator ++// CHECK-ERRORS-NEXT:test8 1 2, 3 ++// CHECK-ERRORS-NEXT: ^ Copied and modified: stable/10/contrib/llvm/patches/patch-r275633-llvm-r223171-fix-vectorizer.diff (from r275651, head/contrib/llvm/patches/patch-r275633-llvm-r223171-fix-vectorizer.diff) ============================================================================== --- head/contrib/llvm/patches/patch-r275633-llvm-r223171-fix-vectorizer.diff Tue Dec 9 20:04:26 2014 (r275651, copy source) +++ stable/10/contrib/llvm/patches/patch-r275633-llvm-r223171-fix-vectorizer.diff Sat May 16 22:06:40 2015 (r283015) @@ -1,3 +1,11 @@ +Pull in r223170 from upstream llvm trunk (by Michael Zolotukhin): + + Apply loop-rotate to several vectorizer tests. + + Such loops shouldn't be vectorized due to the loops form. + After applying loop-rotate (+simplifycfg) the tests again start to check + what they are intended to check. + Pull in r223171 from upstream llvm trunk (by Michael Zolotukhin): PR21302. Vectorize only bottom-tested loops. @@ -16,8 +24,8 @@ Introduced here: http://svnweb.freebsd.o Index: lib/Transforms/Vectorize/LoopVectorize.cpp =================================================================== ---- lib/Transforms/Vectorize/LoopVectorize.cpp (revision 21) -+++ lib/Transforms/Vectorize/LoopVectorize.cpp (revision 22) +--- lib/Transforms/Vectorize/LoopVectorize.cpp ++++ lib/Transforms/Vectorize/LoopVectorize.cpp @@ -2864,6 +2864,14 @@ bool LoopVectorizationLegality::canVectorize() { if (!TheLoop->getExitingBlock()) return false; @@ -35,11 +43,11 @@ Index: lib/Transforms/Vectorize/LoopVect TheLoop->getHeader()->getName() << '\n'); Index: test/Transforms/LoopVectorize/loop-form.ll =================================================================== ---- test/Transforms/LoopVectorize/loop-form.ll (revision 0) -+++ test/Transforms/LoopVectorize/loop-form.ll (revision 22) +--- test/Transforms/LoopVectorize/loop-form.ll ++++ test/Transforms/LoopVectorize/loop-form.ll @@ -0,0 +1,31 @@ +; RUN: opt -S -loop-vectorize < %s | FileCheck %s -+target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" ++target datalayout = "e-i64:64-f80:128-n8:16:32:64-S128" + +; Check that we vectorize only bottom-tested loops. +; This is a reduced testcase from PR21302. @@ -69,3 +77,453 @@ Index: test/Transforms/LoopVectorize/loo +if.end: + ret void +} +Index: test/Transforms/LoopVectorize/runtime-check-address-space.ll +=================================================================== +--- test/Transforms/LoopVectorize/runtime-check-address-space.ll ++++ test/Transforms/LoopVectorize/runtime-check-address-space.ll +@@ -31,25 +31,23 @@ define void @foo(i32 addrspace(1)* %a, i32 addrspa + ; CHECK: ret + + entry: +- br label %for.cond ++ %cmp1 = icmp slt i32 0, %n ++ br i1 %cmp1, label %for.body, label %for.end + +-for.cond: ; preds = %for.body, %entry +- %i.0 = phi i32 [ 0, %entry ], [ %inc, %for.body ] +- %cmp = icmp slt i32 %i.0, %n +- br i1 %cmp, label %for.body, label %for.end +- +-for.body: ; preds = %for.cond +- %idxprom = sext i32 %i.0 to i64 ++for.body: ; preds = %entry, %for.body ++ %i.02 = phi i32 [ %inc, %for.body ], [ 0, %entry ] ++ %idxprom = sext i32 %i.02 to i64 + %arrayidx = getelementptr inbounds i32 addrspace(1)* %b, i64 %idxprom + %0 = load i32 addrspace(1)* %arrayidx, align 4 + %mul = mul nsw i32 %0, 3 +- %idxprom1 = sext i32 %i.0 to i64 ++ %idxprom1 = sext i32 %i.02 to i64 + %arrayidx2 = getelementptr inbounds i32 addrspace(1)* %a, i64 %idxprom1 + store i32 %mul, i32 addrspace(1)* %arrayidx2, align 4 +- %inc = add nsw i32 %i.0, 1 +- br label %for.cond ++ %inc = add nsw i32 %i.02, 1 ++ %cmp = icmp slt i32 %inc, %n ++ br i1 %cmp, label %for.body, label %for.end + +-for.end: ; preds = %for.cond ++for.end: ; preds = %for.body, %entry + ret void + } + +@@ -60,25 +58,23 @@ define void @bar0(i32* %a, i32 addrspace(1)* %b, i + ; CHECK: ret + + entry: +- br label %for.cond ++ %cmp1 = icmp slt i32 0, %n ++ br i1 %cmp1, label %for.body, label %for.end + +-for.cond: ; preds = %for.body, %entry +- %i.0 = phi i32 [ 0, %entry ], [ %inc, %for.body ] +- %cmp = icmp slt i32 %i.0, %n +- br i1 %cmp, label %for.body, label %for.end +- +-for.body: ; preds = %for.cond +- %idxprom = sext i32 %i.0 to i64 ++for.body: ; preds = %entry, %for.body ++ %i.02 = phi i32 [ %inc, %for.body ], [ 0, %entry ] ++ %idxprom = sext i32 %i.02 to i64 + %arrayidx = getelementptr inbounds i32 addrspace(1)* %b, i64 %idxprom + %0 = load i32 addrspace(1)* %arrayidx, align 4 + %mul = mul nsw i32 %0, 3 +- %idxprom1 = sext i32 %i.0 to i64 ++ %idxprom1 = sext i32 %i.02 to i64 + %arrayidx2 = getelementptr inbounds i32* %a, i64 %idxprom1 + store i32 %mul, i32* %arrayidx2, align 4 +- %inc = add nsw i32 %i.0, 1 +- br label %for.cond ++ %inc = add nsw i32 %i.02, 1 ++ %cmp = icmp slt i32 %inc, %n ++ br i1 %cmp, label %for.body, label %for.end + +-for.end: ; preds = %for.cond ++for.end: ; preds = %for.body, %entry + ret void + } + +@@ -89,25 +85,23 @@ define void @bar1(i32 addrspace(1)* %a, i32* %b, i + ; CHECK: ret + + entry: +- br label %for.cond ++ %cmp1 = icmp slt i32 0, %n ++ br i1 %cmp1, label %for.body, label %for.end + +-for.cond: ; preds = %for.body, %entry +- %i.0 = phi i32 [ 0, %entry ], [ %inc, %for.body ] +- %cmp = icmp slt i32 %i.0, %n +- br i1 %cmp, label %for.body, label %for.end +- +-for.body: ; preds = %for.cond +- %idxprom = sext i32 %i.0 to i64 ++for.body: ; preds = %entry, %for.body ++ %i.02 = phi i32 [ %inc, %for.body ], [ 0, %entry ] ++ %idxprom = sext i32 %i.02 to i64 + %arrayidx = getelementptr inbounds i32* %b, i64 %idxprom + %0 = load i32* %arrayidx, align 4 + %mul = mul nsw i32 %0, 3 +- %idxprom1 = sext i32 %i.0 to i64 ++ %idxprom1 = sext i32 %i.02 to i64 + %arrayidx2 = getelementptr inbounds i32 addrspace(1)* %a, i64 %idxprom1 + store i32 %mul, i32 addrspace(1)* %arrayidx2, align 4 +- %inc = add nsw i32 %i.0, 1 +- br label %for.cond ++ %inc = add nsw i32 %i.02, 1 ++ %cmp = icmp slt i32 %inc, %n ++ br i1 %cmp, label %for.body, label %for.end + +-for.end: ; preds = %for.cond ++for.end: ; preds = %for.body, %entry + ret void + } + +@@ -119,25 +113,23 @@ define void @bar2(i32* noalias %a, i32 addrspace(1 + ; CHECK: ret + + entry: +- br label %for.cond ++ %cmp1 = icmp slt i32 0, %n ++ br i1 %cmp1, label %for.body, label %for.end + +-for.cond: ; preds = %for.body, %entry +- %i.0 = phi i32 [ 0, %entry ], [ %inc, %for.body ] +- %cmp = icmp slt i32 %i.0, %n +- br i1 %cmp, label %for.body, label %for.end +- +-for.body: ; preds = %for.cond +- %idxprom = sext i32 %i.0 to i64 ++for.body: ; preds = %entry, %for.body ++ %i.02 = phi i32 [ %inc, %for.body ], [ 0, %entry ] ++ %idxprom = sext i32 %i.02 to i64 + %arrayidx = getelementptr inbounds i32 addrspace(1)* %b, i64 %idxprom + %0 = load i32 addrspace(1)* %arrayidx, align 4 + %mul = mul nsw i32 %0, 3 +- %idxprom1 = sext i32 %i.0 to i64 ++ %idxprom1 = sext i32 %i.02 to i64 + %arrayidx2 = getelementptr inbounds i32* %a, i64 %idxprom1 + store i32 %mul, i32* %arrayidx2, align 4 +- %inc = add nsw i32 %i.0, 1 +- br label %for.cond ++ %inc = add nsw i32 %i.02, 1 ++ %cmp = icmp slt i32 %inc, %n ++ br i1 %cmp, label %for.body, label %for.end + +-for.end: ; preds = %for.cond ++for.end: ; preds = %for.body, %entry + ret void + } + +@@ -149,25 +141,23 @@ define void @arst0(i32* %b, i32 %n) #0 { + ; CHECK: ret + + entry: +- br label %for.cond ++ %cmp1 = icmp slt i32 0, %n ++ br i1 %cmp1, label %for.body, label %for.end + +-for.cond: ; preds = %for.body, %entry +- %i.0 = phi i32 [ 0, %entry ], [ %inc, %for.body ] +- %cmp = icmp slt i32 %i.0, %n +- br i1 %cmp, label %for.body, label %for.end +- +-for.body: ; preds = %for.cond +- %idxprom = sext i32 %i.0 to i64 ++for.body: ; preds = %entry, %for.body ++ %i.02 = phi i32 [ %inc, %for.body ], [ 0, %entry ] ++ %idxprom = sext i32 %i.02 to i64 + %arrayidx = getelementptr inbounds i32* %b, i64 %idxprom + %0 = load i32* %arrayidx, align 4 + %mul = mul nsw i32 %0, 3 +- %idxprom1 = sext i32 %i.0 to i64 ++ %idxprom1 = sext i32 %i.02 to i64 + %arrayidx2 = getelementptr inbounds [1024 x i32] addrspace(1)* @g_as1, i64 0, i64 %idxprom1 + store i32 %mul, i32 addrspace(1)* %arrayidx2, align 4 +- %inc = add nsw i32 %i.0, 1 +- br label %for.cond ++ %inc = add nsw i32 %i.02, 1 ++ %cmp = icmp slt i32 %inc, %n ++ br i1 %cmp, label %for.body, label %for.end + +-for.end: ; preds = %for.cond ++for.end: ; preds = %for.body, %entry + ret void + } + +@@ -180,25 +170,23 @@ define void @arst1(i32* %b, i32 %n) #0 { + ; CHECK: ret + + entry: +- br label %for.cond ++ %cmp1 = icmp slt i32 0, %n ++ br i1 %cmp1, label %for.body, label %for.end + +-for.cond: ; preds = %for.body, %entry +- %i.0 = phi i32 [ 0, %entry ], [ %inc, %for.body ] +- %cmp = icmp slt i32 %i.0, %n +- br i1 %cmp, label %for.body, label %for.end +- +-for.body: ; preds = %for.cond +- %idxprom = sext i32 %i.0 to i64 ++for.body: ; preds = %entry, %for.body ++ %i.02 = phi i32 [ %inc, %for.body ], [ 0, %entry ] ++ %idxprom = sext i32 %i.02 to i64 + %arrayidx = getelementptr inbounds [1024 x i32] addrspace(1)* @g_as1, i64 0, i64 %idxprom + %0 = load i32 addrspace(1)* %arrayidx, align 4 + %mul = mul nsw i32 %0, 3 +- %idxprom1 = sext i32 %i.0 to i64 ++ %idxprom1 = sext i32 %i.02 to i64 + %arrayidx2 = getelementptr inbounds i32* %b, i64 %idxprom1 + store i32 %mul, i32* %arrayidx2, align 4 +- %inc = add nsw i32 %i.0, 1 +- br label %for.cond ++ %inc = add nsw i32 %i.02, 1 ++ %cmp = icmp slt i32 %inc, %n ++ br i1 %cmp, label %for.body, label %for.end + +-for.end: ; preds = %for.cond ++for.end: ; preds = %for.body, %entry + ret void + } + +@@ -210,25 +198,23 @@ define void @aoeu(i32 %n) #0 { + ; CHECK: ret + + entry: +- br label %for.cond ++ %cmp1 = icmp slt i32 0, %n ++ br i1 %cmp1, label %for.body, label %for.end + +-for.cond: ; preds = %for.body, %entry +- %i.0 = phi i32 [ 0, %entry ], [ %inc, %for.body ] +- %cmp = icmp slt i32 %i.0, %n +- br i1 %cmp, label %for.body, label %for.end +- +-for.body: ; preds = %for.cond +- %idxprom = sext i32 %i.0 to i64 ++for.body: ; preds = %entry, %for.body ++ %i.02 = phi i32 [ %inc, %for.body ], [ 0, %entry ] ++ %idxprom = sext i32 %i.02 to i64 + %arrayidx = getelementptr inbounds [1024 x i32] addrspace(2)* @q_as2, i64 0, i64 %idxprom + %0 = load i32 addrspace(2)* %arrayidx, align 4 + %mul = mul nsw i32 %0, 3 +- %idxprom1 = sext i32 %i.0 to i64 ++ %idxprom1 = sext i32 %i.02 to i64 + %arrayidx2 = getelementptr inbounds [1024 x i32] addrspace(1)* @g_as1, i64 0, i64 %idxprom1 + store i32 %mul, i32 addrspace(1)* %arrayidx2, align 4 +- %inc = add nsw i32 %i.0, 1 +- br label %for.cond ++ %inc = add nsw i32 %i.02, 1 ++ %cmp = icmp slt i32 %inc, %n ++ br i1 %cmp, label %for.body, label %for.end + +-for.end: ; preds = %for.cond ++for.end: ; preds = %for.body, %entry + ret void + } + +Index: test/Transforms/LoopVectorize/runtime-check-readonly-address-space.ll +=================================================================== +--- test/Transforms/LoopVectorize/runtime-check-readonly-address-space.ll ++++ test/Transforms/LoopVectorize/runtime-check-readonly-address-space.ll +@@ -8,26 +8,24 @@ define void @add_ints_1_1_1(i32 addrspace(1)* %a, + ; CHECK-LABEL: @add_ints_1_1_1( + ; CHECK: <4 x i32> + ; CHECK: ret ++ + entry: +- br label %for.cond ++ br label %for.body + +-for.cond: ; preds = %for.body, %entry +- %i.0 = phi i64 [ 0, %entry ], [ %inc, %for.body ] +- %cmp = icmp ult i64 %i.0, 200 +- br i1 %cmp, label %for.body, label %for.end +- +-for.body: ; preds = %for.cond +- %arrayidx = getelementptr inbounds i32 addrspace(1)* %b, i64 %i.0 ++for.body: ; preds = %entry, %for.body ++ %i.01 = phi i64 [ 0, %entry ], [ %inc, %for.body ] ++ %arrayidx = getelementptr inbounds i32 addrspace(1)* %b, i64 %i.01 + %0 = load i32 addrspace(1)* %arrayidx, align 4 +- %arrayidx1 = getelementptr inbounds i32 addrspace(1)* %c, i64 %i.0 ++ %arrayidx1 = getelementptr inbounds i32 addrspace(1)* %c, i64 %i.01 + %1 = load i32 addrspace(1)* %arrayidx1, align 4 + %add = add nsw i32 %0, %1 +- %arrayidx2 = getelementptr inbounds i32 addrspace(1)* %a, i64 %i.0 ++ %arrayidx2 = getelementptr inbounds i32 addrspace(1)* %a, i64 %i.01 + store i32 %add, i32 addrspace(1)* %arrayidx2, align 4 +- %inc = add i64 %i.0, 1 +- br label %for.cond ++ %inc = add i64 %i.01, 1 ++ %cmp = icmp ult i64 %inc, 200 ++ br i1 %cmp, label %for.body, label %for.end + +-for.end: ; preds = %for.cond ++for.end: ; preds = %for.body + ret void + } + +@@ -35,26 +33,24 @@ define void @add_ints_as_1_0_0(i32 addrspace(1)* % + ; CHECK-LABEL: @add_ints_as_1_0_0( + ; CHECK-NOT: <4 x i32> + ; CHECK: ret ++ + entry: +- br label %for.cond ++ br label %for.body + +-for.cond: ; preds = %for.body, %entry +- %i.0 = phi i64 [ 0, %entry ], [ %inc, %for.body ] +- %cmp = icmp ult i64 %i.0, 200 +- br i1 %cmp, label %for.body, label %for.end +- +-for.body: ; preds = %for.cond +- %arrayidx = getelementptr inbounds i32* %b, i64 %i.0 ++for.body: ; preds = %entry, %for.body ++ %i.01 = phi i64 [ 0, %entry ], [ %inc, %for.body ] ++ %arrayidx = getelementptr inbounds i32* %b, i64 %i.01 + %0 = load i32* %arrayidx, align 4 +- %arrayidx1 = getelementptr inbounds i32* %c, i64 %i.0 ++ %arrayidx1 = getelementptr inbounds i32* %c, i64 %i.01 + %1 = load i32* %arrayidx1, align 4 + %add = add nsw i32 %0, %1 +- %arrayidx2 = getelementptr inbounds i32 addrspace(1)* %a, i64 %i.0 ++ %arrayidx2 = getelementptr inbounds i32 addrspace(1)* %a, i64 %i.01 + store i32 %add, i32 addrspace(1)* %arrayidx2, align 4 +- %inc = add i64 %i.0, 1 +- br label %for.cond ++ %inc = add i64 %i.01, 1 ++ %cmp = icmp ult i64 %inc, 200 ++ br i1 %cmp, label %for.body, label %for.end + +-for.end: ; preds = %for.cond ++for.end: ; preds = %for.body + ret void + } + +@@ -62,26 +58,24 @@ define void @add_ints_as_0_1_0(i32* %a, i32 addrsp + ; CHECK-LABEL: @add_ints_as_0_1_0( + ; CHECK-NOT: <4 x i32> + ; CHECK: ret ++ + entry: +- br label %for.cond ++ br label %for.body + +-for.cond: ; preds = %for.body, %entry +- %i.0 = phi i64 [ 0, %entry ], [ %inc, %for.body ] +- %cmp = icmp ult i64 %i.0, 200 +- br i1 %cmp, label %for.body, label %for.end +- +-for.body: ; preds = %for.cond +- %arrayidx = getelementptr inbounds i32 addrspace(1)* %b, i64 %i.0 ++for.body: ; preds = %entry, %for.body ++ %i.01 = phi i64 [ 0, %entry ], [ %inc, %for.body ] ++ %arrayidx = getelementptr inbounds i32 addrspace(1)* %b, i64 %i.01 + %0 = load i32 addrspace(1)* %arrayidx, align 4 +- %arrayidx1 = getelementptr inbounds i32* %c, i64 %i.0 ++ %arrayidx1 = getelementptr inbounds i32* %c, i64 %i.01 + %1 = load i32* %arrayidx1, align 4 + %add = add nsw i32 %0, %1 +- %arrayidx2 = getelementptr inbounds i32* %a, i64 %i.0 ++ %arrayidx2 = getelementptr inbounds i32* %a, i64 %i.01 + store i32 %add, i32* %arrayidx2, align 4 +- %inc = add i64 %i.0, 1 +- br label %for.cond ++ %inc = add i64 %i.01, 1 ++ %cmp = icmp ult i64 %inc, 200 ++ br i1 %cmp, label %for.body, label %for.end + +-for.end: ; preds = %for.cond ++for.end: ; preds = %for.body + ret void + } + +@@ -89,26 +83,24 @@ define void @add_ints_as_0_1_1(i32* %a, i32 addrsp + ; CHECK-LABEL: @add_ints_as_0_1_1( + ; CHECK-NOT: <4 x i32> + ; CHECK: ret ++ + entry: +- br label %for.cond ++ br label %for.body + +-for.cond: ; preds = %for.body, %entry +- %i.0 = phi i64 [ 0, %entry ], [ %inc, %for.body ] +- %cmp = icmp ult i64 %i.0, 200 +- br i1 %cmp, label %for.body, label %for.end +- +-for.body: ; preds = %for.cond +- %arrayidx = getelementptr inbounds i32 addrspace(1)* %b, i64 %i.0 ++for.body: ; preds = %entry, %for.body ++ %i.01 = phi i64 [ 0, %entry ], [ %inc, %for.body ] ++ %arrayidx = getelementptr inbounds i32 addrspace(1)* %b, i64 %i.01 + %0 = load i32 addrspace(1)* %arrayidx, align 4 +- %arrayidx1 = getelementptr inbounds i32 addrspace(1)* %c, i64 %i.0 ++ %arrayidx1 = getelementptr inbounds i32 addrspace(1)* %c, i64 %i.01 + %1 = load i32 addrspace(1)* %arrayidx1, align 4 + %add = add nsw i32 %0, %1 +- %arrayidx2 = getelementptr inbounds i32* %a, i64 %i.0 ++ %arrayidx2 = getelementptr inbounds i32* %a, i64 %i.01 + store i32 %add, i32* %arrayidx2, align 4 +- %inc = add i64 %i.0, 1 +- br label %for.cond ++ %inc = add i64 %i.01, 1 ++ %cmp = icmp ult i64 %inc, 200 ++ br i1 %cmp, label %for.body, label %for.end + +-for.end: ; preds = %for.cond ++for.end: ; preds = %for.body + ret void + } + +@@ -116,26 +108,24 @@ define void @add_ints_as_0_1_2(i32* %a, i32 addrsp + ; CHECK-LABEL: @add_ints_as_0_1_2( + ; CHECK-NOT: <4 x i32> + ; CHECK: ret ++ + entry: +- br label %for.cond ++ br label %for.body + +-for.cond: ; preds = %for.body, %entry +- %i.0 = phi i64 [ 0, %entry ], [ %inc, %for.body ] +- %cmp = icmp ult i64 %i.0, 200 +- br i1 %cmp, label %for.body, label %for.end +- +-for.body: ; preds = %for.cond +- %arrayidx = getelementptr inbounds i32 addrspace(1)* %b, i64 %i.0 ++for.body: ; preds = %entry, %for.body ++ %i.01 = phi i64 [ 0, %entry ], [ %inc, %for.body ] ++ %arrayidx = getelementptr inbounds i32 addrspace(1)* %b, i64 %i.01 + %0 = load i32 addrspace(1)* %arrayidx, align 4 +- %arrayidx1 = getelementptr inbounds i32 addrspace(2)* %c, i64 %i.0 ++ %arrayidx1 = getelementptr inbounds i32 addrspace(2)* %c, i64 %i.01 + %1 = load i32 addrspace(2)* %arrayidx1, align 4 + %add = add nsw i32 %0, %1 +- %arrayidx2 = getelementptr inbounds i32* %a, i64 %i.0 ++ %arrayidx2 = getelementptr inbounds i32* %a, i64 %i.01 + store i32 %add, i32* %arrayidx2, align 4 +- %inc = add i64 %i.0, 1 +- br label %for.cond ++ %inc = add i64 %i.01, 1 ++ %cmp = icmp ult i64 %inc, 200 ++ br i1 %cmp, label %for.body, label %for.end + +-for.end: ; preds = %for.cond ++for.end: ; preds = %for.body + ret void + } + Copied and modified: stable/10/contrib/llvm/patches/patch-r275759-clang-r221170-ppc-vaarg.diff (from r275760, head/contrib/llvm/patches/patch-r275759-clang-r221170-ppc-vaarg.diff) ============================================================================== --- head/contrib/llvm/patches/patch-r275759-clang-r221170-ppc-vaarg.diff Sun Dec 14 13:40:42 2014 (r275760, copy source) +++ stable/10/contrib/llvm/patches/patch-r275759-clang-r221170-ppc-vaarg.diff Sat May 16 22:06:40 2015 (r283015) @@ -3,6 +3,18 @@ Pull in r221170 from upstream clang trun Implement vaarg lowering for ppc32. Lowering of scalars and aggregates is supported. Complex numbers are not. +Pull in r221174 from upstream clang trunk (by Roman Divacky): + + Require asserts to unbreak the buildbots. + +Pull in r221284 from upstream clang trunk (by Roman Divacky): + + Rewrite the test to not require asserts. + +Pull in r221285 from upstream clang trunk (by Roman Divacky): + + Since the file has both ppc and ppc64 tests in it rename it. + This adds va_args support for PowerPC (32 bit) to clang. Introduced here: http://svnweb.freebsd.org/changeset/base/275759 @@ -136,106 +148,151 @@ Index: tools/clang/test/CodeGen/ppc64-va =================================================================== --- tools/clang/test/CodeGen/ppc64-varargs-struct.c +++ tools/clang/test/CodeGen/ppc64-varargs-struct.c -@@ -1,5 +1,6 @@ - // REQUIRES: ppc64-registered-target - // RUN: %clang_cc1 -triple powerpc64-unknown-linux-gnu -emit-llvm -o - %s | FileCheck %s +@@ -1,30 +0,0 @@ +-// REQUIRES: ppc64-registered-target +-// RUN: %clang_cc1 -triple powerpc64-unknown-linux-gnu -emit-llvm -o - %s | FileCheck %s +- +-#include +- +-struct x { +- long a; +- double b; +-}; +- +-void testva (int n, ...) +-{ +- va_list ap; +- +- struct x t = va_arg (ap, struct x); +-// CHECK: bitcast i8* %{{[a-z.0-9]*}} to %struct.x* +-// CHECK: bitcast %struct.x* %t to i8* +-// CHECK: bitcast %struct.x* %{{[0-9]+}} to i8* +-// CHECK: call void @llvm.memcpy +- +- int v = va_arg (ap, int); +-// CHECK: ptrtoint i8* %{{[a-z.0-9]*}} to i64 +-// CHECK: add i64 %{{[0-9]+}}, 4 +-// CHECK: inttoptr i64 %{{[0-9]+}} to i8* +-// CHECK: bitcast i8* %{{[0-9]+}} to i32* +- +- __int128_t u = va_arg (ap, __int128_t); +-// CHECK: bitcast i8* %{{[a-z.0-9]+}} to i128* +-// CHECK-NEXT: load i128* %{{[0-9]+}} +-} +Index: tools/clang/test/CodeGen/ppc-varargs-struct.c +=================================================================== +--- tools/clang/test/CodeGen/ppc-varargs-struct.c ++++ tools/clang/test/CodeGen/ppc-varargs-struct.c +@@ -0,0 +1,112 @@ ++// REQUIRES: ppc64-registered-target ++// REQUIRES: asserts ++// RUN: %clang_cc1 -triple powerpc64-unknown-linux-gnu -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -triple powerpc-unknown-linux-gnu -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK-PPC - - #include - -@@ -17,6 +18,46 @@ void testva (int n, ...) - // CHECK: bitcast %struct.x* %t to i8* - // CHECK: bitcast %struct.x* %{{[0-9]+}} to i8* - // CHECK: call void @llvm.memcpy -+// CHECK-PPC: %arraydecay = getelementptr inbounds [1 x %struct.__va_list_tag]* %ap, i32 0, i32 0 -+// CHECK-PPC-NEXT: %gprptr = bitcast %struct.__va_list_tag* %arraydecay to i8* -+// CHECK-PPC-NEXT: %0 = ptrtoint i8* %gprptr to i32 -+// CHECK-PPC-NEXT: %1 = add i32 %0, 1 -+// CHECK-PPC-NEXT: %2 = inttoptr i32 %1 to i8* -+// CHECK-PPC-NEXT: %3 = add i32 %1, 3 -+// CHECK-PPC-NEXT: %4 = inttoptr i32 %3 to i8** -+// CHECK-PPC-NEXT: %5 = add i32 %3, 4 -+// CHECK-PPC-NEXT: %6 = inttoptr i32 %5 to i8** -+// CHECK-PPC-NEXT: %gpr = load i8* %gprptr -+// CHECK-PPC-NEXT: %fpr = load i8* %2 -+// CHECK-PPC-NEXT: %overflow_area = load i8** %4 -+// CHECK-PPC-NEXT: %7 = ptrtoint i8* %overflow_area to i32 -+// CHECK-PPC-NEXT: %regsave_area = load i8** %6 -+// CHECK-PPC-NEXT: %8 = ptrtoint i8* %regsave_area to i32 -+// CHECK-PPC-NEXT: %cond = icmp ult i8 %gpr, 8 -+// CHECK-PPC-NEXT: %9 = mul i8 %gpr, 4 -+// CHECK-PPC-NEXT: %10 = sext i8 %9 to i32 -+// CHECK-PPC-NEXT: %11 = add i32 %8, %10 -+// CHECK-PPC-NEXT: br i1 %cond, label %using_regs, label %using_overflow -+// -+// CHECK-PPC-LABEL:using_regs: ; preds = %entry -+// CHECK-PPC-NEXT: %12 = inttoptr i32 %11 to %struct.x* -+// CHECK-PPC-NEXT: %13 = add i8 %gpr, 1 -+// CHECK-PPC-NEXT: store i8 %13, i8* %gprptr -+// CHECK-PPC-NEXT: br label %cont -+// -+// CHECK-PPC-LABEL:using_overflow: ; preds = %entry -+// CHECK-PPC-NEXT: %14 = inttoptr i32 %7 to %struct.x* -+// CHECK-PPC-NEXT: %15 = add i32 %7, 4 -+// CHECK-PPC-NEXT: %16 = inttoptr i32 %15 to i8* -+// CHECK-PPC-NEXT: store i8* %16, i8** %4 -+// CHECK-PPC-NEXT: br label %cont -+// -+// CHECK-PPC-LABEL:cont: ; preds = %using_overflow, %using_regs -+// CHECK-PPC-NEXT: %vaarg.addr = phi %struct.x* [ %12, %using_regs ], [ %14, %using_overflow ] -+// CHECK-PPC-NEXT: %aggrptr = bitcast %struct.x* %vaarg.addr to i8** -+// CHECK-PPC-NEXT: %aggr = load i8** %aggrptr -+// CHECK-PPC-NEXT: %17 = bitcast %struct.x* %t to i8* -+// CHECK-PPC-NEXT: call void @llvm.memcpy.p0i8.p0i8.i32(i8* %17, i8* %aggr, i32 16, i32 8, i1 false) - - int v = va_arg (ap, int); - // CHECK: ptrtoint i8* %{{[a-z.0-9]*}} to i64 -@@ -23,8 +64,48 @@ void testva (int n, ...) - // CHECK: add i64 %{{[0-9]+}}, 4 - // CHECK: inttoptr i64 %{{[0-9]+}} to i8* - // CHECK: bitcast i8* %{{[0-9]+}} to i32* -+// CHECK-PPC: %arraydecay1 = getelementptr inbounds [1 x %struct.__va_list_tag]* %ap, i32 0, i32 0 -+// CHECK-PPC-NEXT: %gprptr2 = bitcast %struct.__va_list_tag* %arraydecay1 to i8* -+// CHECK-PPC-NEXT: %18 = ptrtoint i8* %gprptr2 to i32 -+// CHECK-PPC-NEXT: %19 = add i32 %18, 1 -+// CHECK-PPC-NEXT: %20 = inttoptr i32 %19 to i8* -+// CHECK-PPC-NEXT: %21 = add i32 %19, 3 -+// CHECK-PPC-NEXT: %22 = inttoptr i32 %21 to i8** -+// CHECK-PPC-NEXT: %23 = add i32 %21, 4 -+// CHECK-PPC-NEXT: %24 = inttoptr i32 %23 to i8** -+// CHECK-PPC-NEXT: %gpr3 = load i8* %gprptr2 -+// CHECK-PPC-NEXT: %fpr4 = load i8* %20 -+// CHECK-PPC-NEXT: %overflow_area5 = load i8** %22 -+// CHECK-PPC-NEXT: %25 = ptrtoint i8* %overflow_area5 to i32 -+// CHECK-PPC-NEXT: %regsave_area6 = load i8** %24 -+// CHECK-PPC-NEXT: %26 = ptrtoint i8* %regsave_area6 to i32 -+// CHECK-PPC-NEXT: %cond7 = icmp ult i8 %gpr3, 8 -+// CHECK-PPC-NEXT: %27 = mul i8 %gpr3, 4 -+// CHECK-PPC-NEXT: %28 = sext i8 %27 to i32 -+// CHECK-PPC-NEXT: %29 = add i32 %26, %28 -+// CHECK-PPC-NEXT: br i1 %cond7, label %using_regs8, label %using_overflow9 -+// -+// CHECK-PPC-LABEL:using_regs8: ; preds = %cont -+// CHECK-PPC-NEXT: %30 = inttoptr i32 %29 to i32* -+// CHECK-PPC-NEXT: %31 = add i8 %gpr3, 1 -+// CHECK-PPC-NEXT: store i8 %31, i8* %gprptr2 -+// CHECK-PPC-NEXT: br label %cont10 -+// -+// CHECK-PPC-LABEL:using_overflow9: ; preds = %cont -+// CHECK-PPC-NEXT: %32 = inttoptr i32 %25 to i32* -+// CHECK-PPC-NEXT: %33 = add i32 %25, 4 -+// CHECK-PPC-NEXT: %34 = inttoptr i32 %33 to i8* -+// CHECK-PPC-NEXT: store i8* %34, i8** %22 -+// CHECK-PPC-NEXT: br label %cont10 -+// -+// CHECK-PPC-LABEL:cont10: ; preds = %using_overflow9, %using_regs8 -+// CHECK-PPC-NEXT: %vaarg.addr11 = phi i32* [ %30, %using_regs8 ], [ %32, %using_overflow9 ] -+// CHECK-PPC-NEXT: %35 = load i32* %vaarg.addr11 -+// CHECK-PPC-NEXT: store i32 %35, i32* %v, align 4 - ++ ++#include ++ ++struct x { ++ long a; ++ double b; ++}; ++ ++void testva (int n, ...) ++{ ++ va_list ap; ++ ++ struct x t = va_arg (ap, struct x); ++// CHECK: bitcast i8* %{{[a-z.0-9]*}} to %struct.x* ++// CHECK: bitcast %struct.x* %t to i8* ++// CHECK: bitcast %struct.x* %{{[0-9]+}} to i8* ++// CHECK: call void @llvm.memcpy ++// CHECK-PPC: [[ARRAYDECAY:%[a-z0-9]+]] = getelementptr inbounds [1 x %struct.__va_list_tag]* %ap, i32 0, i32 0 ++// CHECK-PPC-NEXT: [[GPRPTR:%[a-z0-9]+]] = bitcast %struct.__va_list_tag* [[ARRAYDECAY]] to i8* ++// CHECK-PPC-NEXT: [[ZERO:%[0-9]+]] = ptrtoint i8* [[GPRPTR]] to i32 ++// CHECK-PPC-NEXT: [[ONE:%[0-9]+]] = add i32 [[ZERO]], 1 ++// CHECK-PPC-NEXT: [[TWO:%[0-9]+]] = inttoptr i32 [[ONE]] to i8* ++// CHECK-PPC-NEXT: [[THREE:%[0-9]+]] = add i32 [[ONE]], 3 ++// CHECK-PPC-NEXT: [[FOUR:%[0-9]+]] = inttoptr i32 [[THREE]] to i8** ++// CHECK-PPC-NEXT: [[FIVE:%[0-9]+]] = add i32 [[THREE]], 4 ++// CHECK-PPC-NEXT: [[SIX:%[0-9]+]] = inttoptr i32 [[FIVE]] to i8** ++// CHECK-PPC-NEXT: [[GPR:%[a-z0-9]+]] = load i8* [[GPRPTR]] ++// CHECK-PPC-NEXT: [[FPR:%[a-z0-9]+]] = load i8* [[TWO]] ++// CHECK-PPC-NEXT: [[OVERFLOW_AREA:%[a-z_0-9]+]] = load i8** [[FOUR]] ++// CHECK-PPC-NEXT: [[SEVEN:%[0-9]+]] = ptrtoint i8* [[OVERFLOW_AREA]] to i32 ++// CHECK-PPC-NEXT: [[REGSAVE_AREA:%[a-z_0-9]+]] = load i8** [[SIX]] ++// CHECK-PPC-NEXT: [[EIGHT:%[0-9]+]] = ptrtoint i8* [[REGSAVE_AREA]] to i32 ++// CHECK-PPC-NEXT: [[COND:%[a-z0-9]+]] = icmp ult i8 [[GPR]], 8 ++// CHECK-PPC-NEXT: [[NINE:%[0-9]+]] = mul i8 [[GPR]], 4 ++// CHECK-PPC-NEXT: [[TEN:%[0-9]+]] = sext i8 [[NINE]] to i32 ++// CHECK-PPC-NEXT: [[ELEVEN:%[0-9]+]] = add i32 [[EIGHT]], [[TEN]] ++// CHECK-PPC-NEXT: br i1 [[COND]], label [[USING_REGS:%[a-z_0-9]+]], label [[USING_OVERFLOW:%[a-z_0-9]+]] ++// ++// CHECK-PPC1:[[USING_REGS]] ++// CHECK-PPC: [[TWELVE:%[0-9]+]] = inttoptr i32 [[ELEVEN]] to %struct.x* ++// CHECK-PPC-NEXT: [[THIRTEEN:%[0-9]+]] = add i8 [[GPR]], 1 ++// CHECK-PPC-NEXT: store i8 [[THIRTEEN]], i8* [[GPRPTR]] ++// CHECK-PPC-NEXT: br label [[CONT:%[a-z0-9]+]] ++// *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sat May 16 22:36:20 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 01D0011A; Sat, 16 May 2015 22:36:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E49421CD4; Sat, 16 May 2015 22:36:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4GMaJjT046406; Sat, 16 May 2015 22:36:19 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4GMaJQs046405; Sat, 16 May 2015 22:36:19 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201505162236.t4GMaJQs046405@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 16 May 2015 22:36:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283016 - stable/10/sbin/ifconfig X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages 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, 16 May 2015 22:36:20 -0000 Author: ngie Date: Sat May 16 22:36:19 2015 New Revision: 283016 URL: https://svnweb.freebsd.org/changeset/base/283016 Log: MFC r282747: Use MIN from sys/param.h instead of handrolling the macro Replace sys/types.h with sys/param.h per-style(9) Sponsored by: EMC / Isilon Storage Division Modified: stable/10/sbin/ifconfig/af_inet.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/ifconfig/af_inet.c ============================================================================== --- stable/10/sbin/ifconfig/af_inet.c Sat May 16 22:06:40 2015 (r283015) +++ stable/10/sbin/ifconfig/af_inet.c Sat May 16 22:36:19 2015 (r283016) @@ -32,7 +32,7 @@ static const char rcsid[] = "$FreeBSD$"; #endif /* not lint */ -#include +#include #include #include #include @@ -101,7 +101,6 @@ static struct sockaddr_in *sintab[] = { static void in_getaddr(const char *s, int which) { -#define MIN(a,b) ((a)<(b)?(a):(b)) struct sockaddr_in *sin = sintab[which]; struct hostent *hp; struct netent *np; @@ -142,7 +141,6 @@ in_getaddr(const char *s, int which) sin->sin_addr = inet_makeaddr(np->n_net, INADDR_ANY); else errx(1, "%s: bad value", s); -#undef MIN } static void From owner-svn-src-all@FreeBSD.ORG Sat May 16 22:38:17 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BE648263; Sat, 16 May 2015 22:38:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AD7C41CE8; Sat, 16 May 2015 22:38:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4GMcHlJ046744; Sat, 16 May 2015 22:38:17 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4GMcHgX046743; Sat, 16 May 2015 22:38:17 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201505162238.t4GMcHgX046743@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 16 May 2015 22:38: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: r283017 - stable/9/sbin/ifconfig 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.20 Precedence: list List-Id: "SVN commit messages 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, 16 May 2015 22:38:17 -0000 Author: ngie Date: Sat May 16 22:38:16 2015 New Revision: 283017 URL: https://svnweb.freebsd.org/changeset/base/283017 Log: MFstable/10 r283016: MFC r282747: Use MIN from sys/param.h instead of handrolling the macro Replace sys/types.h with sys/param.h per-style(9) Sponsored by: EMC / Isilon Storage Division Modified: stable/9/sbin/ifconfig/af_inet.c Directory Properties: stable/9/ (props changed) stable/9/sbin/ (props changed) stable/9/sbin/ifconfig/ (props changed) Modified: stable/9/sbin/ifconfig/af_inet.c ============================================================================== --- stable/9/sbin/ifconfig/af_inet.c Sat May 16 22:36:19 2015 (r283016) +++ stable/9/sbin/ifconfig/af_inet.c Sat May 16 22:38:16 2015 (r283017) @@ -32,7 +32,7 @@ static const char rcsid[] = "$FreeBSD$"; #endif /* not lint */ -#include +#include #include #include #include @@ -98,7 +98,6 @@ static struct sockaddr_in *sintab[] = { static void in_getaddr(const char *s, int which) { -#define MIN(a,b) ((a)<(b)?(a):(b)) struct sockaddr_in *sin = sintab[which]; struct hostent *hp; struct netent *np; @@ -139,7 +138,6 @@ in_getaddr(const char *s, int which) sin->sin_addr = inet_makeaddr(np->n_net, INADDR_ANY); else errx(1, "%s: bad value", s); -#undef MIN } static void From owner-svn-src-all@FreeBSD.ORG Sat May 16 22:53:28 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 09617570; Sat, 16 May 2015 22:53:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EC88F1E99; Sat, 16 May 2015 22:53:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4GMrROU056134; Sat, 16 May 2015 22:53:27 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4GMrRVB056129; Sat, 16 May 2015 22:53:27 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201505162253.t4GMrRVB056129@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 16 May 2015 22:53:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283018 - head/tools/regression/p1003_1b 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.20 Precedence: list List-Id: "SVN commit messages 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, 16 May 2015 22:53:28 -0000 Author: ngie Date: Sat May 16 22:53:26 2015 New Revision: 283018 URL: https://svnweb.freebsd.org/changeset/base/283018 Log: Fix more warnings related to missing headers MFC after: 1 week Modified: head/tools/regression/p1003_1b/main.c head/tools/regression/p1003_1b/prutil.c Modified: head/tools/regression/p1003_1b/main.c ============================================================================== --- head/tools/regression/p1003_1b/main.c Sat May 16 22:38:16 2015 (r283017) +++ head/tools/regression/p1003_1b/main.c Sat May 16 22:53:26 2015 (r283018) @@ -1,5 +1,6 @@ /* $FreeBSD$ */ #include +#include int fifo(int argc, char *argv[]); int memlock(int argc, char *argv[]); Modified: head/tools/regression/p1003_1b/prutil.c ============================================================================== --- head/tools/regression/p1003_1b/prutil.c Sat May 16 22:38:16 2015 (r283017) +++ head/tools/regression/p1003_1b/prutil.c Sat May 16 22:53:26 2015 (r283018) @@ -1,10 +1,11 @@ +#include #include -#include #include #include - -#include +#include #include +#include + #include "prutil.h" /* @@ -12,7 +13,7 @@ */ void quit(const char *text) { - err(errno, text); + err(errno, "%s", text); } char *sched_text(int scheduler) From owner-svn-src-all@FreeBSD.ORG Sat May 16 23:00:07 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3DEB8729; Sat, 16 May 2015 23:00:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2A2EB1EC8; Sat, 16 May 2015 23:00:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4GN07UF057765; Sat, 16 May 2015 23:00:07 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4GN04OD057735; Sat, 16 May 2015 23:00:04 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201505162300.t4GN04OD057735@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 16 May 2015 23:00:04 +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: r283019 - in stable/9/contrib/llvm: include/llvm lib/CodeGen/AsmPrinter lib/Target/ARM tools/clang/include/clang/Driver tools/clang/include/clang/Frontend tools/clang/lib/CodeGen tools/... 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.20 Precedence: list List-Id: "SVN commit messages 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, 16 May 2015 23:00:07 -0000 Author: dim Date: Sat May 16 23:00:03 2015 New Revision: 283019 URL: https://svnweb.freebsd.org/changeset/base/283019 Log: Bring clang 3.4.1 in stable/9 in sync with the version in stable/10. MFC r252503 (by andrew): Work around an ARM EABI issue where clang would sometimes incorrectly align the stack in a leaf function that uses TLS. The issue is, when using TLS, the function is no longer a leaf as it calls __aeabi_read_tp. With statically linked programs this is not an issue as it doesn't make use of the stack, however with dynamically linked applications we enter rtld which does use the stack and makes assumptions about it's alignment. This is only a temporary fix until a better patch can be made and submitted upstream. MFC r264826 (by emaste): Merge LLVM r202188: Debug info: Support variadic functions. Variadic functions have an unspecified parameter tag after the last argument. In IR this is represented as an unspecified parameter in the subroutine type. Paired commit with CFE r202185. rdar://problem/13690847 This re-applies r202184 + a bugfix in DwarfDebug's argument handling. This merge includes a change to use the LLVM 3.4 API in lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp: DwarfUnit -> CompileUnit Sponsored by: DARPA, AFRL MFC r264827 (by emaste): Merge Clang r202185: Debug info: Generate debug info for variadic functions. Paired commit with LLVM. rdar://problem/13690847 This merege includes changes to use the Clang 3.4 API (revisions 199686 and 200082) in lib/CodeGen/CGDebugInfo.cpp: getParamType -> getArgType getNumParams -> getNumArgs getReturnType -> getResultType Sponsored by: DARPA, AFRL MFC r265477 (by emaste): Merge -fstandalone-debug from Clang r198655: Implement a new -fstandalone-debug option. rdar://problem/15685848 It controls everything that -flimit-debug-info used to, plus the vtable type optimization. The old -fno-limit-debug-info option is now an alias to -fstandalone-debug and vice versa. Standalone is the default on Darwin until dtrace is updated to work with non-standalone debug info (rdar://problem/15758808). Note: I kept the LimitedDebugInfo name in CodeGenOptions::DebugInfoKind because NoStandaloneDebugInfo sounded even more confusing. MFC r269387 (by andrew): Update the ARMv6 core clang targets to be an arm1176jzf-s. This brings us in line with gcc in base as this makes llvm generate code for the armv6k variant of the instruction set. Modified: stable/9/contrib/llvm/include/llvm/DIBuilder.h stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp stable/9/contrib/llvm/lib/Target/ARM/ARMFrameLowering.h stable/9/contrib/llvm/tools/clang/include/clang/Driver/Options.td stable/9/contrib/llvm/tools/clang/include/clang/Frontend/CodeGenOptions.h stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp stable/9/contrib/llvm/tools/clang/lib/Driver/ToolChain.cpp stable/9/contrib/llvm/tools/clang/lib/Driver/Tools.cpp stable/9/contrib/llvm/tools/clang/lib/Frontend/CompilerInvocation.cpp Directory Properties: stable/9/ (props changed) stable/9/contrib/ (props changed) stable/9/contrib/llvm/ (props changed) stable/9/contrib/llvm/tools/clang/ (props changed) Modified: stable/9/contrib/llvm/include/llvm/DIBuilder.h ============================================================================== --- stable/9/contrib/llvm/include/llvm/DIBuilder.h Sat May 16 22:53:26 2015 (r283018) +++ stable/9/contrib/llvm/include/llvm/DIBuilder.h Sat May 16 23:00:03 2015 (r283019) @@ -439,7 +439,7 @@ namespace llvm { /// through debug info anchors. void retainType(DIType T); - /// createUnspecifiedParameter - Create unspeicified type descriptor + /// createUnspecifiedParameter - Create unspecified type descriptor /// for a subroutine type. DIDescriptor createUnspecifiedParameter(); Modified: stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp ============================================================================== --- stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp Sat May 16 22:53:26 2015 (r283018) +++ stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp Sat May 16 23:00:03 2015 (r283019) @@ -1116,6 +1116,22 @@ void CompileUnit::constructTypeDIE(DIE & addSourceLine(&Buffer, DTy); } +/// constructSubprogramArguments - Construct function argument DIEs. +void CompileUnit::constructSubprogramArguments(DIE &Buffer, DIArray Args) { + for (unsigned i = 1, N = Args.getNumElements(); i < N; ++i) { + DIDescriptor Ty = Args.getElement(i); + if (Ty.isUnspecifiedParameter()) { + assert(i == N-1 && "ellipsis must be the last argument"); + createAndAddDIE(dwarf::DW_TAG_unspecified_parameters, Buffer); + } else { + DIE *Arg = createAndAddDIE(dwarf::DW_TAG_formal_parameter, Buffer); + addType(Arg, DIType(Ty)); + if (DIType(Ty).isArtificial()) + addFlag(Arg, dwarf::DW_AT_artificial); + } + } +} + /// Return true if the type is appropriately scoped to be contained inside /// its own type unit. static bool isTypeUnitScoped(DIType Ty, const DwarfDebug *DD) { @@ -1170,19 +1186,12 @@ void CompileUnit::constructTypeDIE(DIE & addType(&Buffer, RTy); bool isPrototyped = true; - // Add arguments. - for (unsigned i = 1, N = Elements.getNumElements(); i < N; ++i) { - DIDescriptor Ty = Elements.getElement(i); - if (Ty.isUnspecifiedParameter()) { - createAndAddDIE(dwarf::DW_TAG_unspecified_parameters, Buffer); - isPrototyped = false; - } else { - DIE *Arg = createAndAddDIE(dwarf::DW_TAG_formal_parameter, Buffer); - addType(Arg, DIType(Ty)); - if (DIType(Ty).isArtificial()) - addFlag(Arg, dwarf::DW_AT_artificial); - } - } + if (Elements.getNumElements() == 2 && + Elements.getElement(1).isUnspecifiedParameter()) + isPrototyped = false; + + constructSubprogramArguments(Buffer, Elements); + // Add prototype flag if we're dealing with a C language and the // function has been prototyped. uint16_t Language = getLanguage(); @@ -1475,13 +1484,7 @@ DIE *CompileUnit::getOrCreateSubprogramD // Add arguments. Do not add arguments for subprogram definition. They will // be handled while processing variables. - for (unsigned i = 1, N = Args.getNumElements(); i < N; ++i) { - DIE *Arg = createAndAddDIE(dwarf::DW_TAG_formal_parameter, *SPDie); - DIType ATy(Args.getElement(i)); - addType(Arg, ATy); - if (ATy.isArtificial()) - addFlag(Arg, dwarf::DW_AT_artificial); - } + constructSubprogramArguments(*SPDie, Args); } if (SP.isArtificial()) Modified: stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h ============================================================================== --- stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h Sat May 16 22:53:26 2015 (r283018) +++ stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h Sat May 16 23:00:03 2015 (r283019) @@ -342,6 +342,9 @@ public: void emitHeader(const MCSection *ASection, const MCSymbol *ASectionSym); private: + /// constructSubprogramArguments - Construct function argument DIEs. + void constructSubprogramArguments(DIE &Buffer, DIArray Args); + /// constructTypeDIE - Construct basic type die from DIBasicType. void constructTypeDIE(DIE &Buffer, DIBasicType BTy); Modified: stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp ============================================================================== --- stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Sat May 16 22:53:26 2015 (r283018) +++ stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Sat May 16 23:00:03 2015 (r283019) @@ -404,15 +404,21 @@ DIE *DwarfDebug::updateSubprogramScopeDI DIArray Args = SPTy.getTypeArray(); uint16_t SPTag = SPTy.getTag(); if (SPTag == dwarf::DW_TAG_subroutine_type) + // FIXME: Use DwarfUnit::constructSubprogramArguments() here. for (unsigned i = 1, N = Args.getNumElements(); i < N; ++i) { - DIE *Arg = - SPCU->createAndAddDIE(dwarf::DW_TAG_formal_parameter, *SPDie); DIType ATy(Args.getElement(i)); - SPCU->addType(Arg, ATy); - if (ATy.isArtificial()) - SPCU->addFlag(Arg, dwarf::DW_AT_artificial); - if (ATy.isObjectPointer()) - SPCU->addDIEEntry(SPDie, dwarf::DW_AT_object_pointer, Arg); + if (ATy.isUnspecifiedParameter()) { + assert(i == N-1 && "ellipsis must be the last argument"); + SPCU->createAndAddDIE(dwarf::DW_TAG_unspecified_parameters, *SPDie); + } else { + DIE *Arg = + SPCU->createAndAddDIE(dwarf::DW_TAG_formal_parameter, *SPDie); + SPCU->addType(Arg, ATy); + if (ATy.isArtificial()) + SPCU->addFlag(Arg, dwarf::DW_AT_artificial); + if (ATy.isObjectPointer()) + SPCU->addDIEEntry(SPDie, dwarf::DW_AT_object_pointer, Arg); + } } DIE *SPDeclDie = SPDie; SPDie = @@ -579,7 +585,7 @@ DIE *DwarfDebug::createScopeChildrenDIE( DIE *ObjectPointer = NULL; // Collect arguments for current function. - if (LScopes.isCurrentFunctionScope(Scope)) + if (LScopes.isCurrentFunctionScope(Scope)) { for (unsigned i = 0, N = CurrentFnArguments.size(); i < N; ++i) if (DbgVariable *ArgDV = CurrentFnArguments[i]) if (DIE *Arg = @@ -588,6 +594,16 @@ DIE *DwarfDebug::createScopeChildrenDIE( if (ArgDV->isObjectPointer()) ObjectPointer = Arg; } + // Create the unspecified parameter that marks a function as variadic. + DISubprogram SP(Scope->getScopeNode()); + assert(SP.Verify()); + DIArray FnArgs = SP.getType().getTypeArray(); + if (FnArgs.getElement(FnArgs.getNumElements()-1).isUnspecifiedParameter()) { + DIE *Ellipsis = new DIE(dwarf::DW_TAG_unspecified_parameters); + Children.push_back(Ellipsis); + } + } + // Collect lexical scope children first. const SmallVectorImpl &Variables =ScopeVariables.lookup(Scope); for (unsigned i = 0, N = Variables.size(); i < N; ++i) Modified: stable/9/contrib/llvm/lib/Target/ARM/ARMFrameLowering.h ============================================================================== --- stable/9/contrib/llvm/lib/Target/ARM/ARMFrameLowering.h Sat May 16 22:53:26 2015 (r283018) +++ stable/9/contrib/llvm/lib/Target/ARM/ARMFrameLowering.h Sat May 16 23:00:03 2015 (r283019) @@ -27,7 +27,7 @@ protected: public: explicit ARMFrameLowering(const ARMSubtarget &sti) - : TargetFrameLowering(StackGrowsDown, sti.getStackAlignment(), 0, 4), + : TargetFrameLowering(StackGrowsDown, sti.getStackAlignment(), 0, 8), STI(sti) { } Modified: stable/9/contrib/llvm/tools/clang/include/clang/Driver/Options.td ============================================================================== --- stable/9/contrib/llvm/tools/clang/include/clang/Driver/Options.td Sat May 16 22:53:26 2015 (r283018) +++ stable/9/contrib/llvm/tools/clang/include/clang/Driver/Options.td Sat May 16 23:00:03 2015 (r283019) @@ -549,8 +549,6 @@ def finstrument_functions : Flag<["-"], def fkeep_inline_functions : Flag<["-"], "fkeep-inline-functions">, Group; def flat__namespace : Flag<["-"], "flat_namespace">; def flax_vector_conversions : Flag<["-"], "flax-vector-conversions">, Group; -def flimit_debug_info : Flag<["-"], "flimit-debug-info">, Group, Flags<[CC1Option]>, - HelpText<"Limit debug information produced to reduce size of debug binary">; def flimited_precision_EQ : Joined<["-"], "flimited-precision=">, Group; def flto : Flag<["-"], "flto">, Group; def fno_lto : Flag<["-"], "fno-lto">, Group; @@ -645,8 +643,6 @@ def fno_inline : Flag<["-"], "fno-inline def fno_keep_inline_functions : Flag<["-"], "fno-keep-inline-functions">, Group; def fno_lax_vector_conversions : Flag<["-"], "fno-lax-vector-conversions">, Group, HelpText<"Disallow implicit conversions between vectors with a different number of elements or different element types">, Flags<[CC1Option]>; -def fno_limit_debug_info : Flag<["-"], "fno-limit-debug-info">, Group, Flags<[CC1Option]>, - HelpText<"Do not limit debug information produced to reduce size of debug binary">; def fno_merge_all_constants : Flag<["-"], "fno-merge-all-constants">, Group, Flags<[CC1Option]>, HelpText<"Disallow merging of constants">; def fno_modules : Flag <["-"], "fno-modules">, Group, @@ -774,6 +770,12 @@ def fno_signed_char : Flag<["-"], "fno-s def fsplit_stack : Flag<["-"], "fsplit-stack">, Group; def fstack_protector_all : Flag<["-"], "fstack-protector-all">, Group; def fstack_protector : Flag<["-"], "fstack-protector">, Group; +def fstandalone_debug : Flag<["-"], "fstandalone-debug">, Group, Flags<[CC1Option]>, + HelpText<"Emit full debug info for all types used by the program">; +def fno_standalone_debug : Flag<["-"], "fno-standalone-debug">, Group, Flags<[CC1Option]>, + HelpText<"Limit debug information produced to reduce size of debug binary">; +def flimit_debug_info : Flag<["-"], "flimit-debug-info">, Alias; +def fno_limit_debug_info : Flag<["-"], "fno-limit-debug-info">, Alias; def fstrict_aliasing : Flag<["-"], "fstrict-aliasing">, Group; def fstrict_enums : Flag<["-"], "fstrict-enums">, Group, Flags<[CC1Option]>, HelpText<"Enable optimizations based on the strict definition of an enum's " Modified: stable/9/contrib/llvm/tools/clang/include/clang/Frontend/CodeGenOptions.h ============================================================================== --- stable/9/contrib/llvm/tools/clang/include/clang/Frontend/CodeGenOptions.h Sat May 16 22:53:26 2015 (r283018) +++ stable/9/contrib/llvm/tools/clang/include/clang/Frontend/CodeGenOptions.h Sat May 16 23:00:03 2015 (r283019) @@ -50,12 +50,20 @@ public: }; enum DebugInfoKind { - NoDebugInfo, // Don't generate debug info. - DebugLineTablesOnly, // Emit only debug info necessary for generating - // line number tables (-gline-tables-only). - LimitedDebugInfo, // Limit generated debug info to reduce size - // (-flimit-debug-info). - FullDebugInfo // Generate complete debug info. + NoDebugInfo, /// Don't generate debug info. + + DebugLineTablesOnly, /// Emit only debug info necessary for generating + /// line number tables (-gline-tables-only). + + LimitedDebugInfo, /// Limit generated debug info to reduce size + /// (-fno-standalone-debug). This emits + /// forward decls for types that could be + /// replaced with forward decls in the source + /// code. For dynamic C++ classes type info + /// is only emitted int the module that + /// contains the classe's vtable. + + FullDebugInfo /// Generate complete debug info. }; enum TLSModel { Modified: stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp ============================================================================== --- stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp Sat May 16 22:53:26 2015 (r283018) +++ stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp Sat May 16 23:00:03 2015 (r283019) @@ -37,7 +37,7 @@ #include "llvm/IR/Module.h" #include "llvm/Support/Dwarf.h" #include "llvm/Support/FileSystem.h" -#include "llvm/Support/Path.h" +#include "llvm/Support/Path.h" using namespace clang; using namespace clang::CodeGen; @@ -342,9 +342,9 @@ void CGDebugInfo::CreateCompileUnit() { if (const FileEntry *MainFile = SM.getFileEntryForID(SM.getMainFileID())) { MainFileDir = MainFile->getDir()->getName(); if (MainFileDir != ".") { - llvm::SmallString<1024> MainFileDirSS(MainFileDir); - llvm::sys::path::append(MainFileDirSS, MainFileName); - MainFileName = MainFileDirSS.str(); + llvm::SmallString<1024> MainFileDirSS(MainFileDir); + llvm::sys::path::append(MainFileDirSS, MainFileName); + MainFileName = MainFileDirSS.str(); } } @@ -760,6 +760,8 @@ llvm::DIType CGDebugInfo::CreateType(con else if (const FunctionProtoType *FPT = dyn_cast(Ty)) { for (unsigned i = 0, e = FPT->getNumArgs(); i != e; ++i) EltTys.push_back(getOrCreateType(FPT->getArgType(i), Unit)); + if (FPT->isVariadic()) + EltTys.push_back(DBuilder.createUnspecifiedParameter()); } llvm::DIArray EltTypeArray = DBuilder.getOrCreateArray(EltTys); @@ -1454,13 +1456,13 @@ llvm::DIType CGDebugInfo::CreateType(con // declaration. The completeType, completeRequiredType, and completeClassData // callbacks will handle promoting the declaration to a definition. if (T || + // Under -flimit-debug-info: (DebugKind <= CodeGenOptions::LimitedDebugInfo && - // Under -flimit-debug-info, emit only a declaration unless the type is - // required to be complete. - !RD->isCompleteDefinitionRequired() && CGM.getLangOpts().CPlusPlus) || - // If the class is dynamic, only emit a declaration. A definition will be - // emitted whenever the vtable is emitted. - (CXXDecl && CXXDecl->hasDefinition() && CXXDecl->isDynamicClass()) || T) { + // Emit only a forward declaration unless the type is required. + ((!RD->isCompleteDefinitionRequired() && CGM.getLangOpts().CPlusPlus) || + // If the class is dynamic, only emit a declaration. A definition will be + // emitted whenever the vtable is emitted. + (CXXDecl && CXXDecl->hasDefinition() && CXXDecl->isDynamicClass())))) { llvm::DIDescriptor FDContext = getContextDescriptor(cast(RD->getDeclContext())); if (!T) @@ -2421,6 +2423,20 @@ llvm::DICompositeType CGDebugInfo::getOr llvm::DIArray EltTypeArray = DBuilder.getOrCreateArray(Elts); return DBuilder.createSubroutineType(F, EltTypeArray); } + + // Variadic function. + if (const FunctionDecl *FD = dyn_cast(D)) + if (FD->isVariadic()) { + SmallVector EltTys; + EltTys.push_back(getOrCreateType(FD->getResultType(), F)); + if (const FunctionProtoType *FPT = dyn_cast(FnType)) + for (unsigned i = 0, e = FPT->getNumArgs(); i != e; ++i) + EltTys.push_back(getOrCreateType(FPT->getArgType(i), F)); + EltTys.push_back(DBuilder.createUnspecifiedParameter()); + llvm::DIArray EltTypeArray = DBuilder.getOrCreateArray(EltTys); + return DBuilder.createSubroutineType(F, EltTypeArray); + } + return llvm::DICompositeType(getOrCreateType(FnType, F)); } Modified: stable/9/contrib/llvm/tools/clang/lib/Driver/ToolChain.cpp ============================================================================== --- stable/9/contrib/llvm/tools/clang/lib/Driver/ToolChain.cpp Sat May 16 22:53:26 2015 (r283018) +++ stable/9/contrib/llvm/tools/clang/lib/Driver/ToolChain.cpp Sat May 16 23:00:03 2015 (r283019) @@ -208,7 +208,8 @@ static const char *getARMTargetCPU(const MArch = Triple.getArchName(); } - if (Triple.getOS() == llvm::Triple::NetBSD) { + if (Triple.getOS() == llvm::Triple::NetBSD || + Triple.getOS() == llvm::Triple::FreeBSD) { if (MArch == "armv6") return "arm1176jzf-s"; } Modified: stable/9/contrib/llvm/tools/clang/lib/Driver/Tools.cpp ============================================================================== --- stable/9/contrib/llvm/tools/clang/lib/Driver/Tools.cpp Sat May 16 22:53:26 2015 (r283018) +++ stable/9/contrib/llvm/tools/clang/lib/Driver/Tools.cpp Sat May 16 23:00:03 2015 (r283019) @@ -499,7 +499,8 @@ static std::string getARMTargetCPU(const MArch = Triple.getArchName(); } - if (Triple.getOS() == llvm::Triple::NetBSD) { + if (Triple.getOS() == llvm::Triple::NetBSD || + Triple.getOS() == llvm::Triple::FreeBSD) { if (MArch == "armv6") return "arm1176jzf-s"; } @@ -2988,8 +2989,8 @@ void Clang::ConstructJob(Compilation &C, Args.AddLastArg(CmdArgs, options::OPT_femit_all_decls); Args.AddLastArg(CmdArgs, options::OPT_fformat_extensions); Args.AddLastArg(CmdArgs, options::OPT_fheinous_gnu_extensions); - Args.AddLastArg(CmdArgs, options::OPT_flimit_debug_info); - Args.AddLastArg(CmdArgs, options::OPT_fno_limit_debug_info); + Args.AddLastArg(CmdArgs, options::OPT_fstandalone_debug); + Args.AddLastArg(CmdArgs, options::OPT_fno_standalone_debug); Args.AddLastArg(CmdArgs, options::OPT_fno_operator_names); // AltiVec language extensions aren't relevant for assembling. if (!isa(JA) || Modified: stable/9/contrib/llvm/tools/clang/lib/Frontend/CompilerInvocation.cpp ============================================================================== --- stable/9/contrib/llvm/tools/clang/lib/Frontend/CompilerInvocation.cpp Sat May 16 22:53:26 2015 (r283018) +++ stable/9/contrib/llvm/tools/clang/lib/Frontend/CompilerInvocation.cpp Sat May 16 23:00:03 2015 (r283019) @@ -295,7 +295,8 @@ static void ParseCommentArgs(CommentOpti } static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK, - DiagnosticsEngine &Diags) { + DiagnosticsEngine &Diags, + const TargetOptions &TargetOpts) { using namespace options; bool Success = true; @@ -322,10 +323,16 @@ static bool ParseCodeGenArgs(CodeGenOpti Opts.setDebugInfo(CodeGenOptions::DebugLineTablesOnly); } else if (Args.hasArg(OPT_g_Flag) || Args.hasArg(OPT_gdwarf_2) || Args.hasArg(OPT_gdwarf_3) || Args.hasArg(OPT_gdwarf_4)) { - if (Args.hasFlag(OPT_flimit_debug_info, OPT_fno_limit_debug_info, true)) - Opts.setDebugInfo(CodeGenOptions::LimitedDebugInfo); - else + bool Default = false; + // Until dtrace (via CTF) can deal with distributed debug info, + // Darwin defaults to standalone/full debug info. + if (llvm::Triple(TargetOpts.Triple).isOSDarwin()) + Default = true; + + if (Args.hasFlag(OPT_fstandalone_debug, OPT_fno_standalone_debug, Default)) Opts.setDebugInfo(CodeGenOptions::FullDebugInfo); + else + Opts.setDebugInfo(CodeGenOptions::LimitedDebugInfo); } Opts.DebugColumnInfo = Args.hasArg(OPT_dwarf_column_info); Opts.SplitDwarfFile = Args.getLastArgValue(OPT_split_dwarf_file); @@ -1657,8 +1664,9 @@ bool CompilerInvocation::CreateFromArgs( ParseFileSystemArgs(Res.getFileSystemOpts(), *Args); // FIXME: We shouldn't have to pass the DashX option around here InputKind DashX = ParseFrontendArgs(Res.getFrontendOpts(), *Args, Diags); - Success = ParseCodeGenArgs(Res.getCodeGenOpts(), *Args, DashX, Diags) - && Success; + ParseTargetArgs(Res.getTargetOpts(), *Args); + Success = ParseCodeGenArgs(Res.getCodeGenOpts(), *Args, DashX, Diags, + Res.getTargetOpts()) && Success; ParseHeaderSearchArgs(Res.getHeaderSearchOpts(), *Args); if (DashX != IK_AST && DashX != IK_LLVM_IR) { ParseLangArgs(*Res.getLangOpts(), *Args, DashX, Diags); @@ -1673,8 +1681,6 @@ bool CompilerInvocation::CreateFromArgs( ParsePreprocessorArgs(Res.getPreprocessorOpts(), *Args, FileMgr, Diags); ParsePreprocessorOutputArgs(Res.getPreprocessorOutputOpts(), *Args, Res.getFrontendOpts().ProgramAction); - ParseTargetArgs(Res.getTargetOpts(), *Args); - return Success; } From owner-svn-src-all@FreeBSD.ORG Sat May 16 23:18:56 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E78B6953; Sat, 16 May 2015 23:18:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D3A721087; Sat, 16 May 2015 23:18:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4GNIurB067014; Sat, 16 May 2015 23:18:56 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4GNIU2W066843; Sat, 16 May 2015 23:18:30 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201505162318.t4GNIU2W066843@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 16 May 2015 23:18:30 +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: r283020 - stable/9/contrib/llvm/patches 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.20 Precedence: list List-Id: "SVN commit messages 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, 16 May 2015 23:18:57 -0000 Author: dim Date: Sat May 16 23:18:30 2015 New Revision: 283020 URL: https://svnweb.freebsd.org/changeset/base/283020 Log: Bring the contrib/llvm/patches directory up-to-date for stable/9. MFC r263892: Add the llvm/clang patch for r263891. MFC r264350: Update the llvm/clang patch for r264345. MFC r264828: Add patches corresponding to r264826 and r264827 MFC r266630: Add the clang patch for r265477. While here, add a description to the patch for r263619, and unify all the URLs to point to svnweb. MFC r266675: Add the clang patch for r266674. MFC r275651: Add llvm patch corresponding to r275633. MFC r275747: Update llvm patches for r274286 and r275633 so all the tests will pass. MFC r275760: Add clang patch corresponding to r275759. MFC r275772: Update clang patch for r275759 to use correct test cases. MFC r283015: Bring the contrib/llvm/patches directory up-to-date. MFC r263892: Add the llvm/clang patch for r263891. MFC r264350: Update the llvm/clang patch for r264345. MFC r266675: Add the clang patch for r266674. MFC r275651: Add llvm patch corresponding to r275633. MFC r275747: Update llvm patches for r274286 and r275633 so all the tests will pass. MFC r275760: Add clang patch corresponding to r275759. MFC r275772: Update clang patch for r275759 to use correct test cases. Partially merge r283015 from stable/10: Additionally: * Remove the clang patch corresponding to r263619, as ARM EABI hard-float support was never MFC'd. * Add clang patch corresponding to r279302. Added: stable/9/contrib/llvm/patches/patch-r264345-dwarf2-freebsd10.diff - copied unchanged from r264350, head/contrib/llvm/patches/patch-r264345-dwarf2-freebsd10.diff stable/9/contrib/llvm/patches/patch-r264826-llvm-r202188-variadic-fn-debug-info.diff - copied, changed from r264828, head/contrib/llvm/patches/patch-r264826-llvm-r202188-variadic-fn-debug-info.diff stable/9/contrib/llvm/patches/patch-r264827-clang-r202185-variadic-fn-debug-info.diff - copied, changed from r264828, head/contrib/llvm/patches/patch-r264827-clang-r202185-variadic-fn-debug-info.diff stable/9/contrib/llvm/patches/patch-r265477-clang-r198655-standalone-debug.diff - copied unchanged from r266630, head/contrib/llvm/patches/patch-r265477-clang-r198655-standalone-debug.diff stable/9/contrib/llvm/patches/patch-r266674-clang-r209489-fix-xmmintrin.diff - copied unchanged from r266675, head/contrib/llvm/patches/patch-r266674-clang-r209489-fix-xmmintrin.diff stable/9/contrib/llvm/patches/patch-r275633-llvm-r223171-fix-vectorizer.diff - copied, changed from r275651, head/contrib/llvm/patches/patch-r275633-llvm-r223171-fix-vectorizer.diff stable/9/contrib/llvm/patches/patch-r275759-clang-r221170-ppc-vaarg.diff - copied, changed from r275760, head/contrib/llvm/patches/patch-r275759-clang-r221170-ppc-vaarg.diff stable/9/contrib/llvm/patches/patch-r279302-clang-r211785-add-fuse-ld.diff - copied unchanged from r283015, stable/10/contrib/llvm/patches/patch-r279302-clang-r211785-add-fuse-ld.diff Modified: stable/9/contrib/llvm/patches/patch-r208961-clang-version-include.diff stable/9/contrib/llvm/patches/patch-r208987-format-extensions.diff stable/9/contrib/llvm/patches/patch-r209107-clang-vendor-suffix.diff stable/9/contrib/llvm/patches/patch-r213492-amd64-multi-os-dot.diff stable/9/contrib/llvm/patches/patch-r221503-default-target-triple.diff stable/9/contrib/llvm/patches/patch-r243830-arm-disable-clear-cache.diff stable/9/contrib/llvm/patches/patch-r252503-arm-transient-stack-alignment.diff stable/9/contrib/llvm/patches/patch-r257109-add-CC-aliases.diff stable/9/contrib/llvm/patches/patch-r259053-gcc-installation-detector.diff stable/9/contrib/llvm/patches/patch-r259498-add-fxsave.diff stable/9/contrib/llvm/patches/patch-r261680-clang-r200899-fix-security-quantis.diff stable/9/contrib/llvm/patches/patch-r261991-llvm-r195391-fix-dwarf2.diff stable/9/contrib/llvm/patches/patch-r261991-llvm-r198385-fix-dwarf2.diff stable/9/contrib/llvm/patches/patch-r261991-llvm-r198389-fix-dwarf2.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r198028-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r198029-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r198030-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r198145-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r198149-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r198157-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r198280-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r198281-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r198286-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r198480-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r198484-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r198533-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r198565-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r198567-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r198580-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r198591-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r198592-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r198658-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r198681-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r198738-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r198739-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r198740-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r198893-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r198909-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r198910-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r199014-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r199024-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r199028-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r199031-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r199033-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r199061-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r199186-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r199187-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r199775-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r199781-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r199786-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r199940-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r199974-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r199975-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r199977-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r200103-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r200104-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r200112-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r200130-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r200131-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r200141-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r200282-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r200368-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r200373-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r200376-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r200509-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r200617-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r200960-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r200961-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r200962-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r200963-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r200965-sparc.diff stable/9/contrib/llvm/patches/patch-r262262-clang-r198311-sparc.diff stable/9/contrib/llvm/patches/patch-r262262-clang-r198312-sparc.diff stable/9/contrib/llvm/patches/patch-r262262-clang-r198911-sparc.diff stable/9/contrib/llvm/patches/patch-r262262-clang-r198912-sparc.diff stable/9/contrib/llvm/patches/patch-r262262-clang-r198918-sparc.diff stable/9/contrib/llvm/patches/patch-r262262-clang-r198923-sparc.diff stable/9/contrib/llvm/patches/patch-r262262-clang-r199012-sparc.diff stable/9/contrib/llvm/patches/patch-r262262-clang-r199034-sparc.diff stable/9/contrib/llvm/patches/patch-r262262-clang-r199037-sparc.diff stable/9/contrib/llvm/patches/patch-r262262-clang-r199188-sparc.diff stable/9/contrib/llvm/patches/patch-r262262-clang-r199399-sparc.diff stable/9/contrib/llvm/patches/patch-r262262-clang-r200452-sparc.diff stable/9/contrib/llvm/patches/patch-r262264-llvm-r200453-sparc.diff stable/9/contrib/llvm/patches/patch-r262265-llvm-r201718-sparc.diff stable/9/contrib/llvm/patches/patch-r262303-enable-ppc-integrated-as.diff stable/9/contrib/llvm/patches/patch-r262415-llvm-r201994-sparc.diff stable/9/contrib/llvm/patches/patch-r262460-llvm-r202059-sparc.diff stable/9/contrib/llvm/patches/patch-r262535-clang-r202177-sparc.diff stable/9/contrib/llvm/patches/patch-r262536-clang-r202179-sparc.diff stable/9/contrib/llvm/patches/patch-r262582-llvm-r202422-sparc.diff stable/9/contrib/llvm/patches/patch-r262611-llvm-r196874-fix-invalid-pwd-crash.diff stable/9/contrib/llvm/patches/patch-r263048-clang-r203624-fix-CC-aliases.diff stable/9/contrib/llvm/patches/patch-r263312-llvm-r169939-inline-asm-with-realign.diff stable/9/contrib/llvm/patches/patch-r263312-llvm-r196940-update-inline-asm-test.diff stable/9/contrib/llvm/patches/patch-r263312-llvm-r196986-allow-realign-alloca.diff stable/9/contrib/llvm/patches/patch-r263312-llvm-r202930-fix-alloca-esi-clobber.diff stable/9/contrib/llvm/patches/patch-r263313-llvm-r203311-fix-sse1-oom.diff stable/9/contrib/llvm/patches/patch-r274286-llvm-r201784-asm-dollar.diff Directory Properties: stable/9/ (props changed) stable/9/contrib/ (props changed) stable/9/contrib/llvm/ (props changed) Modified: stable/9/contrib/llvm/patches/patch-r208961-clang-version-include.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r208961-clang-version-include.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r208961-clang-version-include.diff Sat May 16 23:18:30 2015 (r283020) @@ -1,7 +1,7 @@ This patch adjusts clang's default include paths to add FreeBSD-specific directories. -Introduced here: http://svn.freebsd.org/changeset/base/208961 +Introduced here: http://svnweb.freebsd.org/changeset/base/208961 Index: tools/clang/lib/Frontend/InitHeaderSearch.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r208987-format-extensions.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r208987-format-extensions.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r208987-format-extensions.diff Sat May 16 23:18:30 2015 (r283020) @@ -1,7 +1,7 @@ This patch adds support for the FreeBSD-specific -fformat-extension option, which enables additional printf modifiers for the kernel. -Introduced here: http://svn.freebsd.org/changeset/base/208987 +Introduced here: http://svnweb.freebsd.org/changeset/base/208987 Index: tools/clang/lib/Frontend/CompilerInvocation.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r209107-clang-vendor-suffix.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r209107-clang-vendor-suffix.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r209107-clang-vendor-suffix.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ This patch adds a FreeBSD-specific suffi usually of the form "(yyyyddmm)", representing the date when the compiler was last updated. -Introduced here: http://svn.freebsd.org/changeset/base/209107 +Introduced here: http://svnweb.freebsd.org/changeset/base/209107 Index: tools/clang/lib/Basic/Version.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r213492-amd64-multi-os-dot.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r213492-amd64-multi-os-dot.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r213492-amd64-multi-os-dot.diff Sat May 16 23:18:30 2015 (r283020) @@ -1,7 +1,7 @@ This patch makes "clang -print-multi-os-directory" print "." on amd64, which is required by certain ports. -Introduced here: http://svn.freebsd.org/changeset/base/213492 +Introduced here: http://svnweb.freebsd.org/changeset/base/213492 Index: tools/clang/lib/Driver/Driver.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r221503-default-target-triple.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r221503-default-target-triple.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r221503-default-target-triple.diff Sat May 16 23:18:30 2015 (r283020) @@ -1,7 +1,7 @@ This patch ensures the target triple that is passed during the compiler build is respected, instead of mangling it. -Introduced here: http://svn.freebsd.org/changeset/base/221503 +Introduced here: http://svnweb.freebsd.org/changeset/base/221503 Index: lib/Support/Unix/Host.inc =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r243830-arm-disable-clear-cache.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r243830-arm-disable-clear-cache.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r243830-arm-disable-clear-cache.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ This patch ensures __clear_cache is not clang, this special builtin was emitted as a function call, leading to link errors. -Introduced here: http://svn.freebsd.org/changeset/base/243830 +Introduced here: http://svnweb.freebsd.org/changeset/base/243830 Index: lib/Support/Unix/Memory.inc =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r252503-arm-transient-stack-alignment.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r252503-arm-transient-stack-alignment.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r252503-arm-transient-stack-alignment.diff Sat May 16 23:18:30 2015 (r283020) @@ -1,7 +1,7 @@ This patch applies a workaround for an ARM EABI issue, where clang would sometimes incorrectly align the stack in a leaf function that uses TLS. -Introduced here: http://svn.freebsd.org/changeset/base/252503 +Introduced here: http://svnweb.freebsd.org/changeset/base/252503 Index: test/CodeGen/Thumb2/large-stack.ll =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r257109-add-CC-aliases.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r257109-add-CC-aliases.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r257109-add-CC-aliases.diff Sat May 16 23:18:30 2015 (r283020) @@ -1,7 +1,7 @@ This patch adds "CC" and "clang-CC" to the list of program name aliases which invoke the C++ compiler. -Introduced here: http://svn.freebsd.org/changeset/base/257109 +Introduced here: http://svnweb.freebsd.org/changeset/base/257109 Index: tools/clang/tools/driver/driver.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r259053-gcc-installation-detector.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r259053-gcc-installation-detector.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r259053-gcc-installation-detector.diff Sat May 16 23:18:30 2015 (r283020) @@ -1,7 +1,7 @@ This patch eliminates the unnecessary search for various gcc installation directories during each startup of clang. -Introduced here: http://svn.freebsd.org/changeset/base/259053 +Introduced here: http://svnweb.freebsd.org/changeset/base/259053 Index: tools/clang/lib/Driver/ToolChains.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r259498-add-fxsave.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r259498-add-fxsave.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r259498-add-fxsave.diff Sat May 16 23:18:30 2015 (r283020) @@ -1,6 +1,6 @@ This patch adds the alias bit_FXSAVE for bit_FXSR to cpuid.h. -Introduced here: http://svn.freebsd.org/changeset/base/259498 +Introduced here: http://svnweb.freebsd.org/changeset/base/259498 Index: tools/clang/lib/Headers/cpuid.h =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r261680-clang-r200899-fix-security-quantis.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r261680-clang-r200899-fix-security-quantis.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r261680-clang-r200899-fix-security-quantis.diff Sat May 16 23:18:30 2015 (r283020) @@ -15,7 +15,7 @@ Pull in r200899 from upstream clang trun Differential Revision: http://llvm-reviews.chandlerc.com/D2688 -Introduced here: http://svn.freebsd.org/changeset/base/261680 +Introduced here: http://svnweb.freebsd.org/changeset/base/261680 Index: tools/clang/test/SemaCXX/c99-variable-length-array.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r261991-llvm-r195391-fix-dwarf2.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r261991-llvm-r195391-fix-dwarf2.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r261991-llvm-r195391-fix-dwarf2.diff Sat May 16 23:18:30 2015 (r283020) @@ -18,7 +18,7 @@ Pull in r195391 from upstream llvm trunk Patch (slightly modified) by Keith Walker! -Introduced here: http://svn.freebsd.org/changeset/base/261991 +Introduced here: http://svnweb.freebsd.org/changeset/base/261991 Index: lib/CodeGen/AsmPrinter/DIE.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r261991-llvm-r198385-fix-dwarf2.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r261991-llvm-r198385-fix-dwarf2.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r261991-llvm-r198385-fix-dwarf2.diff Sat May 16 23:18:30 2015 (r283020) @@ -5,7 +5,7 @@ Pull in r198385 from upstream llvm trunk Apologies for the noise - we're seeing some Go failures with cgo interacting with Clang's debug info due to this change. -Introduced here: http://svn.freebsd.org/changeset/base/261991 +Introduced here: http://svnweb.freebsd.org/changeset/base/261991 Index: lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r261991-llvm-r198389-fix-dwarf2.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r261991-llvm-r198389-fix-dwarf2.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r261991-llvm-r198389-fix-dwarf2.diff Sat May 16 23:18:30 2015 (r283020) @@ -8,7 +8,7 @@ Pull in r198389 from upstream llvm trunk This reverts commit r198385. -Introduced here: http://svn.freebsd.org/changeset/base/261991 +Introduced here: http://svnweb.freebsd.org/changeset/base/261991 Index: lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r198028-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r198028-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r198028-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r198028 from upstream llvm trunk [Sparc] Add MCInstPrinter implementation for SPARC. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: lib/Target/Sparc/InstPrinter/LLVMBuild.txt =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r198029-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r198029-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r198029-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r198029 from upstream llvm trunk [Sparc] Add target specific MCExpr class to handle sparc specific modifiers like %hi, %lo, etc., -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: lib/Target/Sparc/MCTargetDesc/SparcMCExpr.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r198030-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r198030-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r198030-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r198030 from upstream llvm trunk [Sparc] Lower and MachineInstr to MC and print assembly using MCInstPrinter. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: lib/Target/Sparc/MCTargetDesc/SparcTargetStreamer.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r198145-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r198145-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r198145-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -3,7 +3,7 @@ Pull in r198145 from upstream llvm trunk [SparcV9]: Implement lowering of long double (fp128) arguments in Sparc64 ABI. Also, pass fp128 arguments to varargs through integer registers if necessary. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: test/CodeGen/SPARC/64abi.ll =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r198149-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r198149-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r198149-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -3,7 +3,7 @@ Pull in r198149 from upstream llvm trunk [SparcV9] For codegen generated library calls that return float, set inreg flag manually in LowerCall(). This makes the sparc backend to generate Sparc64 ABI compliant code. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: lib/Target/Sparc/SparcISelLowering.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r198157-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r198157-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r198157-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -3,7 +3,7 @@ Pull in r198157 from upstream llvm trunk [SparcV9] Use separate instruction patterns for 64 bit arithmetic instructions instead of reusing 32 bit instruction patterns. This is done to avoid spilling the result of the 64-bit instructions to a 4-byte slot. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: lib/Target/Sparc/SparcAsmPrinter.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r198280-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r198280-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r198280-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r198280 from upstream llvm trunk [SparcV9]: Use SRL instead of SLL to clear top 32-bits in ctpop:i32. SLL does not clear top 32 bit, only SRL does. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: lib/Target/Sparc/SparcInstrInfo.td =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r198281-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r198281-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r198281-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r198281 from upstream llvm trunk [SparcV9]: Custom lower UMULO/SMULO so that the arguments are send to __multi3() in correct order. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: lib/Target/Sparc/SparcISelLowering.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r198286-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r198286-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r198286-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r198286 from upstream llvm trunk [Sparc] Handle atomic loads/stores in sparc backend. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: lib/Target/Sparc/SparcInstrInfo.td =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r198480-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r198480-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r198480-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r198480 from upstream llvm trunk [SparcV9]: Implement RETURNADDR and FRAMEADDR lowering in SPARC64. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: lib/Target/Sparc/SparcISelLowering.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r198484-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r198484-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r198484-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r198484 from upstream llvm trunk [Sparc] Add the initial implementation of an asm parser for sparc/sparcv9. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: lib/Target/Sparc/MCTargetDesc/SparcMCTargetDesc.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r198533-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r198533-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r198533-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r198533 from upstream llvm trunk [Sparc] Add initial implementation of MC Code emitter for sparc. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: lib/Target/Sparc/SparcInstrInfo.td =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r198565-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r198565-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r198565-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r198565 from upstream llvm trunk ELF relocation types for sparc. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: include/llvm/Support/ELF.h =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r198567-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r198567-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r198567-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r198567 from upstream llvm trunk SPARC: Make helper function static. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: lib/Target/Sparc/SparcAsmPrinter.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r198580-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r198580-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r198580-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r198580 from upstream llvm trunk [Sparc] Add ELF Object Writer for Sparc. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: lib/Target/Sparc/MCTargetDesc/SparcMCCodeEmitter.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r198591-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r198591-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r198591-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r198591 from upstream llvm trunk [Sparc] Add initial implementation of disassembler for sparc -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: lib/Target/Sparc/SparcInstrFormats.td =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r198592-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r198592-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r198592-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r198592 from upstream llvm trunk [Sparc] Explicitly cast -1 to unsigned to fix buildbot errors. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: lib/Target/Sparc/Disassembler/SparcDisassembler.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r198658-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r198658-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r198658-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r198658 from upstream llvm trunk [Sparc] Add support for parsing memory operands in sparc AsmParser. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: test/MC/Sparc/sparc-ctrl-instructions.s =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r198681-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r198681-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r198681-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -3,7 +3,7 @@ Pull in r198681 from upstream llvm trunk [Sparc] Add support for parsing sparc asm modifiers such as %hi, %lo etc., Also, correct the offsets for FixupsKindInfo. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: lib/Target/Sparc/MCTargetDesc/SparcAsmBackend.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r198738-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r198738-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r198738-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r198738 from upstream llvm trunk [Sparc] Add support for parsing branch instructions and conditional moves. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: test/MC/Disassembler/Sparc/sparc.txt =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r198739-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r198739-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r198739-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r198739 from upstream llvm trunk [Sparc] Correct the mask for fixup_sparc_br19. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: lib/Target/Sparc/MCTargetDesc/SparcAsmBackend.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r198740-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r198740-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r198740-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r198740 from upstream llvm trunk [SparcV9] Rename operands in some sparc64 instructions so that TableGen can encode them correctly. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: test/MC/Sparc/sparc64-alu-instructions.s =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r198893-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r198893-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r198893-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r198893 from upstream llvm trunk [Sparc] Multiclass for loads/stores. No functionality change intended. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: lib/Target/Sparc/SparcInstr64Bit.td =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r198909-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r198909-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r198909-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r198909 from upstream llvm trunk [Sparc] Add support for parsing jmpl instruction and make indirect call and jmp instructions as aliases to jmpl. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: lib/Target/Sparc/AsmParser/SparcAsmParser.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r198910-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r198910-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r198910-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r198910 from upstream llvm trunk [Sparc] Emit retl/ret instead of jmp instruction. It improves the readability of the assembly generated. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: test/CodeGen/SPARC/ctpop.ll =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r199014-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r199014-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r199014-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r199014 from upstream llvm trunk [Sparc] Bundle instruction with delay slow and its filler. Now, we can use -verify-machineinstrs with SPARC backend. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: lib/Target/Sparc/DelaySlotFiller.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r199024-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r199024-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r199024-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r199024 from upstream llvm trunk [Sparc] Add missing processor types: v7 and niagara -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: lib/Target/Sparc/Sparc.td =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r199028-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r199028-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r199028-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -13,7 +13,7 @@ Pull in r199028 from upstream llvm trunk 'inreg' flag on the return value, so that behavior is unchanged. This also happens when returning a float _Complex. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: test/CodeGen/SPARC/64abi.ll =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r199031-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r199031-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r199031-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r199031 from upstream llvm trunk [Sparc] Replace (unsigned)-1 with ~OU as suggested by Reid Kleckner. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: lib/Target/Sparc/Disassembler/SparcDisassembler.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r199033-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r199033-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r199033-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r199033 from upstream llvm trunk [Sparc] Add support for parsing floating point instructions. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: lib/Target/Sparc/SparcInstrInfo.td =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r199061-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r199061-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r199061-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -8,7 +8,7 @@ Pull in r199061 from upstream llvm trunk Teach isBlockOnlyReachableByFallthrough to find any MBB operands on bundled terminators so SPARC doesn't need to specialize this function. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: test/CodeGen/SPARC/missinglabel.ll =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r199186-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r199186-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r199186-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -11,7 +11,7 @@ Pull in r199186 from upstream llvm trunk The allocation order for DPair begins with the QPR registers, so register allocation is unlikely to change much. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: lib/Target/ARM/ARMISelLowering.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r199187-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r199187-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r199187-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -19,7 +19,7 @@ Pull in r199187 from upstream llvm trunk This fixes a problem where InstrEmitter was picking 32-bit register classes for 64-bit values on SPARC. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: test/CodeGen/SPARC/spillsize.ll =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r199775-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r199775-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r199775-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -3,7 +3,7 @@ Pull in r199775 from upstream llvm trunk [Sparc] Do not add PC to _GLOBAL_OFFSET_TABLE_ address to access GOT in absolute code. Fixes PR#18521 -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: lib/Target/Sparc/SparcAsmPrinter.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r199781-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r199781-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r199781-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r199781 from upstream llvm trunk [Sparc] Add support for inline assembly constraint 'I'. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: test/CodeGen/SPARC/inlineasm.ll =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r199786-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r199786-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r199786-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r199786 from upstream llvm trunk [Sparc] Add support for inline assembly constraints which specify registers by their aliases. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: lib/Target/Sparc/SparcISelLowering.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r199940-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r199940-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r199940-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -4,7 +4,7 @@ Pull in r199940 from upstream llvm trunk code this looks correct, but could use review. The previous was definitely not correct. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: lib/Target/Sparc/AsmParser/SparcAsmParser.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r199974-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r199974-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r199974-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -3,7 +3,7 @@ Pull in r199974 from upstream llvm trunk [Sparc] Correct quad register list in the asm parser. Add test cases to check parsing of v9 double registers and their aliased quad registers. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: test/MC/Disassembler/Sparc/sparc-fp.txt =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r199975-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r199975-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r199975-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -4,7 +4,7 @@ Pull in r199975 from upstream llvm trunk These all use the compare-and-swap CASA/CASXA instructions. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: test/CodeGen/SPARC/atomics.ll =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r199977-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r199977-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r199977-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -3,7 +3,7 @@ Pull in r199977 from upstream llvm trunk [SparcV9] Add support for JIT in Sparc64. With this change, all supported tests in test/ExecutionEngine pass in sparcv9. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: lib/Target/Sparc/SparcJITInfo.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r200103-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r200103-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r200103-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r200103 from upstream llvm trunk Missing ELF relocations for Sparc. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: include/llvm/Support/ELF.h =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r200104-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r200104-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r200104-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r200104 from upstream llvm trunk removing duplicate enum value -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: include/llvm/Support/ELF.h =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r200112-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r200112-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r200112-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r200112 from upstream llvm trunk [Sparc] Add support for sparc relocation types in ELF object file. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: test/MC/Sparc/sparc-relocations.s =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r200130-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r200130-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r200130-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -4,7 +4,7 @@ Pull in r200130 from upstream llvm trunk Found by SingleSource/UnitTests/AtomicOps.c -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: lib/Target/Sparc/SparcISelLowering.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r200131-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r200131-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r200131-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -5,7 +5,7 @@ Pull in r200131 from upstream llvm trunk The popc instruction is defined in the SPARCv9 instruction set architecture, but it was emulated on CPUs older than Niagara 2. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: lib/Target/Sparc/SparcISelLowering.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r200141-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r200141-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r200141-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r200141 from upstream llvm trunk Clean up the Legal/Expand logic for SPARC popc. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: lib/Target/Sparc/SparcSubtarget.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r200282-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r200282-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r200282-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -5,7 +5,7 @@ Pull in r200282 from upstream llvm trunk Also emit the stubs that were generated for references to typeinfo symbols. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: lib/Target/Sparc/SparcAsmPrinter.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r200368-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r200368-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r200368-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull r200368 from upstream llvm trunk (b [SparcV9] Use correct register class (I64RegClass) to hold the address of _GLOBAL_OFFSET_TABLE_ in sparcv9. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: lib/Target/Sparc/SparcInstrInfo.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r200373-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r200373-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r200373-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -6,7 +6,7 @@ Pull in r200373 from upstream llvm trunk combines symbols in different segments". This is because MC computes pc_rel entries with subtract expression between labels from different sections. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: lib/Target/Sparc/SparcTargetObjectFile.h =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r200376-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r200376-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r200376-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -4,7 +4,7 @@ Pull in r200376 from upstream llvm trunk This makes MCAsmInfo::getExprForFDESymbol() a virtual function and overrides it in SparcMCAsmInfo. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: lib/Target/Sparc/MCTargetDesc/SparcMCAsmInfo.h =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r200509-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r200509-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r200509-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r200509 from upstream llvm trunk [Sparc] Save and restore float registers that may be used for parameter passing. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: lib/Target/Sparc/SparcJITInfo.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r200617-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r200617-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r200617-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r200617 from upstream llvm trunk [Sparc] Set %o7 as the return address register instead of %i7 in MCRegisterInfo. Also, add CFI instructions to initialize the frame correctly. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: lib/Target/Sparc/MCTargetDesc/SparcMCTargetDesc.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r200960-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r200960-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r200960-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r200960 from upstream llvm trunk [Sparc] Use SparcMCExpr::VariantKind itself as MachineOperand's target flags. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: lib/Target/Sparc/SparcISelLowering.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r200961-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r200961-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r200961-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r200961 from upstream llvm trunk [Sparc] Emit correct relocations for PIC code when integrated assembler is used. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: test/CodeGen/SPARC/obj-relocs.ll =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r200962-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r200962-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r200962-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r200962 from upstream llvm trunk [Sparc] Emit relocations for Thread Local Storage (TLS) when integrated assembler is used. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: lib/Target/Sparc/MCTargetDesc/SparcAsmBackend.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r200963-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r200963-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r200963-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r200963 from upstream llvm trunk [Sparc] Emit correct encoding for atomic instructions. Also, add support for parsing CAS instructions to test the CAS encoding. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: test/MC/Sparc/sparc-atomic-instructions.s =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r200965-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r200965-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r200965-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r200965 from upstream llvm trunk [Sparc] Add support for parsing synthetic instruction 'mov'. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: lib/Target/Sparc/SparcInstrAliases.td =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262262-clang-r198311-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262262-clang-r198311-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262262-clang-r198311-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -3,7 +3,7 @@ Pull in r198311 from upstream clang trun In the FreeBSD assembler driver, inform the sparc assembler that we're producing PIC code. -Introduced here: http://svn.freebsd.org/changeset/base/262262 +Introduced here: http://svnweb.freebsd.org/changeset/base/262262 Index: tools/clang/lib/Driver/Tools.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262262-clang-r198312-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262262-clang-r198312-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262262-clang-r198312-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r198312 from upstream clang trun Remove a tab that snuck in. -Introduced here: http://svn.freebsd.org/changeset/base/262262 +Introduced here: http://svnweb.freebsd.org/changeset/base/262262 Index: tools/clang/lib/Driver/Tools.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262262-clang-r198911-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262262-clang-r198911-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262262-clang-r198911-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r198911 from upstream clang trun Pass -32/-64 to the assembler when building for sparc/sparc64. -Introduced here: http://svn.freebsd.org/changeset/base/262262 +Introduced here: http://svnweb.freebsd.org/changeset/base/262262 Index: tools/clang/test/Driver/linux-as.c =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262262-clang-r198912-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262262-clang-r198912-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262262-clang-r198912-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r198912 from upstream clang trun Give the linker the right ELF type for SPARC targets. -Introduced here: http://svn.freebsd.org/changeset/base/262262 +Introduced here: http://svnweb.freebsd.org/changeset/base/262262 Index: tools/clang/lib/Driver/Tools.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262262-clang-r198918-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262262-clang-r198918-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262262-clang-r198918-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r198918 from upstream clang trun Locate GCC installations on SPARC systems. -Introduced here: http://svn.freebsd.org/changeset/base/262262 +Introduced here: http://svnweb.freebsd.org/changeset/base/262262 Index: tools/clang/lib/Driver/ToolChains.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262262-clang-r198923-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262262-clang-r198923-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262262-clang-r198923-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r198923 from upstream clang trun Use the right dynamic linker for SPARC Linux executables. -Introduced here: http://svn.freebsd.org/changeset/base/262262 +Introduced here: http://svnweb.freebsd.org/changeset/base/262262 Index: tools/clang/lib/Driver/Tools.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262262-clang-r199012-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262262-clang-r199012-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262262-clang-r199012-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r199012 from upstream clang trun Select the UltraSPARC instruction set when invoking the assembler. -Introduced here: http://svn.freebsd.org/changeset/base/262262 +Introduced here: http://svnweb.freebsd.org/changeset/base/262262 Index: tools/clang/lib/Driver/Tools.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262262-clang-r199034-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262262-clang-r199034-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262262-clang-r199034-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r199034 from upstream clang trun MIPS and SPARC assemblers both take the -KPIC flag. -Introduced here: http://svn.freebsd.org/changeset/base/262262 +Introduced here: http://svnweb.freebsd.org/changeset/base/262262 Index: tools/clang/lib/Driver/Tools.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262262-clang-r199037-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262262-clang-r199037-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262262-clang-r199037-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r199037 from upstream clang trun SPARC passes non-trivial C++ objects indirectly like everybody else. -Introduced here: http://svn.freebsd.org/changeset/base/262262 +Introduced here: http://svnweb.freebsd.org/changeset/base/262262 Index: tools/clang/lib/CodeGen/TargetInfo.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262262-clang-r199188-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262262-clang-r199188-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262262-clang-r199188-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -5,7 +5,7 @@ Pull in r199188 from upstream clang trun Pad these structs up so they are sret-returned even on that architecture. -Introduced here: http://svn.freebsd.org/changeset/base/262262 +Introduced here: http://svnweb.freebsd.org/changeset/base/262262 Index: tools/clang/test/CodeGen/sret.c =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262262-clang-r199399-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262262-clang-r199399-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262262-clang-r199399-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r199399 from upstream clang trun SPARCv9 implements long double as an IEEE quad. -Introduced here: http://svn.freebsd.org/changeset/base/262262 +Introduced here: http://svnweb.freebsd.org/changeset/base/262262 Index: tools/clang/test/CodeGen/sparcv9-abi.c =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262262-clang-r200452-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262262-clang-r200452-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262262-clang-r200452-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -4,7 +4,7 @@ Pull in r200452 from upstream clang trun Patch by Roman Divacky! -Introduced here: http://svn.freebsd.org/changeset/base/262262 +Introduced here: http://svnweb.freebsd.org/changeset/base/262262 Index: tools/clang/lib/Basic/Targets.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262264-llvm-r200453-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262264-llvm-r200453-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262264-llvm-r200453-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -6,7 +6,7 @@ Pull in r200453 from upstream llvm trunk atomic swap can be implemented in terms of CASX, like the other atomic rmw primitives. -Introduced here: http://svn.freebsd.org/changeset/base/262264 +Introduced here: http://svnweb.freebsd.org/changeset/base/262264 Index: lib/Target/Sparc/SparcInstr64Bit.td =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262265-llvm-r201718-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262265-llvm-r201718-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262265-llvm-r201718-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r201718 from upstream llvm trunk Expand 64bit {SHL,SHR,SRA}_PARTS on sparcv9. -Introduced here: http://svn.freebsd.org/changeset/base/262265 +Introduced here: http://svnweb.freebsd.org/changeset/base/262265 Index: test/CodeGen/SPARC/parts.ll =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262303-enable-ppc-integrated-as.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262303-enable-ppc-integrated-as.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262303-enable-ppc-integrated-as.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r197521 from upstream clang trun Use the integrated assembler by default on FreeBSD/ppc and ppc64. -Introduced here: http://svn.freebsd.org/changeset/base/262303 +Introduced here: http://svnweb.freebsd.org/changeset/base/262303 Index: tools/clang/lib/Driver/ToolChains.h =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262415-llvm-r201994-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262415-llvm-r201994-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262415-llvm-r201994-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r201994 from upstream llvm trunk SPARC: Implement TRAP lowering. Matches what GCC emits. -Introduced here: http://svn.freebsd.org/changeset/base/262415 +Introduced here: http://svnweb.freebsd.org/changeset/base/262415 Index: lib/Target/Sparc/SparcInstrInfo.td =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262460-llvm-r202059-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262460-llvm-r202059-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262460-llvm-r202059-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r202059 from upstream clang trun Implement getDwarfEHStackPointer() and initDwarfEHRegSizeTable() for sparcv9. -Introduced here: http://svn.freebsd.org/changeset/base/262460 +Introduced here: http://svnweb.freebsd.org/changeset/base/262460 Index: tools/clang/lib/CodeGen/TargetInfo.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262535-clang-r202177-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262535-clang-r202177-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262535-clang-r202177-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -4,7 +4,7 @@ Pull in r202177 from upstream clang trun -march which doesnt exist on sparc gcc to -mcpu. While here adjust a few tests to not write an unused temporary file. -Introduced here: http://svn.freebsd.org/changeset/base/262535 +Introduced here: http://svnweb.freebsd.org/changeset/base/262535 Index: tools/clang/lib/Basic/Targets.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262536-clang-r202179-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262536-clang-r202179-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262536-clang-r202179-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r202179 from upstream clang trun Pass the sparc architecture variant to the assembler. -Introduced here: http://svn.freebsd.org/changeset/base/262536 +Introduced here: http://svnweb.freebsd.org/changeset/base/262536 Index: tools/clang/lib/Driver/Tools.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262582-llvm-r202422-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262582-llvm-r202422-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262582-llvm-r202422-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -4,7 +4,7 @@ Pull in r202422 from upstream llvm trunk expensive libcall. Also, Qp_neg is not implemented on at least FreeBSD. This is also what gcc is doing. -Introduced here: http://svn.freebsd.org/changeset/base/262582 +Introduced here: http://svnweb.freebsd.org/changeset/base/262582 Index: lib/Target/Sparc/SparcISelLowering.cpp =================================================================== *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sat May 16 23:39:55 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4D7BBF3F; Sat, 16 May 2015 23:39:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3AE981298; Sat, 16 May 2015 23:39:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4GNdtP7077204; Sat, 16 May 2015 23:39:55 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4GNdsa9077201; Sat, 16 May 2015 23:39:54 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201505162339.t4GNdsa9077201@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 16 May 2015 23:39:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283021 - in stable/10: etc/mtree tests/sys/kern tests/sys/kern/execve 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.20 Precedence: list List-Id: "SVN commit messages 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, 16 May 2015 23:39:55 -0000 Author: ngie Date: Sat May 16 23:39:54 2015 New Revision: 283021 URL: https://svnweb.freebsd.org/changeset/base/283021 Log: MFC r282061: Integrate tools/regression/execve into the FreeBSD test suite as tests/sys/kern/execve Added: stable/10/tests/sys/kern/execve/ - copied from r282061, head/tests/sys/kern/execve/ Modified: stable/10/etc/mtree/BSD.tests.dist stable/10/tests/sys/kern/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/mtree/BSD.tests.dist ============================================================================== --- stable/10/etc/mtree/BSD.tests.dist Sat May 16 23:18:30 2015 (r283020) +++ stable/10/etc/mtree/BSD.tests.dist Sat May 16 23:39:54 2015 (r283021) @@ -185,6 +185,8 @@ file .. kern + execve + .. .. kqueue .. Modified: stable/10/tests/sys/kern/Makefile ============================================================================== --- stable/10/tests/sys/kern/Makefile Sat May 16 23:18:30 2015 (r283020) +++ stable/10/tests/sys/kern/Makefile Sat May 16 23:39:54 2015 (r283021) @@ -10,4 +10,6 @@ LDADD.unix_seqpacket_test+= -lpthread WARNS?= 5 +TESTS_SUBDIRS+= execve + .include From owner-svn-src-all@FreeBSD.ORG Sat May 16 23:51:25 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 13C543B6; Sat, 16 May 2015 23:51:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 020E614A5; Sat, 16 May 2015 23:51:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4GNpOdn085953; Sat, 16 May 2015 23:51:24 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4GNpO7k085952; Sat, 16 May 2015 23:51:24 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201505162351.t4GNpO7k085952@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 16 May 2015 23:51:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283022 - head/sys/mips/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.20 Precedence: list List-Id: "SVN commit messages 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, 16 May 2015 23:51:25 -0000 Author: adrian Date: Sat May 16 23:51:24 2015 New Revision: 283022 URL: https://svnweb.freebsd.org/changeset/base/283022 Log: Increment the vm stats "v_intr" counter so the global system interrupt statistics work again. I'm not sure why/when this broke, only that it used to work fine. This commit is brought to you by Maker Faire Bay Area 2015. Modified: head/sys/mips/include/intr_machdep.h Modified: head/sys/mips/include/intr_machdep.h ============================================================================== --- head/sys/mips/include/intr_machdep.h Sat May 16 23:39:54 2015 (r283021) +++ head/sys/mips/include/intr_machdep.h Sat May 16 23:51:24 2015 (r283022) @@ -70,5 +70,6 @@ mips_intrcnt_inc(mips_intrcnt_t counter) { if (counter) atomic_add_long(counter, 1); + PCPU_INC(cnt.v_intr); } #endif /* !_MACHINE_INTR_MACHDEP_H_ */