From owner-svn-src-stable-9@FreeBSD.ORG Sun Jul 20 00:30:30 2014 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 14B7D7CA; Sun, 20 Jul 2014 00: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 012692DE5; Sun, 20 Jul 2014 00:30:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6K0UT2d075375; Sun, 20 Jul 2014 00:30:29 GMT (envelope-from bapt@svn.freebsd.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6K0UTO1075370; Sun, 20 Jul 2014 00:30:29 GMT (envelope-from bapt@svn.freebsd.org) Message-Id: <201407200030.s6K0UTO1075370@svn.freebsd.org> From: Baptiste Daroussin Date: Sun, 20 Jul 2014 00:30:29 +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: r268901 - stable/9/lib/libfetch X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Jul 2014 00:30:30 -0000 Author: bapt Date: Sun Jul 20 00:30:28 2014 New Revision: 268901 URL: http://svnweb.freebsd.org/changeset/base/268901 Log: MFC: r267131, r267132, r267133, r268493, r268671 Use NULL instead of 0 (Patch by Sascha Wildner for Dragonfly) Remove unnecessary semicolons (Patch by Sascha Wildner for Dragonfly) Add support for arbitrary http requests [1] Support EAGAIN in fetch_writev Submitted by: Alex Hornung [1] Reviewed by: des Modified: stable/9/lib/libfetch/common.c stable/9/lib/libfetch/common.h stable/9/lib/libfetch/fetch.h stable/9/lib/libfetch/http.c Directory Properties: stable/9/lib/libfetch/ (props changed) Modified: stable/9/lib/libfetch/common.c ============================================================================== --- stable/9/lib/libfetch/common.c Sun Jul 20 00:29:41 2014 (r268900) +++ stable/9/lib/libfetch/common.c Sun Jul 20 00:30:28 2014 (r268901) @@ -1110,6 +1110,9 @@ fetch_writev(conn_t *conn, struct iovec errno = 0; pfd.revents = 0; if (poll(&pfd, 1, deltams) < 0) { + /* POSIX compliance */ + if (errno == EAGAIN) + continue; if (errno == EINTR && fetchRestartCalls) continue; return (-1); Modified: stable/9/lib/libfetch/common.h ============================================================================== --- stable/9/lib/libfetch/common.h Sun Jul 20 00:29:41 2014 (r268900) +++ stable/9/lib/libfetch/common.h Sun Jul 20 00:30:28 2014 (r268901) @@ -117,6 +117,9 @@ int fetch_no_proxy_match(const char *) */ FILE *http_request(struct url *, const char *, struct url_stat *, struct url *, const char *); +FILE *http_request_body(struct url *, const char *, + struct url_stat *, struct url *, const char *, + const char *, const char *); FILE *ftp_request(struct url *, const char *, struct url_stat *, struct url *, const char *); Modified: stable/9/lib/libfetch/fetch.h ============================================================================== --- stable/9/lib/libfetch/fetch.h Sun Jul 20 00:29:41 2014 (r268900) +++ stable/9/lib/libfetch/fetch.h Sun Jul 20 00:30:28 2014 (r268901) @@ -102,6 +102,8 @@ FILE *fetchGetHTTP(struct url *, const FILE *fetchPutHTTP(struct url *, const char *); int fetchStatHTTP(struct url *, struct url_stat *, const char *); struct url_ent *fetchListHTTP(struct url *, const char *); +FILE *fetchReqHTTP(struct url *, const char *, const char *, + const char *, const char *); /* FTP-specific functions */ FILE *fetchXGetFTP(struct url *, struct url_stat *, const char *); Modified: stable/9/lib/libfetch/http.c ============================================================================== --- stable/9/lib/libfetch/http.c Sun Jul 20 00:29:41 2014 (r268900) +++ stable/9/lib/libfetch/http.c Sun Jul 20 00:30:28 2014 (r268901) @@ -1030,7 +1030,7 @@ typedef struct { static void init_http_auth_params(http_auth_params_t *s) { - s->scheme = s->realm = s->user = s->password = 0; + s->scheme = s->realm = s->user = s->password = NULL; } static void @@ -1129,7 +1129,7 @@ CvtHex(IN HASH Bin, OUT HASHHEX Hex) Hex[i*2] = hexchars[j]; j = Bin[i] & 0xf; Hex[i*2+1] = hexchars[j]; - }; + } Hex[HASHHEXLEN] = '\0'; }; @@ -1164,7 +1164,7 @@ DigestCalcHA1( MD5Update(&Md5Ctx, ":", 1); MD5Update(&Md5Ctx, pszCNonce, strlen(pszCNonce)); MD5Final(HA1, &Md5Ctx); - }; + } CvtHex(HA1, SessionKey); } @@ -1198,7 +1198,7 @@ DigestCalcResponse( if (strcasecmp(pszQop, "auth-int") == 0) { MD5Update(&Md5Ctx, ":", 1); MD5Update(&Md5Ctx, HEntity, HASHHEXLEN); - }; + } MD5Final(HA2, &Md5Ctx); CvtHex(HA2, HA2Hex); @@ -1215,7 +1215,7 @@ DigestCalcResponse( MD5Update(&Md5Ctx, ":", 1); MD5Update(&Md5Ctx, pszQop, strlen(pszQop)); MD5Update(&Md5Ctx, ":", 1); - }; + } MD5Update(&Md5Ctx, HA2Hex, HASHHEXLEN); MD5Final(RespHash, &Md5Ctx); CvtHex(RespHash, Response); @@ -1249,7 +1249,7 @@ http_digest_auth(conn_t *conn, const cha int r; char noncecount[10]; char cnonce[40]; - char *options = 0; + char *options = NULL; if (!c->realm || !c->nonce) { DEBUG(fprintf(stderr, "realm/nonce not set in challenge\n")); @@ -1494,6 +1494,14 @@ http_print_html(FILE *out, FILE *in) * Core */ +FILE * +http_request(struct url *URL, const char *op, struct url_stat *us, + struct url *purl, const char *flags) +{ + + return (http_request_body(URL, op, us, purl, flags, NULL, NULL)); +} + /* * Send a request and process the reply * @@ -1501,8 +1509,9 @@ http_print_html(FILE *out, FILE *in) * XXX off into a separate function. */ FILE * -http_request(struct url *URL, const char *op, struct url_stat *us, - struct url *purl, const char *flags) +http_request_body(struct url *URL, const char *op, struct url_stat *us, + struct url *purl, const char *flags, const char *content_type, + const char *body) { char timebuf[80]; char hbuf[MAXHOSTNAMELEN + 7], *host; @@ -1519,6 +1528,7 @@ http_request(struct url *URL, const char http_headerbuf_t headerbuf; http_auth_challenges_t server_challenges; http_auth_challenges_t proxy_challenges; + size_t body_len; /* The following calls don't allocate anything */ init_http_headerbuf(&headerbuf); @@ -1690,8 +1700,19 @@ http_request(struct url *URL, const char if (url->offset > 0) http_cmd(conn, "Range: bytes=%lld-", (long long)url->offset); http_cmd(conn, "Connection: close"); + + if (body) { + body_len = strlen(body); + http_cmd(conn, "Content-Length: %zu", body_len); + if (content_type != NULL) + http_cmd(conn, "Content-Type: %s", content_type); + } + http_cmd(conn, ""); + if (body) + fetch_write(conn, body, body_len); + /* * Force the queued request to be dispatched. Normally, one * would do this with shutdown(2) but squid proxies can be @@ -2042,3 +2063,12 @@ fetchListHTTP(struct url *url __unused, warnx("fetchListHTTP(): not implemented"); return (NULL); } + +FILE * +fetchReqHTTP(struct url *URL, const char *method, const char *flags, + const char *content_type, const char *body) +{ + + return (http_request_body(URL, method, NULL, http_get_proxy(URL, flags), + flags, content_type, body)); +} From owner-svn-src-stable-9@FreeBSD.ORG Sun Jul 20 02:20:04 2014 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5C804CFF; Sun, 20 Jul 2014 02:20: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 4964D2496; Sun, 20 Jul 2014 02:20:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6K2K4KU030640; Sun, 20 Jul 2014 02:20:04 GMT (envelope-from hiren@svn.freebsd.org) Received: (from hiren@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6K2K4ZE030639; Sun, 20 Jul 2014 02:20:04 GMT (envelope-from hiren@svn.freebsd.org) Message-Id: <201407200220.s6K2K4ZE030639@svn.freebsd.org> From: Hiren Panchasara Date: Sun, 20 Jul 2014 02:20: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: r268905 - stable/9/sys/dev/ixgbe X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Jul 2014 02:20:04 -0000 Author: hiren Date: Sun Jul 20 02:20:03 2014 New Revision: 268905 URL: http://svnweb.freebsd.org/changeset/base/268905 Log: MFC r268790 Fix a typo. Modified: stable/9/sys/dev/ixgbe/ixgbe.c Modified: stable/9/sys/dev/ixgbe/ixgbe.c ============================================================================== --- stable/9/sys/dev/ixgbe/ixgbe.c Sun Jul 20 02:15:14 2014 (r268904) +++ stable/9/sys/dev/ixgbe/ixgbe.c Sun Jul 20 02:20:03 2014 (r268905) @@ -306,7 +306,7 @@ SYSCTL_INT(_hw_ix, OID_AUTO, num_queues, static int ixgbe_txd = PERFORM_TXD; TUNABLE_INT("hw.ixgbe.txd", &ixgbe_txd); SYSCTL_INT(_hw_ix, OID_AUTO, txd, CTLFLAG_RDTUN, &ixgbe_txd, 0, - "Number of receive descriptors per queue"); + "Number of transmit descriptors per queue"); /* Number of RX descriptors per ring */ static int ixgbe_rxd = PERFORM_RXD; From owner-svn-src-stable-9@FreeBSD.ORG Sun Jul 20 02:38:59 2014 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2FB22183; Sun, 20 Jul 2014 02:38: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 1C7D925E6; Sun, 20 Jul 2014 02:38:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6K2cwfa039649; Sun, 20 Jul 2014 02:38:58 GMT (envelope-from hiren@svn.freebsd.org) Received: (from hiren@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6K2cwdd039648; Sun, 20 Jul 2014 02:38:58 GMT (envelope-from hiren@svn.freebsd.org) Message-Id: <201407200238.s6K2cwdd039648@svn.freebsd.org> From: Hiren Panchasara Date: Sun, 20 Jul 2014 02:38:58 +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: r268906 - stable/9/sys/net X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Jul 2014 02:38:59 -0000 Author: hiren Date: Sun Jul 20 02:38:58 2014 New Revision: 268906 URL: http://svnweb.freebsd.org/changeset/base/268906 Log: MFC r250764 Fix rte leak introduced in r248070. Modified: stable/9/sys/net/route.c Modified: stable/9/sys/net/route.c ============================================================================== --- stable/9/sys/net/route.c Sun Jul 20 02:20:03 2014 (r268905) +++ stable/9/sys/net/route.c Sun Jul 20 02:38:58 2014 (r268906) @@ -1638,7 +1638,7 @@ rtinit1(struct ifaddr *ifa, int cmd, int info.rti_ifa = NULL; info.rti_flags = RTF_RNH_LOCKED; - error = rtrequest1_fib(RTM_DELETE, &info, &rt, fibnum); + error = rtrequest1_fib(RTM_DELETE, &info, NULL, fibnum); if (error == 0) { info.rti_ifa = ifa; info.rti_flags = flags | RTF_RNH_LOCKED | From owner-svn-src-stable-9@FreeBSD.ORG Sun Jul 20 11:00:51 2014 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A31D575A; Sun, 20 Jul 2014 11:00: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 8F1E628EB; Sun, 20 Jul 2014 11:00:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6KB0pHI081440; Sun, 20 Jul 2014 11:00:51 GMT (envelope-from bapt@svn.freebsd.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6KB0pR0081439; Sun, 20 Jul 2014 11:00:51 GMT (envelope-from bapt@svn.freebsd.org) Message-Id: <201407201100.s6KB0pR0081439@svn.freebsd.org> From: Baptiste Daroussin Date: Sun, 20 Jul 2014 11:00:51 +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: r268919 - stable/9/usr.sbin/pkg X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Jul 2014 11:00:51 -0000 Author: bapt Date: Sun Jul 20 11:00:51 2014 New Revision: 268919 URL: http://svnweb.freebsd.org/changeset/base/268919 Log: MFC: r263650, r263686 Add missing dependency on libm Modified: stable/9/usr.sbin/pkg/Makefile Directory Properties: stable/9/usr.sbin/pkg/ (props changed) Modified: stable/9/usr.sbin/pkg/Makefile ============================================================================== --- stable/9/usr.sbin/pkg/Makefile Sun Jul 20 10:54:45 2014 (r268918) +++ stable/9/usr.sbin/pkg/Makefile Sun Jul 20 11:00:51 2014 (r268919) @@ -7,8 +7,8 @@ MAN= pkg.7 CFLAGS+=-I${.CURDIR}/../../contrib/libucl/include .PATH: ${.CURDIR}/../../contrib/libucl/include DPADD= ${LIBARCHIVE} ${LIBELF} ${LIBFETCH} ${LIBUCL} ${LIBSBUF} ${LIBSSL} \ - ${LIBCRYPTO} -LDADD= -larchive -lelf -lfetch -lucl -lsbuf -lssl -lcrypto + ${LIBCRYPTO} ${LIBM} +LDADD= -larchive -lelf -lfetch -lucl -lsbuf -lssl -lcrypto -lm USEPRIVATELIB= ucl .include From owner-svn-src-stable-9@FreeBSD.ORG Mon Jul 21 14:36:36 2014 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 48596D89; Mon, 21 Jul 2014 14:36: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 34A012D21; Mon, 21 Jul 2014 14:36:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6LEaa1U062541; Mon, 21 Jul 2014 14:36:36 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6LEaavM062540; Mon, 21 Jul 2014 14:36:36 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201407211436.s6LEaavM062540@svn.freebsd.org> From: Ed Maste Date: Mon, 21 Jul 2014 14:36: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: r268942 - stable/9/sys/dev/vt X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jul 2014 14:36:36 -0000 Author: emaste Date: Mon Jul 21 14:36:35 2014 New Revision: 268942 URL: http://svnweb.freebsd.org/changeset/base/268942 Log: MFC r268460 by ray: Fix inconsistent token parameters for kbd_allocate() and kbd_release() in vt(4). PR: 191306 Submitted by: jau789 at gmail.com Sponsored by: The FreeBSD Foundation Modified: stable/9/sys/dev/vt/vt_core.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/vt/vt_core.c ============================================================================== --- stable/9/sys/dev/vt/vt_core.c Mon Jul 21 14:31:57 2014 (r268941) +++ stable/9/sys/dev/vt/vt_core.c Mon Jul 21 14:36:35 2014 (r268942) @@ -536,7 +536,7 @@ vt_kbdevent(keyboard_t *kbd, int event, case KBDIO_UNLOADING: mtx_lock(&Giant); vd->vd_keyboard = -1; - kbd_release(kbd, (void *)&vd->vd_keyboard); + kbd_release(kbd, (void *)vd); mtx_unlock(&Giant); return (0); default: @@ -1651,11 +1651,10 @@ skip_thunk: return (EINVAL); } i = kbd_allocate(kbd->kb_name, kbd->kb_unit, - (void *)&vd->vd_keyboard, vt_kbdevent, vd); + (void *)vd, vt_kbdevent, vd); if (i >= 0) { if (vd->vd_keyboard != -1) { - kbd_release(kbd, - (void *)&vd->vd_keyboard); + kbd_release(kbd, (void *)vd); } kbd = kbd_get_keyboard(i); vd->vd_keyboard = i; @@ -1677,7 +1676,7 @@ skip_thunk: mtx_unlock(&Giant); return (EINVAL); } - error = kbd_release(kbd, (void *)&vd->vd_keyboard); + error = kbd_release(kbd, (void *)vd); if (error == 0) { vd->vd_keyboard = -1; } From owner-svn-src-stable-9@FreeBSD.ORG Mon Jul 21 22:44:07 2014 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7027674A; Mon, 21 Jul 2014 22:44: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 5151A2CF8; Mon, 21 Jul 2014 22:44:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6LMi7Jh090622; Mon, 21 Jul 2014 22:44:07 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6LMi6lV090618; Mon, 21 Jul 2014 22:44:06 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201407212244.s6LMi6lV090618@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Mon, 21 Jul 2014 22:44:06 +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: r268963 - stable/9/lib/libc/gen X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jul 2014 22:44:07 -0000 Author: pfg Date: Mon Jul 21 22:44:06 2014 New Revision: 268963 URL: http://svnweb.freebsd.org/changeset/base/268963 Log: MFC r268642: libc/gen: small updates to code originating at OpenBSD arc4random.c - CVS rev. 1.22 Change arc4random_uniform() to calculate ``2**32 % upper_bound'' as ``-upper_bound % upper_bound''. Simplifies the code and makes it the same on both ILP32 and LP64 architectures, and also slightly faster on LP64 architectures by using a 32-bit remainder instead of a 64-bit remainder. - CVS rev. 1.23 Spacing readpassphrase.c -CVS rev. v 1.24 most obvious unsigned char casts for ctype Obtained from: OpenBSD Modified: stable/9/lib/libc/gen/arc4random.c stable/9/lib/libc/gen/readpassphrase.c Directory Properties: stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/gen/arc4random.c ============================================================================== --- stable/9/lib/libc/gen/arc4random.c Mon Jul 21 22:37:33 2014 (r268962) +++ stable/9/lib/libc/gen/arc4random.c Mon Jul 21 22:44:06 2014 (r268963) @@ -1,4 +1,4 @@ -/* $OpenBSD: arc4random.c,v 1.22 2010/12/22 08:23:42 otto Exp $ */ +/* $OpenBSD: arc4random.c,v 1.24 2013/06/11 16:59:50 deraadt Exp $ */ /* * Copyright (c) 1996, David Mazieres @@ -182,8 +182,7 @@ arc4_stir_if_needed(void) { pid_t pid = getpid(); - if (arc4_count <= 0 || !rs_initialized || arc4_stir_pid != pid) - { + if (arc4_count <= 0 || !rs_initialized || arc4_stir_pid != pid) { arc4_stir_pid = pid; arc4_stir(); } @@ -276,18 +275,8 @@ arc4random_uniform(u_int32_t upper_bound if (upper_bound < 2) return 0; -#if (ULONG_MAX > 0xffffffffUL) - min = 0x100000000UL % upper_bound; -#else - /* Calculate (2**32 % upper_bound) avoiding 64-bit math */ - if (upper_bound > 0x80000000) - min = 1 + ~upper_bound; /* 2**32 - upper_bound */ - else { - /* (2**32 - (x * 2)) % x == 2**32 % x when x <= 2**31 */ - min = ((0xffffffff - (upper_bound * 2)) + 1) % upper_bound; - } -#endif - + /* 2**32 % x == (2**32 - x) % x */ + min = -upper_bound % upper_bound; /* * This could theoretically loop forever but each retry has * p > 0.5 (worst case, usually far better) of selecting a Modified: stable/9/lib/libc/gen/readpassphrase.c ============================================================================== --- stable/9/lib/libc/gen/readpassphrase.c Mon Jul 21 22:37:33 2014 (r268962) +++ stable/9/lib/libc/gen/readpassphrase.c Mon Jul 21 22:44:06 2014 (r268963) @@ -1,4 +1,4 @@ -/* $OpenBSD: readpassphrase.c,v 1.23 2010/05/14 13:30:34 millert Exp $ */ +/* $OpenBSD: readpassphrase.c,v 1.24 2013/11/24 23:51:29 deraadt Exp $ */ /* * Copyright (c) 2000-2002, 2007, 2010 @@ -122,11 +122,11 @@ restart: if (p < end) { if ((flags & RPP_SEVENBIT)) ch &= 0x7f; - if (isalpha(ch)) { + if (isalpha((unsigned char)ch)) { if ((flags & RPP_FORCELOWER)) - ch = (char)tolower(ch); + ch = (char)tolower((unsigned char)ch); if ((flags & RPP_FORCEUPPER)) - ch = (char)toupper(ch); + ch = (char)toupper((unsigned char)ch); } *p++ = ch; } From owner-svn-src-stable-9@FreeBSD.ORG Mon Jul 21 22:48:39 2014 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F0691ADB; Mon, 21 Jul 2014 22:48: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 D17C42D33; Mon, 21 Jul 2014 22:48:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6LMmdwA091357; Mon, 21 Jul 2014 22:48:39 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6LMmdaK091354; Mon, 21 Jul 2014 22:48:39 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201407212248.s6LMmdaK091354@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Mon, 21 Jul 2014 22:48: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: r268965 - stable/9/lib/libc/stdlib X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jul 2014 22:48:40 -0000 Author: pfg Date: Mon Jul 21 22:48:38 2014 New Revision: 268965 URL: http://svnweb.freebsd.org/changeset/base/268965 Log: MFC r268644: libc/stdlib: Minor cleanups to code originating in NetBSD Mostly ANSIfication and typos. Obtained from: NetBSD Modified: stable/9/lib/libc/stdlib/hcreate.c stable/9/lib/libc/stdlib/tsearch.c stable/9/lib/libc/stdlib/twalk.c Directory Properties: stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/stdlib/hcreate.c ============================================================================== --- stable/9/lib/libc/stdlib/hcreate.c Mon Jul 21 22:47:59 2014 (r268964) +++ stable/9/lib/libc/stdlib/hcreate.c Mon Jul 21 22:48:38 2014 (r268965) @@ -1,4 +1,4 @@ -/* $NetBSD: hcreate.c,v 1.2 2001/02/19 21:26:04 ross Exp $ */ +/* $NetBSD: hcreate.c,v 1.6 2008/07/21 12:05:43 lukem Exp $ */ /* * Copyright (c) 2001 Christopher G. Demetriou @@ -15,7 +15,7 @@ * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed for the - * NetBSD Project. See http://www.netbsd.org/ for + * NetBSD Project. See http://www.NetBSD.org/ for * information about NetBSD. * 4. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. @@ -49,7 +49,7 @@ #include #if 0 #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: hcreate.c,v 1.2 2001/02/19 21:26:04 ross Exp $"); +__RCSID("$NetBSD: hcreate.c,v 1.6 2008/07/21 12:05:43 lukem Exp $"); #endif /* LIBC_SCCS and not lint */ #endif __FBSDID("$FreeBSD$"); Modified: stable/9/lib/libc/stdlib/tsearch.c ============================================================================== --- stable/9/lib/libc/stdlib/tsearch.c Mon Jul 21 22:47:59 2014 (r268964) +++ stable/9/lib/libc/stdlib/tsearch.c Mon Jul 21 22:48:38 2014 (r268965) @@ -1,4 +1,4 @@ -/* $NetBSD: tsearch.c,v 1.3 1999/09/16 11:45:37 lukem Exp $ */ +/* $NetBSD: tsearch.c,v 1.7 2012/06/25 22:32:45 abs Exp $ */ /* * Tree search generalized from Knuth (6.2.2) Algorithm T just like @@ -14,7 +14,7 @@ #include #if 0 #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: tsearch.c,v 1.3 1999/09/16 11:45:37 lukem Exp $"); +__RCSID("$NetBSD: tsearch.c,v 1.7 2012/06/25 22:32:45 abs Exp $"); #endif /* LIBC_SCCS and not lint */ #endif __FBSDID("$FreeBSD$"); @@ -25,10 +25,8 @@ __FBSDID("$FreeBSD$"); /* find or insert datum into search tree */ void * -tsearch(vkey, vrootp, compar) - const void *vkey; /* key to be located */ - void **vrootp; /* address of tree root */ - int (*compar)(const void *, const void *); +tsearch(const void *vkey, void **vrootp, + int (*compar)(const void *, const void *)) { node_t *q; node_t **rootp = (node_t **)vrootp; @@ -50,8 +48,7 @@ tsearch(vkey, vrootp, compar) q = malloc(sizeof(node_t)); /* T5: key not found */ if (q != 0) { /* make new node */ *rootp = q; /* link new node to old */ - /* LINTED const castaway ok */ - q->key = (void *)vkey; /* initialize new node */ + q->key = __DECONST(void *, vkey);/* initialize new node */ q->llink = q->rlink = NULL; } return q; Modified: stable/9/lib/libc/stdlib/twalk.c ============================================================================== --- stable/9/lib/libc/stdlib/twalk.c Mon Jul 21 22:47:59 2014 (r268964) +++ stable/9/lib/libc/stdlib/twalk.c Mon Jul 21 22:48:38 2014 (r268965) @@ -1,4 +1,4 @@ -/* $NetBSD: twalk.c,v 1.1 1999/02/22 10:33:16 christos Exp $ */ +/* $NetBSD: twalk.c,v 1.4 2012/03/20 16:38:45 matt Exp $ */ /* * Tree search generalized from Knuth (6.2.2) Algorithm T just like @@ -14,7 +14,7 @@ #include #if 0 #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: twalk.c,v 1.1 1999/02/22 10:33:16 christos Exp $"); +__RCSID("$NetBSD: twalk.c,v 1.4 2012/03/20 16:38:45 matt Exp $"); #endif /* LIBC_SCCS and not lint */ #endif __FBSDID("$FreeBSD$"); @@ -23,15 +23,12 @@ __FBSDID("$FreeBSD$"); #include #include -static void trecurse(const node_t *, - void (*action)(const void *, VISIT, int), int level); +typedef void (*cmp_fn_t)(const void *, VISIT, int); /* Walk the nodes of a tree */ static void -trecurse(root, action, level) - const node_t *root; /* Root of the tree to be walked */ - void (*action)(const void *, VISIT, int); - int level; +trecurse(const node_t *root, /* Root of the tree to be walked */ + cmp_fn_t action, int level) { if (root->llink == NULL && root->rlink == NULL) @@ -49,9 +46,7 @@ trecurse(root, action, level) /* Walk the nodes of a tree */ void -twalk(vroot, action) - const void *vroot; /* Root of the tree to be walked */ - void (*action)(const void *, VISIT, int); +twalk(const void *vroot, cmp_fn_t action) /* Root of the tree to be walked */ { if (vroot != NULL && action != NULL) trecurse(vroot, action, 0); From owner-svn-src-stable-9@FreeBSD.ORG Mon Jul 21 23:00:28 2014 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 06B5EFCE; Mon, 21 Jul 2014 23:00: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 DBF182E75; Mon, 21 Jul 2014 23:00:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6LN0Rqm098115; Mon, 21 Jul 2014 23:00:27 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6LN0RuV098108; Mon, 21 Jul 2014 23:00:27 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201407212300.s6LN0RuV098108@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Mon, 21 Jul 2014 23:00: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: r268967 - stable/9/usr.bin/grep X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jul 2014 23:00:28 -0000 Author: pfg Date: Mon Jul 21 23:00:26 2014 New Revision: 268967 URL: http://svnweb.freebsd.org/changeset/base/268967 Log: MFC r268798, r268799, r268801: grep: Fix type. grep: fix some memory leaks. queue.c (CVS Rev. 1.4. 1.5) Fix memory leaks. NULL does not need a cast. grep.c (CVS Rev. 1.6) Use the more portable getline. Obtained from: NetBSD Modified: stable/9/usr.bin/grep/grep.c stable/9/usr.bin/grep/queue.c stable/9/usr.bin/grep/util.c Directory Properties: stable/9/usr.bin/grep/ (props changed) Modified: stable/9/usr.bin/grep/grep.c ============================================================================== --- stable/9/usr.bin/grep/grep.c Mon Jul 21 22:59:40 2014 (r268966) +++ stable/9/usr.bin/grep/grep.c Mon Jul 21 23:00:26 2014 (r268967) @@ -1,4 +1,4 @@ -/* $NetBSD: grep.c,v 1.4 2011/02/16 01:31:33 joerg Exp $ */ +/* $NetBSD: grep.c,v 1.6 2011/04/18 03:48:23 joerg Exp $ */ /* $FreeBSD$ */ /* $OpenBSD: grep.c,v 1.42 2010/07/02 22:18:03 tedu Exp $ */ @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#define _WITH_GETLINE #include #include #include @@ -303,6 +304,7 @@ read_patterns(const char *fn) FILE *f; char *line; size_t len; + ssize_t rlen; if ((f = fopen(fn, "r")) == NULL) err(2, "%s", fn); @@ -310,8 +312,11 @@ read_patterns(const char *fn) fclose(f); return; } - while ((line = fgetln(f, &len)) != NULL) + len = 0; + line = NULL; + while ((rlen = getline(&line, &len, f)) != -1) add_pattern(line, line[0] == '\n' ? 0 : len); + free(line); if (ferror(f)) err(2, "%s", fn); fclose(f); Modified: stable/9/usr.bin/grep/queue.c ============================================================================== --- stable/9/usr.bin/grep/queue.c Mon Jul 21 22:59:40 2014 (r268966) +++ stable/9/usr.bin/grep/queue.c Mon Jul 21 23:00:26 2014 (r268967) @@ -1,4 +1,4 @@ -/* $NetBSD: queue.c,v 1.2 2011/02/16 01:31:33 joerg Exp $ */ +/* $NetBSD: queue.c,v 1.5 2011/08/31 16:24:57 plunky Exp $ */ /* $FreeBSD$ */ /*- @@ -68,8 +68,11 @@ enqueue(struct str *x) STAILQ_INSERT_TAIL(&queue, item, list); - if (++count > Bflag) - free(dequeue()); + if (++count > Bflag) { + item = dequeue(); + free(item->data.dat); + free(item); + } } static struct qentry * @@ -92,7 +95,8 @@ printqueue(void) struct qentry *item; while ((item = dequeue()) != NULL) { - printline(&item->data, '-', (regmatch_t *)NULL, 0); + printline(&item->data, '-', NULL, 0); + free(item->data.dat); free(item); } } @@ -102,6 +106,8 @@ clearqueue(void) { struct qentry *item; - while ((item = dequeue()) != NULL) + while ((item = dequeue()) != NULL) { + free(item->data.dat); free(item); + } } Modified: stable/9/usr.bin/grep/util.c ============================================================================== --- stable/9/usr.bin/grep/util.c Mon Jul 21 22:59:40 2014 (r268966) +++ stable/9/usr.bin/grep/util.c Mon Jul 21 23:00:26 2014 (r268967) @@ -302,7 +302,7 @@ procline(struct str *l, int nottext) r = REG_NOMATCH; /* Check for whole word match */ if (r == 0 && (wflag || fg_pattern[i].word)) { - wint_t wbegin, wend; + wchar_t wbegin, wend; wbegin = wend = L' '; if (pmatch.rm_so != 0 && From owner-svn-src-stable-9@FreeBSD.ORG Wed Jul 23 22:10:35 2014 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 048C0B23; Wed, 23 Jul 2014 22: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 CBE342FF4; Wed, 23 Jul 2014 22:10:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6NMAYNZ015821; Wed, 23 Jul 2014 22:10:34 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6NMAYAx015820; Wed, 23 Jul 2014 22:10:34 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201407232210.s6NMAYAx015820@svn.freebsd.org> From: Devin Teske Date: Wed, 23 Jul 2014 22:10:34 +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: r269028 - stable/9/etc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Jul 2014 22:10:35 -0000 Author: dteske Date: Wed Jul 23 22:10:34 2014 New Revision: 269028 URL: http://svnweb.freebsd.org/changeset/base/269028 Log: MFC r267812 (hrs): Fix ifname normalization. ifconfig_IF_alias{es,N} did not work if ifname has any of [.-/+]. PR: conf/191961 Spotted by: jhay MFC after: 3 days Modified: stable/9/etc/network.subr Directory Properties: stable/9/etc/ (props changed) Modified: stable/9/etc/network.subr ============================================================================== --- stable/9/etc/network.subr Wed Jul 23 21:08:04 2014 (r269027) +++ stable/9/etc/network.subr Wed Jul 23 22:10:34 2014 (r269028) @@ -1011,7 +1011,7 @@ ifalias_af_common_handler() ifalias_af_common() { local _ret _if _af _action alias ifconfig_args _aliasn _c _tmpargs _iaf - local _punct=".-/+" + local _vif _punct=".-/+" _ret=1 _aliasn= @@ -1020,11 +1020,11 @@ ifalias_af_common() _action=$3 # Normalize $_if before using it in a pattern to list_vars() - ltr "$_if" "$_punct" "_" _if + ltr "$_if" "$_punct" "_" _vif # ifconfig_IF_aliasN which starts with $_af - for alias in `list_vars ifconfig_${_if}_alias[0-9]\* | - sort_lite -nk1.$((9+${#_if}+7))` + for alias in `list_vars ifconfig_${_vif}_alias[0-9]\* | + sort_lite -nk1.$((9+${#_vif}+7))` do eval ifconfig_args=\"\$$alias\" _iaf= @@ -1053,8 +1053,8 @@ ifalias_af_common() # backward compatibility: ipv6_ifconfig_IF_aliasN. case $_af in inet6) - for alias in `list_vars ipv6_ifconfig_${_if}_alias[0-9]\* | - sort_lite -nk1.$((14+${#_if}+7))` + for alias in `list_vars ipv6_ifconfig_${_vif}_alias[0-9]\* | + sort_lite -nk1.$((14+${#_vif}+7))` do eval ifconfig_args=\"\$$alias\" case ${_action}:"${ifconfig_args}" in @@ -1063,8 +1063,8 @@ ifalias_af_common() ;; alias:*) _aliasn="${_aliasn} inet6 ${ifconfig_args}" - warn "\$ipv6_ifconfig_${_if}_alias${alias} " \ - "is obsolete. Use ifconfig_$1_aliasN " \ + warn "\$ipv6_ifconfig_${_vif}_alias${alias} " \ + "is obsolete. Use ifconfig_${_vif}_aliasN " \ "instead." ;; esac From owner-svn-src-stable-9@FreeBSD.ORG Wed Jul 23 22:41:07 2014 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A7C1C146; Wed, 23 Jul 2014 22:41: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 9556F22D6; Wed, 23 Jul 2014 22:41:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6NMf7G0033260; Wed, 23 Jul 2014 22:41:07 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6NMf7fR033259; Wed, 23 Jul 2014 22:41:07 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201407232241.s6NMf7fR033259@svn.freebsd.org> From: Devin Teske Date: Wed, 23 Jul 2014 22:41:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r269034 - stable/9/etc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Jul 2014 22:41:07 -0000 Author: dteske Date: Wed Jul 23 22:41:07 2014 New Revision: 269034 URL: http://svnweb.freebsd.org/changeset/base/269034 Log: MFC r266475 (rea): Fix warning messages after r252015 $alias used to hold alias number, but now it carries full variable name, so messages were tuned to account for that. Other fixes: - eliminate unneeded double spaces; - tell user where inet/inet6 keywords are expected to be. Reviewed by: hrs Modified: stable/9/etc/network.subr Directory Properties: stable/9/etc/ (props changed) Modified: stable/9/etc/network.subr ============================================================================== --- stable/9/etc/network.subr Wed Jul 23 22:35:23 2014 (r269033) +++ stable/9/etc/network.subr Wed Jul 23 22:41:07 2014 (r269034) @@ -144,7 +144,7 @@ ifconfig_up() # backward compatibility: inet6 keyword case "${ifconfig_args}" in :*|[0-9a-fA-F]*:*) - warn "\$ifconfig_$1_ipv6 needs " \ + warn "\$ifconfig_$1_ipv6 needs leading" \ "\"inet6\" keyword for an IPv6 address." ifconfig_args="inet6 ${ifconfig_args}" ;; @@ -1045,7 +1045,7 @@ ifalias_af_common() ;; inet:alias:"":*) _aliasn="$_aliasn inet $ifconfig_args" - warn "\$ifconfig_${_if}_alias${alias} needs " \ + warn "\$${alias} needs leading" \ "\"inet\" keyword for an IPv4 address." esac done @@ -1063,9 +1063,8 @@ ifalias_af_common() ;; alias:*) _aliasn="${_aliasn} inet6 ${ifconfig_args}" - warn "\$ipv6_ifconfig_${_vif}_alias${alias} " \ - "is obsolete. Use ifconfig_${_vif}_aliasN " \ - "instead." + warn "\$${alias} is obsolete. " \ + "Use ifconfig_${_vif}_aliasN instead." ;; esac done From owner-svn-src-stable-9@FreeBSD.ORG Thu Jul 24 00:02:40 2014 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3CB33FC0; Thu, 24 Jul 2014 00:02: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 0F38C2A16; Thu, 24 Jul 2014 00:02:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6O02dYU072201; Thu, 24 Jul 2014 00:02:39 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6O02dOY072200; Thu, 24 Jul 2014 00:02:39 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201407240002.s6O02dOY072200@svn.freebsd.org> From: John Baldwin Date: Thu, 24 Jul 2014 00:02: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: r269038 - in stable: 10/sys/dev/acpica 9/sys/dev/acpica X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Jul 2014 00:02:40 -0000 Author: jhb Date: Thu Jul 24 00:02:39 2014 New Revision: 269038 URL: http://svnweb.freebsd.org/changeset/base/269038 Log: MFC 267883: Expand r261243 even further and ignore any I/O port resources assigned to PCI root bridges except for the one known-valid case on x86 where bridges claim the I/O port registers used for PCI config space access. Modified: stable/9/sys/dev/acpica/acpi.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/dev/acpica/acpi.c Directory Properties: stable/10/ (props changed) Modified: stable/9/sys/dev/acpica/acpi.c ============================================================================== --- stable/9/sys/dev/acpica/acpi.c Wed Jul 23 23:01:54 2014 (r269037) +++ stable/9/sys/dev/acpica/acpi.c Thu Jul 24 00:02:39 2014 (r269038) @@ -1196,15 +1196,24 @@ acpi_set_resource(device_t dev, device_t return (0); /* - * Ignore memory resources for PCI root bridges. Some BIOSes + * Ignore most resources for PCI root bridges. Some BIOSes * incorrectly enumerate the memory ranges they decode as plain - * memory resources instead of as a ResourceProducer range. + * memory resources instead of as ResourceProducer ranges. Other + * BIOSes incorrectly list system resource entries for I/O ranges + * under the PCI bridge. Do allow the one known-correct case on + * x86 of a PCI bridge claiming the I/O ports used for PCI config + * access. */ - if (type == SYS_RES_MEMORY) { + if (type == SYS_RES_MEMORY || type == SYS_RES_IOPORT) { if (ACPI_SUCCESS(AcpiGetObjectInfo(ad->ad_handle, &devinfo))) { if ((devinfo->Flags & ACPI_PCI_ROOT_BRIDGE) != 0) { - AcpiOsFree(devinfo); - return (0); +#if defined(__i386__) || defined(__amd64__) + if (!(type == SYS_RES_IOPORT && start == CONF1_ADDR_PORT)) +#endif + { + AcpiOsFree(devinfo); + return (0); + } } AcpiOsFree(devinfo); } From owner-svn-src-stable-9@FreeBSD.ORG Thu Jul 24 01:08:03 2014 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AEBC8F8C; Thu, 24 Jul 2014 01:08: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 8F5302F23; Thu, 24 Jul 2014 01:08:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6O183PY000900; Thu, 24 Jul 2014 01:08:03 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6O1825b000890; Thu, 24 Jul 2014 01:08:02 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201407240108.s6O1825b000890@svn.freebsd.org> From: Mark Johnston Date: Thu, 24 Jul 2014 01:08:02 +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: r269040 - in stable/9: cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/buffering cddl/contrib/opensolaris/lib/libdtrace/common sys/cddl/compat/opensolaris/sys sys/cddl/contrib/opens... X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Jul 2014 01:08:03 -0000 Author: markj Date: Thu Jul 24 01:08:02 2014 New Revision: 269040 URL: http://svnweb.freebsd.org/changeset/base/269040 Log: MFC r262329: Define the KM_NORMALPRI flag for kmem_alloc(), as it is used in some upstream DTrace code. MFC r262330: 1452 DTrace buffer autoscaling should be less violent illumos/illumos-gate@6fb4854bed54ce82bd8610896b64ddebcd4af706 Modified: stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/buffering/tst.resize1.d stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/buffering/tst.resize2.d stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_options.c stable/9/sys/cddl/compat/opensolaris/sys/kmem.h stable/9/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Directory Properties: stable/9/cddl/contrib/opensolaris/ (props changed) stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/ (props changed) stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/buffering/tst.resize1.d ============================================================================== --- stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/buffering/tst.resize1.d Thu Jul 24 00:25:25 2014 (r269039) +++ stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/buffering/tst.resize1.d Thu Jul 24 01:08:02 2014 (r269040) @@ -24,8 +24,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * ASSERTION: * Checks that setting "bufresize" to "auto" will cause buffer @@ -34,14 +32,8 @@ * SECTION: Buffers and Buffering/Buffer Resizing Policy; * Options and Tunables/bufsize; * Options and Tunables/bufresize - * - * NOTES: - * We use the undocumented "preallocate" option to make sure dtrace(1M) - * has enough space in its heap to allocate a buffer as large as the - * kernel's trace buffer. */ -#pragma D option preallocate=100t #pragma D option bufresize=auto #pragma D option bufsize=100t Modified: stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/buffering/tst.resize2.d ============================================================================== --- stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/buffering/tst.resize2.d Thu Jul 24 00:25:25 2014 (r269039) +++ stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/buffering/tst.resize2.d Thu Jul 24 01:08:02 2014 (r269040) @@ -24,8 +24,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * ASSERTION: * Checks that setting "bufresize" to "auto" will cause buffer @@ -34,14 +32,8 @@ * SECTION: Buffers and Buffering/Buffer Resizing Policy; * Options and Tunables/aggsize; * Options and Tunables/bufresize - * - * NOTES: - * We use the undocumented "preallocate" option to make sure dtrace(1M) - * has enough space in its heap to allocate a buffer as large as the - * kernel's trace buffer. */ -#pragma D option preallocate=100t #pragma D option bufresize=auto #pragma D option aggsize=100t Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_options.c ============================================================================== --- stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_options.c Thu Jul 24 00:25:25 2014 (r269039) +++ stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_options.c Thu Jul 24 01:08:02 2014 (r269040) @@ -24,8 +24,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * Copyright (c) 2012 by Delphix. All rights reserved. */ @@ -906,30 +904,6 @@ dt_options_load(dtrace_hdl_t *dtp) return (0); } -/*ARGSUSED*/ -static int -dt_opt_preallocate(dtrace_hdl_t *dtp, const char *arg, uintptr_t option) -{ - dtrace_optval_t size; - void *p; - - if (arg == NULL || dt_optval_parse(arg, &size) != 0) - return (dt_set_errno(dtp, EDT_BADOPTVAL)); - - if (size > SIZE_MAX) - size = SIZE_MAX; - - if ((p = dt_zalloc(dtp, size)) == NULL) { - do { - size /= 2; - } while ((p = dt_zalloc(dtp, size)) == NULL); - } - - dt_free(dtp, p); - - return (0); -} - typedef struct dt_option { const char *o_name; int (*o_func)(dtrace_hdl_t *, const char *, uintptr_t); @@ -968,7 +942,6 @@ static const dt_option_t _dtrace_ctoptio { "linktype", dt_opt_linktype }, { "nolibs", dt_opt_cflags, DTRACE_C_NOLIBS }, { "pgmax", dt_opt_pgmax }, - { "preallocate", dt_opt_preallocate }, { "pspec", dt_opt_cflags, DTRACE_C_PSPEC }, { "setenv", dt_opt_setenv, 1 }, { "stdc", dt_opt_stdc }, Modified: stable/9/sys/cddl/compat/opensolaris/sys/kmem.h ============================================================================== --- stable/9/sys/cddl/compat/opensolaris/sys/kmem.h Thu Jul 24 00:25:25 2014 (r269039) +++ stable/9/sys/cddl/compat/opensolaris/sys/kmem.h Thu Jul 24 01:08:02 2014 (r269040) @@ -46,8 +46,9 @@ MALLOC_DECLARE(M_SOLARIS); #define KM_PUSHPAGE M_WAITOK #define KM_NOSLEEP M_NOWAIT #define KM_NODEBUG M_NODUMP -#define KMC_NOTOUCH 0 +#define KM_NORMALPRI 0 #define KMC_NODEBUG UMA_ZONE_NODUMP +#define KMC_NOTOUCH 0 typedef struct kmem_cache { char kc_name[32]; Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Thu Jul 24 00:25:25 2014 (r269039) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Thu Jul 24 01:08:02 2014 (r269040) @@ -10809,17 +10809,20 @@ dtrace_buffer_activate(dtrace_state_t *s static int dtrace_buffer_alloc(dtrace_buffer_t *bufs, size_t size, int flags, - processorid_t cpu) + processorid_t cpu, int *factor) { #if defined(sun) cpu_t *cp; #endif dtrace_buffer_t *buf; + int allocated = 0, desired = 0; #if defined(sun) ASSERT(MUTEX_HELD(&cpu_lock)); ASSERT(MUTEX_HELD(&dtrace_lock)); + *factor = 1; + if (size > dtrace_nonroot_maxsize && !PRIV_POLICY_CHOICE(CRED(), PRIV_ALL, B_FALSE)) return (EFBIG); @@ -10843,7 +10846,8 @@ dtrace_buffer_alloc(dtrace_buffer_t *buf ASSERT(buf->dtb_xamot == NULL); - if ((buf->dtb_tomax = kmem_zalloc(size, KM_NOSLEEP)) == NULL) + if ((buf->dtb_tomax = kmem_zalloc(size, + KM_NOSLEEP | KM_NORMALPRI)) == NULL) goto err; buf->dtb_size = size; @@ -10854,7 +10858,8 @@ dtrace_buffer_alloc(dtrace_buffer_t *buf if (flags & DTRACEBUF_NOSWITCH) continue; - if ((buf->dtb_xamot = kmem_zalloc(size, KM_NOSLEEP)) == NULL) + if ((buf->dtb_xamot = kmem_zalloc(size, + KM_NOSLEEP | KM_NORMALPRI)) == NULL) goto err; } while ((cp = cp->cpu_next) != cpu_list); @@ -10868,27 +10873,29 @@ err: continue; buf = &bufs[cp->cpu_id]; + desired += 2; if (buf->dtb_xamot != NULL) { ASSERT(buf->dtb_tomax != NULL); ASSERT(buf->dtb_size == size); kmem_free(buf->dtb_xamot, size); + allocated++; } if (buf->dtb_tomax != NULL) { ASSERT(buf->dtb_size == size); kmem_free(buf->dtb_tomax, size); + allocated++; } buf->dtb_tomax = NULL; buf->dtb_xamot = NULL; buf->dtb_size = 0; } while ((cp = cp->cpu_next) != cpu_list); - - return (ENOMEM); #else int i; + *factor = 1; #if defined(__amd64__) /* * FreeBSD isn't good at limiting the amount of memory we @@ -10896,7 +10903,7 @@ err: * to do something that might well end in tears at bedtime. */ if (size > physmem * PAGE_SIZE / (128 * (mp_maxid + 1))) - return(ENOMEM); + return (ENOMEM); #endif ASSERT(MUTEX_HELD(&dtrace_lock)); @@ -10918,7 +10925,8 @@ err: ASSERT(buf->dtb_xamot == NULL); - if ((buf->dtb_tomax = kmem_zalloc(size, KM_NOSLEEP)) == NULL) + if ((buf->dtb_tomax = kmem_zalloc(size, + KM_NOSLEEP | KM_NORMALPRI)) == NULL) goto err; buf->dtb_size = size; @@ -10929,7 +10937,8 @@ err: if (flags & DTRACEBUF_NOSWITCH) continue; - if ((buf->dtb_xamot = kmem_zalloc(size, KM_NOSLEEP)) == NULL) + if ((buf->dtb_xamot = kmem_zalloc(size, + KM_NOSLEEP | KM_NORMALPRI)) == NULL) goto err; } @@ -10945,16 +10954,19 @@ err: continue; buf = &bufs[i]; + desired += 2; if (buf->dtb_xamot != NULL) { ASSERT(buf->dtb_tomax != NULL); ASSERT(buf->dtb_size == size); kmem_free(buf->dtb_xamot, size); + allocated++; } if (buf->dtb_tomax != NULL) { ASSERT(buf->dtb_size == size); kmem_free(buf->dtb_tomax, size); + allocated++; } buf->dtb_tomax = NULL; @@ -10962,9 +10974,10 @@ err: buf->dtb_size = 0; } +#endif + *factor = desired / (allocated > 0 ? allocated : 1); return (ENOMEM); -#endif } /* @@ -12918,7 +12931,7 @@ dtrace_dstate_init(dtrace_dstate_t *dsta if (size < (min = dstate->dtds_chunksize + sizeof (dtrace_dynhash_t))) size = min; - if ((base = kmem_zalloc(size, KM_NOSLEEP)) == NULL) + if ((base = kmem_zalloc(size, KM_NOSLEEP | KM_NORMALPRI)) == NULL) return (ENOMEM); dstate->dtds_size = size; @@ -13370,7 +13383,7 @@ dtrace_state_buffer(dtrace_state_t *stat { dtrace_optval_t *opt = state->dts_options, size; processorid_t cpu = 0;; - int flags = 0, rval; + int flags = 0, rval, factor, divisor = 1; ASSERT(MUTEX_HELD(&dtrace_lock)); ASSERT(MUTEX_HELD(&cpu_lock)); @@ -13400,7 +13413,7 @@ dtrace_state_buffer(dtrace_state_t *stat flags |= DTRACEBUF_INACTIVE; } - for (size = opt[which]; size >= sizeof (uint64_t); size >>= 1) { + for (size = opt[which]; size >= sizeof (uint64_t); size /= divisor) { /* * The size must be 8-byte aligned. If the size is not 8-byte * aligned, drop it down by the difference. @@ -13418,7 +13431,7 @@ dtrace_state_buffer(dtrace_state_t *stat return (E2BIG); } - rval = dtrace_buffer_alloc(buf, size, flags, cpu); + rval = dtrace_buffer_alloc(buf, size, flags, cpu, &factor); if (rval != ENOMEM) { opt[which] = size; @@ -13427,6 +13440,9 @@ dtrace_state_buffer(dtrace_state_t *stat if (opt[DTRACEOPT_BUFRESIZE] == DTRACEOPT_BUFRESIZE_MANUAL) return (rval); + + for (divisor = 2; divisor < factor; divisor <<= 1) + continue; } return (ENOMEM); @@ -13528,7 +13544,8 @@ dtrace_state_go(dtrace_state_t *state, p goto out; } - spec = kmem_zalloc(nspec * sizeof (dtrace_speculation_t), KM_NOSLEEP); + spec = kmem_zalloc(nspec * sizeof (dtrace_speculation_t), + KM_NOSLEEP | KM_NORMALPRI); if (spec == NULL) { rval = ENOMEM; @@ -13539,7 +13556,8 @@ dtrace_state_go(dtrace_state_t *state, p state->dts_nspeculations = (int)nspec; for (i = 0; i < nspec; i++) { - if ((buf = kmem_zalloc(bufsize, KM_NOSLEEP)) == NULL) { + if ((buf = kmem_zalloc(bufsize, + KM_NOSLEEP | KM_NORMALPRI)) == NULL) { rval = ENOMEM; goto err; } From owner-svn-src-stable-9@FreeBSD.ORG Thu Jul 24 09:40:31 2014 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 930BBA18; Thu, 24 Jul 2014 09:40: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 7F9D42ADB; Thu, 24 Jul 2014 09:40:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6O9eVjV032411; Thu, 24 Jul 2014 09:40:31 GMT (envelope-from erwin@svn.freebsd.org) Received: (from erwin@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6O9eVvU032410; Thu, 24 Jul 2014 09:40:31 GMT (envelope-from erwin@svn.freebsd.org) Message-Id: <201407240940.s6O9eVvU032410@svn.freebsd.org> From: Erwin Lansing Date: Thu, 24 Jul 2014 09:40:31 +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: r269049 - stable/9/etc/namedb X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Jul 2014 09:40:31 -0000 Author: erwin Date: Thu Jul 24 09:40:31 2014 New Revision: 269049 URL: http://svnweb.freebsd.org/changeset/base/269049 Log: Sync with 2014060201 which adds IPv6 to b.root-servers.net Note that this is a direct commit to stable/9 as this file is no longer in HEAD. Sponsored by: DK Hostmaster A/S Modified: stable/9/etc/namedb/named.root Modified: stable/9/etc/namedb/named.root ============================================================================== --- stable/9/etc/namedb/named.root Thu Jul 24 06:16:51 2014 (r269048) +++ stable/9/etc/namedb/named.root Thu Jul 24 09:40:31 2014 (r269049) @@ -13,8 +13,8 @@ ; on server FTP.INTERNIC.NET ; -OR- RS.INTERNIC.NET ; -; last update: Mar 26, 2014 -; related version of root zone: 2014032601 +; last update: June 2, 2014 +; related version of root zone: 2014060201 ; ; formerly NS.INTERNIC.NET ; @@ -26,6 +26,7 @@ A.ROOT-SERVERS.NET. 3600000 AA ; . 3600000 NS B.ROOT-SERVERS.NET. B.ROOT-SERVERS.NET. 3600000 A 192.228.79.201 +B.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:84::B ; ; FORMERLY C.PSI.NET ; From owner-svn-src-stable-9@FreeBSD.ORG Thu Jul 24 11:17:27 2014 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1D0C9FD3; Thu, 24 Jul 2014 11:17: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 09D382428; Thu, 24 Jul 2014 11:17:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6OBHQp5077238; Thu, 24 Jul 2014 11:17:26 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6OBHQLV077237; Thu, 24 Jul 2014 11:17:26 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201407241117.s6OBHQLV077237@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 24 Jul 2014 11:17:26 +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: r269057 - stable/9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Jul 2014 11:17:27 -0000 Author: kib Date: Thu Jul 24 11:17:26 2014 New Revision: 269057 URL: http://svnweb.freebsd.org/changeset/base/269057 Log: MFC r268384: When the lock was stolen from us, retry the whole lock sequence in kernel, instead of returning EINTR. Modified: stable/9/sys/kern/kern_lockf.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/kern_lockf.c ============================================================================== --- stable/9/sys/kern/kern_lockf.c Thu Jul 24 10:45:52 2014 (r269056) +++ stable/9/sys/kern/kern_lockf.c Thu Jul 24 11:17:26 2014 (r269057) @@ -469,6 +469,9 @@ lf_advlockasync(struct vop_advlockasync_ return (EOVERFLOW); end = start + oadd; } + +retry_setlock: + /* * Avoid the common case of unlocking when inode has no locks. */ @@ -744,6 +747,11 @@ lf_advlockasync(struct vop_advlockasync_ sx_destroy(&freestate->ls_lock); free(freestate, M_LOCKF); } + + if (error == EDOOFUS) { + KASSERT(ap->a_op == F_SETLK, ("EDOOFUS")); + goto retry_setlock; + } return (error); } @@ -1459,7 +1467,7 @@ lf_setlock(struct lockf *state, struct l lock->lf_refs++; error = sx_sleep(lock, &state->ls_lock, priority, lockstr, 0); if (lf_free_lock(lock)) { - error = EINTR; + error = EDOOFUS; goto out; } From owner-svn-src-stable-9@FreeBSD.ORG Thu Jul 24 14:57:58 2014 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E8E81277; Thu, 24 Jul 2014 14:57: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 D54612870; Thu, 24 Jul 2014 14:57:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6OEvwLd082420; Thu, 24 Jul 2014 14:57:58 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6OEvwrs082419; Thu, 24 Jul 2014 14:57:58 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201407241457.s6OEvwrs082419@svn.freebsd.org> From: Alexander Motin Date: Thu, 24 Jul 2014 14:57:58 +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: r269062 - 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-stable-9@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Jul 2014 14:57:59 -0000 Author: mav Date: Thu Jul 24 14:57:58 2014 New Revision: 269062 URL: http://svnweb.freebsd.org/changeset/base/269062 Log: MFC r268420: Remove IO_SYNC flag when writing extended file attributes on ZFS. While it is possible to create and write file, modify its permissions, etc. without ever doing sync, it looks odd that it is required for setting extended file attributes on ZFS. UFS does not do sync there too. Samba uses those extended attributes to store some its data, and doing it synchronously by many times reduces file creation performance for systems without SLOG device. Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Directory Properties: stable/9/ (props changed) 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_vnops.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Thu Jul 24 14:55:45 2014 (r269061) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Thu Jul 24 14:57:58 2014 (r269062) @@ -6778,7 +6778,7 @@ vop_setextattr { va.va_size = 0; error = VOP_SETATTR(vp, &va, ap->a_cred); if (error == 0) - VOP_WRITE(vp, ap->a_uio, IO_UNIT | IO_SYNC, ap->a_cred); + VOP_WRITE(vp, ap->a_uio, IO_UNIT, ap->a_cred); VOP_UNLOCK(vp, 0); vn_close(vp, flags, ap->a_cred, td); From owner-svn-src-stable-9@FreeBSD.ORG Fri Jul 25 00:35:45 2014 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 10AFB1C5; Fri, 25 Jul 2014 00:35: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 EF5702B35; Fri, 25 Jul 2014 00:35:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6P0ZiZ5093507; Fri, 25 Jul 2014 00:35:44 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6P0ZiUG093503; Fri, 25 Jul 2014 00:35:44 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201407250035.s6P0ZiUG093503@svn.freebsd.org> From: Navdeep Parhar Date: Fri, 25 Jul 2014 00:35:44 +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: r269083 - in stable/9/sys/dev/cxgbe: . common X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Jul 2014 00:35:45 -0000 Author: np Date: Fri Jul 25 00:35:43 2014 New Revision: 269083 URL: http://svnweb.freebsd.org/changeset/base/269083 Log: MFC r268640 and r268989. r268640: Allow multi-byte reads in the private CHELSIO_T4_GET_I2C ioctl. The firmware allows up to 48B to be read this way but the driver limits itself to 8B at a time to remain compatible with old cxgbetool binaries. r268989: Add missing newline to an error message. Modified: stable/9/sys/dev/cxgbe/common/common.h stable/9/sys/dev/cxgbe/common/t4_hw.c stable/9/sys/dev/cxgbe/t4_main.c stable/9/sys/dev/cxgbe/t4_sge.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/cxgbe/common/common.h ============================================================================== --- stable/9/sys/dev/cxgbe/common/common.h Fri Jul 25 00:30:55 2014 (r269082) +++ stable/9/sys/dev/cxgbe/common/common.h Fri Jul 25 00:35:43 2014 (r269083) @@ -583,12 +583,18 @@ int t4_enable_vi(struct adapter *adap, u bool rx_en, bool tx_en); int t4_identify_port(struct adapter *adap, unsigned int mbox, unsigned int viid, unsigned int nblinks); -int t4_i2c_rd(struct adapter *adap, unsigned int mbox, unsigned int port_id, - u8 dev_addr, u8 offset, u8 *valp); int t4_mdio_rd(struct adapter *adap, unsigned int mbox, unsigned int phy_addr, unsigned int mmd, unsigned int reg, unsigned int *valp); int t4_mdio_wr(struct adapter *adap, unsigned int mbox, unsigned int phy_addr, unsigned int mmd, unsigned int reg, unsigned int val); +int t4_i2c_rd(struct adapter *adap, unsigned int mbox, + int port, unsigned int devid, + unsigned int offset, unsigned int len, + u8 *buf); +int t4_i2c_wr(struct adapter *adap, unsigned int mbox, + int port, unsigned int devid, + unsigned int offset, unsigned int len, + u8 *buf); int t4_iq_start_stop(struct adapter *adap, unsigned int mbox, bool start, unsigned int pf, unsigned int vf, unsigned int iqid, unsigned int fl0id, unsigned int fl1id); Modified: stable/9/sys/dev/cxgbe/common/t4_hw.c ============================================================================== --- stable/9/sys/dev/cxgbe/common/t4_hw.c Fri Jul 25 00:30:55 2014 (r269082) +++ stable/9/sys/dev/cxgbe/common/t4_hw.c Fri Jul 25 00:35:43 2014 (r269083) @@ -4143,36 +4143,6 @@ int t4_fwaddrspace_write(struct adapter } /** - * t4_i2c_rd - read a byte from an i2c addressable device - * @adap: the adapter - * @mbox: mailbox to use for the FW command - * @port_id: the port id - * @dev_addr: the i2c device address - * @offset: the byte offset to read from - * @valp: where to store the value - */ -int t4_i2c_rd(struct adapter *adap, unsigned int mbox, unsigned int port_id, - u8 dev_addr, u8 offset, u8 *valp) -{ - int ret; - struct fw_ldst_cmd c; - - memset(&c, 0, sizeof(c)); - c.op_to_addrspace = htonl(V_FW_CMD_OP(FW_LDST_CMD) | F_FW_CMD_REQUEST | - F_FW_CMD_READ | - V_FW_LDST_CMD_ADDRSPACE(FW_LDST_ADDRSPC_FUNC_I2C)); - c.cycles_to_len16 = htonl(FW_LEN16(c)); - c.u.i2c_deprecated.pid_pkd = V_FW_LDST_CMD_PID(port_id); - c.u.i2c_deprecated.base = dev_addr; - c.u.i2c_deprecated.boffset = offset; - - ret = t4_wr_mbox(adap, mbox, &c, sizeof(c), &c); - if (ret == 0) - *valp = c.u.i2c_deprecated.data; - return ret; -} - -/** * t4_mdio_rd - read a PHY register through MDIO * @adap: the adapter * @mbox: mailbox to use for the FW command @@ -4232,6 +4202,87 @@ int t4_mdio_wr(struct adapter *adap, uns } /** + * t4_i2c_rd - read I2C data from adapter + * @adap: the adapter + * @port: Port number if per-port device; <0 if not + * @devid: per-port device ID or absolute device ID + * @offset: byte offset into device I2C space + * @len: byte length of I2C space data + * @buf: buffer in which to return I2C data + * + * Reads the I2C data from the indicated device and location. + */ +int t4_i2c_rd(struct adapter *adap, unsigned int mbox, + int port, unsigned int devid, + unsigned int offset, unsigned int len, + u8 *buf) +{ + struct fw_ldst_cmd ldst; + int ret; + + if (port >= 4 || + devid >= 256 || + offset >= 256 || + len > sizeof ldst.u.i2c.data) + return -EINVAL; + + memset(&ldst, 0, sizeof ldst); + ldst.op_to_addrspace = + cpu_to_be32(V_FW_CMD_OP(FW_LDST_CMD) | + F_FW_CMD_REQUEST | + F_FW_CMD_READ | + V_FW_LDST_CMD_ADDRSPACE(FW_LDST_ADDRSPC_I2C)); + ldst.cycles_to_len16 = cpu_to_be32(FW_LEN16(ldst)); + ldst.u.i2c.pid = (port < 0 ? 0xff : port); + ldst.u.i2c.did = devid; + ldst.u.i2c.boffset = offset; + ldst.u.i2c.blen = len; + ret = t4_wr_mbox(adap, mbox, &ldst, sizeof ldst, &ldst); + if (!ret) + memcpy(buf, ldst.u.i2c.data, len); + return ret; +} + +/** + * t4_i2c_wr - write I2C data to adapter + * @adap: the adapter + * @port: Port number if per-port device; <0 if not + * @devid: per-port device ID or absolute device ID + * @offset: byte offset into device I2C space + * @len: byte length of I2C space data + * @buf: buffer containing new I2C data + * + * Write the I2C data to the indicated device and location. + */ +int t4_i2c_wr(struct adapter *adap, unsigned int mbox, + int port, unsigned int devid, + unsigned int offset, unsigned int len, + u8 *buf) +{ + struct fw_ldst_cmd ldst; + + if (port >= 4 || + devid >= 256 || + offset >= 256 || + len > sizeof ldst.u.i2c.data) + return -EINVAL; + + memset(&ldst, 0, sizeof ldst); + ldst.op_to_addrspace = + cpu_to_be32(V_FW_CMD_OP(FW_LDST_CMD) | + F_FW_CMD_REQUEST | + F_FW_CMD_WRITE | + V_FW_LDST_CMD_ADDRSPACE(FW_LDST_ADDRSPC_I2C)); + ldst.cycles_to_len16 = cpu_to_be32(FW_LEN16(ldst)); + ldst.u.i2c.pid = (port < 0 ? 0xff : port); + ldst.u.i2c.did = devid; + ldst.u.i2c.boffset = offset; + ldst.u.i2c.blen = len; + memcpy(ldst.u.i2c.data, buf, len); + return t4_wr_mbox(adap, mbox, &ldst, sizeof ldst, &ldst); +} + +/** * t4_sge_ctxt_flush - flush the SGE context cache * @adap: the adapter * @mbox: mailbox to use for the FW command Modified: stable/9/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/9/sys/dev/cxgbe/t4_main.c Fri Jul 25 00:30:55 2014 (r269082) +++ stable/9/sys/dev/cxgbe/t4_main.c Fri Jul 25 00:35:43 2014 (r269083) @@ -7351,16 +7351,14 @@ read_i2c(struct adapter *sc, struct t4_i if (i2cd->len == 0 || i2cd->port_id >= sc->params.nports) return (EINVAL); - if (i2cd->len > 1) { - /* XXX: need fw support for longer reads in one go */ - return (ENOTSUP); - } + if (i2cd->len > sizeof(i2cd->data)) + return (EFBIG); rc = begin_synchronized_op(sc, NULL, SLEEP_OK | INTR_OK, "t4i2crd"); if (rc) return (rc); rc = -t4_i2c_rd(sc, sc->mbox, i2cd->port_id, i2cd->dev_addr, - i2cd->offset, &i2cd->data[0]); + i2cd->offset, i2cd->len, &i2cd->data[0]); end_synchronized_op(sc, 0); return (rc); Modified: stable/9/sys/dev/cxgbe/t4_sge.c ============================================================================== --- stable/9/sys/dev/cxgbe/t4_sge.c Fri Jul 25 00:30:55 2014 (r269082) +++ stable/9/sys/dev/cxgbe/t4_sge.c Fri Jul 25 00:35:43 2014 (r269083) @@ -2712,7 +2712,7 @@ alloc_eq(struct adapter *sc, struct port } if (rc != 0) { device_printf(sc->dev, - "failed to allocate egress queue(%d): %d", + "failed to allocate egress queue(%d): %d\n", eq->flags & EQ_TYPEMASK, rc); } From owner-svn-src-stable-9@FreeBSD.ORG Fri Jul 25 15:07:08 2014 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1D487A4A; Fri, 25 Jul 2014 15:07: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 0A3BA2B6E; Fri, 25 Jul 2014 15:07:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6PF77wR091532; Fri, 25 Jul 2014 15:07:07 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6PF77Lv091531; Fri, 25 Jul 2014 15:07:07 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201407251507.s6PF77Lv091531@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 25 Jul 2014 15:07:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r269090 - stable/9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Jul 2014 15:07:08 -0000 Author: kib Date: Fri Jul 25 15:07:07 2014 New Revision: 269090 URL: http://svnweb.freebsd.org/changeset/base/269090 Log: Partial MFC of r268466: Add a knob to disable the residency calculation for kern.proc.vmmap. Tested by: "Ivan A. Kosarev" Modified: stable/9/sys/kern/kern_proc.c Modified: stable/9/sys/kern/kern_proc.c ============================================================================== --- stable/9/sys/kern/kern_proc.c Fri Jul 25 14:47:44 2014 (r269089) +++ stable/9/sys/kern/kern_proc.c Fri Jul 25 15:07:07 2014 (r269090) @@ -141,6 +141,10 @@ uma_zone_t proc_zone; int kstack_pages = KSTACK_PAGES; SYSCTL_INT(_kern, OID_AUTO, kstack_pages, CTLFLAG_RD, &kstack_pages, 0, "Kernel stack size in pages"); +static int vmmap_skip_res_cnt = 0; +SYSCTL_INT(_kern, OID_AUTO, proc_vmmap_skip_resident_count, CTLFLAG_RW, + &vmmap_skip_res_cnt, 0, + "Skip calculation of the pages resident count in kern.proc.vmmap"); CTASSERT(sizeof(struct kinfo_proc) == KINFO_PROC_SIZE); #ifdef COMPAT_FREEBSD32 @@ -2189,6 +2193,8 @@ kern_proc_vmmap_out(struct proc *p, stru } kve->kve_resident = 0; addr = entry->start; + if (vmmap_skip_res_cnt) + goto skip_resident_count; while (addr < entry->end) { locked_pa = 0; mincoreinfo = pmap_mincore(map->pmap, addr, &locked_pa); @@ -2201,6 +2207,7 @@ kern_proc_vmmap_out(struct proc *p, stru addr += PAGE_SIZE; } +skip_resident_count: for (lobj = tobj = obj; tobj; tobj = tobj->backing_object) { if (tobj != obj) VM_OBJECT_LOCK(tobj);