From owner-svn-src-all@FreeBSD.ORG Sun Oct 9 01:11:41 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id 3CBB71065670; Sun, 9 Oct 2011 01:11:41 +0000 (UTC) Date: Sun, 9 Oct 2011 01:11:41 +0000 From: Alexander Best To: Ed Schouten Message-ID: <20111009011141.GA63608@freebsd.org> References: <201109290631.p8T6VgJ3008377@svn.freebsd.org> <20110929121457.GA53600@freebsd.org> <20111001130643.GC91943@hoeg.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20111001130643.GC91943@hoeg.nl> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Edward Tomasz Napierala Subject: Re: svn commit: r225868 - head/bin/ps X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 09 Oct 2011 01:11:41 -0000 On Sat Oct 1 11, Ed Schouten wrote: > * Alexander Best , 20110929 14:14: > > i think i wrote you about the two spaces between the "TT" and "TIME" field > > some time ago. you said that the "TT" entry can contain a postfix "-". can > > you describe a situation, where this can occur? i've never seen the "TT" field > > contain an entry larger than 2 chars. > > Also, it would be better if we replaced the "??" string with "-". When > we print "??", it actually means: this process has no controlling > terminal, not that we don't know which TTY it is. i've adjusted ps(1) and now the output looks like this: otaku% ps -xOtty,tdev PID TTY TDEV TT STAT TIME COMMAND 1427 - - - Is 15:02,64 /usr/local/bin/musicpd /usr/local/etc/musicpd.conf 1692 - - - Is 0:00,15 ssh-agent 1740 - - - Ss 0:00,69 /usr/local/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session 1744 - - - Is 10:02,33 /usr/local/bin/sakura 1746 - - - S 3:24,25 /usr/local/libexec/gam_server 45117 - - - Ss 3:29,84 /usr/local/bin/pidgin 55734 - - - Is 17:03,48 /usr/local/bin/python2.7 /usr/local/bin/sonata 63888 - - - Is 3:21,53 chromium-browser: (chrome) 63889 - - - I 0:05,26 chromium-browser: (chrome) 63890 - - - I 0:00,43 chrome: --type=zygote (chrome) 63891 - - - S 0:50,87 chrome: --type=zygote (chrome) 63892 - - - I 0:21,03 chrome: --type=zygote (chrome) 63893 - - - I 0:06,14 chrome: --type=zygote (chrome) 63894 - - - S 0:21,96 chrome: --type=zygote (chrome) 63904 - - - I 0:08,63 chrome: --type=zygote (chrome) 63905 - - - I 0:03,64 chrome: --type=zygote (chrome) 63907 - - - S 0:38,14 chrome: --type=zygote (chrome) 63908 - - - S 0:33,20 chrome: --type=zygote (chrome) 63909 - - - S 0:14,13 chrome: --type=zygote (chrome) 63910 - - - S 0:14,96 chrome: --type=zygote (chrome) 63911 - - - S 0:21,98 chrome: --type=zygote (chrome) 63913 - - - I 0:06,10 chrome: --type=zygote (chrome) 63914 - - - I 0:05,95 chrome: --type=zygote (chrome) 63915 - - - I 0:03,11 chrome: --type=zygote (chrome) 63916 - - - S 0:20,96 chrome: --type=zygote (chrome) 63917 - - - I 0:09,19 chrome: --type=zygote (chrome) 64191 - - - Z 0:07,58 64270 - - - I 0:31,20 chrome: --type=zygote (chrome) 64271 - - - I 0:12,39 chrome: --type=zygote (chrome) 64326 - - - I 0:08,61 chrome: --type=zygote (chrome) 64327 - - - I 0:03,11 chrome: --type=zygote (chrome) 64341 - - - I 0:05,40 chrome: --type=zygote (chrome) 64361 - - - I 0:12,72 chrome: --type=zygote (chrome) 64664 - - - Z 0:00,60 65411 - - - S 0:00,01 /usr/local/bin/pidgin 1664 ttyv0 0x2f v0 IW 0:00,00 -zsh (zsh) 1712 ttyv0 0x2f v0 IW+ 0:00,00 /bin/sh /usr/local/bin/startx 1730 ttyv0 0x2f v0 IW+ 0:00,00 xinit /home/arundel/.xinitrc -- /home/arundel/.xserverrc :0 -auth /home/arundel/.serverauth.1712 1734 ttyv0 0x2f v0 IW 0:00,00 sh /home/arundel/.xinitrc 1735 ttyv0 0x2f v0 S 39:35,89 /usr/local/bin/awesome 1739 ttyv0 0x2f v0 I 0:00,00 dbus-launch --autolaunch 1210d605f192e5e97cd9d23a00043997 --binary-syntax --close-stderr 55738 pts/0 0x6b 0 IWs 0:00,00 /usr/local/bin/zsh 62073 pts/0 0x6b 0 I+ 0:02,11 ssh hub 64131 pts/5 0x6c 5 Is+ 0:00,09 /usr/local/bin/zsh 64134 pts/6 0x96 6 Is+ 0:00,50 /usr/local/bin/zsh 63523 pts/1 0x99 1 Is+ 0:00,10 /usr/local/bin/zsh 63586 pts/2 0x9a 2 Is 0:00,05 /usr/local/bin/zsh 64254 pts/2 0x9a 2 I+ 0:00,37 ssh hub 63656 pts/3 0x9c 3 Is 0:00,22 /usr/local/bin/zsh 64267 pts/3 0x9c 3 I+ 0:00,63 ssh freefall 64382 pts/7 0x9d 7 Ss 0:00,16 /usr/local/bin/zsh 65413 pts/7 0x9d 7 R+ 0:00,00 ps -xOtty,tdev 64384 pts/8 0x9e 8 Is 0:00,13 /usr/local/bin/zsh 64470 pts/8 0x9e 8 I 0:00,12 zsh 64642 pts/8 0x9e 8 I+ 0:00,09 edit machine.c 64484 pts/9 0x9f 9 Is+ 0:00,24 /usr/local/bin/zsh is this what you had in mind? cheers. alex > > -- > Ed Schouten > WWW: http://80386.nl/ From owner-svn-src-all@FreeBSD.ORG Sun Oct 9 06:34:23 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E9258106564A; Sun, 9 Oct 2011 06:34:22 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.64.117]) by mx1.freebsd.org (Postfix) with ESMTP id 81E718FC0A; Sun, 9 Oct 2011 06:34:22 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.4/8.14.4) with ESMTP id p996YLEr047335; Sun, 9 Oct 2011 10:34:21 +0400 (MSD) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.4/8.14.4/Submit) id p996YKb0047334; Sun, 9 Oct 2011 10:34:21 +0400 (MSD) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Sun, 9 Oct 2011 10:34:20 +0400 From: Gleb Smirnoff To: melifaro@FreeBSD.org Message-ID: <20111009063420.GZ94905@FreeBSD.org> References: <201109151228.p8FCSHVY073618@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <201109151228.p8FCSHVY073618@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, "Andrey V. Elsukov" , svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r225586 - in head/sys: modules/netgraph/ipfw netgraph X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 09 Oct 2011 06:34:23 -0000 Alexander, Andrey, see a couple of comments below please. On Thu, Sep 15, 2011 at 12:28:17PM +0000, Andrey V. Elsukov wrote: A> Author: ae A> Date: Thu Sep 15 12:28:17 2011 A> New Revision: 225586 A> URL: http://svn.freebsd.org/changeset/base/225586 A> A> Log: A> Add IPv6 support to the ng_ipfw(4) [1]. Also add ifdefs to be able A> build it with and without INET/INET6 support. A> A> Submitted by: Alexander V. Chernikov [1] A> Tested by: Alexander V. Chernikov [1] A> Approved by: re (bz) A> MFC after: 2 weeks A> A> Modified: A> head/sys/modules/netgraph/ipfw/Makefile A> head/sys/netgraph/ng_ipfw.c A> A> Modified: head/sys/modules/netgraph/ipfw/Makefile A> ============================================================================== A> --- head/sys/modules/netgraph/ipfw/Makefile Thu Sep 15 12:27:26 2011 (r225585) A> +++ head/sys/modules/netgraph/ipfw/Makefile Thu Sep 15 12:28:17 2011 (r225586) A> @@ -1,6 +1,20 @@ A> # $FreeBSD$ A> A> +.include A> + A> KMOD= ng_ipfw A> -SRCS= ng_ipfw.c A> +SRCS= ng_ipfw.c opt_inet.h opt_inet6.h A> + A> +.if !defined(KERNBUILDDIR) A> + A> +.if ${MK_INET_SUPPORT} != "no" A> +opt_inet.h: A> + echo "#define INET 1" > ${.TARGET} A> +.endif A> +.if ${MK_INET6_SUPPORT} != "no" A> +opt_inet6.h: A> + echo "#define INET6 1" > ${.TARGET} A> +.endif A> +.endif A> A> .include A> A> Modified: head/sys/netgraph/ng_ipfw.c A> ============================================================================== A> --- head/sys/netgraph/ng_ipfw.c Thu Sep 15 12:27:26 2011 (r225585) A> +++ head/sys/netgraph/ng_ipfw.c Thu Sep 15 12:28:17 2011 (r225586) A> @@ -26,6 +26,9 @@ A> * $FreeBSD$ A> */ A> A> +#include "opt_inet.h" A> +#include "opt_inet6.h" A> + A> #include A> #include A> #include A> @@ -47,6 +50,8 @@ A> #include A> #include A> #include A> +#include A> +#include A> A> #include A> #include A> @@ -224,6 +229,7 @@ ng_ipfw_rcvdata(hook_p hook, item_p item A> struct m_tag *tag; A> struct ipfw_rule_ref *r; A> struct mbuf *m; A> + struct ip *ip; A> A> NGI_GET_M(item, m); A> NG_FREE_ITEM(item); A> @@ -234,23 +240,47 @@ ng_ipfw_rcvdata(hook_p hook, item_p item A> return (EINVAL); /* XXX: find smth better */ A> }; A> A> + if (m->m_len < sizeof(struct ip) && A> + (m = m_pullup(m, sizeof(struct ip))) == NULL) A> + return (EINVAL); In most cases we return ENOBUFS in case if m_pullup() failure. Lesser amount of code uses ENOMEM and EINVAL. I personally hate EINVAL, since it is usually used as one-for-all error, and thus is meaningless for user. A> + ip = mtod(m, struct ip *); A> + A> r = (struct ipfw_rule_ref *)(tag + 1); A> if (r->info & IPFW_INFO_IN) { A> - ip_input(m); A> + switch (ip->ip_v) { A> +#ifdef INET A> + case IPVERSION: A> + ip_input(m); A> + break; A> +#endif A> +#ifdef INET6 A> + case IPV6_VERSION >> 4: A> + ip6_input(m); A> + break; A> +#endif A> + default: A> + NG_FREE_M(m); A> + return (EINVAL); A> + } A> return (0); A> } else { A> - struct ip *ip; A> - A> - if (m->m_len < sizeof(struct ip) && A> - (m = m_pullup(m, sizeof(struct ip))) == NULL) A> + switch (ip->ip_v) { A> +#ifdef INET A> + case IPVERSION: A> + SET_HOST_IPLEN(ip); A> + return (ip_output(m, NULL, NULL, IP_FORWARDING, A> + NULL, NULL)); A> +#endif A> +#ifdef INET6 A> + case IPV6_VERSION >> 4: A> + return (ip6_output(m, NULL, NULL, 0, NULL, A> + NULL, NULL)); A> +#endif A> + default: A> return (EINVAL); Shouldn't you free the mbuf before returning? A> - A> - ip = mtod(m, struct ip *); A> - A> - SET_HOST_IPLEN(ip); A> - A> - return ip_output(m, NULL, NULL, IP_FORWARDING, NULL, NULL); A> - } A> + } A> + } A> } A> A> static int -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Sun Oct 9 07:20:09 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AE759106566C; Sun, 9 Oct 2011 07:20:09 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from mx0.hoeg.nl (mx0.hoeg.nl [IPv6:2a01:4f8:101:5343::aa]) by mx1.freebsd.org (Postfix) with ESMTP id 46B368FC13; Sun, 9 Oct 2011 07:20:09 +0000 (UTC) Received: by mx0.hoeg.nl (Postfix, from userid 1000) id 6C35D2A28CBF; Sun, 9 Oct 2011 09:20:08 +0200 (CEST) Date: Sun, 9 Oct 2011 09:20:08 +0200 From: Ed Schouten To: Alexander Best Message-ID: <20111009072008.GJ91943@hoeg.nl> References: <201109290631.p8T6VgJ3008377@svn.freebsd.org> <20110929121457.GA53600@freebsd.org> <20111001130643.GC91943@hoeg.nl> <20111009011141.GA63608@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="XKlTcsWBbb8blmHd" Content-Disposition: inline In-Reply-To: <20111009011141.GA63608@freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Edward Tomasz Napierala Subject: Re: svn commit: r225868 - head/bin/ps X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 09 Oct 2011 07:20:09 -0000 --XKlTcsWBbb8blmHd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Alexander Best , 20111009 03:11: > is this what you had in mind? Yes, exactly. :-) --=20 Ed Schouten WWW: http://80386.nl/ --XKlTcsWBbb8blmHd Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iQIcBAEBAgAGBQJOkUsoAAoJEG5e2P40kaK7b60QAJeVZ9kPjA0wIaw+NOCnSsic LinInVfi0F/Enu64mQjUUS2SeBL/7+NkudUSMH1ucrToRXbsZLV5SDqER+Nka1MO 6SF5ukR6iE/vex5VYLf8ChChdlr+Se4mVA87FE7SFweHCD5mySZSX/BQLqBNNvkj gIW1GFI/+u8m9FBIKmMgJvDAiSnA1/WVvZEvR1n7aygXV35Jj76wtDuQXMICjdGl MEfdZh67XLcMbb7v020Skyfgjd8Q2R2ZPnxxWWc/la+HcJn5lTd98uefBUAD7Jf7 BuGjqBBBc+BjH5bggp0izgowvUfZEu2dNPlsyB8Mm1BxfOLRUgTihJ/hwziwOIFD zwAOwPhzILsGDuURSKrYKTMuH++IYnljVF0IjiHGkzG0dyQBQzdMkwzJTGEGFgIN LWmP/qnkOCFsT2l1N17lSydNBoCZ8QsDKC9LO7PN35LVEWm+uc2yJ6cCT8aCrQ5a NnS45O2JQ/oTT1X1Gp74IVaRTH093N4Wt0ZNPUhCRuQitdPG7Jqn0m3GSsa/7yh3 Fb4eHXG+gfON/Gz2sDJtyGC48WevJzkNDmvSSrsVBAf7qZ1lTdxXS4PtkxB6DoMu lrX+p0kCgZEyco5gTAzslazOk1et+Iabp/nR8ly2WHmprT+JWAHPxFzf77mzr/gg 06nie7a8ihhTkRHXkvuf =5CFZ -----END PGP SIGNATURE----- --XKlTcsWBbb8blmHd-- From owner-svn-src-all@FreeBSD.ORG Sun Oct 9 08:16:16 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id 29FC2106566C; Sun, 9 Oct 2011 08:16:16 +0000 (UTC) Date: Sun, 9 Oct 2011 08:16:16 +0000 From: Alexander Best To: Ed Schouten Message-ID: <20111009081615.GA42235@freebsd.org> References: <201109290631.p8T6VgJ3008377@svn.freebsd.org> <20110929121457.GA53600@freebsd.org> <20111001130643.GC91943@hoeg.nl> <20111009011141.GA63608@freebsd.org> <20111009072008.GJ91943@hoeg.nl> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="AhhlLboLdkugWU4S" Content-Disposition: inline In-Reply-To: <20111009072008.GJ91943@hoeg.nl> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Edward Tomasz Napierala Subject: Re: svn commit: r225868 - head/bin/ps X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 09 Oct 2011 08:16:16 -0000 --AhhlLboLdkugWU4S Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sun Oct 9 11, Ed Schouten wrote: > * Alexander Best , 20111009 03:11: > > is this what you had in mind? > > Yes, exactly. :-) here you are. ;) > > -- > Ed Schouten > WWW: http://80386.nl/ --AhhlLboLdkugWU4S Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="print.c.diff" diff --git a/bin/ps/print.c b/bin/ps/print.c index 45c7823..021415f 100644 --- a/bin/ps/print.c +++ b/bin/ps/print.c @@ -362,7 +362,7 @@ tdev(KINFO *k, VARENT *ve) v = ve->var; dev = k->ki_p->ki_tdev; if (dev == NODEV) - str = strdup("??"); + str = strdup("-"); else asprintf(&str, "%#jx", (uintmax_t)dev); @@ -379,7 +379,7 @@ tname(KINFO *k, VARENT *ve) v = ve->var; dev = k->ki_p->ki_tdev; if (dev == NODEV || (ttname = devname(dev, S_IFCHR)) == NULL) - str = strdup("?? "); + str = strdup("- "); else { if (strncmp(ttname, "tty", 3) == 0 || strncmp(ttname, "cua", 3) == 0) @@ -403,7 +403,7 @@ longtname(KINFO *k, VARENT *ve) v = ve->var; dev = k->ki_p->ki_tdev; if (dev == NODEV || (ttname = devname(dev, S_IFCHR)) == NULL) - ttname = "??"; + ttname = "-"; return (strdup(ttname)); } --AhhlLboLdkugWU4S-- From owner-svn-src-all@FreeBSD.ORG Sun Oct 9 09:22:48 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C02FD106564A; Sun, 9 Oct 2011 09:22:48 +0000 (UTC) (envelope-from kmacybsd@gmail.com) Received: from mail-vx0-f182.google.com (mail-vx0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id 3609A8FC0C; Sun, 9 Oct 2011 09:22:47 +0000 (UTC) Received: by vcbf13 with SMTP id f13so5681026vcb.13 for ; Sun, 09 Oct 2011 02:22:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=e4e8VfpbfbvIyo08KsswH/4XQQHbBf0m2owQDcFBXAQ=; b=daRKjrD+e2DSAVSJrFAo0DCRZEZgBMc03Ht6DfJc9iRMTtlyAE1DWt8DWvv5S7M4S2 HNWR6WiKLQArQi3yKRWXneaY5mnM/aX6PFy0fpHYpRXo5MGwXLS8KHFcMXr/BPS4jy8V /bhAHJKwMT4BXIdsIBvqOdYMb22RoWEkdkFAA= MIME-Version: 1.0 Received: by 10.52.25.75 with SMTP id a11mr9165723vdg.1.1318150759458; Sun, 09 Oct 2011 01:59:19 -0700 (PDT) Sender: kmacybsd@gmail.com Received: by 10.52.113.202 with HTTP; Sun, 9 Oct 2011 01:59:19 -0700 (PDT) In-Reply-To: <20111005161737.GA19568@dragon.NUXI.org> References: <201109161358.p8GDwptH024793@svn.freebsd.org> <20111005161737.GA19568@dragon.NUXI.org> Date: Sun, 9 Oct 2011 10:59:19 +0200 X-Google-Sender-Auth: EzVTLThxKtISwjdkn8GM1WtobVg Message-ID: From: "K. Macy" To: obrien@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r225617 - in head/sys: amd64/amd64 amd64/linux32 arm/arm cddl/contrib/opensolaris/uts/common/dtrace cddl/contrib/opensolaris/uts/sparc/dtrace compat/freebsd32 compat/linux compat/svr4 d... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 09 Oct 2011 09:22:48 -0000 Will do - sorry for the delay. Thanks, Kip On Wed, Oct 5, 2011 at 6:17 PM, David O'Brien wrote: > On Fri, Sep 16, 2011 at 01:58:51PM +0000, Kip Macy wrote: >> Author: kmacy >> Date: Fri Sep 16 13:58:51 2011 >> New Revision: 225617 >> Log: >> =A0 In order to maximize the re-usability of kernel code in user space t= his >> =A0 patch modifies makesyscalls.sh to prefix all of the non-compatibilit= y >> =A0 calls (e.g. not linux_, freebsd32_) with sys_ and updates the kernel >> =A0 entry points and all places in the code that use them. It also > > Hi Kip, > __FreeBSD_version does not seem to have been bumped for this. > Unfortunately this change has made a kernel module we use at work > unbuildable, and I don't have a __FreeBSD_version value to #ifdef > on. > > If ever there was a change that needed __FreeBSD_version this is one. > > Can you please get __FreeBSD_version bumped in 9-STABLE along with > 9-RELENG? > > thanks, > -- > -- David =A0(obrien@FreeBSD.org) > From owner-svn-src-all@FreeBSD.ORG Sun Oct 9 10:18:18 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 88ACD1065673 for ; Sun, 9 Oct 2011 10:18:18 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.freebsd.org (Postfix) with ESMTP id 00C2C8FC12 for ; Sun, 9 Oct 2011 10:18:17 +0000 (UTC) Received: (qmail 9193 invoked from network); 9 Oct 2011 08:33:28 -0000 Received: from localhost (HELO [127.0.0.1]) ([127.0.0.1]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 9 Oct 2011 08:33:28 -0000 Message-ID: <4E916EA6.3020300@freebsd.org> Date: Sun, 09 Oct 2011 11:51:34 +0200 From: Andre Oppermann User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 MIME-Version: 1.0 To: Lawrence Stewart References: <201110071639.p97Gd3t4019128@svn.freebsd.org> <4E8F9FAD.7070103@freebsd.org> In-Reply-To: <4E8F9FAD.7070103@freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, FreeBSD Release Engineering Team , John Baldwin Subject: Re: svn commit: r226113 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 09 Oct 2011 10:18:18 -0000 Hi Lawrence, Sorry for jumping in here. There was some urgency felt at EuroBSDCon to get this issue fixed before the next RC. -- Andre On 08.10.2011 02:56, Lawrence Stewart wrote: > Hi Andre and RE team, > > I've had a patch sitting in re@'s inbox for this problem since 15th Sep and have been waiting for > their go-ahead to commit. The patch I submitted is at: > > http://people.freebsd.org/~lstewart/patches/misctcp/tcpreassstackfix_9.x.r225576.diff > > The proposed commit message was: > > ########## > Use a backup (stack allocated) struct tseg_qent when we are unable to allocate one from the TCP > reassembly UMA zone and the incoming segment is the one we've been waiting for (i.e. th_seq == > rcv_nxt). This avoids TCP connections stalling when the zone limit is reached. > > PR: kern/155407 > Reported by: Slawa Olhovchenkov and Steven Hartland > Tested by: Steven Hartland > Submitted by: andre > Reviewed by: jhb > Approved by: re (?) > MFC after: 1 week > ########## > > I feel the logging changes should have been committed separately to the fix, but other than that, > what you committed achieves the same thing as the patch I proposed. > > I should have updated the ML thread to say it was submitted and awaiting approval, so you weren't to > know. > > Anyhoo, I guess I'll leave it up to you and re@ to sort out how you want to proceed, but wanted to > make sure everyone was on the same page as RE would have gotten confused when you requested your > patch be MFCed. > > Cheers, > Lawrence > > On 10/08/11 03:39, Andre Oppermann wrote: >> Author: andre >> Date: Fri Oct 7 16:39:03 2011 >> New Revision: 226113 >> URL: http://svn.freebsd.org/changeset/base/226113 >> >> Log: >> Prevent TCP sessions from stalling indefinitely in reassembly >> when reaching the zone limit of reassembly queue entries. >> >> When the zone limit was reached not even the missing segment >> that would complete the sequence space could be processed >> preventing the TCP session forever from making any further >> progress. >> >> Solve this deadlock by using a temporary on-stack queue entry >> for the missing segment followed by an immediate dequeue again >> by delivering the contiguous sequence space to the socket. >> >> Add logging under net.inet.tcp.log_debug for reassembly queue >> issues. >> >> Reviewed by: lsteward (previous version) >> Tested by: Steven Hartland >> MFC after: 3 days >> >> Modified: >> head/sys/netinet/tcp_reass.c >> >> Modified: head/sys/netinet/tcp_reass.c >> ============================================================================== >> --- head/sys/netinet/tcp_reass.c Fri Oct 7 16:09:44 2011 (r226112) >> +++ head/sys/netinet/tcp_reass.c Fri Oct 7 16:39:03 2011 (r226113) >> @@ -177,7 +177,9 @@ tcp_reass(struct tcpcb *tp, struct tcphd >> struct tseg_qent *nq; >> struct tseg_qent *te = NULL; >> struct socket *so = tp->t_inpcb->inp_socket; >> + char *s = NULL; >> int flags; >> + struct tseg_qent tqs; >> >> INP_WLOCK_ASSERT(tp->t_inpcb); >> >> @@ -215,19 +217,40 @@ tcp_reass(struct tcpcb *tp, struct tcphd >> TCPSTAT_INC(tcps_rcvmemdrop); >> m_freem(m); >> *tlenp = 0; >> + if ((s = tcp_log_addrs(&tp->t_inpcb->inp_inc, th, NULL, NULL))) { >> + log(LOG_DEBUG, "%s; %s: queue limit reached, " >> + "segment dropped\n", s, __func__); >> + free(s, M_TCPLOG); >> + } >> return (0); >> } >> >> /* >> * Allocate a new queue entry. If we can't, or hit the zone limit >> * just drop the pkt. >> + * >> + * Use a temporary structure on the stack for the missing segment >> + * when the zone is exhausted. Otherwise we may get stuck. >> */ >> te = uma_zalloc(V_tcp_reass_zone, M_NOWAIT); >> - if (te == NULL) { >> + if (te == NULL&& th->th_seq != tp->rcv_nxt) { >> TCPSTAT_INC(tcps_rcvmemdrop); >> m_freem(m); >> *tlenp = 0; >> + if ((s = tcp_log_addrs(&tp->t_inpcb->inp_inc, th, NULL, NULL))) { >> + log(LOG_DEBUG, "%s; %s: global zone limit reached, " >> + "segment dropped\n", s, __func__); >> + free(s, M_TCPLOG); >> + } >> return (0); >> + } else if (th->th_seq == tp->rcv_nxt) { >> + bzero(&tqs, sizeof(struct tseg_qent)); >> + te =&tqs; >> + if ((s = tcp_log_addrs(&tp->t_inpcb->inp_inc, th, NULL, NULL))) { >> + log(LOG_DEBUG, "%s; %s: global zone limit reached, " >> + "using stack for missing segment\n", s, __func__); >> + free(s, M_TCPLOG); >> + } >> } >> tp->t_segqlen++; >> >> @@ -304,6 +327,8 @@ tcp_reass(struct tcpcb *tp, struct tcphd >> if (p == NULL) { >> LIST_INSERT_HEAD(&tp->t_segq, te, tqe_q); >> } else { >> + KASSERT(te !=&tqs, ("%s: temporary stack based entry not " >> + "first element in queue", __func__)); >> LIST_INSERT_AFTER(p, te, tqe_q); >> } >> >> @@ -327,7 +352,8 @@ present: >> m_freem(q->tqe_m); >> else >> sbappendstream_locked(&so->so_rcv, q->tqe_m); >> - uma_zfree(V_tcp_reass_zone, q); >> + if (q !=&tqs) >> + uma_zfree(V_tcp_reass_zone, q); >> tp->t_segqlen--; >> q = nq; >> } while (q&& q->tqe_th->th_seq == tp->rcv_nxt); > > > From owner-svn-src-all@FreeBSD.ORG Sun Oct 9 10:55:15 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B56C6106566C; Sun, 9 Oct 2011 10:55:15 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A4CE78FC12; Sun, 9 Oct 2011 10:55:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p99AtFRC007650; Sun, 9 Oct 2011 10:55:15 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p99AtFLe007648; Sun, 9 Oct 2011 10:55:15 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201110091055.p99AtFLe007648@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Sun, 9 Oct 2011 10:55:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226166 - head/lib/libc/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 09 Oct 2011 10:55:15 -0000 Author: des Date: Sun Oct 9 10:55:15 2011 New Revision: 226166 URL: http://svn.freebsd.org/changeset/base/226166 Log: Document some not-so-recently added trace points. MFC after: 1 week Modified: head/lib/libc/sys/ktrace.2 Modified: head/lib/libc/sys/ktrace.2 ============================================================================== --- head/lib/libc/sys/ktrace.2 Sat Oct 8 21:15:39 2011 (r226165) +++ head/lib/libc/sys/ktrace.2 Sun Oct 9 10:55:15 2011 (r226166) @@ -28,7 +28,7 @@ .\" @(#)ktrace.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd July 13, 2008 +.Dd October 9, 2011 .Dt KTRACE 2 .Os .Sh NAME @@ -80,7 +80,7 @@ The .Fa trpoints argument specifies the trace points of interest. The defined trace points are: -.Bl -column KTRFAC_SYSCALLXXX -offset indent +.Bl -column KTRFAC_PROCCTORXXX -offset indent .It "KTRFAC_SYSCALL Trace system calls." .It "KTRFAC_SYSRET Trace return values from system calls." .It "KTRFAC_NAMEI Trace name lookup operations." @@ -88,6 +88,11 @@ The defined trace points are: generate much output). .It "KTRFAC_PSIG Trace posted signals." .It "KTRFAC_CSW Trace context switch points." +.It "KTRFAC_USER Trace application-specific events." +.It "KTRFAC_STRUCT Trace certain data structures." +.It "KTRFAC_SYSCTL Trace sysctls." +.It "KTRFAC_PROCCTOR Trace process construction." +.It "KTRFAC_PROCDTOR Trace process destruction." .It "KTRFAC_INHERIT Inherit tracing to future children." .El .Pp From owner-svn-src-all@FreeBSD.ORG Sun Oct 9 10:59:00 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 401BE1065670; Sun, 9 Oct 2011 10:58:59 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2F8B28FC13; Sun, 9 Oct 2011 10:58:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p99AwxsG007788; Sun, 9 Oct 2011 10:58:59 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p99Awxlc007786; Sun, 9 Oct 2011 10:58:59 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201110091058.p99Awxlc007786@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Sun, 9 Oct 2011 10:58:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226167 - head/lib/libc/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 09 Oct 2011 10:59:00 -0000 Author: des Date: Sun Oct 9 10:58:58 2011 New Revision: 226167 URL: http://svn.freebsd.org/changeset/base/226167 Log: Line up the struct declaration (yes, I know this isn't what it looks like in the header file) Modified: head/lib/libc/sys/ktrace.2 Modified: head/lib/libc/sys/ktrace.2 ============================================================================== --- head/lib/libc/sys/ktrace.2 Sun Oct 9 10:55:15 2011 (r226166) +++ head/lib/libc/sys/ktrace.2 Sun Oct 9 10:58:58 2011 (r226167) @@ -101,12 +101,12 @@ followed by a trace point specific struc The generic header is: .Bd -literal struct ktr_header { - int ktr_len; /* length of buf */ - short ktr_type; /* trace record type */ - pid_t ktr_pid; /* process id */ - char ktr_comm[MAXCOMLEN+1]; /* command name */ - struct timeval ktr_time; /* timestamp */ - intptr_t ktr_tid; /* was ktr_buffer */ + int ktr_len; /* length of buf */ + short ktr_type; /* trace record type */ + pid_t ktr_pid; /* process id */ + char ktr_comm[MAXCOMLEN+1]; /* command name */ + struct timeval ktr_time; /* timestamp */ + intptr_t ktr_tid; /* was ktr_buffer */ }; .Ed .Pp From owner-svn-src-all@FreeBSD.ORG Sun Oct 9 11:59:19 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5585D106566B; Sun, 9 Oct 2011 11:59:19 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from mail.ipfw.ru (unknown [IPv6:2a01:4f8:120:6141::2]) by mx1.freebsd.org (Postfix) with ESMTP id 0E8348FC0A; Sun, 9 Oct 2011 11:59:19 +0000 (UTC) Received: from secured.by.ipfw.ru ([81.200.11.182] helo=ws.su29.net) by mail.ipfw.ru with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.76 (FreeBSD)) (envelope-from ) id 1RCs2G-000GUm-ID; Sun, 09 Oct 2011 15:59:16 +0400 Message-ID: <4E918B48.5080408@FreeBSD.org> Date: Sun, 09 Oct 2011 15:53:44 +0400 From: "Alexander V. Chernikov" User-Agent: Thunderbird 2.0.0.24 (X11/20100515) MIME-Version: 1.0 To: Gleb Smirnoff References: <201109151228.p8FCSHVY073618@svn.freebsd.org> <20111009063420.GZ94905@FreeBSD.org> In-Reply-To: <20111009063420.GZ94905@FreeBSD.org> X-Enigmail-Version: 0.96.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig5083CEE90FB8C4014FC03A03" Cc: svn-src-head@FreeBSD.org, "Andrey V. Elsukov" , svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r225586 - in head/sys: modules/netgraph/ipfw netgraph X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 09 Oct 2011 11:59:19 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig5083CEE90FB8C4014FC03A03 Content-Type: multipart/mixed; boundary="------------080608030806000102020101" This is a multi-part message in MIME format. --------------080608030806000102020101 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable Gleb Smirnoff wrote: > Alexander, Andrey, >=20 > see a couple of comments below please. =2E.. > A> + if (m->m_len < sizeof(struct ip) && > A> + (m =3D m_pullup(m, sizeof(struct ip))) =3D=3D NULL) > A> + return (EINVAL); >=20 > In most cases we return ENOBUFS in case if m_pullup() failure. Lesser a= mount > of code uses ENOMEM and EINVAL. I personally hate EINVAL, since it is u= sually > used as one-for-all error, and thus is meaningless for user. Understood. So can we use more descriptive ENOENT in code below? tag =3D m_tag_locate(m, MTAG_IPFW_RULE, 0, NULL); if (tag =3D=3D NULL) { NG_FREE_M(m); return (EINVAL); /* XXX: find smth better */ }; >=20 > A> + ip =3D mtod(m, struct ip *); > A> + =2E... > A> + default: > A> return (EINVAL); >=20 > Shouldn't you free the mbuf before returning? Ups. Please see an attached patch --------------080608030806000102020101 Content-Type: text/plain; name="ng_ipfw.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline; filename="ng_ipfw.diff" Index: sys/netgraph/ng_ipfw.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- sys/netgraph/ng_ipfw.c (revision 226165) +++ sys/netgraph/ng_ipfw.c (working copy) @@ -242,7 +242,7 @@ ng_ipfw_rcvdata(hook_p hook, item_p item) =20 if (m->m_len < sizeof(struct ip) && (m =3D m_pullup(m, sizeof(struct ip))) =3D=3D NULL) - return (EINVAL); + return (ENOBUFS); =20 ip =3D mtod(m, struct ip *); =20 @@ -252,18 +252,14 @@ ng_ipfw_rcvdata(hook_p hook, item_p item) #ifdef INET case IPVERSION: ip_input(m); - break; + return (0); #endif #ifdef INET6 case IPV6_VERSION >> 4: ip6_input(m); - break; + return (0); #endif - default: - NG_FREE_M(m); - return (EINVAL); } - return (0); } else { switch (ip->ip_v) { #ifdef INET @@ -277,10 +273,12 @@ ng_ipfw_rcvdata(hook_p hook, item_p item) return (ip6_output(m, NULL, NULL, 0, NULL, NULL, NULL)); #endif - default: - return (EINVAL); } } + + /* unknown IP protocol version */ + NG_FREE_M(m); + return (EPROTONOSUPPORT); } =20 static int --------------080608030806000102020101-- --------------enig5083CEE90FB8C4014FC03A03 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.0.14 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk6Ri0sACgkQwcJ4iSZ1q2nWGgCfX/EJZpmQCskKQxphoCpQ3TMn 2U4An1Tmbj4lAvEhY77Vp1LULJpRKfOo =8LMM -----END PGP SIGNATURE----- --------------enig5083CEE90FB8C4014FC03A03-- From owner-svn-src-all@FreeBSD.ORG Sun Oct 9 12:14:10 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 160A9106564A; Sun, 9 Oct 2011 12:14:10 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.64.117]) by mx1.freebsd.org (Postfix) with ESMTP id 5FF1C8FC0A; Sun, 9 Oct 2011 12:14:09 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.4/8.14.4) with ESMTP id p99CE7Zm048488; Sun, 9 Oct 2011 16:14:07 +0400 (MSD) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.4/8.14.4/Submit) id p99CE7cn048487; Sun, 9 Oct 2011 16:14:07 +0400 (MSD) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Sun, 9 Oct 2011 16:14:07 +0400 From: Gleb Smirnoff To: "Alexander V. Chernikov" Message-ID: <20111009121407.GA94905@FreeBSD.org> References: <201109151228.p8FCSHVY073618@svn.freebsd.org> <20111009063420.GZ94905@FreeBSD.org> <4E918B48.5080408@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <4E918B48.5080408@FreeBSD.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, "Andrey V. Elsukov" , svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r225586 - in head/sys: modules/netgraph/ipfw netgraph X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 09 Oct 2011 12:14:10 -0000 On Sun, Oct 09, 2011 at 03:53:44PM +0400, Alexander V. Chernikov wrote: A> Understood. So can we use more descriptive ENOENT in code below? A> A> tag = m_tag_locate(m, MTAG_IPFW_RULE, 0, NULL); A> if (tag == NULL) { A> NG_FREE_M(m); A> return (EINVAL); /* XXX: find smth better */ A> }; Let you decide that. However, you can first analyze other places in kernel, where m_tag_locate() really should succeed but fails. After that you probably would want to have the same error return value in all these places :) A> Please see an attached patch Patch is ok from my view. -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Sun Oct 9 14:12:17 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E796B1065677; Sun, 9 Oct 2011 14:12:17 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D704F8FC17; Sun, 9 Oct 2011 14:12:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p99ECHfS013755; Sun, 9 Oct 2011 14:12:17 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p99ECHDl013752; Sun, 9 Oct 2011 14:12:17 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201110091412.p99ECHDl013752@svn.freebsd.org> From: Michael Tuexen Date: Sun, 9 Oct 2011 14:12:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226168 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 09 Oct 2011 14:12:18 -0000 Author: tuexen Date: Sun Oct 9 14:12:17 2011 New Revision: 226168 URL: http://svn.freebsd.org/changeset/base/226168 Log: Update the inp stored in a HB-timer when moving an stcb to a new inp. Use only this stored inp when processing a HB timeout. This fixes a bug which results in a crash. MFC after: 3 days. Modified: head/sys/netinet/sctp_pcb.c head/sys/netinet/sctputil.c Modified: head/sys/netinet/sctp_pcb.c ============================================================================== --- head/sys/netinet/sctp_pcb.c Sun Oct 9 10:58:58 2011 (r226167) +++ head/sys/netinet/sctp_pcb.c Sun Oct 9 14:12:17 2011 (r226168) @@ -2804,6 +2804,7 @@ sctp_move_pcb_and_assoc(struct sctp_inpc /* now what about the nets? */ TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) { net->pmtu_timer.ep = (void *)new_inp; + net->hb_timer.ep = (void *)new_inp; net->rxt_timer.ep = (void *)new_inp; } SCTP_INP_WUNLOCK(new_inp); Modified: head/sys/netinet/sctputil.c ============================================================================== --- head/sys/netinet/sctputil.c Sun Oct 9 10:58:58 2011 (r226167) +++ head/sys/netinet/sctputil.c Sun Oct 9 14:12:17 2011 (r226168) @@ -1661,7 +1661,7 @@ sctp_timeout_handler(void *t) sctp_auditing(4, inp, stcb, net); #endif if (!(net->dest_state & SCTP_ADDR_NOHB)) { - sctp_timer_start(SCTP_TIMER_TYPE_HEARTBEAT, stcb->sctp_ep, stcb, net); + sctp_timer_start(SCTP_TIMER_TYPE_HEARTBEAT, inp, stcb, net); sctp_chunk_output(inp, stcb, SCTP_OUTPUT_FROM_HB_TMR, SCTP_SO_NOT_LOCKED); } break; From owner-svn-src-all@FreeBSD.ORG Sun Oct 9 16:22:31 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B06D6106564A; Sun, 9 Oct 2011 16:22:31 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8688A8FC1B; Sun, 9 Oct 2011 16:22:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p99GMVjk017742; Sun, 9 Oct 2011 16:22:31 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p99GMVW9017736; Sun, 9 Oct 2011 16:22:31 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201110091622.p99GMVW9017736@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 9 Oct 2011 16:22:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226169 - in head/usr.sbin/makefs: . ffs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 09 Oct 2011 16:22:31 -0000 Author: nwhitehorn Date: Sun Oct 9 16:22:31 2011 New Revision: 226169 URL: http://svn.freebsd.org/changeset/base/226169 Log: Add support to makefs(8) to add UFS labels to images. Submitted by: avg MFC after: 3 days Modified: head/usr.sbin/makefs/ffs.c head/usr.sbin/makefs/ffs.h head/usr.sbin/makefs/ffs/mkfs.c head/usr.sbin/makefs/makefs.8 Modified: head/usr.sbin/makefs/ffs.c ============================================================================== --- head/usr.sbin/makefs/ffs.c Sun Oct 9 14:12:17 2011 (r226168) +++ head/usr.sbin/makefs/ffs.c Sun Oct 9 16:22:31 2011 (r226169) @@ -236,6 +236,9 @@ ffs_parse_opts(const char *option, fsinf goto leave_ffs_parse_opts; } rv = 1; + } else if (strcmp(var, "label") == 0) { + strlcpy(ffs_opts->label, val, sizeof(ffs_opts->label)); + rv = 1; } else rv = set_option(ffs_options, var, val); Modified: head/usr.sbin/makefs/ffs.h ============================================================================== --- head/usr.sbin/makefs/ffs.h Sun Oct 9 14:12:17 2011 (r226168) +++ head/usr.sbin/makefs/ffs.h Sun Oct 9 16:22:31 2011 (r226169) @@ -40,7 +40,11 @@ #ifndef _FFS_H #define _FFS_H +#include +#include + typedef struct { + char label[MAXVOLLEN]; /* volume name/label */ int bsize; /* block size */ int fsize; /* fragment size */ int cpg; /* cylinders per group */ Modified: head/usr.sbin/makefs/ffs/mkfs.c ============================================================================== --- head/usr.sbin/makefs/ffs/mkfs.c Sun Oct 9 14:12:17 2011 (r226168) +++ head/usr.sbin/makefs/ffs/mkfs.c Sun Oct 9 16:22:31 2011 (r226169) @@ -139,7 +139,9 @@ ffs_mkfs(const char *fsys, const fsinfo_ avgfpdir = ffs_opts->avgfpdir; bbsize = BBSIZE; sbsize = SBLOCKSIZE; - + + strlcpy(sblock.fs_volname, ffs_opts->label, sizeof(sblock.fs_volname)); + if (Oflag == 0) { sblock.fs_old_inodefmt = FS_42INODEFMT; sblock.fs_maxsymlinklen = 0; Modified: head/usr.sbin/makefs/makefs.8 ============================================================================== --- head/usr.sbin/makefs/makefs.8 Sun Oct 9 14:12:17 2011 (r226168) +++ head/usr.sbin/makefs/makefs.8 Sun Oct 9 16:22:31 2011 (r226169) @@ -242,6 +242,8 @@ Block size. Bytes per inode. .It Sy fsize Fragment size. +.It Sy label +Label name of the image. .It Sy maxbpg Maximum blocks per file in a cylinder group. .It Sy minfree From owner-svn-src-all@FreeBSD.ORG Sun Oct 9 16:23:05 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 27DB51065672; Sun, 9 Oct 2011 16:23:05 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0CFF18FC18; Sun, 9 Oct 2011 16:23:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p99GN40x017797; Sun, 9 Oct 2011 16:23:04 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p99GN4FW017794; Sun, 9 Oct 2011 16:23:04 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201110091623.p99GN4FW017794@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 9 Oct 2011 16:23:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226170 - in head/release: amd64 i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 09 Oct 2011 16:23:05 -0000 Author: nwhitehorn Date: Sun Oct 9 16:23:04 2011 New Revision: 226170 URL: http://svn.freebsd.org/changeset/base/226170 Log: Use UFS labels and bsdlabels (like the 8.x memsticks) instead of GPT to fix problems with some BIOSes. MFC after: 3 days Modified: head/release/amd64/make-memstick.sh head/release/i386/make-memstick.sh Modified: head/release/amd64/make-memstick.sh ============================================================================== --- head/release/amd64/make-memstick.sh Sun Oct 9 16:22:31 2011 (r226169) +++ head/release/amd64/make-memstick.sh Sun Oct 9 16:23:04 2011 (r226170) @@ -13,15 +13,11 @@ PATH=/bin:/usr/bin:/sbin:/usr/sbin export PATH -BLOCKSIZE=10240 - if [ $# -ne 2 ]; then echo "make-memstick.sh /path/to/directory /path/to/image/file" exit 1 fi -tempfile="${2}.$$" - if [ ! -d ${1} ]; then echo "${1} must be a directory" exit 1 @@ -32,47 +28,21 @@ if [ -e ${2} ]; then exit 1 fi -echo '/dev/gpt/FreeBSD_Install / ufs ro,noatime 1 1' > ${1}/etc/fstab -rm -f ${tempfile} -makefs -B little ${tempfile} ${1} +echo '/dev/ufs/FreeBSD_Install / ufs ro,noatime 1 1' > ${1}/etc/fstab +makefs -B little -o label=FreeBSD_Install ${2} ${1} if [ $? -ne 0 ]; then echo "makefs failed" exit 1 fi rm ${1}/etc/fstab -# -# Use $BLOCKSIZE for transfers to improve efficiency. When calculating -# how many blocks to transfer "+ 2" is to account for truncation in the -# division and to provide space for the label. -# - -filesize=`stat -f "%z" ${tempfile}` -blocks=$(($filesize / ${BLOCKSIZE} + 256)) -dd if=/dev/zero of=${2} bs=${BLOCKSIZE} count=${blocks} -if [ $? -ne 0 ]; then - echo "creation of image file failed" - exit 1 -fi - unit=`mdconfig -a -t vnode -f ${2}` if [ $? -ne 0 ]; then echo "mdconfig failed" exit 1 fi - -gpart create -s GPT ${unit} -gpart add -t freebsd-boot -s 64K ${unit} -gpart bootcode -b ${1}/boot/pmbr -p ${1}/boot/gptboot -i 1 ${unit} -gpart add -t freebsd-ufs -l FreeBSD_Install ${unit} - -dd if=${tempfile} of=/dev/${unit}p2 bs=$BLOCKSIZE conv=sync -if [ $? -ne 0 ]; then - echo "copying filesystem into image file failed" - exit 1 -fi - +gpart create -s BSD ${unit} +gpart bootcode -b ${1}/boot/boot ${unit} +gpart add -t freebsd-ufs ${unit} mdconfig -d -u ${unit} -rm -f ${tempfile} - Modified: head/release/i386/make-memstick.sh ============================================================================== --- head/release/i386/make-memstick.sh Sun Oct 9 16:22:31 2011 (r226169) +++ head/release/i386/make-memstick.sh Sun Oct 9 16:23:04 2011 (r226170) @@ -13,15 +13,11 @@ PATH=/bin:/usr/bin:/sbin:/usr/sbin export PATH -BLOCKSIZE=10240 - if [ $# -ne 2 ]; then echo "make-memstick.sh /path/to/directory /path/to/image/file" exit 1 fi -tempfile="${2}.$$" - if [ ! -d ${1} ]; then echo "${1} must be a directory" exit 1 @@ -32,47 +28,21 @@ if [ -e ${2} ]; then exit 1 fi -echo '/dev/gpt/FreeBSD_Install / ufs ro,noatime 1 1' > ${1}/etc/fstab -rm -f ${tempfile} -makefs -B little ${tempfile} ${1} +echo '/dev/ufs/FreeBSD_Install / ufs ro,noatime 1 1' > ${1}/etc/fstab +makefs -B little -o label=FreeBSD_Install ${2} ${1} if [ $? -ne 0 ]; then echo "makefs failed" exit 1 fi rm ${1}/etc/fstab -# -# Use $BLOCKSIZE for transfers to improve efficiency. When calculating -# how many blocks to transfer "+ 2" is to account for truncation in the -# division and to provide space for the label. -# - -filesize=`stat -f "%z" ${tempfile}` -blocks=$(($filesize / ${BLOCKSIZE} + 256)) -dd if=/dev/zero of=${2} bs=${BLOCKSIZE} count=${blocks} -if [ $? -ne 0 ]; then - echo "creation of image file failed" - exit 1 -fi - unit=`mdconfig -a -t vnode -f ${2}` if [ $? -ne 0 ]; then echo "mdconfig failed" exit 1 fi - -gpart create -s GPT ${unit} -gpart add -t freebsd-boot -s 64K ${unit} -gpart bootcode -b ${1}/boot/pmbr -p ${1}/boot/gptboot -i 1 ${unit} -gpart add -t freebsd-ufs -l FreeBSD_Install ${unit} - -dd if=${tempfile} of=/dev/${unit}p2 bs=$BLOCKSIZE conv=sync -if [ $? -ne 0 ]; then - echo "copying filesystem into image file failed" - exit 1 -fi - +gpart create -s BSD ${unit} +gpart bootcode -b ${1}/boot/boot ${unit} +gpart add -t freebsd-ufs ${unit} mdconfig -d -u ${unit} -rm -f ${tempfile} - From owner-svn-src-all@FreeBSD.ORG Sun Oct 9 18:39:21 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7A086106564A; Sun, 9 Oct 2011 18:39:21 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-qw0-f54.google.com (mail-qw0-f54.google.com [209.85.216.54]) by mx1.freebsd.org (Postfix) with ESMTP id 035938FC17; Sun, 9 Oct 2011 18:39:20 +0000 (UTC) Received: by qadz30 with SMTP id z30so4713379qad.13 for ; Sun, 09 Oct 2011 11:39:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=ziqe4lGVKf+m1D+ESFpWx/njmGn9rIzUUtCxwhrgUFc=; b=t+GWgLL1GhMRsyi71p8XX1MlHiRrNY23mJEu08lyFGnV3tCn5EbCYQid0kMIIgi90M hzu87MaM9zocwN3LkF0yfrChhwjSitLPipBwBE9KRbxrjNe+C1lqscs5PXS5x8zd3ykx guAdvqb4o91agyp+z3CZZmwXtd2Ld5EK6RG4A= MIME-Version: 1.0 Received: by 10.224.178.19 with SMTP id bk19mr8504317qab.72.1318185560138; Sun, 09 Oct 2011 11:39:20 -0700 (PDT) Received: by 10.224.74.82 with HTTP; Sun, 9 Oct 2011 11:39:20 -0700 (PDT) In-Reply-To: <201110081825.p98IP22D073560@svn.freebsd.org> References: <201110081825.p98IP22D073560@svn.freebsd.org> Date: Sun, 9 Oct 2011 11:39:20 -0700 Message-ID: From: Garrett Cooper To: Chris Rees Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r226162 - head/share/mk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 09 Oct 2011 18:39:21 -0000 On Sat, Oct 8, 2011 at 11:25 AM, Chris Rees wrote: > Author: crees (ports committer) > Date: Sat Oct =A08 18:25:01 2011 > New Revision: 226162 > URL: http://svn.freebsd.org/changeset/base/226162 > > Log: > =A0Revert unapproved commit to bsd.port.mk. > > =A0This would have had more discussion, but it was explicitly rejected at= submission by portmgr: > > =A0http://lists.freebsd.org/pipermail/freebsd-ports/2011-September/070591= .html First off, I'm not advocating commit wars by reverting this change. What I think happened was a simple misunderstanding, assumptions were made, and an accidental lapse in communication occurred. It happens.. let's just try not to make the same mistake twice and move on. I'm not currently blocked by this change if I upgrade to a later version pending that I unmerge this change via svn merge -c -226162. That being said, not everyone uses svn to manage /usr/src though (cv?sup comes to mind), so I think it would be smart to revert this change primarily for those individuals so they don't have to grow a new custom system for applying patches, similar to what the FreeNAS build system's build/do_build.sh script does, and so we can have greater test coverage with 10-CURRENT in the coming months until all of the ports breakage from the double digit branding scheme is fully resolved. Thanks! -Garrett From owner-svn-src-all@FreeBSD.ORG Sun Oct 9 19:47:35 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6D33C1065672; Sun, 9 Oct 2011 19:47:35 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.64.117]) by mx1.freebsd.org (Postfix) with ESMTP id F3D958FC18; Sun, 9 Oct 2011 19:47:34 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.4/8.14.4) with ESMTP id p99JlWMg050163; Sun, 9 Oct 2011 23:47:32 +0400 (MSD) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.4/8.14.4/Submit) id p99JlWf9050162; Sun, 9 Oct 2011 23:47:32 +0400 (MSD) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Sun, 9 Oct 2011 23:47:32 +0400 From: Gleb Smirnoff To: Qing Li Message-ID: <20111009194732.GB94905@glebius.int.ru> References: <201110031951.p93JpJLA025249@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="jI8keyz6grp/JLjh" Content-Disposition: inline In-Reply-To: <201110031951.p93JpJLA025249@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, bz@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r225947 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 09 Oct 2011 19:47:35 -0000 --jI8keyz6grp/JLjh Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Qing, [cced Bjoern as reviewer] On Mon, Oct 03, 2011 at 07:51:19PM +0000, Qing Li wrote: Q> Author: qingli Q> Date: Mon Oct 3 19:51:18 2011 Q> New Revision: 225947 Q> URL: http://svn.freebsd.org/changeset/base/225947 Q> Q> Log: Q> A system may have multiple physical interfaces, all of which are on the Q> same prefix. Since a single route entry is installed for the prefix Q> (without RADIX_MPATH), incoming packets on the interfaces that are not Q> associated with the prefix route may trigger an error message about Q> unable to allocation LLE entry, and fails L2. This patch makes sure a Q> valid route is present in the system, and allow the aforementioned Q> condition to exist and treats as valid. Q> Q> Reviewed by: bz Q> MFC after: 5 days this commit together with r225946 makes the in_lltable_rtcheck() quite difficult to understand. What confuses me most, is that in lines 1435-1445 you are assigning error to a positive value, BUT proceeding further with function. Well, after third review it is clear, that next if() case would definitely be true, and you would proceed with return. But that is difficult to see from first glance. I'd suggest to remove error variable, return immediately in all error cases, and also the RTF_GATEWAY check can be shifted up, since it is the most simple and the most usual to be true. Also, in this commit you really do not need the __DECONST hacks. Here is a snap, only compile-tested patch. -- Totus tuus, Glebius. --jI8keyz6grp/JLjh Content-Type: text/x-diff; charset=koi8-r Content-Disposition: attachment; filename="in.c.diff" Index: in.c =================================================================== --- in.c (revision 226163) +++ in.c (working copy) @@ -1414,8 +1414,6 @@ in_lltable_rtcheck(struct ifnet *ifp, u_int flags, const struct sockaddr *l3addr) { struct rtentry *rt; - struct ifnet *xifp; - int error = 0; KASSERT(l3addr->sa_family == AF_INET, ("sin_family %d", l3addr->sa_family)); @@ -1426,25 +1424,22 @@ if (rt == NULL) return (EINVAL); + if (rt->rt_flags & RTF_GATEWAY) { + RTFREE_LOCKED(rt); + return (EINVAL); + } + /* * If the gateway for an existing host route matches the target L3 * address, which is a special route inserted by some implementation * such as MANET, and the interface is of the correct type, then * allow for ARP to proceed. */ - if (rt->rt_flags & (RTF_GATEWAY | RTF_HOST)) { - xifp = rt->rt_ifp; - - if (xifp && (xifp->if_type != IFT_ETHER || - (xifp->if_flags & (IFF_NOARP | IFF_STATICARP)) != 0)) - error = EINVAL; - - if (memcmp(rt->rt_gateway->sa_data, l3addr->sa_data, - sizeof(in_addr_t)) != 0) - error = EINVAL; - } - - if (rt->rt_flags & RTF_GATEWAY) { + if (rt->rt_flags & RTF_HOST && + ((rt->rt_ifp && (rt->rt_ifp->if_type != IFT_ETHER || + (rt->rt_ifp->if_flags & (IFF_NOARP | IFF_STATICARP)) != 0)) || + (memcmp(rt->rt_gateway->sa_data, l3addr->sa_data, + sizeof(in_addr_t)) != 0))) { RTFREE_LOCKED(rt); return (EINVAL); } @@ -1455,32 +1450,31 @@ * interfaces have the same prefix. An incoming packet arrives * on one interface and the corresponding outgoing packet leaves * another interface. - * */ if (rt->rt_ifp != ifp) { - char *sa, *mask, *addr, *lim; + const char *sa, *mask, *addr, *lim; int len; - sa = (char *)rt_key(rt); - mask = (char *)rt_mask(rt); - addr = (char *)__DECONST(struct sockaddr *, l3addr); - len = ((struct sockaddr_in *)__DECONST(struct sockaddr *, l3addr))->sin_len; + sa = (const char *)rt_key(rt); + mask = (const char *)rt_mask(rt); + addr = (const char *)l3addr; + len = ((const struct sockaddr_in *)l3addr)->sin_len; lim = addr + len; for ( ; addr < lim; sa++, mask++, addr++) { if ((*sa ^ *addr) & *mask) { - error = EINVAL; #ifdef DIAGNOSTIC log(LOG_INFO, "IPv4 address: \"%s\" is not on the network\n", inet_ntoa(((const struct sockaddr_in *)l3addr)->sin_addr)); #endif - break; + RTFREE_LOCKED(rt); + return (EINVAL); } } } RTFREE_LOCKED(rt); - return (error); + return (0); } /* --jI8keyz6grp/JLjh-- From owner-svn-src-all@FreeBSD.ORG Sun Oct 9 20:16:51 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AB403106566B; Sun, 9 Oct 2011 20:16:51 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 81BB68FC15; Sun, 9 Oct 2011 20:16:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p99KGpjE025041; Sun, 9 Oct 2011 20:16:51 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p99KGp2p025039; Sun, 9 Oct 2011 20:16:51 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201110092016.p99KGp2p025039@svn.freebsd.org> From: Marius Strobl Date: Sun, 9 Oct 2011 20:16:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226171 - head/sys/dev/vr X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 09 Oct 2011 20:16:51 -0000 Author: marius Date: Sun Oct 9 20:16:51 2011 New Revision: 226171 URL: http://svn.freebsd.org/changeset/base/226171 Log: Sprinkle const. Modified: head/sys/dev/vr/if_vr.c Modified: head/sys/dev/vr/if_vr.c ============================================================================== --- head/sys/dev/vr/if_vr.c Sun Oct 9 16:23:04 2011 (r226170) +++ head/sys/dev/vr/if_vr.c Sun Oct 9 20:16:51 2011 (r226171) @@ -114,12 +114,12 @@ MODULE_DEPEND(vr, miibus, 1, 1, 1); #define VR_Q_CSUM (1<<1) #define VR_Q_CAM (1<<2) -static struct vr_type { +static const struct vr_type { u_int16_t vr_vid; u_int16_t vr_did; int vr_quirks; - char *vr_name; -} vr_devs[] = { + const char *vr_name; +} const vr_devs[] = { { VIA_VENDORID, VIA_DEVICEID_RHINE, VR_Q_NEEDALIGN, "VIA VT3043 Rhine I 10/100BaseTX" }, @@ -195,11 +195,11 @@ static void vr_setwol(struct vr_softc *) static void vr_clrwol(struct vr_softc *); static int vr_sysctl_stats(SYSCTL_HANDLER_ARGS); -static struct vr_tx_threshold_table { +static const struct vr_tx_threshold_table { int tx_cfg; int bcr_cfg; int value; -} vr_tx_threshold_tables[] = { +} const vr_tx_threshold_tables[] = { { VR_TXTHRESH_64BYTES, VR_BCR1_TXTHRESH64BYTES, 64 }, { VR_TXTHRESH_128BYTES, VR_BCR1_TXTHRESH128BYTES, 128 }, { VR_TXTHRESH_256BYTES, VR_BCR1_TXTHRESH256BYTES, 256 }, @@ -557,10 +557,10 @@ vr_reset(const struct vr_softc *sc) * Probe for a VIA Rhine chip. Check the PCI vendor and device * IDs against our list and return a match or NULL */ -static struct vr_type * +static const struct vr_type * vr_match(device_t dev) { - struct vr_type *t = vr_devs; + const struct vr_type *t = vr_devs; for (t = vr_devs; t->vr_name != NULL; t++) if ((pci_get_vendor(dev) == t->vr_vid) && @@ -576,7 +576,7 @@ vr_match(device_t dev) static int vr_probe(device_t dev) { - struct vr_type *t; + const struct vr_type *t; t = vr_match(dev); if (t != NULL) { @@ -595,7 +595,7 @@ vr_attach(device_t dev) { struct vr_softc *sc; struct ifnet *ifp; - struct vr_type *t; + const struct vr_type *t; uint8_t eaddr[ETHER_ADDR_LEN]; int error, rid; int i, phy, pmc; From owner-svn-src-all@FreeBSD.ORG Sun Oct 9 20:21:07 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7829E106566C; Sun, 9 Oct 2011 20:21:07 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 683D68FC14; Sun, 9 Oct 2011 20:21:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p99KL7XC025211; Sun, 9 Oct 2011 20:21:07 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p99KL7kn025209; Sun, 9 Oct 2011 20:21:07 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201110092021.p99KL7kn025209@svn.freebsd.org> From: Glen Barber Date: Sun, 9 Oct 2011 20:21:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226172 - head/share/man/man7 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 09 Oct 2011 20:21:07 -0000 Author: gjb (doc committer) Date: Sun Oct 9 20:21:07 2011 New Revision: 226172 URL: http://svn.freebsd.org/changeset/base/226172 Log: Bump .Dd to reflect the date of the last content change, so MFC content makes sense. Pointy-hat to: gjb (myself) Modified: head/share/man/man7/build.7 Modified: head/share/man/man7/build.7 ============================================================================== --- head/share/man/man7/build.7 Sun Oct 9 20:16:51 2011 (r226171) +++ head/share/man/man7/build.7 Sun Oct 9 20:21:07 2011 (r226172) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 16, 2011 +.Dd September 29, 2011 .Dt BUILD 7 .Os .Sh NAME From owner-svn-src-all@FreeBSD.ORG Sun Oct 9 20:27:20 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6B5CD106566C; Sun, 9 Oct 2011 20:27:20 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5B5C08FC12; Sun, 9 Oct 2011 20:27:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p99KRKcD025481; Sun, 9 Oct 2011 20:27:20 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p99KRKdR025479; Sun, 9 Oct 2011 20:27:20 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201110092027.p99KRKdR025479@svn.freebsd.org> From: Marius Strobl Date: Sun, 9 Oct 2011 20:27:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226173 - head/sys/dev/stge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 09 Oct 2011 20:27:20 -0000 Author: marius Date: Sun Oct 9 20:27:20 2011 New Revision: 226173 URL: http://svn.freebsd.org/changeset/base/226173 Log: Prefer KOBJMETHOD_END. Modified: head/sys/dev/stge/if_stge.c Modified: head/sys/dev/stge/if_stge.c ============================================================================== --- head/sys/dev/stge/if_stge.c Sun Oct 9 20:21:07 2011 (r226172) +++ head/sys/dev/stge/if_stge.c Sun Oct 9 20:27:20 2011 (r226173) @@ -199,8 +199,7 @@ static device_method_t stge_methods[] = DEVMETHOD(miibus_writereg, stge_miibus_writereg), DEVMETHOD(miibus_statchg, stge_miibus_statchg), - { 0, 0 } - + KOBJMETHOD_END }; static driver_t stge_driver = { From owner-svn-src-all@FreeBSD.ORG Sun Oct 9 21:21:38 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 118E0106566B; Sun, 9 Oct 2011 21:21:38 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 01D998FC0A; Sun, 9 Oct 2011 21:21:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p99LLblW027234; Sun, 9 Oct 2011 21:21:37 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p99LLbYB027232; Sun, 9 Oct 2011 21:21:37 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201110092121.p99LLbYB027232@svn.freebsd.org> From: Marius Strobl Date: Sun, 9 Oct 2011 21:21:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226175 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 09 Oct 2011 21:21:38 -0000 Author: marius Date: Sun Oct 9 21:21:37 2011 New Revision: 226175 URL: http://svn.freebsd.org/changeset/base/226175 Log: In device_get_children() avoid malloc(0) in order to increase portability to other operating systems. PR: 154287 Modified: head/sys/kern/subr_bus.c Modified: head/sys/kern/subr_bus.c ============================================================================== --- head/sys/kern/subr_bus.c Sun Oct 9 20:58:02 2011 (r226174) +++ head/sys/kern/subr_bus.c Sun Oct 9 21:21:37 2011 (r226175) @@ -2140,6 +2140,11 @@ device_get_children(device_t dev, device TAILQ_FOREACH(child, &dev->children, link) { count++; } + if (count == 0) { + *devlistp = NULL; + *devcountp = 0; + return (0); + } list = malloc(count * sizeof(device_t), M_TEMP, M_NOWAIT|M_ZERO); if (!list) From owner-svn-src-all@FreeBSD.ORG Sun Oct 9 21:36:15 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0E063106566B; Sun, 9 Oct 2011 21:36:15 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F23C18FC0A; Sun, 9 Oct 2011 21:36:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p99LaEHI027713; Sun, 9 Oct 2011 21:36:14 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p99LaEWi027711; Sun, 9 Oct 2011 21:36:14 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201110092136.p99LaEWi027711@svn.freebsd.org> From: Marius Strobl Date: Sun, 9 Oct 2011 21:36:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226176 - head/sys/dev/iwn X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 09 Oct 2011 21:36:15 -0000 Author: marius Date: Sun Oct 9 21:36:14 2011 New Revision: 226176 URL: http://svn.freebsd.org/changeset/base/226176 Log: Recognize the Intel(R) Centrino(R) Wireless-N 130. PR: 161162 Modified: head/sys/dev/iwn/if_iwn.c Modified: head/sys/dev/iwn/if_iwn.c ============================================================================== --- head/sys/dev/iwn/if_iwn.c Sun Oct 9 21:21:37 2011 (r226175) +++ head/sys/dev/iwn/if_iwn.c Sun Oct 9 21:36:14 2011 (r226176) @@ -89,6 +89,7 @@ static const struct iwn_ident iwn_ident_ { 0x8086, 0x008b, "Intel(R) Centrino(R) Wireless-N 1030" }, { 0x8086, 0x0090, "Intel(R) Centrino(R) Advanced-N 6230" }, { 0x8086, 0x0091, "Intel(R) Centrino(R) Advanced-N 6230" }, + { 0x8086, 0x0896, "Intel(R) Centrino(R) Wireless-N 130" }, { 0x8086, 0x4229, "Intel(R) Wireless WiFi Link 4965" }, { 0x8086, 0x422b, "Intel(R) Centrino(R) Ultimate-N 6300" }, { 0x8086, 0x422c, "Intel(R) Centrino(R) Advanced-N 6200" }, From owner-svn-src-all@FreeBSD.ORG Sun Oct 9 21:42:03 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2A877106566C; Sun, 9 Oct 2011 21:42:03 +0000 (UTC) (envelope-from rodrigc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1943B8FC0C; Sun, 9 Oct 2011 21:42:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p99Lg2K7028022; Sun, 9 Oct 2011 21:42:02 GMT (envelope-from rodrigc@svn.freebsd.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p99Lg29k028016; Sun, 9 Oct 2011 21:42:02 GMT (envelope-from rodrigc@svn.freebsd.org) Message-Id: <201110092142.p99Lg29k028016@svn.freebsd.org> From: Craig Rodrigues Date: Sun, 9 Oct 2011 21:42:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226179 - in head: sbin/atacontrol sys/dev/ata usr.sbin/burncd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 09 Oct 2011 21:42:03 -0000 Author: rodrigc Date: Sun Oct 9 21:42:02 2011 New Revision: 226179 URL: http://svn.freebsd.org/changeset/base/226179 Log: Add a "kern.features.ata_cam" sysctl in the kernel when the ATA_CAM kernel option is defined. This sysctl can be queried by feature_present(3). Query for this feature in /sbin/atacontrol and /usr/sbin/burncd. If these utilities detect that ATA_CAM is enabled, then these utilities will error out. These utilities are compatible with the old ATA driver, but are incomptible with the new ATA_CAM driver. By erroring out, we give end-users an idea as to what remedies to use, and reduce the need for them to file PR's. For atacontrol, camcontrol must be used instead, and for burncd, alternative utilties from the ports collection must be used such as sysutils/cdrtools. In future, maybe someone can re-write burncd to work with ATA_CAM, but at least for now, we give a somewhat useful error message to end users. PR: 160979 Reviewed by: jh, Arnaud Lacombe Reported by: Joe Barbish MFC after: 3 days Modified: head/sbin/atacontrol/atacontrol.8 head/sbin/atacontrol/atacontrol.c head/sys/dev/ata/ata-all.c head/usr.sbin/burncd/burncd.8 head/usr.sbin/burncd/burncd.c Modified: head/sbin/atacontrol/atacontrol.8 ============================================================================== --- head/sbin/atacontrol/atacontrol.8 Sun Oct 9 21:40:38 2011 (r226178) +++ head/sbin/atacontrol/atacontrol.8 Sun Oct 9 21:42:02 2011 (r226179) @@ -25,12 +25,19 @@ .\" .\" $FreeBSD$ .\" -.Dd February 21, 2009 +.Dd October 9, 2011 .Dt ATACONTROL 8 .Os .Sh NAME .Nm atacontrol .Nd ATA device driver control program +.Pp +This utility was +.Em deprecated +in +.Fx 9.0 . +See +.Sx NOTES . .Sh SYNOPSIS .Nm .Aq Ar command @@ -361,11 +368,17 @@ or syslog logging on it as the disk will up all the time. .Sh SEE ALSO .Xr ata 4 +.Xr cam 4 +.Xr camcontrol 8 .Sh HISTORY The .Nm utility first appeared in .Fx 4.6 . +.Pp +.Nm +was deprecated in +.Fx 9.0 . .Sh AUTHORS .An -nosplit The @@ -377,3 +390,16 @@ utility was written by This manual page was written by .An S\(/oren Schmidt .Aq sos@FreeBSD.org . +.Sh NOTES +The +.Nm +utility was deprecated in +.Fx 9.0 . +When +.Bd -ragged -offset indent +.Cd "options ATA_CAM" +.Ed +.Pp +is compiled into the kernel, then +.Xr camcontrol 8 +must be used instead. Modified: head/sbin/atacontrol/atacontrol.c ============================================================================== --- head/sbin/atacontrol/atacontrol.c Sun Oct 9 21:40:38 2011 (r226178) +++ head/sbin/atacontrol/atacontrol.c Sun Oct 9 21:42:02 2011 (r226179) @@ -378,6 +378,11 @@ main(int argc, char **argv) { int fd, mode, channel, array; + if (feature_present("ata_cam")) { + errx(1, "\nATA_CAM option is enabled in kernel.\n" + "Please use camcontrol instead."); + } + if (argc < 2) usage(); Modified: head/sys/dev/ata/ata-all.c ============================================================================== --- head/sys/dev/ata/ata-all.c Sun Oct 9 21:40:38 2011 (r226178) +++ head/sys/dev/ata/ata-all.c Sun Oct 9 21:42:02 2011 (r226179) @@ -120,6 +120,9 @@ SYSCTL_INT(_hw_ata, OID_AUTO, wc, CTLFLA TUNABLE_INT("hw.ata.setmax", &ata_setmax); SYSCTL_INT(_hw_ata, OID_AUTO, setmax, CTLFLAG_RDTUN, &ata_setmax, 0, "ATA disk set max native address"); +#ifdef ATA_CAM +FEATURE(ata_cam, "ATA devices are accessed through the cam(4) driver"); +#endif /* * newbus device interface related functions Modified: head/usr.sbin/burncd/burncd.8 ============================================================================== --- head/usr.sbin/burncd/burncd.8 Sun Oct 9 21:40:38 2011 (r226178) +++ head/usr.sbin/burncd/burncd.8 Sun Oct 9 21:42:02 2011 (r226179) @@ -27,12 +27,19 @@ .\" .\" $FreeBSD$ .\" -.Dd December 21, 2009 +.Dd October 9, 2011 .Dt BURNCD 8 .Os .Sh NAME .Nm burncd .Nd control the ATAPI CD-R/RW driver +.Pp +This utility was +.Em deprecated +in +.Fx 9.0 . +See +.Sx NOTES . .Sh SYNOPSIS .Nm .Op Fl deFlmnpqtv @@ -211,6 +218,10 @@ The .Nm utility appeared in .Fx 4.0 . +.Pp +.Nm +was deprecated in +.Fx 9.0 . .Sh AUTHORS The .Nm @@ -220,3 +231,19 @@ Denmark .Aq sos@FreeBSD.org . .Sh BUGS Probably, please report when found. +.Sh NOTES +When +.Bd -ragged -offset indent +.Cd "options ATA_CAM" +.Ed +.Pp +is compiled into the kernel, then +.Xr cdrecord 1 , +available in the +.Fx +Ports Collection as part of the +.Pa sysutils/cdrtools +port, must be used instead. +Refer to: +.Pp +http://www.freebsd.org/doc/handbook/creating-cds.html#CDRECORD Modified: head/usr.sbin/burncd/burncd.c ============================================================================== --- head/usr.sbin/burncd/burncd.c Sun Oct 9 21:40:38 2011 (r226178) +++ head/usr.sbin/burncd/burncd.c Sun Oct 9 21:42:02 2011 (r226179) @@ -82,6 +82,13 @@ main(int argc, char **argv) int block_size = 0, block_type = 0, cdopen = 0, dvdrw = 0; const char *dev, *env_speed; + if (feature_present("ata_cam")) { + errx(1, "\nATA_CAM option is enabled in kernel.\n" + "Install the sysutils/cdrtools port and use cdrecord instead.\n\n" + "Please refer to:\n" + "http://www.freebsd.org/doc/handbook/creating-cds.html#CDRECORD"); + } + if ((dev = getenv("CDROM")) == NULL) dev = "/dev/acd0"; From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 02:49:22 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3E38F106564A; Mon, 10 Oct 2011 02:49:22 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2E3148FC14; Mon, 10 Oct 2011 02:49:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9A2nMU0038811; Mon, 10 Oct 2011 02:49:22 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9A2nMjZ038809; Mon, 10 Oct 2011 02:49:22 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201110100249.p9A2nMjZ038809@svn.freebsd.org> From: Adrian Chadd Date: Mon, 10 Oct 2011 02:49:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226181 - head/sys/dev/bwi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2011 02:49:22 -0000 Author: adrian Date: Mon Oct 10 02:49:21 2011 New Revision: 226181 URL: http://svn.freebsd.org/changeset/base/226181 Log: Update from OpenBSD: Include 0x4402 in the bbp id mapping table used on older devices. http://bcm-specs.sipsolutions.net/BackPlane agrees. Obtained from: OpenBSD, sys/dev/ic/bwi.c r1.88 Modified: head/sys/dev/bwi/if_bwi.c Modified: head/sys/dev/bwi/if_bwi.c ============================================================================== --- head/sys/dev/bwi/if_bwi.c Mon Oct 10 00:37:23 2011 (r226180) +++ head/sys/dev/bwi/if_bwi.c Mon Oct 10 02:49:21 2011 (r226181) @@ -220,7 +220,7 @@ static const struct { } bwi_bbpid_map[] = { { 0x4301, 0x4301, 0x4301 }, { 0x4305, 0x4307, 0x4307 }, - { 0x4403, 0x4403, 0x4402 }, + { 0x4402, 0x4403, 0x4402 }, { 0x4610, 0x4615, 0x4610 }, { 0x4710, 0x4715, 0x4710 }, { 0x4720, 0x4725, 0x4309 } From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 02:54:58 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DCA98106566B; Mon, 10 Oct 2011 02:54:58 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CCEB18FC0A; Mon, 10 Oct 2011 02:54:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9A2swsT039001; Mon, 10 Oct 2011 02:54:58 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9A2swxo038999; Mon, 10 Oct 2011 02:54:58 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201110100254.p9A2swxo038999@svn.freebsd.org> From: Adrian Chadd Date: Mon, 10 Oct 2011 02:54:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226182 - head/sys/dev/bwi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2011 02:54:59 -0000 Author: adrian Date: Mon Oct 10 02:54:58 2011 New Revision: 226182 URL: http://svn.freebsd.org/changeset/base/226182 Log: Fix an incorrect use of sizeof(). Obtained from: OpenBSD sys/dev/ic/bwi.c r1.87 Modified: head/sys/dev/bwi/bwiphy.c Modified: head/sys/dev/bwi/bwiphy.c ============================================================================== --- head/sys/dev/bwi/bwiphy.c Mon Oct 10 02:49:21 2011 (r226181) +++ head/sys/dev/bwi/bwiphy.c Mon Oct 10 02:54:58 2011 (r226182) @@ -796,7 +796,7 @@ bwi_phy_config_11g(struct bwi_mac *mac) bwi_tbl_write_2(mac, BWI_PHYTBL_RSSI + i, i); /* Fill noise table */ - for (i = 0; i < sizeof(bwi_phy_noise_11g); ++i) { + for (i = 0; i < N(bwi_phy_noise_11g); ++i) { bwi_tbl_write_2(mac, BWI_PHYTBL_NOISE + i, bwi_phy_noise_11g[i]); } From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 05:11:58 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5B1021065672; Mon, 10 Oct 2011 05:11:58 +0000 (UTC) (envelope-from tomelite82@gmail.com) Received: from mail-yw0-f54.google.com (mail-yw0-f54.google.com [209.85.213.54]) by mx1.freebsd.org (Postfix) with ESMTP id BCC848FC1C; Mon, 10 Oct 2011 05:11:57 +0000 (UTC) Received: by ywp17 with SMTP id 17so6314894ywp.13 for ; Sun, 09 Oct 2011 22:11:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=D7hjLd/+IblJxYICu28IzCTaL4KQhaxHozA+zae0PUM=; b=GHRNJlR830st8u3r8Vk0eBhV/ogZoyXLQ1/yFvNWXuIYCJzbIsBCqg4HMpZU+BqEKK fzymXoQBpSO8k8bNFsZc3L6xjmu7GURwasv21SNZ2WMaG3lCnqqfQQm/b44ezdrCRjOA G/bKDEJkvAJO5zrPKJZOozi+0fGNdnrZwQzKY= MIME-Version: 1.0 Received: by 10.150.209.10 with SMTP id h10mr5006032ybg.52.1318223517032; Sun, 09 Oct 2011 22:11:57 -0700 (PDT) Sender: tomelite82@gmail.com Received: by 10.151.78.21 with HTTP; Sun, 9 Oct 2011 22:11:56 -0700 (PDT) In-Reply-To: <20111009194732.GB94905@glebius.int.ru> References: <201110031951.p93JpJLA025249@svn.freebsd.org> <20111009194732.GB94905@glebius.int.ru> Date: Sun, 9 Oct 2011 22:11:56 -0700 X-Google-Sender-Auth: mbeBQJQo2KNF0BpYfev7ohWw5kk Message-ID: From: Qing Li To: Gleb Smirnoff Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, bz@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r225947 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2011 05:11:58 -0000 Hi Gleb, > > On Mon, Oct 03, 2011 at 07:51:19PM +0000, Qing Li wrote: > Q> Author: qingli > Q> Date: Mon Oct =A03 19:51:18 2011 > Q> New Revision: 225947 > Q> URL: http://svn.freebsd.org/changeset/base/225947 > Q> > Q> Log: > Q> =A0 A system may have multiple physical interfaces, all of which are o= n the > Q> =A0 same prefix. Since a single route entry is installed for the prefi= x > Q> =A0 (without RADIX_MPATH), incoming packets on the interfaces that are= not > Q> =A0 associated with the prefix route may trigger an error message abou= t > Q> =A0 unable to allocation LLE entry, and fails L2. This patch makes sur= e a > Q> =A0 valid route is present in the system, and allow the aforementioned > Q> =A0 condition to exist and treats as valid. > Q> > Q> =A0 Reviewed by: =A0 =A0 =A0 bz > Q> =A0 MFC after: 5 days > > =A0this commit together with r225946 makes the in_lltable_rtcheck() > quite difficult to understand. > > =A0What confuses me most, is that in lines 1435-1445 you are > assigning error to a positive value, BUT proceeding further > with function. > This is what was there before (meaning returning error immediately), but I guess a couple of folks felt it looked a bit cluttered. This is mostly due to the fact the "RTFREE_LOCKED()" operation has to be performed before returning. > > Well, after third review it is clear, that > next if() case would definitely be true, and you would proceed > with return. But that is difficult to see from first glance. > Not so, only for an indirect prefix route. > > I'd suggest to remove error variable, return immediately in > all error cases, and also the RTF_GATEWAY check can be shifted up, > since it is the most simple and the most usual to be true. > No, the RTF_GATEWAY check cannot be shifted up because if we did that, the (indirect host route, with destination matching the gateway IP) would never be executed, if when that set of conditions are true, which i= s allowed and the reason for the patch in the first place. > > Also, in this commit you really do not need the __DECONST hacks. > Okay, I must had a temporary short circuit. I will fix that. Thanks --Qing From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 05:41:12 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4F036106566C; Mon, 10 Oct 2011 05:41:12 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail04.syd.optusnet.com.au (mail04.syd.optusnet.com.au [211.29.132.185]) by mx1.freebsd.org (Postfix) with ESMTP id C66AC8FC0A; Mon, 10 Oct 2011 05:41:11 +0000 (UTC) Received: from c122-106-165-191.carlnfd1.nsw.optusnet.com.au (c122-106-165-191.carlnfd1.nsw.optusnet.com.au [122.106.165.191]) by mail04.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id p9A5f86T028442 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 10 Oct 2011 16:41:09 +1100 Date: Mon, 10 Oct 2011 16:41:08 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Dag-Erling Smorgrav In-Reply-To: <201110082102.p98L28gZ078423@svn.freebsd.org> Message-ID: <20111010164007.N866@besplex.bde.org> References: <201110082102.p98L28gZ078423@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r226164 - head/usr.bin/kdump X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2011 05:41:12 -0000 On Sat, 8 Oct 2011, Dag-Erling Smorgrav wrote: > Author: des > Date: Sat Oct 8 21:02:08 2011 > New Revision: 226164 > URL: http://svn.freebsd.org/changeset/base/226164 > > Log: > Address some of bde@'s concerns with the new code. Thanks. Bruce From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 06:13:15 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D20A0106566C; Mon, 10 Oct 2011 06:13:15 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.64.117]) by mx1.freebsd.org (Postfix) with ESMTP id 412BD8FC0A; Mon, 10 Oct 2011 06:13:15 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.4/8.14.4) with ESMTP id p9A6DDg6054307; Mon, 10 Oct 2011 10:13:13 +0400 (MSD) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.4/8.14.4/Submit) id p9A6DDPX054306; Mon, 10 Oct 2011 10:13:13 +0400 (MSD) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Mon, 10 Oct 2011 10:13:13 +0400 From: Gleb Smirnoff To: Qing Li Message-ID: <20111010061313.GC94905@FreeBSD.org> References: <201110031951.p93JpJLA025249@svn.freebsd.org> <20111009194732.GB94905@glebius.int.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, bz@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r225947 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2011 06:13:15 -0000 On Sun, Oct 09, 2011 at 10:11:56PM -0700, Qing Li wrote: Q> > šWhat confuses me most, is that in lines 1435-1445 you are Q> > assigning error to a positive value, BUT proceeding further Q> > with function. Q> Q> This is what was there before (meaning returning error immediately), Q> but I guess a couple of folks felt it looked a bit cluttered. Q> This is mostly due to the fact the "RTFREE_LOCKED()" operation Q> has to be performed before returning. Well, we can assign error and then goto "done" label. Assigning error and continuing processing is confusing, isn't it? Q> > Well, after third review it is clear, that Q> > next if() case would definitely be true, and you would proceed Q> > with return. But that is difficult to see from first glance. Q> Q> Not so, only for an indirect prefix route. Q> Q> > I'd suggest to remove error variable, return immediately in Q> > all error cases, and also the RTF_GATEWAY check can be shifted up, Q> > since it is the most simple and the most usual to be true. Q> > Q> Q> No, the RTF_GATEWAY check cannot be shifted up because if we did Q> that, the (indirect host route, with destination matching the gateway IP) Q> would never be executed, if when that set of conditions are true, which is Q> allowed and the reason for the patch in the first place. Can you elaborate on that please? As far as I see, any rtentry that has RTF_GATEWAY would return with EINVAL. The first if() clause doesn't do any actual processing, only checking flags and memcmp()ing. The third clause either. The error is never reset to 0. So, I don't see any difference in returning EINVAL for RTF_GATEWAY immediately or later after other checks. -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 06:13:27 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8EAE410657F1; Mon, 10 Oct 2011 06:13:27 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7E9B38FC13; Mon, 10 Oct 2011 06:13:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9A6DRCk045388; Mon, 10 Oct 2011 06:13:27 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9A6DRmB045386; Mon, 10 Oct 2011 06:13:27 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201110100613.p9A6DRmB045386@svn.freebsd.org> From: Ed Schouten Date: Mon, 10 Oct 2011 06:13:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226183 - head/sys/teken X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2011 06:13:27 -0000 Author: ed Date: Mon Oct 10 06:13:27 2011 New Revision: 226183 URL: http://svn.freebsd.org/changeset/base/226183 Log: Properly use the cursor to bound the position for CUP. We must take the origin region into account when clamping the cursor position. MFC after: 3 days Modified: head/sys/teken/teken_subr.h Modified: head/sys/teken/teken_subr.h ============================================================================== --- head/sys/teken/teken_subr.h Mon Oct 10 02:54:58 2011 (r226182) +++ head/sys/teken/teken_subr.h Mon Oct 10 06:13:27 2011 (r226183) @@ -325,7 +325,7 @@ teken_subr_cursor_position(teken_t *t, u { t->t_cursor.tp_row = t->t_originreg.ts_begin + row - 1; - if (row >= t->t_originreg.ts_end) + if (t->t_cursor.tp_row >= t->t_originreg.ts_end) t->t_cursor.tp_row = t->t_originreg.ts_end - 1; t->t_cursor.tp_col = col - 1; From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 06:37:32 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6EB441065672; Mon, 10 Oct 2011 06:37:32 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 53F968FC13; Mon, 10 Oct 2011 06:37:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9A6bW3p046204; Mon, 10 Oct 2011 06:37:32 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9A6bWW4046199; Mon, 10 Oct 2011 06:37:32 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201110100637.p9A6bWW4046199@svn.freebsd.org> From: Xin LI Date: Mon, 10 Oct 2011 06:37:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226184 - head/usr.bin/gzip X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2011 06:37:32 -0000 Author: delphij Date: Mon Oct 10 06:37:32 2011 New Revision: 226184 URL: http://svn.freebsd.org/changeset/base/226184 Log: Incorporate recent changes from NetBSD. Most notable change is the addition of support of decompressing xz files. Obtained from: NetBSD Added: head/usr.bin/gzip/unxz.c (contents, props changed) Modified: head/usr.bin/gzip/Makefile head/usr.bin/gzip/gzip.1 head/usr.bin/gzip/gzip.c Modified: head/usr.bin/gzip/Makefile ============================================================================== --- head/usr.bin/gzip/Makefile Mon Oct 10 06:13:27 2011 (r226183) +++ head/usr.bin/gzip/Makefile Mon Oct 10 06:37:32 2011 (r226184) @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.13 2009/04/14 22:15:20 lukem Exp $ +# $NetBSD: Makefile,v 1.16 2011/06/21 13:25:45 joerg Exp $ # $FreeBSD$ .include @@ -6,8 +6,8 @@ PROG= gzip MAN= gzip.1 gzexe.1 zdiff.1 zforce.1 zmore.1 znew.1 -DPADD= ${LIBZ} -LDADD= -lz +DPADD= ${LIBZ} ${LIBLZMA} +LDADD= -lz -llzma .if ${MK_BZIP2_SUPPORT} != "no" DPADD+= ${LIBBZ2} Modified: head/usr.bin/gzip/gzip.1 ============================================================================== --- head/usr.bin/gzip/gzip.1 Mon Oct 10 06:13:27 2011 (r226183) +++ head/usr.bin/gzip/gzip.1 Mon Oct 10 06:37:32 2011 (r226184) @@ -1,4 +1,4 @@ -.\" $NetBSD: gzip.1,v 1.20 2009/04/01 08:15:37 mrg Exp $ +.\" $NetBSD: gzip.1,v 1.21 2011/06/19 02:22:36 christos Exp $ .\" .\" Copyright (c) 1997, 2003, 2004 Matthew R. Green .\" All rights reserved. @@ -25,7 +25,7 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD$ -.Dd May 23, 2011 +.Dd October 9, 2011 .Dt GZIP 1 .Os .Sh NAME @@ -185,6 +185,7 @@ Options on the command line will overrid .Sh SEE ALSO .Xr bzip2 1 , .Xr compress 1 , +.Xr xz 1 , .Xr fts 3 , .Xr zlib 3 .Sh HISTORY Modified: head/usr.bin/gzip/gzip.c ============================================================================== --- head/usr.bin/gzip/gzip.c Mon Oct 10 06:13:27 2011 (r226183) +++ head/usr.bin/gzip/gzip.c Mon Oct 10 06:37:32 2011 (r226184) @@ -1,4 +1,4 @@ -/* $NetBSD: gzip.c,v 1.99 2011/03/23 12:59:44 tsutsui Exp $ */ +/* $NetBSD: gzip.c,v 1.105 2011/08/30 23:06:00 joerg Exp $ */ /*- * Copyright (c) 1997, 1998, 2003, 2004, 2006 Matthew R. Green @@ -77,6 +77,9 @@ enum filetype { #ifndef NO_PACK_SUPPORT FT_PACK, #endif +#ifndef NO_XZ_SUPPORT + FT_XZ, +#endif FT_LAST, FT_UNKNOWN }; @@ -97,6 +100,12 @@ enum filetype { #define PACK_MAGIC "\037\036" #endif +#ifndef NO_XZ_SUPPORT +#include +#define XZ_SUFFIX ".xz" +#define XZ_MAGIC "\3757zXZ" +#endif + #define GZ_SUFFIX ".gz" #define BUFLEN (64 * 1024) @@ -139,6 +148,9 @@ static suffixes_t suffixes[] = { #ifndef NO_COMPRESS_SUPPORT SUFFIX(Z_SUFFIX, ""), #endif +#ifndef NO_XZ_SUPPORT + SUFFIX(XZ_SUFFIX, ""), +#endif SUFFIX(GZ_SUFFIX, ""), /* Overwritten by -S "" */ #endif /* SMALL */ #undef SUFFIX @@ -146,7 +158,7 @@ static suffixes_t suffixes[] = { #define NUM_SUFFIXES (sizeof suffixes / sizeof suffixes[0]) #define SUFFIX_MAXLEN 30 -static const char gzip_version[] = "FreeBSD gzip 20110523"; +static const char gzip_version[] = "FreeBSD gzip 20111009"; #ifndef SMALL static const char gzip_copyright[] = \ @@ -199,16 +211,13 @@ static int exit_value = 0; /* exit valu static char *infile; /* name of file coming in */ -static void maybe_err(const char *fmt, ...) __dead2 - __attribute__((__format__(__printf__, 1, 2))); -#if !defined(NO_BZIP2_SUPPORT) || !defined(NO_PACK_SUPPORT) -static void maybe_errx(const char *fmt, ...) __dead2 - __attribute__((__format__(__printf__, 1, 2))); -#endif -static void maybe_warn(const char *fmt, ...) - __attribute__((__format__(__printf__, 1, 2))); -static void maybe_warnx(const char *fmt, ...) - __attribute__((__format__(__printf__, 1, 2))); +static void maybe_err(const char *fmt, ...) __printflike(1, 2) __dead2; +#if !defined(NO_BZIP2_SUPPORT) || !defined(NO_PACK_SUPPORT) || \ + !defined(NO_XZ_SUPPORT) +static void maybe_errx(const char *fmt, ...) __printflike(1, 2) __dead2; +#endif +static void maybe_warn(const char *fmt, ...) __printflike(1, 2); +static void maybe_warnx(const char *fmt, ...) __printflike(1, 2); static enum filetype file_gettype(u_char *); #ifdef SMALL #define gz_compress(if, of, sz, fn, tm) gz_compress(if, of, sz) @@ -223,8 +232,8 @@ static void handle_stdin(void); static void handle_stdout(void); static void print_ratio(off_t, off_t, FILE *); static void print_list(int fd, off_t, const char *, time_t); -static void usage(void); -static void display_version(void); +static void usage(void) __dead2; +static void display_version(void) __dead2; #ifndef SMALL static void display_license(void); static void sigint_handler(int); @@ -257,7 +266,9 @@ static off_t zuncompress(FILE *, FILE *, static off_t unpack(int, int, char *, size_t, off_t *); #endif -int main(int, char **p); +#ifndef NO_XZ_SUPPORT +static off_t unxz(int, int, char *, size_t, off_t *); +#endif #ifdef SMALL #define getopt_long(a,b,c,d,e) getopt(a,b,c) @@ -456,7 +467,8 @@ maybe_err(const char *fmt, ...) exit(2); } -#if !defined(NO_BZIP2_SUPPORT) || !defined(NO_PACK_SUPPORT) +#if !defined(NO_BZIP2_SUPPORT) || !defined(NO_PACK_SUPPORT) || \ + !defined(NO_XZ_SUPPORT) /* ... without an errno. */ void maybe_errx(const char *fmt, ...) @@ -1122,6 +1134,11 @@ file_gettype(u_char *buf) return FT_PACK; else #endif +#ifndef NO_XZ_SUPPORT + if (memcmp(buf, XZ_MAGIC, 4) == 0) /* XXX: We only have 4 bytes */ + return FT_XZ; + else +#endif return FT_UNKNOWN; } @@ -1369,7 +1386,6 @@ file_uncompress(char *file, char *outfil } method = file_gettype(header1); - #ifndef SMALL if (fflag == 0 && method == FT_UNKNOWN) { maybe_warnx("%s: not in gzip format", file); @@ -1447,9 +1463,9 @@ file_uncompress(char *file, char *outfil } else zfd = STDOUT_FILENO; + switch (method) { #ifndef NO_BZIP2_SUPPORT - if (method == FT_BZIP2) { - + case FT_BZIP2: /* XXX */ if (lflag) { maybe_warnx("no -l with bzip2 files"); @@ -1457,11 +1473,11 @@ file_uncompress(char *file, char *outfil } size = unbzip2(fd, zfd, NULL, 0, NULL); - } else + break; #endif #ifndef NO_COMPRESS_SUPPORT - if (method == FT_Z) { + case FT_Z: { FILE *in, *out; /* XXX */ @@ -1494,30 +1510,42 @@ file_uncompress(char *file, char *outfil unlink(outfile); goto lose; } - } else + break; + } #endif #ifndef NO_PACK_SUPPORT - if (method == FT_PACK) { + case FT_PACK: if (lflag) { maybe_warnx("no -l with packed files"); goto lose; } size = unpack(fd, zfd, NULL, 0, NULL); - } else + break; +#endif + +#ifndef NO_XZ_SUPPORT + case FT_XZ: + if (lflag) { + maybe_warnx("no -l with xz files"); + goto lose; + } + + size = unxz(fd, zfd, NULL, 0, NULL); + break; #endif #ifndef SMALL - if (method == FT_UNKNOWN) { + case FT_UNKNOWN: if (lflag) { maybe_warnx("no -l for unknown filetypes"); goto lose; } size = cat_fd(NULL, 0, NULL, fd); - } else + break; #endif - { + default: if (lflag) { print_list(fd, isb.st_size, outfile, isb.st_mtime); close(fd); @@ -1525,6 +1553,7 @@ file_uncompress(char *file, char *outfil } size = gz_uncompress(fd, zfd, NULL, 0, NULL, file); + break; } if (close(fd) != 0) @@ -1697,7 +1726,8 @@ handle_stdin(void) return; } - usize = zuncompress(in, stdout, (char *)header1, sizeof header1, &gsize); + usize = zuncompress(in, stdout, (char *)header1, + sizeof header1, &gsize); fclose(in); break; #endif @@ -1707,6 +1737,12 @@ handle_stdin(void) (char *)header1, sizeof header1, &gsize); break; #endif +#ifndef NO_XZ_SUPPORT + case FT_XZ: + usize = unxz(STDIN_FILENO, STDOUT_FILENO, + (char *)header1, sizeof header1, &gsize); + break; +#endif } #ifndef SMALL @@ -2074,7 +2110,7 @@ static void display_license(void) { - fprintf(stderr, "%s (based on NetBSD gzip 20091011)\n", gzip_version); + fprintf(stderr, "%s (based on NetBSD gzip 20111009)\n", gzip_version); fprintf(stderr, "%s\n", gzip_copyright); exit(0); } @@ -2098,6 +2134,9 @@ display_version(void) #ifndef NO_PACK_SUPPORT #include "unpack.c" #endif +#ifndef NO_XZ_SUPPORT +#include "unxz.c" +#endif static ssize_t read_retry(int fd, void *buf, size_t sz) Added: head/usr.bin/gzip/unxz.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/gzip/unxz.c Mon Oct 10 06:37:32 2011 (r226184) @@ -0,0 +1,160 @@ +/* $NetBSD: unxz.c,v 1.5 2011/09/30 01:32:21 christos Exp $ */ + +/*- + * Copyright (c) 2011 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Christos Zoulas. + * + * 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. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the NetBSD + * Foundation, Inc. and its contributors. + * 4. Neither the name of The NetBSD Foundation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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 + +static off_t +unxz(int i, int o, char *pre, size_t prelen, off_t *bytes_in) +{ + lzma_stream strm = LZMA_STREAM_INIT; + static const int flags = LZMA_TELL_UNSUPPORTED_CHECK|LZMA_CONCATENATED; + lzma_ret ret; + lzma_action action = LZMA_RUN; + off_t bytes_out, bp; + uint8_t ibuf[BUFSIZ]; + uint8_t obuf[BUFSIZ]; + + if (bytes_in == NULL) + bytes_in = &bp; + + strm.next_in = ibuf; + memcpy(ibuf, pre, prelen); + strm.avail_in = read(i, ibuf + prelen, sizeof(ibuf) - prelen); + if (strm.avail_in == (size_t)-1) + maybe_err("read failed"); + strm.avail_in += prelen; + *bytes_in = strm.avail_in; + + if ((ret = lzma_stream_decoder(&strm, UINT64_MAX, flags)) != LZMA_OK) + maybe_errx("Can't initialize decoder (%d)", ret); + + strm.next_out = NULL; + strm.avail_out = 0; + if ((ret = lzma_code(&strm, LZMA_RUN)) != LZMA_OK) + maybe_errx("Can't read headers (%d)", ret); + + bytes_out = 0; + strm.next_out = obuf; + strm.avail_out = sizeof(obuf); + + for (;;) { + if (strm.avail_in == 0) { + strm.next_in = ibuf; + strm.avail_in = read(i, ibuf, sizeof(ibuf)); + switch (strm.avail_in) { + case (size_t)-1: + maybe_err("read failed"); + /*NOTREACHED*/ + case 0: + action = LZMA_FINISH; + break; + default: + *bytes_in += strm.avail_in; + break; + } + } + + ret = lzma_code(&strm, action); + + // Write and check write error before checking decoder error. + // This way as much data as possible gets written to output + // even if decoder detected an error. + if (strm.avail_out == 0 || ret != LZMA_OK) { + const size_t write_size = sizeof(obuf) - strm.avail_out; + + if (write(o, obuf, write_size) != (ssize_t)write_size) + maybe_err("write failed"); + + strm.next_out = obuf; + strm.avail_out = sizeof(obuf); + bytes_out += write_size; + } + + if (ret != LZMA_OK) { + if (ret == LZMA_STREAM_END) { + // Check that there's no trailing garbage. + if (strm.avail_in != 0 || read(i, ibuf, 1)) + ret = LZMA_DATA_ERROR; + else { + lzma_end(&strm); + return bytes_out; + } + } + + const char *msg; + switch (ret) { + case LZMA_MEM_ERROR: + msg = strerror(ENOMEM); + break; + + case LZMA_FORMAT_ERROR: + msg = "File format not recognized"; + break; + + case LZMA_OPTIONS_ERROR: + // FIXME: Better message? + msg = "Unsupported compression options"; + break; + + case LZMA_DATA_ERROR: + msg = "File is corrupt"; + break; + + case LZMA_BUF_ERROR: + msg = "Unexpected end of input"; + break; + + case LZMA_MEMLIMIT_ERROR: + msg = "Reached memory limit"; + break; + + default: + maybe_errx("Unknown error (%d)", ret); + break; + } + maybe_errx("%s", msg); + + } + } +} From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 08:44:32 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 820B6106566C; Mon, 10 Oct 2011 08:44:32 +0000 (UTC) (envelope-from tomelite82@gmail.com) Received: from mail-yx0-f182.google.com (mail-yx0-f182.google.com [209.85.213.182]) by mx1.freebsd.org (Postfix) with ESMTP id E17508FC17; Mon, 10 Oct 2011 08:44:31 +0000 (UTC) Received: by yxk36 with SMTP id 36so6455991yxk.13 for ; Mon, 10 Oct 2011 01:44:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=DXyffEZ5byNkgAVzgy+UQCDHf2NoS9xZ+jvdeYmhLRQ=; b=YYSFnf6Y8P6g1R8J+NxcbYVFurn1dHNv2Elh7pkL4dtkmShfiUEGmWdOdrx7G7/w83 qh+9UWMIDaFDpnOw2j50F+zWI8lNhdnil8ML1OrGWf6dna6HYP2cmfxVSGsOrOdUDal0 CsKAVKmELzR3iQoRG4O188C92DpkXIBv9a6M8= MIME-Version: 1.0 Received: by 10.150.209.10 with SMTP id h10mr5454266ybg.52.1318236271182; Mon, 10 Oct 2011 01:44:31 -0700 (PDT) Sender: tomelite82@gmail.com Received: by 10.151.78.21 with HTTP; Mon, 10 Oct 2011 01:44:30 -0700 (PDT) In-Reply-To: <20111010061313.GC94905@FreeBSD.org> References: <201110031951.p93JpJLA025249@svn.freebsd.org> <20111009194732.GB94905@glebius.int.ru> <20111010061313.GC94905@FreeBSD.org> Date: Mon, 10 Oct 2011 01:44:30 -0700 X-Google-Sender-Auth: DHcS6B9HwITccSdpnBDJrOn9yMk Message-ID: From: Qing Li To: Gleb Smirnoff Content-Type: multipart/mixed; boundary=000e0cd37a74ac83fa04aeedcc3c Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, bz@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r225947 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2011 08:44:32 -0000 --000e0cd37a74ac83fa04aeedcc3c Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Okay, now I know what's confusing you ... it's that bug I introduced :-) The 2nd "if()" check on the RTF_GATEWAY flag should have been an "else if()". In a nutshell, the logic is any indirect route should fail the check, except for that special host route. Attached is the rework of that part of the patch, with some cleaning up per your suggestion. Thank you very much for catching that bug. --Qing > Q> > Well, after third review it is clear, that > Q> > next if() case would definitely be true, and you would proceed > Q> > with return. But that is difficult to see from first glance. > Q> > Q> =A0 =A0Not so, only for an indirect prefix route. > Q> > Q> > I'd suggest to remove error variable, return immediately in > Q> > all error cases, and also the RTF_GATEWAY check can be shifted up, > Q> > since it is the most simple and the most usual to be true. > Q> > > Q> > Q> =A0 No, the RTF_GATEWAY check cannot be shifted up because if we did > Q> =A0 that, the (indirect host route, with destination matching the gate= way IP) > Q> =A0 would never be executed, if when that set of conditions are true, = which is > Q> =A0 allowed and the reason for the patch in the first place. > > Can you elaborate on that please? As far as I see, any rtentry that has > RTF_GATEWAY would return with EINVAL. The first if() clause doesn't > do any actual processing, only checking flags and memcmp()ing. The third > clause either. The error is never reset to 0. So, I don't see any > difference in returning EINVAL for RTF_GATEWAY immediately or later > after other checks. > --000e0cd37a74ac83fa04aeedcc3c Content-Type: application/octet-stream; name="in.c.diff" Content-Disposition: attachment; filename="in.c.diff" Content-Transfer-Encoding: base64 X-Attachment-Id: f_gtl7sf890 SW5kZXg6IGluLmMKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PQotLS0gaW4uYwkocmV2aXNpb24gMjI2MTg0KQorKysgaW4u Ywkod29ya2luZyBjb3B5KQpAQCAtMTQxNCw4ICsxNDE0LDYgQEAgc3RhdGljIGludAogaW5fbGx0 YWJsZV9ydGNoZWNrKHN0cnVjdCBpZm5ldCAqaWZwLCB1X2ludCBmbGFncywgY29uc3Qgc3RydWN0 IHNvY2thZGRyICpsM2FkZHIpCiB7CiAJc3RydWN0IHJ0ZW50cnkgKnJ0OwotCXN0cnVjdCBpZm5l dCAqeGlmcDsKLQlpbnQgZXJyb3IgPSAwOwogCiAJS0FTU0VSVChsM2FkZHItPnNhX2ZhbWlseSA9 PSBBRl9JTkVULAogCSAgICAoInNpbl9mYW1pbHkgJWQiLCBsM2FkZHItPnNhX2ZhbWlseSkpOwpA QCAtMTQzMiwyMSArMTQzMCwxNiBAQCBpbl9sbHRhYmxlX3J0Y2hlY2soc3RydWN0IGlmbmV0ICpp ZnAsIHVfaW50IGZsYWdzLAogCSAqIHN1Y2ggYXMgTUFORVQsIGFuZCB0aGUgaW50ZXJmYWNlIGlz IG9mIHRoZSBjb3JyZWN0IHR5cGUsIHRoZW4KIAkgKiBhbGxvdyBmb3IgQVJQIHRvIHByb2NlZWQu CiAJICovCi0JaWYgKHJ0LT5ydF9mbGFncyAmIChSVEZfR0FURVdBWSB8IFJURl9IT1NUKSkgewot CQl4aWZwID0gcnQtPnJ0X2lmcDsKLQkJCi0JCWlmICh4aWZwICYmICh4aWZwLT5pZl90eXBlICE9 IElGVF9FVEhFUiB8fAotCQkgICAgICh4aWZwLT5pZl9mbGFncyAmIChJRkZfTk9BUlAgfCBJRkZf U1RBVElDQVJQKSkgIT0gMCkpCi0JCQllcnJvciA9IEVJTlZBTDsKLQotCQlpZiAobWVtY21wKHJ0 LT5ydF9nYXRld2F5LT5zYV9kYXRhLCBsM2FkZHItPnNhX2RhdGEsCi0JCSAgICBzaXplb2YoaW5f YWRkcl90KSkgIT0gMCkKLQkJCWVycm9yID0gRUlOVkFMOwotCX0KLQogCWlmIChydC0+cnRfZmxh Z3MgJiBSVEZfR0FURVdBWSkgewotCQlSVEZSRUVfTE9DS0VEKHJ0KTsKLQkJcmV0dXJuIChFSU5W QUwpOworCQlpZiAoIShydC0+cnRfZmxhZ3MgJiBSVEZfSE9TVCkgfHwgKCFydC0+cnRfaWZwIHx8 CisJCQlydC0+cnRfaWZwLT5pZl90eXBlICE9IElGVF9FVEhFUiB8fAorCQkJICAocnQtPnJ0X2lm cC0+aWZfZmxhZ3MgJiAKKwkJCSAgIChJRkZfTk9BUlAgfCBJRkZfU1RBVElDQVJQKSkgIT0gMCB8 fAorCQkJICBtZW1jbXAocnQtPnJ0X2dhdGV3YXktPnNhX2RhdGEsIGwzYWRkci0+c2FfZGF0YSwK KwkJCQkgc2l6ZW9mKGluX2FkZHJfdCkpICE9IDApKSB7CisJCQlSVEZSRUVfTE9DS0VEKHJ0KTsK KwkJCXJldHVybiAoRUlOVkFMKTsKKwkJfQogCX0KIAogCS8qCkBAIC0xNDU1LDMyICsxNDQ4LDMx IEBAIGluX2xsdGFibGVfcnRjaGVjayhzdHJ1Y3QgaWZuZXQgKmlmcCwgdV9pbnQgZmxhZ3MsCiAJ ICogaW50ZXJmYWNlcyBoYXZlIHRoZSBzYW1lIHByZWZpeC4gQW4gaW5jb21pbmcgcGFja2V0IGFy cml2ZXMKIAkgKiBvbiBvbmUgaW50ZXJmYWNlIGFuZCB0aGUgY29ycmVzcG9uZGluZyBvdXRnb2lu ZyBwYWNrZXQgbGVhdmVzCiAJICogYW5vdGhlciBpbnRlcmZhY2UuCi0JICogCiAJICovCiAJaWYg KHJ0LT5ydF9pZnAgIT0gaWZwKSB7Ci0JCWNoYXIgKnNhLCAqbWFzaywgKmFkZHIsICpsaW07CisJ CWNvbnN0IGNoYXIgKnNhLCAqbWFzaywgKmFkZHIsICpsaW07CiAJCWludCBsZW47CiAKLQkJc2Eg PSAoY2hhciAqKXJ0X2tleShydCk7Ci0JCW1hc2sgPSAoY2hhciAqKXJ0X21hc2socnQpOwotCQlh ZGRyID0gKGNoYXIgKilfX0RFQ09OU1Qoc3RydWN0IHNvY2thZGRyICosIGwzYWRkcik7Ci0JCWxl biA9ICgoc3RydWN0IHNvY2thZGRyX2luICopX19ERUNPTlNUKHN0cnVjdCBzb2NrYWRkciAqLCBs M2FkZHIpKS0+c2luX2xlbjsKKwkJc2EgPSAoY29uc3QgY2hhciAqKXJ0X2tleShydCk7CisJCW1h c2sgPSAoY29uc3QgY2hhciAqKXJ0X21hc2socnQpOworCQlhZGRyID0gKGNvbnN0IGNoYXIgKils M2FkZHI7CisJCWxlbiA9ICgoY29uc3Qgc3RydWN0IHNvY2thZGRyX2luICopbDNhZGRyKS0+c2lu X2xlbjsKIAkJbGltID0gYWRkciArIGxlbjsKIAogCQlmb3IgKCA7IGFkZHIgPCBsaW07IHNhKyss IG1hc2srKywgYWRkcisrKSB7CiAJCQlpZiAoKCpzYSBeICphZGRyKSAmICptYXNrKSB7Ci0JCQkJ ZXJyb3IgPSBFSU5WQUw7CiAjaWZkZWYgRElBR05PU1RJQwogCQkJCWxvZyhMT0dfSU5GTywgIklQ djQgYWRkcmVzczogXCIlc1wiIGlzIG5vdCBvbiB0aGUgbmV0d29ya1xuIiwKIAkJCQkgICAgaW5l dF9udG9hKCgoY29uc3Qgc3RydWN0IHNvY2thZGRyX2luICopbDNhZGRyKS0+c2luX2FkZHIpKTsK ICNlbmRpZgotCQkJCWJyZWFrOworCQkJCVJURlJFRV9MT0NLRUQocnQpOworCQkJCXJldHVybiAo RUlOVkFMKTsKIAkJCX0KIAkJfQogCX0KIAogCVJURlJFRV9MT0NLRUQocnQpOwotCXJldHVybiAo ZXJyb3IpOworCXJldHVybiAoMCk7CiB9CiAKIC8qCg== --000e0cd37a74ac83fa04aeedcc3c-- From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 09:13:07 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8218A106566B; Mon, 10 Oct 2011 09:13:07 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 71CB58FC08; Mon, 10 Oct 2011 09:13:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9A9D7Df051039; Mon, 10 Oct 2011 09:13:07 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9A9D7aG051037; Mon, 10 Oct 2011 09:13:07 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201110100913.p9A9D7aG051037@svn.freebsd.org> From: Christian Brueffer Date: Mon, 10 Oct 2011 09:13:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226185 - head/sys/kgssapi/krb5 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2011 09:13:07 -0000 Author: brueffer Date: Mon Oct 10 09:13:07 2011 New Revision: 226185 URL: http://svn.freebsd.org/changeset/base/226185 Log: Add missing break statement to make sure all 3DES etypes really are treated the same. CID: 3624 Found with: Coverity Prevent(tm) Reviewed by: dfr MFC after: 1 week Modified: head/sys/kgssapi/krb5/krb5_mech.c Modified: head/sys/kgssapi/krb5/krb5_mech.c ============================================================================== --- head/sys/kgssapi/krb5/krb5_mech.c Mon Oct 10 06:37:32 2011 (r226184) +++ head/sys/kgssapi/krb5/krb5_mech.c Mon Oct 10 09:13:07 2011 (r226185) @@ -288,6 +288,7 @@ get_keys(struct krb5_context *kc) case ETYPE_DES3_CBC_SHA1: case ETYPE_OLD_DES3_CBC_SHA1: etype = ETYPE_DES3_CBC_SHA1; + break; default: etype = keydata->kk_type; From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 09:33:07 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E1CCF1065670; Mon, 10 Oct 2011 09:33:07 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D16D38FC15; Mon, 10 Oct 2011 09:33:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9A9X75Q051704; Mon, 10 Oct 2011 09:33:07 GMT (envelope-from melifaro@svn.freebsd.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9A9X7fD051702; Mon, 10 Oct 2011 09:33:07 GMT (envelope-from melifaro@svn.freebsd.org) Message-Id: <201110100933.p9A9X7fD051702@svn.freebsd.org> From: "Alexander V. Chernikov" Date: Mon, 10 Oct 2011 09:33:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226186 - head/sys/netgraph X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2011 09:33:08 -0000 Author: melifaro Date: Mon Oct 10 09:33:07 2011 New Revision: 226186 URL: http://svn.freebsd.org/changeset/base/226186 Log: Free mbuf in case when protocol in unknown in ng_ipfw_rcvdata(). This change fixes (theoretically) possible mbuf leak introduced in r225586. Reorder code a bit and change return codes to be more specific Reviewed by: glebius Approved by: kib (mentor) Modified: head/sys/netgraph/ng_ipfw.c Modified: head/sys/netgraph/ng_ipfw.c ============================================================================== --- head/sys/netgraph/ng_ipfw.c Mon Oct 10 09:13:07 2011 (r226185) +++ head/sys/netgraph/ng_ipfw.c Mon Oct 10 09:33:07 2011 (r226186) @@ -242,7 +242,7 @@ ng_ipfw_rcvdata(hook_p hook, item_p item if (m->m_len < sizeof(struct ip) && (m = m_pullup(m, sizeof(struct ip))) == NULL) - return (EINVAL); + return (ENOBUFS); ip = mtod(m, struct ip *); @@ -252,18 +252,14 @@ ng_ipfw_rcvdata(hook_p hook, item_p item #ifdef INET case IPVERSION: ip_input(m); - break; + return (0); #endif #ifdef INET6 case IPV6_VERSION >> 4: ip6_input(m); - break; + return (0); #endif - default: - NG_FREE_M(m); - return (EINVAL); } - return (0); } else { switch (ip->ip_v) { #ifdef INET @@ -277,10 +273,12 @@ ng_ipfw_rcvdata(hook_p hook, item_p item return (ip6_output(m, NULL, NULL, 0, NULL, NULL, NULL)); #endif - default: - return (EINVAL); } } + + /* unknown IP protocol version */ + NG_FREE_M(m); + return (EPROTONOSUPPORT); } static int From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 11:05:58 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AFB96106564A; Mon, 10 Oct 2011 11:05:58 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 85B128FC14; Mon, 10 Oct 2011 11:05:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9AB5wgE056774; Mon, 10 Oct 2011 11:05:58 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9AB5wIj056772; Mon, 10 Oct 2011 11:05:58 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201110101105.p9AB5wIj056772@svn.freebsd.org> From: Glen Barber Date: Mon, 10 Oct 2011 11:05:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226187 - stable/9/usr.bin/script X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2011 11:05:58 -0000 Author: gjb (doc committer) Date: Mon Oct 10 11:05:58 2011 New Revision: 226187 URL: http://svn.freebsd.org/changeset/base/226187 Log: MFC r225857: - Fix a few grammar and mdoc nits in script.1 PR: 161088 Approved by: re (kib) Modified: stable/9/usr.bin/script/script.1 Directory Properties: stable/9/usr.bin/script/ (props changed) Modified: stable/9/usr.bin/script/script.1 ============================================================================== --- stable/9/usr.bin/script/script.1 Mon Oct 10 09:33:07 2011 (r226186) +++ stable/9/usr.bin/script/script.1 Mon Oct 10 11:05:58 2011 (r226187) @@ -28,7 +28,7 @@ .\" @(#)script.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd January 22, 2004 +.Dd September 28, 2011 .Dt SCRIPT 1 .Os .Sh NAME @@ -73,15 +73,16 @@ or .Pa typescript , retaining the prior contents. .It Fl k -Log keys sent to program as well as output. +Log keys sent to the program as well as output. .It Fl q Run in quiet mode, omit the start and stop status messages. .It Fl t Ar time -Specify time interval between flushing script output file. +Specify the interval at which the script output file will be flushed +to disk, in seconds. A value of 0 causes .Nm -to flush for every character I/O event. +to flush after every character I/O event. The default interval is 30 seconds. .El @@ -136,13 +137,15 @@ If .Ev SHELL is not set, the Bourne shell is assumed. -(Most shells set this variable automatically). +.Pq Most shells set this variable automatically . .El .Sh SEE ALSO .Xr csh 1 -(for the +.Po +for the .Em history -mechanism). +mechanism +.Pc . .Sh HISTORY The .Nm @@ -165,13 +168,15 @@ mode, echo cancelling is far from ideal. The slave terminal mode is checked for ECHO mode to check when to avoid manual echo logging. This does not -work when in a raw mode where the program being run is doing manual echo. +work when the terminal is in a raw mode where +the program being run is doing manual echo. .Pp -If the +If .Nm -reads zero bytes from the terminal it switches to a mode when it probes read -only once a second until it gets some data. -This prevents the +reads zero bytes from the terminal, it switches to a mode when it +only attempts to read +once a second until there is data to read. +This prevents .Nm -spinning on zero-byte reads, but might cause a 1-second delay in -processing of the user input. +from spinning on zero-byte reads, but might cause a 1-second delay in +processing of user input. From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 11:06:49 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 714EF1065670; Mon, 10 Oct 2011 11:06:49 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 477468FC25; Mon, 10 Oct 2011 11:06:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9AB6n3K056837; Mon, 10 Oct 2011 11:06:49 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9AB6nRm056835; Mon, 10 Oct 2011 11:06:49 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201110101106.p9AB6nRm056835@svn.freebsd.org> From: Glen Barber Date: Mon, 10 Oct 2011 11:06:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226188 - stable/8/usr.bin/script X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2011 11:06:49 -0000 Author: gjb (doc committer) Date: Mon Oct 10 11:06:48 2011 New Revision: 226188 URL: http://svn.freebsd.org/changeset/base/226188 Log: MFC r225857: - Fix a few grammar and mdoc nits in script.1 PR: 161088 Modified: stable/8/usr.bin/script/script.1 Directory Properties: stable/8/usr.bin/script/ (props changed) Modified: stable/8/usr.bin/script/script.1 ============================================================================== --- stable/8/usr.bin/script/script.1 Mon Oct 10 11:05:58 2011 (r226187) +++ stable/8/usr.bin/script/script.1 Mon Oct 10 11:06:48 2011 (r226188) @@ -32,7 +32,7 @@ .\" @(#)script.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd January 22, 2004 +.Dd September 28, 2011 .Dt SCRIPT 1 .Os .Sh NAME @@ -77,15 +77,16 @@ or .Pa typescript , retaining the prior contents. .It Fl k -Log keys sent to program as well as output. +Log keys sent to the program as well as output. .It Fl q Run in quiet mode, omit the start and stop status messages. .It Fl t Ar time -Specify time interval between flushing script output file. +Specify the interval at which the script output file will be flushed +to disk, in seconds. A value of 0 causes .Nm -to flush for every character I/O event. +to flush after every character I/O event. The default interval is 30 seconds. .El @@ -140,13 +141,15 @@ If .Ev SHELL is not set, the Bourne shell is assumed. -(Most shells set this variable automatically). +.Pq Most shells set this variable automatically . .El .Sh SEE ALSO .Xr csh 1 -(for the +.Po +for the .Em history -mechanism). +mechanism +.Pc . .Sh HISTORY The .Nm @@ -169,13 +172,15 @@ mode, echo cancelling is far from ideal. The slave terminal mode is checked for ECHO mode to check when to avoid manual echo logging. This does not -work when in a raw mode where the program being run is doing manual echo. +work when the terminal is in a raw mode where +the program being run is doing manual echo. .Pp -If the +If .Nm -reads zero bytes from the terminal it switches to a mode when it probes read -only once a second until it gets some data. -This prevents the +reads zero bytes from the terminal, it switches to a mode when it +only attempts to read +once a second until there is data to read. +This prevents .Nm -spinning on zero-byte reads, but might cause a 1-second delay in -processing of the user input. +from spinning on zero-byte reads, but might cause a 1-second delay in +processing of user input. From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 11:07:37 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1703F1065677; Mon, 10 Oct 2011 11:07:37 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E152E8FC1F; Mon, 10 Oct 2011 11:07:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9AB7a6s056906; Mon, 10 Oct 2011 11:07:36 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9AB7anG056904; Mon, 10 Oct 2011 11:07:36 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201110101107.p9AB7anG056904@svn.freebsd.org> From: Glen Barber Date: Mon, 10 Oct 2011 11:07:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226189 - stable/7/usr.bin/script X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2011 11:07:37 -0000 Author: gjb (doc committer) Date: Mon Oct 10 11:07:36 2011 New Revision: 226189 URL: http://svn.freebsd.org/changeset/base/226189 Log: MFC r225857: - Fix a few grammar and mdoc nits in script.1 PR: 161088 Modified: stable/7/usr.bin/script/script.1 Directory Properties: stable/7/usr.bin/script/ (props changed) Modified: stable/7/usr.bin/script/script.1 ============================================================================== --- stable/7/usr.bin/script/script.1 Mon Oct 10 11:06:48 2011 (r226188) +++ stable/7/usr.bin/script/script.1 Mon Oct 10 11:07:36 2011 (r226189) @@ -32,7 +32,7 @@ .\" @(#)script.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd January 22, 2004 +.Dd September 28, 2011 .Dt SCRIPT 1 .Os .Sh NAME @@ -77,15 +77,16 @@ or .Pa typescript , retaining the prior contents. .It Fl k -Log keys sent to program as well as output. +Log keys sent to the program as well as output. .It Fl q Run in quiet mode, omit the start and stop status messages. .It Fl t Ar time -Specify time interval between flushing script output file. +Specify the interval at which the script output file will be flushed +to disk, in seconds. A value of 0 causes .Nm -to flush for every character I/O event. +to flush after every character I/O event. The default interval is 30 seconds. .El @@ -140,13 +141,15 @@ If .Ev SHELL is not set, the Bourne shell is assumed. -(Most shells set this variable automatically). +.Pq Most shells set this variable automatically . .El .Sh SEE ALSO .Xr csh 1 -(for the +.Po +for the .Em history -mechanism). +mechanism +.Pc . .Sh HISTORY The .Nm @@ -169,13 +172,15 @@ mode, echo cancelling is far from ideal. The slave terminal mode is checked for ECHO mode to check when to avoid manual echo logging. This does not -work when in a raw mode where the program being run is doing manual echo. +work when the terminal is in a raw mode where +the program being run is doing manual echo. .Pp -If the +If .Nm -reads zero bytes from the terminal it switches to a mode when it probes read -only once a second until it gets some data. -This prevents the +reads zero bytes from the terminal, it switches to a mode when it +only attempts to read +once a second until there is data to read. +This prevents .Nm -spinning on zero-byte reads, but might cause a 1-second delay in -processing of the user input. +from spinning on zero-byte reads, but might cause a 1-second delay in +processing of user input. From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 11:11:05 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6EE6B106566C; Mon, 10 Oct 2011 11:11:05 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5E48F8FC20; Mon, 10 Oct 2011 11:11:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9ABB5CT057062; Mon, 10 Oct 2011 11:11:05 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9ABB5M8057060; Mon, 10 Oct 2011 11:11:05 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201110101111.p9ABB5M8057060@svn.freebsd.org> From: Glen Barber Date: Mon, 10 Oct 2011 11:11:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226190 - stable/9/bin/ps X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2011 11:11:05 -0000 Author: gjb (doc committer) Date: Mon Oct 10 11:11:05 2011 New Revision: 226190 URL: http://svn.freebsd.org/changeset/base/226190 Log: MFC 225908, 225912, 225927: 225908: - Reorder default ps(1) output according to reality. 225912: - there's no reason the semantics of the -x flag are being explained in the -a flag description - be more precise regarding the relation between the -a flag and the security.bsd.see_other_uids sysctl - describe the format of the -t flag's argument - 'con' no longer is a possible entry in the 'TT' column - explain that the 'TT' column refers to pseudo-terminals via mere numbers - add a hint in the 'tt' keyword description that a keyword 'tty' exists, which will give the full terminal pathname 225859: - Correct a typo that was introduced in 225912 Approved by: re (kib) Modified: stable/9/bin/ps/ps.1 Directory Properties: stable/9/bin/ps/ (props changed) Modified: stable/9/bin/ps/ps.1 ============================================================================== --- stable/9/bin/ps/ps.1 Mon Oct 10 11:07:36 2011 (r226189) +++ stable/9/bin/ps/ps.1 Mon Oct 10 11:11:05 2011 (r226190) @@ -29,7 +29,7 @@ .\" @(#)ps.1 8.3 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd July 1, 2011 +.Dd October 1, 2011 .Dt PS 1 .Os .Sh NAME @@ -54,6 +54,11 @@ utility displays a header line, followed by lines containing information about all of your processes that have controlling terminals. +If the +.Fl x +options is specified, +.Nm +will also display processes that do not have controlling terminals. .Pp A different set of processes can be selected for display by using any combination of the @@ -90,8 +95,8 @@ and .Fl o options). The default output format includes, for each process, the process' ID, -controlling terminal, CPU time (including both user and system time), -state, and associated command. +controlling terminal, state, CPU time (including both user and system time) +and associated command. .Pp The process file system (see .Xr procfs 5 ) @@ -103,13 +108,9 @@ The options are as follows: .Bl -tag -width indent .It Fl a Display information about other users' processes as well as your own. -This will skip any processes which do not have a controlling terminal, -unless the -.Fl x -option is also specified. -This can be disabled by setting the +If the .Va security.bsd.see_other_uids -sysctl to zero. +sysctl is set to zero, this option is honored only if the UID of the user is 0. .It Fl c Change the .Dq command @@ -216,6 +217,9 @@ with the standard input. .It Fl t Display information about processes attached to the specified terminal devices. +Full pathnames, as well as abbreviations (see explanation of the +.Cm tt +keyword) can be specified. .It Fl U Display the processes belonging to the specified usernames. .It Fl u @@ -427,12 +431,15 @@ The process is being traced or debugged. An abbreviation for the pathname of the controlling terminal, if any. The abbreviation consists of the three letters following .Pa /dev/tty , -or, for the console, -.Dq Li con . +or, for pseudo-terminals, the corresponding entry in +.Pa /dev/pts . This is followed by a .Ql - if the process can no longer reach that controlling terminal (i.e., it has been revoked). +The full pathname of the controlling terminal is available via the +.Cm tty +keyword. .It Cm wchan The event (an address in the system) on which a process waits. When printed numerically, the initial part of the address is From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 11:11:59 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D523F106564A; Mon, 10 Oct 2011 11:11:59 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C4B128FC12; Mon, 10 Oct 2011 11:11:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9ABBxEN057125; Mon, 10 Oct 2011 11:11:59 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9ABBx3e057123; Mon, 10 Oct 2011 11:11:59 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201110101111.p9ABBx3e057123@svn.freebsd.org> From: Glen Barber Date: Mon, 10 Oct 2011 11:11:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226191 - stable/8/bin/ps X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2011 11:12:00 -0000 Author: gjb (doc committer) Date: Mon Oct 10 11:11:59 2011 New Revision: 226191 URL: http://svn.freebsd.org/changeset/base/226191 Log: MFC 225908, 225912, 225927: 225908: - Reorder default ps(1) output according to reality. 225912: - there's no reason the semantics of the -x flag are being explained in the -a flag description - be more precise regarding the relation between the -a flag and the security.bsd.see_other_uids sysctl - describe the format of the -t flag's argument - 'con' no longer is a possible entry in the 'TT' column - explain that the 'TT' column refers to pseudo-terminals via mere numbers - add a hint in the 'tt' keyword description that a keyword 'tty' exists, which will give the full terminal pathname 225859: - Correct a typo that was introduced in 225912 Modified: stable/8/bin/ps/ps.1 Directory Properties: stable/8/bin/ps/ (props changed) Modified: stable/8/bin/ps/ps.1 ============================================================================== --- stable/8/bin/ps/ps.1 Mon Oct 10 11:11:05 2011 (r226190) +++ stable/8/bin/ps/ps.1 Mon Oct 10 11:11:59 2011 (r226191) @@ -29,7 +29,7 @@ .\" @(#)ps.1 8.3 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd March 16, 2011 +.Dd October 1, 2011 .Dt PS 1 .Os .Sh NAME @@ -54,6 +54,11 @@ utility displays a header line, followed by lines containing information about all of your processes that have controlling terminals. +If the +.Fl x +options is specified, +.Nm +will also display processes that do not have controlling terminals. .Pp A different set of processes can be selected for display by using any combination of the @@ -90,8 +95,8 @@ and .Fl o options). The default output format includes, for each process, the process' ID, -controlling terminal, CPU time (including both user and system time), -state, and associated command. +controlling terminal, state, CPU time (including both user and system time) +and associated command. .Pp The process file system (see .Xr procfs 5 ) @@ -103,13 +108,9 @@ The options are as follows: .Bl -tag -width indent .It Fl a Display information about other users' processes as well as your own. -This will skip any processes which do not have a controlling terminal, -unless the -.Fl x -option is also specified. -This can be disabled by setting the +If the .Va security.bsd.see_other_uids -sysctl to zero. +sysctl is set to zero, this option is honored only if the UID of the user is 0. .It Fl c Change the .Dq command @@ -213,6 +214,9 @@ with the standard input. .It Fl t Display information about processes attached to the specified terminal devices. +Full pathnames, as well as abbreviations (see explanation of the +.Cm tt +keyword) can be specified. .It Fl U Display the processes belonging to the specified usernames. .It Fl u @@ -418,12 +422,15 @@ The process is being traced or debugged. An abbreviation for the pathname of the controlling terminal, if any. The abbreviation consists of the three letters following .Pa /dev/tty , -or, for the console, -.Dq Li con . +or, for pseudo-terminals, the corresponding entry in +.Pa /dev/pts . This is followed by a .Ql - if the process can no longer reach that controlling terminal (i.e., it has been revoked). +The full pathname of the controlling terminal is available via the +.Cm tty +keyword. .It Cm wchan The event (an address in the system) on which a process waits. When printed numerically, the initial part of the address is From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 11:12:41 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8B1D6106567A; Mon, 10 Oct 2011 11:12:41 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 021838FC20; Mon, 10 Oct 2011 11:12:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9ABCeJw057186; Mon, 10 Oct 2011 11:12:40 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9ABCejq057184; Mon, 10 Oct 2011 11:12:40 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201110101112.p9ABCejq057184@svn.freebsd.org> From: Glen Barber Date: Mon, 10 Oct 2011 11:12:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226192 - stable/7/bin/ps X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2011 11:12:41 -0000 Author: gjb (doc committer) Date: Mon Oct 10 11:12:40 2011 New Revision: 226192 URL: http://svn.freebsd.org/changeset/base/226192 Log: MFC 225908, 225912, 225927: 225908: - Reorder default ps(1) output according to reality. 225912: - there's no reason the semantics of the -x flag are being explained in the -a flag description - be more precise regarding the relation between the -a flag and the security.bsd.see_other_uids sysctl - describe the format of the -t flag's argument - 'con' no longer is a possible entry in the 'TT' column - explain that the 'TT' column refers to pseudo-terminals via mere numbers - add a hint in the 'tt' keyword description that a keyword 'tty' exists, which will give the full terminal pathname 225859: - Correct a typo that was introduced in 225912 Modified: stable/7/bin/ps/ps.1 Directory Properties: stable/7/bin/ps/ (props changed) Modified: stable/7/bin/ps/ps.1 ============================================================================== --- stable/7/bin/ps/ps.1 Mon Oct 10 11:11:59 2011 (r226191) +++ stable/7/bin/ps/ps.1 Mon Oct 10 11:12:40 2011 (r226192) @@ -29,7 +29,7 @@ .\" @(#)ps.1 8.3 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd May 16, 2009 +.Dd October 1, 2011 .Dt PS 1 .Os .Sh NAME @@ -54,6 +54,11 @@ utility displays a header line, followed by lines containing information about all of your processes that have controlling terminals. +If the +.Fl x +options is specified, +.Nm +will also display processes that do not have controlling terminals. .Pp A different set of processes can be selected for display by using any combination of the @@ -90,8 +95,8 @@ and .Fl o options). The default output format includes, for each process, the process' ID, -controlling terminal, CPU time (including both user and system time), -state, and associated command. +controlling terminal, state, CPU time (including both user and system time) +and associated command. .Pp The process file system (see .Xr procfs 5 ) @@ -103,13 +108,9 @@ The options are as follows: .Bl -tag -width indent .It Fl a Display information about other users' processes as well as your own. -This will skip any processes which do not have a controlling terminal, -unless the -.Fl x -option is also specified. -This can be disabled by setting the +If the .Va security.bsd.see_other_uids -sysctl to zero. +sysctl is set to zero, this option is honored only if the UID of the user is 0. .It Fl c Change the .Dq command @@ -213,6 +214,9 @@ with the standard input. .It Fl t Display information about processes attached to the specified terminal devices. +Full pathnames, as well as abbreviations (see explanation of the +.Cm tt +keyword) can be specified. .It Fl U Display the processes belonging to the specified usernames. .It Fl u @@ -411,12 +415,15 @@ The process is being traced or debugged. An abbreviation for the pathname of the controlling terminal, if any. The abbreviation consists of the three letters following .Pa /dev/tty , -or, for the console, -.Dq Li con . +or, for pseudo-terminals, the corresponding entry in +.Pa /dev/pts . This is followed by a .Ql - if the process can no longer reach that controlling terminal (i.e., it has been revoked). +The full pathname of the controlling terminal is available via the +.Cm tty +keyword. .It Cm wchan The event (an address in the system) on which a process waits. When printed numerically, the initial part of the address is From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 11:14:04 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2909B106567A; Mon, 10 Oct 2011 11:14:04 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F37788FC0C; Mon, 10 Oct 2011 11:14:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9ABE36j057272; Mon, 10 Oct 2011 11:14:03 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9ABE3go057270; Mon, 10 Oct 2011 11:14:03 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201110101114.p9ABE3go057270@svn.freebsd.org> From: Glen Barber Date: Mon, 10 Oct 2011 11:14:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226193 - stable/9/share/man/man7 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2011 11:14:04 -0000 Author: gjb (doc committer) Date: Mon Oct 10 11:14:03 2011 New Revision: 226193 URL: http://svn.freebsd.org/changeset/base/226193 Log: MFC r225858, 225859, 226172: 225858: - Document and provide an example for PORTS_MODULES [1] 225859: - Whitespace cleanup 226172: - Bump date PR: 161017 [1] Approved by: re (kib) Modified: stable/9/share/man/man7/build.7 Directory Properties: stable/9/share/man/man7/ (props changed) Modified: stable/9/share/man/man7/build.7 ============================================================================== --- stable/9/share/man/man7/build.7 Mon Oct 10 11:12:40 2011 (r226192) +++ stable/9/share/man/man7/build.7 Mon Oct 10 11:14:03 2011 (r226193) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 16, 2011 +.Dd September 29, 2011 .Dt BUILD 7 .Os .Sh NAME @@ -238,7 +238,7 @@ This command takes a long time. Get updated sources as configured in .Xr make.conf 5 . .It Cm targets -Print a list of supported +Print a list of supported .Va TARGET / .Va TARGET_ARCH @@ -399,21 +399,31 @@ It defaults to .It Va KERNFAST If set, the build target .Cm buildkernel -defaults to setting +defaults to setting .Va NO_KERNELCLEAN , .Va NO_KERNELCONFIG , -.Va NO_KERNELDEPEND +.Va NO_KERNELDEPEND and .Va NO_KERNELOBJ . When set to a value other than .Cm 1 -then -.Va KERNCONF -is set to the value of +then +.Va KERNCONF +is set to the value of .Va KERNFAST . .It Va LOCAL_DIRS If set, this variable supplies a list of additional directories to build, relative to the root of the source tree. +.It Va PORTS_MODULES +A list of ports with kernel modules that should be built and installed +as part of the +.Cm buildkernel +and +.Cm installkernel +process. +.Bd -literal -offset indent +make PORTS_MODULES=emulators/kqemu-kmod kernel +.Ed .It Va SUBDIR_OVERRIDE Override the default list of sub-directories and only build the sub-directory named in this variable. @@ -442,11 +452,11 @@ output. Set this to cross-build for a different architecture. If not set, .Va TARGET_ARCH -defaults to the current machine architecture, unless +defaults to the current machine architecture, unless .Va TARGET is also set, in which case it defaults to the appropriate value for that platform. -Typically, one only needs to set +Typically, one only needs to set .Va TARGET . .El .Pp From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 11:14:44 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 82BE01065672; Mon, 10 Oct 2011 11:14:44 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 58E1F8FC25; Mon, 10 Oct 2011 11:14:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9ABEitp057326; Mon, 10 Oct 2011 11:14:44 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9ABEiVK057324; Mon, 10 Oct 2011 11:14:44 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201110101114.p9ABEiVK057324@svn.freebsd.org> From: Glen Barber Date: Mon, 10 Oct 2011 11:14:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226194 - stable/8/share/man/man7 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2011 11:14:44 -0000 Author: gjb (doc committer) Date: Mon Oct 10 11:14:44 2011 New Revision: 226194 URL: http://svn.freebsd.org/changeset/base/226194 Log: MFC r225858, 225859, 226172: 225858: - Document and provide an example for PORTS_MODULES [1] 225859: - Whitespace cleanup 226172: - Bump date PR: 161017 [1] Modified: stable/8/share/man/man7/build.7 Directory Properties: stable/8/share/man/man7/ (props changed) stable/8/share/man/man7/ports.7 (props changed) Modified: stable/8/share/man/man7/build.7 ============================================================================== --- stable/8/share/man/man7/build.7 Mon Oct 10 11:14:03 2011 (r226193) +++ stable/8/share/man/man7/build.7 Mon Oct 10 11:14:44 2011 (r226194) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 10, 2011 +.Dd September 29, 2011 .Dt BUILD 7 .Os .Sh NAME @@ -365,21 +365,31 @@ It defaults to .It Va KERNFAST If set, the build target .Cm buildkernel -defaults to setting +defaults to setting .Va NO_KERNELCLEAN , .Va NO_KERNELCONFIG , -.Va NO_KERNELDEPEND +.Va NO_KERNELDEPEND and .Va NO_KERNELOBJ . When set to a value other than .Cm 1 -then -.Va KERNCONF -is set to the value of +then +.Va KERNCONF +is set to the value of .Va KERNFAST . .It Va LOCAL_DIRS If set, this variable supplies a list of additional directories to build, relative to the root of the source tree. +.It Va PORTS_MODULES +A list of ports with kernel modules that should be built and installed +as part of the +.Cm buildkernel +and +.Cm installkernel +process. +.Bd -literal -offset indent +make PORTS_MODULES=emulators/kqemu-kmod kernel +.Ed .It Va SUBDIR_OVERRIDE Override the default list of sub-directories and only build the sub-directory named in this variable. @@ -408,11 +418,11 @@ output. Set this to cross-build for a different architecture. If not set, .Va TARGET_ARCH -defaults to the current machine architecture, unless +defaults to the current machine architecture, unless .Va TARGET is also set, in which case it defaults to the appropriate value for that platform. -Typically, one only needs to set +Typically, one only needs to set .Va TARGET . .El .Pp From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 11:15:57 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B1164106567E; Mon, 10 Oct 2011 11:15:57 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A0C838FC1D; Mon, 10 Oct 2011 11:15:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9ABFv5i057414; Mon, 10 Oct 2011 11:15:57 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9ABFvON057412; Mon, 10 Oct 2011 11:15:57 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201110101115.p9ABFvON057412@svn.freebsd.org> From: Glen Barber Date: Mon, 10 Oct 2011 11:15:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226195 - stable/7/share/man/man7 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2011 11:15:57 -0000 Author: gjb (doc committer) Date: Mon Oct 10 11:15:57 2011 New Revision: 226195 URL: http://svn.freebsd.org/changeset/base/226195 Log: MFC r225858, 225859, 226172: 225858: - Document and provide an example for PORTS_MODULES [1] 225859: - Whitespace cleanup 226172: - Bump date PR: 161017 [1] Modified: stable/7/share/man/man7/build.7 Directory Properties: stable/7/share/man/man7/ (props changed) stable/7/share/man/man7/ports.7 (props changed) Modified: stable/7/share/man/man7/build.7 ============================================================================== --- stable/7/share/man/man7/build.7 Mon Oct 10 11:14:44 2011 (r226194) +++ stable/7/share/man/man7/build.7 Mon Oct 10 11:15:57 2011 (r226195) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 31, 2010 +.Dd September 29, 2011 .Dt BUILD 7 .Os .Sh NAME @@ -352,6 +352,16 @@ variables: .It Va LOCAL_DIRS If set, this variable supplies a list of additional directories to build, relative to the root of the source tree. +.It Va PORTS_MODULES +A list of ports with kernel modules that should be built and installed +as part of the +.Cm buildkernel +and +.Cm installkernel +process. +.Bd -literal -offset indent +make PORTS_MODULES=emulators/kqemu-kmod kernel +.Ed .It Va SUBDIR_OVERRIDE Override the default list of sub-directories and only build the sub-directory named in this variable. From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 11:23:19 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EE2F5106564A; Mon, 10 Oct 2011 11:23:19 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C4E9F8FC12; Mon, 10 Oct 2011 11:23:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9ABNJra057750; Mon, 10 Oct 2011 11:23:19 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9ABNJuE057749; Mon, 10 Oct 2011 11:23:19 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201110101123.p9ABNJuE057749@svn.freebsd.org> From: Glen Barber Date: Mon, 10 Oct 2011 11:23:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226196 - stable/8/share/man/man7 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2011 11:23:20 -0000 Author: gjb (doc committer) Date: Mon Oct 10 11:23:19 2011 New Revision: 226196 URL: http://svn.freebsd.org/changeset/base/226196 Log: Pull mergeinfo up to the directory. Modified: Directory Properties: stable/8/share/man/man7/ (props changed) stable/8/share/man/man7/ports.7 (props changed) From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 11:23:49 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 827791065677; Mon, 10 Oct 2011 11:23:49 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 411208FC1F; Mon, 10 Oct 2011 11:23:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9ABNnf5057800; Mon, 10 Oct 2011 11:23:49 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9ABNnDV057799; Mon, 10 Oct 2011 11:23:49 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201110101123.p9ABNnDV057799@svn.freebsd.org> From: Glen Barber Date: Mon, 10 Oct 2011 11:23:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226197 - stable/7/share/man/man7 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2011 11:23:49 -0000 Author: gjb (doc committer) Date: Mon Oct 10 11:23:48 2011 New Revision: 226197 URL: http://svn.freebsd.org/changeset/base/226197 Log: Pull mergeinfo up to the directory. Modified: Directory Properties: stable/7/share/man/man7/ (props changed) stable/7/share/man/man7/ports.7 (props changed) From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 12:06:37 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 26A4C1065673; Mon, 10 Oct 2011 12:06:37 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 164408FC14; Mon, 10 Oct 2011 12:06:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9AC6aOn059194; Mon, 10 Oct 2011 12:06:36 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9AC6a35059192; Mon, 10 Oct 2011 12:06:36 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201110101206.p9AC6a35059192@svn.freebsd.org> From: Christian Brueffer Date: Mon, 10 Oct 2011 12:06:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226198 - stable/8/etc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2011 12:06:37 -0000 Author: brueffer Date: Mon Oct 10 12:06:36 2011 New Revision: 226198 URL: http://svn.freebsd.org/changeset/base/226198 Log: MFC: r225560 Minor spelling, wording and punctuation fixes in comments. Modified: stable/8/etc/network.subr Directory Properties: stable/8/etc/ (props changed) Modified: stable/8/etc/network.subr ============================================================================== --- stable/8/etc/network.subr Mon Oct 10 11:23:48 2011 (r226197) +++ stable/8/etc/network.subr Mon Oct 10 12:06:36 2011 (r226198) @@ -31,7 +31,7 @@ # # ifn_start ifn -# Bring up and configure an interface. If some configuration is applied +# Bring up and configure an interface. If some configuration is applied, # print the interface configuration. # ifn_start() @@ -52,7 +52,7 @@ ifn_start() } # ifn_start ifn -# Shutdown and de-configure an interface. If action is taken print the +# Shutdown and de-configure an interface. If action is taken, print the # interface name. # ifn_stop() @@ -202,7 +202,7 @@ ifconfig_getargs() } # autoif -# Returns 0 if the interface should be automaticly configured at +# Returns 0 if the interface should be automatically configured at # boot time and 1 otherwise. autoif() { From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 12:07:05 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 35D96106566B; Mon, 10 Oct 2011 12:07:05 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C72B58FC19; Mon, 10 Oct 2011 12:07:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9AC74Vo059247; Mon, 10 Oct 2011 12:07:04 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9AC74WW059244; Mon, 10 Oct 2011 12:07:04 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201110101207.p9AC74WW059244@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 10 Oct 2011 12:07:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226199 - in stable/9/sys: kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2011 12:07:05 -0000 Author: kib Date: Mon Oct 10 12:07:04 2011 New Revision: 226199 URL: http://svn.freebsd.org/changeset/base/226199 Log: MFC r225894: The sigwait(3) function shall not return EINTR, according to the POSIX/SUSvN. The sigwait(2) syscall does return EINTR, and libc.so.7 contains the wrapper sigwait(3) which hides EINTR from callers. The EINTR return is used by libthr to handle required cancellation point in the sigwait(3). To help the binaries linked against pre-libc.so.7, i.e. RELENG_6 and earlier, to have right ABI for sigwait(3), transform EINTR return from sigwait(2) into ERESTART. Approved by: re (bz) Modified: stable/9/sys/kern/kern_sig.c stable/9/sys/sys/param.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/kern/kern_sig.c ============================================================================== --- stable/9/sys/kern/kern_sig.c Mon Oct 10 12:06:36 2011 (r226198) +++ stable/9/sys/kern/kern_sig.c Mon Oct 10 12:07:04 2011 (r226199) @@ -1094,6 +1094,8 @@ sys_sigwait(struct thread *td, struct si error = kern_sigtimedwait(td, set, &ksi, NULL); if (error) { + if (error == EINTR && td->td_proc->p_osrel < P_OSREL_SIGWAIT) + error = ERESTART; if (error == ERESTART) return (error); td->td_retval[0] = error; Modified: stable/9/sys/sys/param.h ============================================================================== --- stable/9/sys/sys/param.h Mon Oct 10 12:06:36 2011 (r226198) +++ stable/9/sys/sys/param.h Mon Oct 10 12:07:04 2011 (r226199) @@ -61,6 +61,7 @@ #define __FreeBSD_version 900044 /* Master, propagated to newvers */ #ifdef _KERNEL +#define P_OSREL_SIGWAIT 700000 #define P_OSREL_SIGSEGV 700004 #define P_OSREL_MAP_ANON 800104 #endif From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 12:15:11 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 28209106566C; Mon, 10 Oct 2011 12:15:11 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 178B98FC15; Mon, 10 Oct 2011 12:15:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9ACFAI5059555; Mon, 10 Oct 2011 12:15:10 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9ACFAjf059553; Mon, 10 Oct 2011 12:15:10 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201110101215.p9ACFAjf059553@svn.freebsd.org> From: Christian Brueffer Date: Mon, 10 Oct 2011 12:15:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226200 - stable/7/etc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2011 12:15:11 -0000 Author: brueffer Date: Mon Oct 10 12:15:10 2011 New Revision: 226200 URL: http://svn.freebsd.org/changeset/base/226200 Log: MFC: r225560 Minor spelling, wording and punctuation fixes in comments. Modified: stable/7/etc/network.subr Directory Properties: stable/7/etc/ (props changed) Modified: stable/7/etc/network.subr ============================================================================== --- stable/7/etc/network.subr Mon Oct 10 12:07:04 2011 (r226199) +++ stable/7/etc/network.subr Mon Oct 10 12:15:10 2011 (r226200) @@ -32,7 +32,7 @@ # ifn_start ifn # Bring up and configure an interface. If some configuration is -# applied print the interface configuration. +# applied, print the interface configuration. # ifn_start() { @@ -52,7 +52,7 @@ ifn_start() } # ifn_stop ifn -# Shutdown and de-configure an interface. If action is taken +# Shutdown and de-configure an interface. If action is taken, # print the interface name. # ifn_stop() @@ -161,8 +161,8 @@ get_if_var() } # _ifconfig_getargs if -# Echos the arguments for the supplied interface to stdout. -# returns 1 if empty. In general, ifconfig_getargs should be used +# Prints the arguments for the supplied interface to stdout. +# Returns 1 if empty. In general, ifconfig_getargs should be used # outside this file. _ifconfig_getargs() { @@ -202,7 +202,7 @@ ifconfig_getargs() } # autoif -# Returns 0 if the interface should be automaticly configured at +# Returns 0 if the interface should be automatically configured at # boot time and 1 otherwise. autoif() { From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 12:16:45 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D2805106564A; Mon, 10 Oct 2011 12:16:45 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C26148FC13; Mon, 10 Oct 2011 12:16:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9ACGjwD059638; Mon, 10 Oct 2011 12:16:45 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9ACGj03059636; Mon, 10 Oct 2011 12:16:45 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201110101216.p9ACGj03059636@svn.freebsd.org> From: Christian Brueffer Date: Mon, 10 Oct 2011 12:16:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226201 - stable/8/etc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2011 12:16:45 -0000 Author: brueffer Date: Mon Oct 10 12:16:45 2011 New Revision: 226201 URL: http://svn.freebsd.org/changeset/base/226201 Log: MFC: One hunk missed during the merge of r225560 (spelling fixes in comments). Modified: stable/8/etc/network.subr Modified: stable/8/etc/network.subr ============================================================================== --- stable/8/etc/network.subr Mon Oct 10 12:15:10 2011 (r226200) +++ stable/8/etc/network.subr Mon Oct 10 12:16:45 2011 (r226201) @@ -161,8 +161,8 @@ get_if_var() } # _ifconfig_getargs if -# Echos the arguments for the supplied interface to stdout. -# returns 1 if empty. In general, ifconfig_getargs should be used +# Prints the arguments for the supplied interface to stdout. +# Returns 1 if empty. In general, ifconfig_getargs should be used # outside this file. _ifconfig_getargs() { From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 12:27:40 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B3EBA106566B; Mon, 10 Oct 2011 12:27:40 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A3AC08FC18; Mon, 10 Oct 2011 12:27:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9ACRen8060073; Mon, 10 Oct 2011 12:27:40 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9ACReGA060071; Mon, 10 Oct 2011 12:27:40 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201110101227.p9ACReGA060071@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 10 Oct 2011 12:27:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226202 - stable/9/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2011 12:27:40 -0000 Author: kib Date: Mon Oct 10 12:27:40 2011 New Revision: 226202 URL: http://svn.freebsd.org/changeset/base/226202 Log: MFC r225942: Assert that exiting process does not return to usermode. Approved by: re (bz) Modified: stable/9/sys/kern/subr_trap.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/kern/subr_trap.c ============================================================================== --- stable/9/sys/kern/subr_trap.c Mon Oct 10 12:16:45 2011 (r226201) +++ stable/9/sys/kern/subr_trap.c Mon Oct 10 12:27:40 2011 (r226202) @@ -99,6 +99,8 @@ userret(struct thread *td, struct trapfr CTR3(KTR_SYSC, "userret: thread %p (pid %d, %s)", td, p->p_pid, td->td_name); + KASSERT((p->p_flag & P_WEXIT) == 0, + ("Exiting process returns to usermode")); #if 0 #ifdef DIAGNOSTIC /* Check that we called signotify() enough. */ From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 12:28:47 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D3ADE106564A; Mon, 10 Oct 2011 12:28:47 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C42958FC08; Mon, 10 Oct 2011 12:28:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9ACSllE060154; Mon, 10 Oct 2011 12:28:47 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9ACSlOq060152; Mon, 10 Oct 2011 12:28:47 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201110101228.p9ACSlOq060152@svn.freebsd.org> From: Michael Tuexen Date: Mon, 10 Oct 2011 12:28:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226203 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2011 12:28:47 -0000 Author: tuexen Date: Mon Oct 10 12:28:47 2011 New Revision: 226203 URL: http://svn.freebsd.org/changeset/base/226203 Log: When moving an stcb to a new inp and we copy over the list of bound addresses, update the last used address pointer. If not, it might result in a crash if the old inp goes away. MFC after: 3 days. Modified: head/sys/netinet/sctp_pcb.c Modified: head/sys/netinet/sctp_pcb.c ============================================================================== --- head/sys/netinet/sctp_pcb.c Mon Oct 10 12:27:40 2011 (r226202) +++ head/sys/netinet/sctp_pcb.c Mon Oct 10 12:28:47 2011 (r226203) @@ -2786,6 +2786,9 @@ sctp_move_pcb_and_assoc(struct sctp_inpc LIST_INSERT_HEAD(&new_inp->sctp_addr_list, laddr, sctp_nxt_addr); new_inp->laddr_count++; + if (oladdr == stcb->asoc.last_used_address) { + stcb->asoc.last_used_address = laddr; + } } } /* From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 12:30:17 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4305F106564A; Mon, 10 Oct 2011 12:30:17 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 191C48FC0C; Mon, 10 Oct 2011 12:30:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9ACUG3D060241; Mon, 10 Oct 2011 12:30:16 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9ACUGDx060238; Mon, 10 Oct 2011 12:30:16 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201110101230.p9ACUGDx060238@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 10 Oct 2011 12:30:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226204 - in stable/9/sys: amd64/amd64 i386/i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2011 12:30:17 -0000 Author: kib Date: Mon Oct 10 12:30:16 2011 New Revision: 226204 URL: http://svn.freebsd.org/changeset/base/226204 Log: MFC r225943: Do not allow the kernel to access usermode pages without installed fault handler. Panic immediately in such situation, on i386 and amd64. Approved by: re (bz) Modified: stable/9/sys/amd64/amd64/trap.c stable/9/sys/i386/i386/trap.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/amd64/amd64/trap.c ============================================================================== --- stable/9/sys/amd64/amd64/trap.c Mon Oct 10 12:28:47 2011 (r226203) +++ stable/9/sys/amd64/amd64/trap.c Mon Oct 10 12:30:16 2011 (r226204) @@ -674,6 +674,19 @@ trap_pfault(frame, usermode) goto nogo; map = &vm->vm_map; + + /* + * When accessing a usermode address, kernel must be + * ready to accept the page fault, and provide a + * handling routine. Since accessing the address + * without the handler is a bug, do not try to handle + * it normally, and panic immediately. + */ + if (!usermode && (td->td_intr_nesting_level != 0 || + PCPU_GET(curpcb)->pcb_onfault == NULL)) { + trap_fatal(frame, eva); + return (-1); + } } /* Modified: stable/9/sys/i386/i386/trap.c ============================================================================== --- stable/9/sys/i386/i386/trap.c Mon Oct 10 12:28:47 2011 (r226203) +++ stable/9/sys/i386/i386/trap.c Mon Oct 10 12:30:16 2011 (r226204) @@ -831,6 +831,11 @@ trap_pfault(frame, usermode, eva) goto nogo; map = &vm->vm_map; + if (!usermode && (td->td_intr_nesting_level != 0 || + PCPU_GET(curpcb)->pcb_onfault == NULL)) { + trap_fatal(frame, eva); + return (-1); + } } /* From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 13:03:14 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DB770106566B; Mon, 10 Oct 2011 13:03:14 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CB0C78FC08; Mon, 10 Oct 2011 13:03:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9AD3Et7061328; Mon, 10 Oct 2011 13:03:14 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9AD3E4H061325; Mon, 10 Oct 2011 13:03:14 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201110101303.p9AD3E4H061325@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 10 Oct 2011 13:03:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226205 - in stable/8/sys: kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2011 13:03:15 -0000 Author: kib Date: Mon Oct 10 13:03:14 2011 New Revision: 226205 URL: http://svn.freebsd.org/changeset/base/226205 Log: MFC r225894: The sigwait(3) function shall not return EINTR, according to the POSIX/SUSvN. The sigwait(2) syscall does return EINTR, and libc.so.7 contains the wrapper sigwait(3) which hides EINTR from callers. The EINTR return is used by libthr to handle required cancellation point in the sigwait(3). To help the binaries linked against pre-libc.so.7, i.e. RELENG_6 and earlier, to have right ABI for sigwait(3), transform EINTR return from sigwait(2) into ERESTART. Modified: stable/8/sys/kern/kern_sig.c stable/8/sys/sys/param.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/kern/kern_sig.c ============================================================================== --- stable/8/sys/kern/kern_sig.c Mon Oct 10 12:30:16 2011 (r226204) +++ stable/8/sys/kern/kern_sig.c Mon Oct 10 13:03:14 2011 (r226205) @@ -1102,6 +1102,8 @@ sigwait(struct thread *td, struct sigwai error = kern_sigtimedwait(td, set, &ksi, NULL); if (error) { + if (error == EINTR && td->td_proc->p_osrel < P_OSREL_SIGWAIT) + error = ERESTART; if (error == ERESTART) return (error); td->td_retval[0] = error; Modified: stable/8/sys/sys/param.h ============================================================================== --- stable/8/sys/sys/param.h Mon Oct 10 12:30:16 2011 (r226204) +++ stable/8/sys/sys/param.h Mon Oct 10 13:03:14 2011 (r226205) @@ -61,6 +61,7 @@ #define __FreeBSD_version 802512 /* Master, propagated to newvers */ #ifdef _KERNEL +#define P_OSREL_SIGWAIT 700000 #define P_OSREL_SIGSEGV 700004 #define P_OSREL_MAP_ANON 800104 #endif From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 13:16:39 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 77CE21065677; Mon, 10 Oct 2011 13:16:39 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 677D68FC12; Mon, 10 Oct 2011 13:16:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9ADGdOX061797; Mon, 10 Oct 2011 13:16:39 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9ADGdiM061795; Mon, 10 Oct 2011 13:16:39 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201110101316.p9ADGdiM061795@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 10 Oct 2011 13:16:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226206 - stable/8/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2011 13:16:39 -0000 Author: kib Date: Mon Oct 10 13:16:39 2011 New Revision: 226206 URL: http://svn.freebsd.org/changeset/base/226206 Log: MFC r225942: Assert that exiting process does not return to usermode. Modified: stable/8/sys/kern/subr_trap.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/kern/subr_trap.c ============================================================================== --- stable/8/sys/kern/subr_trap.c Mon Oct 10 13:03:14 2011 (r226205) +++ stable/8/sys/kern/subr_trap.c Mon Oct 10 13:16:39 2011 (r226206) @@ -96,6 +96,8 @@ userret(struct thread *td, struct trapfr CTR3(KTR_SYSC, "userret: thread %p (pid %d, %s)", td, p->p_pid, td->td_name); + KASSERT((p->p_flag & P_WEXIT) == 0, + ("Exiting process returns to usermode")); #if 0 #ifdef DIAGNOSTIC /* Check that we called signotify() enough. */ From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 13:18:56 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 603BD106564A; Mon, 10 Oct 2011 13:18:56 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4F7458FC17; Mon, 10 Oct 2011 13:18:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9ADIuJ5061926; Mon, 10 Oct 2011 13:18:56 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9ADIu2R061923; Mon, 10 Oct 2011 13:18:56 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201110101318.p9ADIu2R061923@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 10 Oct 2011 13:18:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226207 - in stable/8/sys: amd64/amd64 i386/i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2011 13:18:56 -0000 Author: kib Date: Mon Oct 10 13:18:55 2011 New Revision: 226207 URL: http://svn.freebsd.org/changeset/base/226207 Log: MFC r225943: Do not allow the kernel to access usermode pages without installed fault handler. Panic immediately in such situation, on i386 and amd64. Modified: stable/8/sys/amd64/amd64/trap.c stable/8/sys/i386/i386/trap.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/amd64/amd64/trap.c ============================================================================== --- stable/8/sys/amd64/amd64/trap.c Mon Oct 10 13:16:39 2011 (r226206) +++ stable/8/sys/amd64/amd64/trap.c Mon Oct 10 13:18:55 2011 (r226207) @@ -678,6 +678,19 @@ trap_pfault(frame, usermode) goto nogo; map = &vm->vm_map; + + /* + * When accessing a usermode address, kernel must be + * ready to accept the page fault, and provide a + * handling routine. Since accessing the address + * without the handler is a bug, do not try to handle + * it normally, and panic immediately. + */ + if (!usermode && (td->td_intr_nesting_level != 0 || + PCPU_GET(curpcb)->pcb_onfault == NULL)) { + trap_fatal(frame, eva); + return (-1); + } } /* Modified: stable/8/sys/i386/i386/trap.c ============================================================================== --- stable/8/sys/i386/i386/trap.c Mon Oct 10 13:16:39 2011 (r226206) +++ stable/8/sys/i386/i386/trap.c Mon Oct 10 13:18:55 2011 (r226207) @@ -835,6 +835,11 @@ trap_pfault(frame, usermode, eva) goto nogo; map = &vm->vm_map; + if (!usermode && (td->td_intr_nesting_level != 0 || + PCPU_GET(curpcb)->pcb_onfault == NULL)) { + trap_fatal(frame, eva); + return (-1); + } } /* From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 13:26:53 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 609B3106566C; Mon, 10 Oct 2011 13:26:53 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 50B7A8FC17; Mon, 10 Oct 2011 13:26:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9ADQrZS062214; Mon, 10 Oct 2011 13:26:53 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9ADQrA4062212; Mon, 10 Oct 2011 13:26:53 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201110101326.p9ADQrA4062212@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 10 Oct 2011 13:26:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226208 - head/sys/dev/iscsi/initiator X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2011 13:26:53 -0000 Author: kib Date: Mon Oct 10 13:26:53 2011 New Revision: 226208 URL: http://svn.freebsd.org/changeset/base/226208 Log: Do not ignore block offsets. PR: kern/160943 Submitted by: Craig Boston Reviewed by: Danny Braniss MFC after: 1 week Modified: head/sys/dev/iscsi/initiator/iscsi_subr.c Modified: head/sys/dev/iscsi/initiator/iscsi_subr.c ============================================================================== --- head/sys/dev/iscsi/initiator/iscsi_subr.c Mon Oct 10 13:18:55 2011 (r226207) +++ head/sys/dev/iscsi/initiator/iscsi_subr.c Mon Oct 10 13:26:53 2011 (r226208) @@ -84,6 +84,7 @@ iscsi_r2t(isc_session_t *sp, pduq_t *opq caddr_t bp = csio->data_ptr; bo = ntohl(r2t->bo); + bp += MIN(bo, edtl - ddtl); bleft = ddtl; if(sp->opt.maxXmitDataSegmentLength > 0) // danny's RFC From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 13:51:21 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E4ACB1065673; Mon, 10 Oct 2011 13:51:21 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D38F38FC17; Mon, 10 Oct 2011 13:51:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9ADpLOs063192; Mon, 10 Oct 2011 13:51:21 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9ADpLU6063190; Mon, 10 Oct 2011 13:51:21 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201110101351.p9ADpLU6063190@svn.freebsd.org> From: Rick Macklem Date: Mon, 10 Oct 2011 13:51:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226209 - stable/9/sys/rpc/rpcsec_gss X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2011 13:51:22 -0000 Author: rmacklem Date: Mon Oct 10 13:51:21 2011 New Revision: 226209 URL: http://svn.freebsd.org/changeset/base/226209 Log: MFC: r226081, r226104 A crash reported on freebsd-fs@ on Sep. 23, 2011 under the subject heading "kernel panics with RPCSEC_GSS" appears to be caused by a corrupted tailq list for the client structure. Looking at the code, calls to the function svc_rpc_gss_forget_client() were done in an SMP unsafe manner, with the svc_rpc_gss_lock only being acquired in the function and not before it. As such, when multiple threads called svc_rpc_gss_forget_client() concurrently, it could try and remove the same client structure from the tailq lists multiple times. The patch fixes this by moving the critical code into a separate function called svc_rpc_gss_forget_client_locked(), which must be called with the lock held. For the one case where the caller would have no interest in the lock, svc_rpc_gss_forget_client() was retained, but a loop was added to check that the client structure is still in the tailq lists before removing it, to make it safe for multiple concurrent calls. Also, remove an extraneous "already" from a comment introduced by r226081. Approved by: re (kib) Modified: stable/9/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c ============================================================================== --- stable/9/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c Mon Oct 10 13:26:53 2011 (r226208) +++ stable/9/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c Mon Oct 10 13:51:21 2011 (r226209) @@ -609,27 +609,52 @@ svc_rpc_gss_release_client(struct svc_rp } /* - * Remove a client from our global lists and free it if we can. + * Remove a client from our global lists. + * Must be called with svc_rpc_gss_lock held. */ static void -svc_rpc_gss_forget_client(struct svc_rpc_gss_client *client) +svc_rpc_gss_forget_client_locked(struct svc_rpc_gss_client *client) { struct svc_rpc_gss_client_list *list; + sx_assert(&svc_rpc_gss_lock, SX_XLOCKED); list = &svc_rpc_gss_client_hash[client->cl_id.ci_id % CLIENT_HASH_SIZE]; - sx_xlock(&svc_rpc_gss_lock); TAILQ_REMOVE(list, client, cl_link); TAILQ_REMOVE(&svc_rpc_gss_clients, client, cl_alllink); svc_rpc_gss_client_count--; +} + +/* + * Remove a client from our global lists and free it if we can. + */ +static void +svc_rpc_gss_forget_client(struct svc_rpc_gss_client *client) +{ + struct svc_rpc_gss_client_list *list; + struct svc_rpc_gss_client *tclient; + + list = &svc_rpc_gss_client_hash[client->cl_id.ci_id % CLIENT_HASH_SIZE]; + sx_xlock(&svc_rpc_gss_lock); + TAILQ_FOREACH(tclient, list, cl_link) { + /* + * Make sure this client has not already been removed + * from the lists by svc_rpc_gss_forget_client() or + * svc_rpc_gss_forget_client_locked(). + */ + if (client == tclient) { + svc_rpc_gss_forget_client_locked(client); + sx_xunlock(&svc_rpc_gss_lock); + svc_rpc_gss_release_client(client); + return; + } + } sx_xunlock(&svc_rpc_gss_lock); - svc_rpc_gss_release_client(client); } static void svc_rpc_gss_timeout_clients(void) { struct svc_rpc_gss_client *client; - struct svc_rpc_gss_client *nclient; time_t now = time_uptime; rpc_gss_log_debug("in svc_rpc_gss_timeout_clients()"); @@ -638,16 +663,29 @@ svc_rpc_gss_timeout_clients(void) * First enforce the max client limit. We keep * svc_rpc_gss_clients in LRU order. */ - while (svc_rpc_gss_client_count > CLIENT_MAX) - svc_rpc_gss_forget_client(TAILQ_LAST(&svc_rpc_gss_clients, - svc_rpc_gss_client_list)); - TAILQ_FOREACH_SAFE(client, &svc_rpc_gss_clients, cl_alllink, nclient) { + sx_xlock(&svc_rpc_gss_lock); + client = TAILQ_LAST(&svc_rpc_gss_clients, svc_rpc_gss_client_list); + while (svc_rpc_gss_client_count > CLIENT_MAX && client != NULL) { + svc_rpc_gss_forget_client_locked(client); + sx_xunlock(&svc_rpc_gss_lock); + svc_rpc_gss_release_client(client); + sx_xlock(&svc_rpc_gss_lock); + client = TAILQ_LAST(&svc_rpc_gss_clients, + svc_rpc_gss_client_list); + } +again: + TAILQ_FOREACH(client, &svc_rpc_gss_clients, cl_alllink) { if (client->cl_state == CLIENT_STALE || now > client->cl_expiration) { + svc_rpc_gss_forget_client_locked(client); + sx_xunlock(&svc_rpc_gss_lock); rpc_gss_log_debug("expiring client %p", client); - svc_rpc_gss_forget_client(client); + svc_rpc_gss_release_client(client); + sx_xlock(&svc_rpc_gss_lock); + goto again; } } + sx_xunlock(&svc_rpc_gss_lock); } #ifdef DEBUG From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 13:57:35 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D410B106566C; Mon, 10 Oct 2011 13:57:35 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C300C8FC12; Mon, 10 Oct 2011 13:57:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9ADvZaQ063528; Mon, 10 Oct 2011 13:57:35 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9ADvZLb063526; Mon, 10 Oct 2011 13:57:35 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201110101357.p9ADvZLb063526@svn.freebsd.org> From: Nathan Whitehorn Date: Mon, 10 Oct 2011 13:57:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226210 - stable/9/usr.sbin/bsdinstall/scripts X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2011 13:57:35 -0000 Author: nwhitehorn Date: Mon Oct 10 13:57:35 2011 New Revision: 226210 URL: http://svn.freebsd.org/changeset/base/226210 Log: MFC r226058: Ask if you want to set the keymap before invoking kdbmap to prevent confusion. PR: bin/160913 Approved by: re (kib) Modified: stable/9/usr.sbin/bsdinstall/scripts/keymap Directory Properties: stable/9/usr.sbin/bsdinstall/ (props changed) Modified: stable/9/usr.sbin/bsdinstall/scripts/keymap ============================================================================== --- stable/9/usr.sbin/bsdinstall/scripts/keymap Mon Oct 10 13:51:21 2011 (r226209) +++ stable/9/usr.sbin/bsdinstall/scripts/keymap Mon Oct 10 13:57:35 2011 (r226210) @@ -28,6 +28,8 @@ kbdcontrol -d >/dev/null 2>&1 if [ $? -eq 0 ]; then + dialog --backtitle "FreeBSD Installer" --title "Keymap Selection" \ + --yesno "Would you like to set a non-default key mapping for your keyboard?" 0 0 || exit 0 exec 3>&1 kbdmap 2>&1 1>&3 | grep 'keymap=' > $BSDINSTALL_TMPETC/rc.conf.keymap fi From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 13:58:34 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2FF62106566C; Mon, 10 Oct 2011 13:58:34 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1F0808FC19; Mon, 10 Oct 2011 13:58:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9ADwYda063606; Mon, 10 Oct 2011 13:58:34 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9ADwYTC063604; Mon, 10 Oct 2011 13:58:34 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201110101358.p9ADwYTC063604@svn.freebsd.org> From: Nathan Whitehorn Date: Mon, 10 Oct 2011 13:58:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226211 - stable/9/usr.sbin/bsdinstall/scripts X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2011 13:58:34 -0000 Author: nwhitehorn Date: Mon Oct 10 13:58:33 2011 New Revision: 226211 URL: http://svn.freebsd.org/changeset/base/226211 Log: MFC r226059: Move "Exit" to the first entry in the list, so that it is the default choice. PR: bin/160913 Approved by: re (kib) Modified: stable/9/usr.sbin/bsdinstall/scripts/auto Directory Properties: stable/9/usr.sbin/bsdinstall/ (props changed) Modified: stable/9/usr.sbin/bsdinstall/scripts/auto ============================================================================== --- stable/9/usr.sbin/bsdinstall/scripts/auto Mon Oct 10 13:57:35 2011 (r226210) +++ stable/9/usr.sbin/bsdinstall/scripts/auto Mon Oct 10 13:58:33 2011 (r226211) @@ -158,6 +158,7 @@ finalconfig() { REVISIT=$(dialog --backtitle "FreeBSD Installer" \ --title "Final Configuration" --no-cancel --menu \ "Setup of your FreeBSD system is nearly complete. You can now modify your configuration choices or apply more complex changes using a shell." 0 0 0 \ + "Exit" "Apply configuration and exit installer" "Add User" "Add a user to the system" \ "Root Password" "Change root password" \ "Hostname" "Set system hostname" \ @@ -165,8 +166,7 @@ finalconfig() { "Services" "Set daemons to run on startup" \ "Time Zone" "Set system timezone" \ "Handbook" "Install FreeBSD Handbook (requires network)" \ - "Shell" "Open a shell in the new system" \ - "Exit" "Apply configuration and exit installer" 2>&1 1>&3) + "Shell" "Open a shell in the new system" 2>&1 1>&3) exec 3>&- case "$REVISIT" in From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 13:59:33 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7F3F4106566B; Mon, 10 Oct 2011 13:59:33 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6D2798FC08; Mon, 10 Oct 2011 13:59:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9ADxXbe063690; Mon, 10 Oct 2011 13:59:33 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9ADxXrw063685; Mon, 10 Oct 2011 13:59:33 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201110101359.p9ADxXrw063685@svn.freebsd.org> From: Nathan Whitehorn Date: Mon, 10 Oct 2011 13:59:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226212 - stable/9/usr.sbin/bsdinstall/partedit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2011 13:59:33 -0000 Author: nwhitehorn Date: Mon Oct 10 13:59:33 2011 New Revision: 226212 URL: http://svn.freebsd.org/changeset/base/226212 Log: MFC r226083: Work around some behavior of gpart that I absolutely do not understand in order to make every operation of the partition editor fully revertable. Under *no circumstances* will it any longer touch the disks until the user presses Finish and confirms it. Approved by: re (kib) Modified: stable/9/usr.sbin/bsdinstall/partedit/diskeditor.c stable/9/usr.sbin/bsdinstall/partedit/gpart_ops.c stable/9/usr.sbin/bsdinstall/partedit/part_wizard.c stable/9/usr.sbin/bsdinstall/partedit/partedit.h Directory Properties: stable/9/usr.sbin/bsdinstall/ (props changed) Modified: stable/9/usr.sbin/bsdinstall/partedit/diskeditor.c ============================================================================== --- stable/9/usr.sbin/bsdinstall/partedit/diskeditor.c Mon Oct 10 13:58:33 2011 (r226211) +++ stable/9/usr.sbin/bsdinstall/partedit/diskeditor.c Mon Oct 10 13:59:33 2011 (r226212) @@ -44,8 +44,8 @@ print_partedit_item(WINDOW *partitions, wattrset(partitions, selected ? item_selected_attr : item_attr); wmove(partitions, y, MARGIN + items[item].indentation*2); - dlg_print_text(partitions, items[item].name, 8, &attr); - wmove(partitions, y, 15); + dlg_print_text(partitions, items[item].name, 10, &attr); + wmove(partitions, y, 17); wattrset(partitions, item_attr); humanize_number(sizetext, 7, items[item].size, "B", HN_AUTOSCALE, Modified: stable/9/usr.sbin/bsdinstall/partedit/gpart_ops.c ============================================================================== --- stable/9/usr.sbin/bsdinstall/partedit/gpart_ops.c Mon Oct 10 13:58:33 2011 (r226211) +++ stable/9/usr.sbin/bsdinstall/partedit/gpart_ops.c Mon Oct 10 13:59:33 2011 (r226212) @@ -365,39 +365,37 @@ gpart_partcode(struct gprovider *pp) } void -gpart_destroy(struct ggeom *lg_geom, int force) +gpart_destroy(struct ggeom *lg_geom) { - struct gprovider *pp; struct gctl_req *r; + struct gprovider *pp; const char *errstr; + int force = 1; - /* Begin with the hosing: delete all partitions */ + /* Delete all child metadata */ LIST_FOREACH(pp, &lg_geom->lg_provider, lg_provider) gpart_delete(pp); + /* Revert any local changes to get this geom into a pristine state */ + r = gctl_get_handle(); + gctl_ro_param(r, "class", -1, "PART"); + gctl_ro_param(r, "arg0", -1, lg_geom->lg_name); + gctl_ro_param(r, "verb", -1, "undo"); + gctl_issue(r); /* Ignore errors -- these are non-fatal */ + gctl_free(r); + /* Now destroy the geom itself */ r = gctl_get_handle(); gctl_ro_param(r, "class", -1, "PART"); gctl_ro_param(r, "arg0", -1, lg_geom->lg_name); gctl_ro_param(r, "flags", -1, GPART_FLAGS); + gctl_ro_param(r, "force", sizeof(force), &force); gctl_ro_param(r, "verb", -1, "destroy"); errstr = gctl_issue(r); if (errstr != NULL && errstr[0] != '\0') gpart_show_error("Error", NULL, errstr); gctl_free(r); - /* If asked, commit the change */ - if (force) { - r = gctl_get_handle(); - gctl_ro_param(r, "class", -1, "PART"); - gctl_ro_param(r, "arg0", -1, lg_geom->lg_name); - gctl_ro_param(r, "verb", -1, "commit"); - errstr = gctl_issue(r); - if (errstr != NULL && errstr[0] != '\0') - gpart_show_error("Error", NULL, errstr); - gctl_free(r); - } - /* And any metadata associated with the partition scheme itself */ delete_part_metadata(lg_geom->lg_name); } @@ -439,28 +437,21 @@ gpart_edit(struct gprovider *pp) geom = NULL; LIST_FOREACH(cp, &pp->lg_consumers, lg_consumers) if (strcmp(cp->lg_geom->lg_class->lg_name, "PART") == 0) { - char message[512]; - /* - * The PART object is a consumer, so the user wants to - * edit the partition table. gpart doesn't really - * support this, so we have to hose the whole table - * first. - */ - - sprintf(message, "Changing the partition scheme on " - "this disk (%s) requires deleting all existing " - "partitions on this drive. This will PERMANENTLY " - "ERASE any data stored here. Are you sure you want " - "to proceed?", cp->lg_geom->lg_name); - dialog_vars.defaultno = TRUE; - choice = dialog_yesno("Warning", message, 0, 0); - dialog_vars.defaultno = FALSE; - - if (choice == 1) /* cancel */ + /* Check for zombie geoms, treating them as blank */ + scheme = NULL; + LIST_FOREACH(gc, &cp->lg_geom->lg_config, lg_config) { + if (strcmp(gc->lg_name, "scheme") == 0) { + scheme = gc->lg_val; + break; + } + } + if (scheme == NULL || strcmp(scheme, "(none)") == 0) { + gpart_partition(cp->lg_geom->lg_name, NULL); return; + } /* Destroy the geom and all sub-partitions */ - gpart_destroy(cp->lg_geom, 0); + gpart_destroy(cp->lg_geom); /* Now re-partition and return */ gpart_partition(cp->lg_geom->lg_name, NULL); @@ -1004,7 +995,7 @@ gpart_delete(struct gprovider *pp) struct gctl_req *r; const char *errstr; intmax_t idx; - int choice, is_partition; + int is_partition; /* Is it a partition? */ is_partition = (strcmp(pp->lg_geom->lg_class->lg_name, "PART") == 0); @@ -1017,32 +1008,21 @@ gpart_delete(struct gprovider *pp) break; } - /* Destroy all consumers */ + /* If so, destroy all children */ if (geom != NULL) { - if (is_partition) { - char message[512]; - /* - * We have to actually really delete the sub-partition - * tree so that the consumers will go away and the - * partition can be deleted. Warn the user. - */ - - sprintf(message, "Deleting this partition (%s) " - "requires deleting all existing sub-partitions. " - "This will PERMANENTLY ERASE any data stored here " - "and CANNOT BE REVERTED. Are you sure you want to " - "proceed?", cp->lg_geom->lg_name); - dialog_vars.defaultno = TRUE; - choice = dialog_yesno("Warning", message, 0, 0); - dialog_vars.defaultno = FALSE; + gpart_destroy(geom); - if (choice == 1) /* cancel */ - return; + /* If this is a partition, revert it, so it can be deleted */ + if (is_partition) { + r = gctl_get_handle(); + gctl_ro_param(r, "class", -1, "PART"); + gctl_ro_param(r, "arg0", -1, geom->lg_name); + gctl_ro_param(r, "verb", -1, "undo"); + gctl_issue(r); /* Ignore non-fatal errors */ + gctl_free(r); } - - gpart_destroy(geom, is_partition); } - + /* * If this is not a partition, see if that is a problem, complain if * necessary, and return always, since we need not do anything further, Modified: stable/9/usr.sbin/bsdinstall/partedit/part_wizard.c ============================================================================== --- stable/9/usr.sbin/bsdinstall/partedit/part_wizard.c Mon Oct 10 13:58:33 2011 (r226211) +++ stable/9/usr.sbin/bsdinstall/partedit/part_wizard.c Mon Oct 10 13:59:33 2011 (r226212) @@ -254,7 +254,7 @@ query: if (subchoice != 0) goto query; - gpart_destroy(gpart, 1); + gpart_destroy(gpart); gpart_partition(disk, default_scheme()); scheme = default_scheme(); } @@ -267,7 +267,7 @@ query: if (choice != 0) goto query; - gpart_destroy(gpart, 1); + gpart_destroy(gpart); } gpart_partition(disk, default_scheme()); Modified: stable/9/usr.sbin/bsdinstall/partedit/partedit.h ============================================================================== --- stable/9/usr.sbin/bsdinstall/partedit/partedit.h Mon Oct 10 13:58:33 2011 (r226211) +++ stable/9/usr.sbin/bsdinstall/partedit/partedit.h Mon Oct 10 13:59:33 2011 (r226212) @@ -58,7 +58,7 @@ int part_wizard(void); /* gpart operations */ void gpart_delete(struct gprovider *pp); -void gpart_destroy(struct ggeom *lg_geom, int force); +void gpart_destroy(struct ggeom *lg_geom); void gpart_edit(struct gprovider *pp); void gpart_create(struct gprovider *pp, char *default_type, char *default_size, char *default_mountpoint, char **output, int interactive); From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 14:35:26 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BEA65106564A; Mon, 10 Oct 2011 14:35:26 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AD7228FC1E; Mon, 10 Oct 2011 14:35:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9AEZQTJ064909; Mon, 10 Oct 2011 14:35:26 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9AEZQoT064907; Mon, 10 Oct 2011 14:35:26 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201110101435.p9AEZQoT064907@svn.freebsd.org> From: Rick Macklem Date: Mon, 10 Oct 2011 14:35:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226213 - stable/8/sys/rpc/rpcsec_gss X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2011 14:35:26 -0000 Author: rmacklem Date: Mon Oct 10 14:35:26 2011 New Revision: 226213 URL: http://svn.freebsd.org/changeset/base/226213 Log: MFC: r226081, r226104 A crash reported on freebsd-fs@ on Sep. 23, 2011 under the subject heading "kernel panics with RPCSEC_GSS" appears to be caused by a corrupted tailq list for the client structure. Looking at the code, calls to the function svc_rpc_gss_forget_client() were done in an SMP unsafe manner, with the svc_rpc_gss_lock only being acquired in the function and not before it. As such, when multiple threads called svc_rpc_gss_forget_client() concurrently, it could try and remove the same client structure from the tailq lists multiple times. The patch fixes this by moving the critical code into a separate function called svc_rpc_gss_forget_client_locked(), which must be called with the lock held. For the one case where the caller would have no interest in the lock, svc_rpc_gss_forget_client() was retained, but a loop was added to check that the client structure is still in the tailq lists before removing it, to make it safe for multiple concurrent calls. Also, remove an extraneous "already" from a comment introduced by r226081. Modified: stable/8/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c ============================================================================== --- stable/8/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c Mon Oct 10 13:59:33 2011 (r226212) +++ stable/8/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c Mon Oct 10 14:35:26 2011 (r226213) @@ -609,27 +609,52 @@ svc_rpc_gss_release_client(struct svc_rp } /* - * Remove a client from our global lists and free it if we can. + * Remove a client from our global lists. + * Must be called with svc_rpc_gss_lock held. */ static void -svc_rpc_gss_forget_client(struct svc_rpc_gss_client *client) +svc_rpc_gss_forget_client_locked(struct svc_rpc_gss_client *client) { struct svc_rpc_gss_client_list *list; + sx_assert(&svc_rpc_gss_lock, SX_XLOCKED); list = &svc_rpc_gss_client_hash[client->cl_id.ci_id % CLIENT_HASH_SIZE]; - sx_xlock(&svc_rpc_gss_lock); TAILQ_REMOVE(list, client, cl_link); TAILQ_REMOVE(&svc_rpc_gss_clients, client, cl_alllink); svc_rpc_gss_client_count--; +} + +/* + * Remove a client from our global lists and free it if we can. + */ +static void +svc_rpc_gss_forget_client(struct svc_rpc_gss_client *client) +{ + struct svc_rpc_gss_client_list *list; + struct svc_rpc_gss_client *tclient; + + list = &svc_rpc_gss_client_hash[client->cl_id.ci_id % CLIENT_HASH_SIZE]; + sx_xlock(&svc_rpc_gss_lock); + TAILQ_FOREACH(tclient, list, cl_link) { + /* + * Make sure this client has not already been removed + * from the lists by svc_rpc_gss_forget_client() or + * svc_rpc_gss_forget_client_locked(). + */ + if (client == tclient) { + svc_rpc_gss_forget_client_locked(client); + sx_xunlock(&svc_rpc_gss_lock); + svc_rpc_gss_release_client(client); + return; + } + } sx_xunlock(&svc_rpc_gss_lock); - svc_rpc_gss_release_client(client); } static void svc_rpc_gss_timeout_clients(void) { struct svc_rpc_gss_client *client; - struct svc_rpc_gss_client *nclient; time_t now = time_uptime; rpc_gss_log_debug("in svc_rpc_gss_timeout_clients()"); @@ -638,16 +663,29 @@ svc_rpc_gss_timeout_clients(void) * First enforce the max client limit. We keep * svc_rpc_gss_clients in LRU order. */ - while (svc_rpc_gss_client_count > CLIENT_MAX) - svc_rpc_gss_forget_client(TAILQ_LAST(&svc_rpc_gss_clients, - svc_rpc_gss_client_list)); - TAILQ_FOREACH_SAFE(client, &svc_rpc_gss_clients, cl_alllink, nclient) { + sx_xlock(&svc_rpc_gss_lock); + client = TAILQ_LAST(&svc_rpc_gss_clients, svc_rpc_gss_client_list); + while (svc_rpc_gss_client_count > CLIENT_MAX && client != NULL) { + svc_rpc_gss_forget_client_locked(client); + sx_xunlock(&svc_rpc_gss_lock); + svc_rpc_gss_release_client(client); + sx_xlock(&svc_rpc_gss_lock); + client = TAILQ_LAST(&svc_rpc_gss_clients, + svc_rpc_gss_client_list); + } +again: + TAILQ_FOREACH(client, &svc_rpc_gss_clients, cl_alllink) { if (client->cl_state == CLIENT_STALE || now > client->cl_expiration) { + svc_rpc_gss_forget_client_locked(client); + sx_xunlock(&svc_rpc_gss_lock); rpc_gss_log_debug("expiring client %p", client); - svc_rpc_gss_forget_client(client); + svc_rpc_gss_release_client(client); + sx_xlock(&svc_rpc_gss_lock); + goto again; } } + sx_xunlock(&svc_rpc_gss_lock); } #ifdef DEBUG From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 14:46:41 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 267391065674; Mon, 10 Oct 2011 14:46:41 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 157CC8FC14; Mon, 10 Oct 2011 14:46:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9AEkebE065394; Mon, 10 Oct 2011 14:46:40 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9AEkejG065392; Mon, 10 Oct 2011 14:46:40 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201110101446.p9AEkejG065392@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 10 Oct 2011 14:46:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226214 - stable/9/libexec/rtld-elf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2011 14:46:41 -0000 Author: kib Date: Mon Oct 10 14:46:40 2011 New Revision: 226214 URL: http://svn.freebsd.org/changeset/base/226214 Log: MFC r226155: Setting up TLS block for the main thread must be done after the relocations are processed. Approved by: re (bz) Modified: stable/9/libexec/rtld-elf/rtld.c Directory Properties: stable/9/libexec/rtld-elf/ (props changed) Modified: stable/9/libexec/rtld-elf/rtld.c ============================================================================== --- stable/9/libexec/rtld-elf/rtld.c Mon Oct 10 14:35:26 2011 (r226213) +++ stable/9/libexec/rtld-elf/rtld.c Mon Oct 10 14:46:40 2011 (r226214) @@ -495,8 +495,12 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_ exit (0); } - /* setup TLS for main thread */ - dbg("initializing initial thread local storage"); + /* + * Processing tls relocations requires having the tls offsets + * initialized. Prepare offsets before starting initial + * relocation processing. + */ + dbg("initializing initial thread local storage offsets"); STAILQ_FOREACH(entry, &list_main, link) { /* * Allocate all the initial objects out of the static TLS @@ -504,7 +508,6 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_ */ allocate_tls_offset(entry->obj); } - allocate_initial_tls(obj_list); if (relocate_objects(obj_main, ld_bind_now != NULL && *ld_bind_now != '\0', &obj_rtld, NULL) == -1) @@ -519,6 +522,14 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_ exit (0); } + /* + * Setup TLS for main thread. This must be done after the + * relocations are processed, since tls initialization section + * might be the subject for relocations. + */ + dbg("initializing initial thread local storage"); + allocate_initial_tls(obj_list); + dbg("initializing key program variables"); set_program_var("__progname", argv[0] != NULL ? basename(argv[0]) : ""); set_program_var("environ", env); From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 14:48:19 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 50C291065673; Mon, 10 Oct 2011 14:48:19 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 400438FC13; Mon, 10 Oct 2011 14:48:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9AEmJGd065556; Mon, 10 Oct 2011 14:48:19 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9AEmJks065554; Mon, 10 Oct 2011 14:48:19 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201110101448.p9AEmJks065554@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 10 Oct 2011 14:48:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226215 - stable/9/libexec/rtld-elf/i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2011 14:48:19 -0000 Author: kib Date: Mon Oct 10 14:48:18 2011 New Revision: 226215 URL: http://svn.freebsd.org/changeset/base/226215 Log: MFC r226156: Handle the R_386_TLS_TPOFF32 relocation. Approved by: re (bz) Modified: stable/9/libexec/rtld-elf/i386/reloc.c Directory Properties: stable/9/libexec/rtld-elf/ (props changed) Modified: stable/9/libexec/rtld-elf/i386/reloc.c ============================================================================== --- stable/9/libexec/rtld-elf/i386/reloc.c Mon Oct 10 14:46:40 2011 (r226214) +++ stable/9/libexec/rtld-elf/i386/reloc.c Mon Oct 10 14:48:18 2011 (r226215) @@ -213,9 +213,11 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry break; case R_386_TLS_TPOFF: + case R_386_TLS_TPOFF32: { const Elf_Sym *def; const Obj_Entry *defobj; + Elf_Addr add; def = find_symdef(ELF_R_SYM(rel->r_info), obj, &defobj, false, cache, lockstate); @@ -237,8 +239,11 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry goto done; } } - - *where += (Elf_Addr) (def->st_value - defobj->tlsoffset); + add = (Elf_Addr) (def->st_value - defobj->tlsoffset); + if (ELF_R_TYPE(rel->r_info) == R_386_TLS_TPOFF) + *where += add; + else + *where -= add; } break; From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 15:15:02 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6198F1065670; Mon, 10 Oct 2011 15:15:02 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from gw03.mail.saunalahti.fi (gw03.mail.saunalahti.fi [195.197.172.111]) by mx1.freebsd.org (Postfix) with ESMTP id 149138FC15; Mon, 10 Oct 2011 15:15:01 +0000 (UTC) Received: from a91-153-123-205.elisa-laajakaista.fi (a91-153-123-205.elisa-laajakaista.fi [91.153.123.205]) by gw03.mail.saunalahti.fi (Postfix) with SMTP id 35F7C2169A1; Mon, 10 Oct 2011 17:56:43 +0300 (EEST) Date: Mon, 10 Oct 2011 17:56:43 +0300 From: Jaakko Heinonen To: Dag-Erling Smorgrav Message-ID: <20111010145642.GA2057@a91-153-123-205.elisa-laajakaista.fi> References: <201110081221.p98CLpWq062285@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201110081221.p98CLpWq062285@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r226151 - head/usr.bin/kdump X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2011 15:15:02 -0000 Hi, On 2011-10-08, Dag-Erling Smorgrav wrote: > Fix casting. > > Modified: head/usr.bin/kdump/kdump.c > ============================================================================== > --- head/usr.bin/kdump/kdump.c Sat Oct 8 12:10:16 2011 (r226150) > +++ head/usr.bin/kdump/kdump.c Sat Oct 8 12:21:51 2011 (r226151) > @@ -110,15 +110,16 @@ struct ktr_header ktr_header; > #define TIME_FORMAT "%b %e %T %Y" > #define eqs(s1, s2) (strcmp((s1), (s2)) == 0) > > -#define print_number(i,n,c) do { \ > - if (decimal) \ > - printf("%c%ld", c, (long)*i); \ > - else \ > - printf("%c%#lx", c, (long)*i); \ > - i++; \ > - n--; \ > - c = ','; \ > - } while (0); > +#define print_number(i,n,c) \ > + do { \ > + if (decimal) \ > + printf("%c%jd", c, (intmax_t)*i); \ > + else \ > + printf("%c%#jx", c, (intmax_t)*i); \ > + i++; \ > + n--; \ > + c = ','; \ > + } while (0) Are you sure that this change doesn't cause a regression on platforms where sizeof(long) != sizeof(intmax_t)? For example, previously, on i386 print_number() printed "0xffffffff" for -1 while after your change it will print "0xffffffffffffffff" (with %#jx). -- Jaakko From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 15:39:29 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 78522106566B; Mon, 10 Oct 2011 15:39:29 +0000 (UTC) (envelope-from das@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 685388FC19; Mon, 10 Oct 2011 15:39:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9AFdT2P067947; Mon, 10 Oct 2011 15:39:29 GMT (envelope-from das@svn.freebsd.org) Received: (from das@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9AFdTeW067945; Mon, 10 Oct 2011 15:39:29 GMT (envelope-from das@svn.freebsd.org) Message-Id: <201110101539.p9AFdTeW067945@svn.freebsd.org> From: David Schultz Date: Mon, 10 Oct 2011 15:39:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226216 - head/share/mk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2011 15:39:29 -0000 Author: das Date: Mon Oct 10 15:39:29 2011 New Revision: 226216 URL: http://svn.freebsd.org/changeset/base/226216 Log: Pass -std= flags in CFLAGS to mkdep. Without this, preprocessor tests for particular compiler features might be evaluated differently by mkdep than they would be by cc. Modified: head/share/mk/bsd.dep.mk Modified: head/share/mk/bsd.dep.mk ============================================================================== --- head/share/mk/bsd.dep.mk Mon Oct 10 14:48:18 2011 (r226215) +++ head/share/mk/bsd.dep.mk Mon Oct 10 15:39:29 2011 (r226216) @@ -125,8 +125,8 @@ depend: beforedepend ${DEPENDFILE} after # Different types of sources are compiled with slightly different flags. # Split up the sources, and filter out headers and non-applicable flags. -MKDEP_CFLAGS= ${CFLAGS:M-nostdinc*} ${CFLAGS:M-[BIDU]*} -MKDEP_CXXFLAGS= ${CXXFLAGS:M-nostdinc*} ${CXXFLAGS:M-[BIDU]*} +MKDEP_CFLAGS= ${CFLAGS:M-nostdinc*} ${CFLAGS:M-[BIDU]*} ${CFLAGS:M-std=*} +MKDEP_CXXFLAGS= ${CXXFLAGS:M-nostdinc*} ${CXXFLAGS:M-[BIDU]*} ${CFLAGS:M-std=*} DPSRCS+= ${SRCS} ${DEPENDFILE}: ${DPSRCS} From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 15:42:34 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 32092106564A; Mon, 10 Oct 2011 15:42:34 +0000 (UTC) (envelope-from das@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 21B1F8FC08; Mon, 10 Oct 2011 15:42:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9AFgYJS068237; Mon, 10 Oct 2011 15:42:34 GMT (envelope-from das@svn.freebsd.org) Received: (from das@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9AFgYFK068236; Mon, 10 Oct 2011 15:42:34 GMT (envelope-from das@svn.freebsd.org) Message-Id: <201110101542.p9AFgYFK068236@svn.freebsd.org> From: David Schultz Date: Mon, 10 Oct 2011 15:42:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226217 - head/lib/libc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2011 15:42:34 -0000 Author: das Date: Mon Oct 10 15:42:33 2011 New Revision: 226217 URL: http://svn.freebsd.org/changeset/base/226217 Log: Add a FBSD_1.3 namespace for FreeBSD 10. Modified: head/lib/libc/Versions.def Modified: head/lib/libc/Versions.def ============================================================================== --- head/lib/libc/Versions.def Mon Oct 10 15:39:29 2011 (r226216) +++ head/lib/libc/Versions.def Mon Oct 10 15:42:33 2011 (r226217) @@ -19,6 +19,10 @@ FBSD_1.1 { FBSD_1.2 { } FBSD_1.1; +# This version was first added to 10.0-current. +FBSD_1.3 { +} FBSD_1.2; + # This is our private namespace. Any global interfaces that are # strictly for use only by other FreeBSD applications and libraries # are listed here. We use a separate namespace so we can write @@ -26,4 +30,4 @@ FBSD_1.2 { # # Please do NOT increment the version of this namespace. FBSDprivate_1.0 { -} FBSD_1.2; +} FBSD_1.3; From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 15:43:10 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 49D99106564A; Mon, 10 Oct 2011 15:43:10 +0000 (UTC) (envelope-from das@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 381218FC12; Mon, 10 Oct 2011 15:43:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9AFhAJx068358; Mon, 10 Oct 2011 15:43:10 GMT (envelope-from das@svn.freebsd.org) Received: (from das@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9AFhAer068337; Mon, 10 Oct 2011 15:43:10 GMT (envelope-from das@svn.freebsd.org) Message-Id: <201110101543.p9AFhAer068337@svn.freebsd.org> From: David Schultz Date: Mon, 10 Oct 2011 15:43:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226218 - in head/lib/msun: . amd64 arm i387 ia64 mips powerpc sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2011 15:43:10 -0000 Author: das Date: Mon Oct 10 15:43:09 2011 New Revision: 226218 URL: http://svn.freebsd.org/changeset/base/226218 Log: Provide external definitions of all of the standardized functions in fenv.h that are currently inlined. The definitions are provided in fenv.c via 'extern inline' declaractions. This assumes the compiler handles 'extern inline' as specified in C99, which has been true under FreeBSD since 8.0. The goal is to eventually remove the 'static' keyword from the inline definitions in fenv.h, so that non-inlined references all wind up pointing to the same external definition like they're supposed to. I am deferring the second step to provide a window where newly-compiled apps will still link against old math libraries. (This isn't supported, but there's no need to cause undue breakage.) Reviewed by: stefanf, bde Modified: head/lib/msun/Symbol.map head/lib/msun/amd64/Symbol.map head/lib/msun/amd64/fenv.c head/lib/msun/amd64/fenv.h head/lib/msun/arm/Symbol.map head/lib/msun/arm/fenv.c head/lib/msun/arm/fenv.h head/lib/msun/i387/Symbol.map head/lib/msun/i387/fenv.c head/lib/msun/i387/fenv.h head/lib/msun/ia64/Symbol.map head/lib/msun/ia64/fenv.c head/lib/msun/ia64/fenv.h head/lib/msun/mips/Symbol.map head/lib/msun/mips/fenv.c head/lib/msun/mips/fenv.h head/lib/msun/powerpc/Symbol.map head/lib/msun/powerpc/fenv.c head/lib/msun/powerpc/fenv.h head/lib/msun/sparc64/Symbol.map head/lib/msun/sparc64/fenv.c head/lib/msun/sparc64/fenv.h Modified: head/lib/msun/Symbol.map ============================================================================== --- head/lib/msun/Symbol.map Mon Oct 10 15:42:33 2011 (r226217) +++ head/lib/msun/Symbol.map Mon Oct 10 15:43:09 2011 (r226218) @@ -228,3 +228,13 @@ FBSD_1.2 { log2; log2f; }; + +/* First added in 10.0-CURRENT */ +FBSD_1.3 { + feclearexcept; + fegetexceptflag; + fetestexcept; + fegetround; + fesetround; + fesetenv; +}; Modified: head/lib/msun/amd64/Symbol.map ============================================================================== --- head/lib/msun/amd64/Symbol.map Mon Oct 10 15:42:33 2011 (r226217) +++ head/lib/msun/amd64/Symbol.map Mon Oct 10 15:43:09 2011 (r226218) @@ -7,8 +7,6 @@ FBSD_1.0 { fegetenv; feholdexcept; feupdateenv; - __feenableexcept; - __fedisableexcept; feenableexcept; fedisableexcept; }; Modified: head/lib/msun/amd64/fenv.c ============================================================================== --- head/lib/msun/amd64/fenv.c Mon Oct 10 15:42:33 2011 (r226217) +++ head/lib/msun/amd64/fenv.c Mon Oct 10 15:43:09 2011 (r226218) @@ -29,8 +29,14 @@ #include #include #include + +#define __fenv_static #include +#ifdef __GNUC_GNU_INLINE__ +#error "This file must be compiled with C99 'inline' semantics" +#endif + const fenv_t __fe_dfl_env = { { 0xffff0000 | __INITIAL_FPUCW__, 0xffff0000, @@ -41,6 +47,9 @@ const fenv_t __fe_dfl_env = { __INITIAL_MXCSR__ }; +extern inline int feclearexcept(int __excepts); +extern inline int fegetexceptflag(fexcept_t *__flagp, int __excepts); + int fesetexceptflag(const fexcept_t *flagp, int excepts) { @@ -69,6 +78,10 @@ feraiseexcept(int excepts) return (0); } +extern inline int fetestexcept(int __excepts); +extern inline int fegetround(void); +extern inline int fesetround(int __round); + int fegetenv(fenv_t *envp) { @@ -98,6 +111,8 @@ feholdexcept(fenv_t *envp) return (0); } +extern inline int fesetenv(const fenv_t *__envp); + int feupdateenv(const fenv_t *envp) { Modified: head/lib/msun/amd64/fenv.h ============================================================================== --- head/lib/msun/amd64/fenv.h Mon Oct 10 15:42:33 2011 (r226217) +++ head/lib/msun/amd64/fenv.h Mon Oct 10 15:43:09 2011 (r226218) @@ -32,6 +32,10 @@ #include #include +#ifndef __fenv_static +#define __fenv_static static +#endif + typedef struct { struct { __uint32_t __control; @@ -89,7 +93,7 @@ extern const fenv_t __fe_dfl_env; #define __ldmxcsr(__csr) __asm __volatile("ldmxcsr %0" : : "m" (__csr)) #define __stmxcsr(__csr) __asm __volatile("stmxcsr %0" : "=m" (*(__csr))) -static __inline int +__fenv_static inline int feclearexcept(int __excepts) { fenv_t __env; @@ -107,7 +111,7 @@ feclearexcept(int __excepts) return (0); } -static __inline int +__fenv_static inline int fegetexceptflag(fexcept_t *__flagp, int __excepts) { __uint32_t __mxcsr; @@ -122,7 +126,7 @@ fegetexceptflag(fexcept_t *__flagp, int int fesetexceptflag(const fexcept_t *__flagp, int __excepts); int feraiseexcept(int __excepts); -static __inline int +__fenv_static inline int fetestexcept(int __excepts) { __uint32_t __mxcsr; @@ -133,7 +137,7 @@ fetestexcept(int __excepts) return ((__status | __mxcsr) & __excepts); } -static __inline int +__fenv_static inline int fegetround(void) { __uint16_t __control; @@ -148,7 +152,7 @@ fegetround(void) return (__control & _ROUND_MASK); } -static __inline int +__fenv_static inline int fesetround(int __round) { __uint32_t __mxcsr; @@ -173,7 +177,7 @@ fesetround(int __round) int fegetenv(fenv_t *__envp); int feholdexcept(fenv_t *__envp); -static __inline int +__fenv_static inline int fesetenv(const fenv_t *__envp) { @@ -197,7 +201,8 @@ int feupdateenv(const fenv_t *__envp); int feenableexcept(int __mask); int fedisableexcept(int __mask); -static __inline int +/* We currently provide no external definition of fegetexcept(). */ +static inline int fegetexcept(void) { __uint16_t __control; Modified: head/lib/msun/arm/Symbol.map ============================================================================== --- head/lib/msun/arm/Symbol.map Mon Oct 10 15:42:33 2011 (r226217) +++ head/lib/msun/arm/Symbol.map Mon Oct 10 15:43:09 2011 (r226218) @@ -3,3 +3,11 @@ */ FBSD_1.0 { }; + +FBSD_1.3 { + fesetexceptflag; + feraiseexcept; + fegetenv; + feholdexcept; + feupdateenv; +}; Modified: head/lib/msun/arm/fenv.c ============================================================================== --- head/lib/msun/arm/fenv.c Mon Oct 10 15:42:33 2011 (r226217) +++ head/lib/msun/arm/fenv.c Mon Oct 10 15:43:09 2011 (r226218) @@ -26,10 +26,27 @@ * $FreeBSD$ */ +#define __fenv_static #include +#ifdef __GNUC_GNU_INLINE__ +#error "This file must be compiled with C99 'inline' semantics" +#endif + /* * Hopefully the system ID byte is immutable, so it's valid to use * this as a default environment. */ const fenv_t __fe_dfl_env = 0; + +extern inline int feclearexcept(int __excepts); +extern inline int fegetexceptflag(fexcept_t *__flagp, int __excepts); +extern inline int fesetexceptflag(const fexcept_t *__flagp, int __excepts); +extern inline int feraiseexcept(int __excepts); +extern inline int fetestexcept(int __excepts); +extern inline int fegetround(void); +extern inline int fesetround(int __round); +extern inline int fegetenv(fenv_t *__envp); +extern inline int feholdexcept(fenv_t *__envp); +extern inline int fesetenv(const fenv_t *__envp); +extern inline int feupdateenv(const fenv_t *__envp); Modified: head/lib/msun/arm/fenv.h ============================================================================== --- head/lib/msun/arm/fenv.h Mon Oct 10 15:42:33 2011 (r226217) +++ head/lib/msun/arm/fenv.h Mon Oct 10 15:43:09 2011 (r226218) @@ -31,6 +31,10 @@ #include +#ifndef __fenv_static +#define __fenv_static static +#endif + typedef __uint32_t fenv_t; typedef __uint32_t fexcept_t; @@ -68,7 +72,7 @@ extern const fenv_t __fe_dfl_env; #define __wfs(__fpsr) #endif -static __inline int +__fenv_static inline int feclearexcept(int __excepts) { fexcept_t __fpsr; @@ -79,7 +83,7 @@ feclearexcept(int __excepts) return (0); } -static __inline int +__fenv_static inline int fegetexceptflag(fexcept_t *__flagp, int __excepts) { fexcept_t __fpsr; @@ -89,7 +93,7 @@ fegetexceptflag(fexcept_t *__flagp, int return (0); } -static __inline int +__fenv_static inline int fesetexceptflag(const fexcept_t *__flagp, int __excepts) { fexcept_t __fpsr; @@ -101,7 +105,7 @@ fesetexceptflag(const fexcept_t *__flagp return (0); } -static __inline int +__fenv_static inline int feraiseexcept(int __excepts) { fexcept_t __ex = __excepts; @@ -110,7 +114,7 @@ feraiseexcept(int __excepts) return (0); } -static __inline int +__fenv_static inline int fetestexcept(int __excepts) { fexcept_t __fpsr; @@ -119,7 +123,7 @@ fetestexcept(int __excepts) return (__fpsr & __excepts); } -static __inline int +__fenv_static inline int fegetround(void) { @@ -131,14 +135,14 @@ fegetround(void) return (-1); } -static __inline int +__fenv_static inline int fesetround(int __round) { return (-1); } -static __inline int +__fenv_static inline int fegetenv(fenv_t *__envp) { @@ -146,7 +150,7 @@ fegetenv(fenv_t *__envp) return (0); } -static __inline int +__fenv_static inline int feholdexcept(fenv_t *__envp) { fenv_t __env; @@ -158,7 +162,7 @@ feholdexcept(fenv_t *__envp) return (0); } -static __inline int +__fenv_static inline int fesetenv(const fenv_t *__envp) { @@ -166,7 +170,7 @@ fesetenv(const fenv_t *__envp) return (0); } -static __inline int +__fenv_static inline int feupdateenv(const fenv_t *__envp) { fexcept_t __fpsr; @@ -179,7 +183,9 @@ feupdateenv(const fenv_t *__envp) #if __BSD_VISIBLE -static __inline int +/* We currently provide no external definitions of the functions below. */ + +static inline int feenableexcept(int __mask) { fenv_t __old_fpsr, __new_fpsr; @@ -190,7 +196,7 @@ feenableexcept(int __mask) return ((__old_fpsr >> _FPUSW_SHIFT) & FE_ALL_EXCEPT); } -static __inline int +static inline int fedisableexcept(int __mask) { fenv_t __old_fpsr, __new_fpsr; @@ -201,7 +207,7 @@ fedisableexcept(int __mask) return ((__old_fpsr >> _FPUSW_SHIFT) & FE_ALL_EXCEPT); } -static __inline int +static inline int fegetexcept(void) { fenv_t __fpsr; Modified: head/lib/msun/i387/Symbol.map ============================================================================== --- head/lib/msun/i387/Symbol.map Mon Oct 10 15:42:33 2011 (r226217) +++ head/lib/msun/i387/Symbol.map Mon Oct 10 15:43:09 2011 (r226218) @@ -9,8 +9,6 @@ FBSD_1.0 { fegetenv; feholdexcept; feupdateenv; - __feenableexcept; - __fedisableexcept; feenableexcept; fedisableexcept; }; Modified: head/lib/msun/i387/fenv.c ============================================================================== --- head/lib/msun/i387/fenv.c Mon Oct 10 15:42:33 2011 (r226217) +++ head/lib/msun/i387/fenv.c Mon Oct 10 15:43:09 2011 (r226218) @@ -29,7 +29,13 @@ #include #include #include -#include "fenv.h" + +#define __fenv_static +#include + +#ifdef __GNUC_GNU_INLINE__ +#error "This file must be compiled with C99 'inline' semantics" +#endif const fenv_t __fe_dfl_env = { __INITIAL_NPXCW__, @@ -83,6 +89,9 @@ __test_sse(void) return (0); } +extern inline int feclearexcept(int __excepts); +extern inline int fegetexceptflag(fexcept_t *__flagp, int __excepts); + int fesetexceptflag(const fexcept_t *flagp, int excepts) { @@ -114,6 +123,10 @@ feraiseexcept(int excepts) return (0); } +extern inline int fetestexcept(int __excepts); +extern inline int fegetround(void); +extern inline int fesetround(int __round); + int fegetenv(fenv_t *envp) { @@ -149,6 +162,8 @@ feholdexcept(fenv_t *envp) return (0); } +extern inline int fesetenv(const fenv_t *__envp); + int feupdateenv(const fenv_t *envp) { @@ -208,6 +223,3 @@ __fedisableexcept(int mask) } return (~omask); } - -__weak_reference(__feenableexcept, feenableexcept); -__weak_reference(__fedisableexcept, fedisableexcept); Modified: head/lib/msun/i387/fenv.h ============================================================================== --- head/lib/msun/i387/fenv.h Mon Oct 10 15:42:33 2011 (r226217) +++ head/lib/msun/i387/fenv.h Mon Oct 10 15:43:09 2011 (r226218) @@ -32,6 +32,10 @@ #include #include +#ifndef __fenv_static +#define __fenv_static static +#endif + /* * To preserve binary compatibility with FreeBSD 5.3, we pack the * mxcsr into some reserved fields, rather than changing sizeof(fenv_t). @@ -110,7 +114,7 @@ extern const fenv_t __fe_dfl_env; #define __ldmxcsr(__csr) __asm __volatile("ldmxcsr %0" : : "m" (__csr)) #define __stmxcsr(__csr) __asm __volatile("stmxcsr %0" : "=m" (*(__csr))) -static __inline int +__fenv_static inline int feclearexcept(int __excepts) { fenv_t __env; @@ -131,7 +135,7 @@ feclearexcept(int __excepts) return (0); } -static __inline int +__fenv_static inline int fegetexceptflag(fexcept_t *__flagp, int __excepts) { __uint32_t __mxcsr; @@ -149,7 +153,7 @@ fegetexceptflag(fexcept_t *__flagp, int int fesetexceptflag(const fexcept_t *__flagp, int __excepts); int feraiseexcept(int __excepts); -static __inline int +__fenv_static inline int fetestexcept(int __excepts) { __uint32_t __mxcsr; @@ -163,7 +167,7 @@ fetestexcept(int __excepts) return ((__status | __mxcsr) & __excepts); } -static __inline int +__fenv_static inline int fegetround(void) { __uint16_t __control; @@ -178,7 +182,7 @@ fegetround(void) return (__control & _ROUND_MASK); } -static __inline int +__fenv_static inline int fesetround(int __round) { __uint32_t __mxcsr; @@ -205,7 +209,7 @@ fesetround(int __round) int fegetenv(fenv_t *__envp); int feholdexcept(fenv_t *__envp); -static __inline int +__fenv_static inline int fesetenv(const fenv_t *__envp) { fenv_t __env = *__envp; @@ -234,7 +238,8 @@ int feupdateenv(const fenv_t *__envp); int feenableexcept(int __mask); int fedisableexcept(int __mask); -static __inline int +/* We currently provide no external definition of fegetexcept(). */ +static inline int fegetexcept(void) { __uint16_t __control; Modified: head/lib/msun/ia64/Symbol.map ============================================================================== --- head/lib/msun/ia64/Symbol.map Mon Oct 10 15:42:33 2011 (r226217) +++ head/lib/msun/ia64/Symbol.map Mon Oct 10 15:43:09 2011 (r226218) @@ -4,3 +4,10 @@ FBSD_1.0 { feupdateenv; }; + +FBSD_1.3 { + fesetexceptflag; + feraiseexcept; + fegetenv; + feholdexcept; +}; Modified: head/lib/msun/ia64/fenv.c ============================================================================== --- head/lib/msun/ia64/fenv.c Mon Oct 10 15:42:33 2011 (r226217) +++ head/lib/msun/ia64/fenv.c Mon Oct 10 15:43:09 2011 (r226218) @@ -27,10 +27,27 @@ */ #include + +#define __fenv_static #include +#ifdef __GNUC_GNU_INLINE__ +#error "This file must be compiled with C99 'inline' semantics" +#endif + const fenv_t __fe_dfl_env = 0x0009804c8a70033fULL; +extern inline int feclearexcept(int __excepts); +extern inline int fegetexceptflag(fexcept_t *__flagp, int __excepts); +extern inline int fesetexceptflag(const fexcept_t *__flagp, int __excepts); +extern inline int feraiseexcept(int __excepts); +extern inline int fetestexcept(int __excepts); +extern inline int fegetround(void); +extern inline int fesetround(int __round); +extern inline int fegetenv(fenv_t *__envp); +extern inline int feholdexcept(fenv_t *__envp); +extern inline int fesetenv(const fenv_t *__envp); + /* * It doesn't pay to inline feupdateenv() because it includes one of * the rare uses of feraiseexcept() where the argument is not a Modified: head/lib/msun/ia64/fenv.h ============================================================================== --- head/lib/msun/ia64/fenv.h Mon Oct 10 15:42:33 2011 (r226217) +++ head/lib/msun/ia64/fenv.h Mon Oct 10 15:43:09 2011 (r226218) @@ -31,6 +31,10 @@ #include +#ifndef __fenv_static +#define __fenv_static static +#endif + typedef __uint64_t fenv_t; typedef __uint16_t fexcept_t; @@ -63,7 +67,7 @@ extern const fenv_t __fe_dfl_env; #define __stfpsr(__r) __asm __volatile("mov %0=ar.fpsr" : "=r" (*(__r))) #define __ldfpsr(__r) __asm __volatile("mov ar.fpsr=%0;;" : : "r" (__r)) -static __inline int +__fenv_static inline int feclearexcept(int __excepts) { fenv_t __fpsr; @@ -74,7 +78,7 @@ feclearexcept(int __excepts) return (0); } -static __inline int +__fenv_static inline int fegetexceptflag(fexcept_t *__flagp, int __excepts) { fenv_t __fpsr; @@ -84,7 +88,7 @@ fegetexceptflag(fexcept_t *__flagp, int return (0); } -static __inline int +__fenv_static inline int fesetexceptflag(const fexcept_t *__flagp, int __excepts) { fenv_t __fpsr; @@ -103,7 +107,7 @@ fesetexceptflag(const fexcept_t *__flagp * figure this out automatically, and there's no way to tell it. * We assume that constant arguments will be the common case. */ -static __inline int +__fenv_static inline int feraiseexcept(int __excepts) { volatile double d; @@ -138,7 +142,7 @@ feraiseexcept(int __excepts) return (0); } -static __inline int +__fenv_static inline int fetestexcept(int __excepts) { fenv_t __fpsr; @@ -148,7 +152,7 @@ fetestexcept(int __excepts) } -static __inline int +__fenv_static inline int fegetround(void) { fenv_t __fpsr; @@ -157,7 +161,7 @@ fegetround(void) return (__fpsr & _ROUND_MASK); } -static __inline int +__fenv_static inline int fesetround(int __round) { fenv_t __fpsr; @@ -171,7 +175,7 @@ fesetround(int __round) return (0); } -static __inline int +__fenv_static inline int fegetenv(fenv_t *__envp) { @@ -179,7 +183,7 @@ fegetenv(fenv_t *__envp) return (0); } -static __inline int +__fenv_static inline int feholdexcept(fenv_t *__envp) { fenv_t __fpsr; @@ -192,7 +196,7 @@ feholdexcept(fenv_t *__envp) return (0); } -static __inline int +__fenv_static inline int fesetenv(const fenv_t *__envp) { @@ -204,7 +208,9 @@ int feupdateenv(const fenv_t *__envp); #if __BSD_VISIBLE -static __inline int +/* We currently provide no external definitions of the functions below. */ + +static inline int feenableexcept(int __mask) { fenv_t __newfpsr, __oldfpsr; @@ -215,7 +221,7 @@ feenableexcept(int __mask) return (~__oldfpsr & FE_ALL_EXCEPT); } -static __inline int +static inline int fedisableexcept(int __mask) { fenv_t __newfpsr, __oldfpsr; @@ -226,7 +232,7 @@ fedisableexcept(int __mask) return (~__oldfpsr & FE_ALL_EXCEPT); } -static __inline int +static inline int fegetexcept(void) { fenv_t __fpsr; Modified: head/lib/msun/mips/Symbol.map ============================================================================== --- head/lib/msun/mips/Symbol.map Mon Oct 10 15:42:33 2011 (r226217) +++ head/lib/msun/mips/Symbol.map Mon Oct 10 15:43:09 2011 (r226218) @@ -3,3 +3,11 @@ */ FBSD_1.0 { }; + +FBSD_1.3 { + fesetexceptflag; + feraiseexcept; + fegetenv; + feholdexcept; + feupdateenv; +}; Modified: head/lib/msun/mips/fenv.c ============================================================================== --- head/lib/msun/mips/fenv.c Mon Oct 10 15:42:33 2011 (r226217) +++ head/lib/msun/mips/fenv.c Mon Oct 10 15:43:09 2011 (r226218) @@ -26,10 +26,27 @@ * $FreeBSD$ */ +#define __fenv_static #include +#ifdef __GNUC_GNU_INLINE__ +#error "This file must be compiled with C99 'inline' semantics" +#endif + /* * Hopefully the system ID byte is immutable, so it's valid to use * this as a default environment. */ const fenv_t __fe_dfl_env = 0; + +extern inline int feclearexcept(int __excepts); +extern inline int fegetexceptflag(fexcept_t *__flagp, int __excepts); +extern inline int fesetexceptflag(const fexcept_t *__flagp, int __excepts); +extern inline int feraiseexcept(int __excepts); +extern inline int fetestexcept(int __excepts); +extern inline int fegetround(void); +extern inline int fesetround(int __round); +extern inline int fegetenv(fenv_t *__envp); +extern inline int feholdexcept(fenv_t *__envp); +extern inline int fesetenv(const fenv_t *__envp); +extern inline int feupdateenv(const fenv_t *__envp); Modified: head/lib/msun/mips/fenv.h ============================================================================== --- head/lib/msun/mips/fenv.h Mon Oct 10 15:42:33 2011 (r226217) +++ head/lib/msun/mips/fenv.h Mon Oct 10 15:43:09 2011 (r226218) @@ -31,6 +31,10 @@ #include +#ifndef __fenv_static +#define __fenv_static static +#endif + typedef __uint32_t fenv_t; typedef __uint32_t fexcept_t; @@ -68,7 +72,7 @@ extern const fenv_t __fe_dfl_env; #define __wfs(__fpsr) #endif -static __inline int +__fenv_static inline int feclearexcept(int __excepts) { fexcept_t __fpsr; @@ -79,7 +83,7 @@ feclearexcept(int __excepts) return (0); } -static __inline int +__fenv_static inline int fegetexceptflag(fexcept_t *__flagp, int __excepts) { fexcept_t __fpsr; @@ -89,7 +93,7 @@ fegetexceptflag(fexcept_t *__flagp, int return (0); } -static __inline int +__fenv_static inline int fesetexceptflag(const fexcept_t *__flagp, int __excepts) { fexcept_t __fpsr; @@ -101,7 +105,7 @@ fesetexceptflag(const fexcept_t *__flagp return (0); } -static __inline int +__fenv_static inline int feraiseexcept(int __excepts) { fexcept_t __ex = __excepts; @@ -110,7 +114,7 @@ feraiseexcept(int __excepts) return (0); } -static __inline int +__fenv_static inline int fetestexcept(int __excepts) { fexcept_t __fpsr; @@ -119,7 +123,7 @@ fetestexcept(int __excepts) return (__fpsr & __excepts); } -static __inline int +__fenv_static inline int fegetround(void) { @@ -131,14 +135,14 @@ fegetround(void) return (-1); } -static __inline int +__fenv_static inline int fesetround(int __round) { return (-1); } -static __inline int +__fenv_static inline int fegetenv(fenv_t *__envp) { @@ -146,7 +150,7 @@ fegetenv(fenv_t *__envp) return (0); } -static __inline int +__fenv_static inline int feholdexcept(fenv_t *__envp) { fenv_t __env; @@ -158,7 +162,7 @@ feholdexcept(fenv_t *__envp) return (0); } -static __inline int +__fenv_static inline int fesetenv(const fenv_t *__envp) { @@ -166,7 +170,7 @@ fesetenv(const fenv_t *__envp) return (0); } -static __inline int +__fenv_static inline int feupdateenv(const fenv_t *__envp) { fexcept_t __fpsr; @@ -179,7 +183,9 @@ feupdateenv(const fenv_t *__envp) #if __BSD_VISIBLE -static __inline int +/* We currently provide no external definitions of the functions below. */ + +static inline int feenableexcept(int __mask) { fenv_t __old_fpsr, __new_fpsr; @@ -190,7 +196,7 @@ feenableexcept(int __mask) return ((__old_fpsr >> _FPUSW_SHIFT) & FE_ALL_EXCEPT); } -static __inline int +static inline int fedisableexcept(int __mask) { fenv_t __old_fpsr, __new_fpsr; @@ -201,7 +207,7 @@ fedisableexcept(int __mask) return ((__old_fpsr >> _FPUSW_SHIFT) & FE_ALL_EXCEPT); } -static __inline int +static inline int fegetexcept(void) { fenv_t __fpsr; Modified: head/lib/msun/powerpc/Symbol.map ============================================================================== --- head/lib/msun/powerpc/Symbol.map Mon Oct 10 15:42:33 2011 (r226217) +++ head/lib/msun/powerpc/Symbol.map Mon Oct 10 15:43:09 2011 (r226218) @@ -3,3 +3,11 @@ */ FBSD_1.0 { }; + +FBSD_1.3 { + fesetexceptflag; + feraiseexcept; + fegetenv; + feholdexcept; + feupdateenv; +}; Modified: head/lib/msun/powerpc/fenv.c ============================================================================== --- head/lib/msun/powerpc/fenv.c Mon Oct 10 15:42:33 2011 (r226217) +++ head/lib/msun/powerpc/fenv.c Mon Oct 10 15:43:09 2011 (r226218) @@ -26,6 +26,23 @@ * $FreeBSD$ */ +#define __fenv_static #include +#ifdef __GNUC_GNU_INLINE__ +#error "This file must be compiled with C99 'inline' semantics" +#endif + const fenv_t __fe_dfl_env = 0x00000000; + +extern inline int feclearexcept(int __excepts); +extern inline int fegetexceptflag(fexcept_t *__flagp, int __excepts); +extern inline int fesetexceptflag(const fexcept_t *__flagp, int __excepts); +extern inline int feraiseexcept(int __excepts); +extern inline int fetestexcept(int __excepts); +extern inline int fegetround(void); +extern inline int fesetround(int __round); +extern inline int fegetenv(fenv_t *__envp); +extern inline int feholdexcept(fenv_t *__envp); +extern inline int fesetenv(const fenv_t *__envp); +extern inline int feupdateenv(const fenv_t *__envp); Modified: head/lib/msun/powerpc/fenv.h ============================================================================== --- head/lib/msun/powerpc/fenv.h Mon Oct 10 15:42:33 2011 (r226217) +++ head/lib/msun/powerpc/fenv.h Mon Oct 10 15:43:09 2011 (r226218) @@ -31,6 +31,10 @@ #include +#ifndef __fenv_static +#define __fenv_static static +#endif + typedef __uint32_t fenv_t; typedef __uint32_t fexcept_t; @@ -98,7 +102,7 @@ union __fpscr { } __bits; }; -static __inline int +__fenv_static inline int feclearexcept(int __excepts) { union __fpscr __r; @@ -111,7 +115,7 @@ feclearexcept(int __excepts) return (0); } -static __inline int +__fenv_static inline int fegetexceptflag(fexcept_t *__flagp, int __excepts) { union __fpscr __r; @@ -121,7 +125,7 @@ fegetexceptflag(fexcept_t *__flagp, int return (0); } -static __inline int +__fenv_static inline int fesetexceptflag(const fexcept_t *__flagp, int __excepts) { union __fpscr __r; @@ -135,7 +139,7 @@ fesetexceptflag(const fexcept_t *__flagp return (0); } -static __inline int +__fenv_static inline int feraiseexcept(int __excepts) { union __fpscr __r; @@ -148,7 +152,7 @@ feraiseexcept(int __excepts) return (0); } -static __inline int +__fenv_static inline int fetestexcept(int __excepts) { union __fpscr __r; @@ -157,7 +161,7 @@ fetestexcept(int __excepts) return (__r.__bits.__reg & __excepts); } -static __inline int +__fenv_static inline int fegetround(void) { union __fpscr __r; @@ -166,7 +170,7 @@ fegetround(void) return (__r.__bits.__reg & _ROUND_MASK); } -static __inline int +__fenv_static inline int fesetround(int __round) { union __fpscr __r; @@ -180,7 +184,7 @@ fesetround(int __round) return (0); } -static __inline int +__fenv_static inline int fegetenv(fenv_t *__envp) { union __fpscr __r; @@ -190,7 +194,7 @@ fegetenv(fenv_t *__envp) return (0); } -static __inline int +__fenv_static inline int feholdexcept(fenv_t *__envp) { union __fpscr __r; @@ -202,7 +206,7 @@ feholdexcept(fenv_t *__envp) return (0); } -static __inline int +__fenv_static inline int fesetenv(const fenv_t *__envp) { union __fpscr __r; @@ -212,7 +216,7 @@ fesetenv(const fenv_t *__envp) return (0); } -static __inline int +__fenv_static inline int feupdateenv(const fenv_t *__envp) { union __fpscr __r; @@ -226,7 +230,9 @@ feupdateenv(const fenv_t *__envp) #if __BSD_VISIBLE -static __inline int +/* We currently provide no external definitions of the functions below. */ + +static inline int feenableexcept(int __mask) { union __fpscr __r; @@ -239,7 +245,7 @@ feenableexcept(int __mask) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 15:54:45 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1CD4D1065676; Mon, 10 Oct 2011 15:54:45 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0C9178FC08; Mon, 10 Oct 2011 15:54:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9AFsitB068831; Mon, 10 Oct 2011 15:54:44 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9AFsiJs068829; Mon, 10 Oct 2011 15:54:44 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201110101554.p9AFsiJs068829@svn.freebsd.org> From: Hans Petter Selasky Date: Mon, 10 Oct 2011 15:54:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226219 - head/sys/dev/usb/serial X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2011 15:54:45 -0000 Author: hselasky Date: Mon Oct 10 15:54:44 2011 New Revision: 226219 URL: http://svn.freebsd.org/changeset/base/226219 Log: Bugfix: The ucom detach function is sometimes called on zeroed structures. Check for this case and just return, so that the UCOM unit number zero is not accidentially freed. Submitted by: Danish FreeBSD user at EuroBSDcon 2011 MFC after: 3 days Modified: head/sys/dev/usb/serial/usb_serial.c Modified: head/sys/dev/usb/serial/usb_serial.c ============================================================================== --- head/sys/dev/usb/serial/usb_serial.c Mon Oct 10 15:43:09 2011 (r226218) +++ head/sys/dev/usb/serial/usb_serial.c Mon Oct 10 15:54:44 2011 (r226219) @@ -289,6 +289,9 @@ ucom_detach(struct ucom_super_softc *ssc { uint32_t subunit; + if (ssc->sc_subunits == 0) + return; /* not initialized */ + usb_proc_drain(&ssc->sc_tq); for (subunit = 0; subunit < ssc->sc_subunits; subunit++) { From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 16:13:33 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D4A4E106564A; Mon, 10 Oct 2011 16:13:33 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AAE988FC08; Mon, 10 Oct 2011 16:13:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9AGDXYM069802; Mon, 10 Oct 2011 16:13:33 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9AGDXEC069798; Mon, 10 Oct 2011 16:13:33 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201110101613.p9AGDXEC069798@svn.freebsd.org> From: Hans Petter Selasky Date: Mon, 10 Oct 2011 16:13:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226220 - head/lib/libusb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2011 16:13:33 -0000 Author: hselasky Date: Mon Oct 10 16:13:33 2011 New Revision: 226220 URL: http://svn.freebsd.org/changeset/base/226220 Log: Fix how libusb20_dev_kernel_driver_active() and libusb_dev_kernel_driver_active() works. In case of libusb20 the manpage was wrong and in case of libusb10 the implementation was wrong. Submitted by: Kai Wang MFC after: 3 days Modified: head/lib/libusb/libusb.3 head/lib/libusb/libusb10.c head/lib/libusb/libusb20.3 Modified: head/lib/libusb/libusb.3 ============================================================================== --- head/lib/libusb/libusb.3 Mon Oct 10 15:54:44 2011 (r226219) +++ head/lib/libusb/libusb.3 Mon Oct 10 16:13:33 2011 (r226220) @@ -223,8 +223,8 @@ code on failure. .Ft int .Fn libusb_kernel_driver_active "libusb_device_handle *devh" "int interface" Determine if a driver is active on a interface. -Returns 0 if no kernel driver -is active, 1 if a kernel driver is active, LIBUSB_ERROR_NO_DEVICE +Returns 0 if no kernel driver is active +and 1 if a kernel driver is active, LIBUSB_ERROR_NO_DEVICE if the device has been disconnected and a LIBUSB_ERROR code on failure. .Pp .Ft int Modified: head/lib/libusb/libusb10.c ============================================================================== --- head/lib/libusb/libusb10.c Mon Oct 10 15:54:44 2011 (r226219) +++ head/lib/libusb/libusb10.c Mon Oct 10 16:13:33 2011 (r226220) @@ -216,7 +216,6 @@ libusb_get_device_list(libusb_context *c libusb20_be_free(usb_backend); return (LIBUSB_ERROR_NO_MEM); } - /* get device into libUSB v1.0 list */ libusb20_be_dequeue_device(usb_backend, pdev); @@ -718,8 +717,10 @@ libusb_kernel_driver_active(struct libus if (pdev == NULL) return (LIBUSB_ERROR_INVALID_PARAM); - return (libusb20_dev_kernel_driver_active( - pdev, interface)); + if (libusb20_dev_kernel_driver_active(pdev, interface)) + return (0); /* no kernel driver is active */ + else + return (1); /* kernel driver is active */ } int Modified: head/lib/libusb/libusb20.3 ============================================================================== --- head/lib/libusb/libusb20.3 Mon Oct 10 15:54:44 2011 (r226219) +++ head/lib/libusb/libusb20.3 Mon Oct 10 16:13:33 2011 (r226220) @@ -614,10 +614,9 @@ The file descriptor can be used for poll .Pp . .Fn libusb20_dev_kernel_driver_active -returns a non-zero value if a kernel driver is active on -the given USB interface. +returns zero if a kernel driver is active on the given USB interface. . -Else zero is returned. +Else a LIBUSB20_ERROR value is returned. . .Pp . From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 16:26:07 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1EAA3106564A; Mon, 10 Oct 2011 16:26:07 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0E2AC8FC16; Mon, 10 Oct 2011 16:26:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9AGQ611070217; Mon, 10 Oct 2011 16:26:06 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9AGQ62x070214; Mon, 10 Oct 2011 16:26:06 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201110101626.p9AGQ62x070214@svn.freebsd.org> From: Hans Petter Selasky Date: Mon, 10 Oct 2011 16:26:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226221 - in head/sys/dev/usb: . quirk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2011 16:26:07 -0000 Author: hselasky Date: Mon Oct 10 16:26:06 2011 New Revision: 226221 URL: http://svn.freebsd.org/changeset/base/226221 Log: Add USB mass storage quirk for device that emits errors after the automatic no synchronize cache detection. Submitted by: Scott Allendorf MFC after: 3 days Modified: head/sys/dev/usb/quirk/usb_quirk.c head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/quirk/usb_quirk.c ============================================================================== --- head/sys/dev/usb/quirk/usb_quirk.c Mon Oct 10 16:13:33 2011 (r226220) +++ head/sys/dev/usb/quirk/usb_quirk.c Mon Oct 10 16:26:06 2011 (r226221) @@ -464,6 +464,7 @@ static struct usb_quirk_entry usb_quirks */ USB_QUIRK(FEIYA, DUMMY, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE, UQ_MATCH_VENDOR_ONLY), USB_QUIRK(REALTEK, DUMMY, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE, UQ_MATCH_VENDOR_ONLY), + USB_QUIRK(INITIO, DUMMY, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE, UQ_MATCH_VENDOR_ONLY), }; #undef USB_QUIRK_VP #undef USB_QUIRK Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Mon Oct 10 16:13:33 2011 (r226220) +++ head/sys/dev/usb/usbdevs Mon Oct 10 16:26:06 2011 (r226221) @@ -606,6 +606,7 @@ vendor BALTECH 0x13ad Baltech vendor CISCOLINKSYS 0x13b1 Cisco-Linksys vendor SHARK 0x13d2 Shark vendor AZUREWAVE 0x13d3 AsureWave +vendor INITIO 0x13fd Initio Corporation vendor EMTEC 0x13fe Emtec vendor NOVATEL 0x1410 Novatel Wireless vendor MERLIN 0x1416 Merlin @@ -1887,6 +1888,10 @@ product IBM USBCDROMDRIVE 0x4427 USB CD- /* Imagination Technologies products */ product IMAGINATION DBX1 0x2107 DBX1 DSP core +/* Initio Corporation products */ +product INITIO DUMMY 0x0000 Dummy product +product INITIO INIC_1610P 0x1e40 USB to SATA Bridge + /* Inside Out Networks products */ product INSIDEOUT EDGEPORT4 0x0001 EdgePort/4 serial ports From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 16:31:19 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5D1421065676; Mon, 10 Oct 2011 16:31:19 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4D0AE8FC18; Mon, 10 Oct 2011 16:31:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9AGVIOZ070406; Mon, 10 Oct 2011 16:31:18 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9AGVIK1070404; Mon, 10 Oct 2011 16:31:18 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201110101631.p9AGVIK1070404@svn.freebsd.org> From: Michael Tuexen Date: Mon, 10 Oct 2011 16:31:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226222 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2011 16:31:19 -0000 Author: tuexen Date: Mon Oct 10 16:31:18 2011 New Revision: 226222 URL: http://svn.freebsd.org/changeset/base/226222 Log: Get struct sctp_net_route in tune with struct route. struct route was changed in http://svn.freebsd.org/changeset/base/225698 and since then SCTP support was broken. This needs to be MFCed to stable/9 to unbreak SCTP support in 9.0 MFC after: 3 days. Modified: head/sys/netinet/sctp_structs.h Modified: head/sys/netinet/sctp_structs.h ============================================================================== --- head/sys/netinet/sctp_structs.h Mon Oct 10 16:26:06 2011 (r226221) +++ head/sys/netinet/sctp_structs.h Mon Oct 10 16:31:18 2011 (r226222) @@ -191,6 +191,8 @@ struct iterator_control { struct sctp_net_route { sctp_rtentry_t *ro_rt; void *ro_lle; + void *ro_ia; + int ro_flags; union sctp_sockstore _l_addr; /* remote peer addr */ struct sctp_ifa *_s_addr; /* our selected src addr */ }; From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 17:05:49 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 68C77106566C; Mon, 10 Oct 2011 17:05:49 +0000 (UTC) (envelope-from bz@freebsd.org) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) by mx1.freebsd.org (Postfix) with ESMTP id EDE9A8FC08; Mon, 10 Oct 2011 17:05:48 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id C537F25D3899; Mon, 10 Oct 2011 17:05:47 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id DEC28BD3C44; Mon, 10 Oct 2011 17:05:46 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id MkCXODx92tQX; Mon, 10 Oct 2011 17:05:44 +0000 (UTC) Received: from orange-en1.sbone.de (orange-en1.sbone.de [IPv6:fde9:577b:c1a9:31:cabc:c8ff:fecf:e8e3]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id B0892BD3C3B; Mon, 10 Oct 2011 17:05:44 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: "Bjoern A. Zeeb" In-Reply-To: Date: Mon, 10 Oct 2011 17:05:43 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201110031951.p93JpJLA025249@svn.freebsd.org> <20111009194732.GB94905@glebius.int.ru> <20111010061313.GC94905@FreeBSD.org> To: Qing Li X-Mailer: Apple Mail (2.1084) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Gleb Smirnoff , src-committers@freebsd.org Subject: Re: svn commit: r225947 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2011 17:05:49 -0000 On 10. Oct 2011, at 08:44 , Qing Li wrote: Hey, > Okay, now I know what's confusing you ... it's that bug I introduced = :-) >=20 > The 2nd "if()" check on the RTF_GATEWAY flag should have been > an "else if()". >=20 > In a nutshell, the logic is any indirect route should fail the check, > except for that special host route. >=20 > Attached is the rework of that part of the patch, with some cleaning = up > per your suggestion. >=20 > Thank you very much for catching that bug. >=20 > --Qing >=20 >=20 >> Q> > Well, after third review it is clear, that >> Q> > next if() case would definitely be true, and you would proceed >> Q> > with return. But that is difficult to see from first glance. >> Q> >> Q> Not so, only for an indirect prefix route. >> Q> >> Q> > I'd suggest to remove error variable, return immediately in >> Q> > all error cases, and also the RTF_GATEWAY check can be shifted = up, >> Q> > since it is the most simple and the most usual to be true. >> Q> > >> Q> >> Q> No, the RTF_GATEWAY check cannot be shifted up because if we did >> Q> that, the (indirect host route, with destination matching the = gateway IP) >> Q> would never be executed, if when that set of conditions are = true, which is >> Q> allowed and the reason for the patch in the first place. >>=20 >> Can you elaborate on that please? As far as I see, any rtentry that = has >> RTF_GATEWAY would return with EINVAL. The first if() clause doesn't >> do any actual processing, only checking flags and memcmp()ing. The = third >> clause either. The error is never reset to 0. So, I don't see any >> difference in returning EINVAL for RTF_GATEWAY immediately or later >> after other checks. I am a bit confused by this entire thing; it seems it's only parts of = what I had looked at initially but maybe the commit was split due to = follow-ups on an early change. I am however happy that some things I had mentioned initially are now = being addressed in the cleanup patch. I have not checked the logic changes on = it however. Thanks, Bjoern --=20 Bjoern A. Zeeb You have to have visions! Stop bit received. Insert coin for new address family.= From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 17:09:28 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9D84F1065672; Mon, 10 Oct 2011 17:09:28 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail06.syd.optusnet.com.au (mail06.syd.optusnet.com.au [211.29.132.187]) by mx1.freebsd.org (Postfix) with ESMTP id 217A38FC0C; Mon, 10 Oct 2011 17:09:27 +0000 (UTC) Received: from c122-106-165-191.carlnfd1.nsw.optusnet.com.au (c122-106-165-191.carlnfd1.nsw.optusnet.com.au [122.106.165.191]) by mail06.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id p9AH9PA3030741 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 11 Oct 2011 04:09:26 +1100 Date: Tue, 11 Oct 2011 04:09:25 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: David Schultz In-Reply-To: <201110101539.p9AFdTeW067945@svn.freebsd.org> Message-ID: <20111011040717.W1680@besplex.bde.org> References: <201110101539.p9AFdTeW067945@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r226216 - head/share/mk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2011 17:09:28 -0000 On Mon, 10 Oct 2011, David Schultz wrote: > Log: > Pass -std= flags in CFLAGS to mkdep. Without this, preprocessor tests > for particular compiler features might be evaluated differently by > mkdep than they would be by cc. Same with -ansi and -pedantic and any other spellings of -std=. Bruce From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 17:39:59 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0CF14106566B; Mon, 10 Oct 2011 17:39:59 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EFFD78FC16; Mon, 10 Oct 2011 17:39:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9AHdwG6073404; Mon, 10 Oct 2011 17:39:58 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9AHdwLM073402; Mon, 10 Oct 2011 17:39:58 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201110101739.p9AHdwLM073402@svn.freebsd.org> From: Christian Brueffer Date: Mon, 10 Oct 2011 17:39:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226223 - stable/7/sys/dev/ips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2011 17:39:59 -0000 Author: brueffer Date: Mon Oct 10 17:39:58 2011 New Revision: 226223 URL: http://svn.freebsd.org/changeset/base/226223 Log: MFC: r198329 Check pointer for NULL before dereferencing it, not after. Modified: stable/7/sys/dev/ips/ips_disk.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/ips/ips_disk.c ============================================================================== --- stable/7/sys/dev/ips/ips_disk.c Mon Oct 10 16:31:18 2011 (r226222) +++ stable/7/sys/dev/ips/ips_disk.c Mon Oct 10 17:39:58 2011 (r226223) @@ -192,10 +192,10 @@ ipsd_dump(void *arg, void *virtual, vm_o dp = arg; dsc = dp->d_drv1; - sc = dsc->sc; if (dsc == NULL) return (EINVAL); + sc = dsc->sc; if (ips_get_free_cmd(sc, &command, 0) != 0) { printf("ipsd: failed to get cmd for dump\n"); From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 17:41:12 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 03AAA1065670; Mon, 10 Oct 2011 17:41:12 +0000 (UTC) (envelope-from qingli@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DD5A78FC08; Mon, 10 Oct 2011 17:41:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9AHfBqb073487; Mon, 10 Oct 2011 17:41:11 GMT (envelope-from qingli@svn.freebsd.org) Received: (from qingli@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9AHfB6E073485; Mon, 10 Oct 2011 17:41:11 GMT (envelope-from qingli@svn.freebsd.org) Message-Id: <201110101741.p9AHfB6E073485@svn.freebsd.org> From: Qing Li Date: Mon, 10 Oct 2011 17:41:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226224 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2011 17:41:12 -0000 Author: qingli Date: Mon Oct 10 17:41:11 2011 New Revision: 226224 URL: http://svn.freebsd.org/changeset/base/226224 Log: All indirect routes will fail the rtcheck, except for a special host route where the destination IP and the gateway IP is the same. This special case handling is only meant for backward compatibility reason. The last commit introduced a bug in the route check logic, where a valid special case is treated as an error. This patch fixes that bug along with some code cleanup. Suggested by: gleb Reviewed by: kmacy, discussed with gleb MFC after: 1 day Modified: head/sys/netinet/in.c Modified: head/sys/netinet/in.c ============================================================================== --- head/sys/netinet/in.c Mon Oct 10 17:39:58 2011 (r226223) +++ head/sys/netinet/in.c Mon Oct 10 17:41:11 2011 (r226224) @@ -1414,8 +1414,6 @@ static int in_lltable_rtcheck(struct ifnet *ifp, u_int flags, const struct sockaddr *l3addr) { struct rtentry *rt; - struct ifnet *xifp; - int error = 0; KASSERT(l3addr->sa_family == AF_INET, ("sin_family %d", l3addr->sa_family)); @@ -1432,21 +1430,16 @@ in_lltable_rtcheck(struct ifnet *ifp, u_ * such as MANET, and the interface is of the correct type, then * allow for ARP to proceed. */ - if (rt->rt_flags & (RTF_GATEWAY | RTF_HOST)) { - xifp = rt->rt_ifp; - - if (xifp && (xifp->if_type != IFT_ETHER || - (xifp->if_flags & (IFF_NOARP | IFF_STATICARP)) != 0)) - error = EINVAL; - - if (memcmp(rt->rt_gateway->sa_data, l3addr->sa_data, - sizeof(in_addr_t)) != 0) - error = EINVAL; - } - if (rt->rt_flags & RTF_GATEWAY) { - RTFREE_LOCKED(rt); - return (EINVAL); + if (!(rt->rt_flags & RTF_HOST) || !rt->rt_ifp || + rt->rt_ifp->if_type != IFT_ETHER || + (rt->rt_ifp->if_flags & + (IFF_NOARP | IFF_STATICARP)) != 0 || + memcmp(rt->rt_gateway->sa_data, l3addr->sa_data, + sizeof(in_addr_t)) != 0) { + RTFREE_LOCKED(rt); + return (EINVAL); + } } /* @@ -1455,32 +1448,31 @@ in_lltable_rtcheck(struct ifnet *ifp, u_ * interfaces have the same prefix. An incoming packet arrives * on one interface and the corresponding outgoing packet leaves * another interface. - * */ if (rt->rt_ifp != ifp) { - char *sa, *mask, *addr, *lim; + const char *sa, *mask, *addr, *lim; int len; - sa = (char *)rt_key(rt); - mask = (char *)rt_mask(rt); - addr = (char *)__DECONST(struct sockaddr *, l3addr); - len = ((struct sockaddr_in *)__DECONST(struct sockaddr *, l3addr))->sin_len; + sa = (const char *)rt_key(rt); + mask = (const char *)rt_mask(rt); + addr = (const char *)l3addr; + len = ((const struct sockaddr_in *)l3addr)->sin_len; lim = addr + len; for ( ; addr < lim; sa++, mask++, addr++) { if ((*sa ^ *addr) & *mask) { - error = EINVAL; #ifdef DIAGNOSTIC log(LOG_INFO, "IPv4 address: \"%s\" is not on the network\n", inet_ntoa(((const struct sockaddr_in *)l3addr)->sin_addr)); #endif - break; + RTFREE_LOCKED(rt); + return (EINVAL); } } } RTFREE_LOCKED(rt); - return (error); + return (0); } /* From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 17:52:12 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 63305106566C; Mon, 10 Oct 2011 17:52:12 +0000 (UTC) (envelope-from rdivacky@vlakno.cz) Received: from vlakno.cz (vlakno.cz [46.28.110.116]) by mx1.freebsd.org (Postfix) with ESMTP id 2481A8FC0A; Mon, 10 Oct 2011 17:52:11 +0000 (UTC) Received: by vlakno.cz (Postfix, from userid 1002) id 246307F383F; Mon, 10 Oct 2011 19:43:33 +0200 (CEST) Date: Mon, 10 Oct 2011 19:43:33 +0200 From: Roman Divacky To: David Schultz Message-ID: <20111010174333.GA61528@freebsd.org> References: <201110101539.p9AFdTeW067945@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201110101539.p9AFdTeW067945@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r226216 - head/share/mk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2011 17:52:12 -0000 On Mon, Oct 10, 2011 at 03:39:29PM +0000, David Schultz wrote: > Author: das > Date: Mon Oct 10 15:39:29 2011 > New Revision: 226216 > URL: http://svn.freebsd.org/changeset/base/226216 > > Log: > Pass -std= flags in CFLAGS to mkdep. Without this, preprocessor tests > for particular compiler features might be evaluated differently by > mkdep than they would be by cc. > > Modified: > head/share/mk/bsd.dep.mk > > Modified: head/share/mk/bsd.dep.mk > ============================================================================== > --- head/share/mk/bsd.dep.mk Mon Oct 10 14:48:18 2011 (r226215) > +++ head/share/mk/bsd.dep.mk Mon Oct 10 15:39:29 2011 (r226216) > @@ -125,8 +125,8 @@ depend: beforedepend ${DEPENDFILE} after > > # Different types of sources are compiled with slightly different flags. > # Split up the sources, and filter out headers and non-applicable flags. > -MKDEP_CFLAGS= ${CFLAGS:M-nostdinc*} ${CFLAGS:M-[BIDU]*} > -MKDEP_CXXFLAGS= ${CXXFLAGS:M-nostdinc*} ${CXXFLAGS:M-[BIDU]*} > +MKDEP_CFLAGS= ${CFLAGS:M-nostdinc*} ${CFLAGS:M-[BIDU]*} ${CFLAGS:M-std=*} > +MKDEP_CXXFLAGS= ${CXXFLAGS:M-nostdinc*} ${CXXFLAGS:M-[BIDU]*} ${CFLAGS:M-std=*} So we are passing the -std from CFLAGS to CXXFLAGS now? ie. something like c++ -std=gnu99 ? roman From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 17:53:07 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1F4FA1065673; Mon, 10 Oct 2011 17:53:07 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0E2DA8FC13; Mon, 10 Oct 2011 17:53:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9AHr6IB073919; Mon, 10 Oct 2011 17:53:06 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9AHr6Sk073916; Mon, 10 Oct 2011 17:53:06 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201110101753.p9AHr6Sk073916@svn.freebsd.org> From: Christian Brueffer Date: Mon, 10 Oct 2011 17:53:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226225 - stable/8/sys/dev/ppbus X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2011 17:53:07 -0000 Author: brueffer Date: Mon Oct 10 17:53:06 2011 New Revision: 226225 URL: http://svn.freebsd.org/changeset/base/226225 Log: MFC: r198358 Check pointer for NULL before dereferencing it, not after. Modified: stable/8/sys/dev/ppbus/lpt.c stable/8/sys/dev/ppbus/pcfclock.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/ppbus/lpt.c ============================================================================== --- stable/8/sys/dev/ppbus/lpt.c Mon Oct 10 17:41:11 2011 (r226224) +++ stable/8/sys/dev/ppbus/lpt.c Mon Oct 10 17:53:06 2011 (r226225) @@ -486,12 +486,15 @@ lptopen(struct cdev *dev, int flags, int { int trys, err; struct lpt_data *sc = dev->si_drv1; - device_t lptdev = sc->sc_dev; - device_t ppbus = device_get_parent(lptdev); + device_t lptdev; + device_t ppbus; if (!sc) return (ENXIO); + lptdev = sc->sc_dev; + ppbus = device_get_parent(lptdev); + ppb_lock(ppbus); if (sc->sc_state) { lprintf(("%s: still open %x\n", device_get_nameunit(lptdev), Modified: stable/8/sys/dev/ppbus/pcfclock.c ============================================================================== --- stable/8/sys/dev/ppbus/pcfclock.c Mon Oct 10 17:41:11 2011 (r226224) +++ stable/8/sys/dev/ppbus/pcfclock.c Mon Oct 10 17:53:06 2011 (r226225) @@ -150,12 +150,14 @@ static int pcfclock_open(struct cdev *dev, int flag, int fms, struct thread *td) { struct pcfclock_data *sc = dev->si_drv1; - device_t pcfclockdev = sc->dev; - device_t ppbus = device_get_parent(pcfclockdev); + device_t pcfclockdev; + device_t ppbus; int res; if (!sc) return (ENXIO); + pcfclockdev = sc->dev; + ppbus = device_get_parent(pcfclockdev); ppb_lock(ppbus); res = ppb_request_bus(ppbus, pcfclockdev, From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 18:18:40 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B7726106567A; Mon, 10 Oct 2011 18:18:40 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A69308FC1B; Mon, 10 Oct 2011 18:18:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9AIIeh3075116; Mon, 10 Oct 2011 18:18:40 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9AIIemj075114; Mon, 10 Oct 2011 18:18:40 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201110101818.p9AIIemj075114@svn.freebsd.org> From: Christian Brueffer Date: Mon, 10 Oct 2011 18:18:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226226 - stable/8/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2011 18:18:40 -0000 Author: brueffer Date: Mon Oct 10 18:18:40 2011 New Revision: 226226 URL: http://svn.freebsd.org/changeset/base/226226 Log: MFC: r198357 Check pointer for NULL before dereferencing it, not after. Modified: stable/8/sys/net/if_gif.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/net/if_gif.c ============================================================================== --- stable/8/sys/net/if_gif.c Mon Oct 10 17:53:06 2011 (r226225) +++ stable/8/sys/net/if_gif.c Mon Oct 10 18:18:40 2011 (r226226) @@ -488,7 +488,7 @@ gif_input(m, af, ifp) struct ifnet *ifp; { int isr, n; - struct gif_softc *sc = ifp->if_softc; + struct gif_softc *sc; struct etherip_header *eip; struct ether_header *eh; struct ifnet *oldifp; @@ -498,7 +498,7 @@ gif_input(m, af, ifp) m_freem(m); return; } - + sc = ifp->if_softc; m->m_pkthdr.rcvif = ifp; #ifdef MAC From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 18:20:36 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C4F06106564A; Mon, 10 Oct 2011 18:20:36 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B42638FC14; Mon, 10 Oct 2011 18:20:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9AIKaHQ075224; Mon, 10 Oct 2011 18:20:36 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9AIKaGi075222; Mon, 10 Oct 2011 18:20:36 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201110101820.p9AIKaGi075222@svn.freebsd.org> From: Christian Brueffer Date: Mon, 10 Oct 2011 18:20:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226227 - stable/7/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2011 18:20:36 -0000 Author: brueffer Date: Mon Oct 10 18:20:36 2011 New Revision: 226227 URL: http://svn.freebsd.org/changeset/base/226227 Log: MFC: r198357 Check pointer for NULL before dereferencing it, not after. Modified: stable/7/sys/net/if_gif.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/net/if_gif.c ============================================================================== --- stable/7/sys/net/if_gif.c Mon Oct 10 18:18:40 2011 (r226226) +++ stable/7/sys/net/if_gif.c Mon Oct 10 18:20:36 2011 (r226227) @@ -482,7 +482,7 @@ gif_input(m, af, ifp) struct ifnet *ifp; { int isr, n; - struct gif_softc *sc = ifp->if_softc; + struct gif_softc *sc; struct etherip_header *eip; struct ether_header *eh; struct ifnet *oldifp; @@ -492,7 +492,7 @@ gif_input(m, af, ifp) m_freem(m); return; } - + sc = ifp->if_softc; m->m_pkthdr.rcvif = ifp; #ifdef MAC From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 18:26:23 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7B59F106566B; Mon, 10 Oct 2011 18:26:23 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6A3288FC0A; Mon, 10 Oct 2011 18:26:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9AIQN18075764; Mon, 10 Oct 2011 18:26:23 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9AIQNg4075762; Mon, 10 Oct 2011 18:26:23 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201110101826.p9AIQNg4075762@svn.freebsd.org> From: Andre Oppermann Date: Mon, 10 Oct 2011 18:26:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226228 - stable/9/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2011 18:26:23 -0000 Author: andre Date: Mon Oct 10 18:26:23 2011 New Revision: 226228 URL: http://svn.freebsd.org/changeset/base/226228 Log: MFC r226113: Prevent TCP sessions from stalling indefinitely in reassembly when reaching the zone limit of reassembly queue entries. Approved by: re (kib) Modified: stable/9/sys/netinet/tcp_reass.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/netinet/tcp_reass.c ============================================================================== --- stable/9/sys/netinet/tcp_reass.c Mon Oct 10 18:20:36 2011 (r226227) +++ stable/9/sys/netinet/tcp_reass.c Mon Oct 10 18:26:23 2011 (r226228) @@ -177,7 +177,9 @@ tcp_reass(struct tcpcb *tp, struct tcphd struct tseg_qent *nq; struct tseg_qent *te = NULL; struct socket *so = tp->t_inpcb->inp_socket; + char *s = NULL; int flags; + struct tseg_qent tqs; INP_WLOCK_ASSERT(tp->t_inpcb); @@ -215,19 +217,40 @@ tcp_reass(struct tcpcb *tp, struct tcphd TCPSTAT_INC(tcps_rcvmemdrop); m_freem(m); *tlenp = 0; + if ((s = tcp_log_addrs(&tp->t_inpcb->inp_inc, th, NULL, NULL))) { + log(LOG_DEBUG, "%s; %s: queue limit reached, " + "segment dropped\n", s, __func__); + free(s, M_TCPLOG); + } return (0); } /* * Allocate a new queue entry. If we can't, or hit the zone limit * just drop the pkt. + * + * Use a temporary structure on the stack for the missing segment + * when the zone is exhausted. Otherwise we may get stuck. */ te = uma_zalloc(V_tcp_reass_zone, M_NOWAIT); - if (te == NULL) { + if (te == NULL && th->th_seq != tp->rcv_nxt) { TCPSTAT_INC(tcps_rcvmemdrop); m_freem(m); *tlenp = 0; + if ((s = tcp_log_addrs(&tp->t_inpcb->inp_inc, th, NULL, NULL))) { + log(LOG_DEBUG, "%s; %s: global zone limit reached, " + "segment dropped\n", s, __func__); + free(s, M_TCPLOG); + } return (0); + } else if (th->th_seq == tp->rcv_nxt) { + bzero(&tqs, sizeof(struct tseg_qent)); + te = &tqs; + if ((s = tcp_log_addrs(&tp->t_inpcb->inp_inc, th, NULL, NULL))) { + log(LOG_DEBUG, "%s; %s: global zone limit reached, " + "using stack for missing segment\n", s, __func__); + free(s, M_TCPLOG); + } } tp->t_segqlen++; @@ -304,6 +327,8 @@ tcp_reass(struct tcpcb *tp, struct tcphd if (p == NULL) { LIST_INSERT_HEAD(&tp->t_segq, te, tqe_q); } else { + KASSERT(te != &tqs, ("%s: temporary stack based entry not " + "first element in queue", __func__)); LIST_INSERT_AFTER(p, te, tqe_q); } @@ -327,7 +352,8 @@ present: m_freem(q->tqe_m); else sbappendstream_locked(&so->so_rcv, q->tqe_m); - uma_zfree(V_tcp_reass_zone, q); + if (q != &tqs) + uma_zfree(V_tcp_reass_zone, q); tp->t_segqlen--; q = nq; } while (q && q->tqe_th->th_seq == tp->rcv_nxt); From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 19:07:56 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3DD161065675; Mon, 10 Oct 2011 19:07:56 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 22E5A8FC18; Mon, 10 Oct 2011 19:07:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9AJ7u1V077402; Mon, 10 Oct 2011 19:07:56 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9AJ7tns077398; Mon, 10 Oct 2011 19:07:55 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201110101907.p9AJ7tns077398@svn.freebsd.org> From: Jung-uk Kim Date: Mon, 10 Oct 2011 19:07:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226229 - in stable/9/sys: conf libkern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2011 19:07:56 -0000 Author: jkim Date: Mon Oct 10 19:07:55 2011 New Revision: 226229 URL: http://svn.freebsd.org/changeset/base/226229 Log: MFC: r226029 Add strnlen() to libkern. Approved by: re (kib) Added: stable/9/sys/libkern/strnlen.c - copied unchanged from r226029, head/sys/libkern/strnlen.c Modified: stable/9/sys/conf/files stable/9/sys/sys/libkern.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/conf/files ============================================================================== --- stable/9/sys/conf/files Mon Oct 10 18:26:23 2011 (r226228) +++ stable/9/sys/conf/files Mon Oct 10 19:07:55 2011 (r226229) @@ -2553,6 +2553,7 @@ libkern/strlcpy.c standard libkern/strlen.c standard libkern/strncmp.c standard libkern/strncpy.c standard +libkern/strnlen.c standard libkern/strsep.c standard libkern/strspn.c standard libkern/strstr.c standard Copied: stable/9/sys/libkern/strnlen.c (from r226029, head/sys/libkern/strnlen.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/sys/libkern/strnlen.c Mon Oct 10 19:07:55 2011 (r226229, copy of r226029, head/sys/libkern/strnlen.c) @@ -0,0 +1,42 @@ +/*- + * Copyright (c) 2009 David Schultz + * 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 + +size_t +strnlen(const char *s, size_t maxlen) +{ + size_t len; + + for (len = 0; len < maxlen; len++, s++) { + if (!*s) + break; + } + return (len); +} Modified: stable/9/sys/sys/libkern.h ============================================================================== --- stable/9/sys/sys/libkern.h Mon Oct 10 18:26:23 2011 (r226228) +++ stable/9/sys/sys/libkern.h Mon Oct 10 19:07:55 2011 (r226229) @@ -116,6 +116,7 @@ size_t strlen(const char *); int strncasecmp(const char *, const char *, size_t); int strncmp(const char *, const char *, size_t); char *strncpy(char * __restrict, const char * __restrict, size_t); +size_t strnlen(const char *, size_t); char *strsep(char **, const char *delim); size_t strspn(const char *, const char *); char *strstr(const char *, const char *); From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 19:40:02 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id 0B782106566C; Mon, 10 Oct 2011 19:40:02 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from 172-17-198-245.globalsuite.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id AF1FB1508E4; Mon, 10 Oct 2011 19:40:00 +0000 (UTC) Message-ID: <4E934A10.1010709@FreeBSD.org> Date: Mon, 10 Oct 2011 12:40:00 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:7.0.1) Gecko/20111001 Thunderbird/7.0.1 MIME-Version: 1.0 To: Xin LI References: <201110100637.p9A6bWW4046199@svn.freebsd.org> In-Reply-To: <201110100637.p9A6bWW4046199@svn.freebsd.org> X-Enigmail-Version: undefined OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r226184 - head/usr.bin/gzip X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2011 19:40:02 -0000 On 10/09/2011 23:37, Xin LI wrote: > Log: > Incorporate recent changes from NetBSD. Most notable change is the addition > of support of decompressing xz files. Why? Don't we already have xz in the base? -- Nothin' ever doesn't change, but nothin' changes much. -- OK Go Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 19:41:00 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 826A41065674; Mon, 10 Oct 2011 19:41:00 +0000 (UTC) (envelope-from qingli@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5846F8FC13; Mon, 10 Oct 2011 19:41:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9AJf0Ar078751; Mon, 10 Oct 2011 19:41:00 GMT (envelope-from qingli@svn.freebsd.org) Received: (from qingli@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9AJf0Zv078749; Mon, 10 Oct 2011 19:41:00 GMT (envelope-from qingli@svn.freebsd.org) Message-Id: <201110101941.p9AJf0Zv078749@svn.freebsd.org> From: Qing Li Date: Mon, 10 Oct 2011 19:41:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226230 - stable/8/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2011 19:41:00 -0000 Author: qingli Date: Mon Oct 10 19:41:00 2011 New Revision: 226230 URL: http://svn.freebsd.org/changeset/base/226230 Log: MFC 225946 This patch allows ARP to work properly in the presence of self-referencing routes. This patch is a rework of r223862. Reviewed by: bz, zec Modified: stable/8/sys/netinet/in.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/netinet/in.c ============================================================================== --- stable/8/sys/netinet/in.c Mon Oct 10 19:07:55 2011 (r226229) +++ stable/8/sys/netinet/in.c Mon Oct 10 19:41:00 2011 (r226230) @@ -1393,6 +1393,8 @@ static int in_lltable_rtcheck(struct ifnet *ifp, u_int flags, const struct sockaddr *l3addr) { struct rtentry *rt; + struct ifnet *xifp; + int error = 0; KASSERT(l3addr->sa_family == AF_INET, ("sin_family %d", l3addr->sa_family)); @@ -1400,30 +1402,35 @@ in_lltable_rtcheck(struct ifnet *ifp, u_ /* XXX rtalloc1 should take a const param */ rt = rtalloc1(__DECONST(struct sockaddr *, l3addr), 0, 0); + if (rt == NULL) + return (EINVAL); + /* * If the gateway for an existing host route matches the target L3 - * address, allow for ARP to proceed. + * address, which is a special route inserted by some implementation + * such as MANET, and the interface is of the correct type, then + * allow for ARP to proceed. */ - if (rt != NULL && (rt->rt_flags & (RTF_HOST|RTF_GATEWAY)) && - rt->rt_gateway->sa_family == AF_INET && - memcmp(rt->rt_gateway->sa_data, l3addr->sa_data, 4) == 0) { - RTFREE_LOCKED(rt); - return (0); - } - - if (rt == NULL || (!(flags & LLE_PUB) && - ((rt->rt_flags & RTF_GATEWAY) || - (rt->rt_ifp != ifp)))) { + if (rt->rt_flags & (RTF_GATEWAY | RTF_HOST)) { + xifp = rt->rt_ifp; + + if (xifp && (xifp->if_type != IFT_ETHER || + (xifp->if_flags & (IFF_NOARP | IFF_STATICARP)) != 0)) + error = EINVAL; + + if (memcmp(rt->rt_gateway->sa_data, l3addr->sa_data, + sizeof(in_addr_t)) != 0) + error = EINVAL; + } else if (!(flags & LLE_PUB) && ((rt->rt_flags & RTF_GATEWAY) || + (rt->rt_ifp != ifp))) { #ifdef DIAGNOSTIC log(LOG_INFO, "IPv4 address: \"%s\" is not on the network\n", inet_ntoa(((const struct sockaddr_in *)l3addr)->sin_addr)); #endif - if (rt != NULL) - RTFREE_LOCKED(rt); - return (EINVAL); + error = EINVAL; } RTFREE_LOCKED(rt); - return 0; + return (error); } /* From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 19:54:50 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CE502106564A; Mon, 10 Oct 2011 19:54:50 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BCC808FC16; Mon, 10 Oct 2011 19:54:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9AJsoYF079513; Mon, 10 Oct 2011 19:54:50 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9AJsoWw079511; Mon, 10 Oct 2011 19:54:50 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201110101954.p9AJsoWw079511@svn.freebsd.org> From: Jung-uk Kim Date: Mon, 10 Oct 2011 19:54:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226231 - stable/9/sys/compat/linux X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2011 19:54:51 -0000 Author: jkim Date: Mon Oct 10 19:54:50 2011 New Revision: 226231 URL: http://svn.freebsd.org/changeset/base/226231 Log: MFC: r226068, r226069, r226071, r226072, r226073, r226074, r226078, r226079 - Unroll inlined strnlen(9) and make it easier to read. - Inline do_sa_get() function and remove an unused return value. - Retern more appropriate errno when Linux path name is too long. - Restore the original socket address length if it was not really AF_INET6. - Make sure to ignore the leading NULL byte from Linux abstract namespace. - Use uint32_t instead of u_int32_t. Fix style(9) nits. - Remove a now-defunct variable. - Use the caculated length instead of maximum length. Approved by: re (kib) Modified: stable/9/sys/compat/linux/linux_socket.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/compat/linux/linux_socket.c ============================================================================== --- stable/9/sys/compat/linux/linux_socket.c Mon Oct 10 19:41:00 2011 (r226230) +++ stable/9/sys/compat/linux/linux_socket.c Mon Oct 10 19:54:50 2011 (r226231) @@ -72,44 +72,29 @@ __FBSDID("$FreeBSD$"); #include #include -static int do_sa_get(struct sockaddr **, const struct osockaddr *, int *, - struct malloc_type *); static int linux_to_bsd_domain(int); /* * Reads a linux sockaddr and does any necessary translation. * Linux sockaddrs don't have a length field, only a family. - */ -static int -linux_getsockaddr(struct sockaddr **sap, const struct osockaddr *osa, int len) -{ - int osalen = len; - - return (do_sa_get(sap, osa, &osalen, M_SONAME)); -} - -/* * Copy the osockaddr structure pointed to by osa to kernel, adjust * family and convert to sockaddr. */ static int -do_sa_get(struct sockaddr **sap, const struct osockaddr *osa, int *osalen, - struct malloc_type *mtype) +linux_getsockaddr(struct sockaddr **sap, const struct osockaddr *osa, int salen) { - int error=0, bdom; struct sockaddr *sa; struct osockaddr *kosa; - int alloclen; #ifdef INET6 - int oldv6size; struct sockaddr_in6 *sin6; + int oldv6size; #endif - int namelen; + char *name; + int bdom, error, hdrlen, namelen; - if (*osalen < 2 || *osalen > UCHAR_MAX || !osa) + if (salen < 2 || salen > UCHAR_MAX || !osa) return (EINVAL); - alloclen = *osalen; #ifdef INET6 oldv6size = 0; /* @@ -117,15 +102,15 @@ do_sa_get(struct sockaddr **sap, const s * if it's a v4-mapped address, so reserve the proper space * for it. */ - if (alloclen == sizeof (struct sockaddr_in6) - sizeof (u_int32_t)) { - alloclen = sizeof (struct sockaddr_in6); + if (salen == sizeof(struct sockaddr_in6) - sizeof(uint32_t)) { + salen += sizeof(uint32_t); oldv6size = 1; } #endif - kosa = malloc(alloclen, mtype, M_WAITOK); + kosa = malloc(salen, M_SONAME, M_WAITOK); - if ((error = copyin(osa, kosa, *osalen))) + if ((error = copyin(osa, kosa, salen))) goto out; bdom = linux_to_bsd_domain(kosa->sa_family); @@ -142,55 +127,61 @@ do_sa_get(struct sockaddr **sap, const s * * Still accept addresses for which the scope id is not used. */ - if (oldv6size && bdom == AF_INET6) { - sin6 = (struct sockaddr_in6 *)kosa; - if (IN6_IS_ADDR_V4MAPPED(&sin6->sin6_addr) || - (!IN6_IS_ADDR_LINKLOCAL(&sin6->sin6_addr) && - !IN6_IS_ADDR_SITELOCAL(&sin6->sin6_addr) && - !IN6_IS_ADDR_V4COMPAT(&sin6->sin6_addr) && - !IN6_IS_ADDR_UNSPECIFIED(&sin6->sin6_addr) && - !IN6_IS_ADDR_MULTICAST(&sin6->sin6_addr))) { - sin6->sin6_scope_id = 0; - } else { - log(LOG_DEBUG, - "obsolete pre-RFC2553 sockaddr_in6 rejected\n"); - error = EINVAL; - goto out; - } - } else + if (oldv6size) { + if (bdom == AF_INET6) { + sin6 = (struct sockaddr_in6 *)kosa; + if (IN6_IS_ADDR_V4MAPPED(&sin6->sin6_addr) || + (!IN6_IS_ADDR_LINKLOCAL(&sin6->sin6_addr) && + !IN6_IS_ADDR_SITELOCAL(&sin6->sin6_addr) && + !IN6_IS_ADDR_V4COMPAT(&sin6->sin6_addr) && + !IN6_IS_ADDR_UNSPECIFIED(&sin6->sin6_addr) && + !IN6_IS_ADDR_MULTICAST(&sin6->sin6_addr))) { + sin6->sin6_scope_id = 0; + } else { + log(LOG_DEBUG, + "obsolete pre-RFC2553 sockaddr_in6 rejected\n"); + error = EINVAL; + goto out; + } + } else + salen -= sizeof(uint32_t); + } #endif if (bdom == AF_INET) { - alloclen = sizeof(struct sockaddr_in); - if (*osalen < alloclen) { + if (salen < sizeof(struct sockaddr_in)) { error = EINVAL; goto out; } + salen = sizeof(struct sockaddr_in); } - if ((bdom == AF_LOCAL) && (*osalen > sizeof(struct sockaddr_un))) { - for (namelen = 0; - namelen < *osalen - offsetof(struct sockaddr_un, sun_path); - namelen++) - if (!((struct sockaddr_un *)kosa)->sun_path[namelen]) - break; - if (namelen + offsetof(struct sockaddr_un, sun_path) > - sizeof(struct sockaddr_un)) { - error = EINVAL; + if (bdom == AF_LOCAL && salen > sizeof(struct sockaddr_un)) { + hdrlen = offsetof(struct sockaddr_un, sun_path); + name = ((struct sockaddr_un *)kosa)->sun_path; + if (*name == '\0') { + /* + * Linux abstract namespace starts with a NULL byte. + * XXX We do not support abstract namespace yet. + */ + namelen = strnlen(name + 1, salen - hdrlen - 1) + 1; + } else + namelen = strnlen(name, salen - hdrlen); + salen = hdrlen + namelen; + if (salen > sizeof(struct sockaddr_un)) { + error = ENAMETOOLONG; goto out; } - alloclen = sizeof(struct sockaddr_un); } - sa = (struct sockaddr *) kosa; + sa = (struct sockaddr *)kosa; sa->sa_family = bdom; - sa->sa_len = alloclen; + sa->sa_len = salen; *sap = sa; - *osalen = alloclen; return (0); out: - free(kosa, mtype); + free(kosa, M_SONAME); return (error); } @@ -1239,9 +1230,9 @@ linux_sendmsg(struct thread *td, struct cmsg->cmsg_len = CMSG_LEN(datalen); error = ENOBUFS; - if (!m_append(control, CMSG_HDRSZ, (c_caddr_t) cmsg)) + if (!m_append(control, CMSG_HDRSZ, (c_caddr_t)cmsg)) goto bad; - if (!m_append(control, datalen, (c_caddr_t) data)) + if (!m_append(control, datalen, (c_caddr_t)data)) goto bad; } while ((ptr_cmsg = LINUX_CMSG_NXTHDR(&linux_msg, ptr_cmsg))); @@ -1380,7 +1371,7 @@ linux_recvmsg(struct thread *td, struct * effect for Linux so no need to worry * about sockcred */ - if (datalen != sizeof (*cmcred)) { + if (datalen != sizeof(*cmcred)) { error = EMSGSIZE; goto bad; } From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 20:11:43 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id 136091065673; Mon, 10 Oct 2011 20:11:43 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from 172-17-198-245.globalsuite.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 00FD114E420; Mon, 10 Oct 2011 20:10:37 +0000 (UTC) Message-ID: <4E93513D.6020707@FreeBSD.org> Date: Mon, 10 Oct 2011 13:10:37 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:7.0.1) Gecko/20111001 Thunderbird/7.0.1 MIME-Version: 1.0 To: Xin LI References: <201110100637.p9A6bWW4046199@svn.freebsd.org> <4E934A10.1010709@FreeBSD.org> In-Reply-To: X-Enigmail-Version: undefined OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Xin LI Subject: Re: svn commit: r226184 - head/usr.bin/gzip X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2011 20:11:43 -0000 On 10/10/2011 13:05, Xin LI wrote: > On Mon, Oct 10, 2011 at 12:40 PM, Doug Barton wrote: >> On 10/09/2011 23:37, Xin LI wrote: >>> Log: >>> Incorporate recent changes from NetBSD. Most notable change is the addition >>> of support of decompressing xz files. >> >> Why? Don't we already have xz in the base? > > zless and friends rely on gunzip. I'm sorry, I don't understand that answer. -- Nothin' ever doesn't change, but nothin' changes much. -- OK Go Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 20:15:04 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5402B1065673; Mon, 10 Oct 2011 20:15:04 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.64.117]) by mx1.freebsd.org (Postfix) with ESMTP id CCB268FC0C; Mon, 10 Oct 2011 20:15:03 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.4/8.14.4) with ESMTP id p9AKF2hB060110; Tue, 11 Oct 2011 00:15:02 +0400 (MSD) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.4/8.14.4/Submit) id p9AKF2PY060109; Tue, 11 Oct 2011 00:15:02 +0400 (MSD) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Tue, 11 Oct 2011 00:15:02 +0400 From: Gleb Smirnoff To: Qing Li Message-ID: <20111010201502.GD94905@FreeBSD.org> References: <201110101741.p9AHfB6E073485@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <201110101741.p9AHfB6E073485@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r226224 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2011 20:15:04 -0000 Qing, On Mon, Oct 10, 2011 at 05:41:11PM +0000, Qing Li wrote: Q> Author: qingli Q> Date: Mon Oct 10 17:41:11 2011 Q> New Revision: 226224 Q> URL: http://svn.freebsd.org/changeset/base/226224 Q> Q> Log: Q> All indirect routes will fail the rtcheck, except for a special host Q> route where the destination IP and the gateway IP is the same. This Q> special case handling is only meant for backward compatibility reason. Q> The last commit introduced a bug in the route check logic, where a Q> valid special case is treated as an error. This patch fixes that bug Q> along with some code cleanup. Q> Q> Suggested by: gleb Q> Reviewed by: kmacy, discussed with gleb Q> MFC after: 1 day Looks like you have committed a slightly different patch to stable/8 in r226230. Is that okay? Also, you haven't awaited even one day, while our policy suggests at least 3 days before MFC, and 3 days is actually a delay for critical fixes. P.S. Now I am not the only Gleb at FreeBSD.org community. Recently Gleb Kurtsou joined us, and his login name is exactly "gleb", while mine is "glebius". So, your commit may be confusing to later reviewers of VCS history. -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 20:18:34 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A743D106566B; Mon, 10 Oct 2011 20:18:34 +0000 (UTC) (envelope-from delphij@gmail.com) Received: from mail-yx0-f182.google.com (mail-yx0-f182.google.com [209.85.213.182]) by mx1.freebsd.org (Postfix) with ESMTP id 1DB008FC08; Mon, 10 Oct 2011 20:18:33 +0000 (UTC) Received: by yxk36 with SMTP id 36so7240841yxk.13 for ; Mon, 10 Oct 2011 13:18:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=oQAnajuO5acnLt5dyMT0O2YUJ0WuqiOlIvnh4y9UhwU=; b=MtpxyI17x/VK8kfPPoVZ4uPaggAQAWwDj2929qYJE8Kk4uMIzlFShALEkIRKjGj+8M uV/wbNw+dasQA8/f51XpA9Xo1wXSme77pIKvg329jYhFSsmKXlS2u/X/FhhoX/tgVQtH INxh5q3GhkOpy63nU2IU1whYdbBVNVPlZWkjc= MIME-Version: 1.0 Received: by 10.150.206.6 with SMTP id d6mr7927879ybg.60.1318277912169; Mon, 10 Oct 2011 13:18:32 -0700 (PDT) Received: by 10.151.145.18 with HTTP; Mon, 10 Oct 2011 13:18:32 -0700 (PDT) In-Reply-To: <4E93513D.6020707@FreeBSD.org> References: <201110100637.p9A6bWW4046199@svn.freebsd.org> <4E934A10.1010709@FreeBSD.org> <4E93513D.6020707@FreeBSD.org> Date: Mon, 10 Oct 2011 13:18:32 -0700 Message-ID: From: Xin LI To: Doug Barton Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Xin LI Subject: Re: svn commit: r226184 - head/usr.bin/gzip X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2011 20:18:34 -0000 On Mon, Oct 10, 2011 at 1:10 PM, Doug Barton wrote: > On 10/10/2011 13:05, Xin LI wrote: >> On Mon, Oct 10, 2011 at 12:40 PM, Doug Barton wrote: >>> On 10/09/2011 23:37, Xin LI wrote: >>>> Log: >>>> =C2=A0 Incorporate recent changes from NetBSD. =C2=A0Most notable chan= ge is the addition >>>> =C2=A0 of support of decompressing xz files. >>> >>> Why? Don't we already have xz in the base? >> >> zless and friends rely on gunzip. > > I'm sorry, I don't understand that answer. Oh sorry, I meant zcat, zdiff, etc. zless already supported xz format. Cheers, --=20 Xin LI https://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 20:28:00 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 61B841065670; Mon, 10 Oct 2011 20:28:00 +0000 (UTC) (envelope-from tomelite82@gmail.com) Received: from mail-yx0-f182.google.com (mail-yx0-f182.google.com [209.85.213.182]) by mx1.freebsd.org (Postfix) with ESMTP id DA0048FC13; Mon, 10 Oct 2011 20:27:59 +0000 (UTC) Received: by yxk36 with SMTP id 36so7250227yxk.13 for ; Mon, 10 Oct 2011 13:27:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=u/aenNhuDUlKoYo7xu8uo7wc5UzvYqyZwDiDNOmnRVI=; b=DiQJ964xBIYCEki4xY9cyvAgwWkSr/Up/oONszg8CTZsTalccCy3P3icOcNHaZQboC /kcy7mrTavaG0KLlrFmzffeozc5cR18s25qRmaThBUtvCK2ptqompbuGA4JT4vm7wjc8 RWJrjzUNjuYtDzYPljOuXz3AGb9DDly5qmwGY= MIME-Version: 1.0 Received: by 10.150.160.15 with SMTP id i15mr2915185ybe.22.1318278479204; Mon, 10 Oct 2011 13:27:59 -0700 (PDT) Sender: tomelite82@gmail.com Received: by 10.151.78.21 with HTTP; Mon, 10 Oct 2011 13:27:59 -0700 (PDT) In-Reply-To: <20111010201502.GD94905@FreeBSD.org> References: <201110101741.p9AHfB6E073485@svn.freebsd.org> <20111010201502.GD94905@FreeBSD.org> Date: Mon, 10 Oct 2011 13:27:59 -0700 X-Google-Sender-Auth: Lyip9TAAB69ayxrOQ_1kATOUFlc Message-ID: From: Qing Li To: Gleb Smirnoff Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r226224 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2011 20:28:00 -0000 MFC 225946 is the original patch, 225947 messed up the logic a bit while putting in the fix for another issue. 226224 is the fix to 225947, which I will MFC tomorrow. --Qing 2011/10/10 Gleb Smirnoff : > =A0Qing, > > On Mon, Oct 10, 2011 at 05:41:11PM +0000, Qing Li wrote: > Q> Author: qingli > Q> Date: Mon Oct 10 17:41:11 2011 > Q> New Revision: 226224 > Q> URL: http://svn.freebsd.org/changeset/base/226224 > Q> > Q> Log: > Q> =A0 All indirect routes will fail the rtcheck, except for a special ho= st > Q> =A0 route where the destination IP and the gateway IP is the same. Thi= s > Q> =A0 special case handling is only meant for backward compatibility rea= son. > Q> =A0 The last commit introduced a bug in the route check logic, where a > Q> =A0 valid special case is treated as an error. This patch fixes that b= ug > Q> =A0 along with some code cleanup. > Q> > Q> =A0 Suggested by: =A0 =A0 =A0gleb > Q> =A0 Reviewed by: =A0 =A0 =A0 kmacy, discussed with gleb > Q> =A0 MFC after: 1 day > > =A0Looks like you have committed a slightly different patch to stable/8 > in r226230. Is that okay? > > =A0Also, you haven't awaited even one day, while our policy suggests at > least 3 days before MFC, and 3 days is actually a delay for critical > fixes. > > P.S. Now I am not the only Gleb at FreeBSD.org community. Recently > Gleb Kurtsou joined us, and his login name is exactly "gleb", while > mine is "glebius". So, your commit may be confusing to later > reviewers of VCS history. > > -- > Totus tuus, Glebius. > From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 20:36:20 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EEEBC1065675; Mon, 10 Oct 2011 20:36:20 +0000 (UTC) (envelope-from delphij@gmail.com) Received: from mail-yx0-f182.google.com (mail-yx0-f182.google.com [209.85.213.182]) by mx1.freebsd.org (Postfix) with ESMTP id 8C00B8FC1C; Mon, 10 Oct 2011 20:36:20 +0000 (UTC) Received: by yxk36 with SMTP id 36so7258386yxk.13 for ; Mon, 10 Oct 2011 13:36:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=l/Scqcn9P0iZL6j7F1dklzGnM9LfldilUaN1dSBxFgM=; b=ZYaDj3RX7771U0OaLzqEag7k4YO5KdY2dDHw2xwMuZ1E1TO+2KBkrlLWHLVwM2v7wr 123Le1ao8/nRPeDMyCqaOxtUZK3nLdF+JG/5KMcQ+JgLzN75P+taghccOgWKQm82Kh4m 9erJTfSbH8jb2ZKB2cvC3nXKpDUZJOAtw4VEA= MIME-Version: 1.0 Received: by 10.150.209.6 with SMTP id h6mr7803860ybg.30.1318277112215; Mon, 10 Oct 2011 13:05:12 -0700 (PDT) Received: by 10.151.145.18 with HTTP; Mon, 10 Oct 2011 13:05:12 -0700 (PDT) In-Reply-To: <4E934A10.1010709@FreeBSD.org> References: <201110100637.p9A6bWW4046199@svn.freebsd.org> <4E934A10.1010709@FreeBSD.org> Date: Mon, 10 Oct 2011 13:05:12 -0700 Message-ID: From: Xin LI To: Doug Barton Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Xin LI Subject: Re: svn commit: r226184 - head/usr.bin/gzip X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2011 20:36:21 -0000 On Mon, Oct 10, 2011 at 12:40 PM, Doug Barton wrote: > On 10/09/2011 23:37, Xin LI wrote: >> Log: >> =C2=A0 Incorporate recent changes from NetBSD. =C2=A0Most notable change= is the addition >> =C2=A0 of support of decompressing xz files. > > Why? Don't we already have xz in the base? zless and friends rely on gunzip. Cheers, --=20 Xin LI https://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 20:54:21 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 371C7106566B; Mon, 10 Oct 2011 20:54:21 +0000 (UTC) (envelope-from qingli@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0D2F98FC08; Mon, 10 Oct 2011 20:54:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9AKsKoa082188; Mon, 10 Oct 2011 20:54:20 GMT (envelope-from qingli@svn.freebsd.org) Received: (from qingli@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9AKsKbY082186; Mon, 10 Oct 2011 20:54:20 GMT (envelope-from qingli@svn.freebsd.org) Message-Id: <201110102054.p9AKsKbY082186@svn.freebsd.org> From: Qing Li Date: Mon, 10 Oct 2011 20:54:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226232 - stable/8/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2011 20:54:21 -0000 Author: qingli Date: Mon Oct 10 20:54:20 2011 New Revision: 226232 URL: http://svn.freebsd.org/changeset/base/226232 Log: MFC 225947 A system may have multiple physical interfaces, all of which are on the same prefix. Since a single route entry is installed for the prefix (without RADIX_MPATH), incoming packets on the interfaces that are not associated with the prefix route may trigger an error message about unable to allocation LLE entry, and fails L2. This patch makes sure a valid route is present in the system, and allow the aforementioned condition to exist and treats as valid. Reviewed by: bz Modified: stable/8/sys/netinet/in.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/netinet/in.c ============================================================================== --- stable/8/sys/netinet/in.c Mon Oct 10 19:54:50 2011 (r226231) +++ stable/8/sys/netinet/in.c Mon Oct 10 20:54:20 2011 (r226232) @@ -1421,14 +1421,43 @@ in_lltable_rtcheck(struct ifnet *ifp, u_ if (memcmp(rt->rt_gateway->sa_data, l3addr->sa_data, sizeof(in_addr_t)) != 0) error = EINVAL; - } else if (!(flags & LLE_PUB) && ((rt->rt_flags & RTF_GATEWAY) || - (rt->rt_ifp != ifp))) { + } + + if (rt->rt_flags & RTF_GATEWAY) { + RTFREE_LOCKED(rt); + return (EINVAL); + } + + /* + * Make sure that at least the destination address is covered + * by the route. This is for handling the case where 2 or more + * interfaces have the same prefix. An incoming packet arrives + * on one interface and the corresponding outgoing packet leaves + * another interface. + * + */ + if (rt->rt_ifp != ifp) { + char *sa, *mask, *addr, *lim; + int len; + + sa = (char *)rt_key(rt); + mask = (char *)rt_mask(rt); + addr = (char *)__DECONST(struct sockaddr *, l3addr); + len = ((struct sockaddr_in *)__DECONST(struct sockaddr *, l3addr))->sin_len; + lim = addr + len; + + for ( ; addr < lim; sa++, mask++, addr++) { + if ((*sa ^ *addr) & *mask) { + error = EINVAL; #ifdef DIAGNOSTIC - log(LOG_INFO, "IPv4 address: \"%s\" is not on the network\n", - inet_ntoa(((const struct sockaddr_in *)l3addr)->sin_addr)); + log(LOG_INFO, "IPv4 address: \"%s\" is not on the network\n", + inet_ntoa(((const struct sockaddr_in *)l3addr)->sin_addr)); #endif - error = EINVAL; + break; + } + } } + RTFREE_LOCKED(rt); return (error); } From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 21:32:09 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3A39E106564A; Mon, 10 Oct 2011 21:32:09 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2A93F8FC19; Mon, 10 Oct 2011 21:32:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9ALW9ie083427; Mon, 10 Oct 2011 21:32:09 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9ALW97w083425; Mon, 10 Oct 2011 21:32:09 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201110102132.p9ALW97w083425@svn.freebsd.org> From: Edward Tomasz Napierala Date: Mon, 10 Oct 2011 21:32:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226234 - head/sys/fs/unionfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2011 21:32:09 -0000 Author: trasz Date: Mon Oct 10 21:32:08 2011 New Revision: 226234 URL: http://svn.freebsd.org/changeset/base/226234 Log: Make unionfs also clear VAPPEND when clearing VWRITE, since VAPPEND is just a modifier for VWRITE. Submitted by: rmacklem Modified: head/sys/fs/unionfs/union_vnops.c Modified: head/sys/fs/unionfs/union_vnops.c ============================================================================== --- head/sys/fs/unionfs/union_vnops.c Mon Oct 10 20:57:54 2011 (r226233) +++ head/sys/fs/unionfs/union_vnops.c Mon Oct 10 21:32:08 2011 (r226234) @@ -748,7 +748,7 @@ unionfs_access(struct vop_access_args *a return (error); } } - accmode &= ~VWRITE; + accmode &= ~(VWRITE | VAPPEND); accmode |= VREAD; /* will copy to upper */ } error = VOP_ACCESS(lvp, accmode, ap->a_cred, td); From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 21:34:56 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 09CBA106564A; Mon, 10 Oct 2011 21:34:56 +0000 (UTC) (envelope-from qingli@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EC37D8FC17; Mon, 10 Oct 2011 21:34:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9ALYt9g083557; Mon, 10 Oct 2011 21:34:55 GMT (envelope-from qingli@svn.freebsd.org) Received: (from qingli@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9ALYtie083550; Mon, 10 Oct 2011 21:34:55 GMT (envelope-from qingli@svn.freebsd.org) Message-Id: <201110102134.p9ALYtie083550@svn.freebsd.org> From: Qing Li Date: Mon, 10 Oct 2011 21:34:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226235 - in stable/8/sys: net netinet netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2011 21:34:56 -0000 Author: qingli Date: Mon Oct 10 21:34:55 2011 New Revision: 226235 URL: http://svn.freebsd.org/changeset/base/226235 Log: MFC 222143 The statically configured (permanent) ARP entries are removed when an interface is brought down, even though the interface address is still valid. This patch maintains the permanent ARP entries as long as the interface address (having the same prefix as that of the ARP entries) is valid. Reviewed by: delphij Modified: stable/8/sys/net/if_llatbl.c stable/8/sys/net/if_llatbl.h stable/8/sys/netinet/in.c stable/8/sys/netinet/in_var.h stable/8/sys/netinet/raw_ip.c stable/8/sys/netinet6/in6.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/net/if_llatbl.c ============================================================================== --- stable/8/sys/net/if_llatbl.c Mon Oct 10 21:32:08 2011 (r226234) +++ stable/8/sys/net/if_llatbl.c Mon Oct 10 21:34:55 2011 (r226235) @@ -228,7 +228,8 @@ lltable_drain(int af) #endif void -lltable_prefix_free(int af, struct sockaddr *prefix, struct sockaddr *mask) +lltable_prefix_free(int af, struct sockaddr *prefix, struct sockaddr *mask, + u_int flags) { struct lltable *llt; @@ -237,7 +238,7 @@ lltable_prefix_free(int af, struct socka if (llt->llt_af != af) continue; - llt->llt_prefix_free(llt, prefix, mask); + llt->llt_prefix_free(llt, prefix, mask, flags); } LLTABLE_RUNLOCK(); } Modified: stable/8/sys/net/if_llatbl.h ============================================================================== --- stable/8/sys/net/if_llatbl.h Mon Oct 10 21:32:08 2011 (r226234) +++ stable/8/sys/net/if_llatbl.h Mon Oct 10 21:34:55 2011 (r226235) @@ -149,7 +149,8 @@ struct lltable { void (*llt_free)(struct lltable *, struct llentry *); void (*llt_prefix_free)(struct lltable *, const struct sockaddr *prefix, - const struct sockaddr *mask); + const struct sockaddr *mask, + u_int flags); struct llentry * (*llt_lookup)(struct lltable *, u_int flags, const struct sockaddr *l3addr); int (*llt_dump)(struct lltable *, @@ -176,7 +177,7 @@ MALLOC_DECLARE(M_LLTABLE); struct lltable *lltable_init(struct ifnet *, int); void lltable_free(struct lltable *); void lltable_prefix_free(int, struct sockaddr *, - struct sockaddr *); + struct sockaddr *, u_int); #if 0 void lltable_drain(int); #endif Modified: stable/8/sys/netinet/in.c ============================================================================== --- stable/8/sys/netinet/in.c Mon Oct 10 21:32:08 2011 (r226234) +++ stable/8/sys/netinet/in.c Mon Oct 10 21:34:55 2011 (r226235) @@ -70,7 +70,7 @@ static int in_lifaddr_ioctl(struct socke struct ifnet *, struct thread *); static int in_addprefix(struct in_ifaddr *, int); -static int in_scrubprefix(struct in_ifaddr *); +static int in_scrubprefix(struct in_ifaddr *, u_int); static void in_socktrim(struct sockaddr_in *); static int in_ifinit(struct ifnet *, struct in_ifaddr *, struct sockaddr_in *, int); @@ -548,7 +548,7 @@ in_control(struct socket *so, u_long cmd * is the same as before, then the call is * un-necessarily executed here. */ - in_ifscrub(ifp, ia); + in_ifscrub(ifp, ia, 0); ia->ia_sockmask = ifra->ifra_mask; ia->ia_sockmask.sin_family = AF_INET; ia->ia_subnetmask = @@ -557,7 +557,7 @@ in_control(struct socket *so, u_long cmd } if ((ifp->if_flags & IFF_POINTOPOINT) && (ifra->ifra_dstaddr.sin_family == AF_INET)) { - in_ifscrub(ifp, ia); + in_ifscrub(ifp, ia, 0); ia->ia_dstaddr = ifra->ifra_dstaddr; maskIsNew = 1; /* We lie; but the effect's the same */ } @@ -585,7 +585,7 @@ in_control(struct socket *so, u_long cmd /* * in_ifscrub kills the interface route. */ - in_ifscrub(ifp, ia); + in_ifscrub(ifp, ia, LLE_STATIC); /* * in_ifadown gets rid of all the rest of @@ -829,10 +829,10 @@ in_lifaddr_ioctl(struct socket *so, u_lo * Delete any existing route for an interface. */ void -in_ifscrub(struct ifnet *ifp, struct in_ifaddr *ia) +in_ifscrub(struct ifnet *ifp, struct in_ifaddr *ia, u_int flags) { - in_scrubprefix(ia); + in_scrubprefix(ia, flags); } /* @@ -887,7 +887,7 @@ in_ifinit(struct ifnet *ifp, struct in_i splx(s); if (scrub) { ia->ia_ifa.ifa_addr = (struct sockaddr *)&oldaddr; - in_ifscrub(ifp, ia); + in_ifscrub(ifp, ia, LLE_STATIC); ia->ia_ifa.ifa_addr = (struct sockaddr *)&ia->ia_addr; } if (IN_CLASSA(i)) @@ -1095,7 +1095,7 @@ extern void arp_ifscrub(struct ifnet *if * otherwise. */ static int -in_scrubprefix(struct in_ifaddr *target) +in_scrubprefix(struct in_ifaddr *target, u_int flags) { struct in_ifaddr *ia; struct in_addr prefix, mask, p; @@ -1130,13 +1130,15 @@ in_scrubprefix(struct in_ifaddr *target) RT_REMREF(ia_ro.ro_rt); RTFREE_LOCKED(ia_ro.ro_rt); } - if (freeit) + if (freeit && (flags & LLE_STATIC)) { error = ifa_del_loopback_route((struct ifaddr *)target, (struct sockaddr *)&target->ia_addr); - if (error == 0) - target->ia_flags &= ~IFA_RTSELF; - /* remove arp cache */ - arp_ifscrub(target->ia_ifp, IA_SIN(target)->sin_addr.s_addr); + if (error == 0) + target->ia_flags &= ~IFA_RTSELF; + } + if (flags & LLE_STATIC) + /* remove arp cache */ + arp_ifscrub(target->ia_ifp, IA_SIN(target)->sin_addr.s_addr); } if (rtinitflags(target)) @@ -1203,7 +1205,7 @@ in_scrubprefix(struct in_ifaddr *target) mask0.sin_family = AF_INET; mask0.sin_addr.s_addr = target->ia_subnetmask; lltable_prefix_free(AF_INET, (struct sockaddr *)&prefix0, - (struct sockaddr *)&mask0); + (struct sockaddr *)&mask0, flags); /* * As no-one seem to have this prefix, we can remove the route. @@ -1362,7 +1364,8 @@ in_lltable_free(struct lltable *llt, str static void in_lltable_prefix_free(struct lltable *llt, const struct sockaddr *prefix, - const struct sockaddr *mask) + const struct sockaddr *mask, + u_int flags) { const struct sockaddr_in *pfx = (const struct sockaddr_in *)prefix; const struct sockaddr_in *msk = (const struct sockaddr_in *)mask; @@ -1373,8 +1376,13 @@ in_lltable_prefix_free(struct lltable *l for (i=0; i < LLTBL_HASHTBL_SIZE; i++) { LIST_FOREACH_SAFE(lle, &llt->lle_head[i], lle_next, next) { + /* + * (flags & LLE_STATIC) means deleting all entries + * including static ARP entries + */ if (IN_ARE_MASKED_ADDR_EQUAL((struct sockaddr_in *)L3_ADDR(lle), - pfx, msk)) { + pfx, msk) && + ((flags & LLE_STATIC) || !(lle->la_flags & LLE_STATIC))) { int canceled; canceled = callout_drain(&lle->la_timer); Modified: stable/8/sys/netinet/in_var.h ============================================================================== --- stable/8/sys/netinet/in_var.h Mon Oct 10 21:32:08 2011 (r226234) +++ stable/8/sys/netinet/in_var.h Mon Oct 10 21:34:55 2011 (r226235) @@ -447,7 +447,7 @@ int in_control(struct socket *, u_long, void in_rtqdrain(void); void ip_input(struct mbuf *); int in_ifadown(struct ifaddr *ifa, int); -void in_ifscrub(struct ifnet *, struct in_ifaddr *); +void in_ifscrub(struct ifnet *, struct in_ifaddr *, u_int); struct mbuf *ip_fastforward(struct mbuf *); void *in_domifattach(struct ifnet *); void in_domifdetach(struct ifnet *, void *); Modified: stable/8/sys/netinet/raw_ip.c ============================================================================== --- stable/8/sys/netinet/raw_ip.c Mon Oct 10 21:32:08 2011 (r226234) +++ stable/8/sys/netinet/raw_ip.c Mon Oct 10 21:34:55 2011 (r226235) @@ -63,6 +63,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -716,7 +717,7 @@ rip_ctlinput(int cmd, struct sockaddr *s /* * in_ifscrub kills the interface route. */ - in_ifscrub(ia->ia_ifp, ia); + in_ifscrub(ia->ia_ifp, ia, 0); /* * in_ifadown gets rid of all the rest of the * routes. This is not quite the right thing @@ -751,12 +752,18 @@ rip_ctlinput(int cmd, struct sockaddr *s || (ifp->if_flags & IFF_POINTOPOINT)) flags |= RTF_HOST; + err = ifa_del_loopback_route((struct ifaddr *)ia, sa); + if (err == 0) + ia->ia_flags &= ~IFA_RTSELF; + err = rtinit(&ia->ia_ifa, RTM_ADD, flags); if (err == 0) ia->ia_flags |= IFA_ROUTE; + err = ifa_add_loopback_route((struct ifaddr *)ia, sa); if (err == 0) ia->ia_flags |= IFA_RTSELF; + ifa_free(&ia->ia_ifa); break; } Modified: stable/8/sys/netinet6/in6.c ============================================================================== --- stable/8/sys/netinet6/in6.c Mon Oct 10 21:32:08 2011 (r226234) +++ stable/8/sys/netinet6/in6.c Mon Oct 10 21:34:55 2011 (r226235) @@ -2351,19 +2351,25 @@ in6_lltable_free(struct lltable *llt, st static void in6_lltable_prefix_free(struct lltable *llt, const struct sockaddr *prefix, - const struct sockaddr *mask) + const struct sockaddr *mask, + u_int flags) { const struct sockaddr_in6 *pfx = (const struct sockaddr_in6 *)prefix; const struct sockaddr_in6 *msk = (const struct sockaddr_in6 *)mask; struct llentry *lle, *next; register int i; + /* + * (flags & LLE_STATIC) means deleting all entries + * including static ND6 entries + */ for (i=0; i < LLTBL_HASHTBL_SIZE; i++) { LIST_FOREACH_SAFE(lle, &llt->lle_head[i], lle_next, next) { if (IN6_ARE_MASKED_ADDR_EQUAL( &((struct sockaddr_in6 *)L3_ADDR(lle))->sin6_addr, &pfx->sin6_addr, - &msk->sin6_addr)) { + &msk->sin6_addr) && + ((flags & LLE_STATIC) || !(lle->la_flags & LLE_STATIC))) { int canceled; canceled = callout_drain(&lle->la_timer); From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 21:38:19 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C35531065675; Mon, 10 Oct 2011 21:38:19 +0000 (UTC) (envelope-from qingli@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 99B258FC12; Mon, 10 Oct 2011 21:38:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9ALcJRL083705; Mon, 10 Oct 2011 21:38:19 GMT (envelope-from qingli@svn.freebsd.org) Received: (from qingli@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9ALcJmm083703; Mon, 10 Oct 2011 21:38:19 GMT (envelope-from qingli@svn.freebsd.org) Message-Id: <201110102138.p9ALcJmm083703@svn.freebsd.org> From: Qing Li Date: Mon, 10 Oct 2011 21:38:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226236 - stable/8/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2011 21:38:19 -0000 Author: qingli Date: Mon Oct 10 21:38:19 2011 New Revision: 226236 URL: http://svn.freebsd.org/changeset/base/226236 Log: MFC 222438 Supply the LLE_STATIC flag bit to in_ifscurb() when scrubbing interface address so that proper clean up will take place in the routing code. This patch fixes the bootp panic on startup problem. Also, added more error handling and logging code in function in_scrubprefix(). Modified: stable/8/sys/netinet/in.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/netinet/in.c ============================================================================== --- stable/8/sys/netinet/in.c Mon Oct 10 21:34:55 2011 (r226235) +++ stable/8/sys/netinet/in.c Mon Oct 10 21:38:19 2011 (r226236) @@ -548,7 +548,7 @@ in_control(struct socket *so, u_long cmd * is the same as before, then the call is * un-necessarily executed here. */ - in_ifscrub(ifp, ia, 0); + in_ifscrub(ifp, ia, LLE_STATIC); ia->ia_sockmask = ifra->ifra_mask; ia->ia_sockmask.sin_family = AF_INET; ia->ia_subnetmask = @@ -557,7 +557,7 @@ in_control(struct socket *so, u_long cmd } if ((ifp->if_flags & IFF_POINTOPOINT) && (ifra->ifra_dstaddr.sin_family == AF_INET)) { - in_ifscrub(ifp, ia, 0); + in_ifscrub(ifp, ia, LLE_STATIC); ia->ia_dstaddr = ifra->ifra_dstaddr; maskIsNew = 1; /* We lie; but the effect's the same */ } @@ -1179,14 +1179,20 @@ in_scrubprefix(struct in_ifaddr *target, && (ia->ia_ifp->if_type != IFT_CARP)) { ifa_ref(&ia->ia_ifa); IN_IFADDR_RUNLOCK(); - rtinit(&(target->ia_ifa), (int)RTM_DELETE, + error = rtinit(&(target->ia_ifa), (int)RTM_DELETE, rtinitflags(target)); - target->ia_flags &= ~IFA_ROUTE; - + if (error == 0) + target->ia_flags &= ~IFA_ROUTE; + else + log(LOG_INFO, "in_scrubprefix: err=%d, old prefix delete failed\n", + error); error = rtinit(&ia->ia_ifa, (int)RTM_ADD, rtinitflags(ia) | RTF_UP); if (error == 0) ia->ia_flags |= IFA_ROUTE; + else + log(LOG_INFO, "in_scrubprefix: err=%d, new prefix add failed\n", + error); ifa_free(&ia->ia_ifa); return (error); } @@ -1210,9 +1216,12 @@ in_scrubprefix(struct in_ifaddr *target, /* * As no-one seem to have this prefix, we can remove the route. */ - rtinit(&(target->ia_ifa), (int)RTM_DELETE, rtinitflags(target)); - target->ia_flags &= ~IFA_ROUTE; - return (0); + error = rtinit(&(target->ia_ifa), (int)RTM_DELETE, rtinitflags(target)); + if (error == 0) + target->ia_flags &= ~IFA_ROUTE; + else + log(LOG_INFO, "in_scrubprefix: err=%d, prefix delete failed\n", error); + return (error); } #undef rtinitflags From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 21:41:34 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6510D106564A; Mon, 10 Oct 2011 21:41:34 +0000 (UTC) (envelope-from qingli@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5521B8FC13; Mon, 10 Oct 2011 21:41:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9ALfY9Z083852; Mon, 10 Oct 2011 21:41:34 GMT (envelope-from qingli@svn.freebsd.org) Received: (from qingli@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9ALfY8Y083850; Mon, 10 Oct 2011 21:41:34 GMT (envelope-from qingli@svn.freebsd.org) Message-Id: <201110102141.p9ALfY8Y083850@svn.freebsd.org> From: Qing Li Date: Mon, 10 Oct 2011 21:41:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226237 - stable/8/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2011 21:41:34 -0000 Author: qingli Date: Mon Oct 10 21:41:34 2011 New Revision: 226237 URL: http://svn.freebsd.org/changeset/base/226237 Log: MFC 226114 Remove the reference held on the loopback route when the interface address is being deleted. Only the last reference holder deletes the loopback route. All other delete operations just clear the IFA_RTSELF flag. PR: kern/159601 Submitted by: pluknet Reviewed by: discussed on net@ Modified: stable/8/sys/netinet/in.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/netinet/in.c ============================================================================== --- stable/8/sys/netinet/in.c Mon Oct 10 21:38:19 2011 (r226236) +++ stable/8/sys/netinet/in.c Mon Oct 10 21:41:34 2011 (r226237) @@ -1126,8 +1126,10 @@ in_scrubprefix(struct in_ifaddr *target, RT_LOCK(ia_ro.ro_rt); if (ia_ro.ro_rt->rt_refcnt <= 1) freeit = 1; - else + else if (flags & LLE_STATIC) { RT_REMREF(ia_ro.ro_rt); + target->ia_flags &= ~IFA_RTSELF; + } RTFREE_LOCKED(ia_ro.ro_rt); } if (freeit && (flags & LLE_STATIC)) { From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 21:43:54 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 07ED51065670; Mon, 10 Oct 2011 21:43:54 +0000 (UTC) (envelope-from qingli@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EC1628FC13; Mon, 10 Oct 2011 21:43:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9ALhrk8083965; Mon, 10 Oct 2011 21:43:53 GMT (envelope-from qingli@svn.freebsd.org) Received: (from qingli@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9ALhrcV083963; Mon, 10 Oct 2011 21:43:53 GMT (envelope-from qingli@svn.freebsd.org) Message-Id: <201110102143.p9ALhrcV083963@svn.freebsd.org> From: Qing Li Date: Mon, 10 Oct 2011 21:43:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226238 - stable/8/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2011 21:43:54 -0000 Author: qingli Date: Mon Oct 10 21:43:53 2011 New Revision: 226238 URL: http://svn.freebsd.org/changeset/base/226238 Log: MFC 226120 Do not try removing an ARP entry associated with a given interface address if that interface does not support ARP. Otherwise the system will generate error messages unnecessarily due to the missing entry. PR: kern/159602 Submitted by: pluknet Modified: stable/8/sys/netinet/in.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/netinet/in.c ============================================================================== --- stable/8/sys/netinet/in.c Mon Oct 10 21:41:34 2011 (r226237) +++ stable/8/sys/netinet/in.c Mon Oct 10 21:43:53 2011 (r226238) @@ -1138,7 +1138,8 @@ in_scrubprefix(struct in_ifaddr *target, if (error == 0) target->ia_flags &= ~IFA_RTSELF; } - if (flags & LLE_STATIC) + if ((flags & LLE_STATIC) && + !(target->ia_ifp->if_flags & IFF_NOARP)) /* remove arp cache */ arp_ifscrub(target->ia_ifp, IA_SIN(target)->sin_addr.s_addr); } From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 21:46:37 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 725BB106566B; Mon, 10 Oct 2011 21:46:37 +0000 (UTC) (envelope-from qingli@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 622EF8FC0A; Mon, 10 Oct 2011 21:46:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9ALkb6w084117; Mon, 10 Oct 2011 21:46:37 GMT (envelope-from qingli@svn.freebsd.org) Received: (from qingli@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9ALkbFM084115; Mon, 10 Oct 2011 21:46:37 GMT (envelope-from qingli@svn.freebsd.org) Message-Id: <201110102146.p9ALkbFM084115@svn.freebsd.org> From: Qing Li Date: Mon, 10 Oct 2011 21:46:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226239 - stable/8/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2011 21:46:37 -0000 Author: qingli Date: Mon Oct 10 21:46:37 2011 New Revision: 226239 URL: http://svn.freebsd.org/changeset/base/226239 Log: MFC 225223 When an interface address route is removed from the system, another route with the same prefix is searched for as a replacement. The current code did not bypass routes that have non-operational interfaces. This patch fixes that bug and will find a replacement route with an active interface. PR: kern/159603 Submitted by: pluknet, ambrisko at ambrisko dot com Reviewed by: discussed on net@ Modified: stable/8/sys/netinet/in.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/netinet/in.c ============================================================================== --- stable/8/sys/netinet/in.c Mon Oct 10 21:43:53 2011 (r226238) +++ stable/8/sys/netinet/in.c Mon Oct 10 21:46:37 2011 (r226239) @@ -1166,7 +1166,8 @@ in_scrubprefix(struct in_ifaddr *target, p.s_addr &= ia->ia_sockmask.sin_addr.s_addr; } - if (prefix.s_addr != p.s_addr) + if ((prefix.s_addr != p.s_addr) || + !(ia->ia_ifp->if_flags & IFF_UP)) continue; /* From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 21:48:41 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 409D6106566B; Mon, 10 Oct 2011 21:48:41 +0000 (UTC) (envelope-from qingli@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 309238FC0C; Mon, 10 Oct 2011 21:48:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9ALmflF084226; Mon, 10 Oct 2011 21:48:41 GMT (envelope-from qingli@svn.freebsd.org) Received: (from qingli@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9ALmfqP084224; Mon, 10 Oct 2011 21:48:41 GMT (envelope-from qingli@svn.freebsd.org) Message-Id: <201110102148.p9ALmfqP084224@svn.freebsd.org> From: Qing Li Date: Mon, 10 Oct 2011 21:48:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226240 - stable/8/sys/netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2011 21:48:41 -0000 Author: qingli Date: Mon Oct 10 21:48:40 2011 New Revision: 226240 URL: http://svn.freebsd.org/changeset/base/226240 Log: MFC 226040 The IFA_RTSELF instead of the IFA_ROUTE flag should be checked to determine if a loopback route should be installed for an interface IPv6 address. Another condition is the address must not belong to a looopback interface. Reviewed by: hrs Modified: stable/8/sys/netinet6/in6.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/netinet6/in6.c ============================================================================== --- stable/8/sys/netinet6/in6.c Mon Oct 10 21:46:37 2011 (r226239) +++ stable/8/sys/netinet6/in6.c Mon Oct 10 21:48:40 2011 (r226240) @@ -1782,9 +1782,9 @@ in6_ifinit(struct ifnet *ifp, struct in6 /* * add a loopback route to self */ - if (!(ia->ia_flags & IFA_ROUTE) + if (!(ia->ia_flags & IFA_RTSELF) && (V_nd6_useloopback - || (ifp->if_flags & IFF_LOOPBACK))) { + && !(ifp->if_flags & IFF_LOOPBACK))) { error = ifa_add_loopback_route((struct ifaddr *)ia, (struct sockaddr *)&ia->ia_addr); if (error == 0) From owner-svn-src-all@FreeBSD.ORG Mon Oct 10 21:54:19 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D1155106564A; Mon, 10 Oct 2011 21:54:19 +0000 (UTC) (envelope-from qingli@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C12598FC0A; Mon, 10 Oct 2011 21:54:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9ALsJvL084467; Mon, 10 Oct 2011 21:54:19 GMT (envelope-from qingli@svn.freebsd.org) Received: (from qingli@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9ALsJRs084465; Mon, 10 Oct 2011 21:54:19 GMT (envelope-from qingli@svn.freebsd.org) Message-Id: <201110102154.p9ALsJRs084465@svn.freebsd.org> From: Qing Li Date: Mon, 10 Oct 2011 21:54:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226241 - stable/8/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 10 Oct 2011 21:54:19 -0000 Author: qingli Date: Mon Oct 10 21:54:19 2011 New Revision: 226241 URL: http://svn.freebsd.org/changeset/base/226241 Log: MFC 225163 When the RADIX_MPATH kernel option is enabled, the RADIX_MPATH code tries to find the first route node of an ECMP chain before executing the route command. If the system has a default route, and the specific route argument to the command does not exist in the routing table, then the default route would be reached. The current code does not verify the reached node matches the given route argument, therefore erroneous removed the entry. This patch fixes that bug. Modified: stable/8/sys/net/radix_mpath.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/net/radix_mpath.c ============================================================================== --- stable/8/sys/net/radix_mpath.c Mon Oct 10 21:48:40 2011 (r226240) +++ stable/8/sys/net/radix_mpath.c Mon Oct 10 21:54:19 2011 (r226241) @@ -96,10 +96,7 @@ rt_mpath_matchgate(struct rtentry *rt, s { struct radix_node *rn; - if (!rn_mpath_next((struct radix_node *)rt)) - return rt; - - if (!gate) + if (!gate || !rt->rt_gateway) return NULL; /* beyond here, we use rn as the master copy */ From owner-svn-src-all@FreeBSD.ORG Tue Oct 11 01:11:57 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DEE73106564A; Tue, 11 Oct 2011 01:11:57 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CE3818FC12; Tue, 11 Oct 2011 01:11:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9B1BvM9090686; Tue, 11 Oct 2011 01:11:57 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9B1BvCB090684; Tue, 11 Oct 2011 01:11:57 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201110110111.p9B1BvCB090684@svn.freebsd.org> From: Andrew Thompson Date: Tue, 11 Oct 2011 01:11:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226242 - head/tools/tools/nanobsd/gateworks X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2011 01:11:58 -0000 Author: thompsa Date: Tue Oct 11 01:11:57 2011 New Revision: 226242 URL: http://svn.freebsd.org/changeset/base/226242 Log: Fix build after TARGET_BIG_ENDIAN was nuked from orbit. Modified: head/tools/tools/nanobsd/gateworks/common Modified: head/tools/tools/nanobsd/gateworks/common ============================================================================== --- head/tools/tools/nanobsd/gateworks/common Mon Oct 10 21:54:19 2011 (r226241) +++ head/tools/tools/nanobsd/gateworks/common Tue Oct 11 01:11:57 2011 (r226242) @@ -4,9 +4,8 @@ NANO_CFGDIR=${NANO_CFGDIR:-${NANO_SRC}/$ test -d ${NANO_CFGDIR} || NANO_CFGDIR=/var/empty NANO_PMAKE="make" # NB: disable -j 3 -NANO_ARCH=arm +NANO_ARCH=armeb TARGET_CPUTYPE=xscale; export TARGET_CPUTYPE # XXX -TARGET_BIG_ENDIAN=true; export TARGET_BIG_ENDIAN # XXX NANO_CUSTOMIZE="cust_allow_ssh_root" From owner-svn-src-all@FreeBSD.ORG Tue Oct 11 04:40:07 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5B1DD1065672; Tue, 11 Oct 2011 04:40:07 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 46EA48FC13; Tue, 11 Oct 2011 04:40:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9B4e7AQ097470; Tue, 11 Oct 2011 04:40:07 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9B4e7cd097463; Tue, 11 Oct 2011 04:40:07 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201110110440.p9B4e7cd097463@svn.freebsd.org> From: Xin LI Date: Tue, 11 Oct 2011 04:40:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226243 - in stable/8: share/man/man4 sys/amd64/conf sys/conf sys/dev/tws sys/i386/conf sys/modules sys/modules/tws X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2011 04:40:07 -0000 Author: delphij Date: Tue Oct 11 04:40:06 2011 New Revision: 226243 URL: http://svn.freebsd.org/changeset/base/226243 Log: MFC r226026: Add the 9750 SATA+SAS 6Gb/s RAID controller card driver, tws(4). Many thanks for their contiued support to FreeBSD. This is version 10.80.00.003 from codeset 10.2.1 [1] Obtained from: LSI http://kb.lsi.com/Download16574.aspx [1] Added: stable/8/share/man/man4/tws.4 - copied unchanged from r226026, head/share/man/man4/tws.4 stable/8/sys/dev/tws/ - copied from r226026, head/sys/dev/tws/ stable/8/sys/modules/tws/ - copied from r226026, head/sys/modules/tws/ Modified: stable/8/share/man/man4/Makefile stable/8/sys/amd64/conf/GENERIC stable/8/sys/conf/files stable/8/sys/i386/conf/GENERIC stable/8/sys/modules/Makefile Directory Properties: stable/8/share/man/man4/ (props changed) stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/share/man/man4/Makefile ============================================================================== --- stable/8/share/man/man4/Makefile Tue Oct 11 01:11:57 2011 (r226242) +++ stable/8/share/man/man4/Makefile Tue Oct 11 04:40:06 2011 (r226243) @@ -434,6 +434,7 @@ MAN= aac.4 \ tun.4 \ twa.4 \ twe.4 \ + tws.4 \ tx.4 \ txp.4 \ u3g.4 \ Copied: stable/8/share/man/man4/tws.4 (from r226026, head/share/man/man4/tws.4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/share/man/man4/tws.4 Tue Oct 11 04:40:06 2011 (r226243, copy of r226026, head/share/man/man4/tws.4) @@ -0,0 +1,118 @@ +.\" +.\"Copyright (c) 2010, 2011 iXsystems, Inc. +.\"All rights reserved. +.\" written by: Xin LI +.\" +.\"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$ +.\" +.Dd October 4, 2011 +.Dt TWS 4 +.Os +.Sh NAME +.Nm tws +.Nd 3ware 9750 SATA+SAS 6Gb/s RAID controller card driver +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following lines in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device scbus" +.Cd "device tws" +.Ed +.Pp +Alternatively, to load the driver as a +module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +tws_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides support for LSI's 3ware 9750 SATA+SAS 6Gb/s RAID controller cards. +.Pp +These controllers feature the LSISAS2108 6Gb/s SAS RAID-on-Chip (ROC) +and are available in 4- and 8-port configurations, supports RAID levels +0, 1, 5, 6, 10, 50 and single disk, with 96 SATA and/or SAS hard drives and SSDs. +.Pp +For further hardware information, see +.Pa http://www.lsi.com/. +.Sh HARDWARE +The +.Nm +driver supports the following SATA/SAS RAID controller: +.Pp +.Bl -bullet -compact +.It +LSI's 3ware SAS 9750 series +.El +.Sh LOADER TUNABLES +Tunables can be set at the +.Xr loader 8 +prompt before booting the kernel or stored in +.Xr loader.conf 5 . +.Bl -tag -width "hw.tws.use_32bit_sgls" +.It Va hw.tws.cam_depth +The maximium queued CAM SIM requests for one controller. +The default value is 256. +.It Va hw.tws.enable_msi +This tunable enables MSI support on the controller if set to a non-zero value. +The default value is 0. +.It Va hw.tws.queue_depth +The maximium queued requests for one controller. +.It Va hw.tws.use_32bit_sgls +Limit the driver to use only 32-bit SG elements regardless whether the operating +system is running in 64-bit mode. +The default value is 0. +.El +.Sh FILES +.Bl -tag -width ".Pa /dev/tws?" -compact +.It Pa /dev/da? +array/logical disk interface +.It Pa /dev/tws? +management interface +.El +.Sh DIAGNOSTICS +Whenever the driver encounters a command failure, it prints out an error code in +the format: +.Qq Li "ERROR: (: ):" , +followed by a text description of the error. +There are other error messages and warnings that the +driver prints out, depending on the kinds of errors that it encounters. +If the driver is compiled with +.Dv TWS_DEBUG +defined, it prints out a whole bunch of debug +messages. +.Sh SEE ALSO +.Xr da 4 , +.Xr scsi 4 +.Sh AUTHORS +.An -nosplit +The +.Nm +driver was written by +.An Manjunath Ranganathaiah +for LSI and this manual page was written by +.An Xin LI Aq delphij@FreeBSD.org +for iXsystems, Inc. Modified: stable/8/sys/amd64/conf/GENERIC ============================================================================== --- stable/8/sys/amd64/conf/GENERIC Tue Oct 11 01:11:57 2011 (r226242) +++ stable/8/sys/amd64/conf/GENERIC Tue Oct 11 04:40:06 2011 (r226243) @@ -155,6 +155,7 @@ device mlx # Mylex DAC960 family #XXX pointer/int warnings #device pst # Promise Supertrak SX6000 device twe # 3ware ATA RAID +device tws # LSI 3ware 9750 SATA+SAS 6Gb/s RAID controller # atkbdc0 controls both the keyboard and the PS/2 mouse device atkbdc # AT keyboard controller Modified: stable/8/sys/conf/files ============================================================================== --- stable/8/sys/conf/files Tue Oct 11 01:11:57 2011 (r226242) +++ stable/8/sys/conf/files Tue Oct 11 04:40:06 2011 (r226243) @@ -1712,6 +1712,11 @@ dev/twa/tw_osl_freebsd.c optional twa \ compile-with "${NORMAL_C} -I$S/dev/twa" dev/twe/twe.c optional twe dev/twe/twe_freebsd.c optional twe +dev/tws/tws.c optional tws +dev/tws/tws_cam.c optional tws +dev/tws/tws_hdm.c optional tws +dev/tws/tws_services.c optional tws +dev/tws/tws_user.c optional tws dev/tx/if_tx.c optional tx dev/txp/if_txp.c optional txp inet dev/uart/uart_bus_acpi.c optional uart acpi Modified: stable/8/sys/i386/conf/GENERIC ============================================================================== --- stable/8/sys/i386/conf/GENERIC Tue Oct 11 01:11:57 2011 (r226242) +++ stable/8/sys/i386/conf/GENERIC Tue Oct 11 04:40:06 2011 (r226243) @@ -151,6 +151,7 @@ device iir # Intel Integrated RAID device ips # IBM (Adaptec) ServeRAID device mly # Mylex AcceleRAID/eXtremeRAID device twa # 3ware 9000 series PATA/SATA RAID +device tws # LSI 3ware 9750 SATA+SAS 6Gb/s RAID controller # RAID controllers device aac # Adaptec FSA RAID Modified: stable/8/sys/modules/Makefile ============================================================================== --- stable/8/sys/modules/Makefile Tue Oct 11 01:11:57 2011 (r226242) +++ stable/8/sys/modules/Makefile Tue Oct 11 04:40:06 2011 (r226243) @@ -292,6 +292,7 @@ SUBDIR= ${_3dfx} \ trm \ ${_twa} \ twe \ + tws \ tx \ txp \ ${_uart} \ From owner-svn-src-all@FreeBSD.ORG Tue Oct 11 05:17:26 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6712A106566C; Tue, 11 Oct 2011 05:17:26 +0000 (UTC) (envelope-from das@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 56F288FC08; Tue, 11 Oct 2011 05:17:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9B5HQTo098672; Tue, 11 Oct 2011 05:17:26 GMT (envelope-from das@svn.freebsd.org) Received: (from das@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9B5HQnp098670; Tue, 11 Oct 2011 05:17:26 GMT (envelope-from das@svn.freebsd.org) Message-Id: <201110110517.p9B5HQnp098670@svn.freebsd.org> From: David Schultz Date: Tue, 11 Oct 2011 05:17:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226244 - head/share/mk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2011 05:17:26 -0000 Author: das Date: Tue Oct 11 05:17:26 2011 New Revision: 226244 URL: http://svn.freebsd.org/changeset/base/226244 Log: Also pass the -ansi flag through to mkdep (requested by bde), and fix a cut-and-paste-o (noticed by rdivacky). Modified: head/share/mk/bsd.dep.mk Modified: head/share/mk/bsd.dep.mk ============================================================================== --- head/share/mk/bsd.dep.mk Tue Oct 11 04:40:06 2011 (r226243) +++ head/share/mk/bsd.dep.mk Tue Oct 11 05:17:26 2011 (r226244) @@ -125,8 +125,8 @@ depend: beforedepend ${DEPENDFILE} after # Different types of sources are compiled with slightly different flags. # Split up the sources, and filter out headers and non-applicable flags. -MKDEP_CFLAGS= ${CFLAGS:M-nostdinc*} ${CFLAGS:M-[BIDU]*} ${CFLAGS:M-std=*} -MKDEP_CXXFLAGS= ${CXXFLAGS:M-nostdinc*} ${CXXFLAGS:M-[BIDU]*} ${CFLAGS:M-std=*} +MKDEP_CFLAGS= ${CFLAGS:M-nostdinc*} ${CFLAGS:M-[BIDU]*} ${CFLAGS:M-std=*} ${CFLAGS:M-ansi} +MKDEP_CXXFLAGS= ${CXXFLAGS:M-nostdinc*} ${CXXFLAGS:M-[BIDU]*} ${CXXFLAGS:M-std=*} ${CXXFLAGS:M-ansi} DPSRCS+= ${SRCS} ${DEPENDFILE}: ${DPSRCS} From owner-svn-src-all@FreeBSD.ORG Tue Oct 11 05:17:46 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 65A171065672; Tue, 11 Oct 2011 05:17:46 +0000 (UTC) (envelope-from das@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4B4468FC08; Tue, 11 Oct 2011 05:17:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9B5HkJp098720; Tue, 11 Oct 2011 05:17:46 GMT (envelope-from das@svn.freebsd.org) Received: (from das@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9B5HkUJ098717; Tue, 11 Oct 2011 05:17:46 GMT (envelope-from das@svn.freebsd.org) Message-Id: <201110110517.p9B5HkUJ098717@svn.freebsd.org> From: David Schultz Date: Tue, 11 Oct 2011 05:17:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226245 - head/lib/msun/src X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2011 05:17:46 -0000 Author: das Date: Tue Oct 11 05:17:45 2011 New Revision: 226245 URL: http://svn.freebsd.org/changeset/base/226245 Log: Refactor this code by introducing separate functions to handle the extra-precision add and multiply operations. This simplifies future work but shouldn't result in any functional change. Modified: head/lib/msun/src/s_fma.c head/lib/msun/src/s_fmal.c Modified: head/lib/msun/src/s_fma.c ============================================================================== --- head/lib/msun/src/s_fma.c Tue Oct 11 05:17:26 2011 (r226244) +++ head/lib/msun/src/s_fma.c Tue Oct 11 05:17:45 2011 (r226245) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2005 David Schultz + * Copyright (c) 2005-2011 David Schultz * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -32,6 +32,63 @@ __FBSDID("$FreeBSD$"); #include /* + * A struct dd represents a floating-point number with twice the precision + * of a double. We maintain the invariant that "hi" stores the 53 high-order + * bits of the result. + */ +struct dd { + double hi; + double lo; +}; + +/* + * Compute a+b exactly, returning the exact result in a struct dd. We assume + * that both a and b are finite, but make no assumptions about their relative + * magnitudes. + */ +static inline struct dd +dd_add(double a, double b) +{ + struct dd ret; + double s; + + ret.hi = a + b; + s = ret.hi - a; + ret.lo = (a - (ret.hi - s)) + (b - s); + return (ret); +} + +/* + * Compute a*b exactly, returning the exact result in a struct dd. We assume + * that both a and b are normalized, so no underflow or overflow will occur. + * The current rounding mode must be round-to-nearest. + */ +static inline struct dd +dd_mul(double a, double b) +{ + static const double split = 0x1p27 + 1.0; + struct dd ret; + double ha, hb, la, lb, p, q; + + p = a * split; + ha = a - p; + ha += p; + la = a - ha; + + p = b * split; + hb = b - p; + hb += p; + lb = b - hb; + + p = ha * hb; + q = ha * lb + la * hb; + + ret.hi = p + q; + ret.lo = p - ret.hi + q + la * lb; + return (ret); +} + +/* * Fused multiply-add: Compute x * y + z with a single rounding error. * * We use scaling to avoid overflow/underflow, along with the @@ -52,10 +109,10 @@ __FBSDID("$FreeBSD$"); double fma(double x, double y, double z) { - static const double split = 0x1p27 + 1.0; double xs, ys, zs; - double c, cc, hx, hy, p, q, tx, ty; - double r, rr, s; + struct dd xy, r, r2; + double p; + double s; int oround; int ex, ey, ez; int spread; @@ -95,29 +152,29 @@ fma(double x, double y, double z) if (x > 0.0 ^ y < 0.0 ^ z < 0.0) return (x * y); feholdexcept(&env); - r = x * y; + s = x * y; if (!fetestexcept(FE_INEXACT)) - r = nextafter(r, 0); + s = nextafter(s, 0); feupdateenv(&env); - return (r); + return (s); case FE_DOWNWARD: if (z > 0.0) return (x * y); feholdexcept(&env); - r = x * y; + s = x * y; if (!fetestexcept(FE_INEXACT)) - r = nextafter(r, -INFINITY); + s = nextafter(s, -INFINITY); feupdateenv(&env); - return (r); + return (s); default: /* FE_UPWARD */ if (z < 0.0) return (x * y); feholdexcept(&env); - r = x * y; + s = x * y; if (!fetestexcept(FE_INEXACT)) - r = nextafter(r, INFINITY); + s = nextafter(s, INFINITY); feupdateenv(&env); - return (r); + return (s); } } if (spread < -DBL_MANT_DIG) { @@ -145,50 +202,29 @@ fma(double x, double y, double z) } } - /* - * Use Dekker's algorithm to perform the multiplication and - * subsequent addition in twice the machine precision. - * Arrange so that x * y = c + cc, and x * y + z = r + rr. - */ fesetround(FE_TONEAREST); - p = xs * split; - hx = xs - p; - hx += p; - tx = xs - hx; - - p = ys * split; - hy = ys - p; - hy += p; - ty = ys - hy; - - p = hx * hy; - q = hx * ty + tx * hy; - c = p + q; - cc = p - c + q + tx * ty; - + xy = dd_mul(xs, ys); zs = ldexp(zs, -spread); - r = c + zs; - s = r - c; - rr = (c - (r - s)) + (zs - s) + cc; + r = dd_add(xy.hi, zs); + r.lo += xy.lo; spread = ex + ey; - if (spread + ilogb(r) > -1023) { + if (spread + ilogb(r.hi) > -1023) { fesetround(oround); - r = r + rr; + r.hi = r.hi + r.lo; } else { /* * The result is subnormal, so we round before scaling to * avoid double rounding. */ - p = ldexp(copysign(0x1p-1022, r), -spread); - c = r + p; - s = c - r; - cc = (r - (c - s)) + (p - s) + rr; + p = ldexp(copysign(0x1p-1022, r.hi), -spread); + r2 = dd_add(r.hi, p); + r2.lo += r.lo; fesetround(oround); - r = (c + cc) - p; + r.hi = (r2.hi + r2.lo) - p; } - return (ldexp(r, spread)); + return (ldexp(r.hi, spread)); } #else /* LDBL_MANT_DIG == 113 */ /* Modified: head/lib/msun/src/s_fmal.c ============================================================================== --- head/lib/msun/src/s_fmal.c Tue Oct 11 05:17:26 2011 (r226244) +++ head/lib/msun/src/s_fmal.c Tue Oct 11 05:17:45 2011 (r226245) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2005 David Schultz + * Copyright (c) 2005-2011 David Schultz * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -32,6 +32,67 @@ __FBSDID("$FreeBSD$"); #include /* + * A struct dd represents a floating-point number with twice the precision + * of a long double. We maintain the invariant that "hi" stores the high-order + * bits of the result. + */ +struct dd { + long double hi; + long double lo; +}; + +/* + * Compute a+b exactly, returning the exact result in a struct dd. We assume + * that both a and b are finite, but make no assumptions about their relative + * magnitudes. + */ +static inline struct dd +dd_add(long double a, long double b) +{ + struct dd ret; + long double s; + + ret.hi = a + b; + s = ret.hi - a; + ret.lo = (a - (ret.hi - s)) + (b - s); + return (ret); +} + +/* + * Compute a*b exactly, returning the exact result in a struct dd. We assume + * that both a and b are normalized, so no underflow or overflow will occur. + * The current rounding mode must be round-to-nearest. + */ +static inline struct dd +dd_mul(long double a, long double b) +{ +#if LDBL_MANT_DIG == 64 + static const long double split = 0x1p32L + 1.0; +#elif LDBL_MANT_DIG == 113 + static const long double split = 0x1p57L + 1.0; +#endif + struct dd ret; + long double ha, hb, la, lb, p, q; + + p = a * split; + ha = a - p; + ha += p; + la = a - ha; + + p = b * split; + hb = b - p; + hb += p; + lb = b - hb; + + p = ha * hb; + q = ha * lb + la * hb; + + ret.hi = p + q; + ret.lo = p - ret.hi + q + la * lb; + return (ret); +} + +/* * Fused multiply-add: Compute x * y + z with a single rounding error. * * We use scaling to avoid overflow/underflow, along with the @@ -43,14 +104,10 @@ __FBSDID("$FreeBSD$"); long double fmal(long double x, long double y, long double z) { -#if LDBL_MANT_DIG == 64 - static const long double split = 0x1p32L + 1.0; -#elif LDBL_MANT_DIG == 113 - static const long double split = 0x1p57L + 1.0; -#endif long double xs, ys, zs; - long double c, cc, hx, hy, p, q, tx, ty; - long double r, rr, s; + struct dd xy, r, r2; + long double p; + long double s; int oround; int ex, ey, ez; int spread; @@ -90,29 +147,29 @@ fmal(long double x, long double y, long if (x > 0.0 ^ y < 0.0 ^ z < 0.0) return (x * y); feholdexcept(&env); - r = x * y; + s = x * y; if (!fetestexcept(FE_INEXACT)) - r = nextafterl(r, 0); + s = nextafterl(s, 0); feupdateenv(&env); - return (r); + return (s); case FE_DOWNWARD: if (z > 0.0) return (x * y); feholdexcept(&env); - r = x * y; + s = x * y; if (!fetestexcept(FE_INEXACT)) - r = nextafterl(r, -INFINITY); + s = nextafterl(s, -INFINITY); feupdateenv(&env); - return (r); + return (s); default: /* FE_UPWARD */ if (z < 0.0) return (x * y); feholdexcept(&env); - r = x * y; + s = x * y; if (!fetestexcept(FE_INEXACT)) - r = nextafterl(r, INFINITY); + s = nextafterl(s, INFINITY); feupdateenv(&env); - return (r); + return (s); } } if (spread < -LDBL_MANT_DIG) { @@ -140,48 +197,27 @@ fmal(long double x, long double y, long } } - /* - * Use Dekker's algorithm to perform the multiplication and - * subsequent addition in twice the machine precision. - * Arrange so that x * y = c + cc, and x * y + z = r + rr. - */ fesetround(FE_TONEAREST); - p = xs * split; - hx = xs - p; - hx += p; - tx = xs - hx; - - p = ys * split; - hy = ys - p; - hy += p; - ty = ys - hy; - - p = hx * hy; - q = hx * ty + tx * hy; - c = p + q; - cc = p - c + q + tx * ty; - + xy = dd_mul(xs, ys); zs = ldexpl(zs, -spread); - r = c + zs; - s = r - c; - rr = (c - (r - s)) + (zs - s) + cc; + r = dd_add(xy.hi, zs); + r.lo += xy.lo; spread = ex + ey; - if (spread + ilogbl(r) > -16383) { + if (spread + ilogbl(r.hi) > -16383) { fesetround(oround); - r = r + rr; + r.hi = r.hi + r.lo; } else { /* * The result is subnormal, so we round before scaling to * avoid double rounding. */ - p = ldexpl(copysignl(0x1p-16382L, r), -spread); - c = r + p; - s = c - r; - cc = (r - (c - s)) + (p - s) + rr; + p = ldexpl(copysignl(0x1p-16382L, r.hi), -spread); + r2 = dd_add(r.hi, p); + r2.lo += r.lo; fesetround(oround); - r = (c + cc) - p; + r.hi = (r2.hi + r2.lo) - p; } - return (ldexpl(r, spread)); + return (ldexpl(r.hi, spread)); } From owner-svn-src-all@FreeBSD.ORG Tue Oct 11 07:45:31 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 032C8106566C; Tue, 11 Oct 2011 07:45:31 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 8DA1B8FC0A; Tue, 11 Oct 2011 07:45:30 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 8BBCA1FFC33; Tue, 11 Oct 2011 07:45:29 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 4D622846B3; Tue, 11 Oct 2011 09:45:29 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Jaakko Heinonen References: <201110081221.p98CLpWq062285@svn.freebsd.org> <20111010145642.GA2057@a91-153-123-205.elisa-laajakaista.fi> Date: Tue, 11 Oct 2011 09:45:29 +0200 In-Reply-To: <20111010145642.GA2057@a91-153-123-205.elisa-laajakaista.fi> (Jaakko Heinonen's message of "Mon, 10 Oct 2011 17:56:43 +0300") Message-ID: <86hb3gj7ja.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r226151 - head/usr.bin/kdump X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2011 07:45:31 -0000 Jaakko Heinonen writes: > Dag-Erling Smorgrav writes: > > +#define print_number(i,n,c) \ > > + do { \ > > + if (decimal) \ > > + printf("%c%jd", c, (intmax_t)*i); \ > > + else \ > > + printf("%c%#jx", c, (intmax_t)*i); \ > > + i++; \ > > + n--; \ > > + c =3D ','; \ > > + } while (0) > Are you sure that this change doesn't cause a regression on platforms > where sizeof(long) !=3D sizeof(intmax_t)? > > For example, previously, on i386 print_number() printed "0xffffffff" for > -1 while after your change it will print "0xffffffffffffffff" (with %#jx). You are right, the cast for the hex case should be to uintmax_t. I think I got all the other instances right... DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-all@FreeBSD.ORG Tue Oct 11 07:46:45 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E42071065670; Tue, 11 Oct 2011 07:46:45 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D3FAC8FC0C; Tue, 11 Oct 2011 07:46:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9B7kj5b003435; Tue, 11 Oct 2011 07:46:45 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9B7kj0D003433; Tue, 11 Oct 2011 07:46:45 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201110110746.p9B7kj0D003433@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Tue, 11 Oct 2011 07:46:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226246 - head/usr.bin/kdump X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2011 07:46:46 -0000 Author: des Date: Tue Oct 11 07:46:45 2011 New Revision: 226246 URL: http://svn.freebsd.org/changeset/base/226246 Log: Cast to unsigned for %#jx. Noticed by: jh@ Modified: head/usr.bin/kdump/kdump.c Modified: head/usr.bin/kdump/kdump.c ============================================================================== --- head/usr.bin/kdump/kdump.c Tue Oct 11 05:17:45 2011 (r226245) +++ head/usr.bin/kdump/kdump.c Tue Oct 11 07:46:45 2011 (r226246) @@ -114,7 +114,7 @@ struct ktr_header ktr_header; if (decimal) \ printf("%c%jd", c, (intmax_t)*i); \ else \ - printf("%c%#jx", c, (intmax_t)*i); \ + printf("%c%#jx", c, (uintmax_t)*i); \ i++; \ n--; \ c = ','; \ From owner-svn-src-all@FreeBSD.ORG Tue Oct 11 09:00:56 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A98D106564A; Tue, 11 Oct 2011 09:00:56 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from gw01.mail.saunalahti.fi (gw01.mail.saunalahti.fi [195.197.172.115]) by mx1.freebsd.org (Postfix) with ESMTP id 519178FC13; Tue, 11 Oct 2011 09:00:56 +0000 (UTC) Received: from jh (a91-153-115-208.elisa-laajakaista.fi [91.153.115.208]) by gw01.mail.saunalahti.fi (Postfix) with ESMTP id 6A00B1517FF; Tue, 11 Oct 2011 12:00:50 +0300 (EEST) Date: Tue, 11 Oct 2011 12:00:50 +0300 From: Jaakko Heinonen To: Dag-Erling =?utf-8?B?U23DuHJncmF2?= Message-ID: <20111011090049.GA69508@jh> References: <201110081221.p98CLpWq062285@svn.freebsd.org> <20111010145642.GA2057@a91-153-123-205.elisa-laajakaista.fi> <86hb3gj7ja.fsf@ds4.des.no> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <86hb3gj7ja.fsf@ds4.des.no> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r226151 - head/usr.bin/kdump X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2011 09:00:56 -0000 On 2011-10-11, Dag-Erling Smørgrav wrote: > Jaakko Heinonen writes: > > Dag-Erling Smorgrav writes: > > > +#define print_number(i,n,c) \ > > > + do { \ > > > + if (decimal) \ > > > + printf("%c%jd", c, (intmax_t)*i); \ > > > + else \ > > > + printf("%c%#jx", c, (intmax_t)*i); \ > > > + i++; \ > > > + n--; \ > > > + c = ','; \ > > > + } while (0) > > Are you sure that this change doesn't cause a regression on platforms > > where sizeof(long) != sizeof(intmax_t)? > > > > For example, previously, on i386 print_number() printed "0xffffffff" for > > -1 while after your change it will print "0xffffffffffffffff" (with %#jx). > > You are right, the cast for the hex case should be to uintmax_t. I > think I got all the other instances right... I am not sure if you understood what I meant here. Casting to uintmax_t is obviously more correct but print_number() will still print the negative range in "64-bit" format on i386. I went ahead to test this and here is an example diff how the output has been changed: --- out1.txt 2011-10-11 11:50:41.000000000 +0300 +++ out2.txt 2011-10-11 11:51:44.000000000 +0300 @@ -1,18 +1,18 @@ 1754 ktrace RET ktrace 0 - 1754 ktrace CALL execve(0xbfbfe6f8,0xbfbfec2c,0xbfbfec34) + 1754 ktrace CALL execve(0xffffffffbfbfe6f8,0xffffffffbfbfec2c,0xffffffffbfbfec34) 1754 ktrace NAMI "/sbin/id" 1754 ktrace RET execve -1 errno 2 No such file or directory - 1754 ktrace CALL execve(0xbfbfe6f8,0xbfbfec2c,0xbfbfec34) + 1754 ktrace CALL execve(0xffffffffbfbfe6f8,0xffffffffbfbfec2c,0xffffffffbfbfec34) 1754 ktrace NAMI "/bin/id" 1754 ktrace RET execve -1 errno 2 No such file or directory - 1754 ktrace CALL execve(0xbfbfe6f8,0xbfbfec2c,0xbfbfec34) + 1754 ktrace CALL execve(0xffffffffbfbfe6f8,0xffffffffbfbfec2c,0xffffffffbfbfec34) I consider the new output incorrect on a 32-bit platform. -- Jaakko From owner-svn-src-all@FreeBSD.ORG Tue Oct 11 09:56:19 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 24C50106566B; Tue, 11 Oct 2011 09:56:19 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id A7BED8FC0C; Tue, 11 Oct 2011 09:56:18 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id E75471FFC33; Tue, 11 Oct 2011 09:56:17 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id C5178846B3; Tue, 11 Oct 2011 11:56:17 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Jaakko Heinonen References: <201110081221.p98CLpWq062285@svn.freebsd.org> <20111010145642.GA2057@a91-153-123-205.elisa-laajakaista.fi> <86hb3gj7ja.fsf@ds4.des.no> <20111011090049.GA69508@jh> Date: Tue, 11 Oct 2011 11:56:17 +0200 In-Reply-To: <20111011090049.GA69508@jh> (Jaakko Heinonen's message of "Tue, 11 Oct 2011 12:00:50 +0300") Message-ID: <868vorkg1q.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r226151 - head/usr.bin/kdump X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2011 09:56:19 -0000 Jaakko Heinonen writes: > I am not sure if you understood what I meant here. Casting to uintmax_t > is obviously more correct but print_number() will still print the > negative range in "64-bit" format on i386. Hmm, you are right, it would have worked if *i was first cast to an unsigned type of the correct size. Unfortunately, the print_number() macro does not know the correct size, so we have to play games with sizeof() and hope the compiler optimizes away the unused code: @@ -113,6 +114,8 @@ #define print_number(i,n,c) do { \ if (decimal) \ printf("%c%jd", c, (intmax_t)*i); \ + else if (sizeof(*i) =3D=3D sizeof(long)) \ + printf("%c%#lx", c, (unsigned long)*i); \ else \ printf("%c%#jx", c, (uintmax_t)*i); \ i++; \ The root of the problem is that register_t is signed, which it shouldn't be, IMHO. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-all@FreeBSD.ORG Tue Oct 11 10:32:23 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DF1BB106564A; Tue, 11 Oct 2011 10:32:23 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CEE058FC0A; Tue, 11 Oct 2011 10:32:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9BAWNe6011160; Tue, 11 Oct 2011 10:32:23 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9BAWNpw011158; Tue, 11 Oct 2011 10:32:23 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201110111032.p9BAWNpw011158@svn.freebsd.org> From: Christian Brueffer Date: Tue, 11 Oct 2011 10:32:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226247 - head/sys/compat/linux X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2011 10:32:24 -0000 Author: brueffer Date: Tue Oct 11 10:32:23 2011 New Revision: 226247 URL: http://svn.freebsd.org/changeset/base/226247 Log: Properly free linux_gidset in case of an error. CID: 4136 Found with: Coverity Prevent(tm) MFC after: 1 week Modified: head/sys/compat/linux/linux_uid16.c Modified: head/sys/compat/linux/linux_uid16.c ============================================================================== --- head/sys/compat/linux/linux_uid16.c Tue Oct 11 07:46:45 2011 (r226246) +++ head/sys/compat/linux/linux_uid16.c Tue Oct 11 10:32:23 2011 (r226247) @@ -114,6 +114,7 @@ linux_setgroups16(struct thread *td, str linux_gidset = malloc(ngrp * sizeof(*linux_gidset), M_TEMP, M_WAITOK); error = copyin(args->gidset, linux_gidset, ngrp * sizeof(l_gid16_t)); if (error) + free(linux_gidset, M_TEMP); return (error); newcred = crget(); p = td->td_proc; From owner-svn-src-all@FreeBSD.ORG Tue Oct 11 11:55:19 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EDB72106566B; Tue, 11 Oct 2011 11:55:19 +0000 (UTC) (envelope-from giovanni.trematerra@gmail.com) Received: from mail-qy0-f175.google.com (mail-qy0-f175.google.com [209.85.216.175]) by mx1.freebsd.org (Postfix) with ESMTP id 7115A8FC08; Tue, 11 Oct 2011 11:55:19 +0000 (UTC) Received: by qyk10 with SMTP id 10so3345146qyk.13 for ; Tue, 11 Oct 2011 04:55:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=VNvGG4AyOGELqnRAF2pQFSRFOfjeDkjOGc7kUr9m/8M=; b=WxW9EoTQVRbhjCTuK+u9XNNOINf4dAW3Dp0vcHm6UrJUDzN3znDbHOWsg/KY77yXx/ 30olx4vqXo5PFTXrW8bAEBtZHMhWabwb764OqLfJoIjVA2fpbygO+pHm/7f9j+Y0GKBm 0W4E9GTskodKnvemCQfaGAewgdv57JsCRfRlI= MIME-Version: 1.0 Received: by 10.229.84.136 with SMTP id j8mr4729177qcl.194.1318332386398; Tue, 11 Oct 2011 04:26:26 -0700 (PDT) Received: by 10.229.134.84 with HTTP; Tue, 11 Oct 2011 04:26:26 -0700 (PDT) In-Reply-To: <201110111032.p9BAWNpw011158@svn.freebsd.org> References: <201110111032.p9BAWNpw011158@svn.freebsd.org> Date: Tue, 11 Oct 2011 13:26:26 +0200 Message-ID: From: Giovanni Trematerra To: Christian Brueffer Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r226247 - head/sys/compat/linux X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2011 11:55:20 -0000 On Tue, Oct 11, 2011 at 12:32 PM, Christian Brueffer wrote: > Author: brueffer > Date: Tue Oct 11 10:32:23 2011 > New Revision: 226247 > URL: http://svn.freebsd.org/changeset/base/226247 > > Log: > =A0Properly free linux_gidset in case of an error. > > =A0CID: =A0 =A0 =A0 =A0 =A04136 > =A0Found with: =A0 Coverity Prevent(tm) > =A0MFC after: =A0 =A01 week > > Modified: > =A0head/sys/compat/linux/linux_uid16.c > > Modified: head/sys/compat/linux/linux_uid16.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/compat/linux/linux_uid16.c Tue Oct 11 07:46:45 2011 =A0 =A0 = =A0 =A0(r226246) > +++ head/sys/compat/linux/linux_uid16.c Tue Oct 11 10:32:23 2011 =A0 =A0 = =A0 =A0(r226247) > @@ -114,6 +114,7 @@ linux_setgroups16(struct thread *td, str > =A0 =A0 =A0 =A0linux_gidset =3D malloc(ngrp * sizeof(*linux_gidset), M_TE= MP, M_WAITOK); > =A0 =A0 =A0 =A0error =3D copyin(args->gidset, linux_gidset, ngrp * sizeof= (l_gid16_t)); > =A0 =A0 =A0 =A0if (error) > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 free(linux_gidset, M_TEMP); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0return (error); > =A0 =A0 =A0 =A0newcred =3D crget(); > =A0 =A0 =A0 =A0p =3D td->td_proc; Did you miss { } ? -- Gianni From owner-svn-src-all@FreeBSD.ORG Tue Oct 11 12:22:18 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4B585106564A; Tue, 11 Oct 2011 12:22:18 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 2347B8FC24; Tue, 11 Oct 2011 12:22:18 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id B8F1E46B09; Tue, 11 Oct 2011 08:22:17 -0400 (EDT) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 5564A8A02E; Tue, 11 Oct 2011 08:22:17 -0400 (EDT) From: John Baldwin To: Christian Brueffer Date: Tue, 11 Oct 2011 08:22:16 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110617; KDE/4.5.5; amd64; ; ) References: <201110111032.p9BAWNpw011158@svn.freebsd.org> In-Reply-To: <201110111032.p9BAWNpw011158@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201110110822.16751.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Tue, 11 Oct 2011 08:22:17 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r226247 - head/sys/compat/linux X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2011 12:22:18 -0000 On Tuesday, October 11, 2011 6:32:23 am Christian Brueffer wrote: > Author: brueffer > Date: Tue Oct 11 10:32:23 2011 > New Revision: 226247 > URL: http://svn.freebsd.org/changeset/base/226247 > > Log: > Properly free linux_gidset in case of an error. > > CID: 4136 > Found with: Coverity Prevent(tm) > MFC after: 1 week > > Modified: > head/sys/compat/linux/linux_uid16.c > > Modified: head/sys/compat/linux/linux_uid16.c > ============================================================================== > --- head/sys/compat/linux/linux_uid16.c Tue Oct 11 07:46:45 2011 (r226246) > +++ head/sys/compat/linux/linux_uid16.c Tue Oct 11 10:32:23 2011 (r226247) > @@ -114,6 +114,7 @@ linux_setgroups16(struct thread *td, str > linux_gidset = malloc(ngrp * sizeof(*linux_gidset), M_TEMP, M_WAITOK); > error = copyin(args->gidset, linux_gidset, ngrp * sizeof(l_gid16_t)); > if (error) > + free(linux_gidset, M_TEMP); > return (error); This need braces now. > newcred = crget(); > p = td->td_proc; > -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Tue Oct 11 13:18:44 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9F64C106564A; Tue, 11 Oct 2011 13:18:44 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 753CF8FC14; Tue, 11 Oct 2011 13:18:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9BDIiqU016601; Tue, 11 Oct 2011 13:18:44 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9BDIixU016598; Tue, 11 Oct 2011 13:18:44 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201110111318.p9BDIixU016598@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 11 Oct 2011 13:18:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226248 - stable/9/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2011 13:18:44 -0000 Author: kib Date: Tue Oct 11 13:18:44 2011 New Revision: 226248 URL: http://svn.freebsd.org/changeset/base/226248 Log: MFC r225791: Do not deliver SIGTRAP on exec as the normal signal, use ptracestop() on syscall exit path. Otherwise, if SIGTRAP is ignored, that tdsendsignal() do not want to deliver the signal, and debugger never get a notification of exec. Approved by: re (bz) Modified: stable/9/sys/kern/kern_exec.c stable/9/sys/kern/subr_syscall.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/kern/kern_exec.c ============================================================================== --- stable/9/sys/kern/kern_exec.c Tue Oct 11 10:32:23 2011 (r226247) +++ stable/9/sys/kern/kern_exec.c Tue Oct 11 13:18:44 2011 (r226248) @@ -777,16 +777,6 @@ interpret: KNOTE_LOCKED(&p->p_klist, NOTE_EXEC); p->p_flag &= ~P_INEXEC; - /* - * If tracing the process, trap to the debugger so that - * breakpoints can be set before the program executes. We - * have to use tdsignal() to deliver the signal to the current - * thread since any other threads in this process will exit if - * execve() succeeds. - */ - if (p->p_flag & P_TRACED) - tdsignal(td, SIGTRAP); - /* clear "fork but no exec" flag, as we _are_ execing */ p->p_acflag &= ~AFORK; Modified: stable/9/sys/kern/subr_syscall.c ============================================================================== --- stable/9/sys/kern/subr_syscall.c Tue Oct 11 10:32:23 2011 (r226247) +++ stable/9/sys/kern/subr_syscall.c Tue Oct 11 13:18:44 2011 (r226248) @@ -204,9 +204,17 @@ syscallret(struct thread *td, int error, * is not the case, this code will need to be revisited. */ STOPEVENT(p, S_SCX, sa->code); - PTRACESTOP_SC(p, td, S_PT_SCX); if (traced || (td->td_dbgflags & (TDB_EXEC | TDB_FORK)) != 0) { PROC_LOCK(p); + /* + * If tracing the execed process, trap to the debugger + * so that breakpoints can be set before the program + * executes. If debugger requested tracing of syscall + * returns, do it now too. + */ + if (traced && ((td->td_dbgflags & TDB_EXEC) != 0 || + (p->p_stops & S_PT_SCX) != 0)) + ptracestop(td, SIGTRAP); td->td_dbgflags &= ~(TDB_SCX | TDB_EXEC | TDB_FORK); PROC_UNLOCK(p); } From owner-svn-src-all@FreeBSD.ORG Tue Oct 11 13:19:06 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 94910106567D; Tue, 11 Oct 2011 13:19:06 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 69D428FC0C; Tue, 11 Oct 2011 13:19:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9BDJ6CE016654; Tue, 11 Oct 2011 13:19:06 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9BDJ6gl016652; Tue, 11 Oct 2011 13:19:06 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201110111319.p9BDJ6gl016652@svn.freebsd.org> From: Nathan Whitehorn Date: Tue, 11 Oct 2011 13:19:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226249 - stable/9/usr.sbin/bsdinstall/partedit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2011 13:19:06 -0000 Author: nwhitehorn Date: Tue Oct 11 13:19:06 2011 New Revision: 226249 URL: http://svn.freebsd.org/changeset/base/226249 Log: MFC r226160: Usability enhancements: do not allow setting a mountpoint on bsdlabel container partitions, which didn't do anything anyway, and check for an existing freebsd-boot partition before bothering the user to make one. PR: bin/160931 Approved by: re (kib) Modified: stable/9/usr.sbin/bsdinstall/partedit/gpart_ops.c Directory Properties: stable/9/usr.sbin/bsdinstall/ (props changed) Modified: stable/9/usr.sbin/bsdinstall/partedit/gpart_ops.c ============================================================================== --- stable/9/usr.sbin/bsdinstall/partedit/gpart_ops.c Tue Oct 11 13:18:44 2011 (r226248) +++ stable/9/usr.sbin/bsdinstall/partedit/gpart_ops.c Tue Oct 11 13:19:06 2011 (r226249) @@ -892,6 +892,19 @@ addpartform: goto addpartform; } + /* + * Error if this scheme needs nested partitions, this is one, and + * a mountpoint was set. + */ + if (strcmp(items[0].text, "freebsd") == 0 && + strlen(items[2].text) > 0) { + dialog_msgbox("Error", "Partitions of type \"freebsd\" are " + "nested BSD-type partition schemes and cannot have " + "mountpoints. After creating one, select it and press " + "Create again to add the actual file systems.", 0, 0, TRUE); + goto addpartform; + } + /* If this is the root partition, check that this scheme is bootable */ if (strcmp(items[2].text, "/") == 0 && !is_scheme_bootable(scheme)) { char message[512]; @@ -909,7 +922,23 @@ addpartform: * If this is the root partition, and we need a boot partition, ask * the user to add one. */ - if (strcmp(items[2].text, "/") == 0 && bootpart_size(scheme) > 0) { + + /* Check for existing freebsd-boot partition */ + LIST_FOREACH(pp, &geom->lg_provider, lg_provider) { + struct partition_metadata *md; + md = get_part_metadata(pp->lg_name, 0); + if (md == NULL || !md->bootcode) + continue; + LIST_FOREACH(gc, &pp->lg_config, lg_config) + if (strcmp(gc->lg_name, "type") == 0) + break; + if (gc != NULL && strcmp(gc->lg_val, "freebsd-boot") == 0) + break; + } + + /* If there isn't one, and we need one, ask */ + if (strcmp(items[2].text, "/") == 0 && bootpart_size(scheme) > 0 && + pp == NULL) { if (interactive) choice = dialog_yesno("Boot Partition", "This partition scheme requires a boot partition " From owner-svn-src-all@FreeBSD.ORG Tue Oct 11 13:19:57 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 17774106567A; Tue, 11 Oct 2011 13:19:57 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F126D8FC14; Tue, 11 Oct 2011 13:19:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9BDJuuC016736; Tue, 11 Oct 2011 13:19:56 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9BDJu4S016734; Tue, 11 Oct 2011 13:19:56 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201110111319.p9BDJu4S016734@svn.freebsd.org> From: Nathan Whitehorn Date: Tue, 11 Oct 2011 13:19:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226250 - stable/9/usr.sbin/bsdinstall/partedit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2011 13:19:57 -0000 Author: nwhitehorn Date: Tue Oct 11 13:19:56 2011 New Revision: 226250 URL: http://svn.freebsd.org/changeset/base/226250 Log: MFC r226161: Avoid magicking into existence sub-partitions due to leftover blocks when creating new ones by destroying any geom that may have come into existence immediately after adding a partition. The EBR partition scheme is particularly enthusiastic about false positives in this case. Approved by: re (kib) Modified: stable/9/usr.sbin/bsdinstall/partedit/gpart_ops.c Directory Properties: stable/9/usr.sbin/bsdinstall/ (props changed) Modified: stable/9/usr.sbin/bsdinstall/partedit/gpart_ops.c ============================================================================== --- stable/9/usr.sbin/bsdinstall/partedit/gpart_ops.c Tue Oct 11 13:19:06 2011 (r226249) +++ stable/9/usr.sbin/bsdinstall/partedit/gpart_ops.c Tue Oct 11 13:19:56 2011 (r226250) @@ -730,7 +730,7 @@ gpart_create(struct gprovider *pp, char struct gconsumer *cp; struct ggeom *geom; const char *errstr, *scheme; - char sizestr[32], startstr[32], output[64]; + char sizestr[32], startstr[32], output[64], *newpartname; char newfs[64], options_fstype[64]; intmax_t maxsize, size, sector, firstfree, stripe; uint64_t bytes; @@ -990,29 +990,43 @@ addpartform: if (items[3].text[0] != '\0') gctl_ro_param(r, "label", -1, items[3].text); gctl_rw_param(r, "output", sizeof(output), output); - errstr = gctl_issue(r); if (errstr != NULL && errstr[0] != '\0') { gpart_show_error("Error", NULL, errstr); gctl_free(r); goto addpartform; } + newpartname = strtok(output, " "); + gctl_free(r); + + /* + * Try to destroy any geom that gpart picked up already here from + * dirty blocks. + */ + r = gctl_get_handle(); + gctl_ro_param(r, "class", -1, "PART"); + gctl_ro_param(r, "arg0", -1, newpartname); + gctl_ro_param(r, "flags", -1, GPART_FLAGS); + junk = 1; + gctl_ro_param(r, "force", sizeof(junk), &junk); + gctl_ro_param(r, "verb", -1, "destroy"); + gctl_issue(r); /* Error usually expected and non-fatal */ + gctl_free(r); if (strcmp(items[0].text, "freebsd-boot") == 0) - get_part_metadata(strtok(output, " "), 1)->bootcode = 1; + get_part_metadata(newpartname, 1)->bootcode = 1; else if (strcmp(items[0].text, "freebsd") == 0) - gpart_partition(strtok(output, " "), "BSD"); + gpart_partition(newpartname, "BSD"); else - set_default_part_metadata(strtok(output, " "), scheme, + set_default_part_metadata(newpartname, scheme, items[0].text, items[2].text, newfs); for (i = 0; i < (sizeof(items) / sizeof(items[0])); i++) if (items[i].text_free) free(items[i].text); - gctl_free(r); if (partname != NULL) - *partname = strdup(strtok(output, " ")); + *partname = strdup(newpartname); } void @@ -1097,7 +1111,6 @@ gpart_revert_all(struct gmesh *mesh) struct gconfig *gc; struct ggeom *gp; struct gctl_req *r; - const char *errstr; const char *modified; LIST_FOREACH(classp, &mesh->lg_class, lg_class) { @@ -1128,9 +1141,7 @@ gpart_revert_all(struct gmesh *mesh) gctl_ro_param(r, "arg0", -1, gp->lg_name); gctl_ro_param(r, "verb", -1, "undo"); - errstr = gctl_issue(r); - if (errstr != NULL && errstr[0] != '\0') - gpart_show_error("Error", NULL, errstr); + gctl_issue(r); gctl_free(r); } } From owner-svn-src-all@FreeBSD.ORG Tue Oct 11 13:22:35 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7C452106566C; Tue, 11 Oct 2011 13:22:35 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 522CF8FC15; Tue, 11 Oct 2011 13:22:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9BDMZj8016902; Tue, 11 Oct 2011 13:22:35 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9BDMZR1016900; Tue, 11 Oct 2011 13:22:35 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201110111322.p9BDMZR1016900@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 11 Oct 2011 13:22:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226251 - stable/9/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2011 13:22:35 -0000 Author: kib Date: Tue Oct 11 13:22:35 2011 New Revision: 226251 URL: http://svn.freebsd.org/changeset/base/226251 Log: MFC r226022: Move parts of the commit log for r166167, where Tor explained the interaction between vnode locks and vfs_busy(), into comment. Approved by: re (bz) Modified: stable/9/sys/kern/vfs_subr.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/kern/vfs_subr.c ============================================================================== --- stable/9/sys/kern/vfs_subr.c Tue Oct 11 13:19:56 2011 (r226250) +++ stable/9/sys/kern/vfs_subr.c Tue Oct 11 13:22:35 2011 (r226251) @@ -348,6 +348,38 @@ SYSINIT(vfs, SI_SUB_VFS, SI_ORDER_FIRST, /* * Mark a mount point as busy. Used to synchronize access and to delay * unmounting. Eventually, mountlist_mtx is not released on failure. + * + * vfs_busy() is a custom lock, it can block the caller. + * vfs_busy() only sleeps if the unmount is active on the mount point. + * For a mountpoint mp, vfs_busy-enforced lock is before lock of any + * vnode belonging to mp. + * + * Lookup uses vfs_busy() to traverse mount points. + * root fs var fs + * / vnode lock A / vnode lock (/var) D + * /var vnode lock B /log vnode lock(/var/log) E + * vfs_busy lock C vfs_busy lock F + * + * Within each file system, the lock order is C->A->B and F->D->E. + * + * When traversing across mounts, the system follows that lock order: + * + * C->A->B + * | + * +->F->D->E + * + * The lookup() process for namei("/var") illustrates the process: + * VOP_LOOKUP() obtains B while A is held + * vfs_busy() obtains a shared lock on F while A and B are held + * vput() releases lock on B + * vput() releases lock on A + * VFS_ROOT() obtains lock on D while shared lock on F is held + * vfs_unbusy() releases shared lock on F + * vn_lock() obtains lock on deadfs vnode vp_crossmp instead of A. + * Attempt to lock A (instead of vp_crossmp) while D is held would + * violate the global order, causing deadlocks. + * + * dounmount() locks B while F is drained. */ int vfs_busy(struct mount *mp, int flags) From owner-svn-src-all@FreeBSD.ORG Tue Oct 11 13:24:37 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DB7BE106566C; Tue, 11 Oct 2011 13:24:37 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B229A8FC2C; Tue, 11 Oct 2011 13:24:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9BDObGI016998; Tue, 11 Oct 2011 13:24:37 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9BDObh4016996; Tue, 11 Oct 2011 13:24:37 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201110111324.p9BDObh4016996@svn.freebsd.org> From: Michael Tuexen Date: Tue, 11 Oct 2011 13:24:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226252 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2011 13:24:38 -0000 Author: tuexen Date: Tue Oct 11 13:24:37 2011 New Revision: 226252 URL: http://svn.freebsd.org/changeset/base/226252 Log: Use the most significant 6 bits of the dscp instead of the least significant ones. This has changed in the latest version of the socket API ID and provides backwards compatibility and gets it in syn with the usage of the IP_TOS socket option. MFC after: 3 days. Modified: head/sys/netinet/sctp_usrreq.c Modified: head/sys/netinet/sctp_usrreq.c ============================================================================== --- head/sys/netinet/sctp_usrreq.c Tue Oct 11 13:22:35 2011 (r226251) +++ head/sys/netinet/sctp_usrreq.c Tue Oct 11 13:24:37 2011 (r226252) @@ -2435,7 +2435,7 @@ flags_out: paddrp->spp_flags |= SPP_PMTUD_DISABLE; } if (net->dscp & 0x01) { - paddrp->spp_dscp = net->dscp >> 2; + paddrp->spp_dscp = net->dscp & 0xfc; paddrp->spp_flags |= SPP_DSCP; } #ifdef INET6 @@ -2453,7 +2453,7 @@ flags_out: paddrp->spp_pathmaxrxt = stcb->asoc.def_net_failure; paddrp->spp_pathmtu = sctp_get_frag_point(stcb, &stcb->asoc); if (stcb->asoc.default_dscp & 0x01) { - paddrp->spp_dscp = stcb->asoc.default_dscp >> 2; + paddrp->spp_dscp = stcb->asoc.default_dscp & 0xfc; paddrp->spp_flags |= SPP_DSCP; } #ifdef INET6 @@ -2488,7 +2488,7 @@ flags_out: paddrp->spp_assoc_id = SCTP_FUTURE_ASSOC; /* get inp's default */ if (inp->sctp_ep.default_dscp & 0x01) { - paddrp->spp_dscp = inp->sctp_ep.default_dscp >> 2; + paddrp->spp_dscp = inp->sctp_ep.default_dscp & 0xfc; paddrp->spp_flags |= SPP_DSCP; } #ifdef INET6 @@ -4691,7 +4691,7 @@ sctp_setopt(struct socket *so, int optna net->failure_threshold = paddrp->spp_pathmaxrxt; } if (paddrp->spp_flags & SPP_DSCP) { - net->dscp = paddrp->spp_dscp << 2; + net->dscp = paddrp->spp_dscp & 0xfc; net->dscp |= 0x01; } #ifdef INET6 @@ -4794,10 +4794,10 @@ sctp_setopt(struct socket *so, int optna } if (paddrp->spp_flags & SPP_DSCP) { TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) { - net->dscp = paddrp->spp_dscp << 2; + net->dscp = paddrp->spp_dscp & 0xfc; net->dscp |= 0x01; } - stcb->asoc.default_dscp = paddrp->spp_dscp << 2; + stcb->asoc.default_dscp = paddrp->spp_dscp & 0xfc; stcb->asoc.default_dscp |= 0x01; } #ifdef INET6 @@ -4851,7 +4851,7 @@ sctp_setopt(struct socket *so, int optna sctp_feature_on(inp, SCTP_PCB_FLAGS_DO_NOT_PMTUD); } if (paddrp->spp_flags & SPP_DSCP) { - inp->sctp_ep.default_dscp = paddrp->spp_dscp << 2; + inp->sctp_ep.default_dscp = paddrp->spp_dscp & 0xfc; inp->sctp_ep.default_dscp |= 0x01; } #ifdef INET6 From owner-svn-src-all@FreeBSD.ORG Tue Oct 11 13:40:38 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 347E91065672; Tue, 11 Oct 2011 13:40:38 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2445A8FC1B; Tue, 11 Oct 2011 13:40:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9BDecdF017547; Tue, 11 Oct 2011 13:40:38 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9BDec0q017545; Tue, 11 Oct 2011 13:40:38 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201110111340.p9BDec0q017545@svn.freebsd.org> From: Christian Brueffer Date: Tue, 11 Oct 2011 13:40:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226253 - head/sys/compat/linux X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2011 13:40:38 -0000 Author: brueffer Date: Tue Oct 11 13:40:37 2011 New Revision: 226253 URL: http://svn.freebsd.org/changeset/base/226253 Log: Add curly braces missed in r226247. Pointy hat to: brueffer Submitted by: many MFC after: 1 week Modified: head/sys/compat/linux/linux_uid16.c Modified: head/sys/compat/linux/linux_uid16.c ============================================================================== --- head/sys/compat/linux/linux_uid16.c Tue Oct 11 13:24:37 2011 (r226252) +++ head/sys/compat/linux/linux_uid16.c Tue Oct 11 13:40:37 2011 (r226253) @@ -113,9 +113,10 @@ linux_setgroups16(struct thread *td, str return (EINVAL); linux_gidset = malloc(ngrp * sizeof(*linux_gidset), M_TEMP, M_WAITOK); error = copyin(args->gidset, linux_gidset, ngrp * sizeof(l_gid16_t)); - if (error) + if (error) { free(linux_gidset, M_TEMP); return (error); + } newcred = crget(); p = td->td_proc; PROC_LOCK(p); From owner-svn-src-all@FreeBSD.ORG Tue Oct 11 13:42:43 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2ECDB106564A; Tue, 11 Oct 2011 13:42:43 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1DFB78FC15; Tue, 11 Oct 2011 13:42:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9BDghmQ017647; Tue, 11 Oct 2011 13:42:43 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9BDggw7017645; Tue, 11 Oct 2011 13:42:42 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201110111342.p9BDggw7017645@svn.freebsd.org> From: Attilio Rao Date: Tue, 11 Oct 2011 13:42:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226254 - stable/9/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2011 13:42:43 -0000 Author: attilio Date: Tue Oct 11 13:42:42 2011 New Revision: 226254 URL: http://svn.freebsd.org/changeset/base/226254 Log: MFC r226060: Skip TCP_SIGNATURE calculation for INP_TIMEWAIT case. Sponsored by: Sandvine Incorporated Approved by: re (kib) Modified: stable/9/sys/netinet/tcp_input.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/netinet/tcp_input.c ============================================================================== --- stable/9/sys/netinet/tcp_input.c Tue Oct 11 13:40:37 2011 (r226253) +++ stable/9/sys/netinet/tcp_input.c Tue Oct 11 13:42:42 2011 (r226254) @@ -948,24 +948,8 @@ relocked: } INP_INFO_WLOCK_ASSERT(&V_tcbinfo); -#ifdef TCP_SIGNATURE - tcp_dooptions(&to, optp, optlen, - (thflags & TH_SYN) ? TO_SYN : 0); - if (sig_checked == 0) { - tp = intotcpcb(inp); - if (tp == NULL || tp->t_state == TCPS_CLOSED) { - rstreason = BANDLIM_RST_CLOSEDPORT; - goto dropwithreset; - } - if (!tcp_signature_verify_input(m, off0, tlen, optlen, - &to, th, tp->t_flags)) - goto dropunlock; - sig_checked = 1; - } -#else if (thflags & TH_SYN) tcp_dooptions(&to, optp, optlen, TO_SYN); -#endif /* * NB: tcp_twcheck unlocks the INP and frees the mbuf. */ From owner-svn-src-all@FreeBSD.ORG Tue Oct 11 13:45:05 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4716A106564A; Tue, 11 Oct 2011 13:45:05 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 35D3E8FC13; Tue, 11 Oct 2011 13:45:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9BDj5qB017779; Tue, 11 Oct 2011 13:45:05 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9BDj5C6017775; Tue, 11 Oct 2011 13:45:05 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201110111345.p9BDj5C6017775@svn.freebsd.org> From: Attilio Rao Date: Tue, 11 Oct 2011 13:45:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226255 - stable/9/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2011 13:45:05 -0000 Author: attilio Date: Tue Oct 11 13:45:04 2011 New Revision: 226255 URL: http://svn.freebsd.org/changeset/base/226255 Log: Adaptive spinning for locking primitives, in read-mode, have some tuning SYSCTLs which are inappropriate for a daily use of the machine (mostly useful only by a developer which wants to run benchmarks on it). Remove them before the release as long as we do not want to ship with them in. Now that the SYSCTLs are gone, instead than use static storage for some constants, use real numeric constants in order to avoid eventual compiler dumbiness and the risk to share a storage (and then a cache-line) among CPUs when doing adaptive spinning together. Please note that this patch is not a MFC, but an 'edge case' as commit directly to STABLE_9. Approved by: re (kib) Modified: stable/9/sys/kern/kern_lock.c stable/9/sys/kern/kern_rwlock.c stable/9/sys/kern/kern_sx.c Modified: stable/9/sys/kern/kern_lock.c ============================================================================== --- stable/9/sys/kern/kern_lock.c Tue Oct 11 13:42:42 2011 (r226254) +++ stable/9/sys/kern/kern_lock.c Tue Oct 11 13:45:04 2011 (r226255) @@ -61,6 +61,11 @@ CTASSERT(LK_UNLOCKED == (LK_UNLOCKED & #define SQ_EXCLUSIVE_QUEUE 0 #define SQ_SHARED_QUEUE 1 +#ifdef ADAPTIVE_LOCKMGRS +#define ALK_RETRIES 10 +#define ALK_LOOPS 10000 +#endif + #ifndef INVARIANTS #define _lockmgr_assert(lk, what, file, line) #define TD_LOCKS_INC(td) @@ -155,14 +160,6 @@ struct lock_class lock_class_lockmgr = { #endif }; -#ifdef ADAPTIVE_LOCKMGRS -static u_int alk_retries = 10; -static u_int alk_loops = 10000; -SYSCTL_NODE(_debug, OID_AUTO, lockmgr, CTLFLAG_RD, NULL, "lockmgr debugging"); -SYSCTL_UINT(_debug_lockmgr, OID_AUTO, retries, CTLFLAG_RW, &alk_retries, 0, ""); -SYSCTL_UINT(_debug_lockmgr, OID_AUTO, loops, CTLFLAG_RW, &alk_loops, 0, ""); -#endif - static __inline struct thread * lockmgr_xholder(struct lock *lk) { @@ -573,14 +570,14 @@ __lockmgr_args(struct lock *lk, u_int fl continue; } else if (LK_CAN_ADAPT(lk, flags) && (x & LK_SHARE) != 0 && LK_SHARERS(x) && - spintries < alk_retries) { + spintries < ALK_RETRIES) { if (flags & LK_INTERLOCK) { class->lc_unlock(ilk); flags &= ~LK_INTERLOCK; } GIANT_SAVE(); spintries++; - for (i = 0; i < alk_loops; i++) { + for (i = 0; i < ALK_LOOPS; i++) { if (LOCK_LOG_TEST(&lk->lock_object, 0)) CTR4(KTR_LOCK, "%s: shared spinning on %p with %u and %u", @@ -592,7 +589,7 @@ __lockmgr_args(struct lock *lk, u_int fl cpu_spinwait(); } GIANT_RESTORE(); - if (i != alk_loops) + if (i != ALK_LOOPS) continue; } #endif @@ -789,7 +786,7 @@ __lockmgr_args(struct lock *lk, u_int fl continue; } else if (LK_CAN_ADAPT(lk, flags) && (x & LK_SHARE) != 0 && LK_SHARERS(x) && - spintries < alk_retries) { + spintries < ALK_RETRIES) { if ((x & LK_EXCLUSIVE_SPINNERS) == 0 && !atomic_cmpset_ptr(&lk->lk_lock, x, x | LK_EXCLUSIVE_SPINNERS)) @@ -800,7 +797,7 @@ __lockmgr_args(struct lock *lk, u_int fl } GIANT_SAVE(); spintries++; - for (i = 0; i < alk_loops; i++) { + for (i = 0; i < ALK_LOOPS; i++) { if (LOCK_LOG_TEST(&lk->lock_object, 0)) CTR4(KTR_LOCK, "%s: shared spinning on %p with %u and %u", @@ -811,7 +808,7 @@ __lockmgr_args(struct lock *lk, u_int fl cpu_spinwait(); } GIANT_RESTORE(); - if (i != alk_loops) + if (i != ALK_LOOPS) continue; } #endif Modified: stable/9/sys/kern/kern_rwlock.c ============================================================================== --- stable/9/sys/kern/kern_rwlock.c Tue Oct 11 13:42:42 2011 (r226254) +++ stable/9/sys/kern/kern_rwlock.c Tue Oct 11 13:45:04 2011 (r226255) @@ -56,11 +56,8 @@ __FBSDID("$FreeBSD$"); #endif #ifdef ADAPTIVE_RWLOCKS -static int rowner_retries = 10; -static int rowner_loops = 10000; -SYSCTL_NODE(_debug, OID_AUTO, rwlock, CTLFLAG_RD, NULL, "rwlock debugging"); -SYSCTL_INT(_debug_rwlock, OID_AUTO, retry, CTLFLAG_RW, &rowner_retries, 0, ""); -SYSCTL_INT(_debug_rwlock, OID_AUTO, loops, CTLFLAG_RW, &rowner_loops, 0, ""); +#define ROWNER_RETRIES 10 +#define ROWNER_LOOPS 10000 #endif #ifdef DDB @@ -380,15 +377,15 @@ _rw_rlock(struct rwlock *rw, const char } continue; } - } else if (spintries < rowner_retries) { + } else if (spintries < ROWNER_RETRIES) { spintries++; - for (i = 0; i < rowner_loops; i++) { + for (i = 0; i < ROWNER_LOOPS; i++) { v = rw->rw_lock; if ((v & RW_LOCK_READ) == 0 || RW_CAN_READ(v)) break; cpu_spinwait(); } - if (i != rowner_loops) + if (i != ROWNER_LOOPS) continue; } #endif @@ -691,7 +688,7 @@ _rw_wlock_hard(struct rwlock *rw, uintpt continue; } if ((v & RW_LOCK_READ) && RW_READERS(v) && - spintries < rowner_retries) { + spintries < ROWNER_RETRIES) { if (!(v & RW_LOCK_WRITE_SPINNER)) { if (!atomic_cmpset_ptr(&rw->rw_lock, v, v | RW_LOCK_WRITE_SPINNER)) { @@ -699,15 +696,15 @@ _rw_wlock_hard(struct rwlock *rw, uintpt } } spintries++; - for (i = 0; i < rowner_loops; i++) { + for (i = 0; i < ROWNER_LOOPS; i++) { if ((rw->rw_lock & RW_LOCK_WRITE_SPINNER) == 0) break; cpu_spinwait(); } #ifdef KDTRACE_HOOKS - spin_cnt += rowner_loops - i; + spin_cnt += ROWNER_LOOPS - i; #endif - if (i != rowner_loops) + if (i != ROWNER_LOOPS) continue; } #endif Modified: stable/9/sys/kern/kern_sx.c ============================================================================== --- stable/9/sys/kern/kern_sx.c Tue Oct 11 13:42:42 2011 (r226254) +++ stable/9/sys/kern/kern_sx.c Tue Oct 11 13:45:04 2011 (r226255) @@ -71,6 +71,11 @@ CTASSERT((SX_NOADAPTIVE & LO_CLASSFLAGS) #define SQ_EXCLUSIVE_QUEUE 0 #define SQ_SHARED_QUEUE 1 +#ifdef ADAPTIVE_SX +#define ASX_RETRIES 10 +#define ASX_LOOPS 10000 +#endif + /* * Variations on DROP_GIANT()/PICKUP_GIANT() for use in this file. We * drop Giant anytime we have to sleep or if we adaptively spin. @@ -133,14 +138,6 @@ struct lock_class lock_class_sx = { #define _sx_assert(sx, what, file, line) #endif -#ifdef ADAPTIVE_SX -static u_int asx_retries = 10; -static u_int asx_loops = 10000; -SYSCTL_NODE(_debug, OID_AUTO, sx, CTLFLAG_RD, NULL, "sxlock debugging"); -SYSCTL_UINT(_debug_sx, OID_AUTO, retries, CTLFLAG_RW, &asx_retries, 0, ""); -SYSCTL_UINT(_debug_sx, OID_AUTO, loops, CTLFLAG_RW, &asx_loops, 0, ""); -#endif - void assert_sx(struct lock_object *lock, int what) { @@ -529,10 +526,10 @@ _sx_xlock_hard(struct sx *sx, uintptr_t } continue; } - } else if (SX_SHARERS(x) && spintries < asx_retries) { + } else if (SX_SHARERS(x) && spintries < ASX_RETRIES) { GIANT_SAVE(); spintries++; - for (i = 0; i < asx_loops; i++) { + for (i = 0; i < ASX_LOOPS; i++) { if (LOCK_LOG_TEST(&sx->lock_object, 0)) CTR4(KTR_LOCK, "%s: shared spinning on %p with %u and %u", @@ -546,7 +543,7 @@ _sx_xlock_hard(struct sx *sx, uintptr_t spin_cnt++; #endif } - if (i != asx_loops) + if (i != ASX_LOOPS) continue; } } From owner-svn-src-all@FreeBSD.ORG Tue Oct 11 13:46:27 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 32DE1106566C; Tue, 11 Oct 2011 13:46:27 +0000 (UTC) (envelope-from SRS0=YiYk=42=FreeBSD.org=brueffer@srs.kundenserver.de) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.187]) by mx1.freebsd.org (Postfix) with ESMTP id B41E58FC13; Tue, 11 Oct 2011 13:46:26 +0000 (UTC) Received: from hd5b90bea.sedadby.dyn.perspektivbredband.net (hd5b90bea.sedadby.dyn.perspektivbredband.net [213.185.11.234]) by mrelayeu.kundenserver.de (node=mreu2) with ESMTP (Nemesis) id 0MYa6I-1Ra9Xz3HgQ-00Usg8; Tue, 11 Oct 2011 15:33:50 +0200 Message-ID: <4E9445BC.3020205@FreeBSD.org> Date: Tue, 11 Oct 2011 15:33:48 +0200 From: Christian Brueffer User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 MIME-Version: 1.0 To: Giovanni Trematerra References: <201110111032.p9BAWNpw011158@svn.freebsd.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:HRTjXtaUWGu3Ycw+0J8COGc0EDqH+YMLB9dCkZX30rh TkTJsdsNkHRolrHYjkpvJlohzk+Q4AON85nNAbBwofBQk1tYIi ymQa4I7hM2WrXaTRsCxCZ0Cz6D1ZROZWIzh2oS34U4JOy8nx4V 4P8JdtjOStmZAU9npqvKwG/0dYNHcHAsqSa2D/dyU5tFQabPGa 3xLJMFFE9HVG9PaTxnjGEILp3Gs20JuL4k8JX5dE6AkKWMzfrq uui1INpWjf+TliA1shi3xSjSHYqgGyIv6kTQLPmVdv/y7mnhKO gYhKhfHhOavc+ln5PXABEpk1pVOqwURODJDb4Vu03yKAEFOsnb K/MlrmVoBYJ18NXtrFUqqDcLkg8886VLeRdSRiHOJPIdD7K77J r396twKrSbRqlquzwLq/gr/NVOWHAWRVM8= Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r226247 - head/sys/compat/linux X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2011 13:46:27 -0000 On 10/11/11 13:26 , Giovanni Trematerra wrote: > On Tue, Oct 11, 2011 at 12:32 PM, Christian Brueffer > wrote: >> Author: brueffer >> Date: Tue Oct 11 10:32:23 2011 >> New Revision: 226247 >> URL: http://svn.freebsd.org/changeset/base/226247 >> >> Log: >> Properly free linux_gidset in case of an error. >> >> CID: 4136 >> Found with: Coverity Prevent(tm) >> MFC after: 1 week >> >> Modified: >> head/sys/compat/linux/linux_uid16.c >> >> Modified: head/sys/compat/linux/linux_uid16.c >> ============================================================================== >> --- head/sys/compat/linux/linux_uid16.c Tue Oct 11 07:46:45 2011 (r226246) >> +++ head/sys/compat/linux/linux_uid16.c Tue Oct 11 10:32:23 2011 (r226247) >> @@ -114,6 +114,7 @@ linux_setgroups16(struct thread *td, str >> linux_gidset = malloc(ngrp * sizeof(*linux_gidset), M_TEMP, M_WAITOK); >> error = copyin(args->gidset, linux_gidset, ngrp * sizeof(l_gid16_t)); >> if (error) >> + free(linux_gidset, M_TEMP); >> return (error); >> newcred = crget(); >> p = td->td_proc; > > Did you miss { } ? > Gah, one of those things not cought by compile-testing. Fixing it now, thanks! Christian From owner-svn-src-all@FreeBSD.ORG Tue Oct 11 13:54:21 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3E21E1065679; Tue, 11 Oct 2011 13:54:21 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 139AF8FC12; Tue, 11 Oct 2011 13:54:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9BDsKQG018111; Tue, 11 Oct 2011 13:54:20 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9BDsKAP018108; Tue, 11 Oct 2011 13:54:20 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201110111354.p9BDsKAP018108@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 11 Oct 2011 13:54:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226256 - stable/8/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2011 13:54:21 -0000 Author: kib Date: Tue Oct 11 13:54:20 2011 New Revision: 226256 URL: http://svn.freebsd.org/changeset/base/226256 Log: MFC r225791: Do not deliver SIGTRAP on exec as the normal signal, use ptracestop() on syscall exit path. Otherwise, if SIGTRAP is ignored, that tdsendsignal() do not want to deliver the signal, and debugger never get a notification of exec. Modified: stable/8/sys/kern/kern_exec.c stable/8/sys/kern/subr_syscall.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/kern/kern_exec.c ============================================================================== --- stable/8/sys/kern/kern_exec.c Tue Oct 11 13:45:04 2011 (r226255) +++ stable/8/sys/kern/kern_exec.c Tue Oct 11 13:54:20 2011 (r226256) @@ -743,17 +743,6 @@ interpret: KNOTE_LOCKED(&p->p_klist, NOTE_EXEC); p->p_flag &= ~P_INEXEC; - /* - * If tracing the process, trap to debugger so breakpoints - * can be set before the program executes. - * Use tdsignal to deliver signal to current thread, use - * psignal may cause the signal to be delivered to wrong thread - * because that thread will exit, remember we are going to enter - * single thread mode. - */ - if (p->p_flag & P_TRACED) - tdsignal(p, td, SIGTRAP, NULL); - /* clear "fork but no exec" flag, as we _are_ execing */ p->p_acflag &= ~AFORK; Modified: stable/8/sys/kern/subr_syscall.c ============================================================================== --- stable/8/sys/kern/subr_syscall.c Tue Oct 11 13:45:04 2011 (r226255) +++ stable/8/sys/kern/subr_syscall.c Tue Oct 11 13:54:20 2011 (r226256) @@ -186,9 +186,17 @@ syscallret(struct thread *td, int error, * is not the case, this code will need to be revisited. */ STOPEVENT(p, S_SCX, sa->code); - PTRACESTOP_SC(p, td, S_PT_SCX); if (traced || (td->td_dbgflags & (TDB_EXEC | TDB_FORK)) != 0) { PROC_LOCK(p); + /* + * If tracing the execed process, trap to the debugger + * so that breakpoints can be set before the program + * executes. If debugger requested tracing of syscall + * returns, do it now too. + */ + if (traced && ((td->td_dbgflags & TDB_EXEC) != 0 || + (p->p_stops & S_PT_SCX) != 0)) + ptracestop(td, SIGTRAP); td->td_dbgflags &= ~(TDB_SCX | TDB_EXEC | TDB_FORK); PROC_UNLOCK(p); } From owner-svn-src-all@FreeBSD.ORG Tue Oct 11 13:56:38 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 26832106564A; Tue, 11 Oct 2011 13:56:38 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F08938FC16; Tue, 11 Oct 2011 13:56:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9BDubnw018250; Tue, 11 Oct 2011 13:56:37 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9BDubHV018248; Tue, 11 Oct 2011 13:56:37 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201110111356.p9BDubHV018248@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 11 Oct 2011 13:56:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226257 - stable/8/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2011 13:56:38 -0000 Author: kib Date: Tue Oct 11 13:56:37 2011 New Revision: 226257 URL: http://svn.freebsd.org/changeset/base/226257 Log: MFC r226022: Move parts of the commit log for r166167, where Tor explained the interaction between vnode locks and vfs_busy(), into comment. Modified: stable/8/sys/kern/vfs_subr.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/kern/vfs_subr.c ============================================================================== --- stable/8/sys/kern/vfs_subr.c Tue Oct 11 13:54:20 2011 (r226256) +++ stable/8/sys/kern/vfs_subr.c Tue Oct 11 13:56:37 2011 (r226257) @@ -351,6 +351,38 @@ SYSINIT(vfs, SI_SUB_VFS, SI_ORDER_FIRST, /* * Mark a mount point as busy. Used to synchronize access and to delay * unmounting. Eventually, mountlist_mtx is not released on failure. + * + * vfs_busy() is a custom lock, it can block the caller. + * vfs_busy() only sleeps if the unmount is active on the mount point. + * For a mountpoint mp, vfs_busy-enforced lock is before lock of any + * vnode belonging to mp. + * + * Lookup uses vfs_busy() to traverse mount points. + * root fs var fs + * / vnode lock A / vnode lock (/var) D + * /var vnode lock B /log vnode lock(/var/log) E + * vfs_busy lock C vfs_busy lock F + * + * Within each file system, the lock order is C->A->B and F->D->E. + * + * When traversing across mounts, the system follows that lock order: + * + * C->A->B + * | + * +->F->D->E + * + * The lookup() process for namei("/var") illustrates the process: + * VOP_LOOKUP() obtains B while A is held + * vfs_busy() obtains a shared lock on F while A and B are held + * vput() releases lock on B + * vput() releases lock on A + * VFS_ROOT() obtains lock on D while shared lock on F is held + * vfs_unbusy() releases shared lock on F + * vn_lock() obtains lock on deadfs vnode vp_crossmp instead of A. + * Attempt to lock A (instead of vp_crossmp) while D is held would + * violate the global order, causing deadlocks. + * + * dounmount() locks B while F is drained. */ int vfs_busy(struct mount *mp, int flags) From owner-svn-src-all@FreeBSD.ORG Tue Oct 11 14:05:40 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5AB08106564A; Tue, 11 Oct 2011 14:05:40 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 309768FC19; Tue, 11 Oct 2011 14:05:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9BE5ekN018638; Tue, 11 Oct 2011 14:05:40 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9BE5ec0018636; Tue, 11 Oct 2011 14:05:40 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201110111405.p9BE5ec0018636@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 11 Oct 2011 14:05:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226259 - stable/7/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2011 14:05:40 -0000 Author: kib Date: Tue Oct 11 14:05:39 2011 New Revision: 226259 URL: http://svn.freebsd.org/changeset/base/226259 Log: MFC r226022: Move parts of the commit log for r166167, where Tor explained the interaction between vnode locks and vfs_busy(), into comment. Comment is slightly edited to better fit into RELENG_7 reality. Modified: stable/7/sys/kern/vfs_subr.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/kern/vfs_subr.c ============================================================================== --- stable/7/sys/kern/vfs_subr.c Tue Oct 11 14:03:18 2011 (r226258) +++ stable/7/sys/kern/vfs_subr.c Tue Oct 11 14:05:39 2011 (r226259) @@ -335,6 +335,37 @@ SYSINIT(vfs, SI_SUB_VFS, SI_ORDER_FIRST, /* * Mark a mount point as busy. Used to synchronize access and to delay * unmounting. Interlock is not released on failure. + * + * vfs_busy() only sleeps if the unmount is active on the mount point. + * For a mountpoint mp, vfs_busy-enforced lock is before lock of any + * vnode belonging to mp. + * + * Lookup uses vfs_busy() to traverse mount points. + * root fs var fs + * / vnode lock A / vnode lock (/var) D + * /var vnode lock B /log vnode lock(/var/log) E + * vfs_busy lock C vfs_busy lock F + * + * Within each file system, the lock order is C->A->B and F->D->E. + * + * When traversing across mounts, the system follows that lock order: + * + * C->A->B + * | + * +->F->D->E + * + * The lookup() process for namei("/var") illustrates the process: + * VOP_LOOKUP() obtains B while A is held + * vfs_busy() obtains a shared lock on F while A and B are held + * vput() releases lock on B + * vput() releases lock on A + * VFS_ROOT() obtains lock on D while shared lock on F is held + * vfs_unbusy() releases shared lock on F + * vn_lock() obtains lock on deadfs vnode vp_crossmp instead of A. + * Attempt to lock A (instead of vp_crossmp) while D is held would + * violate the global order, causing deadlocks. + * + * dounmount() locks B while F is drained. */ int vfs_busy(struct mount *mp, int flags, struct mtx *interlkp, From owner-svn-src-all@FreeBSD.ORG Tue Oct 11 14:39:20 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4DEEB106566C; Tue, 11 Oct 2011 14:39:20 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3D1E48FC15; Tue, 11 Oct 2011 14:39:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9BEdKeY019733; Tue, 11 Oct 2011 14:39:20 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9BEdK5I019731; Tue, 11 Oct 2011 14:39:20 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201110111439.p9BEdK5I019731@svn.freebsd.org> From: Attilio Rao Date: Tue, 11 Oct 2011 14:39:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226260 - stable/8/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2011 14:39:20 -0000 Author: attilio Date: Tue Oct 11 14:39:19 2011 New Revision: 226260 URL: http://svn.freebsd.org/changeset/base/226260 Log: MFC r226060: Skip TCP_SIGNATURE calculation for INP_TIMEWAIT case. Sponsored by: Sandvine Incorporated Modified: stable/8/sys/netinet/tcp_input.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/netinet/tcp_input.c ============================================================================== --- stable/8/sys/netinet/tcp_input.c Tue Oct 11 14:05:39 2011 (r226259) +++ stable/8/sys/netinet/tcp_input.c Tue Oct 11 14:39:19 2011 (r226260) @@ -902,24 +902,8 @@ relocked: } INP_INFO_WLOCK_ASSERT(&V_tcbinfo); -#ifdef TCP_SIGNATURE - tcp_dooptions(&to, optp, optlen, - (thflags & TH_SYN) ? TO_SYN : 0); - if (sig_checked == 0) { - tp = intotcpcb(inp); - if (tp == NULL || tp->t_state == TCPS_CLOSED) { - rstreason = BANDLIM_RST_CLOSEDPORT; - goto dropwithreset; - } - if (!tcp_signature_verify_input(m, off0, tlen, optlen, - &to, th, tp->t_flags)) - goto dropunlock; - sig_checked = 1; - } -#else if (thflags & TH_SYN) tcp_dooptions(&to, optp, optlen, TO_SYN); -#endif /* * NB: tcp_twcheck unlocks the INP and frees the mbuf. */ From owner-svn-src-all@FreeBSD.ORG Tue Oct 11 14:54:44 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DD58E106564A; Tue, 11 Oct 2011 14:54:44 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from gw02.mail.saunalahti.fi (gw02.mail.saunalahti.fi [195.197.172.116]) by mx1.freebsd.org (Postfix) with ESMTP id 91A658FC1A; Tue, 11 Oct 2011 14:54:44 +0000 (UTC) Received: from jh (a91-153-115-208.elisa-laajakaista.fi [91.153.115.208]) by gw02.mail.saunalahti.fi (Postfix) with ESMTP id E0F31139FB0; Tue, 11 Oct 2011 17:54:38 +0300 (EEST) Date: Tue, 11 Oct 2011 17:54:38 +0300 From: Jaakko Heinonen To: Dag-Erling =?utf-8?B?U23DuHJncmF2?= Message-ID: <20111011145438.GB69508@jh> References: <201110081221.p98CLpWq062285@svn.freebsd.org> <20111010145642.GA2057@a91-153-123-205.elisa-laajakaista.fi> <86hb3gj7ja.fsf@ds4.des.no> <20111011090049.GA69508@jh> <868vorkg1q.fsf@ds4.des.no> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <868vorkg1q.fsf@ds4.des.no> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r226151 - head/usr.bin/kdump X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2011 14:54:45 -0000 On 2011-10-11, Dag-Erling Smørgrav wrote: > @@ -113,6 +114,8 @@ > #define print_number(i,n,c) do { \ > if (decimal) \ > printf("%c%jd", c, (intmax_t)*i); \ > + else if (sizeof(*i) == sizeof(long)) \ > + printf("%c%#lx", c, (unsigned long)*i); \ > else \ > printf("%c%#jx", c, (uintmax_t)*i); \ > i++; \ This assumes that sizeof(*i) is always sizeof(long) or sizeof(uintmax_t). I prefer the fix bde suggested in another mail if it's possible (I don't know if *i is always type of register_t). -- Jaakko From owner-svn-src-all@FreeBSD.ORG Tue Oct 11 14:56:23 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D4A8D1065670; Tue, 11 Oct 2011 14:56:23 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 673B38FC1D; Tue, 11 Oct 2011 14:56:23 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 96DC11FFC3D; Tue, 11 Oct 2011 14:56:22 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 8BCB8B93C; Tue, 11 Oct 2011 16:56:22 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Jaakko Heinonen References: <201110081221.p98CLpWq062285@svn.freebsd.org> <20111010145642.GA2057@a91-153-123-205.elisa-laajakaista.fi> <86hb3gj7ja.fsf@ds4.des.no> <20111011090049.GA69508@jh> <868vorkg1q.fsf@ds4.des.no> <20111011145438.GB69508@jh> Date: Tue, 11 Oct 2011 16:56:22 +0200 In-Reply-To: <20111011145438.GB69508@jh> (Jaakko Heinonen's message of "Tue, 11 Oct 2011 17:54:38 +0300") Message-ID: <86obxnshk9.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r226151 - head/usr.bin/kdump X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2011 14:56:23 -0000 Jaakko Heinonen writes: > This assumes that sizeof(*i) is always sizeof(long) or > sizeof(uintmax_t). I prefer the fix bde suggested in another mail if > it's possible (I don't know if *i is always type of register_t). It is. I didn't realize there was a u_register_t. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-all@FreeBSD.ORG Tue Oct 11 15:03:43 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3DC03106566C; Tue, 11 Oct 2011 15:03:43 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2B64D8FC12; Tue, 11 Oct 2011 15:03:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9BF3hsw020618; Tue, 11 Oct 2011 15:03:43 GMT (envelope-from gabor@svn.freebsd.org) Received: (from gabor@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9BF3hQV020612; Tue, 11 Oct 2011 15:03:43 GMT (envelope-from gabor@svn.freebsd.org) Message-Id: <201110111503.p9BF3hQV020612@svn.freebsd.org> From: Gabor Kovesdan Date: Tue, 11 Oct 2011 15:03:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226261 - in stable/9/usr.bin/grep: . regex X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2011 15:03:43 -0000 Author: gabor Date: Tue Oct 11 15:03:42 2011 New Revision: 226261 URL: http://svn.freebsd.org/changeset/base/226261 Log: MFC 226035, 226047: Update BSD grep to the latest development version. It has some code backported that was written for the TRE integration project in Google Summer of Code 2011. This is a temporary solution until the whole regex library is not replaced so that BSD grep development can continue and the backported code gets some review and testing. This change only improves scalability slightly, there is no big performance boost yet but several minor bugs have been found and fixed. Approved by: re (kib), delphij (mentor, implicit) Sposored by: Google Summer of Code 2011 Added: stable/9/usr.bin/grep/regex/ - copied from r226035, head/usr.bin/grep/regex/ Deleted: stable/9/usr.bin/grep/fastgrep.c Modified: stable/9/usr.bin/grep/Makefile stable/9/usr.bin/grep/file.c stable/9/usr.bin/grep/grep.c stable/9/usr.bin/grep/grep.h stable/9/usr.bin/grep/regex/tre-fastmatch.c stable/9/usr.bin/grep/util.c Directory Properties: stable/9/usr.bin/grep/ (props changed) Modified: stable/9/usr.bin/grep/Makefile ============================================================================== --- stable/9/usr.bin/grep/Makefile Tue Oct 11 14:39:19 2011 (r226260) +++ stable/9/usr.bin/grep/Makefile Tue Oct 11 15:03:42 2011 (r226261) @@ -8,28 +8,52 @@ PROG= grep .else PROG= bsdgrep +CLEANFILES+= bsdgrep.1 + +bsdgrep.1: grep.1 + cp ${.ALLSRC} ${.TARGET} .endif -SRCS= fastgrep.c file.c grep.c queue.c util.c +SRCS= file.c grep.c queue.c util.c + +# Extra files ported backported form some regex improvements +.PATH: ${.CURDIR}/regex +SRCS+= fastmatch.c hashtable.c tre-compile.c tre-fastmatch.c xmalloc.c +CFLAGS+=-I${.CURDIR}/regex .if ${MK_BSD_GREP} == "yes" LINKS= ${BINDIR}/grep ${BINDIR}/egrep \ ${BINDIR}/grep ${BINDIR}/fgrep \ ${BINDIR}/grep ${BINDIR}/zgrep \ ${BINDIR}/grep ${BINDIR}/zegrep \ - ${BINDIR}/grep ${BINDIR}/zfgrep + ${BINDIR}/grep ${BINDIR}/zfgrep \ + ${BINDIR}/grep ${BINDIR}/bzgrep \ + ${BINDIR}/grep ${BINDIR}/bzegrep \ + ${BINDIR}/grep ${BINDIR}/bzfgrep \ + ${BINDIR}/grep ${BINDIR}/xzgrep \ + ${BINDIR}/grep ${BINDIR}/xzegrep \ + ${BINDIR}/grep ${BINDIR}/xzfgrep \ + ${BINDIR}/grep ${BINDIR}/lzgrep \ + ${BINDIR}/grep ${BINDIR}/lzegrep \ + ${BINDIR}/grep ${BINDIR}/lzfgrep MLINKS= grep.1 egrep.1 \ grep.1 fgrep.1 \ grep.1 zgrep.1 \ grep.1 zegrep.1 \ - grep.1 zfgrep.1 + grep.1 zfgrep.1 \ + grep.1 bzgrep.1 \ + grep.1 bzegrep.1 \ + grep.1 bzfgrep.1 \ + grep.1 xzgrep.1 \ + grep.1 xzegrep.1 \ + grep.1 xzfgrep.1 \ + grep.1 lzgrep.1 \ + grep.1 lzegrep.1 \ + grep.1 lzfgrep.1 .endif -bsdgrep.1: grep.1 - cp ${.ALLSRC} ${.TARGET} - -LDADD= -lz -lbz2 -DPADD= ${LIBZ} ${LIBBZ2} +LDADD= -lz -lbz2 -llzma +DPADD= ${LIBZ} ${LIBBZ2} ${LIBLZMA} .if !defined(WITHOUT_GNU_COMPAT) CFLAGS+= -I/usr/include/gnu Modified: stable/9/usr.bin/grep/file.c ============================================================================== --- stable/9/usr.bin/grep/file.c Tue Oct 11 14:39:19 2011 (r226260) +++ stable/9/usr.bin/grep/file.c Tue Oct 11 15:03:42 2011 (r226261) @@ -34,13 +34,15 @@ __FBSDID("$FreeBSD$"); #include -#include +#include #include +#include #include #include #include #include +#include #include #include #include @@ -56,10 +58,12 @@ __FBSDID("$FreeBSD$"); static gzFile gzbufdesc; static BZFILE* bzbufdesc; +static lzma_stream lstrm = LZMA_STREAM_INIT; -static unsigned char buffer[MAXBUFSIZ]; +static unsigned char *buffer; static unsigned char *bufpos; static size_t bufrem; +static size_t fsiz; static unsigned char *lnbuf; static size_t lnbuflen; @@ -70,6 +74,9 @@ grep_refill(struct file *f) ssize_t nr; int bzerr; + if (filebehave == FILE_MMAP) + return (0); + bufpos = buffer; bufrem = 0; @@ -101,6 +108,36 @@ grep_refill(struct file *f) /* Make sure we exit with an error */ nr = -1; } + } else if ((filebehave == FILE_XZ) || (filebehave == FILE_LZMA)) { + lzma_action action = LZMA_RUN; + uint8_t in_buf[MAXBUFSIZ]; + lzma_ret ret; + + ret = (filebehave == FILE_XZ) ? + lzma_stream_decoder(&lstrm, UINT64_MAX, + LZMA_CONCATENATED) : + lzma_alone_decoder(&lstrm, UINT64_MAX); + + if (ret != LZMA_OK) + return (-1); + + lstrm.next_out = buffer; + lstrm.avail_out = MAXBUFSIZ; + lstrm.next_in = in_buf; + nr = read(f->fd, in_buf, MAXBUFSIZ); + + if (nr < 0) + return (-1); + else if (nr == 0) + action = LZMA_FINISH; + + lstrm.avail_in = nr; + ret = lzma_code(&lstrm, action); + + if (ret != LZMA_OK && ret != LZMA_STREAM_END) + return (-1); + bufrem = MAXBUFSIZ - lstrm.avail_out; + return (0); } else nr = read(f->fd, buffer, MAXBUFSIZ); @@ -186,56 +223,76 @@ error: return (NULL); } -static inline struct file * -grep_file_init(struct file *f) +/* + * Opens a file for processing. + */ +struct file * +grep_open(const char *path) { + struct file *f; + + f = grep_malloc(sizeof *f); + memset(f, 0, sizeof *f); + if (path == NULL) { + /* Processing stdin implies --line-buffered. */ + lbflag = true; + f->fd = STDIN_FILENO; + } else if ((f->fd = open(path, O_RDONLY)) == -1) + goto error1; + + if (filebehave == FILE_MMAP) { + struct stat st; + + if ((fstat(f->fd, &st) == -1) || (st.st_size > OFF_MAX) || + (!S_ISREG(st.st_mode))) + filebehave = FILE_STDIO; + else { + int flags = MAP_PRIVATE | MAP_NOCORE | MAP_NOSYNC; +#ifdef MAP_PREFAULT_READ + flags |= MAP_PREFAULT_READ; +#endif + fsiz = st.st_size; + buffer = mmap(NULL, fsiz, PROT_READ, flags, + f->fd, (off_t)0); + if (buffer == MAP_FAILED) + filebehave = FILE_STDIO; + else { + bufrem = st.st_size; + bufpos = buffer; + madvise(buffer, st.st_size, MADV_SEQUENTIAL); + } + } + } + + if ((buffer == NULL) || (buffer == MAP_FAILED)) + buffer = grep_malloc(MAXBUFSIZ); if (filebehave == FILE_GZIP && (gzbufdesc = gzdopen(f->fd, "r")) == NULL) - goto error; + goto error2; if (filebehave == FILE_BZIP && (bzbufdesc = BZ2_bzdopen(f->fd, "r")) == NULL) - goto error; + goto error2; /* Fill read buffer, also catches errors early */ - if (grep_refill(f) != 0) - goto error; + if (bufrem == 0 && grep_refill(f) != 0) + goto error2; /* Check for binary stuff, if necessary */ if (binbehave != BINFILE_TEXT && memchr(bufpos, '\0', bufrem) != NULL) - f->binary = true; + f->binary = true; return (f); -error: + +error2: close(f->fd); +error1: free(f); return (NULL); } /* - * Opens a file for processing. - */ -struct file * -grep_open(const char *path) -{ - struct file *f; - - f = grep_malloc(sizeof *f); - memset(f, 0, sizeof *f); - if (path == NULL) { - /* Processing stdin implies --line-buffered. */ - lbflag = true; - f->fd = STDIN_FILENO; - } else if ((f->fd = open(path, O_RDONLY)) == -1) { - free(f); - return (NULL); - } - - return (grep_file_init(f)); -} - -/* * Closes a file. */ void @@ -245,6 +302,10 @@ grep_close(struct file *f) close(f->fd); /* Reset read buffer and line buffer */ + if (filebehave == FILE_MMAP) { + munmap(buffer, fsiz); + buffer = NULL; + } bufpos = buffer; bufrem = 0; Modified: stable/9/usr.bin/grep/grep.c ============================================================================== --- stable/9/usr.bin/grep/grep.c Tue Oct 11 14:39:19 2011 (r226260) +++ stable/9/usr.bin/grep/grep.c Tue Oct 11 15:03:42 2011 (r226261) @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -48,6 +49,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include "fastmatch.h" #include "grep.h" #ifndef WITHOUT_NLS @@ -81,9 +83,9 @@ bool matchall; /* Searching patterns */ unsigned int patterns, pattern_sz; -char **pattern; +struct pat *pattern; regex_t *r_pattern; -fastgrep_t *fg_pattern; +fastmatch_t *fg_pattern; /* Filename exclusion/inclusion patterns */ unsigned int fpatterns, fpattern_sz; @@ -104,7 +106,7 @@ bool hflag; /* -h: don't print filenam bool iflag; /* -i: ignore case */ bool lflag; /* -l: only show names of files with matches */ bool mflag; /* -m x: stop reading the files after x matches */ -unsigned long long mcount; /* count for -m */ +long long mcount; /* count for -m */ bool nflag; /* -n: show line numbers in front of matching lines */ bool oflag; /* -o: print only matching part */ bool qflag; /* -q: quiet mode (don't output anything) */ @@ -164,7 +166,7 @@ usage(void) exit(2); } -static const char *optstr = "0123456789A:B:C:D:EFGHIJLOPSRUVZabcd:e:f:hilm:nopqrsuvwxy"; +static const char *optstr = "0123456789A:B:C:D:EFGHIJMLOPSRUVZabcd:e:f:hilm:nopqrsuvwxXy"; struct option long_options[] = { @@ -200,6 +202,7 @@ struct option long_options[] = {"files-with-matches", no_argument, NULL, 'l'}, {"files-without-match", no_argument, NULL, 'L'}, {"max-count", required_argument, NULL, 'm'}, + {"lzma", no_argument, NULL, 'M'}, {"line-number", no_argument, NULL, 'n'}, {"only-matching", no_argument, NULL, 'o'}, {"quiet", no_argument, NULL, 'q'}, @@ -212,6 +215,7 @@ struct option long_options[] = {"version", no_argument, NULL, 'V'}, {"word-regexp", no_argument, NULL, 'w'}, {"line-regexp", no_argument, NULL, 'x'}, + {"xz", no_argument, NULL, 'X'}, {"decompress", no_argument, NULL, 'Z'}, {NULL, no_argument, NULL, 0} }; @@ -223,23 +227,35 @@ static void add_pattern(char *pat, size_t len) { + /* Do not add further pattern is we already match everything */ + if (matchall) + return; + /* Check if we can do a shortcut */ - if (len == 0 || matchall) { + if (len == 0) { matchall = true; + for (unsigned int i = 0; i < patterns; i++) { + free(pattern[i].pat); + } + pattern = grep_realloc(pattern, sizeof(struct pat)); + pattern[0].pat = NULL; + pattern[0].len = 0; + patterns = 1; return; } /* Increase size if necessary */ if (patterns == pattern_sz) { pattern_sz *= 2; pattern = grep_realloc(pattern, ++pattern_sz * - sizeof(*pattern)); + sizeof(struct pat)); } if (len > 0 && pat[len - 1] == '\n') --len; /* pat may not be NUL-terminated */ - pattern[patterns] = grep_malloc(len + 1); - memcpy(pattern[patterns], pat, len); - pattern[patterns][len] = '\0'; + pattern[patterns].pat = grep_malloc(len + 1); + memcpy(pattern[patterns].pat, pat, len); + pattern[patterns].len = len; + pattern[patterns].pat[len] = '\0'; ++patterns; } @@ -285,14 +301,19 @@ add_dpattern(const char *pat, int mode) static void read_patterns(const char *fn) { + struct stat st; FILE *f; char *line; size_t len; if ((f = fopen(fn, "r")) == NULL) err(2, "%s", fn); - while ((line = fgetln(f, &len)) != NULL) - add_pattern(line, *line == '\n' ? 0 : len); + if ((fstat(fileno(f), &st) == -1) || (S_ISDIR(st.st_mode))) { + fclose(f); + return; + } + while ((line = fgetln(f, &len)) != NULL) + add_pattern(line, line[0] == '\n' ? 0 : len); if (ferror(f)) err(2, "%s", fn); fclose(f); @@ -311,7 +332,7 @@ int main(int argc, char *argv[]) { char **aargv, **eargv, *eopts; - char *ep; + char *pn, *ep; unsigned long long l; unsigned int aargc, eargc, i; int c, lastc, needpattern, newarg, prevoptind; @@ -325,30 +346,27 @@ main(int argc, char *argv[]) /* Check what is the program name of the binary. In this way we can have all the funcionalities in one binary without the need of scripting and using ugly hacks. */ - switch (__progname[0]) { + pn = __progname; + if (pn[0] == 'b' && pn[1] == 'z') { + filebehave = FILE_BZIP; + pn += 2; + } else if (pn[0] == 'x' && pn[1] == 'z') { + filebehave = FILE_XZ; + pn += 2; + } else if (pn[0] == 'l' && pn[1] == 'z') { + filebehave = FILE_LZMA; + pn += 2; + } else if (pn[0] == 'z') { + filebehave = FILE_GZIP; + pn += 1; + } + switch (pn[0]) { case 'e': grepbehave = GREP_EXTENDED; break; case 'f': grepbehave = GREP_FIXED; break; - case 'g': - grepbehave = GREP_BASIC; - break; - case 'z': - filebehave = FILE_GZIP; - switch(__progname[1]) { - case 'e': - grepbehave = GREP_EXTENDED; - break; - case 'f': - grepbehave = GREP_FIXED; - break; - case 'g': - grepbehave = GREP_BASIC; - break; - } - break; } lastc = '\0'; @@ -503,8 +521,8 @@ main(int argc, char *argv[]) case 'm': mflag = true; errno = 0; - mcount = strtoull(optarg, &ep, 10); - if (((errno == ERANGE) && (mcount == ULLONG_MAX)) || + mcount = strtoll(optarg, &ep, 10); + if (((errno == ERANGE) && (mcount == LLONG_MAX)) || ((errno == EINVAL) && (mcount == 0))) err(2, NULL); else if (ep[0] != '\0') { @@ -512,6 +530,9 @@ main(int argc, char *argv[]) err(2, NULL); } break; + case 'M': + filebehave = FILE_LZMA; + break; case 'n': nflag = true; break; @@ -544,7 +565,7 @@ main(int argc, char *argv[]) break; case 'u': case MMAP_OPT: - /* noop, compatibility */ + filebehave = FILE_MMAP; break; case 'V': printf(getstr(9), __progname, VERSION); @@ -560,6 +581,9 @@ main(int argc, char *argv[]) xflag = true; cflags &= ~REG_NOSUB; break; + case 'X': + filebehave = FILE_XZ; + break; case 'Z': filebehave = FILE_GZIP; break; @@ -630,6 +654,10 @@ main(int argc, char *argv[]) aargc -= optind; aargv += optind; + /* Empty pattern file matches nothing */ + if (!needpattern && (patterns == 0)) + exit(1); + /* Fail if we don't have any pattern */ if (aargc == 0 && needpattern) usage(); @@ -642,9 +670,12 @@ main(int argc, char *argv[]) } switch (grepbehave) { - case GREP_FIXED: case GREP_BASIC: break; + case GREP_FIXED: + /* XXX: header mess, REG_LITERAL not defined in gnu/regex.h */ + cflags |= 0020; + break; case GREP_EXTENDED: cflags |= REG_EXTENDED; break; @@ -655,24 +686,17 @@ main(int argc, char *argv[]) fg_pattern = grep_calloc(patterns, sizeof(*fg_pattern)); r_pattern = grep_calloc(patterns, sizeof(*r_pattern)); -/* - * XXX: fgrepcomp() and fastcomp() are workarounds for regexec() performance. - * Optimizations should be done there. - */ - /* Check if cheating is allowed (always is for fgrep). */ - if (grepbehave == GREP_FIXED) { - for (i = 0; i < patterns; ++i) - fgrepcomp(&fg_pattern[i], pattern[i]); - } else { - for (i = 0; i < patterns; ++i) { - if (fastcomp(&fg_pattern[i], pattern[i])) { - /* Fall back to full regex library */ - c = regcomp(&r_pattern[i], pattern[i], cflags); - if (c != 0) { - regerror(c, &r_pattern[i], re_error, - RE_ERROR_BUF); - errx(2, "%s", re_error); - } + + /* Check if cheating is allowed (always is for fgrep). */ + for (i = 0; i < patterns; ++i) { + if (fastncomp(&fg_pattern[i], pattern[i].pat, + pattern[i].len, cflags) != 0) { + /* Fall back to full regex library */ + c = regcomp(&r_pattern[i], pattern[i].pat, cflags); + if (c != 0) { + regerror(c, &r_pattern[i], re_error, + RE_ERROR_BUF); + errx(2, "%s", re_error); } } } Modified: stable/9/usr.bin/grep/grep.h ============================================================================== --- stable/9/usr.bin/grep/grep.h Tue Oct 11 14:39:19 2011 (r226260) +++ stable/9/usr.bin/grep/grep.h Tue Oct 11 15:03:42 2011 (r226261) @@ -36,6 +36,8 @@ #include #include +#include "fastmatch.h" + #ifdef WITHOUT_NLS #define getstr(n) errstr[n] #else @@ -58,8 +60,11 @@ extern const char *errstr[]; #define BINFILE_TEXT 2 #define FILE_STDIO 0 -#define FILE_GZIP 1 -#define FILE_BZIP 2 +#define FILE_MMAP 1 +#define FILE_GZIP 2 +#define FILE_BZIP 3 +#define FILE_XZ 4 +#define FILE_LZMA 5 #define DIR_READ 0 #define DIR_SKIP 1 @@ -90,22 +95,16 @@ struct str { int line_no; }; +struct pat { + char *pat; + int len; +}; + struct epat { char *pat; int mode; }; -typedef struct { - size_t len; - unsigned char *pattern; - int qsBc[UCHAR_MAX + 1]; - /* flags */ - bool bol; - bool eol; - bool reversed; - bool word; -} fastgrep_t; - /* Flags passed to regcomp() and regexec() */ extern int cflags, eflags; @@ -114,7 +113,8 @@ extern bool Eflag, Fflag, Gflag, Hflag, bflag, cflag, hflag, iflag, lflag, mflag, nflag, oflag, qflag, sflag, vflag, wflag, xflag; extern bool dexclude, dinclude, fexclude, finclude, lbflag, nullflag; -extern unsigned long long Aflag, Bflag, mcount; +extern unsigned long long Aflag, Bflag; +extern long long mcount; extern char *label; extern const char *color; extern int binbehave, devbehave, dirbehave, filebehave, grepbehave, linkbehave; @@ -122,10 +122,10 @@ extern int binbehave, devbehave, dirbeh extern bool first, matchall, notfound, prev; extern int tail; extern unsigned int dpatterns, fpatterns, patterns; -extern char **pattern; +extern struct pat *pattern; extern struct epat *dpattern, *fpattern; extern regex_t *er_pattern, *r_pattern; -extern fastgrep_t *fg_pattern; +extern fastmatch_t *fg_pattern; /* For regex errors */ #define RE_ERROR_BUF 512 @@ -150,8 +150,3 @@ void clearqueue(void); void grep_close(struct file *f); struct file *grep_open(const char *path); char *grep_fgetln(struct file *f, size_t *len); - -/* fastgrep.c */ -int fastcomp(fastgrep_t *, const char *); -void fgrepcomp(fastgrep_t *, const char *); -int grep_search(fastgrep_t *, const unsigned char *, size_t, regmatch_t *); Modified: stable/9/usr.bin/grep/regex/tre-fastmatch.c ============================================================================== --- head/usr.bin/grep/regex/tre-fastmatch.c Wed Oct 5 09:56:43 2011 (r226035) +++ stable/9/usr.bin/grep/regex/tre-fastmatch.c Tue Oct 11 15:03:42 2011 (r226261) @@ -163,7 +163,7 @@ static int fastcmp(const fastmatch_t *fg shift = bc; \ else \ { \ - ts = ((long)u - v < 0) ? 0 : (u - v); \ + ts = (u >= v) ? (u - v) : 0; \ shift = MAX(ts, bc); \ shift = MAX(shift, gs); \ if (shift == gs) \ Modified: stable/9/usr.bin/grep/util.c ============================================================================== --- stable/9/usr.bin/grep/util.c Tue Oct 11 14:39:19 2011 (r226260) +++ stable/9/usr.bin/grep/util.c Tue Oct 11 15:03:42 2011 (r226261) @@ -49,6 +49,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include "fastmatch.h" #include "grep.h" static int linesqueued; @@ -232,13 +233,8 @@ procfile(const char *fn) linesqueued++; } c += t; - - /* Count the matches if we have a match limit */ - if (mflag) { - mcount -= t; - if (mcount <= 0) - break; - } + if (mflag && mcount < 0) + break; } if (Bflag > 0) clearqueue(); @@ -280,79 +276,77 @@ procline(struct str *l, int nottext) unsigned int i; int c = 0, m = 0, r = 0; - if (!matchall) { - /* Loop to process the whole line */ - while (st <= l->len) { - pmatch.rm_so = st; - pmatch.rm_eo = l->len; - - /* Loop to compare with all the patterns */ - for (i = 0; i < patterns; i++) { -/* - * XXX: grep_search() is a workaround for speed up and should be - * removed in the future. See fastgrep.c. - */ - if (fg_pattern[i].pattern) - r = grep_search(&fg_pattern[i], - (unsigned char *)l->dat, - l->len, &pmatch); - else - r = regexec(&r_pattern[i], l->dat, 1, - &pmatch, eflags); - r = (r == 0) ? 0 : REG_NOMATCH; - st = (cflags & REG_NOSUB) - ? (size_t)l->len - : (size_t)pmatch.rm_eo; - if (r == REG_NOMATCH) - continue; - /* Check for full match */ - if (r == 0 && xflag) - if (pmatch.rm_so != 0 || - (size_t)pmatch.rm_eo != l->len) - r = REG_NOMATCH; - /* Check for whole word match */ - if (r == 0 && (wflag || fg_pattern[i].word)) { - wint_t wbegin, wend; - - wbegin = wend = L' '; - if (pmatch.rm_so != 0 && - sscanf(&l->dat[pmatch.rm_so - 1], - "%lc", &wbegin) != 1) - r = REG_NOMATCH; - else if ((size_t)pmatch.rm_eo != - l->len && - sscanf(&l->dat[pmatch.rm_eo], - "%lc", &wend) != 1) - r = REG_NOMATCH; - else if (iswword(wbegin) || - iswword(wend)) - r = REG_NOMATCH; - } - if (r == 0) { - if (m == 0) - c++; - if (m < MAX_LINE_MATCHES) - matches[m++] = pmatch; - /* matches - skip further patterns */ - if ((color == NULL && !oflag) || - qflag || lflag) - break; - } + /* Loop to process the whole line */ + while (st <= l->len) { + pmatch.rm_so = st; + pmatch.rm_eo = l->len; + + /* Loop to compare with all the patterns */ + for (i = 0; i < patterns; i++) { + if (fg_pattern[i].pattern) + r = fastexec(&fg_pattern[i], + l->dat, 1, &pmatch, eflags); + else + r = regexec(&r_pattern[i], l->dat, 1, + &pmatch, eflags); + r = (r == 0) ? 0 : REG_NOMATCH; + st = (cflags & REG_NOSUB) + ? (size_t)l->len + : (size_t)pmatch.rm_eo; + if (r == REG_NOMATCH) + continue; + /* Check for full match */ + if (r == 0 && xflag) + if (pmatch.rm_so != 0 || + (size_t)pmatch.rm_eo != l->len) + r = REG_NOMATCH; + /* Check for whole word match */ + if (r == 0 && (wflag || fg_pattern[i].word)) { + wint_t wbegin, wend; + + wbegin = wend = L' '; + if (pmatch.rm_so != 0 && + sscanf(&l->dat[pmatch.rm_so - 1], + "%lc", &wbegin) != 1) + r = REG_NOMATCH; + else if ((size_t)pmatch.rm_eo != + l->len && + sscanf(&l->dat[pmatch.rm_eo], + "%lc", &wend) != 1) + r = REG_NOMATCH; + else if (iswword(wbegin) || + iswword(wend)) + r = REG_NOMATCH; } - - if (vflag) { - c = !c; - break; + if (r == 0) { + if (m == 0) + c++; + if (m < MAX_LINE_MATCHES) + matches[m++] = pmatch; + /* matches - skip further patterns */ + if ((color == NULL && !oflag) || + qflag || lflag) + break; } - /* One pass if we are not recording matches */ - if ((color == NULL && !oflag) || qflag || lflag) - break; + } - if (st == (size_t)pmatch.rm_so) - break; /* No matches */ + if (vflag) { + c = !c; + break; } - } else - c = !vflag; + + /* One pass if we are not recording matches */ + if ((color == NULL && !oflag) || qflag || lflag) + break; + + if (st == (size_t)pmatch.rm_so) + break; /* No matches */ + } + + + /* Count the matches if we have a match limit */ + if (mflag) + mcount -= c; if (c && binbehave == BINFILE_BIN && nottext) return (c); /* Binary file */ From owner-svn-src-all@FreeBSD.ORG Tue Oct 11 15:04:58 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AF6CD1065674; Tue, 11 Oct 2011 15:04:58 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9F4F38FC12; Tue, 11 Oct 2011 15:04:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9BF4wV3020692; Tue, 11 Oct 2011 15:04:58 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9BF4w3N020690; Tue, 11 Oct 2011 15:04:58 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201110111504.p9BF4w3N020690@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Tue, 11 Oct 2011 15:04:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226262 - head/usr.bin/kdump X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2011 15:04:58 -0000 Author: des Date: Tue Oct 11 15:04:58 2011 New Revision: 226262 URL: http://svn.freebsd.org/changeset/base/226262 Log: The previous commit did not fix the issue since it did not prevent sign extension. Cast to u_register_t first, then to uintmax_t. Submitted by: bde@ Modified: head/usr.bin/kdump/kdump.c Modified: head/usr.bin/kdump/kdump.c ============================================================================== --- head/usr.bin/kdump/kdump.c Tue Oct 11 15:03:42 2011 (r226261) +++ head/usr.bin/kdump/kdump.c Tue Oct 11 15:04:58 2011 (r226262) @@ -110,14 +110,14 @@ struct ktr_header ktr_header; #define TIME_FORMAT "%b %e %T %Y" #define eqs(s1, s2) (strcmp((s1), (s2)) == 0) -#define print_number(i,n,c) do { \ - if (decimal) \ - printf("%c%jd", c, (intmax_t)*i); \ - else \ - printf("%c%#jx", c, (uintmax_t)*i); \ - i++; \ - n--; \ - c = ','; \ +#define print_number(i,n,c) do { \ + if (decimal) \ + printf("%c%jd", c, (intmax_t)*i); \ + else \ + printf("%c%#jx", c, (uintmax_t)(u_register_t)*i); \ + i++; \ + n--; \ + c = ','; \ } while (0) #if defined(__amd64__) || defined(__i386__) From owner-svn-src-all@FreeBSD.ORG Tue Oct 11 15:41:08 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4D1FC1065670; Tue, 11 Oct 2011 15:41:08 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 235558FC13; Tue, 11 Oct 2011 15:41:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9BFf8a8021955; Tue, 11 Oct 2011 15:41:08 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9BFf8ng021952; Tue, 11 Oct 2011 15:41:08 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201110111541.p9BFf8ng021952@svn.freebsd.org> From: Gleb Smirnoff Date: Tue, 11 Oct 2011 15:41:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226263 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2011 15:41:08 -0000 Author: glebius Date: Tue Oct 11 15:41:07 2011 New Revision: 226263 URL: http://svn.freebsd.org/changeset/base/226263 Log: Properly document default number of rx/tx descriptors for Intel cards. Modified: head/share/man/man4/em.4 head/share/man/man4/igb.4 Modified: head/share/man/man4/em.4 ============================================================================== --- head/share/man/man4/em.4 Tue Oct 11 15:04:58 2011 (r226262) +++ head/share/man/man4/em.4 Tue Oct 11 15:41:07 2011 (r226263) @@ -31,7 +31,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 14, 2010 +.Dd October 11, 2010 .Dt EM 4 .Os .Sh NAME @@ -199,12 +199,14 @@ prompt before booting the kernel or stor .Bl -tag -width indent .It Va hw.em.rxd Number of receive descriptors allocated by the driver. -The default value is 256. +The default value is 1024 for adapters newer than 82547, +and 256 for older ones. The 82542 and 82543-based adapters can handle up to 256 descriptors, while others can have up to 4096. .It Va hw.em.txd Number of transmit descriptors allocated by the driver. -The default value is 256. +The default value is 1024 for adapters newer than 82547, +and 256 for older ones. The 82542 and 82543-based adapters can handle up to 256 descriptors, while others can have up to 4096. .It Va hw.em.rx_int_delay Modified: head/share/man/man4/igb.4 ============================================================================== --- head/share/man/man4/igb.4 Tue Oct 11 15:04:58 2011 (r226262) +++ head/share/man/man4/igb.4 Tue Oct 11 15:41:07 2011 (r226263) @@ -31,7 +31,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 14, 2010 +.Dd October 11, 2011 .Dt IGB 4 .Os .Sh NAME @@ -151,11 +151,11 @@ prompt before booting the kernel or stor .Bl -tag -width indent .It Va hw.igb.rxd Number of receive descriptors allocated by the driver. -The default value is 256. +The default value is 1024. The minimum is 80, and the maximum is 4096. .It Va hw.igb.txd Number of transmit descriptors allocated by the driver. -The default value is 256. +The default value is 1024. The minimum is 80, and the maximum is 4096. .It Va hw.igb.enable_aim If set to 1, enable Adaptive Interrupt Moderation. From owner-svn-src-all@FreeBSD.ORG Tue Oct 11 15:45:25 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DCED31065674; Tue, 11 Oct 2011 15:45:25 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-qw0-f54.google.com (mail-qw0-f54.google.com [209.85.216.54]) by mx1.freebsd.org (Postfix) with ESMTP id 6B7B88FC13; Tue, 11 Oct 2011 15:45:25 +0000 (UTC) Received: by qadz30 with SMTP id z30so6432844qad.13 for ; Tue, 11 Oct 2011 08:45:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=8j6t89vB0szUrzbW6ZtCs138gUXSolq9iBDPzkTAztM=; b=EgIc+uH14OE8FMjMPhRlTLEOW8fJH12wSFStrR9QRfN1T56irw9cHYu003q3z/nWCF H8bxYVgWAHAt7XlIpwmxkH+ML15XuI695J2W551V2L4Rb0oaD81DDHBShlIoVDy1LwCY mledY94FaYRVKVUkrZ4S7yLNWEYc5OZFt1DGQ= MIME-Version: 1.0 Received: by 10.224.181.202 with SMTP id bz10mr11228798qab.59.1318347924805; Tue, 11 Oct 2011 08:45:24 -0700 (PDT) Received: by 10.224.74.82 with HTTP; Tue, 11 Oct 2011 08:45:24 -0700 (PDT) In-Reply-To: <201110081247.p98Cl06s063337@svn.freebsd.org> References: <201110081247.p98Cl06s063337@svn.freebsd.org> Date: Tue, 11 Oct 2011 08:45:24 -0700 Message-ID: From: Garrett Cooper To: Dag-Erling Smorgrav Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r226157 - head/usr.bin/kdump X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2011 15:45:26 -0000 On Sat, Oct 8, 2011 at 5:47 AM, Dag-Erling Smorgrav wrote= : > Author: des > Date: Sat Oct =A08 12:47:00 2011 > New Revision: 226157 > URL: http://svn.freebsd.org/changeset/base/226157 > > Log: > =A0Bring ioctlname() in line with all the other *name() functions, which > =A0actually print the name (or the numeric value, if they can't figure ou= t > =A0the correct name) instead of just returning a pointer to it. =A0Also, = since > =A0ioctl numbers are not and probably never will be unique, drop support = for > =A0using a switch statement instead of an if/else chain. Hi Des! Seeing that you've committed quite a bit to kdump recently, could you please take a look at http://www.freebsd.org/cgi/query-pr.cgi?pr=3D161478 ? Thanks! -Garrett From owner-svn-src-all@FreeBSD.ORG Tue Oct 11 18:26:31 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ED27E106566B; Tue, 11 Oct 2011 18:26:31 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C3C948FC13; Tue, 11 Oct 2011 18:26:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9BIQVMJ027134; Tue, 11 Oct 2011 18:26:31 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9BIQV14027132; Tue, 11 Oct 2011 18:26:31 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201110111826.p9BIQV14027132@svn.freebsd.org> From: Gleb Smirnoff Date: Tue, 11 Oct 2011 18:26:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226264 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2011 18:26:32 -0000 Author: glebius Date: Tue Oct 11 18:26:31 2011 New Revision: 226264 URL: http://svn.freebsd.org/changeset/base/226264 Log: Fix date in last commit. Noticed by: Larry Rosenman Modified: head/share/man/man4/em.4 Modified: head/share/man/man4/em.4 ============================================================================== --- head/share/man/man4/em.4 Tue Oct 11 15:41:07 2011 (r226263) +++ head/share/man/man4/em.4 Tue Oct 11 18:26:31 2011 (r226264) @@ -31,7 +31,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 11, 2010 +.Dd October 11, 2011 .Dt EM 4 .Os .Sh NAME From owner-svn-src-all@FreeBSD.ORG Tue Oct 11 18:46:41 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8A7D81065674; Tue, 11 Oct 2011 18:46:41 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7A5EA8FC17; Tue, 11 Oct 2011 18:46:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9BIkfec027774; Tue, 11 Oct 2011 18:46:41 GMT (envelope-from mckusick@svn.freebsd.org) Received: (from mckusick@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9BIkfhA027772; Tue, 11 Oct 2011 18:46:41 GMT (envelope-from mckusick@svn.freebsd.org) Message-Id: <201110111846.p9BIkfhA027772@svn.freebsd.org> From: Kirk McKusick Date: Tue, 11 Oct 2011 18:46:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226265 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2011 18:46:41 -0000 Author: mckusick Date: Tue Oct 11 18:46:41 2011 New Revision: 226265 URL: http://svn.freebsd.org/changeset/base/226265 Log: When unmounting a filesystem always wait for the vfs_busy lock to clear so that if no vnodes in the filesystem are actively in use the unmount will succeed rather than failing with EBUSY. Reported by: Garrett Cooper Reviewed by: Attilio Rao and Kostik Belousov Tested by: Garrett Cooper PR: kern/161016 MFC after: 3 weeks Modified: head/sys/kern/vfs_mount.c Modified: head/sys/kern/vfs_mount.c ============================================================================== --- head/sys/kern/vfs_mount.c Tue Oct 11 18:26:31 2011 (r226264) +++ head/sys/kern/vfs_mount.c Tue Oct 11 18:46:41 2011 (r226265) @@ -1227,18 +1227,6 @@ dounmount(mp, flags, td) mp->mnt_kern_flag |= MNTK_UNMOUNTF; error = 0; if (mp->mnt_lockref) { - if ((flags & MNT_FORCE) == 0) { - mp->mnt_kern_flag &= ~(MNTK_UNMOUNT | MNTK_NOINSMNTQ | - MNTK_UNMOUNTF); - if (mp->mnt_kern_flag & MNTK_MWAIT) { - mp->mnt_kern_flag &= ~MNTK_MWAIT; - wakeup(mp); - } - MNT_IUNLOCK(mp); - if (coveredvp) - VOP_UNLOCK(coveredvp, 0); - return (EBUSY); - } mp->mnt_kern_flag |= MNTK_DRAINING; error = msleep(&mp->mnt_lockref, MNT_MTX(mp), PVFS, "mount drain", 0); From owner-svn-src-all@FreeBSD.ORG Tue Oct 11 19:03:57 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9AFCC106564A; Tue, 11 Oct 2011 19:03:57 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8AAF58FC14; Tue, 11 Oct 2011 19:03:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9BJ3vMH028410; Tue, 11 Oct 2011 19:03:57 GMT (envelope-from mckusick@svn.freebsd.org) Received: (from mckusick@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9BJ3vAE028408; Tue, 11 Oct 2011 19:03:57 GMT (envelope-from mckusick@svn.freebsd.org) Message-Id: <201110111903.p9BJ3vAE028408@svn.freebsd.org> From: Kirk McKusick Date: Tue, 11 Oct 2011 19:03:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226266 - head/sbin/tunefs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2011 19:03:57 -0000 Author: mckusick Date: Tue Oct 11 19:03:57 2011 New Revision: 226266 URL: http://svn.freebsd.org/changeset/base/226266 Log: After creating a filesystem using newfs -j the time stamps are all zero and thus report as having been made in January 1970. Apart from looking a bit silly, it also triggers alarms from scripts that detect weird time stamps. This update sets all 4 (or 3, in the case of UFS1) time stamps to the current time when enabling journaling during newfs or later when enabling it with tunefs. Reported by: Hans Ottevanger MFC after: 1 week Modified: head/sbin/tunefs/tunefs.c Modified: head/sbin/tunefs/tunefs.c ============================================================================== --- head/sbin/tunefs/tunefs.c Tue Oct 11 18:46:41 2011 (r226265) +++ head/sbin/tunefs/tunefs.c Tue Oct 11 19:03:57 2011 (r226266) @@ -64,6 +64,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include /* the optimization warning string template */ @@ -923,6 +924,7 @@ journal_alloc(int64_t size) ino_t ino; int blks; int mode; + time_t utime; int i; cgp = &disk.d_cg; @@ -983,18 +985,26 @@ journal_alloc(int64_t size) */ dp2 = ip; dp1 = ip; + time(&utime); if (sblock.fs_magic == FS_UFS1_MAGIC) { bzero(dp1, sizeof(*dp1)); dp1->di_size = size; dp1->di_mode = IFREG | IREAD; dp1->di_nlink = 1; dp1->di_flags = SF_IMMUTABLE | SF_NOUNLINK | UF_NODUMP; + dp1->di_atime = utime; + dp1->di_mtime = utime; + dp1->di_ctime = utime; } else { bzero(dp2, sizeof(*dp2)); dp2->di_size = size; dp2->di_mode = IFREG | IREAD; dp2->di_nlink = 1; dp2->di_flags = SF_IMMUTABLE | SF_NOUNLINK | UF_NODUMP; + dp2->di_atime = utime; + dp2->di_mtime = utime; + dp2->di_ctime = utime; + dp2->di_birthtime = utime; } for (i = 0; i < NDADDR && resid; i++, resid--) { blk = journal_balloc(); From owner-svn-src-all@FreeBSD.ORG Tue Oct 11 19:21:18 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 433C1106567F; Tue, 11 Oct 2011 19:21:18 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 18F5D8FC1A; Tue, 11 Oct 2011 19:21:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9BJLHF9029003; Tue, 11 Oct 2011 19:21:17 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9BJLHUw029000; Tue, 11 Oct 2011 19:21:17 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201110111921.p9BJLHUw029000@svn.freebsd.org> From: Michael Tuexen Date: Tue, 11 Oct 2011 19:21:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226267 - stable/9/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2011 19:21:18 -0000 Author: tuexen Date: Tue Oct 11 19:21:17 2011 New Revision: 226267 URL: http://svn.freebsd.org/changeset/base/226267 Log: MFC 226168 Update the inp stored in a HB-timer when moving an stcb to a new inp. Use only this stored inp when processing a HB timeout. This fixes a bug which results in a crash. Approved by: re@ Modified: stable/9/sys/netinet/sctp_pcb.c stable/9/sys/netinet/sctputil.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/netinet/sctp_pcb.c ============================================================================== --- stable/9/sys/netinet/sctp_pcb.c Tue Oct 11 19:03:57 2011 (r226266) +++ stable/9/sys/netinet/sctp_pcb.c Tue Oct 11 19:21:17 2011 (r226267) @@ -2804,6 +2804,7 @@ sctp_move_pcb_and_assoc(struct sctp_inpc /* now what about the nets? */ TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) { net->pmtu_timer.ep = (void *)new_inp; + net->hb_timer.ep = (void *)new_inp; net->rxt_timer.ep = (void *)new_inp; } SCTP_INP_WUNLOCK(new_inp); Modified: stable/9/sys/netinet/sctputil.c ============================================================================== --- stable/9/sys/netinet/sctputil.c Tue Oct 11 19:03:57 2011 (r226266) +++ stable/9/sys/netinet/sctputil.c Tue Oct 11 19:21:17 2011 (r226267) @@ -1661,7 +1661,7 @@ sctp_timeout_handler(void *t) sctp_auditing(4, inp, stcb, net); #endif if (!(net->dest_state & SCTP_ADDR_NOHB)) { - sctp_timer_start(SCTP_TIMER_TYPE_HEARTBEAT, stcb->sctp_ep, stcb, net); + sctp_timer_start(SCTP_TIMER_TYPE_HEARTBEAT, inp, stcb, net); sctp_chunk_output(inp, stcb, SCTP_OUTPUT_FROM_HB_TMR, SCTP_SO_NOT_LOCKED); } break; From owner-svn-src-all@FreeBSD.ORG Tue Oct 11 19:31:02 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A6A21106564A; Tue, 11 Oct 2011 19:31:02 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 95DBC8FC14; Tue, 11 Oct 2011 19:31:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9BJV2Rs029351; Tue, 11 Oct 2011 19:31:02 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9BJV2LN029349; Tue, 11 Oct 2011 19:31:02 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201110111931.p9BJV2LN029349@svn.freebsd.org> From: Michael Tuexen Date: Tue, 11 Oct 2011 19:31:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226268 - stable/9/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2011 19:31:02 -0000 Author: tuexen Date: Tue Oct 11 19:31:02 2011 New Revision: 226268 URL: http://svn.freebsd.org/changeset/base/226268 Log: MFC 226203 When moving an stcb to a new inp and we copy over the list of bound addresses, update the last used address pointer. If not, it might result in a crash if the old inp goes away. Approved by: re@ Modified: stable/9/sys/netinet/sctp_pcb.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/netinet/sctp_pcb.c ============================================================================== --- stable/9/sys/netinet/sctp_pcb.c Tue Oct 11 19:21:17 2011 (r226267) +++ stable/9/sys/netinet/sctp_pcb.c Tue Oct 11 19:31:02 2011 (r226268) @@ -2786,6 +2786,9 @@ sctp_move_pcb_and_assoc(struct sctp_inpc LIST_INSERT_HEAD(&new_inp->sctp_addr_list, laddr, sctp_nxt_addr); new_inp->laddr_count++; + if (oladdr == stcb->asoc.last_used_address) { + stcb->asoc.last_used_address = laddr; + } } } /* From owner-svn-src-all@FreeBSD.ORG Tue Oct 11 19:49:39 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 91A501065740; Tue, 11 Oct 2011 19:49:39 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 426748FC14; Tue, 11 Oct 2011 19:49:38 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 0DB871FFC33; Tue, 11 Oct 2011 19:49:37 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id E6DA2B93C; Tue, 11 Oct 2011 21:49:36 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Garrett Cooper References: <201110081247.p98Cl06s063337@svn.freebsd.org> Date: Tue, 11 Oct 2011 21:49:36 +0200 In-Reply-To: (Garrett Cooper's message of "Tue, 11 Oct 2011 08:45:24 -0700") Message-ID: <86botns3zj.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r226157 - head/usr.bin/kdump X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2011 19:49:39 -0000 Garrett Cooper writes: > Seeing that you've committed quite a bit to kdump recently, could > you please take a look at > http://www.freebsd.org/cgi/query-pr.cgi?pr=3D161478 ? Hmm, that patch actually removes code, but if the point is "make ktrace and kdump build at WARNS level 6", I'll take care of it. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-all@FreeBSD.ORG Tue Oct 11 20:03:47 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 66434106566B; Tue, 11 Oct 2011 20:03:47 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-qw0-f54.google.com (mail-qw0-f54.google.com [209.85.216.54]) by mx1.freebsd.org (Postfix) with ESMTP id E6C5C8FC16; Tue, 11 Oct 2011 20:03:46 +0000 (UTC) Received: by qadz30 with SMTP id z30so6758245qad.13 for ; Tue, 11 Oct 2011 13:03:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=I7paoY4sgY29TaJncHCasWrwLWSTJfjT27BEhk2h7xU=; b=WBQXWNEDaHkaTL38RizoU4vZ6koBwByKejLgf1Z8OLi2lOo7xQKIlBghfEgPc23Mgp 9IuqQD1IoBshvJ1D4vM0O5lfmnyxY8D7YsuwQZfui3xihzXoM/tlxVpLs0qe+kv6qHAG xXJe3EodIXZsu+c0qzC6RArNG3/1zLpIoTnAc= MIME-Version: 1.0 Received: by 10.224.189.198 with SMTP id df6mr16256160qab.46.1318363426356; Tue, 11 Oct 2011 13:03:46 -0700 (PDT) Received: by 10.224.74.82 with HTTP; Tue, 11 Oct 2011 13:03:45 -0700 (PDT) In-Reply-To: <86botns3zj.fsf@ds4.des.no> References: <201110081247.p98Cl06s063337@svn.freebsd.org> <86botns3zj.fsf@ds4.des.no> Date: Tue, 11 Oct 2011 13:03:45 -0700 Message-ID: From: Garrett Cooper To: =?ISO-8859-1?Q?Dag=2DErling_Sm=F8rgrav?= Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r226157 - head/usr.bin/kdump X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2011 20:03:47 -0000 2011/10/11 Dag-Erling Sm=F8rgrav : > Garrett Cooper writes: >> =A0 =A0 Seeing that you've committed quite a bit to kdump recently, coul= d >> you please take a look at >> http://www.freebsd.org/cgi/query-pr.cgi?pr=3D161478 ? > > Hmm, that patch actually removes code, but if the point is "make ktrace > and kdump build at WARNS level 6", I'll take care of it. Awesome! If you can find out where capname was at, I don't have an issue with re-adding that portion of the patch. The issue is that the compile fails with WARNS > 0 because it can't find the identifier in any of the included headers (and it's new code because I had to remove it last night before running make universe). I searched for it in src/sys/sys and I couldn't find it, fell back to looking in src/ and didn't come up with anything. I could have overlooked something obvious though (it happens), or it might have been a typo that I didn't look to closely at in my search to find the proper analog. Thanks! -Garrett From owner-svn-src-all@FreeBSD.ORG Tue Oct 11 20:37:10 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AFDCA1065673; Tue, 11 Oct 2011 20:37:10 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9DBA68FC20; Tue, 11 Oct 2011 20:37:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9BKbA5U031468; Tue, 11 Oct 2011 20:37:10 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9BKbA09031459; Tue, 11 Oct 2011 20:37:10 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201110112037.p9BKbA09031459@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Tue, 11 Oct 2011 20:37:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226269 - in head: lib/libc/sys sys/kern sys/sys usr.bin/kdump usr.bin/ktrace X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2011 20:37:10 -0000 Author: des Date: Tue Oct 11 20:37:10 2011 New Revision: 226269 URL: http://svn.freebsd.org/changeset/base/226269 Log: Add a new trace point, KTRFAC_CAPFAIL, which traces capability check failures. It is included in the default set for ktrace(1) and kdump(1). Modified: head/lib/libc/sys/ktrace.2 head/sys/kern/kern_ktrace.c head/sys/kern/sys_capability.c head/sys/sys/ktrace.h head/usr.bin/kdump/kdump.c head/usr.bin/ktrace/ktrace.1 head/usr.bin/ktrace/ktrace.h head/usr.bin/ktrace/subr.c Modified: head/lib/libc/sys/ktrace.2 ============================================================================== --- head/lib/libc/sys/ktrace.2 Tue Oct 11 19:31:02 2011 (r226268) +++ head/lib/libc/sys/ktrace.2 Tue Oct 11 20:37:10 2011 (r226269) @@ -28,7 +28,7 @@ .\" @(#)ktrace.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd October 9, 2011 +.Dd October 10, 2011 .Dt KTRACE 2 .Os .Sh NAME @@ -67,9 +67,9 @@ The argument specifies the requested ktrace operation. The defined operations are: .Bl -column KTRFLAG_DESCENDXXX -offset indent -.It "KTROP_SET Enable trace points specified in" +.It "KTROP_SET Enable trace points specified in" .Fa trpoints . -.It "KTROP_CLEAR Disable trace points specified in +.It "KTROP_CLEAR Disable trace points specified in" .Fa trpoints . .It "KTROP_CLEARFILE Stop all tracing." .It "KTRFLAG_DESCEND The tracing change should apply to the" @@ -93,6 +93,7 @@ generate much output). .It "KTRFAC_SYSCTL Trace sysctls." .It "KTRFAC_PROCCTOR Trace process construction." .It "KTRFAC_PROCDTOR Trace process destruction." +.It "KTRFAC_CAPFAIL Trace capability failures." .It "KTRFAC_INHERIT Inherit tracing to future children." .El .Pp Modified: head/sys/kern/kern_ktrace.c ============================================================================== --- head/sys/kern/kern_ktrace.c Tue Oct 11 19:31:02 2011 (r226268) +++ head/sys/kern/kern_ktrace.c Tue Oct 11 20:37:10 2011 (r226269) @@ -95,6 +95,7 @@ struct ktr_request { void *ktr_buffer; union { struct ktr_proc_ctor ktr_proc_ctor; + struct ktr_cap_fail ktr_cap_fail; struct ktr_syscall ktr_syscall; struct ktr_sysret ktr_sysret; struct ktr_genio ktr_genio; @@ -117,6 +118,7 @@ static int data_lengths[] = { 0, /* KTR_SYSCTL */ sizeof(struct ktr_proc_ctor), /* KTR_PROCCTOR */ 0, /* KTR_PROCDTOR */ + sizeof(struct ktr_cap_fail), /* KTR_CAPFAIL */ }; static STAILQ_HEAD(, ktr_request) ktr_free; @@ -768,6 +770,25 @@ ktrstruct(name, data, datalen) req->ktr_header.ktr_len = buflen; ktr_submitrequest(curthread, req); } + +void +ktrcapfail(needed, held) + cap_rights_t needed; + cap_rights_t held; +{ + struct thread *td = curthread; + struct ktr_request *req; + struct ktr_cap_fail *kcf; + + req = ktr_getrequest(KTR_CAPFAIL); + if (req == NULL) + return; + kcf = &req->ktr_data.ktr_cap_fail; + kcf->cap_needed = needed; + kcf->cap_held = held; + ktr_enqueuerequest(td, req); + ktrace_exit(td); +} #endif /* KTRACE */ /* Interface and common routines */ Modified: head/sys/kern/sys_capability.c ============================================================================== --- head/sys/kern/sys_capability.c Tue Oct 11 19:31:02 2011 (r226268) +++ head/sys/kern/sys_capability.c Tue Oct 11 20:37:10 2011 (r226269) @@ -52,6 +52,7 @@ */ #include "opt_capsicum.h" +#include "opt_ktrace.h" #include __FBSDID("$FreeBSD$"); @@ -68,6 +69,8 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include @@ -212,8 +215,13 @@ static int cap_check(struct capability *c, cap_rights_t rights) { - if ((c->cap_rights | rights) != c->cap_rights) + if ((c->cap_rights | rights) != c->cap_rights) { +#ifdef KTRACE + if (KTRPOINT(curthread, KTR_CAPFAIL)) + ktrcapfail(rights, c->cap_rights); +#endif return (ENOTCAPABLE); + } return (0); } Modified: head/sys/sys/ktrace.h ============================================================================== --- head/sys/sys/ktrace.h Tue Oct 11 19:31:02 2011 (r226268) +++ head/sys/sys/ktrace.h Tue Oct 11 20:37:10 2011 (r226269) @@ -178,6 +178,15 @@ struct ktr_proc_ctor { #define KTR_PROCDTOR 11 /* + * KTR_CAPFAIL - trace capability check failures + */ +#define KTR_CAPFAIL 12 +struct ktr_cap_fail { + cap_rights_t cap_needed; + cap_rights_t cap_held; +}; + +/* * KTR_DROP - If this bit is set in ktr_type, then at least one event * between the previous record and this record was dropped. */ @@ -198,6 +207,7 @@ struct ktr_proc_ctor { #define KTRFAC_SYSCTL (1<sa_len) #define ktrstat(s) \ Modified: head/usr.bin/kdump/kdump.c ============================================================================== --- head/usr.bin/kdump/kdump.c Tue Oct 11 19:31:02 2011 (r226268) +++ head/usr.bin/kdump/kdump.c Tue Oct 11 20:37:10 2011 (r226269) @@ -99,6 +99,7 @@ void ktruser(int, unsigned char *); void ktrsockaddr(struct sockaddr *); void ktrstat(struct stat *); void ktrstruct(char *, size_t); +void ktrcapfail(struct ktr_cap_fail *); void usage(void); void ioctlname(unsigned long, int); @@ -301,6 +302,8 @@ main(int argc, char *argv[]) case KTR_STRUCT: ktrstruct(m, ktrlen); break; + case KTR_CAPFAIL: + ktrcapfail((struct ktr_cap_fail *)m); default: printf("\n"); break; @@ -440,6 +443,9 @@ dumpheader(struct ktr_header *kth) /* FALLTHROUGH */ case KTR_PROCDTOR: return; + case KTR_CAPFAIL: + type = "CAP "; + break; default: sprintf(unknown, "UNKNOWN(%d)", kth->ktr_type); type = unknown; @@ -488,6 +494,7 @@ ktrsyscall(struct ktr_syscall *ktr, u_in { int narg = ktr->ktr_narg; register_t *ip; + intmax_t arg; if ((flags != 0 && ((flags & SV_ABI_MASK) != SV_ABI_FREEBSD)) || (ktr->ktr_code >= nsyscalls || ktr->ktr_code < 0)) @@ -978,12 +985,33 @@ ktrsyscall(struct ktr_syscall *ktr, u_in ip++; narg--; break; - case SYS_cap_new: - print_number(ip, narg, c); - putchar(','); - capname(*ip); - ip++; - narg--; + case SYS_cap_new: + print_number(ip, narg, c); + putchar(','); + arg = *ip; + ip++; + narg--; + /* + * Hack: the second argument is a + * cap_rights_t, which 64 bits wide, so on + * 32-bit systems, it is split between two + * registers. + * + * Since sizeof() is not evaluated by the + * preprocessor, we can't use an #ifdef, + * but the compiler will probably optimize + * the code out anyway. + */ + if (sizeof(cap_rights_t) > sizeof(register_t)) { +#if _BYTE_ORDER == _LITTLE_ENDIAN + arg = ((intmax_t)*ip << 32) + arg; +#else + arg = (arg << 32) + *ip; +#endif + ip++; + narg--; + } + capname(arg); break; } } @@ -1554,6 +1582,15 @@ invalid: printf("invalid record\n"); } +void +ktrcapfail(struct ktr_cap_fail *ktr) +{ + printf("needed "); + capname((intmax_t)ktr->cap_needed); + printf(" held "); + capname((intmax_t)ktr->cap_held); +} + #if defined(__amd64__) || defined(__i386__) void linux_ktrsyscall(struct ktr_syscall *ktr) Modified: head/usr.bin/ktrace/ktrace.1 ============================================================================== --- head/usr.bin/ktrace/ktrace.1 Tue Oct 11 19:31:02 2011 (r226268) +++ head/usr.bin/ktrace/ktrace.1 Tue Oct 11 20:37:10 2011 (r226269) @@ -28,7 +28,7 @@ .\" @(#)ktrace.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd February 23, 2008 +.Dd October 10, 2011 .Dt KTRACE 1 .Os .Sh NAME @@ -113,6 +113,8 @@ trace .Tn I/O .It Cm n trace namei translations +.It Cm p +trace capability check failures .It Cm s trace signal processing .It Cm t @@ -127,7 +129,7 @@ trace requests .It Cm + trace the default set of trace points - -.Cm c , i , n , s , t , u , y +.Cm c , i , n , p , s , t , u , y .El .It Ar command Execute Modified: head/usr.bin/ktrace/ktrace.h ============================================================================== --- head/usr.bin/ktrace/ktrace.h Tue Oct 11 19:31:02 2011 (r226268) +++ head/usr.bin/ktrace/ktrace.h Tue Oct 11 20:37:10 2011 (r226269) @@ -32,7 +32,7 @@ #define DEF_POINTS (KTRFAC_SYSCALL | KTRFAC_SYSRET | KTRFAC_NAMEI | \ KTRFAC_GENIO | KTRFAC_PSIG | KTRFAC_USER | \ - KTRFAC_STRUCT | KTRFAC_SYSCTL) + KTRFAC_STRUCT | KTRFAC_SYSCTL | KTRFAC_CAPFAIL) #define PROC_ABI_POINTS (KTRFAC_PROCCTOR | KTRFAC_PROCDTOR) Modified: head/usr.bin/ktrace/subr.c ============================================================================== --- head/usr.bin/ktrace/subr.c Tue Oct 11 19:31:02 2011 (r226268) +++ head/usr.bin/ktrace/subr.c Tue Oct 11 20:37:10 2011 (r226269) @@ -61,11 +61,14 @@ getpoints(char *s) case 'c': facs |= KTRFAC_SYSCALL | KTRFAC_SYSRET; break; + case 'i': + facs |= KTRFAC_GENIO; + break; case 'n': facs |= KTRFAC_NAMEI; break; - case 'i': - facs |= KTRFAC_GENIO; + case 'p': + facs |= KTRFAC_CAPFAIL; break; case 's': facs |= KTRFAC_PSIG; From owner-svn-src-all@FreeBSD.ORG Tue Oct 11 20:40:02 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C2DD1106566B; Tue, 11 Oct 2011 20:40:02 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 796078FC13; Tue, 11 Oct 2011 20:40:02 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id EFA451FFC33; Tue, 11 Oct 2011 20:40:00 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id DA46CB95F; Tue, 11 Oct 2011 22:40:00 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Garrett Cooper References: <201110081247.p98Cl06s063337@svn.freebsd.org> <86botns3zj.fsf@ds4.des.no> Date: Tue, 11 Oct 2011 22:40:00 +0200 In-Reply-To: (Garrett Cooper's message of "Tue, 11 Oct 2011 13:03:45 -0700") Message-ID: <8662jvtg7z.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r226157 - head/usr.bin/kdump X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2011 20:40:02 -0000 Garrett Cooper writes: > Awesome! If you can find out where capname was at, I don't have an > issue with re-adding that portion of the patch. The issue is that the > compile fails with WARNS > 0 because it can't find the identifier in > any of the included headers (and it's new code because I had to remove > it last night before running make universe). I searched for it in > src/sys/sys and I couldn't find it, fell back to looking in src/ and > didn't come up with anything. I could have overlooked something > obvious though (it happens), or it might have been a typo that I > didn't look to closely at in my search to find the proper analog. > Thanks! The capname function is generated by mksubr, along with all the other *name functions. It's part of the code I added this weekend. This is what "svn log" and "svn diff" are for, you know :) DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-all@FreeBSD.ORG Tue Oct 11 21:15:34 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 00299106566C; Tue, 11 Oct 2011 21:15:33 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-qw0-f54.google.com (mail-qw0-f54.google.com [209.85.216.54]) by mx1.freebsd.org (Postfix) with ESMTP id 8CC228FC08; Tue, 11 Oct 2011 21:15:33 +0000 (UTC) Received: by qadz30 with SMTP id z30so29271qad.13 for ; Tue, 11 Oct 2011 14:15:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=GhPTGGlpICjCSoUpOLmXQ0DHtdVB26Us2uJEE5nkoSo=; b=aDNXlK+wRGU+EL4umSAZxH0erqmTXPV8V0FWLpjwrvUVq0/ejhkS+apX/VdAMD6mUj ZLE0t61zKCHY2Z9uVRWhUIlSszP+0pUfbTMLZ+pUItzjFvpza4lBGuxJ4MCIzUler/Tv zNKePYe0w25VUJfvOeZEtDzQV8bQfM7FCLQWE= MIME-Version: 1.0 Received: by 10.224.189.198 with SMTP id df6mr16472922qab.46.1318367732569; Tue, 11 Oct 2011 14:15:32 -0700 (PDT) Received: by 10.224.74.82 with HTTP; Tue, 11 Oct 2011 14:15:32 -0700 (PDT) In-Reply-To: <8662jvtg7z.fsf@ds4.des.no> References: <201110081247.p98Cl06s063337@svn.freebsd.org> <86botns3zj.fsf@ds4.des.no> <8662jvtg7z.fsf@ds4.des.no> Date: Tue, 11 Oct 2011 14:15:32 -0700 Message-ID: From: Garrett Cooper To: =?ISO-8859-1?Q?Dag=2DErling_Sm=F8rgrav?= Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r226157 - head/usr.bin/kdump X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2011 21:15:34 -0000 2011/10/11 Dag-Erling Sm=F8rgrav : > Garrett Cooper writes: >> Awesome! If you can find out where capname was at, I don't have an >> issue with re-adding that portion of the patch. The issue is that the >> compile fails with WARNS > 0 because it can't find the identifier in >> any of the included headers (and it's new code because I had to remove >> it last night before running make universe). I searched for it in >> src/sys/sys and I couldn't find it, fell back to looking in src/ and >> didn't come up with anything. I could have overlooked something >> obvious though (it happens), or it might have been a typo that I >> didn't look to closely at in my search to find the proper analog. >> Thanks! > > The capname function is generated by mksubr, along with all the other > *name functions. =A0It's part of the code I added this weekend. =A0This i= s > what "svn log" and "svn diff" are for, you know :) And svn blame/praise. Yeah.. kind of a derp moment. -Garrett From owner-svn-src-all@FreeBSD.ORG Tue Oct 11 21:52:24 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 967E4106566C; Tue, 11 Oct 2011 21:52:24 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 864AA8FC14; Tue, 11 Oct 2011 21:52:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9BLqONB033872; Tue, 11 Oct 2011 21:52:24 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9BLqOjR033869; Tue, 11 Oct 2011 21:52:24 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201110112152.p9BLqOjR033869@svn.freebsd.org> From: Marius Strobl Date: Tue, 11 Oct 2011 21:52:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226270 - head/sys/dev/lge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2011 21:52:24 -0000 Author: marius Date: Tue Oct 11 21:52:24 2011 New Revision: 226270 URL: http://svn.freebsd.org/changeset/base/226270 Log: - Remove unused remnants of MII bitbang'ing. - Sprinkle const. Modified: head/sys/dev/lge/if_lge.c head/sys/dev/lge/if_lgereg.h Modified: head/sys/dev/lge/if_lge.c ============================================================================== --- head/sys/dev/lge/if_lge.c Tue Oct 11 20:37:10 2011 (r226269) +++ head/sys/dev/lge/if_lge.c Tue Oct 11 21:52:24 2011 (r226270) @@ -110,7 +110,7 @@ __FBSDID("$FreeBSD$"); /* * Various supported device vendors/types and their names. */ -static struct lge_type lge_devs[] = { +static const struct lge_type const lge_devs[] = { { LGE_VENDORID, LGE_DEVICEID, "Level 1 Gigabit Ethernet" }, { 0, 0, NULL } }; @@ -442,7 +442,7 @@ static int lge_probe(dev) device_t dev; { - struct lge_type *t; + const struct lge_type *t; t = lge_devs; Modified: head/sys/dev/lge/if_lgereg.h ============================================================================== --- head/sys/dev/lge/if_lgereg.h Tue Oct 11 20:37:10 2011 (r226269) +++ head/sys/dev/lge/if_lgereg.h Tue Oct 11 21:52:24 2011 (r226270) @@ -475,26 +475,9 @@ struct lge_list_data { struct lge_type { u_int16_t lge_vid; u_int16_t lge_did; - char *lge_name; + const char *lge_name; }; -struct lge_mii_frame { - u_int8_t mii_stdelim; - u_int8_t mii_opcode; - u_int8_t mii_phyaddr; - u_int8_t mii_regaddr; - u_int8_t mii_turnaround; - u_int16_t mii_data; -}; - -/* - * MII constants - */ -#define LGE_MII_STARTDELIM 0x01 -#define LGE_MII_READOP 0x02 -#define LGE_MII_WRITEOP 0x01 -#define LGE_MII_TURNAROUND 0x02 - #define LGE_JUMBO_FRAMELEN 9018 #define LGE_JUMBO_MTU (LGE_JUMBO_FRAMELEN-ETHER_HDR_LEN-ETHER_CRC_LEN) #define LGE_JSLOTS 384 From owner-svn-src-all@FreeBSD.ORG Tue Oct 11 22:13:01 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E73971065674; Tue, 11 Oct 2011 22:13:01 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 5EB738FC0C; Tue, 11 Oct 2011 22:13:01 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 55A521FFC33; Tue, 11 Oct 2011 22:12:57 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 96C96B95F; Wed, 12 Oct 2011 00:12:57 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Garrett Cooper References: <201110081247.p98Cl06s063337@svn.freebsd.org> Date: Wed, 12 Oct 2011 00:12:57 +0200 In-Reply-To: (Garrett Cooper's message of "Tue, 11 Oct 2011 08:45:24 -0700") Message-ID: <86wrcbrxcm.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r226157 - head/usr.bin/kdump X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2011 22:13:02 -0000 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Would you mind reviewing the attached patch, which cleans up ktrace(1)? DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=ktrace-warns-6.diff Index: usr.bin/ktrace/ktrace.c =================================================================== --- usr.bin/ktrace/ktrace.c (revision 226262) +++ usr.bin/ktrace/ktrace.c (working copy) @@ -43,14 +43,15 @@ __FBSDID("$FreeBSD$"); #include +#include #include -#include #include -#include #include #include #include +#include +#include #include #include #include @@ -59,21 +60,22 @@ static char def_tracefile[] = DEF_TRACEFILE; +static enum clear { NOTSET, CLEAR, CLEARALL } clear = NOTSET; +static int pid; + static void no_ktrace(int); -static int rpid(char *); +static void set_pid_clear(const char *, enum clear); static void usage(void); int main(int argc, char *argv[]) { - enum { NOTSET, CLEAR, CLEARALL } clear; - int append, ch, fd, inherit, ops, pid, pidset, trpoints; + int append, ch, fd, inherit, ops, trpoints; const char *tracefile; mode_t omask; struct stat sb; - clear = NOTSET; - append = ops = pidset = inherit = 0; + append = ops = inherit = 0; trpoints = DEF_POINTS; tracefile = def_tracefile; while ((ch = getopt(argc,argv,"aCcdf:g:ip:t:")) != -1) @@ -82,11 +84,10 @@ append = 1; break; case 'C': - clear = CLEARALL; - pidset = 1; + set_pid_clear("1", CLEARALL); break; case 'c': - clear = CLEAR; + set_pid_clear(NULL, CLEAR); break; case 'd': ops |= KTRFLAG_DESCEND; @@ -95,15 +96,14 @@ tracefile = optarg; break; case 'g': - pid = -rpid(optarg); - pidset = 1; + set_pid_clear(optarg, NOTSET); + pid = -pid; break; case 'i': inherit = 1; break; case 'p': - pid = rpid(optarg); - pidset = 1; + set_pid_clear(optarg, NOTSET); break; case 't': trpoints = getpoints(optarg); @@ -115,12 +115,19 @@ default: usage(); } + argv += optind; argc -= optind; - - if ((pidset && *argv) || (!pidset && clear == NOTSET && !*argv)) + + /* must have either -[Cc], a pid or a command */ + if (clear == NOTSET && pid == 0 && argc == 0) usage(); - + /* can't have both a pid and a command */ + /* (note that -C sets pid to 1) */ + if (pid != 0 && argc > 0) { + usage(); + } + if (inherit) trpoints |= KTRFAC_INHERIT; @@ -129,10 +136,9 @@ if (clear == CLEARALL) { ops = KTROP_CLEAR | KTRFLAG_DESCEND; trpoints = ALL_POINTS; - pid = 1; - } else - ops |= pidset ? KTROP_CLEAR : KTROP_CLEARFILE; - + } else { + ops |= pid ? KTROP_CLEAR : KTROP_CLEARFILE; + } if (ktrace(tracefile, ops, trpoints, pid) < 0) err(1, "%s", tracefile); exit(0); @@ -160,46 +166,75 @@ trpoints |= PROC_ABI_POINTS; - if (*argv) { + if (argc > 0) { if (ktrace(tracefile, ops, trpoints, getpid()) < 0) err(1, "%s", tracefile); - execvp(argv[0], &argv[0]); - err(1, "exec of '%s' failed", argv[0]); + execvp(*argv, argv); + err(1, "exec of '%s' failed", *argv); } - else if (ktrace(tracefile, ops, trpoints, pid) < 0) + if (ktrace(tracefile, ops, trpoints, pid) < 0) err(1, "%s", tracefile); exit(0); } -static int -rpid(char *p) +static void +set_pid_clear(const char *p, enum clear cl) { - static int first; + intmax_t n; + char *e; - if (first++) { - warnx("only one -g or -p flag is permitted"); + if (clear != NOTSET && cl != NOTSET) { + /* either -c and -C or either of them twice */ + warnx("only one -c or -C flag is permitted"); usage(); } - if (!*p) { - warnx("illegal process id"); + if ((clear == CLEARALL && p != NULL) || (cl == CLEARALL && pid != 0)) { + /* both -C and a pid or pgid */ + warnx("the -C flag may not be combined with -g or -p"); usage(); } - return(atoi(p)); + if (p != NULL && pid != 0) { + /* either -p and -g or either of them twice */ + warnx("only one -g or -p flag is permitted"); + usage(); + } + if (p != NULL) { + errno = 0; + n = strtoimax(p, &e, 10); + /* + * 1) not a number, or outside the range of an intmax_t + * 2) inside the range of intmax_t but outside the range + * of an int, keeping in mind that the pid may be + * negated if it's actually a pgid. + */ + if (*e != '\0' || n < 1 || errno == ERANGE || + n > (intmax_t)INT_MAX || n > -(intmax_t)INT_MIN) { + warnx("invalid process or group id"); + usage(); + } + pid = n; + } + if (cl != NOTSET) + if ((clear = cl) == CLEARALL) + pid = 1; } static void usage(void) { - (void)fprintf(stderr, "%s\n%s\n", -"usage: ktrace [-aCcdi] [-f trfile] [-g pgrp | -p pid] [-t trstr]", -" ktrace [-adi] [-f trfile] [-t trstr] command"); + + fprintf(stderr, "%s\n%s\n", + "usage: ktrace [-aCcdi] [-f trfile] [-g pgrp | -p pid] [-t trstr]", + " ktrace [-adi] [-f trfile] [-t trstr] command"); exit(1); } static void no_ktrace(int sig __unused) { - (void)fprintf(stderr, -"error:\tktrace() system call not supported in the running kernel\n\tre-compile kernel with 'options KTRACE'\n"); + + fprintf(stderr, "error:\t%s\n\t%s\n", + "ktrace() system call not supported in the running kernel", + "re-compile kernel with 'options KTRACE'"); exit(1); } Index: usr.bin/ktrace/Makefile =================================================================== --- usr.bin/ktrace/Makefile (revision 226262) +++ usr.bin/ktrace/Makefile (working copy) @@ -5,6 +5,4 @@ SRCS= ktrace.c subr.c MLINKS= ktrace.1 trace.1 -WARNS?= 4 - .include --=-=-=-- From owner-svn-src-all@FreeBSD.ORG Tue Oct 11 22:27:24 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 59774106566C; Tue, 11 Oct 2011 22:27:24 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4854E8FC0A; Tue, 11 Oct 2011 22:27:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9BMROcF034990; Tue, 11 Oct 2011 22:27:24 GMT (envelope-from gabor@svn.freebsd.org) Received: (from gabor@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9BMROEX034985; Tue, 11 Oct 2011 22:27:24 GMT (envelope-from gabor@svn.freebsd.org) Message-Id: <201110112227.p9BMROEX034985@svn.freebsd.org> From: Gabor Kovesdan Date: Tue, 11 Oct 2011 22:27:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226271 - in head/usr.bin/grep: . regex X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2011 22:27:24 -0000 Author: gabor Date: Tue Oct 11 22:27:23 2011 New Revision: 226271 URL: http://svn.freebsd.org/changeset/base/226271 Log: - Use getprogname() instead of __progname - Allow disabling bzip2 support with WITHOUT_BZIP2 - Fix handling patterns that start with a dot - Remove superfluous semicolon Approved by: delphij (mentor) Modified: head/usr.bin/grep/Makefile head/usr.bin/grep/file.c head/usr.bin/grep/grep.c head/usr.bin/grep/regex/tre-fastmatch.c Modified: head/usr.bin/grep/Makefile ============================================================================== --- head/usr.bin/grep/Makefile Tue Oct 11 21:52:24 2011 (r226270) +++ head/usr.bin/grep/Makefile Tue Oct 11 22:27:23 2011 (r226271) @@ -26,9 +26,6 @@ LINKS= ${BINDIR}/grep ${BINDIR}/egrep \ ${BINDIR}/grep ${BINDIR}/zgrep \ ${BINDIR}/grep ${BINDIR}/zegrep \ ${BINDIR}/grep ${BINDIR}/zfgrep \ - ${BINDIR}/grep ${BINDIR}/bzgrep \ - ${BINDIR}/grep ${BINDIR}/bzegrep \ - ${BINDIR}/grep ${BINDIR}/bzfgrep \ ${BINDIR}/grep ${BINDIR}/xzgrep \ ${BINDIR}/grep ${BINDIR}/xzegrep \ ${BINDIR}/grep ${BINDIR}/xzfgrep \ @@ -41,9 +38,6 @@ MLINKS= grep.1 egrep.1 \ grep.1 zgrep.1 \ grep.1 zegrep.1 \ grep.1 zfgrep.1 \ - grep.1 bzgrep.1 \ - grep.1 bzegrep.1 \ - grep.1 bzfgrep.1 \ grep.1 xzgrep.1 \ grep.1 xzegrep.1 \ grep.1 xzfgrep.1 \ @@ -52,8 +46,22 @@ MLINKS= grep.1 egrep.1 \ grep.1 lzfgrep.1 .endif -LDADD= -lz -lbz2 -llzma -DPADD= ${LIBZ} ${LIBBZ2} ${LIBLZMA} +LDADD= -lz -llzma +DPADD= ${LIBZ} ${LIBLZMA} + +.if !defined(WITHOUT_BZIP2) +LDADD+= -lbz2 +DPADD+= ${LIBBZ2} + +LINKS+= ${BINDIR}/grep ${BINDIR}/bzgrep \ + ${BINDIR}/grep ${BINDIR}/bzegrep \ + ${BINDIR}/grep ${BINDIR}/bzfgrep +MLINKS+= grep.1 bzgrep.1 \ + grep.1 bzegrep.1 \ + grep.1 bzfgrep.1 +.else +CFLAGS+= -DWITHOUT_BZIP2 +.endif .if !defined(WITHOUT_GNU_COMPAT) CFLAGS+= -I/usr/include/gnu Modified: head/usr.bin/grep/file.c ============================================================================== --- head/usr.bin/grep/file.c Tue Oct 11 21:52:24 2011 (r226270) +++ head/usr.bin/grep/file.c Tue Oct 11 22:27:23 2011 (r226271) @@ -38,7 +38,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include @@ -51,14 +50,20 @@ __FBSDID("$FreeBSD$"); #include #include +#ifndef WITHOUT_BZIP2 +#include +#endif + #include "grep.h" #define MAXBUFSIZ (32 * 1024) #define LNBUFBUMP 80 static gzFile gzbufdesc; -static BZFILE* bzbufdesc; static lzma_stream lstrm = LZMA_STREAM_INIT; +#ifndef WITHOUT_BZIP2 +static BZFILE* bzbufdesc; +#endif static unsigned char *buffer; static unsigned char *bufpos; @@ -72,7 +77,6 @@ static inline int grep_refill(struct file *f) { ssize_t nr; - int bzerr; if (filebehave == FILE_MMAP) return (0); @@ -80,9 +84,12 @@ grep_refill(struct file *f) bufpos = buffer; bufrem = 0; - if (filebehave == FILE_GZIP) + if (filebehave == FILE_GZIP) { nr = gzread(gzbufdesc, buffer, MAXBUFSIZ); - else if (filebehave == FILE_BZIP && bzbufdesc != NULL) { +#ifndef WITHOUT_BZIP2 + } else if (filebehave == FILE_BZIP && bzbufdesc != NULL) { + int bzerr; + nr = BZ2_bzRead(&bzerr, bzbufdesc, buffer, MAXBUFSIZ); switch (bzerr) { case BZ_OK: @@ -108,6 +115,7 @@ grep_refill(struct file *f) /* Make sure we exit with an error */ nr = -1; } +#endif } else if ((filebehave == FILE_XZ) || (filebehave == FILE_LZMA)) { lzma_action action = LZMA_RUN; uint8_t in_buf[MAXBUFSIZ]; @@ -271,9 +279,11 @@ grep_open(const char *path) (gzbufdesc = gzdopen(f->fd, "r")) == NULL) goto error2; +#ifndef WITHOUT_BZIP2 if (filebehave == FILE_BZIP && (bzbufdesc = BZ2_bzdopen(f->fd, "r")) == NULL) goto error2; +#endif /* Fill read buffer, also catches errors early */ if (bufrem == 0 && grep_refill(f) != 0) Modified: head/usr.bin/grep/grep.c ============================================================================== --- head/usr.bin/grep/grep.c Tue Oct 11 21:52:24 2011 (r226270) +++ head/usr.bin/grep/grep.c Tue Oct 11 22:27:23 2011 (r226271) @@ -150,15 +150,13 @@ bool prev; /* flag whether or not the int tail; /* lines left to print */ bool notfound; /* file not found */ -extern char *__progname; - /* * Prints usage information and returns 2. */ static void usage(void) { - fprintf(stderr, getstr(4), __progname); + fprintf(stderr, getstr(4), getprogname()); fprintf(stderr, "%s", getstr(5)); fprintf(stderr, "%s", getstr(5)); fprintf(stderr, "%s", getstr(6)); @@ -332,7 +330,8 @@ int main(int argc, char *argv[]) { char **aargv, **eargv, *eopts; - char *pn, *ep; + char *ep; + const char *pn; unsigned long long l; unsigned int aargc, eargc, i; int c, lastc, needpattern, newarg, prevoptind; @@ -346,7 +345,7 @@ main(int argc, char *argv[]) /* Check what is the program name of the binary. In this way we can have all the funcionalities in one binary without the need of scripting and using ugly hacks. */ - pn = __progname; + pn = getprogname(); if (pn[0] == 'b' && pn[1] == 'z') { filebehave = FILE_BZIP; pn += 2; @@ -508,6 +507,10 @@ main(int argc, char *argv[]) cflags |= REG_ICASE; break; case 'J': +#ifdef WITHOUT_BZIP2 + errno = EOPNOTSUPP; + err(2, "bzip2 support was disabled at compile-time"); +#endif filebehave = FILE_BZIP; break; case 'L': @@ -568,7 +571,7 @@ main(int argc, char *argv[]) filebehave = FILE_MMAP; break; case 'V': - printf(getstr(9), __progname, VERSION); + printf(getstr(9), getprogname(), VERSION); exit(0); case 'v': vflag = true; Modified: head/usr.bin/grep/regex/tre-fastmatch.c ============================================================================== --- head/usr.bin/grep/regex/tre-fastmatch.c Tue Oct 11 21:52:24 2011 (r226270) +++ head/usr.bin/grep/regex/tre-fastmatch.c Tue Oct 11 22:27:23 2011 (r226271) @@ -1,4 +1,4 @@ -/* $FreeBSD$ */ +/* $FreeBSD$ */ /*- * Copyright (c) 1999 James Howard and Dag-Erling Coïdan Smørgrav @@ -548,7 +548,7 @@ tre_compile_fast(fastmatch_t *fg, const int cflags) { tre_char_t *tmp; - size_t pos = 0, hasdot = 0, whasdot = 0;; + size_t pos = 0, hasdot = 0, whasdot = 0; ssize_t firstdot = -1, wfirstdot = -1; bool escaped = false; bool *_escmap = NULL; @@ -694,7 +694,7 @@ badpat: return REG_BADPAT; } - fg->hasdot = whasdot; + fg->hasdot = wfirstdot > -1; /* * The pattern has been processed and copied to tmp as a literal string From owner-svn-src-all@FreeBSD.ORG Tue Oct 11 22:40:06 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id A893E1065670; Tue, 11 Oct 2011 22:40:06 +0000 (UTC) Date: Tue, 11 Oct 2011 22:40:06 +0000 From: Alexander Best To: Kirk McKusick Message-ID: <20111011224006.GA22991@freebsd.org> References: <201110111903.p9BJ3vAE028408@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201110111903.p9BJ3vAE028408@svn.freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r226266 - head/sbin/tunefs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2011 22:40:06 -0000 On Tue Oct 11 11, Kirk McKusick wrote: > Author: mckusick > Date: Tue Oct 11 19:03:57 2011 > New Revision: 226266 > URL: http://svn.freebsd.org/changeset/base/226266 > > Log: > After creating a filesystem using newfs -j the time stamps are all > zero and thus report as having been made in January 1970. Apart > from looking a bit silly, it also triggers alarms from scripts > that detect weird time stamps. This update sets all 4 (or 3, in > the case of UFS1) time stamps to the current time when enabling > journaling during newfs or later when enabling it with tunefs. on an already existing UFS2 fs with SU+SUJ enabled, will a `touch .sujournal` also set those 4 time stamps to sensible values, or will this somehow break the journal? cheers. alex > > Reported by: Hans Ottevanger > MFC after: 1 week > > Modified: > head/sbin/tunefs/tunefs.c > > Modified: head/sbin/tunefs/tunefs.c > ============================================================================== > --- head/sbin/tunefs/tunefs.c Tue Oct 11 18:46:41 2011 (r226265) > +++ head/sbin/tunefs/tunefs.c Tue Oct 11 19:03:57 2011 (r226266) > @@ -64,6 +64,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > #include > > /* the optimization warning string template */ > @@ -923,6 +924,7 @@ journal_alloc(int64_t size) > ino_t ino; > int blks; > int mode; > + time_t utime; > int i; > > cgp = &disk.d_cg; > @@ -983,18 +985,26 @@ journal_alloc(int64_t size) > */ > dp2 = ip; > dp1 = ip; > + time(&utime); > if (sblock.fs_magic == FS_UFS1_MAGIC) { > bzero(dp1, sizeof(*dp1)); > dp1->di_size = size; > dp1->di_mode = IFREG | IREAD; > dp1->di_nlink = 1; > dp1->di_flags = SF_IMMUTABLE | SF_NOUNLINK | UF_NODUMP; > + dp1->di_atime = utime; > + dp1->di_mtime = utime; > + dp1->di_ctime = utime; > } else { > bzero(dp2, sizeof(*dp2)); > dp2->di_size = size; > dp2->di_mode = IFREG | IREAD; > dp2->di_nlink = 1; > dp2->di_flags = SF_IMMUTABLE | SF_NOUNLINK | UF_NODUMP; > + dp2->di_atime = utime; > + dp2->di_mtime = utime; > + dp2->di_ctime = utime; > + dp2->di_birthtime = utime; > } > for (i = 0; i < NDADDR && resid; i++, resid--) { > blk = journal_balloc(); From owner-svn-src-all@FreeBSD.ORG Tue Oct 11 23:10:56 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 225F41065672; Tue, 11 Oct 2011 23:10:56 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id D42878FC14; Tue, 11 Oct 2011 23:10:55 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id CD3621FFC34; Tue, 11 Oct 2011 23:10:54 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 9F929B95F; Wed, 12 Oct 2011 01:10:54 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Garrett Cooper References: <201110081247.p98Cl06s063337@svn.freebsd.org> Date: Wed, 12 Oct 2011 01:10:54 +0200 In-Reply-To: (Garrett Cooper's message of "Tue, 11 Oct 2011 08:45:24 -0700") Message-ID: <86sjmzruo1.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r226157 - head/usr.bin/kdump X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2011 23:10:56 -0000 Garrett Cooper writes: > Seeing that you've committed quite a bit to kdump recently, could > you please take a look at > http://www.freebsd.org/cgi/query-pr.cgi?pr=3D161478 ? Hmm, did you run across this while testing your patch? % make cc -O2 -pipe -I/usr/src/usr.bin/kdump/../ktrace -I/usr/src/usr.bin/kdump -= I/usr/src/usr.bin/kdump/../.. -I. -g -std=3Dgnu99 -fstack-protector -Wsyste= m-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-p= rototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -W= write-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subs= cripts -Winline -Wnested-externs -Wredundant-decls -Wold-style-definition -= Wno-pointer-sign -c ioctl.c cc1: warnings being treated as errors In file included from ioctl.c:80: /usr/include/netinet/ip_fil.h:1284: warning: redundant redeclaration of 'bc= opywrap' /usr/include/netinet/ip_compat.h:1543: warning: previous declaration of 'bc= opywrap' was here *** Error code 1 Stop in /usr/src/usr.bin/kdump. I don't understand why it complains, since both declarations are identical, modulo whitespace: % grep -r bcopywrap /usr/include/netinet /usr/include/netinet/ip_fil.h:extern int bcopywrap __P((void *, vo= id *, size_t)); /usr/include/netinet/ip_compat.h:# define COPYIN(a,b,c) bcopywrap((a), = (b), (c)) /usr/include/netinet/ip_compat.h:# define COPYOUT(a,b,c) bcopywrap((a), = (b), (c)) /usr/include/netinet/ip_compat.h:extern int bcopywrap __P((= void *, void *, size_t)); % make DEBUG_FLAGS=3D"-g -save-temps" [...] % grep bcopywrap /usr/obj/usr/src/usr.bin/kdump/ioctl.i extern int bcopywrap (void *, void *, size_t); extern int bcopywrap (void *, void *, size_t); BTW, the extern keyword is completely pointless, since it is implicit for functions. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-all@FreeBSD.ORG Tue Oct 11 23:13:37 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DD03D106566B; Tue, 11 Oct 2011 23:13:37 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-qw0-f54.google.com (mail-qw0-f54.google.com [209.85.216.54]) by mx1.freebsd.org (Postfix) with ESMTP id 7544A8FC13; Tue, 11 Oct 2011 23:13:37 +0000 (UTC) Received: by qadz30 with SMTP id z30so131126qad.13 for ; Tue, 11 Oct 2011 16:13:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=mKg4HMATV5oxq5Iq2vGoq3ADv1av/FvFSh/xWjPNC64=; b=pa7/TfiGOwPg2cp5yRt8PCX/SpdM19GLSmEdjWNw2vGYKfI480vCDfTn2a/Qs7sWd5 +7Po5D7dzyIhbOLAQNYw8fTzft0N3nRBNXmzx5celjJ3Pvnb+RygfH/sTJke/VG/1nVh RRbtk55oGs8IgPKwL/nySEPuTwwEN5n/NRcj8= MIME-Version: 1.0 Received: by 10.224.206.132 with SMTP id fu4mr7889439qab.20.1318374816635; Tue, 11 Oct 2011 16:13:36 -0700 (PDT) Received: by 10.224.74.82 with HTTP; Tue, 11 Oct 2011 16:13:36 -0700 (PDT) In-Reply-To: <86sjmzruo1.fsf@ds4.des.no> References: <201110081247.p98Cl06s063337@svn.freebsd.org> <86sjmzruo1.fsf@ds4.des.no> Date: Tue, 11 Oct 2011 16:13:36 -0700 Message-ID: From: Garrett Cooper To: =?ISO-8859-1?Q?Dag=2DErling_Sm=F8rgrav?= Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r226157 - head/usr.bin/kdump X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 11 Oct 2011 23:13:38 -0000 2011/10/11 Dag-Erling Sm=F8rgrav : > Garrett Cooper writes: >> Seeing that you've committed quite a bit to kdump recently, could >> you please take a look at >> http://www.freebsd.org/cgi/query-pr.cgi?pr=3D161478 ? > > Hmm, did you run across this while testing your patch? > > % make > cc -O2 -pipe =A0-I/usr/src/usr.bin/kdump/../ktrace -I/usr/src/usr.bin/kdu= mp -I/usr/src/usr.bin/kdump/../.. -I. -g -std=3Dgnu99 -fstack-protector -Ws= ystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstri= ct-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qua= l -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-= subscripts -Winline -Wnested-externs -Wredundant-decls -Wold-style-definiti= on -Wno-pointer-sign -c ioctl.c > cc1: warnings being treated as errors > In file included from ioctl.c:80: > /usr/include/netinet/ip_fil.h:1284: warning: redundant redeclaration of '= bcopywrap' > /usr/include/netinet/ip_compat.h:1543: warning: previous declaration of '= bcopywrap' was here > *** Error code 1 > > Stop in /usr/src/usr.bin/kdump. > > I don't understand why it complains, since both declarations are > identical, modulo whitespace: > > % grep -r bcopywrap /usr/include/netinet > /usr/include/netinet/ip_fil.h:extern =A0 =A0 =A0 =A0 int =A0bcopywrap __P= ((void *, void *, size_t)); > /usr/include/netinet/ip_compat.h:# define =A0 =A0COPYIN(a,b,c) =A0bcopywr= ap((a), (b), (c)) > /usr/include/netinet/ip_compat.h:# define =A0 =A0COPYOUT(a,b,c) bcopywrap= ((a), (b), (c)) > /usr/include/netinet/ip_compat.h:extern =A0 =A0 =A0int =A0 =A0 =A0 =A0 = =A0 =A0bcopywrap __P((void *, void *, size_t)); > % make DEBUG_FLAGS=3D"-g -save-temps" > [...] > % grep bcopywrap /usr/obj/usr/src/usr.bin/kdump/ioctl.i > extern int bcopywrap (void *, void *, size_t); > extern int bcopywrap (void *, void *, size_t); > > BTW, the extern keyword is completely pointless, since it is implicit > for functions. I didn't run into that particular issue, but then again.. it looks like it hasn't been generating my files properly (which seems like a Makefile bug because all of the generated files should be cleaned with make clean). -Garrett From owner-svn-src-all@FreeBSD.ORG Wed Oct 12 01:09:57 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B2F951065744; Wed, 12 Oct 2011 01:09:57 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A30358FC19; Wed, 12 Oct 2011 01:09:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9C19vXb040101; Wed, 12 Oct 2011 01:09:57 GMT (envelope-from gabor@svn.freebsd.org) Received: (from gabor@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9C19v6H040099; Wed, 12 Oct 2011 01:09:57 GMT (envelope-from gabor@svn.freebsd.org) Message-Id: <201110120109.p9C19v6H040099@svn.freebsd.org> From: Gabor Kovesdan Date: Wed, 12 Oct 2011 01:09:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226273 - head/usr.bin/grep X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 12 Oct 2011 01:09:57 -0000 Author: gabor Date: Wed Oct 12 01:09:57 2011 New Revision: 226273 URL: http://svn.freebsd.org/changeset/base/226273 Log: - Fix counting of match limit (-m) Reported by: Nali Toja Approved by: delphij (mentor) Modified: head/usr.bin/grep/util.c Modified: head/usr.bin/grep/util.c ============================================================================== --- head/usr.bin/grep/util.c Wed Oct 12 00:17:43 2011 (r226272) +++ head/usr.bin/grep/util.c Wed Oct 12 01:09:57 2011 (r226273) @@ -233,7 +233,7 @@ procfile(const char *fn) linesqueued++; } c += t; - if (mflag && mcount < 0) + if (mflag && mcount <= 0) break; } if (Bflag > 0) From owner-svn-src-all@FreeBSD.ORG Wed Oct 12 01:19:12 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EE8A3106566B; Wed, 12 Oct 2011 01:19:12 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DE6348FC13; Wed, 12 Oct 2011 01:19:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9C1JCrv040438; Wed, 12 Oct 2011 01:19:12 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9C1JCPd040436; Wed, 12 Oct 2011 01:19:12 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201110120119.p9C1JCPd040436@svn.freebsd.org> From: Xin LI Date: Wed, 12 Oct 2011 01:19:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226274 - head/usr.bin/newgrp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 12 Oct 2011 01:19:13 -0000 Author: delphij Date: Wed Oct 12 01:19:12 2011 New Revision: 226274 URL: http://svn.freebsd.org/changeset/base/226274 Log: - Fix an off-by-one bug in addgroup(). - Fix the error message when setgid() failed. PR: bin/161509 Submitted by: Jeremy Huddleston MFC after: 2 weeks Modified: head/usr.bin/newgrp/newgrp.c Modified: head/usr.bin/newgrp/newgrp.c ============================================================================== --- head/usr.bin/newgrp/newgrp.c Wed Oct 12 01:09:57 2011 (r226273) +++ head/usr.bin/newgrp/newgrp.c Wed Oct 12 01:19:12 2011 (r226274) @@ -140,7 +140,7 @@ restoregrps(void) if (initres < 0) warn("initgroups"); if (setres < 0) - warn("setgroups"); + warn("setgid"); } static void @@ -220,7 +220,7 @@ addgroup(const char *grpname) /* Add old effective gid to supp. list if it does not exist. */ if (egid != grp->gr_gid && !inarray(egid, grps, ngrps)) { - if (ngrps == ngrps_max) + if (ngrps + 1 >= ngrps_max) warnx("too many groups"); else { grps[ngrps++] = egid; From owner-svn-src-all@FreeBSD.ORG Wed Oct 12 01:57:00 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D2F7F106566B; Wed, 12 Oct 2011 01:57:00 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A81D18FC08; Wed, 12 Oct 2011 01:57:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9C1v0B5041641; Wed, 12 Oct 2011 01:57:00 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9C1v0L1041636; Wed, 12 Oct 2011 01:57:00 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201110120157.p9C1v0L1041636@svn.freebsd.org> From: Nathan Whitehorn Date: Wed, 12 Oct 2011 01:57:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226275 - in stable/9/usr.sbin/makefs: . ffs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 12 Oct 2011 01:57:00 -0000 Author: nwhitehorn Date: Wed Oct 12 01:57:00 2011 New Revision: 226275 URL: http://svn.freebsd.org/changeset/base/226275 Log: Add support to makefs(8) to add UFS labels to images. Submitted by: avg Approved by: re (kib) Modified: stable/9/usr.sbin/makefs/ffs.c stable/9/usr.sbin/makefs/ffs.h stable/9/usr.sbin/makefs/ffs/mkfs.c stable/9/usr.sbin/makefs/makefs.8 Directory Properties: stable/9/usr.sbin/makefs/ (props changed) Modified: stable/9/usr.sbin/makefs/ffs.c ============================================================================== --- stable/9/usr.sbin/makefs/ffs.c Wed Oct 12 01:19:12 2011 (r226274) +++ stable/9/usr.sbin/makefs/ffs.c Wed Oct 12 01:57:00 2011 (r226275) @@ -236,6 +236,9 @@ ffs_parse_opts(const char *option, fsinf goto leave_ffs_parse_opts; } rv = 1; + } else if (strcmp(var, "label") == 0) { + strlcpy(ffs_opts->label, val, sizeof(ffs_opts->label)); + rv = 1; } else rv = set_option(ffs_options, var, val); Modified: stable/9/usr.sbin/makefs/ffs.h ============================================================================== --- stable/9/usr.sbin/makefs/ffs.h Wed Oct 12 01:19:12 2011 (r226274) +++ stable/9/usr.sbin/makefs/ffs.h Wed Oct 12 01:57:00 2011 (r226275) @@ -40,7 +40,11 @@ #ifndef _FFS_H #define _FFS_H +#include +#include + typedef struct { + char label[MAXVOLLEN]; /* volume name/label */ int bsize; /* block size */ int fsize; /* fragment size */ int cpg; /* cylinders per group */ Modified: stable/9/usr.sbin/makefs/ffs/mkfs.c ============================================================================== --- stable/9/usr.sbin/makefs/ffs/mkfs.c Wed Oct 12 01:19:12 2011 (r226274) +++ stable/9/usr.sbin/makefs/ffs/mkfs.c Wed Oct 12 01:57:00 2011 (r226275) @@ -139,7 +139,9 @@ ffs_mkfs(const char *fsys, const fsinfo_ avgfpdir = ffs_opts->avgfpdir; bbsize = BBSIZE; sbsize = SBLOCKSIZE; - + + strlcpy(sblock.fs_volname, ffs_opts->label, sizeof(sblock.fs_volname)); + if (Oflag == 0) { sblock.fs_old_inodefmt = FS_42INODEFMT; sblock.fs_maxsymlinklen = 0; Modified: stable/9/usr.sbin/makefs/makefs.8 ============================================================================== --- stable/9/usr.sbin/makefs/makefs.8 Wed Oct 12 01:19:12 2011 (r226274) +++ stable/9/usr.sbin/makefs/makefs.8 Wed Oct 12 01:57:00 2011 (r226275) @@ -242,6 +242,8 @@ Block size. Bytes per inode. .It Sy fsize Fragment size. +.It Sy label +Label name of the image. .It Sy maxbpg Maximum blocks per file in a cylinder group. .It Sy minfree From owner-svn-src-all@FreeBSD.ORG Wed Oct 12 01:57:39 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8311D106564A; Wed, 12 Oct 2011 01:57:39 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 687708FC17; Wed, 12 Oct 2011 01:57:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9C1vdP7041702; Wed, 12 Oct 2011 01:57:39 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9C1vdSW041699; Wed, 12 Oct 2011 01:57:39 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201110120157.p9C1vdSW041699@svn.freebsd.org> From: Nathan Whitehorn Date: Wed, 12 Oct 2011 01:57:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226276 - in stable/9/release: amd64 i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 12 Oct 2011 01:57:39 -0000 Author: nwhitehorn Date: Wed Oct 12 01:57:39 2011 New Revision: 226276 URL: http://svn.freebsd.org/changeset/base/226276 Log: MFC r226170: Use UFS labels and bsdlabels (like the 8.x memsticks) instead of GPT to fix problems with some BIOSes. Approved by: re (kib) Modified: stable/9/release/amd64/make-memstick.sh stable/9/release/i386/make-memstick.sh Directory Properties: stable/9/release/ (props changed) Modified: stable/9/release/amd64/make-memstick.sh ============================================================================== --- stable/9/release/amd64/make-memstick.sh Wed Oct 12 01:57:00 2011 (r226275) +++ stable/9/release/amd64/make-memstick.sh Wed Oct 12 01:57:39 2011 (r226276) @@ -13,15 +13,11 @@ PATH=/bin:/usr/bin:/sbin:/usr/sbin export PATH -BLOCKSIZE=10240 - if [ $# -ne 2 ]; then echo "make-memstick.sh /path/to/directory /path/to/image/file" exit 1 fi -tempfile="${2}.$$" - if [ ! -d ${1} ]; then echo "${1} must be a directory" exit 1 @@ -32,47 +28,21 @@ if [ -e ${2} ]; then exit 1 fi -echo '/dev/gpt/FreeBSD_Install / ufs ro,noatime 1 1' > ${1}/etc/fstab -rm -f ${tempfile} -makefs -B little ${tempfile} ${1} +echo '/dev/ufs/FreeBSD_Install / ufs ro,noatime 1 1' > ${1}/etc/fstab +makefs -B little -o label=FreeBSD_Install ${2} ${1} if [ $? -ne 0 ]; then echo "makefs failed" exit 1 fi rm ${1}/etc/fstab -# -# Use $BLOCKSIZE for transfers to improve efficiency. When calculating -# how many blocks to transfer "+ 2" is to account for truncation in the -# division and to provide space for the label. -# - -filesize=`stat -f "%z" ${tempfile}` -blocks=$(($filesize / ${BLOCKSIZE} + 256)) -dd if=/dev/zero of=${2} bs=${BLOCKSIZE} count=${blocks} -if [ $? -ne 0 ]; then - echo "creation of image file failed" - exit 1 -fi - unit=`mdconfig -a -t vnode -f ${2}` if [ $? -ne 0 ]; then echo "mdconfig failed" exit 1 fi - -gpart create -s GPT ${unit} -gpart add -t freebsd-boot -s 64K ${unit} -gpart bootcode -b ${1}/boot/pmbr -p ${1}/boot/gptboot -i 1 ${unit} -gpart add -t freebsd-ufs -l FreeBSD_Install ${unit} - -dd if=${tempfile} of=/dev/${unit}p2 bs=$BLOCKSIZE conv=sync -if [ $? -ne 0 ]; then - echo "copying filesystem into image file failed" - exit 1 -fi - +gpart create -s BSD ${unit} +gpart bootcode -b ${1}/boot/boot ${unit} +gpart add -t freebsd-ufs ${unit} mdconfig -d -u ${unit} -rm -f ${tempfile} - Modified: stable/9/release/i386/make-memstick.sh ============================================================================== --- stable/9/release/i386/make-memstick.sh Wed Oct 12 01:57:00 2011 (r226275) +++ stable/9/release/i386/make-memstick.sh Wed Oct 12 01:57:39 2011 (r226276) @@ -13,15 +13,11 @@ PATH=/bin:/usr/bin:/sbin:/usr/sbin export PATH -BLOCKSIZE=10240 - if [ $# -ne 2 ]; then echo "make-memstick.sh /path/to/directory /path/to/image/file" exit 1 fi -tempfile="${2}.$$" - if [ ! -d ${1} ]; then echo "${1} must be a directory" exit 1 @@ -32,47 +28,21 @@ if [ -e ${2} ]; then exit 1 fi -echo '/dev/gpt/FreeBSD_Install / ufs ro,noatime 1 1' > ${1}/etc/fstab -rm -f ${tempfile} -makefs -B little ${tempfile} ${1} +echo '/dev/ufs/FreeBSD_Install / ufs ro,noatime 1 1' > ${1}/etc/fstab +makefs -B little -o label=FreeBSD_Install ${2} ${1} if [ $? -ne 0 ]; then echo "makefs failed" exit 1 fi rm ${1}/etc/fstab -# -# Use $BLOCKSIZE for transfers to improve efficiency. When calculating -# how many blocks to transfer "+ 2" is to account for truncation in the -# division and to provide space for the label. -# - -filesize=`stat -f "%z" ${tempfile}` -blocks=$(($filesize / ${BLOCKSIZE} + 256)) -dd if=/dev/zero of=${2} bs=${BLOCKSIZE} count=${blocks} -if [ $? -ne 0 ]; then - echo "creation of image file failed" - exit 1 -fi - unit=`mdconfig -a -t vnode -f ${2}` if [ $? -ne 0 ]; then echo "mdconfig failed" exit 1 fi - -gpart create -s GPT ${unit} -gpart add -t freebsd-boot -s 64K ${unit} -gpart bootcode -b ${1}/boot/pmbr -p ${1}/boot/gptboot -i 1 ${unit} -gpart add -t freebsd-ufs -l FreeBSD_Install ${unit} - -dd if=${tempfile} of=/dev/${unit}p2 bs=$BLOCKSIZE conv=sync -if [ $? -ne 0 ]; then - echo "copying filesystem into image file failed" - exit 1 -fi - +gpart create -s BSD ${unit} +gpart bootcode -b ${1}/boot/boot ${unit} +gpart add -t freebsd-ufs ${unit} mdconfig -d -u ${unit} -rm -f ${tempfile} - From owner-svn-src-all@FreeBSD.ORG Wed Oct 12 01:58:11 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BD2551065673; Wed, 12 Oct 2011 01:58:11 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from agogare.doit.wisc.edu (agogare.doit.wisc.edu [144.92.197.211]) by mx1.freebsd.org (Postfix) with ESMTP id 8E0908FC17; Wed, 12 Oct 2011 01:58:11 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII; format=flowed Received: from avs-daemon.smtpauth2.wiscmail.wisc.edu by smtpauth2.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 7u2-7.05 32bit (built Jul 30 2009)) id <0LSX00600K4Y5O00@smtpauth2.wiscmail.wisc.edu>; Tue, 11 Oct 2011 20:58:10 -0500 (CDT) Received: from comporellon.tachypleus.net ([unknown] [76.210.68.83]) by smtpauth2.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 7u2-7.05 32bit (built Jul 30 2009)) with ESMTPSA id <0LSX00HZXK4X1T10@smtpauth2.wiscmail.wisc.edu>; Tue, 11 Oct 2011 20:58:10 -0500 (CDT) Date: Tue, 11 Oct 2011 20:58:08 -0500 From: Nathan Whitehorn In-reply-to: <201110120157.p9C1v0L1041636@svn.freebsd.org> To: Nathan Whitehorn Message-id: <4E94F430.1040006@freebsd.org> X-Spam-Report: AuthenticatedSender=yes, SenderIP=76.210.68.83 X-Spam-PmxInfo: Server=avs-9, Version=5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2011.10.12.14814, SenderIP=76.210.68.83 References: <201110120157.p9C1v0L1041636@svn.freebsd.org> User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:7.0) Gecko/20110928 Thunderbird/7.0 Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org Subject: Re: svn commit: r226275 - in stable/9/usr.sbin/makefs: . ffs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 12 Oct 2011 01:58:11 -0000 On 10/11/11 20:57, Nathan Whitehorn wrote: > Author: nwhitehorn > Date: Wed Oct 12 01:57:00 2011 > New Revision: 226275 > URL: http://svn.freebsd.org/changeset/base/226275 > > Log: > Add support to makefs(8) to add UFS labels to images. > > Submitted by: avg > Approved by: re (kib) This is an MFC of r226169. -Nathan From owner-svn-src-all@FreeBSD.ORG Wed Oct 12 03:29:12 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8B955106564A; Wed, 12 Oct 2011 03:29:12 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7B8B88FC08; Wed, 12 Oct 2011 03:29:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9C3TC3T044832; Wed, 12 Oct 2011 03:29:12 GMT (envelope-from cperciva@svn.freebsd.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9C3TCED044830; Wed, 12 Oct 2011 03:29:12 GMT (envelope-from cperciva@svn.freebsd.org) Message-Id: <201110120329.p9C3TCED044830@svn.freebsd.org> From: Colin Percival Date: Wed, 12 Oct 2011 03:29:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226277 - head/etc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 12 Oct 2011 03:29:12 -0000 Author: cperciva Date: Wed Oct 12 03:29:12 2011 New Revision: 226277 URL: http://svn.freebsd.org/changeset/base/226277 Log: Now that the portsnap buildbox is generating the raw bits for INDEX-9, add it to the set of INDEX files built by portsnap. Modified: head/etc/portsnap.conf Modified: head/etc/portsnap.conf ============================================================================== --- head/etc/portsnap.conf Wed Oct 12 01:57:39 2011 (r226276) +++ head/etc/portsnap.conf Wed Oct 12 03:29:12 2011 (r226277) @@ -32,3 +32,4 @@ KEYPRINT=9b5feee6d69f170e3dd0a2c8e469ddb # List of INDEX files to build and the DESCRIBE file to use for each INDEX INDEX-7 DESCRIBE.7 INDEX INDEX-8 DESCRIBE.8 +INDEX INDEX-9 DESCRIBE.9 From owner-svn-src-all@FreeBSD.ORG Wed Oct 12 05:18:15 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 92E0E106566B; Wed, 12 Oct 2011 05:18:15 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 81DBD8FC08; Wed, 12 Oct 2011 05:18:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9C5IFdh048174; Wed, 12 Oct 2011 05:18:15 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9C5IF4Q048172; Wed, 12 Oct 2011 05:18:15 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201110120518.p9C5IF4Q048172@svn.freebsd.org> From: Michael Tuexen Date: Wed, 12 Oct 2011 05:18:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226278 - stable/9/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 12 Oct 2011 05:18:15 -0000 Author: tuexen Date: Wed Oct 12 05:18:15 2011 New Revision: 226278 URL: http://svn.freebsd.org/changeset/base/226278 Log: MFC 226222: Get struct sctp_net_route in tune with struct route. struct route was changed in http://svn.freebsd.org/changeset/base/225698 and since then SCTP support was broken. Approved by: re@ Modified: stable/9/sys/netinet/sctp_structs.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/netinet/sctp_structs.h ============================================================================== --- stable/9/sys/netinet/sctp_structs.h Wed Oct 12 03:29:12 2011 (r226277) +++ stable/9/sys/netinet/sctp_structs.h Wed Oct 12 05:18:15 2011 (r226278) @@ -191,6 +191,8 @@ struct iterator_control { struct sctp_net_route { sctp_rtentry_t *ro_rt; void *ro_lle; + void *ro_ia; + int ro_flags; union sctp_sockstore _l_addr; /* remote peer addr */ struct sctp_ifa *_s_addr; /* our selected src addr */ }; From owner-svn-src-all@FreeBSD.ORG Wed Oct 12 06:36:17 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E695C106564A; Wed, 12 Oct 2011 06:36:17 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D47208FC0A; Wed, 12 Oct 2011 06:36:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9C6aHXF050693; Wed, 12 Oct 2011 06:36:17 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9C6aHXA050684; Wed, 12 Oct 2011 06:36:17 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201110120636.p9C6aHXA050684@svn.freebsd.org> From: Edwin Groothuis Date: Wed, 12 Oct 2011 06:36:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226279 - vendor/tzdata/dist X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 12 Oct 2011 06:36:18 -0000 Author: edwin Date: Wed Oct 12 06:36:17 2011 New Revision: 226279 URL: http://svn.freebsd.org/changeset/base/226279 Log: Vendor import of tzdata2011l: Changes in 2011i: Africa - Added South Sudan: Africa/Juba Australasia: - Samoa will go forward 24 hours at 30 December 2011 to better match the day of the week with its neighbours. Europe: - Europe/Kaliningrad will have the timezone KALT. North America: - Updates to Metlakatla historical data - Newfoundland, Labrador and Resolute will do something which I can't figure out. iso3166tab; - Add SS for South Sudan. Changes in 2011j: - Samoa will go from 29 December 23:59:59 to 31 December 00:00:00. - Samoa DST will end on 1 April 2012 Changes in 2011k: - Gaza / West Bank goes back to standard time on 02 August 2011. - West Bank went bac kto DST on 30 August 2011. - Lots of changes in Minsk (GMT+3 without DST) and other Russian regions. A new timezone has been created for them, FET: Further-eastern European Time aka GMT+3. - Add Asian/Hebron to the zone.tab file. Changes in 2011l: - West Bank came out of DST on 30 September 2011. - Fiji will g oin DST on 23 October and out of it on 26 Februari - State Bahia might go back to DST in 16 October 2011 Due to legal problems, ado and Paul Eggert have to temporary suspend their work on the timezone database (http://thread.gmane.org/gmane.comp.time.tz/4133). Their work has been continued by volunteers on the tz community and the hosting of the data files is done by Robert Elz at ftp://munnari.oz.au/pub/. Obtained from: ftp://munnari.oz.au/pub, ftp://elsie.nci.nih.gov/pub/ Modified: vendor/tzdata/dist/africa vendor/tzdata/dist/asia vendor/tzdata/dist/australasia vendor/tzdata/dist/europe vendor/tzdata/dist/iso3166.tab vendor/tzdata/dist/northamerica vendor/tzdata/dist/southamerica vendor/tzdata/dist/zone.tab Modified: vendor/tzdata/dist/africa ============================================================================== --- vendor/tzdata/dist/africa Wed Oct 12 05:18:15 2011 (r226278) +++ vendor/tzdata/dist/africa Wed Oct 12 06:36:17 2011 (r226279) @@ -1,5 +1,5 @@ #
-# @(#)africa	8.31
+# @(#)africa	8.33
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -58,7 +58,7 @@
 # I invented the following abbreviations; corrections are welcome!
 #	 2:00	WAST	West Africa Summer Time
 #	 2:30	BEAT	British East Africa Time (no longer used)
-#	 2:44:45 BEAUT	British East Africa Unified Time (no longer used)
+#	 2:45	BEAUT	British East Africa Unified Time (no longer used)
 #	 3:00	CAST	Central Africa Summer Time (no longer used)
 #	 3:00	SAST	South Africa Summer Time (no longer used)
 #	 3:00	EAT	East Africa Time
@@ -396,7 +396,7 @@ Zone	Africa/Bissau	-1:02:20 -	LMT	1911 M
 Zone	Africa/Nairobi	2:27:16	-	LMT	1928 Jul
 			3:00	-	EAT	1930
 			2:30	-	BEAT	1940
-			2:44:45	-	BEAUT	1960
+			2:45	-	BEAUT	1960
 			3:00	-	EAT
 
 # Lesotho
@@ -957,6 +957,11 @@ Zone	Africa/Khartoum	2:10:08 -	LMT	1931
 			2:00	Sudan	CA%sT	2000 Jan 15 12:00
 			3:00	-	EAT
 
+# South Sudan
+Zone	Africa/Juba	2:06:24 -	LMT	1931
+			2:00	Sudan	CA%sT	2000 Jan 15 12:00
+			3:00	-	EAT
+
 # Swaziland
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Africa/Mbabane	2:04:24 -	LMT	1903 Mar
@@ -966,7 +971,7 @@ Zone	Africa/Mbabane	2:04:24 -	LMT	1903 M
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone Africa/Dar_es_Salaam 2:37:08 -	LMT	1931
 			3:00	-	EAT	1948
-			2:44:45	-	BEAUT	1961
+			2:45	-	BEAUT	1961
 			3:00	-	EAT
 
 # Togo
@@ -1092,7 +1097,7 @@ Zone	Africa/Tunis	0:40:44 -	LMT	1881 May
 Zone	Africa/Kampala	2:09:40 -	LMT	1928 Jul
 			3:00	-	EAT	1930
 			2:30	-	BEAT	1948
-			2:44:45	-	BEAUT	1957
+			2:45	-	BEAUT	1957
 			3:00	-	EAT
 
 # Zambia

Modified: vendor/tzdata/dist/asia
==============================================================================
--- vendor/tzdata/dist/asia	Wed Oct 12 05:18:15 2011	(r226278)
+++ vendor/tzdata/dist/asia	Wed Oct 12 06:36:17 2011	(r226279)
@@ -1,4 +1,4 @@
-# @(#)asia	8.65
+# @(#)asia	8.68
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -2194,7 +2194,47 @@ Zone	Asia/Karachi	4:28:12 -	LMT	1907
 # http://www.timeanddate.com/news/time/westbank-gaza-end-dst-2010.html
 # 
 
+# From Steffen Thorsen (2011-08-26):
+# Gaza and the West Bank did go back to standard time in the beginning of
+# August, and will now enter daylight saving time again on 2011-08-30
+# 00:00 (so two periods of DST in 2011). The pause was because of
+# Ramadan.
+#
+# 
+# http://www.maannews.net/eng/ViewDetails.aspx?ID=416217
+# 
+# Additional info:
+# 
+# http://www.timeanddate.com/news/time/palestine-dst-2011.html
+# 
+
+# From Alexander Krivenyshev (2011-08-27):
+# According to the article in The Jerusalem Post:
+# "...Earlier this month, the Palestinian government in the West Bank decided to
+# move to standard time for 30 days, during Ramadan. The Palestinians in the
+# Gaza Strip accepted the change and also moved their clocks one hour back.
+# The Hamas government said on Saturday that it won't observe summertime after
+# the Muslim feast of Id al-Fitr, which begins on Tuesday..."
+# ...
+# 
+# http://www.jpost.com/MiddleEast/Article.aspx?id=235650
+# 
+# or
+# 
+# http://www.worldtimezone.com/dst_news/dst_news_gazastrip05.html
+# 
 # The rules for Egypt are stolen from the `africa' file.
+
+# From Steffen Thorsen (2011-09-30):
+# West Bank did end Daylight Saving Time this morning/midnight (2011-09-30 
+# 00:00).
+# So West Bank and Gaza now have the same time again.
+#
+# Many sources, including:
+# 
+# http://www.maannews.net/eng/ViewDetails.aspx?ID=424808
+# 
+
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule EgyptAsia	1957	only	-	May	10	0:00	1:00	S
 Rule EgyptAsia	1957	1958	-	Oct	 1	0:00	0	-
@@ -2210,19 +2250,37 @@ Rule Palestine	2005	only	-	Oct	 4	2:00	0
 Rule Palestine	2006	2008	-	Apr	 1	0:00	1:00	S
 Rule Palestine	2006	only	-	Sep	22	0:00	0	-
 Rule Palestine	2007	only	-	Sep	Thu>=8	2:00	0	-
-Rule Palestine	2008	only	-	Aug	lastFri	2:00	0	-
+Rule Palestine	2008	only	-	Aug	lastFri	0:00	0	-
 Rule Palestine	2009	only	-	Mar	lastFri	0:00	1:00	S
-Rule Palestine	2010	max	-	Mar	lastSat	0:01	1:00	S
-Rule Palestine	2009	max	-	Sep	Fri>=1	2:00	0	-
+Rule Palestine	2009	only	-	Sep	Fri>=1	2:00	0	-
+Rule Palestine	2010	only	-	Mar	lastSat	0:01	1:00	S
 Rule Palestine	2010	only	-	Aug	11	0:00	0	-
 
+# From Arthur David Olson (2011-09-20):
+# 2011 transitions per http://www.timeanddate.com as of 2011-09-20.
+
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Gaza	2:17:52	-	LMT	1900 Oct
 			2:00	Zion	EET	1948 May 15
 			2:00 EgyptAsia	EE%sT	1967 Jun  5
 			2:00	Zion	I%sT	1996
 			2:00	Jordan	EE%sT	1999
-			2:00 Palestine	EE%sT
+			2:00 Palestine	EE%sT	2011 Apr  2 12:01
+			2:00	1:00	EEST	2011 Aug  1
+			2:00	-	EET
+
+Zone	Asia/Hebron	2:20:23	-	LMT	1900 Oct
+			2:00	Zion	EET	1948 May 15
+			2:00 EgyptAsia	EE%sT	1967 Jun  5
+			2:00	Zion	I%sT	1996
+			2:00	Jordan	EE%sT	1999
+			2:00 Palestine	EE%sT	2008 Aug
+			2:00 	1:00	EEST	2008 Sep
+			2:00 Palestine	EE%sT	2011 Apr  1 12:01
+			2:00	1:00	EEST	2011 Aug  1
+			2:00	-	EET	2011 Aug 30
+			2:00	1:00	EEST	2011 Sep 30 3:00
+			2:00	-	EET
 
 # Paracel Is
 # no information

Modified: vendor/tzdata/dist/australasia
==============================================================================
--- vendor/tzdata/dist/australasia	Wed Oct 12 05:18:15 2011	(r226278)
+++ vendor/tzdata/dist/australasia	Wed Oct 12 06:36:17 2011	(r226279)
@@ -1,5 +1,5 @@
 # 
-# @(#)australasia	8.23
+# @(#)australasia	8.27
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -296,6 +296,18 @@ Zone	Indian/Cocos	6:27:40	-	LMT	1900
 # http://www.worldtimezone.com/dst_news/dst_news_fiji04.html
 # 
 
+# From Steffen Thorsen (2011-10-03):
+# Now the dates have been confirmed, and at least our start date 
+# assumption was correct (end date was one week wrong).
+#
+# 
+# www.fiji.gov.fj/index.php?option=com_content&view=article&id=4966:daylight-saving-starts-in-fiji&catid=71:press-releases&Itemid=155
+# 
+# which says
+# Members of the public are reminded to change their time to one hour in 
+# advance at 2am to 3am on October 23, 2011 and one hour back at 3am to 
+# 2am on February 26 next year.
+
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Fiji	1998	1999	-	Nov	Sun>=1	2:00	1:00	S
 Rule	Fiji	1999	2000	-	Feb	lastSun	3:00	0	-
@@ -303,6 +315,8 @@ Rule	Fiji	2009	only	-	Nov	29	2:00	1:00	S
 Rule	Fiji	2010	only	-	Mar	lastSun	3:00	0	-
 Rule	Fiji	2010	only	-	Oct	24	2:00	1:00	S
 Rule	Fiji	2011	only	-	Mar	Sun>=1	3:00	0	-
+Rule	Fiji	2011	only	-	Oct	23	2:00	1:00	S
+Rule	Fiji	2012	only	-	Feb	26	3:00	0	-
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Pacific/Fiji	11:53:40 -	LMT	1915 Oct 26	# Suva
 			12:00	Fiji	FJ%sT	# Fiji Time
@@ -499,7 +513,7 @@ Zone Pacific/Pago_Pago	 12:37:12 -	LMT	1
 # http://www.parliament.gov.ws/documents/acts/Daylight%20Saving%20Act%20%202009%20%28English%29%20-%20Final%207-7-091.pdf
 # 
 
-# From Raymond Hughes (2010-10-07):
+# From Laupue Raymond Hughes (2010-10-07):
 # Please see
 # 
 # http://www.mcil.gov.ws
@@ -509,7 +523,7 @@ Zone Pacific/Pago_Pago	 12:37:12 -	LMT	1
 # to 01:00am and First Sunday April 2011 (03/04/11) - adjust clocks
 # backwards from 1:00am to 12:00am"
 
-# From Raymond Hughes (2011-03-07)
+# From Laupue Raymond Hughes (2011-03-07):
 # I believe this will be posted shortly on the website
 # 
 # www.mcil.gov.ws
@@ -529,12 +543,74 @@ Zone Pacific/Pago_Pago	 12:37:12 -	LMT	1
 # Margaret Fruean ACTING CHIEF EXECUTIVE OFFICER MINISTRY OF COMMERCE,
 # INDUSTRY AND LABOUR 28th February 2011
 
+# From David Zuelke (2011-05-09):
+# Subject: Samoa to move timezone from east to west of international date line
+# 
+# 
+# http://www.morningstar.co.uk/uk/markets/newsfeeditem.aspx?id=138501958347963
+# 
+
+# From Mark Sim-Smith (2011-08-17):
+# I have been in contact with Leilani Tuala Warren from the Samoa Law
+# Reform Commission, and she has sent me a copy of the Bill that she
+# confirmed has been passed...Most of the sections are about maps rather
+# than the time zone change, but I'll paste the relevant bits below. But
+# the essence is that at midnight 29 Dec (UTC-11 I suppose), Samoa
+# changes from UTC-11 to UTC+13:
+#
+# International Date Line Bill 2011
+#
+# AN ACT to provide for the change to standard time in Samoa and to make
+# consequential amendments to the position of the International Date
+# Line, and for related purposes.
+#
+# BE IT ENACTED by the Legislative Assembly of Samoa in Parliament
+# assembled as follows:
+#
+# 1. Short title and commencement-(1) This Act may be cited as the
+# International Date Line Act 2011. (2) Except for section 5(3) this Act
+# commences at 12 o'clock midnight, on Thursday 29th December 2011. (3)
+# Section 5(3) commences on the date of assent by the Head of State.
+#
+# [snip]
+#
+# 3. Interpretation - [snip] "Samoa standard time" in this Act and any
+# other statute of Samoa which refers to 'Samoa standard time' means the
+# time 13 hours in advance of Co-ordinated Universal Time.
+#
+# 4. Samoa standard time - (1) Upon the commencement of this Act, Samoa
+# standard time shall be set at 13 hours in advance of Co-ordinated
+# Universal Time for the whole of Samoa. (2) All references to Samoa's
+# time zone and to Samoa standard time in Samoa in all legislation and
+# instruments after the commencement of this Act shall be references to
+# Samoa standard time as provided for in this Act. (3) Nothing in this
+# Act affects the provisions of the Daylight Saving Act 2009, except that
+# it defines Samoa standard time....
+
+# From Laupue Raymond Hughes (2011-09-02):
+# 
+# http://www.mcil.gov.ws/mcil_publications.html
+# 
+#
+# here is the official website publication for Samoa DST and dateline change
+#
+# DST
+# Year	End	Time	Start	Time
+# 2011	- - -	- - -	24 September	3:00am to 4:00am
+# 2012	01 April	4:00am to 3:00am	- - -	- - -
+#
+# Dateline Change skip Friday 30th Dec 2011
+# Thursday 29th December 2011	23:59:59 Hours
+# Saturday 31st December 2011	00:00:00 Hours
 Zone Pacific/Apia	 12:33:04 -	LMT	1879 Jul  5
 			-11:26:56 -	LMT	1911
 			-11:30	-	SAMT	1950		# Samoa Time
 			-11:00	-	WST	2010 Sep 26
 			-11:00	1:00	WSDT	2011 Apr 2 4:00
-			-11:00	-	WST
+			-11:00	-	WST	2011 Sep 24 3:00
+			-11:00	1:00	WSDT	2011 Dec 30
+			 13:00	1:00	WSDT	2012 Apr 1 4:00
+			 13:00	-	WST
 
 # Solomon Is
 # excludes Bougainville, for which see Papua New Guinea
@@ -1206,7 +1282,7 @@ Zone	Pacific/Wallis	12:15:20 -	LMT	1901
 # Lord Howe Island Board (controlling authority for the Island) is
 # seeking the community's views on various options for summer time
 # arrangements on the Island, e.g. advance clocks by 1 full hour
-# instead of only 30 minutes.  Dependant on the wishes of residents
+# instead of only 30 minutes.  [Dependent] on the wishes of residents
 # the Board may approach the NSW government to change the existing
 # arrangements.  The starting date for summer time on the Island will
 # however always coincide with the rest of NSW.
@@ -1332,7 +1408,7 @@ Zone	Pacific/Wallis	12:15:20 -	LMT	1901
 
 # From Paul Eggert (1996-01-22):
 # Today's _Wall Street Journal_ (page 1) reports that Kiribati
-# ``declared it the same day throught the country as of Jan. 1, 1995''
+# ``declared it the same day [throughout] the country as of Jan. 1, 1995''
 # as part of the competition to be first into the 21st century.
 
 

Modified: vendor/tzdata/dist/europe
==============================================================================
--- vendor/tzdata/dist/europe	Wed Oct 12 05:18:15 2011	(r226278)
+++ vendor/tzdata/dist/europe	Wed Oct 12 06:36:17 2011	(r226279)
@@ -1,5 +1,5 @@
 # 
-# @(#)europe	8.33
+# @(#)europe	8.38
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -561,9 +561,9 @@ Rule	Russia	1985	1991	-	Mar	lastSun	 2:0
 #
 Rule	Russia	1992	only	-	Mar	lastSat	 23:00	1:00	S
 Rule	Russia	1992	only	-	Sep	lastSat	 23:00	0	-
-Rule	Russia	1993	max	-	Mar	lastSun	 2:00s	1:00	S
+Rule	Russia	1993	2010	-	Mar	lastSun	 2:00s	1:00	S
 Rule	Russia	1993	1995	-	Sep	lastSun	 2:00s	0	-
-Rule	Russia	1996	max	-	Oct	lastSun	 2:00s	0	-
+Rule	Russia	1996	2010	-	Oct	lastSun	 2:00s	0	-
 
 # From Alexander Krivenyshev (2011-06-14):
 # According to Kremlin press service, Russian President Dmitry Medvedev
@@ -583,7 +583,6 @@ Rule	Russia	1996	max	-	Oct	lastSun	 2:00
 # From Arthur David Olson (2011-06-15):
 # Take "abolishing daylight saving time" to mean that time is now considered
 # to be standard.
-# At least for now, keep the "old" Russia rules for the benefit of Belarus.
 
 # These are for backward compatibility with older versions.
 
@@ -689,6 +688,23 @@ Zone	Europe/Vienna	1:05:20 -	LMT	1893 Ap
 			1:00	EU	CE%sT
 
 # Belarus
+# From Yauhen Kharuzhy (2011-09-16):
+# By latest Belarus government act Europe/Minsk timezone was changed to
+# GMT+3 without DST (was GMT+2 with DST).
+#
+# Sources (Russian language):
+# 1.
+# 
+# http://www.belta.by/ru/all_news/society/V-Belarusi-otmenjaetsja-perexod-na-sezonnoe-vremja_i_572952.html
+# 
+# 2.
+# 
+# http://naviny.by/rubrics/society/2011/09/16/ic_articles_116_175144/
+# 
+# 3.
+# 
+# http://news.tut.by/society/250578.html
+# 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Europe/Minsk	1:50:16 -	LMT	1880
 			1:50	-	MMT	1924 May 2 # Minsk Mean Time
@@ -700,7 +716,8 @@ Zone	Europe/Minsk	1:50:16 -	LMT	1880
 			2:00	1:00	EEST	1991 Sep 29 2:00s
 			2:00	-	EET	1992 Mar 29 0:00s
 			2:00	1:00	EEST	1992 Sep 27 0:00s
-			2:00	Russia	EE%sT
+			2:00	Russia	EE%sT	2011 Mar 27 2:00s
+			3:00	-	FET # Further-eastern European Time
 
 # Belgium
 #
@@ -2034,7 +2051,7 @@ Zone Europe/Kaliningrad	 1:22:00 -	LMT	1
 			 2:00	Poland	CE%sT	1946
 			 3:00	Russia	MSK/MSD	1991 Mar 31 2:00s
 			 2:00	Russia	EE%sT	2011 Mar 27 2:00s
-			 3:00	-	EET
+			 3:00	-	FET # Further-eastern European Time
 #
 # From Oscar van Vlijmen (2001-08-25): [This region consists of]
 # Respublika Adygeya, Arkhangel'skaya oblast',
@@ -2189,7 +2206,7 @@ Zone Asia/Irkutsk	 6:57:20 -	LMT	1880
 # [parts of] Respublika Sakha (Yakutiya), Chitinskaya oblast'.
 
 # From Oscar van Vlijmen (2009-11-29):
-# ...some regions of RUssia were merged with others since 2005...
+# ...some regions of [Russia] were merged with others since 2005...
 # Some names were changed, no big deal, except for one instance: a new name.
 # YAK/YAKST: UTC+9 Zabajkal'skij kraj.
 
@@ -2613,6 +2630,28 @@ Link	Europe/Istanbul	Asia/Istanbul	# Ist
 # of March at 3am the time is changing to 4am and each last Sunday of
 # October the time at 4am is changing to 3am"
 
+# From Alexander Krivenyshev (2011-09-20):
+# On September 20, 2011 the deputies of the Verkhovna Rada agreed to
+# abolish the transfer clock to winter time.
+#
+# Bill number 8330 of MP from the Party of Regions Oleg Nadoshi got
+# approval from 266 deputies.
+#
+# Ukraine abolishes transter back to the winter time (in Russian)
+# 
+# http://news.mail.ru/politics/6861560/
+# 
+#
+# The Ukrainians will no longer change the clock (in Russian)
+# 
+# http://www.segodnya.ua/news/14290482.html
+# 
+#
+# Deputies cancelled the winter time (in Russian)
+# 
+# http://www.pravda.com.ua/rus/news/2011/09/20/6600616/
+# 
+
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 # Most of Ukraine since 1970 has been like Kiev.
 # "Kyiv" is the transliteration of the Ukrainian name, but
@@ -2626,7 +2665,8 @@ Zone Europe/Kiev	2:02:04 -	LMT	1880
 			3:00	-	MSK	1990 Jul  1 2:00
 			2:00	-	EET	1992
 			2:00	E-Eur	EE%sT	1995
-			2:00	EU	EE%sT
+			2:00	EU	EE%sT	2011 Mar lastSun 1:00u
+			3:00	-	FET # Further-eastern European Time
 # Ruthenia used CET 1990/1991.
 # "Uzhhorod" is the transliteration of the Ukrainian name, but
 # "Uzhgorod" is more common in English.
@@ -2640,7 +2680,8 @@ Zone Europe/Uzhgorod	1:29:12 -	LMT	1890 
 			1:00	-	CET	1991 Mar 31 3:00
 			2:00	-	EET	1992
 			2:00	E-Eur	EE%sT	1995
-			2:00	EU	EE%sT
+			2:00	EU	EE%sT	2011 Mar lastSun 1:00u
+			3:00	-	FET # Further-eastern European Time
 # Zaporozh'ye and eastern Lugansk oblasts observed DST 1990/1991.
 # "Zaporizhia" is the transliteration of the Ukrainian name, but
 # "Zaporozh'ye" is more common in English.  Use the common English
@@ -2653,7 +2694,8 @@ Zone Europe/Zaporozhye	2:20:40 -	LMT	188
 			1:00	C-Eur	CE%sT	1943 Oct 25
 			3:00	Russia	MSK/MSD	1991 Mar 31 2:00
 			2:00	E-Eur	EE%sT	1995
-			2:00	EU	EE%sT
+			2:00	EU	EE%sT	2011 Mar lastSun 1:00u
+			3:00	-	FET # Further-eastern European Time
 # Central Crimea used Moscow time 1994/1997.
 Zone Europe/Simferopol	2:16:24 -	LMT	1880
 			2:16	-	SMT	1924 May  2 # Simferopol Mean T
@@ -2678,7 +2720,8 @@ Zone Europe/Simferopol	2:16:24 -	LMT	188
 # Assume it happened in March by not changing the clocks.
 			3:00	Russia	MSK/MSD	1997
 			3:00	-	MSK	1997 Mar lastSun 1:00u
-			2:00	EU	EE%sT
+			2:00	EU	EE%sT	2011 Mar lastSun 1:00u
+			3:00	-	FET # Further-eastern European Time
 
 ###############################################################################
 

Modified: vendor/tzdata/dist/iso3166.tab
==============================================================================
--- vendor/tzdata/dist/iso3166.tab	Wed Oct 12 05:18:15 2011	(r226278)
+++ vendor/tzdata/dist/iso3166.tab	Wed Oct 12 06:36:17 2011	(r226279)
@@ -1,5 +1,5 @@
 # 
-# @(#)iso3166.tab	8.9
+# @(#)iso3166.tab	8.11
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 # ISO 3166 alpha-2 country codes
@@ -21,9 +21,8 @@
 #
 # Lines beginning with `#' are comments.
 #
-# From Arthur David Olson (2011-06-15):
-# Resynchronized today with the ISO3116 site
-# (deleting AN and adding BQ, CW, and SX).
+# From Arthur David Olson (2011-08-17):
+# Resynchronized today with the ISO 3166 site (adding SS for South Sudan).
 #
 #country-
 #code	country name
@@ -234,6 +233,7 @@ SM	San Marino
 SN	Senegal
 SO	Somalia
 SR	Suriname
+SS	South Sudan
 ST	Sao Tome & Principe
 SV	El Salvador
 SX	Sint Maarten

Modified: vendor/tzdata/dist/northamerica
==============================================================================
--- vendor/tzdata/dist/northamerica	Wed Oct 12 05:18:15 2011	(r226278)
+++ vendor/tzdata/dist/northamerica	Wed Oct 12 06:36:17 2011	(r226279)
@@ -1,5 +1,5 @@
 # 
-# @(#)northamerica	8.42
+# @(#)northamerica	8.49
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -468,6 +468,10 @@ Zone America/Los_Angeles -7:52:58 -	LMT	
 # own time. I asked about daylight saving; they said it wasn't used. I
 # did not inquire about practices in the past.
 
+# From Arthur David Olson (2011-08-17):
+# For lack of better information, assume that Metlakatla's
+# abandonment of use of daylight saving resulted from the 1983 vote.
+
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone America/Juneau	 15:02:19 -	LMT	1867 Oct 18
 			 -8:57:41 -	LMT	1900 Aug 20 12:00
@@ -479,7 +483,7 @@ Zone America/Juneau	 15:02:19 -	LMT	1867
 			 -8:00	US	P%sT	1983 Oct 30 2:00
 			 -9:00	US	Y%sT	1983 Nov 30
 			 -9:00	US	AK%sT
-Zone America/Sitka	 -14:58:47 -	LMT	1867 Oct 18
+Zone America/Sitka	 14:58:47 -	LMT	1867 Oct 18
 			 -9:01:13 -	LMT	1900 Aug 20 12:00
 			 -8:00	-	PST	1942
 			 -8:00	US	P%sT	1946
@@ -493,7 +497,7 @@ Zone America/Metlakatla	 15:13:42 -	LMT	
 			 -8:00	US	P%sT	1946
 			 -8:00	-	PST	1969
 			 -8:00	US	P%sT	1983 Oct 30 2:00
-			 -8:00	US	MeST
+			 -8:00	-	MeST
 Zone America/Yakutat	 14:41:05 -	LMT	1867 Oct 18
 			 -9:18:55 -	LMT	1900 Aug 20 12:00
 			 -9:00	-	YST	1942
@@ -593,8 +597,8 @@ Zone Pacific/Honolulu	-10:31:26 -	LMT	18
 			-10:30	-	HST	1933 Apr 30 2:00 #Laws 1933
 			-10:30	1:00	HDT	1933 May 21 12:00 #Laws 1933+12
 			-10:30	-	HST	1942 Feb 09 2:00 #Schmitt&Cox+2
-			-10:30	1:00	HDT	1945 Sep 30 2:00 #Schmitt&Fox+2
-			-10:30	US	H%sT	1947 Jun  8 2:00 #Schmitt&Fox+2
+			-10:30	1:00	HDT	1945 Sep 30 2:00 #Schmitt&Cox+2
+			-10:30	-	HST	1947 Jun  8 2:00 #Schmitt&Cox+2
 			-10:00	-	HST
 
 # Now we turn to US areas that have diverged from the consensus since 1970.
@@ -1163,12 +1167,29 @@ Rule	StJohns	1960	1986	-	Oct	lastSun	2:0
 # From Paul Eggert (2000-10-02):
 # INMS (2000-09-12) says that, since 1988 at least, Newfoundland switches
 # at 00:01 local time.  For now, assume it started in 1987.
+
+# From Michael Pelley (2011-09-12):
+# We received today, Monday, September 12, 2011, notification that the
+# changes to the Newfoundland Standard Time Act have been proclaimed.
+# The change in the Act stipulates that the change from Daylight Savings
+# Time to Standard Time and from Standard Time to Daylight Savings Time
+# now occurs at 2:00AM.
+# ...
+# 
+# http://www.assembly.nl.ca/legislation/sr/annualstatutes/2011/1106.chp.htm
+# 
+# ...
+# MICHAEL PELLEY  |  Manager of Enterprise Architecture - Solution Delivery
+# Office of the Chief Information Officer
+# Executive Council
+# Government of Newfoundland & Labrador
+
 Rule	StJohns	1987	only	-	Apr	Sun>=1	0:01	1:00	D
 Rule	StJohns	1987	2006	-	Oct	lastSun	0:01	0	S
 Rule	StJohns	1988	only	-	Apr	Sun>=1	0:01	2:00	DD
 Rule	StJohns	1989	2006	-	Apr	Sun>=1	0:01	1:00	D
-Rule	StJohns	2007	max	-	Mar	Sun>=8	0:01	1:00	D
-Rule	StJohns	2007	max	-	Nov	Sun>=1	0:01	0	S
+Rule	StJohns	2007	2011	-	Mar	Sun>=8	0:01	1:00	D
+Rule	StJohns	2007	2010	-	Nov	Sun>=1	0:01	0	S
 #
 # St John's has an apostrophe, but Posix file names can't have apostrophes.
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
@@ -1178,7 +1199,8 @@ Zone America/St_Johns	-3:30:52 -	LMT	188
 			-3:30:52 StJohns N%sT	1935 Mar 30
 			-3:30	StJohns	N%sT	1942 May 11
 			-3:30	Canada	N%sT	1946
-			-3:30	StJohns	N%sT
+			-3:30	StJohns	N%sT	2011 Nov
+			-3:30	Canada	N%sT
 
 # most of east Labrador
 
@@ -1192,7 +1214,8 @@ Zone America/Goose_Bay	-4:01:40 -	LMT	18
 			-3:30	StJohns	N%sT	1942 May 11
 			-3:30	Canada	N%sT	1946
 			-3:30	StJohns	N%sT	1966 Mar 15 2:00
-			-4:00	StJohns	A%sT
+			-4:00	StJohns	A%sT	2011 Nov
+			-4:00	Canada	A%sT
 
 
 # west Labrador, Nova Scotia, Prince Edward I
@@ -1924,20 +1947,69 @@ Zone America/Dawson_Creek -8:00:56 -	LMT
 # daylight saving....
 # http://www.nnsl.com/frames/newspapers/2006-11/nov13_06none.html
 
-# From Chris Walton (2007-03-14):
-# Today I phoned the "hamlet office" to find out what Resolute was doing with
-# its clocks.
-#
-# The individual that answered the phone confirmed that the clocks did not
-# move at the end of daylight saving on October 29/2006.  He also told me that
-# the clocks did not move this past weekend (March 11/2007)....
-
-# From Chris Walton (2008-11-13):
-# ...the residents of Resolute believe that they are changing "time zones"
-# twice a year.  In winter months, local time is qualified with "Eastern
-# Time" which is really "Eastern Standard Time (UTC-5)".  In summer
-# months, local time is qualified with "Central Time" which is really
-# "Central Daylight Time (UTC-5)"...
+# From Chris Walton (2011-03-21):
+# Back in 2007 I initiated the creation of a new "zone file" for Resolute
+# Bay. Resolute Bay is a small community located about 900km north of
+# the Arctic Circle. The zone file was required because Resolute Bay had
+# decided to use UTC-5 instead of UTC-6 for the winter of 2006-2007.
+#
+# According to new information which I received last week, Resolute Bay
+# went back to using UTC-6 in the winter of 2007-2008...
+#
+# On March 11/2007 most of Canada went onto daylight saving. On March
+# 14/2007 I phoned the Resolute Bay hamlet office to do a "time check." I
+# talked to somebody that was both knowledgeable and helpful. I was able
+# to confirm that Resolute Bay was still operating on UTC-5. It was
+# explained to me that Resolute Bay had been on the Eastern Time zone
+# (EST) in the winter, and was now back on the Central Time zone (CDT).
+# i.e. the time zone had changed twice in the last year but the clocks
+# had not moved. The residents had to know which time zone they were in
+# so they could follow the correct TV schedule...
+#
+# On Nov 02/2008 most of Canada went onto standard time. On Nov 03/2008 I
+# phoned the Resolute Bay hamlet office...[D]ue to the challenging nature
+# of the phone call, I decided to seek out an alternate source of
+# information. I found an e-mail address for somebody by the name of
+# Stephanie Adams whose job was listed as "Inns North Support Officer for
+# Arctic Co-operatives." I was under the impression that Stephanie lived
+# and worked in Resolute Bay...
+#
+# On March 14/2011 I phoned the hamlet office again. I was told that
+# Resolute Bay had been using Central Standard Time over the winter of
+# 2010-2011 and that the clocks had therefore been moved one hour ahead
+# on March 13/2011. The person I talked to was aware that Resolute Bay
+# had previously experimented with Eastern Standard Time but he could not
+# tell me when the practice had stopped.
+#
+# On March 17/2011 I searched the Web to find an e-mail address of
+# somebody that might be able to tell me exactly when Resolute Bay went
+# off Eastern Standard Time. I stumbled on the name "Aziz Kheraj." Aziz
+# used to be the mayor of Resolute Bay and he apparently owns half the
+# businesses including "South Camp Inn." This website has some info on
+# Aziz:
+# 
+# http://www.uphere.ca/node/493
+# 
+#
+# I sent Aziz an e-mail asking when Resolute Bay had stopped using
+# Eastern Standard Time.
+#
+# Aziz responded quickly with this: "hi, The time was not changed for the
+# 1 year only, the following year, the community went back to the old way
+# of "spring ahead-fall behind" currently we are zulu plus 5 hrs and in
+# the winter Zulu plus 6 hrs"
+#
+# This of course conflicted with everything I had ascertained in November 2008.
+#
+# I sent Aziz a copy of my 2008 e-mail exchange with Stephanie. Aziz
+# responded with this: "Hi, Stephanie lives in Winnipeg. I live here, You
+# may want to check with the weather office in Resolute Bay or do a
+# search on the weather through Env. Canada. web site"
+#
+# If I had realized the Stephanie did not live in Resolute Bay I would
+# never have contacted her.  I now believe that all the information I
+# obtained in November 2008 should be ignored...
+# I apologize for reporting incorrect information in 2008.
 
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	NT_YK	1918	only	-	Apr	14	2:00	1:00	D
@@ -1965,14 +2037,12 @@ Zone America/Iqaluit	0	-	zzz	1942 Aug # 
 			-6:00	Canada	C%sT	2000 Oct 29 2:00
 			-5:00	Canada	E%sT
 # aka Qausuittuq
-# Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
-Rule	Resolute 2006	max	-	Nov	Sun>=1	2:00	0	ES
-Rule	Resolute 2007	max	-	Mar	Sun>=8	2:00	0	CD
 Zone America/Resolute	0	-	zzz	1947 Aug 31 # Resolute founded
 			-6:00	NT_YK	C%sT	2000 Oct 29 2:00
 			-5:00	-	EST	2001 Apr  1 3:00
 			-6:00	Canada	C%sT	2006 Oct 29 2:00
-			-5:00	Resolute	%sT
+			-5:00	-	EST	2007 Mar 11 3:00
+			-6:00	Canada	C%sT
 # aka Kangiqiniq
 Zone America/Rankin_Inlet 0	-	zzz	1957 # Rankin Inlet founded
 			-6:00	NT_YK	C%sT	2000 Oct 29 2:00

Modified: vendor/tzdata/dist/southamerica
==============================================================================
--- vendor/tzdata/dist/southamerica	Wed Oct 12 05:18:15 2011	(r226278)
+++ vendor/tzdata/dist/southamerica	Wed Oct 12 06:36:17 2011	(r226279)
@@ -797,6 +797,26 @@ Zone	America/La_Paz	-4:32:36 -	LMT	1890
 # 
 # http://www.timeanddate.com/news/time/brazil-dst-2008-2009.html
 # 
+#
+# From Alexander Krivenyshev (2011-10-04):
+# State Bahia will return to Daylight savings time this year after 8 years off.
+# The announcement was made by Governor Jaques Wagner in an interview to a 
+# television station in Salvador. 
+
+# In Portuguese:
+# 
+# http://g1.globo.com/bahia/noticia/2011/10/governador-jaques-wagner-confirma-horario-de-verao-na-bahia.html
+#  and
+# 
+# http://noticias.terra.com.br/brasil/noticias/0,,OI5390887-EI8139,00-Bahia+volta+a+ter+horario+de+verao+apos+oito+anos.html
+# 
+
+# From Guilherme Bernardes Rodrigues (2011-10-07):
+# There is news in the media, however there is still no decree about it.
+# I just send a e-mail to Zulmira Brandão at
+# http://pcdsh01.on.br/ the
+# oficial agency about time in Brazil, and she confirmed that the old rule is
+# still in force.
 
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 # Decree 20,466 (1931-10-01)
@@ -1035,6 +1055,9 @@ Zone America/Maceio	-2:22:52 -	LMT	1914
 Zone America/Bahia	-2:34:04 -	LMT	1914
 			-3:00	Brazil	BR%sT	2003 Sep 24
 			-3:00	-	BRT
+# as noted above, not yet in operation.
+#			-3:00	-	BRT	2011 Oct 16
+#			-3:00	Brazil	BR%sT
 #
 # Goias (GO), Distrito Federal (DF), Minas Gerais (MG),
 # Espirito Santo (ES), Rio de Janeiro (RJ), Sao Paulo (SP), Parana (PR),

Modified: vendor/tzdata/dist/zone.tab
==============================================================================
--- vendor/tzdata/dist/zone.tab	Wed Oct 12 05:18:15 2011	(r226278)
+++ vendor/tzdata/dist/zone.tab	Wed Oct 12 06:36:17 2011	(r226279)
@@ -1,5 +1,5 @@
 # 
-# @(#)zone.tab	8.45
+# @(#)zone.tab	8.49
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 #
@@ -120,7 +120,7 @@ CA	+4901-08816	America/Nipigon	Eastern T
 CA	+4823-08915	America/Thunder_Bay	Eastern Time - Thunder Bay, Ontario
 CA	+6344-06828	America/Iqaluit	Eastern Time - east Nunavut - most locations
 CA	+6608-06544	America/Pangnirtung	Eastern Time - Pangnirtung, Nunavut
-CA	+744144-0944945	America/Resolute	Eastern Standard Time - Resolute, Nunavut
+CA	+744144-0944945	America/Resolute	Central Standard Time - Resolute, Nunavut
 CA	+484531-0913718	America/Atikokan	Eastern Standard Time - Atikokan, Ontario and Southampton I, Nunavut
 CA	+624900-0920459	America/Rankin_Inlet	Central Time - central Nunavut
 CA	+4953-09709	America/Winnipeg	Central Time - Manitoba & west Ontario
@@ -319,7 +319,8 @@ PL	+5215+02100	Europe/Warsaw
 PM	+4703-05620	America/Miquelon
 PN	-2504-13005	Pacific/Pitcairn
 PR	+182806-0660622	America/Puerto_Rico
-PS	+3130+03428	Asia/Gaza
+PS	+3130+03428	Asia/Gaza	Gaza Strip
+PS	+313200+0350542	Asia/Hebron	West Bank
 PT	+3843-00908	Europe/Lisbon	mainland
 PT	+3238-01654	Atlantic/Madeira	Madeira Islands
 PT	+3744-02540	Atlantic/Azores	Azores
@@ -361,6 +362,7 @@ SM	+4355+01228	Europe/San_Marino
 SN	+1440-01726	Africa/Dakar
 SO	+0204+04522	Africa/Mogadishu
 SR	+0550-05510	America/Paramaribo
+SS	+0451+03136	Africa/Juba
 ST	+0020+00644	Africa/Sao_Tome
 SV	+1342-08912	America/El_Salvador
 SX	+180305-0630250	America/Lower_Princes

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 12 06:37:41 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id CC8B4106564A;
	Wed, 12 Oct 2011 06:37:41 +0000 (UTC)
	(envelope-from edwin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id A324F8FC13;
	Wed, 12 Oct 2011 06:37:41 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9C6bfmb050790;
	Wed, 12 Oct 2011 06:37:41 GMT (envelope-from edwin@svn.freebsd.org)
Received: (from edwin@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9C6bfBH050788;
	Wed, 12 Oct 2011 06:37:41 GMT (envelope-from edwin@svn.freebsd.org)
Message-Id: <201110120637.p9C6bfBH050788@svn.freebsd.org>
From: Edwin Groothuis 
Date: Wed, 12 Oct 2011 06:37:41 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-vendor@freebsd.org
X-SVN-Group: vendor
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226280 - vendor/tzdata/tzdata2011l
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 12 Oct 2011 06:37:41 -0000

Author: edwin
Date: Wed Oct 12 06:37:41 2011
New Revision: 226280
URL: http://svn.freebsd.org/changeset/base/226280

Log:
  Tag of tzdata2011l

Added:
  vendor/tzdata/tzdata2011l/
     - copied from r226279, vendor/tzdata/dist/

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 12 06:40:21 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 701B0106564A;
	Wed, 12 Oct 2011 06:40:21 +0000 (UTC)
	(envelope-from hselasky@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 5EE578FC14;
	Wed, 12 Oct 2011 06:40:21 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9C6eLu1050914;
	Wed, 12 Oct 2011 06:40:21 GMT
	(envelope-from hselasky@svn.freebsd.org)
Received: (from hselasky@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9C6eLrp050912;
	Wed, 12 Oct 2011 06:40:21 GMT
	(envelope-from hselasky@svn.freebsd.org)
Message-Id: <201110120640.p9C6eLrp050912@svn.freebsd.org>
From: Hans Petter Selasky 
Date: Wed, 12 Oct 2011 06:40:21 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226281 - stable/8/sys/dev/usb/serial
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 12 Oct 2011 06:40:21 -0000

Author: hselasky
Date: Wed Oct 12 06:40:21 2011
New Revision: 226281
URL: http://svn.freebsd.org/changeset/base/226281

Log:
  MFC r226219
  Fix panic due to re-using in-use modem unit number.

Modified:
  stable/8/sys/dev/usb/serial/usb_serial.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/dev/usb/serial/usb_serial.c
==============================================================================
--- stable/8/sys/dev/usb/serial/usb_serial.c	Wed Oct 12 06:37:41 2011	(r226280)
+++ stable/8/sys/dev/usb/serial/usb_serial.c	Wed Oct 12 06:40:21 2011	(r226281)
@@ -289,6 +289,9 @@ ucom_detach(struct ucom_super_softc *ssc
 {
 	uint32_t subunit;
 
+	if (ssc->sc_subunits == 0)
+		return;		/* not initialized */
+
 	usb_proc_drain(&ssc->sc_tq);
 
 	for (subunit = 0; subunit < ssc->sc_subunits; subunit++) {

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 12 06:40:49 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A0B71106566C;
	Wed, 12 Oct 2011 06:40:49 +0000 (UTC)
	(envelope-from hselasky@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 75FCC8FC16;
	Wed, 12 Oct 2011 06:40:49 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9C6enwN050970;
	Wed, 12 Oct 2011 06:40:49 GMT
	(envelope-from hselasky@svn.freebsd.org)
Received: (from hselasky@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9C6enCw050966;
	Wed, 12 Oct 2011 06:40:49 GMT
	(envelope-from hselasky@svn.freebsd.org)
Message-Id: <201110120640.p9C6enCw050966@svn.freebsd.org>
From: Hans Petter Selasky 
Date: Wed, 12 Oct 2011 06:40:49 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226282 - stable/8/lib/libusb
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 12 Oct 2011 06:40:49 -0000

Author: hselasky
Date: Wed Oct 12 06:40:49 2011
New Revision: 226282
URL: http://svn.freebsd.org/changeset/base/226282

Log:
  MFC r226220
  Fix libusb compliance.

Modified:
  stable/8/lib/libusb/libusb.3
  stable/8/lib/libusb/libusb10.c
  stable/8/lib/libusb/libusb20.3
Directory Properties:
  stable/8/lib/libusb/   (props changed)
  stable/8/lib/libusb/usb.h   (props changed)

Modified: stable/8/lib/libusb/libusb.3
==============================================================================
--- stable/8/lib/libusb/libusb.3	Wed Oct 12 06:40:21 2011	(r226281)
+++ stable/8/lib/libusb/libusb.3	Wed Oct 12 06:40:49 2011	(r226282)
@@ -223,8 +223,8 @@ code on failure.
 .Ft int
 .Fn libusb_kernel_driver_active "libusb_device_handle *devh" "int interface"
 Determine if a driver is active on a interface.
-Returns 0 if no kernel driver
-is active, 1 if a kernel driver is active, LIBUSB_ERROR_NO_DEVICE
+Returns 0 if no kernel driver is active
+and 1 if a kernel driver is active, LIBUSB_ERROR_NO_DEVICE
 if the device has been disconnected and a LIBUSB_ERROR code on failure.
 .Pp
 .Ft int

Modified: stable/8/lib/libusb/libusb10.c
==============================================================================
--- stable/8/lib/libusb/libusb10.c	Wed Oct 12 06:40:21 2011	(r226281)
+++ stable/8/lib/libusb/libusb10.c	Wed Oct 12 06:40:49 2011	(r226282)
@@ -216,7 +216,6 @@ libusb_get_device_list(libusb_context *c
 			libusb20_be_free(usb_backend);
 			return (LIBUSB_ERROR_NO_MEM);
 		}
-
 		/* get device into libUSB v1.0 list */
 		libusb20_be_dequeue_device(usb_backend, pdev);
 
@@ -718,8 +717,10 @@ libusb_kernel_driver_active(struct libus
 	if (pdev == NULL)
 		return (LIBUSB_ERROR_INVALID_PARAM);
 
-	return (libusb20_dev_kernel_driver_active(
-	    pdev, interface));
+	if (libusb20_dev_kernel_driver_active(pdev, interface))
+		return (0);		/* no kernel driver is active */
+	else
+		return (1);		/* kernel driver is active */
 }
 
 int

Modified: stable/8/lib/libusb/libusb20.3
==============================================================================
--- stable/8/lib/libusb/libusb20.3	Wed Oct 12 06:40:21 2011	(r226281)
+++ stable/8/lib/libusb/libusb20.3	Wed Oct 12 06:40:49 2011	(r226282)
@@ -614,10 +614,9 @@ The file descriptor can be used for poll
 .Pp
 .
 .Fn libusb20_dev_kernel_driver_active
-returns a non-zero value if a kernel driver is active on
-the given USB interface.
+returns zero if a kernel driver is active on the given USB interface.
 .
-Else zero is returned.
+Else a LIBUSB20_ERROR value is returned.
 .
 .Pp
 .

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 12 07:00:51 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 01C7C1065673;
	Wed, 12 Oct 2011 07:00:51 +0000 (UTC)
	(envelope-from edwin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id E5C948FC1D;
	Wed, 12 Oct 2011 07:00:50 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9C70oMu051613;
	Wed, 12 Oct 2011 07:00:50 GMT (envelope-from edwin@svn.freebsd.org)
Received: (from edwin@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9C70oiE051611;
	Wed, 12 Oct 2011 07:00:50 GMT (envelope-from edwin@svn.freebsd.org)
Message-Id: <201110120700.p9C70oiE051611@svn.freebsd.org>
From: Edwin Groothuis 
Date: Wed, 12 Oct 2011 07:00:50 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226283 - head/share/misc
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 12 Oct 2011 07:00:51 -0000

Author: edwin
Date: Wed Oct 12 07:00:50 2011
New Revision: 226283
URL: http://svn.freebsd.org/changeset/base/226283

Log:
  Updates from Newsletter VI-9 and VI-10:
  
      Newsletter VI-9 2011-06-12
      Name changes for Fiji and Myanmar as well as other minor corrections
  
      Newsletter VI-10 2011-08-09
      Code elements for South Sudan.
  
  Reviewed by:	http://www.iso.org/iso/country_codes.html

Modified:
  head/share/misc/iso3166

Modified: head/share/misc/iso3166
==============================================================================
--- head/share/misc/iso3166	Wed Oct 12 06:40:49 2011	(r226282)
+++ head/share/misc/iso3166	Wed Oct 12 07:00:50 2011	(r226283)
@@ -46,7 +46,7 @@ BJ	BEN	204	Benin
 BM	BMU	060	Bermuda
 BT	BTN	064	Bhutan
 BO	BOL	068	Bolivia, Plurinational State of
-BQ	BES	535	Bonaire, Saint Eustatius and Saba
+BQ	BES	535	Bonaire, Sint Eustatius and Saba
 BA	BIH	070	Bosnia and Herzegovina
 BW	BWA	072	Botswana
 BV	BVT	074	Bouvet Island
@@ -224,11 +224,12 @@ SB	SLB	090	Solomon Islands
 SO	SOM	706	Somalia
 ZA	ZAF	710	South Africa
 GS	SGS	239	South Georgia and the South Sandwich Islands
+SS	SSD	728	South Sudan
 ES	ESP	724	Spain
 LK	LKA	144	Sri Lanka
 SH	SHN	654	Saint Helena, Ascension and Tristan da Cunha
 PM	SPM	666	Saint Pierre and Miquelon
-SD	SDN	736	Sudan
+SD	SDN	729	Sudan
 SR	SUR	740	Suriname
 SJ	SJM	744	Svalbard and Jan Mayen
 SZ	SWZ	748	Swaziland
@@ -547,3 +548,10 @@ ZW	ZWE	716	Zimbabwe
 #  BONAIRE, SAINT EUSTATIUS AND SABA (BQ), CURACAO (CW) and
 #  SINT MAARTEN (DUTCH PART) (SX) added as new entries.
 #  NETHERLANDS ANTILLES (AN) removed.
+#
+# Newsletter VI-9 2011-06-12
+#  Name changes for Fiji and Myanmar as well as other minor corrections
+#
+# Newsletter VI-10 2011-08-09
+#  Code elements for South Sudan.
+#

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 12 07:12:42 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 6EEE3106564A;
	Wed, 12 Oct 2011 07:12:42 +0000 (UTC)
	(envelope-from edwin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 5E19D8FC1D;
	Wed, 12 Oct 2011 07:12:42 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9C7CgY5052074;
	Wed, 12 Oct 2011 07:12:42 GMT (envelope-from edwin@svn.freebsd.org)
Received: (from edwin@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9C7CglG052072;
	Wed, 12 Oct 2011 07:12:42 GMT (envelope-from edwin@svn.freebsd.org)
Message-Id: <201110120712.p9C7CglG052072@svn.freebsd.org>
From: Edwin Groothuis 
Date: Wed, 12 Oct 2011 07:12:42 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226284 - stable/8/share/misc
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 12 Oct 2011 07:12:42 -0000

Author: edwin
Date: Wed Oct 12 07:12:42 2011
New Revision: 226284
URL: http://svn.freebsd.org/changeset/base/226284

Log:
  Updates from Newsletter VI-9 and VI-10:
  
      Newsletter VI-9 2011-06-12
      Name changes for Fiji and Myanmar as well as other minor corrections
  
      Newsletter VI-10 2011-08-09
      Code elements for South Sudan.
  
  Obtained from:	http://www.iso.org/iso/country_codes.html

Modified:
  stable/8/share/misc/iso3166
Directory Properties:
  stable/8/share/misc/   (props changed)
  stable/8/share/misc/bsd-family-tree   (props changed)

Modified: stable/8/share/misc/iso3166
==============================================================================
--- stable/8/share/misc/iso3166	Wed Oct 12 07:00:50 2011	(r226283)
+++ stable/8/share/misc/iso3166	Wed Oct 12 07:12:42 2011	(r226284)
@@ -46,7 +46,7 @@ BJ	BEN	204	Benin
 BM	BMU	060	Bermuda
 BT	BTN	064	Bhutan
 BO	BOL	068	Bolivia, Plurinational State of
-BQ	BES	535	Bonaire, Saint Eustatius and Saba
+BQ	BES	535	Bonaire, Sint Eustatius and Saba
 BA	BIH	070	Bosnia and Herzegovina
 BW	BWA	072	Botswana
 BV	BVT	074	Bouvet Island
@@ -224,11 +224,12 @@ SB	SLB	090	Solomon Islands
 SO	SOM	706	Somalia
 ZA	ZAF	710	South Africa
 GS	SGS	239	South Georgia and the South Sandwich Islands
+SS	SSD	728	South Sudan
 ES	ESP	724	Spain
 LK	LKA	144	Sri Lanka
 SH	SHN	654	Saint Helena, Ascension and Tristan da Cunha
 PM	SPM	666	Saint Pierre and Miquelon
-SD	SDN	736	Sudan
+SD	SDN	729	Sudan
 SR	SUR	740	Suriname
 SJ	SJM	744	Svalbard and Jan Mayen
 SZ	SWZ	748	Swaziland
@@ -547,3 +548,10 @@ ZW	ZWE	716	Zimbabwe
 #  BONAIRE, SAINT EUSTATIUS AND SABA (BQ), CURACAO (CW) and
 #  SINT MAARTEN (DUTCH PART) (SX) added as new entries.
 #  NETHERLANDS ANTILLES (AN) removed.
+#
+# Newsletter VI-9 2011-06-12
+#  Name changes for Fiji and Myanmar as well as other minor corrections
+#
+# Newsletter VI-10 2011-08-09
+#  Code elements for South Sudan.
+#

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 12 07:14:52 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D006B106566C;
	Wed, 12 Oct 2011 07:14:52 +0000 (UTC)
	(envelope-from edwin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id BF2888FC0C;
	Wed, 12 Oct 2011 07:14:52 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9C7EqOd052188;
	Wed, 12 Oct 2011 07:14:52 GMT (envelope-from edwin@svn.freebsd.org)
Received: (from edwin@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9C7EqGM052186;
	Wed, 12 Oct 2011 07:14:52 GMT (envelope-from edwin@svn.freebsd.org)
Message-Id: <201110120714.p9C7EqGM052186@svn.freebsd.org>
From: Edwin Groothuis 
Date: Wed, 12 Oct 2011 07:14:52 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226285 - stable/7/share/misc
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 12 Oct 2011 07:14:52 -0000

Author: edwin
Date: Wed Oct 12 07:14:52 2011
New Revision: 226285
URL: http://svn.freebsd.org/changeset/base/226285

Log:
  MFC of r226283
  
  Updates from Newsletter VI-9 and VI-10:
  
      Newsletter VI-9 2011-06-12
      Name changes for Fiji and Myanmar as well as other minor corrections
  
      Newsletter VI-10 2011-08-09
      Code elements for South Sudan.
  
  Obtained from:	http://www.iso.org/iso/country_codes.html

Modified:
  stable/7/share/misc/iso3166
Directory Properties:
  stable/7/share/misc/   (props changed)
  stable/7/share/misc/iso639   (props changed)
  stable/7/share/misc/pci_vendors   (props changed)

Modified: stable/7/share/misc/iso3166
==============================================================================
--- stable/7/share/misc/iso3166	Wed Oct 12 07:12:42 2011	(r226284)
+++ stable/7/share/misc/iso3166	Wed Oct 12 07:14:52 2011	(r226285)
@@ -46,7 +46,7 @@ BJ	BEN	204	Benin
 BM	BMU	060	Bermuda
 BT	BTN	064	Bhutan
 BO	BOL	068	Bolivia, Plurinational State of
-BQ	BES	535	Bonaire, Saint Eustatius and Saba
+BQ	BES	535	Bonaire, Sint Eustatius and Saba
 BA	BIH	070	Bosnia and Herzegovina
 BW	BWA	072	Botswana
 BV	BVT	074	Bouvet Island
@@ -224,11 +224,12 @@ SB	SLB	090	Solomon Islands
 SO	SOM	706	Somalia
 ZA	ZAF	710	South Africa
 GS	SGS	239	South Georgia and the South Sandwich Islands
+SS	SSD	728	South Sudan
 ES	ESP	724	Spain
 LK	LKA	144	Sri Lanka
 SH	SHN	654	Saint Helena, Ascension and Tristan da Cunha
 PM	SPM	666	Saint Pierre and Miquelon
-SD	SDN	736	Sudan
+SD	SDN	729	Sudan
 SR	SUR	740	Suriname
 SJ	SJM	744	Svalbard and Jan Mayen
 SZ	SWZ	748	Swaziland
@@ -547,3 +548,10 @@ ZW	ZWE	716	Zimbabwe
 #  BONAIRE, SAINT EUSTATIUS AND SABA (BQ), CURACAO (CW) and
 #  SINT MAARTEN (DUTCH PART) (SX) added as new entries.
 #  NETHERLANDS ANTILLES (AN) removed.
+#
+# Newsletter VI-9 2011-06-12
+#  Name changes for Fiji and Myanmar as well as other minor corrections
+#
+# Newsletter VI-10 2011-08-09
+#  Code elements for South Sudan.
+#

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 12 07:16:39 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 2DFFB106566C;
	Wed, 12 Oct 2011 07:16:39 +0000 (UTC)
	(envelope-from edwin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 1D2CC8FC14;
	Wed, 12 Oct 2011 07:16:39 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9C7GdCs052308;
	Wed, 12 Oct 2011 07:16:39 GMT (envelope-from edwin@svn.freebsd.org)
Received: (from edwin@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9C7Gcm4052306;
	Wed, 12 Oct 2011 07:16:38 GMT (envelope-from edwin@svn.freebsd.org)
Message-Id: <201110120716.p9C7Gcm4052306@svn.freebsd.org>
From: Edwin Groothuis 
Date: Wed, 12 Oct 2011 07:16:38 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org
X-SVN-Group: stable-6
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226286 - stable/6/share/misc
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 12 Oct 2011 07:16:39 -0000

Author: edwin
Date: Wed Oct 12 07:16:38 2011
New Revision: 226286
URL: http://svn.freebsd.org/changeset/base/226286

Log:
  MFC of r226283
  
  Updates from Newsletter VI-9 and VI-10:
  
      Newsletter VI-9 2011-06-12
      Name changes for Fiji and Myanmar as well as other minor corrections
  
      Newsletter VI-10 2011-08-09
      Code elements for South Sudan.
  
  Obtained from:	http://www.iso.org/iso/country_codes.html

Modified:
  stable/6/share/misc/iso3166
Directory Properties:
  stable/6/share/misc/   (props changed)

Modified: stable/6/share/misc/iso3166
==============================================================================
--- stable/6/share/misc/iso3166	Wed Oct 12 07:14:52 2011	(r226285)
+++ stable/6/share/misc/iso3166	Wed Oct 12 07:16:38 2011	(r226286)
@@ -46,7 +46,7 @@ BJ	BEN	204	Benin
 BM	BMU	060	Bermuda
 BT	BTN	064	Bhutan
 BO	BOL	068	Bolivia, Plurinational State of
-BQ	BES	535	Bonaire, Saint Eustatius and Saba
+BQ	BES	535	Bonaire, Sint Eustatius and Saba
 BA	BIH	070	Bosnia and Herzegovina
 BW	BWA	072	Botswana
 BV	BVT	074	Bouvet Island
@@ -224,11 +224,12 @@ SB	SLB	090	Solomon Islands
 SO	SOM	706	Somalia
 ZA	ZAF	710	South Africa
 GS	SGS	239	South Georgia and the South Sandwich Islands
+SS	SSD	728	South Sudan
 ES	ESP	724	Spain
 LK	LKA	144	Sri Lanka
 SH	SHN	654	Saint Helena, Ascension and Tristan da Cunha
 PM	SPM	666	Saint Pierre and Miquelon
-SD	SDN	736	Sudan
+SD	SDN	729	Sudan
 SR	SUR	740	Suriname
 SJ	SJM	744	Svalbard and Jan Mayen
 SZ	SWZ	748	Swaziland
@@ -547,3 +548,10 @@ ZW	ZWE	716	Zimbabwe
 #  BONAIRE, SAINT EUSTATIUS AND SABA (BQ), CURACAO (CW) and
 #  SINT MAARTEN (DUTCH PART) (SX) added as new entries.
 #  NETHERLANDS ANTILLES (AN) removed.
+#
+# Newsletter VI-9 2011-06-12
+#  Name changes for Fiji and Myanmar as well as other minor corrections
+#
+# Newsletter VI-10 2011-08-09
+#  Code elements for South Sudan.
+#

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 12 08:08:08 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A4BBA106566C;
	Wed, 12 Oct 2011 08:08:08 +0000 (UTC)
	(envelope-from qingli@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 8A1158FC18;
	Wed, 12 Oct 2011 08:08:08 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9C888N2053935;
	Wed, 12 Oct 2011 08:08:08 GMT (envelope-from qingli@svn.freebsd.org)
Received: (from qingli@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9C8882u053933;
	Wed, 12 Oct 2011 08:08:08 GMT (envelope-from qingli@svn.freebsd.org)
Message-Id: <201110120808.p9C8882u053933@svn.freebsd.org>
From: Qing Li 
Date: Wed, 12 Oct 2011 08:08:08 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226287 - stable/9/sys/netinet
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 12 Oct 2011 08:08:08 -0000

Author: qingli
Date: Wed Oct 12 08:08:08 2011
New Revision: 226287
URL: http://svn.freebsd.org/changeset/base/226287

Log:
  MFC 225946
  
  This patch allows ARP to work properly in the presence of
  self-referencing routes. This patch is a rework of r223862.
  
  Reviewed by:	bz, zec
  Approved by:	re (kib)

Modified:
  stable/9/sys/netinet/in.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/amd64/include/xen/   (props changed)
  stable/9/sys/boot/   (props changed)
  stable/9/sys/boot/i386/efi/   (props changed)
  stable/9/sys/boot/ia64/efi/   (props changed)
  stable/9/sys/boot/ia64/ski/   (props changed)
  stable/9/sys/boot/powerpc/boot1.chrp/   (props changed)
  stable/9/sys/boot/powerpc/ofw/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)
  stable/9/sys/conf/   (props changed)
  stable/9/sys/contrib/dev/acpica/   (props changed)
  stable/9/sys/contrib/octeon-sdk/   (props changed)
  stable/9/sys/contrib/pf/   (props changed)
  stable/9/sys/contrib/x86emu/   (props changed)

Modified: stable/9/sys/netinet/in.c
==============================================================================
--- stable/9/sys/netinet/in.c	Wed Oct 12 07:16:38 2011	(r226286)
+++ stable/9/sys/netinet/in.c	Wed Oct 12 08:08:08 2011	(r226287)
@@ -1411,6 +1411,8 @@ static int
 in_lltable_rtcheck(struct ifnet *ifp, u_int flags, const struct sockaddr *l3addr)
 {
 	struct rtentry *rt;
+	struct ifnet *xifp;
+	int error = 0;
 
 	KASSERT(l3addr->sa_family == AF_INET,
 	    ("sin_family %d", l3addr->sa_family));
@@ -1418,30 +1420,35 @@ in_lltable_rtcheck(struct ifnet *ifp, u_
 	/* XXX rtalloc1 should take a const param */
 	rt = rtalloc1(__DECONST(struct sockaddr *, l3addr), 0, 0);
 
+	if (rt == NULL)
+		return (EINVAL);
+
 	/*
 	 * If the gateway for an existing host route matches the target L3
-	 * address, allow for ARP to proceed.
+	 * address, which is a special route inserted by some implementation
+	 * such as MANET, and the interface is of the correct type, then
+	 * allow for ARP to proceed.
 	 */
-	if (rt != NULL && (rt->rt_flags & (RTF_HOST|RTF_GATEWAY)) &&
-	    rt->rt_gateway->sa_family == AF_INET &&
-	    memcmp(rt->rt_gateway->sa_data, l3addr->sa_data, 4) == 0) {
-		RTFREE_LOCKED(rt);
-		return (0);
-	}
-
-	if (rt == NULL || (!(flags & LLE_PUB) &&
-			   ((rt->rt_flags & RTF_GATEWAY) || 
-			    (rt->rt_ifp != ifp)))) {
+	if (rt->rt_flags & (RTF_GATEWAY | RTF_HOST)) {
+		xifp = rt->rt_ifp;
+		
+		if (xifp && (xifp->if_type != IFT_ETHER ||
+		     (xifp->if_flags & (IFF_NOARP | IFF_STATICARP)) != 0))
+			error = EINVAL;
+
+		if (memcmp(rt->rt_gateway->sa_data, l3addr->sa_data,
+		    sizeof(in_addr_t)) != 0)
+			error = EINVAL;
+	} else if (!(flags & LLE_PUB) && ((rt->rt_flags & RTF_GATEWAY) ||
+	    (rt->rt_ifp != ifp))) {
 #ifdef DIAGNOSTIC
 		log(LOG_INFO, "IPv4 address: \"%s\" is not on the network\n",
 		    inet_ntoa(((const struct sockaddr_in *)l3addr)->sin_addr));
 #endif
-		if (rt != NULL)
-			RTFREE_LOCKED(rt);
-		return (EINVAL);
+		error = EINVAL;
 	}
 	RTFREE_LOCKED(rt);
-	return 0;
+	return (error);
 }
 
 /*

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 12 08:39:57 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B99F0106564A;
	Wed, 12 Oct 2011 08:39:57 +0000 (UTC)
	(envelope-from marius@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 9F78D8FC0A;
	Wed, 12 Oct 2011 08:39:57 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9C8dvB2054985;
	Wed, 12 Oct 2011 08:39:57 GMT (envelope-from marius@svn.freebsd.org)
Received: (from marius@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9C8dvP3054982;
	Wed, 12 Oct 2011 08:39:57 GMT (envelope-from marius@svn.freebsd.org)
Message-Id: <201110120839.p9C8dvP3054982@svn.freebsd.org>
From: Marius Strobl 
Date: Wed, 12 Oct 2011 08:39:57 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226288 - in stable/9/sys/dev: esp sym
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 12 Oct 2011 08:39:57 -0000

Author: marius
Date: Wed Oct 12 08:39:57 2011
New Revision: 226288
URL: http://svn.freebsd.org/changeset/base/226288

Log:
  MFC: r226095
  
  Merge from r225950 (merged to stable/9 in r226067):
  
  Set the sense residual properly.
  
  Reviewed by:	ken
  Approved by:	re (kib)

Modified:
  stable/9/sys/dev/esp/ncr53c9x.c
  stable/9/sys/dev/sym/sym_hipd.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/amd64/include/xen/   (props changed)
  stable/9/sys/boot/   (props changed)
  stable/9/sys/boot/i386/efi/   (props changed)
  stable/9/sys/boot/ia64/efi/   (props changed)
  stable/9/sys/boot/ia64/ski/   (props changed)
  stable/9/sys/boot/powerpc/boot1.chrp/   (props changed)
  stable/9/sys/boot/powerpc/ofw/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)
  stable/9/sys/conf/   (props changed)
  stable/9/sys/contrib/dev/acpica/   (props changed)
  stable/9/sys/contrib/octeon-sdk/   (props changed)
  stable/9/sys/contrib/pf/   (props changed)
  stable/9/sys/contrib/x86emu/   (props changed)

Modified: stable/9/sys/dev/esp/ncr53c9x.c
==============================================================================
--- stable/9/sys/dev/esp/ncr53c9x.c	Wed Oct 12 08:08:08 2011	(r226287)
+++ stable/9/sys/dev/esp/ncr53c9x.c	Wed Oct 12 08:39:57 2011	(r226288)
@@ -1367,7 +1367,8 @@ ncr53c9x_sense(struct ncr53c9x_softc *sc
 	ss->byte2 = ccb->ccb_h.target_lun << SCSI_CMD_LUN_SHIFT;
 	ss->length = sizeof(struct scsi_sense_data);
 	ecb->clen = sizeof(*ss);
-	ecb->daddr = (char *)&ecb->ccb->csio.sense_data;
+	memset(&ccb->csio.sense_data, 0, sizeof(ccb->csio.sense_data));
+	ecb->daddr = (char *)&ccb->csio.sense_data;
 	ecb->dleft = sizeof(struct scsi_sense_data);
 	ecb->flags |= ECB_SENSE;
 	ecb->timeout = NCR_SENSE_TIMEOUT;
@@ -1397,7 +1398,7 @@ ncr53c9x_done(struct ncr53c9x_softc *sc,
 	union ccb *ccb = ecb->ccb;
 	struct ncr53c9x_linfo *li;
 	struct ncr53c9x_tinfo *ti;
-	int lun;
+	int lun, sense_returned;
 
 	NCR_LOCK_ASSERT(sc, MA_OWNED);
 
@@ -1426,6 +1427,13 @@ ncr53c9x_done(struct ncr53c9x_softc *sc,
 			ccb->csio.scsi_status = SCSI_STATUS_CHECK_COND;
 			ccb->ccb_h.status = CAM_SCSI_STATUS_ERROR |
 			    CAM_AUTOSNS_VALID;
+			sense_returned = sizeof(ccb->csio.sense_data) -
+			    ecb->dleft;
+			if (sense_returned < ccb->csio.sense_len)
+				ccb->csio.sense_resid = ccb->csio.sense_len -
+				    sense_returned;
+			else
+				ccb->csio.sense_resid = 0;
 		} else if (ecb->stat == SCSI_STATUS_CHECK_COND) {
 			if ((ecb->flags & ECB_SENSE) != 0)
 				ccb->ccb_h.status = CAM_AUTOSENSE_FAIL;

Modified: stable/9/sys/dev/sym/sym_hipd.c
==============================================================================
--- stable/9/sys/dev/sym/sym_hipd.c	Wed Oct 12 08:08:08 2011	(r226287)
+++ stable/9/sys/dev/sym/sym_hipd.c	Wed Oct 12 08:39:57 2011	(r226288)
@@ -7154,7 +7154,7 @@ static void sym_complete_error (hcb_p np
 {
 	struct ccb_scsiio *csio;
 	u_int cam_status;
-	int i;
+	int i, sense_returned;
 
 	SYM_LOCK_ASSERT(MA_OWNED);
 
@@ -7214,11 +7214,15 @@ static void sym_complete_error (hcb_p np
 			 *  Bounce back the sense data to user and
 			 *  fix the residual.
 			 */
-			bzero(&csio->sense_data, csio->sense_len);
+			bzero(&csio->sense_data, sizeof(csio->sense_data));
+			sense_returned = SYM_SNS_BBUF_LEN - csio->sense_resid;
+			if (sense_returned < csio->sense_len)
+				csio->sense_resid = csio->sense_len -
+				    sense_returned;
+			else
+				csio->sense_resid = 0;
 			bcopy(cp->sns_bbuf, &csio->sense_data,
-			      MIN(csio->sense_len, SYM_SNS_BBUF_LEN));
-			csio->sense_resid += csio->sense_len;
-			csio->sense_resid -= SYM_SNS_BBUF_LEN;
+			    MIN(csio->sense_len, sense_returned));
 #if 0
 			/*
 			 *  If the device reports a UNIT ATTENTION condition

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 12 09:09:20 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8269C106566C;
	Wed, 12 Oct 2011 09:09:20 +0000 (UTC)
	(envelope-from bzeeb-lists@lists.zabbadoz.net)
Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25])
	by mx1.freebsd.org (Postfix) with ESMTP id 0DC518FC13;
	Wed, 12 Oct 2011 09:09:19 +0000 (UTC)
Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587])
	(using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.sbone.de (Postfix) with ESMTPS id BF1F225D389C;
	Wed, 12 Oct 2011 09:09:18 +0000 (UTC)
Received: from content-filter.sbone.de (content-filter.sbone.de
	[IPv6:fde9:577b:c1a9:31::2013:2742])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mail.sbone.de (Postfix) with ESMTPS id E9A3CBD3D31;
	Wed, 12 Oct 2011 09:09:17 +0000 (UTC)
X-Virus-Scanned: amavisd-new at sbone.de
Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587])
	by content-filter.sbone.de (content-filter.sbone.de
	[fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024)
	with ESMTP id oRla6lr4CESa; Wed, 12 Oct 2011 09:09:17 +0000 (UTC)
Received: from orange-en1.sbone.de (orange-en1.sbone.de
	[IPv6:fde9:577b:c1a9:31:cabc:c8ff:fecf:e8e3])
	(using TLSv1 with cipher AES128-SHA (128/128 bits))
	(No client certificate requested)
	by mail.sbone.de (Postfix) with ESMTPSA id EDF41BD3C59;
	Wed, 12 Oct 2011 09:09:16 +0000 (UTC)
Mime-Version: 1.0 (Apple Message framework v1084)
Content-Type: text/plain; charset=us-ascii
From: "Bjoern A. Zeeb" 
In-Reply-To: <201110052208.p95M8H3C030566@svn.freebsd.org>
Date: Wed, 12 Oct 2011 09:09:16 +0000
Content-Transfer-Encoding: quoted-printable
Message-Id: <05F84C7F-A1CD-40E4-BDD5-BCACB58C56BF@lists.zabbadoz.net>
References: <201110052208.p95M8H3C030566@svn.freebsd.org>
To: Dag-Erling Smorgrav 
X-Mailer: Apple Mail (2.1084)
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r226046 - in head: crypto/openssh
	crypto/openssh/openbsd-compat secure/usr.sbin/sshd
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 12 Oct 2011 09:09:20 -0000


On 5. Oct 2011, at 22:08 , Dag-Erling Smorgrav wrote:

> Author: des
> Date: Wed Oct  5 22:08:17 2011
> New Revision: 226046
> URL: http://svn.freebsd.org/changeset/base/226046
>=20
> Log:
>  Upgrade to OpenSSH 5.9p1.
>=20
>  MFC after:	3 months

Mergemaster brought up this change:

+# The default is to check both .ssh/authorized_keys and =
.ssh/authorized_keys2
+# but this is overridden so installations will only check =
.ssh/authorized_keys
+AuthorizedKeysFile     .ssh/authorized_keys


This will break setups that have authorized_keys2 files (only) and needs =
to
be reverted I think?

--=20
Bjoern A. Zeeb                                 You have to have visions!
         Stop bit received. Insert coin for new address family.


From owner-svn-src-all@FreeBSD.ORG  Wed Oct 12 09:13:16 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8DCB41065676;
	Wed, 12 Oct 2011 09:13:16 +0000 (UTC)
	(envelope-from edwin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 7BFB88FC1C;
	Wed, 12 Oct 2011 09:13:16 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9C9DGdK056119;
	Wed, 12 Oct 2011 09:13:16 GMT (envelope-from edwin@svn.freebsd.org)
Received: (from edwin@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9C9DGJU056111;
	Wed, 12 Oct 2011 09:13:16 GMT (envelope-from edwin@svn.freebsd.org)
Message-Id: <201110120913.p9C9DGJU056111@svn.freebsd.org>
From: Edwin Groothuis 
Date: Wed, 12 Oct 2011 09:13:16 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226289 - head/contrib/tzdata
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 12 Oct 2011 09:13:16 -0000

Author: edwin
Date: Wed Oct 12 09:13:16 2011
New Revision: 226289
URL: http://svn.freebsd.org/changeset/base/226289

Log:
  MFV of tzdata2011l, r226279
  
  Changes in 2011i:
  
      Africa
      - Added South Sudan: Africa/Juba
  
      Australasia:
      - Samoa will go forward 24 hours at 30 December 2011 to better match
        the day of the week with its neighbours.
  
      Europe:
      - Europe/Kaliningrad will have the timezone KALT.
  
      North America:
      - Updates to Metlakatla historical data
      - Newfoundland, Labrador and Resolute will do something which I
        can't figure out.
  
      iso3166tab;
      - Add SS for South Sudan.
  
  Changes in 2011j:
  
      - Samoa will go from 29 December 23:59:59 to 31 December 00:00:00.
      - Samoa DST will end on 1 April 2012
  
  Changes in 2011k:
  
      - Gaza / West Bank goes back to standard time on 02 August 2011.
      - West Bank went bac kto DST on 30 August 2011.
      - Lots of changes in Minsk (GMT+3 without DST) and other Russian
        regions. A new timezone has been created for them, FET: Further-eastern
        European Time aka GMT+3.
      - Add Asian/Hebron to the zone.tab file.
  
  Changes in 2011l:
  
      - West Bank came out of DST on 30 September 2011.
      - Fiji will g oin DST on 23 October and out of it on 26 Februari
      - State Bahia might go back to DST in 16 October 2011
  
      Due to legal problems, ado and Paul Eggert have to temporary suspend
      their work on the timezone database
      (http://thread.gmane.org/gmane.comp.time.tz/4133). Their work has
      been continued by volunteers on the tz community and the hosting
      of the data files is done by Robert Elz at ftp://munnari.oz.au/pub/.
  
  Obtained from:	ftp://munnari.oz.au/pub, ftp://elsie.nci.nih.gov/pub/

Modified:
  head/contrib/tzdata/africa
  head/contrib/tzdata/asia
  head/contrib/tzdata/australasia
  head/contrib/tzdata/europe
  head/contrib/tzdata/northamerica
  head/contrib/tzdata/southamerica
  head/contrib/tzdata/zone.tab
Directory Properties:
  head/contrib/tzdata/   (props changed)

Modified: head/contrib/tzdata/africa
==============================================================================
--- head/contrib/tzdata/africa	Wed Oct 12 08:39:57 2011	(r226288)
+++ head/contrib/tzdata/africa	Wed Oct 12 09:13:16 2011	(r226289)
@@ -1,5 +1,5 @@
 # 
-# @(#)africa	8.31
+# @(#)africa	8.33
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -58,7 +58,7 @@
 # I invented the following abbreviations; corrections are welcome!
 #	 2:00	WAST	West Africa Summer Time
 #	 2:30	BEAT	British East Africa Time (no longer used)
-#	 2:44:45 BEAUT	British East Africa Unified Time (no longer used)
+#	 2:45	BEAUT	British East Africa Unified Time (no longer used)
 #	 3:00	CAST	Central Africa Summer Time (no longer used)
 #	 3:00	SAST	South Africa Summer Time (no longer used)
 #	 3:00	EAT	East Africa Time
@@ -396,7 +396,7 @@ Zone	Africa/Bissau	-1:02:20 -	LMT	1911 M
 Zone	Africa/Nairobi	2:27:16	-	LMT	1928 Jul
 			3:00	-	EAT	1930
 			2:30	-	BEAT	1940
-			2:44:45	-	BEAUT	1960
+			2:45	-	BEAUT	1960
 			3:00	-	EAT
 
 # Lesotho
@@ -957,6 +957,11 @@ Zone	Africa/Khartoum	2:10:08 -	LMT	1931
 			2:00	Sudan	CA%sT	2000 Jan 15 12:00
 			3:00	-	EAT
 
+# South Sudan
+Zone	Africa/Juba	2:06:24 -	LMT	1931
+			2:00	Sudan	CA%sT	2000 Jan 15 12:00
+			3:00	-	EAT
+
 # Swaziland
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Africa/Mbabane	2:04:24 -	LMT	1903 Mar
@@ -966,7 +971,7 @@ Zone	Africa/Mbabane	2:04:24 -	LMT	1903 M
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone Africa/Dar_es_Salaam 2:37:08 -	LMT	1931
 			3:00	-	EAT	1948
-			2:44:45	-	BEAUT	1961
+			2:45	-	BEAUT	1961
 			3:00	-	EAT
 
 # Togo
@@ -1092,7 +1097,7 @@ Zone	Africa/Tunis	0:40:44 -	LMT	1881 May
 Zone	Africa/Kampala	2:09:40 -	LMT	1928 Jul
 			3:00	-	EAT	1930
 			2:30	-	BEAT	1948
-			2:44:45	-	BEAUT	1957
+			2:45	-	BEAUT	1957
 			3:00	-	EAT
 
 # Zambia

Modified: head/contrib/tzdata/asia
==============================================================================
--- head/contrib/tzdata/asia	Wed Oct 12 08:39:57 2011	(r226288)
+++ head/contrib/tzdata/asia	Wed Oct 12 09:13:16 2011	(r226289)
@@ -1,4 +1,4 @@
-# @(#)asia	8.65
+# @(#)asia	8.68
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -2194,7 +2194,47 @@ Zone	Asia/Karachi	4:28:12 -	LMT	1907
 # http://www.timeanddate.com/news/time/westbank-gaza-end-dst-2010.html
 # 
 
+# From Steffen Thorsen (2011-08-26):
+# Gaza and the West Bank did go back to standard time in the beginning of
+# August, and will now enter daylight saving time again on 2011-08-30
+# 00:00 (so two periods of DST in 2011). The pause was because of
+# Ramadan.
+#
+# 
+# http://www.maannews.net/eng/ViewDetails.aspx?ID=416217
+# 
+# Additional info:
+# 
+# http://www.timeanddate.com/news/time/palestine-dst-2011.html
+# 
+
+# From Alexander Krivenyshev (2011-08-27):
+# According to the article in The Jerusalem Post:
+# "...Earlier this month, the Palestinian government in the West Bank decided to
+# move to standard time for 30 days, during Ramadan. The Palestinians in the
+# Gaza Strip accepted the change and also moved their clocks one hour back.
+# The Hamas government said on Saturday that it won't observe summertime after
+# the Muslim feast of Id al-Fitr, which begins on Tuesday..."
+# ...
+# 
+# http://www.jpost.com/MiddleEast/Article.aspx?id=235650
+# 
+# or
+# 
+# http://www.worldtimezone.com/dst_news/dst_news_gazastrip05.html
+# 
 # The rules for Egypt are stolen from the `africa' file.
+
+# From Steffen Thorsen (2011-09-30):
+# West Bank did end Daylight Saving Time this morning/midnight (2011-09-30 
+# 00:00).
+# So West Bank and Gaza now have the same time again.
+#
+# Many sources, including:
+# 
+# http://www.maannews.net/eng/ViewDetails.aspx?ID=424808
+# 
+
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule EgyptAsia	1957	only	-	May	10	0:00	1:00	S
 Rule EgyptAsia	1957	1958	-	Oct	 1	0:00	0	-
@@ -2210,19 +2250,37 @@ Rule Palestine	2005	only	-	Oct	 4	2:00	0
 Rule Palestine	2006	2008	-	Apr	 1	0:00	1:00	S
 Rule Palestine	2006	only	-	Sep	22	0:00	0	-
 Rule Palestine	2007	only	-	Sep	Thu>=8	2:00	0	-
-Rule Palestine	2008	only	-	Aug	lastFri	2:00	0	-
+Rule Palestine	2008	only	-	Aug	lastFri	0:00	0	-
 Rule Palestine	2009	only	-	Mar	lastFri	0:00	1:00	S
-Rule Palestine	2010	max	-	Mar	lastSat	0:01	1:00	S
-Rule Palestine	2009	max	-	Sep	Fri>=1	2:00	0	-
+Rule Palestine	2009	only	-	Sep	Fri>=1	2:00	0	-
+Rule Palestine	2010	only	-	Mar	lastSat	0:01	1:00	S
 Rule Palestine	2010	only	-	Aug	11	0:00	0	-
 
+# From Arthur David Olson (2011-09-20):
+# 2011 transitions per http://www.timeanddate.com as of 2011-09-20.
+
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Gaza	2:17:52	-	LMT	1900 Oct
 			2:00	Zion	EET	1948 May 15
 			2:00 EgyptAsia	EE%sT	1967 Jun  5
 			2:00	Zion	I%sT	1996
 			2:00	Jordan	EE%sT	1999
-			2:00 Palestine	EE%sT
+			2:00 Palestine	EE%sT	2011 Apr  2 12:01
+			2:00	1:00	EEST	2011 Aug  1
+			2:00	-	EET
+
+Zone	Asia/Hebron	2:20:23	-	LMT	1900 Oct
+			2:00	Zion	EET	1948 May 15
+			2:00 EgyptAsia	EE%sT	1967 Jun  5
+			2:00	Zion	I%sT	1996
+			2:00	Jordan	EE%sT	1999
+			2:00 Palestine	EE%sT	2008 Aug
+			2:00 	1:00	EEST	2008 Sep
+			2:00 Palestine	EE%sT	2011 Apr  1 12:01
+			2:00	1:00	EEST	2011 Aug  1
+			2:00	-	EET	2011 Aug 30
+			2:00	1:00	EEST	2011 Sep 30 3:00
+			2:00	-	EET
 
 # Paracel Is
 # no information

Modified: head/contrib/tzdata/australasia
==============================================================================
--- head/contrib/tzdata/australasia	Wed Oct 12 08:39:57 2011	(r226288)
+++ head/contrib/tzdata/australasia	Wed Oct 12 09:13:16 2011	(r226289)
@@ -1,5 +1,5 @@
 # 
-# @(#)australasia	8.23
+# @(#)australasia	8.27
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -296,6 +296,18 @@ Zone	Indian/Cocos	6:27:40	-	LMT	1900
 # http://www.worldtimezone.com/dst_news/dst_news_fiji04.html
 # 
 
+# From Steffen Thorsen (2011-10-03):
+# Now the dates have been confirmed, and at least our start date 
+# assumption was correct (end date was one week wrong).
+#
+# 
+# www.fiji.gov.fj/index.php?option=com_content&view=article&id=4966:daylight-saving-starts-in-fiji&catid=71:press-releases&Itemid=155
+# 
+# which says
+# Members of the public are reminded to change their time to one hour in 
+# advance at 2am to 3am on October 23, 2011 and one hour back at 3am to 
+# 2am on February 26 next year.
+
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Fiji	1998	1999	-	Nov	Sun>=1	2:00	1:00	S
 Rule	Fiji	1999	2000	-	Feb	lastSun	3:00	0	-
@@ -303,6 +315,8 @@ Rule	Fiji	2009	only	-	Nov	29	2:00	1:00	S
 Rule	Fiji	2010	only	-	Mar	lastSun	3:00	0	-
 Rule	Fiji	2010	only	-	Oct	24	2:00	1:00	S
 Rule	Fiji	2011	only	-	Mar	Sun>=1	3:00	0	-
+Rule	Fiji	2011	only	-	Oct	23	2:00	1:00	S
+Rule	Fiji	2012	only	-	Feb	26	3:00	0	-
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Pacific/Fiji	11:53:40 -	LMT	1915 Oct 26	# Suva
 			12:00	Fiji	FJ%sT	# Fiji Time
@@ -499,7 +513,7 @@ Zone Pacific/Pago_Pago	 12:37:12 -	LMT	1
 # http://www.parliament.gov.ws/documents/acts/Daylight%20Saving%20Act%20%202009%20%28English%29%20-%20Final%207-7-091.pdf
 # 
 
-# From Raymond Hughes (2010-10-07):
+# From Laupue Raymond Hughes (2010-10-07):
 # Please see
 # 
 # http://www.mcil.gov.ws
@@ -509,7 +523,7 @@ Zone Pacific/Pago_Pago	 12:37:12 -	LMT	1
 # to 01:00am and First Sunday April 2011 (03/04/11) - adjust clocks
 # backwards from 1:00am to 12:00am"
 
-# From Raymond Hughes (2011-03-07)
+# From Laupue Raymond Hughes (2011-03-07):
 # I believe this will be posted shortly on the website
 # 
 # www.mcil.gov.ws
@@ -529,12 +543,74 @@ Zone Pacific/Pago_Pago	 12:37:12 -	LMT	1
 # Margaret Fruean ACTING CHIEF EXECUTIVE OFFICER MINISTRY OF COMMERCE,
 # INDUSTRY AND LABOUR 28th February 2011
 
+# From David Zuelke (2011-05-09):
+# Subject: Samoa to move timezone from east to west of international date line
+# 
+# 
+# http://www.morningstar.co.uk/uk/markets/newsfeeditem.aspx?id=138501958347963
+# 
+
+# From Mark Sim-Smith (2011-08-17):
+# I have been in contact with Leilani Tuala Warren from the Samoa Law
+# Reform Commission, and she has sent me a copy of the Bill that she
+# confirmed has been passed...Most of the sections are about maps rather
+# than the time zone change, but I'll paste the relevant bits below. But
+# the essence is that at midnight 29 Dec (UTC-11 I suppose), Samoa
+# changes from UTC-11 to UTC+13:
+#
+# International Date Line Bill 2011
+#
+# AN ACT to provide for the change to standard time in Samoa and to make
+# consequential amendments to the position of the International Date
+# Line, and for related purposes.
+#
+# BE IT ENACTED by the Legislative Assembly of Samoa in Parliament
+# assembled as follows:
+#
+# 1. Short title and commencement-(1) This Act may be cited as the
+# International Date Line Act 2011. (2) Except for section 5(3) this Act
+# commences at 12 o'clock midnight, on Thursday 29th December 2011. (3)
+# Section 5(3) commences on the date of assent by the Head of State.
+#
+# [snip]
+#
+# 3. Interpretation - [snip] "Samoa standard time" in this Act and any
+# other statute of Samoa which refers to 'Samoa standard time' means the
+# time 13 hours in advance of Co-ordinated Universal Time.
+#
+# 4. Samoa standard time - (1) Upon the commencement of this Act, Samoa
+# standard time shall be set at 13 hours in advance of Co-ordinated
+# Universal Time for the whole of Samoa. (2) All references to Samoa's
+# time zone and to Samoa standard time in Samoa in all legislation and
+# instruments after the commencement of this Act shall be references to
+# Samoa standard time as provided for in this Act. (3) Nothing in this
+# Act affects the provisions of the Daylight Saving Act 2009, except that
+# it defines Samoa standard time....
+
+# From Laupue Raymond Hughes (2011-09-02):
+# 
+# http://www.mcil.gov.ws/mcil_publications.html
+# 
+#
+# here is the official website publication for Samoa DST and dateline change
+#
+# DST
+# Year	End	Time	Start	Time
+# 2011	- - -	- - -	24 September	3:00am to 4:00am
+# 2012	01 April	4:00am to 3:00am	- - -	- - -
+#
+# Dateline Change skip Friday 30th Dec 2011
+# Thursday 29th December 2011	23:59:59 Hours
+# Saturday 31st December 2011	00:00:00 Hours
 Zone Pacific/Apia	 12:33:04 -	LMT	1879 Jul  5
 			-11:26:56 -	LMT	1911
 			-11:30	-	SAMT	1950		# Samoa Time
 			-11:00	-	WST	2010 Sep 26
 			-11:00	1:00	WSDT	2011 Apr 2 4:00
-			-11:00	-	WST
+			-11:00	-	WST	2011 Sep 24 3:00
+			-11:00	1:00	WSDT	2011 Dec 30
+			 13:00	1:00	WSDT	2012 Apr 1 4:00
+			 13:00	-	WST
 
 # Solomon Is
 # excludes Bougainville, for which see Papua New Guinea
@@ -1206,7 +1282,7 @@ Zone	Pacific/Wallis	12:15:20 -	LMT	1901
 # Lord Howe Island Board (controlling authority for the Island) is
 # seeking the community's views on various options for summer time
 # arrangements on the Island, e.g. advance clocks by 1 full hour
-# instead of only 30 minutes.  Dependant on the wishes of residents
+# instead of only 30 minutes.  [Dependent] on the wishes of residents
 # the Board may approach the NSW government to change the existing
 # arrangements.  The starting date for summer time on the Island will
 # however always coincide with the rest of NSW.
@@ -1332,7 +1408,7 @@ Zone	Pacific/Wallis	12:15:20 -	LMT	1901
 
 # From Paul Eggert (1996-01-22):
 # Today's _Wall Street Journal_ (page 1) reports that Kiribati
-# ``declared it the same day throught the country as of Jan. 1, 1995''
+# ``declared it the same day [throughout] the country as of Jan. 1, 1995''
 # as part of the competition to be first into the 21st century.
 
 

Modified: head/contrib/tzdata/europe
==============================================================================
--- head/contrib/tzdata/europe	Wed Oct 12 08:39:57 2011	(r226288)
+++ head/contrib/tzdata/europe	Wed Oct 12 09:13:16 2011	(r226289)
@@ -1,5 +1,5 @@
 # 
-# @(#)europe	8.33
+# @(#)europe	8.38
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -561,9 +561,9 @@ Rule	Russia	1985	1991	-	Mar	lastSun	 2:0
 #
 Rule	Russia	1992	only	-	Mar	lastSat	 23:00	1:00	S
 Rule	Russia	1992	only	-	Sep	lastSat	 23:00	0	-
-Rule	Russia	1993	max	-	Mar	lastSun	 2:00s	1:00	S
+Rule	Russia	1993	2010	-	Mar	lastSun	 2:00s	1:00	S
 Rule	Russia	1993	1995	-	Sep	lastSun	 2:00s	0	-
-Rule	Russia	1996	max	-	Oct	lastSun	 2:00s	0	-
+Rule	Russia	1996	2010	-	Oct	lastSun	 2:00s	0	-
 
 # From Alexander Krivenyshev (2011-06-14):
 # According to Kremlin press service, Russian President Dmitry Medvedev
@@ -583,7 +583,6 @@ Rule	Russia	1996	max	-	Oct	lastSun	 2:00
 # From Arthur David Olson (2011-06-15):
 # Take "abolishing daylight saving time" to mean that time is now considered
 # to be standard.
-# At least for now, keep the "old" Russia rules for the benefit of Belarus.
 
 # These are for backward compatibility with older versions.
 
@@ -689,6 +688,23 @@ Zone	Europe/Vienna	1:05:20 -	LMT	1893 Ap
 			1:00	EU	CE%sT
 
 # Belarus
+# From Yauhen Kharuzhy (2011-09-16):
+# By latest Belarus government act Europe/Minsk timezone was changed to
+# GMT+3 without DST (was GMT+2 with DST).
+#
+# Sources (Russian language):
+# 1.
+# 
+# http://www.belta.by/ru/all_news/society/V-Belarusi-otmenjaetsja-perexod-na-sezonnoe-vremja_i_572952.html
+# 
+# 2.
+# 
+# http://naviny.by/rubrics/society/2011/09/16/ic_articles_116_175144/
+# 
+# 3.
+# 
+# http://news.tut.by/society/250578.html
+# 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Europe/Minsk	1:50:16 -	LMT	1880
 			1:50	-	MMT	1924 May 2 # Minsk Mean Time
@@ -700,7 +716,8 @@ Zone	Europe/Minsk	1:50:16 -	LMT	1880
 			2:00	1:00	EEST	1991 Sep 29 2:00s
 			2:00	-	EET	1992 Mar 29 0:00s
 			2:00	1:00	EEST	1992 Sep 27 0:00s
-			2:00	Russia	EE%sT
+			2:00	Russia	EE%sT	2011 Mar 27 2:00s
+			3:00	-	FET # Further-eastern European Time
 
 # Belgium
 #
@@ -2034,7 +2051,7 @@ Zone Europe/Kaliningrad	 1:22:00 -	LMT	1
 			 2:00	Poland	CE%sT	1946
 			 3:00	Russia	MSK/MSD	1991 Mar 31 2:00s
 			 2:00	Russia	EE%sT	2011 Mar 27 2:00s
-			 3:00	-	EET
+			 3:00	-	FET # Further-eastern European Time
 #
 # From Oscar van Vlijmen (2001-08-25): [This region consists of]
 # Respublika Adygeya, Arkhangel'skaya oblast',
@@ -2189,7 +2206,7 @@ Zone Asia/Irkutsk	 6:57:20 -	LMT	1880
 # [parts of] Respublika Sakha (Yakutiya), Chitinskaya oblast'.
 
 # From Oscar van Vlijmen (2009-11-29):
-# ...some regions of RUssia were merged with others since 2005...
+# ...some regions of [Russia] were merged with others since 2005...
 # Some names were changed, no big deal, except for one instance: a new name.
 # YAK/YAKST: UTC+9 Zabajkal'skij kraj.
 
@@ -2613,6 +2630,28 @@ Link	Europe/Istanbul	Asia/Istanbul	# Ist
 # of March at 3am the time is changing to 4am and each last Sunday of
 # October the time at 4am is changing to 3am"
 
+# From Alexander Krivenyshev (2011-09-20):
+# On September 20, 2011 the deputies of the Verkhovna Rada agreed to
+# abolish the transfer clock to winter time.
+#
+# Bill number 8330 of MP from the Party of Regions Oleg Nadoshi got
+# approval from 266 deputies.
+#
+# Ukraine abolishes transter back to the winter time (in Russian)
+# 
+# http://news.mail.ru/politics/6861560/
+# 
+#
+# The Ukrainians will no longer change the clock (in Russian)
+# 
+# http://www.segodnya.ua/news/14290482.html
+# 
+#
+# Deputies cancelled the winter time (in Russian)
+# 
+# http://www.pravda.com.ua/rus/news/2011/09/20/6600616/
+# 
+
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 # Most of Ukraine since 1970 has been like Kiev.
 # "Kyiv" is the transliteration of the Ukrainian name, but
@@ -2626,7 +2665,8 @@ Zone Europe/Kiev	2:02:04 -	LMT	1880
 			3:00	-	MSK	1990 Jul  1 2:00
 			2:00	-	EET	1992
 			2:00	E-Eur	EE%sT	1995
-			2:00	EU	EE%sT
+			2:00	EU	EE%sT	2011 Mar lastSun 1:00u
+			3:00	-	FET # Further-eastern European Time
 # Ruthenia used CET 1990/1991.
 # "Uzhhorod" is the transliteration of the Ukrainian name, but
 # "Uzhgorod" is more common in English.
@@ -2640,7 +2680,8 @@ Zone Europe/Uzhgorod	1:29:12 -	LMT	1890 
 			1:00	-	CET	1991 Mar 31 3:00
 			2:00	-	EET	1992
 			2:00	E-Eur	EE%sT	1995
-			2:00	EU	EE%sT
+			2:00	EU	EE%sT	2011 Mar lastSun 1:00u
+			3:00	-	FET # Further-eastern European Time
 # Zaporozh'ye and eastern Lugansk oblasts observed DST 1990/1991.
 # "Zaporizhia" is the transliteration of the Ukrainian name, but
 # "Zaporozh'ye" is more common in English.  Use the common English
@@ -2653,7 +2694,8 @@ Zone Europe/Zaporozhye	2:20:40 -	LMT	188
 			1:00	C-Eur	CE%sT	1943 Oct 25
 			3:00	Russia	MSK/MSD	1991 Mar 31 2:00
 			2:00	E-Eur	EE%sT	1995
-			2:00	EU	EE%sT
+			2:00	EU	EE%sT	2011 Mar lastSun 1:00u
+			3:00	-	FET # Further-eastern European Time
 # Central Crimea used Moscow time 1994/1997.
 Zone Europe/Simferopol	2:16:24 -	LMT	1880
 			2:16	-	SMT	1924 May  2 # Simferopol Mean T
@@ -2678,7 +2720,8 @@ Zone Europe/Simferopol	2:16:24 -	LMT	188
 # Assume it happened in March by not changing the clocks.
 			3:00	Russia	MSK/MSD	1997
 			3:00	-	MSK	1997 Mar lastSun 1:00u
-			2:00	EU	EE%sT
+			2:00	EU	EE%sT	2011 Mar lastSun 1:00u
+			3:00	-	FET # Further-eastern European Time
 
 ###############################################################################
 

Modified: head/contrib/tzdata/northamerica
==============================================================================
--- head/contrib/tzdata/northamerica	Wed Oct 12 08:39:57 2011	(r226288)
+++ head/contrib/tzdata/northamerica	Wed Oct 12 09:13:16 2011	(r226289)
@@ -1,5 +1,5 @@
 # 
-# @(#)northamerica	8.42
+# @(#)northamerica	8.49
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -468,6 +468,10 @@ Zone America/Los_Angeles -7:52:58 -	LMT	
 # own time. I asked about daylight saving; they said it wasn't used. I
 # did not inquire about practices in the past.
 
+# From Arthur David Olson (2011-08-17):
+# For lack of better information, assume that Metlakatla's
+# abandonment of use of daylight saving resulted from the 1983 vote.
+
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone America/Juneau	 15:02:19 -	LMT	1867 Oct 18
 			 -8:57:41 -	LMT	1900 Aug 20 12:00
@@ -479,7 +483,7 @@ Zone America/Juneau	 15:02:19 -	LMT	1867
 			 -8:00	US	P%sT	1983 Oct 30 2:00
 			 -9:00	US	Y%sT	1983 Nov 30
 			 -9:00	US	AK%sT
-Zone America/Sitka	 -14:58:47 -	LMT	1867 Oct 18
+Zone America/Sitka	 14:58:47 -	LMT	1867 Oct 18
 			 -9:01:13 -	LMT	1900 Aug 20 12:00
 			 -8:00	-	PST	1942
 			 -8:00	US	P%sT	1946
@@ -493,7 +497,7 @@ Zone America/Metlakatla	 15:13:42 -	LMT	
 			 -8:00	US	P%sT	1946
 			 -8:00	-	PST	1969
 			 -8:00	US	P%sT	1983 Oct 30 2:00
-			 -8:00	US	MeST
+			 -8:00	-	MeST
 Zone America/Yakutat	 14:41:05 -	LMT	1867 Oct 18
 			 -9:18:55 -	LMT	1900 Aug 20 12:00
 			 -9:00	-	YST	1942
@@ -593,8 +597,8 @@ Zone Pacific/Honolulu	-10:31:26 -	LMT	18
 			-10:30	-	HST	1933 Apr 30 2:00 #Laws 1933
 			-10:30	1:00	HDT	1933 May 21 12:00 #Laws 1933+12
 			-10:30	-	HST	1942 Feb 09 2:00 #Schmitt&Cox+2
-			-10:30	1:00	HDT	1945 Sep 30 2:00 #Schmitt&Fox+2
-			-10:30	US	H%sT	1947 Jun  8 2:00 #Schmitt&Fox+2
+			-10:30	1:00	HDT	1945 Sep 30 2:00 #Schmitt&Cox+2
+			-10:30	-	HST	1947 Jun  8 2:00 #Schmitt&Cox+2
 			-10:00	-	HST
 
 # Now we turn to US areas that have diverged from the consensus since 1970.
@@ -1163,12 +1167,29 @@ Rule	StJohns	1960	1986	-	Oct	lastSun	2:0
 # From Paul Eggert (2000-10-02):
 # INMS (2000-09-12) says that, since 1988 at least, Newfoundland switches
 # at 00:01 local time.  For now, assume it started in 1987.
+
+# From Michael Pelley (2011-09-12):
+# We received today, Monday, September 12, 2011, notification that the
+# changes to the Newfoundland Standard Time Act have been proclaimed.
+# The change in the Act stipulates that the change from Daylight Savings
+# Time to Standard Time and from Standard Time to Daylight Savings Time
+# now occurs at 2:00AM.
+# ...
+# 
+# http://www.assembly.nl.ca/legislation/sr/annualstatutes/2011/1106.chp.htm
+# 
+# ...
+# MICHAEL PELLEY  |  Manager of Enterprise Architecture - Solution Delivery
+# Office of the Chief Information Officer
+# Executive Council
+# Government of Newfoundland & Labrador
+
 Rule	StJohns	1987	only	-	Apr	Sun>=1	0:01	1:00	D
 Rule	StJohns	1987	2006	-	Oct	lastSun	0:01	0	S
 Rule	StJohns	1988	only	-	Apr	Sun>=1	0:01	2:00	DD
 Rule	StJohns	1989	2006	-	Apr	Sun>=1	0:01	1:00	D
-Rule	StJohns	2007	max	-	Mar	Sun>=8	0:01	1:00	D
-Rule	StJohns	2007	max	-	Nov	Sun>=1	0:01	0	S
+Rule	StJohns	2007	2011	-	Mar	Sun>=8	0:01	1:00	D
+Rule	StJohns	2007	2010	-	Nov	Sun>=1	0:01	0	S
 #
 # St John's has an apostrophe, but Posix file names can't have apostrophes.
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
@@ -1178,7 +1199,8 @@ Zone America/St_Johns	-3:30:52 -	LMT	188
 			-3:30:52 StJohns N%sT	1935 Mar 30
 			-3:30	StJohns	N%sT	1942 May 11
 			-3:30	Canada	N%sT	1946
-			-3:30	StJohns	N%sT
+			-3:30	StJohns	N%sT	2011 Nov
+			-3:30	Canada	N%sT
 
 # most of east Labrador
 
@@ -1192,7 +1214,8 @@ Zone America/Goose_Bay	-4:01:40 -	LMT	18
 			-3:30	StJohns	N%sT	1942 May 11
 			-3:30	Canada	N%sT	1946
 			-3:30	StJohns	N%sT	1966 Mar 15 2:00
-			-4:00	StJohns	A%sT
+			-4:00	StJohns	A%sT	2011 Nov
+			-4:00	Canada	A%sT
 
 
 # west Labrador, Nova Scotia, Prince Edward I
@@ -1924,20 +1947,69 @@ Zone America/Dawson_Creek -8:00:56 -	LMT
 # daylight saving....
 # http://www.nnsl.com/frames/newspapers/2006-11/nov13_06none.html
 
-# From Chris Walton (2007-03-14):
-# Today I phoned the "hamlet office" to find out what Resolute was doing with
-# its clocks.
-#
-# The individual that answered the phone confirmed that the clocks did not
-# move at the end of daylight saving on October 29/2006.  He also told me that
-# the clocks did not move this past weekend (March 11/2007)....
-
-# From Chris Walton (2008-11-13):
-# ...the residents of Resolute believe that they are changing "time zones"
-# twice a year.  In winter months, local time is qualified with "Eastern
-# Time" which is really "Eastern Standard Time (UTC-5)".  In summer
-# months, local time is qualified with "Central Time" which is really
-# "Central Daylight Time (UTC-5)"...
+# From Chris Walton (2011-03-21):
+# Back in 2007 I initiated the creation of a new "zone file" for Resolute
+# Bay. Resolute Bay is a small community located about 900km north of
+# the Arctic Circle. The zone file was required because Resolute Bay had
+# decided to use UTC-5 instead of UTC-6 for the winter of 2006-2007.
+#
+# According to new information which I received last week, Resolute Bay
+# went back to using UTC-6 in the winter of 2007-2008...
+#
+# On March 11/2007 most of Canada went onto daylight saving. On March
+# 14/2007 I phoned the Resolute Bay hamlet office to do a "time check." I
+# talked to somebody that was both knowledgeable and helpful. I was able
+# to confirm that Resolute Bay was still operating on UTC-5. It was
+# explained to me that Resolute Bay had been on the Eastern Time zone
+# (EST) in the winter, and was now back on the Central Time zone (CDT).
+# i.e. the time zone had changed twice in the last year but the clocks
+# had not moved. The residents had to know which time zone they were in
+# so they could follow the correct TV schedule...
+#
+# On Nov 02/2008 most of Canada went onto standard time. On Nov 03/2008 I
+# phoned the Resolute Bay hamlet office...[D]ue to the challenging nature
+# of the phone call, I decided to seek out an alternate source of
+# information. I found an e-mail address for somebody by the name of
+# Stephanie Adams whose job was listed as "Inns North Support Officer for
+# Arctic Co-operatives." I was under the impression that Stephanie lived
+# and worked in Resolute Bay...
+#
+# On March 14/2011 I phoned the hamlet office again. I was told that
+# Resolute Bay had been using Central Standard Time over the winter of
+# 2010-2011 and that the clocks had therefore been moved one hour ahead
+# on March 13/2011. The person I talked to was aware that Resolute Bay
+# had previously experimented with Eastern Standard Time but he could not
+# tell me when the practice had stopped.
+#
+# On March 17/2011 I searched the Web to find an e-mail address of
+# somebody that might be able to tell me exactly when Resolute Bay went
+# off Eastern Standard Time. I stumbled on the name "Aziz Kheraj." Aziz
+# used to be the mayor of Resolute Bay and he apparently owns half the
+# businesses including "South Camp Inn." This website has some info on
+# Aziz:
+# 
+# http://www.uphere.ca/node/493
+# 
+#
+# I sent Aziz an e-mail asking when Resolute Bay had stopped using
+# Eastern Standard Time.
+#
+# Aziz responded quickly with this: "hi, The time was not changed for the
+# 1 year only, the following year, the community went back to the old way
+# of "spring ahead-fall behind" currently we are zulu plus 5 hrs and in
+# the winter Zulu plus 6 hrs"
+#
+# This of course conflicted with everything I had ascertained in November 2008.
+#
+# I sent Aziz a copy of my 2008 e-mail exchange with Stephanie. Aziz
+# responded with this: "Hi, Stephanie lives in Winnipeg. I live here, You
+# may want to check with the weather office in Resolute Bay or do a
+# search on the weather through Env. Canada. web site"
+#
+# If I had realized the Stephanie did not live in Resolute Bay I would
+# never have contacted her.  I now believe that all the information I
+# obtained in November 2008 should be ignored...
+# I apologize for reporting incorrect information in 2008.
 
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	NT_YK	1918	only	-	Apr	14	2:00	1:00	D
@@ -1965,14 +2037,12 @@ Zone America/Iqaluit	0	-	zzz	1942 Aug # 
 			-6:00	Canada	C%sT	2000 Oct 29 2:00
 			-5:00	Canada	E%sT
 # aka Qausuittuq
-# Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
-Rule	Resolute 2006	max	-	Nov	Sun>=1	2:00	0	ES
-Rule	Resolute 2007	max	-	Mar	Sun>=8	2:00	0	CD
 Zone America/Resolute	0	-	zzz	1947 Aug 31 # Resolute founded
 			-6:00	NT_YK	C%sT	2000 Oct 29 2:00
 			-5:00	-	EST	2001 Apr  1 3:00
 			-6:00	Canada	C%sT	2006 Oct 29 2:00
-			-5:00	Resolute	%sT
+			-5:00	-	EST	2007 Mar 11 3:00
+			-6:00	Canada	C%sT
 # aka Kangiqiniq
 Zone America/Rankin_Inlet 0	-	zzz	1957 # Rankin Inlet founded
 			-6:00	NT_YK	C%sT	2000 Oct 29 2:00

Modified: head/contrib/tzdata/southamerica
==============================================================================
--- head/contrib/tzdata/southamerica	Wed Oct 12 08:39:57 2011	(r226288)
+++ head/contrib/tzdata/southamerica	Wed Oct 12 09:13:16 2011	(r226289)
@@ -797,6 +797,26 @@ Zone	America/La_Paz	-4:32:36 -	LMT	1890
 # 
 # http://www.timeanddate.com/news/time/brazil-dst-2008-2009.html
 # 
+#
+# From Alexander Krivenyshev (2011-10-04):
+# State Bahia will return to Daylight savings time this year after 8 years off.
+# The announcement was made by Governor Jaques Wagner in an interview to a 
+# television station in Salvador. 
+
+# In Portuguese:
+# 
+# http://g1.globo.com/bahia/noticia/2011/10/governador-jaques-wagner-confirma-horario-de-verao-na-bahia.html
+#  and
+# 
+# http://noticias.terra.com.br/brasil/noticias/0,,OI5390887-EI8139,00-Bahia+volta+a+ter+horario+de+verao+apos+oito+anos.html
+# 
+
+# From Guilherme Bernardes Rodrigues (2011-10-07):
+# There is news in the media, however there is still no decree about it.
+# I just send a e-mail to Zulmira Brandão at
+# http://pcdsh01.on.br/ the
+# oficial agency about time in Brazil, and she confirmed that the old rule is
+# still in force.
 
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 # Decree 20,466 (1931-10-01)
@@ -1035,6 +1055,9 @@ Zone America/Maceio	-2:22:52 -	LMT	1914
 Zone America/Bahia	-2:34:04 -	LMT	1914
 			-3:00	Brazil	BR%sT	2003 Sep 24
 			-3:00	-	BRT
+# as noted above, not yet in operation.
+#			-3:00	-	BRT	2011 Oct 16
+#			-3:00	Brazil	BR%sT
 #
 # Goias (GO), Distrito Federal (DF), Minas Gerais (MG),
 # Espirito Santo (ES), Rio de Janeiro (RJ), Sao Paulo (SP), Parana (PR),

Modified: head/contrib/tzdata/zone.tab
==============================================================================
--- head/contrib/tzdata/zone.tab	Wed Oct 12 08:39:57 2011	(r226288)
+++ head/contrib/tzdata/zone.tab	Wed Oct 12 09:13:16 2011	(r226289)
@@ -1,5 +1,5 @@
 # 
-# @(#)zone.tab	8.45
+# @(#)zone.tab	8.49
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 #
@@ -120,7 +120,7 @@ CA	+4901-08816	America/Nipigon	Eastern T
 CA	+4823-08915	America/Thunder_Bay	Eastern Time - Thunder Bay, Ontario
 CA	+6344-06828	America/Iqaluit	Eastern Time - east Nunavut - most locations
 CA	+6608-06544	America/Pangnirtung	Eastern Time - Pangnirtung, Nunavut
-CA	+744144-0944945	America/Resolute	Eastern Standard Time - Resolute, Nunavut
+CA	+744144-0944945	America/Resolute	Central Standard Time - Resolute, Nunavut
 CA	+484531-0913718	America/Atikokan	Eastern Standard Time - Atikokan, Ontario and Southampton I, Nunavut
 CA	+624900-0920459	America/Rankin_Inlet	Central Time - central Nunavut
 CA	+4953-09709	America/Winnipeg	Central Time - Manitoba & west Ontario
@@ -319,7 +319,8 @@ PL	+5215+02100	Europe/Warsaw
 PM	+4703-05620	America/Miquelon
 PN	-2504-13005	Pacific/Pitcairn
 PR	+182806-0660622	America/Puerto_Rico
-PS	+3130+03428	Asia/Gaza
+PS	+3130+03428	Asia/Gaza	Gaza Strip
+PS	+313200+0350542	Asia/Hebron	West Bank
 PT	+3843-00908	Europe/Lisbon	mainland
 PT	+3238-01654	Atlantic/Madeira	Madeira Islands
 PT	+3744-02540	Atlantic/Azores	Azores
@@ -361,6 +362,7 @@ SM	+4355+01228	Europe/San_Marino
 SN	+1440-01726	Africa/Dakar
 SO	+0204+04522	Africa/Mogadishu
 SR	+0550-05510	America/Paramaribo
+SS	+0451+03136	Africa/Juba
 ST	+0020+00644	Africa/Sao_Tome
 SV	+1342-08912	America/El_Salvador
 SX	+180305-0630250	America/Lower_Princes

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 12 09:16:46 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 4457F106566B;
	Wed, 12 Oct 2011 09:16:46 +0000 (UTC)
	(envelope-from edwin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 31CA78FC0C;
	Wed, 12 Oct 2011 09:16:46 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9C9Gk3q056307;
	Wed, 12 Oct 2011 09:16:46 GMT (envelope-from edwin@svn.freebsd.org)
Received: (from edwin@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9C9GkkX056299;
	Wed, 12 Oct 2011 09:16:46 GMT (envelope-from edwin@svn.freebsd.org)
Message-Id: <201110120916.p9C9GkkX056299@svn.freebsd.org>
From: Edwin Groothuis 
Date: Wed, 12 Oct 2011 09:16:46 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226290 - stable/8/share/zoneinfo
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 12 Oct 2011 09:16:46 -0000

Author: edwin
Date: Wed Oct 12 09:16:45 2011
New Revision: 226290
URL: http://svn.freebsd.org/changeset/base/226290

Log:
  MFC of tzdata2011l, 226289
  
  Changes in 2011i:
  
      Africa
      - Added South Sudan: Africa/Juba
  
      Australasia:
      - Samoa will go forward 24 hours at 30 December 2011 to better match
        the day of the week with its neighbours.
  
      Europe:
      - Europe/Kaliningrad will have the timezone KALT.
  
      North America:
      - Updates to Metlakatla historical data
      - Newfoundland, Labrador and Resolute will do something which I
        can't figure out.
  
      iso3166tab;
      - Add SS for South Sudan.
  
  Changes in 2011j:
  
      - Samoa will go from 29 December 23:59:59 to 31 December 00:00:00.
      - Samoa DST will end on 1 April 2012
  
  Changes in 2011k:
  
      - Gaza / West Bank goes back to standard time on 02 August 2011.
      - West Bank went bac kto DST on 30 August 2011.
      - Lots of changes in Minsk (GMT+3 without DST) and other Russian
        regions. A new timezone has been created for them, FET: Further-eastern
        European Time aka GMT+3.
      - Add Asian/Hebron to the zone.tab file.
  
  Changes in 2011l:
  
      - West Bank came out of DST on 30 September 2011.
      - Fiji will g oin DST on 23 October and out of it on 26 Februari
      - State Bahia might go back to DST in 16 October 2011
  
      Due to legal problems, ado and Paul Eggert have to temporary suspend
      their work on the timezone database
      (http://thread.gmane.org/gmane.comp.time.tz/4133). Their work has
      been continued by volunteers on the tz community and the hosting
      of the data files is done by Robert Elz at ftp://munnari.oz.au/pub/.
  
  Obtained from:	ftp://munnari.oz.au/pub, ftp://elsie.nci.nih.gov/pub/

Modified:
  stable/8/share/zoneinfo/africa
  stable/8/share/zoneinfo/asia
  stable/8/share/zoneinfo/australasia
  stable/8/share/zoneinfo/europe
  stable/8/share/zoneinfo/northamerica
  stable/8/share/zoneinfo/southamerica
  stable/8/share/zoneinfo/zone.tab
Directory Properties:
  stable/8/share/zoneinfo/   (props changed)

Modified: stable/8/share/zoneinfo/africa
==============================================================================
--- stable/8/share/zoneinfo/africa	Wed Oct 12 09:13:16 2011	(r226289)
+++ stable/8/share/zoneinfo/africa	Wed Oct 12 09:16:45 2011	(r226290)
@@ -1,5 +1,5 @@
 # 
-# @(#)africa	8.31
+# @(#)africa	8.33
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -58,7 +58,7 @@
 # I invented the following abbreviations; corrections are welcome!
 #	 2:00	WAST	West Africa Summer Time
 #	 2:30	BEAT	British East Africa Time (no longer used)
-#	 2:44:45 BEAUT	British East Africa Unified Time (no longer used)
+#	 2:45	BEAUT	British East Africa Unified Time (no longer used)
 #	 3:00	CAST	Central Africa Summer Time (no longer used)
 #	 3:00	SAST	South Africa Summer Time (no longer used)
 #	 3:00	EAT	East Africa Time
@@ -396,7 +396,7 @@ Zone	Africa/Bissau	-1:02:20 -	LMT	1911 M
 Zone	Africa/Nairobi	2:27:16	-	LMT	1928 Jul
 			3:00	-	EAT	1930
 			2:30	-	BEAT	1940
-			2:44:45	-	BEAUT	1960
+			2:45	-	BEAUT	1960
 			3:00	-	EAT
 
 # Lesotho
@@ -957,6 +957,11 @@ Zone	Africa/Khartoum	2:10:08 -	LMT	1931
 			2:00	Sudan	CA%sT	2000 Jan 15 12:00
 			3:00	-	EAT
 
+# South Sudan
+Zone	Africa/Juba	2:06:24 -	LMT	1931
+			2:00	Sudan	CA%sT	2000 Jan 15 12:00
+			3:00	-	EAT
+
 # Swaziland
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Africa/Mbabane	2:04:24 -	LMT	1903 Mar
@@ -966,7 +971,7 @@ Zone	Africa/Mbabane	2:04:24 -	LMT	1903 M
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone Africa/Dar_es_Salaam 2:37:08 -	LMT	1931
 			3:00	-	EAT	1948
-			2:44:45	-	BEAUT	1961
+			2:45	-	BEAUT	1961
 			3:00	-	EAT
 
 # Togo
@@ -1092,7 +1097,7 @@ Zone	Africa/Tunis	0:40:44 -	LMT	1881 May
 Zone	Africa/Kampala	2:09:40 -	LMT	1928 Jul
 			3:00	-	EAT	1930
 			2:30	-	BEAT	1948
-			2:44:45	-	BEAUT	1957
+			2:45	-	BEAUT	1957
 			3:00	-	EAT
 
 # Zambia

Modified: stable/8/share/zoneinfo/asia
==============================================================================
--- stable/8/share/zoneinfo/asia	Wed Oct 12 09:13:16 2011	(r226289)
+++ stable/8/share/zoneinfo/asia	Wed Oct 12 09:16:45 2011	(r226290)
@@ -1,4 +1,4 @@
-# @(#)asia	8.65
+# @(#)asia	8.68
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -2194,7 +2194,47 @@ Zone	Asia/Karachi	4:28:12 -	LMT	1907
 # http://www.timeanddate.com/news/time/westbank-gaza-end-dst-2010.html
 # 
 
+# From Steffen Thorsen (2011-08-26):
+# Gaza and the West Bank did go back to standard time in the beginning of
+# August, and will now enter daylight saving time again on 2011-08-30
+# 00:00 (so two periods of DST in 2011). The pause was because of
+# Ramadan.
+#
+# 
+# http://www.maannews.net/eng/ViewDetails.aspx?ID=416217
+# 
+# Additional info:
+# 
+# http://www.timeanddate.com/news/time/palestine-dst-2011.html
+# 
+
+# From Alexander Krivenyshev (2011-08-27):
+# According to the article in The Jerusalem Post:
+# "...Earlier this month, the Palestinian government in the West Bank decided to
+# move to standard time for 30 days, during Ramadan. The Palestinians in the
+# Gaza Strip accepted the change and also moved their clocks one hour back.
+# The Hamas government said on Saturday that it won't observe summertime after
+# the Muslim feast of Id al-Fitr, which begins on Tuesday..."
+# ...
+# 
+# http://www.jpost.com/MiddleEast/Article.aspx?id=235650
+# 
+# or
+# 
+# http://www.worldtimezone.com/dst_news/dst_news_gazastrip05.html
+# 
 # The rules for Egypt are stolen from the `africa' file.
+
+# From Steffen Thorsen (2011-09-30):
+# West Bank did end Daylight Saving Time this morning/midnight (2011-09-30 
+# 00:00).
+# So West Bank and Gaza now have the same time again.
+#
+# Many sources, including:
+# 
+# http://www.maannews.net/eng/ViewDetails.aspx?ID=424808
+# 
+
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule EgyptAsia	1957	only	-	May	10	0:00	1:00	S
 Rule EgyptAsia	1957	1958	-	Oct	 1	0:00	0	-
@@ -2210,19 +2250,37 @@ Rule Palestine	2005	only	-	Oct	 4	2:00	0
 Rule Palestine	2006	2008	-	Apr	 1	0:00	1:00	S
 Rule Palestine	2006	only	-	Sep	22	0:00	0	-
 Rule Palestine	2007	only	-	Sep	Thu>=8	2:00	0	-
-Rule Palestine	2008	only	-	Aug	lastFri	2:00	0	-
+Rule Palestine	2008	only	-	Aug	lastFri	0:00	0	-
 Rule Palestine	2009	only	-	Mar	lastFri	0:00	1:00	S
-Rule Palestine	2010	max	-	Mar	lastSat	0:01	1:00	S
-Rule Palestine	2009	max	-	Sep	Fri>=1	2:00	0	-
+Rule Palestine	2009	only	-	Sep	Fri>=1	2:00	0	-
+Rule Palestine	2010	only	-	Mar	lastSat	0:01	1:00	S
 Rule Palestine	2010	only	-	Aug	11	0:00	0	-
 
+# From Arthur David Olson (2011-09-20):
+# 2011 transitions per http://www.timeanddate.com as of 2011-09-20.
+
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Gaza	2:17:52	-	LMT	1900 Oct
 			2:00	Zion	EET	1948 May 15
 			2:00 EgyptAsia	EE%sT	1967 Jun  5
 			2:00	Zion	I%sT	1996
 			2:00	Jordan	EE%sT	1999
-			2:00 Palestine	EE%sT
+			2:00 Palestine	EE%sT	2011 Apr  2 12:01
+			2:00	1:00	EEST	2011 Aug  1
+			2:00	-	EET
+
+Zone	Asia/Hebron	2:20:23	-	LMT	1900 Oct
+			2:00	Zion	EET	1948 May 15
+			2:00 EgyptAsia	EE%sT	1967 Jun  5
+			2:00	Zion	I%sT	1996
+			2:00	Jordan	EE%sT	1999
+			2:00 Palestine	EE%sT	2008 Aug
+			2:00 	1:00	EEST	2008 Sep
+			2:00 Palestine	EE%sT	2011 Apr  1 12:01
+			2:00	1:00	EEST	2011 Aug  1
+			2:00	-	EET	2011 Aug 30
+			2:00	1:00	EEST	2011 Sep 30 3:00
+			2:00	-	EET
 
 # Paracel Is
 # no information

Modified: stable/8/share/zoneinfo/australasia
==============================================================================
--- stable/8/share/zoneinfo/australasia	Wed Oct 12 09:13:16 2011	(r226289)
+++ stable/8/share/zoneinfo/australasia	Wed Oct 12 09:16:45 2011	(r226290)
@@ -1,5 +1,5 @@
 # 
-# @(#)australasia	8.23
+# @(#)australasia	8.27
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -296,6 +296,18 @@ Zone	Indian/Cocos	6:27:40	-	LMT	1900
 # http://www.worldtimezone.com/dst_news/dst_news_fiji04.html
 # 
 
+# From Steffen Thorsen (2011-10-03):
+# Now the dates have been confirmed, and at least our start date 
+# assumption was correct (end date was one week wrong).
+#
+# 
+# www.fiji.gov.fj/index.php?option=com_content&view=article&id=4966:daylight-saving-starts-in-fiji&catid=71:press-releases&Itemid=155
+# 
+# which says
+# Members of the public are reminded to change their time to one hour in 
+# advance at 2am to 3am on October 23, 2011 and one hour back at 3am to 
+# 2am on February 26 next year.
+
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Fiji	1998	1999	-	Nov	Sun>=1	2:00	1:00	S
 Rule	Fiji	1999	2000	-	Feb	lastSun	3:00	0	-
@@ -303,6 +315,8 @@ Rule	Fiji	2009	only	-	Nov	29	2:00	1:00	S
 Rule	Fiji	2010	only	-	Mar	lastSun	3:00	0	-
 Rule	Fiji	2010	only	-	Oct	24	2:00	1:00	S
 Rule	Fiji	2011	only	-	Mar	Sun>=1	3:00	0	-
+Rule	Fiji	2011	only	-	Oct	23	2:00	1:00	S
+Rule	Fiji	2012	only	-	Feb	26	3:00	0	-
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Pacific/Fiji	11:53:40 -	LMT	1915 Oct 26	# Suva
 			12:00	Fiji	FJ%sT	# Fiji Time
@@ -499,7 +513,7 @@ Zone Pacific/Pago_Pago	 12:37:12 -	LMT	1
 # http://www.parliament.gov.ws/documents/acts/Daylight%20Saving%20Act%20%202009%20%28English%29%20-%20Final%207-7-091.pdf
 # 
 
-# From Raymond Hughes (2010-10-07):
+# From Laupue Raymond Hughes (2010-10-07):
 # Please see
 # 
 # http://www.mcil.gov.ws
@@ -509,7 +523,7 @@ Zone Pacific/Pago_Pago	 12:37:12 -	LMT	1
 # to 01:00am and First Sunday April 2011 (03/04/11) - adjust clocks
 # backwards from 1:00am to 12:00am"
 
-# From Raymond Hughes (2011-03-07)
+# From Laupue Raymond Hughes (2011-03-07):
 # I believe this will be posted shortly on the website
 # 
 # www.mcil.gov.ws
@@ -529,12 +543,74 @@ Zone Pacific/Pago_Pago	 12:37:12 -	LMT	1
 # Margaret Fruean ACTING CHIEF EXECUTIVE OFFICER MINISTRY OF COMMERCE,
 # INDUSTRY AND LABOUR 28th February 2011
 
+# From David Zuelke (2011-05-09):
+# Subject: Samoa to move timezone from east to west of international date line
+# 
+# 
+# http://www.morningstar.co.uk/uk/markets/newsfeeditem.aspx?id=138501958347963
+# 
+
+# From Mark Sim-Smith (2011-08-17):
+# I have been in contact with Leilani Tuala Warren from the Samoa Law
+# Reform Commission, and she has sent me a copy of the Bill that she
+# confirmed has been passed...Most of the sections are about maps rather
+# than the time zone change, but I'll paste the relevant bits below. But
+# the essence is that at midnight 29 Dec (UTC-11 I suppose), Samoa
+# changes from UTC-11 to UTC+13:
+#
+# International Date Line Bill 2011
+#
+# AN ACT to provide for the change to standard time in Samoa and to make
+# consequential amendments to the position of the International Date
+# Line, and for related purposes.
+#
+# BE IT ENACTED by the Legislative Assembly of Samoa in Parliament
+# assembled as follows:
+#
+# 1. Short title and commencement-(1) This Act may be cited as the
+# International Date Line Act 2011. (2) Except for section 5(3) this Act
+# commences at 12 o'clock midnight, on Thursday 29th December 2011. (3)
+# Section 5(3) commences on the date of assent by the Head of State.
+#
+# [snip]
+#
+# 3. Interpretation - [snip] "Samoa standard time" in this Act and any
+# other statute of Samoa which refers to 'Samoa standard time' means the
+# time 13 hours in advance of Co-ordinated Universal Time.
+#
+# 4. Samoa standard time - (1) Upon the commencement of this Act, Samoa
+# standard time shall be set at 13 hours in advance of Co-ordinated
+# Universal Time for the whole of Samoa. (2) All references to Samoa's
+# time zone and to Samoa standard time in Samoa in all legislation and
+# instruments after the commencement of this Act shall be references to
+# Samoa standard time as provided for in this Act. (3) Nothing in this
+# Act affects the provisions of the Daylight Saving Act 2009, except that
+# it defines Samoa standard time....
+
+# From Laupue Raymond Hughes (2011-09-02):
+# 
+# http://www.mcil.gov.ws/mcil_publications.html
+# 
+#
+# here is the official website publication for Samoa DST and dateline change
+#
+# DST
+# Year	End	Time	Start	Time
+# 2011	- - -	- - -	24 September	3:00am to 4:00am
+# 2012	01 April	4:00am to 3:00am	- - -	- - -
+#
+# Dateline Change skip Friday 30th Dec 2011
+# Thursday 29th December 2011	23:59:59 Hours
+# Saturday 31st December 2011	00:00:00 Hours
 Zone Pacific/Apia	 12:33:04 -	LMT	1879 Jul  5
 			-11:26:56 -	LMT	1911
 			-11:30	-	SAMT	1950		# Samoa Time
 			-11:00	-	WST	2010 Sep 26
 			-11:00	1:00	WSDT	2011 Apr 2 4:00
-			-11:00	-	WST
+			-11:00	-	WST	2011 Sep 24 3:00
+			-11:00	1:00	WSDT	2011 Dec 30
+			 13:00	1:00	WSDT	2012 Apr 1 4:00
+			 13:00	-	WST
 
 # Solomon Is
 # excludes Bougainville, for which see Papua New Guinea
@@ -1206,7 +1282,7 @@ Zone	Pacific/Wallis	12:15:20 -	LMT	1901
 # Lord Howe Island Board (controlling authority for the Island) is
 # seeking the community's views on various options for summer time
 # arrangements on the Island, e.g. advance clocks by 1 full hour
-# instead of only 30 minutes.  Dependant on the wishes of residents
+# instead of only 30 minutes.  [Dependent] on the wishes of residents
 # the Board may approach the NSW government to change the existing
 # arrangements.  The starting date for summer time on the Island will
 # however always coincide with the rest of NSW.
@@ -1332,7 +1408,7 @@ Zone	Pacific/Wallis	12:15:20 -	LMT	1901
 
 # From Paul Eggert (1996-01-22):
 # Today's _Wall Street Journal_ (page 1) reports that Kiribati
-# ``declared it the same day throught the country as of Jan. 1, 1995''
+# ``declared it the same day [throughout] the country as of Jan. 1, 1995''
 # as part of the competition to be first into the 21st century.
 
 

Modified: stable/8/share/zoneinfo/europe
==============================================================================
--- stable/8/share/zoneinfo/europe	Wed Oct 12 09:13:16 2011	(r226289)
+++ stable/8/share/zoneinfo/europe	Wed Oct 12 09:16:45 2011	(r226290)
@@ -1,5 +1,5 @@
 # 
-# @(#)europe	8.33
+# @(#)europe	8.38
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -561,9 +561,9 @@ Rule	Russia	1985	1991	-	Mar	lastSun	 2:0
 #
 Rule	Russia	1992	only	-	Mar	lastSat	 23:00	1:00	S
 Rule	Russia	1992	only	-	Sep	lastSat	 23:00	0	-
-Rule	Russia	1993	max	-	Mar	lastSun	 2:00s	1:00	S
+Rule	Russia	1993	2010	-	Mar	lastSun	 2:00s	1:00	S
 Rule	Russia	1993	1995	-	Sep	lastSun	 2:00s	0	-
-Rule	Russia	1996	max	-	Oct	lastSun	 2:00s	0	-
+Rule	Russia	1996	2010	-	Oct	lastSun	 2:00s	0	-
 
 # From Alexander Krivenyshev (2011-06-14):
 # According to Kremlin press service, Russian President Dmitry Medvedev
@@ -583,7 +583,6 @@ Rule	Russia	1996	max	-	Oct	lastSun	 2:00
 # From Arthur David Olson (2011-06-15):
 # Take "abolishing daylight saving time" to mean that time is now considered
 # to be standard.
-# At least for now, keep the "old" Russia rules for the benefit of Belarus.
 
 # These are for backward compatibility with older versions.
 
@@ -689,6 +688,23 @@ Zone	Europe/Vienna	1:05:20 -	LMT	1893 Ap
 			1:00	EU	CE%sT
 
 # Belarus
+# From Yauhen Kharuzhy (2011-09-16):
+# By latest Belarus government act Europe/Minsk timezone was changed to
+# GMT+3 without DST (was GMT+2 with DST).
+#
+# Sources (Russian language):
+# 1.
+# 
+# http://www.belta.by/ru/all_news/society/V-Belarusi-otmenjaetsja-perexod-na-sezonnoe-vremja_i_572952.html
+# 
+# 2.
+# 
+# http://naviny.by/rubrics/society/2011/09/16/ic_articles_116_175144/
+# 
+# 3.
+# 
+# http://news.tut.by/society/250578.html
+# 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Europe/Minsk	1:50:16 -	LMT	1880
 			1:50	-	MMT	1924 May 2 # Minsk Mean Time
@@ -700,7 +716,8 @@ Zone	Europe/Minsk	1:50:16 -	LMT	1880
 			2:00	1:00	EEST	1991 Sep 29 2:00s
 			2:00	-	EET	1992 Mar 29 0:00s
 			2:00	1:00	EEST	1992 Sep 27 0:00s
-			2:00	Russia	EE%sT
+			2:00	Russia	EE%sT	2011 Mar 27 2:00s
+			3:00	-	FET # Further-eastern European Time
 
 # Belgium
 #
@@ -2034,7 +2051,7 @@ Zone Europe/Kaliningrad	 1:22:00 -	LMT	1
 			 2:00	Poland	CE%sT	1946
 			 3:00	Russia	MSK/MSD	1991 Mar 31 2:00s
 			 2:00	Russia	EE%sT	2011 Mar 27 2:00s
-			 3:00	-	EET
+			 3:00	-	FET # Further-eastern European Time
 #
 # From Oscar van Vlijmen (2001-08-25): [This region consists of]
 # Respublika Adygeya, Arkhangel'skaya oblast',
@@ -2189,7 +2206,7 @@ Zone Asia/Irkutsk	 6:57:20 -	LMT	1880
 # [parts of] Respublika Sakha (Yakutiya), Chitinskaya oblast'.
 
 # From Oscar van Vlijmen (2009-11-29):
-# ...some regions of RUssia were merged with others since 2005...
+# ...some regions of [Russia] were merged with others since 2005...
 # Some names were changed, no big deal, except for one instance: a new name.
 # YAK/YAKST: UTC+9 Zabajkal'skij kraj.
 
@@ -2613,6 +2630,28 @@ Link	Europe/Istanbul	Asia/Istanbul	# Ist
 # of March at 3am the time is changing to 4am and each last Sunday of
 # October the time at 4am is changing to 3am"
 
+# From Alexander Krivenyshev (2011-09-20):
+# On September 20, 2011 the deputies of the Verkhovna Rada agreed to
+# abolish the transfer clock to winter time.
+#
+# Bill number 8330 of MP from the Party of Regions Oleg Nadoshi got
+# approval from 266 deputies.
+#
+# Ukraine abolishes transter back to the winter time (in Russian)
+# 
+# http://news.mail.ru/politics/6861560/
+# 
+#
+# The Ukrainians will no longer change the clock (in Russian)
+# 
+# http://www.segodnya.ua/news/14290482.html
+# 
+#
+# Deputies cancelled the winter time (in Russian)
+# 
+# http://www.pravda.com.ua/rus/news/2011/09/20/6600616/
+# 
+
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 # Most of Ukraine since 1970 has been like Kiev.
 # "Kyiv" is the transliteration of the Ukrainian name, but
@@ -2626,7 +2665,8 @@ Zone Europe/Kiev	2:02:04 -	LMT	1880
 			3:00	-	MSK	1990 Jul  1 2:00
 			2:00	-	EET	1992
 			2:00	E-Eur	EE%sT	1995
-			2:00	EU	EE%sT
+			2:00	EU	EE%sT	2011 Mar lastSun 1:00u
+			3:00	-	FET # Further-eastern European Time
 # Ruthenia used CET 1990/1991.
 # "Uzhhorod" is the transliteration of the Ukrainian name, but
 # "Uzhgorod" is more common in English.
@@ -2640,7 +2680,8 @@ Zone Europe/Uzhgorod	1:29:12 -	LMT	1890 
 			1:00	-	CET	1991 Mar 31 3:00
 			2:00	-	EET	1992
 			2:00	E-Eur	EE%sT	1995
-			2:00	EU	EE%sT
+			2:00	EU	EE%sT	2011 Mar lastSun 1:00u
+			3:00	-	FET # Further-eastern European Time
 # Zaporozh'ye and eastern Lugansk oblasts observed DST 1990/1991.
 # "Zaporizhia" is the transliteration of the Ukrainian name, but
 # "Zaporozh'ye" is more common in English.  Use the common English
@@ -2653,7 +2694,8 @@ Zone Europe/Zaporozhye	2:20:40 -	LMT	188
 			1:00	C-Eur	CE%sT	1943 Oct 25
 			3:00	Russia	MSK/MSD	1991 Mar 31 2:00
 			2:00	E-Eur	EE%sT	1995
-			2:00	EU	EE%sT
+			2:00	EU	EE%sT	2011 Mar lastSun 1:00u
+			3:00	-	FET # Further-eastern European Time
 # Central Crimea used Moscow time 1994/1997.
 Zone Europe/Simferopol	2:16:24 -	LMT	1880
 			2:16	-	SMT	1924 May  2 # Simferopol Mean T
@@ -2678,7 +2720,8 @@ Zone Europe/Simferopol	2:16:24 -	LMT	188
 # Assume it happened in March by not changing the clocks.
 			3:00	Russia	MSK/MSD	1997
 			3:00	-	MSK	1997 Mar lastSun 1:00u
-			2:00	EU	EE%sT
+			2:00	EU	EE%sT	2011 Mar lastSun 1:00u
+			3:00	-	FET # Further-eastern European Time
 
 ###############################################################################
 

Modified: stable/8/share/zoneinfo/northamerica
==============================================================================
--- stable/8/share/zoneinfo/northamerica	Wed Oct 12 09:13:16 2011	(r226289)
+++ stable/8/share/zoneinfo/northamerica	Wed Oct 12 09:16:45 2011	(r226290)
@@ -1,5 +1,5 @@
 # 
-# @(#)northamerica	8.42
+# @(#)northamerica	8.49
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -468,6 +468,10 @@ Zone America/Los_Angeles -7:52:58 -	LMT	
 # own time. I asked about daylight saving; they said it wasn't used. I
 # did not inquire about practices in the past.
 
+# From Arthur David Olson (2011-08-17):
+# For lack of better information, assume that Metlakatla's
+# abandonment of use of daylight saving resulted from the 1983 vote.
+
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone America/Juneau	 15:02:19 -	LMT	1867 Oct 18
 			 -8:57:41 -	LMT	1900 Aug 20 12:00
@@ -479,7 +483,7 @@ Zone America/Juneau	 15:02:19 -	LMT	1867
 			 -8:00	US	P%sT	1983 Oct 30 2:00
 			 -9:00	US	Y%sT	1983 Nov 30
 			 -9:00	US	AK%sT
-Zone America/Sitka	 -14:58:47 -	LMT	1867 Oct 18
+Zone America/Sitka	 14:58:47 -	LMT	1867 Oct 18
 			 -9:01:13 -	LMT	1900 Aug 20 12:00
 			 -8:00	-	PST	1942
 			 -8:00	US	P%sT	1946
@@ -493,7 +497,7 @@ Zone America/Metlakatla	 15:13:42 -	LMT	
 			 -8:00	US	P%sT	1946
 			 -8:00	-	PST	1969
 			 -8:00	US	P%sT	1983 Oct 30 2:00
-			 -8:00	US	MeST
+			 -8:00	-	MeST
 Zone America/Yakutat	 14:41:05 -	LMT	1867 Oct 18
 			 -9:18:55 -	LMT	1900 Aug 20 12:00
 			 -9:00	-	YST	1942
@@ -593,8 +597,8 @@ Zone Pacific/Honolulu	-10:31:26 -	LMT	18
 			-10:30	-	HST	1933 Apr 30 2:00 #Laws 1933
 			-10:30	1:00	HDT	1933 May 21 12:00 #Laws 1933+12
 			-10:30	-	HST	1942 Feb 09 2:00 #Schmitt&Cox+2
-			-10:30	1:00	HDT	1945 Sep 30 2:00 #Schmitt&Fox+2
-			-10:30	US	H%sT	1947 Jun  8 2:00 #Schmitt&Fox+2
+			-10:30	1:00	HDT	1945 Sep 30 2:00 #Schmitt&Cox+2
+			-10:30	-	HST	1947 Jun  8 2:00 #Schmitt&Cox+2
 			-10:00	-	HST
 
 # Now we turn to US areas that have diverged from the consensus since 1970.
@@ -1163,12 +1167,29 @@ Rule	StJohns	1960	1986	-	Oct	lastSun	2:0
 # From Paul Eggert (2000-10-02):
 # INMS (2000-09-12) says that, since 1988 at least, Newfoundland switches
 # at 00:01 local time.  For now, assume it started in 1987.
+
+# From Michael Pelley (2011-09-12):
+# We received today, Monday, September 12, 2011, notification that the
+# changes to the Newfoundland Standard Time Act have been proclaimed.
+# The change in the Act stipulates that the change from Daylight Savings
+# Time to Standard Time and from Standard Time to Daylight Savings Time
+# now occurs at 2:00AM.
+# ...
+# 
+# http://www.assembly.nl.ca/legislation/sr/annualstatutes/2011/1106.chp.htm
+# 
+# ...
+# MICHAEL PELLEY  |  Manager of Enterprise Architecture - Solution Delivery
+# Office of the Chief Information Officer
+# Executive Council
+# Government of Newfoundland & Labrador
+
 Rule	StJohns	1987	only	-	Apr	Sun>=1	0:01	1:00	D
 Rule	StJohns	1987	2006	-	Oct	lastSun	0:01	0	S
 Rule	StJohns	1988	only	-	Apr	Sun>=1	0:01	2:00	DD
 Rule	StJohns	1989	2006	-	Apr	Sun>=1	0:01	1:00	D
-Rule	StJohns	2007	max	-	Mar	Sun>=8	0:01	1:00	D
-Rule	StJohns	2007	max	-	Nov	Sun>=1	0:01	0	S
+Rule	StJohns	2007	2011	-	Mar	Sun>=8	0:01	1:00	D
+Rule	StJohns	2007	2010	-	Nov	Sun>=1	0:01	0	S
 #
 # St John's has an apostrophe, but Posix file names can't have apostrophes.
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
@@ -1178,7 +1199,8 @@ Zone America/St_Johns	-3:30:52 -	LMT	188
 			-3:30:52 StJohns N%sT	1935 Mar 30
 			-3:30	StJohns	N%sT	1942 May 11
 			-3:30	Canada	N%sT	1946
-			-3:30	StJohns	N%sT
+			-3:30	StJohns	N%sT	2011 Nov
+			-3:30	Canada	N%sT
 
 # most of east Labrador
 
@@ -1192,7 +1214,8 @@ Zone America/Goose_Bay	-4:01:40 -	LMT	18
 			-3:30	StJohns	N%sT	1942 May 11
 			-3:30	Canada	N%sT	1946
 			-3:30	StJohns	N%sT	1966 Mar 15 2:00
-			-4:00	StJohns	A%sT
+			-4:00	StJohns	A%sT	2011 Nov
+			-4:00	Canada	A%sT
 
 
 # west Labrador, Nova Scotia, Prince Edward I
@@ -1924,20 +1947,69 @@ Zone America/Dawson_Creek -8:00:56 -	LMT
 # daylight saving....
 # http://www.nnsl.com/frames/newspapers/2006-11/nov13_06none.html
 
-# From Chris Walton (2007-03-14):
-# Today I phoned the "hamlet office" to find out what Resolute was doing with
-# its clocks.
-#
-# The individual that answered the phone confirmed that the clocks did not
-# move at the end of daylight saving on October 29/2006.  He also told me that
-# the clocks did not move this past weekend (March 11/2007)....
-
-# From Chris Walton (2008-11-13):
-# ...the residents of Resolute believe that they are changing "time zones"
-# twice a year.  In winter months, local time is qualified with "Eastern
-# Time" which is really "Eastern Standard Time (UTC-5)".  In summer
-# months, local time is qualified with "Central Time" which is really
-# "Central Daylight Time (UTC-5)"...
+# From Chris Walton (2011-03-21):
+# Back in 2007 I initiated the creation of a new "zone file" for Resolute
+# Bay. Resolute Bay is a small community located about 900km north of
+# the Arctic Circle. The zone file was required because Resolute Bay had
+# decided to use UTC-5 instead of UTC-6 for the winter of 2006-2007.
+#
+# According to new information which I received last week, Resolute Bay
+# went back to using UTC-6 in the winter of 2007-2008...
+#
+# On March 11/2007 most of Canada went onto daylight saving. On March
+# 14/2007 I phoned the Resolute Bay hamlet office to do a "time check." I
+# talked to somebody that was both knowledgeable and helpful. I was able
+# to confirm that Resolute Bay was still operating on UTC-5. It was
+# explained to me that Resolute Bay had been on the Eastern Time zone
+# (EST) in the winter, and was now back on the Central Time zone (CDT).
+# i.e. the time zone had changed twice in the last year but the clocks
+# had not moved. The residents had to know which time zone they were in
+# so they could follow the correct TV schedule...
+#
+# On Nov 02/2008 most of Canada went onto standard time. On Nov 03/2008 I
+# phoned the Resolute Bay hamlet office...[D]ue to the challenging nature
+# of the phone call, I decided to seek out an alternate source of
+# information. I found an e-mail address for somebody by the name of
+# Stephanie Adams whose job was listed as "Inns North Support Officer for
+# Arctic Co-operatives." I was under the impression that Stephanie lived
+# and worked in Resolute Bay...
+#
+# On March 14/2011 I phoned the hamlet office again. I was told that
+# Resolute Bay had been using Central Standard Time over the winter of
+# 2010-2011 and that the clocks had therefore been moved one hour ahead
+# on March 13/2011. The person I talked to was aware that Resolute Bay
+# had previously experimented with Eastern Standard Time but he could not
+# tell me when the practice had stopped.
+#
+# On March 17/2011 I searched the Web to find an e-mail address of
+# somebody that might be able to tell me exactly when Resolute Bay went
+# off Eastern Standard Time. I stumbled on the name "Aziz Kheraj." Aziz
+# used to be the mayor of Resolute Bay and he apparently owns half the
+# businesses including "South Camp Inn." This website has some info on
+# Aziz:
+# 
+# http://www.uphere.ca/node/493
+# 
+#
+# I sent Aziz an e-mail asking when Resolute Bay had stopped using
+# Eastern Standard Time.
+#
+# Aziz responded quickly with this: "hi, The time was not changed for the
+# 1 year only, the following year, the community went back to the old way
+# of "spring ahead-fall behind" currently we are zulu plus 5 hrs and in
+# the winter Zulu plus 6 hrs"
+#
+# This of course conflicted with everything I had ascertained in November 2008.
+#
+# I sent Aziz a copy of my 2008 e-mail exchange with Stephanie. Aziz
+# responded with this: "Hi, Stephanie lives in Winnipeg. I live here, You
+# may want to check with the weather office in Resolute Bay or do a
+# search on the weather through Env. Canada. web site"
+#
+# If I had realized the Stephanie did not live in Resolute Bay I would
+# never have contacted her.  I now believe that all the information I
+# obtained in November 2008 should be ignored...
+# I apologize for reporting incorrect information in 2008.
 
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	NT_YK	1918	only	-	Apr	14	2:00	1:00	D
@@ -1965,14 +2037,12 @@ Zone America/Iqaluit	0	-	zzz	1942 Aug # 
 			-6:00	Canada	C%sT	2000 Oct 29 2:00
 			-5:00	Canada	E%sT
 # aka Qausuittuq
-# Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
-Rule	Resolute 2006	max	-	Nov	Sun>=1	2:00	0	ES
-Rule	Resolute 2007	max	-	Mar	Sun>=8	2:00	0	CD
 Zone America/Resolute	0	-	zzz	1947 Aug 31 # Resolute founded
 			-6:00	NT_YK	C%sT	2000 Oct 29 2:00
 			-5:00	-	EST	2001 Apr  1 3:00
 			-6:00	Canada	C%sT	2006 Oct 29 2:00
-			-5:00	Resolute	%sT
+			-5:00	-	EST	2007 Mar 11 3:00
+			-6:00	Canada	C%sT
 # aka Kangiqiniq
 Zone America/Rankin_Inlet 0	-	zzz	1957 # Rankin Inlet founded
 			-6:00	NT_YK	C%sT	2000 Oct 29 2:00

Modified: stable/8/share/zoneinfo/southamerica
==============================================================================
--- stable/8/share/zoneinfo/southamerica	Wed Oct 12 09:13:16 2011	(r226289)
+++ stable/8/share/zoneinfo/southamerica	Wed Oct 12 09:16:45 2011	(r226290)
@@ -797,6 +797,26 @@ Zone	America/La_Paz	-4:32:36 -	LMT	1890
 # 
 # http://www.timeanddate.com/news/time/brazil-dst-2008-2009.html
 # 
+#
+# From Alexander Krivenyshev (2011-10-04):
+# State Bahia will return to Daylight savings time this year after 8 years off.
+# The announcement was made by Governor Jaques Wagner in an interview to a 
+# television station in Salvador. 
+
+# In Portuguese:
+# 
+# http://g1.globo.com/bahia/noticia/2011/10/governador-jaques-wagner-confirma-horario-de-verao-na-bahia.html
+#  and
+# 
+# http://noticias.terra.com.br/brasil/noticias/0,,OI5390887-EI8139,00-Bahia+volta+a+ter+horario+de+verao+apos+oito+anos.html
+# 
+
+# From Guilherme Bernardes Rodrigues (2011-10-07):
+# There is news in the media, however there is still no decree about it.
+# I just send a e-mail to Zulmira Brandão at
+# http://pcdsh01.on.br/ the
+# oficial agency about time in Brazil, and she confirmed that the old rule is
+# still in force.
 
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 # Decree 20,466 (1931-10-01)
@@ -1035,6 +1055,9 @@ Zone America/Maceio	-2:22:52 -	LMT	1914
 Zone America/Bahia	-2:34:04 -	LMT	1914
 			-3:00	Brazil	BR%sT	2003 Sep 24
 			-3:00	-	BRT
+# as noted above, not yet in operation.
+#			-3:00	-	BRT	2011 Oct 16
+#			-3:00	Brazil	BR%sT
 #
 # Goias (GO), Distrito Federal (DF), Minas Gerais (MG),
 # Espirito Santo (ES), Rio de Janeiro (RJ), Sao Paulo (SP), Parana (PR),

Modified: stable/8/share/zoneinfo/zone.tab
==============================================================================
--- stable/8/share/zoneinfo/zone.tab	Wed Oct 12 09:13:16 2011	(r226289)
+++ stable/8/share/zoneinfo/zone.tab	Wed Oct 12 09:16:45 2011	(r226290)
@@ -1,5 +1,5 @@
 # 
-# @(#)zone.tab	8.45
+# @(#)zone.tab	8.49
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 #
@@ -120,7 +120,7 @@ CA	+4901-08816	America/Nipigon	Eastern T
 CA	+4823-08915	America/Thunder_Bay	Eastern Time - Thunder Bay, Ontario
 CA	+6344-06828	America/Iqaluit	Eastern Time - east Nunavut - most locations
 CA	+6608-06544	America/Pangnirtung	Eastern Time - Pangnirtung, Nunavut
-CA	+744144-0944945	America/Resolute	Eastern Standard Time - Resolute, Nunavut
+CA	+744144-0944945	America/Resolute	Central Standard Time - Resolute, Nunavut
 CA	+484531-0913718	America/Atikokan	Eastern Standard Time - Atikokan, Ontario and Southampton I, Nunavut
 CA	+624900-0920459	America/Rankin_Inlet	Central Time - central Nunavut
 CA	+4953-09709	America/Winnipeg	Central Time - Manitoba & west Ontario
@@ -319,7 +319,8 @@ PL	+5215+02100	Europe/Warsaw
 PM	+4703-05620	America/Miquelon
 PN	-2504-13005	Pacific/Pitcairn
 PR	+182806-0660622	America/Puerto_Rico
-PS	+3130+03428	Asia/Gaza
+PS	+3130+03428	Asia/Gaza	Gaza Strip
+PS	+313200+0350542	Asia/Hebron	West Bank
 PT	+3843-00908	Europe/Lisbon	mainland
 PT	+3238-01654	Atlantic/Madeira	Madeira Islands
 PT	+3744-02540	Atlantic/Azores	Azores
@@ -361,6 +362,7 @@ SM	+4355+01228	Europe/San_Marino
 SN	+1440-01726	Africa/Dakar
 SO	+0204+04522	Africa/Mogadishu
 SR	+0550-05510	America/Paramaribo
+SS	+0451+03136	Africa/Juba
 ST	+0020+00644	Africa/Sao_Tome
 SV	+1342-08912	America/El_Salvador
 SX	+180305-0630250	America/Lower_Princes

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 12 09:17:54 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 2DB8E1065670;
	Wed, 12 Oct 2011 09:17:54 +0000 (UTC)
	(envelope-from edwin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 1B23C8FC16;
	Wed, 12 Oct 2011 09:17:54 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9C9HsFT056434;
	Wed, 12 Oct 2011 09:17:54 GMT (envelope-from edwin@svn.freebsd.org)
Received: (from edwin@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9C9HrLp056424;
	Wed, 12 Oct 2011 09:17:53 GMT (envelope-from edwin@svn.freebsd.org)
Message-Id: <201110120917.p9C9HrLp056424@svn.freebsd.org>
From: Edwin Groothuis 
Date: Wed, 12 Oct 2011 09:17:53 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226292 - stable/7/share/zoneinfo
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 12 Oct 2011 09:17:54 -0000

Author: edwin
Date: Wed Oct 12 09:17:53 2011
New Revision: 226292
URL: http://svn.freebsd.org/changeset/base/226292

Log:
  MFC of tzdata2011l, 226289
  
  Changes in 2011i:
  
      Africa
      - Added South Sudan: Africa/Juba
  
      Australasia:
      - Samoa will go forward 24 hours at 30 December 2011 to better match
        the day of the week with its neighbours.
  
      Europe:
      - Europe/Kaliningrad will have the timezone KALT.
  
      North America:
      - Updates to Metlakatla historical data
      - Newfoundland, Labrador and Resolute will do something which I
        can't figure out.
  
      iso3166tab;
      - Add SS for South Sudan.
  
  Changes in 2011j:
  
      - Samoa will go from 29 December 23:59:59 to 31 December 00:00:00.
      - Samoa DST will end on 1 April 2012
  
  Changes in 2011k:
  
      - Gaza / West Bank goes back to standard time on 02 August 2011.
      - West Bank went bac kto DST on 30 August 2011.
      - Lots of changes in Minsk (GMT+3 without DST) and other Russian
        regions. A new timezone has been created for them, FET: Further-eastern
        European Time aka GMT+3.
      - Add Asian/Hebron to the zone.tab file.
  
  Changes in 2011l:
  
      - West Bank came out of DST on 30 September 2011.
      - Fiji will g oin DST on 23 October and out of it on 26 Februari
      - State Bahia might go back to DST in 16 October 2011
  
      Due to legal problems, ado and Paul Eggert have to temporary suspend
      their work on the timezone database
      (http://thread.gmane.org/gmane.comp.time.tz/4133). Their work has
      been continued by volunteers on the tz community and the hosting
      of the data files is done by Robert Elz at ftp://munnari.oz.au/pub/.
  
  Obtained from:	ftp://munnari.oz.au/pub, ftp://elsie.nci.nih.gov/pub/

Modified:
  stable/7/share/zoneinfo/africa
  stable/7/share/zoneinfo/asia
  stable/7/share/zoneinfo/australasia
  stable/7/share/zoneinfo/europe
  stable/7/share/zoneinfo/northamerica
  stable/7/share/zoneinfo/southamerica
  stable/7/share/zoneinfo/zone.tab
Directory Properties:
  stable/7/share/zoneinfo/   (props changed)

Modified: stable/7/share/zoneinfo/africa
==============================================================================
--- stable/7/share/zoneinfo/africa	Wed Oct 12 09:17:53 2011	(r226291)
+++ stable/7/share/zoneinfo/africa	Wed Oct 12 09:17:53 2011	(r226292)
@@ -1,5 +1,5 @@
 # 
-# @(#)africa	8.31
+# @(#)africa	8.33
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -58,7 +58,7 @@
 # I invented the following abbreviations; corrections are welcome!
 #	 2:00	WAST	West Africa Summer Time
 #	 2:30	BEAT	British East Africa Time (no longer used)
-#	 2:44:45 BEAUT	British East Africa Unified Time (no longer used)
+#	 2:45	BEAUT	British East Africa Unified Time (no longer used)
 #	 3:00	CAST	Central Africa Summer Time (no longer used)
 #	 3:00	SAST	South Africa Summer Time (no longer used)
 #	 3:00	EAT	East Africa Time
@@ -396,7 +396,7 @@ Zone	Africa/Bissau	-1:02:20 -	LMT	1911 M
 Zone	Africa/Nairobi	2:27:16	-	LMT	1928 Jul
 			3:00	-	EAT	1930
 			2:30	-	BEAT	1940
-			2:44:45	-	BEAUT	1960
+			2:45	-	BEAUT	1960
 			3:00	-	EAT
 
 # Lesotho
@@ -957,6 +957,11 @@ Zone	Africa/Khartoum	2:10:08 -	LMT	1931
 			2:00	Sudan	CA%sT	2000 Jan 15 12:00
 			3:00	-	EAT
 
+# South Sudan
+Zone	Africa/Juba	2:06:24 -	LMT	1931
+			2:00	Sudan	CA%sT	2000 Jan 15 12:00
+			3:00	-	EAT
+
 # Swaziland
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Africa/Mbabane	2:04:24 -	LMT	1903 Mar
@@ -966,7 +971,7 @@ Zone	Africa/Mbabane	2:04:24 -	LMT	1903 M
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone Africa/Dar_es_Salaam 2:37:08 -	LMT	1931
 			3:00	-	EAT	1948
-			2:44:45	-	BEAUT	1961
+			2:45	-	BEAUT	1961
 			3:00	-	EAT
 
 # Togo
@@ -1092,7 +1097,7 @@ Zone	Africa/Tunis	0:40:44 -	LMT	1881 May
 Zone	Africa/Kampala	2:09:40 -	LMT	1928 Jul
 			3:00	-	EAT	1930
 			2:30	-	BEAT	1948
-			2:44:45	-	BEAUT	1957
+			2:45	-	BEAUT	1957
 			3:00	-	EAT
 
 # Zambia

Modified: stable/7/share/zoneinfo/asia
==============================================================================
--- stable/7/share/zoneinfo/asia	Wed Oct 12 09:17:53 2011	(r226291)
+++ stable/7/share/zoneinfo/asia	Wed Oct 12 09:17:53 2011	(r226292)
@@ -1,4 +1,4 @@
-# @(#)asia	8.65
+# @(#)asia	8.68
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -2194,7 +2194,47 @@ Zone	Asia/Karachi	4:28:12 -	LMT	1907
 # http://www.timeanddate.com/news/time/westbank-gaza-end-dst-2010.html
 # 
 
+# From Steffen Thorsen (2011-08-26):
+# Gaza and the West Bank did go back to standard time in the beginning of
+# August, and will now enter daylight saving time again on 2011-08-30
+# 00:00 (so two periods of DST in 2011). The pause was because of
+# Ramadan.
+#
+# 
+# http://www.maannews.net/eng/ViewDetails.aspx?ID=416217
+# 
+# Additional info:
+# 
+# http://www.timeanddate.com/news/time/palestine-dst-2011.html
+# 
+
+# From Alexander Krivenyshev (2011-08-27):
+# According to the article in The Jerusalem Post:
+# "...Earlier this month, the Palestinian government in the West Bank decided to
+# move to standard time for 30 days, during Ramadan. The Palestinians in the
+# Gaza Strip accepted the change and also moved their clocks one hour back.
+# The Hamas government said on Saturday that it won't observe summertime after
+# the Muslim feast of Id al-Fitr, which begins on Tuesday..."
+# ...
+# 
+# http://www.jpost.com/MiddleEast/Article.aspx?id=235650
+# 
+# or
+# 
+# http://www.worldtimezone.com/dst_news/dst_news_gazastrip05.html
+# 
 # The rules for Egypt are stolen from the `africa' file.
+
+# From Steffen Thorsen (2011-09-30):
+# West Bank did end Daylight Saving Time this morning/midnight (2011-09-30 
+# 00:00).
+# So West Bank and Gaza now have the same time again.
+#
+# Many sources, including:
+# 
+# http://www.maannews.net/eng/ViewDetails.aspx?ID=424808
+# 
+
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule EgyptAsia	1957	only	-	May	10	0:00	1:00	S
 Rule EgyptAsia	1957	1958	-	Oct	 1	0:00	0	-
@@ -2210,19 +2250,37 @@ Rule Palestine	2005	only	-	Oct	 4	2:00	0
 Rule Palestine	2006	2008	-	Apr	 1	0:00	1:00	S
 Rule Palestine	2006	only	-	Sep	22	0:00	0	-
 Rule Palestine	2007	only	-	Sep	Thu>=8	2:00	0	-
-Rule Palestine	2008	only	-	Aug	lastFri	2:00	0	-
+Rule Palestine	2008	only	-	Aug	lastFri	0:00	0	-
 Rule Palestine	2009	only	-	Mar	lastFri	0:00	1:00	S
-Rule Palestine	2010	max	-	Mar	lastSat	0:01	1:00	S
-Rule Palestine	2009	max	-	Sep	Fri>=1	2:00	0	-
+Rule Palestine	2009	only	-	Sep	Fri>=1	2:00	0	-
+Rule Palestine	2010	only	-	Mar	lastSat	0:01	1:00	S
 Rule Palestine	2010	only	-	Aug	11	0:00	0	-
 
+# From Arthur David Olson (2011-09-20):
+# 2011 transitions per http://www.timeanddate.com as of 2011-09-20.
+
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Gaza	2:17:52	-	LMT	1900 Oct
 			2:00	Zion	EET	1948 May 15
 			2:00 EgyptAsia	EE%sT	1967 Jun  5
 			2:00	Zion	I%sT	1996
 			2:00	Jordan	EE%sT	1999
-			2:00 Palestine	EE%sT
+			2:00 Palestine	EE%sT	2011 Apr  2 12:01
+			2:00	1:00	EEST	2011 Aug  1
+			2:00	-	EET
+
+Zone	Asia/Hebron	2:20:23	-	LMT	1900 Oct
+			2:00	Zion	EET	1948 May 15
+			2:00 EgyptAsia	EE%sT	1967 Jun  5
+			2:00	Zion	I%sT	1996
+			2:00	Jordan	EE%sT	1999
+			2:00 Palestine	EE%sT	2008 Aug
+			2:00 	1:00	EEST	2008 Sep
+			2:00 Palestine	EE%sT	2011 Apr  1 12:01
+			2:00	1:00	EEST	2011 Aug  1
+			2:00	-	EET	2011 Aug 30
+			2:00	1:00	EEST	2011 Sep 30 3:00
+			2:00	-	EET
 
 # Paracel Is
 # no information

Modified: stable/7/share/zoneinfo/australasia
==============================================================================
--- stable/7/share/zoneinfo/australasia	Wed Oct 12 09:17:53 2011	(r226291)
+++ stable/7/share/zoneinfo/australasia	Wed Oct 12 09:17:53 2011	(r226292)
@@ -1,5 +1,5 @@
 # 
-# @(#)australasia	8.23
+# @(#)australasia	8.27
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -296,6 +296,18 @@ Zone	Indian/Cocos	6:27:40	-	LMT	1900
 # http://www.worldtimezone.com/dst_news/dst_news_fiji04.html
 # 
 
+# From Steffen Thorsen (2011-10-03):
+# Now the dates have been confirmed, and at least our start date 
+# assumption was correct (end date was one week wrong).
+#
+# 
+# www.fiji.gov.fj/index.php?option=com_content&view=article&id=4966:daylight-saving-starts-in-fiji&catid=71:press-releases&Itemid=155
+# 
+# which says
+# Members of the public are reminded to change their time to one hour in 
+# advance at 2am to 3am on October 23, 2011 and one hour back at 3am to 
+# 2am on February 26 next year.
+
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Fiji	1998	1999	-	Nov	Sun>=1	2:00	1:00	S
 Rule	Fiji	1999	2000	-	Feb	lastSun	3:00	0	-
@@ -303,6 +315,8 @@ Rule	Fiji	2009	only	-	Nov	29	2:00	1:00	S
 Rule	Fiji	2010	only	-	Mar	lastSun	3:00	0	-
 Rule	Fiji	2010	only	-	Oct	24	2:00	1:00	S
 Rule	Fiji	2011	only	-	Mar	Sun>=1	3:00	0	-
+Rule	Fiji	2011	only	-	Oct	23	2:00	1:00	S
+Rule	Fiji	2012	only	-	Feb	26	3:00	0	-
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Pacific/Fiji	11:53:40 -	LMT	1915 Oct 26	# Suva
 			12:00	Fiji	FJ%sT	# Fiji Time
@@ -499,7 +513,7 @@ Zone Pacific/Pago_Pago	 12:37:12 -	LMT	1
 # http://www.parliament.gov.ws/documents/acts/Daylight%20Saving%20Act%20%202009%20%28English%29%20-%20Final%207-7-091.pdf
 # 
 
-# From Raymond Hughes (2010-10-07):
+# From Laupue Raymond Hughes (2010-10-07):
 # Please see
 # 
 # http://www.mcil.gov.ws
@@ -509,7 +523,7 @@ Zone Pacific/Pago_Pago	 12:37:12 -	LMT	1
 # to 01:00am and First Sunday April 2011 (03/04/11) - adjust clocks
 # backwards from 1:00am to 12:00am"
 
-# From Raymond Hughes (2011-03-07)
+# From Laupue Raymond Hughes (2011-03-07):
 # I believe this will be posted shortly on the website
 # 
 # www.mcil.gov.ws
@@ -529,12 +543,74 @@ Zone Pacific/Pago_Pago	 12:37:12 -	LMT	1
 # Margaret Fruean ACTING CHIEF EXECUTIVE OFFICER MINISTRY OF COMMERCE,
 # INDUSTRY AND LABOUR 28th February 2011
 
+# From David Zuelke (2011-05-09):
+# Subject: Samoa to move timezone from east to west of international date line
+# 
+# 
+# http://www.morningstar.co.uk/uk/markets/newsfeeditem.aspx?id=138501958347963
+# 
+
+# From Mark Sim-Smith (2011-08-17):
+# I have been in contact with Leilani Tuala Warren from the Samoa Law
+# Reform Commission, and she has sent me a copy of the Bill that she
+# confirmed has been passed...Most of the sections are about maps rather
+# than the time zone change, but I'll paste the relevant bits below. But
+# the essence is that at midnight 29 Dec (UTC-11 I suppose), Samoa
+# changes from UTC-11 to UTC+13:
+#
+# International Date Line Bill 2011
+#
+# AN ACT to provide for the change to standard time in Samoa and to make
+# consequential amendments to the position of the International Date
+# Line, and for related purposes.
+#
+# BE IT ENACTED by the Legislative Assembly of Samoa in Parliament
+# assembled as follows:
+#
+# 1. Short title and commencement-(1) This Act may be cited as the
+# International Date Line Act 2011. (2) Except for section 5(3) this Act
+# commences at 12 o'clock midnight, on Thursday 29th December 2011. (3)
+# Section 5(3) commences on the date of assent by the Head of State.
+#
+# [snip]
+#
+# 3. Interpretation - [snip] "Samoa standard time" in this Act and any
+# other statute of Samoa which refers to 'Samoa standard time' means the
+# time 13 hours in advance of Co-ordinated Universal Time.
+#
+# 4. Samoa standard time - (1) Upon the commencement of this Act, Samoa
+# standard time shall be set at 13 hours in advance of Co-ordinated
+# Universal Time for the whole of Samoa. (2) All references to Samoa's
+# time zone and to Samoa standard time in Samoa in all legislation and
+# instruments after the commencement of this Act shall be references to
+# Samoa standard time as provided for in this Act. (3) Nothing in this
+# Act affects the provisions of the Daylight Saving Act 2009, except that
+# it defines Samoa standard time....
+
+# From Laupue Raymond Hughes (2011-09-02):
+# 
+# http://www.mcil.gov.ws/mcil_publications.html
+# 
+#
+# here is the official website publication for Samoa DST and dateline change
+#
+# DST
+# Year	End	Time	Start	Time
+# 2011	- - -	- - -	24 September	3:00am to 4:00am
+# 2012	01 April	4:00am to 3:00am	- - -	- - -
+#
+# Dateline Change skip Friday 30th Dec 2011
+# Thursday 29th December 2011	23:59:59 Hours
+# Saturday 31st December 2011	00:00:00 Hours
 Zone Pacific/Apia	 12:33:04 -	LMT	1879 Jul  5
 			-11:26:56 -	LMT	1911
 			-11:30	-	SAMT	1950		# Samoa Time
 			-11:00	-	WST	2010 Sep 26
 			-11:00	1:00	WSDT	2011 Apr 2 4:00
-			-11:00	-	WST
+			-11:00	-	WST	2011 Sep 24 3:00
+			-11:00	1:00	WSDT	2011 Dec 30
+			 13:00	1:00	WSDT	2012 Apr 1 4:00
+			 13:00	-	WST
 
 # Solomon Is
 # excludes Bougainville, for which see Papua New Guinea
@@ -1206,7 +1282,7 @@ Zone	Pacific/Wallis	12:15:20 -	LMT	1901
 # Lord Howe Island Board (controlling authority for the Island) is
 # seeking the community's views on various options for summer time
 # arrangements on the Island, e.g. advance clocks by 1 full hour
-# instead of only 30 minutes.  Dependant on the wishes of residents
+# instead of only 30 minutes.  [Dependent] on the wishes of residents
 # the Board may approach the NSW government to change the existing
 # arrangements.  The starting date for summer time on the Island will
 # however always coincide with the rest of NSW.
@@ -1332,7 +1408,7 @@ Zone	Pacific/Wallis	12:15:20 -	LMT	1901
 
 # From Paul Eggert (1996-01-22):
 # Today's _Wall Street Journal_ (page 1) reports that Kiribati
-# ``declared it the same day throught the country as of Jan. 1, 1995''
+# ``declared it the same day [throughout] the country as of Jan. 1, 1995''
 # as part of the competition to be first into the 21st century.
 
 

Modified: stable/7/share/zoneinfo/europe
==============================================================================
--- stable/7/share/zoneinfo/europe	Wed Oct 12 09:17:53 2011	(r226291)
+++ stable/7/share/zoneinfo/europe	Wed Oct 12 09:17:53 2011	(r226292)
@@ -1,5 +1,5 @@
 # 
-# @(#)europe	8.33
+# @(#)europe	8.38
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -561,9 +561,9 @@ Rule	Russia	1985	1991	-	Mar	lastSun	 2:0
 #
 Rule	Russia	1992	only	-	Mar	lastSat	 23:00	1:00	S
 Rule	Russia	1992	only	-	Sep	lastSat	 23:00	0	-
-Rule	Russia	1993	max	-	Mar	lastSun	 2:00s	1:00	S
+Rule	Russia	1993	2010	-	Mar	lastSun	 2:00s	1:00	S
 Rule	Russia	1993	1995	-	Sep	lastSun	 2:00s	0	-
-Rule	Russia	1996	max	-	Oct	lastSun	 2:00s	0	-
+Rule	Russia	1996	2010	-	Oct	lastSun	 2:00s	0	-
 
 # From Alexander Krivenyshev (2011-06-14):
 # According to Kremlin press service, Russian President Dmitry Medvedev
@@ -583,7 +583,6 @@ Rule	Russia	1996	max	-	Oct	lastSun	 2:00
 # From Arthur David Olson (2011-06-15):
 # Take "abolishing daylight saving time" to mean that time is now considered
 # to be standard.
-# At least for now, keep the "old" Russia rules for the benefit of Belarus.
 
 # These are for backward compatibility with older versions.
 
@@ -689,6 +688,23 @@ Zone	Europe/Vienna	1:05:20 -	LMT	1893 Ap
 			1:00	EU	CE%sT
 
 # Belarus
+# From Yauhen Kharuzhy (2011-09-16):
+# By latest Belarus government act Europe/Minsk timezone was changed to
+# GMT+3 without DST (was GMT+2 with DST).
+#
+# Sources (Russian language):
+# 1.
+# 
+# http://www.belta.by/ru/all_news/society/V-Belarusi-otmenjaetsja-perexod-na-sezonnoe-vremja_i_572952.html
+# 
+# 2.
+# 
+# http://naviny.by/rubrics/society/2011/09/16/ic_articles_116_175144/
+# 
+# 3.
+# 
+# http://news.tut.by/society/250578.html
+# 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Europe/Minsk	1:50:16 -	LMT	1880
 			1:50	-	MMT	1924 May 2 # Minsk Mean Time
@@ -700,7 +716,8 @@ Zone	Europe/Minsk	1:50:16 -	LMT	1880
 			2:00	1:00	EEST	1991 Sep 29 2:00s
 			2:00	-	EET	1992 Mar 29 0:00s
 			2:00	1:00	EEST	1992 Sep 27 0:00s
-			2:00	Russia	EE%sT
+			2:00	Russia	EE%sT	2011 Mar 27 2:00s
+			3:00	-	FET # Further-eastern European Time
 
 # Belgium
 #
@@ -2034,7 +2051,7 @@ Zone Europe/Kaliningrad	 1:22:00 -	LMT	1
 			 2:00	Poland	CE%sT	1946
 			 3:00	Russia	MSK/MSD	1991 Mar 31 2:00s
 			 2:00	Russia	EE%sT	2011 Mar 27 2:00s
-			 3:00	-	EET
+			 3:00	-	FET # Further-eastern European Time
 #
 # From Oscar van Vlijmen (2001-08-25): [This region consists of]
 # Respublika Adygeya, Arkhangel'skaya oblast',
@@ -2189,7 +2206,7 @@ Zone Asia/Irkutsk	 6:57:20 -	LMT	1880
 # [parts of] Respublika Sakha (Yakutiya), Chitinskaya oblast'.
 
 # From Oscar van Vlijmen (2009-11-29):
-# ...some regions of RUssia were merged with others since 2005...
+# ...some regions of [Russia] were merged with others since 2005...
 # Some names were changed, no big deal, except for one instance: a new name.
 # YAK/YAKST: UTC+9 Zabajkal'skij kraj.
 
@@ -2613,6 +2630,28 @@ Link	Europe/Istanbul	Asia/Istanbul	# Ist
 # of March at 3am the time is changing to 4am and each last Sunday of
 # October the time at 4am is changing to 3am"
 
+# From Alexander Krivenyshev (2011-09-20):
+# On September 20, 2011 the deputies of the Verkhovna Rada agreed to
+# abolish the transfer clock to winter time.
+#
+# Bill number 8330 of MP from the Party of Regions Oleg Nadoshi got
+# approval from 266 deputies.
+#
+# Ukraine abolishes transter back to the winter time (in Russian)
+# 
+# http://news.mail.ru/politics/6861560/
+# 
+#
+# The Ukrainians will no longer change the clock (in Russian)
+# 
+# http://www.segodnya.ua/news/14290482.html
+# 
+#
+# Deputies cancelled the winter time (in Russian)
+# 
+# http://www.pravda.com.ua/rus/news/2011/09/20/6600616/
+# 
+
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 # Most of Ukraine since 1970 has been like Kiev.
 # "Kyiv" is the transliteration of the Ukrainian name, but
@@ -2626,7 +2665,8 @@ Zone Europe/Kiev	2:02:04 -	LMT	1880
 			3:00	-	MSK	1990 Jul  1 2:00
 			2:00	-	EET	1992
 			2:00	E-Eur	EE%sT	1995
-			2:00	EU	EE%sT
+			2:00	EU	EE%sT	2011 Mar lastSun 1:00u
+			3:00	-	FET # Further-eastern European Time
 # Ruthenia used CET 1990/1991.
 # "Uzhhorod" is the transliteration of the Ukrainian name, but
 # "Uzhgorod" is more common in English.
@@ -2640,7 +2680,8 @@ Zone Europe/Uzhgorod	1:29:12 -	LMT	1890 
 			1:00	-	CET	1991 Mar 31 3:00
 			2:00	-	EET	1992
 			2:00	E-Eur	EE%sT	1995
-			2:00	EU	EE%sT
+			2:00	EU	EE%sT	2011 Mar lastSun 1:00u
+			3:00	-	FET # Further-eastern European Time
 # Zaporozh'ye and eastern Lugansk oblasts observed DST 1990/1991.
 # "Zaporizhia" is the transliteration of the Ukrainian name, but
 # "Zaporozh'ye" is more common in English.  Use the common English
@@ -2653,7 +2694,8 @@ Zone Europe/Zaporozhye	2:20:40 -	LMT	188
 			1:00	C-Eur	CE%sT	1943 Oct 25
 			3:00	Russia	MSK/MSD	1991 Mar 31 2:00
 			2:00	E-Eur	EE%sT	1995
-			2:00	EU	EE%sT
+			2:00	EU	EE%sT	2011 Mar lastSun 1:00u
+			3:00	-	FET # Further-eastern European Time
 # Central Crimea used Moscow time 1994/1997.
 Zone Europe/Simferopol	2:16:24 -	LMT	1880
 			2:16	-	SMT	1924 May  2 # Simferopol Mean T
@@ -2678,7 +2720,8 @@ Zone Europe/Simferopol	2:16:24 -	LMT	188
 # Assume it happened in March by not changing the clocks.
 			3:00	Russia	MSK/MSD	1997
 			3:00	-	MSK	1997 Mar lastSun 1:00u
-			2:00	EU	EE%sT
+			2:00	EU	EE%sT	2011 Mar lastSun 1:00u
+			3:00	-	FET # Further-eastern European Time
 
 ###############################################################################
 

Modified: stable/7/share/zoneinfo/northamerica
==============================================================================
--- stable/7/share/zoneinfo/northamerica	Wed Oct 12 09:17:53 2011	(r226291)
+++ stable/7/share/zoneinfo/northamerica	Wed Oct 12 09:17:53 2011	(r226292)
@@ -1,5 +1,5 @@
 # 
-# @(#)northamerica	8.42
+# @(#)northamerica	8.49
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -468,6 +468,10 @@ Zone America/Los_Angeles -7:52:58 -	LMT	
 # own time. I asked about daylight saving; they said it wasn't used. I
 # did not inquire about practices in the past.
 
+# From Arthur David Olson (2011-08-17):
+# For lack of better information, assume that Metlakatla's
+# abandonment of use of daylight saving resulted from the 1983 vote.
+
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone America/Juneau	 15:02:19 -	LMT	1867 Oct 18
 			 -8:57:41 -	LMT	1900 Aug 20 12:00
@@ -479,7 +483,7 @@ Zone America/Juneau	 15:02:19 -	LMT	1867
 			 -8:00	US	P%sT	1983 Oct 30 2:00
 			 -9:00	US	Y%sT	1983 Nov 30
 			 -9:00	US	AK%sT
-Zone America/Sitka	 -14:58:47 -	LMT	1867 Oct 18
+Zone America/Sitka	 14:58:47 -	LMT	1867 Oct 18
 			 -9:01:13 -	LMT	1900 Aug 20 12:00
 			 -8:00	-	PST	1942
 			 -8:00	US	P%sT	1946
@@ -493,7 +497,7 @@ Zone America/Metlakatla	 15:13:42 -	LMT	
 			 -8:00	US	P%sT	1946
 			 -8:00	-	PST	1969
 			 -8:00	US	P%sT	1983 Oct 30 2:00
-			 -8:00	US	MeST
+			 -8:00	-	MeST
 Zone America/Yakutat	 14:41:05 -	LMT	1867 Oct 18
 			 -9:18:55 -	LMT	1900 Aug 20 12:00
 			 -9:00	-	YST	1942
@@ -593,8 +597,8 @@ Zone Pacific/Honolulu	-10:31:26 -	LMT	18
 			-10:30	-	HST	1933 Apr 30 2:00 #Laws 1933
 			-10:30	1:00	HDT	1933 May 21 12:00 #Laws 1933+12
 			-10:30	-	HST	1942 Feb 09 2:00 #Schmitt&Cox+2
-			-10:30	1:00	HDT	1945 Sep 30 2:00 #Schmitt&Fox+2
-			-10:30	US	H%sT	1947 Jun  8 2:00 #Schmitt&Fox+2
+			-10:30	1:00	HDT	1945 Sep 30 2:00 #Schmitt&Cox+2
+			-10:30	-	HST	1947 Jun  8 2:00 #Schmitt&Cox+2
 			-10:00	-	HST
 
 # Now we turn to US areas that have diverged from the consensus since 1970.
@@ -1163,12 +1167,29 @@ Rule	StJohns	1960	1986	-	Oct	lastSun	2:0
 # From Paul Eggert (2000-10-02):
 # INMS (2000-09-12) says that, since 1988 at least, Newfoundland switches
 # at 00:01 local time.  For now, assume it started in 1987.
+
+# From Michael Pelley (2011-09-12):
+# We received today, Monday, September 12, 2011, notification that the
+# changes to the Newfoundland Standard Time Act have been proclaimed.
+# The change in the Act stipulates that the change from Daylight Savings
+# Time to Standard Time and from Standard Time to Daylight Savings Time
+# now occurs at 2:00AM.
+# ...
+# 
+# http://www.assembly.nl.ca/legislation/sr/annualstatutes/2011/1106.chp.htm
+# 
+# ...
+# MICHAEL PELLEY  |  Manager of Enterprise Architecture - Solution Delivery
+# Office of the Chief Information Officer
+# Executive Council
+# Government of Newfoundland & Labrador
+
 Rule	StJohns	1987	only	-	Apr	Sun>=1	0:01	1:00	D
 Rule	StJohns	1987	2006	-	Oct	lastSun	0:01	0	S
 Rule	StJohns	1988	only	-	Apr	Sun>=1	0:01	2:00	DD
 Rule	StJohns	1989	2006	-	Apr	Sun>=1	0:01	1:00	D
-Rule	StJohns	2007	max	-	Mar	Sun>=8	0:01	1:00	D
-Rule	StJohns	2007	max	-	Nov	Sun>=1	0:01	0	S
+Rule	StJohns	2007	2011	-	Mar	Sun>=8	0:01	1:00	D
+Rule	StJohns	2007	2010	-	Nov	Sun>=1	0:01	0	S
 #
 # St John's has an apostrophe, but Posix file names can't have apostrophes.
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
@@ -1178,7 +1199,8 @@ Zone America/St_Johns	-3:30:52 -	LMT	188
 			-3:30:52 StJohns N%sT	1935 Mar 30
 			-3:30	StJohns	N%sT	1942 May 11
 			-3:30	Canada	N%sT	1946
-			-3:30	StJohns	N%sT
+			-3:30	StJohns	N%sT	2011 Nov
+			-3:30	Canada	N%sT
 
 # most of east Labrador
 
@@ -1192,7 +1214,8 @@ Zone America/Goose_Bay	-4:01:40 -	LMT	18
 			-3:30	StJohns	N%sT	1942 May 11
 			-3:30	Canada	N%sT	1946
 			-3:30	StJohns	N%sT	1966 Mar 15 2:00
-			-4:00	StJohns	A%sT
+			-4:00	StJohns	A%sT	2011 Nov
+			-4:00	Canada	A%sT
 
 
 # west Labrador, Nova Scotia, Prince Edward I
@@ -1924,20 +1947,69 @@ Zone America/Dawson_Creek -8:00:56 -	LMT
 # daylight saving....
 # http://www.nnsl.com/frames/newspapers/2006-11/nov13_06none.html
 
-# From Chris Walton (2007-03-14):
-# Today I phoned the "hamlet office" to find out what Resolute was doing with
-# its clocks.
-#
-# The individual that answered the phone confirmed that the clocks did not
-# move at the end of daylight saving on October 29/2006.  He also told me that
-# the clocks did not move this past weekend (March 11/2007)....
-
-# From Chris Walton (2008-11-13):
-# ...the residents of Resolute believe that they are changing "time zones"
-# twice a year.  In winter months, local time is qualified with "Eastern
-# Time" which is really "Eastern Standard Time (UTC-5)".  In summer
-# months, local time is qualified with "Central Time" which is really
-# "Central Daylight Time (UTC-5)"...
+# From Chris Walton (2011-03-21):
+# Back in 2007 I initiated the creation of a new "zone file" for Resolute
+# Bay. Resolute Bay is a small community located about 900km north of
+# the Arctic Circle. The zone file was required because Resolute Bay had
+# decided to use UTC-5 instead of UTC-6 for the winter of 2006-2007.
+#
+# According to new information which I received last week, Resolute Bay
+# went back to using UTC-6 in the winter of 2007-2008...
+#
+# On March 11/2007 most of Canada went onto daylight saving. On March
+# 14/2007 I phoned the Resolute Bay hamlet office to do a "time check." I
+# talked to somebody that was both knowledgeable and helpful. I was able
+# to confirm that Resolute Bay was still operating on UTC-5. It was
+# explained to me that Resolute Bay had been on the Eastern Time zone
+# (EST) in the winter, and was now back on the Central Time zone (CDT).
+# i.e. the time zone had changed twice in the last year but the clocks
+# had not moved. The residents had to know which time zone they were in
+# so they could follow the correct TV schedule...
+#
+# On Nov 02/2008 most of Canada went onto standard time. On Nov 03/2008 I
+# phoned the Resolute Bay hamlet office...[D]ue to the challenging nature
+# of the phone call, I decided to seek out an alternate source of
+# information. I found an e-mail address for somebody by the name of
+# Stephanie Adams whose job was listed as "Inns North Support Officer for
+# Arctic Co-operatives." I was under the impression that Stephanie lived
+# and worked in Resolute Bay...
+#
+# On March 14/2011 I phoned the hamlet office again. I was told that
+# Resolute Bay had been using Central Standard Time over the winter of
+# 2010-2011 and that the clocks had therefore been moved one hour ahead
+# on March 13/2011. The person I talked to was aware that Resolute Bay
+# had previously experimented with Eastern Standard Time but he could not
+# tell me when the practice had stopped.
+#
+# On March 17/2011 I searched the Web to find an e-mail address of
+# somebody that might be able to tell me exactly when Resolute Bay went
+# off Eastern Standard Time. I stumbled on the name "Aziz Kheraj." Aziz
+# used to be the mayor of Resolute Bay and he apparently owns half the
+# businesses including "South Camp Inn." This website has some info on
+# Aziz:
+# 
+# http://www.uphere.ca/node/493
+# 
+#
+# I sent Aziz an e-mail asking when Resolute Bay had stopped using
+# Eastern Standard Time.
+#
+# Aziz responded quickly with this: "hi, The time was not changed for the
+# 1 year only, the following year, the community went back to the old way
+# of "spring ahead-fall behind" currently we are zulu plus 5 hrs and in
+# the winter Zulu plus 6 hrs"
+#
+# This of course conflicted with everything I had ascertained in November 2008.
+#
+# I sent Aziz a copy of my 2008 e-mail exchange with Stephanie. Aziz
+# responded with this: "Hi, Stephanie lives in Winnipeg. I live here, You
+# may want to check with the weather office in Resolute Bay or do a
+# search on the weather through Env. Canada. web site"
+#
+# If I had realized the Stephanie did not live in Resolute Bay I would
+# never have contacted her.  I now believe that all the information I
+# obtained in November 2008 should be ignored...
+# I apologize for reporting incorrect information in 2008.
 
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	NT_YK	1918	only	-	Apr	14	2:00	1:00	D
@@ -1965,14 +2037,12 @@ Zone America/Iqaluit	0	-	zzz	1942 Aug # 
 			-6:00	Canada	C%sT	2000 Oct 29 2:00
 			-5:00	Canada	E%sT
 # aka Qausuittuq
-# Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
-Rule	Resolute 2006	max	-	Nov	Sun>=1	2:00	0	ES
-Rule	Resolute 2007	max	-	Mar	Sun>=8	2:00	0	CD
 Zone America/Resolute	0	-	zzz	1947 Aug 31 # Resolute founded
 			-6:00	NT_YK	C%sT	2000 Oct 29 2:00
 			-5:00	-	EST	2001 Apr  1 3:00
 			-6:00	Canada	C%sT	2006 Oct 29 2:00
-			-5:00	Resolute	%sT
+			-5:00	-	EST	2007 Mar 11 3:00
+			-6:00	Canada	C%sT
 # aka Kangiqiniq
 Zone America/Rankin_Inlet 0	-	zzz	1957 # Rankin Inlet founded
 			-6:00	NT_YK	C%sT	2000 Oct 29 2:00

Modified: stable/7/share/zoneinfo/southamerica
==============================================================================
--- stable/7/share/zoneinfo/southamerica	Wed Oct 12 09:17:53 2011	(r226291)
+++ stable/7/share/zoneinfo/southamerica	Wed Oct 12 09:17:53 2011	(r226292)
@@ -797,6 +797,26 @@ Zone	America/La_Paz	-4:32:36 -	LMT	1890
 # 
 # http://www.timeanddate.com/news/time/brazil-dst-2008-2009.html
 # 
+#
+# From Alexander Krivenyshev (2011-10-04):
+# State Bahia will return to Daylight savings time this year after 8 years off.
+# The announcement was made by Governor Jaques Wagner in an interview to a 
+# television station in Salvador. 
+
+# In Portuguese:
+# 
+# http://g1.globo.com/bahia/noticia/2011/10/governador-jaques-wagner-confirma-horario-de-verao-na-bahia.html
+#  and
+# 
+# http://noticias.terra.com.br/brasil/noticias/0,,OI5390887-EI8139,00-Bahia+volta+a+ter+horario+de+verao+apos+oito+anos.html
+# 
+
+# From Guilherme Bernardes Rodrigues (2011-10-07):
+# There is news in the media, however there is still no decree about it.
+# I just send a e-mail to Zulmira Brandão at
+# http://pcdsh01.on.br/ the
+# oficial agency about time in Brazil, and she confirmed that the old rule is
+# still in force.
 
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 # Decree 20,466 (1931-10-01)
@@ -1035,6 +1055,9 @@ Zone America/Maceio	-2:22:52 -	LMT	1914
 Zone America/Bahia	-2:34:04 -	LMT	1914
 			-3:00	Brazil	BR%sT	2003 Sep 24
 			-3:00	-	BRT
+# as noted above, not yet in operation.
+#			-3:00	-	BRT	2011 Oct 16
+#			-3:00	Brazil	BR%sT
 #
 # Goias (GO), Distrito Federal (DF), Minas Gerais (MG),
 # Espirito Santo (ES), Rio de Janeiro (RJ), Sao Paulo (SP), Parana (PR),

Modified: stable/7/share/zoneinfo/zone.tab
==============================================================================
--- stable/7/share/zoneinfo/zone.tab	Wed Oct 12 09:17:53 2011	(r226291)
+++ stable/7/share/zoneinfo/zone.tab	Wed Oct 12 09:17:53 2011	(r226292)
@@ -1,5 +1,5 @@
 # 
-# @(#)zone.tab	8.45
+# @(#)zone.tab	8.49
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 #
@@ -120,7 +120,7 @@ CA	+4901-08816	America/Nipigon	Eastern T
 CA	+4823-08915	America/Thunder_Bay	Eastern Time - Thunder Bay, Ontario
 CA	+6344-06828	America/Iqaluit	Eastern Time - east Nunavut - most locations
 CA	+6608-06544	America/Pangnirtung	Eastern Time - Pangnirtung, Nunavut
-CA	+744144-0944945	America/Resolute	Eastern Standard Time - Resolute, Nunavut
+CA	+744144-0944945	America/Resolute	Central Standard Time - Resolute, Nunavut
 CA	+484531-0913718	America/Atikokan	Eastern Standard Time - Atikokan, Ontario and Southampton I, Nunavut
 CA	+624900-0920459	America/Rankin_Inlet	Central Time - central Nunavut
 CA	+4953-09709	America/Winnipeg	Central Time - Manitoba & west Ontario
@@ -319,7 +319,8 @@ PL	+5215+02100	Europe/Warsaw
 PM	+4703-05620	America/Miquelon
 PN	-2504-13005	Pacific/Pitcairn
 PR	+182806-0660622	America/Puerto_Rico
-PS	+3130+03428	Asia/Gaza
+PS	+3130+03428	Asia/Gaza	Gaza Strip
+PS	+313200+0350542	Asia/Hebron	West Bank
 PT	+3843-00908	Europe/Lisbon	mainland
 PT	+3238-01654	Atlantic/Madeira	Madeira Islands
 PT	+3744-02540	Atlantic/Azores	Azores
@@ -361,6 +362,7 @@ SM	+4355+01228	Europe/San_Marino
 SN	+1440-01726	Africa/Dakar
 SO	+0204+04522	Africa/Mogadishu
 SR	+0550-05510	America/Paramaribo
+SS	+0451+03136	Africa/Juba
 ST	+0020+00644	Africa/Sao_Tome
 SV	+1342-08912	America/El_Salvador
 SX	+180305-0630250	America/Lower_Princes

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 12 09:19:21 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 884571065677;
	Wed, 12 Oct 2011 09:19:21 +0000 (UTC)
	(envelope-from edwin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 75A3D8FC18;
	Wed, 12 Oct 2011 09:19:21 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9C9JLC3056540;
	Wed, 12 Oct 2011 09:19:21 GMT (envelope-from edwin@svn.freebsd.org)
Received: (from edwin@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9C9JLNf056531;
	Wed, 12 Oct 2011 09:19:21 GMT (envelope-from edwin@svn.freebsd.org)
Message-Id: <201110120919.p9C9JLNf056531@svn.freebsd.org>
From: Edwin Groothuis 
Date: Wed, 12 Oct 2011 09:19:21 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org
X-SVN-Group: stable-6
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226293 - stable/6/share/zoneinfo
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 12 Oct 2011 09:19:21 -0000

Author: edwin
Date: Wed Oct 12 09:19:21 2011
New Revision: 226293
URL: http://svn.freebsd.org/changeset/base/226293

Log:
  MFC of tzdata2011l, 226289
  
  Changes in 2011i:
  
      Africa
      - Added South Sudan: Africa/Juba
  
      Australasia:
      - Samoa will go forward 24 hours at 30 December 2011 to better match
        the day of the week with its neighbours.
  
      Europe:
      - Europe/Kaliningrad will have the timezone KALT.
  
      North America:
      - Updates to Metlakatla historical data
      - Newfoundland, Labrador and Resolute will do something which I
        can't figure out.
  
      iso3166tab;
      - Add SS for South Sudan.
  
  Changes in 2011j:
  
      - Samoa will go from 29 December 23:59:59 to 31 December 00:00:00.
      - Samoa DST will end on 1 April 2012
  
  Changes in 2011k:
  
      - Gaza / West Bank goes back to standard time on 02 August 2011.
      - West Bank went bac kto DST on 30 August 2011.
      - Lots of changes in Minsk (GMT+3 without DST) and other Russian
        regions. A new timezone has been created for them, FET: Further-eastern
        European Time aka GMT+3.
      - Add Asian/Hebron to the zone.tab file.
  
  Changes in 2011l:
  
      - West Bank came out of DST on 30 September 2011.
      - Fiji will g oin DST on 23 October and out of it on 26 Februari
      - State Bahia might go back to DST in 16 October 2011
  
      Due to legal problems, ado and Paul Eggert have to temporary suspend
      their work on the timezone database
      (http://thread.gmane.org/gmane.comp.time.tz/4133). Their work has
      been continued by volunteers on the tz community and the hosting
      of the data files is done by Robert Elz at ftp://munnari.oz.au/pub/.
  
  Obtained from:	ftp://munnari.oz.au/pub, ftp://elsie.nci.nih.gov/pub/

Modified:
  stable/6/share/zoneinfo/africa
  stable/6/share/zoneinfo/asia
  stable/6/share/zoneinfo/australasia
  stable/6/share/zoneinfo/europe
  stable/6/share/zoneinfo/northamerica
  stable/6/share/zoneinfo/southamerica
  stable/6/share/zoneinfo/zone.tab
Directory Properties:
  stable/6/share/zoneinfo/   (props changed)

Modified: stable/6/share/zoneinfo/africa
==============================================================================
--- stable/6/share/zoneinfo/africa	Wed Oct 12 09:17:53 2011	(r226292)
+++ stable/6/share/zoneinfo/africa	Wed Oct 12 09:19:21 2011	(r226293)
@@ -1,5 +1,5 @@
 # 
-# @(#)africa	8.31
+# @(#)africa	8.33
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -58,7 +58,7 @@
 # I invented the following abbreviations; corrections are welcome!
 #	 2:00	WAST	West Africa Summer Time
 #	 2:30	BEAT	British East Africa Time (no longer used)
-#	 2:44:45 BEAUT	British East Africa Unified Time (no longer used)
+#	 2:45	BEAUT	British East Africa Unified Time (no longer used)
 #	 3:00	CAST	Central Africa Summer Time (no longer used)
 #	 3:00	SAST	South Africa Summer Time (no longer used)
 #	 3:00	EAT	East Africa Time
@@ -396,7 +396,7 @@ Zone	Africa/Bissau	-1:02:20 -	LMT	1911 M
 Zone	Africa/Nairobi	2:27:16	-	LMT	1928 Jul
 			3:00	-	EAT	1930
 			2:30	-	BEAT	1940
-			2:44:45	-	BEAUT	1960
+			2:45	-	BEAUT	1960
 			3:00	-	EAT
 
 # Lesotho
@@ -957,6 +957,11 @@ Zone	Africa/Khartoum	2:10:08 -	LMT	1931
 			2:00	Sudan	CA%sT	2000 Jan 15 12:00
 			3:00	-	EAT
 
+# South Sudan
+Zone	Africa/Juba	2:06:24 -	LMT	1931
+			2:00	Sudan	CA%sT	2000 Jan 15 12:00
+			3:00	-	EAT
+
 # Swaziland
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Africa/Mbabane	2:04:24 -	LMT	1903 Mar
@@ -966,7 +971,7 @@ Zone	Africa/Mbabane	2:04:24 -	LMT	1903 M
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone Africa/Dar_es_Salaam 2:37:08 -	LMT	1931
 			3:00	-	EAT	1948
-			2:44:45	-	BEAUT	1961
+			2:45	-	BEAUT	1961
 			3:00	-	EAT
 
 # Togo
@@ -1092,7 +1097,7 @@ Zone	Africa/Tunis	0:40:44 -	LMT	1881 May
 Zone	Africa/Kampala	2:09:40 -	LMT	1928 Jul
 			3:00	-	EAT	1930
 			2:30	-	BEAT	1948
-			2:44:45	-	BEAUT	1957
+			2:45	-	BEAUT	1957
 			3:00	-	EAT
 
 # Zambia

Modified: stable/6/share/zoneinfo/asia
==============================================================================
--- stable/6/share/zoneinfo/asia	Wed Oct 12 09:17:53 2011	(r226292)
+++ stable/6/share/zoneinfo/asia	Wed Oct 12 09:19:21 2011	(r226293)
@@ -1,4 +1,4 @@
-# @(#)asia	8.65
+# @(#)asia	8.68
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -2194,7 +2194,47 @@ Zone	Asia/Karachi	4:28:12 -	LMT	1907
 # http://www.timeanddate.com/news/time/westbank-gaza-end-dst-2010.html
 # 
 
+# From Steffen Thorsen (2011-08-26):
+# Gaza and the West Bank did go back to standard time in the beginning of
+# August, and will now enter daylight saving time again on 2011-08-30
+# 00:00 (so two periods of DST in 2011). The pause was because of
+# Ramadan.
+#
+# 
+# http://www.maannews.net/eng/ViewDetails.aspx?ID=416217
+# 
+# Additional info:
+# 
+# http://www.timeanddate.com/news/time/palestine-dst-2011.html
+# 
+
+# From Alexander Krivenyshev (2011-08-27):
+# According to the article in The Jerusalem Post:
+# "...Earlier this month, the Palestinian government in the West Bank decided to
+# move to standard time for 30 days, during Ramadan. The Palestinians in the
+# Gaza Strip accepted the change and also moved their clocks one hour back.
+# The Hamas government said on Saturday that it won't observe summertime after
+# the Muslim feast of Id al-Fitr, which begins on Tuesday..."
+# ...
+# 
+# http://www.jpost.com/MiddleEast/Article.aspx?id=235650
+# 
+# or
+# 
+# http://www.worldtimezone.com/dst_news/dst_news_gazastrip05.html
+# 
 # The rules for Egypt are stolen from the `africa' file.
+
+# From Steffen Thorsen (2011-09-30):
+# West Bank did end Daylight Saving Time this morning/midnight (2011-09-30 
+# 00:00).
+# So West Bank and Gaza now have the same time again.
+#
+# Many sources, including:
+# 
+# http://www.maannews.net/eng/ViewDetails.aspx?ID=424808
+# 
+
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule EgyptAsia	1957	only	-	May	10	0:00	1:00	S
 Rule EgyptAsia	1957	1958	-	Oct	 1	0:00	0	-
@@ -2210,19 +2250,37 @@ Rule Palestine	2005	only	-	Oct	 4	2:00	0
 Rule Palestine	2006	2008	-	Apr	 1	0:00	1:00	S
 Rule Palestine	2006	only	-	Sep	22	0:00	0	-
 Rule Palestine	2007	only	-	Sep	Thu>=8	2:00	0	-
-Rule Palestine	2008	only	-	Aug	lastFri	2:00	0	-
+Rule Palestine	2008	only	-	Aug	lastFri	0:00	0	-
 Rule Palestine	2009	only	-	Mar	lastFri	0:00	1:00	S
-Rule Palestine	2010	max	-	Mar	lastSat	0:01	1:00	S
-Rule Palestine	2009	max	-	Sep	Fri>=1	2:00	0	-
+Rule Palestine	2009	only	-	Sep	Fri>=1	2:00	0	-
+Rule Palestine	2010	only	-	Mar	lastSat	0:01	1:00	S
 Rule Palestine	2010	only	-	Aug	11	0:00	0	-
 
+# From Arthur David Olson (2011-09-20):
+# 2011 transitions per http://www.timeanddate.com as of 2011-09-20.
+
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Gaza	2:17:52	-	LMT	1900 Oct
 			2:00	Zion	EET	1948 May 15
 			2:00 EgyptAsia	EE%sT	1967 Jun  5
 			2:00	Zion	I%sT	1996
 			2:00	Jordan	EE%sT	1999
-			2:00 Palestine	EE%sT
+			2:00 Palestine	EE%sT	2011 Apr  2 12:01
+			2:00	1:00	EEST	2011 Aug  1
+			2:00	-	EET
+
+Zone	Asia/Hebron	2:20:23	-	LMT	1900 Oct
+			2:00	Zion	EET	1948 May 15
+			2:00 EgyptAsia	EE%sT	1967 Jun  5
+			2:00	Zion	I%sT	1996
+			2:00	Jordan	EE%sT	1999
+			2:00 Palestine	EE%sT	2008 Aug
+			2:00 	1:00	EEST	2008 Sep
+			2:00 Palestine	EE%sT	2011 Apr  1 12:01
+			2:00	1:00	EEST	2011 Aug  1
+			2:00	-	EET	2011 Aug 30
+			2:00	1:00	EEST	2011 Sep 30 3:00
+			2:00	-	EET
 
 # Paracel Is
 # no information

Modified: stable/6/share/zoneinfo/australasia
==============================================================================
--- stable/6/share/zoneinfo/australasia	Wed Oct 12 09:17:53 2011	(r226292)
+++ stable/6/share/zoneinfo/australasia	Wed Oct 12 09:19:21 2011	(r226293)
@@ -1,5 +1,5 @@
 # 
-# @(#)australasia	8.23
+# @(#)australasia	8.27
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -296,6 +296,18 @@ Zone	Indian/Cocos	6:27:40	-	LMT	1900
 # http://www.worldtimezone.com/dst_news/dst_news_fiji04.html
 # 
 
+# From Steffen Thorsen (2011-10-03):
+# Now the dates have been confirmed, and at least our start date 
+# assumption was correct (end date was one week wrong).
+#
+# 
+# www.fiji.gov.fj/index.php?option=com_content&view=article&id=4966:daylight-saving-starts-in-fiji&catid=71:press-releases&Itemid=155
+# 
+# which says
+# Members of the public are reminded to change their time to one hour in 
+# advance at 2am to 3am on October 23, 2011 and one hour back at 3am to 
+# 2am on February 26 next year.
+
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Fiji	1998	1999	-	Nov	Sun>=1	2:00	1:00	S
 Rule	Fiji	1999	2000	-	Feb	lastSun	3:00	0	-
@@ -303,6 +315,8 @@ Rule	Fiji	2009	only	-	Nov	29	2:00	1:00	S
 Rule	Fiji	2010	only	-	Mar	lastSun	3:00	0	-
 Rule	Fiji	2010	only	-	Oct	24	2:00	1:00	S
 Rule	Fiji	2011	only	-	Mar	Sun>=1	3:00	0	-
+Rule	Fiji	2011	only	-	Oct	23	2:00	1:00	S
+Rule	Fiji	2012	only	-	Feb	26	3:00	0	-
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Pacific/Fiji	11:53:40 -	LMT	1915 Oct 26	# Suva
 			12:00	Fiji	FJ%sT	# Fiji Time
@@ -499,7 +513,7 @@ Zone Pacific/Pago_Pago	 12:37:12 -	LMT	1
 # http://www.parliament.gov.ws/documents/acts/Daylight%20Saving%20Act%20%202009%20%28English%29%20-%20Final%207-7-091.pdf
 # 
 
-# From Raymond Hughes (2010-10-07):
+# From Laupue Raymond Hughes (2010-10-07):
 # Please see
 # 
 # http://www.mcil.gov.ws
@@ -509,7 +523,7 @@ Zone Pacific/Pago_Pago	 12:37:12 -	LMT	1
 # to 01:00am and First Sunday April 2011 (03/04/11) - adjust clocks
 # backwards from 1:00am to 12:00am"
 
-# From Raymond Hughes (2011-03-07)
+# From Laupue Raymond Hughes (2011-03-07):
 # I believe this will be posted shortly on the website
 # 
 # www.mcil.gov.ws
@@ -529,12 +543,74 @@ Zone Pacific/Pago_Pago	 12:37:12 -	LMT	1
 # Margaret Fruean ACTING CHIEF EXECUTIVE OFFICER MINISTRY OF COMMERCE,
 # INDUSTRY AND LABOUR 28th February 2011
 
+# From David Zuelke (2011-05-09):
+# Subject: Samoa to move timezone from east to west of international date line
+# 
+# 
+# http://www.morningstar.co.uk/uk/markets/newsfeeditem.aspx?id=138501958347963
+# 
+
+# From Mark Sim-Smith (2011-08-17):
+# I have been in contact with Leilani Tuala Warren from the Samoa Law
+# Reform Commission, and she has sent me a copy of the Bill that she
+# confirmed has been passed...Most of the sections are about maps rather
+# than the time zone change, but I'll paste the relevant bits below. But
+# the essence is that at midnight 29 Dec (UTC-11 I suppose), Samoa
+# changes from UTC-11 to UTC+13:
+#
+# International Date Line Bill 2011
+#
+# AN ACT to provide for the change to standard time in Samoa and to make
+# consequential amendments to the position of the International Date
+# Line, and for related purposes.
+#
+# BE IT ENACTED by the Legislative Assembly of Samoa in Parliament
+# assembled as follows:
+#
+# 1. Short title and commencement-(1) This Act may be cited as the
+# International Date Line Act 2011. (2) Except for section 5(3) this Act
+# commences at 12 o'clock midnight, on Thursday 29th December 2011. (3)
+# Section 5(3) commences on the date of assent by the Head of State.
+#
+# [snip]
+#
+# 3. Interpretation - [snip] "Samoa standard time" in this Act and any
+# other statute of Samoa which refers to 'Samoa standard time' means the
+# time 13 hours in advance of Co-ordinated Universal Time.
+#
+# 4. Samoa standard time - (1) Upon the commencement of this Act, Samoa
+# standard time shall be set at 13 hours in advance of Co-ordinated
+# Universal Time for the whole of Samoa. (2) All references to Samoa's
+# time zone and to Samoa standard time in Samoa in all legislation and
+# instruments after the commencement of this Act shall be references to
+# Samoa standard time as provided for in this Act. (3) Nothing in this
+# Act affects the provisions of the Daylight Saving Act 2009, except that
+# it defines Samoa standard time....
+
+# From Laupue Raymond Hughes (2011-09-02):
+# 
+# http://www.mcil.gov.ws/mcil_publications.html
+# 
+#
+# here is the official website publication for Samoa DST and dateline change
+#
+# DST
+# Year	End	Time	Start	Time
+# 2011	- - -	- - -	24 September	3:00am to 4:00am
+# 2012	01 April	4:00am to 3:00am	- - -	- - -
+#
+# Dateline Change skip Friday 30th Dec 2011
+# Thursday 29th December 2011	23:59:59 Hours
+# Saturday 31st December 2011	00:00:00 Hours
 Zone Pacific/Apia	 12:33:04 -	LMT	1879 Jul  5
 			-11:26:56 -	LMT	1911
 			-11:30	-	SAMT	1950		# Samoa Time
 			-11:00	-	WST	2010 Sep 26
 			-11:00	1:00	WSDT	2011 Apr 2 4:00
-			-11:00	-	WST
+			-11:00	-	WST	2011 Sep 24 3:00
+			-11:00	1:00	WSDT	2011 Dec 30
+			 13:00	1:00	WSDT	2012 Apr 1 4:00
+			 13:00	-	WST
 
 # Solomon Is
 # excludes Bougainville, for which see Papua New Guinea
@@ -1206,7 +1282,7 @@ Zone	Pacific/Wallis	12:15:20 -	LMT	1901
 # Lord Howe Island Board (controlling authority for the Island) is
 # seeking the community's views on various options for summer time
 # arrangements on the Island, e.g. advance clocks by 1 full hour
-# instead of only 30 minutes.  Dependant on the wishes of residents
+# instead of only 30 minutes.  [Dependent] on the wishes of residents
 # the Board may approach the NSW government to change the existing
 # arrangements.  The starting date for summer time on the Island will
 # however always coincide with the rest of NSW.
@@ -1332,7 +1408,7 @@ Zone	Pacific/Wallis	12:15:20 -	LMT	1901
 
 # From Paul Eggert (1996-01-22):
 # Today's _Wall Street Journal_ (page 1) reports that Kiribati
-# ``declared it the same day throught the country as of Jan. 1, 1995''
+# ``declared it the same day [throughout] the country as of Jan. 1, 1995''
 # as part of the competition to be first into the 21st century.
 
 

Modified: stable/6/share/zoneinfo/europe
==============================================================================
--- stable/6/share/zoneinfo/europe	Wed Oct 12 09:17:53 2011	(r226292)
+++ stable/6/share/zoneinfo/europe	Wed Oct 12 09:19:21 2011	(r226293)
@@ -1,5 +1,5 @@
 # 
-# @(#)europe	8.33
+# @(#)europe	8.38
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -561,9 +561,9 @@ Rule	Russia	1985	1991	-	Mar	lastSun	 2:0
 #
 Rule	Russia	1992	only	-	Mar	lastSat	 23:00	1:00	S
 Rule	Russia	1992	only	-	Sep	lastSat	 23:00	0	-
-Rule	Russia	1993	max	-	Mar	lastSun	 2:00s	1:00	S
+Rule	Russia	1993	2010	-	Mar	lastSun	 2:00s	1:00	S
 Rule	Russia	1993	1995	-	Sep	lastSun	 2:00s	0	-
-Rule	Russia	1996	max	-	Oct	lastSun	 2:00s	0	-
+Rule	Russia	1996	2010	-	Oct	lastSun	 2:00s	0	-
 
 # From Alexander Krivenyshev (2011-06-14):
 # According to Kremlin press service, Russian President Dmitry Medvedev
@@ -583,7 +583,6 @@ Rule	Russia	1996	max	-	Oct	lastSun	 2:00
 # From Arthur David Olson (2011-06-15):
 # Take "abolishing daylight saving time" to mean that time is now considered
 # to be standard.
-# At least for now, keep the "old" Russia rules for the benefit of Belarus.
 
 # These are for backward compatibility with older versions.
 
@@ -689,6 +688,23 @@ Zone	Europe/Vienna	1:05:20 -	LMT	1893 Ap
 			1:00	EU	CE%sT
 
 # Belarus
+# From Yauhen Kharuzhy (2011-09-16):
+# By latest Belarus government act Europe/Minsk timezone was changed to
+# GMT+3 without DST (was GMT+2 with DST).
+#
+# Sources (Russian language):
+# 1.
+# 
+# http://www.belta.by/ru/all_news/society/V-Belarusi-otmenjaetsja-perexod-na-sezonnoe-vremja_i_572952.html
+# 
+# 2.
+# 
+# http://naviny.by/rubrics/society/2011/09/16/ic_articles_116_175144/
+# 
+# 3.
+# 
+# http://news.tut.by/society/250578.html
+# 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Europe/Minsk	1:50:16 -	LMT	1880
 			1:50	-	MMT	1924 May 2 # Minsk Mean Time
@@ -700,7 +716,8 @@ Zone	Europe/Minsk	1:50:16 -	LMT	1880
 			2:00	1:00	EEST	1991 Sep 29 2:00s
 			2:00	-	EET	1992 Mar 29 0:00s
 			2:00	1:00	EEST	1992 Sep 27 0:00s
-			2:00	Russia	EE%sT
+			2:00	Russia	EE%sT	2011 Mar 27 2:00s
+			3:00	-	FET # Further-eastern European Time
 
 # Belgium
 #
@@ -2034,7 +2051,7 @@ Zone Europe/Kaliningrad	 1:22:00 -	LMT	1
 			 2:00	Poland	CE%sT	1946
 			 3:00	Russia	MSK/MSD	1991 Mar 31 2:00s
 			 2:00	Russia	EE%sT	2011 Mar 27 2:00s
-			 3:00	-	EET
+			 3:00	-	FET # Further-eastern European Time
 #
 # From Oscar van Vlijmen (2001-08-25): [This region consists of]
 # Respublika Adygeya, Arkhangel'skaya oblast',
@@ -2189,7 +2206,7 @@ Zone Asia/Irkutsk	 6:57:20 -	LMT	1880
 # [parts of] Respublika Sakha (Yakutiya), Chitinskaya oblast'.
 
 # From Oscar van Vlijmen (2009-11-29):
-# ...some regions of RUssia were merged with others since 2005...
+# ...some regions of [Russia] were merged with others since 2005...
 # Some names were changed, no big deal, except for one instance: a new name.
 # YAK/YAKST: UTC+9 Zabajkal'skij kraj.
 
@@ -2613,6 +2630,28 @@ Link	Europe/Istanbul	Asia/Istanbul	# Ist
 # of March at 3am the time is changing to 4am and each last Sunday of
 # October the time at 4am is changing to 3am"
 
+# From Alexander Krivenyshev (2011-09-20):
+# On September 20, 2011 the deputies of the Verkhovna Rada agreed to
+# abolish the transfer clock to winter time.
+#
+# Bill number 8330 of MP from the Party of Regions Oleg Nadoshi got
+# approval from 266 deputies.
+#
+# Ukraine abolishes transter back to the winter time (in Russian)
+# 
+# http://news.mail.ru/politics/6861560/
+# 
+#
+# The Ukrainians will no longer change the clock (in Russian)
+# 
+# http://www.segodnya.ua/news/14290482.html
+# 
+#
+# Deputies cancelled the winter time (in Russian)
+# 
+# http://www.pravda.com.ua/rus/news/2011/09/20/6600616/
+# 
+
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 # Most of Ukraine since 1970 has been like Kiev.
 # "Kyiv" is the transliteration of the Ukrainian name, but
@@ -2626,7 +2665,8 @@ Zone Europe/Kiev	2:02:04 -	LMT	1880
 			3:00	-	MSK	1990 Jul  1 2:00
 			2:00	-	EET	1992
 			2:00	E-Eur	EE%sT	1995
-			2:00	EU	EE%sT
+			2:00	EU	EE%sT	2011 Mar lastSun 1:00u
+			3:00	-	FET # Further-eastern European Time
 # Ruthenia used CET 1990/1991.
 # "Uzhhorod" is the transliteration of the Ukrainian name, but
 # "Uzhgorod" is more common in English.
@@ -2640,7 +2680,8 @@ Zone Europe/Uzhgorod	1:29:12 -	LMT	1890 
 			1:00	-	CET	1991 Mar 31 3:00
 			2:00	-	EET	1992
 			2:00	E-Eur	EE%sT	1995
-			2:00	EU	EE%sT
+			2:00	EU	EE%sT	2011 Mar lastSun 1:00u
+			3:00	-	FET # Further-eastern European Time
 # Zaporozh'ye and eastern Lugansk oblasts observed DST 1990/1991.
 # "Zaporizhia" is the transliteration of the Ukrainian name, but
 # "Zaporozh'ye" is more common in English.  Use the common English
@@ -2653,7 +2694,8 @@ Zone Europe/Zaporozhye	2:20:40 -	LMT	188
 			1:00	C-Eur	CE%sT	1943 Oct 25
 			3:00	Russia	MSK/MSD	1991 Mar 31 2:00
 			2:00	E-Eur	EE%sT	1995
-			2:00	EU	EE%sT
+			2:00	EU	EE%sT	2011 Mar lastSun 1:00u
+			3:00	-	FET # Further-eastern European Time
 # Central Crimea used Moscow time 1994/1997.
 Zone Europe/Simferopol	2:16:24 -	LMT	1880
 			2:16	-	SMT	1924 May  2 # Simferopol Mean T
@@ -2678,7 +2720,8 @@ Zone Europe/Simferopol	2:16:24 -	LMT	188
 # Assume it happened in March by not changing the clocks.
 			3:00	Russia	MSK/MSD	1997
 			3:00	-	MSK	1997 Mar lastSun 1:00u
-			2:00	EU	EE%sT
+			2:00	EU	EE%sT	2011 Mar lastSun 1:00u
+			3:00	-	FET # Further-eastern European Time
 
 ###############################################################################
 

Modified: stable/6/share/zoneinfo/northamerica
==============================================================================
--- stable/6/share/zoneinfo/northamerica	Wed Oct 12 09:17:53 2011	(r226292)
+++ stable/6/share/zoneinfo/northamerica	Wed Oct 12 09:19:21 2011	(r226293)
@@ -1,5 +1,5 @@
 # 
-# @(#)northamerica	8.42
+# @(#)northamerica	8.49
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -468,6 +468,10 @@ Zone America/Los_Angeles -7:52:58 -	LMT	
 # own time. I asked about daylight saving; they said it wasn't used. I
 # did not inquire about practices in the past.
 
+# From Arthur David Olson (2011-08-17):
+# For lack of better information, assume that Metlakatla's
+# abandonment of use of daylight saving resulted from the 1983 vote.
+
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone America/Juneau	 15:02:19 -	LMT	1867 Oct 18
 			 -8:57:41 -	LMT	1900 Aug 20 12:00
@@ -479,7 +483,7 @@ Zone America/Juneau	 15:02:19 -	LMT	1867
 			 -8:00	US	P%sT	1983 Oct 30 2:00
 			 -9:00	US	Y%sT	1983 Nov 30
 			 -9:00	US	AK%sT
-Zone America/Sitka	 -14:58:47 -	LMT	1867 Oct 18
+Zone America/Sitka	 14:58:47 -	LMT	1867 Oct 18
 			 -9:01:13 -	LMT	1900 Aug 20 12:00
 			 -8:00	-	PST	1942
 			 -8:00	US	P%sT	1946
@@ -493,7 +497,7 @@ Zone America/Metlakatla	 15:13:42 -	LMT	
 			 -8:00	US	P%sT	1946
 			 -8:00	-	PST	1969
 			 -8:00	US	P%sT	1983 Oct 30 2:00
-			 -8:00	US	MeST
+			 -8:00	-	MeST
 Zone America/Yakutat	 14:41:05 -	LMT	1867 Oct 18
 			 -9:18:55 -	LMT	1900 Aug 20 12:00
 			 -9:00	-	YST	1942
@@ -593,8 +597,8 @@ Zone Pacific/Honolulu	-10:31:26 -	LMT	18
 			-10:30	-	HST	1933 Apr 30 2:00 #Laws 1933
 			-10:30	1:00	HDT	1933 May 21 12:00 #Laws 1933+12
 			-10:30	-	HST	1942 Feb 09 2:00 #Schmitt&Cox+2
-			-10:30	1:00	HDT	1945 Sep 30 2:00 #Schmitt&Fox+2
-			-10:30	US	H%sT	1947 Jun  8 2:00 #Schmitt&Fox+2
+			-10:30	1:00	HDT	1945 Sep 30 2:00 #Schmitt&Cox+2
+			-10:30	-	HST	1947 Jun  8 2:00 #Schmitt&Cox+2
 			-10:00	-	HST
 
 # Now we turn to US areas that have diverged from the consensus since 1970.
@@ -1163,12 +1167,29 @@ Rule	StJohns	1960	1986	-	Oct	lastSun	2:0
 # From Paul Eggert (2000-10-02):
 # INMS (2000-09-12) says that, since 1988 at least, Newfoundland switches
 # at 00:01 local time.  For now, assume it started in 1987.
+
+# From Michael Pelley (2011-09-12):
+# We received today, Monday, September 12, 2011, notification that the
+# changes to the Newfoundland Standard Time Act have been proclaimed.
+# The change in the Act stipulates that the change from Daylight Savings
+# Time to Standard Time and from Standard Time to Daylight Savings Time
+# now occurs at 2:00AM.
+# ...
+# 
+# http://www.assembly.nl.ca/legislation/sr/annualstatutes/2011/1106.chp.htm
+# 
+# ...
+# MICHAEL PELLEY  |  Manager of Enterprise Architecture - Solution Delivery
+# Office of the Chief Information Officer
+# Executive Council
+# Government of Newfoundland & Labrador
+
 Rule	StJohns	1987	only	-	Apr	Sun>=1	0:01	1:00	D
 Rule	StJohns	1987	2006	-	Oct	lastSun	0:01	0	S
 Rule	StJohns	1988	only	-	Apr	Sun>=1	0:01	2:00	DD
 Rule	StJohns	1989	2006	-	Apr	Sun>=1	0:01	1:00	D
-Rule	StJohns	2007	max	-	Mar	Sun>=8	0:01	1:00	D
-Rule	StJohns	2007	max	-	Nov	Sun>=1	0:01	0	S
+Rule	StJohns	2007	2011	-	Mar	Sun>=8	0:01	1:00	D
+Rule	StJohns	2007	2010	-	Nov	Sun>=1	0:01	0	S
 #
 # St John's has an apostrophe, but Posix file names can't have apostrophes.
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
@@ -1178,7 +1199,8 @@ Zone America/St_Johns	-3:30:52 -	LMT	188
 			-3:30:52 StJohns N%sT	1935 Mar 30
 			-3:30	StJohns	N%sT	1942 May 11
 			-3:30	Canada	N%sT	1946
-			-3:30	StJohns	N%sT
+			-3:30	StJohns	N%sT	2011 Nov
+			-3:30	Canada	N%sT
 
 # most of east Labrador
 
@@ -1192,7 +1214,8 @@ Zone America/Goose_Bay	-4:01:40 -	LMT	18
 			-3:30	StJohns	N%sT	1942 May 11
 			-3:30	Canada	N%sT	1946
 			-3:30	StJohns	N%sT	1966 Mar 15 2:00
-			-4:00	StJohns	A%sT
+			-4:00	StJohns	A%sT	2011 Nov
+			-4:00	Canada	A%sT
 
 
 # west Labrador, Nova Scotia, Prince Edward I
@@ -1924,20 +1947,69 @@ Zone America/Dawson_Creek -8:00:56 -	LMT
 # daylight saving....
 # http://www.nnsl.com/frames/newspapers/2006-11/nov13_06none.html
 
-# From Chris Walton (2007-03-14):
-# Today I phoned the "hamlet office" to find out what Resolute was doing with
-# its clocks.
-#
-# The individual that answered the phone confirmed that the clocks did not
-# move at the end of daylight saving on October 29/2006.  He also told me that
-# the clocks did not move this past weekend (March 11/2007)....
-
-# From Chris Walton (2008-11-13):
-# ...the residents of Resolute believe that they are changing "time zones"
-# twice a year.  In winter months, local time is qualified with "Eastern
-# Time" which is really "Eastern Standard Time (UTC-5)".  In summer
-# months, local time is qualified with "Central Time" which is really
-# "Central Daylight Time (UTC-5)"...
+# From Chris Walton (2011-03-21):
+# Back in 2007 I initiated the creation of a new "zone file" for Resolute
+# Bay. Resolute Bay is a small community located about 900km north of
+# the Arctic Circle. The zone file was required because Resolute Bay had
+# decided to use UTC-5 instead of UTC-6 for the winter of 2006-2007.
+#
+# According to new information which I received last week, Resolute Bay
+# went back to using UTC-6 in the winter of 2007-2008...
+#
+# On March 11/2007 most of Canada went onto daylight saving. On March
+# 14/2007 I phoned the Resolute Bay hamlet office to do a "time check." I
+# talked to somebody that was both knowledgeable and helpful. I was able
+# to confirm that Resolute Bay was still operating on UTC-5. It was
+# explained to me that Resolute Bay had been on the Eastern Time zone
+# (EST) in the winter, and was now back on the Central Time zone (CDT).
+# i.e. the time zone had changed twice in the last year but the clocks
+# had not moved. The residents had to know which time zone they were in
+# so they could follow the correct TV schedule...
+#
+# On Nov 02/2008 most of Canada went onto standard time. On Nov 03/2008 I
+# phoned the Resolute Bay hamlet office...[D]ue to the challenging nature
+# of the phone call, I decided to seek out an alternate source of
+# information. I found an e-mail address for somebody by the name of
+# Stephanie Adams whose job was listed as "Inns North Support Officer for
+# Arctic Co-operatives." I was under the impression that Stephanie lived
+# and worked in Resolute Bay...
+#
+# On March 14/2011 I phoned the hamlet office again. I was told that
+# Resolute Bay had been using Central Standard Time over the winter of
+# 2010-2011 and that the clocks had therefore been moved one hour ahead
+# on March 13/2011. The person I talked to was aware that Resolute Bay
+# had previously experimented with Eastern Standard Time but he could not
+# tell me when the practice had stopped.
+#
+# On March 17/2011 I searched the Web to find an e-mail address of
+# somebody that might be able to tell me exactly when Resolute Bay went
+# off Eastern Standard Time. I stumbled on the name "Aziz Kheraj." Aziz
+# used to be the mayor of Resolute Bay and he apparently owns half the
+# businesses including "South Camp Inn." This website has some info on
+# Aziz:
+# 
+# http://www.uphere.ca/node/493
+# 
+#
+# I sent Aziz an e-mail asking when Resolute Bay had stopped using
+# Eastern Standard Time.
+#
+# Aziz responded quickly with this: "hi, The time was not changed for the
+# 1 year only, the following year, the community went back to the old way
+# of "spring ahead-fall behind" currently we are zulu plus 5 hrs and in
+# the winter Zulu plus 6 hrs"
+#
+# This of course conflicted with everything I had ascertained in November 2008.
+#
+# I sent Aziz a copy of my 2008 e-mail exchange with Stephanie. Aziz
+# responded with this: "Hi, Stephanie lives in Winnipeg. I live here, You
+# may want to check with the weather office in Resolute Bay or do a
+# search on the weather through Env. Canada. web site"
+#
+# If I had realized the Stephanie did not live in Resolute Bay I would
+# never have contacted her.  I now believe that all the information I
+# obtained in November 2008 should be ignored...
+# I apologize for reporting incorrect information in 2008.
 
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	NT_YK	1918	only	-	Apr	14	2:00	1:00	D
@@ -1965,14 +2037,12 @@ Zone America/Iqaluit	0	-	zzz	1942 Aug # 
 			-6:00	Canada	C%sT	2000 Oct 29 2:00
 			-5:00	Canada	E%sT
 # aka Qausuittuq
-# Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
-Rule	Resolute 2006	max	-	Nov	Sun>=1	2:00	0	ES
-Rule	Resolute 2007	max	-	Mar	Sun>=8	2:00	0	CD
 Zone America/Resolute	0	-	zzz	1947 Aug 31 # Resolute founded
 			-6:00	NT_YK	C%sT	2000 Oct 29 2:00
 			-5:00	-	EST	2001 Apr  1 3:00
 			-6:00	Canada	C%sT	2006 Oct 29 2:00
-			-5:00	Resolute	%sT
+			-5:00	-	EST	2007 Mar 11 3:00
+			-6:00	Canada	C%sT
 # aka Kangiqiniq
 Zone America/Rankin_Inlet 0	-	zzz	1957 # Rankin Inlet founded
 			-6:00	NT_YK	C%sT	2000 Oct 29 2:00

Modified: stable/6/share/zoneinfo/southamerica
==============================================================================
--- stable/6/share/zoneinfo/southamerica	Wed Oct 12 09:17:53 2011	(r226292)
+++ stable/6/share/zoneinfo/southamerica	Wed Oct 12 09:19:21 2011	(r226293)
@@ -797,6 +797,26 @@ Zone	America/La_Paz	-4:32:36 -	LMT	1890
 # 
 # http://www.timeanddate.com/news/time/brazil-dst-2008-2009.html
 # 
+#
+# From Alexander Krivenyshev (2011-10-04):
+# State Bahia will return to Daylight savings time this year after 8 years off.
+# The announcement was made by Governor Jaques Wagner in an interview to a 
+# television station in Salvador. 
+
+# In Portuguese:
+# 
+# http://g1.globo.com/bahia/noticia/2011/10/governador-jaques-wagner-confirma-horario-de-verao-na-bahia.html
+#  and
+# 
+# http://noticias.terra.com.br/brasil/noticias/0,,OI5390887-EI8139,00-Bahia+volta+a+ter+horario+de+verao+apos+oito+anos.html
+# 
+
+# From Guilherme Bernardes Rodrigues (2011-10-07):
+# There is news in the media, however there is still no decree about it.
+# I just send a e-mail to Zulmira Brandão at
+# http://pcdsh01.on.br/ the
+# oficial agency about time in Brazil, and she confirmed that the old rule is
+# still in force.
 
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 # Decree 20,466 (1931-10-01)
@@ -1035,6 +1055,9 @@ Zone America/Maceio	-2:22:52 -	LMT	1914
 Zone America/Bahia	-2:34:04 -	LMT	1914
 			-3:00	Brazil	BR%sT	2003 Sep 24
 			-3:00	-	BRT
+# as noted above, not yet in operation.
+#			-3:00	-	BRT	2011 Oct 16
+#			-3:00	Brazil	BR%sT
 #
 # Goias (GO), Distrito Federal (DF), Minas Gerais (MG),
 # Espirito Santo (ES), Rio de Janeiro (RJ), Sao Paulo (SP), Parana (PR),

Modified: stable/6/share/zoneinfo/zone.tab
==============================================================================
--- stable/6/share/zoneinfo/zone.tab	Wed Oct 12 09:17:53 2011	(r226292)
+++ stable/6/share/zoneinfo/zone.tab	Wed Oct 12 09:19:21 2011	(r226293)
@@ -1,5 +1,5 @@
 # 
-# @(#)zone.tab	8.45
+# @(#)zone.tab	8.49
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 #
@@ -120,7 +120,7 @@ CA	+4901-08816	America/Nipigon	Eastern T
 CA	+4823-08915	America/Thunder_Bay	Eastern Time - Thunder Bay, Ontario
 CA	+6344-06828	America/Iqaluit	Eastern Time - east Nunavut - most locations
 CA	+6608-06544	America/Pangnirtung	Eastern Time - Pangnirtung, Nunavut
-CA	+744144-0944945	America/Resolute	Eastern Standard Time - Resolute, Nunavut
+CA	+744144-0944945	America/Resolute	Central Standard Time - Resolute, Nunavut
 CA	+484531-0913718	America/Atikokan	Eastern Standard Time - Atikokan, Ontario and Southampton I, Nunavut
 CA	+624900-0920459	America/Rankin_Inlet	Central Time - central Nunavut
 CA	+4953-09709	America/Winnipeg	Central Time - Manitoba & west Ontario
@@ -319,7 +319,8 @@ PL	+5215+02100	Europe/Warsaw
 PM	+4703-05620	America/Miquelon
 PN	-2504-13005	Pacific/Pitcairn
 PR	+182806-0660622	America/Puerto_Rico
-PS	+3130+03428	Asia/Gaza
+PS	+3130+03428	Asia/Gaza	Gaza Strip
+PS	+313200+0350542	Asia/Hebron	West Bank
 PT	+3843-00908	Europe/Lisbon	mainland
 PT	+3238-01654	Atlantic/Madeira	Madeira Islands
 PT	+3744-02540	Atlantic/Azores	Azores
@@ -361,6 +362,7 @@ SM	+4355+01228	Europe/San_Marino
 SN	+1440-01726	Africa/Dakar
 SO	+0204+04522	Africa/Mogadishu
 SR	+0550-05510	America/Paramaribo
+SS	+0451+03136	Africa/Juba
 ST	+0020+00644	Africa/Sao_Tome
 SV	+1342-08912	America/El_Salvador
 SX	+180305-0630250	America/Lower_Princes

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 12 09:21:02 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id CF83A1065672;
	Wed, 12 Oct 2011 09:21:02 +0000 (UTC)
	(envelope-from adrian@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id BE4928FC0A;
	Wed, 12 Oct 2011 09:21:02 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9C9L2Mi056639;
	Wed, 12 Oct 2011 09:21:02 GMT (envelope-from adrian@svn.freebsd.org)
Received: (from adrian@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9C9L2ut056637;
	Wed, 12 Oct 2011 09:21:02 GMT (envelope-from adrian@svn.freebsd.org)
Message-Id: <201110120921.p9C9L2ut056637@svn.freebsd.org>
From: Adrian Chadd 
Date: Wed, 12 Oct 2011 09:21:02 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226294 - head/sys/kern
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 12 Oct 2011 09:21:02 -0000

Author: adrian
Date: Wed Oct 12 09:21:02 2011
New Revision: 226294
URL: http://svn.freebsd.org/changeset/base/226294

Log:
  Don't call fixup_filename() on each witness lock call.
  
  This has been irking me for a while. This causes significant
  CPU use on bottlenecked CPUs (eg my older EEEPC w/ an earlier
  Celeron CPU and my MIPS24k boards) when they're passing
  a lot of traffic.
  
  Since the file/line values are only used for printing, this
  should only affect display. It should have no operational
  change on the code, besides reducing CPU use.

Modified:
  head/sys/kern/subr_witness.c

Modified: head/sys/kern/subr_witness.c
==============================================================================
--- head/sys/kern/subr_witness.c	Wed Oct 12 09:19:21 2011	(r226293)
+++ head/sys/kern/subr_witness.c	Wed Oct 12 09:21:02 2011	(r226294)
@@ -1053,7 +1053,6 @@ witness_checkorder(struct lock_object *l
 	w = lock->lo_witness;
 	class = LOCK_CLASS(lock);
 	td = curthread;
-	file = fixup_filename(file);
 
 	if (class->lc_flags & LC_SLEEPLOCK) {
 
@@ -1064,7 +1063,8 @@ witness_checkorder(struct lock_object *l
 		 */
 		if (td->td_critnest != 0 && !kdb_active)
 			panic("blockable sleep lock (%s) %s @ %s:%d",
-			    class->lc_name, lock->lo_name, file, line);
+			    class->lc_name, lock->lo_name,
+			    fixup_filename(file), line);
 
 		/*
 		 * If this is the first lock acquired then just return as
@@ -1102,17 +1102,19 @@ witness_checkorder(struct lock_object *l
 		if ((lock1->li_flags & LI_EXCLUSIVE) != 0 &&
 		    (flags & LOP_EXCLUSIVE) == 0) {
 			printf("shared lock of (%s) %s @ %s:%d\n",
-			    class->lc_name, lock->lo_name, file, line);
+			    class->lc_name, lock->lo_name,
+			    fixup_filename(file), line);
 			printf("while exclusively locked from %s:%d\n",
-			    lock1->li_file, lock1->li_line);
+			    fixup_filename(lock1->li_file), lock1->li_line);
 			panic("share->excl");
 		}
 		if ((lock1->li_flags & LI_EXCLUSIVE) == 0 &&
 		    (flags & LOP_EXCLUSIVE) != 0) {
 			printf("exclusive lock of (%s) %s @ %s:%d\n",
-			    class->lc_name, lock->lo_name, file, line);
+			    class->lc_name, lock->lo_name,
+			    fixup_filename(file), line);
 			printf("while share locked from %s:%d\n",
-			    lock1->li_file, lock1->li_line);
+			    fixup_filename(lock1->li_file), lock1->li_line);
 			panic("excl->share");
 		}
 		return;
@@ -1165,8 +1167,9 @@ witness_checkorder(struct lock_object *l
 			    "acquiring duplicate lock of same type: \"%s\"\n", 
 			    w->w_name);
 			printf(" 1st %s @ %s:%d\n", plock->li_lock->lo_name,
-			       plock->li_file, plock->li_line);
-			printf(" 2nd %s @ %s:%d\n", lock->lo_name, file, line);
+			       fixup_filename(plock->li_file), plock->li_line);
+			printf(" 2nd %s @ %s:%d\n", lock->lo_name,
+			    fixup_filename(file), line);
 			witness_debugger(1);
 		    } else
 			    mtx_unlock_spin(&w_mtx);
@@ -1307,19 +1310,24 @@ witness_checkorder(struct lock_object *l
 			if (i < 0) {
 				printf(" 1st %p %s (%s) @ %s:%d\n",
 				    lock1->li_lock, lock1->li_lock->lo_name,
-				    w1->w_name, lock1->li_file, lock1->li_line);
+				    w1->w_name, fixup_filename(lock1->li_file),
+				    lock1->li_line);
 				printf(" 2nd %p %s (%s) @ %s:%d\n", lock,
-				    lock->lo_name, w->w_name, file, line);
+				    lock->lo_name, w->w_name,
+				    fixup_filename(file), line);
 			} else {
 				printf(" 1st %p %s (%s) @ %s:%d\n",
 				    lock2->li_lock, lock2->li_lock->lo_name,
 				    lock2->li_lock->lo_witness->w_name,
-				    lock2->li_file, lock2->li_line);
+				    fixup_filename(lock2->li_file),
+				    lock2->li_line);
 				printf(" 2nd %p %s (%s) @ %s:%d\n",
 				    lock1->li_lock, lock1->li_lock->lo_name,
-				    w1->w_name, lock1->li_file, lock1->li_line);
+				    w1->w_name, fixup_filename(lock1->li_file),
+				    lock1->li_line);
 				printf(" 3rd %p %s (%s) @ %s:%d\n", lock,
-				    lock->lo_name, w->w_name, file, line);
+				    lock->lo_name, w->w_name,
+				    fixup_filename(file), line);
 			}
 			witness_debugger(1);
 			return;
@@ -1356,7 +1364,6 @@ witness_lock(struct lock_object *lock, i
 		return;
 	w = lock->lo_witness;
 	td = curthread;
-	file = fixup_filename(file);
 
 	/* Determine lock list for this lock. */
 	if (LOCK_CLASS(lock)->lc_flags & LC_SLEEPLOCK)
@@ -1413,27 +1420,31 @@ witness_upgrade(struct lock_object *lock
 	if (lock->lo_witness == NULL || witness_watch == -1 || panicstr != NULL)
 		return;
 	class = LOCK_CLASS(lock);
-	file = fixup_filename(file);
 	if (witness_watch) {
 		if ((lock->lo_flags & LO_UPGRADABLE) == 0)
 			panic("upgrade of non-upgradable lock (%s) %s @ %s:%d",
-			    class->lc_name, lock->lo_name, file, line);
+			    class->lc_name, lock->lo_name,
+			    fixup_filename(file), line);
 		if ((class->lc_flags & LC_SLEEPLOCK) == 0)
 			panic("upgrade of non-sleep lock (%s) %s @ %s:%d",
-			    class->lc_name, lock->lo_name, file, line);
+			    class->lc_name, lock->lo_name,
+			    fixup_filename(file), line);
 	}
 	instance = find_instance(curthread->td_sleeplocks, lock);
 	if (instance == NULL)
 		panic("upgrade of unlocked lock (%s) %s @ %s:%d",
-		    class->lc_name, lock->lo_name, file, line);
+		    class->lc_name, lock->lo_name,
+		    fixup_filename(file), line);
 	if (witness_watch) {
 		if ((instance->li_flags & LI_EXCLUSIVE) != 0)
 			panic("upgrade of exclusive lock (%s) %s @ %s:%d",
-			    class->lc_name, lock->lo_name, file, line);
+			    class->lc_name, lock->lo_name,
+			    fixup_filename(file), line);
 		if ((instance->li_flags & LI_RECURSEMASK) != 0)
 			panic("upgrade of recursed lock (%s) %s r=%d @ %s:%d",
 			    class->lc_name, lock->lo_name,
-			    instance->li_flags & LI_RECURSEMASK, file, line);
+			    instance->li_flags & LI_RECURSEMASK,
+			    fixup_filename(file), line);
 	}
 	instance->li_flags |= LI_EXCLUSIVE;
 }
@@ -1449,23 +1460,26 @@ witness_downgrade(struct lock_object *lo
 	if (lock->lo_witness == NULL || witness_watch == -1 || panicstr != NULL)
 		return;
 	class = LOCK_CLASS(lock);
-	file = fixup_filename(file);
 	if (witness_watch) {
 		if ((lock->lo_flags & LO_UPGRADABLE) == 0)
 		panic("downgrade of non-upgradable lock (%s) %s @ %s:%d",
-			    class->lc_name, lock->lo_name, file, line);
+			    class->lc_name, lock->lo_name,
+			    fixup_filename(file), line);
 		if ((class->lc_flags & LC_SLEEPLOCK) == 0)
 			panic("downgrade of non-sleep lock (%s) %s @ %s:%d",
-			    class->lc_name, lock->lo_name, file, line);
+			    class->lc_name, lock->lo_name,
+			    fixup_filename(file), line);
 	}
 	instance = find_instance(curthread->td_sleeplocks, lock);
 	if (instance == NULL)
 		panic("downgrade of unlocked lock (%s) %s @ %s:%d",
-		    class->lc_name, lock->lo_name, file, line);
+		    class->lc_name, lock->lo_name,
+		    fixup_filename(file), line);
 	if (witness_watch) {
 		if ((instance->li_flags & LI_EXCLUSIVE) == 0)
 			panic("downgrade of shared lock (%s) %s @ %s:%d",
-			    class->lc_name, lock->lo_name, file, line);
+			    class->lc_name, lock->lo_name,
+			    fixup_filename(file), line);
 		if ((instance->li_flags & LI_RECURSEMASK) != 0)
 			panic("downgrade of recursed lock (%s) %s r=%d @ %s:%d",
 			    class->lc_name, lock->lo_name,
@@ -1488,7 +1502,6 @@ witness_unlock(struct lock_object *lock,
 		return;
 	td = curthread;
 	class = LOCK_CLASS(lock);
-	file = fixup_filename(file);
 
 	/* Find lock instance associated with this lock. */
 	if (class->lc_flags & LC_SLEEPLOCK)
@@ -1511,7 +1524,7 @@ witness_unlock(struct lock_object *lock,
 	 */
 	if (witness_watch > 0)
 		panic("lock (%s) %s not locked @ %s:%d", class->lc_name,
-		    lock->lo_name, file, line);
+		    lock->lo_name, fixup_filename(file), line);
 	else
 		return;
 found:
@@ -1520,16 +1533,18 @@ found:
 	if ((instance->li_flags & LI_EXCLUSIVE) != 0 && witness_watch > 0 &&
 	    (flags & LOP_EXCLUSIVE) == 0) {
 		printf("shared unlock of (%s) %s @ %s:%d\n", class->lc_name,
-		    lock->lo_name, file, line);
+		    lock->lo_name,
+		    fixup_filename(file), line);
 		printf("while exclusively locked from %s:%d\n",
-		    instance->li_file, instance->li_line);
+		    fixup_filename(instance->li_file), instance->li_line);
 		panic("excl->ushare");
 	}
 	if ((instance->li_flags & LI_EXCLUSIVE) == 0 && witness_watch > 0 &&
 	    (flags & LOP_EXCLUSIVE) != 0) {
 		printf("exclusive unlock of (%s) %s @ %s:%d\n", class->lc_name,
-		    lock->lo_name, file, line);
-		printf("while share locked from %s:%d\n", instance->li_file,
+		    lock->lo_name, fixup_filename(file), line);
+		printf("while share locked from %s:%d\n",
+		    fixup_filename(instance->li_file),
 		    instance->li_line);
 		panic("share->uexcl");
 	}
@@ -1544,7 +1559,7 @@ found:
 	/* The lock is now being dropped, check for NORELEASE flag */
 	if ((instance->li_flags & LI_NORELEASE) != 0 && witness_watch > 0) {
 		printf("forbidden unlock of (%s) %s @ %s:%d\n", class->lc_name,
-		    lock->lo_name, file, line);
+		    lock->lo_name, fixup_filename(file), line);
 		panic("lock marked norelease");
 	}
 
@@ -2074,7 +2089,8 @@ witness_list_lock(struct lock_instance *
 	if (lock->lo_witness->w_name != lock->lo_name)
 		prnt(" (%s)", lock->lo_witness->w_name);
 	prnt(" r = %d (%p) locked @ %s:%d\n",
-	    instance->li_flags & LI_RECURSEMASK, lock, instance->li_file,
+	    instance->li_flags & LI_RECURSEMASK, lock,
+	    fixup_filename(instance->li_file),
 	    instance->li_line);
 }
 
@@ -2211,12 +2227,12 @@ witness_assert(struct lock_object *lock,
 		panic("Lock (%s) %s is not sleep or spin!",
 		    class->lc_name, lock->lo_name);
 	}
-	file = fixup_filename(file);
 	switch (flags) {
 	case LA_UNLOCKED:
 		if (instance != NULL)
 			panic("Lock (%s) %s locked @ %s:%d.",
-			    class->lc_name, lock->lo_name, file, line);
+			    class->lc_name, lock->lo_name,
+			    fixup_filename(file), line);
 		break;
 	case LA_LOCKED:
 	case LA_LOCKED | LA_RECURSED:
@@ -2229,28 +2245,34 @@ witness_assert(struct lock_object *lock,
 	case LA_XLOCKED | LA_NOTRECURSED:
 		if (instance == NULL) {
 			panic("Lock (%s) %s not locked @ %s:%d.",
-			    class->lc_name, lock->lo_name, file, line);
+			    class->lc_name, lock->lo_name,
+			    fixup_filename(file), line);
 			break;
 		}
 		if ((flags & LA_XLOCKED) != 0 &&
 		    (instance->li_flags & LI_EXCLUSIVE) == 0)
 			panic("Lock (%s) %s not exclusively locked @ %s:%d.",
-			    class->lc_name, lock->lo_name, file, line);
+			    class->lc_name, lock->lo_name,
+			    fixup_filename(file), line);
 		if ((flags & LA_SLOCKED) != 0 &&
 		    (instance->li_flags & LI_EXCLUSIVE) != 0)
 			panic("Lock (%s) %s exclusively locked @ %s:%d.",
-			    class->lc_name, lock->lo_name, file, line);
+			    class->lc_name, lock->lo_name,
+			    fixup_filename(file), line);
 		if ((flags & LA_RECURSED) != 0 &&
 		    (instance->li_flags & LI_RECURSEMASK) == 0)
 			panic("Lock (%s) %s not recursed @ %s:%d.",
-			    class->lc_name, lock->lo_name, file, line);
+			    class->lc_name, lock->lo_name,
+			    fixup_filename(file), line);
 		if ((flags & LA_NOTRECURSED) != 0 &&
 		    (instance->li_flags & LI_RECURSEMASK) != 0)
 			panic("Lock (%s) %s recursed @ %s:%d.",
-			    class->lc_name, lock->lo_name, file, line);
+			    class->lc_name, lock->lo_name,
+			    fixup_filename(file), line);
 		break;
 	default:
-		panic("Invalid lock assertion at %s:%d.", file, line);
+		panic("Invalid lock assertion at %s:%d.",
+		    fixup_filename(file), line);
 
 	}
 #endif	/* INVARIANT_SUPPORT */

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 12 09:28:09 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E7059106566C;
	Wed, 12 Oct 2011 09:28:09 +0000 (UTC) (envelope-from ed@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id BCFB88FC0A;
	Wed, 12 Oct 2011 09:28:09 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9C9S9Nc056931;
	Wed, 12 Oct 2011 09:28:09 GMT (envelope-from ed@svn.freebsd.org)
Received: (from ed@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9C9S9Xq056929;
	Wed, 12 Oct 2011 09:28:09 GMT (envelope-from ed@svn.freebsd.org)
Message-Id: <201110120928.p9C9S9Xq056929@svn.freebsd.org>
From: Ed Schouten 
Date: Wed, 12 Oct 2011 09:28:09 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226295 - stable/9/sys/teken
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 12 Oct 2011 09:28:10 -0000

Author: ed
Date: Wed Oct 12 09:28:09 2011
New Revision: 226295
URL: http://svn.freebsd.org/changeset/base/226295

Log:
  MFC r226099:
  
    Tab should not blank cells.
  
    It seems I was under the impression that a tab differs from a single
    forward tabulation, namely that it blanks the underlying cells. This
    seems not to be the case. They are identical.
  
    This should fix applications like jove(1) that use tabs instead of
    explicit cursor position setting.
  
    Reported by:  Brett Glass 
  
  MFC r226183:
  
    Properly use the cursor to bound the position for CUP.
  
    We must take the origin region into account when clamping the cursor
    position.
  
  Approved by:	re@ (kib)

Modified:
  stable/9/sys/teken/teken_subr.h
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/amd64/include/xen/   (props changed)
  stable/9/sys/boot/   (props changed)
  stable/9/sys/boot/i386/efi/   (props changed)
  stable/9/sys/boot/ia64/efi/   (props changed)
  stable/9/sys/boot/ia64/ski/   (props changed)
  stable/9/sys/boot/powerpc/boot1.chrp/   (props changed)
  stable/9/sys/boot/powerpc/ofw/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)
  stable/9/sys/conf/   (props changed)
  stable/9/sys/contrib/dev/acpica/   (props changed)
  stable/9/sys/contrib/octeon-sdk/   (props changed)
  stable/9/sys/contrib/pf/   (props changed)
  stable/9/sys/contrib/x86emu/   (props changed)

Modified: stable/9/sys/teken/teken_subr.h
==============================================================================
--- stable/9/sys/teken/teken_subr.h	Wed Oct 12 09:21:02 2011	(r226294)
+++ stable/9/sys/teken/teken_subr.h	Wed Oct 12 09:28:09 2011	(r226295)
@@ -325,7 +325,7 @@ teken_subr_cursor_position(teken_t *t, u
 {
 
 	t->t_cursor.tp_row = t->t_originreg.ts_begin + row - 1;
-	if (row >= t->t_originreg.ts_end)
+	if (t->t_cursor.tp_row >= t->t_originreg.ts_end)
 		t->t_cursor.tp_row = t->t_originreg.ts_end - 1;
 
 	t->t_cursor.tp_col = col - 1;
@@ -595,20 +595,7 @@ static void
 teken_subr_horizontal_tab(teken_t *t)
 {
 
-	if (t->t_stateflags & TS_CONS25) {
-		teken_subr_cursor_forward_tabulation(t, 1);
-	} else {
-		teken_rect_t tr;
-
-		tr.tr_begin = t->t_cursor;
-		teken_subr_cursor_forward_tabulation(t, 1);
-		tr.tr_end.tp_row = tr.tr_begin.tp_row + 1;
-		tr.tr_end.tp_col = t->t_cursor.tp_col;
-
-		/* Blank region that we skipped. */
-		if (tr.tr_end.tp_col > tr.tr_begin.tp_col)
-			teken_funcs_fill(t, &tr, BLANK, &t->t_curattr);
-	}
+	teken_subr_cursor_forward_tabulation(t, 1);
 }
 
 static void

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 12 10:19:55 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 73280106566C;
	Wed, 12 Oct 2011 10:19:55 +0000 (UTC)
	(envelope-from adrian@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 633FE8FC08;
	Wed, 12 Oct 2011 10:19:55 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9CAJtaU061876;
	Wed, 12 Oct 2011 10:19:55 GMT (envelope-from adrian@svn.freebsd.org)
Received: (from adrian@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9CAJtQG061874;
	Wed, 12 Oct 2011 10:19:55 GMT (envelope-from adrian@svn.freebsd.org)
Message-Id: <201110121019.p9CAJtQG061874@svn.freebsd.org>
From: Adrian Chadd 
Date: Wed, 12 Oct 2011 10:19:55 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226296 - head/sys/net80211
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 12 Oct 2011 10:19:55 -0000

Author: adrian
Date: Wed Oct 12 10:19:55 2011
New Revision: 226296
URL: http://svn.freebsd.org/changeset/base/226296

Log:
  Fix an unused variable warning/error when invariants isn't enabled.
  
  Reported by:	bz

Modified:
  head/sys/net80211/ieee80211_tdma.c

Modified: head/sys/net80211/ieee80211_tdma.c
==============================================================================
--- head/sys/net80211/ieee80211_tdma.c	Wed Oct 12 09:28:09 2011	(r226295)
+++ head/sys/net80211/ieee80211_tdma.c	Wed Oct 12 10:19:55 2011	(r226296)
@@ -285,9 +285,8 @@ static void
 tdma_beacon_miss(struct ieee80211vap *vap)
 {
 	struct ieee80211_tdma_state *ts = vap->iv_tdma;
-	struct ieee80211com *ic = vap->iv_ic;
 
-	IEEE80211_LOCK_ASSERT(ic);
+	IEEE80211_LOCK_ASSERT(vap->iv_ic);
 
 	KASSERT((vap->iv_ic->ic_flags & IEEE80211_F_SCAN) == 0, ("scanning"));
 	KASSERT(vap->iv_state == IEEE80211_S_RUN,

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 12 11:06:56 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5CC0C106564A;
	Wed, 12 Oct 2011 11:06:56 +0000 (UTC)
	(envelope-from edwin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 4BCBC8FC0A;
	Wed, 12 Oct 2011 11:06:56 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9CB6uT8063387;
	Wed, 12 Oct 2011 11:06:56 GMT (envelope-from edwin@svn.freebsd.org)
Received: (from edwin@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9CB6uM7063385;
	Wed, 12 Oct 2011 11:06:56 GMT (envelope-from edwin@svn.freebsd.org)
Message-Id: <201110121106.p9CB6uM7063385@svn.freebsd.org>
From: Edwin Groothuis 
Date: Wed, 12 Oct 2011 11:06:56 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226297 - stable/9/share/misc
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 12 Oct 2011 11:06:56 -0000

Author: edwin
Date: Wed Oct 12 11:06:55 2011
New Revision: 226297
URL: http://svn.freebsd.org/changeset/base/226297

Log:
  MFC of r226283
  
  Updates from Newsletter VI-9 and VI-10:
  
      Newsletter VI-9 2011-06-12
      Name changes for Fiji and Myanmar as well as other minor corrections.
  
      Newsletter VI-10 2011-08-09
      Code elements for South Sudan.
  
  Approved by:	re (Kostik)
  Obtained from:	http://www.iso.org/iso/country_codes.html

Modified:
  stable/9/share/misc/iso3166
Directory Properties:
  stable/9/share/misc/   (props changed)

Modified: stable/9/share/misc/iso3166
==============================================================================
--- stable/9/share/misc/iso3166	Wed Oct 12 10:19:55 2011	(r226296)
+++ stable/9/share/misc/iso3166	Wed Oct 12 11:06:55 2011	(r226297)
@@ -46,7 +46,7 @@ BJ	BEN	204	Benin
 BM	BMU	060	Bermuda
 BT	BTN	064	Bhutan
 BO	BOL	068	Bolivia, Plurinational State of
-BQ	BES	535	Bonaire, Saint Eustatius and Saba
+BQ	BES	535	Bonaire, Sint Eustatius and Saba
 BA	BIH	070	Bosnia and Herzegovina
 BW	BWA	072	Botswana
 BV	BVT	074	Bouvet Island
@@ -224,11 +224,12 @@ SB	SLB	090	Solomon Islands
 SO	SOM	706	Somalia
 ZA	ZAF	710	South Africa
 GS	SGS	239	South Georgia and the South Sandwich Islands
+SS	SSD	728	South Sudan
 ES	ESP	724	Spain
 LK	LKA	144	Sri Lanka
 SH	SHN	654	Saint Helena, Ascension and Tristan da Cunha
 PM	SPM	666	Saint Pierre and Miquelon
-SD	SDN	736	Sudan
+SD	SDN	729	Sudan
 SR	SUR	740	Suriname
 SJ	SJM	744	Svalbard and Jan Mayen
 SZ	SWZ	748	Swaziland
@@ -547,3 +548,10 @@ ZW	ZWE	716	Zimbabwe
 #  BONAIRE, SAINT EUSTATIUS AND SABA (BQ), CURACAO (CW) and
 #  SINT MAARTEN (DUTCH PART) (SX) added as new entries.
 #  NETHERLANDS ANTILLES (AN) removed.
+#
+# Newsletter VI-9 2011-06-12
+#  Name changes for Fiji and Myanmar as well as other minor corrections
+#
+# Newsletter VI-10 2011-08-09
+#  Code elements for South Sudan.
+#

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 12 11:08:10 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 59AE8106564A;
	Wed, 12 Oct 2011 11:08:10 +0000 (UTC)
	(envelope-from edwin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 470A18FC16;
	Wed, 12 Oct 2011 11:08:10 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9CB8AaG063471;
	Wed, 12 Oct 2011 11:08:10 GMT (envelope-from edwin@svn.freebsd.org)
Received: (from edwin@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9CB8ATJ063463;
	Wed, 12 Oct 2011 11:08:10 GMT (envelope-from edwin@svn.freebsd.org)
Message-Id: <201110121108.p9CB8ATJ063463@svn.freebsd.org>
From: Edwin Groothuis 
Date: Wed, 12 Oct 2011 11:08:10 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226298 - stable/9/contrib/tzdata
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 12 Oct 2011 11:08:10 -0000

Author: edwin
Date: Wed Oct 12 11:08:09 2011
New Revision: 226298
URL: http://svn.freebsd.org/changeset/base/226298

Log:
  MFC of tzdata2011l, 226289
  
  Changes in 2011i:
  
      Africa
      - Added South Sudan: Africa/Juba
  
      Australasia:
      - Samoa will go forward 24 hours at 30 December 2011 to better match
        the day of the week with its neighbours.
  
      Europe:
      - Europe/Kaliningrad will have the timezone KALT.
  
      North America:
      - Updates to Metlakatla historical data
      - Newfoundland, Labrador and Resolute will do something which I
        can't figure out.
  
      iso3166tab;
      - Add SS for South Sudan.
  
  Changes in 2011j:
  
      - Samoa will go from 29 December 23:59:59 to 31 December 00:00:00.
      - Samoa DST will end on 1 April 2012
  
  Changes in 2011k:
  
      - Gaza / West Bank goes back to standard time on 02 August 2011.
      - West Bank went bac kto DST on 30 August 2011.
      - Lots of changes in Minsk (GMT+3 without DST) and other Russian
        regions. A new timezone has been created for them, FET: Further-eastern
        European Time aka GMT+3.
      - Add Asian/Hebron to the zone.tab file.
  
  Changes in 2011l:
  
      - West Bank came out of DST on 30 September 2011.
      - Fiji will g oin DST on 23 October and out of it on 26 Februari
      - State Bahia might go back to DST in 16 October 2011
  
      Due to legal problems, ado and Paul Eggert have to temporary suspend
      their work on the timezone database
      (http://thread.gmane.org/gmane.comp.time.tz/4133). Their work has
      been continued by volunteers on the tz community and the hosting
      of the data files is done by Robert Elz at ftp://munnari.oz.au/pub/.
  
  Obtained from:	ftp://munnari.oz.au/pub, ftp://elsie.nci.nih.gov/pub/
  Approved by:	re (Kostik)

Modified:
  stable/9/contrib/tzdata/africa
  stable/9/contrib/tzdata/asia
  stable/9/contrib/tzdata/australasia
  stable/9/contrib/tzdata/europe
  stable/9/contrib/tzdata/northamerica
  stable/9/contrib/tzdata/southamerica
  stable/9/contrib/tzdata/zone.tab
Directory Properties:
  stable/9/contrib/tzdata/   (props changed)

Modified: stable/9/contrib/tzdata/africa
==============================================================================
--- stable/9/contrib/tzdata/africa	Wed Oct 12 11:06:55 2011	(r226297)
+++ stable/9/contrib/tzdata/africa	Wed Oct 12 11:08:09 2011	(r226298)
@@ -1,5 +1,5 @@
 # 
-# @(#)africa	8.31
+# @(#)africa	8.33
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -58,7 +58,7 @@
 # I invented the following abbreviations; corrections are welcome!
 #	 2:00	WAST	West Africa Summer Time
 #	 2:30	BEAT	British East Africa Time (no longer used)
-#	 2:44:45 BEAUT	British East Africa Unified Time (no longer used)
+#	 2:45	BEAUT	British East Africa Unified Time (no longer used)
 #	 3:00	CAST	Central Africa Summer Time (no longer used)
 #	 3:00	SAST	South Africa Summer Time (no longer used)
 #	 3:00	EAT	East Africa Time
@@ -396,7 +396,7 @@ Zone	Africa/Bissau	-1:02:20 -	LMT	1911 M
 Zone	Africa/Nairobi	2:27:16	-	LMT	1928 Jul
 			3:00	-	EAT	1930
 			2:30	-	BEAT	1940
-			2:44:45	-	BEAUT	1960
+			2:45	-	BEAUT	1960
 			3:00	-	EAT
 
 # Lesotho
@@ -957,6 +957,11 @@ Zone	Africa/Khartoum	2:10:08 -	LMT	1931
 			2:00	Sudan	CA%sT	2000 Jan 15 12:00
 			3:00	-	EAT
 
+# South Sudan
+Zone	Africa/Juba	2:06:24 -	LMT	1931
+			2:00	Sudan	CA%sT	2000 Jan 15 12:00
+			3:00	-	EAT
+
 # Swaziland
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Africa/Mbabane	2:04:24 -	LMT	1903 Mar
@@ -966,7 +971,7 @@ Zone	Africa/Mbabane	2:04:24 -	LMT	1903 M
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone Africa/Dar_es_Salaam 2:37:08 -	LMT	1931
 			3:00	-	EAT	1948
-			2:44:45	-	BEAUT	1961
+			2:45	-	BEAUT	1961
 			3:00	-	EAT
 
 # Togo
@@ -1092,7 +1097,7 @@ Zone	Africa/Tunis	0:40:44 -	LMT	1881 May
 Zone	Africa/Kampala	2:09:40 -	LMT	1928 Jul
 			3:00	-	EAT	1930
 			2:30	-	BEAT	1948
-			2:44:45	-	BEAUT	1957
+			2:45	-	BEAUT	1957
 			3:00	-	EAT
 
 # Zambia

Modified: stable/9/contrib/tzdata/asia
==============================================================================
--- stable/9/contrib/tzdata/asia	Wed Oct 12 11:06:55 2011	(r226297)
+++ stable/9/contrib/tzdata/asia	Wed Oct 12 11:08:09 2011	(r226298)
@@ -1,4 +1,4 @@
-# @(#)asia	8.65
+# @(#)asia	8.68
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -2194,7 +2194,47 @@ Zone	Asia/Karachi	4:28:12 -	LMT	1907
 # http://www.timeanddate.com/news/time/westbank-gaza-end-dst-2010.html
 # 
 
+# From Steffen Thorsen (2011-08-26):
+# Gaza and the West Bank did go back to standard time in the beginning of
+# August, and will now enter daylight saving time again on 2011-08-30
+# 00:00 (so two periods of DST in 2011). The pause was because of
+# Ramadan.
+#
+# 
+# http://www.maannews.net/eng/ViewDetails.aspx?ID=416217
+# 
+# Additional info:
+# 
+# http://www.timeanddate.com/news/time/palestine-dst-2011.html
+# 
+
+# From Alexander Krivenyshev (2011-08-27):
+# According to the article in The Jerusalem Post:
+# "...Earlier this month, the Palestinian government in the West Bank decided to
+# move to standard time for 30 days, during Ramadan. The Palestinians in the
+# Gaza Strip accepted the change and also moved their clocks one hour back.
+# The Hamas government said on Saturday that it won't observe summertime after
+# the Muslim feast of Id al-Fitr, which begins on Tuesday..."
+# ...
+# 
+# http://www.jpost.com/MiddleEast/Article.aspx?id=235650
+# 
+# or
+# 
+# http://www.worldtimezone.com/dst_news/dst_news_gazastrip05.html
+# 
 # The rules for Egypt are stolen from the `africa' file.
+
+# From Steffen Thorsen (2011-09-30):
+# West Bank did end Daylight Saving Time this morning/midnight (2011-09-30 
+# 00:00).
+# So West Bank and Gaza now have the same time again.
+#
+# Many sources, including:
+# 
+# http://www.maannews.net/eng/ViewDetails.aspx?ID=424808
+# 
+
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule EgyptAsia	1957	only	-	May	10	0:00	1:00	S
 Rule EgyptAsia	1957	1958	-	Oct	 1	0:00	0	-
@@ -2210,19 +2250,37 @@ Rule Palestine	2005	only	-	Oct	 4	2:00	0
 Rule Palestine	2006	2008	-	Apr	 1	0:00	1:00	S
 Rule Palestine	2006	only	-	Sep	22	0:00	0	-
 Rule Palestine	2007	only	-	Sep	Thu>=8	2:00	0	-
-Rule Palestine	2008	only	-	Aug	lastFri	2:00	0	-
+Rule Palestine	2008	only	-	Aug	lastFri	0:00	0	-
 Rule Palestine	2009	only	-	Mar	lastFri	0:00	1:00	S
-Rule Palestine	2010	max	-	Mar	lastSat	0:01	1:00	S
-Rule Palestine	2009	max	-	Sep	Fri>=1	2:00	0	-
+Rule Palestine	2009	only	-	Sep	Fri>=1	2:00	0	-
+Rule Palestine	2010	only	-	Mar	lastSat	0:01	1:00	S
 Rule Palestine	2010	only	-	Aug	11	0:00	0	-
 
+# From Arthur David Olson (2011-09-20):
+# 2011 transitions per http://www.timeanddate.com as of 2011-09-20.
+
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Gaza	2:17:52	-	LMT	1900 Oct
 			2:00	Zion	EET	1948 May 15
 			2:00 EgyptAsia	EE%sT	1967 Jun  5
 			2:00	Zion	I%sT	1996
 			2:00	Jordan	EE%sT	1999
-			2:00 Palestine	EE%sT
+			2:00 Palestine	EE%sT	2011 Apr  2 12:01
+			2:00	1:00	EEST	2011 Aug  1
+			2:00	-	EET
+
+Zone	Asia/Hebron	2:20:23	-	LMT	1900 Oct
+			2:00	Zion	EET	1948 May 15
+			2:00 EgyptAsia	EE%sT	1967 Jun  5
+			2:00	Zion	I%sT	1996
+			2:00	Jordan	EE%sT	1999
+			2:00 Palestine	EE%sT	2008 Aug
+			2:00 	1:00	EEST	2008 Sep
+			2:00 Palestine	EE%sT	2011 Apr  1 12:01
+			2:00	1:00	EEST	2011 Aug  1
+			2:00	-	EET	2011 Aug 30
+			2:00	1:00	EEST	2011 Sep 30 3:00
+			2:00	-	EET
 
 # Paracel Is
 # no information

Modified: stable/9/contrib/tzdata/australasia
==============================================================================
--- stable/9/contrib/tzdata/australasia	Wed Oct 12 11:06:55 2011	(r226297)
+++ stable/9/contrib/tzdata/australasia	Wed Oct 12 11:08:09 2011	(r226298)
@@ -1,5 +1,5 @@
 # 
-# @(#)australasia	8.23
+# @(#)australasia	8.27
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -296,6 +296,18 @@ Zone	Indian/Cocos	6:27:40	-	LMT	1900
 # http://www.worldtimezone.com/dst_news/dst_news_fiji04.html
 # 
 
+# From Steffen Thorsen (2011-10-03):
+# Now the dates have been confirmed, and at least our start date 
+# assumption was correct (end date was one week wrong).
+#
+# 
+# www.fiji.gov.fj/index.php?option=com_content&view=article&id=4966:daylight-saving-starts-in-fiji&catid=71:press-releases&Itemid=155
+# 
+# which says
+# Members of the public are reminded to change their time to one hour in 
+# advance at 2am to 3am on October 23, 2011 and one hour back at 3am to 
+# 2am on February 26 next year.
+
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Fiji	1998	1999	-	Nov	Sun>=1	2:00	1:00	S
 Rule	Fiji	1999	2000	-	Feb	lastSun	3:00	0	-
@@ -303,6 +315,8 @@ Rule	Fiji	2009	only	-	Nov	29	2:00	1:00	S
 Rule	Fiji	2010	only	-	Mar	lastSun	3:00	0	-
 Rule	Fiji	2010	only	-	Oct	24	2:00	1:00	S
 Rule	Fiji	2011	only	-	Mar	Sun>=1	3:00	0	-
+Rule	Fiji	2011	only	-	Oct	23	2:00	1:00	S
+Rule	Fiji	2012	only	-	Feb	26	3:00	0	-
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Pacific/Fiji	11:53:40 -	LMT	1915 Oct 26	# Suva
 			12:00	Fiji	FJ%sT	# Fiji Time
@@ -499,7 +513,7 @@ Zone Pacific/Pago_Pago	 12:37:12 -	LMT	1
 # http://www.parliament.gov.ws/documents/acts/Daylight%20Saving%20Act%20%202009%20%28English%29%20-%20Final%207-7-091.pdf
 # 
 
-# From Raymond Hughes (2010-10-07):
+# From Laupue Raymond Hughes (2010-10-07):
 # Please see
 # 
 # http://www.mcil.gov.ws
@@ -509,7 +523,7 @@ Zone Pacific/Pago_Pago	 12:37:12 -	LMT	1
 # to 01:00am and First Sunday April 2011 (03/04/11) - adjust clocks
 # backwards from 1:00am to 12:00am"
 
-# From Raymond Hughes (2011-03-07)
+# From Laupue Raymond Hughes (2011-03-07):
 # I believe this will be posted shortly on the website
 # 
 # www.mcil.gov.ws
@@ -529,12 +543,74 @@ Zone Pacific/Pago_Pago	 12:37:12 -	LMT	1
 # Margaret Fruean ACTING CHIEF EXECUTIVE OFFICER MINISTRY OF COMMERCE,
 # INDUSTRY AND LABOUR 28th February 2011
 
+# From David Zuelke (2011-05-09):
+# Subject: Samoa to move timezone from east to west of international date line
+# 
+# 
+# http://www.morningstar.co.uk/uk/markets/newsfeeditem.aspx?id=138501958347963
+# 
+
+# From Mark Sim-Smith (2011-08-17):
+# I have been in contact with Leilani Tuala Warren from the Samoa Law
+# Reform Commission, and she has sent me a copy of the Bill that she
+# confirmed has been passed...Most of the sections are about maps rather
+# than the time zone change, but I'll paste the relevant bits below. But
+# the essence is that at midnight 29 Dec (UTC-11 I suppose), Samoa
+# changes from UTC-11 to UTC+13:
+#
+# International Date Line Bill 2011
+#
+# AN ACT to provide for the change to standard time in Samoa and to make
+# consequential amendments to the position of the International Date
+# Line, and for related purposes.
+#
+# BE IT ENACTED by the Legislative Assembly of Samoa in Parliament
+# assembled as follows:
+#
+# 1. Short title and commencement-(1) This Act may be cited as the
+# International Date Line Act 2011. (2) Except for section 5(3) this Act
+# commences at 12 o'clock midnight, on Thursday 29th December 2011. (3)
+# Section 5(3) commences on the date of assent by the Head of State.
+#
+# [snip]
+#
+# 3. Interpretation - [snip] "Samoa standard time" in this Act and any
+# other statute of Samoa which refers to 'Samoa standard time' means the
+# time 13 hours in advance of Co-ordinated Universal Time.
+#
+# 4. Samoa standard time - (1) Upon the commencement of this Act, Samoa
+# standard time shall be set at 13 hours in advance of Co-ordinated
+# Universal Time for the whole of Samoa. (2) All references to Samoa's
+# time zone and to Samoa standard time in Samoa in all legislation and
+# instruments after the commencement of this Act shall be references to
+# Samoa standard time as provided for in this Act. (3) Nothing in this
+# Act affects the provisions of the Daylight Saving Act 2009, except that
+# it defines Samoa standard time....
+
+# From Laupue Raymond Hughes (2011-09-02):
+# 
+# http://www.mcil.gov.ws/mcil_publications.html
+# 
+#
+# here is the official website publication for Samoa DST and dateline change
+#
+# DST
+# Year	End	Time	Start	Time
+# 2011	- - -	- - -	24 September	3:00am to 4:00am
+# 2012	01 April	4:00am to 3:00am	- - -	- - -
+#
+# Dateline Change skip Friday 30th Dec 2011
+# Thursday 29th December 2011	23:59:59 Hours
+# Saturday 31st December 2011	00:00:00 Hours
 Zone Pacific/Apia	 12:33:04 -	LMT	1879 Jul  5
 			-11:26:56 -	LMT	1911
 			-11:30	-	SAMT	1950		# Samoa Time
 			-11:00	-	WST	2010 Sep 26
 			-11:00	1:00	WSDT	2011 Apr 2 4:00
-			-11:00	-	WST
+			-11:00	-	WST	2011 Sep 24 3:00
+			-11:00	1:00	WSDT	2011 Dec 30
+			 13:00	1:00	WSDT	2012 Apr 1 4:00
+			 13:00	-	WST
 
 # Solomon Is
 # excludes Bougainville, for which see Papua New Guinea
@@ -1206,7 +1282,7 @@ Zone	Pacific/Wallis	12:15:20 -	LMT	1901
 # Lord Howe Island Board (controlling authority for the Island) is
 # seeking the community's views on various options for summer time
 # arrangements on the Island, e.g. advance clocks by 1 full hour
-# instead of only 30 minutes.  Dependant on the wishes of residents
+# instead of only 30 minutes.  [Dependent] on the wishes of residents
 # the Board may approach the NSW government to change the existing
 # arrangements.  The starting date for summer time on the Island will
 # however always coincide with the rest of NSW.
@@ -1332,7 +1408,7 @@ Zone	Pacific/Wallis	12:15:20 -	LMT	1901
 
 # From Paul Eggert (1996-01-22):
 # Today's _Wall Street Journal_ (page 1) reports that Kiribati
-# ``declared it the same day throught the country as of Jan. 1, 1995''
+# ``declared it the same day [throughout] the country as of Jan. 1, 1995''
 # as part of the competition to be first into the 21st century.
 
 

Modified: stable/9/contrib/tzdata/europe
==============================================================================
--- stable/9/contrib/tzdata/europe	Wed Oct 12 11:06:55 2011	(r226297)
+++ stable/9/contrib/tzdata/europe	Wed Oct 12 11:08:09 2011	(r226298)
@@ -1,5 +1,5 @@
 # 
-# @(#)europe	8.33
+# @(#)europe	8.38
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -561,9 +561,9 @@ Rule	Russia	1985	1991	-	Mar	lastSun	 2:0
 #
 Rule	Russia	1992	only	-	Mar	lastSat	 23:00	1:00	S
 Rule	Russia	1992	only	-	Sep	lastSat	 23:00	0	-
-Rule	Russia	1993	max	-	Mar	lastSun	 2:00s	1:00	S
+Rule	Russia	1993	2010	-	Mar	lastSun	 2:00s	1:00	S
 Rule	Russia	1993	1995	-	Sep	lastSun	 2:00s	0	-
-Rule	Russia	1996	max	-	Oct	lastSun	 2:00s	0	-
+Rule	Russia	1996	2010	-	Oct	lastSun	 2:00s	0	-
 
 # From Alexander Krivenyshev (2011-06-14):
 # According to Kremlin press service, Russian President Dmitry Medvedev
@@ -583,7 +583,6 @@ Rule	Russia	1996	max	-	Oct	lastSun	 2:00
 # From Arthur David Olson (2011-06-15):
 # Take "abolishing daylight saving time" to mean that time is now considered
 # to be standard.
-# At least for now, keep the "old" Russia rules for the benefit of Belarus.
 
 # These are for backward compatibility with older versions.
 
@@ -689,6 +688,23 @@ Zone	Europe/Vienna	1:05:20 -	LMT	1893 Ap
 			1:00	EU	CE%sT
 
 # Belarus
+# From Yauhen Kharuzhy (2011-09-16):
+# By latest Belarus government act Europe/Minsk timezone was changed to
+# GMT+3 without DST (was GMT+2 with DST).
+#
+# Sources (Russian language):
+# 1.
+# 
+# http://www.belta.by/ru/all_news/society/V-Belarusi-otmenjaetsja-perexod-na-sezonnoe-vremja_i_572952.html
+# 
+# 2.
+# 
+# http://naviny.by/rubrics/society/2011/09/16/ic_articles_116_175144/
+# 
+# 3.
+# 
+# http://news.tut.by/society/250578.html
+# 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Europe/Minsk	1:50:16 -	LMT	1880
 			1:50	-	MMT	1924 May 2 # Minsk Mean Time
@@ -700,7 +716,8 @@ Zone	Europe/Minsk	1:50:16 -	LMT	1880
 			2:00	1:00	EEST	1991 Sep 29 2:00s
 			2:00	-	EET	1992 Mar 29 0:00s
 			2:00	1:00	EEST	1992 Sep 27 0:00s
-			2:00	Russia	EE%sT
+			2:00	Russia	EE%sT	2011 Mar 27 2:00s
+			3:00	-	FET # Further-eastern European Time
 
 # Belgium
 #
@@ -2034,7 +2051,7 @@ Zone Europe/Kaliningrad	 1:22:00 -	LMT	1
 			 2:00	Poland	CE%sT	1946
 			 3:00	Russia	MSK/MSD	1991 Mar 31 2:00s
 			 2:00	Russia	EE%sT	2011 Mar 27 2:00s
-			 3:00	-	EET
+			 3:00	-	FET # Further-eastern European Time
 #
 # From Oscar van Vlijmen (2001-08-25): [This region consists of]
 # Respublika Adygeya, Arkhangel'skaya oblast',
@@ -2189,7 +2206,7 @@ Zone Asia/Irkutsk	 6:57:20 -	LMT	1880
 # [parts of] Respublika Sakha (Yakutiya), Chitinskaya oblast'.
 
 # From Oscar van Vlijmen (2009-11-29):
-# ...some regions of RUssia were merged with others since 2005...
+# ...some regions of [Russia] were merged with others since 2005...
 # Some names were changed, no big deal, except for one instance: a new name.
 # YAK/YAKST: UTC+9 Zabajkal'skij kraj.
 
@@ -2613,6 +2630,28 @@ Link	Europe/Istanbul	Asia/Istanbul	# Ist
 # of March at 3am the time is changing to 4am and each last Sunday of
 # October the time at 4am is changing to 3am"
 
+# From Alexander Krivenyshev (2011-09-20):
+# On September 20, 2011 the deputies of the Verkhovna Rada agreed to
+# abolish the transfer clock to winter time.
+#
+# Bill number 8330 of MP from the Party of Regions Oleg Nadoshi got
+# approval from 266 deputies.
+#
+# Ukraine abolishes transter back to the winter time (in Russian)
+# 
+# http://news.mail.ru/politics/6861560/
+# 
+#
+# The Ukrainians will no longer change the clock (in Russian)
+# 
+# http://www.segodnya.ua/news/14290482.html
+# 
+#
+# Deputies cancelled the winter time (in Russian)
+# 
+# http://www.pravda.com.ua/rus/news/2011/09/20/6600616/
+# 
+
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 # Most of Ukraine since 1970 has been like Kiev.
 # "Kyiv" is the transliteration of the Ukrainian name, but
@@ -2626,7 +2665,8 @@ Zone Europe/Kiev	2:02:04 -	LMT	1880
 			3:00	-	MSK	1990 Jul  1 2:00
 			2:00	-	EET	1992
 			2:00	E-Eur	EE%sT	1995
-			2:00	EU	EE%sT
+			2:00	EU	EE%sT	2011 Mar lastSun 1:00u
+			3:00	-	FET # Further-eastern European Time
 # Ruthenia used CET 1990/1991.
 # "Uzhhorod" is the transliteration of the Ukrainian name, but
 # "Uzhgorod" is more common in English.
@@ -2640,7 +2680,8 @@ Zone Europe/Uzhgorod	1:29:12 -	LMT	1890 
 			1:00	-	CET	1991 Mar 31 3:00
 			2:00	-	EET	1992
 			2:00	E-Eur	EE%sT	1995
-			2:00	EU	EE%sT
+			2:00	EU	EE%sT	2011 Mar lastSun 1:00u
+			3:00	-	FET # Further-eastern European Time
 # Zaporozh'ye and eastern Lugansk oblasts observed DST 1990/1991.
 # "Zaporizhia" is the transliteration of the Ukrainian name, but
 # "Zaporozh'ye" is more common in English.  Use the common English
@@ -2653,7 +2694,8 @@ Zone Europe/Zaporozhye	2:20:40 -	LMT	188
 			1:00	C-Eur	CE%sT	1943 Oct 25
 			3:00	Russia	MSK/MSD	1991 Mar 31 2:00
 			2:00	E-Eur	EE%sT	1995
-			2:00	EU	EE%sT
+			2:00	EU	EE%sT	2011 Mar lastSun 1:00u
+			3:00	-	FET # Further-eastern European Time
 # Central Crimea used Moscow time 1994/1997.
 Zone Europe/Simferopol	2:16:24 -	LMT	1880
 			2:16	-	SMT	1924 May  2 # Simferopol Mean T
@@ -2678,7 +2720,8 @@ Zone Europe/Simferopol	2:16:24 -	LMT	188
 # Assume it happened in March by not changing the clocks.
 			3:00	Russia	MSK/MSD	1997
 			3:00	-	MSK	1997 Mar lastSun 1:00u
-			2:00	EU	EE%sT
+			2:00	EU	EE%sT	2011 Mar lastSun 1:00u
+			3:00	-	FET # Further-eastern European Time
 
 ###############################################################################
 

Modified: stable/9/contrib/tzdata/northamerica
==============================================================================
--- stable/9/contrib/tzdata/northamerica	Wed Oct 12 11:06:55 2011	(r226297)
+++ stable/9/contrib/tzdata/northamerica	Wed Oct 12 11:08:09 2011	(r226298)
@@ -1,5 +1,5 @@
 # 
-# @(#)northamerica	8.42
+# @(#)northamerica	8.49
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -468,6 +468,10 @@ Zone America/Los_Angeles -7:52:58 -	LMT	
 # own time. I asked about daylight saving; they said it wasn't used. I
 # did not inquire about practices in the past.
 
+# From Arthur David Olson (2011-08-17):
+# For lack of better information, assume that Metlakatla's
+# abandonment of use of daylight saving resulted from the 1983 vote.
+
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone America/Juneau	 15:02:19 -	LMT	1867 Oct 18
 			 -8:57:41 -	LMT	1900 Aug 20 12:00
@@ -479,7 +483,7 @@ Zone America/Juneau	 15:02:19 -	LMT	1867
 			 -8:00	US	P%sT	1983 Oct 30 2:00
 			 -9:00	US	Y%sT	1983 Nov 30
 			 -9:00	US	AK%sT
-Zone America/Sitka	 -14:58:47 -	LMT	1867 Oct 18
+Zone America/Sitka	 14:58:47 -	LMT	1867 Oct 18
 			 -9:01:13 -	LMT	1900 Aug 20 12:00
 			 -8:00	-	PST	1942
 			 -8:00	US	P%sT	1946
@@ -493,7 +497,7 @@ Zone America/Metlakatla	 15:13:42 -	LMT	
 			 -8:00	US	P%sT	1946
 			 -8:00	-	PST	1969
 			 -8:00	US	P%sT	1983 Oct 30 2:00
-			 -8:00	US	MeST
+			 -8:00	-	MeST
 Zone America/Yakutat	 14:41:05 -	LMT	1867 Oct 18
 			 -9:18:55 -	LMT	1900 Aug 20 12:00
 			 -9:00	-	YST	1942
@@ -593,8 +597,8 @@ Zone Pacific/Honolulu	-10:31:26 -	LMT	18
 			-10:30	-	HST	1933 Apr 30 2:00 #Laws 1933
 			-10:30	1:00	HDT	1933 May 21 12:00 #Laws 1933+12
 			-10:30	-	HST	1942 Feb 09 2:00 #Schmitt&Cox+2
-			-10:30	1:00	HDT	1945 Sep 30 2:00 #Schmitt&Fox+2
-			-10:30	US	H%sT	1947 Jun  8 2:00 #Schmitt&Fox+2
+			-10:30	1:00	HDT	1945 Sep 30 2:00 #Schmitt&Cox+2
+			-10:30	-	HST	1947 Jun  8 2:00 #Schmitt&Cox+2
 			-10:00	-	HST
 
 # Now we turn to US areas that have diverged from the consensus since 1970.
@@ -1163,12 +1167,29 @@ Rule	StJohns	1960	1986	-	Oct	lastSun	2:0
 # From Paul Eggert (2000-10-02):
 # INMS (2000-09-12) says that, since 1988 at least, Newfoundland switches
 # at 00:01 local time.  For now, assume it started in 1987.
+
+# From Michael Pelley (2011-09-12):
+# We received today, Monday, September 12, 2011, notification that the
+# changes to the Newfoundland Standard Time Act have been proclaimed.
+# The change in the Act stipulates that the change from Daylight Savings
+# Time to Standard Time and from Standard Time to Daylight Savings Time
+# now occurs at 2:00AM.
+# ...
+# 
+# http://www.assembly.nl.ca/legislation/sr/annualstatutes/2011/1106.chp.htm
+# 
+# ...
+# MICHAEL PELLEY  |  Manager of Enterprise Architecture - Solution Delivery
+# Office of the Chief Information Officer
+# Executive Council
+# Government of Newfoundland & Labrador
+
 Rule	StJohns	1987	only	-	Apr	Sun>=1	0:01	1:00	D
 Rule	StJohns	1987	2006	-	Oct	lastSun	0:01	0	S
 Rule	StJohns	1988	only	-	Apr	Sun>=1	0:01	2:00	DD
 Rule	StJohns	1989	2006	-	Apr	Sun>=1	0:01	1:00	D
-Rule	StJohns	2007	max	-	Mar	Sun>=8	0:01	1:00	D
-Rule	StJohns	2007	max	-	Nov	Sun>=1	0:01	0	S
+Rule	StJohns	2007	2011	-	Mar	Sun>=8	0:01	1:00	D
+Rule	StJohns	2007	2010	-	Nov	Sun>=1	0:01	0	S
 #
 # St John's has an apostrophe, but Posix file names can't have apostrophes.
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
@@ -1178,7 +1199,8 @@ Zone America/St_Johns	-3:30:52 -	LMT	188
 			-3:30:52 StJohns N%sT	1935 Mar 30
 			-3:30	StJohns	N%sT	1942 May 11
 			-3:30	Canada	N%sT	1946
-			-3:30	StJohns	N%sT
+			-3:30	StJohns	N%sT	2011 Nov
+			-3:30	Canada	N%sT
 
 # most of east Labrador
 
@@ -1192,7 +1214,8 @@ Zone America/Goose_Bay	-4:01:40 -	LMT	18
 			-3:30	StJohns	N%sT	1942 May 11
 			-3:30	Canada	N%sT	1946
 			-3:30	StJohns	N%sT	1966 Mar 15 2:00
-			-4:00	StJohns	A%sT
+			-4:00	StJohns	A%sT	2011 Nov
+			-4:00	Canada	A%sT
 
 
 # west Labrador, Nova Scotia, Prince Edward I
@@ -1924,20 +1947,69 @@ Zone America/Dawson_Creek -8:00:56 -	LMT
 # daylight saving....
 # http://www.nnsl.com/frames/newspapers/2006-11/nov13_06none.html
 
-# From Chris Walton (2007-03-14):
-# Today I phoned the "hamlet office" to find out what Resolute was doing with
-# its clocks.
-#
-# The individual that answered the phone confirmed that the clocks did not
-# move at the end of daylight saving on October 29/2006.  He also told me that
-# the clocks did not move this past weekend (March 11/2007)....
-
-# From Chris Walton (2008-11-13):
-# ...the residents of Resolute believe that they are changing "time zones"
-# twice a year.  In winter months, local time is qualified with "Eastern
-# Time" which is really "Eastern Standard Time (UTC-5)".  In summer
-# months, local time is qualified with "Central Time" which is really
-# "Central Daylight Time (UTC-5)"...
+# From Chris Walton (2011-03-21):
+# Back in 2007 I initiated the creation of a new "zone file" for Resolute
+# Bay. Resolute Bay is a small community located about 900km north of
+# the Arctic Circle. The zone file was required because Resolute Bay had
+# decided to use UTC-5 instead of UTC-6 for the winter of 2006-2007.
+#
+# According to new information which I received last week, Resolute Bay
+# went back to using UTC-6 in the winter of 2007-2008...
+#
+# On March 11/2007 most of Canada went onto daylight saving. On March
+# 14/2007 I phoned the Resolute Bay hamlet office to do a "time check." I
+# talked to somebody that was both knowledgeable and helpful. I was able
+# to confirm that Resolute Bay was still operating on UTC-5. It was
+# explained to me that Resolute Bay had been on the Eastern Time zone
+# (EST) in the winter, and was now back on the Central Time zone (CDT).
+# i.e. the time zone had changed twice in the last year but the clocks
+# had not moved. The residents had to know which time zone they were in
+# so they could follow the correct TV schedule...
+#
+# On Nov 02/2008 most of Canada went onto standard time. On Nov 03/2008 I
+# phoned the Resolute Bay hamlet office...[D]ue to the challenging nature
+# of the phone call, I decided to seek out an alternate source of
+# information. I found an e-mail address for somebody by the name of
+# Stephanie Adams whose job was listed as "Inns North Support Officer for
+# Arctic Co-operatives." I was under the impression that Stephanie lived
+# and worked in Resolute Bay...
+#
+# On March 14/2011 I phoned the hamlet office again. I was told that
+# Resolute Bay had been using Central Standard Time over the winter of
+# 2010-2011 and that the clocks had therefore been moved one hour ahead
+# on March 13/2011. The person I talked to was aware that Resolute Bay
+# had previously experimented with Eastern Standard Time but he could not
+# tell me when the practice had stopped.
+#
+# On March 17/2011 I searched the Web to find an e-mail address of
+# somebody that might be able to tell me exactly when Resolute Bay went
+# off Eastern Standard Time. I stumbled on the name "Aziz Kheraj." Aziz
+# used to be the mayor of Resolute Bay and he apparently owns half the
+# businesses including "South Camp Inn." This website has some info on
+# Aziz:
+# 
+# http://www.uphere.ca/node/493
+# 
+#
+# I sent Aziz an e-mail asking when Resolute Bay had stopped using
+# Eastern Standard Time.
+#
+# Aziz responded quickly with this: "hi, The time was not changed for the
+# 1 year only, the following year, the community went back to the old way
+# of "spring ahead-fall behind" currently we are zulu plus 5 hrs and in
+# the winter Zulu plus 6 hrs"
+#
+# This of course conflicted with everything I had ascertained in November 2008.
+#
+# I sent Aziz a copy of my 2008 e-mail exchange with Stephanie. Aziz
+# responded with this: "Hi, Stephanie lives in Winnipeg. I live here, You
+# may want to check with the weather office in Resolute Bay or do a
+# search on the weather through Env. Canada. web site"
+#
+# If I had realized the Stephanie did not live in Resolute Bay I would
+# never have contacted her.  I now believe that all the information I
+# obtained in November 2008 should be ignored...
+# I apologize for reporting incorrect information in 2008.
 
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	NT_YK	1918	only	-	Apr	14	2:00	1:00	D
@@ -1965,14 +2037,12 @@ Zone America/Iqaluit	0	-	zzz	1942 Aug # 
 			-6:00	Canada	C%sT	2000 Oct 29 2:00
 			-5:00	Canada	E%sT
 # aka Qausuittuq
-# Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
-Rule	Resolute 2006	max	-	Nov	Sun>=1	2:00	0	ES
-Rule	Resolute 2007	max	-	Mar	Sun>=8	2:00	0	CD
 Zone America/Resolute	0	-	zzz	1947 Aug 31 # Resolute founded
 			-6:00	NT_YK	C%sT	2000 Oct 29 2:00
 			-5:00	-	EST	2001 Apr  1 3:00
 			-6:00	Canada	C%sT	2006 Oct 29 2:00
-			-5:00	Resolute	%sT
+			-5:00	-	EST	2007 Mar 11 3:00
+			-6:00	Canada	C%sT
 # aka Kangiqiniq
 Zone America/Rankin_Inlet 0	-	zzz	1957 # Rankin Inlet founded
 			-6:00	NT_YK	C%sT	2000 Oct 29 2:00

Modified: stable/9/contrib/tzdata/southamerica
==============================================================================
--- stable/9/contrib/tzdata/southamerica	Wed Oct 12 11:06:55 2011	(r226297)
+++ stable/9/contrib/tzdata/southamerica	Wed Oct 12 11:08:09 2011	(r226298)
@@ -797,6 +797,26 @@ Zone	America/La_Paz	-4:32:36 -	LMT	1890
 # 
 # http://www.timeanddate.com/news/time/brazil-dst-2008-2009.html
 # 
+#
+# From Alexander Krivenyshev (2011-10-04):
+# State Bahia will return to Daylight savings time this year after 8 years off.
+# The announcement was made by Governor Jaques Wagner in an interview to a 
+# television station in Salvador. 
+
+# In Portuguese:
+# 
+# http://g1.globo.com/bahia/noticia/2011/10/governador-jaques-wagner-confirma-horario-de-verao-na-bahia.html
+#  and
+# 
+# http://noticias.terra.com.br/brasil/noticias/0,,OI5390887-EI8139,00-Bahia+volta+a+ter+horario+de+verao+apos+oito+anos.html
+# 
+
+# From Guilherme Bernardes Rodrigues (2011-10-07):
+# There is news in the media, however there is still no decree about it.
+# I just send a e-mail to Zulmira Brandão at
+# http://pcdsh01.on.br/ the
+# oficial agency about time in Brazil, and she confirmed that the old rule is
+# still in force.
 
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 # Decree 20,466 (1931-10-01)
@@ -1035,6 +1055,9 @@ Zone America/Maceio	-2:22:52 -	LMT	1914
 Zone America/Bahia	-2:34:04 -	LMT	1914
 			-3:00	Brazil	BR%sT	2003 Sep 24
 			-3:00	-	BRT
+# as noted above, not yet in operation.
+#			-3:00	-	BRT	2011 Oct 16
+#			-3:00	Brazil	BR%sT
 #
 # Goias (GO), Distrito Federal (DF), Minas Gerais (MG),
 # Espirito Santo (ES), Rio de Janeiro (RJ), Sao Paulo (SP), Parana (PR),

Modified: stable/9/contrib/tzdata/zone.tab
==============================================================================
--- stable/9/contrib/tzdata/zone.tab	Wed Oct 12 11:06:55 2011	(r226297)
+++ stable/9/contrib/tzdata/zone.tab	Wed Oct 12 11:08:09 2011	(r226298)
@@ -1,5 +1,5 @@
 # 
-# @(#)zone.tab	8.45
+# @(#)zone.tab	8.49
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 #
@@ -120,7 +120,7 @@ CA	+4901-08816	America/Nipigon	Eastern T
 CA	+4823-08915	America/Thunder_Bay	Eastern Time - Thunder Bay, Ontario
 CA	+6344-06828	America/Iqaluit	Eastern Time - east Nunavut - most locations
 CA	+6608-06544	America/Pangnirtung	Eastern Time - Pangnirtung, Nunavut
-CA	+744144-0944945	America/Resolute	Eastern Standard Time - Resolute, Nunavut
+CA	+744144-0944945	America/Resolute	Central Standard Time - Resolute, Nunavut
 CA	+484531-0913718	America/Atikokan	Eastern Standard Time - Atikokan, Ontario and Southampton I, Nunavut
 CA	+624900-0920459	America/Rankin_Inlet	Central Time - central Nunavut
 CA	+4953-09709	America/Winnipeg	Central Time - Manitoba & west Ontario
@@ -319,7 +319,8 @@ PL	+5215+02100	Europe/Warsaw
 PM	+4703-05620	America/Miquelon
 PN	-2504-13005	Pacific/Pitcairn
 PR	+182806-0660622	America/Puerto_Rico
-PS	+3130+03428	Asia/Gaza
+PS	+3130+03428	Asia/Gaza	Gaza Strip
+PS	+313200+0350542	Asia/Hebron	West Bank
 PT	+3843-00908	Europe/Lisbon	mainland
 PT	+3238-01654	Atlantic/Madeira	Madeira Islands
 PT	+3744-02540	Atlantic/Azores	Azores
@@ -361,6 +362,7 @@ SM	+4355+01228	Europe/San_Marino
 SN	+1440-01726	Africa/Dakar
 SO	+0204+04522	Africa/Mogadishu
 SR	+0550-05510	America/Paramaribo
+SS	+0451+03136	Africa/Juba
 ST	+0020+00644	Africa/Sao_Tome
 SV	+1342-08912	America/El_Salvador
 SX	+180305-0630250	America/Lower_Princes

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 12 11:34:14 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D171E106566B;
	Wed, 12 Oct 2011 11:34:14 +0000 (UTC)
	(envelope-from andre@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id C09CD8FC19;
	Wed, 12 Oct 2011 11:34:14 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9CBYE0b064333;
	Wed, 12 Oct 2011 11:34:14 GMT (envelope-from andre@svn.freebsd.org)
Received: (from andre@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9CBYERW064331;
	Wed, 12 Oct 2011 11:34:14 GMT (envelope-from andre@svn.freebsd.org)
Message-Id: <201110121134.p9CBYERW064331@svn.freebsd.org>
From: Andre Oppermann 
Date: Wed, 12 Oct 2011 11:34:14 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226299 - stable/9/sys/netinet
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 12 Oct 2011 11:34:14 -0000

Author: andre
Date: Wed Oct 12 11:34:14 2011
New Revision: 226299
URL: http://svn.freebsd.org/changeset/base/226299

Log:
  MFC r226105:
    Add back the IP header length to the total packet length field on
    raw IP sockets.  It was deducted in ip_input() in preparation for
    protocols interested only in the payload.
  
    On raw sockets the IP header should be delivered as it at came in
    from the network except for the byte order swaps in some fields.
  
  Approved by:	re (kib)

Modified:
  stable/9/sys/netinet/raw_ip.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/amd64/include/xen/   (props changed)
  stable/9/sys/boot/   (props changed)
  stable/9/sys/boot/i386/efi/   (props changed)
  stable/9/sys/boot/ia64/efi/   (props changed)
  stable/9/sys/boot/ia64/ski/   (props changed)
  stable/9/sys/boot/powerpc/boot1.chrp/   (props changed)
  stable/9/sys/boot/powerpc/ofw/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)
  stable/9/sys/conf/   (props changed)
  stable/9/sys/contrib/dev/acpica/   (props changed)
  stable/9/sys/contrib/octeon-sdk/   (props changed)
  stable/9/sys/contrib/pf/   (props changed)
  stable/9/sys/contrib/x86emu/   (props changed)

Modified: stable/9/sys/netinet/raw_ip.c
==============================================================================
--- stable/9/sys/netinet/raw_ip.c	Wed Oct 12 11:08:09 2011	(r226298)
+++ stable/9/sys/netinet/raw_ip.c	Wed Oct 12 11:34:14 2011	(r226299)
@@ -289,6 +289,13 @@ rip_input(struct mbuf *m, int off)
 	last = NULL;
 
 	ifp = m->m_pkthdr.rcvif;
+	/*
+	 * Add back the IP header length which was
+	 * removed by ip_input().  Raw sockets do
+	 * not modify the packet except for some
+	 * byte order swaps.
+	 */
+	ip->ip_len += off;
 
 	hash = INP_PCBHASH_RAW(proto, ip->ip_src.s_addr,
 	    ip->ip_dst.s_addr, V_ripcbinfo.ipi_hashmask);

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 12 12:05:18 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 768A21065670;
	Wed, 12 Oct 2011 12:05:18 +0000 (UTC) (envelope-from des@des.no)
Received: from smtp.des.no (smtp.des.no [194.63.250.102])
	by mx1.freebsd.org (Postfix) with ESMTP id 362248FC23;
	Wed, 12 Oct 2011 12:05:18 +0000 (UTC)
Received: from ds4.des.no (des.no [84.49.246.2])
	by smtp.des.no (Postfix) with ESMTP id 4BAFB1FFC39;
	Wed, 12 Oct 2011 12:05:17 +0000 (UTC)
Received: by ds4.des.no (Postfix, from userid 1001)
	id 361B5B93C; Wed, 12 Oct 2011 14:05:17 +0200 (CEST)
From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= 
To: "Bjoern A. Zeeb" 
References: <201110052208.p95M8H3C030566@svn.freebsd.org>
	<05F84C7F-A1CD-40E4-BDD5-BCACB58C56BF@lists.zabbadoz.net>
Date: Wed, 12 Oct 2011 14:05:16 +0200
In-Reply-To: <05F84C7F-A1CD-40E4-BDD5-BCACB58C56BF@lists.zabbadoz.net> (Bjoern
	A. Zeeb's message of "Wed, 12 Oct 2011 09:09:16 +0000")
Message-ID: <86botm2z5v.fsf@ds4.des.no>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (berkeley-unix)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r226046 - in head: crypto/openssh
	crypto/openssh/openbsd-compat secure/usr.sbin/sshd
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 12 Oct 2011 12:05:18 -0000

"Bjoern A. Zeeb"  writes:
> Mergemaster brought up this change:
>
> +# The default is to check both .ssh/authorized_keys and .ssh/authorized_=
keys2
> +# but this is overridden so installations will only check .ssh/authorize=
d_keys
> +AuthorizedKeysFile     .ssh/authorized_keys
>
> This will break setups that have authorized_keys2 files (only) and needs =
to
> be reverted I think?

authorized_keys2 has been deprecated for ~10 years now.

DES
--=20
Dag-Erling Sm=C3=B8rgrav - des@des.no

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 12 12:08:04 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 009811065674;
	Wed, 12 Oct 2011 12:08:04 +0000 (UTC)
	(envelope-from rwatson@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id D8D4F8FC17;
	Wed, 12 Oct 2011 12:08:03 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9CC83tj065445;
	Wed, 12 Oct 2011 12:08:03 GMT (envelope-from rwatson@svn.freebsd.org)
Received: (from rwatson@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9CC83iE065443;
	Wed, 12 Oct 2011 12:08:03 GMT (envelope-from rwatson@svn.freebsd.org)
Message-Id: <201110121208.p9CC83iE065443@svn.freebsd.org>
From: Robert Watson 
Date: Wed, 12 Oct 2011 12:08:03 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226301 - head/sys/kern
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 12 Oct 2011 12:08:04 -0000

Author: rwatson
Date: Wed Oct 12 12:08:03 2011
New Revision: 226301
URL: http://svn.freebsd.org/changeset/base/226301

Log:
  Correct a bug in export of capability-related information from the sysctls
  supporting procstat -f: properly provide capability rights information to
  userspace.  The bug resulted from a merge-o during upstreaming (or rather,
  a failure to properly merge FreeBSD-side changed downstream).
  
  Spotted by:     des, kibab
  MFC after:      3 days

Modified:
  head/sys/kern/kern_descrip.c

Modified: head/sys/kern/kern_descrip.c
==============================================================================
--- head/sys/kern/kern_descrip.c	Wed Oct 12 11:38:44 2011	(r226300)
+++ head/sys/kern/kern_descrip.c	Wed Oct 12 12:08:03 2011	(r226301)
@@ -3182,7 +3182,8 @@ CTASSERT(sizeof(struct kinfo_file) == KI
 
 static int
 export_fd_for_sysctl(void *data, int type, int fd, int fflags, int refcnt,
-    int64_t offset, struct kinfo_file *kif, struct sysctl_req *req)
+    int64_t offset, int fd_is_cap, cap_rights_t fd_cap_rights,
+    struct kinfo_file *kif, struct sysctl_req *req)
 {
 	struct {
 		int	fflag;
@@ -3243,6 +3244,10 @@ export_fd_for_sysctl(void *data, int typ
 	for (i = 0; i < NFFLAGS; i++)
 		if (fflags & fflags_table[i].fflag)
 			kif->kf_flags |=  fflags_table[i].kf_fflag;
+	if (fd_is_cap)
+		kif->kf_flags |= KF_FLAG_CAPABILITY;
+	if (fd_is_cap)
+		kif->kf_cap_rights = fd_cap_rights;
 	kif->kf_fd = fd;
 	kif->kf_type = type;
 	kif->kf_ref_count = refcnt;
@@ -3270,7 +3275,8 @@ sysctl_kern_proc_filedesc(SYSCTL_HANDLER
 	int64_t offset;
 	void *data;
 	int error, i, *name;
-	int type, refcnt, fflags;
+	int fd_is_cap, type, refcnt, fflags;
+	cap_rights_t fd_cap_rights;
 
 	name = (int *)arg1;
 	if ((p = pfind((pid_t)name[0])) == NULL)
@@ -3299,13 +3305,13 @@ sysctl_kern_proc_filedesc(SYSCTL_HANDLER
 	kif = malloc(sizeof(*kif), M_TEMP, M_WAITOK);
 	if (tracevp != NULL)
 		export_fd_for_sysctl(tracevp, KF_TYPE_VNODE, KF_FD_TYPE_TRACE,
-		    FREAD | FWRITE, -1, -1, kif, req);
+		    FREAD | FWRITE, -1, -1, 0, 0, kif, req);
 	if (textvp != NULL)
 		export_fd_for_sysctl(textvp, KF_TYPE_VNODE, KF_FD_TYPE_TEXT,
-		    FREAD, -1, -1, kif, req);
+		    FREAD, -1, -1, 0, 0, kif, req);
 	if (cttyvp != NULL)
 		export_fd_for_sysctl(cttyvp, KF_TYPE_VNODE, KF_FD_TYPE_CTTY,
-		    FREAD | FWRITE, -1, -1, kif, req);
+		    FREAD | FWRITE, -1, -1, 0, 0, kif, req);
 	if (fdp == NULL)
 		goto fail;
 	FILEDESC_SLOCK(fdp);
@@ -3315,7 +3321,7 @@ sysctl_kern_proc_filedesc(SYSCTL_HANDLER
 		data = fdp->fd_cdir;
 		FILEDESC_SUNLOCK(fdp);
 		export_fd_for_sysctl(data, KF_TYPE_VNODE, KF_FD_TYPE_CWD,
-		    FREAD, -1, -1, kif, req);
+		    FREAD, -1, -1, 0, 0, kif, req);
 		FILEDESC_SLOCK(fdp);
 	}
 	/* root directory */
@@ -3324,7 +3330,7 @@ sysctl_kern_proc_filedesc(SYSCTL_HANDLER
 		data = fdp->fd_rdir;
 		FILEDESC_SUNLOCK(fdp);
 		export_fd_for_sysctl(data, KF_TYPE_VNODE, KF_FD_TYPE_ROOT,
-		    FREAD, -1, -1, kif, req);
+		    FREAD, -1, -1, 0, 0, kif, req);
 		FILEDESC_SLOCK(fdp);
 	}
 	/* jail directory */
@@ -3333,13 +3339,15 @@ sysctl_kern_proc_filedesc(SYSCTL_HANDLER
 		data = fdp->fd_jdir;
 		FILEDESC_SUNLOCK(fdp);
 		export_fd_for_sysctl(data, KF_TYPE_VNODE, KF_FD_TYPE_JAIL,
-		    FREAD, -1, -1, kif, req);
+		    FREAD, -1, -1, 0, 0, kif, req);
 		FILEDESC_SLOCK(fdp);
 	}
 	for (i = 0; i < fdp->fd_nfiles; i++) {
 		if ((fp = fdp->fd_ofiles[i]) == NULL)
 			continue;
 		data = NULL;
+		fd_is_cap = 0;
+		fd_cap_rights = 0;
 
 #ifdef CAPABILITIES
 		/*
@@ -3348,8 +3356,8 @@ sysctl_kern_proc_filedesc(SYSCTL_HANDLER
 		 * the capability rights mask.
 		 */
 		if (fp->f_type == DTYPE_CAPABILITY) {
-			kif->kf_flags |= KF_FLAG_CAPABILITY;
-			kif->kf_cap_rights = cap_rights(fp);
+			fd_is_cap = 1;
+			fd_cap_rights = cap_rights(fp);
 			(void)cap_funwrap(fp, 0, &fp);
 		}
 #else /* !CAPABILITIES */
@@ -3428,8 +3436,8 @@ sysctl_kern_proc_filedesc(SYSCTL_HANDLER
 		oldidx = req->oldidx;
 		if (type == KF_TYPE_VNODE || type == KF_TYPE_FIFO)
 			FILEDESC_SUNLOCK(fdp);
-		error = export_fd_for_sysctl(data, type, i,
-		    fflags, refcnt, offset, kif, req);
+		error = export_fd_for_sysctl(data, type, i, fflags, refcnt,
+		    offset, fd_is_cap, fd_cap_rights, kif, req);
 		if (type == KF_TYPE_VNODE || type == KF_TYPE_FIFO)
 			FILEDESC_SLOCK(fdp);
 		if (error) {

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 12 14:13:33 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 26C3F106566C;
	Wed, 12 Oct 2011 14:13:33 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 0C5C98FC0A;
	Wed, 12 Oct 2011 14:13:33 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9CEDWsZ069404;
	Wed, 12 Oct 2011 14:13:32 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9CEDWks069400;
	Wed, 12 Oct 2011 14:13:32 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201110121413.p9CEDWks069400@svn.freebsd.org>
From: John Baldwin 
Date: Wed, 12 Oct 2011 14:13:32 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226302 - head/sys/dev/acpica
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 12 Oct 2011 14:13:33 -0000

Author: jhb
Date: Wed Oct 12 14:13:32 2011
New Revision: 226302
URL: http://svn.freebsd.org/changeset/base/226302

Log:
  If an allocation for a specific resource range fails because it is not in
  a decoded range for an ACPI Host-PCI bridge, try to allocate it from the
  ACPI system resource range.  If that works, permit the resource allocation
  regardless.
  
  MFC after:	1 week

Modified:
  head/sys/dev/acpica/acpi.c
  head/sys/dev/acpica/acpi_pcib_acpi.c
  head/sys/dev/acpica/acpivar.h

Modified: head/sys/dev/acpica/acpi.c
==============================================================================
--- head/sys/dev/acpica/acpi.c	Wed Oct 12 12:08:03 2011	(r226301)
+++ head/sys/dev/acpica/acpi.c	Wed Oct 12 14:13:32 2011	(r226302)
@@ -1238,7 +1238,6 @@ acpi_alloc_resource(device_t bus, device
     struct resource_list_entry *rle;
     struct resource_list *rl;
     struct resource *res;
-    struct rman *rm;
     int isdefault = (start == 0UL && end == ~0UL);
 
     /*
@@ -1291,15 +1290,29 @@ acpi_alloc_resource(device_t bus, device
     } else
 	res = BUS_ALLOC_RESOURCE(device_get_parent(bus), child, type, rid,
 	    start, end, count, flags);
-    if (res != NULL || start + count - 1 != end)
-	return (res);
 
     /*
      * If the first attempt failed and this is an allocation of a
      * specific range, try to satisfy the request via a suballocation
-     * from our system resource regions.  Note that we only handle
-     * memory and I/O port system resources.
+     * from our system resource regions.
      */
+    if (res == NULL && start + count - 1 == end)
+	res = acpi_alloc_sysres(child, type, rid, start, end, count, flags);
+    return (res);
+}
+
+/*
+ * Attempt to allocate a specific resource range from the system
+ * resource ranges.  Note that we only handle memory and I/O port
+ * system resources.
+ */
+struct resource *
+acpi_alloc_sysres(device_t child, int type, int *rid, u_long start, u_long end,
+    u_long count, u_int flags)
+{
+    struct rman *rm;
+    struct resource *res;
+
     switch (type) {
     case SYS_RES_IOPORT:
 	rm = &acpi_rman_io;
@@ -1311,6 +1324,7 @@ acpi_alloc_resource(device_t bus, device
 	return (NULL);
     }
 
+    KASSERT(start + count - 1 == end, ("wildcard resource range"));
     res = rman_reserve_resource(rm, start, end, count, flags & ~RF_ACTIVE,
 	child);
     if (res == NULL)

Modified: head/sys/dev/acpica/acpi_pcib_acpi.c
==============================================================================
--- head/sys/dev/acpica/acpi_pcib_acpi.c	Wed Oct 12 12:08:03 2011	(r226301)
+++ head/sys/dev/acpica/acpi_pcib_acpi.c	Wed Oct 12 14:13:32 2011	(r226302)
@@ -501,6 +501,7 @@ acpi_pcib_acpi_alloc_resource(device_t d
 {
 #ifdef NEW_PCIB
     struct acpi_hpcib_softc *sc;
+    struct resource *res;
 #endif
 
 #if defined(__i386__) || defined(__amd64__)
@@ -509,8 +510,11 @@ acpi_pcib_acpi_alloc_resource(device_t d
 
 #ifdef NEW_PCIB
     sc = device_get_softc(dev);
-    return (pcib_host_res_alloc(&sc->ap_host_res, child, type, rid, start, end,
-	count, flags));
+    res = pcib_host_res_alloc(&sc->ap_host_res, child, type, rid, start, end,
+	count, flags);
+    if (res == NULL && start + count - 1 == end)
+	res = acpi_alloc_sysres(child, type, rid, start, end, count, flags);
+    return (res);
 #else
     return (bus_generic_alloc_resource(dev, child, type, rid, start, end,
 	count, flags));

Modified: head/sys/dev/acpica/acpivar.h
==============================================================================
--- head/sys/dev/acpica/acpivar.h	Wed Oct 12 12:08:03 2011	(r226301)
+++ head/sys/dev/acpica/acpivar.h	Wed Oct 12 14:13:32 2011	(r226302)
@@ -382,6 +382,8 @@ ACPI_STATUS	acpi_lookup_irq_resource(dev
 		    struct resource *res, ACPI_RESOURCE *acpi_res);
 ACPI_STATUS	acpi_parse_resources(device_t dev, ACPI_HANDLE handle,
 		    struct acpi_parse_resource_set *set, void *arg);
+struct resource *acpi_alloc_sysres(device_t child, int type, int *rid,
+		    u_long start, u_long end, u_long count, u_int flags);
 
 /* ACPI event handling */
 UINT32		acpi_event_power_button_sleep(void *context);

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 12 15:02:07 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 888AC106564A;
	Wed, 12 Oct 2011 15:02:07 +0000 (UTC)
	(envelope-from marius@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 5DBDF8FC13;
	Wed, 12 Oct 2011 15:02:07 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9CF27HJ071045;
	Wed, 12 Oct 2011 15:02:07 GMT (envelope-from marius@svn.freebsd.org)
Received: (from marius@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9CF27Be071041;
	Wed, 12 Oct 2011 15:02:07 GMT (envelope-from marius@svn.freebsd.org)
Message-Id: <201110121502.p9CF27Be071041@svn.freebsd.org>
From: Marius Strobl 
Date: Wed, 12 Oct 2011 15:02:07 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226303 - in stable/9/sys/dev: isp mps mpt
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 12 Oct 2011 15:02:07 -0000

Author: marius
Date: Wed Oct 12 15:02:06 2011
New Revision: 226303
URL: http://svn.freebsd.org/changeset/base/226303

Log:
  MFC r226118:
  
  Sync with ahc(4)/ahd(4)/sym(4) etc:
  Zero any sense not transferred by the device as the SCSI specification
  mandates that any untransferred data should be assumed to be zero.
  
  Reviewed by:	ken
  Approved by:	re (kib)

Modified:
  stable/9/sys/dev/isp/isp_freebsd.h
  stable/9/sys/dev/mps/mps_sas.c
  stable/9/sys/dev/mpt/mpt_cam.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/amd64/include/xen/   (props changed)
  stable/9/sys/boot/   (props changed)
  stable/9/sys/boot/i386/efi/   (props changed)
  stable/9/sys/boot/ia64/efi/   (props changed)
  stable/9/sys/boot/ia64/ski/   (props changed)
  stable/9/sys/boot/powerpc/boot1.chrp/   (props changed)
  stable/9/sys/boot/powerpc/ofw/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)
  stable/9/sys/conf/   (props changed)
  stable/9/sys/contrib/dev/acpica/   (props changed)
  stable/9/sys/contrib/octeon-sdk/   (props changed)
  stable/9/sys/contrib/pf/   (props changed)
  stable/9/sys/contrib/x86emu/   (props changed)

Modified: stable/9/sys/dev/isp/isp_freebsd.h
==============================================================================
--- stable/9/sys/dev/isp/isp_freebsd.h	Wed Oct 12 14:13:32 2011	(r226302)
+++ stable/9/sys/dev/isp/isp_freebsd.h	Wed Oct 12 15:02:06 2011	(r226303)
@@ -486,6 +486,7 @@ default:							\
 
 #define	XS_SAVE_SENSE(xs, sense_ptr, slen)	do {			\
 		(xs)->ccb_h.status |= CAM_AUTOSNS_VALID;		\
+		memset(&(xs)->sense_data, 0, sizeof(&(xs)->sense_data));\
 		memcpy(&(xs)->sense_data, sense_ptr, imin(XS_SNSLEN(xs),\
 		       slen)); 						\
 		if (slen < (xs)->sense_len) 				\

Modified: stable/9/sys/dev/mps/mps_sas.c
==============================================================================
--- stable/9/sys/dev/mps/mps_sas.c	Wed Oct 12 14:13:32 2011	(r226302)
+++ stable/9/sys/dev/mps/mps_sas.c	Wed Oct 12 15:02:06 2011	(r226303)
@@ -1675,6 +1675,7 @@ mpssas_scsiio_complete(struct mps_softc 
 
 		sense_len = min(rep->SenseCount, ccb->csio.sense_len -
 		    ccb->csio.sense_resid);
+		bzero(&ccb->csio.sense_data, sizeof(&ccb->csio.sense_data));
 		bcopy(cm->cm_sense, &ccb->csio.sense_data, sense_len);
 		ccb->ccb_h.status |= CAM_AUTOSNS_VALID;
 	}

Modified: stable/9/sys/dev/mpt/mpt_cam.c
==============================================================================
--- stable/9/sys/dev/mpt/mpt_cam.c	Wed Oct 12 14:13:32 2011	(r226302)
+++ stable/9/sys/dev/mpt/mpt_cam.c	Wed Oct 12 15:02:06 2011	(r226303)
@@ -3178,6 +3178,7 @@ mpt_scsi_reply_frame_handler(struct mpt_
 		else
 			ccb->csio.sense_resid = 0;
 
+		bzero(&ccb->csio.sense_data, sizeof(&ccb->csio.sense_data));
 		bcopy(req->sense_vbuf, &ccb->csio.sense_data,
 		    min(ccb->csio.sense_len, sense_returned));
 	}

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 12 15:29:50 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id CEEF61065673;
	Wed, 12 Oct 2011 15:29:50 +0000 (UTC)
	(envelope-from tuexen@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id BDB388FC0C;
	Wed, 12 Oct 2011 15:29:50 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9CFToKq071939;
	Wed, 12 Oct 2011 15:29:50 GMT (envelope-from tuexen@svn.freebsd.org)
Received: (from tuexen@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9CFTodB071937;
	Wed, 12 Oct 2011 15:29:50 GMT (envelope-from tuexen@svn.freebsd.org)
Message-Id: <201110121529.p9CFTodB071937@svn.freebsd.org>
From: Michael Tuexen 
Date: Wed, 12 Oct 2011 15:29:50 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226304 - stable/9/sys/netinet
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 12 Oct 2011 15:29:51 -0000

Author: tuexen
Date: Wed Oct 12 15:29:50 2011
New Revision: 226304
URL: http://svn.freebsd.org/changeset/base/226304

Log:
  MFC 226252:
  Use the most significant 6 bits of the dscp instead of the least
  significant ones.
  This has changed in the latest version of the socket API ID and
  provides backwards compatibility and gets it in syn with the
  usage of the IP_TOS socket option.
  
  Approved by: re@

Modified:
  stable/9/sys/netinet/sctp_usrreq.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/amd64/include/xen/   (props changed)
  stable/9/sys/boot/   (props changed)
  stable/9/sys/boot/i386/efi/   (props changed)
  stable/9/sys/boot/ia64/efi/   (props changed)
  stable/9/sys/boot/ia64/ski/   (props changed)
  stable/9/sys/boot/powerpc/boot1.chrp/   (props changed)
  stable/9/sys/boot/powerpc/ofw/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)
  stable/9/sys/conf/   (props changed)
  stable/9/sys/contrib/dev/acpica/   (props changed)
  stable/9/sys/contrib/octeon-sdk/   (props changed)
  stable/9/sys/contrib/pf/   (props changed)
  stable/9/sys/contrib/x86emu/   (props changed)

Modified: stable/9/sys/netinet/sctp_usrreq.c
==============================================================================
--- stable/9/sys/netinet/sctp_usrreq.c	Wed Oct 12 15:02:06 2011	(r226303)
+++ stable/9/sys/netinet/sctp_usrreq.c	Wed Oct 12 15:29:50 2011	(r226304)
@@ -2435,7 +2435,7 @@ flags_out:
 						paddrp->spp_flags |= SPP_PMTUD_DISABLE;
 					}
 					if (net->dscp & 0x01) {
-						paddrp->spp_dscp = net->dscp >> 2;
+						paddrp->spp_dscp = net->dscp & 0xfc;
 						paddrp->spp_flags |= SPP_DSCP;
 					}
 #ifdef INET6
@@ -2453,7 +2453,7 @@ flags_out:
 					paddrp->spp_pathmaxrxt = stcb->asoc.def_net_failure;
 					paddrp->spp_pathmtu = sctp_get_frag_point(stcb, &stcb->asoc);
 					if (stcb->asoc.default_dscp & 0x01) {
-						paddrp->spp_dscp = stcb->asoc.default_dscp >> 2;
+						paddrp->spp_dscp = stcb->asoc.default_dscp & 0xfc;
 						paddrp->spp_flags |= SPP_DSCP;
 					}
 #ifdef INET6
@@ -2488,7 +2488,7 @@ flags_out:
 					paddrp->spp_assoc_id = SCTP_FUTURE_ASSOC;
 					/* get inp's default */
 					if (inp->sctp_ep.default_dscp & 0x01) {
-						paddrp->spp_dscp = inp->sctp_ep.default_dscp >> 2;
+						paddrp->spp_dscp = inp->sctp_ep.default_dscp & 0xfc;
 						paddrp->spp_flags |= SPP_DSCP;
 					}
 #ifdef INET6
@@ -4691,7 +4691,7 @@ sctp_setopt(struct socket *so, int optna
 						net->failure_threshold = paddrp->spp_pathmaxrxt;
 					}
 					if (paddrp->spp_flags & SPP_DSCP) {
-						net->dscp = paddrp->spp_dscp << 2;
+						net->dscp = paddrp->spp_dscp & 0xfc;
 						net->dscp |= 0x01;
 					}
 #ifdef INET6
@@ -4794,10 +4794,10 @@ sctp_setopt(struct socket *so, int optna
 					}
 					if (paddrp->spp_flags & SPP_DSCP) {
 						TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
-							net->dscp = paddrp->spp_dscp << 2;
+							net->dscp = paddrp->spp_dscp & 0xfc;
 							net->dscp |= 0x01;
 						}
-						stcb->asoc.default_dscp = paddrp->spp_dscp << 2;
+						stcb->asoc.default_dscp = paddrp->spp_dscp & 0xfc;
 						stcb->asoc.default_dscp |= 0x01;
 					}
 #ifdef INET6
@@ -4851,7 +4851,7 @@ sctp_setopt(struct socket *so, int optna
 						sctp_feature_on(inp, SCTP_PCB_FLAGS_DO_NOT_PMTUD);
 					}
 					if (paddrp->spp_flags & SPP_DSCP) {
-						inp->sctp_ep.default_dscp = paddrp->spp_dscp << 2;
+						inp->sctp_ep.default_dscp = paddrp->spp_dscp & 0xfc;
 						inp->sctp_ep.default_dscp |= 0x01;
 					}
 #ifdef INET6

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 12 15:34:25 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A5BDD106566B;
	Wed, 12 Oct 2011 15:34:25 +0000 (UTC)
	(envelope-from nwhitehorn@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 7BE898FC18;
	Wed, 12 Oct 2011 15:34:25 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9CFYPaC072135;
	Wed, 12 Oct 2011 15:34:25 GMT
	(envelope-from nwhitehorn@svn.freebsd.org)
Received: (from nwhitehorn@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9CFYP0E072134;
	Wed, 12 Oct 2011 15:34:25 GMT
	(envelope-from nwhitehorn@svn.freebsd.org)
Message-Id: <201110121534.p9CFYP0E072134@svn.freebsd.org>
From: Nathan Whitehorn 
Date: Wed, 12 Oct 2011 15:34:25 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226305 - head/release
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 12 Oct 2011 15:34:25 -0000

Author: nwhitehorn
Date: Wed Oct 12 15:34:25 2011
New Revision: 226305
URL: http://svn.freebsd.org/changeset/base/226305

Log:
  Missed file in r225937 (sysinstall removal).

Deleted:
  head/release/svnbranch.awk

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 12 15:43:23 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 01115106564A;
	Wed, 12 Oct 2011 15:43:23 +0000 (UTC)
	(envelope-from hselasky@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id E3C128FC0A;
	Wed, 12 Oct 2011 15:43:22 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9CFhMsN072450;
	Wed, 12 Oct 2011 15:43:22 GMT
	(envelope-from hselasky@svn.freebsd.org)
Received: (from hselasky@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9CFhM8R072448;
	Wed, 12 Oct 2011 15:43:22 GMT
	(envelope-from hselasky@svn.freebsd.org)
Message-Id: <201110121543.p9CFhM8R072448@svn.freebsd.org>
From: Hans Petter Selasky 
Date: Wed, 12 Oct 2011 15:43:22 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226306 - stable/9/sys/dev/usb/serial
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 12 Oct 2011 15:43:23 -0000

Author: hselasky
Date: Wed Oct 12 15:43:22 2011
New Revision: 226306
URL: http://svn.freebsd.org/changeset/base/226306

Log:
  MFC r226219
  Fix panic due to re-using in-use modem unit number.
  
  Approved by:	re (kib)

Modified:
  stable/9/sys/dev/usb/serial/usb_serial.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/amd64/include/xen/   (props changed)
  stable/9/sys/boot/   (props changed)
  stable/9/sys/boot/i386/efi/   (props changed)
  stable/9/sys/boot/ia64/efi/   (props changed)
  stable/9/sys/boot/ia64/ski/   (props changed)
  stable/9/sys/boot/powerpc/boot1.chrp/   (props changed)
  stable/9/sys/boot/powerpc/ofw/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)
  stable/9/sys/conf/   (props changed)
  stable/9/sys/contrib/dev/acpica/   (props changed)
  stable/9/sys/contrib/octeon-sdk/   (props changed)
  stable/9/sys/contrib/pf/   (props changed)
  stable/9/sys/contrib/x86emu/   (props changed)

Modified: stable/9/sys/dev/usb/serial/usb_serial.c
==============================================================================
--- stable/9/sys/dev/usb/serial/usb_serial.c	Wed Oct 12 15:34:25 2011	(r226305)
+++ stable/9/sys/dev/usb/serial/usb_serial.c	Wed Oct 12 15:43:22 2011	(r226306)
@@ -289,6 +289,9 @@ ucom_detach(struct ucom_super_softc *ssc
 {
 	uint32_t subunit;
 
+	if (ssc->sc_subunits == 0)
+		return;		/* not initialized */
+
 	usb_proc_drain(&ssc->sc_tq);
 
 	for (subunit = 0; subunit < ssc->sc_subunits; subunit++) {

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 12 15:43:56 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 9E485106566B;
	Wed, 12 Oct 2011 15:43:56 +0000 (UTC)
	(envelope-from hselasky@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 736158FC12;
	Wed, 12 Oct 2011 15:43:56 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9CFhuOM072507;
	Wed, 12 Oct 2011 15:43:56 GMT
	(envelope-from hselasky@svn.freebsd.org)
Received: (from hselasky@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9CFhu7g072503;
	Wed, 12 Oct 2011 15:43:56 GMT
	(envelope-from hselasky@svn.freebsd.org)
Message-Id: <201110121543.p9CFhu7g072503@svn.freebsd.org>
From: Hans Petter Selasky 
Date: Wed, 12 Oct 2011 15:43:56 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226307 - stable/9/lib/libusb
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 12 Oct 2011 15:43:56 -0000

Author: hselasky
Date: Wed Oct 12 15:43:56 2011
New Revision: 226307
URL: http://svn.freebsd.org/changeset/base/226307

Log:
  MFC r226220
  Fix libusb compliance.
  
  Approved by:	re (kib)

Modified:
  stable/9/lib/libusb/libusb.3
  stable/9/lib/libusb/libusb10.c
  stable/9/lib/libusb/libusb20.3
Directory Properties:
  stable/9/lib/libusb/   (props changed)

Modified: stable/9/lib/libusb/libusb.3
==============================================================================
--- stable/9/lib/libusb/libusb.3	Wed Oct 12 15:43:22 2011	(r226306)
+++ stable/9/lib/libusb/libusb.3	Wed Oct 12 15:43:56 2011	(r226307)
@@ -223,8 +223,8 @@ code on failure.
 .Ft int
 .Fn libusb_kernel_driver_active "libusb_device_handle *devh" "int interface"
 Determine if a driver is active on a interface.
-Returns 0 if no kernel driver
-is active, 1 if a kernel driver is active, LIBUSB_ERROR_NO_DEVICE
+Returns 0 if no kernel driver is active
+and 1 if a kernel driver is active, LIBUSB_ERROR_NO_DEVICE
 if the device has been disconnected and a LIBUSB_ERROR code on failure.
 .Pp
 .Ft int

Modified: stable/9/lib/libusb/libusb10.c
==============================================================================
--- stable/9/lib/libusb/libusb10.c	Wed Oct 12 15:43:22 2011	(r226306)
+++ stable/9/lib/libusb/libusb10.c	Wed Oct 12 15:43:56 2011	(r226307)
@@ -216,7 +216,6 @@ libusb_get_device_list(libusb_context *c
 			libusb20_be_free(usb_backend);
 			return (LIBUSB_ERROR_NO_MEM);
 		}
-
 		/* get device into libUSB v1.0 list */
 		libusb20_be_dequeue_device(usb_backend, pdev);
 
@@ -718,8 +717,10 @@ libusb_kernel_driver_active(struct libus
 	if (pdev == NULL)
 		return (LIBUSB_ERROR_INVALID_PARAM);
 
-	return (libusb20_dev_kernel_driver_active(
-	    pdev, interface));
+	if (libusb20_dev_kernel_driver_active(pdev, interface))
+		return (0);		/* no kernel driver is active */
+	else
+		return (1);		/* kernel driver is active */
 }
 
 int

Modified: stable/9/lib/libusb/libusb20.3
==============================================================================
--- stable/9/lib/libusb/libusb20.3	Wed Oct 12 15:43:22 2011	(r226306)
+++ stable/9/lib/libusb/libusb20.3	Wed Oct 12 15:43:56 2011	(r226307)
@@ -614,10 +614,9 @@ The file descriptor can be used for poll
 .Pp
 .
 .Fn libusb20_dev_kernel_driver_active
-returns a non-zero value if a kernel driver is active on
-the given USB interface.
+returns zero if a kernel driver is active on the given USB interface.
 .
-Else zero is returned.
+Else a LIBUSB20_ERROR value is returned.
 .
 .Pp
 .

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 12 17:25:50 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5512A106564A;
	Wed, 12 Oct 2011 17:25:50 +0000 (UTC) (envelope-from dim@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 44E368FC13;
	Wed, 12 Oct 2011 17:25:50 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9CHPowp075772;
	Wed, 12 Oct 2011 17:25:50 GMT (envelope-from dim@svn.freebsd.org)
Received: (from dim@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9CHPop0075770;
	Wed, 12 Oct 2011 17:25:50 GMT (envelope-from dim@svn.freebsd.org)
Message-Id: <201110121725.p9CHPop0075770@svn.freebsd.org>
From: Dimitry Andric 
Date: Wed, 12 Oct 2011 17:25:50 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226310 - head/usr.bin/clang/clang
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 12 Oct 2011 17:25:50 -0000

Author: dim
Date: Wed Oct 12 17:25:49 2011
New Revision: 226310
URL: http://svn.freebsd.org/changeset/base/226310

Log:
  Add manpage symlink for clang++(1).
  
  PR:		docs/149051
  MFC after:	3 days

Modified:
  head/usr.bin/clang/clang/Makefile

Modified: head/usr.bin/clang/clang/Makefile
==============================================================================
--- head/usr.bin/clang/clang/Makefile	Wed Oct 12 15:59:29 2011	(r226309)
+++ head/usr.bin/clang/clang/Makefile	Wed Oct 12 17:25:49 2011	(r226310)
@@ -10,6 +10,7 @@ SRCS=	cc1_main.cpp \
 	driver.cpp
 
 LINKS=	${BINDIR}/clang ${BINDIR}/clang++
+MLINKS=	clang.1 clang++.1
 
 TGHDRS=	CC1AsOptions \
 	CC1Options \

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 12 17:38:38 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35])
	by hub.freebsd.org (Postfix) with ESMTP id D6FD8106567B;
	Wed, 12 Oct 2011 17:38:38 +0000 (UTC)
	(envelope-from dougb@FreeBSD.org)
Received: from [127.0.0.1] (hub.freebsd.org [IPv6:2001:4f8:fff6::36])
	by mx2.freebsd.org (Postfix) with ESMTP id 8984F1A550C;
	Wed, 12 Oct 2011 17:37:52 +0000 (UTC)
Message-ID: <4E95D070.4030403@FreeBSD.org>
Date: Wed, 12 Oct 2011 10:37:52 -0700
From: Doug Barton 
Organization: http://www.FreeBSD.org/
User-Agent: Mozilla/5.0 (Windows NT 5.1;
	rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1
MIME-Version: 1.0
To: Nathan Whitehorn 
References: <201110121534.p9CFYP0E072134@svn.freebsd.org>
In-Reply-To: <201110121534.p9CFYP0E072134@svn.freebsd.org>
X-Enigmail-Version: 1.3.2
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r226305 - head/release
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 12 Oct 2011 17:38:38 -0000

On 10/12/2011 8:34 AM, Nathan Whitehorn wrote:
> Author: nwhitehorn
> Date: Wed Oct 12 15:34:25 2011
> New Revision: 226305
> URL: http://svn.freebsd.org/changeset/base/226305
> 
> Log:
>   Missed file in r225937 (sysinstall removal).

I, and from my reading others, asked you to revert the removal of
sysinstall. Isn't this moving in the wrong direction? :)


Doug

-- 

	Nothin' ever doesn't change, but nothin' changes much.
			-- OK Go

	Breadth of IT experience, and depth of knowledge in the DNS.
	Yours for the right price.  :)  http://SupersetSolutions.com/


From owner-svn-src-all@FreeBSD.ORG  Wed Oct 12 17:47:15 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 60982106566B;
	Wed, 12 Oct 2011 17:47:15 +0000 (UTC) (envelope-from dim@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 507E58FC08;
	Wed, 12 Oct 2011 17:47:15 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9CHlFvn077070;
	Wed, 12 Oct 2011 17:47:15 GMT (envelope-from dim@svn.freebsd.org)
Received: (from dim@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9CHlFQl077068;
	Wed, 12 Oct 2011 17:47:15 GMT (envelope-from dim@svn.freebsd.org)
Message-Id: <201110121747.p9CHlFQl077068@svn.freebsd.org>
From: Dimitry Andric 
Date: Wed, 12 Oct 2011 17:47:15 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226311 - head/usr.bin/clang/clang
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 12 Oct 2011 17:47:15 -0000

Author: dim
Date: Wed Oct 12 17:47:15 2011
New Revision: 226311
URL: http://svn.freebsd.org/changeset/base/226311

Log:
  Add symlink from clang to clang-cpp, so you can use CPP=clang-cpp in
  Makefiles.  Also add a manpage symlink for it.
  
  MFC after:	3 days

Modified:
  head/usr.bin/clang/clang/Makefile

Modified: head/usr.bin/clang/clang/Makefile
==============================================================================
--- head/usr.bin/clang/clang/Makefile	Wed Oct 12 17:25:49 2011	(r226310)
+++ head/usr.bin/clang/clang/Makefile	Wed Oct 12 17:47:15 2011	(r226311)
@@ -9,8 +9,10 @@ SRCS=	cc1_main.cpp \
 	cc1as_main.cpp \
 	driver.cpp
 
-LINKS=	${BINDIR}/clang ${BINDIR}/clang++
-MLINKS=	clang.1 clang++.1
+LINKS=	${BINDIR}/clang ${BINDIR}/clang++ \
+	${BINDIR}/clang ${BINDIR}/clang-cpp
+MLINKS=	clang.1 clang++.1 \
+	clang.1 clang-cpp.1
 
 TGHDRS=	CC1AsOptions \
 	CC1Options \

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 12 17:52:26 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 1EF36106566C;
	Wed, 12 Oct 2011 17:52:26 +0000 (UTC)
	(envelope-from nwhitehorn@freebsd.org)
Received: from adsum.doit.wisc.edu (adsum.doit.wisc.edu [144.92.197.210])
	by mx1.freebsd.org (Postfix) with ESMTP id E41438FC0C;
	Wed, 12 Oct 2011 17:52:25 +0000 (UTC)
MIME-version: 1.0
Content-transfer-encoding: 7BIT
Content-type: text/plain; CHARSET=US-ASCII; format=flowed
Received: from avs-daemon.smtpauth1.wiscmail.wisc.edu by
	smtpauth1.wiscmail.wisc.edu
	(Sun Java(tm) System Messaging Server 7u2-7.05 32bit (built Jul 30
	2009)) id <0LSY00118SBDHG00@smtpauth1.wiscmail.wisc.edu>; Wed,
	12 Oct 2011 12:52:25 -0500 (CDT)
Received: from anacreon.physics.wisc.edu
	(anacreon.physics.wisc.edu [128.104.160.176]) by
	smtpauth1.wiscmail.wisc.edu
	(Sun Java(tm) System Messaging Server 7u2-7.05 32bit (built Jul 30
	2009))
	with ESMTPSA id <0LSY00I7YSB7QQ10@smtpauth1.wiscmail.wisc.edu>; Wed,
	12 Oct 2011 12:52:20 -0500 (CDT)
Date: Wed, 12 Oct 2011 12:52:19 -0500
From: Nathan Whitehorn 
In-reply-to: <4E95D070.4030403@FreeBSD.org>
To: Doug Barton 
Message-id: <4E95D3D3.4070405@freebsd.org>
X-Spam-Report: AuthenticatedSender=yes, SenderIP=128.104.160.176
X-Spam-PmxInfo: Server=avs-10, Version=5.6.1.2065439,
	Antispam-Engine: 2.7.2.376379, Antispam-Data: 2011.10.12.173614,
	SenderIP=128.104.160.176
References: <201110121534.p9CFYP0E072134@svn.freebsd.org>
	<4E95D070.4030403@FreeBSD.org>
User-Agent: Mozilla/5.0 (X11; U; FreeBSD powerpc; en-US; rv:1.9.2.22)
	Gecko/20110913 Thunderbird/3.1.14
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r226305 - head/release
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 12 Oct 2011 17:52:26 -0000

On 10/12/11 12:37, Doug Barton wrote:
> On 10/12/2011 8:34 AM, Nathan Whitehorn wrote:
>> Author: nwhitehorn
>> Date: Wed Oct 12 15:34:25 2011
>> New Revision: 226305
>> URL: http://svn.freebsd.org/changeset/base/226305
>>
>> Log:
>>    Missed file in r225937 (sysinstall removal).
> I, and from my reading others, asked you to revert the removal of
> sysinstall. Isn't this moving in the wrong direction? :)
>

I said I'd be open to it, but thought it wasn't too important since it 
will stay in 9 and removed it in the first place after getting several 
requests to do so. There wasn't any response after that. Are you 
requesting these commits be reverted?
-Nathan

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 12 17:57:57 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id DD0A4106564A;
	Wed, 12 Oct 2011 17:57:57 +0000 (UTC)
	(envelope-from jilles@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id CBE088FC16;
	Wed, 12 Oct 2011 17:57:57 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9CHvvBr077429;
	Wed, 12 Oct 2011 17:57:57 GMT (envelope-from jilles@svn.freebsd.org)
Received: (from jilles@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9CHvv3A077427;
	Wed, 12 Oct 2011 17:57:57 GMT (envelope-from jilles@svn.freebsd.org)
Message-Id: <201110121757.p9CHvv3A077427@svn.freebsd.org>
From: Jilles Tjoelker 
Date: Wed, 12 Oct 2011 17:57:57 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226312 - stable/9/usr.sbin/portsnap/portsnap
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 12 Oct 2011 17:57:58 -0000

Author: jilles
Date: Wed Oct 12 17:57:57 2011
New Revision: 226312
URL: http://svn.freebsd.org/changeset/base/226312

Log:
  MFC r226028: portsnap: Detect error immediately if we can't fetch the
  snapshot metadata.
  
  Also add some quotes around command substitution where useful and possible.
  
  Approved by:	re (kib)

Modified:
  stable/9/usr.sbin/portsnap/portsnap/portsnap.sh
Directory Properties:
  stable/9/usr.sbin/portsnap/   (props changed)

Modified: stable/9/usr.sbin/portsnap/portsnap/portsnap.sh
==============================================================================
--- stable/9/usr.sbin/portsnap/portsnap/portsnap.sh	Wed Oct 12 17:47:15 2011	(r226311)
+++ stable/9/usr.sbin/portsnap/portsnap/portsnap.sh	Wed Oct 12 17:57:57 2011	(r226312)
@@ -536,9 +536,9 @@ fetch_metadata() {
 	rm -f ${SNAPSHOTHASH} tINDEX.new
 
 	echo ${NDEBUG} "Fetching snapshot metadata... "
-	fetch ${QUIETFLAG} http://${SERVERNAME}/t/${SNAPSHOTHASH}
+	fetch ${QUIETFLAG} http://${SERVERNAME}/t/${SNAPSHOTHASH} \
 	    2>${QUIETREDIR} || return
-	if [ `${SHA256} -q ${SNAPSHOTHASH}` != ${SNAPSHOTHASH} ]; then
+	if [ "`${SHA256} -q ${SNAPSHOTHASH}`" != ${SNAPSHOTHASH} ]; then
 		echo "snapshot metadata corrupt."
 		return 1
 	fi
@@ -606,7 +606,7 @@ fetch_index_sanity() {
 # Verify a list of files
 fetch_snapshot_verify() {
 	while read F; do
-		if [ `gunzip -c snap/${F} | ${SHA256} -q` != ${F} ]; then
+		if [ "`gunzip -c snap/${F} | ${SHA256} -q`" != ${F} ]; then
 			echo "snapshot corrupt."
 			return 1
 		fi

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 12 18:08:29 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 241A9106566B;
	Wed, 12 Oct 2011 18:08:29 +0000 (UTC)
	(envelope-from glebius@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 132638FC13;
	Wed, 12 Oct 2011 18:08:29 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9CI8SLl077855;
	Wed, 12 Oct 2011 18:08:28 GMT (envelope-from glebius@svn.freebsd.org)
Received: (from glebius@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9CI8Seo077849;
	Wed, 12 Oct 2011 18:08:28 GMT (envelope-from glebius@svn.freebsd.org)
Message-Id: <201110121808.p9CI8Seo077849@svn.freebsd.org>
From: Gleb Smirnoff 
Date: Wed, 12 Oct 2011 18:08:28 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226313 - in head/sys: kern vm
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 12 Oct 2011 18:08:29 -0000

Author: glebius
Date: Wed Oct 12 18:08:28 2011
New Revision: 226313
URL: http://svn.freebsd.org/changeset/base/226313

Log:
  Make memguard(9) capable to guard uma(9) allocations.

Modified:
  head/sys/kern/kern_malloc.c
  head/sys/vm/memguard.c
  head/sys/vm/memguard.h
  head/sys/vm/uma.h
  head/sys/vm/uma_core.c

Modified: head/sys/kern/kern_malloc.c
==============================================================================
--- head/sys/kern/kern_malloc.c	Wed Oct 12 17:57:57 2011	(r226312)
+++ head/sys/kern/kern_malloc.c	Wed Oct 12 18:08:28 2011	(r226313)
@@ -458,7 +458,7 @@ malloc(unsigned long size, struct malloc
 		   ("malloc(M_WAITOK) in interrupt context"));
 
 #ifdef DEBUG_MEMGUARD
-	if (memguard_cmp(mtp, size)) {
+	if (memguard_cmp_mtp(mtp, size)) {
 		va = memguard_alloc(size, flags);
 		if (va != NULL)
 			return (va);

Modified: head/sys/vm/memguard.c
==============================================================================
--- head/sys/vm/memguard.c	Wed Oct 12 17:57:57 2011	(r226312)
+++ head/sys/vm/memguard.c	Wed Oct 12 18:08:28 2011	(r226313)
@@ -56,6 +56,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 
 SYSCTL_NODE(_vm, OID_AUTO, memguard, CTLFLAG_RW, NULL, "MemGuard data");
@@ -125,15 +126,17 @@ SYSCTL_ULONG(_vm_memguard, OID_AUTO, fai
 SYSCTL_ULONG(_vm_memguard, OID_AUTO, fail_pgs, CTLFLAG_RD,
     &memguard_fail_pgs, 0, "MemGuard failures due to lack of pages");
 
-#define MG_GUARD	0x001
-#define MG_ALLLARGE	0x002
-static int memguard_options = MG_GUARD;
+#define MG_GUARD_AROUND		0x001
+#define MG_GUARD_ALLLARGE	0x002
+#define MG_GUARD_NOFREE		0x004
+static int memguard_options = MG_GUARD_AROUND;
 TUNABLE_INT("vm.memguard.options", &memguard_options);
 SYSCTL_INT(_vm_memguard, OID_AUTO, options, CTLFLAG_RW,
     &memguard_options, 0,
     "MemGuard options:\n"
     "\t0x001 - add guard pages around each allocation\n"
-    "\t0x002 - always use MemGuard for allocations over a page");
+    "\t0x002 - always use MemGuard for allocations over a page\n"
+    "\t0x004 - guard uma(9) zones with UMA_ZONE_NOFREE flag");
 
 static u_int memguard_minsize;
 static u_long memguard_minsize_reject;
@@ -282,7 +285,7 @@ memguard_alloc(unsigned long req_size, i
 	 * value.
 	 */
 	size_v = size_p;
-	do_guard = (memguard_options & MG_GUARD) != 0;
+	do_guard = (memguard_options & MG_GUARD_AROUND) != 0;
 	if (do_guard)
 		size_v += 2 * PAGE_SIZE;
 
@@ -429,21 +432,32 @@ memguard_realloc(void *addr, unsigned lo
 	return (newaddr);
 }
 
-int
-memguard_cmp(struct malloc_type *mtp, unsigned long size)
+static int
+memguard_cmp(unsigned long size)
 {
 
 	if (size < memguard_minsize) {
 		memguard_minsize_reject++;
 		return (0);
 	}
-	if ((memguard_options & MG_ALLLARGE) != 0 && size >= PAGE_SIZE)
+	if ((memguard_options & MG_GUARD_ALLLARGE) != 0 && size >= PAGE_SIZE)
 		return (1);
 	if (memguard_frequency > 0 &&
 	    (random() % 100000) < memguard_frequency) {
 		memguard_frequency_hits++;
 		return (1);
 	}
+
+	return (0);
+}
+
+int
+memguard_cmp_mtp(struct malloc_type *mtp, unsigned long size)
+{
+
+	if (memguard_cmp(size))
+		return(1);
+
 #if 1
 	/*
 	 * The safest way of comparsion is to always compare short description
@@ -467,3 +481,21 @@ memguard_cmp(struct malloc_type *mtp, un
 	return (0);
 #endif
 }
+
+int
+memguard_cmp_zone(uma_zone_t zone)
+{
+
+	 if ((memguard_options & MG_GUARD_NOFREE) == 0 &&
+	    zone->uz_flags & UMA_ZONE_NOFREE)
+		return (0);
+
+	if (memguard_cmp(zone->uz_size))
+		return (1);
+
+	/*
+	 * The safest way of comparsion is to always compare zone name,
+	 * but it is also the slowest way.
+	 */
+	return (strcmp(zone->uz_name, vm_memguard_desc) == 0);
+}

Modified: head/sys/vm/memguard.h
==============================================================================
--- head/sys/vm/memguard.h	Wed Oct 12 17:57:57 2011	(r226312)
+++ head/sys/vm/memguard.h	Wed Oct 12 18:08:28 2011	(r226313)
@@ -40,7 +40,8 @@ void	memguard_init(struct vm_map *);
 void 	*memguard_alloc(unsigned long, int);
 void	*memguard_realloc(void *, unsigned long, struct malloc_type *, int);
 void	memguard_free(void *);
-int	memguard_cmp(struct malloc_type *, unsigned long);
+int	memguard_cmp_mtp(struct malloc_type *, unsigned long);
+int	memguard_cmp_zone(uma_zone_t);
 int	is_memguard_addr(void *);
 #else
 #define	memguard_fudge(size, xxx)	(size)
@@ -48,7 +49,8 @@ int	is_memguard_addr(void *);
 #define	memguard_alloc(size, flags)	NULL
 #define	memguard_realloc(a, s, mtp, f)	NULL
 #define	memguard_free(addr)		do { } while (0)
-#define	memguard_cmp(mtp, size)		0
+#define	memguard_cmp_mtp(mtp, size)	0
+#define	memguard_cmp_zone(zone)		0
 #define	is_memguard_addr(addr)		0
 #endif
 

Modified: head/sys/vm/uma.h
==============================================================================
--- head/sys/vm/uma.h	Wed Oct 12 17:57:57 2011	(r226312)
+++ head/sys/vm/uma.h	Wed Oct 12 18:08:28 2011	(r226313)
@@ -255,8 +255,8 @@ int uma_zsecond_add(uma_zone_t zone, uma
  * physical parameters of the request and may not be provided by the consumer.
  */
 #define	UMA_ZONE_INHERIT						\
-    (UMA_ZONE_OFFPAGE | UMA_ZONE_MALLOC | UMA_ZONE_HASH |		\
-    UMA_ZONE_REFCNT | UMA_ZONE_VTOSLAB)
+    (UMA_ZONE_OFFPAGE | UMA_ZONE_MALLOC | UMA_ZONE_NOFREE |		\
+    UMA_ZONE_HASH | UMA_ZONE_REFCNT | UMA_ZONE_VTOSLAB)
 
 /* Definitions for align */
 #define UMA_ALIGN_PTR	(sizeof(void *) - 1)	/* Alignment fit for ptr */

Modified: head/sys/vm/uma_core.c
==============================================================================
--- head/sys/vm/uma_core.c	Wed Oct 12 17:57:57 2011	(r226312)
+++ head/sys/vm/uma_core.c	Wed Oct 12 18:08:28 2011	(r226313)
@@ -59,6 +59,7 @@ __FBSDID("$FreeBSD$");
 
 #include "opt_ddb.h"
 #include "opt_param.h"
+#include "opt_vm.h"
 
 #include 
 #include 
@@ -88,6 +89,10 @@ __FBSDID("$FreeBSD$");
 
 #include 
 
+#ifdef DEBUG_MEMGUARD
+#include 
+#endif
+
 /*
  * This is the zone and keg from which all zones are spawned.  The idea is that
  * even the zone & keg heads are allocated from the allocator, so we use the
@@ -1978,7 +1983,29 @@ uma_zalloc_arg(uma_zone_t zone, void *ud
 		WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL,
 		    "uma_zalloc_arg: zone \"%s\"", zone->uz_name);
 	}
-
+#ifdef DEBUG_MEMGUARD
+	if (memguard_cmp_zone(zone)) {
+		item = memguard_alloc(zone->uz_size, flags);
+		if (item != NULL) {
+			/*
+			 * Avoid conflict with the use-after-free
+			 * protecting infrastructure from INVARIANTS.
+			 */
+			if (zone->uz_init != NULL &&
+			    zone->uz_init != mtrash_init &&
+			    zone->uz_init(item, zone->uz_size, flags) != 0)
+				return (NULL);
+			if (zone->uz_ctor != NULL &&
+			    zone->uz_ctor != mtrash_ctor &&
+			    zone->uz_ctor(item, zone->uz_size, udata, flags) != 0) {
+			    	zone->uz_fini(item, zone->uz_size);
+				return (NULL);
+			}
+			return (item);
+		}
+		/* This is unfortunate but should not be fatal. */
+	}
+#endif
 	/*
 	 * If possible, allocate from the per-CPU cache.  There are two
 	 * requirements for safe access to the per-CPU cache: (1) the thread
@@ -2544,7 +2571,16 @@ uma_zfree_arg(uma_zone_t zone, void *ite
         /* uma_zfree(..., NULL) does nothing, to match free(9). */
         if (item == NULL)
                 return;
-
+#ifdef DEBUG_MEMGUARD
+	if (is_memguard_addr(item)) {
+		if (zone->uz_dtor != NULL && zone->uz_dtor != mtrash_dtor)
+			zone->uz_dtor(item, zone->uz_size, udata);
+		if (zone->uz_fini != NULL && zone->uz_fini != mtrash_fini)
+			zone->uz_fini(item, zone->uz_size);
+		memguard_free(item);
+		return;
+	}
+#endif
 	if (zone->uz_dtor)
 		zone->uz_dtor(item, zone->uz_size, udata);
 

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 12 18:46:48 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8B9BA106564A;
	Wed, 12 Oct 2011 18:46:48 +0000 (UTC)
	(envelope-from glebius@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 715458FC18;
	Wed, 12 Oct 2011 18:46:48 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9CIkmHk079080;
	Wed, 12 Oct 2011 18:46:48 GMT (envelope-from glebius@svn.freebsd.org)
Received: (from glebius@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9CIkmmN079078;
	Wed, 12 Oct 2011 18:46:48 GMT (envelope-from glebius@svn.freebsd.org)
Message-Id: <201110121846.p9CIkmmN079078@svn.freebsd.org>
From: Gleb Smirnoff 
Date: Wed, 12 Oct 2011 18:46:48 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226314 - head/share/man/man9
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 12 Oct 2011 18:46:48 -0000

Author: glebius
Date: Wed Oct 12 18:46:48 2011
New Revision: 226314
URL: http://svn.freebsd.org/changeset/base/226314

Log:
  Document that memguard(9) now can guard uma(9) allocations.

Modified:
  head/share/man/man9/memguard.9

Modified: head/share/man/man9/memguard.9
==============================================================================
--- head/share/man/man9/memguard.9	Wed Oct 12 18:08:28 2011	(r226313)
+++ head/share/man/man9/memguard.9	Wed Oct 12 18:46:48 2011	(r226314)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd August 2, 2010
+.Dd October 12, 2011
 .Dt MEMGUARD 9
 .Os
 .Sh NAME
@@ -39,7 +39,6 @@ to help detect tamper-after-free scenari
 These problems are more and more common and likely with
 multithreaded kernels where race conditions are more prevalent.
 .Pp
-Currently,
 .Nm
 can take over
 .Fn malloc ,
@@ -47,8 +46,19 @@ can take over
 and
 .Fn free
 for a single malloc type.
+Alternatively
 .Nm
-can also guard all allocations larger than
+can take over
+.Fn uma_zalloc ,
+.Fn uma_zalloc_arg
+and
+.Fn uma_free
+for a single
+.Xr uma
+zone.
+Also
+.Nm
+can guard all allocations larger than
 .Dv PAGE_SIZE ,
 and can guard a random fraction of all allocations.
 There is also a knob to prevent allocations smaller than a specified
@@ -72,7 +82,10 @@ sysctl vm.memguard.desc=
 .Pp
 Where
 .Ar memory_type
-is a short description of the memory type to monitor.
+can be either a short description of the memory type to monitor,
+either name of
+.Xr uma 9
+zone.
 Only allocations from that
 .Ar memory_type
 made after
@@ -86,13 +99,28 @@ will potentially be guarded once the
 .Xr sysctl 8
 is set.
 Existing guarded allocations will still be properly released by
-.Xr free 9 .
+either
+.Xr free 9
+or
+.Xr uma_zfree 9 ,
+depending on what kind of allocation was taken over.
 .Pp
-The short description of a
+To determine short description of a
 .Xr malloc 9
-type is the second argument to
-.Xr MALLOC_DEFINE 9 ,
-so one has to find it in the kernel source.
+type one can either take it from the first column of
+.Xr vmstat 8 Fl m
+output, or to find it in the kernel source.
+It is the second argument to
+.Xr MALLOC_DEFINE 9
+macro.
+To determine name of
+.Xr uma 9
+zone one can either take it from the first column of
+.Xr vmstat 8 Fl z
+output, or to find it in the kernel source.
+It is the first argument to the
+.Xr uma_zcreate 9
+function.
 .Pp
 The
 .Va vm.memguard.divisor
@@ -142,12 +170,24 @@ or larger if
 .Va vm.memguard.options
 has the 2 bit set.
 This option is off by default.
+By default
+.Nm
+doesn't guard those
+.Xr uma 9
+zones that have been initialized with the
+.Dv UMA_ZONE_NOFREE
+flag set, since it can produce false positives on them.
+However, this safety measure can be turned off by setting bit 3
+of the
+.Va vm.memguard.options
+tunable.
 .Sh SEE ALSO
 .Xr sysctl 8 ,
 .Xr vmstat 8 ,
 .Xr contigmalloc 9 ,
 .Xr malloc 9 ,
-.Xr redzone 9
+.Xr redzone 9 ,
+.Xr uma 9
 .Sh HISTORY
 .Nm
 first appeared in
@@ -161,8 +201,6 @@ This manual page was originally written 
 .An Christian Brueffer Aq brueffer@FreeBSD.org .
 Additions have been made by
 .An Matthew Fleming Aq mdf@FreeBSD.org
+and
+.An Gleb Smirnoff Aq glebius@FreeBSD.org
 to both the implementation and the documentation.
-.Sh BUGS
-Currently, it is not possible to override UMA
-.Xr zone 9
-allocations.

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 12 19:23:00 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C5D92106566C;
	Wed, 12 Oct 2011 19:23:00 +0000 (UTC)
	(envelope-from marius@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id B50EB8FC0C;
	Wed, 12 Oct 2011 19:23:00 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9CJN0aW080487;
	Wed, 12 Oct 2011 19:23:00 GMT (envelope-from marius@svn.freebsd.org)
Received: (from marius@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9CJN0a5080485;
	Wed, 12 Oct 2011 19:23:00 GMT (envelope-from marius@svn.freebsd.org)
Message-Id: <201110121923.p9CJN0a5080485@svn.freebsd.org>
From: Marius Strobl 
Date: Wed, 12 Oct 2011 19:23:00 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226315 - stable/9/sys/dev/iwn
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 12 Oct 2011 19:23:00 -0000

Author: marius
Date: Wed Oct 12 19:23:00 2011
New Revision: 226315
URL: http://svn.freebsd.org/changeset/base/226315

Log:
  MFC: r226176
  
  Recognize the Intel(R) Centrino(R) Wireless-N 130.
  
  PR:		161162
  Submitted by:	Mikhail Tsatsenko
  Approved by:	re (kib)

Modified:
  stable/9/sys/dev/iwn/if_iwn.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/amd64/include/xen/   (props changed)
  stable/9/sys/boot/   (props changed)
  stable/9/sys/boot/i386/efi/   (props changed)
  stable/9/sys/boot/ia64/efi/   (props changed)
  stable/9/sys/boot/ia64/ski/   (props changed)
  stable/9/sys/boot/powerpc/boot1.chrp/   (props changed)
  stable/9/sys/boot/powerpc/ofw/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)
  stable/9/sys/conf/   (props changed)
  stable/9/sys/contrib/dev/acpica/   (props changed)
  stable/9/sys/contrib/octeon-sdk/   (props changed)
  stable/9/sys/contrib/pf/   (props changed)
  stable/9/sys/contrib/x86emu/   (props changed)

Modified: stable/9/sys/dev/iwn/if_iwn.c
==============================================================================
--- stable/9/sys/dev/iwn/if_iwn.c	Wed Oct 12 18:46:48 2011	(r226314)
+++ stable/9/sys/dev/iwn/if_iwn.c	Wed Oct 12 19:23:00 2011	(r226315)
@@ -89,6 +89,7 @@ static const struct iwn_ident iwn_ident_
 	{ 0x8086, 0x008b, "Intel(R) Centrino(R) Wireless-N 1030"	 },
 	{ 0x8086, 0x0090, "Intel(R) Centrino(R) Advanced-N 6230"	 },
 	{ 0x8086, 0x0091, "Intel(R) Centrino(R) Advanced-N 6230"	 },
+	{ 0x8086, 0x0896, "Intel(R) Centrino(R) Wireless-N 130"		 },
 	{ 0x8086, 0x4229, "Intel(R) Wireless WiFi Link 4965"		 },
 	{ 0x8086, 0x422b, "Intel(R) Centrino(R) Ultimate-N 6300"	 },
 	{ 0x8086, 0x422c, "Intel(R) Centrino(R) Advanced-N 6200"	 },

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 12 19:23:28 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 6510D1065672;
	Wed, 12 Oct 2011 19:23:28 +0000 (UTC)
	(envelope-from marius@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 54BD98FC19;
	Wed, 12 Oct 2011 19:23:28 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9CJNSKX080544;
	Wed, 12 Oct 2011 19:23:28 GMT (envelope-from marius@svn.freebsd.org)
Received: (from marius@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9CJNSg5080542;
	Wed, 12 Oct 2011 19:23:28 GMT (envelope-from marius@svn.freebsd.org)
Message-Id: <201110121923.p9CJNSg5080542@svn.freebsd.org>
From: Marius Strobl 
Date: Wed, 12 Oct 2011 19:23:28 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226316 - stable/8/sys/dev/iwn
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 12 Oct 2011 19:23:28 -0000

Author: marius
Date: Wed Oct 12 19:23:28 2011
New Revision: 226316
URL: http://svn.freebsd.org/changeset/base/226316

Log:
  MFC: r226176
  
  Recognize the Intel(R) Centrino(R) Wireless-N 130.
  
  PR:		161162
  Submitted by:	Mikhail Tsatsenko

Modified:
  stable/8/sys/dev/iwn/if_iwn.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/dev/iwn/if_iwn.c
==============================================================================
--- stable/8/sys/dev/iwn/if_iwn.c	Wed Oct 12 19:23:00 2011	(r226315)
+++ stable/8/sys/dev/iwn/if_iwn.c	Wed Oct 12 19:23:28 2011	(r226316)
@@ -89,6 +89,7 @@ static const struct iwn_ident iwn_ident_
 	{ 0x8086, 0x008b, "Intel(R) Centrino(R) Wireless-N 1030"	 },
 	{ 0x8086, 0x0090, "Intel(R) Centrino(R) Advanced-N 6230"	 },
 	{ 0x8086, 0x0091, "Intel(R) Centrino(R) Advanced-N 6230"	 },
+	{ 0x8086, 0x0896, "Intel(R) Centrino(R) Wireless-N 130"		 },
 	{ 0x8086, 0x4229, "Intel(R) Wireless WiFi Link 4965"		 },
 	{ 0x8086, 0x422b, "Intel(R) Centrino(R) Ultimate-N 6300"	 },
 	{ 0x8086, 0x422c, "Intel(R) Centrino(R) Advanced-N 6200"	 },

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 12 19:25:12 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id DCEEA106566B;
	Wed, 12 Oct 2011 19:25:12 +0000 (UTC)
	(envelope-from marius@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id CC7348FC12;
	Wed, 12 Oct 2011 19:25:12 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9CJPCQe080649;
	Wed, 12 Oct 2011 19:25:12 GMT (envelope-from marius@svn.freebsd.org)
Received: (from marius@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9CJPCVc080647;
	Wed, 12 Oct 2011 19:25:12 GMT (envelope-from marius@svn.freebsd.org)
Message-Id: <201110121925.p9CJPCVc080647@svn.freebsd.org>
From: Marius Strobl 
Date: Wed, 12 Oct 2011 19:25:12 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226317 - stable/8/sys/dev/iwn
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 12 Oct 2011 19:25:13 -0000

Author: marius
Date: Wed Oct 12 19:25:12 2011
New Revision: 226317
URL: http://svn.freebsd.org/changeset/base/226317

Log:
  MFC: r225686
  
  Manually set the channel when using monitor mode - the firmware
  doesn't select it automatically.
  
  Submitted by:	nox
  Reviewed by:	bschmidt
  PR:		kern/160815

Modified:
  stable/8/sys/dev/iwn/if_iwn.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/dev/iwn/if_iwn.c
==============================================================================
--- stable/8/sys/dev/iwn/if_iwn.c	Wed Oct 12 19:23:28 2011	(r226316)
+++ stable/8/sys/dev/iwn/if_iwn.c	Wed Oct 12 19:25:12 2011	(r226317)
@@ -6656,12 +6656,24 @@ iwn_set_channel(struct ieee80211com *ic)
 	const struct ieee80211_channel *c = ic->ic_curchan;
 	struct ifnet *ifp = ic->ic_ifp;
 	struct iwn_softc *sc = ifp->if_softc;
+	int error;
 
 	IWN_LOCK(sc);
 	sc->sc_rxtap.wr_chan_freq = htole16(c->ic_freq);
 	sc->sc_rxtap.wr_chan_flags = htole16(c->ic_flags);
 	sc->sc_txtap.wt_chan_freq = htole16(c->ic_freq);
 	sc->sc_txtap.wt_chan_flags = htole16(c->ic_flags);
+
+	/*
+	 * Only need to set the channel in Monitor mode. AP scanning and auth
+	 * are already taken care of by their respective firmware commands.
+	 */
+	if (ic->ic_opmode == IEEE80211_M_MONITOR) {
+		error = iwn_config(sc);
+		if (error != 0)
+		device_printf(sc->sc_dev,
+		    "%s: error %d settting channel\n", __func__, error);
+	}
 	IWN_UNLOCK(sc);
 }
 

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 12 19:52:24 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 78702106564A;
	Wed, 12 Oct 2011 19:52:24 +0000 (UTC) (envelope-from np@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 2F8728FC0C;
	Wed, 12 Oct 2011 19:52:24 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9CJqOXQ081506;
	Wed, 12 Oct 2011 19:52:24 GMT (envelope-from np@svn.freebsd.org)
Received: (from np@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9CJqOhG081504;
	Wed, 12 Oct 2011 19:52:24 GMT (envelope-from np@svn.freebsd.org)
Message-Id: <201110121952.p9CJqOhG081504@svn.freebsd.org>
From: Navdeep Parhar 
Date: Wed, 12 Oct 2011 19:52:24 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226318 - head/sys/netinet
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 12 Oct 2011 19:52:24 -0000

Author: np
Date: Wed Oct 12 19:52:23 2011
New Revision: 226318
URL: http://svn.freebsd.org/changeset/base/226318

Log:
  Make sure the inp wasn't dropped when rexmt let go of the inp and
  pcbinfo locks.
  
  Reviewed by:	andre@
  MFC after:	7 days

Modified:
  head/sys/netinet/tcp_timer.c

Modified: head/sys/netinet/tcp_timer.c
==============================================================================
--- head/sys/netinet/tcp_timer.c	Wed Oct 12 19:25:12 2011	(r226317)
+++ head/sys/netinet/tcp_timer.c	Wed Oct 12 19:52:23 2011	(r226318)
@@ -495,6 +495,13 @@ tcp_timer_rexmt(void * xtp)
 			CURVNET_RESTORE();
 			return;
 		}
+		if (inp->inp_flags & INP_DROPPED) {
+			INP_WUNLOCK(inp);
+			INP_INFO_WUNLOCK(&V_tcbinfo);
+			CURVNET_RESTORE();
+			return;
+		}
+
 		tp = tcp_drop(tp, tp->t_softerror ?
 			      tp->t_softerror : ETIMEDOUT);
 		headlocked = 1;

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 12 20:08:26 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 332EE1065674;
	Wed, 12 Oct 2011 20:08:26 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 2096D8FC0A;
	Wed, 12 Oct 2011 20:08:26 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9CK8Qxs082047;
	Wed, 12 Oct 2011 20:08:26 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9CK8Pf0082040;
	Wed, 12 Oct 2011 20:08:25 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <201110122008.p9CK8Pf0082040@svn.freebsd.org>
From: Konstantin Belousov 
Date: Wed, 12 Oct 2011 20:08:25 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226319 - in stable/9/sys: ia64/ia64 powerpc/booke
	sparc64/sparc64 vm
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 12 Oct 2011 20:08:26 -0000

Author: kib
Date: Wed Oct 12 20:08:25 2011
New Revision: 226319
URL: http://svn.freebsd.org/changeset/base/226319

Log:
  Handle page dirty mask with atomics.
  
  MFC r225838:
  Use the explicitly-sized types for the dirty and valid masks.
  
  MFC r225840:
  Use the trick of performing the atomic operation on the contained aligned
  word to handle the dirty mask updates in vm_page_clear_dirty_mask().
  
  MFC 225841
  Remove locking of the vm page queues from several pmaps.
  
  MFC r225843:
  Fix grammar.
  
  MFC r225856:
  Style nit.
  
  Approved by:	re (bz)

Modified:
  stable/9/sys/ia64/ia64/pmap.c
  stable/9/sys/powerpc/booke/pmap.c
  stable/9/sys/sparc64/sparc64/pmap.c
  stable/9/sys/vm/vm_fault.c
  stable/9/sys/vm/vm_page.c
  stable/9/sys/vm/vm_page.h
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/amd64/include/xen/   (props changed)
  stable/9/sys/boot/   (props changed)
  stable/9/sys/boot/i386/efi/   (props changed)
  stable/9/sys/boot/ia64/efi/   (props changed)
  stable/9/sys/boot/ia64/ski/   (props changed)
  stable/9/sys/boot/powerpc/boot1.chrp/   (props changed)
  stable/9/sys/boot/powerpc/ofw/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)
  stable/9/sys/conf/   (props changed)
  stable/9/sys/contrib/dev/acpica/   (props changed)
  stable/9/sys/contrib/octeon-sdk/   (props changed)
  stable/9/sys/contrib/pf/   (props changed)
  stable/9/sys/contrib/x86emu/   (props changed)

Modified: stable/9/sys/ia64/ia64/pmap.c
==============================================================================
--- stable/9/sys/ia64/ia64/pmap.c	Wed Oct 12 19:52:23 2011	(r226318)
+++ stable/9/sys/ia64/ia64/pmap.c	Wed Oct 12 20:08:25 2011	(r226319)
@@ -1486,7 +1486,6 @@ pmap_protect(pmap_t pmap, vm_offset_t sv
 	if ((sva & PAGE_MASK) || (eva & PAGE_MASK))
 		panic("pmap_protect: unaligned addresses");
 
-	vm_page_lock_queues();
 	PMAP_LOCK(pmap);
 	oldpmap = pmap_switch(pmap);
 	for ( ; sva < eva; sva += PAGE_SIZE) {
@@ -1514,7 +1513,6 @@ pmap_protect(pmap_t pmap, vm_offset_t sv
 		pmap_pte_prot(pmap, pte, prot);
 		pmap_invalidate_page(sva);
 	}
-	vm_page_unlock_queues();
 	pmap_switch(oldpmap);
 	PMAP_UNLOCK(pmap);
 }

Modified: stable/9/sys/powerpc/booke/pmap.c
==============================================================================
--- stable/9/sys/powerpc/booke/pmap.c	Wed Oct 12 19:52:23 2011	(r226318)
+++ stable/9/sys/powerpc/booke/pmap.c	Wed Oct 12 20:08:25 2011	(r226319)
@@ -1918,7 +1918,6 @@ mmu_booke_protect(mmu_t mmu, pmap_t pmap
 	if (prot & VM_PROT_WRITE)
 		return;
 
-	vm_page_lock_queues();
 	PMAP_LOCK(pmap);
 	for (va = sva; va < eva; va += PAGE_SIZE) {
 		if ((pte = pte_find(mmu, pmap, va)) != NULL) {
@@ -1941,7 +1940,6 @@ mmu_booke_protect(mmu_t mmu, pmap_t pmap
 		}
 	}
 	PMAP_UNLOCK(pmap);
-	vm_page_unlock_queues();
 }
 
 /*

Modified: stable/9/sys/sparc64/sparc64/pmap.c
==============================================================================
--- stable/9/sys/sparc64/sparc64/pmap.c	Wed Oct 12 19:52:23 2011	(r226318)
+++ stable/9/sys/sparc64/sparc64/pmap.c	Wed Oct 12 20:08:25 2011	(r226319)
@@ -1423,6 +1423,7 @@ pmap_protect_tte(struct pmap *pm, struct
 	u_long data;
 	vm_page_t m;
 
+	PMAP_LOCK_ASSERT(pm, MA_OWNED);
 	data = atomic_clear_long(&tp->tte_data, TD_SW | TD_W);
 	if ((data & (TD_PV | TD_W)) == (TD_PV | TD_W)) {
 		m = PHYS_TO_VM_PAGE(TD_PA(data));
@@ -1451,7 +1452,6 @@ pmap_protect(pmap_t pm, vm_offset_t sva,
 	if (prot & VM_PROT_WRITE)
 		return;
 
-	vm_page_lock_queues();
 	PMAP_LOCK(pm);
 	if (eva - sva > PMAP_TSB_THRESH) {
 		tsb_foreach(pm, NULL, sva, eva, pmap_protect_tte);
@@ -1463,7 +1463,6 @@ pmap_protect(pmap_t pm, vm_offset_t sva,
 		tlb_range_demap(pm, sva, eva - 1);
 	}
 	PMAP_UNLOCK(pm);
-	vm_page_unlock_queues();
 }
 
 /*

Modified: stable/9/sys/vm/vm_fault.c
==============================================================================
--- stable/9/sys/vm/vm_fault.c	Wed Oct 12 19:52:23 2011	(r226318)
+++ stable/9/sys/vm/vm_fault.c	Wed Oct 12 20:08:25 2011	(r226319)
@@ -1090,18 +1090,10 @@ vm_fault_quick_hold_pages(vm_map_t map, 
 			 * performed through an unmanaged mapping or by a DMA
 			 * operation.
 			 *
-			 * The object lock is not held here.  Therefore, like
-			 * a pmap operation, the page queues lock may be
-			 * required in order to call vm_page_dirty().  See
-			 * vm_page_clear_dirty_mask().
+			 * The object lock is not held here.
+			 * See vm_page_clear_dirty_mask().
 			 */
-#if defined(__amd64__) || defined(__i386__) || defined(__ia64__)
 			vm_page_dirty(*mp);
-#else
-			vm_page_lock_queues();
-			vm_page_dirty(*mp);
-			vm_page_unlock_queues();
-#endif
 		}
 	}
 	if (pmap_failed) {

Modified: stable/9/sys/vm/vm_page.c
==============================================================================
--- stable/9/sys/vm/vm_page.c	Wed Oct 12 19:52:23 2011	(r226318)
+++ stable/9/sys/vm/vm_page.c	Wed Oct 12 20:08:25 2011	(r226319)
@@ -745,9 +745,9 @@ vm_page_sleep(vm_page_t m, const char *m
  *
  *	Set all bits in the page's dirty field.
  *
- *	The object containing the specified page must be locked if the call is
- *	made from the machine-independent layer.  If, however, the call is
- *	made from the pmap layer, then the page queues lock may be required.
+ *	The object containing the specified page must be locked if the
+ *	call is made from the machine-independent layer.
+ *
  *	See vm_page_clear_dirty_mask().
  */
 void
@@ -2339,44 +2339,52 @@ vm_page_set_valid(vm_page_t m, int base,
 static __inline void
 vm_page_clear_dirty_mask(vm_page_t m, int pagebits)
 {
+	uintptr_t addr;
+#if PAGE_SIZE < 16384
+	int shift;
+#endif
 
 	/*
 	 * If the object is locked and the page is neither VPO_BUSY nor
 	 * PGA_WRITEABLE, then the page's dirty field cannot possibly be
-	 * set by a concurrent pmap operation. 
+	 * set by a concurrent pmap operation.
 	 */
 	VM_OBJECT_LOCK_ASSERT(m->object, MA_OWNED);
 	if ((m->oflags & VPO_BUSY) == 0 && (m->aflags & PGA_WRITEABLE) == 0)
 		m->dirty &= ~pagebits;
 	else {
-#if defined(__amd64__) || defined(__i386__) || defined(__ia64__)
 		/*
-		 * On the aforementioned architectures, the page queues lock
-		 * is not required by the following read-modify-write
-		 * operation.  The combination of the object's lock and an
-		 * atomic operation suffice.  Moreover, the pmap layer on
-		 * these architectures can call vm_page_dirty() without
-		 * holding the page queues lock.
+		 * The pmap layer can call vm_page_dirty() without
+		 * holding a distinguished lock.  The combination of
+		 * the object's lock and an atomic operation suffice
+		 * to guarantee consistency of the page dirty field.
+		 *
+		 * For PAGE_SIZE == 32768 case, compiler already
+		 * properly aligns the dirty field, so no forcible
+		 * alignment is needed. Only require existence of
+		 * atomic_clear_64 when page size is 32768.
 		 */
-#if PAGE_SIZE == 4096
-		atomic_clear_char(&m->dirty, pagebits);
-#elif PAGE_SIZE == 8192
-		atomic_clear_short(&m->dirty, pagebits);
+		addr = (uintptr_t)&m->dirty;
+#if PAGE_SIZE == 32768
+#error pagebits too short
+		atomic_clear_64((uint64_t *)addr, pagebits);
 #elif PAGE_SIZE == 16384
-		atomic_clear_int(&m->dirty, pagebits);
-#else
-#error "PAGE_SIZE is not supported."
-#endif
-#else
+		atomic_clear_32((uint32_t *)addr, pagebits);
+#else		/* PAGE_SIZE <= 8192 */
 		/*
-		 * Otherwise, the page queues lock is required to ensure that
-		 * a concurrent pmap operation does not set the page's dirty
-		 * field during the following read-modify-write operation.
+		 * Use a trick to perform a 32-bit atomic on the
+		 * containing aligned word, to not depend on the existence
+		 * of atomic_clear_{8, 16}.
 		 */
-		vm_page_lock_queues();
-		m->dirty &= ~pagebits;
-		vm_page_unlock_queues();
+		shift = addr & (sizeof(uint32_t) - 1);
+#if BYTE_ORDER == BIG_ENDIAN
+		shift = (sizeof(uint32_t) - sizeof(m->dirty) - shift) * NBBY;
+#else
+		shift *= NBBY;
 #endif
+		addr &= ~(sizeof(uint32_t) - 1);
+		atomic_clear_32((uint32_t *)addr, pagebits << shift);
+#endif		/* PAGE_SIZE */
 	}
 }
 

Modified: stable/9/sys/vm/vm_page.h
==============================================================================
--- stable/9/sys/vm/vm_page.h	Wed Oct 12 19:52:23 2011	(r226318)
+++ stable/9/sys/vm/vm_page.h	Wed Oct 12 20:08:25 2011	(r226319)
@@ -94,21 +94,21 @@
  *	object that the page belongs to (O), the pool lock for the page (P),
  *	or the lock for either the free or paging queues (Q).  If a field is
  *	annotated below with two of these locks, then holding either lock is
- *	sufficient for read access, but both locks are required for write 
+ *	sufficient for read access, but both locks are required for write
  *	access.
  *
- *	In contrast, the synchronization of accesses to the page's dirty field
- *	is machine dependent (M).  In the machine-independent layer, the lock
- *	on the object that the page belongs to must be held in order to
- *	operate on the field.  However, the pmap layer is permitted to set
- *	all bits within the field without holding that lock.  Therefore, if
- *	the underlying architecture does not support atomic read-modify-write
- *	operations on the field's type, then the machine-independent layer
- *	must also hold the page queues lock when performing read-modify-write
- *	operations and the pmap layer must hold the page queues lock when
- *	setting the field.  In the machine-independent layer, the
- *	implementation of read-modify-write operations on the field is
- *	encapsulated in vm_page_clear_dirty_mask().
+ *	In contrast, the synchronization of accesses to the page's
+ *	dirty field is machine dependent (M).  In the
+ *	machine-independent layer, the lock on the object that the
+ *	page belongs to must be held in order to operate on the field.
+ *	However, the pmap layer is permitted to set all bits within
+ *	the field without holding that lock.  If the underlying
+ *	architecture does not support atomic read-modify-write
+ *	operations on the field's type, then the machine-independent
+ *	layer uses a 32-bit atomic on the aligned 32-bit word that
+ *	contains the dirty field.  In the machine-independent layer,
+ *	the implementation of read-modify-write operations on the
+ *	field is encapsulated in vm_page_clear_dirty_mask().
  */
 
 TAILQ_HEAD(pglist, vm_page);
@@ -139,17 +139,17 @@ struct vm_page {
 	/* so, on normal X86 kernels, they must be at least 8 bits wide */
 	/* In reality, support for 32KB pages is not fully implemented. */
 #if PAGE_SIZE == 4096
-	u_char	valid;			/* map of valid DEV_BSIZE chunks (O) */
-	u_char	dirty;			/* map of dirty DEV_BSIZE chunks (M) */
+	uint8_t	valid;			/* map of valid DEV_BSIZE chunks (O) */
+	uint8_t	dirty;			/* map of dirty DEV_BSIZE chunks (M) */
 #elif PAGE_SIZE == 8192
-	u_short	valid;			/* map of valid DEV_BSIZE chunks (O) */
-	u_short	dirty;			/* map of dirty DEV_BSIZE chunks (M) */
+	uint16_t valid;			/* map of valid DEV_BSIZE chunks (O) */
+	uint16_t dirty;			/* map of dirty DEV_BSIZE chunks (M) */
 #elif PAGE_SIZE == 16384
-	u_int valid;			/* map of valid DEV_BSIZE chunks (O) */
-	u_int dirty;			/* map of dirty DEV_BSIZE chunks (M) */
+	uint32_t valid;			/* map of valid DEV_BSIZE chunks (O) */
+	uint32_t dirty;			/* map of dirty DEV_BSIZE chunks (M) */
 #elif PAGE_SIZE == 32768
-	u_long valid;			/* map of valid DEV_BSIZE chunks (O) */
-	u_long dirty;			/* map of dirty DEV_BSIZE chunks (M) */
+	uint64_t valid;			/* map of valid DEV_BSIZE chunks (O) */
+	uint64_t dirty;			/* map of dirty DEV_BSIZE chunks (M) */
 #endif
 };
 

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 12 20:18:14 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 4B2EE1065670;
	Wed, 12 Oct 2011 20:18:14 +0000 (UTC)
	(envelope-from gleb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 215B08FC14;
	Wed, 12 Oct 2011 20:18:14 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9CKIEUW082386;
	Wed, 12 Oct 2011 20:18:14 GMT (envelope-from gleb@svn.freebsd.org)
Received: (from gleb@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9CKIEPJ082383;
	Wed, 12 Oct 2011 20:18:14 GMT (envelope-from gleb@svn.freebsd.org)
Message-Id: <201110122018.p9CKIEPJ082383@svn.freebsd.org>
From: Gleb Kurtsou 
Date: Wed, 12 Oct 2011 20:18:13 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226320 - in head: share/misc usr.bin/calendar/calendars
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 12 Oct 2011 20:18:14 -0000

Author: gleb
Date: Wed Oct 12 20:18:13 2011
New Revision: 226320
URL: http://svn.freebsd.org/changeset/base/226320

Log:
  Add myself
  
  Approved by:	mdf (mentor)

Modified:
  head/share/misc/committers-src.dot
  head/usr.bin/calendar/calendars/calendar.freebsd

Modified: head/share/misc/committers-src.dot
==============================================================================
--- head/share/misc/committers-src.dot	Wed Oct 12 20:08:25 2011	(r226319)
+++ head/share/misc/committers-src.dot	Wed Oct 12 20:18:13 2011	(r226320)
@@ -141,6 +141,7 @@ gad [label="Garance A. Drosehn\ngad@Free
 gallatin [label="Andrew Gallatin\ngallatin@FreeBSD.org\n????/??/??"]
 gavin [label="Gavin Atkinson\ngavin@FreeBSD.org\n2009/12/07"]
 gibbs [label="Justin T. Gibbs\ngibbs@FreeBSD.org\n????/??/??"]
+gleb [label="Gleb Kurtsou\ngleb@FreeBSD.org\n2011/09/19"]
 glebius [label="Gleb Smirnoff\nglebius@FreeBSD.org\n2004/07/14"]
 gnn [label="George V. Neville-Neil\ngnn@FreeBSD.org\n2004/10/11"]
 gordon [label="Gordon Tetlow\ngordon@FreeBSD.org\n2002/05/17"]
@@ -464,6 +465,8 @@ markm -> sheldonh
 
 mav -> ae
 
+mdf -> gleb
+
 mdodd -> jake
 
 mike -> das

Modified: head/usr.bin/calendar/calendars/calendar.freebsd
==============================================================================
--- head/usr.bin/calendar/calendars/calendar.freebsd	Wed Oct 12 20:08:25 2011	(r226319)
+++ head/usr.bin/calendar/calendars/calendar.freebsd	Wed Oct 12 20:18:13 2011	(r226320)
@@ -274,6 +274,7 @@
 09/17	Maxim Bolotin  born in Rostov-on-Don, Russian Federation, 1976
 09/18	Matthew Fleming  born in Cleveland, Ohio, United States, 1975
 09/20	Kevin Lo  born in Taipei, Taiwan, Republic of China, 1972
+09/21	Gleb Kurtsou  born in Minsk, Belarus, 1984
 09/27	Neil Blakey-Milner  born in Port Elizabeth, South Africa, 1978
 09/27	Renato Botelho  born in Araras, Sao Paulo, Brazil, 1979
 09/28	Greg Lehey  born in Melbourne, Victoria, Australia, 1948

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 12 20:36:46 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 3D6B9106564A;
	Wed, 12 Oct 2011 20:36:46 +0000 (UTC)
	(envelope-from gavin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 2CA328FC12;
	Wed, 12 Oct 2011 20:36:46 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9CKak1O083034;
	Wed, 12 Oct 2011 20:36:46 GMT (envelope-from gavin@svn.freebsd.org)
Received: (from gavin@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9CKakaY083032;
	Wed, 12 Oct 2011 20:36:46 GMT (envelope-from gavin@svn.freebsd.org)
Message-Id: <201110122036.p9CKakaY083032@svn.freebsd.org>
From: Gavin Atkinson 
Date: Wed, 12 Oct 2011 20:36:46 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226321 - stable/8/sbin/mount
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 12 Oct 2011 20:36:46 -0000

Author: gavin
Date: Wed Oct 12 20:36:45 2011
New Revision: 226321
URL: http://svn.freebsd.org/changeset/base/226321

Log:
  Merge r222754 from head:
  
    Add another example to mount(8) on using the "-o" argument.
  
  PR:		docs/157389
  Submitted by:	Warren Block 

Modified:
  stable/8/sbin/mount/mount.8
Directory Properties:
  stable/8/sbin/mount/   (props changed)

Modified: stable/8/sbin/mount/mount.8
==============================================================================
--- stable/8/sbin/mount/mount.8	Wed Oct 12 20:18:13 2011	(r226320)
+++ stable/8/sbin/mount/mount.8	Wed Oct 12 20:36:45 2011	(r226321)
@@ -28,7 +28,7 @@
 .\"     @(#)mount.8	8.8 (Berkeley) 6/16/94
 .\" $FreeBSD$
 .\"
-.Dd February 10, 2010
+.Dd June 6, 2011
 .Dt MOUNT 8
 .Os
 .Sh NAME
@@ -348,7 +348,6 @@ option) may be passed as a comma separat
 distinguished by a leading
 .Dq \&-
 (dash).
-Options that take a value are specified using the syntax -option=value.
 For example, the
 .Nm
 command:
@@ -363,6 +362,16 @@ to execute the equivalent of:
 /sbin/mount_cd9660 -e /dev/cd0 /cdrom
 .Ed
 .Pp
+Options that take a value are specified using the -option=value syntax:
+.Bd -literal -offset indent
+mount -t msdosfs -o -u=fred,-g=wheel /dev/da0s1 /mnt
+.Ed
+.Pp
+is equivalent to
+.Bd -literal -offset indent
+/sbin/mount_msdosfs -u fred -g wheel /dev/da0s1 /mnt
+.Ed
+.Pp
 Additional options specific to file system types
 which are not internally known
 (see the description of the

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 12 20:38:07 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id EB912106566C;
	Wed, 12 Oct 2011 20:38:07 +0000 (UTC)
	(envelope-from cperciva@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id DAD068FC15;
	Wed, 12 Oct 2011 20:38:07 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9CKc71F083136;
	Wed, 12 Oct 2011 20:38:07 GMT
	(envelope-from cperciva@svn.freebsd.org)
Received: (from cperciva@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9CKc7a7083134;
	Wed, 12 Oct 2011 20:38:07 GMT
	(envelope-from cperciva@svn.freebsd.org)
Message-Id: <201110122038.p9CKc7a7083134@svn.freebsd.org>
From: Colin Percival 
Date: Wed, 12 Oct 2011 20:38:07 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226322 - stable/9/etc
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 12 Oct 2011 20:38:08 -0000

Author: cperciva
Date: Wed Oct 12 20:38:07 2011
New Revision: 226322
URL: http://svn.freebsd.org/changeset/base/226322

Log:
  MFC r226277: Add INDEX-9 to the set of INDEX files built by portsnap.
  
  Approved by:	re (kib)

Modified:
  stable/9/etc/portsnap.conf
Directory Properties:
  stable/9/etc/   (props changed)

Modified: stable/9/etc/portsnap.conf
==============================================================================
--- stable/9/etc/portsnap.conf	Wed Oct 12 20:36:45 2011	(r226321)
+++ stable/9/etc/portsnap.conf	Wed Oct 12 20:38:07 2011	(r226322)
@@ -32,3 +32,4 @@ KEYPRINT=9b5feee6d69f170e3dd0a2c8e469ddb
 # List of INDEX files to build and the DESCRIBE file to use for each
 INDEX INDEX-7 DESCRIBE.7
 INDEX INDEX-8 DESCRIBE.8
+INDEX INDEX-9 DESCRIBE.9

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 12 20:40:25 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id EBDD0106564A;
	Wed, 12 Oct 2011 20:40:25 +0000 (UTC)
	(envelope-from gavin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id DB13D8FC12;
	Wed, 12 Oct 2011 20:40:25 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9CKePgZ083236;
	Wed, 12 Oct 2011 20:40:25 GMT (envelope-from gavin@svn.freebsd.org)
Received: (from gavin@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9CKePZ1083234;
	Wed, 12 Oct 2011 20:40:25 GMT (envelope-from gavin@svn.freebsd.org)
Message-Id: <201110122040.p9CKePZ1083234@svn.freebsd.org>
From: Gavin Atkinson 
Date: Wed, 12 Oct 2011 20:40:25 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226323 - stable/7/sbin/mount
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 12 Oct 2011 20:40:26 -0000

Author: gavin
Date: Wed Oct 12 20:40:25 2011
New Revision: 226323
URL: http://svn.freebsd.org/changeset/base/226323

Log:
  Merge r222754 from head:
  
    Add another example to mount(8) on using the "-o" argument.
  
  PR:		docs/157389
  Submitted by:	Warren Block 

Modified:
  stable/7/sbin/mount/mount.8
Directory Properties:
  stable/7/sbin/mount/   (props changed)

Modified: stable/7/sbin/mount/mount.8
==============================================================================
--- stable/7/sbin/mount/mount.8	Wed Oct 12 20:38:07 2011	(r226322)
+++ stable/7/sbin/mount/mount.8	Wed Oct 12 20:40:25 2011	(r226323)
@@ -28,7 +28,7 @@
 .\"     @(#)mount.8	8.8 (Berkeley) 6/16/94
 .\" $FreeBSD$
 .\"
-.Dd March 11, 2008
+.Dd June 6, 2011
 .Dt MOUNT 8
 .Os
 .Sh NAME
@@ -336,7 +336,6 @@ option) may be passed as a comma separat
 distinguished by a leading
 .Dq \&-
 (dash).
-Options that take a value are specified using the syntax -option=value.
 For example, the
 .Nm
 command:
@@ -351,6 +350,16 @@ to execute the equivalent of:
 /sbin/mount_cd9660 -e /dev/cd0 /cdrom
 .Ed
 .Pp
+Options that take a value are specified using the -option=value syntax:
+.Bd -literal -offset indent
+mount -t msdosfs -o -u=fred,-g=wheel /dev/da0s1 /mnt
+.Ed
+.Pp
+is equivalent to
+.Bd -literal -offset indent
+/sbin/mount_msdosfs -u fred -g wheel /dev/da0s1 /mnt
+.Ed
+.Pp
 Additional options specific to file system types
 which are not internally known
 (see the description of the

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 12 20:57:21 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8F62C106566B;
	Wed, 12 Oct 2011 20:57:21 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 65A568FC15;
	Wed, 12 Oct 2011 20:57:21 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9CKvLA0083847;
	Wed, 12 Oct 2011 20:57:21 GMT (envelope-from thompsa@svn.freebsd.org)
Received: (from thompsa@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9CKvLH7083845;
	Wed, 12 Oct 2011 20:57:21 GMT (envelope-from thompsa@svn.freebsd.org)
Message-Id: <201110122057.p9CKvLH7083845@svn.freebsd.org>
From: Andrew Thompson 
Date: Wed, 12 Oct 2011 20:57:21 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226324 - head/sys/arm/xscale/ixp425
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 12 Oct 2011 20:57:21 -0000

Author: thompsa
Date: Wed Oct 12 20:57:21 2011
New Revision: 226324
URL: http://svn.freebsd.org/changeset/base/226324

Log:
  Dont just set the pin high when turning on output, use the current value. Also
  let this value be set when in input mode.

Modified:
  head/sys/arm/xscale/ixp425/cambria_gpio.c

Modified: head/sys/arm/xscale/ixp425/cambria_gpio.c
==============================================================================
--- head/sys/arm/xscale/ixp425/cambria_gpio.c	Wed Oct 12 20:40:25 2011	(r226323)
+++ head/sys/arm/xscale/ixp425/cambria_gpio.c	Wed Oct 12 20:57:21 2011	(r226324)
@@ -84,6 +84,7 @@ struct cambria_gpio_softc {
         struct mtx		sc_mtx;
 	struct gpio_pin		sc_pins[GPIO_PINS];
 	uint8_t			sc_latch;
+	uint8_t			sc_val;
 };
 
 struct cambria_gpio_pin {
@@ -309,6 +310,9 @@ cambria_gpio_pin_setflags(device_t dev, 
 {
 	struct cambria_gpio_softc *sc = device_get_softc(dev);
 	int error;
+	uint8_t mask;
+
+	mask = 1 << pin;
 
 	if (pin >= GPIO_PINS)
 		return (EINVAL);
@@ -325,7 +329,16 @@ cambria_gpio_pin_setflags(device_t dev, 
 	GPIO_LOCK(sc);
 	sc->sc_pins[pin].gp_flags = flags;
 
-	sc->sc_latch |= (1 << pin);
+	/*
+	 * Writing a logical one sets the signal high and writing a logical
+	 * zero sets the signal low. To configure a digital I/O signal as an
+	 * input, a logical one must first be written to the data bit to
+	 * three-state the associated output.
+	 */
+	if (flags & GPIO_PIN_INPUT || sc->sc_val & mask)
+		sc->sc_latch |= mask; /* input or output & high */
+	else
+		sc->sc_latch &= ~mask;
 	error = cambria_gpio_write(sc);
 	GPIO_UNLOCK(sc);
 
@@ -337,15 +350,28 @@ cambria_gpio_pin_set(device_t dev, uint3
 {
 	struct cambria_gpio_softc *sc = device_get_softc(dev);
 	int error;
+	uint8_t mask;
 
-	if (pin >= GPIO_PINS || sc->sc_pins[pin].gp_flags != GPIO_PIN_OUTPUT)
-		return (EINVAL);
+	mask = 1 << pin;
 
+	if (pin >= GPIO_PINS)
+		return (EINVAL);
 	GPIO_LOCK(sc);
 	if (value)
-		sc->sc_latch |= (1 << pin);
+		sc->sc_val |= mask;
 	else
-		sc->sc_latch &= ~(1 << pin);
+		sc->sc_val &= ~mask;
+
+	if (sc->sc_pins[pin].gp_flags != GPIO_PIN_OUTPUT) {
+		/* just save, altering the latch will disable input */
+		GPIO_UNLOCK(sc);
+		return (0);
+	}
+
+	if (value)
+		sc->sc_latch |= mask;
+	else
+		sc->sc_latch &= ~mask;
 	error = cambria_gpio_write(sc);
 	GPIO_UNLOCK(sc);
 
@@ -375,14 +401,17 @@ static int
 cambria_gpio_pin_toggle(device_t dev, uint32_t pin)
 {
 	struct cambria_gpio_softc *sc = device_get_softc(dev);
-	int error;
+	int error = 0;
 
-	if (pin >= GPIO_PINS || sc->sc_pins[pin].gp_flags != GPIO_PIN_OUTPUT)
+	if (pin >= GPIO_PINS)
 		return (EINVAL);
 
 	GPIO_LOCK(sc);
-	sc->sc_latch ^= (1 << pin);
-	error = cambria_gpio_write(sc);
+	sc->sc_val ^= (1 << pin);
+	if (sc->sc_pins[pin].gp_flags == GPIO_PIN_OUTPUT) {
+		sc->sc_latch ^= (1 << pin);
+		error = cambria_gpio_write(sc);
+	}
 	GPIO_UNLOCK(sc);
 
 	return (error);

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 12 20:58:54 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C5059106564A;
	Wed, 12 Oct 2011 20:58:54 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id B4C9C8FC08;
	Wed, 12 Oct 2011 20:58:54 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9CKwsOr083923;
	Wed, 12 Oct 2011 20:58:54 GMT (envelope-from thompsa@svn.freebsd.org)
Received: (from thompsa@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9CKwsAn083921;
	Wed, 12 Oct 2011 20:58:54 GMT (envelope-from thompsa@svn.freebsd.org)
Message-Id: <201110122058.p9CKwsAn083921@svn.freebsd.org>
From: Andrew Thompson 
Date: Wed, 12 Oct 2011 20:58:54 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226325 - head/sys/arm/xscale/ixp425
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 12 Oct 2011 20:58:54 -0000

Author: thompsa
Date: Wed Oct 12 20:58:54 2011
New Revision: 226325
URL: http://svn.freebsd.org/changeset/base/226325

Log:
  Name these gpio pins better, they are on an external PLD and not the same as
  the cpu wired gpio.

Modified:
  head/sys/arm/xscale/ixp425/cambria_gpio.c

Modified: head/sys/arm/xscale/ixp425/cambria_gpio.c
==============================================================================
--- head/sys/arm/xscale/ixp425/cambria_gpio.c	Wed Oct 12 20:57:21 2011	(r226324)
+++ head/sys/arm/xscale/ixp425/cambria_gpio.c	Wed Oct 12 20:58:54 2011	(r226325)
@@ -96,11 +96,11 @@ struct cambria_gpio_pin {
 extern struct ixp425_softc *ixp425_softc;
 
 static struct cambria_gpio_pin cambria_gpio_pins[GPIO_PINS] = {
-	{ "GPIO0", 0, GPIO_PIN_OUTPUT },
-	{ "GPIO1", 1, GPIO_PIN_OUTPUT },
-	{ "GPIO2", 2, GPIO_PIN_OUTPUT },
-	{ "GPIO3", 3, GPIO_PIN_OUTPUT },
-	{ "GPIO4", 4, GPIO_PIN_OUTPUT },
+	{ "PLD0", 0, GPIO_PIN_OUTPUT },
+	{ "PLD1", 1, GPIO_PIN_OUTPUT },
+	{ "PLD2", 2, GPIO_PIN_OUTPUT },
+	{ "PLD3", 3, GPIO_PIN_OUTPUT },
+	{ "PLD4", 4, GPIO_PIN_OUTPUT },
 };
 
 /*

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 12 21:02:59 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 292141065674;
	Wed, 12 Oct 2011 21:02:59 +0000 (UTC)
	(envelope-from qingli@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 0F4068FC08;
	Wed, 12 Oct 2011 21:02:59 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9CL2wte084099;
	Wed, 12 Oct 2011 21:02:58 GMT (envelope-from qingli@svn.freebsd.org)
Received: (from qingli@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9CL2wtn084097;
	Wed, 12 Oct 2011 21:02:58 GMT (envelope-from qingli@svn.freebsd.org)
Message-Id: <201110122102.p9CL2wtn084097@svn.freebsd.org>
From: Qing Li 
Date: Wed, 12 Oct 2011 21:02:58 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226326 - stable/9/sys/netinet
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 12 Oct 2011 21:02:59 -0000

Author: qingli
Date: Wed Oct 12 21:02:58 2011
New Revision: 226326
URL: http://svn.freebsd.org/changeset/base/226326

Log:
  MFC 225947
  
  A system may have multiple physical interfaces, all of which are on the
  same prefix. Since a single route entry is installed for the prefix
  (without RADIX_MPATH), incoming packets on the interfaces that are not
  associated with the prefix route may trigger an error message about
  unable to allocation LLE entry, and fails L2. This patch makes sure a
  valid route is present in the system, and allow the aforementioned
  condition to exist and treats as valid.
  
  Reviewed by:	bz
  Approved by:	re (kib)

Modified:
  stable/9/sys/netinet/in.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/amd64/include/xen/   (props changed)
  stable/9/sys/boot/   (props changed)
  stable/9/sys/boot/i386/efi/   (props changed)
  stable/9/sys/boot/ia64/efi/   (props changed)
  stable/9/sys/boot/ia64/ski/   (props changed)
  stable/9/sys/boot/powerpc/boot1.chrp/   (props changed)
  stable/9/sys/boot/powerpc/ofw/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)
  stable/9/sys/conf/   (props changed)
  stable/9/sys/contrib/dev/acpica/   (props changed)
  stable/9/sys/contrib/octeon-sdk/   (props changed)
  stable/9/sys/contrib/pf/   (props changed)
  stable/9/sys/contrib/x86emu/   (props changed)

Modified: stable/9/sys/netinet/in.c
==============================================================================
--- stable/9/sys/netinet/in.c	Wed Oct 12 20:58:54 2011	(r226325)
+++ stable/9/sys/netinet/in.c	Wed Oct 12 21:02:58 2011	(r226326)
@@ -1439,14 +1439,43 @@ in_lltable_rtcheck(struct ifnet *ifp, u_
 		if (memcmp(rt->rt_gateway->sa_data, l3addr->sa_data,
 		    sizeof(in_addr_t)) != 0)
 			error = EINVAL;
-	} else if (!(flags & LLE_PUB) && ((rt->rt_flags & RTF_GATEWAY) ||
-	    (rt->rt_ifp != ifp))) {
+	}
+
+	if (rt->rt_flags & RTF_GATEWAY) {
+		RTFREE_LOCKED(rt);
+		return (EINVAL);
+	}
+
+	/*
+	 * Make sure that at least the destination address is covered 
+	 * by the route. This is for handling the case where 2 or more 
+	 * interfaces have the same prefix. An incoming packet arrives
+	 * on one interface and the corresponding outgoing packet leaves
+	 * another interface.
+	 * 
+	 */
+	if (rt->rt_ifp != ifp) {
+		char *sa, *mask, *addr, *lim;
+		int len;
+
+		sa = (char *)rt_key(rt);
+		mask = (char *)rt_mask(rt);
+		addr = (char *)__DECONST(struct sockaddr *, l3addr);
+		len = ((struct sockaddr_in *)__DECONST(struct sockaddr *, l3addr))->sin_len;
+		lim = addr + len;
+
+		for ( ; addr < lim; sa++, mask++, addr++) {
+			if ((*sa ^ *addr) & *mask) {
+				error = EINVAL;
 #ifdef DIAGNOSTIC
-		log(LOG_INFO, "IPv4 address: \"%s\" is not on the network\n",
-		    inet_ntoa(((const struct sockaddr_in *)l3addr)->sin_addr));
+				log(LOG_INFO, "IPv4 address: \"%s\" is not on the network\n",
+				    inet_ntoa(((const struct sockaddr_in *)l3addr)->sin_addr));
 #endif
-		error = EINVAL;
+				break;
+			}
+		}
 	}
+
 	RTFREE_LOCKED(rt);
 	return (error);
 }

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 12 21:06:54 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 698B1106566B;
	Wed, 12 Oct 2011 21:06:54 +0000 (UTC) (envelope-from des@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 582AE8FC08;
	Wed, 12 Oct 2011 21:06:54 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9CL6skU084274;
	Wed, 12 Oct 2011 21:06:54 GMT (envelope-from des@svn.freebsd.org)
Received: (from des@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9CL6s6w084271;
	Wed, 12 Oct 2011 21:06:54 GMT (envelope-from des@svn.freebsd.org)
Message-Id: <201110122106.p9CL6s6w084271@svn.freebsd.org>
From: Dag-Erling Smorgrav 
Date: Wed, 12 Oct 2011 21:06:54 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226327 - in stable/8/contrib/openpam: doc/man
	include/security
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 12 Oct 2011 21:06:54 -0000

Author: des
Date: Wed Oct 12 21:06:54 2011
New Revision: 226327
URL: http://svn.freebsd.org/changeset/base/226327

Log:
  MFH r197899: grammar nit in pam.conf(5)
  MFH r205441: remove OPENPAM_NONNULL from pam_end()

Modified:
  stable/8/contrib/openpam/doc/man/pam.conf.5
  stable/8/contrib/openpam/include/security/pam_appl.h
Directory Properties:
  stable/8/contrib/openpam/   (props changed)

Modified: stable/8/contrib/openpam/doc/man/pam.conf.5
==============================================================================
--- stable/8/contrib/openpam/doc/man/pam.conf.5	Wed Oct 12 21:02:58 2011	(r226326)
+++ stable/8/contrib/openpam/doc/man/pam.conf.5	Wed Oct 12 21:06:54 2011	(r226327)
@@ -109,7 +109,7 @@ will be failure regardless of the succes
 .It Cm requisite
 If this module succeeds, the result of the chain will be success
 unless a later module fails.
-If it module fails, the chain is broken and the result is failure.
+If the module fails, the chain is broken and the result is failure.
 .It Cm sufficient
 If this module succeeds, the chain is broken and the result is
 success.

Modified: stable/8/contrib/openpam/include/security/pam_appl.h
==============================================================================
--- stable/8/contrib/openpam/include/security/pam_appl.h	Wed Oct 12 21:02:58 2011	(r226326)
+++ stable/8/contrib/openpam/include/security/pam_appl.h	Wed Oct 12 21:06:54 2011	(r226327)
@@ -72,8 +72,7 @@ pam_close_session(pam_handle_t *_pamh,
 
 int
 pam_end(pam_handle_t *_pamh,
-	int _status)
-	OPENPAM_NONNULL((1));
+	int _status);
 
 int
 pam_get_data(const pam_handle_t *_pamh,

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 12 21:38:49 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5A785106566C;
	Wed, 12 Oct 2011 21:38:49 +0000 (UTC)
	(envelope-from gavin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 49A628FC12;
	Wed, 12 Oct 2011 21:38:49 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9CLcndr085301;
	Wed, 12 Oct 2011 21:38:49 GMT (envelope-from gavin@svn.freebsd.org)
Received: (from gavin@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9CLcnI2085299;
	Wed, 12 Oct 2011 21:38:49 GMT (envelope-from gavin@svn.freebsd.org)
Message-Id: <201110122138.p9CLcnI2085299@svn.freebsd.org>
From: Gavin Atkinson 
Date: Wed, 12 Oct 2011 21:38:49 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226328 - stable/8/etc/devd
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 12 Oct 2011 21:38:49 -0000

Author: gavin
Date: Wed Oct 12 21:38:48 2011
New Revision: 226328
URL: http://svn.freebsd.org/changeset/base/226328

Log:
  Merge r223566 from head:
  
    The SMCWUSBG is a zyd(4) device, not an uath(4) device.  Remove from
    the latter.
  
    It appears that the addition to uath(4) came in through PR kern/135009,
    which had tested another device, the SMCWUSBTG2, successfully with
    uath(4) and included the SMCWUSBG as it "has the same chipset".  I can
    find no other evidence that these two do actually share the same chipset.
    Moreover, Linux treats the SMCWUSBG as a zyd(4) device also.
  
  This is a partial merge, as it appears that the kernel parts of r223566
  were already merged in r223605.
  
  Discussed with:	hselasky, kevlo

Modified:
  stable/8/etc/devd/uath.conf
Directory Properties:
  stable/8/etc/   (props changed)

Modified: stable/8/etc/devd/uath.conf
==============================================================================
--- stable/8/etc/devd/uath.conf	Wed Oct 12 21:06:54 2011	(r226327)
+++ stable/8/etc/devd/uath.conf	Wed Oct 12 21:38:48 2011	(r226328)
@@ -3,13 +3,13 @@
 # Atheros USB wireless network device specific devd events
 
 # Accton
-#   SMCWUSB-G and SMCWUSBT-G2
+#   SMCWUSBT-G2
 notify 100 {
 	match "system"		"USB";
 	match "subsystem"	"DEVICE";
 	match "type"		"ATTACH";
 	match "vendor"		"0x083a";
-	match "product"		"(0x4505|0x4507)";
+	match "product"		"0x4507";
 	action "/usr/sbin/uathload -d /dev/$cdev";
 };
 

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 12 21:45:12 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E332B106566B;
	Wed, 12 Oct 2011 21:45:12 +0000 (UTC) (envelope-from des@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id D259D8FC12;
	Wed, 12 Oct 2011 21:45:12 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9CLjCVu085542;
	Wed, 12 Oct 2011 21:45:12 GMT (envelope-from des@svn.freebsd.org)
Received: (from des@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9CLjCcm085538;
	Wed, 12 Oct 2011 21:45:12 GMT (envelope-from des@svn.freebsd.org)
Message-Id: <201110122145.p9CLjCcm085538@svn.freebsd.org>
From: Dag-Erling Smorgrav 
Date: Wed, 12 Oct 2011 21:45:12 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226329 - head/usr.bin/kdump
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 12 Oct 2011 21:45:13 -0000

Author: des
Date: Wed Oct 12 21:45:12 2011
New Revision: 226329
URL: http://svn.freebsd.org/changeset/base/226329

Log:
  Make kdump compile cleanly at WARNS level 6, with one exception: the
  ipfilter headers contain a duplicated function declaration.  Turn off
  -Werror to allow kdump to compile in spite of this.
  
  It would be neat to be able to turn off -Werror on a file-by-file basis...
  
  PR:		bin/161478
  Submitted by:	Garrett Cooper 

Modified:
  head/usr.bin/kdump/Makefile
  head/usr.bin/kdump/kdump.c
  head/usr.bin/kdump/mkioctls

Modified: head/usr.bin/kdump/Makefile
==============================================================================
--- head/usr.bin/kdump/Makefile	Wed Oct 12 21:38:48 2011	(r226328)
+++ head/usr.bin/kdump/Makefile	Wed Oct 12 21:45:12 2011	(r226329)
@@ -16,9 +16,9 @@ CFLAGS+=	-I${.CURDIR}/../ktrace -I${.CUR
 SRCS+=		linux_syscalls.c
 .endif
 
-WARNS?=		0
+NO_WERROR?=	YES
 
-CLEANFILES=	ioctl.c kdump_subr.c linux_syscalls.c
+CLEANFILES=	ioctl.c kdump_subr.c kdump_subr.h linux_syscalls.c
 
 ioctl.c: mkioctls
 	sh ${.CURDIR}/mkioctls ${DESTDIR}/usr/include > ${.TARGET}

Modified: head/usr.bin/kdump/kdump.c
==============================================================================
--- head/usr.bin/kdump/kdump.c	Wed Oct 12 21:38:48 2011	(r226328)
+++ head/usr.bin/kdump/kdump.c	Wed Oct 12 21:45:12 2011	(r226329)
@@ -95,6 +95,8 @@ void visdump(char *, int, int);
 void ktrgenio(struct ktr_genio *, int);
 void ktrpsig(struct ktr_psig *);
 void ktrcsw(struct ktr_csw *);
+void ktruser_malloc(unsigned char *);
+void ktruser_rtld(int, unsigned char *);
 void ktruser(int, unsigned char *);
 void ktrsockaddr(struct sockaddr *);
 void ktrstat(struct stat *);
@@ -508,7 +510,6 @@ ktrsyscall(struct ktr_syscall *ktr, u_in
 		    (flags == 0 || (flags & SV_ABI_MASK) == SV_ABI_FREEBSD)) {
 			switch (ktr->ktr_code) {
 			case SYS_ioctl: {
-				const char *cp;
 				print_number(ip, narg, c);
 				putchar(c);
 				ioctlname(*ip, decimal);
@@ -1334,7 +1335,7 @@ struct utrace_malloc {
 };
 
 void
-ktruser_malloc(int len, unsigned char *p)
+ktruser_malloc(unsigned char *p)
 {
 	struct utrace_malloc *ut = (struct utrace_malloc *)p;
 
@@ -1358,7 +1359,7 @@ ktruser(int len, unsigned char *p)
 	}
 
 	if (len == sizeof(struct utrace_malloc)) {
-		ktruser_malloc(len, p);
+		ktruser_malloc(p);
 		return;
 	}
 
@@ -1393,61 +1394,67 @@ ktrsockaddr(struct sockaddr *sa)
 	printf(", ");
 
 #define check_sockaddr_len(n)					\
-	if (sa_##n->s##n##_len < sizeof(struct sockaddr_##n)) {	\
+	if (sa_##n.s##n##_len < sizeof(struct sockaddr_##n)) {	\
 		printf("invalid");				\
 		break;						\
 	}
 
 	switch(sa->sa_family) {
 	case AF_INET: {
-		struct sockaddr_in	*sa_in;
+		struct sockaddr_in sa_in;
 
-		sa_in = (struct sockaddr_in *)sa;
+		memset(&sa_in, 0, sizeof(sa_in));
+		memcpy(&sa_in, sa, sizeof(sa));
 		check_sockaddr_len(in);
-		inet_ntop(AF_INET, &sa_in->sin_addr, addr, sizeof addr);
-		printf("%s:%u", addr, ntohs(sa_in->sin_port));
+		inet_ntop(AF_INET, &sa_in.sin_addr, addr, sizeof addr);
+		printf("%s:%u", addr, ntohs(sa_in.sin_port));
 		break;
 	}
 #ifdef NETATALK
 	case AF_APPLETALK: {
-		struct sockaddr_at	*sa_at;
+		struct sockaddr_at	sa_at;
 		struct netrange		*nr;
 
-		sa_at = (struct sockaddr_at *)sa;
+		memset(&sa_at, 0, sizeof(sa_at));
+		memcpy(&sa_at, sa, sizeof(sa));
 		check_sockaddr_len(at);
-		nr = &sa_at->sat_range.r_netrange;
-		printf("%d.%d, %d-%d, %d", ntohs(sa_at->sat_addr.s_net),
-			sa_at->sat_addr.s_node, ntohs(nr->nr_firstnet),
+		nr = &sa_at.sat_range.r_netrange;
+		printf("%d.%d, %d-%d, %d", ntohs(sa_at.sat_addr.s_net),
+			sa_at.sat_addr.s_node, ntohs(nr->nr_firstnet),
 			ntohs(nr->nr_lastnet), nr->nr_phase);
 		break;
 	}
 #endif
 	case AF_INET6: {
-		struct sockaddr_in6	*sa_in6;
+		struct sockaddr_in6 sa_in6;
 
-		sa_in6 = (struct sockaddr_in6 *)sa;
+		memset(&sa_in6, 0, sizeof(sa_in6));
+		memcpy(&sa_in6, sa, sizeof(sa));
 		check_sockaddr_len(in6);
-		inet_ntop(AF_INET6, &sa_in6->sin6_addr, addr, sizeof addr);
-		printf("[%s]:%u", addr, htons(sa_in6->sin6_port));
+		inet_ntop(AF_INET6, &sa_in6.sin6_addr, addr, sizeof addr);
+		printf("[%s]:%u", addr, htons(sa_in6.sin6_port));
 		break;
 	}
 #ifdef IPX
 	case AF_IPX: {
-		struct sockaddr_ipx	*sa_ipx;
+		struct sockaddr_ipx sa_ipx;
 
-		sa_ipx = (struct sockaddr_ipx *)sa;
+		memset(&sa_ipx, 0, sizeof(sa_ipx));
+		memcpy(&sa_ipx, sa, sizeof(sa));
 		check_sockaddr_len(ipx);
 		/* XXX wish we had ipx_ntop */
-		printf("%s", ipx_ntoa(sa_ipx->sipx_addr));
+		printf("%s", ipx_ntoa(sa_ipx.sipx_addr));
+		free(sa_ipx);
 		break;
 	}
 #endif
 	case AF_UNIX: {
-		struct sockaddr_un *sa_un;
+		struct sockaddr_un sa_un;
 
-		sa_un = (struct sockaddr_un *)sa;
+		memset(&sa_un, 0, sizeof(sa_un));
+		memcpy(&sa_un, sa, sizeof(sa));
 		check_sockaddr_len(un);
-		printf("%.*s", (int)sizeof(sa_un->sun_path), sa_un->sun_path);
+		printf("%.*s", (int)sizeof(sa_un.sun_path), sa_un.sun_path);
 		break;
 	}
 	default:
@@ -1558,8 +1565,8 @@ ktrstruct(char *buf, size_t buflen)
 	if (datalen == 0)
 		goto invalid;
 	/* sanity check */
-	for (i = 0; i < namelen; ++i)
-		if (!isalpha((unsigned char)name[i]))
+	for (i = 0; i < (int)namelen; ++i)
+		if (!isalpha(name[i]))
 			goto invalid;
 	if (strcmp(name, "stat") == 0) {
 		if (datalen != sizeof(struct stat))

Modified: head/usr.bin/kdump/mkioctls
==============================================================================
--- head/usr.bin/kdump/mkioctls	Wed Oct 12 21:38:48 2011	(r226328)
+++ head/usr.bin/kdump/mkioctls	Wed Oct 12 21:45:12 2011	(r226329)
@@ -15,12 +15,21 @@ LC_ALL=C; export LC_ALL
 # XXX should we use an ANSI cpp?
 ioctl_includes=`
 	cd $1
-	find -H -s * -name '*.h' |
+	find -H -s * -name '*.h' | grep -v '.*disk.*\.h' | \
 		xargs egrep -l \
 '^#[ 	]*define[ 	]+[A-Za-z_][A-Za-z0-9_]*[ 	]+_IO[^a-z0-9_]' |
 		awk '{printf("#include <%s>\\\\n", $1)}'
 `
 
+case "`uname -m`" in
+*pc98*)
+	ioctl_includes="$ioctl_includes#include \\n"
+	;;
+*)
+	ioctl_includes="$ioctl_includes#include \\n"
+	;;
+esac
+
 awk -v x="$ioctl_includes" 'BEGIN {print x}' |
 	gcc -E -I$1 -dM -DCOMPAT_43TTY - |
 	awk -v ioctl_includes="$ioctl_includes" '

From owner-svn-src-all@FreeBSD.ORG  Thu Oct 13 00:37:40 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 2AD13106567B;
	Thu, 13 Oct 2011 00:37:40 +0000 (UTC)
	(envelope-from qingli@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 19C4D8FC0C;
	Thu, 13 Oct 2011 00:37:40 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9D0bdWx090923;
	Thu, 13 Oct 2011 00:37:39 GMT (envelope-from qingli@svn.freebsd.org)
Received: (from qingli@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9D0bdMM090921;
	Thu, 13 Oct 2011 00:37:39 GMT (envelope-from qingli@svn.freebsd.org)
Message-Id: <201110130037.p9D0bdMM090921@svn.freebsd.org>
From: Qing Li 
Date: Thu, 13 Oct 2011 00:37:39 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226330 - stable/8/sys/netinet
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 13 Oct 2011 00:37:40 -0000

Author: qingli
Date: Thu Oct 13 00:37:39 2011
New Revision: 226330
URL: http://svn.freebsd.org/changeset/base/226330

Log:
  MFC 226224
  
  All indirect routes will fail the rtcheck, except for a special host
  route where the destination IP and the gateway IP is the same. This
  special case handling is only meant for backward compatibility reason.
  The last commit introduced a bug in the route check logic, where a
  valid special case is treated as an error. This patch fixes that bug
  along with some code cleanup.
  
  Suggested by:	glebius smirnoff
  Reviewed by:	kmacy, discussed with glebius smirnoff

Modified:
  stable/8/sys/netinet/in.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/netinet/in.c
==============================================================================
--- stable/8/sys/netinet/in.c	Wed Oct 12 21:45:12 2011	(r226329)
+++ stable/8/sys/netinet/in.c	Thu Oct 13 00:37:39 2011	(r226330)
@@ -1414,8 +1414,6 @@ static int
 in_lltable_rtcheck(struct ifnet *ifp, u_int flags, const struct sockaddr *l3addr)
 {
 	struct rtentry *rt;
-	struct ifnet *xifp;
-	int error = 0;
 
 	KASSERT(l3addr->sa_family == AF_INET,
 	    ("sin_family %d", l3addr->sa_family));
@@ -1432,21 +1430,16 @@ in_lltable_rtcheck(struct ifnet *ifp, u_
 	 * such as MANET, and the interface is of the correct type, then
 	 * allow for ARP to proceed.
 	 */
-	if (rt->rt_flags & (RTF_GATEWAY | RTF_HOST)) {
-		xifp = rt->rt_ifp;
-		
-		if (xifp && (xifp->if_type != IFT_ETHER ||
-		     (xifp->if_flags & (IFF_NOARP | IFF_STATICARP)) != 0))
-			error = EINVAL;
-
-		if (memcmp(rt->rt_gateway->sa_data, l3addr->sa_data,
-		    sizeof(in_addr_t)) != 0)
-			error = EINVAL;
-	}
-
 	if (rt->rt_flags & RTF_GATEWAY) {
-		RTFREE_LOCKED(rt);
-		return (EINVAL);
+		if (!(rt->rt_flags & RTF_HOST) || !rt->rt_ifp ||
+			rt->rt_ifp->if_type != IFT_ETHER ||
+			  (rt->rt_ifp->if_flags & 
+			   (IFF_NOARP | IFF_STATICARP)) != 0 ||
+			  memcmp(rt->rt_gateway->sa_data, l3addr->sa_data,
+				 sizeof(in_addr_t)) != 0) {
+			RTFREE_LOCKED(rt);
+			return (EINVAL);
+		}
 	}
 
 	/*
@@ -1455,32 +1448,31 @@ in_lltable_rtcheck(struct ifnet *ifp, u_
 	 * interfaces have the same prefix. An incoming packet arrives
 	 * on one interface and the corresponding outgoing packet leaves
 	 * another interface.
-	 * 
 	 */
 	if (rt->rt_ifp != ifp) {
-		char *sa, *mask, *addr, *lim;
+		const char *sa, *mask, *addr, *lim;
 		int len;
 
-		sa = (char *)rt_key(rt);
-		mask = (char *)rt_mask(rt);
-		addr = (char *)__DECONST(struct sockaddr *, l3addr);
-		len = ((struct sockaddr_in *)__DECONST(struct sockaddr *, l3addr))->sin_len;
+		sa = (const char *)rt_key(rt);
+		mask = (const char *)rt_mask(rt);
+		addr = (const char *)l3addr;
+		len = ((const struct sockaddr_in *)l3addr)->sin_len;
 		lim = addr + len;
 
 		for ( ; addr < lim; sa++, mask++, addr++) {
 			if ((*sa ^ *addr) & *mask) {
-				error = EINVAL;
 #ifdef DIAGNOSTIC
 				log(LOG_INFO, "IPv4 address: \"%s\" is not on the network\n",
 				    inet_ntoa(((const struct sockaddr_in *)l3addr)->sin_addr));
 #endif
-				break;
+				RTFREE_LOCKED(rt);
+				return (EINVAL);
 			}
 		}
 	}
 
 	RTFREE_LOCKED(rt);
-	return (error);
+	return (0);
 }
 
 /*

From owner-svn-src-all@FreeBSD.ORG  Thu Oct 13 00:44:25 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5F8B4106564A;
	Thu, 13 Oct 2011 00:44:25 +0000 (UTC)
	(envelope-from qingli@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 449C98FC12;
	Thu, 13 Oct 2011 00:44:25 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9D0iPk7091158;
	Thu, 13 Oct 2011 00:44:25 GMT (envelope-from qingli@svn.freebsd.org)
Received: (from qingli@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9D0iPIp091156;
	Thu, 13 Oct 2011 00:44:25 GMT (envelope-from qingli@svn.freebsd.org)
Message-Id: <201110130044.p9D0iPIp091156@svn.freebsd.org>
From: Qing Li 
Date: Thu, 13 Oct 2011 00:44:25 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226331 - stable/9/sys/netinet
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 13 Oct 2011 00:44:25 -0000

Author: qingli
Date: Thu Oct 13 00:44:24 2011
New Revision: 226331
URL: http://svn.freebsd.org/changeset/base/226331

Log:
  MFC 226224
  
  All indirect routes will fail the rtcheck, except for a special host
  route where the destination IP and the gateway IP is the same. This
  special case handling is only meant for backward compatibility reason.
  The last commit introduced a bug in the route check logic, where a
  valid special case is treated as an error. This patch fixes that bug
  along with some code cleanup.
  
  Suggested by:	glebius smirnoff
  Reviewed by:	kmacy, discussed with glebius smirnoff
  Approved by:	re (hrs)

Modified:
  stable/9/sys/netinet/in.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/amd64/include/xen/   (props changed)
  stable/9/sys/boot/   (props changed)
  stable/9/sys/boot/i386/efi/   (props changed)
  stable/9/sys/boot/ia64/efi/   (props changed)
  stable/9/sys/boot/ia64/ski/   (props changed)
  stable/9/sys/boot/powerpc/boot1.chrp/   (props changed)
  stable/9/sys/boot/powerpc/ofw/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)
  stable/9/sys/conf/   (props changed)
  stable/9/sys/contrib/dev/acpica/   (props changed)
  stable/9/sys/contrib/octeon-sdk/   (props changed)
  stable/9/sys/contrib/pf/   (props changed)
  stable/9/sys/contrib/x86emu/   (props changed)

Modified: stable/9/sys/netinet/in.c
==============================================================================
--- stable/9/sys/netinet/in.c	Thu Oct 13 00:37:39 2011	(r226330)
+++ stable/9/sys/netinet/in.c	Thu Oct 13 00:44:24 2011	(r226331)
@@ -1411,8 +1411,6 @@ static int
 in_lltable_rtcheck(struct ifnet *ifp, u_int flags, const struct sockaddr *l3addr)
 {
 	struct rtentry *rt;
-	struct ifnet *xifp;
-	int error = 0;
 
 	KASSERT(l3addr->sa_family == AF_INET,
 	    ("sin_family %d", l3addr->sa_family));
@@ -1429,21 +1427,16 @@ in_lltable_rtcheck(struct ifnet *ifp, u_
 	 * such as MANET, and the interface is of the correct type, then
 	 * allow for ARP to proceed.
 	 */
-	if (rt->rt_flags & (RTF_GATEWAY | RTF_HOST)) {
-		xifp = rt->rt_ifp;
-		
-		if (xifp && (xifp->if_type != IFT_ETHER ||
-		     (xifp->if_flags & (IFF_NOARP | IFF_STATICARP)) != 0))
-			error = EINVAL;
-
-		if (memcmp(rt->rt_gateway->sa_data, l3addr->sa_data,
-		    sizeof(in_addr_t)) != 0)
-			error = EINVAL;
-	}
-
 	if (rt->rt_flags & RTF_GATEWAY) {
-		RTFREE_LOCKED(rt);
-		return (EINVAL);
+		if (!(rt->rt_flags & RTF_HOST) || !rt->rt_ifp ||
+			rt->rt_ifp->if_type != IFT_ETHER ||
+			  (rt->rt_ifp->if_flags & 
+			   (IFF_NOARP | IFF_STATICARP)) != 0 ||
+			  memcmp(rt->rt_gateway->sa_data, l3addr->sa_data,
+				 sizeof(in_addr_t)) != 0) {
+			RTFREE_LOCKED(rt);
+			return (EINVAL);
+		}
 	}
 
 	/*
@@ -1452,32 +1445,31 @@ in_lltable_rtcheck(struct ifnet *ifp, u_
 	 * interfaces have the same prefix. An incoming packet arrives
 	 * on one interface and the corresponding outgoing packet leaves
 	 * another interface.
-	 * 
 	 */
 	if (rt->rt_ifp != ifp) {
-		char *sa, *mask, *addr, *lim;
+		const char *sa, *mask, *addr, *lim;
 		int len;
 
-		sa = (char *)rt_key(rt);
-		mask = (char *)rt_mask(rt);
-		addr = (char *)__DECONST(struct sockaddr *, l3addr);
-		len = ((struct sockaddr_in *)__DECONST(struct sockaddr *, l3addr))->sin_len;
+		sa = (const char *)rt_key(rt);
+		mask = (const char *)rt_mask(rt);
+		addr = (const char *)l3addr;
+		len = ((const struct sockaddr_in *)l3addr)->sin_len;
 		lim = addr + len;
 
 		for ( ; addr < lim; sa++, mask++, addr++) {
 			if ((*sa ^ *addr) & *mask) {
-				error = EINVAL;
 #ifdef DIAGNOSTIC
 				log(LOG_INFO, "IPv4 address: \"%s\" is not on the network\n",
 				    inet_ntoa(((const struct sockaddr_in *)l3addr)->sin_addr));
 #endif
-				break;
+				RTFREE_LOCKED(rt);
+				return (EINVAL);
 			}
 		}
 	}
 
 	RTFREE_LOCKED(rt);
-	return (error);
+	return (0);
 }
 
 /*

From owner-svn-src-all@FreeBSD.ORG  Thu Oct 13 00:52:41 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 990871065679;
	Thu, 13 Oct 2011 00:52:41 +0000 (UTC)
	(envelope-from adrian.chadd@gmail.com)
Received: from mail-gx0-f182.google.com (mail-gx0-f182.google.com
	[209.85.161.182])
	by mx1.freebsd.org (Postfix) with ESMTP id 1D6E88FC17;
	Thu, 13 Oct 2011 00:52:40 +0000 (UTC)
Received: by ggeq3 with SMTP id q3so1625437gge.13
	for ; Wed, 12 Oct 2011 17:52:40 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=mime-version:sender:in-reply-to:references:date
	:x-google-sender-auth:message-id:subject:from:to:cc:content-type;
	bh=sdPVbQVvNDeOpgbDG9fE9JnPPa1d6mKhfrXmgRd1c5w=;
	b=k+J4a4/Uvn097+KltPlW1ZtuxE9X0JAPItfhzOFRHmC6cOVDNAyCAQecs7JnaSIX/5
	zwnVN5nH7/XF9fgd88UJ66s0aDwf2kDEuwVmzIRUQjtPkmX7S0w6WsSxxLVdiqgqOe3g
	h5Apd4uEdUTloO2IGHwH7RaLUbb7MEb5jB3iQ=
MIME-Version: 1.0
Received: by 10.236.197.69 with SMTP id s45mr1896138yhn.54.1318467160268; Wed,
	12 Oct 2011 17:52:40 -0700 (PDT)
Sender: adrian.chadd@gmail.com
Received: by 10.236.175.161 with HTTP; Wed, 12 Oct 2011 17:52:40 -0700 (PDT)
In-Reply-To: <201110121923.p9CJNSg5080542@svn.freebsd.org>
References: <201110121923.p9CJNSg5080542@svn.freebsd.org>
Date: Thu, 13 Oct 2011 08:52:40 +0800
X-Google-Sender-Auth: M4LJt0mEjBY3EnCjUchNQ-cjEQE
Message-ID: 
From: Adrian Chadd 
To: Marius Strobl 
Content-Type: text/plain; charset=ISO-8859-1
Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org, svn-src-stable-8@freebsd.org
Subject: Re: svn commit: r226316 - stable/8/sys/dev/iwn
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 13 Oct 2011 00:52:41 -0000

Hi Marius,

If this is backported to -9 and -8, please make sure that the other
iwn changes have also been backported.
Bernhard has fixed quite a lot of corner cases in the -head code (and
I think they're all in -9) which caused some random issues with the
later NICs.



adrian

From owner-svn-src-all@FreeBSD.ORG  Thu Oct 13 03:21:48 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D61391065670;
	Thu, 13 Oct 2011 03:21:48 +0000 (UTC)
	(envelope-from qingli@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id C59038FC08;
	Thu, 13 Oct 2011 03:21:48 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9D3Lm3Q096215;
	Thu, 13 Oct 2011 03:21:48 GMT (envelope-from qingli@svn.freebsd.org)
Received: (from qingli@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9D3LmCx096213;
	Thu, 13 Oct 2011 03:21:48 GMT (envelope-from qingli@svn.freebsd.org)
Message-Id: <201110130321.p9D3LmCx096213@svn.freebsd.org>
From: Qing Li 
Date: Thu, 13 Oct 2011 03:21:48 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226332 - stable/9/sys/netinet6
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 13 Oct 2011 03:21:48 -0000

Author: qingli
Date: Thu Oct 13 03:21:48 2011
New Revision: 226332
URL: http://svn.freebsd.org/changeset/base/226332

Log:
  MFC 226040
  
  The IFA_RTSELF instead of the IFA_ROUTE flag should be checked to
  determine if a loopback route should be installed for an interface
  IPv6 address. Another condition is the address must not belong to a
  looopback interface.
  
  Reviewed by:	hrs
  Approved by:	re (kib)

Modified:
  stable/9/sys/netinet6/in6.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/amd64/include/xen/   (props changed)
  stable/9/sys/boot/   (props changed)
  stable/9/sys/boot/i386/efi/   (props changed)
  stable/9/sys/boot/ia64/efi/   (props changed)
  stable/9/sys/boot/ia64/ski/   (props changed)
  stable/9/sys/boot/powerpc/boot1.chrp/   (props changed)
  stable/9/sys/boot/powerpc/ofw/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)
  stable/9/sys/conf/   (props changed)
  stable/9/sys/contrib/dev/acpica/   (props changed)
  stable/9/sys/contrib/octeon-sdk/   (props changed)
  stable/9/sys/contrib/pf/   (props changed)
  stable/9/sys/contrib/x86emu/   (props changed)

Modified: stable/9/sys/netinet6/in6.c
==============================================================================
--- stable/9/sys/netinet6/in6.c	Thu Oct 13 00:44:24 2011	(r226331)
+++ stable/9/sys/netinet6/in6.c	Thu Oct 13 03:21:48 2011	(r226332)
@@ -1810,9 +1810,9 @@ in6_ifinit(struct ifnet *ifp, struct in6
 	/*
 	 * add a loopback route to self
 	 */
-	if (!(ia->ia_flags & IFA_ROUTE)
+	if (!(ia->ia_flags & IFA_RTSELF)
 	    && (V_nd6_useloopback
-		|| (ifp->if_flags & IFF_LOOPBACK))) {
+		&& !(ifp->if_flags & IFF_LOOPBACK))) {
 		error = ifa_add_loopback_route((struct ifaddr *)ia,
 				       (struct sockaddr *)&ia->ia_addr);
 		if (error == 0)

From owner-svn-src-all@FreeBSD.ORG  Thu Oct 13 07:30:02 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 04FF2106567C;
	Thu, 13 Oct 2011 07:30:01 +0000 (UTC)
	(envelope-from marius@alchemy.franken.de)
Received: from alchemy.franken.de (alchemy.franken.de [194.94.249.214])
	by mx1.freebsd.org (Postfix) with ESMTP id 884BD8FC14;
	Thu, 13 Oct 2011 07:30:01 +0000 (UTC)
Received: from alchemy.franken.de (localhost [127.0.0.1])
	by alchemy.franken.de (8.14.4/8.14.4/ALCHEMY.FRANKEN.DE) with ESMTP id
	p9D6qMNr045759; Thu, 13 Oct 2011 08:52:22 +0200 (CEST)
	(envelope-from marius@alchemy.franken.de)
Received: (from marius@localhost)
	by alchemy.franken.de (8.14.4/8.14.4/Submit) id p9D6qMQM045758;
	Thu, 13 Oct 2011 08:52:22 +0200 (CEST) (envelope-from marius)
Date: Thu, 13 Oct 2011 08:52:21 +0200
From: Marius Strobl 
To: Adrian Chadd 
Message-ID: <20111013065221.GB99998@alchemy.franken.de>
References: <201110121923.p9CJNSg5080542@svn.freebsd.org>
	
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: 
User-Agent: Mutt/1.4.2.3i
Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org, svn-src-stable-8@freebsd.org
Subject: Re: svn commit: r226316 - stable/8/sys/dev/iwn
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 13 Oct 2011 07:30:02 -0000

On Thu, Oct 13, 2011 at 08:52:40AM +0800, Adrian Chadd wrote:
> Hi Marius,
> 
> If this is backported to -9 and -8, please make sure that the other
> iwn changes have also been backported.
> Bernhard has fixed quite a lot of corner cases in the -head code (and
> I think they're all in -9) which caused some random issues with the
> later NICs.
> 

Well, I've checked before merging and iwn(4) was otherwise in sync between
head and 9. In 8 it has diverged a bit but these changes seemed to have not
been MFC'ed on purpose as it's HT stuff and older revisions that have not
been merged while the recent ones he did actually are.

Marius


From owner-svn-src-all@FreeBSD.ORG  Thu Oct 13 08:26:23 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A83DF106564A;
	Thu, 13 Oct 2011 08:26:23 +0000 (UTC)
	(envelope-from qingli@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 9728F8FC15;
	Thu, 13 Oct 2011 08:26:23 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9D8QNYQ006523;
	Thu, 13 Oct 2011 08:26:23 GMT (envelope-from qingli@svn.freebsd.org)
Received: (from qingli@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9D8QNe1006520;
	Thu, 13 Oct 2011 08:26:23 GMT (envelope-from qingli@svn.freebsd.org)
Message-Id: <201110130826.p9D8QNe1006520@svn.freebsd.org>
From: Qing Li 
Date: Thu, 13 Oct 2011 08:26:23 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226333 - stable/9/sys/netinet
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 13 Oct 2011 08:26:23 -0000

Author: qingli
Date: Thu Oct 13 08:26:23 2011
New Revision: 226333
URL: http://svn.freebsd.org/changeset/base/226333

Log:
  MFC 226114
  
  Remove the reference held on the loopback route when the interface
  address is being deleted. Only the last reference holder deletes the
  loopback route. All other delete operations just clear the IFA_RTSELF
  flag.
  
  PR:		kern/159601
  Submitted by:	pluknet
  Reviewed by:	discussed on net@
  Approved by:	re (kib)

Modified:
  stable/9/sys/netinet/in.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/amd64/include/xen/   (props changed)
  stable/9/sys/boot/   (props changed)
  stable/9/sys/boot/i386/efi/   (props changed)
  stable/9/sys/boot/ia64/efi/   (props changed)
  stable/9/sys/boot/ia64/ski/   (props changed)
  stable/9/sys/boot/powerpc/boot1.chrp/   (props changed)
  stable/9/sys/boot/powerpc/ofw/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)
  stable/9/sys/conf/   (props changed)
  stable/9/sys/contrib/dev/acpica/   (props changed)
  stable/9/sys/contrib/octeon-sdk/   (props changed)
  stable/9/sys/contrib/pf/   (props changed)
  stable/9/sys/contrib/x86emu/   (props changed)

Modified: stable/9/sys/netinet/in.c
==============================================================================
--- stable/9/sys/netinet/in.c	Thu Oct 13 03:21:48 2011	(r226332)
+++ stable/9/sys/netinet/in.c	Thu Oct 13 08:26:23 2011	(r226333)
@@ -1126,8 +1126,10 @@ in_scrubprefix(struct in_ifaddr *target,
 			RT_LOCK(ia_ro.ro_rt);
 			if (ia_ro.ro_rt->rt_refcnt <= 1)
 				freeit = 1;
-			else
+			else if (flags & LLE_STATIC) {
 				RT_REMREF(ia_ro.ro_rt);
+				target->ia_flags &= ~IFA_RTSELF;
+			}
 			RTFREE_LOCKED(ia_ro.ro_rt);
 		}
 		if (freeit && (flags & LLE_STATIC)) {

From owner-svn-src-all@FreeBSD.ORG  Thu Oct 13 09:21:49 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D206D1065686;
	Thu, 13 Oct 2011 09:21:49 +0000 (UTC)
	(envelope-from qingli@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id C11BB8FC20;
	Thu, 13 Oct 2011 09:21:49 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9D9LnpQ008349;
	Thu, 13 Oct 2011 09:21:49 GMT (envelope-from qingli@svn.freebsd.org)
Received: (from qingli@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9D9Lnoj008347;
	Thu, 13 Oct 2011 09:21:49 GMT (envelope-from qingli@svn.freebsd.org)
Message-Id: <201110130921.p9D9Lnoj008347@svn.freebsd.org>
From: Qing Li 
Date: Thu, 13 Oct 2011 09:21:49 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226337 - stable/9/sys/netinet
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 13 Oct 2011 09:21:49 -0000

Author: qingli
Date: Thu Oct 13 09:21:49 2011
New Revision: 226337
URL: http://svn.freebsd.org/changeset/base/226337

Log:
  MFC 226120
  
  PR:		kern/159602
  Submitted by:	pluknet
  Approved by:	re (kib)

Modified:
  stable/9/sys/netinet/in.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/amd64/include/xen/   (props changed)
  stable/9/sys/boot/   (props changed)
  stable/9/sys/boot/i386/efi/   (props changed)
  stable/9/sys/boot/ia64/efi/   (props changed)
  stable/9/sys/boot/ia64/ski/   (props changed)
  stable/9/sys/boot/powerpc/boot1.chrp/   (props changed)
  stable/9/sys/boot/powerpc/ofw/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)
  stable/9/sys/conf/   (props changed)
  stable/9/sys/contrib/dev/acpica/   (props changed)
  stable/9/sys/contrib/octeon-sdk/   (props changed)
  stable/9/sys/contrib/pf/   (props changed)
  stable/9/sys/contrib/x86emu/   (props changed)

Modified: stable/9/sys/netinet/in.c
==============================================================================
--- stable/9/sys/netinet/in.c	Thu Oct 13 08:36:11 2011	(r226336)
+++ stable/9/sys/netinet/in.c	Thu Oct 13 09:21:49 2011	(r226337)
@@ -1138,7 +1138,8 @@ in_scrubprefix(struct in_ifaddr *target,
 			if (error == 0)
 				target->ia_flags &= ~IFA_RTSELF;
 		}
-		if (flags & LLE_STATIC)
+		if ((flags & LLE_STATIC) &&
+			!(target->ia_ifp->if_flags & IFF_NOARP))
 			/* remove arp cache */
 			arp_ifscrub(target->ia_ifp, IA_SIN(target)->sin_addr.s_addr);
 	}

From owner-svn-src-all@FreeBSD.ORG  Thu Oct 13 10:04:16 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 3CE911065693;
	Thu, 13 Oct 2011 10:04:16 +0000 (UTC)
	(envelope-from peterjeremy@acm.org)
Received: from fallbackmx08.syd.optusnet.com.au
	(fallbackmx08.syd.optusnet.com.au [211.29.132.10])
	by mx1.freebsd.org (Postfix) with ESMTP id 26C5B8FC13;
	Thu, 13 Oct 2011 10:04:13 +0000 (UTC)
Received: from mail36.syd.optusnet.com.au (mail36.syd.optusnet.com.au
	[211.29.133.76])
	by fallbackmx08.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id
	p9D7nAbs022872; Thu, 13 Oct 2011 18:49:12 +1100
Received: from server.vk2pj.dyndns.org
	(c220-239-116-103.belrs4.nsw.optusnet.com.au [220.239.116.103])
	by mail36.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id
	p9D7m2kB018638
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Thu, 13 Oct 2011 18:48:03 +1100
X-Bogosity: Ham, spamicity=0.000000
Received: from server.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1])
	by server.vk2pj.dyndns.org (8.14.5/8.14.4) with ESMTP id p9D7m1Zq054965;
	Thu, 13 Oct 2011 18:48:01 +1100 (EST)
	(envelope-from peter@server.vk2pj.dyndns.org)
Received: (from peter@localhost)
	by server.vk2pj.dyndns.org (8.14.5/8.14.4/Submit) id p9D7lxcK054964;
	Thu, 13 Oct 2011 18:47:59 +1100 (EST) (envelope-from peter)
Date: Thu, 13 Oct 2011 18:47:58 +1100
From: Peter Jeremy 
To: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= 
Message-ID: <20111013074758.GA54924@server.vk2pj.dyndns.org>
References: <201110052208.p95M8H3C030566@svn.freebsd.org>
	<05F84C7F-A1CD-40E4-BDD5-BCACB58C56BF@lists.zabbadoz.net>
	<86botm2z5v.fsf@ds4.des.no>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature"; boundary="EVF5PPMfhYS0aIcm"
Content-Disposition: inline
In-Reply-To: <86botm2z5v.fsf@ds4.des.no>
X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc
User-Agent: Mutt/1.5.21 (2010-09-15)
Cc: svn-src-head@freebsd.org, "Bjoern A. Zeeb" ,
	svn-src-all@freebsd.org, src-committers@freebsd.org
Subject: Re: svn commit: r226046 - in head: crypto/openssh
 crypto/openssh/openbsd-compat secure/usr.sbin/sshd
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 13 Oct 2011 10:04:16 -0000


--EVF5PPMfhYS0aIcm
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On 2011-Oct-12 14:05:16 +0200, Dag-Erling Sm=F8rgrav  wrote:
>"Bjoern A. Zeeb"  writes:
>> Mergemaster brought up this change:
>>
>> +# The default is to check both .ssh/authorized_keys and .ssh/authorized=
_keys2
>> +# but this is overridden so installations will only check .ssh/authoriz=
ed_keys
>> +AuthorizedKeysFile     .ssh/authorized_keys
>>
>> This will break setups that have authorized_keys2 files (only) and needs=
 to
>> be reverted I think?

This is probably a reasonable change in head but, IMHO, it shouldn't
be MFC'd.

>authorized_keys2 has been deprecated for ~10 years now.

I find authorized_keys2 very handy at $work.  I have one set of keys
that are centrally managed and common across all hosts and a second
set of keys that are local to each disjoint subgroup of hosts and
managed within each group.  Using both authorized_keys and
authorized_keys2 substantially simplifies the overall key management.

--=20
Peter Jeremy

--EVF5PPMfhYS0aIcm
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (FreeBSD)

iEYEARECAAYFAk6Wl64ACgkQ/opHv/APuIf3IQCgoyBps8HbPDNyob7yHs2Vd75P
FRUAnjaUjFwG/x1GYGR/Zh4RxRkZvuwi
=JdzP
-----END PGP SIGNATURE-----

--EVF5PPMfhYS0aIcm--

From owner-svn-src-all@FreeBSD.ORG  Thu Oct 13 13:05:36 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B114C106567A;
	Thu, 13 Oct 2011 13:05:36 +0000 (UTC)
	(envelope-from glebius@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id A01728FC17;
	Thu, 13 Oct 2011 13:05:36 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9DD5ahW016707;
	Thu, 13 Oct 2011 13:05:36 GMT (envelope-from glebius@svn.freebsd.org)
Received: (from glebius@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9DD5alk016705;
	Thu, 13 Oct 2011 13:05:36 GMT (envelope-from glebius@svn.freebsd.org)
Message-Id: <201110131305.p9DD5alk016705@svn.freebsd.org>
From: Gleb Smirnoff 
Date: Thu, 13 Oct 2011 13:05:36 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226338 - head/sys/netinet6
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 13 Oct 2011 13:05:36 -0000

Author: glebius
Date: Thu Oct 13 13:05:36 2011
New Revision: 226338
URL: http://svn.freebsd.org/changeset/base/226338

Log:
  Restore functions in6_ifaddloop() and in6_ifremloop() that were
  inlined by Qing Li in his big new-ARP commit. I am going to utilize
  them in my newcarp work, and also these functions left declared
  in in6_var.h for all the time they were absent.
  
  Reviewed by:	bz

Modified:
  head/sys/netinet6/in6.c

Modified: head/sys/netinet6/in6.c
==============================================================================
--- head/sys/netinet6/in6.c	Thu Oct 13 09:21:49 2011	(r226337)
+++ head/sys/netinet6/in6.c	Thu Oct 13 13:05:36 2011	(r226338)
@@ -136,7 +136,89 @@ static void in6_unlink_ifa(struct in6_if
 
 int	(*faithprefix_p)(struct in6_addr *);
 
+#define ifa2ia6(ifa)	((struct in6_ifaddr *)(ifa))
+#define ia62ifa(ia6)	(&((ia6)->ia_ifa))
+
+void
+in6_ifaddloop(struct ifaddr *ifa)
+{
+	struct sockaddr_dl gateway;
+	struct sockaddr_in6 mask, addr;
+	struct rtentry rt;
+	struct in6_ifaddr *ia;
+	struct ifnet *ifp;
+	struct llentry *ln;
+
+	ia = ifa2ia6(ifa);
+	ifp = ifa->ifa_ifp;
+	IF_AFDATA_LOCK(ifp);
+	ifa->ifa_rtrequest = NULL;
+
+	/* XXX QL
+	 * we need to report rt_newaddrmsg
+	 */
+	ln = lla_lookup(LLTABLE6(ifp), (LLE_CREATE | LLE_IFADDR |
+	    LLE_EXCLUSIVE), (struct sockaddr *)&ia->ia_addr);
+	IF_AFDATA_UNLOCK(ifp);
+	if (ln != NULL) {
+		ln->la_expire = 0;  /* for IPv6 this means permanent */
+		ln->ln_state = ND6_LLINFO_REACHABLE;
+		/*
+		 * initialize for rtmsg generation
+		 */
+		bzero(&gateway, sizeof(gateway));
+		gateway.sdl_len = sizeof(gateway);
+		gateway.sdl_family = AF_LINK;
+		gateway.sdl_nlen = 0;
+		gateway.sdl_alen = 6;
+		memcpy(gateway.sdl_data, &ln->ll_addr.mac_aligned,
+		    sizeof(ln->ll_addr));
+		LLE_WUNLOCK(ln);
+	}
+
+	bzero(&rt, sizeof(rt));
+	rt.rt_gateway = (struct sockaddr *)&gateway;
+	memcpy(&mask, &ia->ia_prefixmask, sizeof(ia->ia_prefixmask));
+	memcpy(&addr, &ia->ia_addr, sizeof(ia->ia_addr));
+	rt_mask(&rt) = (struct sockaddr *)&mask;
+	rt_key(&rt) = (struct sockaddr *)&addr;
+	rt.rt_flags = RTF_UP | RTF_HOST | RTF_STATIC;
+	rt_newaddrmsg(RTM_ADD, ifa, 0, &rt);
+}
+
+void
+in6_ifremloop(struct ifaddr *ifa)
+{
+	struct sockaddr_dl gateway;
+	struct sockaddr_in6 mask, addr;
+	struct rtentry rt0;
+	struct in6_ifaddr *ia;
+	struct ifnet *ifp;
 
+	ia = ifa2ia6(ifa);
+	ifp = ifa->ifa_ifp;
+	IF_AFDATA_LOCK(ifp);
+	lla_lookup(LLTABLE6(ifp), (LLE_DELETE | LLE_IFADDR),
+	    (struct sockaddr *)&ia->ia_addr);
+	IF_AFDATA_UNLOCK(ifp);
+
+	/*
+	 * initialize for rtmsg generation
+	 */
+	bzero(&gateway, sizeof(gateway));
+	gateway.sdl_len = sizeof(gateway);
+	gateway.sdl_family = AF_LINK;
+	gateway.sdl_nlen = 0;
+	gateway.sdl_alen = ifp->if_addrlen;
+	bzero(&rt0, sizeof(rt0));
+	rt0.rt_gateway = (struct sockaddr *)&gateway;
+	memcpy(&mask, &ia->ia_prefixmask, sizeof(ia->ia_prefixmask));
+	memcpy(&addr, &ia->ia_addr, sizeof(ia->ia_addr));
+	rt_mask(&rt0) = (struct sockaddr *)&mask;
+	rt_key(&rt0) = (struct sockaddr *)&addr;
+	rt0.rt_flags = RTF_HOST | RTF_STATIC;
+	rt_newaddrmsg(RTM_DELETE, ifa, 0, &rt0);
+}
 
 int
 in6_mask2len(struct in6_addr *mask, u_char *lim0)
@@ -174,9 +256,6 @@ in6_mask2len(struct in6_addr *mask, u_ch
 	return x * 8 + y;
 }
 
-#define ifa2ia6(ifa)	((struct in6_ifaddr *)(ifa))
-#define ia62ifa(ia6)	(&((ia6)->ia_ifa))
-
 #ifdef COMPAT_FREEBSD32
 struct in6_ndifreq32 {
         char ifname[IFNAMSIZ];
@@ -1218,9 +1297,6 @@ in6_purgeaddr(struct ifaddr *ifa)
 	struct in6_ifaddr *ia = (struct in6_ifaddr *) ifa;
 	struct in6_multi_mship *imm;
 	struct sockaddr_in6 mltaddr, mltmask;
-	struct rtentry rt0;
-	struct sockaddr_dl gateway;
-	struct sockaddr_in6 mask, addr;
 	int plen, error;
 	struct rtentry *rt;
 	struct ifaddr *ifa0, *nifa;
@@ -1259,28 +1335,7 @@ in6_purgeaddr(struct ifaddr *ifa)
 	/* stop DAD processing */
 	nd6_dad_stop(ifa);
 
-	IF_AFDATA_LOCK(ifp);
-	lla_lookup(LLTABLE6(ifp), (LLE_DELETE | LLE_IFADDR),
-	    (struct sockaddr *)&ia->ia_addr);
-	IF_AFDATA_UNLOCK(ifp);
-
-	/*
-	 * initialize for rtmsg generation
-	 */
-	bzero(&gateway, sizeof(gateway));
-	gateway.sdl_len = sizeof(gateway);
-	gateway.sdl_family = AF_LINK;
-	gateway.sdl_nlen = 0;
-	gateway.sdl_alen = ifp->if_addrlen;
-	/* */
-	bzero(&rt0, sizeof(rt0));
-	rt0.rt_gateway = (struct sockaddr *)&gateway;
-	memcpy(&mask, &ia->ia_prefixmask, sizeof(ia->ia_prefixmask));
-	memcpy(&addr, &ia->ia_addr, sizeof(ia->ia_addr));
-	rt_mask(&rt0) = (struct sockaddr *)&mask;
-	rt_key(&rt0) = (struct sockaddr *)&addr;
-	rt0.rt_flags = RTF_HOST | RTF_STATIC;
-	rt_newaddrmsg(RTM_DELETE, ifa, 0, &rt0);
+	in6_ifremloop(ifa);
 
 	/*
 	 * leave from multicast groups we have joined for the interface
@@ -1820,46 +1875,8 @@ in6_ifinit(struct ifnet *ifp, struct in6
 	}
 
 	/* Add ownaddr as loopback rtentry, if necessary (ex. on p2p link). */
-	if (newhost) {
-		struct llentry *ln;
-		struct rtentry rt;
-		struct sockaddr_dl gateway;
-		struct sockaddr_in6 mask, addr;
-
-		IF_AFDATA_LOCK(ifp);
-		ia->ia_ifa.ifa_rtrequest = NULL;
-
-		/* XXX QL
-		 * we need to report rt_newaddrmsg
-		 */
-		ln = lla_lookup(LLTABLE6(ifp), (LLE_CREATE | LLE_IFADDR | LLE_EXCLUSIVE),
-		    (struct sockaddr *)&ia->ia_addr);
-		IF_AFDATA_UNLOCK(ifp);
-		if (ln != NULL) {
-			ln->la_expire = 0;  /* for IPv6 this means permanent */
-			ln->ln_state = ND6_LLINFO_REACHABLE;
-			/*
-			 * initialize for rtmsg generation
-			 */
-			bzero(&gateway, sizeof(gateway));
-			gateway.sdl_len = sizeof(gateway);
-			gateway.sdl_family = AF_LINK;
-			gateway.sdl_nlen = 0;
-			gateway.sdl_alen = 6;
-			memcpy(gateway.sdl_data, &ln->ll_addr.mac_aligned, sizeof(ln->ll_addr));
-			/* */
-			LLE_WUNLOCK(ln);
-		}
-
-		bzero(&rt, sizeof(rt));
-		rt.rt_gateway = (struct sockaddr *)&gateway;
-		memcpy(&mask, &ia->ia_prefixmask, sizeof(ia->ia_prefixmask));
-		memcpy(&addr, &ia->ia_addr, sizeof(ia->ia_addr));
-		rt_mask(&rt) = (struct sockaddr *)&mask;
-		rt_key(&rt) = (struct sockaddr *)&addr;
-		rt.rt_flags = RTF_UP | RTF_HOST | RTF_STATIC;
-		rt_newaddrmsg(RTM_ADD, &ia->ia_ifa, 0, &rt);
-	}
+	if (newhost)
+		in6_ifaddloop(&(ia->ia_ifa));
 
 	return (error);
 }

From owner-svn-src-all@FreeBSD.ORG  Thu Oct 13 13:14:48 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C892610656A8;
	Thu, 13 Oct 2011 13:14:48 +0000 (UTC)
	(envelope-from nyan@FreeBSD.org)
Received: from sakura.ccs.furiru.org (sakura.ccs.furiru.org
	[IPv6:2001:2f0:104:8060::1])
	by mx1.freebsd.org (Postfix) with ESMTP id 373FF8FC24;
	Thu, 13 Oct 2011 13:14:48 +0000 (UTC)
Received: from localhost (authenticated bits=0)
	by sakura.ccs.furiru.org (unknown) with ESMTP id p9DDEhJJ001352;
	Thu, 13 Oct 2011 22:14:46 +0900 (JST)
	(envelope-from nyan@FreeBSD.org)
Date: Thu, 13 Oct 2011 22:14:43 +0900 (JST)
Message-Id: <20111013.221443.343708041391999047.nyan@FreeBSD.org>
To: des@freebsd.org
From: TAKAHASHI Yoshihiro 
In-Reply-To: <201110122145.p9CLjCcm085538@svn.freebsd.org>
References: <201110122145.p9CLjCcm085538@svn.freebsd.org>
X-Mailer: Mew version 6.3 on Emacs 23.3 / Mule 6.0
	=?iso-2022-jp?B?KBskQjJWOzZOJBsoQik=?=
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r226329 - head/usr.bin/kdump
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 13 Oct 2011 13:14:48 -0000

In article <201110122145.p9CLjCcm085538@svn.freebsd.org>
Dag-Erling Smorgrav  writes:

> Author: des
> Date: Wed Oct 12 21:45:12 2011
> New Revision: 226329
> URL: http://svn.freebsd.org/changeset/base/226329
> 
> Log:
>   Make kdump compile cleanly at WARNS level 6, with one exception: the
>   ipfilter headers contain a duplicated function declaration.  Turn off
>   -Werror to allow kdump to compile in spite of this.
>   
>   It would be neat to be able to turn off -Werror on a file-by-file basis...

> Modified: head/usr.bin/kdump/mkioctls
> ==============================================================================
> --- head/usr.bin/kdump/mkioctls	Wed Oct 12 21:38:48 2011	(r226328)
> +++ head/usr.bin/kdump/mkioctls	Wed Oct 12 21:45:12 2011	(r226329)
> @@ -15,12 +15,21 @@ LC_ALL=C; export LC_ALL
>  # XXX should we use an ANSI cpp?
>  ioctl_includes=`
>  	cd $1
> -	find -H -s * -name '*.h' |
> +	find -H -s * -name '*.h' | grep -v '.*disk.*\.h' | \
>  		xargs egrep -l \
>  '^#[ 	]*define[ 	]+[A-Za-z_][A-Za-z0-9_]*[ 	]+_IO[^a-z0-9_]' |
>  		awk '{printf("#include <%s>\\\\n", $1)}'
>  `
>  
> +case "`uname -m`" in
> +*pc98*)
> +	ioctl_includes="$ioctl_includes#include \\n"
> +	;;
> +*)
> +	ioctl_includes="$ioctl_includes#include \\n"
> +	;;
> +esac
> +
>  awk -v x="$ioctl_includes" 'BEGIN {print x}' |
>  	gcc -E -I$1 -dM -DCOMPAT_43TTY - |
>  	awk -v ioctl_includes="$ioctl_includes" '
> 

This change breaks cross building.

---
TAKAHASHI Yoshihiro 

From owner-svn-src-all@FreeBSD.ORG  Thu Oct 13 13:30:41 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B5AEF1065677;
	Thu, 13 Oct 2011 13:30:41 +0000 (UTC)
	(envelope-from glebius@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id A55BD8FC0A;
	Thu, 13 Oct 2011 13:30:41 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9DDUfZ7017514;
	Thu, 13 Oct 2011 13:30:41 GMT (envelope-from glebius@svn.freebsd.org)
Received: (from glebius@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9DDUf3h017512;
	Thu, 13 Oct 2011 13:30:41 GMT (envelope-from glebius@svn.freebsd.org)
Message-Id: <201110131330.p9DDUf3h017512@svn.freebsd.org>
From: Gleb Smirnoff 
Date: Thu, 13 Oct 2011 13:30:41 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226339 - head/sys/netinet
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 13 Oct 2011 13:30:41 -0000

Author: glebius
Date: Thu Oct 13 13:30:41 2011
New Revision: 226339
URL: http://svn.freebsd.org/changeset/base/226339

Log:
  De-spl(9).

Modified:
  head/sys/netinet/in.c

Modified: head/sys/netinet/in.c
==============================================================================
--- head/sys/netinet/in.c	Thu Oct 13 13:05:36 2011	(r226338)
+++ head/sys/netinet/in.c	Thu Oct 13 13:30:41 2011	(r226339)
@@ -845,7 +845,7 @@ in_ifinit(struct ifnet *ifp, struct in_i
 {
 	register u_long i = ntohl(sin->sin_addr.s_addr);
 	struct sockaddr_in oldaddr;
-	int s = splimp(), flags = RTF_UP, error = 0;
+	int flags = RTF_UP, error = 0;
 
 	oldaddr = ia->ia_addr;
 	if (oldaddr.sin_family == AF_INET)
@@ -865,7 +865,6 @@ in_ifinit(struct ifnet *ifp, struct in_i
 	if (ifp->if_ioctl != NULL) {
 		error = (*ifp->if_ioctl)(ifp, SIOCSIFADDR, (caddr_t)ia);
 		if (error) {
-			splx(s);
 			/* LIST_REMOVE(ia, ia_hash) is done in in_control */
 			ia->ia_addr = oldaddr;
 			IN_IFADDR_WLOCK();
@@ -884,7 +883,6 @@ in_ifinit(struct ifnet *ifp, struct in_i
 			return (error);
 		}
 	}
-	splx(s);
 	if (scrub) {
 		ia->ia_ifa.ifa_addr = (struct sockaddr *)&oldaddr;
 		in_ifscrub(ifp, ia, LLE_STATIC);

From owner-svn-src-all@FreeBSD.ORG  Thu Oct 13 13:33:23 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 604D110656AB;
	Thu, 13 Oct 2011 13:33:23 +0000 (UTC)
	(envelope-from glebius@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 5035F8FC0A;
	Thu, 13 Oct 2011 13:33:23 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9DDXN95017649;
	Thu, 13 Oct 2011 13:33:23 GMT (envelope-from glebius@svn.freebsd.org)
Received: (from glebius@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9DDXNP9017647;
	Thu, 13 Oct 2011 13:33:23 GMT (envelope-from glebius@svn.freebsd.org)
Message-Id: <201110131333.p9DDXNP9017647@svn.freebsd.org>
From: Gleb Smirnoff 
Date: Thu, 13 Oct 2011 13:33:23 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226340 - head/sys/netinet6
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 13 Oct 2011 13:33:23 -0000

Author: glebius
Date: Thu Oct 13 13:33:23 2011
New Revision: 226340
URL: http://svn.freebsd.org/changeset/base/226340

Log:
  Use TAILQ_FOREACH() in the nd6_dad_find() instead of hand-rolled implementation.

Modified:
  head/sys/netinet6/nd6_nbr.c

Modified: head/sys/netinet6/nd6_nbr.c
==============================================================================
--- head/sys/netinet6/nd6_nbr.c	Thu Oct 13 13:30:41 2011	(r226339)
+++ head/sys/netinet6/nd6_nbr.c	Thu Oct 13 13:33:23 2011	(r226340)
@@ -1167,11 +1167,11 @@ nd6_dad_find(struct ifaddr *ifa)
 {
 	struct dadq *dp;
 
-	for (dp = V_dadq.tqh_first; dp; dp = dp->dad_list.tqe_next) {
+	TAILQ_FOREACH(dp, &V_dadq, dad_list)
 		if (dp->dad_ifa == ifa)
-			return dp;
-	}
-	return NULL;
+			return (dp);
+
+	return (NULL);
 }
 
 static void

From owner-svn-src-all@FreeBSD.ORG  Thu Oct 13 13:47:57 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 2C12610656B7;
	Thu, 13 Oct 2011 13:47:57 +0000 (UTC) (envelope-from des@des.no)
Received: from smtp.des.no (smtp.des.no [194.63.250.102])
	by mx1.freebsd.org (Postfix) with ESMTP id DDC128FC13;
	Thu, 13 Oct 2011 13:47:56 +0000 (UTC)
Received: from ds4.des.no (des.no [84.49.246.2])
	by smtp.des.no (Postfix) with ESMTP id 251A01FFC33;
	Thu, 13 Oct 2011 13:47:56 +0000 (UTC)
Received: by ds4.des.no (Postfix, from userid 1001)
	id 06A64B93C; Thu, 13 Oct 2011 15:47:55 +0200 (CEST)
From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= 
To: TAKAHASHI Yoshihiro 
References: <201110122145.p9CLjCcm085538@svn.freebsd.org>
	<20111013.221443.343708041391999047.nyan@FreeBSD.org>
Date: Thu, 13 Oct 2011 15:47:55 +0200
In-Reply-To: <20111013.221443.343708041391999047.nyan@FreeBSD.org> (TAKAHASHI
	Yoshihiro's message of "Thu, 13 Oct 2011 22:14:43 +0900 (JST)")
Message-ID: <86r52h9f5g.fsf@ds4.des.no>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (berkeley-unix)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r226329 - head/usr.bin/kdump
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 13 Oct 2011 13:47:57 -0000

TAKAHASHI Yoshihiro  writes:
> This change breaks cross building.

Damn, you're right.  Will this work?

Index: usr.bin/kdump/mkioctls
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- usr.bin/kdump/mkioctls	(revision 226329)
+++ usr.bin/kdump/mkioctls	(working copy)
@@ -13,15 +13,16 @@
=20
 # Build a list of headers that have ioctls in them.
 # XXX should we use an ANSI cpp?
-ioctl_includes=3D`
+ioctl_includes=3D$(
 	cd $1
 	find -H -s * -name '*.h' | grep -v '.*disk.*\.h' | \
 		xargs egrep -l \
 '^#[ 	]*define[ 	]+[A-Za-z_][A-Za-z0-9_]*[ 	]+_IO[^a-z0-9_]' |
-		awk '{printf("#include <%s>\\\\n", $1)}'
-`
+		awk '{printf("#include <%s>\\n", $1)}'
+)
=20
-case "`uname -m`" in
+: ${MACHINE=3D$(uname -m)}
+case "${MACHINE}" in
 *pc98*)
 	ioctl_includes=3D"$ioctl_includes#include \\n"
 	;;
Index: usr.bin/kdump/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
--- usr.bin/kdump/Makefile	(revision 226329)
+++ usr.bin/kdump/Makefile	(working copy)
@@ -21,7 +21,8 @@
 CLEANFILES=3D	ioctl.c kdump_subr.c kdump_subr.h linux_syscalls.c
=20
 ioctl.c: mkioctls
-	sh ${.CURDIR}/mkioctls ${DESTDIR}/usr/include > ${.TARGET}
+	env MACHINE=3D${TARGET} \
+	    sh ${.CURDIR}/mkioctls ${DESTDIR}/usr/include > ${.TARGET}
=20
 kdump_subr.h: mksubr
 	sh ${.CURDIR}/mksubr ${DESTDIR}/usr/include | \


DES
--=20
Dag-Erling Sm=C3=B8rgrav - des@des.no

From owner-svn-src-all@FreeBSD.ORG  Thu Oct 13 14:20:28 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 534C4106566B;
	Thu, 13 Oct 2011 14:20:28 +0000 (UTC) (envelope-from ed@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 2A6378FC13;
	Thu, 13 Oct 2011 14:20:28 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9DEKSpB019132;
	Thu, 13 Oct 2011 14:20:28 GMT (envelope-from ed@svn.freebsd.org)
Received: (from ed@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9DEKSTv019130;
	Thu, 13 Oct 2011 14:20:28 GMT (envelope-from ed@svn.freebsd.org)
Message-Id: <201110131420.p9DEKSTv019130@svn.freebsd.org>
From: Ed Schouten 
Date: Thu, 13 Oct 2011 14:20:28 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226341 - head/sys/teken/demo
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 13 Oct 2011 14:20:28 -0000

Author: ed
Date: Thu Oct 13 14:20:27 2011
New Revision: 226341
URL: http://svn.freebsd.org/changeset/base/226341

Log:
  Link the demo application against ncursesw to make Unicode work.

Modified:
  head/sys/teken/demo/Makefile

Modified: head/sys/teken/demo/Makefile
==============================================================================
--- head/sys/teken/demo/Makefile	Thu Oct 13 13:33:23 2011	(r226340)
+++ head/sys/teken/demo/Makefile	Thu Oct 13 14:20:27 2011	(r226341)
@@ -1,7 +1,7 @@
 # $FreeBSD$
 
 PROG=	teken_demo
-LDADD=	-lncurses -lteken -lutil
+LDADD=	-lncursesw -lteken -lutil
 MAN=
 
 WARNS?=	6

From owner-svn-src-all@FreeBSD.ORG  Thu Oct 13 14:58:15 2011
Return-Path: 
Delivered-To: svn-src-all@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 9DE34106564A;
	Thu, 13 Oct 2011 14:58:15 +0000 (UTC)
	(envelope-from nyan@FreeBSD.org)
Received: from sakura.ccs.furiru.org (sakura.ccs.furiru.org
	[IPv6:2001:2f0:104:8060::1])
	by mx1.freebsd.org (Postfix) with ESMTP id 2A1488FC0C;
	Thu, 13 Oct 2011 14:58:14 +0000 (UTC)
Received: from localhost (authenticated bits=0)
	by sakura.ccs.furiru.org (unknown) with ESMTP id p9DEupFi001775;
	Thu, 13 Oct 2011 23:56:53 +0900 (JST)
	(envelope-from nyan@FreeBSD.org)
Date: Thu, 13 Oct 2011 23:56:50 +0900 (JST)
Message-Id: <20111013.235650.242248466124968537.nyan@FreeBSD.org>
To: des@des.no
From: TAKAHASHI Yoshihiro 
In-Reply-To: <86r52h9f5g.fsf@ds4.des.no>
References: <201110122145.p9CLjCcm085538@svn.freebsd.org>
	<20111013.221443.343708041391999047.nyan@FreeBSD.org>
	<86r52h9f5g.fsf@ds4.des.no>
X-Mailer: Mew version 6.3 on Emacs 23.3 / Mule 6.0
	=?iso-2022-jp?B?KBskQjJWOzZOJBsoQik=?=
Mime-Version: 1.0
Content-Type: Text/Plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org,
	src-committers@FreeBSD.org
Subject: Re: svn commit: r226329 - head/usr.bin/kdump
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 13 Oct 2011 14:58:15 -0000

In article <86r52h9f5g.fsf@ds4.des.no>
Dag-Erling Sm=F8rgrav  writes:

> TAKAHASHI Yoshihiro  writes:
>> This change breaks cross building.
> =

> Damn, you're right.  Will this work?
> =

> Index: usr.bin/kdump/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
> --- usr.bin/kdump/Makefile	(revision 226329)
> +++ usr.bin/kdump/Makefile	(working copy)
> @@ -21,7 +21,8 @@
>  CLEANFILES=3D	ioctl.c kdump_subr.c kdump_subr.h linux_syscalls.c
>  =

>  ioctl.c: mkioctls
> -	sh ${.CURDIR}/mkioctls ${DESTDIR}/usr/include > ${.TARGET}
> +	env MACHINE=3D${TARGET} \
> +	    sh ${.CURDIR}/mkioctls ${DESTDIR}/usr/include > ${.TARGET}
>  =

>  kdump_subr.h: mksubr
>  	sh ${.CURDIR}/mksubr ${DESTDIR}/usr/include | \

The above ${TARGET} should be ${MACHINE}.  The others are fine.

Thanks.

---
TAKAHASHI Yoshihiro 

From owner-svn-src-all@FreeBSD.ORG  Thu Oct 13 16:16:46 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id AF6221065672;
	Thu, 13 Oct 2011 16:16:46 +0000 (UTC)
	(envelope-from marcel@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 9F6678FC15;
	Thu, 13 Oct 2011 16:16:46 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9DGGkcj022791;
	Thu, 13 Oct 2011 16:16:46 GMT (envelope-from marcel@svn.freebsd.org)
Received: (from marcel@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9DGGk02022789;
	Thu, 13 Oct 2011 16:16:46 GMT (envelope-from marcel@svn.freebsd.org)
Message-Id: <201110131616.p9DGGk02022789@svn.freebsd.org>
From: Marcel Moolenaar 
Date: Thu, 13 Oct 2011 16:16:46 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226342 - head/sys/kern
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 13 Oct 2011 16:16:46 -0000

Author: marcel
Date: Thu Oct 13 16:16:46 2011
New Revision: 226342
URL: http://svn.freebsd.org/changeset/base/226342

Log:
  In elf32_trans_prot() and when compiling for amd64 or ia64, add
  PROT_EXECUTE when PROT_READ is needed. By default i386 allows
  execution when reading is allowed and JDK 1.4.x depends on that.

Modified:
  head/sys/kern/imgact_elf.c

Modified: head/sys/kern/imgact_elf.c
==============================================================================
--- head/sys/kern/imgact_elf.c	Thu Oct 13 14:20:27 2011	(r226341)
+++ head/sys/kern/imgact_elf.c	Thu Oct 13 16:16:46 2011	(r226342)
@@ -1664,6 +1664,12 @@ __elfN(trans_prot)(Elf_Word flags)
 		prot |= VM_PROT_WRITE;
 	if (flags & PF_R)
 		prot |= VM_PROT_READ;
+#if __ELF_WORD_SIZE == 32
+#if defined(__amd64__) || defined(__ia64__)
+	if (flags & PF_R)
+		prot |= VM_PROT_EXECUTE;
+#endif
+#endif
 	return (prot);
 }
 

From owner-svn-src-all@FreeBSD.ORG  Thu Oct 13 16:20:10 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 9C1B01065673;
	Thu, 13 Oct 2011 16:20:10 +0000 (UTC)
	(envelope-from marcel@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 8C0D98FC13;
	Thu, 13 Oct 2011 16:20:10 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9DGKAjc022928;
	Thu, 13 Oct 2011 16:20:10 GMT (envelope-from marcel@svn.freebsd.org)
Received: (from marcel@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9DGKAM2022926;
	Thu, 13 Oct 2011 16:20:10 GMT (envelope-from marcel@svn.freebsd.org)
Message-Id: <201110131620.p9DGKAM2022926@svn.freebsd.org>
From: Marcel Moolenaar 
Date: Thu, 13 Oct 2011 16:20:10 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226343 - head/sys/vm
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 13 Oct 2011 16:20:10 -0000

Author: marcel
Date: Thu Oct 13 16:20:10 2011
New Revision: 226343
URL: http://svn.freebsd.org/changeset/base/226343

Log:
  In sys_obreak() and when compiling for amd64 or ia64, when the process
  is ILP32 (i.e. i386) grant execute permissions by default. The JDK 1.4.x
  depends on being able to execute from the heap on i386.

Modified:
  head/sys/vm/vm_unix.c

Modified: head/sys/vm/vm_unix.c
==============================================================================
--- head/sys/vm/vm_unix.c	Thu Oct 13 16:16:46 2011	(r226342)
+++ head/sys/vm/vm_unix.c	Thu Oct 13 16:20:10 2011	(r226343)
@@ -36,6 +36,8 @@
  *	@(#)vm_unix.c	8.1 (Berkeley) 6/11/93
  */
 
+#include "opt_compat.h"
+
 /*
  * Traditional sbrk/grow interface to VM
  */
@@ -49,6 +51,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -75,7 +78,7 @@ sys_obreak(td, uap)
 	struct vmspace *vm = td->td_proc->p_vmspace;
 	vm_offset_t new, old, base;
 	rlim_t datalim, vmemlim;
-	int rv;
+	int prot, rv;
 	int error = 0;
 	boolean_t do_map_wirefuture;
 
@@ -135,8 +138,15 @@ sys_obreak(td, uap)
 		}
 		PROC_UNLOCK(td->td_proc);
 #endif
+		prot = VM_PROT_RW;
+#ifdef COMPAT_FREEBSD32
+#if defined(__amd64__) || defined(__ia64__)
+		if (SV_PROC_FLAG(td->td_proc, SV_ILP32))
+			prot |= VM_PROT_EXECUTE;
+#endif
+#endif
 		rv = vm_map_insert(&vm->vm_map, NULL, 0, old, new,
-		    VM_PROT_RW, VM_PROT_ALL, 0);
+		    prot, VM_PROT_ALL, 0);
 		if (rv != KERN_SUCCESS) {
 #ifdef RACCT
 			PROC_LOCK(td->td_proc);

From owner-svn-src-all@FreeBSD.ORG  Thu Oct 13 16:29:24 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D364C1065670;
	Thu, 13 Oct 2011 16:29:24 +0000 (UTC) (envelope-from des@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id C37668FC13;
	Thu, 13 Oct 2011 16:29:24 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9DGTOBj023250;
	Thu, 13 Oct 2011 16:29:24 GMT (envelope-from des@svn.freebsd.org)
Received: (from des@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9DGTOLF023247;
	Thu, 13 Oct 2011 16:29:24 GMT (envelope-from des@svn.freebsd.org)
Message-Id: <201110131629.p9DGTOLF023247@svn.freebsd.org>
From: Dag-Erling Smorgrav 
Date: Thu, 13 Oct 2011 16:29:24 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226344 - head/usr.bin/kdump
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 13 Oct 2011 16:29:24 -0000

Author: des
Date: Thu Oct 13 16:29:24 2011
New Revision: 226344
URL: http://svn.freebsd.org/changeset/base/226344

Log:
  Clean up mkioctls a bit, and fix cross-building by checking ${MACHINE}
  instead of $(uname -m).
  
  Pointed out by:	nyan@

Modified:
  head/usr.bin/kdump/Makefile
  head/usr.bin/kdump/mkioctls

Modified: head/usr.bin/kdump/Makefile
==============================================================================
--- head/usr.bin/kdump/Makefile	Thu Oct 13 16:20:10 2011	(r226343)
+++ head/usr.bin/kdump/Makefile	Thu Oct 13 16:29:24 2011	(r226344)
@@ -21,7 +21,8 @@ NO_WERROR?=	YES
 CLEANFILES=	ioctl.c kdump_subr.c kdump_subr.h linux_syscalls.c
 
 ioctl.c: mkioctls
-	sh ${.CURDIR}/mkioctls ${DESTDIR}/usr/include > ${.TARGET}
+	env MACHINE=${MACHINE} \
+	    sh ${.CURDIR}/mkioctls ${DESTDIR}/usr/include > ${.TARGET}
 
 kdump_subr.h: mksubr
 	sh ${.CURDIR}/mksubr ${DESTDIR}/usr/include | \

Modified: head/usr.bin/kdump/mkioctls
==============================================================================
--- head/usr.bin/kdump/mkioctls	Thu Oct 13 16:20:10 2011	(r226343)
+++ head/usr.bin/kdump/mkioctls	Thu Oct 13 16:29:24 2011	(r226344)
@@ -13,15 +13,16 @@ LC_ALL=C; export LC_ALL
 
 # Build a list of headers that have ioctls in them.
 # XXX should we use an ANSI cpp?
-ioctl_includes=`
+ioctl_includes=$(
 	cd $1
 	find -H -s * -name '*.h' | grep -v '.*disk.*\.h' | \
 		xargs egrep -l \
 '^#[ 	]*define[ 	]+[A-Za-z_][A-Za-z0-9_]*[ 	]+_IO[^a-z0-9_]' |
-		awk '{printf("#include <%s>\\\\n", $1)}'
-`
+		awk '{printf("#include <%s>\\n", $1)}'
+)
 
-case "`uname -m`" in
+: ${MACHINE=$(uname -m)}
+case "${MACHINE}" in
 *pc98*)
 	ioctl_includes="$ioctl_includes#include \\n"
 	;;

From owner-svn-src-all@FreeBSD.ORG  Thu Oct 13 17:20:46 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 17ADE1065673;
	Thu, 13 Oct 2011 17:20:46 +0000 (UTC) (envelope-from des@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 0692D8FC08;
	Thu, 13 Oct 2011 17:20:46 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9DHKj5P024927;
	Thu, 13 Oct 2011 17:20:45 GMT (envelope-from des@svn.freebsd.org)
Received: (from des@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9DHKjWn024920;
	Thu, 13 Oct 2011 17:20:45 GMT (envelope-from des@svn.freebsd.org)
Message-Id: <201110131720.p9DHKjWn024920@svn.freebsd.org>
From: Dag-Erling Smorgrav 
Date: Thu, 13 Oct 2011 17:20:45 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226345 - in head: etc/rc.d sbin/dhclient
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 13 Oct 2011 17:20:46 -0000

Author: des
Date: Thu Oct 13 17:20:45 2011
New Revision: 226345
URL: http://svn.freebsd.org/changeset/base/226345

Log:
  Make dhclient use a pid file.  Modify the rc script accordingly; while
  there, clean it up and add some error checks.
  
  Glanced at by:	brooks@
  MFC after:	3 weeks

Modified:
  head/etc/rc.d/dhclient
  head/sbin/dhclient/Makefile
  head/sbin/dhclient/dhclient.8
  head/sbin/dhclient/dhclient.c
  head/sbin/dhclient/dhcpd.h
  head/sbin/dhclient/errwarn.c

Modified: head/etc/rc.d/dhclient
==============================================================================
--- head/etc/rc.d/dhclient	Thu Oct 13 16:29:24 2011	(r226344)
+++ head/etc/rc.d/dhclient	Thu Oct 13 17:20:45 2011	(r226345)
@@ -9,55 +9,39 @@
 . /etc/rc.subr
 . /etc/network.subr
 
+ifn="$2"
+
 name="dhclient"
 rcvar=
-start_cmd="dhclient_start"
-stop_cmd="dhclient_stop"
+pidfile="/var/run/${name}.${ifn}.pid"
+start_precmd="dhclient_prestart"
 
-dhclient_start()
+dhclient_prestart()
 {
-	# prevent unnecessary restarts
-	# XXX: dhclient had better create a pidfile
-	if [ -x /bin/pgrep ]; then
-		pids=`/bin/pgrep -f "dhclient: $ifn(\$| .*)"`
-		if [ -n "$pids" ]; then
-			sleep 1
-			pids=`/bin/pgrep -f "dhclient: $ifn(\$| .*)"`
-			if [ -n "$pids" ]; then
-				exit 0
-			fi
-		elif [ -e /var/run/dhclient.pid ]; then
-			if [ -n "`pgrep -F /var/run/dhclient.pid`" ]; then
-				exit 0
-			fi
-		fi
-	fi
-
-	# Override for $ifn specific flags (see rc.subr for $flags setting)
-	specific=`get_if_var $ifn dhclient_flags_IF`
+	# Interface-specific flags (see rc.subr for $flags setting)
+	specific=$(get_if_var $ifn dhclient_flags_IF)
 	if [ -z "$flags" -a -n "$specific" ]; then
 		rc_flags=$specific
 	fi
 
-	background_dhclient=`get_if_var $ifn background_dhclient_IF $background_dhclient`
+	background_dhclient=$(get_if_var $ifn background_dhclient_IF $background_dhclient)
 	if checkyesno background_dhclient; then
 		rc_flags="${rc_flags} -b"
 	fi
 
-	${dhclient_program} ${rc_flags} $ifn
-}
-
-dhclient_stop()
-{
-	ifconfig $ifn down	# cause dhclient to die
+	rc_flags="${rc_flags} ${ifn}"
 }
 
-ifn="$2"
-
 load_rc_config $name
 load_rc_config network
 
-if ! dhcpif $ifn; then
+if [ -z $ifn ] ; then
+	# only complain if a command was specified but no interface
+	if [ -n "$1" ] ; then
+		echo 1>&2 "$0: no interface specified"
+		return 1
+	fi
+elif [ -n "${rc_force}" ] && ! dhcpif $ifn; then
 	return 1
 fi
 

Modified: head/sbin/dhclient/Makefile
==============================================================================
--- head/sbin/dhclient/Makefile	Thu Oct 13 16:29:24 2011	(r226344)
+++ head/sbin/dhclient/Makefile	Thu Oct 13 17:20:45 2011	(r226345)
@@ -39,6 +39,8 @@ PROG=	dhclient
 SCRIPTS=dhclient-script
 MAN=	dhclient.8 dhclient.conf.5 dhclient.leases.5 dhcp-options.5 \
 	dhclient-script.8
+DPADD=	${LIBUTIL}
+LDADD=	-lutil
 
 WARNS?=	2
 

Modified: head/sbin/dhclient/dhclient.8
==============================================================================
--- head/sbin/dhclient/dhclient.8	Thu Oct 13 16:29:24 2011	(r226344)
+++ head/sbin/dhclient/dhclient.8	Thu Oct 13 17:20:45 2011	(r226345)
@@ -38,7 +38,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd August 13, 2007
+.Dd October 13, 2011
 .Dt DHCLIENT 8
 .Os
 .Sh NAME
@@ -49,6 +49,7 @@
 .Op Fl bdqu
 .Op Fl c Ar file
 .Op Fl l Ar file
+.Op Fl p Ar file
 .Ar interface
 .Sh DESCRIPTION
 The
@@ -83,6 +84,10 @@ will revert to running in the background
 Specify an alternate location,
 .Ar file ,
 for the leases file.
+.It Fl p Ar file
+Specify an alternate location for the PID file.
+The default is
+.Pa /var/run/dhclient. Ns Ar interface Ns Pa .pid .
 .It Fl q
 Forces
 .Nm

Modified: head/sbin/dhclient/dhclient.c
==============================================================================
--- head/sbin/dhclient/dhclient.c	Thu Oct 13 16:29:24 2011	(r226344)
+++ head/sbin/dhclient/dhclient.c	Thu Oct 13 17:20:45 2011	(r226345)
@@ -95,6 +95,9 @@ struct iaddr iaddr_broadcast = { 4, { 25
 struct in_addr inaddr_any;
 struct sockaddr_in sockaddr_broadcast;
 
+char *path_dhclient_pidfile;
+struct pidfh *pidfile;
+
 /*
  * ASSERT_STATE() does nothing now; it used to be
  * assert (state_is == state_shouldbe).
@@ -316,6 +319,8 @@ die:
 	if (ifi->client->alias)
 		script_write_params("alias_", ifi->client->alias);
 	script_go();
+	if (pidfile != NULL)
+		pidfile_remove(pidfile);
 	exit(1);
 }
 
@@ -327,12 +332,13 @@ main(int argc, char *argv[])
 	int			 pipe_fd[2];
 	int			 immediate_daemon = 0;
 	struct passwd		*pw;
+	pid_t			 otherpid;
 
 	/* Initially, log errors to stderr as well as to syslogd. */
 	openlog(__progname, LOG_PID | LOG_NDELAY, DHCPD_LOG_FACILITY);
 	setlogmask(LOG_UPTO(LOG_DEBUG));
 
-	while ((ch = getopt(argc, argv, "bc:dl:qu")) != -1)
+	while ((ch = getopt(argc, argv, "bc:dl:p:qu")) != -1)
 		switch (ch) {
 		case 'b':
 			immediate_daemon = 1;
@@ -346,6 +352,9 @@ main(int argc, char *argv[])
 		case 'l':
 			path_dhclient_db = optarg;
 			break;
+		case 'p':
+			path_dhclient_pidfile = optarg;
+			break;
 		case 'q':
 			quiet = 1;
 			break;
@@ -362,6 +371,21 @@ main(int argc, char *argv[])
 	if (argc != 1)
 		usage();
 
+	if (path_dhclient_pidfile == NULL) {
+		asprintf(&path_dhclient_pidfile,
+		    "%sdhclient.%s.pid", _PATH_VARRUN, *argv);
+		if (path_dhclient_pidfile == NULL)
+			error("asprintf");
+	}
+	pidfile = pidfile_open(path_dhclient_pidfile, 0600, &otherpid);
+	if (pidfile == NULL) {
+		if (errno == EEXIST)
+			error("dhclient already running, pid: %d.", otherpid);
+		if (errno == EAGAIN)
+			error("dhclient already running.");
+		warning("Cannot open or create pidfile: %m");
+	}
+
 	if ((ifi = calloc(1, sizeof(struct interface_info))) == NULL)
 		error("calloc");
 	if (strlcpy(ifi->name, argv[0], IFNAMSIZ) >= IFNAMSIZ)
@@ -385,6 +409,12 @@ main(int argc, char *argv[])
 
 	read_client_conf();
 
+	/* The next bit is potentially very time-consuming, so write out
+	   the pidfile right away.  We will write it out again with the
+	   correct pid after daemonizing. */
+	if (pidfile != NULL)
+		pidfile_write(pidfile);
+
 	if (!interface_link_status(ifi->name)) {
 		fprintf(stderr, "%s: no link ...", ifi->name);
 		fflush(stderr);
@@ -2298,6 +2328,9 @@ go_daemon(void)
 	if (daemon(1, 0) == -1)
 		error("daemon");
 
+	if (pidfile != NULL)
+		pidfile_write(pidfile);
+
 	/* we are chrooted, daemon(3) fails to open /dev/null */
 	if (nullfd != -1) {
 		dup2(nullfd, STDIN_FILENO);

Modified: head/sbin/dhclient/dhcpd.h
==============================================================================
--- head/sbin/dhclient/dhcpd.h	Thu Oct 13 16:29:24 2011	(r226344)
+++ head/sbin/dhclient/dhcpd.h	Thu Oct 13 17:20:45 2011	(r226345)
@@ -41,7 +41,7 @@
  * $FreeBSD$
  */
 
-#include 
+#include 
 
 #include 
 #include 
@@ -60,6 +60,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -353,6 +354,8 @@ extern int log_perror;
 
 extern struct client_config top_level_config;
 
+extern struct pidfh *pidfile;
+
 void dhcpoffer(struct packet *);
 void dhcpack(struct packet *);
 void dhcpnak(struct packet *);

Modified: head/sbin/dhclient/errwarn.c
==============================================================================
--- head/sbin/dhclient/errwarn.c	Thu Oct 13 16:29:24 2011	(r226344)
+++ head/sbin/dhclient/errwarn.c	Thu Oct 13 17:20:45 2011	(r226345)
@@ -83,6 +83,8 @@ error(char *fmt, ...)
 		fprintf(stderr, "exiting.\n");
 		fflush(stderr);
 	}
+	if (pidfile != NULL)
+		pidfile_remove(pidfile);
 	exit(1);
 }
 

From owner-svn-src-all@FreeBSD.ORG  Thu Oct 13 18:17:03 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 7AFC91065670;
	Thu, 13 Oct 2011 18:17:03 +0000 (UTC)
	(envelope-from bschmidt@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 6A6788FC12;
	Thu, 13 Oct 2011 18:17:03 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9DIH34u026822;
	Thu, 13 Oct 2011 18:17:03 GMT
	(envelope-from bschmidt@svn.freebsd.org)
Received: (from bschmidt@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9DIH3eX026820;
	Thu, 13 Oct 2011 18:17:03 GMT
	(envelope-from bschmidt@svn.freebsd.org)
Message-Id: <201110131817.p9DIH3eX026820@svn.freebsd.org>
From: Bernhard Schmidt 
Date: Thu, 13 Oct 2011 18:17:03 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226346 - head/sys/dev/iwn
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 13 Oct 2011 18:17:03 -0000

Author: bschmidt
Date: Thu Oct 13 18:17:03 2011
New Revision: 226346
URL: http://svn.freebsd.org/changeset/base/226346

Log:
  Fix bmiss notifications, events should be sent when NOT scanning.
  
  MFC after:	3 days

Modified:
  head/sys/dev/iwn/if_iwn.c

Modified: head/sys/dev/iwn/if_iwn.c
==============================================================================
--- head/sys/dev/iwn/if_iwn.c	Thu Oct 13 17:20:45 2011	(r226345)
+++ head/sys/dev/iwn/if_iwn.c	Thu Oct 13 18:17:03 2011	(r226346)
@@ -2929,7 +2929,7 @@ iwn_notif_intr(struct iwn_softc *sc)
 			 * reinitialize the sensitivity state machine.
 			 */
 			if (vap->iv_state == IEEE80211_S_RUN &&
-			    (ic->ic_flags & IEEE80211_F_SCAN) != 0) {
+			    (ic->ic_flags & IEEE80211_F_SCAN) == 0) {
 				if (misses > 5)
 					(void)iwn_init_sensitivity(sc);
 				if (misses >= vap->iv_bmissthreshold) {

From owner-svn-src-all@FreeBSD.ORG  Thu Oct 13 18:18:42 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id DBF921065670;
	Thu, 13 Oct 2011 18:18:42 +0000 (UTC)
	(envelope-from marcel@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id CBC118FC17;
	Thu, 13 Oct 2011 18:18:42 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9DIIgBd026916;
	Thu, 13 Oct 2011 18:18:42 GMT (envelope-from marcel@svn.freebsd.org)
Received: (from marcel@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9DIIgQL026914;
	Thu, 13 Oct 2011 18:18:42 GMT (envelope-from marcel@svn.freebsd.org)
Message-Id: <201110131818.p9DIIgQL026914@svn.freebsd.org>
From: Marcel Moolenaar 
Date: Thu, 13 Oct 2011 18:18:42 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226347 - head/sys/compat/freebsd32
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 13 Oct 2011 18:18:43 -0000

Author: marcel
Date: Thu Oct 13 18:18:42 2011
New Revision: 226347
URL: http://svn.freebsd.org/changeset/base/226347

Log:
  In freebsd32_mmap() and when compiling for amd64 or ia64, also
  ask for execute permissions when read permissions are wanted.
  This is needed for JDK 1.4.x on i386.

Modified:
  head/sys/compat/freebsd32/freebsd32_misc.c

Modified: head/sys/compat/freebsd32/freebsd32_misc.c
==============================================================================
--- head/sys/compat/freebsd32/freebsd32_misc.c	Thu Oct 13 18:17:03 2011	(r226346)
+++ head/sys/compat/freebsd32/freebsd32_misc.c	Thu Oct 13 18:18:42 2011	(r226347)
@@ -520,6 +520,11 @@ freebsd32_mmap(struct thread *td, struct
 	}
 #endif
 
+#if defined(__amd64__) || defined(__ia64__)
+	if (prot & PROT_READ)
+		prot |= PROT_EXEC;
+#endif
+
 	ap.addr = (void *) addr;
 	ap.len = len;
 	ap.prot = prot;

From owner-svn-src-all@FreeBSD.ORG  Thu Oct 13 18:20:33 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A2D01106566B;
	Thu, 13 Oct 2011 18:20:33 +0000 (UTC)
	(envelope-from kostikbel@gmail.com)
Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200])
	by mx1.freebsd.org (Postfix) with ESMTP id 3B6998FC0C;
	Thu, 13 Oct 2011 18:20:32 +0000 (UTC)
Received: from alf.home (alf.kiev.zoral.com.ua [10.1.1.177])
	by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id p9DIKPus029606
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Thu, 13 Oct 2011 21:20:25 +0300 (EEST)
	(envelope-from kostikbel@gmail.com)
Received: from alf.home (kostik@localhost [127.0.0.1])
	by alf.home (8.14.5/8.14.5) with ESMTP id p9DIKPHH036118;
	Thu, 13 Oct 2011 21:20:25 +0300 (EEST)
	(envelope-from kostikbel@gmail.com)
Received: (from kostik@localhost)
	by alf.home (8.14.5/8.14.5/Submit) id p9DIKPtu036117;
	Thu, 13 Oct 2011 21:20:25 +0300 (EEST)
	(envelope-from kostikbel@gmail.com)
X-Authentication-Warning: alf.home: kostik set sender to kostikbel@gmail.com
	using -f
Date: Thu, 13 Oct 2011 21:20:25 +0300
From: Kostik Belousov 
To: Marcel Moolenaar 
Message-ID: <20111013182025.GK1511@deviant.kiev.zoral.com.ua>
References: <201110131620.p9DGKAM2022926@svn.freebsd.org>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature"; boundary="ywvyGaV92PjvegkV"
Content-Disposition: inline
In-Reply-To: <201110131620.p9DGKAM2022926@svn.freebsd.org>
User-Agent: Mutt/1.4.2.3i
X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua
X-Virus-Status: Clean
X-Spam-Status: No, score=-3.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,
	DNS_FROM_OPENWHOIS autolearn=no version=3.2.5
X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on
	skuns.kiev.zoral.com.ua
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r226343 - head/sys/vm
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 13 Oct 2011 18:20:33 -0000


--ywvyGaV92PjvegkV
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Thu, Oct 13, 2011 at 04:20:10PM +0000, Marcel Moolenaar wrote:
> Author: marcel
> Date: Thu Oct 13 16:20:10 2011
> New Revision: 226343
> URL: http://svn.freebsd.org/changeset/base/226343
>=20
> Log:
>   In sys_obreak() and when compiling for amd64 or ia64, when the process
>   is ILP32 (i.e. i386) grant execute permissions by default. The JDK 1.4.x
>   depends on being able to execute from the heap on i386.
>=20
> Modified:
>   head/sys/vm/vm_unix.c
>=20
> Modified: head/sys/vm/vm_unix.c
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
> --- head/sys/vm/vm_unix.c	Thu Oct 13 16:16:46 2011	(r226342)
> +++ head/sys/vm/vm_unix.c	Thu Oct 13 16:20:10 2011	(r226343)
> @@ -36,6 +36,8 @@
>   *	@(#)vm_unix.c	8.1 (Berkeley) 6/11/93
>   */
> =20
> +#include "opt_compat.h"
> +
>  /*
>   * Traditional sbrk/grow interface to VM
>   */
> @@ -49,6 +51,7 @@ __FBSDID("$FreeBSD$");
>  #include 
>  #include 
>  #include 
> +#include 
>  #include 
>  #include 
> =20
> @@ -75,7 +78,7 @@ sys_obreak(td, uap)
>  	struct vmspace *vm =3D td->td_proc->p_vmspace;
>  	vm_offset_t new, old, base;
>  	rlim_t datalim, vmemlim;
> -	int rv;
> +	int prot, rv;
>  	int error =3D 0;
>  	boolean_t do_map_wirefuture;
> =20
> @@ -135,8 +138,15 @@ sys_obreak(td, uap)
>  		}
>  		PROC_UNLOCK(td->td_proc);
>  #endif
> +		prot =3D VM_PROT_RW;
> +#ifdef COMPAT_FREEBSD32
> +#if defined(__amd64__) || defined(__ia64__)
> +		if (SV_PROC_FLAG(td->td_proc, SV_ILP32))
> +			prot |=3D VM_PROT_EXECUTE;
> +#endif
> +#endif
>  		rv =3D vm_map_insert(&vm->vm_map, NULL, 0, old, new,
> -		    VM_PROT_RW, VM_PROT_ALL, 0);
> +		    prot, VM_PROT_ALL, 0);
>  		if (rv !=3D KERN_SUCCESS) {
>  #ifdef RACCT
>  			PROC_LOCK(td->td_proc);
The two commits removed NX support for .data/.bss for 32bit binaries on amd=
64.
This is too unfortunate. Can we claim that only old binaries need this hack=
 ?

If yes, could you, please, conditionalize the hack on curproc->p_osrel
being, say, 4.x ?

--ywvyGaV92PjvegkV
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (FreeBSD)

iEYEARECAAYFAk6XK+gACgkQC3+MBN1Mb4iR+gCePAhKnyEsWSbiOUzsOcsm66Cy
P8EAoL0A40cus5B5TkizjrgU2CBk3ewr
=fFqb
-----END PGP SIGNATURE-----

--ywvyGaV92PjvegkV--

From owner-svn-src-all@FreeBSD.ORG  Thu Oct 13 18:21:12 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 03056106566C;
	Thu, 13 Oct 2011 18:21:12 +0000 (UTC)
	(envelope-from marcel@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id E6B188FC0A;
	Thu, 13 Oct 2011 18:21:11 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9DILBZv027036;
	Thu, 13 Oct 2011 18:21:11 GMT (envelope-from marcel@svn.freebsd.org)
Received: (from marcel@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9DILBuY027034;
	Thu, 13 Oct 2011 18:21:11 GMT (envelope-from marcel@svn.freebsd.org)
Message-Id: <201110131821.p9DILBuY027034@svn.freebsd.org>
From: Marcel Moolenaar 
Date: Thu, 13 Oct 2011 18:21:11 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226348 - head/sys/compat/freebsd32
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 13 Oct 2011 18:21:12 -0000

Author: marcel
Date: Thu Oct 13 18:21:11 2011
New Revision: 226348
URL: http://svn.freebsd.org/changeset/base/226348

Log:
  Wrap mprotect(2)

Modified:
  head/sys/compat/freebsd32/syscalls.master

Modified: head/sys/compat/freebsd32/syscalls.master
==============================================================================
--- head/sys/compat/freebsd32/syscalls.master	Thu Oct 13 18:18:42 2011	(r226347)
+++ head/sys/compat/freebsd32/syscalls.master	Thu Oct 13 18:21:11 2011	(r226348)
@@ -172,7 +172,7 @@
 72	AUE_O_VADVISE	NOPROTO	{ int ovadvise(int anom); } vadvise \
 				    ovadvise_args int
 73	AUE_MUNMAP	NOPROTO	{ int munmap(void *addr, size_t len); }
-74	AUE_MPROTECT	NOPROTO	{ int mprotect(const void *addr, \
+74	AUE_MPROTECT	STD	{ int freebsd32_mprotect(const void *addr, \
 				    size_t len, int prot); }
 75	AUE_MADVISE	NOPROTO	{ int madvise(void *addr, size_t len, \
 				    int behav); }

From owner-svn-src-all@FreeBSD.ORG  Thu Oct 13 18:25:11 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 28A0B10657CE;
	Thu, 13 Oct 2011 18:25:11 +0000 (UTC)
	(envelope-from marcel@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 173A08FC16;
	Thu, 13 Oct 2011 18:25:11 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9DIPA6K027208;
	Thu, 13 Oct 2011 18:25:10 GMT (envelope-from marcel@svn.freebsd.org)
Received: (from marcel@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9DIPAJs027201;
	Thu, 13 Oct 2011 18:25:10 GMT (envelope-from marcel@svn.freebsd.org)
Message-Id: <201110131825.p9DIPAJs027201@svn.freebsd.org>
From: Marcel Moolenaar 
Date: Thu, 13 Oct 2011 18:25:10 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226349 - head/sys/compat/freebsd32
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 13 Oct 2011 18:25:11 -0000

Author: marcel
Date: Thu Oct 13 18:25:10 2011
New Revision: 226349
URL: http://svn.freebsd.org/changeset/base/226349

Log:
  Wrap mprotect(2) so that we can add execute permissions when read
  permissions are requested. This is needed on amd64 and ia64 for
  JDK 1.4.x

Modified:
  head/sys/compat/freebsd32/freebsd32_misc.c
  head/sys/compat/freebsd32/freebsd32_proto.h
  head/sys/compat/freebsd32/freebsd32_syscall.h
  head/sys/compat/freebsd32/freebsd32_syscalls.c
  head/sys/compat/freebsd32/freebsd32_sysent.c
  head/sys/compat/freebsd32/freebsd32_systrace_args.c

Modified: head/sys/compat/freebsd32/freebsd32_misc.c
==============================================================================
--- head/sys/compat/freebsd32/freebsd32_misc.c	Thu Oct 13 18:21:11 2011	(r226348)
+++ head/sys/compat/freebsd32/freebsd32_misc.c	Thu Oct 13 18:25:10 2011	(r226349)
@@ -437,6 +437,21 @@ freebsd32_mmap_partial(struct thread *td
 #endif
 
 int
+freebsd32_mprotect(struct thread *td, struct freebsd32_mprotect_args *uap)
+{
+	struct mprotect_args ap;
+
+	ap.addr = (void *)(uintptr_t)uap->addr;
+	ap.len = uap->len;
+	ap.prot = uap->prot;
+#if defined(__amd64__) || defined(__ia64__)
+	if (ap.prot & PROT_READ)
+		ap.prot |= PROT_EXEC;
+#endif
+	return (sys_mprotect(td, &ap));
+}
+
+int
 freebsd32_mmap(struct thread *td, struct freebsd32_mmap_args *uap)
 {
 	struct mmap_args ap;

Modified: head/sys/compat/freebsd32/freebsd32_proto.h
==============================================================================
--- head/sys/compat/freebsd32/freebsd32_proto.h	Thu Oct 13 18:21:11 2011	(r226348)
+++ head/sys/compat/freebsd32/freebsd32_proto.h	Thu Oct 13 18:25:10 2011	(r226349)
@@ -3,7 +3,7 @@
  *
  * DO NOT EDIT-- this file is automatically generated.
  * $FreeBSD$
- * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 224066 2011-07-15 18:26:19Z jonathan 
+ * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 226348 2011-10-13 18:21:11Z marcel 
  */
 
 #ifndef _FREEBSD32_SYSPROTO_H_
@@ -76,6 +76,11 @@ struct freebsd32_execve_args {
 	char argv_l_[PADL_(u_int32_t *)]; u_int32_t * argv; char argv_r_[PADR_(u_int32_t *)];
 	char envv_l_[PADL_(u_int32_t *)]; u_int32_t * envv; char envv_r_[PADR_(u_int32_t *)];
 };
+struct freebsd32_mprotect_args {
+	char addr_l_[PADL_(const void *)]; const void * addr; char addr_r_[PADR_(const void *)];
+	char len_l_[PADL_(size_t)]; size_t len; char len_r_[PADR_(size_t)];
+	char prot_l_[PADL_(int)]; int prot; char prot_r_[PADR_(int)];
+};
 struct freebsd32_setitimer_args {
 	char which_l_[PADL_(u_int)]; u_int which; char which_r_[PADR_(u_int)];
 	char itv_l_[PADL_(struct itimerval32 *)]; struct itimerval32 * itv; char itv_r_[PADR_(struct itimerval32 *)];
@@ -585,6 +590,7 @@ int	freebsd32_recvfrom(struct thread *, 
 int	freebsd32_sigaltstack(struct thread *, struct freebsd32_sigaltstack_args *);
 int	freebsd32_ioctl(struct thread *, struct freebsd32_ioctl_args *);
 int	freebsd32_execve(struct thread *, struct freebsd32_execve_args *);
+int	freebsd32_mprotect(struct thread *, struct freebsd32_mprotect_args *);
 int	freebsd32_setitimer(struct thread *, struct freebsd32_setitimer_args *);
 int	freebsd32_getitimer(struct thread *, struct freebsd32_getitimer_args *);
 int	freebsd32_select(struct thread *, struct freebsd32_select_args *);
@@ -943,6 +949,7 @@ int	freebsd7_freebsd32_shmctl(struct thr
 #define	FREEBSD32_SYS_AUE_freebsd32_execve	AUE_EXECVE
 #define	FREEBSD32_SYS_AUE_ofreebsd32_fstat	AUE_FSTAT
 #define	FREEBSD32_SYS_AUE_ofreebsd32_getpagesize	AUE_NULL
+#define	FREEBSD32_SYS_AUE_freebsd32_mprotect	AUE_MPROTECT
 #define	FREEBSD32_SYS_AUE_freebsd32_setitimer	AUE_SETITIMER
 #define	FREEBSD32_SYS_AUE_freebsd32_getitimer	AUE_GETITIMER
 #define	FREEBSD32_SYS_AUE_freebsd32_select	AUE_SELECT

Modified: head/sys/compat/freebsd32/freebsd32_syscall.h
==============================================================================
--- head/sys/compat/freebsd32/freebsd32_syscall.h	Thu Oct 13 18:21:11 2011	(r226348)
+++ head/sys/compat/freebsd32/freebsd32_syscall.h	Thu Oct 13 18:25:10 2011	(r226349)
@@ -3,7 +3,7 @@
  *
  * DO NOT EDIT-- this file is automatically generated.
  * $FreeBSD$
- * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 224066 2011-07-15 18:26:19Z jonathan 
+ * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 226348 2011-10-13 18:21:11Z marcel 
  */
 
 #define	FREEBSD32_SYS_syscall	0
@@ -80,7 +80,7 @@
 				/* 71 is obsolete ommap */
 #define	FREEBSD32_SYS_vadvise	72
 #define	FREEBSD32_SYS_munmap	73
-#define	FREEBSD32_SYS_mprotect	74
+#define	FREEBSD32_SYS_freebsd32_mprotect	74
 #define	FREEBSD32_SYS_madvise	75
 				/* 76 is obsolete vhangup */
 				/* 77 is obsolete vlimit */

Modified: head/sys/compat/freebsd32/freebsd32_syscalls.c
==============================================================================
--- head/sys/compat/freebsd32/freebsd32_syscalls.c	Thu Oct 13 18:21:11 2011	(r226348)
+++ head/sys/compat/freebsd32/freebsd32_syscalls.c	Thu Oct 13 18:25:10 2011	(r226349)
@@ -3,7 +3,7 @@
  *
  * DO NOT EDIT-- this file is automatically generated.
  * $FreeBSD$
- * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 224066 2011-07-15 18:26:19Z jonathan 
+ * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 226348 2011-10-13 18:21:11Z marcel 
  */
 
 const char *freebsd32_syscallnames[] = {
@@ -84,7 +84,7 @@ const char *freebsd32_syscallnames[] = {
 	"obs_ommap",			/* 71 = obsolete ommap */
 	"vadvise",			/* 72 = vadvise */
 	"munmap",			/* 73 = munmap */
-	"mprotect",			/* 74 = mprotect */
+	"freebsd32_mprotect",			/* 74 = freebsd32_mprotect */
 	"madvise",			/* 75 = madvise */
 	"obs_vhangup",			/* 76 = obsolete vhangup */
 	"obs_vlimit",			/* 77 = obsolete vlimit */

Modified: head/sys/compat/freebsd32/freebsd32_sysent.c
==============================================================================
--- head/sys/compat/freebsd32/freebsd32_sysent.c	Thu Oct 13 18:21:11 2011	(r226348)
+++ head/sys/compat/freebsd32/freebsd32_sysent.c	Thu Oct 13 18:25:10 2011	(r226349)
@@ -3,7 +3,7 @@
  *
  * DO NOT EDIT-- this file is automatically generated.
  * $FreeBSD$
- * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 224066 2011-07-15 18:26:19Z jonathan 
+ * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 226348 2011-10-13 18:21:11Z marcel 
  */
 
 #include "opt_compat.h"
@@ -121,7 +121,7 @@ struct sysent freebsd32_sysent[] = {
 	{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT },			/* 71 = obsolete ommap */
 	{ AS(ovadvise_args), (sy_call_t *)sys_ovadvise, AUE_O_VADVISE, NULL, 0, 0, 0, SY_THR_STATIC },	/* 72 = vadvise */
 	{ AS(munmap_args), (sy_call_t *)sys_munmap, AUE_MUNMAP, NULL, 0, 0, 0, SY_THR_STATIC },	/* 73 = munmap */
-	{ AS(mprotect_args), (sy_call_t *)sys_mprotect, AUE_MPROTECT, NULL, 0, 0, 0, SY_THR_STATIC },	/* 74 = mprotect */
+	{ AS(freebsd32_mprotect_args), (sy_call_t *)freebsd32_mprotect, AUE_MPROTECT, NULL, 0, 0, 0, SY_THR_STATIC },	/* 74 = freebsd32_mprotect */
 	{ AS(madvise_args), (sy_call_t *)sys_madvise, AUE_MADVISE, NULL, 0, 0, 0, SY_THR_STATIC },	/* 75 = madvise */
 	{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT },			/* 76 = obsolete vhangup */
 	{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT },			/* 77 = obsolete vlimit */

Modified: head/sys/compat/freebsd32/freebsd32_systrace_args.c
==============================================================================
--- head/sys/compat/freebsd32/freebsd32_systrace_args.c	Thu Oct 13 18:21:11 2011	(r226348)
+++ head/sys/compat/freebsd32/freebsd32_systrace_args.c	Thu Oct 13 18:25:10 2011	(r226349)
@@ -464,9 +464,9 @@ systrace_args(int sysnum, void *params, 
 		*n_args = 2;
 		break;
 	}
-	/* mprotect */
+	/* freebsd32_mprotect */
 	case 74: {
-		struct mprotect_args *p = params;
+		struct freebsd32_mprotect_args *p = params;
 		uarg[0] = (intptr_t) p->addr; /* const void * */
 		uarg[1] = p->len; /* size_t */
 		iarg[2] = p->prot; /* int */
@@ -3737,7 +3737,7 @@ systrace_setargdesc(int sysnum, int ndx,
 			break;
 		};
 		break;
-	/* mprotect */
+	/* freebsd32_mprotect */
 	case 74:
 		switch(ndx) {
 		case 0:

From owner-svn-src-all@FreeBSD.ORG  Thu Oct 13 18:30:16 2011
Return-Path: 
Delivered-To: svn-src-all@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 93880106566B;
	Thu, 13 Oct 2011 18:30:16 +0000 (UTC)
	(envelope-from marcel@xcllnt.net)
Received: from mail.xcllnt.net (mail.xcllnt.net [70.36.220.4])
	by mx1.freebsd.org (Postfix) with ESMTP id 48B9B8FC15;
	Thu, 13 Oct 2011 18:30:15 +0000 (UTC)
Received: from [172.23.7.198] (natint3.juniper.net [66.129.224.36])
	(authenticated bits=0)
	by mail.xcllnt.net (8.14.5/8.14.5) with ESMTP id p9DIU8h4029019
	(version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO);
	Thu, 13 Oct 2011 11:30:14 -0700 (PDT)
	(envelope-from marcel@xcllnt.net)
Mime-Version: 1.0 (Apple Message framework v1244.3)
Content-Type: text/plain; charset=us-ascii
From: Marcel Moolenaar 
In-Reply-To: <20111013182025.GK1511@deviant.kiev.zoral.com.ua>
Date: Thu, 13 Oct 2011 11:30:12 -0700
Content-Transfer-Encoding: quoted-printable
Message-Id: <7FB94714-3E47-4E1E-947A-AC62FF071135@xcllnt.net>
References: <201110131620.p9DGKAM2022926@svn.freebsd.org>
	<20111013182025.GK1511@deviant.kiev.zoral.com.ua>
To: Kostik Belousov 
X-Mailer: Apple Mail (2.1244.3)
Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org,
	Marcel Moolenaar , src-committers@FreeBSD.org
Subject: Re: svn commit: r226343 - head/sys/vm
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 13 Oct 2011 18:30:16 -0000


On Oct 13, 2011, at 11:20 AM, Kostik Belousov wrote:

> The two commits removed NX support for .data/.bss for 32bit binaries =
on amd64.
> This is too unfortunate. Can we claim that only old binaries need this =
hack ?

I don't know. When did our ABI for i386 change to have NX by default?

--=20
Marcel Moolenaar
marcel@xcllnt.net



From owner-svn-src-all@FreeBSD.ORG  Thu Oct 13 19:09:47 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id BB57F1065670;
	Thu, 13 Oct 2011 19:09:47 +0000 (UTC)
	(envelope-from kostikbel@gmail.com)
Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200])
	by mx1.freebsd.org (Postfix) with ESMTP id 333E58FC12;
	Thu, 13 Oct 2011 19:09:46 +0000 (UTC)
Received: from alf.home (alf.kiev.zoral.com.ua [10.1.1.177])
	by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id p9DJ9hqn033367
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Thu, 13 Oct 2011 22:09:43 +0300 (EEST)
	(envelope-from kostikbel@gmail.com)
Received: from alf.home (kostik@localhost [127.0.0.1])
	by alf.home (8.14.5/8.14.5) with ESMTP id p9DJ9hEK036335;
	Thu, 13 Oct 2011 22:09:43 +0300 (EEST)
	(envelope-from kostikbel@gmail.com)
Received: (from kostik@localhost)
	by alf.home (8.14.5/8.14.5/Submit) id p9DJ9hnV036334;
	Thu, 13 Oct 2011 22:09:43 +0300 (EEST)
	(envelope-from kostikbel@gmail.com)
X-Authentication-Warning: alf.home: kostik set sender to kostikbel@gmail.com
	using -f
Date: Thu, 13 Oct 2011 22:09:43 +0300
From: Kostik Belousov 
To: Marcel Moolenaar 
Message-ID: <20111013190943.GM1511@deviant.kiev.zoral.com.ua>
References: <201110131620.p9DGKAM2022926@svn.freebsd.org>
	<20111013182025.GK1511@deviant.kiev.zoral.com.ua>
	<7FB94714-3E47-4E1E-947A-AC62FF071135@xcllnt.net>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature"; boundary="HDfPXHCxbbzPc3vJ"
Content-Disposition: inline
In-Reply-To: <7FB94714-3E47-4E1E-947A-AC62FF071135@xcllnt.net>
User-Agent: Mutt/1.4.2.3i
X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua
X-Virus-Status: Clean
X-Spam-Status: No, score=-3.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,
	DNS_FROM_OPENWHOIS autolearn=no version=3.2.5
X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on
	skuns.kiev.zoral.com.ua
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	Marcel Moolenaar , src-committers@freebsd.org
Subject: Re: svn commit: r226343 - head/sys/vm
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 13 Oct 2011 19:09:47 -0000


--HDfPXHCxbbzPc3vJ
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Thu, Oct 13, 2011 at 11:30:12AM -0700, Marcel Moolenaar wrote:
>
> On Oct 13, 2011, at 11:20 AM, Kostik Belousov wrote:
>
> > The two commits removed NX support for .data/.bss for 32bit binaries
> > Thon amd64. is is too unfortunate. Can we claim that only old
> > Thbinaries need this hack ?
>
> I don't know. When did our ABI for i386 change to have NX by default?
I think it changed de-facto when NX appears to be supported by hardware.
In other words, PF_R->PF_X was always considered a coincident, and not
a promise.

I think we can claim that the moment FreeBSD gained PAE support, it happen.

I would suggest to add a sysctl, say kern.elf32.readable_nx, with
the values:
0 - strictly follow segment permissions
1 - PF_R implies PF_X if p_osrel < 600000
2 - PF_R always implied PF_X
for 32bit binaries.

--HDfPXHCxbbzPc3vJ
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (FreeBSD)

iEYEARECAAYFAk6XN3cACgkQC3+MBN1Mb4j0qACfRwkiBGTITzDPIyzStJFeWmFO
3tsAmgKLyQ5rEIgtMf3HPw2LLDYbOmNl
=iTtS
-----END PGP SIGNATURE-----

--HDfPXHCxbbzPc3vJ--

From owner-svn-src-all@FreeBSD.ORG  Thu Oct 13 19:25:41 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 42B96106566C;
	Thu, 13 Oct 2011 19:25:41 +0000 (UTC) (envelope-from jhb@freebsd.org)
Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42])
	by mx1.freebsd.org (Postfix) with ESMTP id D510B8FC13;
	Thu, 13 Oct 2011 19:25:40 +0000 (UTC)
Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net
	[66.111.2.69])
	by cyrus.watson.org (Postfix) with ESMTPSA id 7173A46B0D;
	Thu, 13 Oct 2011 15:25:40 -0400 (EDT)
Received: from jhbbsd.localnet (unknown [209.249.190.124])
	by bigwig.baldwin.cx (Postfix) with ESMTPSA id 0EC028A02E;
	Thu, 13 Oct 2011 15:25:40 -0400 (EDT)
From: John Baldwin 
To: Marcel Moolenaar 
Date: Thu, 13 Oct 2011 15:25:39 -0400
User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110617; KDE/4.5.5; amd64; ; )
References: <201110131825.p9DIPAJs027201@svn.freebsd.org>
In-Reply-To: <201110131825.p9DIPAJs027201@svn.freebsd.org>
MIME-Version: 1.0
Content-Type: Text/Plain;
  charset="utf-8"
Content-Transfer-Encoding: 7bit
Message-Id: <201110131525.39464.jhb@freebsd.org>
X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6
	(bigwig.baldwin.cx); Thu, 13 Oct 2011 15:25:40 -0400 (EDT)
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r226349 - head/sys/compat/freebsd32
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 13 Oct 2011 19:25:41 -0000

On Thursday, October 13, 2011 2:25:10 pm Marcel Moolenaar wrote:
> Author: marcel
> Date: Thu Oct 13 18:25:10 2011
> New Revision: 226349
> URL: http://svn.freebsd.org/changeset/base/226349
> 
> Log:
>   Wrap mprotect(2) so that we can add execute permissions when read
>   permissions are requested. This is needed on amd64 and ia64 for
>   JDK 1.4.x
> 
> Modified:
>   head/sys/compat/freebsd32/freebsd32_misc.c
>   head/sys/compat/freebsd32/freebsd32_proto.h
>   head/sys/compat/freebsd32/freebsd32_syscall.h
>   head/sys/compat/freebsd32/freebsd32_syscalls.c
>   head/sys/compat/freebsd32/freebsd32_sysent.c
>   head/sys/compat/freebsd32/freebsd32_systrace_args.c
> 
> Modified: head/sys/compat/freebsd32/freebsd32_misc.c
> ==============================================================================
> --- head/sys/compat/freebsd32/freebsd32_misc.c	Thu Oct 13 18:21:11 2011	(r226348)
> +++ head/sys/compat/freebsd32/freebsd32_misc.c	Thu Oct 13 18:25:10 2011	(r226349)
> @@ -437,6 +437,21 @@ freebsd32_mmap_partial(struct thread *td
>  #endif
>  
>  int
> +freebsd32_mprotect(struct thread *td, struct freebsd32_mprotect_args *uap)
> +{
> +	struct mprotect_args ap;
> +
> +	ap.addr = (void *)(uintptr_t)uap->addr;

Maybe use PTRIN() here?

> +	ap.len = uap->len;
> +	ap.prot = uap->prot;
> +#if defined(__amd64__) || defined(__ia64__)
> +	if (ap.prot & PROT_READ)
> +		ap.prot |= PROT_EXEC;
> +#endif
> +	return (sys_mprotect(td, &ap));
> +}
> +
> +int

-- 
John Baldwin

From owner-svn-src-all@FreeBSD.ORG  Thu Oct 13 20:06:20 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 6986F106566B;
	Thu, 13 Oct 2011 20:06:20 +0000 (UTC)
	(envelope-from marius@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 580168FC0C;
	Thu, 13 Oct 2011 20:06:20 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9DK6Kwk030389;
	Thu, 13 Oct 2011 20:06:20 GMT (envelope-from marius@svn.freebsd.org)
Received: (from marius@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9DK6K2L030384;
	Thu, 13 Oct 2011 20:06:20 GMT (envelope-from marius@svn.freebsd.org)
Message-Id: <201110132006.p9DK6K2L030384@svn.freebsd.org>
From: Marius Strobl 
Date: Thu, 13 Oct 2011 20:06:20 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226350 - in head/sys/dev: aac asr hptiop mfi
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 13 Oct 2011 20:06:20 -0000

Author: marius
Date: Thu Oct 13 20:06:19 2011
New Revision: 226350
URL: http://svn.freebsd.org/changeset/base/226350

Log:
  Merge from r225950:
  
  Set the sense residual properly.
  
  Reviewed by:	ken

Modified:
  head/sys/dev/aac/aac_cam.c
  head/sys/dev/asr/asr.c
  head/sys/dev/hptiop/hptiop.c
  head/sys/dev/mfi/mfi_cam.c

Modified: head/sys/dev/aac/aac_cam.c
==============================================================================
--- head/sys/dev/aac/aac_cam.c	Thu Oct 13 18:25:10 2011	(r226349)
+++ head/sys/dev/aac/aac_cam.c	Thu Oct 13 20:06:19 2011	(r226350)
@@ -532,6 +532,7 @@ aac_cam_complete(struct aac_command *cm)
 	union	ccb *ccb;
 	struct 	aac_srb_response *srbr;
 	struct	aac_softc *sc;
+	int	sense_returned;
 
 	sc = cm->cm_sc;
 	fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, "");
@@ -556,16 +557,17 @@ aac_cam_complete(struct aac_command *cm)
 
 			/* Take care of autosense */
 			if (srbr->sense_len) {
-				int sense_len, scsi_sense_len;
-
-				scsi_sense_len = sizeof(struct scsi_sense_data);
-				bzero(&ccb->csio.sense_data, scsi_sense_len);
-				sense_len = (srbr->sense_len >
-				    scsi_sense_len) ? scsi_sense_len :
-				    srbr->sense_len;
+				sense_returned = srbr->sense_len;
+				if (sense_returned < ccb->csio.sense_len)
+					ccb->csio.sense_resid =
+					   ccb->csio.sense_len -
+					   sense_returned;
+					else
+					    ccb->csio.sense_resid = 0;
+				bzero(&ccb->csio.sense_data,
+				    sizeof(struct scsi_sense_data));
 				bcopy(&srbr->sense[0], &ccb->csio.sense_data,
-				    srbr->sense_len);
-				ccb->csio.sense_len = sense_len;
+				    min(ccb->csio.sense_len, sense_returned));
 				ccb->ccb_h.status |= CAM_AUTOSNS_VALID;
 				// scsi_sense_print(&ccb->csio);
 			}

Modified: head/sys/dev/asr/asr.c
==============================================================================
--- head/sys/dev/asr/asr.c	Thu Oct 13 18:25:10 2011	(r226349)
+++ head/sys/dev/asr/asr.c	Thu Oct 13 20:06:19 2011	(r226350)
@@ -3071,6 +3071,14 @@ asr_intr(Asr_softc_t *sc)
 				 && (size > ccb->csio.sense_len)) {
 					size = ccb->csio.sense_len;
 				}
+				if (size < ccb->csio.sense_len) {
+					ccb->csio.sense_resid =
+					    ccb->csio.sense_len - size;
+				} else {
+					ccb->csio.sense_resid = 0;
+				}
+				bzero(&(ccb->csio.sense_data),
+				    sizeof(ccb->csio.sense_data));
 				bcopy(Reply->SenseData,
 				      &(ccb->csio.sense_data), size);
 			}
@@ -3566,6 +3574,12 @@ ASR_queue_i(Asr_softc_t	*sc, PI2O_MESSAG
 		if (size > sizeof(ccb->csio.sense_data)) {
 			size = sizeof(ccb->csio.sense_data);
 		}
+		if (size < ccb->csio.sense_len) {
+			ccb->csio.sense_resid = ccb->csio.sense_len - size;
+		} else {
+			ccb->csio.sense_resid = 0;
+		}
+		bzero(&(ccb->csio.sense_data), sizeof(ccb->csio.sense_data));
 		bcopy(&(ccb->csio.sense_data), Reply_Ptr->SenseData, size);
 		I2O_SCSI_ERROR_REPLY_MESSAGE_FRAME_setAutoSenseTransferCount(
 		    Reply_Ptr, size);

Modified: head/sys/dev/hptiop/hptiop.c
==============================================================================
--- head/sys/dev/hptiop/hptiop.c	Thu Oct 13 18:25:10 2011	(r226349)
+++ head/sys/dev/hptiop/hptiop.c	Thu Oct 13 20:06:19 2011	(r226350)
@@ -424,6 +424,13 @@ srb_complete:
 			ccb->ccb_h.status = CAM_BUSY;
 			break;
 		case IOP_RESULT_CHECK_CONDITION:
+			memset(&ccb->csio.sense_data, 0,
+			    sizeof(ccb->csio.sense_data));
+			if (dxfer < ccb->csio.sense_len)
+				ccb->csio.sense_resid = ccb->csio.sense_len -
+				    dxfer;
+			else
+				ccb->csio.sense_resid = 0;
 			if (srb->srb_flag & HPT_SRB_FLAG_HIGH_MEM_ACESS) {/*iop*/
 				bus_space_read_region_1(hba->bar0t, hba->bar0h,
 					index + offsetof(struct hpt_iop_request_scsi_command,
@@ -573,6 +580,13 @@ static void hptiop_request_callback_mv(s
 			ccb->ccb_h.status = CAM_BUSY;
 			break;
 		case IOP_RESULT_CHECK_CONDITION:
+			memset(&ccb->csio.sense_data, 0,
+			    sizeof(ccb->csio.sense_data));
+			if (req->dataxfer_length < ccb->csio.sense_len)
+				ccb->csio.sense_resid = ccb->csio.sense_len -
+				    req->dataxfer_length;
+			else
+				ccb->csio.sense_resid = 0;
 			memcpy(&ccb->csio.sense_data, &req->sg_list, 
 				MIN(req->dataxfer_length, sizeof(ccb->csio.sense_data)));
 			ccb->ccb_h.status = CAM_SCSI_STATUS_ERROR;

Modified: head/sys/dev/mfi/mfi_cam.c
==============================================================================
--- head/sys/dev/mfi/mfi_cam.c	Thu Oct 13 18:25:10 2011	(r226349)
+++ head/sys/dev/mfi/mfi_cam.c	Thu Oct 13 20:06:19 2011	(r226350)
@@ -354,7 +354,13 @@ mfip_done(struct mfi_command *cm)
 
 		ccbh->status = CAM_SCSI_STATUS_ERROR | CAM_AUTOSNS_VALID;
 		csio->scsi_status = pt->header.scsi_status;
-		sense_len = min(pt->header.sense_len, sizeof(struct scsi_sense_data));
+		if (pt->header.sense_len < csio->sense_len)
+			csio->sense_resid = csio->sense_len -
+			    pt->header.sense_len;
+		else
+			csio->sense_resid = 0;
+		sense_len = min(pt->header.sense_len,
+		    sizeof(struct scsi_sense_data));
 		bzero(&csio->sense_data, sizeof(struct scsi_sense_data));
 		bcopy(&cm->cm_sense->data[0], &csio->sense_data, sense_len);
 		break;

From owner-svn-src-all@FreeBSD.ORG  Thu Oct 13 20:13:14 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 985A9106564A;
	Thu, 13 Oct 2011 20:13:14 +0000 (UTC)
	(envelope-from marcel@xcllnt.net)
Received: from mail.xcllnt.net (mail.xcllnt.net [70.36.220.4])
	by mx1.freebsd.org (Postfix) with ESMTP id 4D9518FC15;
	Thu, 13 Oct 2011 20:13:14 +0000 (UTC)
Received: from [172.23.7.198] (natint3.juniper.net [66.129.224.36])
	(authenticated bits=0)
	by mail.xcllnt.net (8.14.5/8.14.5) with ESMTP id p9DKD76q029430
	(version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO);
	Thu, 13 Oct 2011 13:13:13 -0700 (PDT)
	(envelope-from marcel@xcllnt.net)
Mime-Version: 1.0 (Apple Message framework v1244.3)
Content-Type: text/plain; charset=us-ascii
From: Marcel Moolenaar 
In-Reply-To: <20111013190943.GM1511@deviant.kiev.zoral.com.ua>
Date: Thu, 13 Oct 2011 13:13:10 -0700
Content-Transfer-Encoding: 7bit
Message-Id: 
References: <201110131620.p9DGKAM2022926@svn.freebsd.org>
	<20111013182025.GK1511@deviant.kiev.zoral.com.ua>
	<7FB94714-3E47-4E1E-947A-AC62FF071135@xcllnt.net>
	<20111013190943.GM1511@deviant.kiev.zoral.com.ua>
To: Kostik Belousov 
X-Mailer: Apple Mail (2.1244.3)
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	Marcel Moolenaar , src-committers@freebsd.org
Subject: Re: svn commit: r226343 - head/sys/vm
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 13 Oct 2011 20:13:14 -0000


On Oct 13, 2011, at 12:09 PM, Kostik Belousov wrote:

> On Thu, Oct 13, 2011 at 11:30:12AM -0700, Marcel Moolenaar wrote:
>> 
>> On Oct 13, 2011, at 11:20 AM, Kostik Belousov wrote:
>> 
>>> The two commits removed NX support for .data/.bss for 32bit binaries
>>> Thon amd64. is is too unfortunate. Can we claim that only old
>>> Thbinaries need this hack ?
>> 
>> I don't know. When did our ABI for i386 change to have NX by default?
> I think it changed de-facto when NX appears to be supported by hardware.
> In other words, PF_R->PF_X was always considered a coincident, and not
> a promise.

That's really besides the point. ABI changes are made deliberately
and ABIs must be well-documented for anyone to adhere to it. You
can't post hoc wave your hand and say that at some unspecified time
in the past the ABI changed: at what precise time does "supported
by hardware mean" and how does that tie to a major FreeBSD version?

Point in case: the JDK 1.4.x still works on FreeBSD 9.x (i386), so
the ABI really hasn't changed at all in that respect.

> I think we can claim that the moment FreeBSD gained PAE support, it happen.

We cannot make that claim at at.

> I would suggest to add a sysctl, say kern.elf32.readable_nx, with
> the values:
> 0 - strictly follow segment permissions
> 1 - PF_R implies PF_X if p_osrel < 600000
> 2 - PF_R always implied PF_X
> for 32bit binaries.

A sysctl is a good idea, but I would just give it a 0/1 value.
Adding a "p_osrel < 600000" case is entirely without grounds.

-- 
Marcel Moolenaar
marcel@xcllnt.net



From owner-svn-src-all@FreeBSD.ORG  Thu Oct 13 20:36:44 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 7871D106564A;
	Thu, 13 Oct 2011 20:36:44 +0000 (UTC)
	(envelope-from rakuco@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 4D6808FC0A;
	Thu, 13 Oct 2011 20:36:44 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9DKai4O031424;
	Thu, 13 Oct 2011 20:36:44 GMT (envelope-from rakuco@svn.freebsd.org)
Received: (from rakuco@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9DKaiNi031421;
	Thu, 13 Oct 2011 20:36:44 GMT (envelope-from rakuco@svn.freebsd.org)
Message-Id: <201110132036.p9DKaiNi031421@svn.freebsd.org>
From: Raphael Kubo da Costa 
Date: Thu, 13 Oct 2011 20:36:44 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226351 - in head: share/misc usr.bin/calendar/calendars
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 13 Oct 2011 20:36:44 -0000

Author: rakuco (ports committer)
Date: Thu Oct 13 20:36:43 2011
New Revision: 226351
URL: http://svn.freebsd.org/changeset/base/226351

Log:
  Add myself to committers-ports.dot and calendar.freebsd.
  
  Approved by:	avilla (mentor)

Modified:
  head/share/misc/committers-ports.dot
  head/usr.bin/calendar/calendars/calendar.freebsd

Modified: head/share/misc/committers-ports.dot
==============================================================================
--- head/share/misc/committers-ports.dot	Thu Oct 13 20:06:19 2011	(r226350)
+++ head/share/misc/committers-ports.dot	Thu Oct 13 20:36:43 2011	(r226351)
@@ -154,6 +154,7 @@ pgj [label="Gabor Pali\npgj@FreeBSD.org\
 philip [label="Philip Paeps\nphilip@FreeBSD.org\n2005/10/19"]
 pgollucci [label="Philip M. Gollucci\npgollucci@FreeBSD.org\n2008/07/21"]
 rafan [label="Rong-En Fan\nrafan@FreeBSD.org\n2006/06/23"]
+rakuco [label="Raphael Kubo da Costa\nrakuco@FreeBSD.org\n2011/08/22"]
 rene [label="Rene Ladan\nrene@FreeBSD.org\n2010/04/11"]
 rnoland [label="Robert Noland\nrnoland@FreeBSD.org\n2008/07/21"]
 romain [label="Romain Tartiere\nromain@FreeBSD.org\n2010/01/24"]
@@ -210,6 +211,8 @@ arved -> stefan
 
 asami -> obrien
 
+avilla -> rakuco
+
 bapt -> eadler
 bapt -> jlaffaye
 
@@ -327,6 +330,7 @@ marcus -> eik
 marcus -> jmallett
 
 makc -> bf
+makc -> rakuco
 
 mat -> thierry
 

Modified: head/usr.bin/calendar/calendars/calendar.freebsd
==============================================================================
--- head/usr.bin/calendar/calendars/calendar.freebsd	Thu Oct 13 20:06:19 2011	(r226350)
+++ head/usr.bin/calendar/calendars/calendar.freebsd	Thu Oct 13 20:36:43 2011	(r226351)
@@ -22,6 +22,7 @@
 01/16	Ariff Abdullah  born in Kuala Lumpur, Malaysia, 1978
 01/16	Dmitry Sivachenko  born in Moscow, USSR, 1978
 01/16	Vanilla I. Shu  born in Taipei, Taiwan, Republic of China, 1978
+01/17	Raphael Kubo da Costa  born in Sao Paulo, Sao Paulo, Brazil, 1989
 01/18	Dejan Lesjak  born in Ljubljana, Slovenia, Yugoslavia, 1977
 01/19	Marshall Kirk McKusick  born in Wilmington, Delaware, United States, 1954
 01/19	Ruslan Ermilov  born in Simferopol, USSR, 1974

From owner-svn-src-all@FreeBSD.ORG  Thu Oct 13 21:07:16 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 0356C106564A;
	Thu, 13 Oct 2011 21:07:16 +0000 (UTC) (envelope-from jhb@freebsd.org)
Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42])
	by mx1.freebsd.org (Postfix) with ESMTP id CC2DF8FC15;
	Thu, 13 Oct 2011 21:07:15 +0000 (UTC)
Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net
	[66.111.2.69])
	by cyrus.watson.org (Postfix) with ESMTPSA id 81D3346B3C;
	Thu, 13 Oct 2011 17:07:15 -0400 (EDT)
Received: from jhbbsd.localnet (unknown [209.249.190.124])
	by bigwig.baldwin.cx (Postfix) with ESMTPSA id 0D9548A02E;
	Thu, 13 Oct 2011 17:07:15 -0400 (EDT)
From: John Baldwin 
To: Marcel Moolenaar 
Date: Thu, 13 Oct 2011 17:07:14 -0400
User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110617; KDE/4.5.5; amd64; ; )
References: <201110131620.p9DGKAM2022926@svn.freebsd.org>
	<20111013190943.GM1511@deviant.kiev.zoral.com.ua>
	
In-Reply-To: 
MIME-Version: 1.0
Content-Type: Text/Plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Message-Id: <201110131707.14466.jhb@freebsd.org>
X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6
	(bigwig.baldwin.cx); Thu, 13 Oct 2011 17:07:15 -0400 (EDT)
Cc: Kostik Belousov , svn-src-head@freebsd.org,
	svn-src-all@freebsd.org, Marcel Moolenaar ,
	src-committers@freebsd.org
Subject: Re: svn commit: r226343 - head/sys/vm
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 13 Oct 2011 21:07:16 -0000

On Thursday, October 13, 2011 4:13:10 pm Marcel Moolenaar wrote:
> 
> On Oct 13, 2011, at 12:09 PM, Kostik Belousov wrote:
> 
> > On Thu, Oct 13, 2011 at 11:30:12AM -0700, Marcel Moolenaar wrote:
> >> 
> >> On Oct 13, 2011, at 11:20 AM, Kostik Belousov wrote:
> >> 
> >>> The two commits removed NX support for .data/.bss for 32bit binaries
> >>> Thon amd64. is is too unfortunate. Can we claim that only old
> >>> Thbinaries need this hack ?
> >> 
> >> I don't know. When did our ABI for i386 change to have NX by default?
> > I think it changed de-facto when NX appears to be supported by hardware.
> > In other words, PF_R->PF_X was always considered a coincident, and not
> > a promise.
> 
> That's really besides the point. ABI changes are made deliberately
> and ABIs must be well-documented for anyone to adhere to it. You
> can't post hoc wave your hand and say that at some unspecified time
> in the past the ABI changed: at what precise time does "supported
> by hardware mean" and how does that tie to a major FreeBSD version?
> 
> Point in case: the JDK 1.4.x still works on FreeBSD 9.x (i386), so
> the ABI really hasn't changed at all in that respect.

I think if you booted a FreeBSD 9.x i386 PAE kernel you'd find that the
jdk did not work.  That will be true for any i386 PAE kernel back to
when PG_NX support was introduced.

-- 
John Baldwin

From owner-svn-src-all@FreeBSD.ORG  Thu Oct 13 21:41:54 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 9CAAA106566B;
	Thu, 13 Oct 2011 21:41:54 +0000 (UTC)
	(envelope-from jilles@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 8B06B8FC12;
	Thu, 13 Oct 2011 21:41:54 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9DLfsGK033475;
	Thu, 13 Oct 2011 21:41:54 GMT (envelope-from jilles@svn.freebsd.org)
Received: (from jilles@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9DLfsDp033473;
	Thu, 13 Oct 2011 21:41:54 GMT (envelope-from jilles@svn.freebsd.org)
Message-Id: <201110132141.p9DLfsDp033473@svn.freebsd.org>
From: Jilles Tjoelker 
Date: Thu, 13 Oct 2011 21:41:54 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226352 - stable/8/usr.sbin/portsnap/portsnap
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 13 Oct 2011 21:41:54 -0000

Author: jilles
Date: Thu Oct 13 21:41:54 2011
New Revision: 226352
URL: http://svn.freebsd.org/changeset/base/226352

Log:
  MFC r226028: portsnap: Detect error immediately if we can't fetch the
  snapshot metadata.
  
  Also add some quotes around command substitution where useful and possible.

Modified:
  stable/8/usr.sbin/portsnap/portsnap/portsnap.sh
Directory Properties:
  stable/8/usr.sbin/portsnap/   (props changed)

Modified: stable/8/usr.sbin/portsnap/portsnap/portsnap.sh
==============================================================================
--- stable/8/usr.sbin/portsnap/portsnap/portsnap.sh	Thu Oct 13 20:36:43 2011	(r226351)
+++ stable/8/usr.sbin/portsnap/portsnap/portsnap.sh	Thu Oct 13 21:41:54 2011	(r226352)
@@ -536,9 +536,9 @@ fetch_metadata() {
 	rm -f ${SNAPSHOTHASH} tINDEX.new
 
 	echo ${NDEBUG} "Fetching snapshot metadata... "
-	fetch ${QUIETFLAG} http://${SERVERNAME}/t/${SNAPSHOTHASH}
+	fetch ${QUIETFLAG} http://${SERVERNAME}/t/${SNAPSHOTHASH} \
 	    2>${QUIETREDIR} || return
-	if [ `${SHA256} -q ${SNAPSHOTHASH}` != ${SNAPSHOTHASH} ]; then
+	if [ "`${SHA256} -q ${SNAPSHOTHASH}`" != ${SNAPSHOTHASH} ]; then
 		echo "snapshot metadata corrupt."
 		return 1
 	fi
@@ -606,7 +606,7 @@ fetch_index_sanity() {
 # Verify a list of files
 fetch_snapshot_verify() {
 	while read F; do
-		if [ `gunzip -c snap/${F} | ${SHA256} -q` != ${F} ]; then
+		if [ "`gunzip -c snap/${F} | ${SHA256} -q`" != ${F} ]; then
 			echo "snapshot corrupt."
 			return 1
 		fi

From owner-svn-src-all@FreeBSD.ORG  Thu Oct 13 22:04:48 2011
Return-Path: 
Delivered-To: svn-src-all@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 93CF8106564A;
	Thu, 13 Oct 2011 22:04:48 +0000 (UTC)
	(envelope-from marcel@xcllnt.net)
Received: from mail.xcllnt.net (mail.xcllnt.net [70.36.220.4])
	by mx1.freebsd.org (Postfix) with ESMTP id 527268FC13;
	Thu, 13 Oct 2011 22:04:48 +0000 (UTC)
Received: from [172.23.7.198] (natint3.juniper.net [66.129.224.36])
	(authenticated bits=0)
	by mail.xcllnt.net (8.14.5/8.14.5) with ESMTP id p9DM4aZW029865
	(version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO);
	Thu, 13 Oct 2011 15:04:45 -0700 (PDT)
	(envelope-from marcel@xcllnt.net)
Mime-Version: 1.0 (Apple Message framework v1244.3)
Content-Type: text/plain; charset=iso-8859-1
From: Marcel Moolenaar 
In-Reply-To: <201110131707.14466.jhb@freebsd.org>
Date: Thu, 13 Oct 2011 15:04:40 -0700
Content-Transfer-Encoding: 7bit
Message-Id: 
References: <201110131620.p9DGKAM2022926@svn.freebsd.org>
	<20111013190943.GM1511@deviant.kiev.zoral.com.ua>
	
	<201110131707.14466.jhb@freebsd.org>
To: John Baldwin 
X-Mailer: Apple Mail (2.1244.3)
Cc: Kostik Belousov , svn-src-head@FreeBSD.org,
	svn-src-all@FreeBSD.org, Marcel Moolenaar ,
	src-committers@FreeBSD.org
Subject: Re: svn commit: r226343 - head/sys/vm
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 13 Oct 2011 22:04:48 -0000


On Oct 13, 2011, at 2:07 PM, John Baldwin wrote:
>> 
>> That's really besides the point. ABI changes are made deliberately
>> and ABIs must be well-documented for anyone to adhere to it. You
>> can't post hoc wave your hand and say that at some unspecified time
>> in the past the ABI changed: at what precise time does "supported
>> by hardware mean" and how does that tie to a major FreeBSD version?
>> 
>> Point in case: the JDK 1.4.x still works on FreeBSD 9.x (i386), so
>> the ABI really hasn't changed at all in that respect.
> 
> I think if you booted a FreeBSD 9.x i386 PAE kernel you'd find that the
> jdk did not work.  That will be true for any i386 PAE kernel back to
> when PG_NX support was introduced.

That's bad.

-- 
Marcel Moolenaar
marcel@xcllnt.net



From owner-svn-src-all@FreeBSD.ORG  Thu Oct 13 22:33:04 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 3D5C71065672;
	Thu, 13 Oct 2011 22:33:04 +0000 (UTC)
	(envelope-from marcel@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 2C9108FC15;
	Thu, 13 Oct 2011 22:33:04 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9DMX4Nd035177;
	Thu, 13 Oct 2011 22:33:04 GMT (envelope-from marcel@svn.freebsd.org)
Received: (from marcel@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9DMX4aB035175;
	Thu, 13 Oct 2011 22:33:04 GMT (envelope-from marcel@svn.freebsd.org)
Message-Id: <201110132233.p9DMX4aB035175@svn.freebsd.org>
From: Marcel Moolenaar 
Date: Thu, 13 Oct 2011 22:33:04 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226353 - head/sys/compat/freebsd32
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 13 Oct 2011 22:33:04 -0000

Author: marcel
Date: Thu Oct 13 22:33:03 2011
New Revision: 226353
URL: http://svn.freebsd.org/changeset/base/226353

Log:
  Use PTRIN().

Modified:
  head/sys/compat/freebsd32/freebsd32_misc.c

Modified: head/sys/compat/freebsd32/freebsd32_misc.c
==============================================================================
--- head/sys/compat/freebsd32/freebsd32_misc.c	Thu Oct 13 21:41:54 2011	(r226352)
+++ head/sys/compat/freebsd32/freebsd32_misc.c	Thu Oct 13 22:33:03 2011	(r226353)
@@ -441,7 +441,7 @@ freebsd32_mprotect(struct thread *td, st
 {
 	struct mprotect_args ap;
 
-	ap.addr = (void *)(uintptr_t)uap->addr;
+	ap.addr = PTRIN(uap->addr);
 	ap.len = uap->len;
 	ap.prot = uap->prot;
 #if defined(__amd64__) || defined(__ia64__)

From owner-svn-src-all@FreeBSD.ORG  Thu Oct 13 23:12:32 2011
Return-Path: 
Delivered-To: svn-src-all@FreeBSD.ORG
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8F2571065670;
	Thu, 13 Oct 2011 23:12:32 +0000 (UTC) (envelope-from das@FreeBSD.ORG)
Received: from zim.MIT.EDU (ZIM.MIT.EDU [18.95.3.101])
	by mx1.freebsd.org (Postfix) with ESMTP id 3A28B8FC0A;
	Thu, 13 Oct 2011 23:12:32 +0000 (UTC)
Received: from zim.MIT.EDU (localhost [127.0.0.1])
	by zim.MIT.EDU (8.14.5/8.14.2) with ESMTP id p9DMoUtV075085;
	Thu, 13 Oct 2011 18:50:30 -0400 (EDT) (envelope-from das@FreeBSD.ORG)
Received: (from das@localhost)
	by zim.MIT.EDU (8.14.5/8.14.2/Submit) id p9DMoUfN075084;
	Thu, 13 Oct 2011 18:50:30 -0400 (EDT) (envelope-from das@FreeBSD.ORG)
Date: Thu, 13 Oct 2011 18:50:30 -0400
From: David Schultz 
To: Marcel Moolenaar 
Message-ID: <20111013225030.GA75054@zim.MIT.EDU>
Mail-Followup-To: Marcel Moolenaar ,
	John Baldwin ,
	Kostik Belousov ,
	Marcel Moolenaar , src-committers@freebsd.org,
	svn-src-all@freebsd.org, svn-src-head@freebsd.org
References: <201110131620.p9DGKAM2022926@svn.freebsd.org>
	<20111013190943.GM1511@deviant.kiev.zoral.com.ua>
	
	<201110131707.14466.jhb@freebsd.org>
	
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: 
Cc: Marcel Moolenaar , John Baldwin ,
	svn-src-all@FreeBSD.ORG, svn-src-head@FreeBSD.ORG,
	src-committers@FreeBSD.ORG, Kostik Belousov 
Subject: Re: svn commit: r226343 - head/sys/vm
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 13 Oct 2011 23:12:32 -0000

On Thu, Oct 13, 2011, Marcel Moolenaar wrote:
> 
> On Oct 13, 2011, at 2:07 PM, John Baldwin wrote:
> >> 
> >> That's really besides the point. ABI changes are made deliberately
> >> and ABIs must be well-documented for anyone to adhere to it. You
> >> can't post hoc wave your hand and say that at some unspecified time
> >> in the past the ABI changed: at what precise time does "supported
> >> by hardware mean" and how does that tie to a major FreeBSD version?
> >> 
> >> Point in case: the JDK 1.4.x still works on FreeBSD 9.x (i386), so
> >> the ABI really hasn't changed at all in that respect.
> > 
> > I think if you booted a FreeBSD 9.x i386 PAE kernel you'd find that the
> > jdk did not work.  That will be true for any i386 PAE kernel back to
> > when PG_NX support was introduced.
> 
> That's bad.

Recent binutils support a PT_GNU_HEAP flag in the ELF header that
controls whether heap allocations are executable by default.  In
Linux, the flag can be set using an ld option or the execstack(8)
command.  That seems like a better way to go than breaking old
JVMs or disabling the security feature.

From owner-svn-src-all@FreeBSD.ORG  Fri Oct 14 00:34:46 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 4128D106566B;
	Fri, 14 Oct 2011 00:34:46 +0000 (UTC)
	(envelope-from wblock@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 30F4E8FC0A;
	Fri, 14 Oct 2011 00:34:46 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9E0Ykjv038996;
	Fri, 14 Oct 2011 00:34:46 GMT (envelope-from wblock@svn.freebsd.org)
Received: (from wblock@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9E0Yks5038994;
	Fri, 14 Oct 2011 00:34:46 GMT (envelope-from wblock@svn.freebsd.org)
Message-Id: <201110140034.p9E0Yks5038994@svn.freebsd.org>
From: Warren Block 
Date: Fri, 14 Oct 2011 00:34:46 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226354 - head/share/misc
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 14 Oct 2011 00:34:46 -0000

Author: wblock (doc committer)
Date: Fri Oct 14 00:34:45 2011
New Revision: 226354
URL: http://svn.freebsd.org/changeset/base/226354

Log:
  Add mentors and myself to committers-doc.dot.
  
  Approved by:	gjb (mentor)

Modified:
  head/share/misc/committers-doc.dot

Modified: head/share/misc/committers-doc.dot
==============================================================================
--- head/share/misc/committers-doc.dot	Thu Oct 13 22:33:03 2011	(r226353)
+++ head/share/misc/committers-doc.dot	Fri Oct 14 00:34:45 2011	(r226354)
@@ -79,12 +79,14 @@ ryusuke [label="Ryusuke Suzuki\nryusuke@
 simon [label="Simon L. Nielsen\nsimon@FreeBSD.org\n2003/07/20"]
 taras [label="Taras Korenko\ntaras@FreeBSD.org\n2010/06/25"]
 trhodes [label="Tom Rhodes\ntrhodes@FreeBSD.org\n2002/03/25"]
+wblock [label="Warren Block\nwblock@FreeBSD.org\n2011/09/12"]
 
 # Here are the mentor/mentee relationships.
 # Group together all the mentees for a particular mentor.
 # Keep the list sorted by mentor login.
 
 bcr -> gavin
+bcr -> wblock
 
 blackend -> ale
 
@@ -105,6 +107,8 @@ gabor -> pgj
 gabor -> manolis
 gabor -> taras
 
+gjb -> wblock
+
 hrs -> ryusuke
 
 jesusr -> jcamou

From owner-svn-src-all@FreeBSD.ORG  Fri Oct 14 03:24:36 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 030B91065672;
	Fri, 14 Oct 2011 03:24:36 +0000 (UTC)
	(envelope-from adrian@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id E70318FC13;
	Fri, 14 Oct 2011 03:24:35 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9E3OZHr044527;
	Fri, 14 Oct 2011 03:24:35 GMT (envelope-from adrian@svn.freebsd.org)
Received: (from adrian@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9E3OZUo044525;
	Fri, 14 Oct 2011 03:24:35 GMT (envelope-from adrian@svn.freebsd.org)
Message-Id: <201110140324.p9E3OZUo044525@svn.freebsd.org>
From: Adrian Chadd 
Date: Fri, 14 Oct 2011 03:24:35 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226355 - head/sys/dev/ath
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 14 Oct 2011 03:24:36 -0000

Author: adrian
Date: Fri Oct 14 03:24:35 2011
New Revision: 226355
URL: http://svn.freebsd.org/changeset/base/226355

Log:
  ath_pci PCI setup fixes.
  
  * Break out the PCI setup override code into a new function.
  * Re-apply the PCI overrides on powersave resume. The retry timeout
    register isn't currently being saved/resumed by the PCI driver/bus
    code.

Modified:
  head/sys/dev/ath/if_ath_pci.c

Modified: head/sys/dev/ath/if_ath_pci.c
==============================================================================
--- head/sys/dev/ath/if_ath_pci.c	Fri Oct 14 00:34:45 2011	(r226354)
+++ head/sys/dev/ath/if_ath_pci.c	Fri Oct 14 03:24:35 2011	(r226355)
@@ -74,6 +74,16 @@ struct ath_pci_softc {
 #define	BS_BAR	0x10
 #define	PCIR_RETRY_TIMEOUT	0x41
 
+static void
+ath_pci_setup(device_t dev)
+{
+	/*
+	 * Disable retry timeout to keep PCI Tx retries from
+	 * interfering with C3 CPU state.
+	 */
+	pci_write_config(dev, PCIR_RETRY_TIMEOUT, 0, 1);
+}
+
 static int
 ath_pci_probe(device_t dev)
 {
@@ -103,10 +113,9 @@ ath_pci_attach(device_t dev)
 	pci_enable_busmaster(dev);
 
 	/*
-	 * Disable retry timeout to keep PCI Tx retries from
-	 * interfering with C3 CPU state.
+	 * Setup other PCI bus configuration parameters.
 	 */
-	pci_write_config(dev, PCIR_RETRY_TIMEOUT, 0, 1);
+	ath_pci_setup(dev);
 
 	/* 
 	 * Setup memory-mapping of PCI registers.
@@ -228,6 +237,11 @@ ath_pci_resume(device_t dev)
 {
 	struct ath_pci_softc *psc = device_get_softc(dev);
 
+	/*
+	 * Suspend/resume resets the PCI configuration space.
+	 */
+	ath_pci_setup(dev);
+
 	ath_resume(&psc->sc_sc);
 
 	return (0);

From owner-svn-src-all@FreeBSD.ORG  Fri Oct 14 07:24:23 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 6DF2C106566C;
	Fri, 14 Oct 2011 07:24:23 +0000 (UTC) (envelope-from ed@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 5E42F8FC1B;
	Fri, 14 Oct 2011 07:24:23 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9E7ONVR052072;
	Fri, 14 Oct 2011 07:24:23 GMT (envelope-from ed@svn.freebsd.org)
Received: (from ed@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9E7ONXO052069;
	Fri, 14 Oct 2011 07:24:23 GMT (envelope-from ed@svn.freebsd.org)
Message-Id: <201110140724.p9E7ONXO052069@svn.freebsd.org>
From: Ed Schouten 
Date: Fri, 14 Oct 2011 07:24:23 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226358 - head/usr.bin/finger
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 14 Oct 2011 07:24:23 -0000

Author: ed
Date: Fri Oct 14 07:24:23 2011
New Revision: 226358
URL: http://svn.freebsd.org/changeset/base/226358

Log:
  Build finger(1) with WARNS=6.

Modified:
  head/usr.bin/finger/Makefile
  head/usr.bin/finger/lprint.c

Modified: head/usr.bin/finger/Makefile
==============================================================================
--- head/usr.bin/finger/Makefile	Fri Oct 14 06:38:45 2011	(r226357)
+++ head/usr.bin/finger/Makefile	Fri Oct 14 07:24:23 2011	(r226358)
@@ -5,6 +5,4 @@ PROG=	finger
 SRCS=	finger.c lprint.c net.c sprint.c util.c
 MAN=	finger.1 finger.conf.5
 
-WARNS?=	2
-
 .include 

Modified: head/usr.bin/finger/lprint.c
==============================================================================
--- head/usr.bin/finger/lprint.c	Fri Oct 14 06:38:45 2011	(r226357)
+++ head/usr.bin/finger/lprint.c	Fri Oct 14 07:24:23 2011	(r226358)
@@ -306,7 +306,7 @@ show_text(const char *directory, const c
 		return(0);
 
 	/* If short enough, and no newlines, show it on a single line.*/
-	if (sb.st_size <= LINE_LEN - strlen(header) - 5) {
+	if (sb.st_size <= (off_t)(LINE_LEN - strlen(header) - 5)) {
 		nr = read(fd, tbuf, sizeof(tbuf));
 		if (nr <= 0) {
 			(void)close(fd);

From owner-svn-src-all@FreeBSD.ORG  Fri Oct 14 07:24:48 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C46E51065688;
	Fri, 14 Oct 2011 07:24:48 +0000 (UTC) (envelope-from ed@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id B4B6D8FC14;
	Fri, 14 Oct 2011 07:24:48 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9E7OmZ8052121;
	Fri, 14 Oct 2011 07:24:48 GMT (envelope-from ed@svn.freebsd.org)
Received: (from ed@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9E7OmMB052118;
	Fri, 14 Oct 2011 07:24:48 GMT (envelope-from ed@svn.freebsd.org)
Message-Id: <201110140724.p9E7OmMB052118@svn.freebsd.org>
From: Ed Schouten 
Date: Fri, 14 Oct 2011 07:24:48 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226359 - head/usr.bin/look
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 14 Oct 2011 07:24:48 -0000

Author: ed
Date: Fri Oct 14 07:24:48 2011
New Revision: 226359
URL: http://svn.freebsd.org/changeset/base/226359

Log:
  Build look(1) with WARNS=6.

Modified:
  head/usr.bin/look/Makefile
  head/usr.bin/look/look.c

Modified: head/usr.bin/look/Makefile
==============================================================================
--- head/usr.bin/look/Makefile	Fri Oct 14 07:24:23 2011	(r226358)
+++ head/usr.bin/look/Makefile	Fri Oct 14 07:24:48 2011	(r226359)
@@ -3,6 +3,4 @@
 
 PROG=	look
 
-WARNS?=	2
-
 .include 

Modified: head/usr.bin/look/look.c
==============================================================================
--- head/usr.bin/look/look.c	Fri Oct 14 07:24:23 2011	(r226358)
+++ head/usr.bin/look/look.c	Fri Oct 14 07:24:48 2011	(r226359)
@@ -134,7 +134,7 @@ main(int argc, char *argv[])
 	do {
 		if ((fd = open(file, O_RDONLY, 0)) < 0 || fstat(fd, &sb))
 			err(2, "%s", file);
-		if (sb.st_size > SIZE_T_MAX)
+		if (sb.st_size > (off_t)SIZE_T_MAX)
 			errx(2, "%s: %s", file, strerror(EFBIG));
 		if (sb.st_size == 0) {
 			close(fd);

From owner-svn-src-all@FreeBSD.ORG  Fri Oct 14 07:25:21 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 6BE4D106564A;
	Fri, 14 Oct 2011 07:25:21 +0000 (UTC) (envelope-from ed@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 42BBD8FC0A;
	Fri, 14 Oct 2011 07:25:21 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9E7PLcv052186;
	Fri, 14 Oct 2011 07:25:21 GMT (envelope-from ed@svn.freebsd.org)
Received: (from ed@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9E7PLbL052182;
	Fri, 14 Oct 2011 07:25:21 GMT (envelope-from ed@svn.freebsd.org)
Message-Id: <201110140725.p9E7PLbL052182@svn.freebsd.org>
From: Ed Schouten 
Date: Fri, 14 Oct 2011 07:25:21 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226360 - head/usr.bin/tr
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 14 Oct 2011 07:25:21 -0000

Author: ed
Date: Fri Oct 14 07:25:20 2011
New Revision: 226360
URL: http://svn.freebsd.org/changeset/base/226360

Log:
  Build tr(1) with WARNS=6.

Modified:
  head/usr.bin/tr/Makefile
  head/usr.bin/tr/cset.c
  head/usr.bin/tr/str.c

Modified: head/usr.bin/tr/Makefile
==============================================================================
--- head/usr.bin/tr/Makefile	Fri Oct 14 07:24:48 2011	(r226359)
+++ head/usr.bin/tr/Makefile	Fri Oct 14 07:25:20 2011	(r226360)
@@ -4,6 +4,4 @@
 PROG=	tr
 SRCS=	cmap.c cset.c str.c tr.c
 
-WARNS?=	1
-
 .include 

Modified: head/usr.bin/tr/cset.c
==============================================================================
--- head/usr.bin/tr/cset.c	Fri Oct 14 07:24:48 2011	(r226359)
+++ head/usr.bin/tr/cset.c	Fri Oct 14 07:25:20 2011	(r226360)
@@ -153,11 +153,11 @@ cset_in_hard(struct cset *cs, wchar_t ch
 	struct csclass *csc;
 
 	for (csc = cs->cs_classes; csc != NULL; csc = csc->csc_next)
-		if (csc->csc_invert ^ iswctype(ch, csc->csc_type) != 0)
+		if ((csc->csc_invert ^ iswctype(ch, csc->csc_type)) != 0)
 			return (cs->cs_invert ^ true);
 	if (cs->cs_root != NULL) {
 		cs->cs_root = cset_splay(cs->cs_root, ch);
-		return (cs->cs_invert ^ cset_rangecmp(cs->cs_root, ch) == 0);
+		return ((cs->cs_invert ^ cset_rangecmp(cs->cs_root, ch)) == 0);
 	}
 	return (cs->cs_invert ^ false);
 }

Modified: head/usr.bin/tr/str.c
==============================================================================
--- head/usr.bin/tr/str.c	Fri Oct 14 07:24:48 2011	(r226359)
+++ head/usr.bin/tr/str.c	Fri Oct 14 07:25:20 2011	(r226360)
@@ -57,8 +57,7 @@ static int      genrange(STR *, int);
 static void	genseq(STR *);
 
 wint_t
-next(s)
-	STR *s;
+next(STR *s)
 {
 	int is_octal;
 	wint_t ch;
@@ -135,8 +134,7 @@ next(s)
 }
 
 static int
-bracket(s)
-	STR *s;
+bracket(STR *s)
 {
 	char *p;
 
@@ -173,8 +171,7 @@ bracket(s)
 }
 
 static void
-genclass(s)
-	STR *s;
+genclass(STR *s)
 {
 
 	if ((s->cclass = wctype(s->str)) == 0)
@@ -190,8 +187,7 @@ genclass(s)
 }
 
 static void
-genequiv(s)
-	STR *s;
+genequiv(STR *s)
 {
 	int i, p, pri;
 	char src[2], dst[3];
@@ -295,8 +291,7 @@ genrange(STR *s, int was_octal)
 }
 
 static void
-genseq(s)
-	STR *s;
+genseq(STR *s)
 {
 	char *ep;
 	wchar_t wc;

From owner-svn-src-all@FreeBSD.ORG  Fri Oct 14 07:26:20 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 9FA9A1065686;
	Fri, 14 Oct 2011 07:26:20 +0000 (UTC) (envelope-from ed@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 8FB508FC18;
	Fri, 14 Oct 2011 07:26:20 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9E7QKpk052254;
	Fri, 14 Oct 2011 07:26:20 GMT (envelope-from ed@svn.freebsd.org)
Received: (from ed@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9E7QKjE052251;
	Fri, 14 Oct 2011 07:26:20 GMT (envelope-from ed@svn.freebsd.org)
Message-Id: <201110140726.p9E7QKjE052251@svn.freebsd.org>
From: Ed Schouten 
Date: Fri, 14 Oct 2011 07:26:20 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226361 - in head/usr.bin: last leave
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 14 Oct 2011 07:26:20 -0000

Author: ed
Date: Fri Oct 14 07:26:20 2011
New Revision: 226361
URL: http://svn.freebsd.org/changeset/base/226361

Log:
  Build last(1) and leave(1) with WARNS=6.
  
  These ports were only built with WARNS=1, because they use certain
  format extensions. We can use NO_WFORMAT for that instead.

Modified:
  head/usr.bin/last/Makefile
  head/usr.bin/leave/Makefile

Modified: head/usr.bin/last/Makefile
==============================================================================
--- head/usr.bin/last/Makefile	Fri Oct 14 07:25:20 2011	(r226360)
+++ head/usr.bin/last/Makefile	Fri Oct 14 07:26:20 2011	(r226361)
@@ -3,6 +3,6 @@
 
 PROG=	last
 
-WARNS?=	1
+NO_WFORMAT=
 
 .include 

Modified: head/usr.bin/leave/Makefile
==============================================================================
--- head/usr.bin/leave/Makefile	Fri Oct 14 07:25:20 2011	(r226360)
+++ head/usr.bin/leave/Makefile	Fri Oct 14 07:26:20 2011	(r226361)
@@ -3,6 +3,6 @@
 
 PROG=	leave
 
-WARNS?=	1
+NO_WFORMAT=
 
 .include 

From owner-svn-src-all@FreeBSD.ORG  Fri Oct 14 07:28:40 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5AFF1106564A;
	Fri, 14 Oct 2011 07:28:40 +0000 (UTC) (envelope-from ed@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 31BF88FC14;
	Fri, 14 Oct 2011 07:28:40 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9E7SeAd052357;
	Fri, 14 Oct 2011 07:28:40 GMT (envelope-from ed@svn.freebsd.org)
Received: (from ed@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9E7SeoB052354;
	Fri, 14 Oct 2011 07:28:40 GMT (envelope-from ed@svn.freebsd.org)
Message-Id: <201110140728.p9E7SeoB052354@svn.freebsd.org>
From: Ed Schouten 
Date: Fri, 14 Oct 2011 07:28:40 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226362 - head/usr.bin/nl
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 14 Oct 2011 07:28:40 -0000

Author: ed
Date: Fri Oct 14 07:28:39 2011
New Revision: 226362
URL: http://svn.freebsd.org/changeset/base/226362

Log:
  Make nl(1) build with WARNS=6.
  
  Obtained from:	NetBSD

Modified:
  head/usr.bin/nl/Makefile
  head/usr.bin/nl/nl.c

Modified: head/usr.bin/nl/Makefile
==============================================================================
--- head/usr.bin/nl/Makefile	Fri Oct 14 07:26:20 2011	(r226361)
+++ head/usr.bin/nl/Makefile	Fri Oct 14 07:28:39 2011	(r226362)
@@ -2,6 +2,4 @@
 
 PROG=	nl
 
-WARNS?=	2
-
 .include 

Modified: head/usr.bin/nl/nl.c
==============================================================================
--- head/usr.bin/nl/nl.c	Fri Oct 14 07:26:20 2011	(r226361)
+++ head/usr.bin/nl/nl.c	Fri Oct 14 07:28:39 2011	(r226362)
@@ -73,9 +73,9 @@ struct numbering_property {
 #define NP_LAST		HEADER
 
 static struct numbering_property numbering_properties[NP_LAST + 1] = {
-	{ "footer",	number_none	},
-	{ "body",	number_nonempty	},
-	{ "header",	number_none	}
+	{ .name = "footer", .type = number_none },
+	{ .name = "body", .type = number_nonempty },
+	{ .name = "header", .type = number_none }
 };
 
 #define max(a, b)	((a) > (b) ? (a) : (b))
@@ -128,9 +128,7 @@ static int width = 6;
 
 
 int
-main(argc, argv)
-	int argc;
-	char *argv[];
+main(int argc, char *argv[])
 {
 	int c;
 	long val;
@@ -258,7 +256,7 @@ main(argc, argv)
 	delimlen = delim1len + delim2len;
 
 	/* Allocate a buffer suitable for preformatting line number. */
-	intbuffersize = max(INT_STRLEN_MAXIMUM, width) + 1;	/* NUL */
+	intbuffersize = max((int)INT_STRLEN_MAXIMUM, width) + 1; /* NUL */
 	if ((intbuffer = malloc(intbuffersize)) == NULL)
 		err(EXIT_FAILURE, "cannot allocate preformatting buffer");
 
@@ -270,7 +268,7 @@ main(argc, argv)
 }
 
 static void
-filter()
+filter(void)
 {
 	char *buffer;
 	size_t buffersize;
@@ -359,9 +357,7 @@ nextline:
  */
 
 static void
-parse_numbering(argstr, section)
-	const char *argstr;
-	int section;
+parse_numbering(const char *argstr, int section)
 {
 	int error;
 	char errorbuf[NL_TEXTMAX];
@@ -403,7 +399,7 @@ parse_numbering(argstr, section)
 }
 
 static void
-usage()
+usage(void)
 {
 
 	(void)fprintf(stderr,

From owner-svn-src-all@FreeBSD.ORG  Fri Oct 14 10:21:33 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 922E8106564A;
	Fri, 14 Oct 2011 10:21:33 +0000 (UTC) (envelope-from jilles@stack.nl)
Received: from mx1.stack.nl (relay02.stack.nl [IPv6:2001:610:1108:5010::104])
	by mx1.freebsd.org (Postfix) with ESMTP id 2DE728FC1D;
	Fri, 14 Oct 2011 10:21:33 +0000 (UTC)
Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131])
	by mx1.stack.nl (Postfix) with ESMTP id F138F358C2C;
	Fri, 14 Oct 2011 12:21:31 +0200 (CEST)
Received: by snail.stack.nl (Postfix, from userid 1677)
	id D8B3F28468; Fri, 14 Oct 2011 12:21:31 +0200 (CEST)
Date: Fri, 14 Oct 2011 12:21:31 +0200
From: Jilles Tjoelker 
To: Ed Schouten 
Message-ID: <20111014102131.GA31718@stack.nl>
References: <201110140725.p9E7PLbL052182@svn.freebsd.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <201110140725.p9E7PLbL052182@svn.freebsd.org>
User-Agent: Mutt/1.5.21 (2010-09-15)
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r226360 - head/usr.bin/tr
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 14 Oct 2011 10:21:33 -0000

On Fri, Oct 14, 2011 at 07:25:21AM +0000, Ed Schouten wrote:
> Author: ed
> Date: Fri Oct 14 07:25:20 2011
> New Revision: 226360
> URL: http://svn.freebsd.org/changeset/base/226360

> Log:
>   Build tr(1) with WARNS=6.

> Modified:
>   head/usr.bin/tr/Makefile
>   head/usr.bin/tr/cset.c
>   head/usr.bin/tr/str.c

> Modified: head/usr.bin/tr/cset.c
> ==============================================================================
> --- head/usr.bin/tr/cset.c	Fri Oct 14 07:24:48 2011	(r226359)
> +++ head/usr.bin/tr/cset.c	Fri Oct 14 07:25:20 2011	(r226360)
> @@ -153,11 +153,11 @@ cset_in_hard(struct cset *cs, wchar_t ch
>  	struct csclass *csc;
>  
>  	for (csc = cs->cs_classes; csc != NULL; csc = csc->csc_next)
> -		if (csc->csc_invert ^ iswctype(ch, csc->csc_type) != 0)
> +		if ((csc->csc_invert ^ iswctype(ch, csc->csc_type)) != 0)
>  			return (cs->cs_invert ^ true);
>  	if (cs->cs_root != NULL) {
>  		cs->cs_root = cset_splay(cs->cs_root, ch);
> -		return (cs->cs_invert ^ cset_rangecmp(cs->cs_root, ch) == 0);
> +		return ((cs->cs_invert ^ cset_rangecmp(cs->cs_root, ch)) == 0);
>  	}
>  	return (cs->cs_invert ^ false);
>  }

These two changes are wrong. Contrary to what one might expect, the !=
and == operators bind more strongly than the ^ operator, and the
original code depends on that.

-- 
Jilles Tjoelker

From owner-svn-src-all@FreeBSD.ORG  Fri Oct 14 10:43:56 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5E3F41065672;
	Fri, 14 Oct 2011 10:43:56 +0000 (UTC) (envelope-from ed@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 3E26E8FC15;
	Fri, 14 Oct 2011 10:43:56 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9EAhuaQ059856;
	Fri, 14 Oct 2011 10:43:56 GMT (envelope-from ed@svn.freebsd.org)
Received: (from ed@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9EAhuZu059854;
	Fri, 14 Oct 2011 10:43:56 GMT (envelope-from ed@svn.freebsd.org)
Message-Id: <201110141043.p9EAhuZu059854@svn.freebsd.org>
From: Ed Schouten 
Date: Fri, 14 Oct 2011 10:43:56 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226363 - head/usr.bin/tr
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 14 Oct 2011 10:43:56 -0000

Author: ed
Date: Fri Oct 14 10:43:55 2011
New Revision: 226363
URL: http://svn.freebsd.org/changeset/base/226363

Log:
  Put parentheses in the right place.
  
  Noted by:	jilles@
  Broken by:	me. :-(

Modified:
  head/usr.bin/tr/cset.c

Modified: head/usr.bin/tr/cset.c
==============================================================================
--- head/usr.bin/tr/cset.c	Fri Oct 14 07:28:39 2011	(r226362)
+++ head/usr.bin/tr/cset.c	Fri Oct 14 10:43:55 2011	(r226363)
@@ -153,11 +153,11 @@ cset_in_hard(struct cset *cs, wchar_t ch
 	struct csclass *csc;
 
 	for (csc = cs->cs_classes; csc != NULL; csc = csc->csc_next)
-		if ((csc->csc_invert ^ iswctype(ch, csc->csc_type)) != 0)
+		if (csc->csc_invert ^ (iswctype(ch, csc->csc_type) != 0))
 			return (cs->cs_invert ^ true);
 	if (cs->cs_root != NULL) {
 		cs->cs_root = cset_splay(cs->cs_root, ch);
-		return ((cs->cs_invert ^ cset_rangecmp(cs->cs_root, ch)) == 0);
+		return (cs->cs_invert ^ (cset_rangecmp(cs->cs_root, ch) == 0));
 	}
 	return (cs->cs_invert ^ false);
 }

From owner-svn-src-all@FreeBSD.ORG  Fri Oct 14 11:45:02 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 9C9F4106567E;
	Fri, 14 Oct 2011 11:45:02 +0000 (UTC) (envelope-from jhb@freebsd.org)
Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42])
	by mx1.freebsd.org (Postfix) with ESMTP id 746B08FC0A;
	Fri, 14 Oct 2011 11:45:02 +0000 (UTC)
Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net
	[66.111.2.69])
	by cyrus.watson.org (Postfix) with ESMTPSA id 2652446B42;
	Fri, 14 Oct 2011 07:45:02 -0400 (EDT)
Received: from jhbbsd.localnet (unknown [209.249.190.124])
	by bigwig.baldwin.cx (Postfix) with ESMTPSA id BDDB38A037;
	Fri, 14 Oct 2011 07:45:01 -0400 (EDT)
From: John Baldwin 
To: Adrian Chadd 
Date: Fri, 14 Oct 2011 07:43:30 -0400
User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110617; KDE/4.5.5; amd64; ; )
References: <201110140324.p9E3OZUo044525@svn.freebsd.org>
In-Reply-To: <201110140324.p9E3OZUo044525@svn.freebsd.org>
MIME-Version: 1.0
Content-Type: Text/Plain;
  charset="utf-8"
Content-Transfer-Encoding: 7bit
Message-Id: <201110140743.31256.jhb@freebsd.org>
X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6
	(bigwig.baldwin.cx); Fri, 14 Oct 2011 07:45:01 -0400 (EDT)
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r226355 - head/sys/dev/ath
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 14 Oct 2011 11:45:02 -0000

On Thursday, October 13, 2011 11:24:35 pm Adrian Chadd wrote:
> Author: adrian
> Date: Fri Oct 14 03:24:35 2011
> New Revision: 226355
> URL: http://svn.freebsd.org/changeset/base/226355
> 
> Log:
>   ath_pci PCI setup fixes.
>   
>   * Break out the PCI setup override code into a new function.
>   * Re-apply the PCI overrides on powersave resume. The retry timeout
>     register isn't currently being saved/resumed by the PCI driver/bus
>     code.

It isn't a standard config register.  (Device-specific registers start at 
0x41).  Drivers have always been responsible for saving and restoring device-
specific registers:

if_ath_pci.c:#define    PCIR_RETRY_TIMEOUT      0x41

-- 
John Baldwin

From owner-svn-src-all@FreeBSD.ORG  Fri Oct 14 11:46:46 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 80138106566B;
	Fri, 14 Oct 2011 11:46:46 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 6FC798FC1B;
	Fri, 14 Oct 2011 11:46:46 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9EBkklv061860;
	Fri, 14 Oct 2011 11:46:46 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9EBkkDW061857;
	Fri, 14 Oct 2011 11:46:46 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201110141146.p9EBkkDW061857@svn.freebsd.org>
From: John Baldwin 
Date: Fri, 14 Oct 2011 11:46:46 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226364 - head/sys/compat/freebsd32
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 14 Oct 2011 11:46:46 -0000

Author: jhb
Date: Fri Oct 14 11:46:46 2011
New Revision: 226364
URL: http://svn.freebsd.org/changeset/base/226364

Log:
  Use PAIR32TO64() for the offset and length parameters to
  freebsd32_posix_fallocate() to properly handle big-endian platforms.
  
  Reviewed by:	mdf
  MFC after:	1 week

Modified:
  head/sys/compat/freebsd32/freebsd32_misc.c
  head/sys/compat/freebsd32/syscalls.master

Modified: head/sys/compat/freebsd32/freebsd32_misc.c
==============================================================================
--- head/sys/compat/freebsd32/freebsd32_misc.c	Fri Oct 14 10:43:55 2011	(r226363)
+++ head/sys/compat/freebsd32/freebsd32_misc.c	Fri Oct 14 11:46:46 2011	(r226364)
@@ -2831,7 +2831,7 @@ freebsd32_posix_fallocate(struct thread 
 	struct posix_fallocate_args ap;
 
 	ap.fd = uap->fd;
-	ap.offset = (uap->offsetlo | ((off_t)uap->offsethi << 32));
-	ap.len = (uap->lenlo | ((off_t)uap->lenhi << 32));
+	ap.offset = PAIR32TO64(off_t, uap->offset);
+	ap.len = PAIR32TO64(off_t, uap->len);
 	return (sys_posix_fallocate(td, &ap));
 }

Modified: head/sys/compat/freebsd32/syscalls.master
==============================================================================
--- head/sys/compat/freebsd32/syscalls.master	Fri Oct 14 10:43:55 2011	(r226363)
+++ head/sys/compat/freebsd32/syscalls.master	Fri Oct 14 11:46:46 2011	(r226364)
@@ -989,6 +989,6 @@
 				    size_t inbuflen, void *outbufp, \
 				    size_t outbuflen); }
 530	AUE_NULL	STD	{ int freebsd32_posix_fallocate(int fd,\
-				     uint32_t offsetlo, uint32_t offsethi,\
-				     uint32_t lenlo, uint32_t lenhi); }
+				    uint32_t offset1, uint32_t offset2,\
+				    uint32_t len1, uint32_t len2); }
 531	AUE_NULL	UNIMPL	posix_fadvise

From owner-svn-src-all@FreeBSD.ORG  Fri Oct 14 11:47:15 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 37DB11065670;
	Fri, 14 Oct 2011 11:47:15 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 1DE1F8FC1A;
	Fri, 14 Oct 2011 11:47:15 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9EBlFJp061917;
	Fri, 14 Oct 2011 11:47:15 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9EBlE9P061911;
	Fri, 14 Oct 2011 11:47:14 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201110141147.p9EBlE9P061911@svn.freebsd.org>
From: John Baldwin 
Date: Fri, 14 Oct 2011 11:47:14 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226365 - head/sys/compat/freebsd32
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 14 Oct 2011 11:47:15 -0000

Author: jhb
Date: Fri Oct 14 11:47:14 2011
New Revision: 226365
URL: http://svn.freebsd.org/changeset/base/226365

Log:
  Regen.

Modified:
  head/sys/compat/freebsd32/freebsd32_proto.h
  head/sys/compat/freebsd32/freebsd32_syscall.h
  head/sys/compat/freebsd32/freebsd32_syscalls.c
  head/sys/compat/freebsd32/freebsd32_sysent.c
  head/sys/compat/freebsd32/freebsd32_systrace_args.c

Modified: head/sys/compat/freebsd32/freebsd32_proto.h
==============================================================================
--- head/sys/compat/freebsd32/freebsd32_proto.h	Fri Oct 14 11:46:46 2011	(r226364)
+++ head/sys/compat/freebsd32/freebsd32_proto.h	Fri Oct 14 11:47:14 2011	(r226365)
@@ -3,7 +3,7 @@
  *
  * DO NOT EDIT-- this file is automatically generated.
  * $FreeBSD$
- * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 226348 2011-10-13 18:21:11Z marcel 
+ * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 226364 2011-10-14 11:46:46Z jhb 
  */
 
 #ifndef _FREEBSD32_SYSPROTO_H_
@@ -575,10 +575,10 @@ struct freebsd32_pselect_args {
 };
 struct freebsd32_posix_fallocate_args {
 	char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
-	char offsetlo_l_[PADL_(uint32_t)]; uint32_t offsetlo; char offsetlo_r_[PADR_(uint32_t)];
-	char offsethi_l_[PADL_(uint32_t)]; uint32_t offsethi; char offsethi_r_[PADR_(uint32_t)];
-	char lenlo_l_[PADL_(uint32_t)]; uint32_t lenlo; char lenlo_r_[PADR_(uint32_t)];
-	char lenhi_l_[PADL_(uint32_t)]; uint32_t lenhi; char lenhi_r_[PADR_(uint32_t)];
+	char offset1_l_[PADL_(uint32_t)]; uint32_t offset1; char offset1_r_[PADR_(uint32_t)];
+	char offset2_l_[PADL_(uint32_t)]; uint32_t offset2; char offset2_r_[PADR_(uint32_t)];
+	char len1_l_[PADL_(uint32_t)]; uint32_t len1; char len1_r_[PADR_(uint32_t)];
+	char len2_l_[PADL_(uint32_t)]; uint32_t len2; char len2_r_[PADR_(uint32_t)];
 };
 #if !defined(PAD64_REQUIRED) && defined(__powerpc__)
 #define PAD64_REQUIRED

Modified: head/sys/compat/freebsd32/freebsd32_syscall.h
==============================================================================
--- head/sys/compat/freebsd32/freebsd32_syscall.h	Fri Oct 14 11:46:46 2011	(r226364)
+++ head/sys/compat/freebsd32/freebsd32_syscall.h	Fri Oct 14 11:47:14 2011	(r226365)
@@ -3,7 +3,7 @@
  *
  * DO NOT EDIT-- this file is automatically generated.
  * $FreeBSD$
- * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 226348 2011-10-13 18:21:11Z marcel 
+ * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 226364 2011-10-14 11:46:46Z jhb 
  */
 
 #define	FREEBSD32_SYS_syscall	0

Modified: head/sys/compat/freebsd32/freebsd32_syscalls.c
==============================================================================
--- head/sys/compat/freebsd32/freebsd32_syscalls.c	Fri Oct 14 11:46:46 2011	(r226364)
+++ head/sys/compat/freebsd32/freebsd32_syscalls.c	Fri Oct 14 11:47:14 2011	(r226365)
@@ -3,7 +3,7 @@
  *
  * DO NOT EDIT-- this file is automatically generated.
  * $FreeBSD$
- * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 226348 2011-10-13 18:21:11Z marcel 
+ * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 226364 2011-10-14 11:46:46Z jhb 
  */
 
 const char *freebsd32_syscallnames[] = {

Modified: head/sys/compat/freebsd32/freebsd32_sysent.c
==============================================================================
--- head/sys/compat/freebsd32/freebsd32_sysent.c	Fri Oct 14 11:46:46 2011	(r226364)
+++ head/sys/compat/freebsd32/freebsd32_sysent.c	Fri Oct 14 11:47:14 2011	(r226365)
@@ -3,7 +3,7 @@
  *
  * DO NOT EDIT-- this file is automatically generated.
  * $FreeBSD$
- * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 226348 2011-10-13 18:21:11Z marcel 
+ * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 226364 2011-10-14 11:46:46Z jhb 
  */
 
 #include "opt_compat.h"

Modified: head/sys/compat/freebsd32/freebsd32_systrace_args.c
==============================================================================
--- head/sys/compat/freebsd32/freebsd32_systrace_args.c	Fri Oct 14 11:46:46 2011	(r226364)
+++ head/sys/compat/freebsd32/freebsd32_systrace_args.c	Fri Oct 14 11:47:14 2011	(r226365)
@@ -3027,10 +3027,10 @@ systrace_args(int sysnum, void *params, 
 	case 530: {
 		struct freebsd32_posix_fallocate_args *p = params;
 		iarg[0] = p->fd; /* int */
-		uarg[1] = p->offsetlo; /* uint32_t */
-		uarg[2] = p->offsethi; /* uint32_t */
-		uarg[3] = p->lenlo; /* uint32_t */
-		uarg[4] = p->lenhi; /* uint32_t */
+		uarg[1] = p->offset1; /* uint32_t */
+		uarg[2] = p->offset2; /* uint32_t */
+		uarg[3] = p->len1; /* uint32_t */
+		uarg[4] = p->len2; /* uint32_t */
 		*n_args = 5;
 		break;
 	}

From owner-svn-src-all@FreeBSD.ORG  Fri Oct 14 11:48:32 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B30AB106566C;
	Fri, 14 Oct 2011 11:48:32 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id A2C118FC0C;
	Fri, 14 Oct 2011 11:48:32 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9EBmW5o061993;
	Fri, 14 Oct 2011 11:48:32 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9EBmWMN061991;
	Fri, 14 Oct 2011 11:48:32 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201110141148.p9EBmWMN061991@svn.freebsd.org>
From: John Baldwin 
Date: Fri, 14 Oct 2011 11:48:32 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226366 - head/sys/vm
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 14 Oct 2011 11:48:32 -0000

Author: jhb
Date: Fri Oct 14 11:48:32 2011
New Revision: 226366
URL: http://svn.freebsd.org/changeset/base/226366

Log:
  Fix a typo in a comment.

Modified:
  head/sys/vm/vnode_pager.c

Modified: head/sys/vm/vnode_pager.c
==============================================================================
--- head/sys/vm/vnode_pager.c	Fri Oct 14 11:47:14 2011	(r226365)
+++ head/sys/vm/vnode_pager.c	Fri Oct 14 11:48:32 2011	(r226366)
@@ -1150,7 +1150,7 @@ vnode_pager_generic_putpages(struct vnod
 	VM_OBJECT_UNLOCK(object);
 
 	/*
-	 * pageouts are already clustered, use IO_ASYNC t o force a bawrite()
+	 * pageouts are already clustered, use IO_ASYNC to force a bawrite()
 	 * rather then a bdwrite() to prevent paging I/O from saturating 
 	 * the buffer cache.  Dummy-up the sequential heuristic to cause
 	 * large ranges to cluster.  If neither IO_SYNC or IO_ASYNC is set,

From owner-svn-src-all@FreeBSD.ORG  Fri Oct 14 12:39:50 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C20F31065670;
	Fri, 14 Oct 2011 12:39:50 +0000 (UTC)
	(envelope-from adrian.chadd@gmail.com)
Received: from mail-yw0-f54.google.com (mail-yw0-f54.google.com
	[209.85.213.54])
	by mx1.freebsd.org (Postfix) with ESMTP id 4ACF68FC16;
	Fri, 14 Oct 2011 12:39:49 +0000 (UTC)
Received: by ywp17 with SMTP id 17so2873973ywp.13
	for ; Fri, 14 Oct 2011 05:39:49 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=mime-version:sender:in-reply-to:references:date
	:x-google-sender-auth:message-id:subject:from:to:cc:content-type
	:content-transfer-encoding;
	bh=YgO9XgpU5LpsShoc83FDPCe/hLh22yozetjfX7ORxb8=;
	b=FO9dRhzynaB8ffHGd4Lng25d6GZ/EGiWNFdwnKsS7fQjkcfQB7iGbg4znK3z09MHET
	lSdvFvgLzT3yxj2EH4SYfydFPQDZpso0mRCJe+ppOHLWXv6KZ8eKl3wL4MpZXWUeBe1Y
	qFuBCgF2hZHkSkr8S43bnu1EKVShfI7O13EMU=
MIME-Version: 1.0
Received: by 10.236.197.69 with SMTP id s45mr11281236yhn.54.1318595989493;
	Fri, 14 Oct 2011 05:39:49 -0700 (PDT)
Sender: adrian.chadd@gmail.com
Received: by 10.236.109.167 with HTTP; Fri, 14 Oct 2011 05:39:49 -0700 (PDT)
In-Reply-To: <201110140743.31256.jhb@freebsd.org>
References: <201110140324.p9E3OZUo044525@svn.freebsd.org>
	<201110140743.31256.jhb@freebsd.org>
Date: Fri, 14 Oct 2011 20:39:49 +0800
X-Google-Sender-Auth: 4TMfOeGQYEuoQkf5iDj-x1Dtf7M
Message-ID: 
From: Adrian Chadd 
To: John Baldwin 
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r226355 - head/sys/dev/ath
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 14 Oct 2011 12:39:50 -0000

On 14 October 2011 19:43, John Baldwin  wrote:

> It isn't a standard config register. =A0(Device-specific registers start =
at
> 0x41). =A0Drivers have always been responsible for saving and restoring d=
evice-
> specific registers:
>
> if_ath_pci.c:#define =A0 =A0PCIR_RETRY_TIMEOUT =A0 =A0 =A00x41

Good to know, thanks.

Time to see if I can dig up the other registers. It seems there are
some latency register changes which our driver isn't doing.


Adrian

From owner-svn-src-all@FreeBSD.ORG  Fri Oct 14 18:24:48 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id DB96E1065673;
	Fri, 14 Oct 2011 18:24:48 +0000 (UTC)
	(envelope-from kostikbel@gmail.com)
Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200])
	by mx1.freebsd.org (Postfix) with ESMTP id 288E88FC0C;
	Fri, 14 Oct 2011 18:24:47 +0000 (UTC)
Received: from alf.home (alf.kiev.zoral.com.ua [10.1.1.177])
	by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id p9EIOho9043313
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Fri, 14 Oct 2011 21:24:43 +0300 (EEST)
	(envelope-from kostikbel@gmail.com)
Received: from alf.home (kostik@localhost [127.0.0.1])
	by alf.home (8.14.5/8.14.5) with ESMTP id p9EIOhi3039738;
	Fri, 14 Oct 2011 21:24:43 +0300 (EEST)
	(envelope-from kostikbel@gmail.com)
Received: (from kostik@localhost)
	by alf.home (8.14.5/8.14.5/Submit) id p9EIOhoj039737;
	Fri, 14 Oct 2011 21:24:43 +0300 (EEST)
	(envelope-from kostikbel@gmail.com)
X-Authentication-Warning: alf.home: kostik set sender to kostikbel@gmail.com
	using -f
Date: Fri, 14 Oct 2011 21:24:43 +0300
From: Kostik Belousov 
To: Marcel Moolenaar 
Message-ID: <20111014182443.GP1511@deviant.kiev.zoral.com.ua>
References: <201110131620.p9DGKAM2022926@svn.freebsd.org>
	<20111013190943.GM1511@deviant.kiev.zoral.com.ua>
	
	<201110131707.14466.jhb@freebsd.org>
	
	<20111013225030.GA75054@zim.MIT.EDU>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature"; boundary="Og0BsOHPNghju9eE"
Content-Disposition: inline
In-Reply-To: <20111013225030.GA75054@zim.MIT.EDU>
User-Agent: Mutt/1.4.2.3i
X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua
X-Virus-Status: Clean
X-Spam-Status: No, score=-3.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,
	DNS_FROM_OPENWHOIS autolearn=no version=3.2.5
X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on
	skuns.kiev.zoral.com.ua
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	Marcel Moolenaar ,
	src-committers@freebsd.org, John Baldwin 
Subject: Re: svn commit: r226343 - head/sys/vm
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 14 Oct 2011 18:24:49 -0000


--Og0BsOHPNghju9eE
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Thu, Oct 13, 2011 at 06:50:30PM -0400, David Schultz wrote:
> On Thu, Oct 13, 2011, Marcel Moolenaar wrote:
> >=20
> > On Oct 13, 2011, at 2:07 PM, John Baldwin wrote:
> > >>=20
> > >> That's really besides the point. ABI changes are made deliberately
> > >> and ABIs must be well-documented for anyone to adhere to it. You
> > >> can't post hoc wave your hand and say that at some unspecified time
> > >> in the past the ABI changed: at what precise time does "supported
> > >> by hardware mean" and how does that tie to a major FreeBSD version?
> > >>=20
> > >> Point in case: the JDK 1.4.x still works on FreeBSD 9.x (i386), so
> > >> the ABI really hasn't changed at all in that respect.
> > >=20
> > > I think if you booted a FreeBSD 9.x i386 PAE kernel you'd find that t=
he
> > > jdk did not work.  That will be true for any i386 PAE kernel back to
> > > when PG_NX support was introduced.
> >=20
> > That's bad.
After more thought about the issue, I do not agree with you.
Elf specification says about the PF_R flag that only read permission
for the memory image of the segment is required, but read and execute
is allowed.

In other words, it is a bug in the old jre, which is further confirmed
by the fact that later jres run with non-executable head.

>=20
> Recent binutils support a PT_GNU_HEAP flag in the ELF header that
> controls whether heap allocations are executable by default.  In
> Linux, the flag can be set using an ld option or the execstack(8)
> command.  That seems like a better way to go than breaking old
> JVMs or disabling the security feature.

No, recent binutils do not support PT_GNU_HEAD. git grep -e PT_GNU_HEAD
on the up to date checkout of binutils head gives zero matches. There are
indeed PT_GNU_HEAP patches floating around from some hardening projects.

There is indeed PT_GNU_STACK, which we do support.

I want to commit the following refinement:

diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/f=
reebsd32_misc.c
index 6638ec8..fc2932b 100644
--- a/sys/compat/freebsd32/freebsd32_misc.c
+++ b/sys/compat/freebsd32/freebsd32_misc.c
@@ -445,7 +445,7 @@ freebsd32_mprotect(struct thread *td, struct freebsd32_=
mprotect_args *uap)
 	ap.len =3D uap->len;
 	ap.prot =3D uap->prot;
 #if defined(__amd64__) || defined(__ia64__)
-	if (ap.prot & PROT_READ)
+	if (i386_read_exec && (ap.prot & PROT_READ) !=3D 0)
 		ap.prot |=3D PROT_EXEC;
 #endif
 	return (sys_mprotect(td, &ap));
@@ -536,7 +536,7 @@ freebsd32_mmap(struct thread *td, struct freebsd32_mmap=
_args *uap)
 #endif
=20
 #if defined(__amd64__) || defined(__ia64__)
-	if (prot & PROT_READ)
+	if (i386_read_exec && (prot & PROT_READ))
 		prot |=3D PROT_EXEC;
 #endif
=20
diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c
index 669c652..9970386 100644
--- a/sys/kern/imgact_elf.c
+++ b/sys/kern/imgact_elf.c
@@ -118,11 +118,24 @@ static int elf_legacy_coredump =3D 0;
 SYSCTL_INT(_debug, OID_AUTO, __elfN(legacy_coredump), CTLFLAG_RW,=20
     &elf_legacy_coredump, 0, "");
=20
-static int __elfN(nxstack) =3D 0;
+static int __elfN(nxstack) =3D
+#if defined(__amd64__) || defined(__powerpc__) /* both 64 and 32 bit */
+	1;
+#else
+	0;
+#endif
 SYSCTL_INT(__CONCAT(_kern_elf, __ELF_WORD_SIZE), OID_AUTO,
     nxstack, CTLFLAG_RW, &__elfN(nxstack), 0,
     __XSTRING(__CONCAT(ELF, __ELF_WORD_SIZE)) ": enable non-executable sta=
ck");
=20
+#if __ELF_WORD_SIZE =3D=3D 32
+#if defined(__amd64__) || defined(__ia64__)
+int i386_read_exec =3D 0;
+SYSCTL_INT(_kern_elf32, OID_AUTO, read_exec, CTLFLAG_RW, &i386_read_exec, =
0,
+    "enable execution from readable segments");
+#endif
+#endif
+
 static Elf_Brandinfo *elf_brand_list[MAX_BRANDS];
=20
 #define	trunc_page_ps(va, ps)	((va) & ~(ps - 1))
@@ -1666,7 +1679,7 @@ __elfN(trans_prot)(Elf_Word flags)
 		prot |=3D VM_PROT_READ;
 #if __ELF_WORD_SIZE =3D=3D 32
 #if defined(__amd64__) || defined(__ia64__)
-	if (flags & PF_R)
+	if (i386_read_exec && (flags & PF_R))
 		prot |=3D VM_PROT_EXECUTE;
 #endif
 #endif
diff --git a/sys/sys/sysent.h b/sys/sys/sysent.h
index 6a4b485..3694ceb 100644
--- a/sys/sys/sysent.h
+++ b/sys/sys/sysent.h
@@ -151,6 +152,10 @@ extern struct sysentvec null_sysvec;
 extern struct sysent sysent[];
 extern const char *syscallnames[];
=20
+#if defined(__amd64__) || defined(__ia64__)
+extern int i386_read_exec;
+#endif
+
 #define	NO_SYSCALL (-1)
=20
 struct module;
diff --git a/sys/vm/vm_unix.c b/sys/vm/vm_unix.c
index d4ea3b7..253ab77 100644
--- a/sys/vm/vm_unix.c
+++ b/sys/vm/vm_unix.c
@@ -141,7 +141,7 @@ sys_obreak(td, uap)
 		prot =3D VM_PROT_RW;
 #ifdef COMPAT_FREEBSD32
 #if defined(__amd64__) || defined(__ia64__)
-		if (SV_PROC_FLAG(td->td_proc, SV_ILP32))
+		if (i386_read_exec && SV_PROC_FLAG(td->td_proc, SV_ILP32))
 			prot |=3D VM_PROT_EXECUTE;
 #endif
 #endif

--Og0BsOHPNghju9eE
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (FreeBSD)

iEYEARECAAYFAk6YfmsACgkQC3+MBN1Mb4hwkACfR9VcAyVfyAMQrr1RxwUeXL72
hpYAoKjzaKTukty46YMvzOOhKjOhBPiu
=7Agc
-----END PGP SIGNATURE-----

--Og0BsOHPNghju9eE--

From owner-svn-src-all@FreeBSD.ORG  Fri Oct 14 18:30:48 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id DEC5A1065672;
	Fri, 14 Oct 2011 18:30:48 +0000 (UTC)
	(envelope-from yanegomi@gmail.com)
Received: from mail-qw0-f54.google.com (mail-qw0-f54.google.com
	[209.85.216.54])
	by mx1.freebsd.org (Postfix) with ESMTP id 32B7E8FC0A;
	Fri, 14 Oct 2011 18:30:47 +0000 (UTC)
Received: by qadz30 with SMTP id z30so1409338qad.13
	for ; Fri, 14 Oct 2011 11:30:47 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=mime-version:in-reply-to:references:date:message-id:subject:from:to
	:cc:content-type:content-transfer-encoding;
	bh=0rOHaZzTwDRdzAvHfzY9AqEn5VvdmCmpu4dGliQZme4=;
	b=Jje42MMRcW/FJy6Ya5im/Vle8/yqNZcJ8DZPIkeefxF+Ngcj87LE7tVReR68FVuGba
	jcQ1DOADQWbJRaJtyQQL1xNTqLu47QoIEjSoR0Da9AJC7mrgkB3e2nqewoR7gqq6lrA5
	AxTC6TjLQnhxcVqONF0ey/wSS/WKj6VcRE5Q0=
MIME-Version: 1.0
Received: by 10.224.176.143 with SMTP id be15mr8179686qab.33.1318617047372;
	Fri, 14 Oct 2011 11:30:47 -0700 (PDT)
Received: by 10.224.74.82 with HTTP; Fri, 14 Oct 2011 11:30:47 -0700 (PDT)
In-Reply-To: <20111014182443.GP1511@deviant.kiev.zoral.com.ua>
References: <201110131620.p9DGKAM2022926@svn.freebsd.org>
	<20111013190943.GM1511@deviant.kiev.zoral.com.ua>
	
	<201110131707.14466.jhb@freebsd.org>
	
	<20111013225030.GA75054@zim.MIT.EDU>
	<20111014182443.GP1511@deviant.kiev.zoral.com.ua>
Date: Fri, 14 Oct 2011 11:30:47 -0700
Message-ID: 
From: Garrett Cooper 
To: Kostik Belousov 
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: Marcel Moolenaar , John Baldwin ,
	svn-src-all@freebsd.org, Marcel Moolenaar ,
	src-committers@freebsd.org, svn-src-head@freebsd.org
Subject: Re: svn commit: r226343 - head/sys/vm
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 14 Oct 2011 18:30:49 -0000

On Fri, Oct 14, 2011 at 11:24 AM, Kostik Belousov  wro=
te:
> On Thu, Oct 13, 2011 at 06:50:30PM -0400, David Schultz wrote:
>> On Thu, Oct 13, 2011, Marcel Moolenaar wrote:
>> >
>> > On Oct 13, 2011, at 2:07 PM, John Baldwin wrote:
>> > >>
>> > >> That's really besides the point. ABI changes are made deliberately
>> > >> and ABIs must be well-documented for anyone to adhere to it. You
>> > >> can't post hoc wave your hand and say that at some unspecified time
>> > >> in the past the ABI changed: at what precise time does "supported
>> > >> by hardware mean" and how does that tie to a major FreeBSD version?
>> > >>
>> > >> Point in case: the JDK 1.4.x still works on FreeBSD 9.x (i386), so
>> > >> the ABI really hasn't changed at all in that respect.
>> > >
>> > > I think if you booted a FreeBSD 9.x i386 PAE kernel you'd find that =
the
>> > > jdk did not work. =A0That will be true for any i386 PAE kernel back =
to
>> > > when PG_NX support was introduced.
>> >
>> > That's bad.
> After more thought about the issue, I do not agree with you.
> Elf specification says about the PF_R flag that only read permission
> for the memory image of the segment is required, but read and execute
> is allowed.
>
> In other words, it is a bug in the old jre, which is further confirmed
> by the fact that later jres run with non-executable head.
>
>>
>> Recent binutils support a PT_GNU_HEAP flag in the ELF header that
>> controls whether heap allocations are executable by default. =A0In
>> Linux, the flag can be set using an ld option or the execstack(8)
>> command. =A0That seems like a better way to go than breaking old
>> JVMs or disabling the security feature.
>
> No, recent binutils do not support PT_GNU_HEAD. git grep -e PT_GNU_HEAD
> on the up to date checkout of binutils head gives zero matches. There are
> indeed PT_GNU_HEAP patches floating around from some hardening projects.
>
> There is indeed PT_GNU_STACK, which we do support.
>
> I want to commit the following refinement:
>
> diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32=
/freebsd32_misc.c
> index 6638ec8..fc2932b 100644
> --- a/sys/compat/freebsd32/freebsd32_misc.c
> +++ b/sys/compat/freebsd32/freebsd32_misc.c
> @@ -445,7 +445,7 @@ freebsd32_mprotect(struct thread *td, struct freebsd3=
2_mprotect_args *uap)
> =A0 =A0 =A0 =A0ap.len =3D uap->len;
> =A0 =A0 =A0 =A0ap.prot =3D uap->prot;
> =A0#if defined(__amd64__) || defined(__ia64__)
> - =A0 =A0 =A0 if (ap.prot & PROT_READ)
> + =A0 =A0 =A0 if (i386_read_exec && (ap.prot & PROT_READ) !=3D 0)
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0ap.prot |=3D PROT_EXEC;
> =A0#endif
> =A0 =A0 =A0 =A0return (sys_mprotect(td, &ap));
> @@ -536,7 +536,7 @@ freebsd32_mmap(struct thread *td, struct freebsd32_mm=
ap_args *uap)
> =A0#endif
>
> =A0#if defined(__amd64__) || defined(__ia64__)
> - =A0 =A0 =A0 if (prot & PROT_READ)
> + =A0 =A0 =A0 if (i386_read_exec && (prot & PROT_READ))
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0prot |=3D PROT_EXEC;
> =A0#endif
>
> diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c
> index 669c652..9970386 100644
> --- a/sys/kern/imgact_elf.c
> +++ b/sys/kern/imgact_elf.c
> @@ -118,11 +118,24 @@ static int elf_legacy_coredump =3D 0;
> =A0SYSCTL_INT(_debug, OID_AUTO, __elfN(legacy_coredump), CTLFLAG_RW,
> =A0 =A0 &elf_legacy_coredump, 0, "");
>
> -static int __elfN(nxstack) =3D 0;
> +static int __elfN(nxstack) =3D
> +#if defined(__amd64__) || defined(__powerpc__) /* both 64 and 32 bit */
> + =A0 =A0 =A0 1;
> +#else
> + =A0 =A0 =A0 0;
> +#endif
> =A0SYSCTL_INT(__CONCAT(_kern_elf, __ELF_WORD_SIZE), OID_AUTO,
> =A0 =A0 nxstack, CTLFLAG_RW, &__elfN(nxstack), 0,
> =A0 =A0 __XSTRING(__CONCAT(ELF, __ELF_WORD_SIZE)) ": enable non-executabl=
e stack");
>
> +#if __ELF_WORD_SIZE =3D=3D 32
> +#if defined(__amd64__) || defined(__ia64__)
> +int i386_read_exec =3D 0;
> +SYSCTL_INT(_kern_elf32, OID_AUTO, read_exec, CTLFLAG_RW, &i386_read_exec=
, 0,
> + =A0 =A0"enable execution from readable segments");
> +#endif
> +#endif
> +
> =A0static Elf_Brandinfo *elf_brand_list[MAX_BRANDS];
>
> =A0#define =A0 =A0 =A0 =A0trunc_page_ps(va, ps) =A0 ((va) & ~(ps - 1))
> @@ -1666,7 +1679,7 @@ __elfN(trans_prot)(Elf_Word flags)
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0prot |=3D VM_PROT_READ;
> =A0#if __ELF_WORD_SIZE =3D=3D 32
> =A0#if defined(__amd64__) || defined(__ia64__)
> - =A0 =A0 =A0 if (flags & PF_R)
> + =A0 =A0 =A0 if (i386_read_exec && (flags & PF_R))
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0prot |=3D VM_PROT_EXECUTE;
> =A0#endif
> =A0#endif
> diff --git a/sys/sys/sysent.h b/sys/sys/sysent.h
> index 6a4b485..3694ceb 100644
> --- a/sys/sys/sysent.h
> +++ b/sys/sys/sysent.h
> @@ -151,6 +152,10 @@ extern struct sysentvec null_sysvec;
> =A0extern struct sysent sysent[];
> =A0extern const char *syscallnames[];
>
> +#if defined(__amd64__) || defined(__ia64__)
> +extern int i386_read_exec;
> +#endif
> +
> =A0#define =A0 =A0 =A0 =A0NO_SYSCALL (-1)
>
> =A0struct module;
> diff --git a/sys/vm/vm_unix.c b/sys/vm/vm_unix.c
> index d4ea3b7..253ab77 100644
> --- a/sys/vm/vm_unix.c
> +++ b/sys/vm/vm_unix.c
> @@ -141,7 +141,7 @@ sys_obreak(td, uap)
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0prot =3D VM_PROT_RW;
> =A0#ifdef COMPAT_FREEBSD32
> =A0#if defined(__amd64__) || defined(__ia64__)
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (SV_PROC_FLAG(td->td_proc, SV_ILP32))
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (i386_read_exec && SV_PROC_FLAG(td->td_p=
roc, SV_ILP32))
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0prot |=3D VM_PROT_EXECUTE;
> =A0#endif
> =A0#endif

    Would you want to be able to toggle this feature at runtime after
you've fully booted your kernel? It seems like it would be kind of
dangerous to implement it on a system wide basis with part of the
pages NX and the others not NX -- in particular if multiple processes
are modifying the stack simultaneously.
    Also, would the sysctl be atomic enough for this to be a good idea?
    Personally I think that it would be better if this was a tunable
(and a readonly sysctl so folks could programmatically detect whether
or not NX was on), but that might just be me..
Thanks,
-Garrett

From owner-svn-src-all@FreeBSD.ORG  Fri Oct 14 18:37:06 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35])
	by hub.freebsd.org (Postfix) with ESMTP id 3FE7B1065673;
	Fri, 14 Oct 2011 18:37:06 +0000 (UTC)
	(envelope-from dougb@FreeBSD.org)
Received: from 172-17-198-245.globalsuite.net (hub.freebsd.org
	[IPv6:2001:4f8:fff6::36])
	by mx2.freebsd.org (Postfix) with ESMTP id AF96D14F03A;
	Fri, 14 Oct 2011 18:37:05 +0000 (UTC)
Message-ID: <4E988151.2090701@FreeBSD.org>
Date: Fri, 14 Oct 2011 11:37:05 -0700
From: Doug Barton 
Organization: http://SupersetSolutions.com/
User-Agent: Mozilla/5.0 (X11; FreeBSD amd64;
	rv:7.0.1) Gecko/20111001 Thunderbird/7.0.1
MIME-Version: 1.0
To: Nathan Whitehorn 
References: <201110121534.p9CFYP0E072134@svn.freebsd.org>
	<4E95D070.4030403@FreeBSD.org> <4E95D3D3.4070405@freebsd.org>
In-Reply-To: <4E95D3D3.4070405@freebsd.org>
X-Enigmail-Version: undefined
OpenPGP: id=1A1ABC84
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r226305 - head/release
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 14 Oct 2011 18:37:06 -0000

On 10/12/2011 10:52, Nathan Whitehorn wrote:
> On 10/12/11 12:37, Doug Barton wrote:
>> On 10/12/2011 8:34 AM, Nathan Whitehorn wrote:
>>> Author: nwhitehorn
>>> Date: Wed Oct 12 15:34:25 2011
>>> New Revision: 226305
>>> URL: http://svn.freebsd.org/changeset/base/226305
>>>
>>> Log:
>>>    Missed file in r225937 (sysinstall removal).
>> I, and from my reading others, asked you to revert the removal of
>> sysinstall. Isn't this moving in the wrong direction? :)
>>
> 
> I said I'd be open to it, but thought it wasn't too important since it
> will stay in 9 and removed it in the first place after getting several
> requests to do so. There wasn't any response after that.

The ensuing discussion was about the installer. The point that I
attempted to reiterate was that my concern is that there is no
substitute for sysinstall's post-installation system configuration
features, and until there is we should keep it around. Sorry if I wasn't
clear.

> Are you requesting these commits be reverted?

I'm requesting that sysinstall remain in the base until there are
replacements for all of its functionality. So just to be 100% clear,
yes, I'm asking you to revert its removal.


Doug

-- 

	Nothin' ever doesn't change, but nothin' changes much.
			-- OK Go

	Breadth of IT experience, and depth of knowledge in the DNS.
	Yours for the right price.  :)  http://SupersetSolutions.com/


From owner-svn-src-all@FreeBSD.ORG  Fri Oct 14 18:53:11 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A0EB61065678;
	Fri, 14 Oct 2011 18:53:11 +0000 (UTC)
	(envelope-from kostikbel@gmail.com)
Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200])
	by mx1.freebsd.org (Postfix) with ESMTP id E742F8FC12;
	Fri, 14 Oct 2011 18:53:10 +0000 (UTC)
Received: from alf.home (alf.kiev.zoral.com.ua [10.1.1.177])
	by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id p9EIr7s8045050
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Fri, 14 Oct 2011 21:53:07 +0300 (EEST)
	(envelope-from kostikbel@gmail.com)
Received: from alf.home (kostik@localhost [127.0.0.1])
	by alf.home (8.14.5/8.14.5) with ESMTP id p9EIr7um039821;
	Fri, 14 Oct 2011 21:53:07 +0300 (EEST)
	(envelope-from kostikbel@gmail.com)
Received: (from kostik@localhost)
	by alf.home (8.14.5/8.14.5/Submit) id p9EIr6tC039820;
	Fri, 14 Oct 2011 21:53:06 +0300 (EEST)
	(envelope-from kostikbel@gmail.com)
X-Authentication-Warning: alf.home: kostik set sender to kostikbel@gmail.com
	using -f
Date: Fri, 14 Oct 2011 21:53:06 +0300
From: Kostik Belousov 
To: Garrett Cooper 
Message-ID: <20111014185306.GQ1511@deviant.kiev.zoral.com.ua>
References: <201110131620.p9DGKAM2022926@svn.freebsd.org>
	<20111013190943.GM1511@deviant.kiev.zoral.com.ua>
	
	<201110131707.14466.jhb@freebsd.org>
	
	<20111013225030.GA75054@zim.MIT.EDU>
	<20111014182443.GP1511@deviant.kiev.zoral.com.ua>
	
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature"; boundary="ECruMGViw3NXTj6O"
Content-Disposition: inline
In-Reply-To: 
User-Agent: Mutt/1.4.2.3i
X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua
X-Virus-Status: Clean
X-Spam-Status: No, score=-3.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,
	DNS_FROM_OPENWHOIS autolearn=no version=3.2.5
X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on
	skuns.kiev.zoral.com.ua
Cc: Marcel Moolenaar , John Baldwin ,
	svn-src-all@freebsd.org, Marcel Moolenaar ,
	src-committers@freebsd.org, svn-src-head@freebsd.org
Subject: Re: svn commit: r226343 - head/sys/vm
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 14 Oct 2011 18:53:11 -0000


--ECruMGViw3NXTj6O
Content-Type: text/plain; charset=koi8-r
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, Oct 14, 2011 at 11:30:47AM -0700, Garrett Cooper wrote:
> On Fri, Oct 14, 2011 at 11:24 AM, Kostik Belousov  w=
rote:
> > On Thu, Oct 13, 2011 at 06:50:30PM -0400, David Schultz wrote:
> >> On Thu, Oct 13, 2011, Marcel Moolenaar wrote:
> >> >
> >> > On Oct 13, 2011, at 2:07 PM, John Baldwin wrote:
> >> > >>
> >> > >> That's really besides the point. ABI changes are made deliberately
> >> > >> and ABIs must be well-documented for anyone to adhere to it. You
> >> > >> can't post hoc wave your hand and say that at some unspecified ti=
me
> >> > >> in the past the ABI changed: at what precise time does "supported
> >> > >> by hardware mean" and how does that tie to a major FreeBSD versio=
n?
> >> > >>
> >> > >> Point in case: the JDK 1.4.x still works on FreeBSD 9.x (i386), so
> >> > >> the ABI really hasn't changed at all in that respect.
> >> > >
> >> > > I think if you booted a FreeBSD 9.x i386 PAE kernel you'd find tha=
t the
> >> > > jdk did not work. =9AThat will be true for any i386 PAE kernel bac=
k to
> >> > > when PG_NX support was introduced.
> >> >
> >> > That's bad.
> > After more thought about the issue, I do not agree with you.
> > Elf specification says about the PF_R flag that only read permission
> > for the memory image of the segment is required, but read and execute
> > is allowed.
> >
> > In other words, it is a bug in the old jre, which is further confirmed
> > by the fact that later jres run with non-executable head.
> >
> >>
> >> Recent binutils support a PT_GNU_HEAP flag in the ELF header that
> >> controls whether heap allocations are executable by default. =9AIn
> >> Linux, the flag can be set using an ld option or the execstack(8)
> >> command. =9AThat seems like a better way to go than breaking old
> >> JVMs or disabling the security feature.
> >
> > No, recent binutils do not support PT_GNU_HEAD. git grep -e PT_GNU_HEAD
> > on the up to date checkout of binutils head gives zero matches. There a=
re
> > indeed PT_GNU_HEAP patches floating around from some hardening projects.
> >
> > There is indeed PT_GNU_STACK, which we do support.
> >
> > I want to commit the following refinement:
> >
> > diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd=
32/freebsd32_misc.c
> > index 6638ec8..fc2932b 100644
> > --- a/sys/compat/freebsd32/freebsd32_misc.c
> > +++ b/sys/compat/freebsd32/freebsd32_misc.c
> > @@ -445,7 +445,7 @@ freebsd32_mprotect(struct thread *td, struct freebs=
d32_mprotect_args *uap)
> > =9A =9A =9A =9Aap.len =3D uap->len;
> > =9A =9A =9A =9Aap.prot =3D uap->prot;
> > =9A#if defined(__amd64__) || defined(__ia64__)
> > - =9A =9A =9A if (ap.prot & PROT_READ)
> > + =9A =9A =9A if (i386_read_exec && (ap.prot & PROT_READ) !=3D 0)
> > =9A =9A =9A =9A =9A =9A =9A =9Aap.prot |=3D PROT_EXEC;
> > =9A#endif
> > =9A =9A =9A =9Areturn (sys_mprotect(td, &ap));
> > @@ -536,7 +536,7 @@ freebsd32_mmap(struct thread *td, struct freebsd32_=
mmap_args *uap)
> > =9A#endif
> >
> > =9A#if defined(__amd64__) || defined(__ia64__)
> > - =9A =9A =9A if (prot & PROT_READ)
> > + =9A =9A =9A if (i386_read_exec && (prot & PROT_READ))
> > =9A =9A =9A =9A =9A =9A =9A =9Aprot |=3D PROT_EXEC;
> > =9A#endif
> >
> > diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c
> > index 669c652..9970386 100644
> > --- a/sys/kern/imgact_elf.c
> > +++ b/sys/kern/imgact_elf.c
> > @@ -118,11 +118,24 @@ static int elf_legacy_coredump =3D 0;
> > =9ASYSCTL_INT(_debug, OID_AUTO, __elfN(legacy_coredump), CTLFLAG_RW,
> > =9A =9A &elf_legacy_coredump, 0, "");
> >
> > -static int __elfN(nxstack) =3D 0;
> > +static int __elfN(nxstack) =3D
> > +#if defined(__amd64__) || defined(__powerpc__) /* both 64 and 32 bit */
> > + =9A =9A =9A 1;
> > +#else
> > + =9A =9A =9A 0;
> > +#endif
> > =9ASYSCTL_INT(__CONCAT(_kern_elf, __ELF_WORD_SIZE), OID_AUTO,
> > =9A =9A nxstack, CTLFLAG_RW, &__elfN(nxstack), 0,
> > =9A =9A __XSTRING(__CONCAT(ELF, __ELF_WORD_SIZE)) ": enable non-executa=
ble stack");
> >
> > +#if __ELF_WORD_SIZE =3D=3D 32
> > +#if defined(__amd64__) || defined(__ia64__)
> > +int i386_read_exec =3D 0;
> > +SYSCTL_INT(_kern_elf32, OID_AUTO, read_exec, CTLFLAG_RW, &i386_read_ex=
ec, 0,
> > + =9A =9A"enable execution from readable segments");
> > +#endif
> > +#endif
> > +
> > =9Astatic Elf_Brandinfo *elf_brand_list[MAX_BRANDS];
> >
> > =9A#define =9A =9A =9A =9Atrunc_page_ps(va, ps) =9A ((va) & ~(ps - 1))
> > @@ -1666,7 +1679,7 @@ __elfN(trans_prot)(Elf_Word flags)
> > =9A =9A =9A =9A =9A =9A =9A =9Aprot |=3D VM_PROT_READ;
> > =9A#if __ELF_WORD_SIZE =3D=3D 32
> > =9A#if defined(__amd64__) || defined(__ia64__)
> > - =9A =9A =9A if (flags & PF_R)
> > + =9A =9A =9A if (i386_read_exec && (flags & PF_R))
> > =9A =9A =9A =9A =9A =9A =9A =9Aprot |=3D VM_PROT_EXECUTE;
> > =9A#endif
> > =9A#endif
> > diff --git a/sys/sys/sysent.h b/sys/sys/sysent.h
> > index 6a4b485..3694ceb 100644
> > --- a/sys/sys/sysent.h
> > +++ b/sys/sys/sysent.h
> > @@ -151,6 +152,10 @@ extern struct sysentvec null_sysvec;
> > =9Aextern struct sysent sysent[];
> > =9Aextern const char *syscallnames[];
> >
> > +#if defined(__amd64__) || defined(__ia64__)
> > +extern int i386_read_exec;
> > +#endif
> > +
> > =9A#define =9A =9A =9A =9ANO_SYSCALL (-1)
> >
> > =9Astruct module;
> > diff --git a/sys/vm/vm_unix.c b/sys/vm/vm_unix.c
> > index d4ea3b7..253ab77 100644
> > --- a/sys/vm/vm_unix.c
> > +++ b/sys/vm/vm_unix.c
> > @@ -141,7 +141,7 @@ sys_obreak(td, uap)
> > =9A =9A =9A =9A =9A =9A =9A =9Aprot =3D VM_PROT_RW;
> > =9A#ifdef COMPAT_FREEBSD32
> > =9A#if defined(__amd64__) || defined(__ia64__)
> > - =9A =9A =9A =9A =9A =9A =9A if (SV_PROC_FLAG(td->td_proc, SV_ILP32))
> > + =9A =9A =9A =9A =9A =9A =9A if (i386_read_exec && SV_PROC_FLAG(td->td=
_proc, SV_ILP32))
> > =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9Aprot |=3D VM_PROT_EXECUT=
E;
> > =9A#endif
> > =9A#endif
>=20
>     Would you want to be able to toggle this feature at runtime after
> you've fully booted your kernel? It seems like it would be kind of
Yes, I do.
> dangerous to implement it on a system wide basis with part of the
> pages NX and the others not NX -- in particular if multiple processes
> are modifying the stack simultaneously.
>     Also, would the sysctl be atomic enough for this to be a good idea?
It is atomic enough.

>     Personally I think that it would be better if this was a tunable
> (and a readonly sysctl so folks could programmatically detect whether
> or not NX was on), but that might just be me..
> Thanks,
> -Garrett

--ECruMGViw3NXTj6O
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (FreeBSD)

iEYEARECAAYFAk6YhRIACgkQC3+MBN1Mb4h44wCgvaoSL05myzO53pEa1LcERCAx
YuAAmgN6sYsD3D4mOGwrmBXbnsvKO7em
=/h2b
-----END PGP SIGNATURE-----

--ECruMGViw3NXTj6O--

From owner-svn-src-all@FreeBSD.ORG  Fri Oct 14 19:05:26 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 66E95106566B;
	Fri, 14 Oct 2011 19:05:26 +0000 (UTC)
	(envelope-from glebius@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 568F78FC08;
	Fri, 14 Oct 2011 19:05:26 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9EJ5QN4076006;
	Fri, 14 Oct 2011 19:05:26 GMT (envelope-from glebius@svn.freebsd.org)
Received: (from glebius@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9EJ5QN1076004;
	Fri, 14 Oct 2011 19:05:26 GMT (envelope-from glebius@svn.freebsd.org)
Message-Id: <201110141905.p9EJ5QN1076004@svn.freebsd.org>
From: Gleb Smirnoff 
Date: Fri, 14 Oct 2011 19:05:26 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226367 - head/sys/netinet
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 14 Oct 2011 19:05:26 -0000

Author: glebius
Date: Fri Oct 14 19:05:26 2011
New Revision: 226367
URL: http://svn.freebsd.org/changeset/base/226367

Log:
  Never switch directly from INIT to MASTER, since this produces
  nasty status flaps.
  
  PR:		kern/161123
  Submitted by:	Damien Fleuriot 
  OpenBSD:	ip_carp.c, rev. 1.115

Modified:
  head/sys/netinet/ip_carp.c

Modified: head/sys/netinet/ip_carp.c
==============================================================================
--- head/sys/netinet/ip_carp.c	Fri Oct 14 11:48:32 2011	(r226366)
+++ head/sys/netinet/ip_carp.c	Fri Oct 14 19:05:26 2011	(r226367)
@@ -1424,24 +1424,10 @@ carp_setrun(struct carp_softc *sc, sa_fa
 
 	switch (sc->sc_state) {
 	case INIT:
-		if (carp_opts[CARPCTL_PREEMPT] && !carp_suppress_preempt) {
-			carp_send_ad_locked(sc);
-#ifdef INET
-			carp_send_arp(sc);
-#endif
-#ifdef INET6
-			carp_send_na(sc);
-#endif /* INET6 */
-			CARP_LOG("%s: INIT -> MASTER (preempting)\n",
-			    SC2IFP(sc)->if_xname);
-			carp_set_state(sc, MASTER);
-			carp_setroute(sc, RTM_ADD);
-		} else {
-			CARP_LOG("%s: INIT -> BACKUP\n", SC2IFP(sc)->if_xname);
-			carp_set_state(sc, BACKUP);
-			carp_setroute(sc, RTM_DELETE);
-			carp_setrun(sc, 0);
-		}
+		CARP_LOG("%s: INIT -> BACKUP\n", SC2IFP(sc)->if_xname);
+		carp_set_state(sc, BACKUP);
+		carp_setroute(sc, RTM_DELETE);
+		carp_setrun(sc, 0);
 		break;
 	case BACKUP:
 		callout_stop(&sc->sc_ad_tmo);

From owner-svn-src-all@FreeBSD.ORG  Fri Oct 14 19:43:01 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A88001065677;
	Fri, 14 Oct 2011 19:43:01 +0000 (UTC) (envelope-from jhb@freebsd.org)
Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42])
	by mx1.freebsd.org (Postfix) with ESMTP id 23B9E8FC14;
	Fri, 14 Oct 2011 19:43:01 +0000 (UTC)
Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net
	[66.111.2.69])
	by cyrus.watson.org (Postfix) with ESMTPSA id C888046B42;
	Fri, 14 Oct 2011 15:43:00 -0400 (EDT)
Received: from jhbbsd.localnet (unknown [209.249.190.124])
	by bigwig.baldwin.cx (Postfix) with ESMTPSA id 567768A02F;
	Fri, 14 Oct 2011 15:43:00 -0400 (EDT)
From: John Baldwin 
To: Garrett Cooper 
Date: Fri, 14 Oct 2011 15:42:58 -0400
User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110617; KDE/4.5.5; amd64; ; )
References: <201110131620.p9DGKAM2022926@svn.freebsd.org>
	<20111014182443.GP1511@deviant.kiev.zoral.com.ua>
	
In-Reply-To: 
MIME-Version: 1.0
Content-Type: Text/Plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Message-Id: <201110141542.59619.jhb@freebsd.org>
X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6
	(bigwig.baldwin.cx); Fri, 14 Oct 2011 15:43:00 -0400 (EDT)
Cc: Marcel Moolenaar , svn-src-all@freebsd.org,
	Marcel Moolenaar , svn-src-head@freebsd.org,
	src-committers@freebsd.org, Kostik Belousov 
Subject: Re: svn commit: r226343 - head/sys/vm
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 14 Oct 2011 19:43:01 -0000

On Friday, October 14, 2011 2:30:47 pm Garrett Cooper wrote:
>     Would you want to be able to toggle this feature at runtime after
> you've fully booted your kernel?

Yes, you do.  When a sysadmin sees that an old Java doesn't run, they don't
really want to have to reboot just to fix it.  We've used runtime tunable
sysctls for similar things previously (mmap at zero).

-- 
John Baldwin

From owner-svn-src-all@FreeBSD.ORG  Fri Oct 14 21:35:30 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 2F605106566B;
	Fri, 14 Oct 2011 21:35:30 +0000 (UTC)
	(envelope-from marcel@xcllnt.net)
Received: from mail.xcllnt.net (mail.xcllnt.net [70.36.220.4])
	by mx1.freebsd.org (Postfix) with ESMTP id E8C938FC13;
	Fri, 14 Oct 2011 21:35:29 +0000 (UTC)
Received: from [172.23.7.198] (natint3.juniper.net [66.129.224.36])
	(authenticated bits=0)
	by mail.xcllnt.net (8.14.5/8.14.5) with ESMTP id p9ELZKsi035875
	(version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO);
	Fri, 14 Oct 2011 14:35:28 -0700 (PDT)
	(envelope-from marcel@xcllnt.net)
Mime-Version: 1.0 (Apple Message framework v1244.3)
Content-Type: text/plain; charset=us-ascii
From: Marcel Moolenaar 
In-Reply-To: <20111014182443.GP1511@deviant.kiev.zoral.com.ua>
Date: Fri, 14 Oct 2011 14:35:15 -0700
Content-Transfer-Encoding: quoted-printable
Message-Id: <93156F0C-A80A-4E60-8873-E6269D543973@xcllnt.net>
References: <201110131620.p9DGKAM2022926@svn.freebsd.org>
	<20111013190943.GM1511@deviant.kiev.zoral.com.ua>
	
	<201110131707.14466.jhb@freebsd.org>
	
	<20111013225030.GA75054@zim.MIT.EDU>
	<20111014182443.GP1511@deviant.kiev.zoral.com.ua>
To: Kostik Belousov 
X-Mailer: Apple Mail (2.1244.3)
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	Marcel Moolenaar ,
	src-committers@freebsd.org, John Baldwin 
Subject: Re: svn commit: r226343 - head/sys/vm
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 14 Oct 2011 21:35:30 -0000


On Oct 14, 2011, at 11:24 AM, Kostik Belousov wrote:
>>>=20
> After more thought about the issue, I do not agree with you.
> Elf specification says about the PF_R flag that only read permission
> for the memory image of the segment is required, but read and execute
> is allowed.

The ELF specification does not contain CPU specifics. Those are
always covered by processor supplements. Since this is very i386
specific behaviour we're talking about, it's a non sequitur to
use the generic ELF specification to argue a point in this
respect.


> I want to commit the following refinement:

The patch is good.

> diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c
> index 669c652..9970386 100644
> --- a/sys/kern/imgact_elf.c
> +++ b/sys/kern/imgact_elf.c
> @@ -118,11 +118,24 @@ static int elf_legacy_coredump =3D 0;
> SYSCTL_INT(_debug, OID_AUTO, __elfN(legacy_coredump), CTLFLAG_RW,=20
>     &elf_legacy_coredump, 0, "");
>=20
> -static int __elfN(nxstack) =3D 0;
> +static int __elfN(nxstack) =3D
> +#if defined(__amd64__) || defined(__powerpc__) /* both 64 and 32 bit =
*/
> +	1;
> +#else
> +	0;
> +#endif
> SYSCTL_INT(__CONCAT(_kern_elf, __ELF_WORD_SIZE), OID_AUTO,
>     nxstack, CTLFLAG_RW, &__elfN(nxstack), 0,
>     __XSTRING(__CONCAT(ELF, __ELF_WORD_SIZE)) ": enable non-executable =
stack");

Please do not commit this change with the rest. It's
not to the point. In fact, if you're changing it to
the above, please add ia64 to the list as well.

--=20
Marcel Moolenaar
marcel@xcllnt.net



From owner-svn-src-all@FreeBSD.ORG  Fri Oct 14 22:33:39 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 961CE106566C;
	Fri, 14 Oct 2011 22:33:39 +0000 (UTC)
	(envelope-from delphij@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 7C0128FC14;
	Fri, 14 Oct 2011 22:33:39 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9EMXdSu082523;
	Fri, 14 Oct 2011 22:33:39 GMT (envelope-from delphij@svn.freebsd.org)
Received: (from delphij@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9EMXdYh082521;
	Fri, 14 Oct 2011 22:33:39 GMT (envelope-from delphij@svn.freebsd.org)
Message-Id: <201110142233.p9EMXdYh082521@svn.freebsd.org>
From: Xin LI 
Date: Fri, 14 Oct 2011 22:33:39 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226368 - stable/9/sys/kern
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 14 Oct 2011 22:33:39 -0000

Author: delphij
Date: Fri Oct 14 22:33:39 2011
New Revision: 226368
URL: http://svn.freebsd.org/changeset/base/226368

Log:
  MFC r226082:
  
  Return proper errno when we hit error when doing sanity check.
  This fixes dtrace crashes when module is not compiled with CTF
  data.
  
  Submitted by:	Paul Ambrose ambrosehua at gmail.com
  Approved by:	re (kib)

Modified:
  stable/9/sys/kern/kern_ctf.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/amd64/include/xen/   (props changed)
  stable/9/sys/boot/   (props changed)
  stable/9/sys/boot/i386/efi/   (props changed)
  stable/9/sys/boot/ia64/efi/   (props changed)
  stable/9/sys/boot/ia64/ski/   (props changed)
  stable/9/sys/boot/powerpc/boot1.chrp/   (props changed)
  stable/9/sys/boot/powerpc/ofw/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)
  stable/9/sys/conf/   (props changed)
  stable/9/sys/contrib/dev/acpica/   (props changed)
  stable/9/sys/contrib/octeon-sdk/   (props changed)
  stable/9/sys/contrib/pf/   (props changed)
  stable/9/sys/contrib/x86emu/   (props changed)

Modified: stable/9/sys/kern/kern_ctf.c
==============================================================================
--- stable/9/sys/kern/kern_ctf.c	Fri Oct 14 19:05:26 2011	(r226367)
+++ stable/9/sys/kern/kern_ctf.c	Fri Oct 14 22:33:39 2011	(r226368)
@@ -164,8 +164,13 @@ link_elf_ctf_get(linker_file_t lf, linke
 	 * section names aren't present, then we can't locate the
 	 * .SUNW_ctf section containing the CTF data.
 	 */
-	if (hdr->e_shstrndx == 0 || shdr[hdr->e_shstrndx].sh_type != SHT_STRTAB)
+	if (hdr->e_shstrndx == 0 || shdr[hdr->e_shstrndx].sh_type != SHT_STRTAB) {
+		printf("%s(%d): module %s e_shstrndx is %d, sh_type is %d\n",
+		    __func__, __LINE__, lf->pathname, hdr->e_shstrndx,
+		    shdr[hdr->e_shstrndx].sh_type);
+		error = EFTYPE;
 		goto out;
+	}
 
 	/* Allocate memory to buffer the section header strings. */
 	if ((shstrtab = malloc(shdr[hdr->e_shstrndx].sh_size, M_LINKER,
@@ -187,8 +192,12 @@ link_elf_ctf_get(linker_file_t lf, linke
 			break;
 
 	/* Check if the CTF section wasn't found. */
-	if (i >= hdr->e_shnum)
+	if (i >= hdr->e_shnum) {
+		printf("%s(%d): module %s has no .SUNW_ctf section\n",
+		    __func__, __LINE__, lf->pathname);
+		error = EFTYPE;
 		goto out;
+	}
 
 	/* Read the CTF header. */
 	if ((error = vn_rdwr(UIO_READ, nd.ni_vp, ctf_hdr, sizeof(ctf_hdr),
@@ -197,12 +206,21 @@ link_elf_ctf_get(linker_file_t lf, linke
 		goto out;
 
 	/* Check the CTF magic number. (XXX check for big endian!) */
-	if (ctf_hdr[0] != 0xf1 || ctf_hdr[1] != 0xcf)
+	if (ctf_hdr[0] != 0xf1 || ctf_hdr[1] != 0xcf) {
+		printf("%s(%d): module %s has invalid format\n",
+		    __func__, __LINE__, lf->pathname);
+		error = EFTYPE;
 		goto out;
+	}
 
 	/* Check if version 2. */
-	if (ctf_hdr[2] != 2)
+	if (ctf_hdr[2] != 2) {
+		printf("%s(%d): module %s CTF format version is %d "
+		    "(2 expected)\n",
+		    __func__, __LINE__, lf->pathname, ctf_hdr[2]);
+		error = EFTYPE;
 		goto out;
+	}
 
 	/* Check if the data is compressed. */
 	if ((ctf_hdr[3] & 0x1) != 0) {

From owner-svn-src-all@FreeBSD.ORG  Fri Oct 14 22:44:51 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 9DC79106564A;
	Fri, 14 Oct 2011 22:44:51 +0000 (UTC)
	(envelope-from delphij@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 7389D8FC15;
	Fri, 14 Oct 2011 22:44:51 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9EMipv2082949;
	Fri, 14 Oct 2011 22:44:51 GMT (envelope-from delphij@svn.freebsd.org)
Received: (from delphij@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9EMipfD082947;
	Fri, 14 Oct 2011 22:44:51 GMT (envelope-from delphij@svn.freebsd.org)
Message-Id: <201110142244.p9EMipfD082947@svn.freebsd.org>
From: Xin LI 
Date: Fri, 14 Oct 2011 22:44:51 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226369 - stable/8/sys/kern
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 14 Oct 2011 22:44:51 -0000

Author: delphij
Date: Fri Oct 14 22:44:51 2011
New Revision: 226369
URL: http://svn.freebsd.org/changeset/base/226369

Log:
  MFC r226082:
  
  Return proper errno when we hit error when doing sanity check.
  This fixes dtrace crashes when module is not compiled with CTF
  data.
  
  Submitted by:	Paul Ambrose ambrosehua at gmail.com

Modified:
  stable/8/sys/kern/kern_ctf.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/kern/kern_ctf.c
==============================================================================
--- stable/8/sys/kern/kern_ctf.c	Fri Oct 14 22:33:39 2011	(r226368)
+++ stable/8/sys/kern/kern_ctf.c	Fri Oct 14 22:44:51 2011	(r226369)
@@ -164,8 +164,13 @@ link_elf_ctf_get(linker_file_t lf, linke
 	 * section names aren't present, then we can't locate the
 	 * .SUNW_ctf section containing the CTF data.
 	 */
-	if (hdr->e_shstrndx == 0 || shdr[hdr->e_shstrndx].sh_type != SHT_STRTAB)
+	if (hdr->e_shstrndx == 0 || shdr[hdr->e_shstrndx].sh_type != SHT_STRTAB) {
+		printf("%s(%d): module %s e_shstrndx is %d, sh_type is %d\n",
+		    __func__, __LINE__, lf->pathname, hdr->e_shstrndx,
+		    shdr[hdr->e_shstrndx].sh_type);
+		error = EFTYPE;
 		goto out;
+	}
 
 	/* Allocate memory to buffer the section header strings. */
 	if ((shstrtab = malloc(shdr[hdr->e_shstrndx].sh_size, M_LINKER,
@@ -187,8 +192,12 @@ link_elf_ctf_get(linker_file_t lf, linke
 			break;
 
 	/* Check if the CTF section wasn't found. */
-	if (i >= hdr->e_shnum)
+	if (i >= hdr->e_shnum) {
+		printf("%s(%d): module %s has no .SUNW_ctf section\n",
+		    __func__, __LINE__, lf->pathname);
+		error = EFTYPE;
 		goto out;
+	}
 
 	/* Read the CTF header. */
 	if ((error = vn_rdwr(UIO_READ, nd.ni_vp, ctf_hdr, sizeof(ctf_hdr),
@@ -197,12 +206,21 @@ link_elf_ctf_get(linker_file_t lf, linke
 		goto out;
 
 	/* Check the CTF magic number. (XXX check for big endian!) */
-	if (ctf_hdr[0] != 0xf1 || ctf_hdr[1] != 0xcf)
+	if (ctf_hdr[0] != 0xf1 || ctf_hdr[1] != 0xcf) {
+		printf("%s(%d): module %s has invalid format\n",
+		    __func__, __LINE__, lf->pathname);
+		error = EFTYPE;
 		goto out;
+	}
 
 	/* Check if version 2. */
-	if (ctf_hdr[2] != 2)
+	if (ctf_hdr[2] != 2) {
+		printf("%s(%d): module %s CTF format version is %d "
+		    "(2 expected)\n",
+		    __func__, __LINE__, lf->pathname, ctf_hdr[2]);
+		error = EFTYPE;
 		goto out;
+	}
 
 	/* Check if the data is compressed. */
 	if ((ctf_hdr[3] & 0x1) != 0) {

From owner-svn-src-all@FreeBSD.ORG  Fri Oct 14 22:52:47 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 0FC5C1065670;
	Fri, 14 Oct 2011 22:52:47 +0000 (UTC)
	(envelope-from delphij@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id D99848FC12;
	Fri, 14 Oct 2011 22:52:46 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9EMqklf083233;
	Fri, 14 Oct 2011 22:52:46 GMT (envelope-from delphij@svn.freebsd.org)
Received: (from delphij@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9EMqkAj083231;
	Fri, 14 Oct 2011 22:52:46 GMT (envelope-from delphij@svn.freebsd.org)
Message-Id: <201110142252.p9EMqkAj083231@svn.freebsd.org>
From: Xin LI 
Date: Fri, 14 Oct 2011 22:52:46 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226370 - stable/7/sys/kern
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 14 Oct 2011 22:52:47 -0000

Author: delphij
Date: Fri Oct 14 22:52:46 2011
New Revision: 226370
URL: http://svn.freebsd.org/changeset/base/226370

Log:
  MFC r226082:
  
  Return proper errno when we hit error when doing sanity check.
  This fixes dtrace crashes when module is not compiled with CTF
  data.
  
  Submitted by:	Paul Ambrose ambrosehua at gmail.com

Modified:
  stable/7/sys/kern/kern_ctf.c
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/kern/kern_ctf.c
==============================================================================
--- stable/7/sys/kern/kern_ctf.c	Fri Oct 14 22:44:51 2011	(r226369)
+++ stable/7/sys/kern/kern_ctf.c	Fri Oct 14 22:52:46 2011	(r226370)
@@ -164,8 +164,13 @@ link_elf_ctf_get(linker_file_t lf, linke
 	 * section names aren't present, then we can't locate the
 	 * .SUNW_ctf section containing the CTF data.
 	 */
-	if (hdr->e_shstrndx == 0 || shdr[hdr->e_shstrndx].sh_type != SHT_STRTAB)
+	if (hdr->e_shstrndx == 0 || shdr[hdr->e_shstrndx].sh_type != SHT_STRTAB) {
+		printf("%s(%d): module %s e_shstrndx is %d, sh_type is %d\n",
+		    __func__, __LINE__, lf->pathname, hdr->e_shstrndx,
+		    shdr[hdr->e_shstrndx].sh_type);
+		error = EFTYPE;
 		goto out;
+	}
 
 	/* Allocate memory to buffer the section header strings. */
 	if ((shstrtab = malloc(shdr[hdr->e_shstrndx].sh_size, M_LINKER,
@@ -187,8 +192,12 @@ link_elf_ctf_get(linker_file_t lf, linke
 			break;
 
 	/* Check if the CTF section wasn't found. */
-	if (i >= hdr->e_shnum)
+	if (i >= hdr->e_shnum) {
+		printf("%s(%d): module %s has no .SUNW_ctf section\n",
+		    __func__, __LINE__, lf->pathname);
+		error = EFTYPE;
 		goto out;
+	}
 
 	/* Read the CTF header. */
 	if ((error = vn_rdwr(UIO_READ, nd.ni_vp, ctf_hdr, sizeof(ctf_hdr),
@@ -197,12 +206,21 @@ link_elf_ctf_get(linker_file_t lf, linke
 		goto out;
 
 	/* Check the CTF magic number. (XXX check for big endian!) */
-	if (ctf_hdr[0] != 0xf1 || ctf_hdr[1] != 0xcf)
+	if (ctf_hdr[0] != 0xf1 || ctf_hdr[1] != 0xcf) {
+		printf("%s(%d): module %s has invalid format\n",
+		    __func__, __LINE__, lf->pathname);
+		error = EFTYPE;
 		goto out;
+	}
 
 	/* Check if version 2. */
-	if (ctf_hdr[2] != 2)
+	if (ctf_hdr[2] != 2) {
+		printf("%s(%d): module %s CTF format version is %d "
+		    "(2 expected)\n",
+		    __func__, __LINE__, lf->pathname, ctf_hdr[2]);
+		error = EFTYPE;
 		goto out;
+	}
 
 	/* Check if the data is compressed. */
 	if ((ctf_hdr[3] & 0x1) != 0) {

From owner-svn-src-all@FreeBSD.ORG  Sat Oct 15 04:16:58 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D5AAA1065672;
	Sat, 15 Oct 2011 04:16:58 +0000 (UTC) (envelope-from das@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id C381C8FC12;
	Sat, 15 Oct 2011 04:16:58 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9F4Gwr6094403;
	Sat, 15 Oct 2011 04:16:58 GMT (envelope-from das@svn.freebsd.org)
Received: (from das@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9F4GwuZ094399;
	Sat, 15 Oct 2011 04:16:58 GMT (envelope-from das@svn.freebsd.org)
Message-Id: <201110150416.p9F4GwuZ094399@svn.freebsd.org>
From: David Schultz 
Date: Sat, 15 Oct 2011 04:16:58 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226371 - head/lib/msun/src
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 15 Oct 2011 04:16:58 -0000

Author: das
Date: Sat Oct 15 04:16:58 2011
New Revision: 226371
URL: http://svn.freebsd.org/changeset/base/226371

Log:
  Fix a double-rounding bug in fma{,f,l}.  The bug would occur in
  round-to-nearest mode when the result, rounded to twice machine
  precision, was exactly halfway between two machine-precision
  values.  The essence of the fix is to simulate a "sticky bit" in
  the pathological cases, which is how hardware implementations
  break the ties.
  
  MFC after:	1 month

Modified:
  head/lib/msun/src/s_fma.c
  head/lib/msun/src/s_fmaf.c
  head/lib/msun/src/s_fmal.c

Modified: head/lib/msun/src/s_fma.c
==============================================================================
--- head/lib/msun/src/s_fma.c	Fri Oct 14 22:52:46 2011	(r226370)
+++ head/lib/msun/src/s_fma.c	Sat Oct 15 04:16:58 2011	(r226371)
@@ -31,6 +31,8 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
+#include "math_private.h"
+
 /*
  * A struct dd represents a floating-point number with twice the precision
  * of a double.  We maintain the invariant that "hi" stores the 53 high-order
@@ -59,6 +61,73 @@ dd_add(double a, double b)
 }
 
 /*
+ * Compute a+b, with a small tweak:  The least significant bit of the
+ * result is adjusted into a sticky bit summarizing all the bits that
+ * were lost to rounding.  This adjustment negates the effects of double
+ * rounding when the result is added to another number with a higher
+ * exponent.  For an explanation of round and sticky bits, see any reference
+ * on FPU design, e.g.,
+ *
+ *     J. Coonen.  An Implementation Guide to a Proposed Standard for
+ *     Floating-Point Arithmetic.  Computer, vol. 13, no. 1, Jan 1980.
+ */
+static inline double
+add_adjusted(double a, double b)
+{
+	struct dd sum;
+	uint64_t hibits, lobits;
+
+	sum = dd_add(a, b);
+	if (sum.lo != 0) {
+		EXTRACT_WORD64(hibits, sum.hi);
+		if ((hibits & 1) == 0) {
+			/* hibits += (int)copysign(1.0, sum.hi * sum.lo) */
+			EXTRACT_WORD64(lobits, sum.lo);
+			hibits += 1 - ((hibits ^ lobits) >> 62);
+			INSERT_WORD64(sum.hi, hibits);
+		}
+	}
+	return (sum.hi);
+}
+
+/*
+ * Compute ldexp(a+b, scale) with a single rounding error. It is assumed
+ * that the result will be subnormal, and care is taken to ensure that
+ * double rounding does not occur.
+ */
+static inline double
+add_and_denormalize(double a, double b, int scale)
+{
+	struct dd sum;
+	uint64_t hibits, lobits;
+	int bits_lost;
+
+	sum = dd_add(a, b);
+
+	/*
+	 * If we are losing at least two bits of accuracy to denormalization,
+	 * then the first lost bit becomes a round bit, and we adjust the
+	 * lowest bit of sum.hi to make it a sticky bit summarizing all the
+	 * bits in sum.lo. With the sticky bit adjusted, the hardware will
+	 * break any ties in the correct direction.
+	 *
+	 * If we are losing only one bit to denormalization, however, we must
+	 * break the ties manually.
+	 */
+	if (sum.lo != 0) {
+		EXTRACT_WORD64(hibits, sum.hi);
+		bits_lost = -((int)(hibits >> 52) & 0x7ff) - scale + 1;
+		if (bits_lost != 1 ^ (int)(hibits & 1)) {
+			/* hibits += (int)copysign(1.0, sum.hi * sum.lo) */
+			EXTRACT_WORD64(lobits, sum.lo);
+			hibits += 1 - (((hibits ^ lobits) >> 62) & 2);
+			INSERT_WORD64(sum.hi, hibits);
+		}
+	}
+	return (ldexp(sum.hi, scale));
+}
+
+/*
  * Compute a*b exactly, returning the exact result in a struct dd.  We assume
  * that both a and b are normalized, so no underflow or overflow will occur.
  * The current rounding mode must be round-to-nearest.
@@ -105,14 +174,11 @@ dd_mul(double a, double b)
  * Hardware instructions should be used on architectures that support it,
  * since this implementation will likely be several times slower.
  */
-#if LDBL_MANT_DIG != 113
 double
 fma(double x, double y, double z)
 {
-	double xs, ys, zs;
-	struct dd xy, r, r2;
-	double p;
-	double s;
+	double xs, ys, zs, adj;
+	struct dd xy, r;
 	int oround;
 	int ex, ey, ez;
 	int spread;
@@ -142,41 +208,6 @@ fma(double x, double y, double z)
 	 * will overflow, so we handle these cases specially.  Rounding
 	 * modes other than FE_TONEAREST are painful.
 	 */
-	if (spread > DBL_MANT_DIG * 2) {
-		fenv_t env;
-		feraiseexcept(FE_INEXACT);
-		switch(oround) {
-		case FE_TONEAREST:
-			return (x * y);
-		case FE_TOWARDZERO:
-			if (x > 0.0 ^ y < 0.0 ^ z < 0.0)
-				return (x * y);
-			feholdexcept(&env);
-			s = x * y;
-			if (!fetestexcept(FE_INEXACT))
-				s = nextafter(s, 0);
-			feupdateenv(&env);
-			return (s);
-		case FE_DOWNWARD:
-			if (z > 0.0)
-				return (x * y);
-			feholdexcept(&env);
-			s = x * y;
-			if (!fetestexcept(FE_INEXACT))
-				s = nextafter(s, -INFINITY);
-			feupdateenv(&env);
-			return (s);
-		default:	/* FE_UPWARD */
-			if (z < 0.0)
-				return (x * y);
-			feholdexcept(&env);
-			s = x * y;
-			if (!fetestexcept(FE_INEXACT))
-				s = nextafter(s, INFINITY);
-			feupdateenv(&env);
-			return (s);
-		}
-	}
 	if (spread < -DBL_MANT_DIG) {
 		feraiseexcept(FE_INEXACT);
 		if (!isnormal(z))
@@ -201,42 +232,52 @@ fma(double x, double y, double z)
 				return (z);
 		}
 	}
+	if (spread <= DBL_MANT_DIG * 2)
+		zs = ldexp(zs, -spread);
+	else
+		zs = copysign(DBL_MIN, zs);
 
 	fesetround(FE_TONEAREST);
 
+	/*
+	 * Basic approach for round-to-nearest:
+	 *
+	 *     (xy.hi, xy.lo) = x * y		(exact)
+	 *     (r.hi, r.lo)   = xy.hi + z	(exact)
+	 *     adj = xy.lo + r.lo		(inexact; low bit is sticky)
+	 *     result = r.hi + adj		(correctly rounded)
+	 */
 	xy = dd_mul(xs, ys);
-	zs = ldexp(zs, -spread);
 	r = dd_add(xy.hi, zs);
-	r.lo += xy.lo;
 
-	spread = ex + ey;
-	if (spread + ilogb(r.hi) > -1023) {
+	if (r.hi == 0.0) {
+		/*
+		 * When the addends cancel to 0, ensure that the result has
+		 * the correct sign.
+		 */
 		fesetround(oround);
-		r.hi = r.hi + r.lo;
-	} else {
+		volatile double vzs = zs; /* XXX gcc CSE bug workaround */
+		return (xy.hi + vzs);
+	}
+
+	spread = ex + ey;
+
+	if (oround != FE_TONEAREST) {
 		/*
-		 * The result is subnormal, so we round before scaling to
-		 * avoid double rounding.
+		 * There is no need to worry about double rounding in directed
+		 * rounding modes.
 		 */
-		p = ldexp(copysign(0x1p-1022, r.hi), -spread);
-		r2 = dd_add(r.hi, p);
-		r2.lo += r.lo;
 		fesetround(oround);
-		r.hi = (r2.hi + r2.lo) - p;
+		adj = r.lo + xy.lo;
+		return (ldexp(r.hi + adj, spread));
 	}
-	return (ldexp(r.hi, spread));
-}
-#else	/* LDBL_MANT_DIG == 113 */
-/*
- * 113 bits of precision is more than twice the precision of a double,
- * so it is enough to represent the intermediate product exactly.
- */
-double
-fma(double x, double y, double z)
-{
-	return ((long double)x * y + z);
+
+	adj = add_adjusted(r.lo, xy.lo);
+	if (spread + ilogb(r.hi) > -1023)
+		return (ldexp(r.hi + adj, spread));
+	else
+		return (add_and_denormalize(r.hi, adj, spread));
 }
-#endif	/* LDBL_MANT_DIG != 113 */
 
 #if (LDBL_MANT_DIG == 53)
 __weak_reference(fma, fmal);

Modified: head/lib/msun/src/s_fmaf.c
==============================================================================
--- head/lib/msun/src/s_fmaf.c	Fri Oct 14 22:52:46 2011	(r226370)
+++ head/lib/msun/src/s_fmaf.c	Sat Oct 15 04:16:58 2011	(r226371)
@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 2005 David Schultz 
+ * Copyright (c) 2005-2011 David Schultz 
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -27,23 +27,43 @@
 #include 
 __FBSDID("$FreeBSD$");
 
+#include 
+
 #include "math.h"
+#include "math_private.h"
 
 /*
  * Fused multiply-add: Compute x * y + z with a single rounding error.
  *
  * A double has more than twice as much precision than a float, so
- * direct double-precision arithmetic suffices.
- *
- * XXX We are relying on the compiler to convert from double to float
- *     using the current rounding mode and with the appropriate
- *     side-effects.  But on at least one platform (gcc 3.4.2/sparc64),
- *     this appears to be too much to ask for.  The precision
- *     reduction should be done manually.
+ * direct double-precision arithmetic suffices, except where double
+ * rounding occurs.
  */
 float
 fmaf(float x, float y, float z)
 {
+	double xy, result;
+	uint32_t hr, lr;
+
+	xy = (double)x * y;
+	result = xy + z;
+	EXTRACT_WORDS(hr, lr, result);
+	/* Common case: The double precision result is fine. */
+	if ((lr & 0x1fffffff) != 0x10000000 ||	/* not a halfway case */
+	    (hr & 0x7ff00000) == 0x7ff00000 ||	/* NaN */
+	    result - xy == z ||			/* exact */
+	    fegetround() != FE_TONEAREST)	/* not round-to-nearest */
+		return (result);
 
-	return ((double)x * y + z);
+	/*
+	 * If result is inexact, and exactly halfway between two float values,
+	 * we need to adjust the low-order bit in the direction of the error.
+	 */
+	fesetround(FE_TOWARDZERO);
+	volatile double vxy = xy;  /* XXX work around gcc CSE bug */
+	double adjusted_result = vxy + z;
+	fesetround(FE_TONEAREST);
+	if (result == adjusted_result)
+		SET_LOW_WORD(adjusted_result, lr + 1);
+	return (adjusted_result);
 }

Modified: head/lib/msun/src/s_fmal.c
==============================================================================
--- head/lib/msun/src/s_fmal.c	Fri Oct 14 22:52:46 2011	(r226370)
+++ head/lib/msun/src/s_fmal.c	Sat Oct 15 04:16:58 2011	(r226371)
@@ -31,6 +31,8 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
+#include "fpmath.h"
+
 /*
  * A struct dd represents a floating-point number with twice the precision
  * of a long double.  We maintain the invariant that "hi" stores the high-order
@@ -59,6 +61,65 @@ dd_add(long double a, long double b)
 }
 
 /*
+ * Compute a+b, with a small tweak:  The least significant bit of the
+ * result is adjusted into a sticky bit summarizing all the bits that
+ * were lost to rounding.  This adjustment negates the effects of double
+ * rounding when the result is added to another number with a higher
+ * exponent.  For an explanation of round and sticky bits, see any reference
+ * on FPU design, e.g.,
+ *
+ *     J. Coonen.  An Implementation Guide to a Proposed Standard for
+ *     Floating-Point Arithmetic.  Computer, vol. 13, no. 1, Jan 1980.
+ */
+static inline long double
+add_adjusted(long double a, long double b)
+{
+	struct dd sum;
+	union IEEEl2bits u;
+
+	sum = dd_add(a, b);
+	if (sum.lo != 0) {
+		u.e = sum.hi;
+		if ((u.bits.manl & 1) == 0)
+			sum.hi = nextafterl(sum.hi, INFINITY * sum.lo);
+	}
+	return (sum.hi);
+}
+
+/*
+ * Compute ldexp(a+b, scale) with a single rounding error. It is assumed
+ * that the result will be subnormal, and care is taken to ensure that
+ * double rounding does not occur.
+ */
+static inline long double
+add_and_denormalize(long double a, long double b, int scale)
+{
+	struct dd sum;
+	int bits_lost;
+	union IEEEl2bits u;
+
+	sum = dd_add(a, b);
+
+	/*
+	 * If we are losing at least two bits of accuracy to denormalization,
+	 * then the first lost bit becomes a round bit, and we adjust the
+	 * lowest bit of sum.hi to make it a sticky bit summarizing all the
+	 * bits in sum.lo. With the sticky bit adjusted, the hardware will
+	 * break any ties in the correct direction.
+	 *
+	 * If we are losing only one bit to denormalization, however, we must
+	 * break the ties manually.
+	 */
+	if (sum.lo != 0) {
+		u.e = sum.hi;
+		bits_lost = -u.bits.exp - scale + 1;
+		if (bits_lost != 1 ^ (int)(u.bits.manl & 1))
+			sum.hi = nextafterl(sum.hi, INFINITY * sum.lo);
+	}
+	return (ldexp(sum.hi, scale));
+}
+
+/*
  * Compute a*b exactly, returning the exact result in a struct dd.  We assume
  * that both a and b are normalized, so no underflow or overflow will occur.
  * The current rounding mode must be round-to-nearest.
@@ -104,10 +165,8 @@ dd_mul(long double a, long double b)
 long double
 fmal(long double x, long double y, long double z)
 {
-	long double xs, ys, zs;
-	struct dd xy, r, r2;
-	long double p;
-	long double s;
+	long double xs, ys, zs, adj;
+	struct dd xy, r;
 	int oround;
 	int ex, ey, ez;
 	int spread;
@@ -137,41 +196,6 @@ fmal(long double x, long double y, long 
 	 * will overflow, so we handle these cases specially.  Rounding
 	 * modes other than FE_TONEAREST are painful.
 	 */
-	if (spread > LDBL_MANT_DIG * 2) {
-		fenv_t env;
-		feraiseexcept(FE_INEXACT);
-		switch(oround) {
-		case FE_TONEAREST:
-			return (x * y);
-		case FE_TOWARDZERO:
-			if (x > 0.0 ^ y < 0.0 ^ z < 0.0)
-				return (x * y);
-			feholdexcept(&env);
-			s = x * y;
-			if (!fetestexcept(FE_INEXACT))
-				s = nextafterl(s, 0);
-			feupdateenv(&env);
-			return (s);
-		case FE_DOWNWARD:
-			if (z > 0.0)
-				return (x * y);
-			feholdexcept(&env);
-			s = x * y;
-			if (!fetestexcept(FE_INEXACT))
-				s = nextafterl(s, -INFINITY);
-			feupdateenv(&env);
-			return (s);
-		default:	/* FE_UPWARD */
-			if (z < 0.0)
-				return (x * y);
-			feholdexcept(&env);
-			s = x * y;
-			if (!fetestexcept(FE_INEXACT))
-				s = nextafterl(s, INFINITY);
-			feupdateenv(&env);
-			return (s);
-		}
-	}
 	if (spread < -LDBL_MANT_DIG) {
 		feraiseexcept(FE_INEXACT);
 		if (!isnormal(z))
@@ -196,28 +220,49 @@ fmal(long double x, long double y, long 
 				return (z);
 		}
 	}
+	if (spread <= LDBL_MANT_DIG * 2)
+		zs = ldexpl(zs, -spread);
+	else
+		zs = copysignl(LDBL_MIN, zs);
 
 	fesetround(FE_TONEAREST);
 
+	/*
+	 * Basic approach for round-to-nearest:
+	 *
+	 *     (xy.hi, xy.lo) = x * y		(exact)
+	 *     (r.hi, r.lo)   = xy.hi + z	(exact)
+	 *     adj = xy.lo + r.lo		(inexact; low bit is sticky)
+	 *     result = r.hi + adj		(correctly rounded)
+	 */
 	xy = dd_mul(xs, ys);
-	zs = ldexpl(zs, -spread);
 	r = dd_add(xy.hi, zs);
-	r.lo += xy.lo;
 
-	spread = ex + ey;
-	if (spread + ilogbl(r.hi) > -16383) {
+	if (r.hi == 0.0) {
+		/*
+		 * When the addends cancel to 0, ensure that the result has
+		 * the correct sign.
+		 */
 		fesetround(oround);
-		r.hi = r.hi + r.lo;
-	} else {
+		volatile long double vzs = zs; /* XXX gcc CSE bug workaround */
+		return (xy.hi + vzs);
+	}
+
+	spread = ex + ey;
+
+	if (oround != FE_TONEAREST) {
 		/*
-		 * The result is subnormal, so we round before scaling to
-		 * avoid double rounding.
+		 * There is no need to worry about double rounding in directed
+		 * rounding modes.
 		 */
-		p = ldexpl(copysignl(0x1p-16382L, r.hi), -spread);
-		r2 = dd_add(r.hi, p);
-		r2.lo += r.lo;
 		fesetround(oround);
-		r.hi = (r2.hi + r2.lo) - p;
+		adj = r.lo + xy.lo;
+		return (ldexpl(r.hi + adj, spread));
 	}
-	return (ldexpl(r.hi, spread));
+
+	adj = add_adjusted(r.lo, xy.lo);
+	if (spread + ilogbl(r.hi) > -16383)
+		return (ldexpl(r.hi + adj, spread));
+	else
+		return (add_and_denormalize(r.hi, adj, spread));
 }

From owner-svn-src-all@FreeBSD.ORG  Sat Oct 15 04:17:20 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id EC4921065688;
	Sat, 15 Oct 2011 04:17:20 +0000 (UTC) (envelope-from das@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id DBBA08FC13;
	Sat, 15 Oct 2011 04:17:20 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9F4HK5N094455;
	Sat, 15 Oct 2011 04:17:20 GMT (envelope-from das@svn.freebsd.org)
Received: (from das@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9F4HKC2094453;
	Sat, 15 Oct 2011 04:17:20 GMT (envelope-from das@svn.freebsd.org)
Message-Id: <201110150417.p9F4HKC2094453@svn.freebsd.org>
From: David Schultz 
Date: Sat, 15 Oct 2011 04:17:20 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226372 - head/lib/msun/i387
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 15 Oct 2011 04:17:21 -0000

Author: das
Date: Sat Oct 15 04:17:20 2011
New Revision: 226372
URL: http://svn.freebsd.org/changeset/base/226372

Log:
  Replace two lines accidentally removed in r226218. Thanks to bde
  for noticing this.

Modified:
  head/lib/msun/i387/fenv.c

Modified: head/lib/msun/i387/fenv.c
==============================================================================
--- head/lib/msun/i387/fenv.c	Sat Oct 15 04:16:58 2011	(r226371)
+++ head/lib/msun/i387/fenv.c	Sat Oct 15 04:17:20 2011	(r226372)
@@ -223,3 +223,6 @@ __fedisableexcept(int mask)
 	}
 	return (~omask);
 }
+
+__weak_reference(__feenableexcept, feenableexcept);
+__weak_reference(__fedisableexcept, fedisableexcept);

From owner-svn-src-all@FreeBSD.ORG  Sat Oct 15 04:22:56 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 11E34106566B;
	Sat, 15 Oct 2011 04:22:56 +0000 (UTC) (envelope-from das@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 0163A8FC14;
	Sat, 15 Oct 2011 04:22:56 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9F4Mt6I094663;
	Sat, 15 Oct 2011 04:22:55 GMT (envelope-from das@svn.freebsd.org)
Received: (from das@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9F4Mtfu094661;
	Sat, 15 Oct 2011 04:22:55 GMT (envelope-from das@svn.freebsd.org)
Message-Id: <201110150422.p9F4Mtfu094661@svn.freebsd.org>
From: David Schultz 
Date: Sat, 15 Oct 2011 04:22:55 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226373 - head/lib/msun/src
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 15 Oct 2011 04:22:56 -0000

Author: das
Date: Sat Oct 15 04:22:55 2011
New Revision: 226373
URL: http://svn.freebsd.org/changeset/base/226373

Log:
  Add INSERT_WORD64 and EXTRACT_WORD64 macros for use in s_fma.c.

Modified:
  head/lib/msun/src/math_private.h

Modified: head/lib/msun/src/math_private.h
==============================================================================
--- head/lib/msun/src/math_private.h	Sat Oct 15 04:17:20 2011	(r226372)
+++ head/lib/msun/src/math_private.h	Sat Oct 15 04:22:55 2011	(r226373)
@@ -58,6 +58,10 @@ typedef union
     u_int32_t msw;
     u_int32_t lsw;
   } parts;
+  struct
+  {
+    u_int64_t w;
+  } xparts;
 } ieee_double_shape_type;
 
 #endif
@@ -72,6 +76,10 @@ typedef union
     u_int32_t lsw;
     u_int32_t msw;
   } parts;
+  struct
+  {
+    u_int64_t w;
+  } xparts;
 } ieee_double_shape_type;
 
 #endif
@@ -86,6 +94,14 @@ do {								\
   (ix1) = ew_u.parts.lsw;					\
 } while (0)
 
+/* Get a 64-bit int from a double. */
+#define EXTRACT_WORD64(ix,d)					\
+do {								\
+  ieee_double_shape_type ew_u;					\
+  ew_u.value = (d);						\
+  (ix) = ew_u.xparts.w;						\
+} while (0)
+
 /* Get the more significant 32 bit int from a double.  */
 
 #define GET_HIGH_WORD(i,d)					\
@@ -114,6 +130,14 @@ do {								\
   (d) = iw_u.value;						\
 } while (0)
 
+/* Set a double from a 64-bit int. */
+#define INSERT_WORD64(d,ix)					\
+do {								\
+  ieee_double_shape_type iw_u;					\
+  iw_u.xparts.w = (ix);						\
+  (d) = iw_u.value;						\
+} while (0)
+
 /* Set the more significant 32 bits of a double from an int.  */
 
 #define SET_HIGH_WORD(d,v)					\

From owner-svn-src-all@FreeBSD.ORG  Sat Oct 15 04:24:55 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 386F6106564A;
	Sat, 15 Oct 2011 04:24:55 +0000 (UTC) (envelope-from das@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 27F908FC0C;
	Sat, 15 Oct 2011 04:24:55 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9F4OtBh094794;
	Sat, 15 Oct 2011 04:24:55 GMT (envelope-from das@svn.freebsd.org)
Received: (from das@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9F4OtOo094792;
	Sat, 15 Oct 2011 04:24:55 GMT (envelope-from das@svn.freebsd.org)
Message-Id: <201110150424.p9F4OtOo094792@svn.freebsd.org>
From: David Schultz 
Date: Sat, 15 Oct 2011 04:24:55 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226374 - head/lib/msun/src
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 15 Oct 2011 04:24:55 -0000

Author: das
Date: Sat Oct 15 04:24:54 2011
New Revision: 226374
URL: http://svn.freebsd.org/changeset/base/226374

Log:
  Don't define FP_FAST_FMA on sparc64; with the recent fixes, fma() is
  no longer "fast" on sparc64.  (It really wasn't to begin with, since
  the old implementation was using long doubles, and long doubles are
  emulated in software on sparc64.)

Modified:
  head/lib/msun/src/math.h

Modified: head/lib/msun/src/math.h
==============================================================================
--- head/lib/msun/src/math.h	Sat Oct 15 04:22:55 2011	(r226373)
+++ head/lib/msun/src/math.h	Sat Oct 15 04:24:54 2011	(r226374)
@@ -68,14 +68,11 @@ extern const union __nan_un {
 #define	MATH_ERREXCEPT	2
 #define	math_errhandling	MATH_ERREXCEPT
 
-/* XXX We need a . */
-#if defined(__ia64__) || defined(__sparc64__)
-#define	FP_FAST_FMA	1
-#endif
+#define	FP_FAST_FMAF	1
 #ifdef __ia64__
+#define	FP_FAST_FMA	1
 #define	FP_FAST_FMAL	1
 #endif
-#define	FP_FAST_FMAF	1
 
 /* Symbolic constants to classify floating point numbers. */
 #define	FP_INFINITE	0x01

From owner-svn-src-all@FreeBSD.ORG  Sat Oct 15 05:00:57 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 206AC1065673;
	Sat, 15 Oct 2011 05:00:57 +0000 (UTC) (envelope-from das@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 057FC8FC0A;
	Sat, 15 Oct 2011 05:00:57 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9F50u54095994;
	Sat, 15 Oct 2011 05:00:56 GMT (envelope-from das@svn.freebsd.org)
Received: (from das@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9F50ubA095989;
	Sat, 15 Oct 2011 05:00:56 GMT (envelope-from das@svn.freebsd.org)
Message-Id: <201110150500.p9F50ubA095989@svn.freebsd.org>
From: David Schultz 
Date: Sat, 15 Oct 2011 05:00:56 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226375 - head/lib/msun/src
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 15 Oct 2011 05:00:57 -0000

Author: das
Date: Sat Oct 15 05:00:56 2011
New Revision: 226375
URL: http://svn.freebsd.org/changeset/base/226375

Log:
  Style fixes and updates to comments.
  
  Submitted by:	bde

Modified:
  head/lib/msun/src/e_log10.c
  head/lib/msun/src/e_log10f.c
  head/lib/msun/src/e_log2.c
  head/lib/msun/src/e_log2f.c

Modified: head/lib/msun/src/e_log10.c
==============================================================================
--- head/lib/msun/src/e_log10.c	Sat Oct 15 04:24:54 2011	(r226374)
+++ head/lib/msun/src/e_log10.c	Sat Oct 15 05:00:56 2011	(r226375)
@@ -15,7 +15,8 @@
 __FBSDID("$FreeBSD$");
 
 /*
- * Return the base 10 logarithm of x. See k_log.c for details on the algorithm.
+ * Return the base 10 logarithm of x.  See e_log.c and k_log.h for most
+ * comments.
  */
 
 #include "math.h"
@@ -40,14 +41,14 @@ __ieee754_log10(double x)
 
 	EXTRACT_WORDS(hx,lx,x);
 
-        k=0;
-        if (hx < 0x00100000) {                  /* x < 2**-1022  */
-            if (((hx&0x7fffffff)|lx)==0)
-                return -two54/zero;             /* log(+-0)=-inf */
-            if (hx<0) return (x-x)/zero;        /* log(-#) = NaN */
-            k -= 54; x *= two54; /* subnormal number, scale up x */
+	k=0;
+	if (hx < 0x00100000) {			/* x < 2**-1022  */
+	    if (((hx&0x7fffffff)|lx)==0)
+		return -two54/zero;		/* log(+-0)=-inf */
+	    if (hx<0) return (x-x)/zero;	/* log(-#) = NaN */
+	    k -= 54; x *= two54; /* subnormal number, scale up x */
 	    GET_HIGH_WORD(hx,x);
-        }
+	}
 	if (hx >= 0x7ff00000) return x+x;
 	k += (hx>>20)-1023;
 	hx &= 0x000fffff;

Modified: head/lib/msun/src/e_log10f.c
==============================================================================
--- head/lib/msun/src/e_log10f.c	Sat Oct 15 04:24:54 2011	(r226374)
+++ head/lib/msun/src/e_log10f.c	Sat Oct 15 05:00:56 2011	(r226375)
@@ -13,7 +13,7 @@
 __FBSDID("$FreeBSD$");
 
 /*
- * Return the base 10 logarithm of x. See k_log.c for details on the algorithm.
+ * Float version of e_log10.c.  See the latter for most comments.
  */
 
 #include "math.h"
@@ -37,14 +37,14 @@ __ieee754_log10f(float x)
 
 	GET_FLOAT_WORD(hx,x);
 
-        k=0;
-        if (hx < 0x00800000) {                  /* x < 2**-126  */
-            if ((hx&0x7fffffff)==0)
-                return -two25/zero;             /* log(+-0)=-inf */
-            if (hx<0) return (x-x)/zero;        /* log(-#) = NaN */
-            k -= 25; x *= two25; /* subnormal number, scale up x */
+	k=0;
+	if (hx < 0x00800000) {			/* x < 2**-126  */
+	    if ((hx&0x7fffffff)==0)
+		return -two25/zero;		/* log(+-0)=-inf */
+	    if (hx<0) return (x-x)/zero;	/* log(-#) = NaN */
+	    k -= 25; x *= two25; /* subnormal number, scale up x */
 	    GET_FLOAT_WORD(hx,x);
-        }
+	}
 	if (hx >= 0x7f800000) return x+x;
 	k += (hx>>23)-127;
 	hx &= 0x007fffff;

Modified: head/lib/msun/src/e_log2.c
==============================================================================
--- head/lib/msun/src/e_log2.c	Sat Oct 15 04:24:54 2011	(r226374)
+++ head/lib/msun/src/e_log2.c	Sat Oct 15 05:00:56 2011	(r226375)
@@ -15,7 +15,8 @@
 __FBSDID("$FreeBSD$");
 
 /*
- * Return the base 2 logarithm of x. See k_log.c for details on the algorithm.
+ * Return the base 2 logarithm of x.  See e_log.c and k_log.h for most
+ * comments.
  */
 
 #include "math.h"
@@ -38,14 +39,14 @@ __ieee754_log2(double x)
 
 	EXTRACT_WORDS(hx,lx,x);
 
-        k=0;
-        if (hx < 0x00100000) {                  /* x < 2**-1022  */
-            if (((hx&0x7fffffff)|lx)==0)
-                return -two54/zero;             /* log(+-0)=-inf */
-            if (hx<0) return (x-x)/zero;        /* log(-#) = NaN */
-            k -= 54; x *= two54; /* subnormal number, scale up x */
+	k=0;
+	if (hx < 0x00100000) {			/* x < 2**-1022  */
+	    if (((hx&0x7fffffff)|lx)==0)
+		return -two54/zero;		/* log(+-0)=-inf */
+	    if (hx<0) return (x-x)/zero;	/* log(-#) = NaN */
+	    k -= 54; x *= two54; /* subnormal number, scale up x */
 	    GET_HIGH_WORD(hx,x);
-        }
+	}
 	if (hx >= 0x7ff00000) return x+x;
 	k += (hx>>20)-1023;
 	hx &= 0x000fffff;

Modified: head/lib/msun/src/e_log2f.c
==============================================================================
--- head/lib/msun/src/e_log2f.c	Sat Oct 15 04:24:54 2011	(r226374)
+++ head/lib/msun/src/e_log2f.c	Sat Oct 15 05:00:56 2011	(r226375)
@@ -13,7 +13,7 @@
 __FBSDID("$FreeBSD$");
 
 /*
- * Return the base 2 logarithm of x. See k_log.c for details on the algorithm.
+ * Float version of e_log2.c.  See the latter for most comments.
  */
 
 #include "math.h"
@@ -35,14 +35,14 @@ __ieee754_log2f(float x)
 
 	GET_FLOAT_WORD(hx,x);
 
-        k=0;
-        if (hx < 0x00800000) {                  /* x < 2**-126  */
-            if ((hx&0x7fffffff)==0)
-                return -two25/zero;             /* log(+-0)=-inf */
-            if (hx<0) return (x-x)/zero;        /* log(-#) = NaN */
-            k -= 25; x *= two25; /* subnormal number, scale up x */
+	k=0;
+	if (hx < 0x00800000) {			/* x < 2**-126  */
+	    if ((hx&0x7fffffff)==0)
+		return -two25/zero;		/* log(+-0)=-inf */
+	    if (hx<0) return (x-x)/zero;	/* log(-#) = NaN */
+	    k -= 25; x *= two25; /* subnormal number, scale up x */
 	    GET_FLOAT_WORD(hx,x);
-        }
+	}
 	if (hx >= 0x7f800000) return x+x;
 	k += (hx>>23)-127;
 	hx &= 0x007fffff;

From owner-svn-src-all@FreeBSD.ORG  Sat Oct 15 05:23:28 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C82F2106566B;
	Sat, 15 Oct 2011 05:23:28 +0000 (UTC) (envelope-from das@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id B68958FC08;
	Sat, 15 Oct 2011 05:23:28 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9F5NS5B096727;
	Sat, 15 Oct 2011 05:23:28 GMT (envelope-from das@svn.freebsd.org)
Received: (from das@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9F5NSGP096720;
	Sat, 15 Oct 2011 05:23:28 GMT (envelope-from das@svn.freebsd.org)
Message-Id: <201110150523.p9F5NSGP096720@svn.freebsd.org>
From: David Schultz 
Date: Sat, 15 Oct 2011 05:23:28 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226376 - head/lib/msun/src
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 15 Oct 2011 05:23:28 -0000

Author: das
Date: Sat Oct 15 05:23:28 2011
New Revision: 226376
URL: http://svn.freebsd.org/changeset/base/226376

Log:
  Various changes to improve the accuracy and speed of log{2,10}{,f}.
  - Rename __kernel_log() to k_log1p().
  - Move some of the work that was previously done in the kernel log into
    the callers.  This enables further refactoring to improve accuracy or
    speed, although I don't recall the details.
  - Use extra precision when adding the final scaling term, which improves
    accuracy.
  - Describe and work around compiler problems that break some of the
    multiprecision calculations.
  
  A fix for a small bug is also included:
  - Add a special case for log*(1).  This is needed to ensure that log*(1) == +0
    instead of -0, even when the rounding mode is FE_DOWNWARD.
  
  Submitted by:	bde

Modified:
  head/lib/msun/src/e_log10.c
  head/lib/msun/src/e_log10f.c
  head/lib/msun/src/e_log2.c
  head/lib/msun/src/e_log2f.c
  head/lib/msun/src/k_log.h
  head/lib/msun/src/k_logf.h

Modified: head/lib/msun/src/e_log10.c
==============================================================================
--- head/lib/msun/src/e_log10.c	Sat Oct 15 05:00:56 2011	(r226375)
+++ head/lib/msun/src/e_log10.c	Sat Oct 15 05:23:28 2011	(r226376)
@@ -17,6 +17,9 @@ __FBSDID("$FreeBSD$");
 /*
  * Return the base 10 logarithm of x.  See e_log.c and k_log.h for most
  * comments.
+ *
+ *    log10(x) = (f - 0.5*f*f + k_log1p(f)) / ln10 + k * log10(2)
+ * in not-quite-routine extra precision.
  */
 
 #include "math.h"
@@ -35,7 +38,7 @@ static const double zero   =  0.0;
 double
 __ieee754_log10(double x)
 {
-	double f,hi,lo,y,z;
+	double f,hfsq,hi,lo,r,val_hi,val_lo,w,y,y2;
 	int32_t i,k,hx;
 	u_int32_t lx;
 
@@ -50,16 +53,35 @@ __ieee754_log10(double x)
 	    GET_HIGH_WORD(hx,x);
 	}
 	if (hx >= 0x7ff00000) return x+x;
+	if (hx == 0x3ff00000 && lx == 0)
+	    return zero;			/* log(1) = +0 */
 	k += (hx>>20)-1023;
 	hx &= 0x000fffff;
 	i = (hx+0x95f64)&0x100000;
 	SET_HIGH_WORD(x,hx|(i^0x3ff00000));	/* normalize x or x/2 */
 	k += (i>>20);
 	y = (double)k;
-	f = __kernel_log(x);
-	hi = x = x - 1;
+	f = x - 1.0;
+	hfsq = 0.5*f*f;
+	r = k_log1p(f);
+
+	/* See e_log2.c for most details. */
+	hi = f - hfsq;
 	SET_LOW_WORD(hi,0);
-	lo = x - hi;
-	z = y*log10_2lo + (x+f)*ivln10lo + (lo+f)*ivln10hi + hi*ivln10hi;
-	return  z+y*log10_2hi;
+	lo = (f - hi) - hfsq + r;
+	val_hi = hi*ivln10hi;
+	y2 = y*log10_2hi;
+	val_lo = y*log10_2lo + (lo+hi)*ivln10lo + lo*ivln10hi;
+
+	/*
+	 * Extra precision in for adding y*log10_2hi is not strictly needed
+	 * since there is no very large cancellation near x = sqrt(2) or
+	 * x = 1/sqrt(2), but we do it anyway since it costs little on CPUs
+	 * with some parallelism and it reduces the error for many args.
+	 */
+	w = y2 + val_hi;
+	val_lo += (y2 - w) + val_hi;
+	val_hi = w;
+
+	return val_lo + val_hi;
 }

Modified: head/lib/msun/src/e_log10f.c
==============================================================================
--- head/lib/msun/src/e_log10f.c	Sat Oct 15 05:00:56 2011	(r226375)
+++ head/lib/msun/src/e_log10f.c	Sat Oct 15 05:23:28 2011	(r226376)
@@ -32,7 +32,7 @@ static const float zero   =  0.0;
 float
 __ieee754_log10f(float x)
 {
-	float f,hi,lo,y,z;
+	float f,hfsq,hi,lo,r,y,y2;
 	int32_t i,k,hx;
 
 	GET_FLOAT_WORD(hx,x);
@@ -46,17 +46,26 @@ __ieee754_log10f(float x)
 	    GET_FLOAT_WORD(hx,x);
 	}
 	if (hx >= 0x7f800000) return x+x;
+	if (hx == 0x3f800000)
+	    return zero;			/* log(1) = +0 */
 	k += (hx>>23)-127;
 	hx &= 0x007fffff;
 	i = (hx+(0x4afb0d))&0x800000;
 	SET_FLOAT_WORD(x,hx|(i^0x3f800000));	/* normalize x or x/2 */
 	k += (i>>23);
 	y = (float)k;
-	f = __kernel_logf(x);
-	x = x - (float)1.0;
-	GET_FLOAT_WORD(hx,x);
+	f = x - (float)1.0;
+	hfsq = (float)0.5*f*f;
+	r = k_log1pf(f);
+
+	/* See e_log2f.c and e_log2.c for details. */
+	if (sizeof(float_t) > sizeof(float))
+		return (r - hfsq + f) * ((float_t)ivln10lo + ivln10hi) +
+		    y * ((float_t)log10_2lo + log10_2hi);
+	hi = f - hfsq;
+	GET_FLOAT_WORD(hx,hi);
 	SET_FLOAT_WORD(hi,hx&0xfffff000);
-	lo = x - hi;
-	z = y*log10_2lo + (x+f)*ivln10lo + (lo+f)*ivln10hi + hi*ivln10hi;
-	return  z+y*log10_2hi;
+	lo = (f - hi) - hfsq + r;
+	return y*log10_2lo + (lo+hi)*ivln10lo + lo*ivln10hi + hi*ivln10hi +
+	    y*log10_2hi;
 }

Modified: head/lib/msun/src/e_log2.c
==============================================================================
--- head/lib/msun/src/e_log2.c	Sat Oct 15 05:00:56 2011	(r226375)
+++ head/lib/msun/src/e_log2.c	Sat Oct 15 05:23:28 2011	(r226376)
@@ -17,6 +17,11 @@ __FBSDID("$FreeBSD$");
 /*
  * Return the base 2 logarithm of x.  See e_log.c and k_log.h for most
  * comments.
+ *
+ * This reduces x to {k, 1+f} exactly as in e_log.c, then calls the kernel,
+ * then does the combining and scaling steps
+ *    log2(x) = (f - 0.5*f*f + k_log1p(f)) / ln2 + k
+ * in not-quite-routine extra precision.
  */
 
 #include "math.h"
@@ -33,7 +38,7 @@ static const double zero   =  0.0;
 double
 __ieee754_log2(double x)
 {
-	double f,hi,lo;
+	double f,hfsq,hi,lo,r,val_hi,val_lo,w,y;
 	int32_t i,k,hx;
 	u_int32_t lx;
 
@@ -48,14 +53,58 @@ __ieee754_log2(double x)
 	    GET_HIGH_WORD(hx,x);
 	}
 	if (hx >= 0x7ff00000) return x+x;
+	if (hx == 0x3ff00000 && lx == 0)
+	    return zero;			/* log(1) = +0 */
 	k += (hx>>20)-1023;
 	hx &= 0x000fffff;
 	i = (hx+0x95f64)&0x100000;
 	SET_HIGH_WORD(x,hx|(i^0x3ff00000));	/* normalize x or x/2 */
 	k += (i>>20);
-	f = __kernel_log(x);
-	hi = x = x - 1;
+	y = (double)k;
+	f = x - 1.0;
+	hfsq = 0.5*f*f;
+	r = k_log1p(f);
+
+	/*
+	 * f-hfsq must (for args near 1) be evaluated in extra precision
+	 * to avoid a large cancellation when x is near sqrt(2) or 1/sqrt(2).
+	 * This is fairly efficient since f-hfsq only depends on f, so can
+	 * be evaluated in parallel with R.  Not combining hfsq with R also
+	 * keeps R small (though not as small as a true `lo' term would be),
+	 * so that extra precision is not needed for terms involving R.
+	 *
+	 * Compiler bugs involving extra precision used to break Dekker's
+	 * theorem for spitting f-hfsq as hi+lo, unless double_t was used
+	 * or the multi-precision calculations were avoided when double_t
+	 * has extra precision.  These problems are now automatically
+	 * avoided as a side effect of the optimization of combining the
+	 * Dekker splitting step with the clear-low-bits step.
+	 *
+	 * y must (for args near sqrt(2) and 1/sqrt(2)) be added in extra
+	 * precision to avoid a very large cancellation when x is very near
+	 * these values.  Unlike the above cancellations, this problem is
+	 * specific to base 2.  It is strange that adding +-1 is so much
+	 * harder than adding +-ln2 or +-log10_2.
+	 *
+	 * This uses Dekker's theorem to normalize y+val_hi, so the
+	 * compiler bugs are back in some configurations, sigh.  And I
+	 * don't want to used double_t to avoid them, since that gives a
+	 * pessimization and the support for avoiding the pessimization
+	 * is not yet available.
+	 *
+	 * The multi-precision calculations for the multiplications are
+	 * routine.
+	 */
+	hi = f - hfsq;
 	SET_LOW_WORD(hi,0);
-	lo = x - hi;
-	return (x+f)*ivln2lo + (lo+f)*ivln2hi + hi*ivln2hi + k;
+	lo = (f - hi) - hfsq + r;
+	val_hi = hi*ivln2hi;
+	val_lo = (lo+hi)*ivln2lo + lo*ivln2hi;
+
+	/* spadd(val_hi, val_lo, y), except for not using double_t: */
+	w = y + val_hi;
+	val_lo += (y - w) + val_hi;
+	val_hi = w;
+
+	return val_lo + val_hi;
 }

Modified: head/lib/msun/src/e_log2f.c
==============================================================================
--- head/lib/msun/src/e_log2f.c	Sat Oct 15 05:00:56 2011	(r226375)
+++ head/lib/msun/src/e_log2f.c	Sat Oct 15 05:23:28 2011	(r226376)
@@ -30,7 +30,7 @@ static const float zero   =  0.0;
 float
 __ieee754_log2f(float x)
 {
-	float f,hi,lo;
+	float f,hfsq,hi,lo,r,y;
 	int32_t i,k,hx;
 
 	GET_FLOAT_WORD(hx,x);
@@ -44,15 +44,38 @@ __ieee754_log2f(float x)
 	    GET_FLOAT_WORD(hx,x);
 	}
 	if (hx >= 0x7f800000) return x+x;
+	if (hx == 0x3f800000)
+	    return zero;			/* log(1) = +0 */
 	k += (hx>>23)-127;
 	hx &= 0x007fffff;
 	i = (hx+(0x4afb0d))&0x800000;
 	SET_FLOAT_WORD(x,hx|(i^0x3f800000));	/* normalize x or x/2 */
 	k += (i>>23);
-	f = __kernel_logf(x);
-	x = x - (float)1.0;
-	GET_FLOAT_WORD(hx,x);
+	y = (float)k;
+	f = x - (float)1.0;
+	hfsq = (float)0.5*f*f;
+	r = k_log1pf(f);
+
+	/*
+	 * We no longer need to avoid falling into the multi-precision
+	 * calculations due to compiler bugs breaking Dekker's theorem.
+	 * Keep avoiding this as an optimization.  See e_log2.c for more
+	 * details (some details are here only because the optimization
+	 * is not yet available in double precision).
+	 *
+	 * Another compiler bug turned up.  With gcc on i386,
+	 * (ivln2lo + ivln2hi) would be evaluated in float precision
+	 * despite runtime evaluations using double precision.  So we
+	 * must cast one of its terms to float_t.  This makes the whole
+	 * expression have type float_t, so return is forced to waste
+	 * time clobbering its extra precision.
+	 */
+	if (sizeof(float_t) > sizeof(float))
+		return (r - hfsq + f) * ((float_t)ivln2lo + ivln2hi) + y;
+
+	hi = f - hfsq;
+	GET_FLOAT_WORD(hx,hi);
 	SET_FLOAT_WORD(hi,hx&0xfffff000);
-	lo = x - hi;
-	return (x+f)*ivln2lo + (lo+f)*ivln2hi + hi*ivln2hi + k;
+	lo = (f - hi) - hfsq + r;
+	return (lo+hi)*ivln2lo + lo*ivln2hi + hi*ivln2hi + y;
 }

Modified: head/lib/msun/src/k_log.h
==============================================================================
--- head/lib/msun/src/k_log.h	Sat Oct 15 05:00:56 2011	(r226375)
+++ head/lib/msun/src/k_log.h	Sat Oct 15 05:23:28 2011	(r226376)
@@ -14,8 +14,9 @@
 #include 
 __FBSDID("$FreeBSD$");
 
-/* __kernel_log(x)
- * Return log(x) - (x-1) for x in ~[sqrt(2)/2, sqrt(2)].
+/*
+ * k_log1p(f):
+ * Return log(1+f) - f for 1+f in ~[sqrt(2)/2, sqrt(2)].
  *
  * The following describes the overall strategy for computing
  * logarithms in base e.  The argument reduction and adding the final
@@ -80,37 +81,20 @@ Lg6 = 1.531383769920937332e-01,  /* 3FC3
 Lg7 = 1.479819860511658591e-01;  /* 3FC2F112 DF3E5244 */
 
 /*
- * We always inline __kernel_log(), since doing so produces a
+ * We always inline k_log1p(), since doing so produces a
  * substantial performance improvement (~40% on amd64).
  */
 static inline double
-__kernel_log(double x)
+k_log1p(double f)
 {
-	double hfsq,f,s,z,R,w,t1,t2;
-	int32_t hx,i,j;
-	u_int32_t lx;
-
-	EXTRACT_WORDS(hx,lx,x);
+	double hfsq,s,z,R,w,t1,t2;
 
-	f = x-1.0;
-	if((0x000fffff&(2+hx))<3) {	/* -2**-20 <= f < 2**-20 */
-	    if(f==0.0) return 0.0;
-	    return f*f*(0.33333333333333333*f-0.5);
-	}
- 	s = f/(2.0+f); 
+ 	s = f/(2.0+f);
 	z = s*s;
-	hx &= 0x000fffff;
-	i = hx-0x6147a;
 	w = z*z;
-	j = 0x6b851-hx;
-	t1= w*(Lg2+w*(Lg4+w*Lg6)); 
-	t2= z*(Lg1+w*(Lg3+w*(Lg5+w*Lg7))); 
-	i |= j;
+	t1= w*(Lg2+w*(Lg4+w*Lg6));
+	t2= z*(Lg1+w*(Lg3+w*(Lg5+w*Lg7)));
 	R = t2+t1;
-	if (i>0) {
-	    hfsq=0.5*f*f;
-	    return s*(hfsq+R) - hfsq;
-	} else {
-	    return s*(R-f);
-	}
+	hfsq=0.5*f*f;
+	return s*(hfsq+R);
 }

Modified: head/lib/msun/src/k_logf.h
==============================================================================
--- head/lib/msun/src/k_logf.h	Sat Oct 15 05:00:56 2011	(r226375)
+++ head/lib/msun/src/k_logf.h	Sat Oct 15 05:23:28 2011	(r226376)
@@ -13,7 +13,7 @@
 __FBSDID("$FreeBSD$");
 
 /*
- * float version of __kernel_log(x). See k_log.c for details.
+ * Float version of k_log.h.  See the latter for most comments.
  */
 
 static const float
@@ -24,32 +24,16 @@ Lg3 =      0x91e9ee.0p-25,	/* 0.28498786
 Lg4 =      0xf89e26.0p-26;	/* 0.24279078841 */
 
 static inline float
-__kernel_logf(float x)
+k_log1pf(float f)
 {
-	float hfsq,f,s,z,R,w,t1,t2;
-	int32_t ix,i,j;
+	float hfsq,s,z,R,w,t1,t2;
 
-	GET_FLOAT_WORD(ix,x);
-
-	f = x-(float)1.0;
-	if((0x007fffff&(0x8000+ix))<0xc000) {	/* -2**-9 <= f < 2**-9 */
-	    if(f==0.0f) return 0.0f;
-	    return f*f*((float)0.33333333333333333*f-(float)0.5);
-	}
  	s = f/((float)2.0+f);
 	z = s*s;
-	ix &= 0x007fffff;
-	i = ix-(0x6147a<<3);
 	w = z*z;
-	j = (0x6b851<<3)-ix;
 	t1= w*(Lg2+w*Lg4);
 	t2= z*(Lg1+w*Lg3);
-	i |= j;
 	R = t2+t1;
-	if(i>0) {
-	    hfsq=(float)0.5*f*f;
-	    return s*(hfsq+R) - hfsq;
-	} else {
-	    return s*(R-f);
-	}
+	hfsq=(float)0.5*f*f;
+	return s*(hfsq+R);
 }

From owner-svn-src-all@FreeBSD.ORG  Sat Oct 15 05:26:16 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id AB86B1065670;
	Sat, 15 Oct 2011 05:26:16 +0000 (UTC) (envelope-from das@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 81A088FC1A;
	Sat, 15 Oct 2011 05:26:16 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9F5QGDu096849;
	Sat, 15 Oct 2011 05:26:16 GMT (envelope-from das@svn.freebsd.org)
Received: (from das@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9F5QGaR096847;
	Sat, 15 Oct 2011 05:26:16 GMT (envelope-from das@svn.freebsd.org)
Message-Id: <201110150526.p9F5QGaR096847@svn.freebsd.org>
From: David Schultz 
Date: Sat, 15 Oct 2011 05:26:16 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226377 - head/tools/regression/lib/msun
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 15 Oct 2011 05:26:16 -0000

Author: das
Date: Sat Oct 15 05:26:16 2011
New Revision: 226377
URL: http://svn.freebsd.org/changeset/base/226377

Log:
  Add some tests for double-rounding bugs in fma().

Modified:
  head/tools/regression/lib/msun/test-fma.c

Modified: head/tools/regression/lib/msun/test-fma.c
==============================================================================
--- head/tools/regression/lib/msun/test-fma.c	Sat Oct 15 05:23:28 2011	(r226376)
+++ head/tools/regression/lib/msun/test-fma.c	Sat Oct 15 05:26:16 2011	(r226377)
@@ -364,13 +364,63 @@ test_accuracy(void)
 #endif
 }
 
+static void
+test_double_rounding(void)
+{
+
+	/*
+	 *     a =  0x1.8000000000001p0
+	 *     b =  0x1.8000000000001p0
+	 *     c = -0x0.0000000000000000000000000080...1p+1
+	 * a * b =  0x1.2000000000001800000000000080p+1
+	 *
+	 * The correct behavior is to round DOWN to 0x1.2000000000001p+1 in
+	 * round-to-nearest mode.  An implementation that computes a*b+c in
+	 * double+double precision, however, will get 0x1.20000000000018p+1,
+	 * and then round UP.
+	 */
+	fesetround(FE_TONEAREST);
+	test(fma, 0x1.8000000000001p0, 0x1.8000000000001p0,
+	     -0x1.0000000000001p-104, 0x1.2000000000001p+1,
+	     ALL_STD_EXCEPT, FE_INEXACT);
+	fesetround(FE_DOWNWARD);
+	test(fma, 0x1.8000000000001p0, 0x1.8000000000001p0,
+	     -0x1.0000000000001p-104, 0x1.2000000000001p+1,
+	     ALL_STD_EXCEPT, FE_INEXACT);
+	fesetround(FE_UPWARD);
+	test(fma, 0x1.8000000000001p0, 0x1.8000000000001p0,
+	     -0x1.0000000000001p-104, 0x1.2000000000002p+1,
+	     ALL_STD_EXCEPT, FE_INEXACT);
+
+	fesetround(FE_TONEAREST);
+	test(fmaf, 0x1.800002p+0, 0x1.800002p+0, -0x1.000002p-46, 0x1.200002p+1,
+	     ALL_STD_EXCEPT, FE_INEXACT);
+	fesetround(FE_DOWNWARD);
+	test(fmaf, 0x1.800002p+0, 0x1.800002p+0, -0x1.000002p-46, 0x1.200002p+1,
+	     ALL_STD_EXCEPT, FE_INEXACT);
+	fesetround(FE_UPWARD);
+	test(fmaf, 0x1.800002p+0, 0x1.800002p+0, -0x1.000002p-46, 0x1.200004p+1,
+	     ALL_STD_EXCEPT, FE_INEXACT);
+
+	fesetround(FE_TONEAREST);
+#if LDBL_MANT_DIG == 64
+	test(fmal, 0x1.4p+0L, 0x1.0000000000000004p+0L, 0x1p-128L,
+	     0x1.4000000000000006p+0L, ALL_STD_EXCEPT, FE_INEXACT);
+#elif LDBL_MANT_DIG == 113
+	/* XXX untested test */
+	test(fmal, 0x1.4p+0L, 0x1.0000000000000000000000000002p+0L, 0x1p-224L,
+	     0x1.4000000000000000000000000003p+0L, ALL_STD_EXCEPT, FE_INEXACT);
+#endif
+
+}
+
 int
 main(int argc, char *argv[])
 {
 	int rmodes[] = { FE_TONEAREST, FE_UPWARD, FE_DOWNWARD, FE_TOWARDZERO };
 	int i;
 
-	printf("1..18\n");
+	printf("1..19\n");
 
 	for (i = 0; i < 4; i++) {
 		fesetround(rmodes[i]);
@@ -404,6 +454,9 @@ main(int argc, char *argv[])
 	test_accuracy();
 	printf("ok 18 - fma accuracy\n");
 
+	test_double_rounding();
+	printf("ok 19 - fma double rounding\n");
+
 	/*
 	 * TODO:
 	 * - Tests for subnormals

From owner-svn-src-all@FreeBSD.ORG  Sat Oct 15 05:28:13 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id BFC6F106564A;
	Sat, 15 Oct 2011 05:28:13 +0000 (UTC) (envelope-from das@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id AEC238FC08;
	Sat, 15 Oct 2011 05:28:13 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9F5SDSh096945;
	Sat, 15 Oct 2011 05:28:13 GMT (envelope-from das@svn.freebsd.org)
Received: (from das@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9F5SD0T096943;
	Sat, 15 Oct 2011 05:28:13 GMT (envelope-from das@svn.freebsd.org)
Message-Id: <201110150528.p9F5SD0T096943@svn.freebsd.org>
From: David Schultz 
Date: Sat, 15 Oct 2011 05:28:13 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226378 - head/tools/regression/lib/msun
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 15 Oct 2011 05:28:13 -0000

Author: das
Date: Sat Oct 15 05:28:13 2011
New Revision: 226378
URL: http://svn.freebsd.org/changeset/base/226378

Log:
  Add some tests for corner cases of log() in unusual rounding modes.
  I wrote these ages ago, but they've been failing until now.

Modified:
  head/tools/regression/lib/msun/test-logarithm.c

Modified: head/tools/regression/lib/msun/test-logarithm.c
==============================================================================
--- head/tools/regression/lib/msun/test-logarithm.c	Sat Oct 15 05:26:16 2011	(r226377)
+++ head/tools/regression/lib/msun/test-logarithm.c	Sat Oct 15 05:28:13 2011	(r226378)
@@ -97,7 +97,7 @@ void
 run_generic_tests(void)
 {
 
-	/* exp(1) == 0, no exceptions raised */
+	/* log(1) == 0, no exceptions raised */
 	testall0(1.0, 0.0, ALL_STD_EXCEPT, 0);
 	testall1(0.0, 0.0, ALL_STD_EXCEPT, 0);
 	testall1(-0.0, -0.0, ALL_STD_EXCEPT, 0);
@@ -142,11 +142,35 @@ run_log2_tests(void)
 	}
 }
 
+void
+run_roundingmode_tests(void)
+{
+
+	/*
+	 * Corner cases in other rounding modes.
+	 */
+	fesetround(FE_DOWNWARD);
+	/* These are still positive per IEEE 754R */
+	testall0(1.0, 0.0, ALL_STD_EXCEPT, 0);
+	testall1(0.0, 0.0, ALL_STD_EXCEPT, 0);
+	fesetround(FE_TOWARDZERO);
+	testall0(1.0, 0.0, ALL_STD_EXCEPT, 0);
+	testall1(0.0, 0.0, ALL_STD_EXCEPT, 0);
+
+	fesetround(FE_UPWARD);
+	testall0(1.0, 0.0, ALL_STD_EXCEPT, 0);
+	testall1(0.0, 0.0, ALL_STD_EXCEPT, 0);
+	/* log1p(-0.0) == -0.0 even when rounding upwards */
+	testall1(-0.0, -0.0, ALL_STD_EXCEPT, 0);
+
+	fesetround(FE_TONEAREST);
+}
+
 int
 main(int argc, char *argv[])
 {
 
-	printf("1..2\n");
+	printf("1..3\n");
 
 	run_generic_tests();
 	printf("ok 1 - logarithm\n");
@@ -154,5 +178,8 @@ main(int argc, char *argv[])
 	run_log2_tests();
 	printf("ok 2 - logarithm\n");
 
+	run_roundingmode_tests();
+	printf("ok 3 - logarithm\n");
+
 	return (0);
 }

From owner-svn-src-all@FreeBSD.ORG  Sat Oct 15 07:00:29 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5DCDF106566B;
	Sat, 15 Oct 2011 07:00:29 +0000 (UTC) (envelope-from das@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 42B6B8FC12;
	Sat, 15 Oct 2011 07:00:29 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9F70TmU000262;
	Sat, 15 Oct 2011 07:00:29 GMT (envelope-from das@svn.freebsd.org)
Received: (from das@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9F70TpN000255;
	Sat, 15 Oct 2011 07:00:29 GMT (envelope-from das@svn.freebsd.org)
Message-Id: <201110150700.p9F70TpN000255@svn.freebsd.org>
From: David Schultz 
Date: Sat, 15 Oct 2011 07:00:29 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226380 - head/lib/msun/src
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 15 Oct 2011 07:00:29 -0000

Author: das
Date: Sat Oct 15 07:00:28 2011
New Revision: 226380
URL: http://svn.freebsd.org/changeset/base/226380

Log:
  Remove some unnecessary initializations.
  
  Obtained from:	DragonFlyBSD

Modified:
  head/lib/msun/src/e_hypot.c
  head/lib/msun/src/e_hypotf.c
  head/lib/msun/src/e_lgamma_r.c
  head/lib/msun/src/e_lgammaf_r.c
  head/lib/msun/src/s_expm1.c
  head/lib/msun/src/s_expm1f.c

Modified: head/lib/msun/src/e_hypot.c
==============================================================================
--- head/lib/msun/src/e_hypot.c	Sat Oct 15 05:48:43 2011	(r226379)
+++ head/lib/msun/src/e_hypot.c	Sat Oct 15 07:00:28 2011	(r226380)
@@ -54,7 +54,7 @@ __FBSDID("$FreeBSD$");
 double
 __ieee754_hypot(double x, double y)
 {
-	double a=x,b=y,t1,t2,y1,y2,w;
+	double a,b,t1,t2,y1,y2,w;
 	int32_t j,k,ha,hb;
 
 	GET_HIGH_WORD(ha,x);

Modified: head/lib/msun/src/e_hypotf.c
==============================================================================
--- head/lib/msun/src/e_hypotf.c	Sat Oct 15 05:48:43 2011	(r226379)
+++ head/lib/msun/src/e_hypotf.c	Sat Oct 15 07:00:28 2011	(r226380)
@@ -22,7 +22,7 @@ __FBSDID("$FreeBSD$");
 float
 __ieee754_hypotf(float x, float y)
 {
-	float a=x,b=y,t1,t2,y1,y2,w;
+	float a,b,t1,t2,y1,y2,w;
 	int32_t j,k,ha,hb;
 
 	GET_FLOAT_WORD(ha,x);

Modified: head/lib/msun/src/e_lgamma_r.c
==============================================================================
--- head/lib/msun/src/e_lgamma_r.c	Sat Oct 15 05:48:43 2011	(r226379)
+++ head/lib/msun/src/e_lgamma_r.c	Sat Oct 15 07:00:28 2011	(r226380)
@@ -269,7 +269,6 @@ __ieee754_lgamma_r(double x, int *signga
 	}
 	else if(ix<0x40200000) { 			/* x < 8.0 */
 	    i = (int)x;
-	    t = zero;
 	    y = x-(double)i;
 	    p = y*(s0+y*(s1+y*(s2+y*(s3+y*(s4+y*(s5+y*s6))))));
 	    q = one+y*(r1+y*(r2+y*(r3+y*(r4+y*(r5+y*r6)))));

Modified: head/lib/msun/src/e_lgammaf_r.c
==============================================================================
--- head/lib/msun/src/e_lgammaf_r.c	Sat Oct 15 05:48:43 2011	(r226379)
+++ head/lib/msun/src/e_lgammaf_r.c	Sat Oct 15 07:00:28 2011	(r226380)
@@ -202,7 +202,6 @@ __ieee754_lgammaf_r(float x, int *signga
 	}
 	else if(ix<0x41000000) { 			/* x < 8.0 */
 	    i = (int)x;
-	    t = zero;
 	    y = x-(float)i;
 	    p = y*(s0+y*(s1+y*(s2+y*(s3+y*(s4+y*(s5+y*s6))))));
 	    q = one+y*(r1+y*(r2+y*(r3+y*(r4+y*(r5+y*r6)))));

Modified: head/lib/msun/src/s_expm1.c
==============================================================================
--- head/lib/msun/src/s_expm1.c	Sat Oct 15 05:48:43 2011	(r226379)
+++ head/lib/msun/src/s_expm1.c	Sat Oct 15 07:00:28 2011	(r226380)
@@ -135,7 +135,6 @@ expm1(double x)
 
 	GET_HIGH_WORD(hx,x);
 	xsb = hx&0x80000000;		/* sign bit of x */
-	if(xsb==0) y=x; else y= -x;	/* y = |x| */
 	hx &= 0x7fffffff;		/* high word of |x| */
 
     /* filter out huge and non-finite argument */

Modified: head/lib/msun/src/s_expm1f.c
==============================================================================
--- head/lib/msun/src/s_expm1f.c	Sat Oct 15 05:48:43 2011	(r226379)
+++ head/lib/msun/src/s_expm1f.c	Sat Oct 15 07:00:28 2011	(r226380)
@@ -44,7 +44,6 @@ expm1f(float x)
 
 	GET_FLOAT_WORD(hx,x);
 	xsb = hx&0x80000000;		/* sign bit of x */
-	if(xsb==0) y=x; else y= -x;	/* y = |x| */
 	hx &= 0x7fffffff;		/* high word of |x| */
 
     /* filter out huge and non-finite argument */

From owner-svn-src-all@FreeBSD.ORG  Sat Oct 15 09:29:43 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 7EB891065670;
	Sat, 15 Oct 2011 09:29:43 +0000 (UTC)
	(envelope-from marius@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 6C8468FC0C;
	Sat, 15 Oct 2011 09:29:43 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9F9ThI7005565;
	Sat, 15 Oct 2011 09:29:43 GMT (envelope-from marius@svn.freebsd.org)
Received: (from marius@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9F9ThuN005560;
	Sat, 15 Oct 2011 09:29:43 GMT (envelope-from marius@svn.freebsd.org)
Message-Id: <201110150929.p9F9ThuN005560@svn.freebsd.org>
From: Marius Strobl 
Date: Sat, 15 Oct 2011 09:29:43 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226381 - in head/sys: dev/esp sparc64/sbus
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 15 Oct 2011 09:29:43 -0000

Author: marius
Date: Sat Oct 15 09:29:43 2011
New Revision: 226381
URL: http://svn.freebsd.org/changeset/base/226381

Log:
  Merge from NetBSD:
  - Remove clause 3 and 4 from TNF licenses.
  - Fix memset usage.
  - Various cleanup.
  - Kill caddr_t.

Modified:
  head/sys/dev/esp/esp_sbus.c
  head/sys/dev/esp/ncr53c9x.c
  head/sys/dev/esp/ncr53c9xreg.h
  head/sys/dev/esp/ncr53c9xvar.h
  head/sys/sparc64/sbus/lsi64854.c
  head/sys/sparc64/sbus/lsi64854var.h

Modified: head/sys/dev/esp/esp_sbus.c
==============================================================================
--- head/sys/dev/esp/esp_sbus.c	Sat Oct 15 07:00:28 2011	(r226380)
+++ head/sys/dev/esp/esp_sbus.c	Sat Oct 15 09:29:43 2011	(r226381)
@@ -26,7 +26,7 @@
  *
  */
 
-/*	$NetBSD: esp_sbus.c,v 1.31 2005/02/27 00:27:48 perry Exp $	*/
+/*	$NetBSD: esp_sbus.c,v 1.51 2009/09/17 16:28:12 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -44,13 +44,6 @@
  * 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. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *	This product includes software developed by the NetBSD
- *	Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- *    contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
  *
  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
@@ -158,12 +151,12 @@ MODULE_DEPEND(esp, sbus, 1, 1, 1);
 /*
  * Functions and the switch for the MI code
  */
-static u_char	esp_read_reg(struct ncr53c9x_softc *sc, int reg);
-static void	esp_write_reg(struct ncr53c9x_softc *sc, int reg, u_char v);
+static uint8_t	esp_read_reg(struct ncr53c9x_softc *sc, int reg);
+static void	esp_write_reg(struct ncr53c9x_softc *sc, int reg, uint8_t v);
 static int	esp_dma_isintr(struct ncr53c9x_softc *sc);
 static void	esp_dma_reset(struct ncr53c9x_softc *sc);
 static int	esp_dma_intr(struct ncr53c9x_softc *sc);
-static int	esp_dma_setup(struct ncr53c9x_softc *sc, caddr_t *addr,
+static int	esp_dma_setup(struct ncr53c9x_softc *sc, void **addr,
 		    size_t *len, int datain, size_t *dmasize);
 static void	esp_dma_go(struct ncr53c9x_softc *sc);
 static void	esp_dma_stop(struct ncr53c9x_softc *sc);
@@ -172,7 +165,7 @@ static int	espattach(struct esp_softc *e
 		    const struct ncr53c9x_glue *gluep);
 static int	espdetach(struct esp_softc *esc);
 
-static const struct ncr53c9x_glue esp_sbus_glue = {
+static const struct ncr53c9x_glue const esp_sbus_glue = {
 	esp_read_reg,
 	esp_write_reg,
 	esp_dma_isintr,
@@ -718,9 +711,9 @@ espdetach(struct esp_softc *esc)
 static int esp_sbus_debug = 0;
 
 static const struct {
-	char *r_name;
-	int   r_flag;
-} esp__read_regnames [] = {
+	const char *r_name;
+	int r_flag;
+} const esp__read_regnames [] = {
 	{ "TCL", 0},			/* 0/00 */
 	{ "TCM", 0},			/* 1/04 */
 	{ "FIFO", 0},			/* 2/08 */
@@ -739,10 +732,10 @@ static const struct {
 	{ "TCX", 1},			/* f/3c */
 };
 
-static const struct {
-	char *r_name;
-	int   r_flag;
-} esp__write_regnames[] = {
+static const const struct {
+	const char *r_name;
+	int r_flag;
+} const esp__write_regnames[] = {
 	{ "TCL", 1},			/* 0/00 */
 	{ "TCM", 1},			/* 1/04 */
 	{ "FIFO", 0},			/* 2/08 */
@@ -762,11 +755,11 @@ static const struct {
 };
 #endif
 
-static u_char
+static uint8_t
 esp_read_reg(struct ncr53c9x_softc *sc, int reg)
 {
 	struct esp_softc *esc = (struct esp_softc *)sc;
-	u_char v;
+	uint8_t v;
 
 	v = bus_read_1(esc->sc_res, reg * 4);
 
@@ -780,7 +773,7 @@ esp_read_reg(struct ncr53c9x_softc *sc, 
 }
 
 static void
-esp_write_reg(struct ncr53c9x_softc *sc, int reg, u_char v)
+esp_write_reg(struct ncr53c9x_softc *sc, int reg, uint8_t v)
 {
 	struct esp_softc *esc = (struct esp_softc *)sc;
 
@@ -818,8 +811,8 @@ esp_dma_intr(struct ncr53c9x_softc *sc)
 }
 
 static int
-esp_dma_setup(struct ncr53c9x_softc *sc, caddr_t *addr, size_t *len,
-	      int datain, size_t *dmasize)
+esp_dma_setup(struct ncr53c9x_softc *sc, void **addr, size_t *len,
+    int datain, size_t *dmasize)
 {
 	struct esp_softc *esc = (struct esp_softc *)sc;
 

Modified: head/sys/dev/esp/ncr53c9x.c
==============================================================================
--- head/sys/dev/esp/ncr53c9x.c	Sat Oct 15 07:00:28 2011	(r226380)
+++ head/sys/dev/esp/ncr53c9x.c	Sat Oct 15 09:29:43 2011	(r226381)
@@ -26,7 +26,7 @@
  *
  */
 
-/*	$NetBSD: ncr53c9x.c,v 1.125 2007/01/09 12:53:12 itohy Exp $	*/
+/*	$NetBSD: ncr53c9x.c,v 1.143 2011/07/31 18:39:00 jakllsch Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2002 The NetBSD Foundation, Inc.
@@ -43,13 +43,6 @@
  * 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. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *        This product includes software developed by the NetBSD
- *        Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- *    contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
  *
  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
@@ -133,7 +126,7 @@ __FBSDID("$FreeBSD$");
 MODULE_DEPEND(esp, cam, 1, 1, 1);
 
 #ifdef NCR53C9X_DEBUG
-static int ncr53c9x_debug =
+int ncr53c9x_debug =
     NCR_SHOWMISC /* | NCR_SHOWPHASE | NCR_SHOWTRAC | NCR_SHOWCMDS */;
 #endif
 
@@ -167,7 +160,7 @@ static void	ncr53c9x_sched(struct ncr53c
 static void	ncr53c9x_select(struct ncr53c9x_softc *sc,
 		    struct ncr53c9x_ecb *ecb);
 static void	ncr53c9x_watch(void *arg);
-static void	ncr53c9x_wrfifo(struct ncr53c9x_softc *sc, u_char *p,
+static void	ncr53c9x_wrfifo(struct ncr53c9x_softc *sc, uint8_t *p,
 		    int len);
 
 static struct ncr53c9x_ecb	*ncr53c9x_get_ecb(struct ncr53c9x_softc *sc);
@@ -187,13 +180,11 @@ static inline int	ncr53c9x_stp2cpb(struc
 		NCR_WRITE_REG((sc), NCR_TCL, (size));			\
 		NCR_WRITE_REG((sc), NCR_TCM, (size) >> 8);		\
 		if ((sc->sc_cfg2 & NCRCFG2_FE) ||			\
-		    (sc->sc_rev == NCR_VARIANT_FAS366)) {		\
+		    (sc->sc_rev == NCR_VARIANT_FAS366))			\
 			NCR_WRITE_REG((sc), NCR_TCH, (size) >> 16);	\
-		}							\
-		if (sc->sc_rev == NCR_VARIANT_FAS366) {			\
+		if (sc->sc_rev == NCR_VARIANT_FAS366)			\
 			NCR_WRITE_REG(sc, NCR_RCH, 0);			\
-		}							\
-} while (0)
+} while (/* CONSTCOND */0)
 
 #ifndef mstohz
 #define	mstohz(ms) \
@@ -551,11 +542,10 @@ ncr53c9x_reset(struct ncr53c9x_softc *sc
 		NCR_WRITE_REG(sc, NCR_AMDCFG4, sc->sc_cfg4);
 
 #if 0
-	device_printf(sc->sc_dev, "ncr53c9x_reset: revision %d\n",
-	    sc->sc_rev);
-	device_printf(sc->sc_dev, "ncr53c9x_reset: cfg1 0x%x, cfg2 0x%x, "
-	    "cfg3 0x%x, ccf 0x%x, timeout 0x%x\n",
-	    sc->sc_cfg1, sc->sc_cfg2, sc->sc_cfg3, sc->sc_ccf, sc->sc_timeout);
+	device_printf(sc->sc_dev, "%s: revision %d\n", __func__, sc->sc_rev);
+	device_printf(sc->sc_dev, "%s: cfg1 0x%x, cfg2 0x%x, cfg3 0x%x, ccf "
+	    "0x%x, timeout 0x%x\n", __func__, sc->sc_cfg1, sc->sc_cfg2,
+	    sc->sc_cfg3, sc->sc_ccf, sc->sc_timeout);
 #endif
 }
 
@@ -573,7 +563,8 @@ ncr53c9x_clear(struct ncr53c9x_softc *sc
 	/* Cancel any active commands. */
 	sc->sc_state = NCR_CLEANING;
 	sc->sc_msgify = 0;
-	if ((ecb = sc->sc_nexus) != NULL) {
+	ecb = sc->sc_nexus;
+	if (ecb != NULL) {
 		ecb->ccb->ccb_h.status = result;
 		ncr53c9x_done(sc, ecb);
 	}
@@ -597,7 +588,8 @@ ncr53c9x_clear_target(struct ncr53c9x_so
 
 	/* Cancel outstanding disconnected commands on each LUN. */
 	LIST_FOREACH(li, &sc->sc_tinfo[target].luns, link) {
-		if ((ecb = li->untagged) != NULL) {
+		ecb = li->untagged;
+		if (ecb != NULL) {
 			li->untagged = NULL;
 			/*
 			 * XXX should we terminate a command
@@ -607,12 +599,14 @@ ncr53c9x_clear_target(struct ncr53c9x_so
 			ecb->ccb->ccb_h.status = result;
 			ncr53c9x_done(sc, ecb);
 		}
-		for (i = 0; i < NCR_TAG_DEPTH; i++)
-			if ((ecb = li->queued[i])) {
+		for (i = 0; i < NCR_TAG_DEPTH; i++) {
+			ecb = li->queued[i];
+			if (ecb != NULL) {
 				li->queued[i] = NULL;
 				ecb->ccb->ccb_h.status = result;
 				ncr53c9x_done(sc, ecb);
 			}
+		}
 		li->used = 0;
 	}
 }
@@ -635,7 +629,7 @@ ncr53c9x_init(struct ncr53c9x_softc *sc,
 
 		TAILQ_INIT(&sc->ready_list);
 		sc->sc_nexus = NULL;
-		memset(sc->sc_tinfo, 0, sizeof(sc->sc_tinfo));
+		memset(sc->sc_tinfo, 0, sizeof(*sc->sc_tinfo));
 		for (r = 0; r < sc->sc_ntarg; r++) {
 			LIST_INIT(&sc->sc_tinfo[r].luns);
 		}
@@ -751,7 +745,7 @@ ncr53c9x_stp2cpb(struct ncr53c9x_softc *
 static inline void
 ncr53c9x_setsync(struct ncr53c9x_softc *sc, struct ncr53c9x_tinfo *ti)
 {
-	u_char cfg3, syncoff, synctp;
+	uint8_t cfg3, syncoff, synctp;
 
 	NCR_LOCK_ASSERT(sc, MA_OWNED);
 
@@ -810,7 +804,7 @@ static void
 ncr53c9x_select(struct ncr53c9x_softc *sc, struct ncr53c9x_ecb *ecb)
 {
 	struct ncr53c9x_tinfo *ti;
-	u_char *cmd;
+	uint8_t *cmd;
 	size_t dmasize;
 	int clen, selatn3, selatns;
 	int lun = ecb->ccb->ccb_h.target_lun;
@@ -818,8 +812,8 @@ ncr53c9x_select(struct ncr53c9x_softc *s
 
 	NCR_LOCK_ASSERT(sc, MA_OWNED);
 
-	NCR_TRACE(("[ncr53c9x_select(t%d,l%d,cmd:%x,tag:%x,%x)] ",
-	    target, lun, ecb->cmd.cmd.opcode, ecb->tag[0], ecb->tag[1]));
+	NCR_TRACE(("[%s(t%d,l%d,cmd:%x,tag:%x,%x)] ", __func__, target, lun,
+	    ecb->cmd.cmd.opcode, ecb->tag[0], ecb->tag[1]));
 
 	ti = &sc->sc_tinfo[target];
 	sc->sc_state = NCR_SELECTING;
@@ -838,9 +832,8 @@ ncr53c9x_select(struct ncr53c9x_softc *s
 		NCRCMD(sc, NCRCMD_FLUSH);
 		NCR_WRITE_REG(sc, NCR_SELID, target | NCR_BUSID_HMEXC32 |
 		    NCR_BUSID_HMEENCID);
-	} else {
+	} else
 		NCR_WRITE_REG(sc, NCR_SELID, target);
-	}
 
 	/*
 	 * If we are requesting sense, force a renegotiation if we are
@@ -873,7 +866,7 @@ ncr53c9x_select(struct ncr53c9x_softc *s
 		selatns = 1;
 	}
 
-	cmd = (u_char *)&ecb->cmd.cmd;
+	cmd = (uint8_t *)&ecb->cmd.cmd;
 
 	if (selatn3) {
 		/* We'll use tags with SELATN3. */
@@ -954,7 +947,7 @@ ncr53c9x_get_ecb(struct ncr53c9x_softc *
 	ecb = TAILQ_FIRST(&sc->free_list);
 	if (ecb) {
 		if (ecb->flags != 0)
-			panic("ecb flags not cleared\n");
+			panic("%s: ecb flags not cleared", __func__);
 		TAILQ_REMOVE(&sc->free_list, ecb, free_links);
 		ecb->flags = ECB_ALLOC;
 		bzero(&ecb->ccb, sizeof(struct ncr53c9x_ecb) -
@@ -990,7 +983,7 @@ ncr53c9x_action(struct cam_sim *sim, uni
 
 	NCR_LOCK_ASSERT(sc, MA_OWNED);
 
-	NCR_TRACE(("[ncr53c9x_action %d]", ccb->ccb_h.func_code));
+	NCR_TRACE(("[%s %d]", __func__, ccb->ccb_h.func_code));
 
 	switch (ccb->ccb_h.func_code) {
 	case XPT_RESET_BUS:
@@ -1196,7 +1189,7 @@ ncr53c9x_poll(struct cam_sim *sim)
 
 	NCR_LOCK_ASSERT(sc, MA_OWNED);
 
-	NCR_TRACE(("[ncr53c9x_poll] "));
+	NCR_TRACE(("[%s] ", __func__));
 
 	if (NCRDMA_ISINTR(sc))
 		ncr53c9x_intr1(sc);
@@ -1260,10 +1253,10 @@ ncr53c9x_sched(struct ncr53c9x_softc *sc
 
 	NCR_LOCK_ASSERT(sc, MA_OWNED);
 
-	NCR_TRACE(("[ncr53c9x_sched] "));
+	NCR_TRACE(("[%s] ", __func__));
 
 	if (sc->sc_state != NCR_IDLE)
-		panic("ncr53c9x_sched: not IDLE (state=%d)", sc->sc_state);
+		panic("%s: not IDLE (state=%d)", __func__, sc->sc_state);
 
 	/*
 	 * Find first ecb in ready queue that is for a target/lunit
@@ -1288,10 +1281,9 @@ ncr53c9x_sched(struct ncr53c9x_softc *sc
 		li = TINFO_LUN(ti, lun);
 		if (li == NULL) {
 			/* Initialize LUN info and add to list. */
-			if ((li = malloc(sizeof(*li),
-			    M_DEVBUF, M_NOWAIT | M_ZERO)) == NULL) {
+			li = malloc(sizeof(*li), M_DEVBUF, M_NOWAIT | M_ZERO);
+			if (li == NULL)
 				continue;
-			}
 			li->lun = lun;
 
 			LIST_INSERT_HEAD(&ti->luns, li, link);
@@ -1338,7 +1330,7 @@ ncr53c9x_sched(struct ncr53c9x_softc *sc
 			ncr53c9x_select(sc, ecb);
 			break;
 		} else {
-			NCR_TRACE(("%d:%d busy\n",
+			NCR_TRACE(("[%s %d:%d busy] \n", __func__,
 			    ecb->ccb->ccb_h.target_id,
 			    ecb->ccb->ccb_h.target_lun));
 		}
@@ -1356,7 +1348,7 @@ ncr53c9x_sense(struct ncr53c9x_softc *sc
 
 	NCR_LOCK_ASSERT(sc, MA_OWNED);
 
-	NCR_TRACE(("requesting sense "));
+	NCR_TRACE(("[%s] ", __func__));
 
 	lun = ccb->ccb_h.target_lun;
 	ti = &sc->sc_tinfo[ccb->ccb_h.target_id];
@@ -1368,7 +1360,7 @@ ncr53c9x_sense(struct ncr53c9x_softc *sc
 	ss->length = sizeof(struct scsi_sense_data);
 	ecb->clen = sizeof(*ss);
 	memset(&ccb->csio.sense_data, 0, sizeof(ccb->csio.sense_data));
-	ecb->daddr = (char *)&ccb->csio.sense_data;
+	ecb->daddr = (uint8_t *)&ccb->csio.sense_data;
 	ecb->dleft = sizeof(struct scsi_sense_data);
 	ecb->flags |= ECB_SENSE;
 	ecb->timeout = NCR_SENSE_TIMEOUT;
@@ -1379,9 +1371,9 @@ ncr53c9x_sense(struct ncr53c9x_softc *sc
 	ncr53c9x_dequeue(sc, ecb);
 	li->untagged = ecb;	/* Must be executed first to fix C/A. */
 	li->busy = 2;
-	if (ecb == sc->sc_nexus) {
+	if (ecb == sc->sc_nexus)
 		ncr53c9x_select(sc, ecb);
-	} else {
+	else {
 		TAILQ_INSERT_HEAD(&sc->ready_list, ecb, chain);
 		ecb->flags |= ECB_READY;
 		if (sc->sc_state == NCR_IDLE)
@@ -1402,7 +1394,7 @@ ncr53c9x_done(struct ncr53c9x_softc *sc,
 
 	NCR_LOCK_ASSERT(sc, MA_OWNED);
 
-	NCR_TRACE(("[ncr53c9x_done(status:%x)] ", ccb->ccb_h.status));
+	NCR_TRACE(("[%s(status:%x)] ", __func__, ccb->ccb_h.status));
 
 	ti = &sc->sc_tinfo[ccb->ccb_h.target_id];
 	lun = ccb->ccb_h.target_lun;
@@ -1457,7 +1449,7 @@ ncr53c9x_done(struct ncr53c9x_softc *sc,
 	}
 
 #ifdef NCR53C9X_DEBUG
-	if (ncr53c9x_debug & NCR_SHOWTRAC) {
+	if ((ncr53c9x_debug & NCR_SHOWTRAC) != 0) {
 		if (ccb->csio.resid != 0)
 			printf("resid=%d ", ccb->csio.resid);
 		if ((ccb->ccb_h.status & CAM_AUTOSNS_VALID) != 0)
@@ -1510,7 +1502,7 @@ ncr53c9x_dequeue(struct ncr53c9x_softc *
 	li = TINFO_LUN(ti, lun);
 #ifdef DIAGNOSTIC
 	if (li == NULL || li->lun != lun)
-		panic("ncr53c9x_dequeue: lun %qx for ecb %p does not exist",
+		panic("%s: lun %qx for ecb %p does not exist", __func__,
 		    (long long)lun, ecb);
 #endif
 	if (li->untagged == ecb) {
@@ -1521,9 +1513,9 @@ ncr53c9x_dequeue(struct ncr53c9x_softc *
 #ifdef DIAGNOSTIC
 		if (li->queued[ecb->tag[1]] != NULL &&
 		    (li->queued[ecb->tag[1]] != ecb))
-			panic("ncr53c9x_dequeue: slot %d for lun %qx has %p "
-			    "instead of ecb %p\n", ecb->tag[1],
-			    (long long)lun, li->queued[ecb->tag[1]], ecb);
+			panic("%s: slot %d for lun %qx has %p instead of ecb "
+			    "%p", __func__, ecb->tag[1], (long long)lun,
+			    li->queued[ecb->tag[1]], ecb);
 #endif
 		li->queued[ecb->tag[1]] = NULL;
 		li->used--;
@@ -1550,7 +1542,7 @@ ncr53c9x_dequeue(struct ncr53c9x_softc *
 	NCRCMD(sc, NCRCMD_SETATN);					\
 	sc->sc_flags |= NCR_ATN;					\
 	sc->sc_msgpriq |= (m);						\
-} while (0)
+} while (/* CONSTCOND */0)
 
 static void
 ncr53c9x_flushfifo(struct ncr53c9x_softc *sc)
@@ -1558,7 +1550,7 @@ ncr53c9x_flushfifo(struct ncr53c9x_softc
 
 	NCR_LOCK_ASSERT(sc, MA_OWNED);
 
-	NCR_TRACE(("[flushfifo] "));
+	NCR_TRACE(("[%s] ", __func__));
 
 	NCRCMD(sc, NCRCMD_FLUSH);
 
@@ -1570,8 +1562,8 @@ ncr53c9x_flushfifo(struct ncr53c9x_softc
 static int
 ncr53c9x_rdfifo(struct ncr53c9x_softc *sc, int how)
 {
-	u_char *ibuf;
 	int i, n;
+	uint8_t *ibuf;
 
 	NCR_LOCK_ASSERT(sc, MA_OWNED);
 
@@ -1586,7 +1578,7 @@ ncr53c9x_rdfifo(struct ncr53c9x_softc *s
 		break;
 
 	default:
-		panic("ncr53c9x_rdfifo: bad flag");
+		panic("%s: bad flag", __func__);
 		/* NOTREACHED */
 	}
 
@@ -1611,10 +1603,9 @@ ncr53c9x_rdfifo(struct ncr53c9x_softc *s
 
 			ncr53c9x_flushfifo(sc);
 		}
-	} else {
+	} else
 		for (i = 0; i < n; i++)
 			ibuf[i] = NCR_READ_REG(sc, NCR_FIFO);
-	}
 
 	sc->sc_imlen += i;
 
@@ -1622,7 +1613,7 @@ ncr53c9x_rdfifo(struct ncr53c9x_softc *s
 #ifdef NCR53C9X_DEBUG
 	NCR_TRACE(("\n[rdfifo %s (%d):",
 	    (how == NCR_RDFIFO_START) ? "start" : "cont", (int)sc->sc_imlen));
-	if (ncr53c9x_debug & NCR_SHOWTRAC) {
+	if ((ncr53c9x_debug & NCR_SHOWTRAC) != 0) {
 		for (i = 0; i < sc->sc_imlen; i++)
 			printf(" %02x", sc->sc_imess[i]);
 		printf("]\n");
@@ -1633,7 +1624,7 @@ ncr53c9x_rdfifo(struct ncr53c9x_softc *s
 }
 
 static void
-ncr53c9x_wrfifo(struct ncr53c9x_softc *sc, u_char *p, int len)
+ncr53c9x_wrfifo(struct ncr53c9x_softc *sc, uint8_t *p, int len)
 {
 	int i;
 
@@ -1641,7 +1632,7 @@ ncr53c9x_wrfifo(struct ncr53c9x_softc *s
 
 #ifdef NCR53C9X_DEBUG
 	NCR_MSGS(("[wrfifo(%d):", len));
-	if (ncr53c9x_debug & NCR_SHOWMSGS) {
+	if ((ncr53c9x_debug & NCR_SHOWMSGS) != 0) {
 		for (i = 0; i < len; i++)
 			printf(" %02x", p[i]);
 		printf("]\n");
@@ -1663,13 +1654,13 @@ ncr53c9x_reselect(struct ncr53c9x_softc 
 	struct ncr53c9x_ecb *ecb = NULL;
 	struct ncr53c9x_linfo *li;
 	struct ncr53c9x_tinfo *ti;
-	u_char lun, selid, target;
+	uint8_t lun, selid, target;
 
 	NCR_LOCK_ASSERT(sc, MA_OWNED);
 
-	if (sc->sc_rev == NCR_VARIANT_FAS366) {
+	if (sc->sc_rev == NCR_VARIANT_FAS366)
 		target = sc->sc_selid;
-	} else {
+	else {
 		/*
 		 * The SCSI chip made a snapshot of the data bus
 		 * while the reselection was being negotiated.
@@ -1751,7 +1742,7 @@ abort:
 #define	MSG_IS2BYTE(m)		(((m) & 0xf0) == 0x20)
 
 static inline int
-__verify_msg_format(u_char *p, int len)
+__verify_msg_format(uint8_t *p, int len)
 {
 
 	if (len == 1 && MSG_IS1BYTE(p[0]))
@@ -1777,12 +1768,12 @@ ncr53c9x_msgin(struct ncr53c9x_softc *sc
 	struct ncr53c9x_ecb *ecb;
 	struct ncr53c9x_linfo *li;
 	struct ncr53c9x_tinfo *ti;
-	u_char *pb;
+	uint8_t *pb;
 	int lun, plen;
 
 	NCR_LOCK_ASSERT(sc, MA_OWNED);
 
-	NCR_TRACE(("[ncr53c9x_msgin(curmsglen:%ld)] ", (long)sc->sc_imlen));
+	NCR_TRACE(("[%s(curmsglen:%ld)] ", __func__, (long)sc->sc_imlen));
 
 	if (sc->sc_imlen == 0) {
 		device_printf(sc->sc_dev, "msgin: no msg byte available\n");
@@ -2068,19 +2059,19 @@ gotit:
 			    sc->sc_imess[0]);
 			goto reset;
 		}
-		(void) ncr53c9x_reselect(sc, sc->sc_msgify,
+		(void)ncr53c9x_reselect(sc, sc->sc_msgify,
 		    sc->sc_imess[0], sc->sc_imess[1]);
 		break;
 
 	case NCR_RESELECTED:
-		if (MSG_ISIDENTIFY(sc->sc_imess[1])) {
+		if (MSG_ISIDENTIFY(sc->sc_imess[1]))
 			sc->sc_msgify = sc->sc_imess[1];
-		} else {
+		else {
 			device_printf(sc->sc_dev, "reselect without IDENTIFY;"
 			    " MSG %x; sending DEVICE RESET\n", sc->sc_imess[1]);
 			goto reset;
 		}
-		(void) ncr53c9x_reselect(sc, sc->sc_msgify, 0, 0);
+		(void)ncr53c9x_reselect(sc, sc->sc_msgify, 0, 0);
 		break;
 
 	default:
@@ -2124,8 +2115,8 @@ ncr53c9x_msgout(struct ncr53c9x_softc *s
 
 	NCR_LOCK_ASSERT(sc, MA_OWNED);
 
-	NCR_TRACE(("[ncr53c9x_msgout(priq:%x, prevphase:%x)]",
-	    sc->sc_msgpriq, sc->sc_prevphase));
+	NCR_TRACE(("[%s(priq:%x, prevphase:%x)]", __func__, sc->sc_msgpriq,
+	    sc->sc_prevphase));
 
 	/*
 	 * XXX - the NCR_ATN flag is not in sync with the actual ATN
@@ -2138,7 +2129,9 @@ ncr53c9x_msgout(struct ncr53c9x_softc *s
 		if (sc->sc_prevphase != MESSAGE_OUT_PHASE) {
 		new:
 			NCRCMD(sc, NCRCMD_FLUSH);
-/*			DELAY(1); */
+#if 0
+			DELAY(1);
+#endif
 			sc->sc_msgoutq = 0;
 			sc->sc_omlen = 0;
 		}
@@ -2146,10 +2139,9 @@ ncr53c9x_msgout(struct ncr53c9x_softc *s
 		if (sc->sc_prevphase == MESSAGE_OUT_PHASE) {
 			ncr53c9x_sched_msgout(sc->sc_msgoutq);
 			goto new;
-		} else {
+		} else
 			device_printf(sc->sc_dev, "at line %d: unexpected "
 			    "MESSAGE OUT phase\n", __LINE__);
-		}
 	}
 
 	if (sc->sc_omlen == 0) {
@@ -2181,20 +2173,18 @@ ncr53c9x_msgout(struct ncr53c9x_softc *s
 			break;
 
 		case SEND_IDENTIFY:
-			if (sc->sc_state != NCR_CONNECTED) {
+			if (sc->sc_state != NCR_CONNECTED)
 				device_printf(sc->sc_dev, "at line %d: no "
 				    "nexus\n", __LINE__);
-			}
 			ecb = sc->sc_nexus;
 			sc->sc_omess[0] =
 			    MSG_IDENTIFY(ecb->ccb->ccb_h.target_lun, 0);
 			break;
 
 		case SEND_TAG:
-			if (sc->sc_state != NCR_CONNECTED) {
+			if (sc->sc_state != NCR_CONNECTED)
 				device_printf(sc->sc_dev, "at line %d: no "
 				    "nexus\n", __LINE__);
-			}
 			ecb = sc->sc_nexus;
 			sc->sc_omess[0] = ecb->tag[0];
 			sc->sc_omess[1] = ecb->tag[1];
@@ -2249,7 +2239,7 @@ ncr53c9x_msgout(struct ncr53c9x_softc *s
 	}
 
 #ifdef NCR53C9X_DEBUG
-	if (ncr53c9x_debug & NCR_SHOWMSGS) {
+	if ((ncr53c9x_debug & NCR_SHOWMSGS) != 0) {
 		NCR_MSGS(("sc_omlen; i++)
 			NCR_MSGS((" %02x", sc->sc_omess[i]));
@@ -2310,7 +2300,7 @@ ncr53c9x_intr1(struct ncr53c9x_softc *sc
 	struct timeval cur, wait;
 	size_t size;
 	int i, nfifo;
-	u_char msg;
+	uint8_t msg;
 
 	NCR_LOCK_ASSERT(sc, MA_OWNED);
 
@@ -2385,7 +2375,7 @@ again:
 				 * while we were trying to select
 				 * another target.
 				 */
-#ifdef DEBUG
+#ifdef NCR53C9X_DEBUG
 				device_printf(sc->sc_dev, "ESP100 work-around "
 				    "activated\n");
 #endif
@@ -2492,7 +2482,9 @@ again:
 		    sc->sc_espintr,sc->sc_espstat,sc->sc_espstep));
 		if (NCR_READ_REG(sc, NCR_FFLAG) & NCRFIFO_FF) {
 			NCRCMD(sc, NCRCMD_FLUSH);
-/*			DELAY(1); */
+#if 0
+			DELAY(1);
+#endif
 		}
 		/*
 		 * This command must (apparently) be issued within
@@ -2734,7 +2726,7 @@ again:
 				if (sc->sc_state == NCR_IDLE &&
 				    sc->sc_espstep == 0)
 					return;
-				panic("ncr53c9x: no nexus");
+				panic("%s: no nexus", __func__);
 			}
 
 			ti = &sc->sc_tinfo[ecb->ccb->ccb_h.target_id];
@@ -2812,8 +2804,8 @@ again:
 					if (sc->sc_cmdlen == 0)
 						/* Hope for the best... */
 						break;
-				} else if ((NCR_READ_REG(sc, NCR_FFLAG)
-				    & NCRFIFO_FF) == 0) {
+				} else if ((NCR_READ_REG(sc, NCR_FFLAG) &
+				    NCRFIFO_FF) == 0) {
 					/* Hope for the best... */
 					break;
 				}
@@ -2872,7 +2864,7 @@ again:
 			/* "Initiate Command Complete Steps" in progress */
 			sc->sc_flags &= ~NCR_ICCS;
 
-			if (!(sc->sc_espintr & NCRINTR_DONE)) {
+			if ((sc->sc_espintr & NCRINTR_DONE) == 0) {
 				device_printf(sc->sc_dev, "ICCS: "
 				    ": [intr %x, stat %x, step %x]\n",
 				    sc->sc_espintr, sc->sc_espstat,
@@ -2912,9 +2904,8 @@ again:
 	 * Driver is now in state NCR_CONNECTED, i.e. we
 	 * have a current command working the SCSI bus.
 	 */
-	if (sc->sc_state != NCR_CONNECTED || ecb == NULL) {
-		panic("ncr53c9x: no nexus");
-	}
+	if (sc->sc_state != NCR_CONNECTED || ecb == NULL)
+		panic("%s: no nexus", __func__);
 
 	switch (sc->sc_phase) {
 	case MESSAGE_OUT_PHASE:
@@ -2928,7 +2919,7 @@ msgin:
 		NCR_PHASE(("MESSAGE_IN_PHASE "));
 		if ((sc->sc_espintr & NCRINTR_BS) != 0) {
 			if ((sc->sc_rev != NCR_VARIANT_FAS366) ||
-			    !(sc->sc_espstat2 & NCRFAS_STAT2_EMPTY)) {
+			    (sc->sc_espstat2 & NCRFAS_STAT2_EMPTY) == 0) {
 				NCRCMD(sc, NCRCMD_FLUSH);
 			}
 			sc->sc_flags |= NCR_WAITI;
@@ -2945,11 +2936,10 @@ msgin:
 			    (sc->sc_prevphase == sc->sc_phase) ?
 			    NCR_RDFIFO_CONTINUE : NCR_RDFIFO_START);
 			ncr53c9x_msgin(sc);
-		} else {
+		} else
 			device_printf(sc->sc_dev, "MSGIN: weird bits: "
 			    "[intr %x, stat %x, step %x]\n",
 			    sc->sc_espintr, sc->sc_espstat, sc->sc_espstep);
-		}
 		sc->sc_prevphase = MESSAGE_IN_PHASE;
 		goto shortcut;	/* i.e. expect data to be ready */
 
@@ -2966,7 +2956,9 @@ msgin:
 		    ecb->cmd.cmd.opcode, ecb->clen));
 		if (NCR_READ_REG(sc, NCR_FFLAG) & NCRFIFO_FF) {
 			NCRCMD(sc, NCRCMD_FLUSH);
-/*			DELAY(1);*/
+#if 0
+			DELAY(1);
+#endif
 		}
 		/*
 		 * If we have more messages to send, e.g. WDTR or SDTR
@@ -2981,7 +2973,7 @@ msgin:
 			/* Setup DMA transfer for command. */
 			size = ecb->clen;
 			sc->sc_cmdlen = size;
-			sc->sc_cmdp = (caddr_t)&ecb->cmd.cmd;
+			sc->sc_cmdp = (void *)&ecb->cmd.cmd;
 			NCRDMA_SETUP(sc, &sc->sc_cmdp, &sc->sc_cmdlen,
 			    0, &size);
 			/* Program the SCSI counter. */
@@ -2994,7 +2986,8 @@ msgin:
 			NCRCMD(sc, NCRCMD_TRANS | NCRCMD_DMA);
 			NCRDMA_GO(sc);
 		} else {
-			ncr53c9x_wrfifo(sc, (u_char *)&ecb->cmd.cmd, ecb->clen);
+			ncr53c9x_wrfifo(sc, (uint8_t *)&ecb->cmd.cmd,
+			    ecb->clen);
 			NCRCMD(sc, NCRCMD_TRANS);
 		}
 		sc->sc_prevphase = COMMAND_PHASE;
@@ -3175,7 +3168,7 @@ ncr53c9x_callout(void *arg)
 static void
 ncr53c9x_watch(void *arg)
 {
-	struct ncr53c9x_softc *sc = (struct ncr53c9x_softc *)arg;
+	struct ncr53c9x_softc *sc = arg;
 	struct ncr53c9x_linfo *li;
 	struct ncr53c9x_tinfo *ti;
 	time_t old;

Modified: head/sys/dev/esp/ncr53c9xreg.h
==============================================================================
--- head/sys/dev/esp/ncr53c9xreg.h	Sat Oct 15 07:00:28 2011	(r226380)
+++ head/sys/dev/esp/ncr53c9xreg.h	Sat Oct 15 09:29:43 2011	(r226381)
@@ -1,4 +1,4 @@
-/*	$NetBSD: ncr53c9xreg.h,v 1.14 2005/02/27 00:27:02 perry Exp $	*/
+/*	$NetBSD: ncr53c9xreg.h,v 1.16 2009/09/07 13:31:44 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1994 Peter Galbavy.  All rights reserved.
@@ -43,84 +43,84 @@
 #define	NCR_FIFO	0x02		/* RW - FIFO data		*/
 
 #define	NCR_CMD		0x03		/* RW - Command (2 deep)	*/
-#define  NCRCMD_DMA	0x80		/*	DMA Bit			*/
-#define  NCRCMD_NOP	0x00		/*	No Operation		*/
-#define  NCRCMD_FLUSH	0x01		/*	Flush FIFO		*/
-#define  NCRCMD_RSTCHIP	0x02		/*	Reset Chip		*/
-#define  NCRCMD_RSTSCSI	0x03		/*	Reset SCSI Bus		*/
-#define  NCRCMD_RESEL	0x40		/*	Reselect Sequence	*/
-#define  NCRCMD_SELNATN	0x41		/*	Select without ATN	*/
-#define  NCRCMD_SELATN	0x42		/*	Select with ATN		*/
-#define  NCRCMD_SELATNS	0x43		/*	Select with ATN & Stop	*/
-#define  NCRCMD_ENSEL	0x44		/*	Enable (Re)Selection	*/
-#define  NCRCMD_DISSEL	0x45		/*	Disable (Re)Selection	*/
-#define  NCRCMD_SELATN3	0x46		/*	Select with ATN3	*/
-#define  NCRCMD_RESEL3	0x47		/*	Reselect3 Sequence	*/
-#define  NCRCMD_SNDMSG	0x20		/*	Send Message		*/
-#define  NCRCMD_SNDSTAT	0x21		/*	Send Status		*/
-#define  NCRCMD_SNDDATA	0x22		/*	Send Data		*/
-#define  NCRCMD_DISCSEQ	0x23		/*	Disconnect Sequence	*/
-#define  NCRCMD_TERMSEQ	0x24		/*	Terminate Sequence	*/
-#define  NCRCMD_TCCS	0x25		/*	Target Command Comp Seq	*/
-#define  NCRCMD_DISC	0x27		/*	Disconnect		*/
-#define  NCRCMD_RECMSG	0x28		/*	Receive Message		*/
-#define  NCRCMD_RECCMD	0x29		/*	Receive Command 	*/
-#define  NCRCMD_RECDATA	0x2a		/*	Receive Data		*/
-#define  NCRCMD_RECCSEQ	0x2b		/*	Receive Command Sequence*/
-#define  NCRCMD_ABORT	0x04		/*	Target Abort DMA	*/
-#define  NCRCMD_TRANS	0x10		/*	Transfer Information	*/
-#define  NCRCMD_ICCS	0x11		/*	Initiator Cmd Comp Seq 	*/
-#define  NCRCMD_MSGOK	0x12		/*	Message Accepted	*/
-#define  NCRCMD_TRPAD	0x18		/*	Transfer Pad		*/
-#define  NCRCMD_SETATN	0x1a		/*	Set ATN			*/
-#define  NCRCMD_RSTATN	0x1b		/*	Reset ATN		*/
+#define	 NCRCMD_DMA	0x80		/*	DMA Bit			*/
+#define	 NCRCMD_NOP	0x00		/*	No Operation		*/
+#define	 NCRCMD_FLUSH	0x01		/*	Flush FIFO		*/
+#define	 NCRCMD_RSTCHIP	0x02		/*	Reset Chip		*/
+#define	 NCRCMD_RSTSCSI	0x03		/*	Reset SCSI Bus		*/
+#define	 NCRCMD_RESEL	0x40		/*	Reselect Sequence	*/
+#define	 NCRCMD_SELNATN	0x41		/*	Select without ATN	*/
+#define	 NCRCMD_SELATN	0x42		/*	Select with ATN		*/
+#define	 NCRCMD_SELATNS	0x43		/*	Select with ATN & Stop	*/
+#define	 NCRCMD_ENSEL	0x44		/*	Enable (Re)Selection	*/
+#define	 NCRCMD_DISSEL	0x45		/*	Disable (Re)Selection	*/
+#define	 NCRCMD_SELATN3	0x46		/*	Select with ATN3	*/
+#define	 NCRCMD_RESEL3	0x47		/*	Reselect3 Sequence	*/
+#define	 NCRCMD_SNDMSG	0x20		/*	Send Message		*/
+#define	 NCRCMD_SNDSTAT	0x21		/*	Send Status		*/
+#define	 NCRCMD_SNDDATA	0x22		/*	Send Data		*/
+#define	 NCRCMD_DISCSEQ	0x23		/*	Disconnect Sequence	*/
+#define	 NCRCMD_TERMSEQ	0x24		/*	Terminate Sequence	*/
+#define	 NCRCMD_TCCS	0x25		/*	Target Command Comp Seq	*/
+#define	 NCRCMD_DISC	0x27		/*	Disconnect		*/
+#define	 NCRCMD_RECMSG	0x28		/*	Receive Message		*/
+#define	 NCRCMD_RECCMD	0x29		/*	Receive Command		*/
+#define	 NCRCMD_RECDATA	0x2a		/*	Receive Data		*/
+#define	 NCRCMD_RECCSEQ	0x2b		/*	Receive Command Sequence*/
+#define	 NCRCMD_ABORT	0x04		/*	Target Abort DMA	*/
+#define	 NCRCMD_TRANS	0x10		/*	Transfer Information	*/
+#define	 NCRCMD_ICCS	0x11		/*	Initiator Cmd Comp Seq	*/
+#define	 NCRCMD_MSGOK	0x12		/*	Message Accepted	*/
+#define	 NCRCMD_TRPAD	0x18		/*	Transfer Pad		*/
+#define	 NCRCMD_SETATN	0x1a		/*	Set ATN			*/
+#define	 NCRCMD_RSTATN	0x1b		/*	Reset ATN		*/
 
 #define	NCR_STAT	0x04		/* RO - Status			*/
-#define  NCRSTAT_INT	0x80		/*	Interrupt		*/
-#define  NCRSTAT_GE	0x40		/*	Gross Error		*/
-#define  NCRSTAT_PE	0x20		/*	Parity Error		*/
-#define  NCRSTAT_TC	0x10		/*	Terminal Count		*/
-#define  NCRSTAT_VGC	0x08		/*	Valid Group Code	*/
-#define  NCRSTAT_PHASE	0x07		/*	Phase bits		*/
+#define	 NCRSTAT_INT	0x80		/*	Interrupt		*/
+#define	 NCRSTAT_GE	0x40		/*	Gross Error		*/
+#define	 NCRSTAT_PE	0x20		/*	Parity Error		*/
+#define	 NCRSTAT_TC	0x10		/*	Terminal Count		*/
+#define	 NCRSTAT_VGC	0x08		/*	Valid Group Code	*/
+#define	 NCRSTAT_PHASE	0x07		/*	Phase bits		*/
 
 #define	NCR_SELID	0x04		/* WO - Select/Reselect Bus ID	*/
-#define  NCR_BUSID_HMEXC32	0x40	/*	HME xfer counter is 32bit */
-#define  NCR_BUSID_HMEENCID	0x10 	/*	HME encode reselection ID */
+#define	 NCR_BUSID_HMEXC32	0x40	/*	HME xfer counter is 32bit */
+#define	 NCR_BUSID_HMEENCID	0x10	/*	HME encode reselection ID */
 
 #define	NCR_INTR	0x05		/* RO - Interrupt		*/
-#define  NCRINTR_SBR	0x80		/*	SCSI Bus Reset		*/
-#define  NCRINTR_ILL	0x40		/*	Illegal Command		*/
-#define  NCRINTR_DIS	0x20		/*	Disconnect		*/
-#define  NCRINTR_BS	0x10		/*	Bus Service		*/
-#define  NCRINTR_FC	0x08		/*	Function Complete	*/
-#define  NCRINTR_RESEL	0x04		/*	Reselected		*/
-#define  NCRINTR_SELATN	0x02		/*	Select with ATN		*/
-#define  NCRINTR_SEL	0x01		/*	Selected		*/
+#define	 NCRINTR_SBR	0x80		/*	SCSI Bus Reset		*/
+#define	 NCRINTR_ILL	0x40		/*	Illegal Command		*/
+#define	 NCRINTR_DIS	0x20		/*	Disconnect		*/
+#define	 NCRINTR_BS	0x10		/*	Bus Service		*/
+#define	 NCRINTR_FC	0x08		/*	Function Complete	*/
+#define	 NCRINTR_RESEL	0x04		/*	Reselected		*/
+#define	 NCRINTR_SELATN	0x02		/*	Select with ATN		*/
+#define	 NCRINTR_SEL	0x01		/*	Selected		*/
 
 #define	NCR_TIMEOUT	0x05		/* WO - Select/Reselect Timeout */
 
 #define	NCR_STEP	0x06		/* RO - Sequence Step		*/
-#define  NCRSTEP_MASK	0x07		/*	the last 3 bits		*/
-#define  NCRSTEP_DONE	0x04		/*	command went out	*/
+#define	 NCRSTEP_MASK	0x07		/*	the last 3 bits		*/
+#define	 NCRSTEP_DONE	0x04		/*	command went out	*/
 
 #define	NCR_SYNCTP	0x06		/* WO - Synch Transfer Period	*/
 					/*	Default 5 (53C9X)	*/
 
 #define	NCR_FFLAG	0x07		/* RO - FIFO Flags		*/
-#define  NCRFIFO_SS	0xe0		/*	Sequence Step (Dup)	*/
-#define  NCRFIFO_FF	0x1f		/*	Bytes in FIFO		*/
+#define	 NCRFIFO_SS	0xe0		/*	Sequence Step (Dup)	*/
+#define	 NCRFIFO_FF	0x1f		/*	Bytes in FIFO		*/
 
 #define	NCR_SYNCOFF	0x07		/* WO - Synch Offset		*/
 					/*	0 = ASYNC		*/
 					/*	1 - 15 = SYNC bytes	*/
 
 #define	NCR_CFG1	0x08		/* RW - Configuration #1	*/
-#define  NCRCFG1_SLOW	0x80		/*	Slow Cable Mode		*/
-#define  NCRCFG1_SRR	0x40		/*	SCSI Reset Rep Int Dis	*/
-#define  NCRCFG1_PTEST	0x20		/*	Parity Test Mod		*/
-#define  NCRCFG1_PARENB	0x10		/*	Enable Parity Check	*/
-#define  NCRCFG1_CTEST	0x08		/*	Enable Chip Test	*/
-#define  NCRCFG1_BUSID	0x07		/*	Bus ID			*/
+#define	 NCRCFG1_SLOW	0x80		/*	Slow Cable Mode		*/
+#define	 NCRCFG1_SRR	0x40		/*	SCSI Reset Rep Int Dis	*/
+#define	 NCRCFG1_PTEST	0x20		/*	Parity Test Mod		*/
+#define	 NCRCFG1_PARENB	0x10		/*	Enable Parity Check	*/
+#define	 NCRCFG1_CTEST	0x08		/*	Enable Chip Test	*/
+#define	 NCRCFG1_BUSID	0x07		/*	Bus ID			*/
 
 #define	NCR_CCF		0x09		/* WO -	Clock Conversion Factor	*/
 					/*	0 = 35.01 - 40MHz	*/
@@ -136,24 +136,24 @@
 
 #define	NCR_CFG2	0x0b		/* RW - Configuration #2	*/
 #define	 NCRCFG2_RSVD	0xa0		/*	reserved		*/
-#define  NCRCFG2_FE	0x40		/* 	Features Enable		*/
-#define  NCRCFG2_DREQ	0x10		/* 	DREQ High Impedance	*/
-#define  NCRCFG2_SCSI2	0x08		/* 	SCSI-2 Enable		*/
-#define  NCRCFG2_BPA	0x04		/* 	Target Bad Parity Abort	*/
-#define  NCRCFG2_RPE	0x02		/* 	Register Parity Error	*/
-#define  NCRCFG2_DPE	0x01		/* 	DMA Parity Error	*/
+#define	 NCRCFG2_FE	0x40		/*	Features Enable		*/
+#define	 NCRCFG2_DREQ	0x10		/*	DREQ High Impedance	*/
+#define	 NCRCFG2_SCSI2	0x08		/*	SCSI-2 Enable		*/
+#define	 NCRCFG2_BPA	0x04		/*	Target Bad Parity Abort	*/
+#define	 NCRCFG2_RPE	0x02		/*	Register Parity Error	*/
+#define	 NCRCFG2_DPE	0x01		/*	DMA Parity Error	*/
 
-#define  NCRCFG2_HMEFE	0x10		/*	HME feature enable	*/
+#define	 NCRCFG2_HMEFE	0x10		/*	HME feature enable	*/
 #define	 NCRCFG2_HME32  0x80		/*	HME 32 extended		*/
 
 /* Config #3 only on 53C9X */
 #define	NCR_CFG3	0x0c		/* RW - Configuration #3	*/
 #define	 NCRCFG3_RSVD	0xe0		/*	reserved		*/
-#define  NCRCFG3_IDM	0x10		/*	ID Message Res Check	*/
-#define  NCRCFG3_QTE	0x08		/*	Queue Tag Enable	*/
-#define  NCRCFG3_CDB	0x04		/*	CDB 10-bytes OK		*/
-#define  NCRCFG3_FSCSI	0x02		/*	Fast SCSI		*/
-#define  NCRCFG3_FCLK	0x01		/*	Fast Clock (>25MHz)	*/
+#define	 NCRCFG3_IDM	0x10		/*	ID Message Res Check	*/
+#define	 NCRCFG3_QTE	0x08		/*	Queue Tag Enable	*/
+#define	 NCRCFG3_CDB	0x04		/*	CDB 10-bytes OK		*/
+#define	 NCRCFG3_FSCSI	0x02		/*	Fast SCSI		*/
+#define	 NCRCFG3_FCLK	0x01		/*	Fast Clock (>25MHz)	*/
 
 /*
  * For some unknown reason, the ESP406/FAS408 looks like every
@@ -164,35 +164,35 @@
 
 /* Config #3 different on ESP406/FAS408 */
 #define	NCR_ESPCFG3		0x0c	/* RW - Configuration #3	*/
-#define  NCRESPCFG3_IDM		0x80	/*	ID Message Res Check	*/
-#define  NCRESPCFG3_QTE		0x40	/*	Queue Tag Enable	*/
-#define  NCRESPCFG3_CDB		0x20	/*	CDB 10-bytes OK		*/
-#define  NCRESPCFG3_FSCSI	0x10	/*	Fast SCSI		*/
+#define	 NCRESPCFG3_IDM		0x80	/*	ID Message Res Check	*/
+#define	 NCRESPCFG3_QTE		0x40	/*	Queue Tag Enable	*/
+#define	 NCRESPCFG3_CDB		0x20	/*	CDB 10-bytes OK		*/
+#define	 NCRESPCFG3_FSCSI	0x10	/*	Fast SCSI		*/
 #define	 NCRESPCFG3_SRESB	0x08	/*	Save Residual Byte	*/
-#define  NCRESPCFG3_FCLK	0x04	/*	Fast Clock (>25MHz)	*/
+#define	 NCRESPCFG3_FCLK	0x04	/*	Fast Clock (>25MHz)	*/
 #define	 NCRESPCFG3_ADMA	0x02	/*	Alternate DMA Mode	*/
 #define	 NCRESPCFG3_T8M		0x01	/*	Threshold 8 Mode	*/
 
 /* Config #3 also different on NCR53CF9x/FAS100A/FAS216/FAS236 */
 #define	NCR_F9XCFG3		0x0c	/* RW - Configuration #3	*/
-#define  NCRF9XCFG3_IDM		0x80	/*	ID Message Res Check	*/
-#define  NCRF9XCFG3_QTE		0x40	/*	Queue Tag Enable	*/
-#define  NCRF9XCFG3_CDB		0x20	/*	CDB 10-bytes OK		*/
-#define  NCRF9XCFG3_FSCSI	0x10	/*	Fast SCSI		*/
-#define  NCRF9XCFG3_FCLK	0x08	/*	Fast Clock (>25MHz)	*/
-#define  NCRF9XCFG3_SRESB	0x04	/*	Save Residual Byte	*/
-#define  NCRF9XCFG3_ADMA	0x02	/*	Alternate DMA Mode	*/
-#define  NCRF9XCFG3_T8M		0x01	/*	Threshold 8 Mode	*/
+#define	 NCRF9XCFG3_IDM		0x80	/*	ID Message Res Check	*/
+#define	 NCRF9XCFG3_QTE		0x40	/*	Queue Tag Enable	*/
+#define	 NCRF9XCFG3_CDB		0x20	/*	CDB 10-bytes OK		*/
+#define	 NCRF9XCFG3_FSCSI	0x10	/*	Fast SCSI		*/
+#define	 NCRF9XCFG3_FCLK	0x08	/*	Fast Clock (>25MHz)	*/
+#define	 NCRF9XCFG3_SRESB	0x04	/*	Save Residual Byte	*/
+#define	 NCRF9XCFG3_ADMA	0x02	/*	Alternate DMA Mode	*/
+#define	 NCRF9XCFG3_T8M		0x01	/*	Threshold 8 Mode	*/
 
 /* Config #3 on FAS366 */
-#define  NCRFASCFG3_OBAUTO    	0x80    /*	auto push odd-byte to DMA */
-#define  NCRFASCFG3_EWIDE     	0x40    /* 	Enable Wide-SCSI     */
-#define  NCRFASCFG3_IDBIT3	0x20	/* 	Bit 3 of HME SCSI-ID */
-#define	 NCRFASCFG3_IDRESCHK	0x10	/* 	ID message checking */
-#define	 NCRFASCFG3_QUENB	0x08	/* 	3-byte msg support */
-#define	 NCRFASCFG3_CDB10	0x04	/* 	group 2 scsi-2 support */
-#define	 NCRFASCFG3_FASTSCSI	0x02	/* 	10 MB/S fast scsi mode */
-#define	 NCRFASCFG3_FASTCLK	0x01	/* 	fast clock mode */
+#define	 NCRFASCFG3_OBAUTO	0x80    /*	auto push odd-byte to DMA */
+#define	 NCRFASCFG3_EWIDE	0x40    /*	Enable Wide-SCSI     */
+#define	 NCRFASCFG3_IDBIT3	0x20	/*	Bit 3 of HME SCSI-ID */
+#define	 NCRFASCFG3_IDRESCHK	0x10	/*	ID message checking */
+#define	 NCRFASCFG3_QUENB	0x08	/*	3-byte msg support */
+#define	 NCRFASCFG3_CDB10	0x04	/*	group 2 scsi-2 support */
+#define	 NCRFASCFG3_FASTSCSI	0x02	/*	10 MB/S fast scsi mode */
+#define	 NCRFASCFG3_FASTCLK	0x01	/*	fast clock mode */
 
 /* Config #4 only on ESP406/FAS408 */
 #define	NCR_CFG4	0x0d		/* RW - Configuration #4	*/
@@ -208,8 +208,8 @@
 */
 

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

From owner-svn-src-all@FreeBSD.ORG  Sat Oct 15 09:32:25 2011
Return-Path: 
Delivered-To: svn-src-all@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 4B56C106564A;
	Sat, 15 Oct 2011 09:32:25 +0000 (UTC)
	(envelope-from brde@optusnet.com.au)
Received: from mail07.syd.optusnet.com.au (mail07.syd.optusnet.com.au
	[211.29.132.188])
	by mx1.freebsd.org (Postfix) with ESMTP id C493B8FC0C;
	Sat, 15 Oct 2011 09:32:24 +0000 (UTC)
Received: from c122-106-165-191.carlnfd1.nsw.optusnet.com.au
	(c122-106-165-191.carlnfd1.nsw.optusnet.com.au [122.106.165.191])
	by mail07.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id
	p9F9WKk0015011
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Sat, 15 Oct 2011 20:32:22 +1100
Date: Sat, 15 Oct 2011 20:32:20 +1100 (EST)
From: Bruce Evans 
X-X-Sender: bde@besplex.bde.org
To: David Schultz 
In-Reply-To: <201110150500.p9F50ubA095989@svn.freebsd.org>
Message-ID: <20111015203202.Q3556@besplex.bde.org>
References: <201110150500.p9F50ubA095989@svn.freebsd.org>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org,
	src-committers@FreeBSD.org
Subject: Re: svn commit: r226375 - head/lib/msun/src
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 15 Oct 2011 09:32:25 -0000

On Sat, 15 Oct 2011, David Schultz wrote:

> Log:
>  Style fixes and updates to comments.
>
>  Submitted by:	bde

Thanks for all the libm commits.

Bruce

From owner-svn-src-all@FreeBSD.ORG  Sat Oct 15 12:02:56 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 071841065687;
	Sat, 15 Oct 2011 12:02:56 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id EA3538FC12;
	Sat, 15 Oct 2011 12:02:55 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9FC2tAC012399;
	Sat, 15 Oct 2011 12:02:55 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9FC2tEC012397;
	Sat, 15 Oct 2011 12:02:55 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <201110151202.p9FC2tEC012397@svn.freebsd.org>
From: Konstantin Belousov 
Date: Sat, 15 Oct 2011 12:02:55 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226382 - stable/8/libexec/rtld-elf
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 15 Oct 2011 12:02:56 -0000

Author: kib
Date: Sat Oct 15 12:02:55 2011
New Revision: 226382
URL: http://svn.freebsd.org/changeset/base/226382

Log:
  MFC r226155:
  Set TLS block for the main thread after the relocations are processed.

Modified:
  stable/8/libexec/rtld-elf/rtld.c
Directory Properties:
  stable/8/libexec/rtld-elf/   (props changed)

Modified: stable/8/libexec/rtld-elf/rtld.c
==============================================================================
--- stable/8/libexec/rtld-elf/rtld.c	Sat Oct 15 09:29:43 2011	(r226381)
+++ stable/8/libexec/rtld-elf/rtld.c	Sat Oct 15 12:02:55 2011	(r226382)
@@ -508,8 +508,12 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_
        exit (0);
     }
 
-    /* setup TLS for main thread */
-    dbg("initializing initial thread local storage");
+    /*
+     * Processing tls relocations requires having the tls offsets
+     * initialized.  Prepare offsets before starting initial
+     * relocation processing.
+     */
+    dbg("initializing initial thread local storage offsets");
     STAILQ_FOREACH(entry, &list_main, link) {
 	/*
 	 * Allocate all the initial objects out of the static TLS
@@ -517,7 +521,6 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_
 	 */
 	allocate_tls_offset(entry->obj);
     }
-    allocate_initial_tls(obj_list);
 
     if (relocate_objects(obj_main,
 	ld_bind_now != NULL && *ld_bind_now != '\0', &obj_rtld) == -1)
@@ -532,6 +535,14 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_
        exit (0);
     }
 
+    /*
+     * Setup TLS for main thread.  This must be done after the
+     * relocations are processed, since tls initialization section
+     * might be the subject for relocations.
+     */
+    dbg("initializing initial thread local storage");
+    allocate_initial_tls(obj_list);
+
     dbg("initializing key program variables");
     set_program_var("__progname", argv[0] != NULL ? basename(argv[0]) : "");
     set_program_var("environ", env);

From owner-svn-src-all@FreeBSD.ORG  Sat Oct 15 12:05:31 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A3F04106566C;
	Sat, 15 Oct 2011 12:05:31 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 92A688FC0A;
	Sat, 15 Oct 2011 12:05:31 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9FC5Vrc012539;
	Sat, 15 Oct 2011 12:05:31 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9FC5VBU012537;
	Sat, 15 Oct 2011 12:05:31 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <201110151205.p9FC5VBU012537@svn.freebsd.org>
From: Konstantin Belousov 
Date: Sat, 15 Oct 2011 12:05:31 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226383 - stable/8/libexec/rtld-elf/i386
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 15 Oct 2011 12:05:31 -0000

Author: kib
Date: Sat Oct 15 12:05:31 2011
New Revision: 226383
URL: http://svn.freebsd.org/changeset/base/226383

Log:
  MFC r226156:
  Handle the R_386_TLS_TPOFF32 relocation.

Modified:
  stable/8/libexec/rtld-elf/i386/reloc.c
Directory Properties:
  stable/8/libexec/rtld-elf/   (props changed)

Modified: stable/8/libexec/rtld-elf/i386/reloc.c
==============================================================================
--- stable/8/libexec/rtld-elf/i386/reloc.c	Sat Oct 15 12:02:55 2011	(r226382)
+++ stable/8/libexec/rtld-elf/i386/reloc.c	Sat Oct 15 12:05:31 2011	(r226383)
@@ -207,9 +207,11 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry 
 		break;
 
 	    case R_386_TLS_TPOFF:
+	    case R_386_TLS_TPOFF32:
 		{
 		    const Elf_Sym *def;
 		    const Obj_Entry *defobj;
+		    Elf_Addr add;
 
 		    def = find_symdef(ELF_R_SYM(rel->r_info), obj, &defobj,
 		      false, cache);
@@ -231,8 +233,11 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry 
 			    goto done;
 			}
 		    }
-
-		    *where += (Elf_Addr) (def->st_value - defobj->tlsoffset);
+		    add = (Elf_Addr) (def->st_value - defobj->tlsoffset);
+		    if (ELF_R_TYPE(rel->r_info) == R_386_TLS_TPOFF)
+			*where += add;
+		    else
+			*where -= add;
 		}
 		break;
 

From owner-svn-src-all@FreeBSD.ORG  Sat Oct 15 12:05:42 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 9BBE4106566C;
	Sat, 15 Oct 2011 12:05:42 +0000 (UTC)
	(envelope-from brueffer@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 8ABD18FC1B;
	Sat, 15 Oct 2011 12:05:42 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9FC5gQL012581;
	Sat, 15 Oct 2011 12:05:42 GMT
	(envelope-from brueffer@svn.freebsd.org)
Received: (from brueffer@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9FC5gra012579;
	Sat, 15 Oct 2011 12:05:42 GMT
	(envelope-from brueffer@svn.freebsd.org)
Message-Id: <201110151205.p9FC5gra012579@svn.freebsd.org>
From: Christian Brueffer 
Date: Sat, 15 Oct 2011 12:05:42 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226384 - stable/9/sys/security/mac_mls
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 15 Oct 2011 12:05:42 -0000

Author: brueffer
Date: Sat Oct 15 12:05:42 2011
New Revision: 226384
URL: http://svn.freebsd.org/changeset/base/226384

Log:
  MFC: r226143
  
  Remove two dublicated assignments.
  
  Approved by:	re (kib)

Modified:
  stable/9/sys/security/mac_mls/mac_mls.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/amd64/include/xen/   (props changed)
  stable/9/sys/boot/   (props changed)
  stable/9/sys/boot/i386/efi/   (props changed)
  stable/9/sys/boot/ia64/efi/   (props changed)
  stable/9/sys/boot/ia64/ski/   (props changed)
  stable/9/sys/boot/powerpc/boot1.chrp/   (props changed)
  stable/9/sys/boot/powerpc/ofw/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)
  stable/9/sys/conf/   (props changed)
  stable/9/sys/contrib/dev/acpica/   (props changed)
  stable/9/sys/contrib/octeon-sdk/   (props changed)
  stable/9/sys/contrib/pf/   (props changed)
  stable/9/sys/contrib/x86emu/   (props changed)

Modified: stable/9/sys/security/mac_mls/mac_mls.c
==============================================================================
--- stable/9/sys/security/mac_mls/mac_mls.c	Sat Oct 15 12:05:31 2011	(r226383)
+++ stable/9/sys/security/mac_mls/mac_mls.c	Sat Oct 15 12:05:42 2011	(r226384)
@@ -1636,9 +1636,6 @@ mls_posixshm_check_open(struct ucred *cr
 	subj = SLOT(cred->cr_label);
 	obj = SLOT(shmlabel);
 
-	subj = SLOT(cred->cr_label);
-	obj = SLOT(shmlabel);
-
 	if (accmode & (VREAD | VEXEC | VSTAT_PERMS)) {
 		if (!mls_dominate_effective(subj, obj))
 			return (EACCES);

From owner-svn-src-all@FreeBSD.ORG  Sat Oct 15 12:08:22 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 186661065672;
	Sat, 15 Oct 2011 12:08:22 +0000 (UTC)
	(envelope-from brueffer@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 078678FC14;
	Sat, 15 Oct 2011 12:08:22 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9FC8LVD012707;
	Sat, 15 Oct 2011 12:08:21 GMT
	(envelope-from brueffer@svn.freebsd.org)
Received: (from brueffer@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9FC8Lm9012705;
	Sat, 15 Oct 2011 12:08:21 GMT
	(envelope-from brueffer@svn.freebsd.org)
Message-Id: <201110151208.p9FC8Lm9012705@svn.freebsd.org>
From: Christian Brueffer 
Date: Sat, 15 Oct 2011 12:08:21 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226385 - stable/9/sys/dev/ppbus
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 15 Oct 2011 12:08:22 -0000

Author: brueffer
Date: Sat Oct 15 12:08:21 2011
New Revision: 226385
URL: http://svn.freebsd.org/changeset/base/226385

Log:
  MFC: r226116
  
  Add missing va_end() to clean up after va_start().
  
  Approved by:	re (kib)

Modified:
  stable/9/sys/dev/ppbus/ppb_msq.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/amd64/include/xen/   (props changed)
  stable/9/sys/boot/   (props changed)
  stable/9/sys/boot/i386/efi/   (props changed)
  stable/9/sys/boot/ia64/efi/   (props changed)
  stable/9/sys/boot/ia64/ski/   (props changed)
  stable/9/sys/boot/powerpc/boot1.chrp/   (props changed)
  stable/9/sys/boot/powerpc/ofw/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)
  stable/9/sys/conf/   (props changed)
  stable/9/sys/contrib/dev/acpica/   (props changed)
  stable/9/sys/contrib/octeon-sdk/   (props changed)
  stable/9/sys/contrib/pf/   (props changed)
  stable/9/sys/contrib/x86emu/   (props changed)

Modified: stable/9/sys/dev/ppbus/ppb_msq.c
==============================================================================
--- stable/9/sys/dev/ppbus/ppb_msq.c	Sat Oct 15 12:05:42 2011	(r226384)
+++ stable/9/sys/dev/ppbus/ppb_msq.c	Sat Oct 15 12:08:21 2011	(r226385)
@@ -244,6 +244,7 @@ ppb_MS_init_msq(struct ppb_microseq *msq
 		}
 	}
 
+	va_end(p_list);
 	return (0);
 }
 

From owner-svn-src-all@FreeBSD.ORG  Sat Oct 15 12:10:34 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D6F111065674;
	Sat, 15 Oct 2011 12:10:34 +0000 (UTC)
	(envelope-from brueffer@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id C61768FC0A;
	Sat, 15 Oct 2011 12:10:34 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9FCAYIR012827;
	Sat, 15 Oct 2011 12:10:34 GMT
	(envelope-from brueffer@svn.freebsd.org)
Received: (from brueffer@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9FCAYUE012825;
	Sat, 15 Oct 2011 12:10:34 GMT
	(envelope-from brueffer@svn.freebsd.org)
Message-Id: <201110151210.p9FCAYUE012825@svn.freebsd.org>
From: Christian Brueffer 
Date: Sat, 15 Oct 2011 12: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
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226386 - stable/9/sys/netipsec
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 15 Oct 2011 12:10:35 -0000

Author: brueffer
Date: Sat Oct 15 12:10:34 2011
New Revision: 226386
URL: http://svn.freebsd.org/changeset/base/226386

Log:
  MFC: r226117
  
  Add missing va_end() in an error case to clean up after va_start()
  (already done in the non-error case).
  
  Approved by:	re (kib)

Modified:
  stable/9/sys/netipsec/key.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/amd64/include/xen/   (props changed)
  stable/9/sys/boot/   (props changed)
  stable/9/sys/boot/i386/efi/   (props changed)
  stable/9/sys/boot/ia64/efi/   (props changed)
  stable/9/sys/boot/ia64/ski/   (props changed)
  stable/9/sys/boot/powerpc/boot1.chrp/   (props changed)
  stable/9/sys/boot/powerpc/ofw/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)
  stable/9/sys/conf/   (props changed)
  stable/9/sys/contrib/dev/acpica/   (props changed)
  stable/9/sys/contrib/octeon-sdk/   (props changed)
  stable/9/sys/contrib/pf/   (props changed)
  stable/9/sys/contrib/x86emu/   (props changed)

Modified: stable/9/sys/netipsec/key.c
==============================================================================
--- stable/9/sys/netipsec/key.c	Sat Oct 15 12:08:21 2011	(r226385)
+++ stable/9/sys/netipsec/key.c	Sat Oct 15 12:10:34 2011	(r226386)
@@ -1764,6 +1764,7 @@ key_gather_mbuf(m, mhp, ndeep, nitem, va
 
 fail:
 	m_freem(result);
+	va_end(ap);
 	return NULL;
 }
 

From owner-svn-src-all@FreeBSD.ORG  Sat Oct 15 12:33:25 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 34F85106566C;
	Sat, 15 Oct 2011 12:33:25 +0000 (UTC)
	(envelope-from brueffer@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 242F48FC15;
	Sat, 15 Oct 2011 12:33:25 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9FCXP3x013665;
	Sat, 15 Oct 2011 12:33:25 GMT
	(envelope-from brueffer@svn.freebsd.org)
Received: (from brueffer@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9FCXOc0013663;
	Sat, 15 Oct 2011 12:33:25 GMT
	(envelope-from brueffer@svn.freebsd.org)
Message-Id: <201110151233.p9FCXOc0013663@svn.freebsd.org>
From: Christian Brueffer 
Date: Sat, 15 Oct 2011 12:33:24 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226387 - stable/9/sys/dev/bwn
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 15 Oct 2011 12:33:25 -0000

Author: brueffer
Date: Sat Oct 15 12:33:24 2011
New Revision: 226387
URL: http://svn.freebsd.org/changeset/base/226387

Log:
  MFC: r226146
  
  Remove dead code, "error" doesn't change between this check and the
  previous one.
  
  Approved by:	re (kib)

Modified:
  stable/9/sys/dev/bwn/if_bwn.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/amd64/include/xen/   (props changed)
  stable/9/sys/boot/   (props changed)
  stable/9/sys/boot/i386/efi/   (props changed)
  stable/9/sys/boot/ia64/efi/   (props changed)
  stable/9/sys/boot/ia64/ski/   (props changed)
  stable/9/sys/boot/powerpc/boot1.chrp/   (props changed)
  stable/9/sys/boot/powerpc/ofw/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)
  stable/9/sys/conf/   (props changed)
  stable/9/sys/contrib/dev/acpica/   (props changed)
  stable/9/sys/contrib/octeon-sdk/   (props changed)
  stable/9/sys/contrib/pf/   (props changed)
  stable/9/sys/contrib/x86emu/   (props changed)

Modified: stable/9/sys/dev/bwn/if_bwn.c
==============================================================================
--- stable/9/sys/dev/bwn/if_bwn.c	Sat Oct 15 12:10:34 2011	(r226386)
+++ stable/9/sys/dev/bwn/if_bwn.c	Sat Oct 15 12:33:24 2011	(r226387)
@@ -3213,8 +3213,6 @@ bwn_core_init(struct bwn_mac *mac)
 		bwn_pio_init(mac);
 	else
 		bwn_dma_init(mac);
-	if (error)
-		goto fail1;
 	bwn_wme_init(mac);
 	bwn_spu_setdelay(mac, 1);
 	bwn_bt_enable(mac);
@@ -3230,8 +3228,6 @@ bwn_core_init(struct bwn_mac *mac)
 
 	return (error);
 
-fail1:
-	bwn_chip_exit(mac);
 fail0:
 	siba_powerdown(sc->sc_dev);
 	KASSERT(mac->mac_status == BWN_MAC_STATUS_UNINIT,

From owner-svn-src-all@FreeBSD.ORG  Sat Oct 15 12:35:19 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 1267A1065788;
	Sat, 15 Oct 2011 12:35:19 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id EC0538FC18;
	Sat, 15 Oct 2011 12:35:18 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9FCZIfq013774;
	Sat, 15 Oct 2011 12:35:18 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9FCZIMN013769;
	Sat, 15 Oct 2011 12:35:18 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <201110151235.p9FCZIMN013769@svn.freebsd.org>
From: Konstantin Belousov 
Date: Sat, 15 Oct 2011 12:35:18 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226388 - in head/sys: compat/freebsd32 kern sys vm
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 15 Oct 2011 12:35:19 -0000

Author: kib
Date: Sat Oct 15 12:35:18 2011
New Revision: 226388
URL: http://svn.freebsd.org/changeset/base/226388

Log:
  Control the execution permission of the readable segments for
  i386 binaries on the amd64 and ia64 with the sysctl, instead of
  unconditionally enabling it.
  
  Reviewed by:	marcel

Modified:
  head/sys/compat/freebsd32/freebsd32_misc.c
  head/sys/kern/imgact_elf.c
  head/sys/sys/sysent.h
  head/sys/vm/vm_unix.c

Modified: head/sys/compat/freebsd32/freebsd32_misc.c
==============================================================================
--- head/sys/compat/freebsd32/freebsd32_misc.c	Sat Oct 15 12:33:24 2011	(r226387)
+++ head/sys/compat/freebsd32/freebsd32_misc.c	Sat Oct 15 12:35:18 2011	(r226388)
@@ -445,7 +445,7 @@ freebsd32_mprotect(struct thread *td, st
 	ap.len = uap->len;
 	ap.prot = uap->prot;
 #if defined(__amd64__) || defined(__ia64__)
-	if (ap.prot & PROT_READ)
+	if (i386_read_exec && (ap.prot & PROT_READ) != 0)
 		ap.prot |= PROT_EXEC;
 #endif
 	return (sys_mprotect(td, &ap));
@@ -536,7 +536,7 @@ freebsd32_mmap(struct thread *td, struct
 #endif
 
 #if defined(__amd64__) || defined(__ia64__)
-	if (prot & PROT_READ)
+	if (i386_read_exec && (prot & PROT_READ))
 		prot |= PROT_EXEC;
 #endif
 

Modified: head/sys/kern/imgact_elf.c
==============================================================================
--- head/sys/kern/imgact_elf.c	Sat Oct 15 12:33:24 2011	(r226387)
+++ head/sys/kern/imgact_elf.c	Sat Oct 15 12:35:18 2011	(r226388)
@@ -123,6 +123,14 @@ SYSCTL_INT(__CONCAT(_kern_elf, __ELF_WOR
     nxstack, CTLFLAG_RW, &__elfN(nxstack), 0,
     __XSTRING(__CONCAT(ELF, __ELF_WORD_SIZE)) ": enable non-executable stack");
 
+#if __ELF_WORD_SIZE == 32
+#if defined(__amd64__) || defined(__ia64__)
+int i386_read_exec = 0;
+SYSCTL_INT(_kern_elf32, OID_AUTO, read_exec, CTLFLAG_RW, &i386_read_exec, 0,
+    "enable execution from readable segments");
+#endif
+#endif
+
 static Elf_Brandinfo *elf_brand_list[MAX_BRANDS];
 
 #define	trunc_page_ps(va, ps)	((va) & ~(ps - 1))
@@ -1666,7 +1674,7 @@ __elfN(trans_prot)(Elf_Word flags)
 		prot |= VM_PROT_READ;
 #if __ELF_WORD_SIZE == 32
 #if defined(__amd64__) || defined(__ia64__)
-	if (flags & PF_R)
+	if (i386_read_exec && (flags & PF_R))
 		prot |= VM_PROT_EXECUTE;
 #endif
 #endif

Modified: head/sys/sys/sysent.h
==============================================================================
--- head/sys/sys/sysent.h	Sat Oct 15 12:33:24 2011	(r226387)
+++ head/sys/sys/sysent.h	Sat Oct 15 12:35:18 2011	(r226388)
@@ -151,6 +151,10 @@ extern struct sysentvec null_sysvec;
 extern struct sysent sysent[];
 extern const char *syscallnames[];
 
+#if defined(__amd64__) || defined(__ia64__)
+extern int i386_read_exec;
+#endif
+
 #define	NO_SYSCALL (-1)
 
 struct module;

Modified: head/sys/vm/vm_unix.c
==============================================================================
--- head/sys/vm/vm_unix.c	Sat Oct 15 12:33:24 2011	(r226387)
+++ head/sys/vm/vm_unix.c	Sat Oct 15 12:35:18 2011	(r226388)
@@ -141,7 +141,7 @@ sys_obreak(td, uap)
 		prot = VM_PROT_RW;
 #ifdef COMPAT_FREEBSD32
 #if defined(__amd64__) || defined(__ia64__)
-		if (SV_PROC_FLAG(td->td_proc, SV_ILP32))
+		if (i386_read_exec && SV_PROC_FLAG(td->td_proc, SV_ILP32))
 			prot |= VM_PROT_EXECUTE;
 #endif
 #endif

From owner-svn-src-all@FreeBSD.ORG  Sat Oct 15 12:35:59 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 004981065670;
	Sat, 15 Oct 2011 12:35:58 +0000 (UTC)
	(envelope-from brueffer@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id E389D8FC1C;
	Sat, 15 Oct 2011 12:35:58 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9FCZwf6013828;
	Sat, 15 Oct 2011 12:35:58 GMT
	(envelope-from brueffer@svn.freebsd.org)
Received: (from brueffer@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9FCZwTR013826;
	Sat, 15 Oct 2011 12:35:58 GMT
	(envelope-from brueffer@svn.freebsd.org)
Message-Id: <201110151235.p9FCZwTR013826@svn.freebsd.org>
From: Christian Brueffer 
Date: Sat, 15 Oct 2011 12:35:58 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226389 - stable/9/sys/dev/siba
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 15 Oct 2011 12:35:59 -0000

Author: brueffer
Date: Sat Oct 15 12:35:58 2011
New Revision: 226389
URL: http://svn.freebsd.org/changeset/base/226389

Log:
  MFC: r226149
  
  Fix an infinite loop in siba_bwn_suspend().
  
  Approved by:	re (kib)

Modified:
  stable/9/sys/dev/siba/siba_bwn.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/amd64/include/xen/   (props changed)
  stable/9/sys/boot/   (props changed)
  stable/9/sys/boot/i386/efi/   (props changed)
  stable/9/sys/boot/ia64/efi/   (props changed)
  stable/9/sys/boot/ia64/ski/   (props changed)
  stable/9/sys/boot/powerpc/boot1.chrp/   (props changed)
  stable/9/sys/boot/powerpc/ofw/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)
  stable/9/sys/conf/   (props changed)
  stable/9/sys/contrib/dev/acpica/   (props changed)
  stable/9/sys/contrib/octeon-sdk/   (props changed)
  stable/9/sys/contrib/pf/   (props changed)
  stable/9/sys/contrib/x86emu/   (props changed)

Modified: stable/9/sys/dev/siba/siba_bwn.c
==============================================================================
--- stable/9/sys/dev/siba/siba_bwn.c	Sat Oct 15 12:35:18 2011	(r226388)
+++ stable/9/sys/dev/siba/siba_bwn.c	Sat Oct 15 12:35:58 2011	(r226389)
@@ -206,7 +206,7 @@ siba_bwn_suspend(device_t dev)
 	for (i = 0 ; i < devcnt ; i++) {
 		error = DEVICE_SUSPEND(devlistp[i]);
 		if (error) {
-			for (j = 0; j < i; i++)
+			for (j = 0; j < i; j++)
 				DEVICE_RESUME(devlistp[j]);
 			return (error);
 		}

From owner-svn-src-all@FreeBSD.ORG  Sat Oct 15 12:39:30 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D4BAD106564A;
	Sat, 15 Oct 2011 12:39:30 +0000 (UTC)
	(envelope-from kostikbel@gmail.com)
Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200])
	by mx1.freebsd.org (Postfix) with ESMTP id 6CF788FC0C;
	Sat, 15 Oct 2011 12:39:30 +0000 (UTC)
Received: from alf.home (alf.kiev.zoral.com.ua [10.1.1.177])
	by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id p9FCdOqD065839
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Sat, 15 Oct 2011 15:39:24 +0300 (EEST)
	(envelope-from kostikbel@gmail.com)
Received: from alf.home (kostik@localhost [127.0.0.1])
	by alf.home (8.14.5/8.14.5) with ESMTP id p9FCdNvB046259;
	Sat, 15 Oct 2011 15:39:23 +0300 (EEST)
	(envelope-from kostikbel@gmail.com)
Received: (from kostik@localhost)
	by alf.home (8.14.5/8.14.5/Submit) id p9FCdNHs046258;
	Sat, 15 Oct 2011 15:39:23 +0300 (EEST)
	(envelope-from kostikbel@gmail.com)
X-Authentication-Warning: alf.home: kostik set sender to kostikbel@gmail.com
	using -f
Date: Sat, 15 Oct 2011 15:39:23 +0300
From: Kostik Belousov 
To: Marcel Moolenaar 
Message-ID: <20111015123923.GY1511@deviant.kiev.zoral.com.ua>
References: <201110131620.p9DGKAM2022926@svn.freebsd.org>
	<20111013190943.GM1511@deviant.kiev.zoral.com.ua>
	
	<201110131707.14466.jhb@freebsd.org>
	
	<20111013225030.GA75054@zim.MIT.EDU>
	<20111014182443.GP1511@deviant.kiev.zoral.com.ua>
	<93156F0C-A80A-4E60-8873-E6269D543973@xcllnt.net>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature"; boundary="9ZjrzBJa11dyYld4"
Content-Disposition: inline
In-Reply-To: <93156F0C-A80A-4E60-8873-E6269D543973@xcllnt.net>
User-Agent: Mutt/1.4.2.3i
X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua
X-Virus-Status: Clean
X-Spam-Status: No, score=-3.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,
	DNS_FROM_OPENWHOIS autolearn=no version=3.2.5
X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on
	skuns.kiev.zoral.com.ua
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	Marcel Moolenaar ,
	src-committers@freebsd.org, John Baldwin 
Subject: Re: svn commit: r226343 - head/sys/vm
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 15 Oct 2011 12:39:31 -0000


--9ZjrzBJa11dyYld4
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, Oct 14, 2011 at 02:35:15PM -0700, Marcel Moolenaar wrote:
>=20
> On Oct 14, 2011, at 11:24 AM, Kostik Belousov wrote:
> >>>=20
> > After more thought about the issue, I do not agree with you.
> > Elf specification says about the PF_R flag that only read permission
> > for the memory image of the segment is required, but read and execute
> > is allowed.
>=20
> The ELF specification does not contain CPU specifics. Those are
> always covered by processor supplements. Since this is very i386
> specific behaviour we're talking about, it's a non sequitur to
> use the generic ELF specification to argue a point in this
> respect.
This is not quite accurate. The ELF specification does contain the
CPU-specific bits for i386. But, the interpretation of the PF_R/PF_X
flags in the program header is described under the OS-specific section,
and not under the CPU-specific. That is, I am sure that the situation
shall be interpreted as the bug in the program.

>=20
>=20
> > I want to commit the following refinement:
>=20
> The patch is good.
Thanks, committed.

>=20
> > diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c
> > index 669c652..9970386 100644
> > --- a/sys/kern/imgact_elf.c
> > +++ b/sys/kern/imgact_elf.c
> > @@ -118,11 +118,24 @@ static int elf_legacy_coredump =3D 0;
> > SYSCTL_INT(_debug, OID_AUTO, __elfN(legacy_coredump), CTLFLAG_RW,=20
> >     &elf_legacy_coredump, 0, "");
> >=20
> > -static int __elfN(nxstack) =3D 0;
> > +static int __elfN(nxstack) =3D
> > +#if defined(__amd64__) || defined(__powerpc__) /* both 64 and 32 bit */
> > +	1;
> > +#else
> > +	0;
> > +#endif
> > SYSCTL_INT(__CONCAT(_kern_elf, __ELF_WORD_SIZE), OID_AUTO,
> >     nxstack, CTLFLAG_RW, &__elfN(nxstack), 0,
> >     __XSTRING(__CONCAT(ELF, __ELF_WORD_SIZE)) ": enable non-executable =
stack");
>=20
> Please do not commit this change with the rest. It's
> not to the point. In fact, if you're changing it to
> the above, please add ia64 to the list as well.

Yes, sure. The inclusion of the chunk was a mistake.

--9ZjrzBJa11dyYld4
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (FreeBSD)

iEYEARECAAYFAk6ZfvsACgkQC3+MBN1Mb4jpvgCgr4APjZvroXEDGuQRt6XODUdL
YcYAnAg/kUnRybhrmaUdtWqAq/NDa/vH
=1Bke
-----END PGP SIGNATURE-----

--9ZjrzBJa11dyYld4--

From owner-svn-src-all@FreeBSD.ORG  Sat Oct 15 12:53:16 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 6908A1065675;
	Sat, 15 Oct 2011 12:53:16 +0000 (UTC)
	(envelope-from brueffer@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 57FCB8FC12;
	Sat, 15 Oct 2011 12:53:16 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9FCrGeQ014420;
	Sat, 15 Oct 2011 12:53:16 GMT
	(envelope-from brueffer@svn.freebsd.org)
Received: (from brueffer@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9FCrGDr014418;
	Sat, 15 Oct 2011 12:53:16 GMT
	(envelope-from brueffer@svn.freebsd.org)
Message-Id: <201110151253.p9FCrGDr014418@svn.freebsd.org>
From: Christian Brueffer 
Date: Sat, 15 Oct 2011 12:53:16 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226390 - stable/8/sys/dev/ppbus
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 15 Oct 2011 12:53:16 -0000

Author: brueffer
Date: Sat Oct 15 12:53:16 2011
New Revision: 226390
URL: http://svn.freebsd.org/changeset/base/226390

Log:
  MFC: r226116
  
  Add missing va_end() to clean up after va_start().

Modified:
  stable/8/sys/dev/ppbus/ppb_msq.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/dev/ppbus/ppb_msq.c
==============================================================================
--- stable/8/sys/dev/ppbus/ppb_msq.c	Sat Oct 15 12:35:58 2011	(r226389)
+++ stable/8/sys/dev/ppbus/ppb_msq.c	Sat Oct 15 12:53:16 2011	(r226390)
@@ -244,6 +244,7 @@ ppb_MS_init_msq(struct ppb_microseq *msq
 		}
 	}
 
+	va_end(p_list);
 	return (0);
 }
 

From owner-svn-src-all@FreeBSD.ORG  Sat Oct 15 12:59:30 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A84C0106564A;
	Sat, 15 Oct 2011 12:59:30 +0000 (UTC)
	(envelope-from brueffer@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 975128FC14;
	Sat, 15 Oct 2011 12:59:30 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9FCxUTn014662;
	Sat, 15 Oct 2011 12:59:30 GMT
	(envelope-from brueffer@svn.freebsd.org)
Received: (from brueffer@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9FCxUOr014660;
	Sat, 15 Oct 2011 12:59:30 GMT
	(envelope-from brueffer@svn.freebsd.org)
Message-Id: <201110151259.p9FCxUOr014660@svn.freebsd.org>
From: Christian Brueffer 
Date: Sat, 15 Oct 2011 12:59:30 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226391 - stable/7/sys/dev/ppbus
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 15 Oct 2011 12:59:30 -0000

Author: brueffer
Date: Sat Oct 15 12:59:30 2011
New Revision: 226391
URL: http://svn.freebsd.org/changeset/base/226391

Log:
  MFC: r226116
  
  Add missing va_end() to clean up after va_start().

Modified:
  stable/7/sys/dev/ppbus/ppb_msq.c
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/dev/ppbus/ppb_msq.c
==============================================================================
--- stable/7/sys/dev/ppbus/ppb_msq.c	Sat Oct 15 12:53:16 2011	(r226390)
+++ stable/7/sys/dev/ppbus/ppb_msq.c	Sat Oct 15 12:59:30 2011	(r226391)
@@ -237,6 +237,7 @@ ppb_MS_init_msq(struct ppb_microseq *msq
 		}
 	}
 
+	va_end(p_list);
 	return (0);
 }
 

From owner-svn-src-all@FreeBSD.ORG  Sat Oct 15 13:03:26 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 0000D106564A;
	Sat, 15 Oct 2011 13:03:25 +0000 (UTC)
	(envelope-from brueffer@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id E33E78FC12;
	Sat, 15 Oct 2011 13:03:25 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9FD3Pkn014859;
	Sat, 15 Oct 2011 13:03:25 GMT
	(envelope-from brueffer@svn.freebsd.org)
Received: (from brueffer@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9FD3PQM014857;
	Sat, 15 Oct 2011 13:03:25 GMT
	(envelope-from brueffer@svn.freebsd.org)
Message-Id: <201110151303.p9FD3PQM014857@svn.freebsd.org>
From: Christian Brueffer 
Date: Sat, 15 Oct 2011 13:03:25 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226392 - stable/8/sys/netipsec
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 15 Oct 2011 13:03:26 -0000

Author: brueffer
Date: Sat Oct 15 13:03:25 2011
New Revision: 226392
URL: http://svn.freebsd.org/changeset/base/226392

Log:
  MFC: r226117
  
  Add missing va_end() in an error case to clean up after va_start()
  (already done in the non-error case).

Modified:
  stable/8/sys/netipsec/key.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/netipsec/key.c
==============================================================================
--- stable/8/sys/netipsec/key.c	Sat Oct 15 12:59:30 2011	(r226391)
+++ stable/8/sys/netipsec/key.c	Sat Oct 15 13:03:25 2011	(r226392)
@@ -1763,6 +1763,7 @@ key_gather_mbuf(m, mhp, ndeep, nitem, va
 
 fail:
 	m_freem(result);
+	va_end(ap);
 	return NULL;
 }
 

From owner-svn-src-all@FreeBSD.ORG  Sat Oct 15 13:05:31 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id DDA9D1065670;
	Sat, 15 Oct 2011 13:05:31 +0000 (UTC)
	(envelope-from brueffer@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id CCEC48FC13;
	Sat, 15 Oct 2011 13:05:31 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9FD5VkG014975;
	Sat, 15 Oct 2011 13:05:31 GMT
	(envelope-from brueffer@svn.freebsd.org)
Received: (from brueffer@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9FD5Vdv014973;
	Sat, 15 Oct 2011 13:05:31 GMT
	(envelope-from brueffer@svn.freebsd.org)
Message-Id: <201110151305.p9FD5Vdv014973@svn.freebsd.org>
From: Christian Brueffer 
Date: Sat, 15 Oct 2011 13:05:31 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226393 - stable/7/sys/netipsec
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 15 Oct 2011 13:05:32 -0000

Author: brueffer
Date: Sat Oct 15 13:05:31 2011
New Revision: 226393
URL: http://svn.freebsd.org/changeset/base/226393

Log:
  MFC: r226117
  
  Add missing va_end() in an error case to clean up after va_start()
  (already done in the non-error case).

Modified:
  stable/7/sys/netipsec/key.c
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/netipsec/key.c
==============================================================================
--- stable/7/sys/netipsec/key.c	Sat Oct 15 13:03:25 2011	(r226392)
+++ stable/7/sys/netipsec/key.c	Sat Oct 15 13:05:31 2011	(r226393)
@@ -1708,6 +1708,7 @@ key_gather_mbuf(m, mhp, ndeep, nitem, va
 
 fail:
 	m_freem(result);
+	va_end(ap);
 	return NULL;
 }
 

From owner-svn-src-all@FreeBSD.ORG  Sat Oct 15 13:08:55 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 54B0E106567C;
	Sat, 15 Oct 2011 13:08:55 +0000 (UTC)
	(envelope-from brueffer@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 43F978FC0C;
	Sat, 15 Oct 2011 13:08:55 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9FD8tcj015121;
	Sat, 15 Oct 2011 13:08:55 GMT
	(envelope-from brueffer@svn.freebsd.org)
Received: (from brueffer@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9FD8tuK015119;
	Sat, 15 Oct 2011 13:08:55 GMT
	(envelope-from brueffer@svn.freebsd.org)
Message-Id: <201110151308.p9FD8tuK015119@svn.freebsd.org>
From: Christian Brueffer 
Date: Sat, 15 Oct 2011 13:08:55 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226394 - stable/8/sys/dev/bwn
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 15 Oct 2011 13:08:55 -0000

Author: brueffer
Date: Sat Oct 15 13:08:54 2011
New Revision: 226394
URL: http://svn.freebsd.org/changeset/base/226394

Log:
  MFC: r226146
  
  Remove dead code, "error" doesn't change between this check and the
  previous one.

Modified:
  stable/8/sys/dev/bwn/if_bwn.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/dev/bwn/if_bwn.c
==============================================================================
--- stable/8/sys/dev/bwn/if_bwn.c	Sat Oct 15 13:05:31 2011	(r226393)
+++ stable/8/sys/dev/bwn/if_bwn.c	Sat Oct 15 13:08:54 2011	(r226394)
@@ -3213,8 +3213,6 @@ bwn_core_init(struct bwn_mac *mac)
 		bwn_pio_init(mac);
 	else
 		bwn_dma_init(mac);
-	if (error)
-		goto fail1;
 	bwn_wme_init(mac);
 	bwn_spu_setdelay(mac, 1);
 	bwn_bt_enable(mac);
@@ -3230,8 +3228,6 @@ bwn_core_init(struct bwn_mac *mac)
 
 	return (error);
 
-fail1:
-	bwn_chip_exit(mac);
 fail0:
 	siba_powerdown(sc->sc_dev);
 	KASSERT(mac->mac_status == BWN_MAC_STATUS_UNINIT,

From owner-svn-src-all@FreeBSD.ORG  Sat Oct 15 13:12:49 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 2D328106566B;
	Sat, 15 Oct 2011 13:12:49 +0000 (UTC)
	(envelope-from brueffer@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 1C3058FC08;
	Sat, 15 Oct 2011 13:12:49 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9FDCmFk015308;
	Sat, 15 Oct 2011 13:12:49 GMT
	(envelope-from brueffer@svn.freebsd.org)
Received: (from brueffer@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9FDCmUS015306;
	Sat, 15 Oct 2011 13:12:48 GMT
	(envelope-from brueffer@svn.freebsd.org)
Message-Id: <201110151312.p9FDCmUS015306@svn.freebsd.org>
From: Christian Brueffer 
Date: Sat, 15 Oct 2011 13:12:48 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226395 - stable/8/sys/dev/siba
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 15 Oct 2011 13:12:49 -0000

Author: brueffer
Date: Sat Oct 15 13:12:48 2011
New Revision: 226395
URL: http://svn.freebsd.org/changeset/base/226395

Log:
  MFC: r226149
  
  Fix an infinite loop in siba_bwn_suspend().

Modified:
  stable/8/sys/dev/siba/siba_bwn.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/dev/siba/siba_bwn.c
==============================================================================
--- stable/8/sys/dev/siba/siba_bwn.c	Sat Oct 15 13:08:54 2011	(r226394)
+++ stable/8/sys/dev/siba/siba_bwn.c	Sat Oct 15 13:12:48 2011	(r226395)
@@ -206,7 +206,7 @@ siba_bwn_suspend(device_t dev)
 	for (i = 0 ; i < devcnt ; i++) {
 		error = DEVICE_SUSPEND(devlistp[i]);
 		if (error) {
-			for (j = 0; j < i; i++)
+			for (j = 0; j < i; j++)
 				DEVICE_RESUME(devlistp[j]);
 			return (error);
 		}

From owner-svn-src-all@FreeBSD.ORG  Sat Oct 15 13:20:37 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 4669C106566B;
	Sat, 15 Oct 2011 13:20:37 +0000 (UTC) (envelope-from ed@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 352B68FC17;
	Sat, 15 Oct 2011 13:20:37 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9FDKbTA015592;
	Sat, 15 Oct 2011 13:20:37 GMT (envelope-from ed@svn.freebsd.org)
Received: (from ed@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9FDKbnP015579;
	Sat, 15 Oct 2011 13:20:37 GMT (envelope-from ed@svn.freebsd.org)
Message-Id: <201110151320.p9FDKbnP015579@svn.freebsd.org>
From: Ed Schouten 
Date: Sat, 15 Oct 2011 13:20:37 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226396 - head/usr.bin/systat
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 15 Oct 2011 13:20:37 -0000

Author: ed
Date: Sat Oct 15 13:20:36 2011
New Revision: 226396
URL: http://svn.freebsd.org/changeset/base/226396

Log:
  Fix whitespace inconsistencies in systat(1).
  
  According to md5(1), the resulting binary is the same.

Modified:
  head/usr.bin/systat/cmds.c
  head/usr.bin/systat/cmdtab.c
  head/usr.bin/systat/devs.c
  head/usr.bin/systat/fetch.c
  head/usr.bin/systat/ifcmds.c
  head/usr.bin/systat/ifstat.c
  head/usr.bin/systat/keyboard.c
  head/usr.bin/systat/mode.c
  head/usr.bin/systat/mode.h
  head/usr.bin/systat/netstat.c
  head/usr.bin/systat/systat.h
  head/usr.bin/systat/vmstat.c

Modified: head/usr.bin/systat/cmds.c
==============================================================================
--- head/usr.bin/systat/cmds.c	Sat Oct 15 13:12:48 2011	(r226395)
+++ head/usr.bin/systat/cmds.c	Sat Oct 15 13:20:36 2011	(r226396)
@@ -47,32 +47,32 @@ static const char sccsid[] = "@(#)cmds.c
 void
 command(const char *cmd)
 {
-        struct cmdtab *p;
-        char *cp, *tmpstr, *tmpstr1;
+	struct cmdtab *p;
+	char *cp, *tmpstr, *tmpstr1;
 	int interval, omask;
 
 	tmpstr = tmpstr1 = strdup(cmd);
 	omask = sigblock(sigmask(SIGALRM));
-        for (cp = tmpstr1; *cp && !isspace(*cp); cp++)
-                ;
-        if (*cp)
-                *cp++ = '\0';
+	for (cp = tmpstr1; *cp && !isspace(*cp); cp++)
+		;
+	if (*cp)
+		*cp++ = '\0';
 	if (*tmpstr1 == '\0')
 		return;
 	for (; *cp && isspace(*cp); cp++)
 		;
-        if (strcmp(tmpstr1, "quit") == 0 || strcmp(tmpstr1, "q") == 0)
-                die(0);
+	if (strcmp(tmpstr1, "quit") == 0 || strcmp(tmpstr1, "q") == 0)
+		die(0);
 	if (strcmp(tmpstr1, "load") == 0) {
 		load();
 		goto done;
 	}
-        if (strcmp(tmpstr1, "stop") == 0) {
-                alarm(0);
-                mvaddstr(CMDLINE, 0, "Refresh disabled.");
-                clrtoeol();
+	if (strcmp(tmpstr1, "stop") == 0) {
+		alarm(0);
+		mvaddstr(CMDLINE, 0, "Refresh disabled.");
+		clrtoeol();
 		goto done;
-        }
+	}
 	if (strcmp(tmpstr1, "help") == 0) {
 		int _col, _len;
 
@@ -89,30 +89,30 @@ command(const char *cmd)
 		goto done;
 	}
 	interval = atoi(tmpstr1);
-        if (interval <= 0 &&
+	if (interval <= 0 &&
 	    (strcmp(tmpstr1, "start") == 0 || strcmp(tmpstr1, "interval") == 0)) {
 		interval = *cp ? atoi(cp) : naptime;
-                if (interval <= 0) {
+		if (interval <= 0) {
 			error("%d: bad interval.", interval);
 			goto done;
-                }
+		}
 	}
 	if (interval > 0) {
-                alarm(0);
-                naptime = interval;
-                display(0);
-                status();
+		alarm(0);
+		naptime = interval;
+		display(0);
+		status();
 		goto done;
-        }
+	}
 	p = lookup(tmpstr1);
 	if (p == (struct cmdtab *)-1) {
 		error("%s: Ambiguous command.", tmpstr1);
 		goto done;
 	}
-        if (p) {
-                if (curcmd == p)
+	if (p) {
+		if (curcmd == p)
 			goto done;
-                alarm(0);
+		alarm(0);
 		(*curcmd->c_close)(wnd);
 		curcmd->c_flags &= ~CF_INIT;
 		wnd = (*p->c_open)();
@@ -131,12 +131,12 @@ command(const char *cmd)
 			else
 				goto done;
 		}
-                curcmd = p;
+		curcmd = p;
 		labels();
-                display(0);
-                status();
+		display(0);
+		status();
 		goto done;
-        }
+	}
 	if (curcmd->c_cmd == 0 || !(*curcmd->c_cmd)(tmpstr1, cp))
 		error("%s: Unknown command.", tmpstr1);
 done:
@@ -176,18 +176,18 @@ void
 status(void)
 {
 
-        error("Showing %s, refresh every %d seconds.",
-          curcmd->c_name, naptime);
+	error("Showing %s, refresh every %d seconds.",
+	  curcmd->c_name, naptime);
 }
 
 int
 prefix(const char *s1, const char *s2)
 {
 
-        while (*s1 == *s2) {
-                if (*s1 == '\0')
-                        return (1);
-                s1++, s2++;
-        }
-        return (*s1 == '\0');
+	while (*s1 == *s2) {
+		if (*s1 == '\0')
+			return (1);
+		s1++, s2++;
+	}
+	return (*s1 == '\0');
 }

Modified: head/usr.bin/systat/cmdtab.c
==============================================================================
--- head/usr.bin/systat/cmdtab.c	Sat Oct 15 13:12:48 2011	(r226395)
+++ head/usr.bin/systat/cmdtab.c	Sat Oct 15 13:20:36 2011	(r226396)
@@ -40,22 +40,22 @@ static const char sccsid[] = "@(#)cmdtab
 #include "mode.h"
 
 struct	cmdtab cmdtab[] = {
-        { "pigs",	showpigs,	fetchpigs,	labelpigs,
+	{ "pigs",	showpigs,	fetchpigs,	labelpigs,
 	  initpigs,	openpigs,	closepigs,	0,
 	  0,		CF_LOADAV },
-        { "swap",	showswap,	fetchswap,	labelswap,
+	{ "swap",	showswap,	fetchswap,	labelswap,
 	  initswap,	openswap,	closeswap,	0,
 	  0,		CF_LOADAV },
-        { "mbufs",	showmbufs,	fetchmbufs,	labelmbufs,
+	{ "mbufs",	showmbufs,	fetchmbufs,	labelmbufs,
 	  initmbufs,	openmbufs,	closembufs,	0,
 	  0,		CF_LOADAV },
-        { "iostat",	showiostat,	fetchiostat,	labeliostat,
+	{ "iostat",	showiostat,	fetchiostat,	labeliostat,
 	  initiostat,	openiostat,	closeiostat,	cmdiostat,
 	  0,		CF_LOADAV },
-        { "vmstat",	showkre,	fetchkre,	labelkre,
+	{ "vmstat",	showkre,	fetchkre,	labelkre,
 	  initkre,	openkre,	closekre,	cmdkre,
 	  0,		0 },
-        { "netstat",	shownetstat,	fetchnetstat,	labelnetstat,
+	{ "netstat",	shownetstat,	fetchnetstat,	labelnetstat,
 	  initnetstat,	opennetstat,	closenetstat,	cmdnetstat,
 	  0,		CF_LOADAV },
 	{ "icmp",	showicmp,	fetchicmp,	labelicmp,
@@ -78,6 +78,6 @@ struct	cmdtab cmdtab[] = {
 	{ "ifstat",	showifstat,	fetchifstat,	labelifstat,
 	  initifstat,	openifstat,	closeifstat,	cmdifstat,
 	  0,		CF_LOADAV },
-        { NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0 }
+	{ NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0 }
 };
 struct  cmdtab *curcmd = &cmdtab[0];

Modified: head/usr.bin/systat/devs.c
==============================================================================
--- head/usr.bin/systat/devs.c	Sat Oct 15 13:12:48 2011	(r226395)
+++ head/usr.bin/systat/devs.c	Sat Oct 15 13:20:36 2011	(r226396)
@@ -105,7 +105,7 @@ dsinit(int maxshowdevs, struct statinfo 
 
 	/*
 	 * Make sure that the userland devstat version matches the kernel
-	 * devstat version.  If not, exit and print a message informing 
+	 * devstat version.  If not, exit and print a message informing
 	 * the user of his mistake.
 	 */
 	if (devstat_checkversion(NULL) < 0)
@@ -155,10 +155,10 @@ dscmd(const char *cmd, const char *args,
 	if (prefix(cmd, "refresh")) {
 		retval = devstat_selectdevs(&dev_select, &num_selected,
 		    &num_selections, &select_generation, generation,
-		    s1->dinfo->devices, num_devices, 
+		    s1->dinfo->devices, num_devices,
 		    (last_type ==DS_MATCHTYPE_PATTERN) ?  matches : NULL,
 		    (last_type ==DS_MATCHTYPE_PATTERN) ?  num_matches : 0,
-		    (last_type == DS_MATCHTYPE_SPEC) ?specified_devices : NULL, 
+		    (last_type == DS_MATCHTYPE_SPEC) ?specified_devices : NULL,
 		    (last_type == DS_MATCHTYPE_SPEC) ?num_devices_specified : 0,
 		    (last_type == DS_MATCHTYPE_NONE) ?  DS_SELECT_ADD :
 		    DS_SELECT_ADDONLY, maxshowdevs, 0);
@@ -220,7 +220,7 @@ dsmatchselect(const char *args, devstat_
 	}
 
 	for (i = 0; i < num_args; i++) {
-		if (devstat_buildmatch(tstr[i], &matches, &num_matches) != 0) {	
+		if (devstat_buildmatch(tstr[i], &matches, &num_matches) != 0) {
 			warnx("%s", devstat_errbuf);
 			return(0);
 		}
@@ -282,7 +282,7 @@ dsselect(const char *args, devstat_selec
 			asprintf(&buffer, "%s%d", dev_select[i].device_name,
 				dev_select[i].unit_number);
 			if (strcmp(buffer, tmpstr1) == 0) {
-				
+
 				num_devices_specified++;
 
 				specified_devices =(char **)realloc(

Modified: head/usr.bin/systat/fetch.c
==============================================================================
--- head/usr.bin/systat/fetch.c	Sat Oct 15 13:12:48 2011	(r226395)
+++ head/usr.bin/systat/fetch.c	Sat Oct 15 13:20:36 2011	(r226396)
@@ -62,17 +62,17 @@ void getsysctl(const char *name, void *p
 {
 	size_t nlen = len;
 	if (sysctlbyname(name, ptr, &nlen, NULL, 0) != 0) {
-		error("sysctl(%s...) failed: %s", name, 
+		error("sysctl(%s...) failed: %s", name,
 		    strerror(errno));
 	}
 	if (nlen != len) {
-		error("sysctl(%s...) expected %lu, got %lu", name, 
+		error("sysctl(%s...) expected %lu, got %lu", name,
 		    (unsigned long)len, (unsigned long)nlen);
     }
 }
 
 /*
- * Read sysctl data with variable size. Try some times (with increasing 
+ * Read sysctl data with variable size. Try some times (with increasing
  * buffers), fail if still too small.
  * This is needed sysctls with possibly raplidly increasing data sizes,
  * but imposes little overhead in the case of constant sizes.
@@ -84,8 +84,8 @@ void getsysctl(const char *name, void *p
 /* Some defines: Number of tries. */
 #define SD_NTRIES  10
 /* Percent of over-allocation (initial) */
-#define SD_MARGIN  10 
-/* 
+#define SD_MARGIN  10
+/*
  * Factor for over-allocation in percent (the margin is increased by this on
  * any failed try).
  */

Modified: head/usr.bin/systat/ifcmds.c
==============================================================================
--- head/usr.bin/systat/ifcmds.c	Sat Oct 15 13:12:48 2011	(r226395)
+++ head/usr.bin/systat/ifcmds.c	Sat Oct 15 13:20:36 2011	(r226396)
@@ -47,7 +47,7 @@ ifcmd(const char *cmd, const char *args)
 			clrtoeol();
 			addstr("what scale? ");
 			addstr(get_helplist());
-		} 
+		}
 	}
 	return (1);
 }

Modified: head/usr.bin/systat/ifstat.c
==============================================================================
--- head/usr.bin/systat/ifstat.c	Sat Oct 15 13:12:48 2011	(r226395)
+++ head/usr.bin/systat/ifstat.c	Sat Oct 15 13:20:36 2011	(r226396)
@@ -43,7 +43,7 @@
 #include "extern.h"
 #include "convtbl.h"
 
-                                /* Column numbers */
+				/* Column numbers */
 
 #define C1	0		/*  0-19 */
 #define C2	20		/* 20-39 */
@@ -121,9 +121,9 @@ static	 u_int getifnum(void);
 } while (0)
 
 #define DOPUTTOTAL(c, r, d)	do {					\
- 	CLEAR_COLUMN((r), (c));						\
- 	mvprintw((r), (c), "%12.3f %s  ",				\
- 		 convert(d##_##c, SC_AUTO),				\
+	CLEAR_COLUMN((r), (c));						\
+	mvprintw((r), (c), "%12.3f %s  ",				\
+		 convert(d##_##c, SC_AUTO),				\
 		 get_string(d##_##c, SC_AUTO));				\
 } while (0)
 
@@ -255,8 +255,8 @@ fetchifstat(void)
 		(void)getifmibdata(ifp->if_row, &ifp->if_mib);
 
 
-                new_inb = ifp->if_mib.ifmd_data.ifi_ibytes;
-                new_outb = ifp->if_mib.ifmd_data.ifi_obytes;
+		new_inb = ifp->if_mib.ifmd_data.ifi_ibytes;
+		new_outb = ifp->if_mib.ifmd_data.ifi_obytes;
 
 		/* Display interface if it's received some traffic. */
 		if (new_inb > 0 && old_inb == 0) {
@@ -269,9 +269,9 @@ fetchifstat(void)
 		 * for our current traffic rates, and while we're there,
 		 * see if we have new peak rates.
 		 */
-                old_tv = ifp->tv;
-                timersub(&new_tv, &old_tv, &tv);
-                elapsed = tv.tv_sec + (tv.tv_usec * 1e-6);
+		old_tv = ifp->tv;
+		timersub(&new_tv, &old_tv, &tv);
+		elapsed = tv.tv_sec + (tv.tv_usec * 1e-6);
 
 		ifp->if_in_curtraffic = new_inb - old_inb;
 		ifp->if_out_curtraffic = new_outb - old_outb;
@@ -281,8 +281,8 @@ fetchifstat(void)
 		 * and line, we divide by ``elapsed'' as this is likely
 		 * to be more accurate.
 		 */
-                ifp->if_in_curtraffic /= elapsed;
-                ifp->if_out_curtraffic /= elapsed;
+		ifp->if_in_curtraffic /= elapsed;
+		ifp->if_out_curtraffic /= elapsed;
 
 		if (ifp->if_in_curtraffic > ifp->if_in_traffic_peak)
 			ifp->if_in_traffic_peak = ifp->if_in_curtraffic;

Modified: head/usr.bin/systat/keyboard.c
==============================================================================
--- head/usr.bin/systat/keyboard.c	Sat Oct 15 13:12:48 2011	(r226395)
+++ head/usr.bin/systat/keyboard.c	Sat Oct 15 13:20:36 2011	(r226396)
@@ -47,76 +47,76 @@ static const char sccsid[] = "@(#)keyboa
 int
 keyboard(void)
 {
-        char ch, line[80];
+	char ch, line[80];
 	int oldmask;
 
-        for (;;) {
-                col = 0;
-                move(CMDLINE, 0);
-                do {
-                        refresh();
-                        ch = getch();
-                        if (ch == ERR) {
-                                if (errno == EINTR)
-                                        continue;
-                                exit(1);
-                        }
-                        if (ch >= 'A' && ch <= 'Z')
-                                ch += 'a' - 'A';
-                        if (col == 0) {
+	for (;;) {
+		col = 0;
+		move(CMDLINE, 0);
+		do {
+			refresh();
+			ch = getch();
+			if (ch == ERR) {
+				if (errno == EINTR)
+					continue;
+				exit(1);
+			}
+			if (ch >= 'A' && ch <= 'Z')
+				ch += 'a' - 'A';
+			if (col == 0) {
 #define	mask(s)	(1 << ((s) - 1))
-                                if (ch == CTRL('l')) {
+				if (ch == CTRL('l')) {
 					oldmask = sigblock(mask(SIGALRM));
 					wrefresh(curscr);
 					sigsetmask(oldmask);
-                                        continue;
-                                }
+					continue;
+				}
 				if (ch == CTRL('g')) {
 					oldmask = sigblock(mask(SIGALRM));
 					status();
 					sigsetmask(oldmask);
 					continue;
 				}
-                                if (ch != ':')
-                                        continue;
-                                move(CMDLINE, 0);
-                                clrtoeol();
-                        }
-                        if (ch == erasechar() && col > 0) {
-                                if (col == 1 && line[0] == ':')
-                                        continue;
-                                col--;
-                                goto doerase;
-                        }
-                        if (ch == CTRL('w') && col > 0) {
-                                while (--col >= 0 && isspace(line[col]))
-                                        ;
-                                col++;
-                                while (--col >= 0 && !isspace(line[col]))
-                                        if (col == 0 && line[0] == ':')
-                                                break;
-                                col++;
-                                goto doerase;
-                        }
-                        if (ch == killchar() && col > 0) {
-                                col = 0;
-                                if (line[0] == ':')
-                                        col++;
-                doerase:
-                                move(CMDLINE, col);
-                                clrtoeol();
-                                continue;
-                        }
-                        if (isprint(ch) || ch == ' ') {
-                                line[col] = ch;
-                                mvaddch(CMDLINE, col, ch);
-                                col++;
-                        }
-                } while (col == 0 || (ch != '\r' && ch != '\n'));
-                line[col] = '\0';
+				if (ch != ':')
+					continue;
+				move(CMDLINE, 0);
+				clrtoeol();
+			}
+			if (ch == erasechar() && col > 0) {
+				if (col == 1 && line[0] == ':')
+					continue;
+				col--;
+				goto doerase;
+			}
+			if (ch == CTRL('w') && col > 0) {
+				while (--col >= 0 && isspace(line[col]))
+					;
+				col++;
+				while (--col >= 0 && !isspace(line[col]))
+					if (col == 0 && line[0] == ':')
+						break;
+				col++;
+				goto doerase;
+			}
+			if (ch == killchar() && col > 0) {
+				col = 0;
+				if (line[0] == ':')
+					col++;
+		doerase:
+				move(CMDLINE, col);
+				clrtoeol();
+				continue;
+			}
+			if (isprint(ch) || ch == ' ') {
+				line[col] = ch;
+				mvaddch(CMDLINE, col, ch);
+				col++;
+			}
+		} while (col == 0 || (ch != '\r' && ch != '\n'));
+		line[col] = '\0';
 		oldmask = sigblock(mask(SIGALRM));
-                command(line + 1);
+		command(line + 1);
 		sigsetmask(oldmask);
-        }
+	}
 	/*NOTREACHED*/
 }

Modified: head/usr.bin/systat/mode.c
==============================================================================
--- head/usr.bin/systat/mode.c	Sat Oct 15 13:12:48 2011	(r226395)
+++ head/usr.bin/systat/mode.c	Sat Oct 15 13:20:36 2011	(r226396)
@@ -12,7 +12,7 @@
  * no representations about the suitability of this software for any
  * purpose.  It is provided "as is" without express or implied
  * warranty.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED BY M.I.T. ``AS IS''.  M.I.T. DISCLAIMS
  * ALL EXPRESS OR IMPLIED WARRANTIES WITH REGARD TO THIS SOFTWARE,
  * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF

Modified: head/usr.bin/systat/mode.h
==============================================================================
--- head/usr.bin/systat/mode.h	Sat Oct 15 13:12:48 2011	(r226395)
+++ head/usr.bin/systat/mode.h	Sat Oct 15 13:20:36 2011	(r226396)
@@ -12,7 +12,7 @@
  * no representations about the suitability of this software for any
  * purpose.  It is provided "as is" without express or implied
  * warranty.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED BY M.I.T. ``AS IS''.  M.I.T. DISCLAIMS
  * ALL EXPRESS OR IMPLIED WARRANTIES WITH REGARD TO THIS SOFTWARE,
  * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF

Modified: head/usr.bin/systat/netstat.c
==============================================================================
--- head/usr.bin/systat/netstat.c	Sat Oct 15 13:12:48 2011	(r226395)
+++ head/usr.bin/systat/netstat.c	Sat Oct 15 13:20:36 2011	(r226396)
@@ -128,7 +128,7 @@ closenetstat(WINDOW *w)
 			lastrow--;
 		p->ni_line = -1;
 	}
-        if (w != NULL) {
+	if (w != NULL) {
 		wclear(w);
 		wrefresh(w);
 		delwin(w);

Modified: head/usr.bin/systat/systat.h
==============================================================================
--- head/usr.bin/systat/systat.h	Sat Oct 15 13:12:48 2011	(r226395)
+++ head/usr.bin/systat/systat.h	Sat Oct 15 13:20:36 2011	(r226396)
@@ -33,10 +33,10 @@
 #include 
 
 struct  cmdtab {
-        const char *c_name;		/* command name */
-        void    (*c_refresh)(void);	/* display refresh */
-        void    (*c_fetch)(void);	/* sets up data structures */
-        void    (*c_label)(void);	/* label display */
+	const char *c_name;		/* command name */
+	void	(*c_refresh)(void);	/* display refresh */
+	void	(*c_fetch)(void);	/* sets up data structures */
+	void	(*c_label)(void);	/* label display */
 	int	(*c_init)(void);	/* initialize namelist, etc. */
 	WINDOW	*(*c_open)(void);	/* open display */
 	void	(*c_close)(WINDOW *);	/* close display */

Modified: head/usr.bin/systat/vmstat.c
==============================================================================
--- head/usr.bin/systat/vmstat.c	Sat Oct 15 13:12:48 2011	(r226395)
+++ head/usr.bin/systat/vmstat.c	Sat Oct 15 13:20:36 2011	(r226396)
@@ -224,7 +224,7 @@ initkre(void)
 		intrloc = calloc(nintr, sizeof (long));
 		intrname = calloc(nintr, sizeof (char *));
 		intrnamebuf = sysctl_dynread("hw.intrnames", NULL);
-		if (intrnamebuf == NULL || intrname == NULL || 
+		if (intrnamebuf == NULL || intrname == NULL ||
 		    intrloc == NULL) {
 			error("Out of memory");
 			if (intrnamebuf)
@@ -854,7 +854,7 @@ dinfo(int dn, int lc, struct statinfo *n
 		elapsed_time = now->snap_time - then->snap_time;
 	} else {
 		/* Calculate relative to device creation */
-	        elapsed_time = now->snap_time - devstat_compute_etime(
+		elapsed_time = now->snap_time - devstat_compute_etime(
 		    &now->dinfo->devices[di].creation_time, NULL);
 	}
 

From owner-svn-src-all@FreeBSD.ORG  Sat Oct 15 15:57:56 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5A2781065672;
	Sat, 15 Oct 2011 15:57:56 +0000 (UTC)
	(envelope-from brueffer@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 49A4D8FC17;
	Sat, 15 Oct 2011 15:57:56 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9FFvu24020538;
	Sat, 15 Oct 2011 15:57:56 GMT
	(envelope-from brueffer@svn.freebsd.org)
Received: (from brueffer@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9FFvuuc020536;
	Sat, 15 Oct 2011 15:57:56 GMT
	(envelope-from brueffer@svn.freebsd.org)
Message-Id: <201110151557.p9FFvuuc020536@svn.freebsd.org>
From: Christian Brueffer 
Date: Sat, 15 Oct 2011 15:57:56 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226398 - head/sys/dev/iicbus
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 15 Oct 2011 15:57:56 -0000

Author: brueffer
Date: Sat Oct 15 15:57:55 2011
New Revision: 226398
URL: http://svn.freebsd.org/changeset/base/226398

Log:
  Properly free resources in an error case.
  
  CID:		4203
  Found with:	Coverity Prevent(tm)
  MFC after:	1 week

Modified:
  head/sys/dev/iicbus/iic.c

Modified: head/sys/dev/iicbus/iic.c
==============================================================================
--- head/sys/dev/iicbus/iic.c	Sat Oct 15 15:21:33 2011	(r226397)
+++ head/sys/dev/iicbus/iic.c	Sat Oct 15 15:57:55 2011	(r226398)
@@ -348,8 +348,10 @@ iicioctl(struct cdev *dev, u_long cmd, c
 		buf = malloc(sizeof(*d->msgs) * d->nmsgs, M_TEMP, M_WAITOK);
 		usrbufs = malloc(sizeof(void *) * d->nmsgs, M_TEMP, M_ZERO | M_WAITOK);
 		error = copyin(d->msgs, buf, sizeof(*d->msgs) * d->nmsgs);
-		if (error)
+		if (error) {
+			free(usrbufs, M_TEMP);
 			break;
+		}
 		/* Alloc kernel buffers for userland data, copyin write data */
 		for (i = 0; i < d->nmsgs; i++) {
 			m = &((struct iic_msg *)buf)[i];

From owner-svn-src-all@FreeBSD.ORG  Sat Oct 15 16:28:06 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 841E91065673;
	Sat, 15 Oct 2011 16:28:06 +0000 (UTC)
	(envelope-from glebius@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 7304C8FC14;
	Sat, 15 Oct 2011 16:28:06 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9FGS67R021627;
	Sat, 15 Oct 2011 16:28:06 GMT (envelope-from glebius@svn.freebsd.org)
Received: (from glebius@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9FGS60T021622;
	Sat, 15 Oct 2011 16:28:06 GMT (envelope-from glebius@svn.freebsd.org)
Message-Id: <201110151628.p9FGS60T021622@svn.freebsd.org>
From: Gleb Smirnoff 
Date: Sat, 15 Oct 2011 16:28:06 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226401 - head/sys/netinet
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 15 Oct 2011 16:28:06 -0000

Author: glebius
Date: Sat Oct 15 16:28:06 2011
New Revision: 226401
URL: http://svn.freebsd.org/changeset/base/226401

Log:
  Remove last remnants of classful addressing:
  
  - Remove ia_net, ia_netmask, ia_netbroadcast from struct in_ifaddr.
  - Remove net.inet.ip.subnetsarelocal, I bet no one need it in 2011.
  - fix bug when we were not forwarding to a host which matches classful
    net address. For example router having 192.168.x.y/16 network attached,
    would not forward traffic to 192.168.*.0, which are legal IPs in
    CIDR world.
  - For compatibility, leave autoguessing of mask based on class.
  
  Reviewed by:	andre, bz, rwatson

Modified:
  head/sys/netinet/in.c
  head/sys/netinet/in_debug.c
  head/sys/netinet/in_var.h
  head/sys/netinet/ip_input.c

Modified: head/sys/netinet/in.c
==============================================================================
--- head/sys/netinet/in.c	Sat Oct 15 16:18:35 2011	(r226400)
+++ head/sys/netinet/in.c	Sat Oct 15 16:28:06 2011	(r226401)
@@ -76,11 +76,6 @@ static int	in_ifinit(struct ifnet *,
 	    struct in_ifaddr *, struct sockaddr_in *, int);
 static void	in_purgemaddrs(struct ifnet *);
 
-static VNET_DEFINE(int, subnetsarelocal);
-#define	V_subnetsarelocal		VNET(subnetsarelocal)
-SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, subnets_are_local, CTLFLAG_RW,
-	&VNET_NAME(subnetsarelocal), 0,
-	"Treat all subnets as directly connected");
 static VNET_DEFINE(int, sameprefixcarponly);
 #define	V_sameprefixcarponly		VNET(sameprefixcarponly)
 SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, same_prefix_carp_only, CTLFLAG_RW,
@@ -95,9 +90,7 @@ VNET_DECLARE(struct arpstat, arpstat);  
 
 /*
  * Return 1 if an internet address is for a ``local'' host
- * (one to which we have a connection).  If subnetsarelocal
- * is true, this includes other subnets of the local net.
- * Otherwise, it includes only the directly-connected (sub)nets.
+ * (one to which we have a connection).
  */
 int
 in_localaddr(struct in_addr in)
@@ -106,19 +99,10 @@ in_localaddr(struct in_addr in)
 	register struct in_ifaddr *ia;
 
 	IN_IFADDR_RLOCK();
-	if (V_subnetsarelocal) {
-		TAILQ_FOREACH(ia, &V_in_ifaddrhead, ia_link) {
-			if ((i & ia->ia_netmask) == ia->ia_net) {
-				IN_IFADDR_RUNLOCK();
-				return (1);
-			}
-		}
-	} else {
-		TAILQ_FOREACH(ia, &V_in_ifaddrhead, ia_link) {
-			if ((i & ia->ia_subnetmask) == ia->ia_subnet) {
-				IN_IFADDR_RUNLOCK();
-				return (1);
-			}
+	TAILQ_FOREACH(ia, &V_in_ifaddrhead, ia_link) {
+		if ((i & ia->ia_subnetmask) == ia->ia_subnet) {
+			IN_IFADDR_RUNLOCK();
+			return (1);
 		}
 	}
 	IN_IFADDR_RUNLOCK();
@@ -888,23 +872,19 @@ in_ifinit(struct ifnet *ifp, struct in_i
 		in_ifscrub(ifp, ia, LLE_STATIC);
 		ia->ia_ifa.ifa_addr = (struct sockaddr *)&ia->ia_addr;
 	}
-	if (IN_CLASSA(i))
-		ia->ia_netmask = IN_CLASSA_NET;
-	else if (IN_CLASSB(i))
-		ia->ia_netmask = IN_CLASSB_NET;
-	else
-		ia->ia_netmask = IN_CLASSC_NET;
 	/*
-	 * The subnet mask usually includes at least the standard network part,
-	 * but may may be smaller in the case of supernetting.
-	 * If it is set, we believe it.
+	 * Be compatible with network classes, if netmask isn't supplied,
+	 * guess it based on classes.
 	 */
 	if (ia->ia_subnetmask == 0) {
-		ia->ia_subnetmask = ia->ia_netmask;
+		if (IN_CLASSA(i))
+			ia->ia_subnetmask = IN_CLASSA_NET;
+		else if (IN_CLASSB(i))
+			ia->ia_subnetmask = IN_CLASSB_NET;
+		else
+			ia->ia_subnetmask = IN_CLASSC_NET;
 		ia->ia_sockmask.sin_addr.s_addr = htonl(ia->ia_subnetmask);
-	} else
-		ia->ia_netmask &= ia->ia_subnetmask;
-	ia->ia_net = i & ia->ia_netmask;
+	}
 	ia->ia_subnet = i & ia->ia_subnetmask;
 	in_socktrim(&ia->ia_sockmask);
 	/*
@@ -919,8 +899,6 @@ in_ifinit(struct ifnet *ifp, struct in_i
 	if (ifp->if_flags & IFF_BROADCAST) {
 		ia->ia_broadaddr.sin_addr.s_addr =
 			htonl(ia->ia_subnet | ~ia->ia_subnetmask);
-		ia->ia_netbroadcast.s_addr =
-			htonl(ia->ia_net | ~ ia->ia_netmask);
 	} else if (ifp->if_flags & IFF_LOOPBACK) {
 		ia->ia_dstaddr = ia->ia_addr;
 		flags |= RTF_HOST;
@@ -1251,11 +1229,10 @@ in_broadcast(struct in_addr in, struct i
 	TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link)
 		if (ifa->ifa_addr->sa_family == AF_INET &&
 		    (in.s_addr == ia->ia_broadaddr.sin_addr.s_addr ||
-		     in.s_addr == ia->ia_netbroadcast.s_addr ||
 		     /*
 		      * Check for old-style (host 0) broadcast.
 		      */
-		     t == ia->ia_subnet || t == ia->ia_net) &&
+		     t == ia->ia_subnet) &&
 		     /*
 		      * Check for an all one subnetmask. These
 		      * only exist when an interface gets a secondary

Modified: head/sys/netinet/in_debug.c
==============================================================================
--- head/sys/netinet/in_debug.c	Sat Oct 15 16:18:35 2011	(r226400)
+++ head/sys/netinet/in_debug.c	Sat Oct 15 16:28:06 2011	(r226401)
@@ -86,11 +86,8 @@ in_show_in_ifaddr(struct in_ifaddr *ia)
 #define	IA_DB_RPINTF_DPTR(f, e)	db_printf("\t  *%s = " f "\n", #e, *ia->e);
 	db_printf("\tin_ifaddr = %p\n", ia);
 	IA_DB_RPINTF_PTR("%p", ia_ifa);
-	IA_DB_RPINTF("0x%08lx", ia_net);
-	IA_DB_RPINTF("0x%08lx", ia_netmask);
 	IA_DB_RPINTF("0x%08lx", ia_subnet);
 	IA_DB_RPINTF("0x%08lx", ia_subnetmask);
-	IA_DB_RPINTF("0x%08x", ia_netbroadcast.s_addr);
 	IA_DB_RPINTF("%p", ia_hash.le_next);
 	IA_DB_RPINTF("%p", ia_hash.le_prev);
 	IA_DB_RPINTF_DPTR("%p", ia_hash.le_prev);

Modified: head/sys/netinet/in_var.h
==============================================================================
--- head/sys/netinet/in_var.h	Sat Oct 15 16:18:35 2011	(r226400)
+++ head/sys/netinet/in_var.h	Sat Oct 15 16:28:06 2011	(r226401)
@@ -60,12 +60,9 @@ struct in_ifaddr {
 	struct	ifaddr ia_ifa;		/* protocol-independent info */
 #define	ia_ifp		ia_ifa.ifa_ifp
 #define ia_flags	ia_ifa.ifa_flags
-					/* ia_{,sub}net{,mask} in host order */
-	u_long	ia_net;			/* network number of interface */
-	u_long	ia_netmask;		/* mask of net part */
-	u_long	ia_subnet;		/* subnet number, including net */
-	u_long	ia_subnetmask;		/* mask of subnet part */
-	struct	in_addr ia_netbroadcast; /* to recognize net broadcasts */
+					/* ia_subnet{,mask} in host order */
+	u_long	ia_subnet;		/* subnet address */
+	u_long	ia_subnetmask;		/* mask of subnet */
 	LIST_ENTRY(in_ifaddr) ia_hash;	/* entry in bucket of inet addresses */
 	TAILQ_ENTRY(in_ifaddr) ia_link;	/* list of internet addresses */
 	struct	sockaddr_in ia_addr;	/* reserve space for interface name */

Modified: head/sys/netinet/ip_input.c
==============================================================================
--- head/sys/netinet/ip_input.c	Sat Oct 15 16:18:35 2011	(r226400)
+++ head/sys/netinet/ip_input.c	Sat Oct 15 16:28:06 2011	(r226401)
@@ -622,11 +622,6 @@ passin:
 				IF_ADDR_UNLOCK(ifp);
 				goto ours;
 			}
-			if (ia->ia_netbroadcast.s_addr == ip->ip_dst.s_addr) {
-				ifa_ref(ifa);
-				IF_ADDR_UNLOCK(ifp);
-				goto ours;
-			}
 #ifdef BOOTP_COMPAT
 			if (IA_SIN(ia)->sin_addr.s_addr == INADDR_ANY) {
 				ifa_ref(ifa);

From owner-svn-src-all@FreeBSD.ORG  Sat Oct 15 18:41:26 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 79817106566B;
	Sat, 15 Oct 2011 18:41:26 +0000 (UTC)
	(envelope-from glebius@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 4FAF48FC15;
	Sat, 15 Oct 2011 18:41:26 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9FIfQU7025753;
	Sat, 15 Oct 2011 18:41:26 GMT (envelope-from glebius@svn.freebsd.org)
Received: (from glebius@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9FIfQLE025750;
	Sat, 15 Oct 2011 18:41:26 GMT (envelope-from glebius@svn.freebsd.org)
Message-Id: <201110151841.p9FIfQLE025750@svn.freebsd.org>
From: Gleb Smirnoff 
Date: Sat, 15 Oct 2011 18:41:26 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226402 - head/sys/netinet
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 15 Oct 2011 18:41:26 -0000

Author: glebius
Date: Sat Oct 15 18:41:25 2011
New Revision: 226402
URL: http://svn.freebsd.org/changeset/base/226402

Log:
  Add support for IPv4 /31 prefixes, as described in RFC3021.
  
  To run a /31 network, participating hosts MUST drop support
  for directed broadcasts, and treat the first and last addresses
  on subnet as unicast. The broadcast address for the prefix
  should be the link local broadcast address, INADDR_BROADCAST.

Modified:
  head/sys/netinet/in.c
  head/sys/netinet/in.h

Modified: head/sys/netinet/in.c
==============================================================================
--- head/sys/netinet/in.c	Sat Oct 15 16:28:06 2011	(r226401)
+++ head/sys/netinet/in.c	Sat Oct 15 18:41:25 2011	(r226402)
@@ -897,8 +897,11 @@ in_ifinit(struct ifnet *ifp, struct in_i
 	 */
 	ia->ia_ifa.ifa_metric = ifp->if_metric;
 	if (ifp->if_flags & IFF_BROADCAST) {
-		ia->ia_broadaddr.sin_addr.s_addr =
-			htonl(ia->ia_subnet | ~ia->ia_subnetmask);
+		if (ia->ia_subnetmask == IN_RFC3021_MASK)
+			ia->ia_broadaddr.sin_addr.s_addr = INADDR_BROADCAST;
+		else
+			ia->ia_broadaddr.sin_addr.s_addr =
+			    htonl(ia->ia_subnet | ~ia->ia_subnetmask);
 	} else if (ifp->if_flags & IFF_LOOPBACK) {
 		ia->ia_dstaddr = ia->ia_addr;
 		flags |= RTF_HOST;
@@ -1230,9 +1233,11 @@ in_broadcast(struct in_addr in, struct i
 		if (ifa->ifa_addr->sa_family == AF_INET &&
 		    (in.s_addr == ia->ia_broadaddr.sin_addr.s_addr ||
 		     /*
-		      * Check for old-style (host 0) broadcast.
+		      * Check for old-style (host 0) broadcast, but
+		      * taking into account that RFC 3021 obsoletes it.
 		      */
-		     t == ia->ia_subnet) &&
+		     (ia->ia_subnetmask != IN_RFC3021_MASK &&
+		     t == ia->ia_subnet)) &&
 		     /*
 		      * Check for an all one subnetmask. These
 		      * only exist when an interface gets a secondary

Modified: head/sys/netinet/in.h
==============================================================================
--- head/sys/netinet/in.h	Sat Oct 15 16:28:06 2011	(r226401)
+++ head/sys/netinet/in.h	Sat Oct 15 18:41:25 2011	(r226402)
@@ -392,6 +392,8 @@ __END_DECLS
 
 #define	IN_LOOPBACKNET		127			/* official! */
 
+#define	IN_RFC3021_MASK		(u_int32_t)0xfffffffe
+
 /*
  * Options for use with [gs]etsockopt at the IP level.
  * First word of comment is data type; bool is stored in int.

From owner-svn-src-all@FreeBSD.ORG  Sat Oct 15 19:08:23 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 4038A106564A;
	Sat, 15 Oct 2011 19:08:23 +0000 (UTC)
	(envelope-from trociny@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 2FD1C8FC0C;
	Sat, 15 Oct 2011 19:08:23 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9FJ8N6B026731;
	Sat, 15 Oct 2011 19:08:23 GMT (envelope-from trociny@svn.freebsd.org)
Received: (from trociny@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9FJ8NNP026728;
	Sat, 15 Oct 2011 19:08:23 GMT (envelope-from trociny@svn.freebsd.org)
Message-Id: <201110151908.p9FJ8NNP026728@svn.freebsd.org>
From: Mikolaj Golub 
Date: Sat, 15 Oct 2011 19:08:23 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226403 - head/usr.bin/script
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 15 Oct 2011 19:08:23 -0000

Author: trociny
Date: Sat Oct 15 19:08:22 2011
New Revision: 226403
URL: http://svn.freebsd.org/changeset/base/226403

Log:
  In r225809 the intention was to send VEOF only once if STDIN was not a
  terminal. Unfortunately the fix was incorrect and for flushtime > 0 it
  keept sending VEOF.
  
  Sent VEOF generates ^D\b\b echoed by the terminal, which was reported
  in bin/161526. Note, we still send VEOF at least once. Otherwise
  commands like below would hang forever:
  
    echo 1 |script /tmp/script.out cat
  
  PR:		bin/161526
  Reported by:	Adrian Wontroba , Stefan Bethke 
  Tested by:	Stefan Bethke 
  MFC after:	3 days

Modified:
  head/usr.bin/script/script.c

Modified: head/usr.bin/script/script.c
==============================================================================
--- head/usr.bin/script/script.c	Sat Oct 15 18:41:25 2011	(r226402)
+++ head/usr.bin/script/script.c	Sat Oct 15 19:08:22 2011	(r226403)
@@ -163,12 +163,15 @@ main(int argc, char *argv[])
 		FD_SET(master, &rfd);
 		if (readstdin)
 			FD_SET(STDIN_FILENO, &rfd);
-		if ((!readstdin && ttyflg) || flushtime > 0) {
-			tv.tv_sec = !readstdin && ttyflg ? 1 :
-			    flushtime - (tvec - start);
+		if (!readstdin && ttyflg) {
+			tv.tv_sec = 1;
 			tv.tv_usec = 0;
 			tvp = &tv;
 			readstdin = 1;
+		} else if (flushtime > 0) {
+			tv.tv_sec = flushtime - (tvec - start);
+			tv.tv_usec = 0;
+			tvp = &tv;
 		} else {
 			tvp = NULL;
 		}

From owner-svn-src-all@FreeBSD.ORG  Sat Oct 15 19:37:31 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 77B57106564A;
	Sat, 15 Oct 2011 19:37:31 +0000 (UTC)
	(envelope-from marcel@xcllnt.net)
Received: from mail.xcllnt.net (mail.xcllnt.net [70.36.220.4])
	by mx1.freebsd.org (Postfix) with ESMTP id 418DD8FC0A;
	Sat, 15 Oct 2011 19:37:30 +0000 (UTC)
Received: from [192.168.2.22] (atm.xcllnt.net [70.36.220.6])
	(authenticated bits=0)
	by mail.xcllnt.net (8.14.5/8.14.5) with ESMTP id p9FJbOmh040426
	(version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO);
	Sat, 15 Oct 2011 12:37:30 -0700 (PDT)
	(envelope-from marcel@xcllnt.net)
Mime-Version: 1.0 (Apple Message framework v1244.3)
Content-Type: text/plain; charset=us-ascii
From: Marcel Moolenaar 
In-Reply-To: <20111015123923.GY1511@deviant.kiev.zoral.com.ua>
Date: Sat, 15 Oct 2011 12:37:29 -0700
Content-Transfer-Encoding: 7bit
Message-Id: 
References: <201110131620.p9DGKAM2022926@svn.freebsd.org>
	<20111013190943.GM1511@deviant.kiev.zoral.com.ua>
	
	<201110131707.14466.jhb@freebsd.org>
	
	<20111013225030.GA75054@zim.MIT.EDU>
	<20111014182443.GP1511@deviant.kiev.zoral.com.ua>
	<93156F0C-A80A-4E60-8873-E6269D543973@xcllnt.net>
	<20111015123923.GY1511@deviant.kiev.zoral.com.ua>
To: Kostik Belousov 
X-Mailer: Apple Mail (2.1244.3)
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org, John Baldwin 
Subject: Re: svn commit: r226343 - head/sys/vm
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 15 Oct 2011 19:37:31 -0000


On Oct 15, 2011, at 5:39 AM, Kostik Belousov wrote:
>> 
>>> I want to commit the following refinement:
>> 
>> The patch is good.
> Thanks, committed.

Thanks!

-- 
Marcel Moolenaar
marcel@xcllnt.net



From owner-svn-src-all@FreeBSD.ORG  Sat Oct 15 21:06:09 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 2688E106564A;
	Sat, 15 Oct 2011 21:06:09 +0000 (UTC)
	(envelope-from eadler@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 166E38FC0A;
	Sat, 15 Oct 2011 21:06:09 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9FL6853030646;
	Sat, 15 Oct 2011 21:06:08 GMT (envelope-from eadler@svn.freebsd.org)
Received: (from eadler@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9FL684c030644;
	Sat, 15 Oct 2011 21:06:08 GMT (envelope-from eadler@svn.freebsd.org)
Message-Id: <201110152106.p9FL684c030644@svn.freebsd.org>
From: Eitan Adler 
Date: Sat, 15 Oct 2011 21:06:08 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226404 - head/sys/dev/puc
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 15 Oct 2011 21:06:09 -0000

Author: eadler (ports committer)
Date: Sat Oct 15 21:06:08 2011
New Revision: 226404
URL: http://svn.freebsd.org/changeset/base/226404

Log:
  - add support for I-O DATA RSA-PCI2/R
  
  PR:		kern/142999
  Submitted by:	Takefu Kenji 
  Approved by:	jhb
  Approved by:	sahil (mentor)
  MFC after:	1 week

Modified:
  head/sys/dev/puc/pucdata.c

Modified: head/sys/dev/puc/pucdata.c
==============================================================================
--- head/sys/dev/puc/pucdata.c	Sat Oct 15 19:08:22 2011	(r226403)
+++ head/sys/dev/puc/pucdata.c	Sat Oct 15 21:06:08 2011	(r226404)
@@ -645,6 +645,12 @@ const struct puc_cfg puc_pci_devices[] =
 	 * As sold by Kouwell .
 	 * I/O Flex PCI I/O Card Model-223 with 4 serial and 1 parallel ports.
 	 */
+	{
+		0x1415, 0x9501, 0x10fc ,0xc070,
+		"I-O DATA RSA-PCI2/R",
+		DEFAULT_RCLK * 8,
+		PUC_PORT_2S, 0x10, 0, 8,
+	},
 
 	{   0x1415, 0x9501, 0x131f, 0x2050,
 	    "SIIG Cyber 4 PCI 16550",

From owner-svn-src-all@FreeBSD.ORG  Sat Oct 15 21:17:00 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id ED0EA1065676;
	Sat, 15 Oct 2011 21:16:59 +0000 (UTC)
	(envelope-from ndenev@gmail.com)
Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com
	[209.85.214.54])
	by mx1.freebsd.org (Postfix) with ESMTP id E833F8FC08;
	Sat, 15 Oct 2011 21:16:58 +0000 (UTC)
Received: by bkbzu17 with SMTP id zu17so1660860bkb.13
	for ; Sat, 15 Oct 2011 14:16:57 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=subject:mime-version:content-type:from:in-reply-to:date:cc
	:content-transfer-encoding:message-id:references:to:x-mailer;
	bh=x/Vuplifxe+uYiB4KhEyreKBAqaq3Kp4ULgkPt6IvOo=;
	b=q8d+8ie4k8tRs38l8Anase5gjUFWOWL/z+Z5Xe1B3elG3bDsLVndWPhLlplASP3doD
	NRyEEcjWVuTInlK61J6/6F3weg0yZP3vAEfK8ykvTQo7wkDsJXmTf7oo643v4Ybn7T91
	rP3aLbSqHQpDaUxmqVkOeqgqLkwr9FoWPI+9Y=
Received: by 10.223.14.134 with SMTP id g6mr12983169faa.11.1318711884952;
	Sat, 15 Oct 2011 13:51:24 -0700 (PDT)
Received: from imba-brutale.totalterror.net ([93.152.152.135])
	by mx.google.com with ESMTPS id b16sm3712568fao.7.2011.10.15.13.51.22
	(version=TLSv1/SSLv3 cipher=OTHER);
	Sat, 15 Oct 2011 13:51:23 -0700 (PDT)
Mime-Version: 1.0 (Apple Message framework v1251.1)
Content-Type: text/plain; charset=us-ascii
From: Nikolay Denev 
In-Reply-To: <201110151841.p9FIfQLE025750@svn.freebsd.org>
Date: Sat, 15 Oct 2011 23:51:21 +0300
Content-Transfer-Encoding: quoted-printable
Message-Id: 
References: <201110151841.p9FIfQLE025750@svn.freebsd.org>
To: Gleb Smirnoff 
X-Mailer: Apple Mail (2.1251.1)
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r226402 - head/sys/netinet
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 15 Oct 2011 21:17:00 -0000


On Oct 15, 2011, at 9:41 PM, Gleb Smirnoff wrote:

> Author: glebius
> Date: Sat Oct 15 18:41:25 2011
> New Revision: 226402
> URL: http://svn.freebsd.org/changeset/base/226402
>=20
> Log:
>  Add support for IPv4 /31 prefixes, as described in RFC3021.
>=20
>  To run a /31 network, participating hosts MUST drop support
>  for directed broadcasts, and treat the first and last addresses
>  on subnet as unicast. The broadcast address for the prefix
>  should be the link local broadcast address, INADDR_BROADCAST.
>=20
> Modified:
>  head/sys/netinet/in.c
>  head/sys/netinet/in.h
>=20
> Modified: head/sys/netinet/in.c
> =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
> --- head/sys/netinet/in.c	Sat Oct 15 16:28:06 2011	=
(r226401)
> +++ head/sys/netinet/in.c	Sat Oct 15 18:41:25 2011	=
(r226402)
> @@ -897,8 +897,11 @@ in_ifinit(struct ifnet *ifp, struct in_i
> 	 */
> 	ia->ia_ifa.ifa_metric =3D ifp->if_metric;
> 	if (ifp->if_flags & IFF_BROADCAST) {
> -		ia->ia_broadaddr.sin_addr.s_addr =3D
> -			htonl(ia->ia_subnet | ~ia->ia_subnetmask);
> +		if (ia->ia_subnetmask =3D=3D IN_RFC3021_MASK)
> +			ia->ia_broadaddr.sin_addr.s_addr =3D =
INADDR_BROADCAST;
> +		else
> +			ia->ia_broadaddr.sin_addr.s_addr =3D
> +			    htonl(ia->ia_subnet | ~ia->ia_subnetmask);
> 	} else if (ifp->if_flags & IFF_LOOPBACK) {
> 		ia->ia_dstaddr =3D ia->ia_addr;
> 		flags |=3D RTF_HOST;
> @@ -1230,9 +1233,11 @@ in_broadcast(struct in_addr in, struct i
> 		if (ifa->ifa_addr->sa_family =3D=3D AF_INET &&
> 		    (in.s_addr =3D=3D ia->ia_broadaddr.sin_addr.s_addr =
||
> 		     /*
> -		      * Check for old-style (host 0) broadcast.
> +		      * Check for old-style (host 0) broadcast, but
> +		      * taking into account that RFC 3021 obsoletes it.
> 		      */
> -		     t =3D=3D ia->ia_subnet) &&
> +		     (ia->ia_subnetmask !=3D IN_RFC3021_MASK &&
> +		     t =3D=3D ia->ia_subnet)) &&
> 		     /*
> 		      * Check for an all one subnetmask. These
> 		      * only exist when an interface gets a secondary
>=20
> Modified: head/sys/netinet/in.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/sys/netinet/in.h	Sat Oct 15 16:28:06 2011	=
(r226401)
> +++ head/sys/netinet/in.h	Sat Oct 15 18:41:25 2011	=
(r226402)
> @@ -392,6 +392,8 @@ __END_DECLS
>=20
> #define	IN_LOOPBACKNET		127			/* =
official! */
>=20
> +#define	IN_RFC3021_MASK		(u_int32_t)0xfffffffe
> +
> /*
>  * Options for use with [gs]etsockopt at the IP level.
>  * First word of comment is data type; bool is stored in int.
>=20

That's great! Thanks!
Any plans for MFC?

Regards,
Nikolay


From owner-svn-src-all@FreeBSD.ORG  Sat Oct 15 21:23:05 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 627EB106564A;
	Sat, 15 Oct 2011 21:23:05 +0000 (UTC)
	(envelope-from kensmith@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 4EE708FC13;
	Sat, 15 Oct 2011 21:23:05 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9FLN5ZB031212;
	Sat, 15 Oct 2011 21:23:05 GMT
	(envelope-from kensmith@svn.freebsd.org)
Received: (from kensmith@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9FLN5Ht031202;
	Sat, 15 Oct 2011 21:23:05 GMT
	(envelope-from kensmith@svn.freebsd.org)
Message-Id: <201110152123.p9FLN5Ht031202@svn.freebsd.org>
From: Ken Smith 
Date: Sat, 15 Oct 2011 21:23:05 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226405 - in stable/9: . etc/defaults lib/libc/stdlib
	sys/amd64/conf sys/i386/conf sys/ia64/conf sys/pc98/conf
	sys/powerpc/conf sys/sparc64/conf
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 15 Oct 2011 21:23:05 -0000

Author: kensmith
Date: Sat Oct 15 21:23:04 2011
New Revision: 226405
URL: http://svn.freebsd.org/changeset/base/226405

Log:
  Remove extra debuggin gsupport that is turned on for head but turned off
  for stable branches:
  
  	- shift to MALLOC_PRODUCTION
  	- turn off automatic crash dumps
  	- remove kernel debuggers, INVARIANT*[1], WITNESS* from GENERIC
  	  kernel config files
  
  [1] INVARIANT* left on for ia64 at least temporarily, marcel@ will test
      to see if they are still required as they had been for stable/8.
  
  Approved by:	re (implicit)

Modified:
  stable/9/UPDATING
  stable/9/etc/defaults/rc.conf
  stable/9/lib/libc/stdlib/malloc.c
  stable/9/sys/amd64/conf/GENERIC
  stable/9/sys/i386/conf/GENERIC
  stable/9/sys/ia64/conf/GENERIC
  stable/9/sys/pc98/conf/GENERIC
  stable/9/sys/powerpc/conf/GENERIC
  stable/9/sys/sparc64/conf/GENERIC

Modified: stable/9/UPDATING
==============================================================================
--- stable/9/UPDATING	Sat Oct 15 21:06:08 2011	(r226404)
+++ stable/9/UPDATING	Sat Oct 15 21:23:04 2011	(r226405)
@@ -9,18 +9,10 @@ handbook.
 Items affecting the ports and packages system can be found in
 /usr/ports/UPDATING.  Please read that file before running portupgrade.
 
-NOTE TO PEOPLE WHO THINK THAT FreeBSD 9.x IS SLOW:
-	FreeBSD 9.x has many debugging features turned on, in both the kernel
-	and userland.  These features attempt to detect incorrect use of
-	system primitives, and encourage loud failure through extra sanity
-	checking and fail stop semantics.  They also substantially impact
-	system performance.  If you want to do performance measurement,
-	benchmarking, and optimization, you'll want to turn them off.  This
-	includes various WITNESS- related kernel options, INVARIANTS, malloc
-	debugging flags in userland, and various verbose features in the
-	kernel.  Many developers choose to disable these features on build
-	machines to maximize performance.  (To disable malloc debugging, run
-	ln -s aj /etc/malloc.conf.)
+NOTE TO PEOPLE WHO THINK THAT FreeBSD 9.x IS SLOW ON IA64:
+	For ia64 the INVARIANTS and INVARIANT_SUPPORT kernel options
+	were left in the GENERIC kernel because the kernel does not
+	work properly without them.
 
 20110913:
 	This commit modifies vfs_register() so that it uses a hash

Modified: stable/9/etc/defaults/rc.conf
==============================================================================
--- stable/9/etc/defaults/rc.conf	Sat Oct 15 21:06:08 2011	(r226404)
+++ stable/9/etc/defaults/rc.conf	Sat Oct 15 21:23:04 2011	(r226405)
@@ -594,7 +594,7 @@ lpd_flags=""		# Flags to lpd (if enabled
 nscd_enable="NO"	# Run the nsswitch caching daemon.
 chkprintcap_enable="NO"	# Run chkprintcap(8) before running lpd.
 chkprintcap_flags="-d"	# Create missing directories by default.
-dumpdev="AUTO"		# Device to crashdump to (device name, AUTO, or NO).
+dumpdev="NO"		# Device to crashdump to (device name, AUTO, or NO).
 dumpdir="/var/crash"	# Directory where crash dumps are to be stored
 savecore_flags=""	# Used if dumpdev is enabled above, and present.
 crashinfo_enable="YES"	# Automatically generate crash dump summary.

Modified: stable/9/lib/libc/stdlib/malloc.c
==============================================================================
--- stable/9/lib/libc/stdlib/malloc.c	Sat Oct 15 21:06:08 2011	(r226404)
+++ stable/9/lib/libc/stdlib/malloc.c	Sat Oct 15 21:23:04 2011	(r226405)
@@ -123,7 +123,7 @@
  * defaults the A and J runtime options to off.  These settings are appropriate
  * for production systems.
  */
-/* #define	MALLOC_PRODUCTION */
+#define	MALLOC_PRODUCTION
 
 #ifndef MALLOC_PRODUCTION
    /*

Modified: stable/9/sys/amd64/conf/GENERIC
==============================================================================
--- stable/9/sys/amd64/conf/GENERIC	Sat Oct 15 21:06:08 2011	(r226404)
+++ stable/9/sys/amd64/conf/GENERIC	Sat Oct 15 21:23:04 2011	(r226405)
@@ -65,17 +65,6 @@ options 	MAC			# TrustedBSD MAC Framewor
 #options 	KDTRACE_HOOKS		# Kernel DTrace hooks
 options 	INCLUDE_CONFIG_FILE     # Include this file in kernel
 
-# Debugging for use in -current
-options 	KDB			# Enable kernel debugger support.
-options 	DDB			# Support DDB.
-options 	GDB			# Support remote GDB.
-options 	DEADLKRES		# Enable the deadlock resolver
-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 	MALLOC_DEBUG_MAXZONES=8	# Separate malloc(9) zones
-
 # Make an SMP-capable kernel by default
 options 	SMP			# Symmetric MultiProcessor Kernel
 

Modified: stable/9/sys/i386/conf/GENERIC
==============================================================================
--- stable/9/sys/i386/conf/GENERIC	Sat Oct 15 21:06:08 2011	(r226404)
+++ stable/9/sys/i386/conf/GENERIC	Sat Oct 15 21:23:04 2011	(r226405)
@@ -65,17 +65,6 @@ options 	MAC			# TrustedBSD MAC Framewor
 #options 	KDTRACE_HOOKS		# Kernel DTrace hooks
 options 	INCLUDE_CONFIG_FILE     # Include this file in kernel
 
-# Debugging for use in -current
-options 	KDB			# Enable kernel debugger support.
-options 	DDB			# Support DDB.
-options 	GDB			# Support remote GDB.
-options 	DEADLKRES		# Enable the deadlock resolver
-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 	MALLOC_DEBUG_MAXZONES=8	# Separate malloc(9) zones
-
 # To make an SMP kernel, the next two lines are needed
 options 	SMP			# Symmetric MultiProcessor Kernel
 device		apic			# I/O APIC

Modified: stable/9/sys/ia64/conf/GENERIC
==============================================================================
--- stable/9/sys/ia64/conf/GENERIC	Sat Oct 15 21:06:08 2011	(r226404)
+++ stable/9/sys/ia64/conf/GENERIC	Sat Oct 15 21:23:04 2011	(r226405)
@@ -28,17 +28,13 @@ makeoptions	DEBUG=-g	# Build kernel with
 options 	AUDIT		# Security event auditing
 options 	CD9660		# ISO 9660 Filesystem
 options 	COMPAT_FREEBSD7	# Compatible with FreeBSD7
-options 	DDB		# Support DDB
-options 	DEADLKRES	# Enable the deadlock resolver
 options 	FFS		# Berkeley Fast Filesystem
-options 	GDB		# Support remote GDB
 options 	GEOM_LABEL	# Provides labelization
 options 	INCLUDE_CONFIG_FILE     # Include this file in kernel
 options 	INET		# InterNETworking
 options 	INET6		# IPv6 communications protocols
 options 	INVARIANTS	# Enable calls of extra sanity checking
 options 	INVARIANT_SUPPORT # required by INVARIANTS
-options 	KDB		# Enable kernel debugger support
 options 	KTRACE		# ktrace(1) syscall trace support
 options 	MAC		# TrustedBSD MAC Framework
 options 	MD_ROOT		# MD usable as root device
@@ -64,10 +60,7 @@ options 	SYSVSHM		# SYSV-style shared me
 options 	UFS_ACL		# Support for access control lists
 options 	UFS_DIRHASH	# Hash-based directory lookup scheme
 options 	UFS_GJOURNAL	# Enable gjournal-based UFS journaling
-options 	WITNESS		# Enable checks to detect deadlocks and cycles
-options 	WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed
 options 	_KPOSIX_PRIORITY_SCHEDULING	# Posix P1003_1B RT extensions
-options 	MALLOC_DEBUG_MAXZONES=8	# Separate malloc(9) zones
 
 # Various "busses"
 device		firewire	# FireWire bus code

Modified: stable/9/sys/pc98/conf/GENERIC
==============================================================================
--- stable/9/sys/pc98/conf/GENERIC	Sat Oct 15 21:06:08 2011	(r226404)
+++ stable/9/sys/pc98/conf/GENERIC	Sat Oct 15 21:23:04 2011	(r226405)
@@ -66,17 +66,6 @@ options 	AUDIT			# Security event auditi
 options 	MAC			# TrustedBSD MAC Framework
 options 	INCLUDE_CONFIG_FILE     # Include this file in kernel
 
-# Debugging for use in -current
-options 	KDB			# Enable kernel debugger support.
-options 	DDB			# Support DDB.
-options 	GDB			# Support remote GDB.
-options 	DEADLKRES		# Enable the deadlock resolver
-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 	MALLOC_DEBUG_MAXZONES=8	# Separate malloc(9) zones
-
 # To make an SMP kernel, the next two lines are needed
 #options 	SMP			# Symmetric MultiProcessor Kernel
 #device		apic			# I/O APIC

Modified: stable/9/sys/powerpc/conf/GENERIC
==============================================================================
--- stable/9/sys/powerpc/conf/GENERIC	Sat Oct 15 21:06:08 2011	(r226404)
+++ stable/9/sys/powerpc/conf/GENERIC	Sat Oct 15 21:23:04 2011	(r226405)
@@ -67,16 +67,6 @@ options 	AUDIT			# Security event auditi
 options 	MAC			# TrustedBSD MAC Framework
 options 	INCLUDE_CONFIG_FILE     # Include this file in kernel
 
-# Debugging for use in -current
-options 	KDB			#Enable the kernel debugger
-options 	DDB			#Support DDB
-#options 	DEADLKRES		#Enable the deadlock resolver
-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 	MALLOC_DEBUG_MAXZONES=8	# Separate malloc(9) zones
-
 # To make an SMP kernel, the next line is needed
 options 	SMP			# Symmetric MultiProcessor Kernel
 

Modified: stable/9/sys/sparc64/conf/GENERIC
==============================================================================
--- stable/9/sys/sparc64/conf/GENERIC	Sat Oct 15 21:06:08 2011	(r226404)
+++ stable/9/sys/sparc64/conf/GENERIC	Sat Oct 15 21:23:04 2011	(r226405)
@@ -63,17 +63,6 @@ options 	AUDIT			# Security event auditi
 options 	MAC			# TrustedBSD MAC Framework
 options 	INCLUDE_CONFIG_FILE	# Include this file in kernel
 
-# Debugging for use in -current
-options 	KDB			# Enable kernel debugger support.
-options 	DDB			# Support DDB.
-options 	GDB			# Support remote GDB.
-options 	DEADLKRES		# Enable the deadlock resolver
-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 	MALLOC_DEBUG_MAXZONES=8	# Separate malloc(9) zones
-
 # Make an SMP-capable kernel by default
 options 	SMP			# Symmetric MultiProcessor Kernel
 

From owner-svn-src-all@FreeBSD.ORG  Sat Oct 15 22:27:35 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A56901065679;
	Sat, 15 Oct 2011 22:27:35 +0000 (UTC)
	(envelope-from brueffer@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 6B9FA8FC14;
	Sat, 15 Oct 2011 22:27:35 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9FMRZBM033409;
	Sat, 15 Oct 2011 22:27:35 GMT
	(envelope-from brueffer@svn.freebsd.org)
Received: (from brueffer@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9FMRZNX033407;
	Sat, 15 Oct 2011 22:27:35 GMT
	(envelope-from brueffer@svn.freebsd.org)
Message-Id: <201110152227.p9FMRZNX033407@svn.freebsd.org>
From: Christian Brueffer 
Date: Sat, 15 Oct 2011 22:27:35 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226406 - head/sys/dev/siba
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 15 Oct 2011 22:27:35 -0000

Author: brueffer
Date: Sat Oct 15 22:27:35 2011
New Revision: 226406
URL: http://svn.freebsd.org/changeset/base/226406

Log:
  Properly free resources in case of an error.
  
  CID:		4222
  Found with:	Coverity Prevent(tm)
  MFC after:	1 week

Modified:
  head/sys/dev/siba/siba_bwn.c

Modified: head/sys/dev/siba/siba_bwn.c
==============================================================================
--- head/sys/dev/siba/siba_bwn.c	Sat Oct 15 21:23:04 2011	(r226405)
+++ head/sys/dev/siba/siba_bwn.c	Sat Oct 15 22:27:35 2011	(r226406)
@@ -208,6 +208,7 @@ siba_bwn_suspend(device_t dev)
 		if (error) {
 			for (j = 0; j < i; j++)
 				DEVICE_RESUME(devlistp[j]);
+			free(devlistp, M_TEMP);
 			return (error);
 		}
 	}

From owner-svn-src-all@FreeBSD.ORG  Sat Oct 15 22:27:59 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B784C1065786;
	Sat, 15 Oct 2011 22:27:59 +0000 (UTC)
	(envelope-from rwatson@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id A65248FC0C;
	Sat, 15 Oct 2011 22:27:59 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9FMRx4p033458;
	Sat, 15 Oct 2011 22:27:59 GMT (envelope-from rwatson@svn.freebsd.org)
Received: (from rwatson@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9FMRxtS033456;
	Sat, 15 Oct 2011 22:27:59 GMT (envelope-from rwatson@svn.freebsd.org)
Message-Id: <201110152227.p9FMRxtS033456@svn.freebsd.org>
From: Robert Watson 
Date: Sat, 15 Oct 2011 22:27:59 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226407 - stable/9/sys/kern
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 15 Oct 2011 22:27:59 -0000

Author: rwatson
Date: Sat Oct 15 22:27:59 2011
New Revision: 226407
URL: http://svn.freebsd.org/changeset/base/226407

Log:
  Merge r226301 from head to stable/9:
  
    Correct a bug in export of capability-related information from the sysctls
    supporting procstat -f: properly provide capability rights information to
    userspace.  The bug resulted from a merge-o during upstreaming (or rather,
    a failure to properly merge FreeBSD-side changed downstream).
  
    Spotted by:     des, kibab
  
  Approved by:	re (kib)

Modified:
  stable/9/sys/kern/kern_descrip.c

Modified: stable/9/sys/kern/kern_descrip.c
==============================================================================
--- stable/9/sys/kern/kern_descrip.c	Sat Oct 15 22:27:35 2011	(r226406)
+++ stable/9/sys/kern/kern_descrip.c	Sat Oct 15 22:27:59 2011	(r226407)
@@ -3182,7 +3182,8 @@ CTASSERT(sizeof(struct kinfo_file) == KI
 
 static int
 export_fd_for_sysctl(void *data, int type, int fd, int fflags, int refcnt,
-    int64_t offset, struct kinfo_file *kif, struct sysctl_req *req)
+    int64_t offset, int fd_is_cap, cap_rights_t fd_cap_rights,
+    struct kinfo_file *kif, struct sysctl_req *req)
 {
 	struct {
 		int	fflag;
@@ -3243,6 +3244,10 @@ export_fd_for_sysctl(void *data, int typ
 	for (i = 0; i < NFFLAGS; i++)
 		if (fflags & fflags_table[i].fflag)
 			kif->kf_flags |=  fflags_table[i].kf_fflag;
+	if (fd_is_cap)
+		kif->kf_flags |= KF_FLAG_CAPABILITY;
+	if (fd_is_cap)
+		kif->kf_cap_rights = fd_cap_rights;
 	kif->kf_fd = fd;
 	kif->kf_type = type;
 	kif->kf_ref_count = refcnt;
@@ -3270,7 +3275,8 @@ sysctl_kern_proc_filedesc(SYSCTL_HANDLER
 	int64_t offset;
 	void *data;
 	int error, i, *name;
-	int type, refcnt, fflags;
+	int fd_is_cap, type, refcnt, fflags;
+	cap_rights_t fd_cap_rights;
 
 	name = (int *)arg1;
 	if ((p = pfind((pid_t)name[0])) == NULL)
@@ -3299,13 +3305,13 @@ sysctl_kern_proc_filedesc(SYSCTL_HANDLER
 	kif = malloc(sizeof(*kif), M_TEMP, M_WAITOK);
 	if (tracevp != NULL)
 		export_fd_for_sysctl(tracevp, KF_TYPE_VNODE, KF_FD_TYPE_TRACE,
-		    FREAD | FWRITE, -1, -1, kif, req);
+		    FREAD | FWRITE, -1, -1, 0, 0, kif, req);
 	if (textvp != NULL)
 		export_fd_for_sysctl(textvp, KF_TYPE_VNODE, KF_FD_TYPE_TEXT,
-		    FREAD, -1, -1, kif, req);
+		    FREAD, -1, -1, 0, 0, kif, req);
 	if (cttyvp != NULL)
 		export_fd_for_sysctl(cttyvp, KF_TYPE_VNODE, KF_FD_TYPE_CTTY,
-		    FREAD | FWRITE, -1, -1, kif, req);
+		    FREAD | FWRITE, -1, -1, 0, 0, kif, req);
 	if (fdp == NULL)
 		goto fail;
 	FILEDESC_SLOCK(fdp);
@@ -3315,7 +3321,7 @@ sysctl_kern_proc_filedesc(SYSCTL_HANDLER
 		data = fdp->fd_cdir;
 		FILEDESC_SUNLOCK(fdp);
 		export_fd_for_sysctl(data, KF_TYPE_VNODE, KF_FD_TYPE_CWD,
-		    FREAD, -1, -1, kif, req);
+		    FREAD, -1, -1, 0, 0, kif, req);
 		FILEDESC_SLOCK(fdp);
 	}
 	/* root directory */
@@ -3324,7 +3330,7 @@ sysctl_kern_proc_filedesc(SYSCTL_HANDLER
 		data = fdp->fd_rdir;
 		FILEDESC_SUNLOCK(fdp);
 		export_fd_for_sysctl(data, KF_TYPE_VNODE, KF_FD_TYPE_ROOT,
-		    FREAD, -1, -1, kif, req);
+		    FREAD, -1, -1, 0, 0, kif, req);
 		FILEDESC_SLOCK(fdp);
 	}
 	/* jail directory */
@@ -3333,13 +3339,15 @@ sysctl_kern_proc_filedesc(SYSCTL_HANDLER
 		data = fdp->fd_jdir;
 		FILEDESC_SUNLOCK(fdp);
 		export_fd_for_sysctl(data, KF_TYPE_VNODE, KF_FD_TYPE_JAIL,
-		    FREAD, -1, -1, kif, req);
+		    FREAD, -1, -1, 0, 0, kif, req);
 		FILEDESC_SLOCK(fdp);
 	}
 	for (i = 0; i < fdp->fd_nfiles; i++) {
 		if ((fp = fdp->fd_ofiles[i]) == NULL)
 			continue;
 		data = NULL;
+		fd_is_cap = 0;
+		fd_cap_rights = 0;
 
 #ifdef CAPABILITIES
 		/*
@@ -3348,8 +3356,8 @@ sysctl_kern_proc_filedesc(SYSCTL_HANDLER
 		 * the capability rights mask.
 		 */
 		if (fp->f_type == DTYPE_CAPABILITY) {
-			kif->kf_flags |= KF_FLAG_CAPABILITY;
-			kif->kf_cap_rights = cap_rights(fp);
+			fd_is_cap = 1;
+			fd_cap_rights = cap_rights(fp);
 			(void)cap_funwrap(fp, 0, &fp);
 		}
 #else /* !CAPABILITIES */
@@ -3428,8 +3436,8 @@ sysctl_kern_proc_filedesc(SYSCTL_HANDLER
 		oldidx = req->oldidx;
 		if (type == KF_TYPE_VNODE || type == KF_TYPE_FIFO)
 			FILEDESC_SUNLOCK(fdp);
-		error = export_fd_for_sysctl(data, type, i,
-		    fflags, refcnt, offset, kif, req);
+		error = export_fd_for_sysctl(data, type, i, fflags, refcnt,
+		    offset, fd_is_cap, fd_cap_rights, kif, req);
 		if (type == KF_TYPE_VNODE || type == KF_TYPE_FIFO)
 			FILEDESC_SLOCK(fdp);
 		if (error) {

From owner-svn-src-all@FreeBSD.ORG  Sat Oct 15 23:09:21 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 6FCBC106566C;
	Sat, 15 Oct 2011 23:09:21 +0000 (UTC) (envelope-from dim@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 5EE718FC18;
	Sat, 15 Oct 2011 23:09:21 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9FN9Lnk034774;
	Sat, 15 Oct 2011 23:09:21 GMT (envelope-from dim@svn.freebsd.org)
Received: (from dim@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9FN9Len034772;
	Sat, 15 Oct 2011 23:09:21 GMT (envelope-from dim@svn.freebsd.org)
Message-Id: <201110152309.p9FN9Len034772@svn.freebsd.org>
From: Dimitry Andric 
Date: Sat, 15 Oct 2011 23:09:21 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226408 - stable/9/usr.bin/clang/clang
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 15 Oct 2011 23:09:21 -0000

Author: dim
Date: Sat Oct 15 23:09:21 2011
New Revision: 226408
URL: http://svn.freebsd.org/changeset/base/226408

Log:
  MFC r226310:
  
  Add manpage symlink for clang++(1).
  
  PR:		docs/149051
  Approved by:	re (kib)

Modified:
  stable/9/usr.bin/clang/clang/Makefile
Directory Properties:
  stable/9/usr.bin/clang/   (props changed)

Modified: stable/9/usr.bin/clang/clang/Makefile
==============================================================================
--- stable/9/usr.bin/clang/clang/Makefile	Sat Oct 15 22:27:59 2011	(r226407)
+++ stable/9/usr.bin/clang/clang/Makefile	Sat Oct 15 23:09:21 2011	(r226408)
@@ -10,6 +10,7 @@ SRCS=	cc1_main.cpp \
 	driver.cpp
 
 LINKS=	${BINDIR}/clang ${BINDIR}/clang++
+MLINKS=	clang.1 clang++.1
 
 TGHDRS=	CC1AsOptions \
 	CC1Options \

From owner-svn-src-all@FreeBSD.ORG  Sat Oct 15 23:13:24 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E9303106564A;
	Sat, 15 Oct 2011 23:13:24 +0000 (UTC) (envelope-from dim@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id D85968FC08;
	Sat, 15 Oct 2011 23:13:24 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9FNDO2V034965;
	Sat, 15 Oct 2011 23:13:24 GMT (envelope-from dim@svn.freebsd.org)
Received: (from dim@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9FNDO7o034963;
	Sat, 15 Oct 2011 23:13:24 GMT (envelope-from dim@svn.freebsd.org)
Message-Id: <201110152313.p9FNDO7o034963@svn.freebsd.org>
From: Dimitry Andric 
Date: Sat, 15 Oct 2011 23:13:24 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226409 - stable/9/usr.bin/clang/clang
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 15 Oct 2011 23:13:25 -0000

Author: dim
Date: Sat Oct 15 23:13:24 2011
New Revision: 226409
URL: http://svn.freebsd.org/changeset/base/226409

Log:
  MFC r226311:
  
  Add link from clang to clang-cpp, so you can use CPP=clang-cpp in
  Makefiles.  Also add a manpage symlink for it.
  
  Approved by:	re (kib)

Modified:
  stable/9/usr.bin/clang/clang/Makefile
Directory Properties:
  stable/9/usr.bin/clang/   (props changed)

Modified: stable/9/usr.bin/clang/clang/Makefile
==============================================================================
--- stable/9/usr.bin/clang/clang/Makefile	Sat Oct 15 23:09:21 2011	(r226408)
+++ stable/9/usr.bin/clang/clang/Makefile	Sat Oct 15 23:13:24 2011	(r226409)
@@ -9,8 +9,10 @@ SRCS=	cc1_main.cpp \
 	cc1as_main.cpp \
 	driver.cpp
 
-LINKS=	${BINDIR}/clang ${BINDIR}/clang++
-MLINKS=	clang.1 clang++.1
+LINKS=	${BINDIR}/clang ${BINDIR}/clang++ \
+	${BINDIR}/clang ${BINDIR}/clang-cpp
+MLINKS=	clang.1 clang++.1 \
+	clang.1 clang-cpp.1
 
 TGHDRS=	CC1AsOptions \
 	CC1Options \

From owner-svn-src-all@FreeBSD.ORG  Sat Oct 15 23:15:55 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id CAD02106564A;
	Sat, 15 Oct 2011 23:15:55 +0000 (UTC)
	(envelope-from nwhitehorn@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id A08458FC0C;
	Sat, 15 Oct 2011 23:15:55 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9FNFtrL035082;
	Sat, 15 Oct 2011 23:15:55 GMT
	(envelope-from nwhitehorn@svn.freebsd.org)
Received: (from nwhitehorn@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9FNFtbM035080;
	Sat, 15 Oct 2011 23:15:55 GMT
	(envelope-from nwhitehorn@svn.freebsd.org)
Message-Id: <201110152315.p9FNFtbM035080@svn.freebsd.org>
From: Nathan Whitehorn 
Date: Sat, 15 Oct 2011 23:15:55 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226410 - head/sys/powerpc/powerpc
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 15 Oct 2011 23:15:55 -0000

Author: nwhitehorn
Date: Sat Oct 15 23:15:55 2011
New Revision: 226410
URL: http://svn.freebsd.org/changeset/base/226410

Log:
  Enforce a memory barrier in stream operations, as is done on other
  bus_space calls. This makes ath(4) work correctly on PowerPC.
  
  Submitted by:	adrian
  Tested by:	andreast
  MFC after:	3 days

Modified:
  head/sys/powerpc/powerpc/bus_machdep.c

Modified: head/sys/powerpc/powerpc/bus_machdep.c
==============================================================================
--- head/sys/powerpc/powerpc/bus_machdep.c	Sat Oct 15 23:13:24 2011	(r226409)
+++ head/sys/powerpc/powerpc/bus_machdep.c	Sat Oct 15 23:15:55 2011	(r226410)
@@ -293,6 +293,7 @@ bs_be_ws_1(bus_space_handle_t bsh, bus_s
 
 	addr = __ppc_ba(bsh, ofs);
 	*addr = val;
+	__asm __volatile("eieio; sync");
 	CTR4(KTR_BE_IO, "%s(bsh=%#x, ofs=%#x, val=%#x)", __func__, bsh, ofs, val);
 }
 
@@ -303,6 +304,7 @@ bs_be_ws_2(bus_space_handle_t bsh, bus_s
 
 	addr = __ppc_ba(bsh, ofs);
 	*addr = val;
+	__asm __volatile("eieio; sync");
 	CTR4(KTR_BE_IO, "%s(bsh=%#x, ofs=%#x, val=%#x)", __func__, bsh, ofs, val);
 }
 
@@ -313,6 +315,7 @@ bs_be_ws_4(bus_space_handle_t bsh, bus_s
 
 	addr = __ppc_ba(bsh, ofs);
 	*addr = val;
+	__asm __volatile("eieio; sync");
 	CTR4(KTR_BE_IO, "%s(bsh=%#x, ofs=%#x, val=%#x)", __func__, bsh, ofs, val);
 }
 
@@ -323,6 +326,7 @@ bs_be_ws_8(bus_space_handle_t bsh, bus_s
 
 	addr = __ppc_ba(bsh, ofs);
 	*addr = val;
+	__asm __volatile("eieio; sync");
 }
 
 static void
@@ -488,6 +492,7 @@ bs_le_rs_1(bus_space_handle_t bsh, bus_s
 
 	addr = __ppc_ba(bsh, ofs);
 	res = *addr;
+	__asm __volatile("eieio; sync");
 	CTR4(KTR_LE_IO, "%s(bsh=%#x, ofs=%#x) = %#x", __func__, bsh, ofs, res);
 	return (res);
 }
@@ -500,6 +505,7 @@ bs_le_rs_2(bus_space_handle_t bsh, bus_s
 
 	addr = __ppc_ba(bsh, ofs);
 	__asm __volatile("lhbrx %0, 0, %1" : "=r"(res) : "r"(addr));
+	__asm __volatile("eieio; sync");
 	CTR4(KTR_LE_IO, "%s(bsh=%#x, ofs=%#x) = %#x", __func__, bsh, ofs, res);
 	return (res);
 }
@@ -512,6 +518,7 @@ bs_le_rs_4(bus_space_handle_t bsh, bus_s
 
 	addr = __ppc_ba(bsh, ofs);
 	__asm __volatile("lwbrx %0, 0, %1" : "=r"(res) : "r"(addr));
+	__asm __volatile("eieio; sync");
 	CTR4(KTR_LE_IO, "%s(bsh=%#x, ofs=%#x) = %#x", __func__, bsh, ofs, res);
 	return (res);
 }