From owner-svn-src-projects@FreeBSD.ORG Sun Jan 25 19:56:46 2015 Return-Path: Delivered-To: svn-src-projects@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 313F3A8B; Sun, 25 Jan 2015 19:56: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 1B3B8FAE; Sun, 25 Jan 2015 19:56: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 t0PJujgc051517; Sun, 25 Jan 2015 19:56:45 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0PJuhWN051476; Sun, 25 Jan 2015 19:56:43 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201501251956.t0PJuhWN051476@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 25 Jan 2015 19:56:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r277711 - in projects/building-blocks: etc/rc.d libexec/rtld-elf sys/amd64/conf sys/boot/forth sys/dev/pci sys/netinet usr.bin/kdump X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jan 2015 19:56:46 -0000 Author: ngie Date: Sun Jan 25 19:56:43 2015 New Revision: 277711 URL: https://svnweb.freebsd.org/changeset/base/277711 Log: MFhead @ r277710 Modified: projects/building-blocks/etc/rc.d/local_unbound projects/building-blocks/libexec/rtld-elf/rtld.c projects/building-blocks/sys/amd64/conf/GENERIC projects/building-blocks/sys/boot/forth/beastie.4th projects/building-blocks/sys/boot/forth/brand.4th projects/building-blocks/sys/dev/pci/pci_pci.c projects/building-blocks/sys/netinet/tcp_hostcache.c projects/building-blocks/usr.bin/kdump/kdump.c Directory Properties: projects/building-blocks/ (props changed) projects/building-blocks/etc/ (props changed) projects/building-blocks/sys/ (props changed) projects/building-blocks/sys/boot/ (props changed) Modified: projects/building-blocks/etc/rc.d/local_unbound ============================================================================== --- projects/building-blocks/etc/rc.d/local_unbound Sun Jan 25 19:53:09 2015 (r277710) +++ projects/building-blocks/etc/rc.d/local_unbound Sun Jan 25 19:56:43 2015 (r277711) @@ -26,6 +26,7 @@ pidfile="/var/run/${name}.pid" : ${local_unbound_config:=${local_unbound_workdir}/unbound.conf} : ${local_unbound_flags:=-c${local_unbound_config}} : ${local_unbound_forwardconf:=${local_unbound_workdir}/forward.conf} +: ${local_unbound_controlconf:=${local_unbound_workdir}/control.conf} : ${local_unbound_anchor:=${local_unbound_workdir}/root.key} : ${local_unbound_forwarders:=} @@ -66,6 +67,7 @@ local_unbound_setup() -w ${local_unbound_workdir} \ -c ${local_unbound_config} \ -f ${local_unbound_forwardconf} \ + -o ${local_unbound_controlconf} \ -a ${local_unbound_anchor} \ ${local_unbound_forwarders} } Modified: projects/building-blocks/libexec/rtld-elf/rtld.c ============================================================================== --- projects/building-blocks/libexec/rtld-elf/rtld.c Sun Jan 25 19:53:09 2015 (r277710) +++ projects/building-blocks/libexec/rtld-elf/rtld.c Sun Jan 25 19:56:43 2015 (r277711) @@ -266,6 +266,8 @@ bool ld_library_path_rpath = false; #define UTRACE_PRELOAD_FINISHED 8 #define UTRACE_INIT_CALL 9 #define UTRACE_FINI_CALL 10 +#define UTRACE_DLSYM_START 11 +#define UTRACE_DLSYM_STOP 12 struct utrace_rtld { char sig[4]; /* 'RTLD' */ @@ -3099,6 +3101,7 @@ do_dlsym(void *handle, const char *name, SymLook req; RtldLockState lockstate; tls_index ti; + void *sym; int res; def = NULL; @@ -3108,6 +3111,7 @@ do_dlsym(void *handle, const char *name, req.flags = flags | SYMLOOK_IN_PLT; req.lockstate = &lockstate; + LD_UTRACE(UTRACE_DLSYM_START, handle, NULL, 0, 0, name); rlock_acquire(rtld_bind_lock, &lockstate); if (sigsetjmp(lockstate.env, 0) != 0) lock_upgrade(rtld_bind_lock, &lockstate); @@ -3117,6 +3121,7 @@ do_dlsym(void *handle, const char *name, if ((obj = obj_from_addr(retaddr)) == NULL) { _rtld_error("Cannot determine caller's shared object"); lock_release(rtld_bind_lock, &lockstate); + LD_UTRACE(UTRACE_DLSYM_STOP, handle, NULL, 0, 0, name); return NULL; } if (handle == NULL) { /* Just the caller's shared object. */ @@ -3164,6 +3169,7 @@ do_dlsym(void *handle, const char *name, } else { if ((obj = dlcheck(handle)) == NULL) { lock_release(rtld_bind_lock, &lockstate); + LD_UTRACE(UTRACE_DLSYM_STOP, handle, NULL, 0, 0, name); return NULL; } @@ -3207,19 +3213,22 @@ do_dlsym(void *handle, const char *name, * symbol. */ if (ELF_ST_TYPE(def->st_info) == STT_FUNC) - return (make_function_pointer(def, defobj)); + sym = make_function_pointer(def, defobj); else if (ELF_ST_TYPE(def->st_info) == STT_GNU_IFUNC) - return (rtld_resolve_ifunc(defobj, def)); + sym = rtld_resolve_ifunc(defobj, def); else if (ELF_ST_TYPE(def->st_info) == STT_TLS) { ti.ti_module = defobj->tlsindex; ti.ti_offset = def->st_value; - return (__tls_get_addr(&ti)); + sym = __tls_get_addr(&ti); } else - return (defobj->relocbase + def->st_value); + sym = defobj->relocbase + def->st_value; + LD_UTRACE(UTRACE_DLSYM_STOP, handle, sym, 0, 0, name); + return (sym); } _rtld_error("Undefined symbol \"%s\"", name); lock_release(rtld_bind_lock, &lockstate); + LD_UTRACE(UTRACE_DLSYM_STOP, handle, NULL, 0, 0, name); return NULL; } Modified: projects/building-blocks/sys/amd64/conf/GENERIC ============================================================================== --- projects/building-blocks/sys/amd64/conf/GENERIC Sun Jan 25 19:53:09 2015 (r277710) +++ projects/building-blocks/sys/amd64/conf/GENERIC Sun Jan 25 19:56:43 2015 (r277711) @@ -260,16 +260,6 @@ device vr # VIA Rhine, Rhine II device wb # Winbond W89C840F device xl # 3Com 3c90x (``Boomerang'', ``Cyclone'') -# ISA Ethernet NICs. pccard NICs included. -device cs # Crystal Semiconductor CS89x0 NIC -# 'device ed' requires 'device miibus' -device ed # NE[12]000, SMC Ultra, 3c503, DS8390 cards -device ex # Intel EtherExpress Pro/10 and Pro/10+ -device ep # Etherlink III based cards -device fe # Fujitsu MB8696x based cards -device sn # SMC's 9000 series of Ethernet chips -device xe # Xircom pccard Ethernet - # Wireless NIC cards device wlan # 802.11 support options IEEE80211_DEBUG # enable debug msgs Modified: projects/building-blocks/sys/boot/forth/beastie.4th ============================================================================== --- projects/building-blocks/sys/boot/forth/beastie.4th Sun Jan 25 19:53:09 2015 (r277710) +++ projects/building-blocks/sys/boot/forth/beastie.4th Sun Jan 25 19:56:43 2015 (r277711) @@ -89,7 +89,7 @@ variable logoY 0 25 at-xy ; -: fbsdbw-logo ( x y -- ) \ "FreeBSD" logo in B/W (13 rows x 21 columns) +: fbsdbw-logo ( x y -- ) \ "FreeBSD" logo in B/W (12 rows x 21 columns) \ We used to use the beastie himself as our default... until the \ eventual complaint derided his reign of the advanced boot-menu. @@ -106,17 +106,16 @@ variable logoY 5 + swap 6 + swap 2dup at-xy ." ______" 1+ - 2dup at-xy ." | ____| __ ___ ___ " 1+ - 2dup at-xy ." | |__ | '__/ _ \/ _ \" 1+ - 2dup at-xy ." | __|| | | __/ __/" 1+ - 2dup at-xy ." | | | | | | |" 1+ + 2dup at-xy ." | ____|" 1+ + 2dup at-xy ." | |__ _ __ ___ ___ " 1+ + 2dup at-xy ." | __|| '__/ _ \/ _ \" 1+ + 2dup at-xy ." | | | | | __/ __/" 1+ 2dup at-xy ." |_| |_| \___|\___|" 1+ 2dup at-xy ." ____ _____ _____" 1+ 2dup at-xy ." | _ \ / ____| __ \" 1+ 2dup at-xy ." | |_) | (___ | | | |" 1+ 2dup at-xy ." | _ < \___ \| | | |" 1+ 2dup at-xy ." | |_) |____) | |__| |" 1+ - 2dup at-xy ." | | | |" 1+ at-xy ." |____/|_____/|_____/" \ Put the cursor back at the bottom Modified: projects/building-blocks/sys/boot/forth/brand.4th ============================================================================== --- projects/building-blocks/sys/boot/forth/brand.4th Sun Jan 25 19:53:09 2015 (r277710) +++ projects/building-blocks/sys/boot/forth/brand.4th Sun Jan 25 19:56:43 2015 (r277711) @@ -33,14 +33,13 @@ variable brandY 2 brandX ! 1 brandY ! -: fbsd-logo ( x y -- ) \ "FreeBSD" [wide] logo in B/W (7 rows x 42 columns) +: fbsd-logo ( x y -- ) \ "FreeBSD" [wide] logo in B/W (6 rows x 42 columns) 2dup at-xy ." ______ ____ _____ _____ " 1+ 2dup at-xy ." | ____| | _ \ / ____| __ \ " 1+ 2dup at-xy ." | |___ _ __ ___ ___ | |_) | (___ | | | |" 1+ 2dup at-xy ." | ___| '__/ _ \/ _ \| _ < \___ \| | | |" 1+ 2dup at-xy ." | | | | | __/ __/| |_) |____) | |__| |" 1+ - 2dup at-xy ." | | | | | | || | | |" 1+ at-xy ." |_| |_| \___|\___||____/|_____/|_____/ " \ Put the cursor back at the bottom Modified: projects/building-blocks/sys/dev/pci/pci_pci.c ============================================================================== --- projects/building-blocks/sys/dev/pci/pci_pci.c Sun Jan 25 19:53:09 2015 (r277710) +++ projects/building-blocks/sys/dev/pci/pci_pci.c Sun Jan 25 19:56:43 2015 (r277711) @@ -1114,11 +1114,13 @@ int pcib_resume(device_t dev) { device_t pcib; + int dstate; if (pci_do_power_resume) { pcib = device_get_parent(device_get_parent(dev)); - if (PCIB_POWER_FOR_SLEEP(pcib, dev, NULL) == 0) - pci_set_powerstate(dev, PCI_POWERSTATE_D0); + dstate = PCI_POWERSTATE_D0; + if (PCIB_POWER_FOR_SLEEP(pcib, dev, &dstate) == 0) + pci_set_powerstate(dev, dstate); } pcib_cfg_restore(device_get_softc(dev)); return (bus_generic_resume(dev)); Modified: projects/building-blocks/sys/netinet/tcp_hostcache.c ============================================================================== --- projects/building-blocks/sys/netinet/tcp_hostcache.c Sun Jan 25 19:53:09 2015 (r277710) +++ projects/building-blocks/sys/netinet/tcp_hostcache.c Sun Jan 25 19:56:43 2015 (r277711) @@ -73,6 +73,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -595,30 +596,27 @@ tcp_hc_update(struct in_conninfo *inc, s static int sysctl_tcp_hc_list(SYSCTL_HANDLER_ARGS) { - int bufsize; int linesize = 128; - char *p, *buf; - int len, i, error; + struct sbuf sb; + int i, error; struct hc_metrics *hc_entry; #ifdef INET6 char ip6buf[INET6_ADDRSTRLEN]; #endif - bufsize = linesize * (V_tcp_hostcache.cache_count + 1); + sbuf_new(&sb, NULL, linesize * (V_tcp_hostcache.cache_count + 1), + SBUF_FIXEDLEN); - p = buf = (char *)malloc(bufsize, M_TEMP, M_WAITOK|M_ZERO); - - len = snprintf(p, linesize, - "\nIP address MTU SSTRESH RTT RTTVAR BANDWIDTH " + sbuf_printf(&sb, + "\nIP address MTU SSTRESH RTT RTTVAR BANDWIDTH " " CWND SENDPIPE RECVPIPE HITS UPD EXP\n"); - p += len; #define msec(u) (((u) + 500) / 1000) for (i = 0; i < V_tcp_hostcache.hashsize; i++) { THC_LOCK(&V_tcp_hostcache.hashbase[i].hch_mtx); TAILQ_FOREACH(hc_entry, &V_tcp_hostcache.hashbase[i].hch_bucket, rmx_q) { - len = snprintf(p, linesize, + sbuf_printf(&sb, "%-15s %5lu %8lu %6lums %6lums %9lu %8lu %8lu %8lu " "%4lu %4lu %4i\n", hc_entry->ip4.s_addr ? inet_ntoa(hc_entry->ip4) : @@ -640,13 +638,13 @@ sysctl_tcp_hc_list(SYSCTL_HANDLER_ARGS) hc_entry->rmx_hits, hc_entry->rmx_updates, hc_entry->rmx_expire); - p += len; } THC_UNLOCK(&V_tcp_hostcache.hashbase[i].hch_mtx); } #undef msec - error = SYSCTL_OUT(req, buf, p - buf); - free(buf, M_TEMP); + sbuf_finish(&sb); + error = SYSCTL_OUT(req, sbuf_data(&sb), sbuf_len(&sb)); + sbuf_delete(&sb); return(error); } Modified: projects/building-blocks/usr.bin/kdump/kdump.c ============================================================================== --- projects/building-blocks/usr.bin/kdump/kdump.c Sun Jan 25 19:53:09 2015 (r277710) +++ projects/building-blocks/usr.bin/kdump/kdump.c Sun Jan 25 19:56:43 2015 (r277711) @@ -1531,6 +1531,8 @@ ktrcsw(struct ktr_csw *cs) #define UTRACE_PRELOAD_FINISHED 8 #define UTRACE_INIT_CALL 9 #define UTRACE_FINI_CALL 10 +#define UTRACE_DLSYM_START 11 +#define UTRACE_DLSYM_STOP 12 struct utrace_rtld { char sig[4]; /* 'RTLD' */ @@ -1610,6 +1612,13 @@ ktruser_rtld(int len, void *p) printf("RTLD: fini %p for %p (%s)\n", ut->mapbase, ut->handle, ut->name); break; + case UTRACE_DLSYM_START: + printf("RTLD: dlsym(%p, %s)\n", ut->handle, ut->name); + break; + case UTRACE_DLSYM_STOP: + printf("RTLD: %p = dlsym(%p, %s)\n", ut->mapbase, ut->handle, + ut->name); + break; default: cp = p; cp += 4;