From owner-svn-src-head@FreeBSD.ORG Sun Nov 3 05:06:18 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 7E02FC68; Sun, 3 Nov 2013 05:06:18 +0000 (UTC) (envelope-from sjg@juniper.net) Received: from db8outboundpool.messaging.microsoft.com (mail-db8lp0185.outbound.messaging.microsoft.com [213.199.154.185]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D9AF62CB8; Sun, 3 Nov 2013 05:06:17 +0000 (UTC) Received: from mail9-db8-R.bigfish.com (10.174.8.248) by DB8EHSOBE003.bigfish.com (10.174.4.66) with Microsoft SMTP Server id 14.1.225.22; Sun, 3 Nov 2013 04:50:57 +0000 Received: from mail9-db8 (localhost [127.0.0.1]) by mail9-db8-R.bigfish.com (Postfix) with ESMTP id 6BECC3400C1; Sun, 3 Nov 2013 04:50:57 +0000 (UTC) X-Forefront-Antispam-Report: CIP:66.129.224.51; KIP:(null); UIP:(null); IPV:NLI; H:P-EMF01-SAC.jnpr.net; RD:none; EFVD:NLI X-SpamScore: 8 X-BigFish: VPS8(zzzz1f42h208ch1ee6h1de0h1fdah2073h2146h1202h1e76h1d1ah1d2ah1fc6h1082kzzz2fh2a8h839hd25hf0ah1288h12a5h12a9h12bdh12e5h137ah139eh13b6h1441h14ddh1504h1537h162dh1631h1758h1898h18e1h1946h19b5h1ad9h1b0ah1b2fh1b88h1fb3h1d0ch1d2eh1d3fh1de2h1dfeh1dffh1e23h1fe8h1ff5h2218h2216h222dm1155h) Received-SPF: pass (mail9-db8: domain of juniper.net designates 66.129.224.51 as permitted sender) client-ip=66.129.224.51; envelope-from=sjg@juniper.net; helo=P-EMF01-SAC.jnpr.net ; SAC.jnpr.net ; Received: from mail9-db8 (localhost.localdomain [127.0.0.1]) by mail9-db8 (MessageSwitch) id 1383454255313378_1345; Sun, 3 Nov 2013 04:50:55 +0000 (UTC) Received: from DB8EHSMHS010.bigfish.com (unknown [10.174.8.235]) by mail9-db8.bigfish.com (Postfix) with ESMTP id 2A3E3300040; Sun, 3 Nov 2013 04:50:55 +0000 (UTC) Received: from P-EMF01-SAC.jnpr.net (66.129.224.51) by DB8EHSMHS010.bigfish.com (10.174.4.20) with Microsoft SMTP Server (TLS) id 14.16.227.3; Sun, 3 Nov 2013 04:50:54 +0000 Received: from magenta.juniper.net (172.17.27.123) by P-EMF01-SAC.jnpr.net (172.24.192.21) with Microsoft SMTP Server (TLS) id 14.3.146.0; Sat, 2 Nov 2013 21:50:51 -0700 Received: from chaos.jnpr.net (chaos.jnpr.net [172.24.29.229]) by magenta.juniper.net (8.11.3/8.11.3) with ESMTP id rA34ooL14954; Sat, 2 Nov 2013 21:50:51 -0700 (PDT) (envelope-from sjg@juniper.net) Received: from chaos.jnpr.net (localhost [127.0.0.1]) by chaos.jnpr.net (Postfix) with ESMTP id B41B15807E; Sat, 2 Nov 2013 21:50:50 -0700 (PDT) To: Brooks Davis Subject: Re: this breaks builds of head on stable/9 (Re: svn commit: r257268 - head/gnu/usr.bin/binutils/ld In-Reply-To: <20131101221532.GA45336@lor.one-eyed-alien.net> References: <20131101020924.GB32951@lor.one-eyed-alien.net> <20131101061842.GA8911@onelab2.iet.unipi.it> <20131101204848.GA44088@lor.one-eyed-alien.net> <20131101213254.GA35505@onelab2.iet.unipi.it> <20131101221532.GA45336@lor.one-eyed-alien.net> Comments: In-reply-to: Brooks Davis message dated "Fri, 01 Nov 2013 17:15:32 -0500." From: "Simon J. Gerraty" X-Mailer: MH-E 7.82+cvs; nmh 1.3; GNU Emacs 22.3.1 Date: Sat, 2 Nov 2013 21:50:50 -0700 Message-ID: <20131103045050.B41B15807E@chaos.jnpr.net> MIME-Version: 1.0 Content-Type: text/plain X-OriginatorOrg: juniper.net X-FOPE-CONNECTOR: Id%0$Dn%*$RO%0$TLS%0$FQDN%$TlsDn% Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Luigi Rizzo X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Nov 2013 05:06:18 -0000 On Fri, 1 Nov 2013 17:15:32 -0500, Brooks Davis writes: >(In practice WITHOUT_BMAKE is broken and corrupts your object tree with a >make that fails until manually deleted.) That's new? it worked last time I checked - which was around the time I made sure the make thus built was named for the flavor (fmake or bmake) desired so wouldn't accidentally be used when you change your mind. >We should decide if it should be fixed or removed before 10 goes out. AFAIK I committed workarounds for all the functional differences that worried people, before 10 was branched. So perhaps WITHOUT_BMAKE can be deprecated. From owner-svn-src-head@FreeBSD.ORG Sun Nov 3 05:13:53 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 558A510A; Sun, 3 Nov 2013 05:13:53 +0000 (UTC) (envelope-from sjg@juniper.net) Received: from tx2outboundpool.messaging.microsoft.com (tx2ehsobe004.messaging.microsoft.com [65.55.88.14]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0DBCD2D08; Sun, 3 Nov 2013 05:13:52 +0000 (UTC) Received: from mail110-tx2-R.bigfish.com (10.9.14.247) by TX2EHSOBE003.bigfish.com (10.9.40.23) with Microsoft SMTP Server id 14.1.225.22; Sun, 3 Nov 2013 04:43:32 +0000 Received: from mail110-tx2 (localhost [127.0.0.1]) by mail110-tx2-R.bigfish.com (Postfix) with ESMTP id 96512440127; Sun, 3 Nov 2013 04:43:32 +0000 (UTC) X-Forefront-Antispam-Report: CIP:66.129.224.52; KIP:(null); UIP:(null); IPV:NLI; H:P-EMF01-SAC.jnpr.net; RD:none; EFVD:NLI X-SpamScore: 8 X-BigFish: VPS8(zzzz1f42h208ch1ee6h1de0h1fdah2073h2146h1202h1e76h1d1ah1d2ah1fc6h1082kzzz2fh2a8h839hd25hf0ah1288h12a5h12a9h12bdh12e5h137ah139eh13b6h1441h14ddh1504h1537h162dh1631h1758h1898h18e1h1946h19b5h1ad9h1b0ah1b2fh1b88h1fb3h1d0ch1d2eh1d3fh1de2h1dfeh1dffh1e23h1fe8h1ff5h2218h2216h222dm1155h) Received-SPF: pass (mail110-tx2: domain of juniper.net designates 66.129.224.52 as permitted sender) client-ip=66.129.224.52; envelope-from=sjg@juniper.net; helo=P-EMF01-SAC.jnpr.net ; SAC.jnpr.net ; Received: from mail110-tx2 (localhost.localdomain [127.0.0.1]) by mail110-tx2 (MessageSwitch) id 1383453811379251_25575; Sun, 3 Nov 2013 04:43:31 +0000 (UTC) Received: from TX2EHSMHS025.bigfish.com (unknown [10.9.14.249]) by mail110-tx2.bigfish.com (Postfix) with ESMTP id 57F1E8009A; Sun, 3 Nov 2013 04:43:31 +0000 (UTC) Received: from P-EMF01-SAC.jnpr.net (66.129.224.52) by TX2EHSMHS025.bigfish.com (10.9.99.125) with Microsoft SMTP Server (TLS) id 14.16.227.3; Sun, 3 Nov 2013 04:43:30 +0000 Received: from magenta.juniper.net (172.17.27.123) by P-EMF01-SAC.jnpr.net (172.24.192.21) with Microsoft SMTP Server (TLS) id 14.3.146.0; Sat, 2 Nov 2013 21:43:29 -0700 Received: from chaos.jnpr.net (chaos.jnpr.net [172.24.29.229]) by magenta.juniper.net (8.11.3/8.11.3) with ESMTP id rA34hSL12721; Sat, 2 Nov 2013 21:43:29 -0700 (PDT) (envelope-from sjg@juniper.net) Received: from chaos.jnpr.net (localhost [127.0.0.1]) by chaos.jnpr.net (Postfix) with ESMTP id B73655807E; Sat, 2 Nov 2013 21:43:28 -0700 (PDT) To: Brooks Davis Subject: Re: this breaks builds of head on stable/9 (Re: svn commit: r257268 - head/gnu/usr.bin/binutils/ld In-Reply-To: <20131101204848.GA44088@lor.one-eyed-alien.net> References: <20131101020924.GB32951@lor.one-eyed-alien.net> <20131101061842.GA8911@onelab2.iet.unipi.it> <20131101204848.GA44088@lor.one-eyed-alien.net> Comments: In-reply-to: Brooks Davis message dated "Fri, 01 Nov 2013 15:48:48 -0500." From: "Simon J. Gerraty" X-Mailer: MH-E 7.82+cvs; nmh 1.3; GNU Emacs 22.3.1 Date: Sat, 2 Nov 2013 21:43:28 -0700 Message-ID: <20131103044328.B73655807E@chaos.jnpr.net> MIME-Version: 1.0 Content-Type: text/plain X-OriginatorOrg: juniper.net X-FOPE-CONNECTOR: Id%0$Dn%*$RO%0$TLS%0$FQDN%$TlsDn% Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Luigi Rizzo X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Nov 2013 05:13:53 -0000 >told me what was wrong. The issue is that the :U modifer I used is a >bmake feature and that the toolchain target doesn't bootstrap bmake (or >perhaps doesn't do it early enough). I plan to commit a workaround for Hmmm toolchain is in the same TGTS list as buildworld, so should depend on upgrade_checks which is how the needed make gets built. Oh, that only applies if ALWAYS_CHECK_MAKE is defined. Might be a good idea to set ALWAYS_CHECK_MAKE is host isn't head? From owner-svn-src-head@FreeBSD.ORG Sun Nov 3 13:37:17 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 9493F7FE; Sun, 3 Nov 2013 13:37:17 +0000 (UTC) (envelope-from kubito@gmail.com) Received: from mail-lb0-x22d.google.com (mail-lb0-x22d.google.com [IPv6:2a00:1450:4010:c04::22d]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8AAF12F1B; Sun, 3 Nov 2013 13:37:16 +0000 (UTC) Received: by mail-lb0-f173.google.com with SMTP id w7so4779486lbi.32 for ; Sun, 03 Nov 2013 05:37:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=7hCNWnwlJ9FLLVNtz1JYw7oglopPuTNZSIpGIdPM41A=; b=w5EgAIDyukRcnDBEWyAOeLBcigLp7daXjA7xNznwT1oO25QsfWDIx4AvtdpzltB2zK 1w/jMRisurGNmXCJfEZd6mEthlBc2sfXch8zqHacZAHBRXG3VbZ+c05NrTP1kRz8gl4P Yk4vaOoL2r3YHFWVOfEnRBu7Xn9SEzj0Y9+oUFL4TWOEN6AYTLKmHoIntLmPZ9gzgXMh +Z2Cuvs2LghZA5a96pqQ8f2E+PItbCnFRFNpkXoehXgIUtC9mnFD51kAmLXJNnIc/cO9 Dq8l/Pha5TLZ9GTJQEdOJeBlOr5O+vwMWQlnFO8LTJ9z5SsKYhFCCueTP5RAwXy6S4au Zh+g== X-Received: by 10.112.143.3 with SMTP id sa3mr7812945lbb.12.1383485833996; Sun, 03 Nov 2013 05:37:13 -0800 (PST) Received: from orwell.Elisa.gmail.com (a91-154-115-217.elisa-laajakaista.fi. [91.154.115.217]) by mx.google.com with ESMTPSA id vo1sm13119878lbb.1.2013.11.03.05.37.12 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 03 Nov 2013 05:37:13 -0800 (PST) Sender: Raphael Kubo da Costa From: Raphael Kubo da Costa To: David Chisnall Subject: Re: svn commit: r253260 - head/lib/msun/src References: <201307121103.r6CB3qrh068782@svn.freebsd.org> <86d2mrd10h.fsf__46266.7496213273$1382832829$gmane$org@orwell.Elisa> <868uxfd0rt.fsf@orwell.Elisa> <6EA02AB7-4DE5-4B67-BD7C-78E8F8975E4B@FreeBSD.org> Date: Sun, 03 Nov 2013 15:37:05 +0200 In-Reply-To: <6EA02AB7-4DE5-4B67-BD7C-78E8F8975E4B@FreeBSD.org> (David Chisnall's message of "Sat, 26 Oct 2013 22:46:21 -0400") Message-ID: <86txftobcu.fsf@orwell.Elisa> User-Agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Nov 2013 13:37:17 -0000 David Chisnall writes: > The issue is probably a clang bug. The use of _Generic() is in a > system header and so ought to be immune to warnings, but apparently > the fact that it's instantiated outside of the system header. If you > can file a clang bug > (http://llvm.org/bugs/enter_bug.cgi?product=clang) I'll take a look > (I'm at vBSDCon now, so I'll lose it otherwise). Done, at last: http://llvm.org/bugs/show_bug.cgi?id=17788 From owner-svn-src-head@FreeBSD.ORG Sun Nov 3 14:00:17 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B1507DBC; Sun, 3 Nov 2013 14:00:17 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9F7073000; Sun, 3 Nov 2013 14:00:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA3E0Hpr090898; Sun, 3 Nov 2013 14:00:17 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA3E0H4x090897; Sun, 3 Nov 2013 14:00:17 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201311031400.rA3E0H4x090897@svn.freebsd.org> From: Michael Tuexen Date: Sun, 3 Nov 2013 14:00:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257574 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Nov 2013 14:00:17 -0000 Author: tuexen Date: Sun Nov 3 14:00:17 2013 New Revision: 257574 URL: http://svnweb.freebsd.org/changeset/base/257574 Log: Unlock the lock before destroying it. This issue was reported by Andrew Galante. MFC after: 3 days Modified: head/sys/netinet/sctp_pcb.c Modified: head/sys/netinet/sctp_pcb.c ============================================================================== --- head/sys/netinet/sctp_pcb.c Sun Nov 3 13:06:43 2013 (r257573) +++ head/sys/netinet/sctp_pcb.c Sun Nov 3 14:00:17 2013 (r257574) @@ -4332,6 +4332,7 @@ sctp_aloc_assoc(struct sctp_inpcb *inp, asoc->nr_mapping_array = NULL; } SCTP_DECR_ASOC_COUNT(); + SCTP_TCB_UNLOCK(stcb); SCTP_TCB_LOCK_DESTROY(stcb); SCTP_TCB_SEND_LOCK_DESTROY(stcb); LIST_REMOVE(stcb, sctp_tcbasocidhash); @@ -5134,6 +5135,7 @@ sctp_free_assoc(struct sctp_inpcb *inp, /* Insert new items here :> */ /* Get rid of LOCK */ + SCTP_TCB_UNLOCK(stcb); SCTP_TCB_LOCK_DESTROY(stcb); SCTP_TCB_SEND_LOCK_DESTROY(stcb); if (from_inpcbfree == SCTP_NORMAL_PROC) { From owner-svn-src-head@FreeBSD.ORG Sun Nov 3 16:43:53 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B9A1F9F5; Sun, 3 Nov 2013 16:43:53 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A6C8E26F5; Sun, 3 Nov 2013 16:43:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA3GhrB0049192; Sun, 3 Nov 2013 16:43:53 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA3GhqgI049186; Sun, 3 Nov 2013 16:43:52 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201311031643.rA3GhqgI049186@svn.freebsd.org> From: Ed Schouten Date: Sun, 3 Nov 2013 16:43:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257579 - in head: . tools/build/mk usr.sbin/utx X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Nov 2013 16:43:53 -0000 Author: ed Date: Sun Nov 3 16:43:52 2013 New Revision: 257579 URL: http://svnweb.freebsd.org/changeset/base/257579 Log: Remove utxrm(8). This command has been superseded by 'utx rm'. Modified: head/ObsoleteFiles.inc head/tools/build/mk/OptionalObsoleteFiles.inc head/usr.sbin/utx/Makefile head/usr.sbin/utx/utx.8 head/usr.sbin/utx/utx.c Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Sun Nov 3 16:17:06 2013 (r257578) +++ head/ObsoleteFiles.inc Sun Nov 3 16:43:52 2013 (r257579) @@ -38,6 +38,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20131103: removal of utxrm(8), use 'utx rm' instead. +OLD_FILES+=usr/sbin/utxrm +OLD_FILES+=usr/share/man/man8/utxrm.8.gz # 20131031: pkg_install has been removed OLD_FILES+=etc/periodic/daily/220.backup-pkgdb OLD_FILES+=etc/periodic/daily/490.status-pkg-changes Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Sun Nov 3 16:17:06 2013 (r257578) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sun Nov 3 16:43:52 2013 (r257579) @@ -4147,14 +4147,12 @@ OLD_FILES+=usr/bin/who OLD_FILES+=usr/sbin/ac OLD_FILES+=usr/sbin/lastlogin OLD_FILES+=usr/sbin/utx -OLD_FILES+=usr/sbin/utxrm OLD_FILES+=usr/share/man/man1/last.1.gz OLD_FILES+=usr/share/man/man1/users.1.gz OLD_FILES+=usr/share/man/man1/who.1.gz OLD_FILES+=usr/share/man/man8/ac.8.gz OLD_FILES+=usr/share/man/man8/lastlogin.8.gz OLD_FILES+=usr/share/man/man8/utx.8.gz -OLD_FILES+=usr/share/man/man8/utxrm.8.gz .endif .if ${MK_WIRELESS} == no Modified: head/usr.sbin/utx/Makefile ============================================================================== --- head/usr.sbin/utx/Makefile Sun Nov 3 16:17:06 2013 (r257578) +++ head/usr.sbin/utx/Makefile Sun Nov 3 16:43:52 2013 (r257579) @@ -3,7 +3,4 @@ PROG= utx MAN= utx.8 -LINKS= ${BINDIR}/utx ${BINDIR}/utxrm -MLINKS= utx.8 utxrm.8 - .include Modified: head/usr.sbin/utx/utx.8 ============================================================================== --- head/usr.sbin/utx/utx.8 Sun Nov 3 16:17:06 2013 (r257578) +++ head/usr.sbin/utx/utx.8 Sun Nov 3 16:43:52 2013 (r257579) @@ -24,12 +24,11 @@ .\" .\" $FreeBSD$ .\" -.Dd February 11, 2012 +.Dd November 3, 2013 .Dt UTX 8 .Os .Sh NAME -.Nm utx , -.Nm utxrm +.Nm utx .Nd manage the user accounting database .Sh SYNOPSIS .Nm @@ -40,9 +39,6 @@ .Cm rm .Ar identifier .Ar ... -.Nm utxrm -.Ar identifier -.Ar ... .Sh DESCRIPTION The .Nm @@ -82,11 +78,6 @@ accounting database's active session tab Identifiers can either be supplied in hexadecimal form as displayed by .Xr getent 1 , or as a string if the identifier allows such a representation. -.Pp -To remain backward compatible, this action can also be invoked directly -by using the -.Nm utxrm -command. .El .Pp Because this utility requires write-access to the user accounting Modified: head/usr.sbin/utx/utx.c ============================================================================== --- head/usr.sbin/utx/utx.c Sun Nov 3 16:17:06 2013 (r257578) +++ head/usr.sbin/utx/utx.c Sun Nov 3 16:43:52 2013 (r257579) @@ -95,10 +95,7 @@ int main(int argc, char *argv[]) { - if (argc >= 2 && strcmp(getprogname(), "utxrm") == 0) - /* For compatibility. */ - return (rm(&argv[1])); - else if (argc == 2 && strcmp(argv[1], "boot") == 0) + if (argc == 2 && strcmp(argv[1], "boot") == 0) return (boot(BOOT_TIME)); else if (argc == 2 && strcmp(argv[1], "shutdown") == 0) return (boot(SHUTDOWN_TIME)); @@ -108,7 +105,6 @@ main(int argc, char *argv[]) fprintf(stderr, "usage: utx boot\n" " utx shutdown\n" - " utx rm identifier ...\n" - " utxrm identifier ...\n"); + " utx rm identifier ...\n"); exit(1); } From owner-svn-src-head@FreeBSD.ORG Sun Nov 3 19:02:18 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B5BFDAC8; Sun, 3 Nov 2013 19:02:18 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A34E22D1F; Sun, 3 Nov 2013 19:02:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA3J2I5u096903; Sun, 3 Nov 2013 19:02:18 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA3J2ITm096902; Sun, 3 Nov 2013 19:02:18 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201311031902.rA3J2ITm096902@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Sun, 3 Nov 2013 19:02:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257582 - head/sbin/hastd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Nov 2013 19:02:18 -0000 Author: pjd Date: Sun Nov 3 19:02:18 2013 New Revision: 257582 URL: http://svnweb.freebsd.org/changeset/base/257582 Log: Correct alignment. Modified: head/sbin/hastd/hastd.8 Modified: head/sbin/hastd/hastd.8 ============================================================================== --- head/sbin/hastd/hastd.8 Sun Nov 3 18:14:46 2013 (r257581) +++ head/sbin/hastd/hastd.8 Sun Nov 3 19:02:18 2013 (r257582) @@ -171,7 +171,7 @@ The default location is .Pa /var/run/hastd.pid . .El .Sh FILES -.Bl -tag -width ".Pa /var/run/hastctl" -compact +.Bl -tag -width ".Pa /var/run/hastd.pid" -compact .It Pa /etc/hast.conf The configuration file for .Nm From owner-svn-src-head@FreeBSD.ORG Sun Nov 3 19:04:59 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 2E650C21; Sun, 3 Nov 2013 19:04:59 +0000 (UTC) (envelope-from peter@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 196462D31; Sun, 3 Nov 2013 19:04:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA3J4wNm097306; Sun, 3 Nov 2013 19:04:58 GMT (envelope-from peter@svn.freebsd.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA3J4vwG097297; Sun, 3 Nov 2013 19:04:57 GMT (envelope-from peter@svn.freebsd.org) Message-Id: <201311031904.rA3J4vwG097297@svn.freebsd.org> From: Peter Wemm Date: Sun, 3 Nov 2013 19:04:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257583 - in head: . include lib lib/libc/iconv lib/libiconv_compat share/mk tools/build/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Nov 2013 19:04:59 -0000 Author: peter Date: Sun Nov 3 19:04:57 2013 New Revision: 257583 URL: http://svnweb.freebsd.org/changeset/base/257583 Log: Remove the WITH_LIBICONV_COMPAT hack that seems to do more harm than good. This caused libc to spoof the ports libiconv namespace and provide a colliding libiconv.so.3 to fool rtld. This should have been removed some time ago. Deleted: head/lib/libiconv_compat/ Modified: head/ObsoleteFiles.inc head/include/Makefile head/include/iconv.h head/lib/Makefile head/lib/libc/iconv/Symbol.map head/lib/libc/iconv/iconv.c head/share/mk/bsd.own.mk head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Sun Nov 3 19:02:18 2013 (r257582) +++ head/ObsoleteFiles.inc Sun Nov 3 19:04:57 2013 (r257583) @@ -38,6 +38,12 @@ # xargs -n1 | sort | uniq -d; # done +# 20131103: WITH_LIBICONV_COMPAT removal +OLD_FILES+=usr/include/_libiconv_compat.h +OLD_FILES+=usr/lib/libiconv.a +OLD_FILES+=usr/lib/libiconv.so +OLD_FILES+=usr/lib/libiconv.so.3 +OLD_FILES+=usr/lib/libiconv_p.a # 20131103: removal of utxrm(8), use 'utx rm' instead. OLD_FILES+=usr/sbin/utxrm OLD_FILES+=usr/share/man/man8/utxrm.8.gz Modified: head/include/Makefile ============================================================================== --- head/include/Makefile Sun Nov 3 19:02:18 2013 (r257582) +++ head/include/Makefile Sun Nov 3 19:04:57 2013 (r257583) @@ -83,15 +83,7 @@ _netipx= netipx # Handle the #define aliases for libiconv .if ${MK_ICONV} == "yes" -CLEANFILES+= _libiconv_compat.h -INCS+= _libiconv_compat.h iconv.h -_libiconv_compat.h: ${.CURDIR}/Makefile - echo "/* Indicate whether libiconv symbols are present */" > _libiconv_compat.h -.if ${MK_LIBICONV_COMPAT} == "yes" - echo "#define __LIBICONV_COMPAT" >> _libiconv_compat.h -.else - echo "#undef __LIBICONV_COMPAT" >> _libiconv_compat.h -.endif +INCS+= iconv.h .endif Modified: head/include/iconv.h ============================================================================== --- head/include/iconv.h Sun Nov 3 19:02:18 2013 (r257582) +++ head/include/iconv.h Sun Nov 3 19:04:57 2013 (r257583) @@ -40,13 +40,6 @@ #include #include -#include <_libiconv_compat.h> -#ifdef __LIBICONV_COMPAT -#define libiconv_open iconv_open -#define libiconv_close iconv_close -#define libiconv iconv -#define libiconv_t iconv_t -#endif #ifdef __cplusplus typedef bool __iconv_bool; #elif __STDC_VERSION__ >= 199901L @@ -76,22 +69,10 @@ size_t __iconv(iconv_t, const char **, s /* * GNU interfaces for iconv */ -#ifdef __LIBICONV_COMPAT -#define libiconv_open_into iconv_open_into -#define libiconvctl iconvctl -#define libiconvlist iconvlist -#define libiconv_set_relocation_prefix iconv_set_relocation_prefix -#endif - /* We have iconvctl() */ #define _ICONV_VERSION 0x0108 extern int _iconv_version; -#ifdef __LIBICONV_COMPAT -#define _libiconv_version _iconv_version -#define _LIBICONV_VERSION _ICONV_VERSION -#endif - typedef struct { void *spaceholder[64]; } iconv_allocation_t; Modified: head/lib/Makefile ============================================================================== --- head/lib/Makefile Sun Nov 3 19:02:18 2013 (r257582) +++ head/lib/Makefile Sun Nov 3 19:04:57 2013 (r257583) @@ -81,7 +81,6 @@ SUBDIR= ${SUBDIR_ORDERED} \ ${_libgpib} \ ${_libgssapi} \ ${_librpcsec_gss} \ - ${_libiconv_compat} \ libipsec \ ${_libipx} \ libjail \ @@ -188,10 +187,6 @@ _libcxxrt= libcxxrt _libcplusplus= libc++ .endif -.if ${MK_LIBICONV_COMPAT} != "no" -_libiconv_compat= libiconv_compat -.endif - .if ${MK_LIBTHR} != "no" _libthr= libthr .endif Modified: head/lib/libc/iconv/Symbol.map ============================================================================== --- head/lib/libc/iconv/Symbol.map Sun Nov 3 19:02:18 2013 (r257582) +++ head/lib/libc/iconv/Symbol.map Sun Nov 3 19:04:57 2013 (r257583) @@ -6,15 +6,7 @@ FBSD_1.2 { __iconv; __iconv_free_list; __iconv_get_list; - _libiconv_version; iconv_canonicalize; - libiconv; - libiconv_close; - libiconv_open; - libiconv_open_into; - libiconv_set_relocation_prefix; - libiconvctl; - libiconvlist; }; FBSD_1.3 { Modified: head/lib/libc/iconv/iconv.c ============================================================================== --- head/lib/libc/iconv/iconv.c Sun Nov 3 19:02:18 2013 (r257582) +++ head/lib/libc/iconv/iconv.c Sun Nov 3 19:04:57 2013 (r257583) @@ -47,18 +47,6 @@ #include "citrus_hash.h" #include "citrus_iconv.h" -#include <_libiconv_compat.h> -#ifdef __LIBICONV_COMPAT -__weak_reference(iconv, libiconv); -__weak_reference(iconv_open, libiconv_open); -__weak_reference(iconv_open_into, libiconv_open_into); -__weak_reference(iconv_close, libiconv_close); -__weak_reference(iconvlist, libiconvlist); -__weak_reference(iconvctl, libiconvctl); -__weak_reference(iconv_set_relocation_prefix, libiconv_set_relocation_prefix); -__weak_reference(_iconv_version, _libiconv_version); -#endif - #define ISBADF(_h_) (!(_h_) || (_h_) == (iconv_t)-1) int _iconv_version = _ICONV_VERSION; Modified: head/share/mk/bsd.own.mk ============================================================================== --- head/share/mk/bsd.own.mk Sun Nov 3 19:02:18 2013 (r257582) +++ head/share/mk/bsd.own.mk Sun Nov 3 19:04:57 2013 (r257583) @@ -368,7 +368,6 @@ __DEFAULT_NO_OPTIONS = \ DEBUG_FILES \ GPL_DTC \ HESIOD \ - LIBICONV_COMPAT \ INSTALL_AS_USER \ LLDB \ NAND \ @@ -492,10 +491,6 @@ MK_${var}:= no MK_LIBTHR:= no .endif -.if ${MK_ICONV} == "no" -MK_LIBICONV_COMPAT:= no -.endif - .if ${MK_LDNS} == "no" MK_LDNS_UTILS:= no MK_UNBOUND:= no Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Sun Nov 3 19:02:18 2013 (r257582) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sun Nov 3 19:04:57 2013 (r257583) @@ -3136,13 +3136,6 @@ OLD_FILES+=usr/share/man/man1/host.1.gz # to be filled in #.endif -.if ${MK_LIBICONV_COMPAT} == no -OLD_FILES+=usr/lib/libiconv.a -OLD_FILES+=usr/lib/libiconv.so -OLD_FILES+=usr/lib/libiconv.so.3 -OLD_FILES+=usr/lib/libiconv_p.a -.endif - .if ${MK_LIBCPLUSPLUS} == no OLD_LIBS+=lib/libcxxrt.so.1 OLD_FILES+=usr/lib/libc++.a From owner-svn-src-head@FreeBSD.ORG Sun Nov 3 20:38:52 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 8D18A875; Sun, 3 Nov 2013 20:38:52 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6A5B4213F; Sun, 3 Nov 2013 20:38:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA3Kcqwj028806; Sun, 3 Nov 2013 20:38:52 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA3Kcpsj028803; Sun, 3 Nov 2013 20:38:51 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201311032038.rA3Kcpsj028803@svn.freebsd.org> From: Sean Bruno Date: Sun, 3 Nov 2013 20:38:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257586 - in head/contrib/libreadline: . support X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Nov 2013 20:38:52 -0000 Author: sbruno Date: Sun Nov 3 20:38:51 2013 New Revision: 257586 URL: http://svnweb.freebsd.org/changeset/base/257586 Log: Update libreadline with vendor patches 8-13 as fetched from: ftp://ftp.cwru.edu/pub/bash/readline-5.2-patches/ MFC after: 2 weeks Modified: head/contrib/libreadline/display.c head/contrib/libreadline/input.c head/contrib/libreadline/support/shobj-conf Modified: head/contrib/libreadline/display.c ============================================================================== --- head/contrib/libreadline/display.c Sun Nov 3 20:21:43 2013 (r257585) +++ head/contrib/libreadline/display.c Sun Nov 3 20:38:51 2013 (r257586) @@ -392,14 +392,14 @@ rl_expand_prompt (prompt) t = ++p; local_prompt = expand_prompt (p, &prompt_visible_length, &prompt_last_invisible, - (int *)NULL, + &prompt_invis_chars_first_line, &prompt_physical_chars); c = *t; *t = '\0'; /* The portion of the prompt string up to and including the final newline is now null-terminated. */ local_prompt_prefix = expand_prompt (prompt, &prompt_prefix_length, (int *)NULL, - &prompt_invis_chars_first_line, + (int *)NULL, (int *)NULL); *t = c; local_prompt_len = local_prompt ? strlen (local_prompt) : 0; @@ -911,6 +911,10 @@ rl_redisplay () second and subsequent lines start at inv_lbreaks[N], offset by OFFSET (which has already been calculated above). */ +#define INVIS_FIRST() (prompt_physical_chars > _rl_screenwidth ? prompt_invis_chars_first_line : wrap_offset) +#define WRAP_OFFSET(line, offset) ((line == 0) \ + ? (offset ? INVIS_FIRST() : 0) \ + : ((line == prompt_last_screen_line) ? wrap_offset-prompt_invis_chars_first_line : 0)) #define W_OFFSET(line, offset) ((line) == 0 ? offset : 0) #define VIS_LLEN(l) ((l) > _rl_vis_botlin ? 0 : (vis_lbreaks[l+1] - vis_lbreaks[l])) #define INV_LLEN(l) (inv_lbreaks[l+1] - inv_lbreaks[l]) @@ -945,7 +949,13 @@ rl_redisplay () _rl_last_c_pos != o_cpos && _rl_last_c_pos > wrap_offset && o_cpos < prompt_last_invisible) - _rl_last_c_pos -= wrap_offset; + _rl_last_c_pos -= prompt_invis_chars_first_line; /* XXX - was wrap_offset */ + else if (linenum == prompt_last_screen_line && prompt_physical_chars > _rl_screenwidth && + (MB_CUR_MAX > 1 && rl_byte_oriented == 0) && + cpos_adjusted == 0 && + _rl_last_c_pos != o_cpos && + _rl_last_c_pos > (prompt_last_invisible - _rl_screenwidth - prompt_invis_chars_first_line)) + _rl_last_c_pos -= (wrap_offset-prompt_invis_chars_first_line); /* If this is the line with the prompt, we might need to compensate for invisible characters in the new line. Do @@ -1049,7 +1059,7 @@ rl_redisplay () tx = _rl_col_width (&visible_line[pos], 0, nleft) - visible_wrap_offset; else tx = nleft; - if (_rl_last_c_pos > tx) + if (tx >= 0 && _rl_last_c_pos > tx) { _rl_backspace (_rl_last_c_pos - tx); /* XXX */ _rl_last_c_pos = tx; @@ -1205,7 +1215,7 @@ update_line (old, new, current_line, oma int current_line, omax, nmax, inv_botlin; { register char *ofd, *ols, *oe, *nfd, *nls, *ne; - int temp, lendiff, wsatend, od, nd; + int temp, lendiff, wsatend, od, nd, twidth, o_cpos; int current_invis_chars; int col_lendiff, col_temp; #if defined (HANDLE_MULTIBYTE) @@ -1221,7 +1231,7 @@ update_line (old, new, current_line, oma if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) temp = _rl_last_c_pos; else - temp = _rl_last_c_pos - W_OFFSET(_rl_last_v_pos, visible_wrap_offset); + temp = _rl_last_c_pos - WRAP_OFFSET (_rl_last_v_pos, visible_wrap_offset); if (temp == _rl_screenwidth && _rl_term_autowrap && !_rl_horizontal_scroll_mode && _rl_last_v_pos == current_line - 1) { @@ -1466,6 +1476,8 @@ update_line (old, new, current_line, oma _rl_last_c_pos = lendiff; } + o_cpos = _rl_last_c_pos; + /* When this function returns, _rl_last_c_pos is correct, and an absolute cursor postion in multibyte mode, but a buffer index when not in a multibyte locale. */ @@ -1475,7 +1487,9 @@ update_line (old, new, current_line, oma /* We need to indicate that the cursor position is correct in the presence of invisible characters in the prompt string. Let's see if setting this when we make sure we're at the end of the drawn prompt string works. */ - if (current_line == 0 && MB_CUR_MAX > 1 && rl_byte_oriented == 0 && _rl_last_c_pos == prompt_physical_chars) + if (current_line == 0 && MB_CUR_MAX > 1 && rl_byte_oriented == 0 && + (_rl_last_c_pos > 0 || o_cpos > 0) && + _rl_last_c_pos == prompt_physical_chars) cpos_adjusted = 1; #endif #endif @@ -1566,11 +1580,16 @@ update_line (old, new, current_line, oma } else { - /* We have horizontal scrolling and we are not inserting at - the end. We have invisible characters in this line. This - is a dumb update. */ _rl_output_some_chars (nfd, temp); _rl_last_c_pos += col_temp; + /* If nfd begins before any invisible characters in the prompt, + adjust _rl_last_c_pos to account for wrap_offset and set + cpos_adjusted to let the caller know. */ + if (current_line == 0 && wrap_offset && ((nfd - new) <= prompt_last_invisible)) + { + _rl_last_c_pos -= wrap_offset; + cpos_adjusted = 1; + } return; } /* Copy (new) chars to screen from first diff to last match. */ @@ -1578,15 +1597,15 @@ update_line (old, new, current_line, oma if ((temp - lendiff) > 0) { _rl_output_some_chars (nfd + lendiff, temp - lendiff); -#if 1 /* XXX -- this bears closer inspection. Fixes a redisplay bug reported against bash-3.0-alpha by Andreas Schwab involving multibyte characters and prompt strings with invisible characters, but was previously disabled. */ - _rl_last_c_pos += _rl_col_width (nfd+lendiff, 0, temp-col_lendiff); -#else - _rl_last_c_pos += _rl_col_width (nfd+lendiff, 0, temp-lendiff); -#endif + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + twidth = _rl_col_width (nfd+lendiff, 0, temp-col_lendiff); + else + twidth = temp - lendiff; + _rl_last_c_pos += twidth; } } else @@ -1780,7 +1799,7 @@ _rl_move_cursor_relative (new, data) int woff; /* number of invisible chars on current line */ int cpos, dpos; /* current and desired cursor positions */ - woff = W_OFFSET (_rl_last_v_pos, wrap_offset); + woff = WRAP_OFFSET (_rl_last_v_pos, wrap_offset); cpos = _rl_last_c_pos; #if defined (HANDLE_MULTIBYTE) /* If we have multibyte characters, NEW is indexed by the buffer point in @@ -1794,7 +1813,11 @@ _rl_move_cursor_relative (new, data) /* Use NEW when comparing against the last invisible character in the prompt string, since they're both buffer indices and DPOS is a desired display position. */ - if (new > prompt_last_invisible) /* XXX - don't use woff here */ + if ((new > prompt_last_invisible) || /* XXX - don't use woff here */ + (prompt_physical_chars > _rl_screenwidth && + _rl_last_v_pos == prompt_last_screen_line && + wrap_offset != woff && + new > (prompt_last_invisible-_rl_screenwidth-wrap_offset))) { dpos -= woff; /* Since this will be assigned to _rl_last_c_pos at the end (more Modified: head/contrib/libreadline/input.c ============================================================================== --- head/contrib/libreadline/input.c Sun Nov 3 20:21:43 2013 (r257585) +++ head/contrib/libreadline/input.c Sun Nov 3 20:38:51 2013 (r257586) @@ -154,7 +154,7 @@ _rl_unget_char (key) { pop_index--; if (pop_index < 0) - pop_index = ibuffer_len - 1; + pop_index = ibuffer_len; ibuffer[pop_index] = key; return (1); } Modified: head/contrib/libreadline/support/shobj-conf ============================================================================== --- head/contrib/libreadline/support/shobj-conf Sun Nov 3 20:21:43 2013 (r257585) +++ head/contrib/libreadline/support/shobj-conf Sun Nov 3 20:38:51 2013 (r257586) @@ -10,7 +10,7 @@ # Chet Ramey # chet@po.cwru.edu -# Copyright (C) 1996-2002 Free Software Foundation, Inc. +# Copyright (C) 1996-2007 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -114,7 +114,7 @@ linux*-*|gnu*-*|k*bsd*-gnu-*) SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)' ;; -freebsd2* | netbsd*) +freebsd2*) SHOBJ_CFLAGS=-fpic SHOBJ_LD=ld SHOBJ_LDFLAGS='-x -Bshareable' @@ -125,7 +125,7 @@ freebsd2* | netbsd*) # FreeBSD-3.x ELF freebsd[3-9]*|freebsdelf[3-9]*|freebsdaout[3-9]*|dragonfly*) - SHOBJ_CFLAGS=-fpic + SHOBJ_CFLAGS=-fPIC SHOBJ_LD='${CC}' if [ -x /usr/bin/objformat ] && [ "`/usr/bin/objformat`" = "elf" ]; then @@ -142,7 +142,7 @@ freebsd[3-9]*|freebsdelf[3-9]*|freebsdao ;; # Darwin/MacOS X -darwin8*) +darwin[89]*) SHOBJ_STATUS=supported SHLIB_STATUS=supported @@ -153,7 +153,7 @@ darwin8*) SHLIB_LIBVERSION='$(SHLIB_MAJOR)$(SHLIB_MINOR).$(SHLIB_LIBSUFF)' SHLIB_LIBSUFF='dylib' - SHOBJ_LDFLAGS='-undefined dynamic_lookup' + SHOBJ_LDFLAGS='-dynamiclib -dynamic -undefined dynamic_lookup -arch_only `/usr/bin/arch`' SHLIB_XLDFLAGS='-dynamiclib -arch_only `/usr/bin/arch` -install_name $(libdir)/$@ -current_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -compatibility_version $(SHLIB_MAJOR) -v' SHLIB_LIBS='-lncurses' # see if -lcurses works on MacOS X 10.1 @@ -171,7 +171,7 @@ darwin*|macosx*) SHLIB_LIBSUFF='dylib' case "${host_os}" in - darwin[78]*) SHOBJ_LDFLAGS='' + darwin[789]*) SHOBJ_LDFLAGS='' SHLIB_XLDFLAGS='-dynamiclib -arch_only `/usr/bin/arch` -install_name $(libdir)/$@ -current_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -compatibility_version $(SHLIB_MAJOR) -v' ;; *) SHOBJ_LDFLAGS='-dynamic' @@ -182,7 +182,7 @@ darwin*|macosx*) SHLIB_LIBS='-lncurses' # see if -lcurses works on MacOS X 10.1 ;; -openbsd*) +openbsd*|netbsd*) SHOBJ_CFLAGS=-fPIC SHOBJ_LD='${CC}' SHOBJ_LDFLAGS='-shared' @@ -247,7 +247,7 @@ osf*) SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' ;; -aix4.[2-9]*-*gcc*) # lightly tested by jik@cisco.com +aix4.[2-9]*-*gcc*|aix[5-9].*-*gcc*) # lightly tested by jik@cisco.com SHOBJ_CFLAGS=-fpic SHOBJ_LD='ld' SHOBJ_LDFLAGS='-bdynamic -bnoentry -bexpall' @@ -258,7 +258,7 @@ aix4.[2-9]*-*gcc*) # lightly tested by SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' ;; -aix4.[2-9]*) +aix4.[2-9]*|aix[5-9].*) SHOBJ_CFLAGS=-K SHOBJ_LD='ld' SHOBJ_LDFLAGS='-bdynamic -bnoentry -bexpall' @@ -329,7 +329,7 @@ hpux10*-*gcc*) SHOBJ_LD='${CC}' # if you have problems linking here, moving the `-Wl,+h,$@' from # SHLIB_XLDFLAGS to SHOBJ_LDFLAGS has been reported to work - SHOBJ_LDFLAGS='-shared -Wl,-b -Wl,+s' + SHOBJ_LDFLAGS='-shared -fpic -Wl,-b -Wl,+s' SHLIB_XLDFLAGS='-Wl,+h,$@ -Wl,+b,$(libdir)' SHLIB_LIBSUFF='sl' From owner-svn-src-head@FreeBSD.ORG Sun Nov 3 21:05:45 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 24E262F3; Sun, 3 Nov 2013 21:05:45 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 11501227B; Sun, 3 Nov 2013 21:05:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA3L5ioH042330; Sun, 3 Nov 2013 21:05:44 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA3L5ix7042329; Sun, 3 Nov 2013 21:05:44 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201311032105.rA3L5ix7042329@svn.freebsd.org> From: Sean Bruno Date: Sun, 3 Nov 2013 21:05:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257592 - head/cddl/lib/libnvpair X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Nov 2013 21:05:45 -0000 Author: sbruno Date: Sun Nov 3 21:05:44 2013 New Revision: 257592 URL: http://svnweb.freebsd.org/changeset/base/257592 Log: This library uses macros to define fprintf behvavior for several object types The compiler will see the non-string literal arguments to the fprintf calls and omit warnings for them. Quiese these warnings in contrib code: cddl/contrib/opensolaris/lib/libnvpair/libnvpair.c:743:12: warning: format string is not a string literal (potentially insecure) [-Wformat-security] ARENDER(pctl, nvlist_array, nvl, name, val, nelem); Modified: head/cddl/lib/libnvpair/Makefile Modified: head/cddl/lib/libnvpair/Makefile ============================================================================== --- head/cddl/lib/libnvpair/Makefile Sun Nov 3 20:56:28 2013 (r257591) +++ head/cddl/lib/libnvpair/Makefile Sun Nov 3 21:05:44 2013 (r257592) @@ -21,4 +21,13 @@ CFLAGS+= -I${.CURDIR}/../../../sys CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/head CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris/lib/libumem +# This library uses macros to define fprintf behvavior for several object types +# The compiler will see the non-string literal arguments to the fprintf calls and +# omit warnings for them. Quiese these warnings in contrib code: +# +# cddl/contrib/opensolaris/lib/libnvpair/libnvpair.c:743:12: warning: format +# string is not a string literal (potentially insecure) [-Wformat-security] +# ARENDER(pctl, nvlist_array, nvl, name, val, nelem); +# +CFLAGS+= -Wno-format-security .include From owner-svn-src-head@FreeBSD.ORG Sun Nov 3 21:33:42 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A7ACADFC; Sun, 3 Nov 2013 21:33:42 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9338E2404; Sun, 3 Nov 2013 21:33:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA3LXgeq054405; Sun, 3 Nov 2013 21:33:42 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA3LXgIQ054404; Sun, 3 Nov 2013 21:33:42 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201311032133.rA3LXgIQ054404@svn.freebsd.org> From: Hans Petter Selasky Date: Sun, 3 Nov 2013 21:33:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257594 - head/sys/dev/usb/controller X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Nov 2013 21:33:42 -0000 Author: hselasky Date: Sun Nov 3 21:33:42 2013 New Revision: 257594 URL: http://svnweb.freebsd.org/changeset/base/257594 Log: Add description of two EHCI PCI IDs. Submitted by: Dmitry Luhtionov Modified: head/sys/dev/usb/controller/ehci_pci.c Modified: head/sys/dev/usb/controller/ehci_pci.c ============================================================================== --- head/sys/dev/usb/controller/ehci_pci.c Sun Nov 3 21:12:01 2013 (r257593) +++ head/sys/dev/usb/controller/ehci_pci.c Sun Nov 3 21:33:42 2013 (r257594) @@ -152,6 +152,10 @@ ehci_pci_match(device_t self) return ("Intel PCH USB 2.0 controller USB-A"); case 0x3b3c8086: return ("Intel PCH USB 2.0 controller USB-B"); + case 0x8c268086: + return ("Intel Lynx Point USB 2.0 controller USB-A"); + case 0x8c2d8086: + return ("Intel Lynx Point USB 2.0 controller USB-B"); case 0x00e01033: return ("NEC uPD 720100 USB 2.0 controller"); From owner-svn-src-head@FreeBSD.ORG Sun Nov 3 22:55:34 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 2D3728C7; Sun, 3 Nov 2013 22:55:34 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 018F52824; Sun, 3 Nov 2013 22:55:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA3MtXmN080969; Sun, 3 Nov 2013 22:55:33 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA3MtXZK080968; Sun, 3 Nov 2013 22:55:33 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201311032255.rA3MtXZK080968@svn.freebsd.org> From: Ian Lepore Date: Sun, 3 Nov 2013 22:55:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257595 - head/sys/arm/freescale/imx X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Nov 2013 22:55:34 -0000 Author: ian Date: Sun Nov 3 22:55:33 2013 New Revision: 257595 URL: http://svnweb.freebsd.org/changeset/base/257595 Log: Comments and style(9) only, no functional changes. Modified: head/sys/arm/freescale/imx/imx_machdep.c Modified: head/sys/arm/freescale/imx/imx_machdep.c ============================================================================== --- head/sys/arm/freescale/imx/imx_machdep.c Sun Nov 3 21:33:42 2013 (r257594) +++ head/sys/arm/freescale/imx/imx_machdep.c Sun Nov 3 22:55:33 2013 (r257595) @@ -158,34 +158,33 @@ bus_dma_get_range_nb(void) return (0); } +/* + * This code which manipulates the watchdog hardware is here to implement + * cpu_reset() because the watchdog is the only way for software to reset the + * chip. Why here and not in imx_wdog.c? Because there's no requirement that + * the watchdog driver be compiled in, but it's nice to be able to reboot even + * if it's not. + */ void imx_wdog_cpu_reset(vm_offset_t wdcr_physaddr) { + const struct pmap_devmap *pd; + volatile uint16_t * pcr; /* - * This code which manipulates the watchdog hardware is here to - * implement cpu_reset() because the watchdog is the only way for - * software to reset the chip. Why here and not in imx_wdog.c? Because - * there's no requirement that the watchdog driver be compiled in, but - * it's nice to be able to reboot even if it's not. + * The deceptively simple write of WDOG_CR_WDE enables the watchdog, + * sets the timeout to its minimum value (half a second), and also + * clears the SRS bit which results in the SFTW (software-requested + * reset) bit being set in the watchdog status register after the reset. + * This is how software can distinguish a reset from a wdog timeout. */ - volatile uint16_t * pcr; - const struct pmap_devmap *pd; - if ((pd = pmap_devmap_find_pa(wdcr_physaddr, 2)) == NULL) { printf("cpu_reset() can't find its control register... locking up now."); } else { pcr = (uint16_t *)(pd->pd_va + (wdcr_physaddr - pd->pd_pa)); - /* - * This deceptively simple write enables the watchdog, sets the timeout - * to its minimum value (half a second), and also clears the SRS bit - * which results in the SFTW (software-requested reset) bit being set in - * the watchdog status register after the reset. This is how software - * can distinguish a requested reset from a wdog timeout. - */ *pcr = WDOG_CR_WDE; } - while (1) + for (;;) continue; } From owner-svn-src-head@FreeBSD.ORG Sun Nov 3 23:06:25 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B6A83D7; Sun, 3 Nov 2013 23:06:25 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A3A4D28C9; Sun, 3 Nov 2013 23:06:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA3N6PeC084928; Sun, 3 Nov 2013 23:06:25 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA3N6PZY084926; Sun, 3 Nov 2013 23:06:25 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201311032306.rA3N6PZY084926@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 3 Nov 2013 23:06:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257597 - in head: lib/libc/sys sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Nov 2013 23:06:25 -0000 Author: jilles Date: Sun Nov 3 23:06:24 2013 New Revision: 257597 URL: http://svnweb.freebsd.org/changeset/base/257597 Log: kqueue: Change error for kqueues rlimit from EMFILE to ENOMEM and document this error condition in the kqueue(2) manual page. Discussed with: kib Modified: head/lib/libc/sys/kqueue.2 head/sys/kern/kern_event.c Modified: head/lib/libc/sys/kqueue.2 ============================================================================== --- head/lib/libc/sys/kqueue.2 Sun Nov 3 22:57:59 2013 (r257596) +++ head/lib/libc/sys/kqueue.2 Sun Nov 3 23:06:24 2013 (r257597) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 21, 2013 +.Dd November 4, 2013 .Dt KQUEUE 2 .Os .Sh NAME @@ -532,6 +532,13 @@ system call fails if: .Bl -tag -width Er .It Bq Er ENOMEM The kernel failed to allocate enough memory for the kernel queue. +.It Bq Er ENOMEM +The +.Dv RLIMIT_KQUEUES +rlimit +(see +.Xr getrlimit 2 ) +for the current user would be exceeded. .It Bq Er EMFILE The per-process descriptor table is full. .It Bq Er ENFILE Modified: head/sys/kern/kern_event.c ============================================================================== --- head/sys/kern/kern_event.c Sun Nov 3 22:57:59 2013 (r257596) +++ head/sys/kern/kern_event.c Sun Nov 3 23:06:24 2013 (r257597) @@ -712,7 +712,7 @@ sys_kqueue(struct thread *td, struct kqu RLIMIT_KQUEUES))) { PROC_UNLOCK(p); crfree(cred); - return (EMFILE); + return (ENOMEM); } PROC_UNLOCK(p); From owner-svn-src-head@FreeBSD.ORG Sun Nov 3 23:17:31 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 518ED350; Sun, 3 Nov 2013 23:17:31 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3D1062944; Sun, 3 Nov 2013 23:17:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA3NHVKn088586; Sun, 3 Nov 2013 23:17:31 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA3NHVtJ088585; Sun, 3 Nov 2013 23:17:31 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201311032317.rA3NHVtJ088585@svn.freebsd.org> From: Rick Macklem Date: Sun, 3 Nov 2013 23:17:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257598 - head/sys/fs/nfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Nov 2013 23:17:31 -0000 Author: rmacklem Date: Sun Nov 3 23:17:30 2013 New Revision: 257598 URL: http://svnweb.freebsd.org/changeset/base/257598 Log: During code inspection, I spotted that there was a code path where CLNT_CONTROL() would be called on "client" after it was released via CLNT_RELEASE(). It was unlikely that this code path gets executed and I have not heard of any problem report caused by this bug. This patch fixes the code so that this cannot happen. MFC after: 2 months Modified: head/sys/fs/nfs/nfs_commonkrpc.c Modified: head/sys/fs/nfs/nfs_commonkrpc.c ============================================================================== --- head/sys/fs/nfs/nfs_commonkrpc.c Sun Nov 3 23:06:24 2013 (r257597) +++ head/sys/fs/nfs/nfs_commonkrpc.c Sun Nov 3 23:17:30 2013 (r257598) @@ -336,24 +336,25 @@ newnfs_connect(struct nfsmount *nmp, str mtx_lock(&nrp->nr_mtx); if (nrp->nr_client != NULL) { + mtx_unlock(&nrp->nr_mtx); /* * Someone else already connected. */ CLNT_RELEASE(client); } else { nrp->nr_client = client; + /* + * Protocols that do not require connections may be optionally + * left unconnected for servers that reply from a port other + * than NFS_PORT. + */ + if (nmp == NULL || (nmp->nm_flag & NFSMNT_NOCONN) == 0) { + mtx_unlock(&nrp->nr_mtx); + CLNT_CONTROL(client, CLSET_CONNECT, &one); + } else + mtx_unlock(&nrp->nr_mtx); } - /* - * Protocols that do not require connections may be optionally left - * unconnected for servers that reply from a port other than NFS_PORT. - */ - if (nmp == NULL || (nmp->nm_flag & NFSMNT_NOCONN) == 0) { - mtx_unlock(&nrp->nr_mtx); - CLNT_CONTROL(client, CLSET_CONNECT, &one); - } else { - mtx_unlock(&nrp->nr_mtx); - } /* Restore current thread's credentials. */ td->td_ucred = origcred; From owner-svn-src-head@FreeBSD.ORG Mon Nov 4 02:50:43 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 92BD78BF; Mon, 4 Nov 2013 02:50:43 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8134821BE; Mon, 4 Nov 2013 02:50:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA42ohhJ062807; Mon, 4 Nov 2013 02:50:43 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA42ohpf062806; Mon, 4 Nov 2013 02:50:43 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201311040250.rA42ohpf062806@svn.freebsd.org> From: Mark Johnston Date: Mon, 4 Nov 2013 02:50:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257600 - head/usr.sbin/newsyslog X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Nov 2013 02:50:43 -0000 Author: markj Date: Mon Nov 4 02:50:43 2013 New Revision: 257600 URL: http://svnweb.freebsd.org/changeset/base/257600 Log: Initialize the struct tm before handing it to strptime(3). PR: 183550 MFC after: 2 weeks Modified: head/usr.sbin/newsyslog/newsyslog.c Modified: head/usr.sbin/newsyslog/newsyslog.c ============================================================================== --- head/usr.sbin/newsyslog/newsyslog.c Mon Nov 4 00:33:30 2013 (r257599) +++ head/usr.sbin/newsyslog/newsyslog.c Mon Nov 4 02:50:43 2013 (r257600) @@ -1491,6 +1491,7 @@ validate_old_timelog(int fd, const struc &dp->d_name[logfname_len]); return (0); } + memset(tm, 0, sizeof(*tm)); if ((s = strptime(&dp->d_name[logfname_len + 1], timefnamefmt, tm)) == NULL) { /* From owner-svn-src-head@FreeBSD.ORG Mon Nov 4 03:39:24 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 9CA3B6E7; Mon, 4 Nov 2013 03:39:24 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7C0AD24BC; Mon, 4 Nov 2013 03:39:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA43dOIR078729; Mon, 4 Nov 2013 03:39:24 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA43dNAK078725; Mon, 4 Nov 2013 03:39:23 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201311040339.rA43dNAK078725@svn.freebsd.org> From: Ian Lepore Date: Mon, 4 Nov 2013 03:39:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257603 - head/sys/arm/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Nov 2013 03:39:24 -0000 Author: ian Date: Mon Nov 4 03:39:23 2013 New Revision: 257603 URL: http://svnweb.freebsd.org/changeset/base/257603 Log: Rename WANDBOARD-COMMON to WANDBOARD.common and adjust the configs that include it accordingly. The build machinery for universe and tinderbox tries to build every kernel config whose name begins and ends with [A-Z0-9] and the common include file that has most of the options isn't buildable by itself, so the new lowercase .common will avoid building it. Added: head/sys/arm/conf/WANDBOARD.common - copied unchanged from r257602, head/sys/arm/conf/WANDBOARD-COMMON Deleted: head/sys/arm/conf/WANDBOARD-COMMON Modified: head/sys/arm/conf/WANDBOARD-DUAL head/sys/arm/conf/WANDBOARD-QUAD head/sys/arm/conf/WANDBOARD-SOLO Modified: head/sys/arm/conf/WANDBOARD-DUAL ============================================================================== --- head/sys/arm/conf/WANDBOARD-DUAL Mon Nov 4 03:00:44 2013 (r257602) +++ head/sys/arm/conf/WANDBOARD-DUAL Mon Nov 4 03:39:23 2013 (r257603) @@ -17,7 +17,7 @@ # # $FreeBSD$ -include WANDBOARD-COMMON +include WANDBOARD.common ident WANDBOARD-DUAL # Flattened Device Tree Modified: head/sys/arm/conf/WANDBOARD-QUAD ============================================================================== --- head/sys/arm/conf/WANDBOARD-QUAD Mon Nov 4 03:00:44 2013 (r257602) +++ head/sys/arm/conf/WANDBOARD-QUAD Mon Nov 4 03:39:23 2013 (r257603) @@ -17,7 +17,7 @@ # # $FreeBSD$ -include WANDBOARD-COMMON +include WANDBOARD.common ident WANDBOARD-QUAD # Flattened Device Tree Modified: head/sys/arm/conf/WANDBOARD-SOLO ============================================================================== --- head/sys/arm/conf/WANDBOARD-SOLO Mon Nov 4 03:00:44 2013 (r257602) +++ head/sys/arm/conf/WANDBOARD-SOLO Mon Nov 4 03:39:23 2013 (r257603) @@ -17,7 +17,7 @@ # # $FreeBSD$ -include WANDBOARD-COMMON +include WANDBOARD.common ident WANDBOARD-SOLO # Flattened Device Tree Copied: head/sys/arm/conf/WANDBOARD.common (from r257602, head/sys/arm/conf/WANDBOARD-COMMON) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/conf/WANDBOARD.common Mon Nov 4 03:39:23 2013 (r257603, copy of r257602, head/sys/arm/conf/WANDBOARD-COMMON) @@ -0,0 +1,155 @@ +# Kernel configuration for Wandboard +# +# For more information on this file, please read the config(5) manual page, +# and/or the handbook section on Kernel Configuration Files: +# +# http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html +# +# The handbook is also available locally in /usr/share/doc/handbook +# if you've installed the doc distribution, otherwise always see the +# FreeBSD World Wide Web server (http://www.FreeBSD.org/) for the +# latest information. +# +# An exhaustive list of options and more detailed explanations of the +# device lines is also present in the ../../conf/NOTES and NOTES files. +# If you are in doubt as to the purpose or necessity of a line, check first +# in NOTES. +# +# $FreeBSD$ + +include "../freescale/imx/std.imx6" + +options HZ=250 # Scheduling quantum is 4 milliseconds. +options SCHED_4BSD # 4BSD scheduler +options PREEMPTION # Enable kernel thread preemption +options INET # InterNETworking +options INET6 # IPv6 communications protocols +#options SCTP # Stream Control Transmission Protocol +options FFS # Berkeley Fast Filesystem +options SOFTUPDATES # Enable FFS soft updates support +options UFS_ACL # Support for access control lists +options UFS_DIRHASH # Improve performance on big directories +options UFS_GJOURNAL # Enable gjournal-based UFS journaling +#options MD_ROOT # MD is a potential root device +options NFSCL # New Network Filesystem Client +#options NFSD # New Network Filesystem Server +options NFSLOCKD # Network Lock Manager +options NFS_ROOT # NFS usable as /, requires NFSCL +options MSDOSFS # MSDOS Filesystem +options CD9660 # ISO 9660 Filesystem +#options PROCFS # Process filesystem (requires PSEUDOFS) +options PSEUDOFS # Pseudo-filesystem framework +options TMPFS # TMP Memory Filesystem +options GEOM_PART_GPT # GUID Partition Tables. +options GEOM_LABEL # Provides labelization +options KTRACE # ktrace(1) support +options SYSVSHM # SYSV-style shared memory +options SYSVMSG # SYSV-style message queues +options SYSVSEM # SYSV-style semaphores +options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions +options INCLUDE_CONFIG_FILE # Include this file in kernel + +# Debugging support. Always need this: +options KDB # Enable kernel debugger support. +# For minimum debugger support use KDB_TRACE, for interactive use DDB. +#options KDB_TRACE # Print a stack trace for a panic. +options DDB # Support DDB. +# For full debugger support use this instead: +#options GDB # Support remote GDB. +# Other debugging options... +makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols +options ALT_BREAK_TO_DEBUGGER # Use to enter debugger. +#options DEBUG +#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 + +# Note that 'bpf' is required for DHCP. +device bpf # Berkeley packet filter + +# Pseudo devices. +device loop # Network loopback +device random # Entropy device +device vlan # 802.1Q VLAN support +device tun # Packet tunnel. +device md # Memory "disks" +#device gif # IPv6 and IPv4 tunneling +#device faith # IPv6-to-IPv4 relaying (translation) +#device firmware # firmware assist module +device ether # Ethernet support +device miibus # Required for ethernet + +# Serial (COM) ports +device uart # Multi-uart driver + +#device iomux # IO Multiplexor + +# SCSI peripherals +device scbus # SCSI bus (required for SCSI) +device da # Direct Access (disks) +device cd # CD +device pass # Passthrough device (direct SCSI access) + +# USB support +#options USB_DEBUG # enable debug msgs +options USB_HOST_ALIGN=32 # Required for ARM, set to cache line size. +device ehci # OHCI USB interface +device usb # USB Bus (required) +device umass # Disks/Mass storage - Requires scbus and da +device uhid # "Human Interface Devices" +device u3g # USB modems + +# USB Ethernet, requires miibus +#device aue # ADMtek USB Ethernet +#device axe # ASIX Electronics USB Ethernet +#device cdce # Generic USB over Ethernet +#device cue # CATC USB Ethernet +#device kue # Kawasaki LSI USB Ethernet +#device rue # RealTek RTL8150 USB Ethernet +#device udav # Davicom DM9601E USB + +# USB Wireless +#device rum # Ralink Technology RT2501USB wireless NICs + +# Watchdog timer. +# WARNING: can't be disabled!!! +#device imxwdt # Watchdog + +# Wireless NIC cards +#device wlan # 802.11 support +#device wlan_wep # 802.11 WEP support +#device wlan_ccmp # 802.11 CCMP support +#device wlan_tkip # 802.11 TKIP support +#device wlan_amrr # AMRR transmit rate control algorithm + +# NOTE: serial console will be disabled if syscons enabled +# Uncomment following lines for framebuffer/syscons support +# Wandboard has no video console support yet. +#device sc +#device kbdmux +#options SC_DFLT_FONT # compile font in +#makeoptions SC_DFLT_FONT=cp437 +#device ukbd # Allow keyboard like HIDs to control console +#device ums + +# required for netbooting +#options BOOTP +#options BOOTP_COMPAT +#options BOOTP_NFSROOT +#options BOOTP_NFSV3 +#options BOOTP_WIRED_TO=ffec0 + +# U-Boot stuff lives on slice 1, FreeBSD on slice 2. +options ROOTDEVNAME=\"ufs:mmcsd0s2a\" + +#device fsliic # Freescale i2c/iic (not ready yet) +#device iic # iic protocol +#device iicbus # iic bus + +device sdhci # SD controller +device mmc # SD/MMC protocol +device mmcsd # SDCard disk device + +device ffec # Freescale Fast Ethernet Controller + From owner-svn-src-head@FreeBSD.ORG Mon Nov 4 03:46:10 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 0077B8D5; Mon, 4 Nov 2013 03:46:09 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E3CB22510; Mon, 4 Nov 2013 03:46:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA43k9cj081632; Mon, 4 Nov 2013 03:46:09 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA43k9xh081629; Mon, 4 Nov 2013 03:46:09 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201311040346.rA43k9xh081629@svn.freebsd.org> From: Ian Lepore Date: Mon, 4 Nov 2013 03:46:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257604 - head/sys/arm/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Nov 2013 03:46:10 -0000 Author: ian Date: Mon Nov 4 03:46:09 2013 New Revision: 257604 URL: http://svnweb.freebsd.org/changeset/base/257604 Log: Properly quote the included filename, now that it has a dot in it. Doh. Modified: head/sys/arm/conf/WANDBOARD-DUAL head/sys/arm/conf/WANDBOARD-QUAD head/sys/arm/conf/WANDBOARD-SOLO Modified: head/sys/arm/conf/WANDBOARD-DUAL ============================================================================== --- head/sys/arm/conf/WANDBOARD-DUAL Mon Nov 4 03:39:23 2013 (r257603) +++ head/sys/arm/conf/WANDBOARD-DUAL Mon Nov 4 03:46:09 2013 (r257604) @@ -17,7 +17,7 @@ # # $FreeBSD$ -include WANDBOARD.common +include "WANDBOARD.common" ident WANDBOARD-DUAL # Flattened Device Tree Modified: head/sys/arm/conf/WANDBOARD-QUAD ============================================================================== --- head/sys/arm/conf/WANDBOARD-QUAD Mon Nov 4 03:39:23 2013 (r257603) +++ head/sys/arm/conf/WANDBOARD-QUAD Mon Nov 4 03:46:09 2013 (r257604) @@ -17,7 +17,7 @@ # # $FreeBSD$ -include WANDBOARD.common +include "WANDBOARD.common" ident WANDBOARD-QUAD # Flattened Device Tree Modified: head/sys/arm/conf/WANDBOARD-SOLO ============================================================================== --- head/sys/arm/conf/WANDBOARD-SOLO Mon Nov 4 03:39:23 2013 (r257603) +++ head/sys/arm/conf/WANDBOARD-SOLO Mon Nov 4 03:46:09 2013 (r257604) @@ -17,7 +17,7 @@ # # $FreeBSD$ -include WANDBOARD.common +include "WANDBOARD.common" ident WANDBOARD-SOLO # Flattened Device Tree From owner-svn-src-head@FreeBSD.ORG Mon Nov 4 04:10:37 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 7AFD7D32; Mon, 4 Nov 2013 04:10:37 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 698EF2629; Mon, 4 Nov 2013 04:10:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA44Ab7Q090659; Mon, 4 Nov 2013 04:10:37 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA44Ab4m090658; Mon, 4 Nov 2013 04:10:37 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201311040410.rA44Ab4m090658@svn.freebsd.org> From: Adrian Chadd Date: Mon, 4 Nov 2013 04:10:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257605 - head/sys/dev/iwn X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Nov 2013 04:10:37 -0000 Author: adrian Date: Mon Nov 4 04:10:36 2013 New Revision: 257605 URL: http://svnweb.freebsd.org/changeset/base/257605 Log: Remove trailing whitespace. Submitted by: Cedric Gross Modified: head/sys/dev/iwn/if_iwnreg.h Modified: head/sys/dev/iwn/if_iwnreg.h ============================================================================== --- head/sys/dev/iwn/if_iwnreg.h Mon Nov 4 03:46:09 2013 (r257604) +++ head/sys/dev/iwn/if_iwnreg.h Mon Nov 4 04:10:36 2013 (r257605) @@ -1760,8 +1760,8 @@ static const uint8_t iwn_bss_ac_to_queue static const uint8_t iwn_pan_ac_to_queue[] = { 5, 4, 6, 7, }; -#define IWN1000_OTP_NBLOCKS 3 -#define IWN6000_OTP_NBLOCKS 4 +#define IWN1000_OTP_NBLOCKS 3 +#define IWN6000_OTP_NBLOCKS 4 #define IWN6050_OTP_NBLOCKS 7 /* HW rate indices. */ From owner-svn-src-head@FreeBSD.ORG Mon Nov 4 05:40:20 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 7233BAEE; Mon, 4 Nov 2013 05:40:20 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6032929A6; Mon, 4 Nov 2013 05:40:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA45eKuo020054; Mon, 4 Nov 2013 05:40:20 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA45eKtd020053; Mon, 4 Nov 2013 05:40:20 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201311040540.rA45eKtd020053@svn.freebsd.org> From: Adrian Chadd Date: Mon, 4 Nov 2013 05:40:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257607 - head/sys/dev/iwn X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Nov 2013 05:40:20 -0000 Author: adrian Date: Mon Nov 4 05:40:19 2013 New Revision: 257607 URL: http://svnweb.freebsd.org/changeset/base/257607 Log: Add device ids for the Centrino 2x00 devices. Submitted by: Cedric Gross Modified: head/sys/dev/iwn/if_iwn_devid.h Modified: head/sys/dev/iwn/if_iwn_devid.h ============================================================================== --- head/sys/dev/iwn/if_iwn_devid.h Mon Nov 4 05:18:19 2013 (r257606) +++ head/sys/dev/iwn/if_iwn_devid.h Mon Nov 4 05:40:19 2013 (r257607) @@ -41,6 +41,20 @@ * DEVICE ID BLOCK * ========================================================================== */ + +/* + * -------------------------------------------------------------------------- + * Device ID for 2x00 series + * -------------------------------------------------------------------------- + */ +#define IWN_DID_2x00_1 0x0890 +#define IWN_DID_2x00_2 0x0891 +/* SubDevice ID */ +#define IWN_SDID_2x00_1 0x4022 +#define IWN_SDID_2x00_2 0x4222 +#define IWN_SDID_2x00_3 0x4422 +#define IWN_SDID_2x00_4 0x4822 + /* * -------------------------------------------------------------------------- * Device ID for 2x30 series From owner-svn-src-head@FreeBSD.ORG Mon Nov 4 05:52:43 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 5DC304F8; Mon, 4 Nov 2013 05:52:43 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4BA432A7C; Mon, 4 Nov 2013 05:52:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA45qhFE024454; Mon, 4 Nov 2013 05:52:43 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA45qhln024453; Mon, 4 Nov 2013 05:52:43 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201311040552.rA45qhln024453@svn.freebsd.org> From: Adrian Chadd Date: Mon, 4 Nov 2013 05:52:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257613 - head/sys/dev/iwn X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Nov 2013 05:52:43 -0000 Author: adrian Date: Mon Nov 4 05:52:42 2013 New Revision: 257613 URL: http://svnweb.freebsd.org/changeset/base/257613 Log: Add Bluetooth/PAN (personal area networking) commands. Submitted by: Cedric Gross Modified: head/sys/dev/iwn/if_iwn_debug.h Modified: head/sys/dev/iwn/if_iwn_debug.h ============================================================================== --- head/sys/dev/iwn/if_iwn_debug.h Mon Nov 4 05:52:33 2013 (r257612) +++ head/sys/dev/iwn/if_iwn_debug.h Mon Nov 4 05:52:42 2013 (r257613) @@ -92,6 +92,25 @@ iwn_intr_str(uint8_t cmd) case IWN_CMD_SET_CRITICAL_TEMP: return "IWN_CMD_SET_CRITICAL_TEMP"; case IWN_CMD_SET_SENSITIVITY: return "IWN_CMD_SET_SENSITIVITY"; case IWN_CMD_PHY_CALIB: return "IWN_CMD_PHY_CALIB"; + + /* Bluetooth commands */ + case IWN_CMD_BT_COEX_PRIOTABLE: return "IWN_CMD_BT_COEX_PRIOTABLE"; + case IWN_CMD_BT_COEX_PROT: return "IWN_CMD_BT_COEX_PROT"; + case IWN_CMD_BT_COEX_NOTIF: return "IWN_CMD_BT_COEX_NOTIF"; + + /* PAN commands */ + case IWN_CMD_WIPAN_PARAMS: return "IWN_CMD_WIPAN_PARAMS"; + case IWN_CMD_WIPAN_RXON: return "IWN_CMD_WIPAN_RXON"; + case IWN_CMD_WIPAN_RXON_TIMING: return "IWN_CMD_WIPAN_RXON_TIMING"; + case IWN_CMD_WIPAN_RXON_ASSOC: return "IWN_CMD_WIPAN_RXON_ASSOC"; + case IWN_CMD_WIPAN_QOS_PARAM: return "IWN_CMD_WIPAN_QOS_PARAM"; + case IWN_CMD_WIPAN_WEPKEY: return "IWN_CMD_WIPAN_WEPKEY"; + case IWN_CMD_WIPAN_P2P_CHANNEL_SWITCH: + return "IWN_CMD_WIPAN_P2P_CHANNEL_SWITCH"; + case IWN_CMD_WIPAN_NOA_NOTIFICATION: + return "IWN_CMD_WIPAN_NOA_NOTIFICATION"; + case IWN_CMD_WIPAN_DEACTIVATION_COMPLETE: + return "IWN_CMD_WIPAN_DEACTIVATION_COMPLETE"; } return "UNKNOWN INTR NOTIF/CMD"; } From owner-svn-src-head@FreeBSD.ORG Mon Nov 4 08:16:00 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id DF43362E; Mon, 4 Nov 2013 08:16:00 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B1008233C; Mon, 4 Nov 2013 08:16:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA48G0LT072039; Mon, 4 Nov 2013 08:16:00 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA48G0K7072030; Mon, 4 Nov 2013 08:16:00 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201311040816.rA48G0K7072030@svn.freebsd.org> From: Gleb Smirnoff Date: Mon, 4 Nov 2013 08:16:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257619 - head/sys/netpfil/pf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Nov 2013 08:16:01 -0000 Author: glebius Date: Mon Nov 4 08:15:59 2013 New Revision: 257619 URL: http://svnweb.freebsd.org/changeset/base/257619 Log: Remove unused PFTM_UNTIL_PACKET const. Modified: head/sys/netpfil/pf/pf.c head/sys/netpfil/pf/pf.h head/sys/netpfil/pf/pf_ioctl.c Modified: head/sys/netpfil/pf/pf.c ============================================================================== --- head/sys/netpfil/pf/pf.c Mon Nov 4 06:00:12 2013 (r257618) +++ head/sys/netpfil/pf/pf.c Mon Nov 4 08:15:59 2013 (r257619) @@ -1435,8 +1435,6 @@ pf_state_expires(const struct pf_state * /* handle all PFTM_* > PFTM_MAX here */ if (state->timeout == PFTM_PURGE) return (time_uptime); - if (state->timeout == PFTM_UNTIL_PACKET) - return (0); KASSERT(state->timeout != PFTM_UNLINKED, ("pf_state_expires: timeout == PFTM_UNLINKED")); KASSERT((state->timeout < PFTM_MAX), Modified: head/sys/netpfil/pf/pf.h ============================================================================== --- head/sys/netpfil/pf/pf.h Mon Nov 4 06:00:12 2013 (r257618) +++ head/sys/netpfil/pf/pf.h Mon Nov 4 08:15:59 2013 (r257619) @@ -68,8 +68,7 @@ enum { PFTM_TCP_FIRST_PACKET, PFTM_TCP_O PFTM_OTHER_FIRST_PACKET, PFTM_OTHER_SINGLE, PFTM_OTHER_MULTIPLE, PFTM_FRAG, PFTM_INTERVAL, PFTM_ADAPTIVE_START, PFTM_ADAPTIVE_END, PFTM_SRC_NODE, - PFTM_TS_DIFF, PFTM_MAX, PFTM_PURGE, PFTM_UNLINKED, - PFTM_UNTIL_PACKET }; + PFTM_TS_DIFF, PFTM_MAX, PFTM_PURGE, PFTM_UNLINKED }; /* PFTM default values */ #define PFTM_TCP_FIRST_PACKET_VAL 120 /* First TCP packet */ Modified: head/sys/netpfil/pf/pf_ioctl.c ============================================================================== --- head/sys/netpfil/pf/pf_ioctl.c Mon Nov 4 06:00:12 2013 (r257618) +++ head/sys/netpfil/pf/pf_ioctl.c Mon Nov 4 08:15:59 2013 (r257619) @@ -1686,8 +1686,7 @@ relock_DIOCKILLSTATES: struct pfioc_state *ps = (struct pfioc_state *)addr; struct pfsync_state *sp = &ps->state; - if (sp->timeout >= PFTM_MAX && - sp->timeout != PFTM_UNTIL_PACKET) { + if (sp->timeout >= PFTM_MAX) { error = EINVAL; break; } From owner-svn-src-head@FreeBSD.ORG Mon Nov 4 08:20:07 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 528C19C8; Mon, 4 Nov 2013 08:20:07 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4007B2369; Mon, 4 Nov 2013 08:20:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA48K70e072989; Mon, 4 Nov 2013 08:20:07 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA48K7KJ072988; Mon, 4 Nov 2013 08:20:07 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201311040820.rA48K7KJ072988@svn.freebsd.org> From: Gleb Smirnoff Date: Mon, 4 Nov 2013 08:20:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257620 - head/sys/netpfil/pf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Nov 2013 08:20:07 -0000 Author: glebius Date: Mon Nov 4 08:20:06 2013 New Revision: 257620 URL: http://svnweb.freebsd.org/changeset/base/257620 Log: Code logic of handling PFTM_PURGE into pf_find_state(). Modified: head/sys/netpfil/pf/pf.c Modified: head/sys/netpfil/pf/pf.c ============================================================================== --- head/sys/netpfil/pf/pf.c Mon Nov 4 08:15:59 2013 (r257619) +++ head/sys/netpfil/pf/pf.c Mon Nov 4 08:20:06 2013 (r257620) @@ -318,7 +318,7 @@ enum { PF_ICMP_MULTI_NONE, PF_ICMP_MULTI #define STATE_LOOKUP(i, k, d, s, pd) \ do { \ (s) = pf_find_state((i), (k), (d)); \ - if ((s) == NULL || (s)->timeout == PFTM_PURGE) \ + if ((s) == NULL) \ return (PF_DROP); \ if (PACKET_LOOPED(pd)) \ return (PF_PASS); \ @@ -1230,11 +1230,11 @@ pf_find_state(struct pfi_kif *kif, struc if (s->kif == V_pfi_all || s->kif == kif) { PF_STATE_LOCK(s); PF_HASHROW_UNLOCK(kh); - if (s->timeout == PFTM_UNLINKED) { + if (s->timeout >= PFTM_MAX) { /* - * State is being processed - * by pf_unlink_state() in - * an other thread. + * State is either being processed by + * pf_unlink_state() in an other thread, or + * is scheduled for immediate expiry. */ PF_STATE_UNLOCK(s); return (NULL); From owner-svn-src-head@FreeBSD.ORG Mon Nov 4 11:59:45 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id CEF13885; Mon, 4 Nov 2013 11:59:45 +0000 (UTC) (envelope-from jmmv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A178C20AD; Mon, 4 Nov 2013 11:59:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA4BxjU7051525; Mon, 4 Nov 2013 11:59:45 GMT (envelope-from jmmv@svn.freebsd.org) Received: (from jmmv@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA4BxjP2051523; Mon, 4 Nov 2013 11:59:45 GMT (envelope-from jmmv@svn.freebsd.org) Message-Id: <201311041159.rA4BxjP2051523@svn.freebsd.org> From: Julio Merino Date: Mon, 4 Nov 2013 11:59:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257631 - in head: share/misc usr.bin/calendar/calendars X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Nov 2013 11:59:45 -0000 Author: jmmv Date: Mon Nov 4 11:59:44 2013 New Revision: 257631 URL: http://svnweb.freebsd.org/changeset/base/257631 Log: Add myself to the committers-src list and to the calendar. Approved by: rpaulo (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 Mon Nov 4 11:48:45 2013 (r257630) +++ head/share/misc/committers-src.dot Mon Nov 4 11:59:44 2013 (r257631) @@ -190,6 +190,7 @@ jkoshy [label="A. Joseph Koshy\njkoshy@F jlh [label="Jeremie Le Hen\njlh@FreeBSD.org\n2012/04/22"] jls [label="Jordan Sissel\njls@FreeBSD.org\n2006/12/06"] jmg [label="John-Mark Gurney\njmg@FreeBSD.org\n1997/02/13"] +jmmv [label="Julio Merino\njmmv@FreeBSD.org\n2013/11/02"] joerg [label="Joerg Wunsch\njoerg@FreeBSD.org\n1993/11/14"] jon [label="Jonathan Chen\njon@FreeBSD.org\n2000/10/17"] jonathan [label="Jonathan Anderson\njonathan@FreeBSD.org\n2010/10/07"] @@ -607,6 +608,7 @@ rmacklem -> jwd rpaulo -> avg rpaulo -> bschmidt rpaulo -> dim +rpaulo -> jmmv rrs -> brucec rrs -> jchandra Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Mon Nov 4 11:48:45 2013 (r257630) +++ head/usr.bin/calendar/calendars/calendar.freebsd Mon Nov 4 11:59:44 2013 (r257631) @@ -252,6 +252,7 @@ 08/06 Damjan Marion born in Rijeka, Croatia, 1978 08/07 Jonathan Mini born in San Mateo, California, United States, 1979 08/08 Mikolaj Golub born in Kharkov, USSR, 1977 +08/10 Julio Merino born in Barcelona, Spain, 1984 08/10 Peter Pentchev born in Sofia, Bulgaria, 1977 08/12 Joe Marcus Clarke born in Lakeland, Florida, United States, 1976 08/12 Max Brazhnikov born in Leningradskaya, Russian Federation, 1979 From owner-svn-src-head@FreeBSD.ORG Mon Nov 4 14:10:24 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 278ABAA7; Mon, 4 Nov 2013 14:10:24 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 11FFD2791; Mon, 4 Nov 2013 14:10:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA4EAOiI095913; Mon, 4 Nov 2013 14:10:24 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA4EAMmb095901; Mon, 4 Nov 2013 14:10:22 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201311041410.rA4EAMmb095901@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Mon, 4 Nov 2013 14:10:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257633 - in head: lib/libc/capability lib/libc/gen lib/libc/sys share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Nov 2013 14:10:24 -0000 Author: pjd Date: Mon Nov 4 14:10:22 2013 New Revision: 257633 URL: http://svnweb.freebsd.org/changeset/base/257633 Log: - Add manual pages for capability rights (rights(4)), cap_rights_init(3) family of functions and cap_rights_get(3) function. - Update remaining Capsicum-related manual pages. Reviewed by: bdrewery MFC after: 3 days Added: head/lib/libc/capability/cap_rights_init.3 (contents, props changed) head/lib/libc/gen/cap_rights_get.3 (contents, props changed) head/share/man/man4/rights.4 (contents, props changed) Modified: head/lib/libc/capability/Makefile.inc head/lib/libc/gen/Makefile.inc head/lib/libc/sys/cap_ioctls_limit.2 head/lib/libc/sys/cap_rights_limit.2 head/share/man/man4/Makefile head/share/man/man4/capsicum.4 Modified: head/lib/libc/capability/Makefile.inc ============================================================================== --- head/lib/libc/capability/Makefile.inc Mon Nov 4 13:01:29 2013 (r257632) +++ head/lib/libc/capability/Makefile.inc Mon Nov 4 14:10:22 2013 (r257633) @@ -1,19 +1,18 @@ # $FreeBSD$ # capability sources -.PATH: ${.CURDIR}/../../sys/kern +.PATH: ${.CURDIR}/../../sys/kern ${.CURDIR}/capability SRCS+= subr_capability.c SYM_MAPS+= ${.CURDIR}/capability/Symbol.map -#MAN+= cap_rights_init.3 - -#MLINKS+=cap_rights_init.3 cap_rights_set.3 -#MLINKS+=cap_rights_init.3 cap_rights_clear.3 -#MLINKS+=cap_rights_init.3 cap_rights_is_set.3 -#MLINKS+=cap_rights_init.3 cap_rights_is_valid.3 -#MLINKS+=cap_rights_init.3 cap_rights_merge.3 -#MLINKS+=cap_rights_init.3 cap_rights_remove.3 -#MLINKS+=cap_rights_init.3 cap_rights_contains.3 +MAN+= cap_rights_init.3 +MLINKS+=cap_rights_init.3 cap_rights_set.3 +MLINKS+=cap_rights_init.3 cap_rights_clear.3 +MLINKS+=cap_rights_init.3 cap_rights_is_set.3 +MLINKS+=cap_rights_init.3 cap_rights_is_valid.3 +MLINKS+=cap_rights_init.3 cap_rights_merge.3 +MLINKS+=cap_rights_init.3 cap_rights_remove.3 +MLINKS+=cap_rights_init.3 cap_rights_contains.3 Added: head/lib/libc/capability/cap_rights_init.3 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/capability/cap_rights_init.3 Mon Nov 4 14:10:22 2013 (r257633) @@ -0,0 +1,241 @@ +.\" +.\" Copyright (c) 2013 The FreeBSD Foundation +.\" All rights reserved. +.\" +.\" This documentation was written by Pawel Jakub Dawidek under sponsorship +.\" from the FreeBSD Foundation. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd September 23, 2013 +.Dt CAP_RIGHTS_INIT 3 +.Os +.Sh NAME +.Nm cap_rights_init , +.Nm cap_rights_set , +.Nm cap_rights_clear , +.Nm cap_rights_is_set , +.Nm cap_rights_is_valid , +.Nm cap_rights_merge , +.Nm cap_rights_remove , +.Nm cap_rights_contains +.Nd manage cap_rights_t structure +.Sh LIBRARY +.Lb libc +.Sh SYNOPSIS +.In sys/capability.h +.Ft cap_rights_t * +.Fn cap_rights_init "cap_rights_t *rights" "..." +.Ft cap_rights_t * +.Fn cap_rights_set "cap_rights_t *rights" "..." +.Ft cap_rights_t * +.Fn cap_rights_clear "cap_rights_t *rights" "..." +.Ft bool +.Fn cap_rights_is_set "const cap_rights_t *rights" "..." +.Ft bool +.Fn cap_rights_is_valid "const cap_rights_t *rights" +.Ft cap_rights_t * +.Fn cap_rights_merge "cap_rights_t *dst" "const cap_rights_t *src" +.Ft cap_rights_t * +.Fn cap_rights_remove "cap_rights_t *dst" "const cap_rights_t *src" +.Ft bool +.Fn cap_rights_contains "const cap_rights_t *big" "const cap_rights_t *little" +.Sh DESCRIPTION +The functions documented here allow to manage the +.Vt cap_rights_t +structure. +.Pp +Capability rights should be separated with comma when passed to the +.Fn cap_rights_init , +.Fn cap_rights_set , +.Fn cap_rights_clear +and +.Fn cap_rights_is_set +functions. +For example: +.Bd -literal +cap_rights_set(&rights, CAP_READ, CAP_WRITE, CAP_FSTAT, CAP_SEEK); +.Ed +.Pp +The complete list of the capability rights can be found in the +.Xr rights 4 +manual page. +.Pp +The +.Fn cap_rights_init +function initialize provided +.Vt cap_rights_t +structure. +Only properly initialized structure can be passed to the remaining functions. +For convenience the structure can be filled with capability rights instead of +calling the +.Fn cap_rights_set +function later. +For even more convenience pointer to the given structure is returned, so it can +be directly passed to +.Xr cap_rights_limit 2 : +.Bd -literal +cap_rights_t rights; + +if (cap_rights_limit(fd, cap_rights_init(&rights, CAP_READ, CAP_WRITE)) < 0) + err(1, "Unable to limit capability rights"); +.Ed +.Pp +The +.Fn cap_rights_set +function adds the given capability rights to the given +.Vt cap_rights_t +structure. +.Pp +The +.Fn cap_rights_clear +function removes the given capability rights from the given +.Vt cap_rights_t +structure. +.Pp +The +.Fn cap_rights_is_set +function checks if all the given capability rights are set for the given +.Vt cap_rights_t +structure. +.Pp +The +.Fn cap_rights_is_valid +function verifies if the given +.Vt cap_rights_t +structure is valid. +.Pp +The +.Fn cap_rights_merge +function merges all capability rights present in the +.Fa src +structure into the +.Fa dst +structure. +.Pp +The +.Fn cap_rights_remove +function removes all capability rights present in the +.Fa src +structure from the +.Fa dst +structure. +.Pp +The +.Fn cap_rights_contains +function checks if the +.Fa big +structure contains all capability rights present in the +.Fa little +structure. +.Sh RETURN VALUES +The functions never fail. +In case an invalid capability right or an invalid +.Vt cap_rights_t +structure is given as an argument, the program will be aborted. +.Pp +The +.Fn cap_rights_init , +.Fn cap_rights_set +and +.Fn cap_rights_clear +functions return pointer to the +.Vt cap_rights_t +structure given in the +.Fa rights +argument. +.Pp +The +.Fn cap_rights_merge +and +.Fn cap_rights_remove +functions return pointer to the +.Vt cap_rights_t +structure given in the +.Fa dst +argument. +.Pp +The +.Fn cap_rights_is_set +returns +.Va true +if all the given capability rights are set in the +.Fa rights +argument. +.Pp +The +.Fn cap_rights_is_valid +function performs various checks to see if the given +.Vt cap_rights_t +structure is valid and returns +.Va true +if it is. +.Pp +The +.Fn cap_rights_contains +function returns +.Va true +if all capability rights set in the +.Fa little +structure are also present in the +.Fa big +structure. +.Sh EXAMPLES +The following example demonstrates how to prepare a +.Vt cap_rights_t +structure to be passed to the +.Xr cap_rights_limit 2 +system call. +.Bd -literal +cap_rights_t rights; +int fd; + +fd = open("/tmp/foo", O_RDWR); +if (fd < 0) + err(1, "open() failed"); + +cap_rights_init(&rights, CAP_FSTAT, CAP_READ); + +if (allow_write_and_seek) + cap_rights_set(&rights, CAP_WRITE, CAP_SEEK); + +if (dont_allow_seek) + cap_rights_clear(&rights, CAP_SEEK); + +if (cap_rights_limit(fd, &rights) < 0 && errno != ENOSYS) + err(1, "cap_rights_limit() failed"); +.Ed +.Sh SEE ALSO +.Xr cap_rights_limit 2 , +.Xr open 2 , +.Xr capsicum 4 , +.Xr rights 4 +.Sh HISTORY +Support for capabilities and capabilities mode was developed as part of the +.Tn TrustedBSD +Project. +.Sh AUTHORS +This family of functions was created by +.An Pawel Jakub Dawidek Aq pawel@dawidek.net +under sponsorship from the FreeBSD Foundation. Modified: head/lib/libc/gen/Makefile.inc ============================================================================== --- head/lib/libc/gen/Makefile.inc Mon Nov 4 13:01:29 2013 (r257632) +++ head/lib/libc/gen/Makefile.inc Mon Nov 4 14:10:22 2013 (r257633) @@ -170,6 +170,7 @@ SYM_MAPS+=${.CURDIR}/gen/Symbol.map MAN+= alarm.3 \ arc4random.3 \ basename.3 \ + cap_rights_get.3 \ cap_sandboxed.3 \ check_utility_compat.3 \ clock.3 \ Added: head/lib/libc/gen/cap_rights_get.3 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/gen/cap_rights_get.3 Mon Nov 4 14:10:22 2013 (r257633) @@ -0,0 +1,119 @@ +.\" +.\" Copyright (c) 2013 The FreeBSD Foundation +.\" All rights reserved. +.\" +.\" This documentation was written by Pawel Jakub Dawidek under sponsorship +.\" from the FreeBSD Foundation. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd September 23, 2013 +.Dt CAP_RIGHTS_GET 3 +.Os +.Sh NAME +.Nm cap_rights_get +.Nd obtain capability rights +.Sh LIBRARY +.Lb libc +.Sh SYNOPSIS +.In sys/capability.h +.Ft int +.Fn cap_rights_get "int fd" "cap_rights_t *rights" +.Sh DESCRIPTION +The +.Nm cap_rights_get +function allows to obtain current capability rights for the given descriptor. +The function will fill the +.Fa rights +argument with all capability rights if they were not limited or capability +rights configured during the last successful call of +.Xr cap_rights_limit 2 +on the given descriptor. +.Pp +The +.Fa rights +argument can be inspected using +.Xr cap_rights_init 3 +family of functions. +.Pp +The complete list of the capability rights can be found in the +.Xr rights 4 +manual page. +.Sh RETURN VALUES +.Rv -std +.Sh EXAMPLES +The following example demonstrates how to limit file descriptor capability +rights and how to obtain them. +.Bd -literal +cap_rights_t setrights, getrights; +int fd; + +memset(&setrights, 0, sizeof(setrights)); +memset(&getrights, 0, sizeof(getrights)); + +fd = open("/tmp/foo", O_RDONLY); +if (fd < 0) + err(1, "open() failed"); + +cap_rights_init(&setrights, CAP_FSTAT, CAP_READ); +if (cap_rights_limit(fd, &setrights) < 0 && errno != ENOSYS) + err(1, "cap_rights_limit() failed"); + +if (cap_rights_get(fd, &getrights) < 0 && errno != ENOSYS) + err(1, "cap_rights_get() failed"); + +assert(memcmp(&setrights, &getrights, sizeof(setrights)) == 0); +.Ed +.Sh ERRORS +.Fn cap_rights_get +succeeds unless: +.Bl -tag -width Er +.It Bq Er EBADF +The +.Fa fd +argument is not a valid active descriptor. +.It Bq Er EFAULT +The +.Fa rights +argument points at an invalid address. +.El +.Sh SEE ALSO +.Xr cap_rights_limit 2 , +.Xr cap_rights_init 3 , +.Xr errno 2 , +.Xr open 2 , +.Xr assert 3 , +.Xr err 3 , +.Xr memcmp 3 , +.Xr memset 3 , +.Xr capsicum 4 , +.Xr rights 4 +.Sh HISTORY +Support for capabilities and capabilities mode was developed as part of the +.Tn TrustedBSD +Project. +.Sh AUTHORS +This function was created by +.An Pawel Jakub Dawidek Aq pawel@dawidek.net +under sponsorship of the FreeBSD Foundation. Modified: head/lib/libc/sys/cap_ioctls_limit.2 ============================================================================== --- head/lib/libc/sys/cap_ioctls_limit.2 Mon Nov 4 13:01:29 2013 (r257632) +++ head/lib/libc/sys/cap_ioctls_limit.2 Mon Nov 4 14:10:22 2013 (r257633) @@ -58,7 +58,7 @@ argument is an array of commands and the .Fa ncmds argument specifies the number of elements in the array. -There might be up to +There can be up to .Va 256 elements in the array. .Pp @@ -92,7 +92,7 @@ system call was never called for this fi .Fn cap_ioctls_get system call will return .Dv CAP_IOCTLS_ALL -and won't modify the buffer pointed out by the +and won't modify the buffer pointed to by the .Fa cmds argument. .Sh RETURN VALUES @@ -100,7 +100,7 @@ argument. .Pp The .Fn cap_ioctls_get -function, if successfull, returns the total number of allowed ioctl commands or +function, if successful, returns the total number of allowed ioctl commands or the value .Dv CAP_IOCTLS_ALL if all ioctls commands are allowed. Modified: head/lib/libc/sys/cap_rights_limit.2 ============================================================================== --- head/lib/libc/sys/cap_rights_limit.2 Mon Nov 4 13:01:29 2013 (r257632) +++ head/lib/libc/sys/cap_rights_limit.2 Mon Nov 4 14:10:22 2013 (r257633) @@ -36,19 +36,18 @@ .Dt CAP_RIGHTS_LIMIT 2 .Os .Sh NAME -.Nm cap_rights_limit , -.Nm cap_rights_get -.Nd manage capability rights +.Nm cap_rights_limit +.Nd limit capability rights .Sh LIBRARY .Lb libc .Sh SYNOPSIS .In sys/capability.h .Ft int -.Fn cap_rights_limit "int fd" "cap_rights_t rights" -.Ft int -.Fn cap_rights_get "int fd" "cap_rights_t *rightsp" +.Fn cap_rights_limit "int fd" "const cap_rights_t *rights" .Sh DESCRIPTION When a file descriptor is created by a function such as +.Xr accept 2 , +.Xr accept4 2 , .Xr fhopen 2 , .Xr kqueue 2 , .Xr mq_open 2 , @@ -57,7 +56,7 @@ When a file descriptor is created by a f .Xr pdfork 2 , .Xr pipe 2 , .Xr shm_open 2 , -.Xr socket 2 , +.Xr socket 2 or .Xr socketpair 2 , it is assigned all capability rights. @@ -68,429 +67,48 @@ Once capability rights are reduced, oper limited to those permitted by .Fa rights . .Pp -A bitmask of capability rights assigned to a file descriptor can be obtained with -the -.Fn cap_rights_get -system call. -.Sh RIGHTS -The following rights may be specified in a rights mask: -.Bl -tag -width CAP_EXTATTR_DELETE -.It Dv CAP_ACCEPT -Permit -.Xr accept 2 -and -.Xr accept4 2 . -.It Dv CAP_ACL_CHECK -Permit checking of an ACL on a file descriptor; there is no cross-reference -for this system call. -.It Dv CAP_ACL_DELETE -Permit -.Xr acl_delete_fd_np 3 . -.It Dv CAP_ACL_GET -Permit -.Xr acl_get_fd 3 -and -.Xr acl_get_fd_np 3 . -.It Dv CAP_ACL_SET -Permit -.Xr acl_set_fd 3 -and -.Xr acl_set_fd_np 3 . -.It Dv CAP_BIND -Permit -.Xr bind 2 . -Note that sockets can also become bound implicitly as a result of -.Xr connect 2 -or -.Xr send 2 , -and that socket options set with -.Xr setsockopt 2 -may also affect binding behavior. -.It Dv CAP_BINDAT -Permit -.Xr bindat 2 . -This right has to be present on the directory descriptor. -.It Dv CAP_CONNECT -Permit -.Xr connect 2 ; -also required for -.Xr sendto 2 -with a non-NULL destination address. -.It Dv CAP_CONNECTAT -Permit -.Xr connectat 2 . -This right has to be present on the directory descriptor. -.It Dv CAP_CREATE -Permit -.Xr openat 2 -with the -.Dv O_CREAT -flag. -.\" XXXPJD: Doesn't exist anymore. -.It Dv CAP_EVENT -Permit -.Xr select 2 , -.Xr poll 2 , -and -.Xr kevent 2 -to be used in monitoring the file descriptor for events. -.It Dv CAP_FEXECVE -Permit -.Xr fexecve 2 -and -.Xr openat 2 -with the -.Dv O_EXEC -flag; -.Dv CAP_READ -will also be required. -.It Dv CAP_EXTATTR_DELETE -Permit -.Xr extattr_delete_fd 2 . -.It Dv CAP_EXTATTR_GET -Permit -.Xr extattr_get_fd 2 . -.It Dv CAP_EXTATTR_LIST -Permit -.Xr extattr_list_fd 2 . -.It Dv CAP_EXTATTR_SET -Permit -.Xr extattr_set_fd 2 . -.It Dv CAP_FCHDIR -Permit -.Xr fchdir 2 . -.It Dv CAP_FCHFLAGS -Permit -.Xr fchflags 2 -and -.Xr chflagsat 2 . -.It Dv CAP_CHFLAGSAT -An alias to -.Dv CAP_FCHFLAGS . -.It Dv CAP_FCHMOD -Permit -.Xr fchmod 2 -and -.Xr fchmodat 2 . -.It Dv CAP_FCHMODAT -An alias to -.Dv CAP_FCHMOD . -.It Dv CAP_FCHOWN -Permit -.Xr fchown 2 -and -.Xr fchownat 2 . -.It Dv CAP_FCHOWNAT -An alias to -.Dv CAP_FCHOWN . -.It Dv CAP_FCNTL -Permit -.Xr fcntl 2 . -Note that only the -.Dv F_GETFL , -.Dv F_SETFL , -.Dv F_GETOWN -and -.Dv F_SETOWN -commands require this capability right. -Also note that the list of permitted commands can be further limited with the -.Xr cap_fcntls_limit 2 -system call. -.It Dv CAP_FLOCK -Permit -.Xr flock 2 , -.Xr fcntl 2 -(with -.Dv F_GETLK , -.Dv F_SETLK -or -.Dv F_SETLKW -flag) and -.Xr openat 2 -(with -.Dv O_EXLOCK -or -.Dv O_SHLOCK -flag). -.It Dv CAP_FPATHCONF -Permit -.Xr fpathconf 2 . -.It Dv CAP_FSCK -Permit UFS background-fsck operations on the descriptor. -.It Dv CAP_FSTAT -Permit -.Xr fstat 2 -and -.Xr fstatat 2 . -.It Dv CAP_FSTATAT -An alias to -.Dv CAP_FSTAT . -.It Dv CAP_FSTATFS -Permit -.Xr fstatfs 2 . -.It Dv CAP_FSYNC -Permit -.Xr aio_fsync 2 , -.Xr fsync 2 -and -.Xr openat 2 -with -.Dv O_FSYNC -or -.Dv O_SYNC -flag. -.It Dv CAP_FTRUNCATE -Permit -.Xr ftruncate 2 -and -.Xr openat 2 -with the -.Dv O_TRUNC -flag. -.It Dv CAP_FUTIMES -Permit -.Xr futimes 2 -and -.Xr futimesat 2 . -.It Dv CAP_FUTIMESAT -An alias to -.Dv CAP_FUTIMES . -.It Dv CAP_GETPEERNAME -Permit -.Xr getpeername 2 . -.It Dv CAP_GETSOCKNAME -Permit -.Xr getsockname 2 . -.It Dv CAP_GETSOCKOPT -Permit -.Xr getsockopt 2 . -.It Dv CAP_IOCTL -Permit -.Xr ioctl 2 . -Be aware that this system call has enormous scope, including potentially -global scope for some objects. -The list of permitted ioctl commands can be further limited with the -.Xr cap_ioctls_limit 2 -system call. -.\" XXXPJD: Doesn't exist anymore. -.It Dv CAP_KEVENT -Permit -.Xr kevent 2 ; -.Dv CAP_EVENT -is also required on file descriptors that will be monitored using -.Xr kevent 2 . -.It Dv CAP_LINKAT -Permit -.Xr linkat 2 -and -.Xr renameat 2 . -This right is required for the destination directory descriptor. -.It Dv CAP_LISTEN -Permit -.Xr listen 2 ; -not much use (generally) without -.Dv CAP_BIND . -.It Dv CAP_LOOKUP -Permit the file descriptor to be used as a starting directory for calls such as -.Xr linkat 2 , -.Xr openat 2 , -and -.Xr unlinkat 2 . -.It Dv CAP_MAC_GET -Permit -.Xr mac_get_fd 3 . -.It Dv CAP_MAC_SET -Permit -.Xr mac_set_fd 3 . -.It Dv CAP_MKDIRAT -Permit -.Xr mkdirat 2 . -.It Dv CAP_MKFIFOAT -Permit -.Xr mkfifoat 2 . -.It Dv CAP_MKNODAT -Permit -.Xr mknodat 2 . -.It Dv CAP_MMAP -Permit -.Xr mmap 2 -with the -.Dv PROT_NONE -protection. -.It Dv CAP_MMAP_R -Permit -.Xr mmap 2 -with the -.Dv PROT_READ -protection. -This also implies -.Dv CAP_READ -and -.Dv CAP_SEEK -rights. -.It Dv CAP_MMAP_W -Permit -.Xr mmap 2 -with the -.Dv PROT_WRITE -protection. -This also implies -.Dv CAP_WRITE -and -.Dv CAP_SEEK -rights. -.It Dv CAP_MMAP_X -Permit -.Xr mmap 2 -with the -.Dv PROT_EXEC -protection. -This also implies -.Dv CAP_SEEK -right. -.It Dv CAP_MMAP_RW -Implies -.Dv CAP_MMAP_R -and -.Dv CAP_MMAP_W . -.It Dv CAP_MMAP_RX -Implies -.Dv CAP_MMAP_R -and -.Dv CAP_MMAP_X . -.It Dv CAP_MMAP_WX -Implies -.Dv CAP_MMAP_W -and -.Dv CAP_MMAP_X . -.It Dv CAP_MMAP_RWX -Implies -.Dv CAP_MMAP_R , -.Dv CAP_MMAP_W -and -.Dv CAP_MMAP_X . -.It Dv CAP_PDGETPID -Permit -.Xr pdgetpid 2 . -.It Dv CAP_PDKILL -Permit -.Xr pdkill 2 . -.It Dv CAP_PDWAIT -Permit -.Xr pdwait4 2 . -.It Dv CAP_PEELOFF -Permit -.Xr sctp_peeloff 2 . -.\" XXXPJD: Not documented. -.It Dv CAP_POLL_EVENT -.\" XXXPJD: Not documented. -.It Dv CAP_POST_EVENT -.It Dv CAP_PREAD -Implies -.Dv CAP_SEEK -and -.Dv CAP_READ . -.It Dv CAP_PWRITE -Implies -.Dv CAP_SEEK -and -.Dv CAP_WRITE . -.It Dv CAP_READ -Allow -.Xr aio_read 2 , -.Xr openat -with the -.Dv O_RDONLY flag, -.Xr read 2 , -.Xr recv 2 , -.Xr recvfrom 2 , -.Xr recvmsg 2 -and related system calls. -.It Dv CAP_RECV -An alias to -.Dv CAP_READ . -.It Dv CAP_RENAMEAT -Permit -.Xr renameat 2 . -This right is required for the source directory descriptor. -.It Dv CAP_SEEK -Permit operations that seek on the file descriptor, such as -.Xr lseek 2 , -but also required for I/O system calls that can read or write at any position -in the file, such as -.Xr pread 2 -and -.Xr pwrite 2 . -.It Dv CAP_SEM_GETVALUE -Permit -.Xr sem_getvalue 3 . -.It Dv CAP_SEM_POST -Permit -.Xr sem_post 3 . -.It Dv CAP_SEM_WAIT -Permit -.Xr sem_wait 3 -and -.Xr sem_trywait 3 . -.It Dv CAP_SEND -An alias to -.Dv CAP_WRITE . -.It Dv CAP_SETSOCKOPT -Permit -.Xr setsockopt 2 ; -this controls various aspects of socket behavior and may affect binding, -connecting, and other behaviors with global scope. -.It Dv CAP_SHUTDOWN -Permit explicit -.Xr shutdown 2 ; -closing the socket will also generally shut down any connections on it. -.It Dv CAP_SYMLINKAT -Permit -.Xr symlinkat 2 . -.It Dv CAP_TTYHOOK -Allow configuration of TTY hooks, such as -.Xr snp 4 , -on the file descriptor. -.It Dv CAP_UNLINKAT -Permit -.Xr unlinkat 2 -and -.Xr renameat 2 . -This right is only required for -.Xr renameat 2 -on the destination directory descriptor if the destination object already -exists and will be removed by the rename. -.It Dv CAP_WRITE -Allow -.Xr aio_write 2 , -.Xr openat 2 -with -.Dv O_WRONLY -and -.Dv O_APPEND -flags, -.Xr send 2 , -.Xr sendmsg 2 , -.Xr sendto 2 , -.Xr write 2 , -and related system calls. -For -.Xr sendto 2 -with a non-NULL connection address, -.Dv CAP_CONNECT -is also required. -For -.Xr openat 2 -with the -.Dv O_WRONLY -flag, but without the -.Dv O_APPEND -flag, -.Dv CAP_SEEK -is also required. -.El +The +.Fa rights +argument should be prepared using +.Xr cap_rights_init 3 +family of functions. +.Pp +Capability rights assigned to a file descriptor can be obtained with the +.Xr cap_rights_get 3 +function. +.Pp +The complete list of the capability rights can be found in the +.Xr rights 4 +manual page. .Sh RETURN VALUES .Rv -std +.Sh EXAMPLES +The following example demonstrates how to limit file descriptor capability +rights to allow reading only. +.Bd -literal +cap_rights_t rights; +char buf[1]; +int fd; + +fd = open("/tmp/foo", O_RDWR); +if (fd < 0) + err(1, "open() failed"); + +if (cap_enter() < 0) + err(1, "cap_enter() failed"); + +cap_rights_init(&setrights, CAP_READ); +if (cap_rights_limit(fd, &setrights) < 0) + err(1, "cap_rights_limit() failed"); + +buf[0] = 'X'; + +if (write(fd, buf, sizeof(buf)) > 0) + errx(1, "write() succeeded!"); + +if (read(fd, buf, sizeof(buf)) < 0) + err(1, "read() failed"); +.Ed .Sh ERRORS .Fn cap_rights_limit succeeds unless: @@ -503,106 +121,32 @@ argument is not a valid active descripto An invalid right has been requested in .Fa rights . .It Bq Er ENOTCAPABLE -.Fa rights -contains requested rights not present in the current rights mask associated -with the given file descriptor. -.El -.Pp -.Fn cap_rights_get -succeeds unless: -.Bl -tag -width Er -.It Bq Er EBADF The -.Fa fd -argument is not a valid active descriptor. -.It Bq Er EFAULT -The -.Fa rightsp -argument points at an invalid address. +.Fa rights +argument contains capability rights not present for the given file descriptor. +Capability rights list can only be reduced, never expanded. .El .Sh SEE ALSO .Xr accept 2 , -.Xr aio_fsync 2 , -.Xr aio_read 2 , -.Xr aio_write 2 , -.Xr bind 2 , -.Xr bindat 2 , +.Xr accept4 2 , .Xr cap_enter 2 , -.Xr cap_fcntls_limit 2 , -.Xr cap_ioctls_limit 2 , -.Xr cap_rights_limit 2 , -.Xr connect 2 , -.Xr connectat 2 , -.Xr dup 2 , -.Xr dup2 2 , -.Xr extattr_delete_fd 2 , -.Xr extattr_get_fd 2 , -.Xr extattr_list_fd 2 , -.Xr extattr_set_fd 2 , -.Xr fchflags 2 , -.Xr fchown 2 , -.Xr fcntl 2 , -.Xr fexecve 2 , .Xr fhopen 2 , -.Xr flock 2 , -.Xr fpathconf 2 , -.Xr fstat 2 , -.Xr fstatfs 2 , -.Xr fsync 2 , -.Xr ftruncate 2 , -.Xr futimes 2 , -.Xr getpeername 2 , -.Xr getsockname 2 , *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Mon Nov 4 15:49:37 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 7AACC856; Mon, 4 Nov 2013 15:49:37 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3F79F2E93; Mon, 4 Nov 2013 15:49:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA4Fnbqq030498; Mon, 4 Nov 2013 15:49:37 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA4Fna1q030494; Mon, 4 Nov 2013 15:49:36 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201311041549.rA4Fna1q030494@svn.freebsd.org> From: Hiroki Sato Date: Mon, 4 Nov 2013 15:49:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257636 - in head/share/i18n: csmapper/JIS esdb/EUC X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Nov 2013 15:49:37 -0000 Author: hrs Date: Mon Nov 4 15:49:36 2013 New Revision: 257636 URL: http://svnweb.freebsd.org/changeset/base/257636 Log: Fix EUC ESDB and JIS CS-mapper. This also fixes an identity transformation by "cat foo.euc-jp | iconv -f euc-jp -t utf-8 | iconv -f utf-8 -t euc-jp". Modified: head/share/i18n/csmapper/JIS/JISX0201-KANA%UCS.src head/share/i18n/csmapper/JIS/JISX0208@1990%UCS.src head/share/i18n/csmapper/JIS/UCS%JISX0201-KANA.src head/share/i18n/csmapper/JIS/UCS%JISX0208@1990.src head/share/i18n/csmapper/JIS/charset.pivot.JIS.src head/share/i18n/csmapper/JIS/mapper.dir.JIS.src head/share/i18n/esdb/EUC/EUC-JP.src Modified: head/share/i18n/csmapper/JIS/JISX0201-KANA%UCS.src ============================================================================== --- head/share/i18n/csmapper/JIS/JISX0201-KANA%UCS.src Mon Nov 4 14:24:57 2013 (r257635) +++ head/share/i18n/csmapper/JIS/JISX0201-KANA%UCS.src Mon Nov 4 15:49:36 2013 (r257636) @@ -3,7 +3,7 @@ TYPE ROWCOL NAME JISX0201-KANA/UCS -SRC_ZONE 0x00-0xDF +SRC_ZONE 0x21-0x5F OOB_MODE ILSEQ DST_ILSEQ 0xFFFE DST_UNIT_BITS 16 @@ -62,10 +62,67 @@ BEGIN_MAP # The entries are in JIS order # # -0x00 - 0x5B = 0x0000 - -0x5C = 0x00A5 -0x5D - 0x7D = 0x005D - -0x7E = 0x203E -0x7F = 0x007F -0xA1 - 0xDF = 0xFF61 - +0x21 = 0xFF61 +0x22 = 0xFF62 +0x23 = 0xFF63 +0x24 = 0xFF64 +0x25 = 0xFF65 +0x26 = 0xFF66 +0x27 = 0xFF67 +0x28 = 0xFF68 +0x29 = 0xFF69 +0x2A = 0xFF6A +0x2B = 0xFF6B +0x2C = 0xFF6C +0x2D = 0xFF6D +0x2E = 0xFF6E +0x2F = 0xFF6F +0x30 = 0xFF70 +0x31 = 0xFF71 +0x32 = 0xFF72 +0x33 = 0xFF73 +0x34 = 0xFF74 +0x35 = 0xFF75 +0x36 = 0xFF76 +0x37 = 0xFF77 +0x38 = 0xFF78 +0x39 = 0xFF79 +0x3A = 0xFF7A +0x3B = 0xFF7B +0x3C = 0xFF7C +0x3D = 0xFF7D +0x3E = 0xFF7E +0x3F = 0xFF7F +0x40 = 0xFF80 +0x41 = 0xFF81 +0x42 = 0xFF82 +0x43 = 0xFF83 +0x44 = 0xFF84 +0x45 = 0xFF85 +0x46 = 0xFF86 +0x47 = 0xFF87 +0x48 = 0xFF88 +0x49 = 0xFF89 +0x4A = 0xFF8A +0x4B = 0xFF8B +0x4C = 0xFF8C +0x4D = 0xFF8D +0x4E = 0xFF8E +0x4F = 0xFF8F +0x50 = 0xFF90 +0x51 = 0xFF91 +0x52 = 0xFF92 +0x53 = 0xFF93 +0x54 = 0xFF94 +0x55 = 0xFF95 +0x56 = 0xFF96 +0x57 = 0xFF97 +0x58 = 0xFF98 +0x59 = 0xFF99 +0x5A = 0xFF9A +0x5B = 0xFF9B +0x5C = 0xFF9C +0x5D = 0xFF9D +0x5E = 0xFF9E +0x5F = 0xFF9F END_MAP Modified: head/share/i18n/csmapper/JIS/JISX0208@1990%UCS.src ============================================================================== --- head/share/i18n/csmapper/JIS/JISX0208@1990%UCS.src Mon Nov 4 14:24:57 2013 (r257635) +++ head/share/i18n/csmapper/JIS/JISX0208@1990%UCS.src Mon Nov 4 15:49:36 2013 (r257636) @@ -119,7 +119,7 @@ BEGIN_MAP 0x213A = 0x3006 0x213B = 0x3007 0x213C = 0x30FC -0x213D = 0x2015 +0x213D = 0x2014 0x213E = 0x2010 0x213F = 0xFF0F 0x2140 = 0xFF3C Modified: head/share/i18n/csmapper/JIS/UCS%JISX0201-KANA.src ============================================================================== --- head/share/i18n/csmapper/JIS/UCS%JISX0201-KANA.src Mon Nov 4 14:24:57 2013 (r257635) +++ head/share/i18n/csmapper/JIS/UCS%JISX0201-KANA.src Mon Nov 4 15:49:36 2013 (r257636) @@ -3,10 +3,10 @@ TYPE ROWCOL NAME "UCS/JISX0201-KANA" -SRC_ZONE 0x0000 - 0xFFEC +SRC_ZONE 0xFF60 - 0xFF9F OOB_MODE INVALID DST_INVALID 0xFF -DST_UNIT_BITS 32 +DST_UNIT_BITS 8 BEGIN_MAP # @@ -62,1094 +62,67 @@ BEGIN_MAP # The entries are in JIS order # # - -0x0000 = 0x00 -0x0001 = 0x01 -0x0002 = 0x02 -0x0003 = 0x03 -0x0004 = 0x04 -0x0005 = 0x05 -0x0006 = 0x06 -0x0007 = 0x07 -0x0008 = 0x08 -0x0009 = 0x09 -0x000A = 0x0A -0x000B = 0x0B -0x000C = 0x0C -0x000D = 0x0D -0x000E = 0x0E -0x000F = 0x0F -0x0010 = 0x10 -0x0011 = 0x11 -0x0012 = 0x12 -0x0013 = 0x13 -0x0014 = 0x14 -0x0015 = 0x15 -0x0016 = 0x16 -0x0017 = 0x17 -0x0018 = 0x18 -0x0019 = 0x19 -0x001A = 0x1A -0x001B = 0x1B -0x001C = 0x1C -0x001D = 0x1D -0x001E = 0x1E -0x001F = 0x1F -0x0020 = 0x20 -0x0021 = 0x21 -0x0022 = 0x22 -0x0023 = 0x23 -0x0024 = 0x24 -0x0025 = 0x25 -0x0026 = 0x26 -0x0027 = 0x27 -0x0028 = 0x28 -0x0029 = 0x29 -0x002A = 0x2A -0x002B = 0x2B -0x002C = 0x2C -0x002D = 0x2D -0x002E = 0x2E -0x002F = 0x2F -0x0030 = 0x30 -0x0031 = 0x31 -0x0032 = 0x32 -0x0033 = 0x33 -0x0034 = 0x34 -0x0035 = 0x35 -0x0036 = 0x36 -0x0037 = 0x37 -0x0038 = 0x38 -0x0039 = 0x39 -0x003A = 0x3A -0x003B = 0x3B -0x003C = 0x3C -0x003D = 0x3D -0x003E = 0x3E -0x003F = 0x3F -0x0040 = 0x40 -0x0041 = 0x41 -0x0042 = 0x42 -0x0043 = 0x43 -0x0044 = 0x44 -0x0045 = 0x45 -0x0046 = 0x46 -0x0047 = 0x47 -0x0048 = 0x48 -0x0049 = 0x49 -0x004A = 0x4A -0x004B = 0x4B -0x004C = 0x4C -0x004D = 0x4D -0x004E = 0x4E -0x004F = 0x4F -0x0050 = 0x50 -0x0051 = 0x51 -0x0052 = 0x52 -0x0053 = 0x53 -0x0054 = 0x54 -0x0055 = 0x55 -0x0056 = 0x56 -0x0057 = 0x57 -0x0058 = 0x58 -0x0059 = 0x59 -0x005A = 0x5A -0x005B = 0x5B -0x005D = 0x5D -0x005E = 0x5E -0x005F = 0x5F -0x0060 = 0x60 -0x0061 = 0x61 -0x0062 = 0x62 -0x0063 = 0x63 -0x0064 = 0x64 -0x0065 = 0x65 -0x0066 = 0x66 -0x0067 = 0x67 -0x0068 = 0x68 -0x0069 = 0x69 -0x006A = 0x6A -0x006B = 0x6B -0x006C = 0x6C -0x006D = 0x6D -0x006E = 0x6E -0x006F = 0x6F -0x0070 = 0x70 -0x0071 = 0x71 -0x0072 = 0x72 -0x0073 = 0x73 -0x0074 = 0x74 -0x0075 = 0x75 -0x0076 = 0x76 -0x0077 = 0x77 -0x0078 = 0x78 -0x0079 = 0x79 -0x007A = 0x7A -0x007B = 0x7B -0x007C = 0x7C -0x007D = 0x7D -0x007F = 0x7F -0x00A0 = 0x20 -0x00A1 = 0x21 -0x00A2 = 0x63 -0x00A3 = 0x626C -0x00A5 = 0x5C -0x00A6 = 0x7C -0x00A7 = 0x5353 -0x00A8 = 0x22 -0x00A9 = 0x296328 -0x00AA = 0x61 -0x00AB = 0x3C3C -0x00AC = 0x746F6E -0x00AD = 0x2D -0x00AE = 0x295228 -0x00B0 = 0x305E -0x00B1 = 0x2D2F2B -0x00B2 = 0x325E -0x00B3 = 0x335E -0x00B4 = 0x27 -0x00B5 = 0x75 -0x00B6 = 0x50 -0x00B7 = 0x2E -0x00B8 = 0x2C -0x00B9 = 0x315E -0x00BA = 0x6F -0x00BB = 0x3E3E -0x00BF = 0x3F -0x00C0 = 0x4160 -0x00C1 = 0x4127 -0x00C2 = 0x415E -0x00C4 = 0x4122 -0x00C5 = 0x41 -0x00C6 = 0x4541 -0x00C7 = 0x43 -0x00C8 = 0x4560 -0x00C9 = 0x4527 -0x00CA = 0x455E -0x00CB = 0x4522 -0x00CC = 0x4960 -0x00CD = 0x4927 -0x00CE = 0x495E -0x00CF = 0x4922 -0x00D0 = 0x44 -0x00D2 = 0x4F60 -0x00D3 = 0x4F27 -0x00D4 = 0x4F5E -0x00D6 = 0x4F22 -0x00D7 = 0x78 -0x00D8 = 0x4F -0x00D9 = 0x5560 -0x00DA = 0x5527 -0x00DB = 0x555E -0x00DC = 0x5522 -0x00DD = 0x5927 -0x00DE = 0x6854 -0x00DF = 0x7373 -0x00E0 = 0x6160 -0x00E1 = 0x6127 -0x00E2 = 0x615E -0x00E4 = 0x6122 -0x00E5 = 0x61 -0x00E6 = 0x6561 -0x00E7 = 0x63 -0x00E8 = 0x6560 -0x00E9 = 0x6527 -0x00EA = 0x655E -0x00EB = 0x6522 -0x00EC = 0x6960 -0x00ED = 0x6927 -0x00EE = 0x695E -0x00EF = 0x6922 -0x00F0 = 0x64 -0x00F2 = 0x6F60 -0x00F3 = 0x6F27 -0x00F4 = 0x6F5E -0x00F6 = 0x6F22 -0x00F7 = 0x3A -0x00F8 = 0x6F -0x00F9 = 0x7560 -0x00FA = 0x7527 -0x00FB = 0x755E -0x00FC = 0x7522 -0x00FD = 0x7927 -0x00FE = 0x6874 -0x00FF = 0x7922 -0x0100 = 0x41 -0x0101 = 0x61 -0x0102 = 0x41 -0x0103 = 0x61 -0x0104 = 0x41 -0x0105 = 0x61 -0x0106 = 0x4327 -0x0107 = 0x6327 -0x0108 = 0x435E -0x0109 = 0x635E -0x010A = 0x43 -0x010B = 0x63 -0x010C = 0x43 -0x010D = 0x63 -0x010E = 0x44 -0x010F = 0x64 -0x0110 = 0x44 -0x0111 = 0x64 -0x0112 = 0x45 -0x0113 = 0x65 -0x0114 = 0x45 -0x0115 = 0x65 -0x0116 = 0x45 -0x0117 = 0x65 -0x0118 = 0x45 -0x0119 = 0x65 -0x011A = 0x45 -0x011B = 0x65 -0x011C = 0x475E -0x011D = 0x675E -0x011E = 0x47 -0x011F = 0x67 -0x0120 = 0x47 -0x0121 = 0x67 -0x0122 = 0x47 -0x0123 = 0x67 -0x0124 = 0x485E -0x0125 = 0x685E -0x0126 = 0x48 -0x0127 = 0x68 -0x012A = 0x49 -0x012B = 0x69 -0x012C = 0x49 -0x012D = 0x69 -0x012E = 0x49 -0x012F = 0x69 -0x0130 = 0x49 -0x0131 = 0x69 -0x0132 = 0x4A49 -0x0133 = 0x6A69 -0x0134 = 0x4A5E -0x0135 = 0x6A5E -0x0136 = 0x4B -0x0137 = 0x6B -0x0139 = 0x4C -0x013A = 0x6C -0x013B = 0x4C -0x013C = 0x6C -0x013D = 0x4C -0x013E = 0x6C -0x013F = 0x4C -0x0140 = 0x6C -0x0141 = 0x4C -0x0142 = 0x6C -0x0143 = 0x4E27 -0x0144 = 0x6E27 -0x0145 = 0x4E -0x0146 = 0x6E -0x0147 = 0x4E -0x0148 = 0x6E -0x0149 = 0x6E27 -0x014C = 0x4F -0x014D = 0x6F -0x014E = 0x4F -0x014F = 0x6F -0x0150 = 0x4F22 -0x0151 = 0x6F22 -0x0152 = 0x454F -0x0153 = 0x656F -0x0154 = 0x5227 -0x0155 = 0x7227 -0x0156 = 0x52 -0x0157 = 0x72 -0x0158 = 0x52 -0x0159 = 0x72 -0x015A = 0x5327 -0x015B = 0x7327 -0x015C = 0x535E -0x015D = 0x735E -0x015E = 0x53 -0x015F = 0x73 -0x0160 = 0x53 -0x0161 = 0x73 -0x0162 = 0x54 -0x0163 = 0x74 -0x0164 = 0x54 -0x0165 = 0x74 -0x0166 = 0x54 -0x0167 = 0x74 -0x016A = 0x55 -0x016B = 0x75 -0x016C = 0x55 -0x016D = 0x75 -0x016E = 0x55 -0x016F = 0x75 -0x0170 = 0x5522 -0x0171 = 0x7522 -0x0172 = 0x55 -0x0173 = 0x75 -0x0174 = 0x575E -0x0175 = 0x775E -0x0176 = 0x595E -0x0177 = 0x795E -0x0178 = 0x5922 -0x0179 = 0x5A27 -0x017A = 0x7A27 -0x017B = 0x5A -0x017C = 0x7A -0x017D = 0x5A -0x017E = 0x7A -0x017F = 0x73 -0x0192 = 0x66 -0x01C4 = 0x5A44 -0x01C5 = 0x7A44 -0x01C6 = 0x7A64 -0x01C7 = 0x4A4C -0x01C8 = 0x6A4C -0x01C9 = 0x6A6C -0x01CA = 0x4A4E -0x01CB = 0x6A4E -0x01CC = 0x6A6E -0x01F1 = 0x5A44 -0x01F2 = 0x7A44 -0x01F3 = 0x7A64 -0x0218 = 0x53 -0x0219 = 0x73 -0x021A = 0x54 -0x021B = 0x74 -0x02B9 = 0x27 -0x02BA = 0x2727 -0x02BB = 0x27 -0x02BC = 0x27 -0x02BD = 0x27 -0x02C6 = 0x5E -0x02C8 = 0x27 -0x02CA = 0x27 -0x02CB = 0x60 -0x02CD = 0x5F -0x02DD = 0x22 -0x1E02 = 0x42 -0x1E03 = 0x62 -0x1E0A = 0x44 -0x1E0B = 0x64 -0x1E1E = 0x46 -0x1E1F = 0x66 -0x1E40 = 0x4D -0x1E41 = 0x6D -0x1E56 = 0x50 -0x1E57 = 0x70 -0x1E60 = 0x53 -0x1E61 = 0x73 -0x1E6A = 0x54 -0x1E6B = 0x74 -0x1E80 = 0x5760 -0x1E81 = 0x7760 -0x1E82 = 0x5727 -0x1E83 = 0x7727 -0x1E84 = 0x5722 -0x1E85 = 0x7722 -0x1EF2 = 0x5960 -0x1EF3 = 0x7960 -0x2002 = 0x20 -0x2003 = 0x20 -0x2004 = 0x20 -0x2005 = 0x20 -0x2006 = 0x20 -0x2008 = 0x20 -0x2009 = 0x20 -0x200A = 0x20 -0x2010 = 0x2D -0x2011 = 0x2D -0x2012 = 0x2D -0x2013 = 0x2D -0x2014 = 0x2D -0x2015 = 0x2D -0x2018 = 0x27 -0x2019 = 0x27 -0x201A = 0x27 -0x201B = 0x27 -0x201C = 0x22 -0x201D = 0x22 -0x201E = 0x22 -0x201F = 0x22 -0x2020 = 0x2B -0x2022 = 0x6F -0x2024 = 0x2E -0x2025 = 0x2E2E -0x2026 = 0x2E2E2E -0x2030 = 0x6F6F2F6F -0x2032 = 0x27 -0x2033 = 0x2727 -0x2034 = 0x272727 -0x2039 = 0x3C -0x203A = 0x3E -0x203C = 0x2121 -0x203E = 0x7E -0x2044 = 0x2F -0x2047 = 0x3F3F -0x2048 = 0x213F -0x2049 = 0x3F21 -0x2057 = 0x27272727 -0x20A8 = 0x7352 -0x20AC = 0x525545 -0x2100 = 0x632F61 -0x2101 = 0x732F61 -0x2102 = 0x43 -0x2103 = 0x43305E -0x2105 = 0x6F2F63 -0x2106 = 0x752F63 -0x2109 = 0x46305E -0x210A = 0x67 -0x210B = 0x48 -0x210C = 0x48 -0x210D = 0x48 -0x210E = 0x68 -0x210F = 0x68 -0x2110 = 0x49 -0x2111 = 0x49 -0x2112 = 0x4C -0x2113 = 0x6C -0x2115 = 0x4E -0x2116 = 0x6F4E -0x2119 = 0x50 -0x211A = 0x51 -0x211B = 0x52 -0x211C = 0x52 -0x211D = 0x52 -0x2121 = 0x4C4554 -0x2122 = 0x4D54 -0x2124 = 0x5A -0x2126 = 0x6D684F -0x2128 = 0x5A -0x212C = 0x42 -0x212D = 0x43 -0x212E = 0x65 -0x212F = 0x65 -0x2130 = 0x45 -0x2131 = 0x46 -0x2133 = 0x4D -0x2134 = 0x6F -0x2139 = 0x69 -0x213B = 0x584146 -0x2145 = 0x44 -0x2146 = 0x64 -0x2147 = 0x65 -0x2148 = 0x69 -0x2149 = 0x6A -0x215F = 0x2F3120 -0x2160 = 0x49 -0x2161 = 0x4949 -0x2162 = 0x494949 -0x2163 = 0x5649 -0x2164 = 0x56 -0x2165 = 0x4956 -0x2166 = 0x494956 -0x2167 = 0x49494956 -0x2168 = 0x5849 -0x2169 = 0x58 -0x216A = 0x4958 -0x216B = 0x494958 -0x216C = 0x4C -0x216D = 0x43 -0x216E = 0x44 -0x216F = 0x4D -0x2170 = 0x69 -0x2171 = 0x6969 -0x2172 = 0x696969 -0x2173 = 0x7669 -0x2174 = 0x76 -0x2175 = 0x6976 -0x2176 = 0x696976 -0x2177 = 0x69696976 -0x2178 = 0x7869 -0x2179 = 0x78 -0x217A = 0x6978 -0x217B = 0x696978 -0x217C = 0x6C -0x217D = 0x63 -0x217E = 0x64 -0x217F = 0x6D -0x2190 = 0x2D3C -0x2191 = 0x5E -0x2192 = 0x3E2D -0x2193 = 0x56 -0x2194 = 0x3E2D3C -0x21D0 = 0x3D3C -0x21D2 = 0x3E3D -0x21D4 = 0x3E3D3C -0x2212 = 0x2D -0x2215 = 0x2F -0x2217 = 0x2A -0x2219 = 0x6F -0x2223 = 0x7C -0x2236 = 0x3A -0x2260 = 0x3D2F -0x2264 = 0x3D3C -0x2265 = 0x3D3E -0x226A = 0x3C3C -0x226B = 0x3E3E -0x22C5 = 0x2E -0x22D8 = 0x3C3C3C -0x22D9 = 0x3E3E3E -0x22EF = 0x2E2E2E -0x2408 = 0x5D53425B -0x2409 = 0x5D54485B -0x240A = 0x5D464C5B -0x240B = 0x5D54565B -0x240C = 0x5D46465B -0x240D = 0x5D52435B -0x240E = 0x5D4F535B -0x240F = 0x5D49535B -0x2419 = 0x5D4D455B -0x241C = 0x5D53465B -0x241D = 0x5D53475B -0x241E = 0x5D53525B -0x241F = 0x5D53555B -0x2420 = 0x5D50535B -0x2424 = 0x5D4C4E5B -0x2460 = 0x293128 -0x2461 = 0x293228 -0x2462 = 0x293328 -0x2463 = 0x293428 -0x2464 = 0x293528 -0x2465 = 0x293628 -0x2466 = 0x293728 -0x2467 = 0x293828 -0x2468 = 0x293928 -0x2469 = 0x29303128 -0x246A = 0x29313128 -0x246B = 0x29323128 -0x246C = 0x29333128 -0x246D = 0x29343128 -0x246E = 0x29353128 -0x246F = 0x29363128 -0x2470 = 0x29373128 -0x2471 = 0x29383128 -0x2472 = 0x29393128 -0x2473 = 0x29303228 -0x2474 = 0x293128 -0x2475 = 0x293228 -0x2476 = 0x293328 -0x2477 = 0x293428 -0x2478 = 0x293528 -0x2479 = 0x293628 -0x247A = 0x293728 -0x247B = 0x293828 -0x247C = 0x293928 -0x247D = 0x29303128 -0x247E = 0x29313128 -0x247F = 0x29323128 -0x2480 = 0x29333128 -0x2481 = 0x29343128 -0x2482 = 0x29353128 -0x2483 = 0x29363128 -0x2484 = 0x29373128 -0x2485 = 0x29383128 -0x2486 = 0x29393128 -0x2487 = 0x29303228 -0x2488 = 0x2E31 -0x2489 = 0x2E32 -0x248A = 0x2E33 -0x248B = 0x2E34 -0x248C = 0x2E35 -0x248D = 0x2E36 -0x248E = 0x2E37 -0x248F = 0x2E38 -0x2490 = 0x2E39 -0x2491 = 0x2E3031 -0x2492 = 0x2E3131 -0x2493 = 0x2E3231 -0x2494 = 0x2E3331 -0x2495 = 0x2E3431 -0x2496 = 0x2E3531 -0x2497 = 0x2E3631 -0x2498 = 0x2E3731 -0x2499 = 0x2E3831 -0x249A = 0x2E3931 -0x249B = 0x2E3032 -0x249C = 0x296128 -0x249D = 0x296228 -0x249E = 0x296328 -0x249F = 0x296428 -0x24A0 = 0x296528 -0x24A1 = 0x296628 -0x24A2 = 0x296728 -0x24A3 = 0x296828 -0x24A4 = 0x296928 -0x24A5 = 0x296A28 -0x24A6 = 0x296B28 -0x24A7 = 0x296C28 -0x24A8 = 0x296D28 -0x24A9 = 0x296E28 -0x24AA = 0x296F28 -0x24AB = 0x297028 -0x24AC = 0x297128 -0x24AD = 0x297228 -0x24AE = 0x297328 -0x24AF = 0x297428 -0x24B0 = 0x297528 -0x24B1 = 0x297628 -0x24B2 = 0x297728 -0x24B3 = 0x297828 -0x24B4 = 0x297928 -0x24B5 = 0x297A28 -0x24B6 = 0x294128 -0x24B7 = 0x294228 -0x24B8 = 0x294328 -0x24B9 = 0x294428 -0x24BA = 0x294528 -0x24BB = 0x294628 -0x24BC = 0x294728 -0x24BD = 0x294828 -0x24BE = 0x294928 -0x24BF = 0x294A28 -0x24C0 = 0x294B28 -0x24C1 = 0x294C28 -0x24C2 = 0x294D28 -0x24C3 = 0x294E28 -0x24C4 = 0x294F28 -0x24C5 = 0x295028 -0x24C6 = 0x295128 -0x24C7 = 0x295228 -0x24C8 = 0x295328 -0x24C9 = 0x295428 -0x24CA = 0x295528 -0x24CB = 0x295628 -0x24CC = 0x295728 -0x24CD = 0x295828 -0x24CE = 0x295928 -0x24CF = 0x295A28 -0x24D0 = 0x296128 -0x24D1 = 0x296228 -0x24D2 = 0x296328 -0x24D3 = 0x296428 -0x24D4 = 0x296528 -0x24D5 = 0x296628 -0x24D6 = 0x296728 -0x24D7 = 0x296828 -0x24D8 = 0x296928 -0x24D9 = 0x296A28 -0x24DA = 0x296B28 -0x24DB = 0x296C28 -0x24DC = 0x296D28 -0x24DD = 0x296E28 -0x24DE = 0x296F28 -0x24DF = 0x297028 -0x24E0 = 0x297128 -0x24E1 = 0x297228 -0x24E2 = 0x297328 -0x24E3 = 0x297428 -0x24E4 = 0x297528 -0x24E5 = 0x297628 -0x24E6 = 0x297728 -0x24E7 = 0x297828 -0x24E8 = 0x297928 -0x24E9 = 0x297A28 -0x24EA = 0x293028 -0x2500 = 0x2D -0x2502 = 0x7C -0x250C = 0x2B -0x2510 = 0x2B -0x2514 = 0x2B -0x2518 = 0x2B -0x251C = 0x2B -0x2524 = 0x2B -0x252C = 0x2B -0x2534 = 0x2B -0x253C = 0x2B -0x25E6 = 0x6F -0x2A74 = 0x3D3A3A -0x2A75 = 0x3D3D -0x2A76 = 0x3D3D3D -0x3000 = 0x20 -0x30A0 = 0x3D -0x3250 = 0x455450 -0x3251 = 0x29313228 -0x3252 = 0x29323228 -0x3253 = 0x29333228 -0x3254 = 0x29343228 -0x3255 = 0x29353228 -0x3256 = 0x29363228 -0x3257 = 0x29373228 -0x3258 = 0x29383228 -0x3259 = 0x29393228 -0x325A = 0x29303328 -0x325B = 0x29313328 -0x325C = 0x29323328 -0x325D = 0x29333328 -0x325E = 0x29343328 -0x325F = 0x29353328 -0x32B1 = 0x29363328 -0x32B2 = 0x29373328 -0x32B3 = 0x29383328 -0x32B4 = 0x29393328 -0x32B5 = 0x29303428 -0x32B6 = 0x29313428 -0x32B7 = 0x29323428 -0x32B8 = 0x29333428 -0x32B9 = 0x29343428 -0x32BA = 0x29353428 -0x32BB = 0x29363428 -0x32BC = 0x29373428 -0x32BD = 0x29383428 -0x32BE = 0x29393428 -0x32BF = 0x29303528 -0x32CC = 0x6748 -0x32CD = 0x677265 -0x32CE = 0x5665 -0x32CF = 0x44544C -0x3371 = 0x615068 -0x3372 = 0x6164 -0x3373 = 0x5541 -0x3374 = 0x726162 -0x3375 = 0x566F -0x3376 = 0x6370 -0x3377 = 0x6D64 -0x3378 = 0x325E6D64 -0x3379 = 0x335E6D64 -0x337A = 0x5549 -0x3380 = 0x4170 -0x3381 = 0x416E -0x3383 = 0x416D -0x3384 = 0x416B -0x3385 = 0x424B -0x3386 = 0x424D -0x3387 = 0x4247 -0x3388 = 0x6C6163 -0x3389 = 0x6C61636B -0x338A = 0x4670 -0x338B = 0x466E -0x338E = 0x676D -0x338F = 0x676B -0x3390 = 0x7A48 -0x3391 = 0x7A486B -0x3392 = 0x7A484D -0x3393 = 0x7A4847 -0x3394 = 0x7A4854 -0x3396 = 0x6C6D -0x3397 = 0x6C64 -0x3398 = 0x6C6B -0x3399 = 0x6D66 -0x339A = 0x6D6E -0x339C = 0x6D6D -0x339D = 0x6D63 -0x339E = 0x6D6B -0x339F = 0x325E6D6D -0x33A0 = 0x325E6D63 -0x33A1 = 0x325E6D -0x33A2 = 0x325E6D6B -0x33A3 = 0x335E6D6D -0x33A4 = 0x335E6D63 -0x33A5 = 0x335E6D -0x33A6 = 0x335E6D6B -0x33A7 = 0x732F6D -0x33A9 = 0x6150 -0x33AA = 0x61506B -0x33AB = 0x61504D -0x33AC = 0x615047 -0x33AD = 0x646172 -0x33B0 = 0x7370 -0x33B1 = 0x736E -0x33B3 = 0x736D -0x33B4 = 0x5670 -0x33B5 = 0x566E -0x33B7 = 0x566D -0x33B8 = 0x566B -0x33B9 = 0x564D -0x33BA = 0x5770 -0x33BB = 0x576E -0x33BD = 0x576D -0x33BE = 0x576B -0x33BF = 0x574D -0x33C2 = 0x2E6D2E61 -0x33C3 = 0x7142 -0x33C4 = 0x6363 -0x33C5 = 0x6463 -0x33C6 = 0x676B2F43 -0x33C7 = 0x2E6F43 -0x33C8 = 0x4264 -0x33C9 = 0x7947 -0x33CA = 0x6168 -0x33CB = 0x5048 -0x33CC = 0x6E69 -0x33CD = 0x4B4B -0x33CE = 0x4D4B -0x33CF = 0x746B -0x33D0 = 0x6D6C -0x33D1 = 0x6E6C -0x33D2 = 0x676F6C -0x33D3 = 0x786C -0x33D4 = 0x626D -0x33D5 = 0x6C696D -0x33D6 = 0x6C6F6D -0x33D7 = 0x4850 -0x33D8 = 0x2E6D2E70 -0x33D9 = 0x4D5050 -0x33DA = 0x5250 -0x33DB = 0x7273 -0x33DC = 0x7653 -0x33DD = 0x6257 -0x33DE = 0x6D2F56 -0x33DF = 0x6D2F41 -0x33FF = 0x6C6167 -0xFB00 = 0x6666 -0xFB01 = 0x6966 -0xFB02 = 0x6C66 -0xFB03 = 0x696666 -0xFB04 = 0x6C6666 -0xFB05 = 0x7473 -0xFB06 = 0x7473 -0xFB29 = 0x2B -0xFE49 = 0x7E -0xFE4A = 0x7E -0xFE4B = 0x7E -0xFE4C = 0x7E -0xFE4D = 0x5F -0xFE4E = 0x5F -0xFE4F = 0x5F -0xFE50 = 0x2C -0xFE52 = 0x2E -0xFE54 = 0x3B -0xFE55 = 0x3A -0xFE56 = 0x3F -0xFE57 = 0x21 -0xFE58 = 0x2D -0xFE59 = 0x28 -0xFE5A = 0x29 -0xFE5B = 0x7B -0xFE5C = 0x7D -0xFE5F = 0x23 -0xFE60 = 0x26 -0xFE61 = 0x2A -0xFE62 = 0x2B -0xFE63 = 0x2D -0xFE64 = 0x3C -0xFE65 = 0x3E -0xFE66 = 0x3D -0xFE69 = 0x24 -0xFE6A = 0x25 -0xFE6B = 0x40 -0xFF01 = 0x21 -0xFF02 = 0x22 -0xFF03 = 0x23 -0xFF04 = 0x24 -0xFF05 = 0x25 -0xFF06 = 0x26 -0xFF07 = 0x27 -0xFF08 = 0x28 -0xFF09 = 0x29 -0xFF0A = 0x2A -0xFF0B = 0x2B -0xFF0C = 0x2C -0xFF0D = 0x2D -0xFF0E = 0x2E -0xFF0F = 0x2F -0xFF10 = 0x30 -0xFF11 = 0x31 -0xFF12 = 0x32 -0xFF13 = 0x33 -0xFF14 = 0x34 -0xFF15 = 0x35 -0xFF16 = 0x36 -0xFF17 = 0x37 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Mon Nov 4 15:55:06 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 0AF76B02; Mon, 4 Nov 2013 15:55:06 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DD1732F64; Mon, 4 Nov 2013 15:55:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA4Ft5p1033273; Mon, 4 Nov 2013 15:55:05 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA4Ft4I4033263; Mon, 4 Nov 2013 15:55:04 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201311041555.rA4Ft4I4033263@svn.freebsd.org> From: Ian Lepore Date: Mon, 4 Nov 2013 15:55:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257637 - in head: . sys/conf sys/dev/aic7xxx/aicasm sys/modules/aic7xxx sys/modules/aic7xxx/ahc sys/modules/aic7xxx/ahd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Nov 2013 15:55:06 -0000 Author: ian Date: Mon Nov 4 15:55:04 2013 New Revision: 257637 URL: http://svnweb.freebsd.org/changeset/base/257637 Log: Rework the aicasm build machinery so that it gets built along with toolchain components instead of with the kernel and/or modules. This ensures that it gets built with the host compiler, not the compiler in obj/... used to build the target components (which may be a cross-compiler outputting code for a different architecture and using header files with types and options set up for the wrong architecture). Reviewed by: imp Modified: head/Makefile.inc1 head/sys/conf/files head/sys/dev/aic7xxx/aicasm/Makefile head/sys/modules/aic7xxx/Makefile head/sys/modules/aic7xxx/ahc/Makefile head/sys/modules/aic7xxx/ahd/Makefile Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Mon Nov 4 15:49:36 2013 (r257636) +++ head/Makefile.inc1 Mon Nov 4 15:55:04 2013 (r257637) @@ -1019,20 +1019,7 @@ buildkernel: @echo "--------------------------------------------------------------" @echo ">>> stage 2.3: build tools" @echo "--------------------------------------------------------------" - cd ${KRNLOBJDIR}/${_kernel}; \ - PATH=${BPATH}:${PATH} \ - MAKESRCPATH=${KERNSRCDIR}/dev/aic7xxx/aicasm \ - ${MAKE} SSP_CFLAGS= -DNO_CPU_CFLAGS -DNO_CTF -DEARLY_BUILD \ - -f ${KERNSRCDIR}/dev/aic7xxx/aicasm/Makefile -# XXX - Gratuitously builds aicasm in the ``makeoptions NO_MODULES'' case. -.if !defined(MODULES_WITH_WORLD) && !defined(NO_MODULES) && exists(${KERNSRCDIR}/modules) -.for target in obj depend all - cd ${KERNSRCDIR}/modules/aic7xxx/aicasm; \ - PATH=${BPATH}:${PATH} \ - MAKEOBJDIRPREFIX=${KRNLOBJDIR}/${_kernel}/modules \ - ${MAKE} SSP_CFLAGS= -DNO_CPU_CFLAGS -DNO_CTF -DEARLY_BUILD ${target} -.endfor -.endif + @# Currently no special kernel tools to build. .if !defined(NO_KERNELDEPEND) @echo @echo "--------------------------------------------------------------" @@ -1319,10 +1306,6 @@ bootstrap-tools: .MAKE # # build-tools: Build special purpose build tools # -.if defined(MODULES_WITH_WORLD) && exists(${KERNSRCDIR}/modules) -_aicasm= sys/modules/aic7xxx/aicasm -.endif - .if !defined(NO_SHARE) _share= share/syscons/scrnmaps .endif @@ -1344,7 +1327,6 @@ build-tools: .MAKE lib/ncurses/ncurses \ lib/ncurses/ncursesw \ ${_share} \ - ${_aicasm} \ usr.bin/awk \ lib/libmagic \ usr.bin/mkesdb_static \ @@ -1410,7 +1392,8 @@ cross-tools: .MAKE usr.bin/xlint/lint1 usr.bin/xlint/lint2 usr.bin/xlint/xlint \ ${_btxld} \ ${_crunchide} \ - ${_kgzip} + ${_kgzip} \ + sys/dev/aic7xxx/aicasm ${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all,install)"; \ cd ${.CURDIR}/${_tool} && \ ${MAKE} DIRPRFX=${_tool}/ obj && \ Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Mon Nov 4 15:49:36 2013 (r257636) +++ head/sys/conf/files Mon Nov 4 15:55:04 2013 (r257637) @@ -9,44 +9,39 @@ acpi_quirks.h optional acpi \ compile-with "${AWK} -f $S/tools/acpi_quirks2h.awk $S/dev/acpica/acpi_quirks" \ no-obj no-implicit-rule before-depend \ clean "acpi_quirks.h" -aicasm optional ahc | ahd \ - dependency "$S/dev/aic7xxx/aicasm/*.[chyl]" \ - compile-with "CC='${CC}' ${MAKE} -f $S/dev/aic7xxx/aicasm/Makefile MAKESRCPATH=$S/dev/aic7xxx/aicasm" \ - no-obj no-implicit-rule \ - clean "aicasm* y.tab.h" aic7xxx_seq.h optional ahc \ - compile-with "./aicasm ${INCLUDES} -I$S/cam/scsi -I$S/dev/aic7xxx -o aic7xxx_seq.h -r aic7xxx_reg.h -p aic7xxx_reg_print.c -i $S/dev/aic7xxx/aic7xxx_osm.h $S/dev/aic7xxx/aic7xxx.seq" \ + compile-with "aicasm ${INCLUDES} -I$S/cam/scsi -I$S/dev/aic7xxx -o aic7xxx_seq.h -r aic7xxx_reg.h -p aic7xxx_reg_print.c -i $S/dev/aic7xxx/aic7xxx_osm.h $S/dev/aic7xxx/aic7xxx.seq" \ no-obj no-implicit-rule before-depend local \ clean "aic7xxx_seq.h" \ - dependency "$S/dev/aic7xxx/aic7xxx.{reg,seq} $S/cam/scsi/scsi_message.h aicasm" + dependency "$S/dev/aic7xxx/aic7xxx.{reg,seq} $S/cam/scsi/scsi_message.h" aic7xxx_reg.h optional ahc \ - compile-with "./aicasm ${INCLUDES} -I$S/cam/scsi -I$S/dev/aic7xxx -o aic7xxx_seq.h -r aic7xxx_reg.h -p aic7xxx_reg_print.c -i $S/dev/aic7xxx/aic7xxx_osm.h $S/dev/aic7xxx/aic7xxx.seq" \ + compile-with "aicasm ${INCLUDES} -I$S/cam/scsi -I$S/dev/aic7xxx -o aic7xxx_seq.h -r aic7xxx_reg.h -p aic7xxx_reg_print.c -i $S/dev/aic7xxx/aic7xxx_osm.h $S/dev/aic7xxx/aic7xxx.seq" \ no-obj no-implicit-rule before-depend local \ clean "aic7xxx_reg.h" \ - dependency "$S/dev/aic7xxx/aic7xxx.{reg,seq} $S/cam/scsi/scsi_message.h aicasm" + dependency "$S/dev/aic7xxx/aic7xxx.{reg,seq} $S/cam/scsi/scsi_message.h" aic7xxx_reg_print.c optional ahc \ - compile-with "./aicasm ${INCLUDES} -I$S/cam/scsi -I$S/dev/aic7xxx -o aic7xxx_seq.h -r aic7xxx_reg.h -p aic7xxx_reg_print.c -i $S/dev/aic7xxx/aic7xxx_osm.h $S/dev/aic7xxx/aic7xxx.seq" \ + compile-with "aicasm ${INCLUDES} -I$S/cam/scsi -I$S/dev/aic7xxx -o aic7xxx_seq.h -r aic7xxx_reg.h -p aic7xxx_reg_print.c -i $S/dev/aic7xxx/aic7xxx_osm.h $S/dev/aic7xxx/aic7xxx.seq" \ no-obj no-implicit-rule local \ clean "aic7xxx_reg_print.c" \ - dependency "$S/dev/aic7xxx/aic7xxx.{reg,seq} $S/cam/scsi/scsi_message.h aicasm" + dependency "$S/dev/aic7xxx/aic7xxx.{reg,seq} $S/cam/scsi/scsi_message.h" aic7xxx_reg_print.o optional ahc ahc_reg_pretty_print \ compile-with "${NORMAL_C}" \ no-implicit-rule local aic79xx_seq.h optional ahd pci \ - compile-with "./aicasm ${INCLUDES} -I$S/cam/scsi -I$S/dev/aic7xxx -o aic79xx_seq.h -r aic79xx_reg.h -p aic79xx_reg_print.c -i $S/dev/aic7xxx/aic79xx_osm.h $S/dev/aic7xxx/aic79xx.seq" \ + compile-with "aicasm ${INCLUDES} -I$S/cam/scsi -I$S/dev/aic7xxx -o aic79xx_seq.h -r aic79xx_reg.h -p aic79xx_reg_print.c -i $S/dev/aic7xxx/aic79xx_osm.h $S/dev/aic7xxx/aic79xx.seq" \ no-obj no-implicit-rule before-depend local \ clean "aic79xx_seq.h" \ - dependency "$S/dev/aic7xxx/aic79xx.{reg,seq} $S/cam/scsi/scsi_message.h aicasm" + dependency "$S/dev/aic7xxx/aic79xx.{reg,seq} $S/cam/scsi/scsi_message.h" aic79xx_reg.h optional ahd pci \ - compile-with "./aicasm ${INCLUDES} -I$S/cam/scsi -I$S/dev/aic7xxx -o aic79xx_seq.h -r aic79xx_reg.h -p aic79xx_reg_print.c -i $S/dev/aic7xxx/aic79xx_osm.h $S/dev/aic7xxx/aic79xx.seq" \ + compile-with "aicasm ${INCLUDES} -I$S/cam/scsi -I$S/dev/aic7xxx -o aic79xx_seq.h -r aic79xx_reg.h -p aic79xx_reg_print.c -i $S/dev/aic7xxx/aic79xx_osm.h $S/dev/aic7xxx/aic79xx.seq" \ no-obj no-implicit-rule before-depend local \ clean "aic79xx_reg.h" \ - dependency "$S/dev/aic7xxx/aic79xx.{reg,seq} $S/cam/scsi/scsi_message.h aicasm" + dependency "$S/dev/aic7xxx/aic79xx.{reg,seq} $S/cam/scsi/scsi_message.h" aic79xx_reg_print.c optional ahd pci \ - compile-with "./aicasm ${INCLUDES} -I$S/cam/scsi -I$S/dev/aic7xxx -o aic79xx_seq.h -r aic79xx_reg.h -p aic79xx_reg_print.c -i $S/dev/aic7xxx/aic79xx_osm.h $S/dev/aic7xxx/aic79xx.seq" \ + compile-with "aicasm ${INCLUDES} -I$S/cam/scsi -I$S/dev/aic7xxx -o aic79xx_seq.h -r aic79xx_reg.h -p aic79xx_reg_print.c -i $S/dev/aic7xxx/aic79xx_osm.h $S/dev/aic7xxx/aic79xx.seq" \ no-obj no-implicit-rule local \ clean "aic79xx_reg_print.c" \ - dependency "$S/dev/aic7xxx/aic79xx.{reg,seq} $S/cam/scsi/scsi_message.h aicasm" + dependency "$S/dev/aic7xxx/aic79xx.{reg,seq} $S/cam/scsi/scsi_message.h" aic79xx_reg_print.o optional ahd pci ahd_reg_pretty_print \ compile-with "${NORMAL_C}" \ no-implicit-rule local Modified: head/sys/dev/aic7xxx/aicasm/Makefile ============================================================================== --- head/sys/dev/aic7xxx/aicasm/Makefile Mon Nov 4 15:49:36 2013 (r257636) +++ head/sys/dev/aic7xxx/aicasm/Makefile Mon Nov 4 15:55:04 2013 (r257637) @@ -15,7 +15,7 @@ SRCS= ${GENHDRS} ${CSRCS} ${YSRCS} ${LSR CLEANFILES+= ${GENHDRS} ${YSRCS:R:C/(.*)/\1.output/g} DPADD= ${LIBL} LDADD= -ll -WARNS?= 5 +WARNS?= 0 # Correct path for kernel builds # Don't rely on the kernel's .depend file @@ -24,7 +24,7 @@ WARNS?= 5 DEPENDFILE= .depend_aicasm .endif -CFLAGS+= -I. +CFLAGS+= -I${.CURDIR} .ifdef MAKESRCPATH CFLAGS+= -I${MAKESRCPATH} .endif @@ -38,4 +38,8 @@ YFLAGS+= -t -v LFLAGS+= -d .endif +BINDIR=/usr/bin + +build-tools: ${PROG} + .include Modified: head/sys/modules/aic7xxx/Makefile ============================================================================== --- head/sys/modules/aic7xxx/Makefile Mon Nov 4 15:49:36 2013 (r257636) +++ head/sys/modules/aic7xxx/Makefile Mon Nov 4 15:55:04 2013 (r257637) @@ -1,6 +1,6 @@ # $FreeBSD$ -SUBDIR= aicasm ahc ahd +SUBDIR= ahc ahd .include Modified: head/sys/modules/aic7xxx/ahc/Makefile ============================================================================== --- head/sys/modules/aic7xxx/ahc/Makefile Mon Nov 4 15:49:36 2013 (r257636) +++ head/sys/modules/aic7xxx/ahc/Makefile Mon Nov 4 15:55:04 2013 (r257637) @@ -15,13 +15,10 @@ REG_PRINT_OPT= -p aic7xxx_reg_print.c .endif BEFORE_DEPEND = ${GENSRCS} -../aicasm/aicasm: ${.CURDIR}/../../../dev/aci7xxx/aicasm/*.[chyl] - ( cd ${.CURDIR}/../aicasm; ${MAKE} aicasm; ) - ${GENSRCS}: \ ${.CURDIR}/../../../dev/aic7xxx/aic7xxx.{reg,seq} \ - ${.CURDIR}/../../../cam/scsi/scsi_message.h ../aicasm/aicasm - ../aicasm/aicasm ${INCLUDES} -I${.CURDIR}/../../../cam/scsi \ + ${.CURDIR}/../../../cam/scsi/scsi_message.h + aicasm ${INCLUDES} -I${.CURDIR}/../../../cam/scsi \ -I${.CURDIR}/../../../dev/aic7xxx \ -o aic7xxx_seq.h -r aic7xxx_reg.h \ ${REG_PRINT_OPT} \ Modified: head/sys/modules/aic7xxx/ahd/Makefile ============================================================================== --- head/sys/modules/aic7xxx/ahd/Makefile Mon Nov 4 15:49:36 2013 (r257636) +++ head/sys/modules/aic7xxx/ahd/Makefile Mon Nov 4 15:55:04 2013 (r257637) @@ -15,13 +15,10 @@ REG_PRINT_OPT= -p aic79xx_reg_print.c .endif BEFORE_DEPEND= ${GENSRCS} -../aicasm/aicasm: ${.CURDIR}/../../../dev/aic7xxx/aicasm/*.[chyl] - ( cd ${.CURDIR}/../aicasm; ${MAKE} aicasm; ) - ${GENSRCS}: \ ${.CURDIR}/../../../dev/aic7xxx/aic79xx.{reg,seq} \ - ${.CURDIR}/../../../cam/scsi/scsi_message.h ../aicasm/aicasm - ../aicasm/aicasm ${INCLUDES} -I${.CURDIR}/../../../cam/scsi \ + ${.CURDIR}/../../../cam/scsi/scsi_message.h + aicasm ${INCLUDES} -I${.CURDIR}/../../../cam/scsi \ -I${.CURDIR}/../../../dev/aic7xxx \ -o aic79xx_seq.h -r aic79xx_reg.h \ ${REG_PRINT_OPT} \ From owner-svn-src-head@FreeBSD.ORG Mon Nov 4 16:15:43 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B02C31AE; Mon, 4 Nov 2013 16:15:43 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9DC6320A0; Mon, 4 Nov 2013 16:15:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA4GFhjU040554; Mon, 4 Nov 2013 16:15:43 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA4GFhW9040552; Mon, 4 Nov 2013 16:15:43 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201311041615.rA4GFhW9040552@svn.freebsd.org> From: Sean Bruno Date: Mon, 4 Nov 2013 16:15:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257638 - head/cddl/contrib/opensolaris/lib/libnvpair X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Nov 2013 16:15:43 -0000 Author: sbruno Date: Mon Nov 4 16:15:43 2013 New Revision: 257638 URL: http://svnweb.freebsd.org/changeset/base/257638 Log: Quiesce warning regarding %llf which has no effect. Submitted as illumos issue #4284 Reviewed by: delphij Modified: head/cddl/contrib/opensolaris/lib/libnvpair/libnvpair.c Modified: head/cddl/contrib/opensolaris/lib/libnvpair/libnvpair.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libnvpair/libnvpair.c Mon Nov 4 15:55:04 2013 (r257637) +++ head/cddl/contrib/opensolaris/lib/libnvpair/libnvpair.c Mon Nov 4 16:15:43 2013 (r257638) @@ -210,7 +210,7 @@ NVLIST_PRTFUNC(int32, int32_t, int32_t, NVLIST_PRTFUNC(uint32, uint32_t, uint32_t, "0x%x") NVLIST_PRTFUNC(int64, int64_t, longlong_t, "%lld") NVLIST_PRTFUNC(uint64, uint64_t, u_longlong_t, "0x%llx") -NVLIST_PRTFUNC(double, double, double, "0x%llf") +NVLIST_PRTFUNC(double, double, double, "0x%f") NVLIST_PRTFUNC(string, char *, char *, "%s") NVLIST_PRTFUNC(hrtime, hrtime_t, hrtime_t, "0x%llx") From owner-svn-src-head@FreeBSD.ORG Mon Nov 4 16:16:41 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id E2AF52FD; Mon, 4 Nov 2013 16:16:40 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D093420AD; Mon, 4 Nov 2013 16:16:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA4GGeRA040713; Mon, 4 Nov 2013 16:16:40 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA4GGeFf040711; Mon, 4 Nov 2013 16:16:40 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201311041616.rA4GGeFf040711@svn.freebsd.org> From: Ian Lepore Date: Mon, 4 Nov 2013 16:16:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257639 - head/sys/arm/s3c2xx0 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Nov 2013 16:16:41 -0000 Author: ian Date: Mon Nov 4 16:16:40 2013 New Revision: 257639 URL: http://svnweb.freebsd.org/changeset/base/257639 Log: Remove the duplicated implementations of some bus_space functions and use the essentially identical generic implementations instead. The generic implementations differ only in the spelling of a couple variable names and some formatting differences. Modified: head/sys/arm/s3c2xx0/files.s3c2xx0 head/sys/arm/s3c2xx0/s3c2xx0_space.c Modified: head/sys/arm/s3c2xx0/files.s3c2xx0 ============================================================================== --- head/sys/arm/s3c2xx0/files.s3c2xx0 Mon Nov 4 16:15:43 2013 (r257638) +++ head/sys/arm/s3c2xx0/files.s3c2xx0 Mon Nov 4 16:16:40 2013 (r257639) @@ -1,4 +1,6 @@ # $FreeBSD$ +arm/arm/bus_space_asm_generic.S standard +arm/arm/bus_space_generic.c standard arm/arm/cpufunc_asm_arm9.S standard arm/arm/irq_dispatch.S standard arm/s3c2xx0/board_ln2410sbc.c optional board_ln2410sbc Modified: head/sys/arm/s3c2xx0/s3c2xx0_space.c ============================================================================== --- head/sys/arm/s3c2xx0/s3c2xx0_space.c Mon Nov 4 16:15:43 2013 (r257638) +++ head/sys/arm/s3c2xx0/s3c2xx0_space.c Mon Nov 4 16:16:40 2013 (r257639) @@ -89,7 +89,6 @@ __FBSDID("$FreeBSD$"); #include /* Prototypes for all the bus_space structure functions */ -bs_protos(s3c2xx0); bs_protos(generic); bs_protos(generic_armv4); @@ -98,16 +97,16 @@ struct bus_space s3c2xx0_bs_tag = { (void *) 0, /* mapping/unmapping */ - s3c2xx0_bs_map, - s3c2xx0_bs_unmap, - s3c2xx0_bs_subregion, + generic_bs_map, + generic_bs_unmap, + generic_bs_subregion, /* allocation/deallocation */ - s3c2xx0_bs_alloc, /* not implemented */ - s3c2xx0_bs_free, /* not implemented */ + generic_bs_alloc, /* not implemented */ + generic_bs_free, /* not implemented */ /* barrier */ - s3c2xx0_bs_barrier, + generic_bs_barrier, /* read (single) */ generic_bs_r_1, @@ -164,87 +163,3 @@ struct bus_space s3c2xx0_bs_tag = { NULL, }; -int -s3c2xx0_bs_map(void *t, bus_addr_t bpa, bus_size_t size, - int flag, bus_space_handle_t * bshp) -{ - u_long startpa, endpa, pa; - vm_offset_t va; - pt_entry_t *pte; - const struct pmap_devmap *pd; - - if ((pd = pmap_devmap_find_pa(bpa, size)) != NULL) { - /* Device was statically mapped. */ - *bshp = pd->pd_va + (bpa - pd->pd_pa); - return 0; - } - - startpa = trunc_page(bpa); - endpa = round_page(bpa + size); - - va = kva_alloc(endpa - startpa); - if (!va) - return (ENOMEM); - - *bshp = (bus_space_handle_t) (va + (bpa - startpa)); - - for (pa = startpa; pa < endpa; pa += PAGE_SIZE, va += PAGE_SIZE) { - pmap_kenter(va, pa); - pte = vtopte(va); - if ((flag & BUS_SPACE_MAP_CACHEABLE) == 0) - *pte &= ~L2_S_CACHE_MASK; - } - return (0); -} - -void -s3c2xx0_bs_unmap(void *t, bus_space_handle_t h, bus_size_t size) -{ - vm_offset_t va, endva, origva; - - if (pmap_devmap_find_va((vm_offset_t)h, size) != NULL) { - /* Device was statically mapped; nothing to do. */ - return; - } - - endva = round_page((vm_offset_t)h + size); - origva = va = trunc_page((vm_offset_t)h); - - while (va < endva) { - pmap_kremove(va); - va += PAGE_SIZE; - } - kva_free(origva, endva - origva); -} - -int -s3c2xx0_bs_subregion(void *t, bus_space_handle_t bsh, bus_size_t offset, - bus_size_t size, bus_space_handle_t * nbshp) -{ - - *nbshp = bsh + offset; - return (0); -} - -void -s3c2xx0_bs_barrier(void *t, bus_space_handle_t bsh, bus_size_t offset, - bus_size_t len, int flags) -{ - - /* Nothing to do. */ -} - -int -s3c2xx0_bs_alloc(void *t, bus_addr_t rstart, bus_addr_t rend, - bus_size_t size, bus_size_t alignment, bus_size_t boundary, - int flags, bus_addr_t * bpap, bus_space_handle_t * bshp) -{ - - panic("s3c2xx0_io_bs_alloc(): not implemented\n"); -} - -void -s3c2xx0_bs_free(void *t, bus_space_handle_t bsh, bus_size_t size) -{ - panic("s3c2xx0_io_bs_free(): not implemented\n"); -} From owner-svn-src-head@FreeBSD.ORG Mon Nov 4 16:28:30 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 113D9797; Mon, 4 Nov 2013 16:28:30 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id F2CF72148; Mon, 4 Nov 2013 16:28:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA4GST91044171; Mon, 4 Nov 2013 16:28:29 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA4GSTxq044169; Mon, 4 Nov 2013 16:28:29 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201311041628.rA4GSTxq044169@svn.freebsd.org> From: Glen Barber Date: Mon, 4 Nov 2013 16:28:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257641 - head/release X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Nov 2013 16:28:30 -0000 Author: gjb Date: Mon Nov 4 16:28:29 2013 New Revision: 257641 URL: http://svnweb.freebsd.org/changeset/base/257641 Log: When building the textproc/docproj port, the ports-mgmt/pkg port needs /var/run/ld-elf*.so.hints, which is not automatically created. Fix reldoc build by running the ldconfig(8) startup script in the chroot directory before starting the port build phase. MFC after: 3 days Sponsored by: The FreeBSD Foundation Modified: head/release/release.sh Modified: head/release/release.sh ============================================================================== --- head/release/release.sh Mon Nov 4 16:18:16 2013 (r257640) +++ head/release/release.sh Mon Nov 4 16:28:29 2013 (r257641) @@ -167,6 +167,10 @@ mount -t devfs devfs ${CHROOTDIR}/dev trap "umount ${CHROOTDIR}/dev" EXIT # Clean up devfs mount on exit build_doc_ports() { + # Run ldconfig(8) in the chroot directory so /var/run/ld-elf*.so.hints + # is created. This is needed by ports-mgmt/pkg. + chroot ${CHROOTDIR} /etc/rc.d/ldconfig forcerestart + ## Trick the ports 'run-autotools-fixup' target to do the right thing. _OSVERSION=$(sysctl -n kern.osreldate) if [ -d ${CHROOTDIR}/usr/doc ] && [ "x${NODOC}" = "x" ]; then From owner-svn-src-head@FreeBSD.ORG Mon Nov 4 16:52:28 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 335B21EF; Mon, 4 Nov 2013 16:52:28 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 20D9B2322; Mon, 4 Nov 2013 16:52:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA4GqRWL053198; Mon, 4 Nov 2013 16:52:27 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA4GqRgv053197; Mon, 4 Nov 2013 16:52:27 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201311041652.rA4GqRgv053197@svn.freebsd.org> From: Sean Bruno Date: Mon, 4 Nov 2013 16:52:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257642 - head/contrib/libreadline X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Nov 2013 16:52:28 -0000 Author: sbruno Date: Mon Nov 4 16:52:27 2013 New Revision: 257642 URL: http://svnweb.freebsd.org/changeset/base/257642 Log: Quiesce warning about unused argument in call to rl_message() by wrapping this call with the same #if defined (PREFER_STDARG) directive as in display.c Using -E to compile display.c/search.c shows that this is the code chosen by the build when we create libreadline Modified: head/contrib/libreadline/search.c Modified: head/contrib/libreadline/search.c ============================================================================== --- head/contrib/libreadline/search.c Mon Nov 4 16:28:29 2013 (r257641) +++ head/contrib/libreadline/search.c Mon Nov 4 16:52:27 2013 (r257642) @@ -211,7 +211,11 @@ _rl_nsearch_init (dir, pchar) rl_end = rl_point = 0; p = _rl_make_prompt_for_search (pchar ? pchar : ':'); +#if defined (PREFER_STDARG) + rl_message ("%s", p); +#else rl_message ("%s", p, 0); +#endif free (p); RL_SETSTATE(RL_STATE_NSEARCH); From owner-svn-src-head@FreeBSD.ORG Mon Nov 4 16:56:36 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 82BB24AC; Mon, 4 Nov 2013 16:56:36 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6F77A2365; Mon, 4 Nov 2013 16:56:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA4Guab0053723; Mon, 4 Nov 2013 16:56:36 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA4GuaeC053722; Mon, 4 Nov 2013 16:56:36 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201311041656.rA4GuaeC053722@svn.freebsd.org> From: Gleb Smirnoff Date: Mon, 4 Nov 2013 16:56:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257643 - head/share/man/man3 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Nov 2013 16:56:36 -0000 Author: glebius Date: Mon Nov 4 16:56:35 2013 New Revision: 257643 URL: http://svnweb.freebsd.org/changeset/base/257643 Log: Document RB_FOREACH_SAFE() and RB_FOREACH_REVERSE_SAFE(). Submitted by: Mikhail Modified: head/share/man/man3/tree.3 Modified: head/share/man/man3/tree.3 ============================================================================== --- head/share/man/man3/tree.3 Mon Nov 4 16:52:27 2013 (r257642) +++ head/share/man/man3/tree.3 Mon Nov 4 16:56:35 2013 (r257643) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 27, 2007 +.Dd November 4, 2013 .Dt TREE 3 .Os .Sh NAME @@ -70,7 +70,9 @@ .Nm RB_RIGHT , .Nm RB_PARENT , .Nm RB_FOREACH , +.Nm RB_FOREACH_SAFE , .Nm RB_FOREACH_REVERSE , +.Nm RB_FOREACH_REVERSE_SAFE , .Nm RB_INIT , .Nm RB_INSERT , .Nm RB_REMOVE @@ -135,7 +137,9 @@ .Ft "struct TYPE *" .Fn RB_PARENT "struct TYPE *elm" "RB_ENTRY NAME" .Fn RB_FOREACH VARNAME NAME "RB_HEAD *head" +.Fn RB_FOREACH_SAFE "VARNAME" "NAME" "RB_HEAD *head" "TEMP_VARNAME" .Fn RB_FOREACH_REVERSE VARNAME NAME "RB_HEAD *head" +.Fn RB_FOREACH_REVERSE_SAFE "VARNAME" "NAME" "RB_HEAD *head" "TEMP_VARNAME" .Ft void .Fn RB_INIT "RB_HEAD *head" .Ft "struct TYPE *" @@ -454,6 +458,18 @@ macro: .Fn RB_FOREACH np NAME head .Ed .Pp +The macros +.Fn RB_FOREACH_SAFE +and +.Fn RB_FOREACH_REVERSE_SAFE +traverse the tree referenced by head +in a forward or reverse direction respectively, +assigning each element in turn to np. +However, unlike their unsafe counterparts, +they permit both the removal of np +as well as freeing it from within the loop safely +without interfering with the traversal. +.Pp The .Fn RB_EMPTY macro should be used to check whether a red-black tree is empty. From owner-svn-src-head@FreeBSD.ORG Mon Nov 4 18:15:46 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 1AB371F0; Mon, 4 Nov 2013 18:15:46 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 06D4C281A; Mon, 4 Nov 2013 18:15:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA4IFjZH081493; Mon, 4 Nov 2013 18:15:45 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA4IFjwO081492; Mon, 4 Nov 2013 18:15:45 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201311041815.rA4IFjwO081492@svn.freebsd.org> From: Sean Bruno Date: Mon, 4 Nov 2013 18:15:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257645 - head/gnu/lib/libgcc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Nov 2013 18:15:46 -0000 Author: sbruno Date: Mon Nov 4 18:15:45 2013 New Revision: 257645 URL: http://svnweb.freebsd.org/changeset/base/257645 Log: Quiesce warning around gcc_assert() for an inline macro that uses a static variable. This code has been moved around in gcc, but is still in use in the latest trunk version of the compiler. gnu/lib/libgcc/../../../contrib/gcc/unwind-dw2.c:208:36: warning: static variable 'dwarf_reg_size_table' is used in an inline function with external linkage [-Wstatic-in-inline] gcc_assert (index < (int) sizeof(dwarf_reg_size_table)); Modified: head/gnu/lib/libgcc/Makefile Modified: head/gnu/lib/libgcc/Makefile ============================================================================== --- head/gnu/lib/libgcc/Makefile Mon Nov 4 18:14:50 2013 (r257644) +++ head/gnu/lib/libgcc/Makefile Mon Nov 4 18:15:45 2013 (r257645) @@ -27,6 +27,17 @@ CFLAGS+= -DIN_GCC -DIN_LIBGCC2 -D__GCC_F -I${GCCDIR}/config -I${GCCDIR} -I. \ -I${.CURDIR}/../../usr.bin/cc/cc_tools +# Added to quiesce warning around gcc_assert() for an inline macro that uses +# a static variable. This code has been moved around in gcc, but is still in +# use in the latest trunk version of the compiler. +# +# gnu/lib/libgcc/../../../contrib/gcc/unwind-dw2.c:208:36: +# warning: static variable 'dwarf_reg_size_table' is used in an inline +# function with external linkage [-Wstatic-in-inline] +# gcc_assert (index < (int) sizeof(dwarf_reg_size_table)); +# ^ +CFLAGS+= -Wno-static-in-inline + LDFLAGS+= -nodefaultlibs LDADD+= -lc From owner-svn-src-head@FreeBSD.ORG Mon Nov 4 19:05:32 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 8CCDB744; Mon, 4 Nov 2013 19:05:32 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6B1DE2B96; Mon, 4 Nov 2013 19:05:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA4J5W72097969; Mon, 4 Nov 2013 19:05:32 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA4J5WT0097968; Mon, 4 Nov 2013 19:05:32 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201311041905.rA4J5WT0097968@svn.freebsd.org> From: Eitan Adler Date: Mon, 4 Nov 2013 19:05:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257646 - head/lib/libc/string X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Nov 2013 19:05:32 -0000 Author: eadler Date: Mon Nov 4 19:05:31 2013 New Revision: 257646 URL: http://svnweb.freebsd.org/changeset/base/257646 Log: Use OpenBSD's revamped description of strlcpy and strlcat. This explanation is supposed to be simpler and better. In particular "comparing it to the snprintf API provides lots of value, since it raises the bar on understanding, so that programmers/auditors will a better job calling all 3 of these functions." Requested by: deraadt@cvs.openbsd.org Obtained From: OpenBSD Reviewed by: cperciva Modified: head/lib/libc/string/strlcpy.3 Modified: head/lib/libc/string/strlcpy.3 ============================================================================== --- head/lib/libc/string/strlcpy.3 Mon Nov 4 18:15:45 2013 (r257645) +++ head/lib/libc/string/strlcpy.3 Mon Nov 4 19:05:31 2013 (r257646) @@ -1,4 +1,4 @@ -.\" $OpenBSD: strlcpy.3,v 1.19 2007/05/31 19:19:32 jmc Exp $ +.\" $OpenBSD: strlcpy.3,v 1.26 2013/09/30 12:02:35 millert Exp $ .\" .\" Copyright (c) 1998, 2000 Todd C. Miller .\" @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 22, 1998 +.Dd November 10, 2013 .Dt STRLCPY 3 .Os .Sh NAME @@ -47,69 +47,81 @@ The .Fn strlcpy and .Fn strlcat -functions copy and concatenate strings respectively. -They are designed -to be safer, more consistent, and less error prone replacements for +functions copy and concatenate strings with the +same input parameters and output result as +.Xr snprintf 3 . +They are designed to be safer, more consistent, and less error +prone replacements for the easily misused functions .Xr strncpy 3 and .Xr strncat 3 . -Unlike those functions, -.Fn strlcpy -and -.Fn strlcat -take the full size of the buffer (not just the length) and guarantee to -NUL-terminate the result (as long as -.Fa size -is larger than 0 or, in the case of -.Fn strlcat , -as long as there is at least one byte free in -.Fa dst ) . -Note that a byte for the NUL should be included in -.Fa size . -Also note that +.Pp .Fn strlcpy and .Fn strlcat -only operate on true -.Dq C -strings. -This means that for -.Fn strlcpy -.Fa src -must be NUL-terminated and for -.Fn strlcat -both -.Fa src -and -.Fa dst -must be NUL-terminated. +take the full size of the destination buffer and guarantee +NUL-termination if there is room. +Note that room for the NUL should be included in +.Fa dstsize . .Pp -The .Fn strlcpy -function copies up to -.Fa size -- 1 characters from the NUL-terminated string +copies up to +.Fa dstsize +\- 1 characters from the string .Fa src to .Fa dst , -NUL-terminating the result. +NUL-terminating the result if +.Fa dstsize +is not 0. .Pp -The .Fn strlcat -function appends the NUL-terminated string +appends string .Fa src to the end of .Fa dst . It will append at most -.Fa size -- strlen(dst) - 1 bytes, NUL-terminating the result. +.Fa dstsize +\- strlen(dst) \- 1 characters. +It will then NUL-terminate, unless +.Fa dstsize +is 0 or the original +.Fa dst +string was longer than +.Fa dstsize +(in practice this should not happen +as it means that either +.Fa dstsize +is incorrect or that +.Fa dst +is not a proper string). +.Pp +If the +.Fa src +and +.Fa dst +strings overlap, the behavior is undefined. .Sh RETURN VALUES -The +Besides quibbles over the return type +.Pf ( Va size_t +versus +.Va int ) +and signal handler safety +.Pf ( Xr snprintf 3 +is not entirely safe on some systems), the +following two are equivalent: +.Bd -literal -offset indent +n = strlcpy(dst, src, len); +n = snprintf(dst, len, "%s", src); +.Ed +.Pp +Like +.Xr snprintf 3 , +the .Fn strlcpy and .Fn strlcat -functions return the total length of the string they tried to -create. +functions return the total length of the string they tried to create. For .Fn strlcpy that means the length of @@ -121,29 +133,12 @@ that means the initial length of plus the length of .Fa src . -While this may seem somewhat confusing, it was done to make -truncation detection simple. .Pp -Note however, that if -.Fn strlcat -traverses -.Fa size -characters without finding a NUL, the length of the string is considered -to be -.Fa size -and the destination string will not be NUL-terminated (since there was -no space for the NUL). -This keeps -.Fn strlcat -from running off the end of a string. -In practice this should not happen (as it means that either -.Fa size -is incorrect or that -.Fa dst -is not a proper -.Dq C -string). -The check exists to prevent potential security problems in incorrect code. +If the return value is +.Cm >= +.Va dstsize , +the output string has been truncated. +It is the caller's responsibility to handle this. .Sh EXAMPLES The following code fragment illustrates the simple case: .Bd -literal -offset indent @@ -169,7 +164,7 @@ if (strlcat(pname, file, sizeof(pname)) .Ed .Pp Since it is known how many characters were copied the first time, things -can be sped up a bit by using a copy instead of an append. +can be sped up a bit by using a copy instead of an append: .Bd -literal -offset indent char *dir, *file, pname[MAXPATHLEN]; size_t n; @@ -201,5 +196,5 @@ and .Fn strlcat functions first appeared in .Ox 2.4 , -and made their appearance in +and .Fx 3.3 . From owner-svn-src-head@FreeBSD.ORG Mon Nov 4 19:11:18 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id E3784A57; Mon, 4 Nov 2013 19:11:18 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from mail0.glenbarber.us (mail0.glenbarber.us [208.86.227.67]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9D9F22BEF; Mon, 4 Nov 2013 19:11:18 +0000 (UTC) Received: from glenbarber.us (70.15.88.86.res-cmts.sewb.ptd.net [70.15.88.86]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: gjb) by mail0.glenbarber.us (Postfix) with ESMTPSA id 3EE2613D2B; Mon, 4 Nov 2013 19:11:17 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.8.3 mail0.glenbarber.us 3EE2613D2B Authentication-Results: mail0.glenbarber.us; dkim=none reason="no signature"; dkim-adsp=none Date: Mon, 4 Nov 2013 14:11:15 -0500 From: Glen Barber To: Eitan Adler Subject: Re: svn commit: r257646 - head/lib/libc/string Message-ID: <20131104191115.GC8833@glenbarber.us> References: <201311041905.rA4J5WT0097968@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ZwgA9U+XZDXt4+m+" Content-Disposition: inline In-Reply-To: <201311041905.rA4J5WT0097968@svn.freebsd.org> X-Operating-System: FreeBSD 11.0-CURRENT amd64 User-Agent: Mutt/1.5.22 (2013-10-16) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Nov 2013 19:11:19 -0000 --ZwgA9U+XZDXt4+m+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Nov 04, 2013 at 07:05:32PM +0000, Eitan Adler wrote: > Author: eadler > Date: Mon Nov 4 19:05:31 2013 > New Revision: 257646 > URL: http://svnweb.freebsd.org/changeset/base/257646 >=20 > Log: > Use OpenBSD's revamped description of strlcpy and strlcat. > =20 > This explanation is supposed to be simpler and better. In particular > "comparing it to the snprintf API provides lots of value, since it rais= es the > bar on understanding, so that programmers/auditors will a better job ca= lling > all 3 of these functions." > =20 > Requested by: deraadt@cvs.openbsd.org > Obtained From: OpenBSD > Reviewed by: cperciva >=20 > Modified: > head/lib/libc/string/strlcpy.3 >=20 > Modified: head/lib/libc/string/strlcpy.3 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/lib/libc/string/strlcpy.3 Mon Nov 4 18:15:45 2013 (r257645) > +++ head/lib/libc/string/strlcpy.3 Mon Nov 4 19:05:31 2013 (r257646) > @@ -1,4 +1,4 @@ > -.\" $OpenBSD: strlcpy.3,v 1.19 2007/05/31 19:19:32 jmc Exp $ > +.\" $OpenBSD: strlcpy.3,v 1.26 2013/09/30 12:02:35 millert Exp $ > .\" > .\" Copyright (c) 1998, 2000 Todd C. Miller > .\" > @@ -27,7 +27,7 @@ > .\" > .\" $FreeBSD$ > .\" > -.Dd June 22, 1998 > +.Dd November 10, 2013 I think your clock is off. Glen --ZwgA9U+XZDXt4+m+ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQIcBAEBCAAGBQJSd/FSAAoJELls3eqvi17Q8d8QAIXQzSbcfAdtldbFvWYarTxy QXMotmyF1Qdm1T/oPwUorgfVvYJXumqwFZx4PzhB+CrxSI6UoFE01rtl8MFBFBYN xYqRsh1x/r/jZU2177hXu2X1KlZL+S6/XzXTKkCp+KPNyNCsTOiJE6q21ZpBPI4X D3NuUhTwsMDfMDSYHQXQ0VqejZ/ok85tjCg+UDq2/3kc4kUII2sJPeLuOT3I0CVu T7PS0g3zS0TNRZGyRDBsgK8z0uIjdQ8N3Gw1EuvVE+MDygcjQ5ogauTj86MsXUsR RGowD1WC3UF/hdyDCW/tiKaXeTUVTSPgwJQrhyqmaQ97z8ff8TVjK/uO917Pso1I dKZOV8zuQf0JmX2el7hvY/JK/AEgj77NSWlQgamDRPcKPvYKz3DGnS0/L5ObZIB1 H2RiE8rQeO+r1TNmXa4+Q43vBu/KGw8D/7wRNzzJWyuRHlCipA3Ix48dU82nNE5B KPhX1H9l3gFPs5raEudg5lpPgTs/inB1v3dVx6sfYX1S5HzH0CoM1GDvEAalON6r bQRLphsylvNvgnkJJ4N6bfdd6TaQWQOj/Yfbx8+PIR2ldcItyuNpcgnE3aceUU1s Ya1HnG2OmRaaF9HZh1FMdn7G1X0ZhJom0No27eQQvpGackj11gRNdsZx9jPnZDZl uVutXplL7ZtvexuYdn35 =EOUF -----END PGP SIGNATURE----- --ZwgA9U+XZDXt4+m+-- From owner-svn-src-head@FreeBSD.ORG Mon Nov 4 19:19:37 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 09C3EE4D for ; Mon, 4 Nov 2013 19:19:37 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-qc0-x22c.google.com (mail-qc0-x22c.google.com [IPv6:2607:f8b0:400d:c01::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BAD7D2C4D for ; Mon, 4 Nov 2013 19:19:36 +0000 (UTC) Received: by mail-qc0-f172.google.com with SMTP id c9so4220445qcz.31 for ; Mon, 04 Nov 2013 11:19:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=8tU1FmAEvN+pN8cdOOE4QS1EL+FQ4EHjR81hPDaVPWE=; b=DG0qSmPFVtScp+FRUguPEKXFcp2IZCZNHCDR33Lq8ZIPf0wAg0jvpIT57TA3wzw7vz T6KX9EucUoI0xSH4yjRWa7aspnnsiuVjdLXY/e7DVmq6lAJvDFN+rt1OePPW2C2FEog0 wAHYUXXTAyDYpJplPUjed/3oefClNgZUGlZvI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-type; bh=8tU1FmAEvN+pN8cdOOE4QS1EL+FQ4EHjR81hPDaVPWE=; b=bL6WavvjbezVxyhkgl373uMzv083mi4nieCIxkTGa32z+vwRmXk5RerkyBurRlr12t 9XYbTMSVceO+7lkTfjhSNLcQYztEkN5il8yQTloeaU4p9/iqCugFOsvGO4FCUXCevOgn Tj6OymWEvS1Cm+xojGjSAyah8JORePl7OctSneEs+ywQAZNWZ+FN0DA3BmAtGkyvcJ6X coLO69zkWPyEafuwd7WwR7YHINrptmfDvbh39roifx5ERVAsTZJv87uQFDmUcikUIWFH wjuhrDJrhbPJSVjjyysrIRHcdpIFsisg65uUhoPKqFrHlnGkhNcKnlsirHlV8IF52m/M RW1w== X-Gm-Message-State: ALoCoQkfXpsOKcwfqfEzsDhWOehiGpDjfOjzHH1YrCH3VKaiXPRVLIjml7iTnnN+dz4g5n0So/z/ X-Received: by 10.49.18.33 with SMTP id t1mr4583070qed.77.1383592775670; Mon, 04 Nov 2013 11:19:35 -0800 (PST) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.96.63.101 with HTTP; Mon, 4 Nov 2013 11:19:05 -0800 (PST) In-Reply-To: <20131104191115.GC8833@glenbarber.us> References: <201311041905.rA4J5WT0097968@svn.freebsd.org> <20131104191115.GC8833@glenbarber.us> From: Eitan Adler Date: Mon, 4 Nov 2013 14:19:05 -0500 X-Google-Sender-Auth: PkAth11ENp6Bi2QXQsqa9Kb7vdk Message-ID: Subject: Re: svn commit: r257646 - head/lib/libc/string To: Glen Barber Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Nov 2013 19:19:37 -0000 On Mon, Nov 4, 2013 at 2:11 PM, Glen Barber wrote: > On Mon, Nov 04, 2013 at 07:05:32PM +0000, Eitan Adler wrote: > > I think your clock is off. That was me being pessimistic about how much free time I'd have. If its critical I could change it (or I wouldn't mind if someone gets to that before me). -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams From owner-svn-src-head@FreeBSD.ORG Mon Nov 4 19:32:36 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id F0D542A7; Mon, 4 Nov 2013 19:32:35 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DDDCA2D17; Mon, 4 Nov 2013 19:32:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA4JWZcP007968; Mon, 4 Nov 2013 19:32:35 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA4JWZJd007967; Mon, 4 Nov 2013 19:32:35 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201311041932.rA4JWZJd007967@svn.freebsd.org> From: Sean Bruno Date: Mon, 4 Nov 2013 19:32:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257647 - head/cddl/lib/libnvpair X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Nov 2013 19:32:36 -0000 Author: sbruno Date: Mon Nov 4 19:32:35 2013 New Revision: 257647 URL: http://svnweb.freebsd.org/changeset/base/257647 Log: spelling in comments fixup Submitted by: Joerg Sonnenberger Modified: head/cddl/lib/libnvpair/Makefile Modified: head/cddl/lib/libnvpair/Makefile ============================================================================== --- head/cddl/lib/libnvpair/Makefile Mon Nov 4 19:05:31 2013 (r257646) +++ head/cddl/lib/libnvpair/Makefile Mon Nov 4 19:32:35 2013 (r257647) @@ -21,9 +21,9 @@ CFLAGS+= -I${.CURDIR}/../../../sys CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/head CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris/lib/libumem -# This library uses macros to define fprintf behvavior for several object types +# This library uses macros to define fprintf behavior for several object types # The compiler will see the non-string literal arguments to the fprintf calls and -# omit warnings for them. Quiese these warnings in contrib code: +# omit warnings for them. Quiesce these warnings in contrib code: # # cddl/contrib/opensolaris/lib/libnvpair/libnvpair.c:743:12: warning: format # string is not a string literal (potentially insecure) [-Wformat-security] From owner-svn-src-head@FreeBSD.ORG Mon Nov 4 19:44:39 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id EB62F773; Mon, 4 Nov 2013 19:44:39 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C98292DC5; Mon, 4 Nov 2013 19:44:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA4JidLo011519; Mon, 4 Nov 2013 19:44:39 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA4Jibeh011506; Mon, 4 Nov 2013 19:44:37 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201311041944.rA4Jibeh011506@svn.freebsd.org> From: Ian Lepore Date: Mon, 4 Nov 2013 19:44:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257648 - in head/sys/arm: arm freescale/imx include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Nov 2013 19:44:40 -0000 Author: ian Date: Mon Nov 4 19:44:37 2013 New Revision: 257648 URL: http://svnweb.freebsd.org/changeset/base/257648 Log: Begin reducing code duplication in arm pmap.c and pmap-v6.c by factoring out common code related to mapping device memory into a new devmap.c file. Remove the growing duplication of code that used pmap_devmap_find_pa() and then did some math with the returned results to generate a virtual address, and likewise in reverse to get a physical address. Now there are a pair of functions, arm_devmap_vtop() and arm_devmap_ptov(), to do that. The bus_space_map() implementations are rewritten in terms of these. Added: head/sys/arm/arm/devmap.c (contents, props changed) head/sys/arm/include/devmap.h (contents, props changed) Modified: head/sys/arm/arm/bus_space_generic.c head/sys/arm/arm/machdep.c head/sys/arm/arm/pmap-v6.c head/sys/arm/arm/pmap.c head/sys/arm/freescale/imx/imx6_machdep.c head/sys/arm/freescale/imx/imx_machdep.c head/sys/arm/include/fdt.h head/sys/arm/include/pmap.h Modified: head/sys/arm/arm/bus_space_generic.c ============================================================================== --- head/sys/arm/arm/bus_space_generic.c Mon Nov 4 19:32:35 2013 (r257647) +++ head/sys/arm/arm/bus_space_generic.c Mon Nov 4 19:44:37 2013 (r257648) @@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include /* Prototypes for all the bus_space structure functions */ bs_protos(generic); @@ -58,36 +59,20 @@ int generic_bs_map(void *t, bus_addr_t bpa, bus_size_t size, int flags, bus_space_handle_t *bshp) { - const struct pmap_devmap *pd; - vm_paddr_t startpa, endpa, pa, offset; - vm_offset_t va; - pt_entry_t *pte; - - if ((pd = pmap_devmap_find_pa(bpa, size)) != NULL) { - /* Device was statically mapped. */ - *bshp = pd->pd_va + (bpa - pd->pd_pa); - return (0); - } - - endpa = round_page(bpa + size); - offset = bpa & PAGE_MASK; - startpa = trunc_page(bpa); - - va = kva_alloc(endpa - startpa); - if (va == 0) - return (ENOMEM); - - *bshp = va + offset; - - for (pa = startpa; pa < endpa; pa += PAGE_SIZE, va += PAGE_SIZE) { - pmap_kenter(va, pa); - pte = vtopte(va); - if (!(flags & BUS_SPACE_MAP_CACHEABLE)) { - *pte &= ~L2_S_CACHE_MASK; - PTE_SYNC(pte); - } - } + void *va; + /* + * Look up the address in the static device mappings. If it's not + * there, establish a new dynamic mapping. + * + * We don't even examine the passed-in flags. For ARM, the CACHEABLE + * flag doesn't make sense (we create PTE_DEVICE mappings), and the + * LINEAR flag is just implied because we use kva_alloc(size). + */ + if ((va = arm_devmap_ptov(bpa, size)) == NULL) + if ((va = pmap_mapdev(bpa, size)) == NULL) + return (ENOMEM); + *bshp = (bus_space_handle_t)va; return (0); } @@ -104,21 +89,13 @@ generic_bs_alloc(void *t, bus_addr_t rst void generic_bs_unmap(void *t, bus_space_handle_t h, bus_size_t size) { - vm_offset_t va, endva, origva; - if (pmap_devmap_find_va((vm_offset_t)h, size) != NULL) { - /* Device was statically mapped; nothing to do. */ - return; - } - - endva = round_page((vm_offset_t)h + size); - origva = va = trunc_page((vm_offset_t)h); - - while (va < endva) { - pmap_kremove(va); - va += PAGE_SIZE; - } - kva_free(origva, endva - origva); + /* + * If the region is static-mapped do nothing, otherwise remove the + * dynamic mapping. + */ + if (arm_devmap_vtop((void*)h, size) == DEVMAP_PADDR_NOTFOUND) + pmap_unmapdev((vm_offset_t)h, size); } void Added: head/sys/arm/arm/devmap.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/arm/devmap.c Mon Nov 4 19:44:37 2013 (r257648) @@ -0,0 +1,150 @@ +/*- + * Copyright (c) 2013 Ian Lepore + * 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$"); + +/* + * Routines for mapping device memory. + */ + +#include +#include +#include +#include +#include +#include + +static const struct pmap_devmap *devmap_table; + +/* + * Map all of the static regions in the devmap table, and remember + * the devmap table so other parts of the kernel can do lookups later. + */ +void +pmap_devmap_bootstrap(vm_offset_t l1pt, const struct pmap_devmap *table) +{ + const struct pmap_devmap *pd; + + devmap_table = table; + + for (pd = devmap_table; pd->pd_size != 0; ++pd) { + pmap_map_chunk(l1pt, pd->pd_va, pd->pd_pa, pd->pd_size, + pd->pd_prot,pd->pd_cache); + } +} + +/* + * Look up the given physical address in the static mapping data and return the + * corresponding virtual address, or NULL if not found. + */ +void * +arm_devmap_ptov(vm_paddr_t pa, vm_size_t size) +{ + const struct pmap_devmap *pd; + + if (devmap_table == NULL) + return (NULL); + + for (pd = devmap_table; pd->pd_size != 0; ++pd) { + if (pa >= pd->pd_pa && pa + size <= pd->pd_pa + pd->pd_size) + return ((void *)(pd->pd_va + (pa - pd->pd_pa))); + } + + return (NULL); +} + +/* + * Look up the given virtual address in the static mapping data and return the + * corresponding physical address, or DEVMAP_PADDR_NOTFOUND if not found. + */ +vm_paddr_t +arm_devmap_vtop(void * vpva, vm_size_t size) +{ + const struct pmap_devmap *pd; + vm_offset_t va; + + if (devmap_table == NULL) + return (DEVMAP_PADDR_NOTFOUND); + + va = (vm_offset_t)vpva; + for (pd = devmap_table; pd->pd_size != 0; ++pd) { + if (va >= pd->pd_va && va + size <= pd->pd_va + pd->pd_size) + return ((vm_paddr_t)(pd->pd_pa + (va - pd->pd_va))); + } + + return (DEVMAP_PADDR_NOTFOUND); +} + +/* + * Map a set of physical memory pages into the kernel virtual address space. + * Return a pointer to where it is mapped. This routine is intended to be used + * for mapping device memory, NOT real memory. + */ +void * +pmap_mapdev(vm_offset_t pa, vm_size_t size) +{ + vm_offset_t va, tmpva, offset; + + offset = pa & PAGE_MASK; + pa = trunc_page(pa); + size = round_page(size + offset); + + va = kva_alloc(size); + if (!va) + panic("pmap_mapdev: Couldn't alloc kernel virtual memory"); + + for (tmpva = va; size > 0;) { + pmap_kenter_device(tmpva, pa); + size -= PAGE_SIZE; + tmpva += PAGE_SIZE; + pa += PAGE_SIZE; + } + + return ((void *)(va + offset)); +} + +/* + * Unmap device memory and free the kva space. + */ +void +pmap_unmapdev(vm_offset_t va, vm_size_t size) +{ + vm_offset_t tmpva, offset; + + offset = va & PAGE_MASK; + va = trunc_page(va); + size = round_page(size + offset); + + for (tmpva = va; size > 0;) { + pmap_kremove(tmpva); + size -= PAGE_SIZE; + tmpva += PAGE_SIZE; + } + + kva_free(va, size); +} + Modified: head/sys/arm/arm/machdep.c ============================================================================== --- head/sys/arm/arm/machdep.c Mon Nov 4 19:32:35 2013 (r257647) +++ head/sys/arm/arm/machdep.c Mon Nov 4 19:44:37 2013 (r257648) @@ -90,6 +90,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/sys/arm/arm/pmap-v6.c ============================================================================== --- head/sys/arm/arm/pmap-v6.c Mon Nov 4 19:32:35 2013 (r257647) +++ head/sys/arm/arm/pmap-v6.c Mon Nov 4 19:44:37 2013 (r257648) @@ -137,7 +137,9 @@ /* * Special compilation symbols * PMAP_DEBUG - Build in pmap_debug_level code - */ + * + * Note that pmap_mapdev() and pmap_unmapdev() are implemented in arm/devmap.c +*/ /* Include header files */ #include "opt_vm.h" @@ -2424,6 +2426,17 @@ pmap_kenter_nocache(vm_offset_t va, vm_p } void +pmap_kenter_device(vm_offset_t va, vm_paddr_t pa) +{ + + /* + * XXX - Need a way for kenter_internal to handle PTE_DEVICE mapping as + * a potentially different thing than PTE_NOCACHE. + */ + pmap_kenter_internal(va, pa, 0); +} + +void pmap_kenter_user(vm_offset_t va, vm_paddr_t pa) { @@ -5010,36 +5023,6 @@ pmap_align_superpage(vm_object_t object, { } - -/* - * Map a set of physical memory pages into the kernel virtual - * address space. Return a pointer to where it is mapped. This - * routine is intended to be used for mapping device memory, - * NOT real memory. - */ -void * -pmap_mapdev(vm_offset_t pa, vm_size_t size) -{ - vm_offset_t va, tmpva, offset; - - offset = pa & PAGE_MASK; - size = roundup(size, PAGE_SIZE); - - GIANT_REQUIRED; - - va = kva_alloc(size); - if (!va) - panic("pmap_mapdev: Couldn't alloc kernel virtual memory"); - for (tmpva = va; size > 0;) { - pmap_kenter_internal(tmpva, pa, 0); - size -= PAGE_SIZE; - tmpva += PAGE_SIZE; - pa += PAGE_SIZE; - } - - return ((void *)(va + offset)); -} - /* * pmap_map_section: * @@ -5222,86 +5205,6 @@ pmap_map_chunk(vm_offset_t l1pt, vm_offs } -/********************** Static device map routines ***************************/ - -static const struct pmap_devmap *pmap_devmap_table; - -/* - * Register the devmap table. This is provided in case early console - * initialization needs to register mappings created by bootstrap code - * before pmap_devmap_bootstrap() is called. - */ -void -pmap_devmap_register(const struct pmap_devmap *table) -{ - - pmap_devmap_table = table; -} - -/* - * Map all of the static regions in the devmap table, and remember - * the devmap table so other parts of the kernel can look up entries - * later. - */ -void -pmap_devmap_bootstrap(vm_offset_t l1pt, const struct pmap_devmap *table) -{ - int i; - - pmap_devmap_table = table; - - for (i = 0; pmap_devmap_table[i].pd_size != 0; i++) { -#ifdef VERBOSE_INIT_ARM - printf("devmap: %08x -> %08x @ %08x\n", - pmap_devmap_table[i].pd_pa, - pmap_devmap_table[i].pd_pa + - pmap_devmap_table[i].pd_size - 1, - pmap_devmap_table[i].pd_va); -#endif - pmap_map_chunk(l1pt, pmap_devmap_table[i].pd_va, - pmap_devmap_table[i].pd_pa, - pmap_devmap_table[i].pd_size, - pmap_devmap_table[i].pd_prot, - pmap_devmap_table[i].pd_cache); - } -} - -const struct pmap_devmap * -pmap_devmap_find_pa(vm_paddr_t pa, vm_size_t size) -{ - int i; - - if (pmap_devmap_table == NULL) - return (NULL); - - for (i = 0; pmap_devmap_table[i].pd_size != 0; i++) { - if (pa >= pmap_devmap_table[i].pd_pa && - pa + size <= pmap_devmap_table[i].pd_pa + - pmap_devmap_table[i].pd_size) - return (&pmap_devmap_table[i]); - } - - return (NULL); -} - -const struct pmap_devmap * -pmap_devmap_find_va(vm_offset_t va, vm_size_t size) -{ - int i; - - if (pmap_devmap_table == NULL) - return (NULL); - - for (i = 0; pmap_devmap_table[i].pd_size != 0; i++) { - if (va >= pmap_devmap_table[i].pd_va && - va + size <= pmap_devmap_table[i].pd_va + - pmap_devmap_table[i].pd_size) - return (&pmap_devmap_table[i]); - } - - return (NULL); -} - int pmap_dmap_iscurrent(pmap_t pmap) { Modified: head/sys/arm/arm/pmap.c ============================================================================== --- head/sys/arm/arm/pmap.c Mon Nov 4 19:32:35 2013 (r257647) +++ head/sys/arm/arm/pmap.c Mon Nov 4 19:44:37 2013 (r257648) @@ -134,6 +134,8 @@ /* * Special compilation symbols * PMAP_DEBUG - Build in pmap_debug_level code + * + * Note that pmap_mapdev() and pmap_unmapdev() are implemented in arm/devmap.c */ /* Include header files */ @@ -2842,6 +2844,17 @@ pmap_kenter_nocache(vm_offset_t va, vm_p } void +pmap_kenter_device(vm_offset_t va, vm_paddr_t pa) +{ + + /* + * XXX - Need a way for kenter_internal to handle PTE_DEVICE mapping as + * a potentially different thing than PTE_NOCACHE. + */ + pmap_kenter_internal(va, pa, 0); +} + +void pmap_kenter_user(vm_offset_t va, vm_paddr_t pa) { @@ -4690,36 +4703,6 @@ pmap_align_superpage(vm_object_t object, { } - -/* - * Map a set of physical memory pages into the kernel virtual - * address space. Return a pointer to where it is mapped. This - * routine is intended to be used for mapping device memory, - * NOT real memory. - */ -void * -pmap_mapdev(vm_offset_t pa, vm_size_t size) -{ - vm_offset_t va, tmpva, offset; - - offset = pa & PAGE_MASK; - size = roundup(size, PAGE_SIZE); - - GIANT_REQUIRED; - - va = kva_alloc(size); - if (!va) - panic("pmap_mapdev: Couldn't alloc kernel virtual memory"); - for (tmpva = va; size > 0;) { - pmap_kenter_internal(tmpva, pa, 0); - size -= PAGE_SIZE; - tmpva += PAGE_SIZE; - pa += PAGE_SIZE; - } - - return ((void *)(va + offset)); -} - #define BOOTSTRAP_DEBUG /* @@ -4940,86 +4923,6 @@ pmap_map_chunk(vm_offset_t l1pt, vm_offs } -/********************** Static device map routines ***************************/ - -static const struct pmap_devmap *pmap_devmap_table; - -/* - * Register the devmap table. This is provided in case early console - * initialization needs to register mappings created by bootstrap code - * before pmap_devmap_bootstrap() is called. - */ -void -pmap_devmap_register(const struct pmap_devmap *table) -{ - - pmap_devmap_table = table; -} - -/* - * Map all of the static regions in the devmap table, and remember - * the devmap table so other parts of the kernel can look up entries - * later. - */ -void -pmap_devmap_bootstrap(vm_offset_t l1pt, const struct pmap_devmap *table) -{ - int i; - - pmap_devmap_table = table; - - for (i = 0; pmap_devmap_table[i].pd_size != 0; i++) { -#ifdef VERBOSE_INIT_ARM - printf("devmap: %08x -> %08x @ %08x\n", - pmap_devmap_table[i].pd_pa, - pmap_devmap_table[i].pd_pa + - pmap_devmap_table[i].pd_size - 1, - pmap_devmap_table[i].pd_va); -#endif - pmap_map_chunk(l1pt, pmap_devmap_table[i].pd_va, - pmap_devmap_table[i].pd_pa, - pmap_devmap_table[i].pd_size, - pmap_devmap_table[i].pd_prot, - pmap_devmap_table[i].pd_cache); - } -} - -const struct pmap_devmap * -pmap_devmap_find_pa(vm_paddr_t pa, vm_size_t size) -{ - int i; - - if (pmap_devmap_table == NULL) - return (NULL); - - for (i = 0; pmap_devmap_table[i].pd_size != 0; i++) { - if (pa >= pmap_devmap_table[i].pd_pa && - pa + size <= pmap_devmap_table[i].pd_pa + - pmap_devmap_table[i].pd_size) - return (&pmap_devmap_table[i]); - } - - return (NULL); -} - -const struct pmap_devmap * -pmap_devmap_find_va(vm_offset_t va, vm_size_t size) -{ - int i; - - if (pmap_devmap_table == NULL) - return (NULL); - - for (i = 0; pmap_devmap_table[i].pd_size != 0; i++) { - if (va >= pmap_devmap_table[i].pd_va && - va + size <= pmap_devmap_table[i].pd_va + - pmap_devmap_table[i].pd_size) - return (&pmap_devmap_table[i]); - } - - return (NULL); -} - void pmap_page_set_memattr(vm_page_t m, vm_memattr_t ma) { Modified: head/sys/arm/freescale/imx/imx6_machdep.c ============================================================================== --- head/sys/arm/freescale/imx/imx6_machdep.c Mon Nov 4 19:32:35 2013 (r257647) +++ head/sys/arm/freescale/imx/imx6_machdep.c Mon Nov 4 19:44:37 2013 (r257648) @@ -34,9 +34,12 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include + +#include +#include + #include #include #include @@ -112,7 +115,6 @@ cpu_reset(void) */ u_int imx_soc_type() { - const struct pmap_devmap *pd; uint32_t digprog, hwsoc; uint32_t *pcr; const uint32_t HWSOC_MX6SL = 0x60; @@ -131,10 +133,8 @@ u_int imx_soc_type() IMX6_ANALOG_DIGPROG_SOCTYPE_SHIFT; /*printf("digprog = 0x%08x\n", digprog);*/ if (hwsoc == HWSOC_MX6DL) { - pd = pmap_devmap_find_pa(SCU_CONFIG_PHYSADDR, 4); - if (pd != NULL) { - pcr = (uint32_t *)(pd->pd_va + - (SCU_CONFIG_PHYSADDR - pd->pd_pa)); + pcr = arm_devmap_ptov(SCU_CONFIG_PHYSADDR, 4); + if (pcr != NULL) { /*printf("scu config = 0x%08x\n", *pcr);*/ if ((*pcr & 0x03) == 0) { hwsoc = HWSOC_MX6SOLO; Modified: head/sys/arm/freescale/imx/imx_machdep.c ============================================================================== --- head/sys/arm/freescale/imx/imx_machdep.c Mon Nov 4 19:32:35 2013 (r257647) +++ head/sys/arm/freescale/imx/imx_machdep.c Mon Nov 4 19:44:37 2013 (r257648) @@ -39,6 +39,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -168,7 +169,6 @@ bus_dma_get_range_nb(void) void imx_wdog_cpu_reset(vm_offset_t wdcr_physaddr) { - const struct pmap_devmap *pd; volatile uint16_t * pcr; /* @@ -178,10 +178,9 @@ imx_wdog_cpu_reset(vm_offset_t wdcr_phys * reset) bit being set in the watchdog status register after the reset. * This is how software can distinguish a reset from a wdog timeout. */ - if ((pd = pmap_devmap_find_pa(wdcr_physaddr, 2)) == NULL) { + if ((pcr = arm_devmap_ptov(wdcr_physaddr, sizeof(*pcr))) == NULL) { printf("cpu_reset() can't find its control register... locking up now."); } else { - pcr = (uint16_t *)(pd->pd_va + (wdcr_physaddr - pd->pd_pa)); *pcr = WDOG_CR_WDE; } for (;;) Added: head/sys/arm/include/devmap.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/include/devmap.h Mon Nov 4 19:44:37 2013 (r257648) @@ -0,0 +1,46 @@ +/*- + * Copyright (c) 2013 Ian Lepore + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _MACHINE_DEVMAP_H_ +#define _MACHINE_DEVMAP_H_ + +/* + * Routines to translate between virtual and physical addresses within a region + * that is static-mapped by the devmap code. If the given address range isn't + * static-mapped, then ptov returns NULL and vtop returns DEVMAP_PADDR_NOTFOUND. + * The latter implies that you can't vtop just the last byte of physical address + * space. This is not as limiting as it might sound, because even if a device + * occupies the end of the physical address space, you're only prevented from + * doing vtop for that single byte. If you vtop a size bigger than 1 it works. + */ +#define DEVMAP_PADDR_NOTFOUND ((vm_paddr_t)(-1)) + +void * arm_devmap_ptov(vm_paddr_t _pa, vm_size_t _sz); +vm_paddr_t arm_devmap_vtop(void * _va, vm_size_t _sz); + +#endif Modified: head/sys/arm/include/fdt.h ============================================================================== --- head/sys/arm/include/fdt.h Mon Nov 4 19:32:35 2013 (r257647) +++ head/sys/arm/include/fdt.h Mon Nov 4 19:44:37 2013 (r257648) @@ -56,6 +56,8 @@ struct mem_region { vm_size_t mr_size; }; +struct pmap_devmap; + int fdt_localbus_devmap(phandle_t, struct pmap_devmap *, int, int *); int fdt_pci_devmap(phandle_t, struct pmap_devmap *devmap, vm_offset_t, vm_offset_t); Modified: head/sys/arm/include/pmap.h ============================================================================== --- head/sys/arm/include/pmap.h Mon Nov 4 19:32:35 2013 (r257647) +++ head/sys/arm/include/pmap.h Mon Nov 4 19:44:37 2013 (r257648) @@ -254,6 +254,7 @@ void pmap_bootstrap(vm_offset_t firstadd int pmap_change_attr(vm_offset_t, vm_size_t, int); void pmap_kenter(vm_offset_t va, vm_paddr_t pa); void pmap_kenter_nocache(vm_offset_t va, vm_paddr_t pa); +void pmap_kenter_device(vm_offset_t va, vm_paddr_t pa); void *pmap_kenter_temp(vm_paddr_t pa, int i); void pmap_kenter_user(vm_offset_t va, vm_paddr_t pa); vm_paddr_t pmap_kextract(vm_offset_t va); @@ -707,11 +708,7 @@ struct pmap_devmap { int pd_cache; /* cache attributes */ }; -const struct pmap_devmap *pmap_devmap_find_pa(vm_paddr_t, vm_size_t); -const struct pmap_devmap *pmap_devmap_find_va(vm_offset_t, vm_size_t); - void pmap_devmap_bootstrap(vm_offset_t, const struct pmap_devmap *); -void pmap_devmap_register(const struct pmap_devmap *); #define SECTION_CACHE 0x1 #define SECTION_PT 0x2 From owner-svn-src-head@FreeBSD.ORG Mon Nov 4 20:00:21 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id F0C48123; Mon, 4 Nov 2013 20:00:21 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DED922ECB; Mon, 4 Nov 2013 20:00:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA4K0L4Y016159; Mon, 4 Nov 2013 20:00:21 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA4K0LvG016156; Mon, 4 Nov 2013 20:00:21 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201311042000.rA4K0LvG016156@svn.freebsd.org> From: Ian Lepore Date: Mon, 4 Nov 2013 20:00:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257649 - in head/sys: conf dev/fdt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Nov 2013 20:00:22 -0000 Author: ian Date: Mon Nov 4 20:00:21 2013 New Revision: 257649 URL: http://svnweb.freebsd.org/changeset/base/257649 Log: This files should have been included in r257648. Modified: head/sys/conf/files.arm head/sys/dev/fdt/fdt_pci.c Modified: head/sys/conf/files.arm ============================================================================== --- head/sys/conf/files.arm Mon Nov 4 19:44:37 2013 (r257648) +++ head/sys/conf/files.arm Mon Nov 4 20:00:21 2013 (r257649) @@ -14,6 +14,7 @@ arm/arm/cpufunc_asm_armv4.S standard arm/arm/db_disasm.c optional ddb arm/arm/db_interface.c optional ddb arm/arm/db_trace.c optional ddb +arm/arm/devmap.c standard arm/arm/disassem.c optional ddb arm/arm/dump_machdep.c standard arm/arm/elf_machdep.c standard Modified: head/sys/dev/fdt/fdt_pci.c ============================================================================== --- head/sys/dev/fdt/fdt_pci.c Mon Nov 4 19:44:37 2013 (r257648) +++ head/sys/dev/fdt/fdt_pci.c Mon Nov 4 20:00:21 2013 (r257649) @@ -42,6 +42,9 @@ __FBSDID("$FreeBSD$"); #include #include +#if defined(__arm__) +#include +#endif #include "ofw_bus_if.h" #include "pcib_if.h" From owner-svn-src-head@FreeBSD.ORG Mon Nov 4 20:28:12 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C5E1BD82; Mon, 4 Nov 2013 20:28:12 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B2A3720C3; Mon, 4 Nov 2013 20:28:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA4KSCkK026851; Mon, 4 Nov 2013 20:28:12 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA4KSAgp026804; Mon, 4 Nov 2013 20:28:10 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201311042028.rA4KSAgp026804@svn.freebsd.org> From: Devin Teske Date: Mon, 4 Nov 2013 20:28:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257650 - in head/sys/boot: forth i386/loader X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Nov 2013 20:28:12 -0000 Author: dteske Date: Mon Nov 4 20:28:10 2013 New Revision: 257650 URL: http://svnweb.freebsd.org/changeset/base/257650 Log: Defer loading of kernel and modules if the beastie menu is enabled. Add a kernel selection menu to the beastie menu. List of kernels is taken from `kernels' in loader.conf(5) as a space (or comma) separated list of names to display (up to 9). If not set, default value is "kernel kernel.old". Does not validate that kernels exist because the next enhancement will be to allow selection of the root device. Discussed on: -current MFC after: 3 days Modified: head/sys/boot/forth/beastie.4th head/sys/boot/forth/loader.4th head/sys/boot/forth/loader.4th.8 head/sys/boot/forth/loader.conf head/sys/boot/forth/loader.conf.5 head/sys/boot/forth/loader.rc head/sys/boot/forth/menu-commands.4th head/sys/boot/forth/menu.4th head/sys/boot/forth/menu.rc head/sys/boot/forth/menusets.4th head/sys/boot/i386/loader/loader.rc Modified: head/sys/boot/forth/beastie.4th ============================================================================== --- head/sys/boot/forth/beastie.4th Mon Nov 4 20:00:21 2013 (r257649) +++ head/sys/boot/forth/beastie.4th Mon Nov 4 20:28:10 2013 (r257650) @@ -30,6 +30,8 @@ marker task-beastie.4th include /boot/delay.4th +only forth definitions also support-functions + variable logoX variable logoY @@ -275,7 +277,11 @@ variable logoY s" beastie_disable" getenv dup -1 <> if s" YES" compare-insensitive 0= if - exit + any_conf_read? if + load_kernel + load_modules + then + exit \ to autoboot (default) then else drop @@ -292,3 +298,5 @@ variable logoY delay_execute then ; + +only forth also Modified: head/sys/boot/forth/loader.4th ============================================================================== --- head/sys/boot/forth/loader.4th Mon Nov 4 20:00:21 2013 (r257649) +++ head/sys/boot/forth/loader.4th Mon Nov 4 20:28:10 2013 (r257650) @@ -44,6 +44,14 @@ include /boot/color.4th only forth also support-functions also builtins definitions +: bootmsg ( -- ) + loader_color? if + ." Booting..." cr + else + ." Booting..." cr + then +; + : try-menu-unset \ menu-unset may not be present s" beastie_disable" getenv @@ -71,12 +79,6 @@ only forth also support-functions also b : boot 0= if ( interpreted ) get_arguments then - loader_color? if - ." Booting..." cr - else - ." Booting..." cr - then - \ Unload only if a path was passed dup if >r over r> swap @@ -85,25 +87,25 @@ only forth also support-functions also b else s" kernelname" getenv? if ( a kernel has been loaded ) try-menu-unset - 1 boot exit + bootmsg 1 boot exit then load_kernel_and_modules ?dup if exit then try-menu-unset - 0 1 boot exit + bootmsg 0 1 boot exit then else s" kernelname" getenv? if ( a kernel has been loaded ) try-menu-unset - 1 boot exit + bootmsg 1 boot exit then load_kernel_and_modules ?dup if exit then try-menu-unset - 0 1 boot exit + bootmsg 0 1 boot exit then load_kernel_and_modules - ?dup 0= if 0 1 boot then + ?dup 0= if bootmsg 0 1 boot then ; \ ***** boot-conf @@ -129,8 +131,8 @@ include /boot/check-password.4th \ ***** start \ \ Initializes support.4th global variables, sets loader_conf_files, -\ process conf files, and, if any one such file was succesfully -\ read to the end, load kernel and modules. +\ processes conf files, and, if any one such file was succesfully +\ read to the end, loads kernel and modules. : start ( -- ) ( throws: abort & user-defined ) s" /boot/defaults/loader.conf" initialize Modified: head/sys/boot/forth/loader.4th.8 ============================================================================== --- head/sys/boot/forth/loader.4th.8 Mon Nov 4 20:00:21 2013 (r257649) +++ head/sys/boot/forth/loader.4th.8 Mon Nov 4 20:28:10 2013 (r257650) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 30, 2004 +.Dd October 17, 2013 .Dt LOADER.4TH 8 .Os .Sh NAME @@ -94,31 +94,35 @@ Reads .Pa /boot/defaults/loader.conf , all other .Xr loader.conf 5 -files specified in it, and then proceeds to boot as specified in them. -This +files specified in it, then loads the desired kernel and modules +.Pq if not already loaded . +After which you can use the +.Ic boot +or +.Ic autoboot +commmands or simply exit (provided +.Va autoboot_delay +is not set to NO) to boot the system. +.Ic start is the command used in the default .Pa /boot/loader.rc -file, and it uses the -.Ic autoboot -command (see -.Xr loader 8 ) , -so it can be stopped for further interaction with -.Xr loader 8 . +file +.Pq see Xr loader 8 . .Pp .It Ic initialize -Initialize the supporting library so commands can be used without -executing +Initialize the support library so commands can be used without executing .Ic start first. Like .Ic start , -reads +it reads .Pa /boot/defaults/loader.conf and all other .Xr loader.conf 5 -files specified in it. +files specified in it +.Pq but does not load kernel or modules . Returns a flag on the stack to indicate -if any configuration file was successfully loaded. +if any configuration files were successfully loaded. .Pp .It Ic read-conf Ar filename Reads and processes a Modified: head/sys/boot/forth/loader.conf ============================================================================== --- head/sys/boot/forth/loader.conf Mon Nov 4 20:00:21 2013 (r257649) +++ head/sys/boot/forth/loader.conf Mon Nov 4 20:28:10 2013 (r257650) @@ -59,6 +59,7 @@ entropy_cache_type="/boot/entropy" # escape to the loader prompt, set to # "NO" to disable autobooting #beastie_disable="NO" # Turn the beastie boot menu on and off +#kernels="kernel kernel.old" # Kernels to display in the boot menu #loader_logo="orbbw" # Desired logo: orbbw, orb, fbsdbw, beastiebw, beastie, none #comconsole_speed="9600" # Set the current serial console speed #console="vidconsole" # A comma separated list of console(s) Modified: head/sys/boot/forth/loader.conf.5 ============================================================================== --- head/sys/boot/forth/loader.conf.5 Mon Nov 4 20:00:21 2013 (r257649) +++ head/sys/boot/forth/loader.conf.5 Mon Nov 4 20:28:10 2013 (r257650) @@ -23,7 +23,7 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD$ -.Dd August 6, 2013 +.Dd October 18, 2013 .Dt LOADER.CONF 5 .Os .Sh NAME @@ -209,6 +209,9 @@ replacing it with character (useful for embedded products and such). .It Va kernel .Pq Dq kernel +.It Va kernels +.Pq Dq kernel kernel.old +Space or comma separated list of kernels to present in the boot menu. .It Va loader_conf_files .Pq Dq Pa /boot/loader.conf /boot/loader.conf.local .It Va splash_bmp_load Modified: head/sys/boot/forth/loader.rc ============================================================================== --- head/sys/boot/forth/loader.rc Mon Nov 4 20:00:21 2013 (r257649) +++ head/sys/boot/forth/loader.rc Mon Nov 4 20:28:10 2013 (r257650) @@ -5,6 +5,7 @@ include /boot/loader.4th \ Reads and processes loader.conf variables +\ NOTE: Change to `initialize' if you enable the below boot menu start \ Tests for password -- executes autoboot first if a password was defined Modified: head/sys/boot/forth/menu-commands.4th ============================================================================== --- head/sys/boot/forth/menu-commands.4th Mon Nov 4 20:00:21 2013 (r257649) +++ head/sys/boot/forth/menu-commands.4th Mon Nov 4 20:28:10 2013 (r257650) @@ -1,4 +1,4 @@ -\ Copyright (c) 2006-2012 Devin Teske +\ Copyright (c) 2006-2013 Devin Teske \ All rights reserved. \ \ Redistribution and use in source and binary forms, with or without @@ -30,6 +30,8 @@ include /boot/menusets.4th variable kernel_state variable root_state +0 kernel_state ! +0 root_state ! \ \ Boot @@ -279,21 +281,21 @@ variable root_state init_cyclestate ( n k -- n ) ; -: cycle_kernel ( N -- N TRUE ) - cycle_menuitem - menu-redraw - - \ Now we're going to make the change effective - - dup cycle_stateN @ - dup kernel_state ! \ save a copy for re-initialization - 48 + \ convert to ASCII numeral +: activate_kernel ( N -- N ) + dup cycle_stateN @ ( n -- n n2 ) + dup kernel_state ! ( n n2 -- n n2 ) \ copy for re-initialization + 48 + ( n n2 -- n n2' ) \ kernel_state to ASCII num s" set kernel=${kernel_prefix}${kernel[N]}${kernel_suffix}" - 36 +c! \ replace 'N' with ASCII numeral - evaluate \ sets $kernel to full kernel-path + 36 +c! ( n n2 c-addr/u -- n c-addr/u ) \ 'N' to ASCII num + evaluate ( n c-addr/u -- n ) \ sets $kernel to full kernel-path +; - TRUE \ loop menu again +: cycle_kernel ( N -- N TRUE ) + cycle_menuitem \ cycle cycle_stateN to next value + activate_kernel \ apply current cycle_stateN + menu-redraw \ redraw menu + TRUE \ loop menu again ; \ @@ -305,21 +307,21 @@ variable root_state init_cyclestate ( n k -- n ) ; -: cycle_root ( N -- N TRUE ) - cycle_menuitem - menu-redraw - - \ Now we're going to make the change effective - - dup cycle_stateN @ - dup root_state ! \ save a copy for re-initialization - 48 + \ convert to ASCII numeral +: activate_root ( N -- N ) + dup cycle_stateN @ ( n -- n n2 ) + dup root_state ! ( n n2 -- n n2 ) \ copy for re-initialization + 48 + ( n n2 -- n n2' ) \ root_state to ASCII num s" set root=${root_prefix}${root[N]}${root_suffix}" - 30 +c! \ replace 'N' with ASCII numeral - evaluate \ sets $root to full root-path + 30 +c! ( n n2 c-addr/u -- n c-addr/u ) \ 'N' to ASCII num + evaluate ( n c-addr/u -- n ) \ sets $root to full kernel-path +; - TRUE \ loop menu again +: cycle_root ( N -- N TRUE ) + cycle_menuitem \ cycle cycle_stateN to next value + activate_root \ apply current cycle_stateN + menu-redraw \ redraw menu + TRUE \ loop menu again ; \ Modified: head/sys/boot/forth/menu.4th ============================================================================== --- head/sys/boot/forth/menu.4th Mon Nov 4 20:00:21 2013 (r257649) +++ head/sys/boot/forth/menu.4th Mon Nov 4 20:28:10 2013 (r257650) @@ -70,6 +70,12 @@ variable menureboot variable menurebootadded variable menuacpi variable menuoptions +variable menukernel + +\ Parsing of kernels into menu-items +variable kernidx +variable kernlen +variable kernmenuidx \ Menu timer [count-down] variables variable menu_timeout_enabled \ timeout state (internal use only) @@ -109,14 +115,19 @@ variable cycle_state7 variable cycle_state8 \ Containers for storing the initial caption text -create init_text1 255 allot -create init_text2 255 allot -create init_text3 255 allot -create init_text4 255 allot -create init_text5 255 allot -create init_text6 255 allot -create init_text7 255 allot -create init_text8 255 allot +create init_text1 64 allot +create init_text2 64 allot +create init_text3 64 allot +create init_text4 64 allot +create init_text5 64 allot +create init_text6 64 allot +create init_text7 64 allot +create init_text8 64 allot + +\ Containers for parsing kernels into menu-items +create kerncapbuf 64 allot +create kerndefault 64 allot +create kernelsbuf 256 allot : +c! ( N C-ADDR/U K -- C-ADDR/U ) 3 pick 3 pick ( n c-addr/u k -- n c-addr/u k n c-addr ) @@ -124,45 +135,31 @@ create init_text8 255 allot rot drop ( n c-addr/u -- c-addr/u ) ; +: delim? ( C -- BOOL ) + dup 32 = ( c -- c bool ) \ [sp] space + over 9 = or ( c bool -- c bool ) \ [ht] horizontal tab + over 10 = or ( c bool -- c bool ) \ [nl] newline + over 13 = or ( c bool -- c bool ) \ [cr] carriage return + over [char] , = or ( c bool -- c bool ) \ comma + swap drop ( c bool -- bool ) \ return boolean +; + : menukeyN ( N -- ADDR ) s" menukeyN" 7 +c! evaluate ; : init_stateN ( N -- ADDR ) s" init_stateN" 10 +c! evaluate ; : toggle_stateN ( N -- ADDR ) s" toggle_stateN" 12 +c! evaluate ; : cycle_stateN ( N -- ADDR ) s" cycle_stateN" 11 +c! evaluate ; : init_textN ( N -- C-ADDR ) s" init_textN" 9 +c! evaluate ; -: str_loader_menu_frame ( -- C-ADDR/U ) s" loader_menu_frame" ; -: str_loader_menu_title ( -- C-ADDR/U ) s" loader_menu_title" ; -: str_loader_menu_title_align ( -- C-ADDR/U ) s" loader_menu_title_align" ; -: str_loader_menu_x ( -- C-ADDR/U ) s" loader_menu_x" ; -: str_loader_menu_y ( -- C-ADDR/U ) s" loader_menu_y" ; -: str_loader_menu_timeout_x ( -- C-ADDR/U ) s" loader_menu_timeout_x" ; -: str_loader_menu_timeout_y ( -- C-ADDR/U ) s" loader_menu_timeout_y" ; -: str_menu_init ( -- C-ADDR/U ) s" menu_init" ; -: str_menu_timeout_command ( -- C-ADDR/U ) s" menu_timeout_command" ; -: str_menu_reboot ( -- C-ADDR/U ) s" menu_reboot" ; -: str_menu_acpi ( -- C-ADDR/U ) s" menu_acpi" ; -: str_menu_options ( -- C-ADDR/U ) s" menu_options" ; -: str_menu_optionstext ( -- C-ADDR/U ) s" menu_optionstext" ; - -: str_menu_init[x] ( -- C-ADDR/U ) s" menu_init[x]" ; -: str_menu_command[x] ( -- C-ADDR/U ) s" menu_command[x]" ; -: str_menu_caption[x] ( -- C-ADDR/U ) s" menu_caption[x]" ; -: str_ansi_caption[x] ( -- C-ADDR/U ) s" ansi_caption[x]" ; -: str_menu_keycode[x] ( -- C-ADDR/U ) s" menu_keycode[x]" ; -: str_toggled_text[x] ( -- C-ADDR/U ) s" toggled_text[x]" ; -: str_toggled_ansi[x] ( -- C-ADDR/U ) s" toggled_ansi[x]" ; -: str_menu_caption[x][y] ( -- C-ADDR/U ) s" menu_caption[x][y]" ; -: str_ansi_caption[x][y] ( -- C-ADDR/U ) s" ansi_caption[x][y]" ; - -: menu_init[x] ( N -- C-ADDR/U ) str_menu_init[x] 10 +c! ; -: menu_command[x] ( N -- C-ADDR/U ) str_menu_command[x] 13 +c! ; -: menu_caption[x] ( N -- C-ADDR/U ) str_menu_caption[x] 13 +c! ; -: ansi_caption[x] ( N -- C-ADDR/U ) str_ansi_caption[x] 13 +c! ; -: menu_keycode[x] ( N -- C-ADDR/U ) str_menu_keycode[x] 13 +c! ; -: toggled_text[x] ( N -- C-ADDR/U ) str_toggled_text[x] 13 +c! ; -: toggled_ansi[x] ( N -- C-ADDR/U ) str_toggled_ansi[x] 13 +c! ; -: menu_caption[x][y] ( N M -- C-ADDR/U ) str_menu_caption[x][y] 16 +c! 13 +c! ; -: ansi_caption[x][y] ( N M -- C-ADDR/U ) str_ansi_caption[x][y] 16 +c! 13 +c! ; +: kernel[x] ( N -- C-ADDR/U ) s" kernel[x]" 7 +c! ; +: menu_init[x] ( N -- C-ADDR/U ) s" menu_init[x]" 10 +c! ; +: menu_command[x] ( N -- C-ADDR/U ) s" menu_command[x]" 13 +c! ; +: menu_caption[x] ( N -- C-ADDR/U ) s" menu_caption[x]" 13 +c! ; +: ansi_caption[x] ( N -- C-ADDR/U ) s" ansi_caption[x]" 13 +c! ; +: menu_keycode[x] ( N -- C-ADDR/U ) s" menu_keycode[x]" 13 +c! ; +: toggled_text[x] ( N -- C-ADDR/U ) s" toggled_text[x]" 13 +c! ; +: toggled_ansi[x] ( N -- C-ADDR/U ) s" toggled_ansi[x]" 13 +c! ; +: menu_caption[x][y] ( N M -- C-ADDR/U ) s" menu_caption[x][y]" 16 +c! 13 +c! ; +: ansi_caption[x][y] ( N M -- C-ADDR/U ) s" ansi_caption[x][y]" 16 +c! 13 +c! ; : arch-i386? ( -- BOOL ) \ Returns TRUE (-1) on i386, FALSE (0) otherwise. s" arch-i386" environment? dup if @@ -355,12 +352,9 @@ create init_text8 255 allot then ( n addr 0 n 48 -- n addr 0 c-addr/u ) getenv dup -1 = if - \ This is highly unlikely to occur, but to make - \ sure that things move along smoothly, allocate - \ a temporary NULL string - - drop ( n addr 0 -1 -- n addr 0 ) \ getenv cruft - s" " ( n addr 0 -- n addr 0 c-addr/u ) + \ Highly unlikely to occur, but to ensure things move + \ along smoothly, allocate a temporary NULL string + drop ( cruft ) s" " then then @@ -418,15 +412,15 @@ create init_text8 255 allot acpipresent? if acpienabled? if loader_color? if - str_toggled_ansi[x] + s" toggled_ansi[x]" else - str_toggled_text[x] + s" toggled_text[x]" then else loader_color? if - str_ansi_caption[x] + s" ansi_caption[x]" else - str_menu_caption[x] + s" menu_caption[x]" then then else @@ -438,17 +432,198 @@ create init_text8 255 allot then ; +\ This function parses $kernels into variables that are used by the menu to +\ display wich kernel to boot when the [overloaded] `boot' word is interpreted. +\ Used internally by menu-create, you need not (nor should you) call this +\ directly. +\ +: parse-kernels ( N -- ) \ kernidx + kernidx ! ( n -- ) \ store provided `x' value + [char] 0 kernmenuidx ! \ initialize `y' value for menu_caption[x][y] + + \ Attempt to get a list of kernels, fall back to sensible default + s" kernels" getenv dup -1 = if + drop ( cruft ) + s" kernel kernel.old" + then ( -- c-addr/u ) + + \ Check to see if the user has altered $kernel by comparing it against + \ $kernel[N] where N is kernel_state (the actively displayed kernel). + s" kernel_state" evaluate @ 48 + s" kernel[N]" 7 +c! getenv + dup -1 <> if + s" kernel" getenv dup -1 = if + drop ( cruft ) s" " + then + 2swap 2over compare 0= if + 2drop FALSE ( skip below conditional ) + else \ User has changed $kernel + TRUE ( slurp in new value ) + then + else \ We haven't yet parsed $kernels into $kernel[N] + drop ( getenv cruft ) + s" kernel" getenv dup -1 = if + drop ( cruft ) s" " + then + TRUE ( slurp in initial value ) + then ( c-addr/u -- c-addr/u c-addr/u,-1 | 0 ) + if \ slurp new value into kerndefault + kerndefault 1+ 0 2swap strcat swap 1- c! + then + + \ Clear out existing parsed-kernels + kernidx @ [char] 0 + begin + dup kernel[x] unsetenv + 2dup menu_caption[x][y] unsetenv + 2dup ansi_caption[x][y] unsetenv + 1+ dup [char] 8 > + until + 2drop + + \ Step through the string until we find the end + begin + 0 kernlen ! \ initialize length of value + + \ Skip leading whitespace and/or comma delimiters + begin + dup 0<> if + over c@ delim? ( c-addr/u -- c-addr/u bool ) + else + false ( c-addr/u -- c-addr/u bool ) + then + while + 1- swap 1+ swap ( c-addr/u -- c-addr'/u' ) + repeat + ( c-addr/u -- c-addr'/u' ) + + dup 0= if \ end of string while eating whitespace + 2drop ( c-addr/u -- ) + kernmenuidx @ [char] 0 <> if \ found at least one + exit \ all done + then + + \ No entries in $kernels; use $kernel instead + s" kernel" getenv dup -1 = if + drop ( cruft ) s" " + then ( -- c-addr/u ) + dup kernlen ! \ store entire value length as kernlen + else + \ We're still within $kernels parsing toward the end; + \ find delimiter/end to determine kernlen + 2dup ( c-addr/u -- c-addr/u c-addr/u ) + begin dup 0<> while + over c@ delim? if + drop 0 ( break ) \ found delimiter + else + kernlen @ 1+ kernlen ! \ incrememnt + 1- swap 1+ swap \ c-addr++ u-- + then + repeat + 2drop ( c-addr/u c-addr'/u' -- c-addr/u ) + + \ If this is the first entry, compare it to $kernel + \ If different, then insert $kernel beforehand + kernmenuidx @ [char] 0 = if + over kernlen @ kerndefault count compare if + kernelsbuf 0 kerndefault count strcat + s" ," strcat 2swap strcat + kerndefault count swap drop kernlen ! + then + then + then + ( c-addr/u -- c-addr'/u' ) + + \ At this point, we should have something on the stack to store + \ as the next kernel menu option; start assembling variables + + over kernlen @ ( c-addr/u -- c-addr/u c-addr/u2 ) + + \ Assign first to kernel[x] + 2dup kernmenuidx @ kernel[x] setenv + + \ Assign second to menu_caption[x][y] + kerncapbuf 0 s" [K]ernel: " strcat + 2over strcat + kernidx @ kernmenuidx @ menu_caption[x][y] + setenv + + \ Assign third to ansi_caption[x][y] + kerncapbuf 0 s" Kernel: " strcat + kernmenuidx @ [char] 0 = if + s" default/" + else + s" " + then strcat + 2over strcat + s" " strcat + kernidx @ kernmenuidx @ ansi_caption[x][y] + setenv + + 2drop ( c-addr/u c-addr/u2 -- c-addr/u ) + + kernmenuidx @ 1+ dup kernmenuidx ! [char] 8 > if + 2drop ( c-addr/u -- ) exit + then + + kernlen @ - swap kernlen @ + swap ( c-addr/u -- c-addr'/u' ) + again +; + +\ This function goes through the kernels that were discovered by the +\ parse-kernels function [above], adding " (# of #)" text to the end of each +\ caption. +\ +: tag-kernels ( -- ) + kernidx @ ( -- x ) dup 0= if exit then + [char] 0 s" (Y of Z)" ( x -- x y c-addr/u ) + kernmenuidx @ -rot 7 +c! \ Replace 'Z' with number of kernels parsed + begin + 2 pick 1+ -rot 2 +c! \ Replace 'Y' with current ASCII num + + 2over menu_caption[x][y] getenv dup -1 <> if + 2dup + 1- c@ [char] ) = if + 2drop \ Already tagged + else + kerncapbuf 0 2swap strcat + 2over strcat + 5 pick 5 pick menu_caption[x][y] setenv + then + else + drop ( getenv cruft ) + then + + 2over ansi_caption[x][y] getenv dup -1 <> if + 2dup + 1- c@ [char] ) = if + 2drop \ Already tagged + else + kerncapbuf 0 2swap strcat + 2over strcat + 5 pick 5 pick ansi_caption[x][y] setenv + then + else + drop ( getenv cruft ) + then + + rot 1+ dup [char] 8 > if + -rot 2drop TRUE ( break ) + else + -rot FALSE + then + until + 2drop ( x y -- ) +; + \ This function creates the list of menu items. This function is called by the \ menu-display function. You need not be call it directly. \ : menu-create ( -- ) \ Print the frame caption at (x,y) - str_loader_menu_title getenv dup -1 = if + s" loader_menu_title" getenv dup -1 = if drop s" Welcome to FreeBSD" then TRUE ( use default alignment ) - str_loader_menu_title_align getenv dup -1 <> if + s" loader_menu_title_align" getenv dup -1 <> if 2dup s" left" compare-insensitive 0= if ( 1 ) 2drop ( c-addr/u ) drop ( bool ) menuX @ menuY @ 1- @@ -470,7 +645,7 @@ create init_text8 255 allot \ constructed dynamically -- as this function could conceivably set \ the remaining environment variables to construct the menu entirely). \ - str_menu_init getenv dup -1 <> if + s" menu_init" getenv dup -1 <> if evaluate else drop @@ -495,7 +670,7 @@ create init_text8 255 allot \ Initialize the ACPI option status. \ 0 menuacpi ! - str_menu_acpi getenv -1 <> if + s" menu_acpi" getenv -1 <> if c@ dup 48 > over 57 < and if ( '1' <= c1 <= '8' ) menuacpi ! arch-i386? if acpipresent? if @@ -511,10 +686,51 @@ create init_text8 255 allot then \ + \ Initialize kernel captions after parsing $kernels + \ + 0 menukernel ! + s" menu_kernel" getenv -1 <> if + c@ dup 48 > over 57 < and if ( '1' <= c1 <= '8' ) + dup menukernel ! + dup parse-kernels tag-kernels + + \ Get the current cycle state (entry to use) + s" kernel_state" evaluate @ 48 + ( n -- n y ) + + \ If state is invalid, reset + dup kernmenuidx @ 1- > if + drop [char] 0 ( n y -- n 48 ) + 0 s" kernel_state" evaluate ! + over s" init_kernel" evaluate drop + then + + \ Set the current non-ANSI caption + 2dup swap dup ( n y -- n y y n n ) + s" set menu_caption[x]=$menu_caption[x][y]" + 17 +c! 34 +c! 37 +c! evaluate + ( n y y n n c-addr/u -- n y ) + + \ Set the current ANSI caption + 2dup swap dup ( n y -- n y y n n ) + s" set ansi_caption[x]=$ansi_caption[x][y]" + 17 +c! 34 +c! 37 +c! evaluate + ( n y y n n c-addr/u -- n y ) + + \ Initialize cycle state from stored value + 48 - ( n y -- n k ) + s" init_cyclestate" evaluate ( n k -- n ) + + \ Set $kernel to $kernel[y] + s" activate_kernel" evaluate ( n -- n ) + then + drop + then + + \ \ Initialize the menu_options visual separator. \ 0 menuoptions ! - str_menu_options getenv -1 <> if + s" menu_options" getenv -1 <> if c@ dup 48 > over 57 < and if ( '1' <= c1 <= '8' ) menuoptions ! else @@ -534,7 +750,7 @@ create init_text8 255 allot \ If the "Options:" separator, print it. dup menuoptions @ = if \ Optionally add a reboot option to the menu - str_menu_reboot getenv -1 <> if + s" menu_reboot" getenv -1 <> if drop s" Reboot" printmenuitem menureboot ! true menurebootadded ! @@ -544,7 +760,7 @@ create init_text8 255 allot menurow @ 2 + menurow ! menurow @ menuY @ + at-xy - str_menu_optionstext getenv dup -1 <> if + s" menu_optionstext" getenv dup -1 <> if type else drop ." Options:" @@ -603,7 +819,7 @@ create init_text8 255 allot \ Optionally add a reboot option to the menu menurebootadded @ true <> if - str_menu_reboot getenv -1 <> if + s" menu_reboot" getenv -1 <> if drop \ no need for the value s" Reboot" \ menu caption (required by printmenuitem) @@ -684,7 +900,7 @@ create init_text8 255 allot \ (user did not cancel by pressing ANY \ key) - str_menu_timeout_command getenv dup + s" menu_timeout_command" getenv dup -1 = if drop \ clean-up else @@ -758,7 +974,7 @@ create init_text8 255 allot 0 menurow ! \ Initialize the starting position for the menu \ Assign configuration values - str_loader_menu_y getenv dup -1 = if + s" loader_menu_y" getenv dup -1 = if drop \ no custom row position menu_default_y else @@ -768,7 +984,7 @@ create init_text8 255 allot then then menuY ! - str_loader_menu_x getenv dup -1 = if + s" loader_menu_x" getenv dup -1 = if drop \ no custom column position menu_default_x else @@ -781,7 +997,7 @@ create init_text8 255 allot \ Interpret a custom frame type for the menu TRUE ( draw a box? default yes, but might be altered below ) - str_loader_menu_frame getenv dup -1 = if ( 1 ) + s" loader_menu_frame" getenv dup -1 = if ( 1 ) drop \ no custom frame type else ( 1 ) 2dup s" single" compare-insensitive 0= if ( 2 ) f_single ( see frames.4th ) @@ -804,7 +1020,7 @@ create init_text8 255 allot 0 menu_timeout_enabled ! \ start with automatic timeout disabled \ check indication that automatic execution after delay is requested - str_menu_timeout_command getenv -1 <> if ( Addr C -1 -- | Addr ) + s" menu_timeout_command" getenv -1 <> if ( Addr C -1 -- | Addr ) drop ( just testing existence right now: Addr -- ) \ initialize state variables @@ -840,7 +1056,7 @@ create init_text8 255 allot menu_timeout_enabled @ 1 = if \ read custom column position (if set) - str_loader_menu_timeout_x getenv dup -1 = if + s" loader_menu_timeout_x" getenv dup -1 = if drop \ no custom column position menu_timeout_default_x \ use default setting else @@ -852,7 +1068,7 @@ create init_text8 255 allot menu_timeout_x ! ( store value on stack from above ) \ read custom row position (if set) - str_loader_menu_timeout_y getenv dup -1 = if + s" loader_menu_timeout_y" getenv dup -1 = if drop \ no custom row position menu_timeout_default_y \ use default setting else @@ -1005,12 +1221,13 @@ create init_text8 255 allot until drop \ iterator - str_menu_timeout_command unsetenv \ menu timeout command - str_menu_reboot unsetenv \ Reboot menu option flag - str_menu_acpi unsetenv \ ACPI menu option flag - str_menu_options unsetenv \ Options separator flag - str_menu_optionstext unsetenv \ separator display text - str_menu_init unsetenv \ menu initializer + s" menu_timeout_command" unsetenv \ menu timeout command + s" menu_reboot" unsetenv \ Reboot menu option flag + s" menu_acpi" unsetenv \ ACPI menu option flag + s" menu_kernel" unsetenv \ Kernel menu option flag + s" menu_options" unsetenv \ Options separator flag + s" menu_optionstext" unsetenv \ separator display text + s" menu_init" unsetenv \ menu initializer 0 menureboot ! 0 menuacpi ! Modified: head/sys/boot/forth/menu.rc ============================================================================== --- head/sys/boot/forth/menu.rc Mon Nov 4 20:00:21 2013 (r257649) +++ head/sys/boot/forth/menu.rc Mon Nov 4 20:28:10 2013 (r257650) @@ -55,10 +55,14 @@ set mainmenu_reboot \ set mainmenu_options=5 -set mainmenu_caption[5]="Configure Boot [O]ptions..." -set mainmenu_command[5]="2 goto_menu" -set mainmenu_keycode[5]=111 -set mainansi_caption[5]="Configure Boot Options..." +set mainmenu_kernel=5 +set mainmenu_command[5]="cycle_kernel" +set mainmenu_keycode[5]=107 + +set mainmenu_caption[6]="Configure Boot [O]ptions..." +set mainmenu_command[6]="2 goto_menu" +set mainmenu_keycode[6]=111 +set mainansi_caption[6]="Configure Boot Options..." \ \ BOOT OPTIONS MENU Modified: head/sys/boot/forth/menusets.4th ============================================================================== --- head/sys/boot/forth/menusets.4th Mon Nov 4 20:00:21 2013 (r257649) +++ head/sys/boot/forth/menusets.4th Mon Nov 4 20:28:10 2013 (r257650) @@ -366,6 +366,7 @@ create menuset_y 1 allot \ menuset1_command[x] -> menu_command[x] \ menuset1_init -> ``evaluated'' \ menuset1_init[x] -> menu_init[x] + \ menuset1_kernel -> menu_kernel \ menuset1_keycode[x] -> menu_keycode[x] \ menuset1_options -> menu_options \ menuset1_optionstext -> menu_optionstext @@ -382,6 +383,7 @@ create menuset_y 1 allot \ {name}menu_command[x] -> menu_command[x] \ {name}menu_init -> ``evaluated'' \ {name}menu_init[x] -> menu_init[x] + \ {name}menu_kernel -> menu_kernel \ {name}menu_keycode[x] -> menu_keycode[x] \ {name}menu_options -> menu_options \ {name}menu_optionstext -> menu_optionstext @@ -520,6 +522,10 @@ create menuset_y 1 allot s" set var=acpi" evaluate menuset-loadmenuvar + \ ... menu_kernel ... + s" set var=kernel" evaluate + menuset-loadmenuvar + \ ... menu_options ... s" set var=options" evaluate menuset-loadmenuvar @@ -597,6 +603,7 @@ create menuset_y 1 allot s" set var=acpi" evaluate menuset-unloadmenuvar s" set var=init" evaluate menuset-unloadmenuvar + s" set var=kernel" evaluate menuset-unloadmenuvar s" set var=options" evaluate menuset-unloadmenuvar s" set var=optionstext" evaluate menuset-unloadmenuvar s" set var=reboot" evaluate menuset-unloadmenuvar Modified: head/sys/boot/i386/loader/loader.rc ============================================================================== --- head/sys/boot/i386/loader/loader.rc Mon Nov 4 20:00:21 2013 (r257649) +++ head/sys/boot/i386/loader/loader.rc Mon Nov 4 20:28:10 2013 (r257650) @@ -5,7 +5,7 @@ include /boot/loader.4th \ Reads and processes loader.conf variables -start +initialize \ Tests for password -- executes autoboot first if a password was defined check-password From owner-svn-src-head@FreeBSD.ORG Mon Nov 4 21:06:22 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 88FB9F57; Mon, 4 Nov 2013 21:06:22 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7683722DC; Mon, 4 Nov 2013 21:06:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA4L6Mpq040577; Mon, 4 Nov 2013 21:06:22 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA4L6MTI040576; Mon, 4 Nov 2013 21:06:22 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201311042106.rA4L6MTI040576@svn.freebsd.org> From: Navdeep Parhar Date: Mon, 4 Nov 2013 21:06:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257654 - head/sys/dev/cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Nov 2013 21:06:22 -0000 Author: np Date: Mon Nov 4 21:06:21 2013 New Revision: 257654 URL: http://svnweb.freebsd.org/changeset/base/257654 Log: cxgbe(4): Exclude MPS_RPLC_MAP_CTL (0x11114) from the register dump. Turns out it's a write-only register with strange side effects on read. Submitted by: gnn MFC after: 3 days Modified: head/sys/dev/cxgbe/t4_main.c Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Mon Nov 4 20:38:32 2013 (r257653) +++ head/sys/dev/cxgbe/t4_main.c Mon Nov 4 21:06:21 2013 (r257654) @@ -3401,7 +3401,8 @@ t4_get_regs(struct adapter *sc, struct t 0xd004, 0xd03c, 0xdfc0, 0xdfe0, 0xe000, 0xea7c, - 0xf000, 0x11190, + 0xf000, 0x11110, + 0x11118, 0x11190, 0x19040, 0x1906c, 0x19078, 0x19080, 0x1908c, 0x19124, @@ -3607,7 +3608,8 @@ t4_get_regs(struct adapter *sc, struct t 0xd004, 0xd03c, 0xdfc0, 0xdfe0, 0xe000, 0x11088, - 0x1109c, 0x1117c, + 0x1109c, 0x11110, + 0x11118, 0x1117c, 0x11190, 0x11204, 0x19040, 0x1906c, 0x19078, 0x19080, From owner-svn-src-head@FreeBSD.ORG Mon Nov 4 21:27:22 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 19D36937; Mon, 4 Nov 2013 21:27:22 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 077BE2433; Mon, 4 Nov 2013 21:27:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA4LRLYr047686; Mon, 4 Nov 2013 21:27:21 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA4LRLlv047685; Mon, 4 Nov 2013 21:27:21 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201311042127.rA4LRLlv047685@svn.freebsd.org> From: Joel Dahl Date: Mon, 4 Nov 2013 21:27:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257655 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Nov 2013 21:27:22 -0000 Author: joel (doc committer) Date: Mon Nov 4 21:27:21 2013 New Revision: 257655 URL: http://svnweb.freebsd.org/changeset/base/257655 Log: Remove superfluous paragraph macro and add missing "the". Modified: head/share/man/man4/rights.4 Modified: head/share/man/man4/rights.4 ============================================================================== --- head/share/man/man4/rights.4 Mon Nov 4 21:06:21 2013 (r257654) +++ head/share/man/man4/rights.4 Mon Nov 4 21:27:21 2013 (r257655) @@ -69,7 +69,6 @@ type is used to store list of capability The .Xr cap_rights_init 3 family of functions should be used to manage the structure. -.Pp .Sh RIGHTS The following rights may be specified in a rights mask: .Bl -tag -width CAP_EXTATTR_DELETE @@ -668,7 +667,7 @@ Project. .Sh AUTHORS This manual page was created by .An Pawel Jakub Dawidek Aq pawel@dawidek.net -under sponsorship from the FreeBSD Foundation based on +under sponsorship from the FreeBSD Foundation based on the .Xr cap_new 2 manual page by .An "Robert Watson" Aq rwatson@FreeBSD.org . From owner-svn-src-head@FreeBSD.ORG Mon Nov 4 21:28:37 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 659A2A8E; Mon, 4 Nov 2013 21:28:37 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 530572447; Mon, 4 Nov 2013 21:28:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA4LSbFY047856; Mon, 4 Nov 2013 21:28:37 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA4LSbeq047855; Mon, 4 Nov 2013 21:28:37 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201311042128.rA4LSbeq047855@svn.freebsd.org> From: Joel Dahl Date: Mon, 4 Nov 2013 21:28:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257656 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Nov 2013 21:28:37 -0000 Author: joel (doc committer) Date: Mon Nov 4 21:28:36 2013 New Revision: 257656 URL: http://svnweb.freebsd.org/changeset/base/257656 Log: mdoc: remove EOL whitespace. Modified: head/share/man/man4/altera_atse.4 Modified: head/share/man/man4/altera_atse.4 ============================================================================== --- head/share/man/man4/altera_atse.4 Mon Nov 4 21:27:21 2013 (r257655) +++ head/share/man/man4/altera_atse.4 Mon Nov 4 21:28:36 2013 (r257656) @@ -64,7 +64,7 @@ MegaCore. .Sh HARDWARE The current version of the .Nm -driver supports the Ethernet MegaCore as described in version 11.1 of +driver supports the Ethernet MegaCore as described in version 11.1 of Altera's documentation when the device is configured with internal FIFOs. .Sh SEE ALSO .Xr miibus 4 , From owner-svn-src-head@FreeBSD.ORG Mon Nov 4 21:32:07 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id AE818FE0; Mon, 4 Nov 2013 21:32:07 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9C74724BE; Mon, 4 Nov 2013 21:32:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA4LW7Kb050397; Mon, 4 Nov 2013 21:32:07 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA4LW7Rg050396; Mon, 4 Nov 2013 21:32:07 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201311042132.rA4LW7Rg050396@svn.freebsd.org> From: Sean Bruno Date: Mon, 4 Nov 2013 21:32:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257657 - head/cddl/contrib/opensolaris/common/ctf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Nov 2013 21:32:07 -0000 Author: sbruno Date: Mon Nov 4 21:32:07 2013 New Revision: 257657 URL: http://svnweb.freebsd.org/changeset/base/257657 Log: Quiesce warning assigning to void * from const ctf_header_t * by explicity casting to void * before assignment. Submitted as Illumos issue 4287 Modified: head/cddl/contrib/opensolaris/common/ctf/ctf_create.c Modified: head/cddl/contrib/opensolaris/common/ctf/ctf_create.c ============================================================================== --- head/cddl/contrib/opensolaris/common/ctf/ctf_create.c Mon Nov 4 21:28:36 2013 (r257656) +++ head/cddl/contrib/opensolaris/common/ctf/ctf_create.c Mon Nov 4 21:32:07 2013 (r257657) @@ -65,7 +65,7 @@ ctf_create(int *errp) cts.cts_name = _CTF_SECTION; cts.cts_type = SHT_PROGBITS; cts.cts_flags = 0; - cts.cts_data = &hdr; + cts.cts_data = (void *)&hdr; cts.cts_size = sizeof (hdr); cts.cts_entsize = 1; cts.cts_offset = 0; From owner-svn-src-head@FreeBSD.ORG Mon Nov 4 21:43:59 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A2ABD4DA; Mon, 4 Nov 2013 21:43:59 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5DD1F2565; Mon, 4 Nov 2013 21:43:59 +0000 (UTC) Received: from [192.168.0.15] (coleburn.home.andric.com [192.168.0.15]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 8D3305C43; Mon, 4 Nov 2013 22:43:50 +0100 (CET) Content-Type: multipart/signed; boundary="Apple-Mail=_4A5DE038-66FC-4E09-99F7-83E95AABDF46"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 7.0 \(1816\)) Subject: Re: svn commit: r257645 - head/gnu/lib/libgcc From: Dimitry Andric In-Reply-To: <201311041815.rA4IFjwO081492@svn.freebsd.org> Date: Mon, 4 Nov 2013 22:43:40 +0100 Message-Id: <57710455-9B81-47FF-926B-1075EB6F4290@FreeBSD.org> References: <201311041815.rA4IFjwO081492@svn.freebsd.org> To: Sean Bruno X-Mailer: Apple Mail (2.1816) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Nov 2013 21:43:59 -0000 --Apple-Mail=_4A5DE038-66FC-4E09-99F7-83E95AABDF46 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 04 Nov 2013, at 19:15, Sean Bruno wrote: > Author: sbruno > Date: Mon Nov 4 18:15:45 2013 > New Revision: 257645 > URL: http://svnweb.freebsd.org/changeset/base/257645 >=20 > Log: > Quiesce warning around gcc_assert() for an inline macro that uses > a static variable. This code has been moved around in gcc, but is = still in > use in the latest trunk version of the compiler. >=20 > gnu/lib/libgcc/../../../contrib/gcc/unwind-dw2.c:208:36: > warning: static variable 'dwarf_reg_size_table' is used in an = inline > function with external linkage [-Wstatic-in-inline] > gcc_assert (index < (int) sizeof(dwarf_reg_size_table)); The warning is actually correct, since _Unwind_SetGR() is an extern inline function (although it is not explicitly declared as such), but it does access a static variable. It would probably be safest to make the variable non-static instead, since the function itself cannot be changed to static inline. -Dimitry --Apple-Mail=_4A5DE038-66FC-4E09-99F7-83E95AABDF46 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.22 (Darwin) iEYEARECAAYFAlJ4FRMACgkQsF6jCi4glqO4igCg9Vr9wCaeelvd6UebQQi8eBbM 3sEAn3lkNntcFJC6TROOsK2f+eANUvcB =w4Rn -----END PGP SIGNATURE----- --Apple-Mail=_4A5DE038-66FC-4E09-99F7-83E95AABDF46-- From owner-svn-src-head@FreeBSD.ORG Mon Nov 4 21:54:56 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D2185743; Mon, 4 Nov 2013 21:54:56 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C00942627; Mon, 4 Nov 2013 21:54:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA4LsuB3057139; Mon, 4 Nov 2013 21:54:56 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA4LsuLc057138; Mon, 4 Nov 2013 21:54:56 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201311042154.rA4LsuLc057138@svn.freebsd.org> From: Dimitry Andric Date: Mon, 4 Nov 2013 21:54:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257658 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Nov 2013 21:54:56 -0000 Author: dim Date: Mon Nov 4 21:54:56 2013 New Revision: 257658 URL: http://svnweb.freebsd.org/changeset/base/257658 Log: For C++ programs, don't emit any explicit dependency to libstdc++.a or libc++.a during the early build stages (bootstrap-tools, build-tools, cross-tools), since it is not possible to know in advance which C++ library is available on the host system. Instead, just use the bootstrap compiler's built-in default. This should eventually make it possible to build stable/9 on head, or on stable/10, which ship without libstdc++ by default. X-MFC-With: 255431 MFC after: 3 days Modified: head/share/mk/bsd.prog.mk Modified: head/share/mk/bsd.prog.mk ============================================================================== --- head/share/mk/bsd.prog.mk Mon Nov 4 21:32:07 2013 (r257657) +++ head/share/mk/bsd.prog.mk Mon Nov 4 21:54:56 2013 (r257658) @@ -172,7 +172,7 @@ _EXTRADEPEND: .endif .else echo ${PROG}: ${LIBC} ${DPADD} >> ${DEPENDFILE} -.if defined(PROG_CXX) +.if defined(PROG_CXX) && !defined(EARLY_BUILD) .if ${MK_CLANG_IS_CC} != "no" && empty(CXXFLAGS:M-stdlib=libstdc++) echo ${PROG}: ${LIBCPLUSPLUS} >> ${DEPENDFILE} .else From owner-svn-src-head@FreeBSD.ORG Mon Nov 4 22:45:32 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id E787C37E; Mon, 4 Nov 2013 22:45:32 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D218028CD; Mon, 4 Nov 2013 22:45:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA4MjWbW074202; Mon, 4 Nov 2013 22:45:32 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA4MjQw1074165; Mon, 4 Nov 2013 22:45:26 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201311042245.rA4MjQw1074165@svn.freebsd.org> From: Ian Lepore Date: Mon, 4 Nov 2013 22:45:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257660 - in head/sys: arm/allwinner arm/arm arm/at91 arm/broadcom/bcm2835 arm/econa arm/freescale/imx arm/include arm/lpc arm/mv arm/rockchip arm/s3c2xx0 arm/sa11x0 arm/samsung/exynos ... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Nov 2013 22:45:33 -0000 Author: ian Date: Mon Nov 4 22:45:26 2013 New Revision: 257660 URL: http://svnweb.freebsd.org/changeset/base/257660 Log: Move remaining code and data related to static device mapping into the new devmap.[ch] files. Emphasize the MD nature of these things by using the prefix arm_devmap_ on the function and type names (already a few of these things found their way into MI code, hopefully it will be harder to do by accident in the future). Modified: head/sys/arm/allwinner/a10_machdep.c head/sys/arm/arm/devmap.c head/sys/arm/arm/machdep.c head/sys/arm/at91/at91.c head/sys/arm/at91/at91_machdep.c head/sys/arm/broadcom/bcm2835/bcm2835_machdep.c head/sys/arm/econa/econa_machdep.c head/sys/arm/freescale/imx/imx_machdep.c head/sys/arm/include/devmap.h head/sys/arm/include/fdt.h head/sys/arm/include/machdep.h head/sys/arm/include/pmap.h head/sys/arm/lpc/lpc_machdep.c head/sys/arm/mv/mv_localbus.c head/sys/arm/mv/mv_machdep.c head/sys/arm/mv/mvvar.h head/sys/arm/rockchip/rk30xx_machdep.c head/sys/arm/s3c2xx0/s3c24x0_machdep.c head/sys/arm/sa11x0/assabet_machdep.c head/sys/arm/samsung/exynos/exynos5_machdep.c head/sys/arm/tegra/tegra2_machdep.c head/sys/arm/ti/ti_machdep.c head/sys/arm/versatile/versatile_machdep.c head/sys/arm/xilinx/zy7_machdep.c head/sys/arm/xscale/i80321/ep80219_machdep.c head/sys/arm/xscale/i80321/iq31244_machdep.c head/sys/arm/xscale/i8134x/crb_machdep.c head/sys/arm/xscale/ixp425/avila_machdep.c head/sys/arm/xscale/pxa/pxa_machdep.c head/sys/dev/fdt/fdt_pci.c Modified: head/sys/arm/allwinner/a10_machdep.c ============================================================================== --- head/sys/arm/allwinner/a10_machdep.c Mon Nov 4 22:12:25 2013 (r257659) +++ head/sys/arm/allwinner/a10_machdep.c Mon Nov 4 22:45:26 2013 (r257660) @@ -43,6 +43,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -71,7 +72,7 @@ initarm_late_init(void) } #define FDT_DEVMAP_MAX (1 + 2 + 1 + 1) -static struct pmap_devmap fdt_devmap[FDT_DEVMAP_MAX] = { +static struct arm_devmap_entry fdt_devmap[FDT_DEVMAP_MAX] = { { 0, 0, 0, 0, 0, } }; @@ -91,7 +92,7 @@ platform_devmap_init(void) i++; - pmap_devmap_bootstrap_table = &fdt_devmap[0]; + arm_devmap_register_table(&fdt_devmap[0]); return (0); } Modified: head/sys/arm/arm/devmap.c ============================================================================== --- head/sys/arm/arm/devmap.c Mon Nov 4 22:12:25 2013 (r257659) +++ head/sys/arm/arm/devmap.c Mon Nov 4 22:45:26 2013 (r257660) @@ -38,18 +38,42 @@ __FBSDID("$FreeBSD$"); #include #include -static const struct pmap_devmap *devmap_table; +static const struct arm_devmap_entry *devmap_table; /* - * Map all of the static regions in the devmap table, and remember - * the devmap table so other parts of the kernel can do lookups later. + * Register the given table as the one to use in arm_devmap_bootstrap(). */ void -pmap_devmap_bootstrap(vm_offset_t l1pt, const struct pmap_devmap *table) +arm_devmap_register_table(const struct arm_devmap_entry *table) { - const struct pmap_devmap *pd; devmap_table = table; +} + +/* + * Map all of the static regions in the devmap table, and remember the devmap + * table so the mapdev, ptov, and vtop functions can do lookups later. + * + * If a non-NULL table pointer is given it is used unconditionally, otherwise + * the previously-registered table is used. This smooths transition from legacy + * code that fills in a local table then calls this function passing that table, + * and newer code that uses arm_devmap_register_table() in platform-specific + * code, then lets the common initarm() call this function with a NULL pointer. + */ +void +arm_devmap_bootstrap(vm_offset_t l1pt, const struct arm_devmap_entry *table) +{ + const struct arm_devmap_entry *pd; + + /* + * If given a table pointer, use it, else ensure a table was previously + * registered. This happens early in boot, and there's a good chance + * the panic message won't be seen, but there's not much we can do. + */ + if (table != NULL) + devmap_table = table; + else if (devmap_table == NULL) + panic("arm_devmap_bootstrap: No devmap table registered."); for (pd = devmap_table; pd->pd_size != 0; ++pd) { pmap_map_chunk(l1pt, pd->pd_va, pd->pd_pa, pd->pd_size, @@ -64,7 +88,7 @@ pmap_devmap_bootstrap(vm_offset_t l1pt, void * arm_devmap_ptov(vm_paddr_t pa, vm_size_t size) { - const struct pmap_devmap *pd; + const struct arm_devmap_entry *pd; if (devmap_table == NULL) return (NULL); @@ -84,7 +108,7 @@ arm_devmap_ptov(vm_paddr_t pa, vm_size_t vm_paddr_t arm_devmap_vtop(void * vpva, vm_size_t size) { - const struct pmap_devmap *pd; + const struct arm_devmap_entry *pd; vm_offset_t va; if (devmap_table == NULL) Modified: head/sys/arm/arm/machdep.c ============================================================================== --- head/sys/arm/arm/machdep.c Mon Nov 4 22:12:25 2013 (r257659) +++ head/sys/arm/arm/machdep.c Mon Nov 4 22:45:26 2013 (r257660) @@ -159,7 +159,6 @@ struct pv_addr undstack; struct pv_addr abtstack; static struct pv_addr kernelstack; -const struct pmap_devmap *pmap_devmap_bootstrap_table; #endif #if defined(LINUX_BOOT_ABI) @@ -1422,7 +1421,7 @@ initarm(struct arm_boot_params *abp) /* Map pmap_devmap[] entries */ err_devmap = platform_devmap_init(); - pmap_devmap_bootstrap(l1pagetable, pmap_devmap_bootstrap_table); + arm_devmap_bootstrap(l1pagetable, NULL); cpu_domains((DOMAIN_CLIENT << (PMAP_DOMAIN_KERNEL * 2)) | DOMAIN_CLIENT); pmap_pa = kernel_l1pt.pv_pa; Modified: head/sys/arm/at91/at91.c ============================================================================== --- head/sys/arm/at91/at91.c Mon Nov 4 22:12:25 2013 (r257659) +++ head/sys/arm/at91/at91.c Mon Nov 4 22:45:26 2013 (r257660) @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #define _ARM32_BUS_DMA_PRIVATE #include +#include #include #include @@ -52,7 +53,7 @@ static struct at91_softc *at91_softc; static void at91_eoi(void *); -extern const struct pmap_devmap at91_devmap[]; +extern const struct arm_devmap_entry at91_devmap[]; uint32_t at91_master_clock; @@ -257,7 +258,7 @@ static int at91_attach(device_t dev) { struct at91_softc *sc = device_get_softc(dev); - const struct pmap_devmap *pdevmap; + const struct arm_devmap_entry *pdevmap; int i; arm_post_filter = at91_eoi; Modified: head/sys/arm/at91/at91_machdep.c ============================================================================== --- head/sys/arm/at91/at91_machdep.c Mon Nov 4 22:12:25 2013 (r257659) +++ head/sys/arm/at91/at91_machdep.c Mon Nov 4 22:45:26 2013 (r257660) @@ -77,6 +77,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -128,7 +129,7 @@ struct pv_addr abtstack; struct pv_addr kernelstack; /* Static device mappings. */ -const struct pmap_devmap at91_devmap[] = { +const struct arm_devmap_entry at91_devmap[] = { /* * Map the on-board devices VA == PA so that we can access them * with the MMU on or off. @@ -566,7 +567,7 @@ initarm(struct arm_boot_params *abp) VM_PROT_READ|VM_PROT_WRITE, PTE_PAGETABLE); } - pmap_devmap_bootstrap(l1pagetable, at91_devmap); + arm_devmap_bootstrap(l1pagetable, at91_devmap); cpu_domains((DOMAIN_CLIENT << (PMAP_DOMAIN_KERNEL * 2)) | DOMAIN_CLIENT); setttb(kernel_l1pt.pv_pa); cpu_tlb_flushID(); Modified: head/sys/arm/broadcom/bcm2835/bcm2835_machdep.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_machdep.c Mon Nov 4 22:12:25 2013 (r257659) +++ head/sys/arm/broadcom/bcm2835/bcm2835_machdep.c Mon Nov 4 22:45:26 2013 (r257660) @@ -52,6 +52,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -93,7 +94,7 @@ initarm_late_init(void) } #define FDT_DEVMAP_MAX (2) // FIXME -static struct pmap_devmap fdt_devmap[FDT_DEVMAP_MAX] = { +static struct arm_devmap_entry fdt_devmap[FDT_DEVMAP_MAX] = { { 0, 0, 0, 0, 0, } }; @@ -113,7 +114,7 @@ platform_devmap_init(void) fdt_devmap[i].pd_cache = PTE_DEVICE; i++; - pmap_devmap_bootstrap_table = &fdt_devmap[0]; + arm_devmap_register_table(&fdt_devmap[0]); return (0); } Modified: head/sys/arm/econa/econa_machdep.c ============================================================================== --- head/sys/arm/econa/econa_machdep.c Mon Nov 4 22:12:25 2013 (r257659) +++ head/sys/arm/econa/econa_machdep.c Mon Nov 4 22:45:26 2013 (r257660) @@ -68,6 +68,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -108,7 +109,7 @@ struct pv_addr abtstack; struct pv_addr kernelstack; /* Static device mappings. */ -static const struct pmap_devmap econa_devmap[] = { +static const struct arm_devmap_entry econa_devmap[] = { { /* * This maps DDR SDRAM @@ -275,7 +276,7 @@ initarm(struct arm_boot_params *abp) VM_PROT_READ|VM_PROT_WRITE, PTE_PAGETABLE); } - pmap_devmap_bootstrap(l1pagetable, econa_devmap); + arm_devmap_bootstrap(l1pagetable, econa_devmap); cpu_domains((DOMAIN_CLIENT << (PMAP_DOMAIN_KERNEL*2)) | DOMAIN_CLIENT); setttb(kernel_l1pt.pv_pa); cpu_tlb_flushID(); Modified: head/sys/arm/freescale/imx/imx_machdep.c ============================================================================== --- head/sys/arm/freescale/imx/imx_machdep.c Mon Nov 4 22:12:25 2013 (r257659) +++ head/sys/arm/freescale/imx/imx_machdep.c Mon Nov 4 22:45:26 2013 (r257660) @@ -47,14 +47,14 @@ __FBSDID("$FreeBSD$"); #define IMX_MAX_DEVMAP_ENTRIES 8 -static struct pmap_devmap devmap_entries[IMX_MAX_DEVMAP_ENTRIES]; +static struct arm_devmap_entry devmap_entries[IMX_MAX_DEVMAP_ENTRIES]; static u_int devmap_idx; static vm_offset_t devmap_vaddr = ARM_VECTORS_HIGH; void imx_devmap_addentry(vm_paddr_t pa, vm_size_t sz) { - struct pmap_devmap *m; + struct arm_devmap_entry *m; /* * The last table entry is the all-zeroes end-of-table marker. If we're @@ -103,7 +103,7 @@ initarm_lastaddr(void) */ imx_devmap_init(); - pmap_devmap_bootstrap_table = devmap_entries; + arm_devmap_register_table(devmap_entries); return (devmap_vaddr); } @@ -128,7 +128,7 @@ initarm_gpio_init(void) void initarm_late_init(void) { - struct pmap_devmap *m; + struct arm_devmap_entry *m; /* * We did the static devmap setup earlier, during initarm_lastaddr(), Modified: head/sys/arm/include/devmap.h ============================================================================== --- head/sys/arm/include/devmap.h Mon Nov 4 22:12:25 2013 (r257659) +++ head/sys/arm/include/devmap.h Mon Nov 4 22:45:26 2013 (r257660) @@ -30,6 +30,33 @@ #define _MACHINE_DEVMAP_H_ /* + * This structure is used by MD code to describe static mappings of devices + * which are established as part of bringing up the MMU early in the boot. + */ +struct arm_devmap_entry { + vm_offset_t pd_va; /* virtual address */ + vm_paddr_t pd_pa; /* physical address */ + vm_size_t pd_size; /* size of region */ + vm_prot_t pd_prot; /* protection code */ + int pd_cache; /* cache attributes */ +}; + +/* + * Register a platform-local table to be bootstrapped by the generic + * initarm() in arm/machdep.c. This is used by newer code that allocates and + * fills in its own local table but does not have its own initarm() routine. + */ +void arm_devmap_register_table(const struct arm_devmap_entry * _table); + +/* + * Directly process a table; called from initarm() of older platforms that don't + * use the generic initarm() in arm/machdep.c. If the table pointer is NULL, + * this will use the table installed previously by arm_devmap_register_table(). + */ +void arm_devmap_bootstrap(vm_offset_t _l1pt, + const struct arm_devmap_entry *_table); + +/* * Routines to translate between virtual and physical addresses within a region * that is static-mapped by the devmap code. If the given address range isn't * static-mapped, then ptov returns NULL and vtop returns DEVMAP_PADDR_NOTFOUND. Modified: head/sys/arm/include/fdt.h ============================================================================== --- head/sys/arm/include/fdt.h Mon Nov 4 22:12:25 2013 (r257659) +++ head/sys/arm/include/fdt.h Mon Nov 4 22:45:26 2013 (r257660) @@ -56,10 +56,10 @@ struct mem_region { vm_size_t mr_size; }; -struct pmap_devmap; +struct arm_devmap_entry; -int fdt_localbus_devmap(phandle_t, struct pmap_devmap *, int, int *); -int fdt_pci_devmap(phandle_t, struct pmap_devmap *devmap, vm_offset_t, +int fdt_localbus_devmap(phandle_t, struct arm_devmap_entry *, int, int *); +int fdt_pci_devmap(phandle_t, struct arm_devmap_entry *devmap, vm_offset_t, vm_offset_t); #endif /* _MACHINE_FDT_H_ */ Modified: head/sys/arm/include/machdep.h ============================================================================== --- head/sys/arm/include/machdep.h Mon Nov 4 22:12:25 2013 (r257659) +++ head/sys/arm/include/machdep.h Mon Nov 4 22:45:26 2013 (r257660) @@ -43,9 +43,6 @@ int platform_devmap_init(void); void board_set_serial(uint64_t); void board_set_revision(uint32_t); -/* Needs to be initialised by platform_devmap_init */ -extern const struct pmap_devmap *pmap_devmap_bootstrap_table; - /* Setup standard arrays */ void arm_dump_avail_init( vm_offset_t memsize, size_t max); Modified: head/sys/arm/include/pmap.h ============================================================================== --- head/sys/arm/include/pmap.h Mon Nov 4 22:12:25 2013 (r257659) +++ head/sys/arm/include/pmap.h Mon Nov 4 22:45:26 2013 (r257660) @@ -696,20 +696,6 @@ void pmap_use_minicache(vm_offset_t, vm_ void vector_page_setprot(int); -/* - * This structure is used by machine-dependent code to describe - * static mappings of devices, created at bootstrap time. - */ -struct pmap_devmap { - vm_offset_t pd_va; /* virtual address */ - vm_paddr_t pd_pa; /* physical address */ - vm_size_t pd_size; /* size of region */ - vm_prot_t pd_prot; /* protection code */ - int pd_cache; /* cache attributes */ -}; - -void pmap_devmap_bootstrap(vm_offset_t, const struct pmap_devmap *); - #define SECTION_CACHE 0x1 #define SECTION_PT 0x2 void pmap_kenter_section(vm_offset_t, vm_paddr_t, int flags); Modified: head/sys/arm/lpc/lpc_machdep.c ============================================================================== --- head/sys/arm/lpc/lpc_machdep.c Mon Nov 4 22:12:25 2013 (r257659) +++ head/sys/arm/lpc/lpc_machdep.c Mon Nov 4 22:45:26 2013 (r257660) @@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -85,7 +86,7 @@ initarm_late_init(void) } #define FDT_DEVMAP_MAX (1 + 2 + 1 + 1) -static struct pmap_devmap fdt_devmap[FDT_DEVMAP_MAX] = { +static struct arm_devmap_entry fdt_devmap[FDT_DEVMAP_MAX] = { { 0, 0, 0, 0, 0, } }; @@ -105,7 +106,7 @@ platform_devmap_init(void) fdt_devmap[0].pd_prot = VM_PROT_READ | VM_PROT_WRITE; fdt_devmap[0].pd_cache = PTE_NOCACHE; - pmap_devmap_bootstrap_table = &fdt_devmap[0]; + arm_devmap_register_table(&fdt_devmap[0]); return (0); } Modified: head/sys/arm/mv/mv_localbus.c ============================================================================== --- head/sys/arm/mv/mv_localbus.c Mon Nov 4 22:12:25 2013 (r257659) +++ head/sys/arm/mv/mv_localbus.c Mon Nov 4 22:45:26 2013 (r257660) @@ -37,6 +37,9 @@ __FBSDID("$FreeBSD$"); #include #include +#include + +#include #include #include @@ -380,7 +383,7 @@ localbus_get_devinfo(device_t bus, devic } int -fdt_localbus_devmap(phandle_t dt_node, struct pmap_devmap *fdt_devmap, +fdt_localbus_devmap(phandle_t dt_node, struct arm_devmap_entry *fdt_devmap, int banks_max_num, int *banks_added) { pcell_t ranges[MV_LOCALBUS_MAX_BANKS * MV_LOCALBUS_MAX_BANK_CELLS]; Modified: head/sys/arm/mv/mv_machdep.c ============================================================================== --- head/sys/arm/mv/mv_machdep.c Mon Nov 4 22:12:25 2013 (r257659) +++ head/sys/arm/mv/mv_machdep.c Mon Nov 4 22:45:26 2013 (r257660) @@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include /* XXX */ @@ -245,12 +246,12 @@ initarm_late_init(void) } #define FDT_DEVMAP_MAX (MV_WIN_CPU_MAX + 2) -static struct pmap_devmap fdt_devmap[FDT_DEVMAP_MAX] = { +static struct arm_devmap_entry fdt_devmap[FDT_DEVMAP_MAX] = { { 0, 0, 0, 0, 0, } }; static int -platform_sram_devmap(struct pmap_devmap *map) +platform_sram_devmap(struct arm_devmap_entry *map) { #if !defined(SOC_MV_ARMADAXP) phandle_t child, root; @@ -295,10 +296,10 @@ out: * real implementation of this function in dev/fdt/fdt_pci.c overrides the weak * alias defined here. */ -int mv_default_fdt_pci_devmap(phandle_t node, struct pmap_devmap *devmap, +int mv_default_fdt_pci_devmap(phandle_t node, struct arm_devmap_entry *devmap, vm_offset_t io_va, vm_offset_t mem_va); int -mv_default_fdt_pci_devmap(phandle_t node, struct pmap_devmap *devmap, +mv_default_fdt_pci_devmap(phandle_t node, struct arm_devmap_entry *devmap, vm_offset_t io_va, vm_offset_t mem_va) { @@ -322,7 +323,7 @@ platform_devmap_init(void) int i, num_mapped; i = 0; - pmap_devmap_bootstrap_table = &fdt_devmap[0]; + arm_devmap_register_table(&fdt_devmap[0]); #ifdef SOC_MV_ARMADAXP vm_paddr_t cur_immr_pa; Modified: head/sys/arm/mv/mvvar.h ============================================================================== --- head/sys/arm/mv/mvvar.h Mon Nov 4 22:12:25 2013 (r257659) +++ head/sys/arm/mv/mvvar.h Mon Nov 4 22:45:26 2013 (r257660) @@ -66,7 +66,6 @@ struct decode_win { vm_paddr_t remap; }; -extern const struct pmap_devmap pmap_devmap[]; extern const struct gpio_config mv_gpio_config[]; extern const struct decode_win *cpu_wins; extern const struct decode_win *idma_wins; Modified: head/sys/arm/rockchip/rk30xx_machdep.c ============================================================================== --- head/sys/arm/rockchip/rk30xx_machdep.c Mon Nov 4 22:12:25 2013 (r257659) +++ head/sys/arm/rockchip/rk30xx_machdep.c Mon Nov 4 22:45:26 2013 (r257660) @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -73,7 +74,7 @@ initarm_late_init(void) } #define FDT_DEVMAP_MAX (1 + 2 + 1 + 1) -static struct pmap_devmap fdt_devmap[FDT_DEVMAP_MAX] = { +static struct arm_devmap_entry fdt_devmap[FDT_DEVMAP_MAX] = { { 0, 0, 0, 0, 0, } }; @@ -92,8 +93,8 @@ platform_devmap_init(void) fdt_devmap[i].pd_cache = PTE_DEVICE; i++; - pmap_devmap_bootstrap_table = &fdt_devmap[0]; - + arm_devmap_register_table(&fdt_devmap[0]); + return (0); } Modified: head/sys/arm/s3c2xx0/s3c24x0_machdep.c ============================================================================== --- head/sys/arm/s3c2xx0/s3c24x0_machdep.c Mon Nov 4 22:12:25 2013 (r257659) +++ head/sys/arm/s3c2xx0/s3c24x0_machdep.c Mon Nov 4 22:45:26 2013 (r257660) @@ -78,6 +78,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -126,7 +127,7 @@ struct pv_addr kernelstack; #define _S(s) (((s) + L1_S_SIZE - 1) & ~(L1_S_SIZE-1)) /* Static device mappings. */ -static const struct pmap_devmap s3c24x0_devmap[] = { +static const struct arm_devmap_entry s3c24x0_devmap[] = { /* * Map the devices we need early on. */ @@ -324,7 +325,7 @@ initarm(struct arm_boot_params *abp) VM_PROT_READ|VM_PROT_WRITE, PTE_PAGETABLE); } - pmap_devmap_bootstrap(l1pagetable, s3c24x0_devmap); + arm_devmap_bootstrap(l1pagetable, s3c24x0_devmap); cpu_domains((DOMAIN_CLIENT << (PMAP_DOMAIN_KERNEL*2)) | DOMAIN_CLIENT); setttb(kernel_l1pt.pv_pa); Modified: head/sys/arm/sa11x0/assabet_machdep.c ============================================================================== --- head/sys/arm/sa11x0/assabet_machdep.c Mon Nov 4 22:12:25 2013 (r257659) +++ head/sys/arm/sa11x0/assabet_machdep.c Mon Nov 4 22:45:26 2013 (r257660) @@ -80,6 +80,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -134,7 +135,7 @@ struct pv_addr abtstack; struct pv_addr kernelstack; /* Static device mappings. */ -static const struct pmap_devmap assabet_devmap[] = { +static const struct arm_devmap_entry assabet_devmap[] = { /* * Map the on-board devices VA == PA so that we can access them * with the MMU on or off. @@ -324,7 +325,7 @@ initarm(struct arm_boot_params *abp) pmap_map_entry(l1pagetable, vector_page, systempage.pv_pa, VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE); /* Map the statically mapped devices. */ - pmap_devmap_bootstrap(l1pagetable, assabet_devmap); + arm_devmap_bootstrap(l1pagetable, assabet_devmap); pmap_map_chunk(l1pagetable, sa1_cache_clean_addr, 0xf0000000, CPU_SA110_CACHE_CLEAN_SIZE, VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE); Modified: head/sys/arm/samsung/exynos/exynos5_machdep.c ============================================================================== --- head/sys/arm/samsung/exynos/exynos5_machdep.c Mon Nov 4 22:12:25 2013 (r257659) +++ head/sys/arm/samsung/exynos/exynos5_machdep.c Mon Nov 4 22:45:26 2013 (r257660) @@ -39,6 +39,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -63,7 +64,7 @@ initarm_late_init(void) } #define FDT_DEVMAP_MAX (1 + 2 + 1 + 1) /* FIXME */ -static struct pmap_devmap fdt_devmap[FDT_DEVMAP_MAX] = { +static struct arm_devmap_entry fdt_devmap[FDT_DEVMAP_MAX] = { { 0, 0, 0, 0, 0, } }; @@ -83,7 +84,7 @@ platform_devmap_init(void) fdt_devmap[i].pd_cache = PTE_NOCACHE; i++; - pmap_devmap_bootstrap_table = &fdt_devmap[0]; + arm_devmap_register_table(&fdt_devmap[0]); return (0); } Modified: head/sys/arm/tegra/tegra2_machdep.c ============================================================================== --- head/sys/arm/tegra/tegra2_machdep.c Mon Nov 4 22:12:25 2013 (r257659) +++ head/sys/arm/tegra/tegra2_machdep.c Mon Nov 4 22:45:26 2013 (r257660) @@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -123,7 +124,7 @@ initarm_late_init(void) } #define FDT_DEVMAP_MAX (1 + 2 + 1 + 1) /* FIXME */ -static struct pmap_devmap fdt_devmap[FDT_DEVMAP_MAX] = { +static struct arm_devmap_entry fdt_devmap[FDT_DEVMAP_MAX] = { { 0, 0, 0, 0, 0, } }; @@ -141,7 +142,7 @@ platform_devmap_init(void) fdt_devmap[i].pd_cache = PTE_NOCACHE; i++; - pmap_devmap_bootstrap_table = &fdt_devmap[0]; + arm_devmap_register_table(&fdt_devmap[0]); return (0); } Modified: head/sys/arm/ti/ti_machdep.c ============================================================================== --- head/sys/arm/ti/ti_machdep.c Mon Nov 4 22:12:25 2013 (r257659) +++ head/sys/arm/ti/ti_machdep.c Mon Nov 4 22:45:26 2013 (r257660) @@ -49,6 +49,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -77,7 +78,7 @@ initarm_late_init(void) } #define FDT_DEVMAP_MAX (2) // FIXME -static struct pmap_devmap fdt_devmap[FDT_DEVMAP_MAX] = { +static struct arm_devmap_entry fdt_devmap[FDT_DEVMAP_MAX] = { { 0, 0, 0, 0, 0, } }; @@ -107,7 +108,7 @@ platform_devmap_init(void) #error "Unknown SoC" #endif - pmap_devmap_bootstrap_table = &fdt_devmap[0]; + arm_devmap_register_table(&fdt_devmap[0]); return (0); } Modified: head/sys/arm/versatile/versatile_machdep.c ============================================================================== --- head/sys/arm/versatile/versatile_machdep.c Mon Nov 4 22:12:25 2013 (r257659) +++ head/sys/arm/versatile/versatile_machdep.c Mon Nov 4 22:45:26 2013 (r257660) @@ -49,6 +49,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -74,7 +75,7 @@ initarm_late_init(void) } #define FDT_DEVMAP_MAX (2) /* FIXME */ -static struct pmap_devmap fdt_devmap[FDT_DEVMAP_MAX] = { +static struct arm_devmap_entry fdt_devmap[FDT_DEVMAP_MAX] = { { 0, 0, 0, 0, 0, }, { 0, 0, 0, 0, 0, } }; @@ -93,7 +94,7 @@ platform_devmap_init(void) fdt_devmap[i].pd_prot = VM_PROT_READ | VM_PROT_WRITE; fdt_devmap[i].pd_cache = PTE_DEVICE; - pmap_devmap_bootstrap_table = &fdt_devmap[0]; + arm_devmap_register_table(&fdt_devmap[0]); return (0); } Modified: head/sys/arm/xilinx/zy7_machdep.c ============================================================================== --- head/sys/arm/xilinx/zy7_machdep.c Mon Nov 4 22:12:25 2013 (r257659) +++ head/sys/arm/xilinx/zy7_machdep.c Mon Nov 4 22:45:26 2013 (r257660) @@ -49,6 +49,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -73,7 +74,7 @@ initarm_late_init(void) } #define FDT_DEVMAP_SIZE 3 -static struct pmap_devmap fdt_devmap[FDT_DEVMAP_SIZE]; +static struct arm_devmap_entry fdt_devmap[FDT_DEVMAP_SIZE]; /* * Construct pmap_devmap[] with DT-derived config data. @@ -104,7 +105,7 @@ platform_devmap_init(void) fdt_devmap[i].pd_prot = 0; fdt_devmap[i].pd_cache = 0; - pmap_devmap_bootstrap_table = &fdt_devmap[0]; + arm_devmap_register_table(&fdt_devmap[0]); return (0); } Modified: head/sys/arm/xscale/i80321/ep80219_machdep.c ============================================================================== --- head/sys/arm/xscale/i80321/ep80219_machdep.c Mon Nov 4 22:12:25 2013 (r257659) +++ head/sys/arm/xscale/i80321/ep80219_machdep.c Mon Nov 4 22:45:26 2013 (r257660) @@ -78,6 +78,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -125,7 +126,7 @@ struct pv_addr minidataclean; /* #define IQ80321_OBIO_SIZE 0x00100000UL */ /* Static device mappings. */ -static const struct pmap_devmap ep80219_devmap[] = { +static const struct arm_devmap_entry ep80219_devmap[] = { /* * Map the on-board devices VA == PA so that we can access them * with the MMU on or off. @@ -300,7 +301,7 @@ initarm(struct arm_boot_params *abp) /* Map the vector page. */ pmap_map_entry(l1pagetable, ARM_VECTORS_HIGH, systempage.pv_pa, VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE); - pmap_devmap_bootstrap(l1pagetable, ep80219_devmap); + arm_devmap_bootstrap(l1pagetable, ep80219_devmap); /* * Give the XScale global cache clean code an appropriately * sized chunk of unmapped VA space starting at 0xff000000 Modified: head/sys/arm/xscale/i80321/iq31244_machdep.c ============================================================================== --- head/sys/arm/xscale/i80321/iq31244_machdep.c Mon Nov 4 22:12:25 2013 (r257659) +++ head/sys/arm/xscale/i80321/iq31244_machdep.c Mon Nov 4 22:45:26 2013 (r257660) @@ -78,6 +78,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -123,7 +124,7 @@ struct pv_addr minidataclean; #define IQ80321_OBIO_BASE 0xfe800000UL #define IQ80321_OBIO_SIZE 0x00100000UL /* Static device mappings. */ -static const struct pmap_devmap iq80321_devmap[] = { +static const struct arm_devmap_entry iq80321_devmap[] = { /* * Map the on-board devices VA == PA so that we can access them * with the MMU on or off. @@ -301,7 +302,7 @@ initarm(struct arm_boot_params *abp) /* Map the vector page. */ pmap_map_entry(l1pagetable, ARM_VECTORS_HIGH, systempage.pv_pa, VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE); - pmap_devmap_bootstrap(l1pagetable, iq80321_devmap); + arm_devmap_bootstrap(l1pagetable, iq80321_devmap); /* * Give the XScale global cache clean code an appropriately * sized chunk of unmapped VA space starting at 0xff000000 Modified: head/sys/arm/xscale/i8134x/crb_machdep.c ============================================================================== --- head/sys/arm/xscale/i8134x/crb_machdep.c Mon Nov 4 22:12:25 2013 (r257659) +++ head/sys/arm/xscale/i8134x/crb_machdep.c Mon Nov 4 22:45:26 2013 (r257660) @@ -78,6 +78,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -123,7 +124,7 @@ struct pv_addr abtstack; struct pv_addr kernelstack; /* Static device mappings. */ -static const struct pmap_devmap iq81342_devmap[] = { +static const struct arm_devmap_entry iq81342_devmap[] = { { IOP34X_VADDR, IOP34X_HWADDR, @@ -285,7 +286,7 @@ initarm(struct arm_boot_params *abp) /* Map the vector page. */ pmap_map_entry(l1pagetable, ARM_VECTORS_HIGH, systempage.pv_pa, VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE); - pmap_devmap_bootstrap(l1pagetable, iq81342_devmap); + arm_devmap_bootstrap(l1pagetable, iq81342_devmap); /* * Give the XScale global cache clean code an appropriately * sized chunk of unmapped VA space starting at 0xff000000 Modified: head/sys/arm/xscale/ixp425/avila_machdep.c ============================================================================== --- head/sys/arm/xscale/ixp425/avila_machdep.c Mon Nov 4 22:12:25 2013 (r257659) +++ head/sys/arm/xscale/ixp425/avila_machdep.c Mon Nov 4 22:45:26 2013 (r257660) @@ -78,6 +78,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -125,7 +126,7 @@ struct pv_addr kernelstack; struct pv_addr minidataclean; /* Static device mappings. */ -static const struct pmap_devmap ixp425_devmap[] = { +static const struct arm_devmap_entry ixp425_devmap[] = { /* Physical/Virtual address for I/O space */ { IXP425_IO_VBASE, IXP425_IO_HWBASE, IXP425_IO_SIZE, VM_PROT_READ|VM_PROT_WRITE, PTE_NOCACHE, }, @@ -158,7 +159,7 @@ static const struct pmap_devmap ixp425_d }; /* Static device mappings. */ -static const struct pmap_devmap ixp435_devmap[] = { +static const struct arm_devmap_entry ixp435_devmap[] = { /* Physical/Virtual address for I/O space */ { IXP425_IO_VBASE, IXP425_IO_HWBASE, IXP425_IO_SIZE, VM_PROT_READ|VM_PROT_WRITE, PTE_NOCACHE, }, @@ -368,9 +369,9 @@ initarm(struct arm_boot_params *abp) pmap_map_entry(l1pagetable, ARM_VECTORS_HIGH, systempage.pv_pa, VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE); if (cpu_is_ixp43x()) - pmap_devmap_bootstrap(l1pagetable, ixp435_devmap); + arm_devmap_bootstrap(l1pagetable, ixp435_devmap); else - pmap_devmap_bootstrap(l1pagetable, ixp425_devmap); + arm_devmap_bootstrap(l1pagetable, ixp425_devmap); /* * Give the XScale global cache clean code an appropriately * sized chunk of unmapped VA space starting at 0xff000000 Modified: head/sys/arm/xscale/pxa/pxa_machdep.c ============================================================================== --- head/sys/arm/xscale/pxa/pxa_machdep.c Mon Nov 4 22:12:25 2013 (r257659) +++ head/sys/arm/xscale/pxa/pxa_machdep.c Mon Nov 4 22:45:26 2013 (r257660) @@ -80,6 +80,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -124,7 +125,7 @@ static void pxa_probe_sdram(bus_space_ta uint32_t *, uint32_t *); /* Static device mappings. */ -static const struct pmap_devmap pxa_devmap[] = { +static const struct arm_devmap_entry pxa_devmap[] = { /* * Map the on-board devices up into the KVA region so we don't muck * up user-space. @@ -281,7 +282,7 @@ initarm(struct arm_boot_params *abp) /* Map the vector page. */ pmap_map_entry(l1pagetable, ARM_VECTORS_HIGH, systempage.pv_pa, VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE); - pmap_devmap_bootstrap(l1pagetable, pxa_devmap); + arm_devmap_bootstrap(l1pagetable, pxa_devmap); /* * Give the XScale global cache clean code an appropriately Modified: head/sys/dev/fdt/fdt_pci.c ============================================================================== --- head/sys/dev/fdt/fdt_pci.c Mon Nov 4 22:12:25 2013 (r257659) +++ head/sys/dev/fdt/fdt_pci.c Mon Nov 4 22:45:26 2013 (r257660) @@ -335,7 +335,7 @@ next: #if defined(__arm__) int -fdt_pci_devmap(phandle_t node, struct pmap_devmap *devmap, vm_offset_t io_va, +fdt_pci_devmap(phandle_t node, struct arm_devmap_entry *devmap, vm_offset_t io_va, vm_offset_t mem_va) { struct fdt_pci_range io_space, mem_space; From owner-svn-src-head@FreeBSD.ORG Mon Nov 4 23:25:08 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 9B139212; Mon, 4 Nov 2013 23:25:08 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 865C72B23; Mon, 4 Nov 2013 23:25:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA4NP8GX087763; Mon, 4 Nov 2013 23:25:08 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA4NP7qO087756; Mon, 4 Nov 2013 23:25:07 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201311042325.rA4NP7qO087756@svn.freebsd.org> From: Neel Natu Date: Mon, 4 Nov 2013 23:25:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257661 - in head/sys: amd64/vmm amd64/vmm/io modules/vmm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Nov 2013 23:25:08 -0000 Author: neel Date: Mon Nov 4 23:25:07 2013 New Revision: 257661 URL: http://svnweb.freebsd.org/changeset/base/257661 Log: Remove the 'vdev' abstraction that was meant to sit on top of device models in the kernel. This abstraction was redundant because the only device emulated inside vmm.ko is the local apic and it is always at a fixed guest physical address. Discussed with: grehan Deleted: head/sys/amd64/vmm/io/vdev.c head/sys/amd64/vmm/io/vdev.h Modified: head/sys/amd64/vmm/io/vlapic.c head/sys/amd64/vmm/io/vlapic.h head/sys/amd64/vmm/vmm_lapic.c head/sys/modules/vmm/Makefile Modified: head/sys/amd64/vmm/io/vlapic.c ============================================================================== --- head/sys/amd64/vmm/io/vlapic.c Mon Nov 4 22:45:26 2013 (r257660) +++ head/sys/amd64/vmm/io/vlapic.c Mon Nov 4 23:25:07 2013 (r257661) @@ -44,7 +44,6 @@ __FBSDID("$FreeBSD$"); #include "vmm_stat.h" #include "vmm_lapic.h" #include "vmm_ktr.h" -#include "vdev.h" #include "vlapic.h" #define VLAPIC_CTR0(vlapic, format) \ @@ -100,8 +99,6 @@ struct vlapic { struct vm *vm; int vcpuid; - struct io_region *mmio; - struct vdev_ops *ops; struct LAPIC apic; int esr_update; @@ -195,9 +192,8 @@ vlapic_init_ipi(struct vlapic *vlapic) } static int -vlapic_op_reset(void* dev) +vlapic_reset(struct vlapic *vlapic) { - struct vlapic *vlapic = (struct vlapic*)dev; struct LAPIC *lapic = &vlapic->apic; memset(lapic, 0, sizeof(*lapic)); @@ -214,23 +210,6 @@ vlapic_op_reset(void* dev) } -static int -vlapic_op_init(void* dev) -{ - struct vlapic *vlapic = (struct vlapic*)dev; - vdev_register_region(vlapic->ops, vlapic, vlapic->mmio); - return vlapic_op_reset(dev); -} - -static int -vlapic_op_halt(void* dev) -{ - struct vlapic *vlapic = (struct vlapic*)dev; - vdev_unregister_region(vlapic, vlapic->mmio); - return 0; - -} - void vlapic_set_intr_ready(struct vlapic *vlapic, int vector) { @@ -594,11 +573,9 @@ vlapic_intr_accepted(struct vlapic *vlap } int -vlapic_op_mem_read(void* dev, uint64_t gpa, opsize_t size, uint64_t *data) +vlapic_read(struct vlapic *vlapic, uint64_t offset, uint64_t *data) { - struct vlapic *vlapic = (struct vlapic*)dev; struct LAPIC *lapic = &vlapic->apic; - uint64_t offset = gpa & ~(PAGE_SIZE); uint32_t *reg; int i; @@ -686,11 +663,9 @@ vlapic_op_mem_read(void* dev, uint64_t g } int -vlapic_op_mem_write(void* dev, uint64_t gpa, opsize_t size, uint64_t data) +vlapic_write(struct vlapic *vlapic, uint64_t offset, uint64_t data) { - struct vlapic *vlapic = (struct vlapic*)dev; struct LAPIC *lapic = &vlapic->apic; - uint64_t offset = gpa & ~(PAGE_SIZE); uint32_t *reg; int retval; @@ -832,16 +807,6 @@ restart: return (0); } -struct vdev_ops vlapic_dev_ops = { - .name = "vlapic", - .init = vlapic_op_init, - .reset = vlapic_op_reset, - .halt = vlapic_op_halt, - .memread = vlapic_op_mem_read, - .memwrite = vlapic_op_mem_write, -}; -static struct io_region vlapic_mmio[VM_MAXCPU]; - struct vlapic * vlapic_init(struct vm *vm, int vcpuid) { @@ -856,17 +821,7 @@ vlapic_init(struct vm *vm, int vcpuid) if (vcpuid == 0) vlapic->msr_apicbase |= APICBASE_BSP; - vlapic->ops = &vlapic_dev_ops; - - vlapic->mmio = vlapic_mmio + vcpuid; - vlapic->mmio->base = DEFAULT_APIC_BASE; - vlapic->mmio->len = PAGE_SIZE; - vlapic->mmio->attr = MMIO_READ|MMIO_WRITE; - vlapic->mmio->vcpu = vcpuid; - - vdev_register(&vlapic_dev_ops, vlapic); - - vlapic_op_init(vlapic); + vlapic_reset(vlapic); return (vlapic); } @@ -874,8 +829,7 @@ vlapic_init(struct vm *vm, int vcpuid) void vlapic_cleanup(struct vlapic *vlapic) { - vlapic_op_halt(vlapic); - vdev_unregister(vlapic); + free(vlapic, M_VLAPIC); } Modified: head/sys/amd64/vmm/io/vlapic.h ============================================================================== --- head/sys/amd64/vmm/io/vlapic.h Mon Nov 4 22:45:26 2013 (r257660) +++ head/sys/amd64/vmm/io/vlapic.h Mon Nov 4 23:25:07 2013 (r257661) @@ -29,10 +29,8 @@ #ifndef _VLAPIC_H_ #define _VLAPIC_H_ -#include "vdev.h" - struct vm; - + /* * Map of APIC Registers: Offset Description Access */ @@ -92,13 +90,8 @@ enum x2apic_state; struct vlapic *vlapic_init(struct vm *vm, int vcpuid); void vlapic_cleanup(struct vlapic *vlapic); - -int vlapic_op_mem_write(void* dev, uint64_t gpa, - opsize_t size, uint64_t data); - -int vlapic_op_mem_read(void* dev, uint64_t gpa, - opsize_t size, uint64_t *data); - +int vlapic_write(struct vlapic *vlapic, uint64_t offset, uint64_t data); +int vlapic_read(struct vlapic *vlapic, uint64_t offset, uint64_t *data); int vlapic_pending_intr(struct vlapic *vlapic); void vlapic_intr_accepted(struct vlapic *vlapic, int vector); void vlapic_set_intr_ready(struct vlapic *vlapic, int vector); Modified: head/sys/amd64/vmm/vmm_lapic.c ============================================================================== --- head/sys/amd64/vmm/vmm_lapic.c Mon Nov 4 22:45:26 2013 (r257660) +++ head/sys/amd64/vmm/vmm_lapic.c Mon Nov 4 23:25:07 2013 (r257661) @@ -130,7 +130,7 @@ lapic_rdmsr(struct vm *vm, int cpu, u_in error = 0; } else { offset = x2apic_msr_to_regoff(msr); - error = vlapic_op_mem_read(vlapic, offset, DWORD, rval); + error = vlapic_read(vlapic, offset, rval); } return (error); @@ -150,7 +150,7 @@ lapic_wrmsr(struct vm *vm, int cpu, u_in error = 0; } else { offset = x2apic_msr_to_regoff(msr); - error = vlapic_op_mem_write(vlapic, offset, DWORD, val); + error = vlapic_write(vlapic, offset, val); } return (error); @@ -174,7 +174,7 @@ lapic_mmio_write(void *vm, int cpu, uint return (EINVAL); vlapic = vm_lapic(vm, cpu); - error = vlapic_op_mem_write(vlapic, off, DWORD, wval); + error = vlapic_write(vlapic, off, wval); return (error); } @@ -196,6 +196,6 @@ lapic_mmio_read(void *vm, int cpu, uint6 return (EINVAL); vlapic = vm_lapic(vm, cpu); - error = vlapic_op_mem_read(vlapic, off, DWORD, rval); + error = vlapic_read(vlapic, off, rval); return (error); } Modified: head/sys/modules/vmm/Makefile ============================================================================== --- head/sys/modules/vmm/Makefile Mon Nov 4 22:45:26 2013 (r257660) +++ head/sys/modules/vmm/Makefile Mon Nov 4 23:25:07 2013 (r257661) @@ -27,7 +27,6 @@ SRCS+= vmm.c \ .PATH: ${.CURDIR}/../../amd64/vmm/io SRCS+= iommu.c \ ppt.c \ - vdev.c \ vlapic.c # intel-specific files From owner-svn-src-head@FreeBSD.ORG Mon Nov 4 23:46:21 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 8FF048E1; Mon, 4 Nov 2013 23:46:21 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7D21B2C65; Mon, 4 Nov 2013 23:46:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA4NkLbG094424; Mon, 4 Nov 2013 23:46:21 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA4NkLBw094423; Mon, 4 Nov 2013 23:46:21 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201311042346.rA4NkLBw094423@svn.freebsd.org> From: Luigi Rizzo Date: Mon, 4 Nov 2013 23:46:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257663 - head/release/picobsd/build X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Nov 2013 23:46:21 -0000 Author: luigi Date: Mon Nov 4 23:46:20 2013 New Revision: 257663 URL: http://svnweb.freebsd.org/changeset/base/257663 Log: bmake does not have a -v option so remove it Modified: head/release/picobsd/build/picobsd Modified: head/release/picobsd/build/picobsd ============================================================================== --- head/release/picobsd/build/picobsd Mon Nov 4 23:36:49 2013 (r257662) +++ head/release/picobsd/build/picobsd Mon Nov 4 23:46:20 2013 (r257663) @@ -437,7 +437,7 @@ do_kernel() { # OK [ "${o_do_modules}" = "yes" ] && export MODULES="" # kernel build not parallelizable yet ${BINMAKE} KERNCONF=${l_kernconf} \ - -v -f ${PICO_TREE}/build/Makefile.conf ) || \ + -f ${PICO_TREE}/build/Makefile.conf ) || \ fail $? missing_kernel } @@ -677,7 +677,7 @@ populate_mfs_tree() { a=${BUILDDIR}/crunch1.conf ( export BUILDDIR SRC MY_TREE PICO_OBJ ; ${BINMAKE} \ - -v -f ${PICO_TREE}/build/Makefile.conf ${BUILDDIR}/crunch.mk ) + -f ${PICO_TREE}/build/Makefile.conf ${BUILDDIR}/crunch.mk ) log "Libs are ${LIBS} " export SRC # used by crunch.mk # export LIBS CFLAGS From owner-svn-src-head@FreeBSD.ORG Tue Nov 5 00:23:13 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id EADB7F0C; Tue, 5 Nov 2013 00:23:13 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail110.syd.optusnet.com.au (mail110.syd.optusnet.com.au [211.29.132.97]) by mx1.freebsd.org (Postfix) with ESMTP id EAFB52E24; Tue, 5 Nov 2013 00:23:12 +0000 (UTC) Received: from c122-106-156-23.carlnfd1.nsw.optusnet.com.au (c122-106-156-23.carlnfd1.nsw.optusnet.com.au [122.106.156.23]) by mail110.syd.optusnet.com.au (Postfix) with ESMTPS id 2C4C278124D; Tue, 5 Nov 2013 11:23:03 +1100 (EST) Date: Tue, 5 Nov 2013 11:23:02 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Eitan Adler Subject: Re: svn commit: r257646 - head/lib/libc/string In-Reply-To: <201311041905.rA4J5WT0097968@svn.freebsd.org> Message-ID: <20131105082043.G954@besplex.bde.org> References: <201311041905.rA4J5WT0097968@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=bpB1Wiqi c=1 sm=1 tr=0 a=ebeQFi2P/qHVC0Yw9JDJ4g==:117 a=PO7r1zJSAAAA:8 a=Jjr3N5Xq17sA:10 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=PxnKILAbCc4A:10 a=0bboea_cAAAA:8 a=nPgqESEMlYIW6C_Ud6sA:9 a=z6bOAOlBPfTk0ypl:21 a=w5yiX3cPpRu9v20-:21 a=CjuIK1q_8ugA:10 a=lZcSDGFEfbgA:10 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Nov 2013 00:23:14 -0000 On Mon, 4 Nov 2013, Eitan Adler wrote: > Log: > Use OpenBSD's revamped description of strlcpy and strlcat. > > This explanation is supposed to be simpler and better. In particular > "comparing it to the snprintf API provides lots of value, since it raises the > bar on understanding, so that programmers/auditors will a better job calling > all 3 of these functions." LOL. It indeed makes the design errors in all 3 functions more obvious. > Modified: head/lib/libc/string/strlcpy.3 > ============================================================================== > --- head/lib/libc/string/strlcpy.3 Mon Nov 4 18:15:45 2013 (r257645) > +++ head/lib/libc/string/strlcpy.3 Mon Nov 4 19:05:31 2013 (r257646) > @@ -1,4 +1,4 @@ > -.\" $OpenBSD: strlcpy.3,v 1.19 2007/05/31 19:19:32 jmc Exp $ > +.\" $OpenBSD: strlcpy.3,v 1.26 2013/09/30 12:02:35 millert Exp $ > .\" > .\" Copyright (c) 1998, 2000 Todd C. Miller > .\" > @@ -27,7 +27,7 @@ > .\" > .\" $FreeBSD$ > .\" > -.Dd June 22, 1998 > +.Dd November 10, 2013 Glenn mentioned a time warp. There is another one in the Copyright line (it is still for the old version). > .Dt STRLCPY 3 > .Os > .Sh NAME > @@ -47,69 +47,81 @@ The > .Fn strlcpy > and > .Fn strlcat > -functions copy and concatenate strings respectively. > -They are designed > -to be safer, more consistent, and less error prone replacements for > +functions copy and concatenate strings with the > +same input parameters and output result as > +.Xr snprintf 3 . It is false that these functions have the _same_ input parameters and output result as snprintf(). They are simpler and not quite as badly designed, so they don't have so many overflow problems or type errors, and this is reflected in their input parameters and output type being quite different: (1) they aren't variadic, but snprintf() is. (2) point (1) should give only the difference that the final "arg" for snprintf() is `...', but there is the additional difference that these functions have their parameters in strncpy() order: dst, src, size while snprintf() has parameters in (mostly) printf() order: dst, size, fmt, ... (3) the `size' parameter has type size_t for both, but POSIX gratuitously breaks this for snprintf() if its value exceeds SIZE_MAX (POSIX requires returning a negative value with errno EOVERFLOW in this case even if the correct result would be representable in the return type) (4) the return type is size_t for these functions, but is int for snprintf(). This allows these functions to represent all results, so EOVERFLOW can't happen. There is no type that can represent all results for snprintf(), and it returns int for historical reasons. In C99, the behaviour if the correct result is implicitly specified as undefined (explicitly only in a non-normative appendix). In POSIX, the behaviour is specified as returning a negative value with errno EOVERFLOW. This makes handling of errors for snprintf() much more complicated than for these functions, if error handling is actually done. (Actually, strlcat() has undefined behaviour too. Details below.) In most cases you can show at compile time that overflow can't happen, but this is almost as hard as showing that the buffer is large enough so that you don't even need to use snprintf(). > +They are designed to be safer, more consistent, and less error > +prone replacements for the easily misused functions > .Xr strncpy 3 > and > .Xr strncat 3 . "error prone" should probably be hyphenated. (/usr/share/man hyphenates it in a slightly larger percentage of cases than not.). Indeed, they are just as hard to use and as easy to misuse as snprintf(). They are just less error-prone than strncpy() and strncat() when misused. The usual misuse is to never check for errors. WHen errors are checked for, they are much harder to use than sprintf() and strn*(). > -Unlike those functions, > -.Fn strlcpy > -and > -.Fn strlcat > -take the full size of the buffer (not just the length) and guarantee to Actually, all the functions take just a length (a size which can be either the full size of the buffer or the size of an initial part of the buffer, where the buffer pointer may be offset in the "real" buffer and the initial part may be null). > -NUL-terminate the result (as long as > -.Fa size > -is larger than 0 or, in the case of > -.Fn strlcat , > -as long as there is at least one byte free in > -.Fa dst ) . > -Note that a byte for the NUL should be included in > -.Fa size . > -Also note that > +.Pp > .Fn strlcpy > and > .Fn strlcat > -only operate on true > -.Dq C > -strings. > -This means that for > -.Fn strlcpy > -.Fa src > -must be NUL-terminated and for > -.Fn strlcat > -both > -.Fa src > -and > -.Fa dst > -must be NUL-terminated. > +take the full size of the destination buffer and guarantee > +NUL-termination if there is room. > +Note that room for the NUL should be included in > +.Fa dstsize . > .Pp > -The > .Fn strlcpy > -function copies up to > -.Fa size > -- 1 characters from the NUL-terminated string > +copies up to > +.Fa dstsize > +\- 1 characters from the string > .Fa src > to > .Fa dst , > -NUL-terminating the result. > +NUL-terminating the result if > +.Fa dstsize > +is not 0. These changes are hard to compare, but I noticed the breakage of the arg name (it seems to have been renamed from `size' to 'dstsize' everywhere in this man page except in the prototypes where the arg names are defined) and the regression to using the non-technical term "room". > .Pp > -The > .Fn strlcat > -function appends the NUL-terminated string > +appends string Regression away from manpage-ese: "The foo function" -> "foo". I don't like the verboseness of the former, but it is normal. Removing "the NUL-terminated" is good. strings are NUL-terminated by definition, and this shouldn't be repeated ad nauseum. > .Fa src > to the end of > .Fa dst . Old verboseness: "the end of". Appends always occur at ends. > It will append at most > -.Fa size > -- strlen(dst) - 1 bytes, NUL-terminating the result. > +.Fa dstsize > +\- strlen(dst) \- 1 characters. This change mainly gives the usual mismatch with the arg `size'. Old bugs in it: - no markup for strlen(dst) combined with markup for size/dstsize on the same output line - overflow bugs. size - strlen(dst) can easily overflow. E.g., size might be 0, and then the expression overflows for all non-null dst strings. On overflow, the claimed limit is usually vacuously correct, but is not the limit. It is usually much larger than the limit (something like 0-1UL-1 = 0xfffffffffffffffe. Then it is vacuously true, but not useful to know, that at most this many bytes will be appended. > +It will then NUL-terminate, unless > +.Fa dstsize > +is 0 or the original > +.Fa dst > +string was longer than > +.Fa dstsize > +(in practice this should not happen > +as it means that either > +.Fa dstsize > +is incorrect or that > +.Fa dst > +is not a proper string). One of the design errors in snprintf() is that it is hard to use when the result is truncated. But it is clearly not incorrect to use a size that is too small for snprintf() or strlcpy(), provided there is error handling. Correctness of this use is not so clear for strlcat(). The above says that it is unconditionally incorrect. Is it really? > +.Pp > +If the > +.Fa src > +and > +.Fa dst > +strings overlap, the behavior is undefined. strlcat() is quite different from snprintf() and strlcpy(), so the claim that _these_ functions [both of them] have the _same_ input parameters and output result as snprintf() is much more false for strlcat() than for strlcpy(). Change it to only claim similarity for strlcpy(). > .Sh RETURN VALUES > -The > +Besides quibbles over the return type > +.Pf ( Va size_t > +versus > +.Va int ) > +and signal handler safety > +.Pf ( Xr snprintf 3 > +is not entirely safe on some systems), the > +following two are equivalent: > +.Bd -literal -offset indent > +n = strlcpy(dst, src, len); > +n = snprintf(dst, len, "%s", src); The return type difference is not a quibble (except the EOVERFLOW case shouldn't be a problem in practice). It means that first you must declare n to have the correct type (same as the return type). Then you have to take different types of care with sign extension and overflow bugs depending on the type, if you actually use n to check for errors. Well, perhaps only handling the EOVERFLOW case requires the full complications. snprintf() returns a negative value on error. I think that can only happen for the EOVERFLOW and EILSEQ cases, and EILSEQ can't happen for format "%s", but this is not clear. So even among rare uses that actually attempt to handle errors, it is norma to have the following sign extension/overflow bug for use of snprintf(): size_t len; int n; n = snprintf(dst, len, "%s", src); if (n >= len) goto toolong; The comparison in this has various sign extension/overflow problems involving implementation-defined behaviour depending on the relative sizes of int and size_t and of course on the implementation. It is necessary to write it as: if (n < 0) goto toolong_or_error; if (n >= len) goto toolong; Actually, in C99 the behaviour is undefined in toolong case (whether or not it is checked for), since undefined behaviour happens before this case is reached. It is defined in POSIX and doesn't depend on implementation-defined behaviour with the correct check. These complication doesn't apply to strlcpy() or strlcat(). One of the best things about strlcpy() or strlcat() is that their man page gives detailed examples of the smaller complications for the error handling for them than printf()'s man page does for snprintf(). This is in unchanged parts of the man page. The less detailed example in the above doesn't mesh so well with the more detailed examples later. It is interesting that it spells the `size' arg in another different way -- as `len' -- after previous descriptions have misemphasized this arg is not just a length but is "the" "full" buffer size. > +.Ed > +.Pp > +Like > +.Xr snprintf 3 , > +the > .Fn strlcpy > and > .Fn strlcat > -functions return the total length of the string they tried to > -create. > +functions return the total length of the string they tried to create. > For > .Fn strlcpy > that means the length of > @@ -121,29 +133,12 @@ that means the initial length of > plus > the length of Modulo overflow in "plus". The man page can reasonably be fuzzy here, but the implementation (of strlcpy() is not careful about this either. In all cases where it returns early because the result wouldn't fit in the specified size, it returns strlen(dst) + strlen(src) (spelled differently). This can overflow. One string might have length SIZE_MAX and the other length 1, or both slightly longer than SIZE_MAX/2. It takes an exotic arch for this too happen. But not much more exotic than large model in MSODS will do it -- you can have strings in different segments and the segment size is only 64K. I forget if SIZE_MAX is 64K-1 in MSDOS large model. If it is, then it is easy to have strings that each fill out the entire address space accessible through a single pointer. Oops, the representabilty problem applies to strlcat() too. strlcat() thus has the same bugs as C99 snprintf() -- overflow can occur but there is no requirement to detect it or report it, using much the same example: n = snprintf(buf, 0, "%s%s", dst, src); /* (1) */ n = snprintf(buf, 0, "%*s%*s", SIZE_MAX, dst, SIZE_MAX, src); /* (2) */ n = strlcat(dst, 0, src); /* (3) */ (1) Even if snprintf() returned size_t, it couldn't return the sum of the lengths if they are long. (2) Can have large output with small input strings with snprintf(). (3) has to be like (1) -- need large input strings. Note that this bug doesn't affect strcat() or strncat(), since then it is the caller's responsibility to provide enough space at the end of dst to append src, and for strcat() this is just impossible if the sum of the string lengths overflows, while for strncat() overflow can't occur because the API doesn't attempt to return anything useful. Callers can easily avoid this problem, but strlcat() is supposed to always return a useful value so that they don't need to. Only callers that actually attempt to handle errors are affected. The size arg prevents buffer overrun, but since an overflowed result can be returned, callers can't trust any result. I described this bug as giving "undefined" behaviour. We can look at the implementation and see that the result is the defined result of adding 2 size_t's. Overflow doesn't occur in the technical sense since size_t is unsigned. But since this bug wasn't noticed before, any behaviour that it gives is accidental and undocumented, so it is undefined in practice. Callers also can't recover from it since the overflowing (but defined) result is indistinguishable from a valid result. For a quick fix, return SIZE_MAX on overflow. Real strings can only have length SIZE_MAX if the array that holds them has size 1 larger than SIZE_MAX, but since that size is not representable such strings are unusable and much more difficult to create than ones of length merely SIZE_MAX-1. For the same reason, the size arg cannot exceed SIZE_MAX. Thus in a bad case where it equals SIZE_MAX and the sum of the lengths would exceed SIZE_MAX, we return SIZE_MAX and the correct error check detects this as too long: n = strlcat(dst, src, SIZE_MAX); /* result SIZE_MAX */ if (n >= SIZE_MAX) goto toolong; /* equality, so go */ > .Fa src . > -While this may seem somewhat confusing, it was done to make > -truncation detection simple. > .Pp > -Note however, that if > -.Fn strlcat > -traverses > -.Fa size > -characters without finding a NUL, the length of the string is considered > -to be > -.Fa size > -and the destination string will not be NUL-terminated (since there was > -no space for the NUL). > -This keeps > -.Fn strlcat > -from running off the end of a string. > -In practice this should not happen (as it means that either > -.Fa size > -is incorrect or that > -.Fa dst > -is not a proper > -.Dq C > -string). > -The check exists to prevent potential security problems in incorrect code. This section got moved. I'm not sure what changed in it. > +If the return value is > +.Cm >= > +.Va dstsize , > +the output string has been truncated. > +It is the caller's responsibility to handle this. As explained above, ">=' is correct for strl*() but not for snprintf(). > .Sh EXAMPLES > The following code fragment illustrates the simple case: > .Bd -literal -offset indent > @@ -169,7 +164,7 @@ if (strlcat(pname, file, sizeof(pname)) > .Ed > .Pp > Since it is known how many characters were copied the first time, things > -can be sped up a bit by using a copy instead of an append. > +can be sped up a bit by using a copy instead of an append: > .Bd -literal -offset indent > char *dir, *file, pname[MAXPATHLEN]; > size_t n; > @@ -201,5 +196,5 @@ and > .Fn strlcat > functions first appeared in > .Ox 2.4 , > -and made their appearance in > +and > .Fx 3.3 . > The examples remain good. Bruce From owner-svn-src-head@FreeBSD.ORG Tue Nov 5 00:31:47 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 473DC270; Tue, 5 Nov 2013 00:31:47 +0000 (UTC) (envelope-from rizzo.unipi@gmail.com) Received: from mail-lb0-x22a.google.com (mail-lb0-x22a.google.com [IPv6:2a00:1450:4010:c04::22a]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2AB282E98; Tue, 5 Nov 2013 00:31:45 +0000 (UTC) Received: by mail-lb0-f170.google.com with SMTP id u14so6035566lbd.15 for ; Mon, 04 Nov 2013 16:31:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:message-id:subject:from:to:cc:content-type; bh=P8Oe1c7WbltcOB0a5zVRRyqlO4GqJewRD5EUK2DVAzc=; b=jo6HIbWm8D0ydrqtC7yJi4AOrl2lR7XXaPmEy4dSUDPlemeLpDgxyZNq5NCXmBspli oAvAOaSJ5e8NvetRDuDepc4Sm8qsyroZgjNY7r2Kq+1VFfst8NQVsNCRgLt5mEkvHI+O OaE2e1hQtNRD/zTd8YTjtmcqINPfYXri26DovZ0IOcpO4AQ59iHxOHjyYlBQqVdbiIkb Mg+KDwLg7tuU909L2BHe0d1MwuwSNqK3eypX9G0Qnx4+WnL+ZswXFJ32kSJUf+UCFep4 4F+1UyhYqy2LqYWpZSeF48+eheCU+sgchYTcIb5aVGfNm3evlPI+CBHKrT7c4IKnCnvo GhXQ== MIME-Version: 1.0 X-Received: by 10.152.116.7 with SMTP id js7mr13911434lab.11.1383611504194; Mon, 04 Nov 2013 16:31:44 -0800 (PST) Sender: rizzo.unipi@gmail.com Received: by 10.114.23.35 with HTTP; Mon, 4 Nov 2013 16:31:44 -0800 (PST) Date: Mon, 4 Nov 2013 16:31:44 -0800 X-Google-Sender-Auth: T-QMU6r04gf-jRsrksKtHlgDz8U Message-ID: Subject: this breaks builds with gcc (Re: svn commit: r257645 - head/gnu/lib/libgcc From: Luigi Rizzo To: Sean Bruno Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Nov 2013 00:31:47 -0000 svn257645 (below) breaks the build when gcc is used. -Wno-static-in-inline is only for CLANG. cheers luigi On Mon, Nov 4, 2013 at 10:15 AM, Sean Bruno wrote: > Author: sbruno > Date: Mon Nov 4 18:15:45 2013 > New Revision: 257645 > URL: http://svnweb.freebsd.org/changeset/base/257645 > > Log: > Quiesce warning around gcc_assert() for an inline macro that uses > a static variable. This code has been moved around in gcc, but is still > in > use in the latest trunk version of the compiler. > > gnu/lib/libgcc/../../../contrib/gcc/unwind-dw2.c:208:36: > warning: static variable 'dwarf_reg_size_table' is used in an > inline > function with external linkage [-Wstatic-in-inline] > gcc_assert (index < (int) sizeof(dwarf_reg_size_table)); > > Modified: > head/gnu/lib/libgcc/Makefile > > Modified: head/gnu/lib/libgcc/Makefile > > ============================================================================== > --- head/gnu/lib/libgcc/Makefile Mon Nov 4 18:14:50 2013 > (r257644) > +++ head/gnu/lib/libgcc/Makefile Mon Nov 4 18:15:45 2013 > (r257645) > @@ -27,6 +27,17 @@ CFLAGS+= -DIN_GCC -DIN_LIBGCC2 -D__GCC_F > -I${GCCDIR}/config -I${GCCDIR} -I. \ > -I${.CURDIR}/../../usr.bin/cc/cc_tools > > +# Added to quiesce warning around gcc_assert() for an inline macro that > uses > +# a static variable. This code has been moved around in gcc, but is > still in > +# use in the latest trunk version of the compiler. > +# > +# gnu/lib/libgcc/../../../contrib/gcc/unwind-dw2.c:208:36: > +# warning: static variable 'dwarf_reg_size_table' is used in an > inline > +# function with external linkage [-Wstatic-in-inline] > +# gcc_assert (index < (int) sizeof(dwarf_reg_size_table)); > +# ^ > +CFLAGS+= -Wno-static-in-inline > + > LDFLAGS+= -nodefaultlibs > LDADD+= -lc > > -- -----------------------------------------+------------------------------- Prof. Luigi RIZZO, rizzo@iet.unipi.it . Dip. di Ing. dell'Informazione http://www.iet.unipi.it/~luigi/ . Universita` di Pisa TEL +39-050-2211611 . via Diotisalvi 2 Mobile +39-338-6809875 . 56122 PISA (Italy) -----------------------------------------+------------------------------- From owner-svn-src-head@FreeBSD.ORG Tue Nov 5 00:51:00 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 8B387B4D; Tue, 5 Nov 2013 00:51:00 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5EE072FB7; Tue, 5 Nov 2013 00:51:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA50p0R0018258; Tue, 5 Nov 2013 00:51:00 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA50p0bZ018257; Tue, 5 Nov 2013 00:51:00 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201311050051.rA50p0bZ018257@svn.freebsd.org> From: Luigi Rizzo Date: Tue, 5 Nov 2013 00:51:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257664 - head/sys/dev/netmap X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Nov 2013 00:51:00 -0000 Author: luigi Date: Tue Nov 5 00:50:59 2013 New Revision: 257664 URL: http://svnweb.freebsd.org/changeset/base/257664 Log: check errors on return from netmap_attach() Submitted by: Giuseppe Lettieri MFC after: 3 days Modified: head/sys/dev/netmap/netmap.c Modified: head/sys/dev/netmap/netmap.c ============================================================================== --- head/sys/dev/netmap/netmap.c Mon Nov 4 23:46:20 2013 (r257663) +++ head/sys/dev/netmap/netmap.c Tue Nov 5 00:50:59 2013 (r257664) @@ -535,7 +535,7 @@ BDG_NMB(struct netmap_mem_d *nmd, struct return (unlikely(i >= nmd->pools[NETMAP_BUF_POOL].objtotal)) ? lut[0].vaddr : lut[i].vaddr; } -static void bdg_netmap_attach(struct netmap_adapter *); +static int bdg_netmap_attach(struct netmap_adapter *); static int bdg_netmap_reg(struct ifnet *ifp, int onoff); int kern_netmap_regif(struct nmreq *nmr); @@ -1854,6 +1854,7 @@ get_ifp(struct nmreq *nmr, struct ifnet * and attach it to the ifp */ struct netmap_adapter tmp_na; + int error; if (nmr->nr_cmd) { /* nr_cmd must be 0 for a virtual port */ @@ -1884,7 +1885,12 @@ get_ifp(struct nmreq *nmr, struct ifnet strcpy(iter->if_xname, name); tmp_na.ifp = iter; /* bdg_netmap_attach creates a struct netmap_adapter */ - bdg_netmap_attach(&tmp_na); + error = bdg_netmap_attach(&tmp_na); + if (error) { + D("error %d", error); + free(iter, M_DEVBUF); + return error; + } cand2 = -1; /* only need one port */ } else if (NETMAP_CAPABLE(iter)) { /* this is a NIC */ /* make sure the NIC is not already in use */ @@ -4075,7 +4081,7 @@ done: } -static void +static int bdg_netmap_attach(struct netmap_adapter *arg) { struct netmap_adapter na; @@ -4095,7 +4101,7 @@ bdg_netmap_attach(struct netmap_adapter na.nm_mem = netmap_mem_private_new(arg->ifp->if_xname, na.num_tx_rings, na.num_tx_desc, na.num_rx_rings, na.num_rx_desc); - netmap_attach(&na, na.num_tx_rings); + return netmap_attach(&na, na.num_tx_rings); } From owner-svn-src-head@FreeBSD.ORG Tue Nov 5 00:56:08 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 3EB30DAE; Tue, 5 Nov 2013 00:56:08 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2AD352FDE; Tue, 5 Nov 2013 00:56:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA50u8xv018964; Tue, 5 Nov 2013 00:56:08 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA50u8v7018963; Tue, 5 Nov 2013 00:56:08 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201311050056.rA50u8v7018963@svn.freebsd.org> From: Luigi Rizzo Date: Tue, 5 Nov 2013 00:56:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257665 - head/sys/dev/netmap X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Nov 2013 00:56:08 -0000 Author: luigi Date: Tue Nov 5 00:56:07 2013 New Revision: 257665 URL: http://svnweb.freebsd.org/changeset/base/257665 Log: fix a bug when a device has 1 tx (or rx) queue and more than one queue of a different type. Submitted by: Vincenzo Maffione MFC after: 3 days Modified: head/sys/dev/netmap/netmap.c Modified: head/sys/dev/netmap/netmap.c ============================================================================== --- head/sys/dev/netmap/netmap.c Tue Nov 5 00:50:59 2013 (r257664) +++ head/sys/dev/netmap/netmap.c Tue Nov 5 00:56:07 2013 (r257665) @@ -2684,7 +2684,7 @@ netmap_poll(struct cdev *dev, int events struct netmap_adapter *na; struct ifnet *ifp; struct netmap_kring *kring; - u_int i, check_all, want_tx, want_rx, revents = 0; + u_int i, check_all_tx, check_all_rx, want_tx, want_rx, revents = 0; u_int lim_tx, lim_rx, host_forwarded = 0; struct mbq q = { NULL, NULL, 0 }; void *pwait = dev; /* linux compatibility */ @@ -2759,7 +2759,8 @@ netmap_poll(struct cdev *dev, int events * there are pending packets to send. The latter can be disabled * passing NETMAP_NO_TX_POLL in the NIOCREG call. */ - check_all = (priv->np_qlast == NETMAP_HW_RING) && (lim_tx > 1 || lim_rx > 1); + check_all_tx = (priv->np_qlast == NETMAP_HW_RING) && (lim_tx > 1); + check_all_rx = (priv->np_qlast == NETMAP_HW_RING) && (lim_rx > 1); if (priv->np_qlast != NETMAP_HW_RING) { lim_tx = lim_rx = priv->np_qlast; @@ -2833,7 +2834,7 @@ flush_tx: nm_kr_put(kring); } if (want_tx && retry_tx) { - selrecord(td, check_all ? + selrecord(td, check_all_tx ? &na->tx_si : &na->tx_rings[priv->np_qfirst].si); retry_tx = 0; goto flush_tx; @@ -2879,7 +2880,7 @@ do_retry_rx: } if (retry_rx) { retry_rx = 0; - selrecord(td, check_all ? + selrecord(td, check_all_rx ? &na->rx_si : &na->rx_rings[priv->np_qfirst].si); goto do_retry_rx; } From owner-svn-src-head@FreeBSD.ORG Tue Nov 5 01:06:22 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id BD62B143; Tue, 5 Nov 2013 01:06:22 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9A158209B; Tue, 5 Nov 2013 01:06:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA516MvF022504; Tue, 5 Nov 2013 01:06:22 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA516M9W022503; Tue, 5 Nov 2013 01:06:22 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201311050106.rA516M9W022503@svn.freebsd.org> From: Luigi Rizzo Date: Tue, 5 Nov 2013 01:06:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257666 - head/sys/dev/netmap X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Nov 2013 01:06:22 -0000 Author: luigi Date: Tue Nov 5 01:06:22 2013 New Revision: 257666 URL: http://svnweb.freebsd.org/changeset/base/257666 Log: remove some test code. Modified: head/sys/dev/netmap/netmap.c Modified: head/sys/dev/netmap/netmap.c ============================================================================== --- head/sys/dev/netmap/netmap.c Tue Nov 5 00:56:07 2013 (r257665) +++ head/sys/dev/netmap/netmap.c Tue Nov 5 01:06:22 2013 (r257666) @@ -24,10 +24,6 @@ */ -#ifdef __FreeBSD__ -#define TEST_STUFF // test code, does not compile yet on linux -#endif /* __FreeBSD__ */ - /* * This module supports memory mapped access to network devices, * see netmap(4). @@ -700,112 +696,6 @@ pkt_copy(void *_src, void *_dst, int l) } -#ifdef TEST_STUFF -struct xxx { - char *name; - void (*fn)(uint32_t); -}; - - -static void -nm_test_defmtx(uint32_t n) -{ - uint32_t i; - struct mtx m; - mtx_init(&m, "test", NULL, MTX_DEF); - for (i = 0; i < n; i++) { mtx_lock(&m); mtx_unlock(&m); } - mtx_destroy(&m); - return; -} - -static void -nm_test_spinmtx(uint32_t n) -{ - uint32_t i; - struct mtx m; - mtx_init(&m, "test", NULL, MTX_SPIN); - for (i = 0; i < n; i++) { mtx_lock(&m); mtx_unlock(&m); } - mtx_destroy(&m); - return; -} - -static void -nm_test_rlock(uint32_t n) -{ - uint32_t i; - struct rwlock m; - rw_init(&m, "test"); - for (i = 0; i < n; i++) { rw_rlock(&m); rw_runlock(&m); } - rw_destroy(&m); - return; -} - -static void -nm_test_wlock(uint32_t n) -{ - uint32_t i; - struct rwlock m; - rw_init(&m, "test"); - for (i = 0; i < n; i++) { rw_wlock(&m); rw_wunlock(&m); } - rw_destroy(&m); - return; -} - -static void -nm_test_slock(uint32_t n) -{ - uint32_t i; - struct sx m; - sx_init(&m, "test"); - for (i = 0; i < n; i++) { sx_slock(&m); sx_sunlock(&m); } - sx_destroy(&m); - return; -} - -static void -nm_test_xlock(uint32_t n) -{ - uint32_t i; - struct sx m; - sx_init(&m, "test"); - for (i = 0; i < n; i++) { sx_xlock(&m); sx_xunlock(&m); } - sx_destroy(&m); - return; -} - - -struct xxx nm_tests[] = { - { "defmtx", nm_test_defmtx }, - { "spinmtx", nm_test_spinmtx }, - { "rlock", nm_test_rlock }, - { "wlock", nm_test_wlock }, - { "slock", nm_test_slock }, - { "xlock", nm_test_xlock }, -}; - -static int -nm_test(struct nmreq *nmr) -{ - uint32_t scale, n, test; - static int old_test = -1; - - test = nmr->nr_cmd; - scale = nmr->nr_offset; - n = sizeof(nm_tests) / sizeof(struct xxx) - 1; - if (test > n) { - D("test index too high, max %d", n); - return 0; - } - - if (old_test != test) { - D("test %s scale %d", nm_tests[test].name, scale); - old_test = test; - } - nm_tests[test].fn(scale); - return 0; -} -#endif /* TEST_STUFF */ - /* * locate a bridge among the existing ones. * MUST BE CALLED WITH NMG_LOCK() @@ -2444,13 +2334,6 @@ netmap_ioctl(struct cdev *dev, u_long cm switch (cmd) { case NIOCGINFO: /* return capabilities etc */ if (nmr->nr_version != NETMAP_API) { -#ifdef TEST_STUFF - /* some test code for locks etc */ - if (nmr->nr_version == 666) { - error = nm_test(nmr); - break; - } -#endif /* TEST_STUFF */ D("API mismatch got %d have %d", nmr->nr_version, NETMAP_API); nmr->nr_version = NETMAP_API; From owner-svn-src-head@FreeBSD.ORG Tue Nov 5 01:33:38 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D7061843; Tue, 5 Nov 2013 01:33:38 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail109.syd.optusnet.com.au (mail109.syd.optusnet.com.au [211.29.132.80]) by mx1.freebsd.org (Postfix) with ESMTP id 5E86521D5; Tue, 5 Nov 2013 01:33:37 +0000 (UTC) Received: from c122-106-156-23.carlnfd1.nsw.optusnet.com.au (c122-106-156-23.carlnfd1.nsw.optusnet.com.au [122.106.156.23]) by mail109.syd.optusnet.com.au (Postfix) with ESMTPS id 3C5F9D62054; Tue, 5 Nov 2013 12:33:29 +1100 (EST) Date: Tue, 5 Nov 2013 12:33:27 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Sean Bruno Subject: Re: svn commit: r257638 - head/cddl/contrib/opensolaris/lib/libnvpair In-Reply-To: <201311041615.rA4GFhW9040552@svn.freebsd.org> Message-ID: <20131105114408.B2099@besplex.bde.org> References: <201311041615.rA4GFhW9040552@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=DstvpgP+ c=1 sm=1 tr=0 a=ebeQFi2P/qHVC0Yw9JDJ4g==:117 a=PO7r1zJSAAAA:8 a=6fV5gcbYauMA:10 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=S8UvTrfacXEA:10 a=8U5LxAoS-j-SA4MXKO4A:9 a=CjuIK1q_8ugA:10 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Nov 2013 01:33:39 -0000 On Mon, 4 Nov 2013, Sean Bruno wrote: > Log: > Quiesce warning regarding %llf which has no effect. > > Submitted as illumos issue #4284 > > Reviewed by: delphij > > Modified: > head/cddl/contrib/opensolaris/lib/libnvpair/libnvpair.c > > Modified: head/cddl/contrib/opensolaris/lib/libnvpair/libnvpair.c > ============================================================================== > --- head/cddl/contrib/opensolaris/lib/libnvpair/libnvpair.c Mon Nov 4 15:55:04 2013 (r257637) > +++ head/cddl/contrib/opensolaris/lib/libnvpair/libnvpair.c Mon Nov 4 16:15:43 2013 (r257638) > @@ -210,7 +210,7 @@ NVLIST_PRTFUNC(int32, int32_t, int32_t, > NVLIST_PRTFUNC(uint32, uint32_t, uint32_t, "0x%x") > NVLIST_PRTFUNC(int64, int64_t, longlong_t, "%lld") > NVLIST_PRTFUNC(uint64, uint64_t, u_longlong_t, "0x%llx") > -NVLIST_PRTFUNC(double, double, double, "0x%llf") > +NVLIST_PRTFUNC(double, double, double, "0x%f") > NVLIST_PRTFUNC(string, char *, char *, "%s") > NVLIST_PRTFUNC(hrtime, hrtime_t, hrtime_t, "0x%llx") This still has an obfuscating 0x prefix for floating point. This still has the following printf format errors and style bugs: - wrong ptype for vtype uint32_t. The ptype uint32_t is only accidentally compatible with %x. Depending on it being the same bogotifies the careful design of the API -- ptype exists to convert vtype to exactly the type of the format specifier. - use of explicit "0x" prefix for hex numbers. The "#" flag does this better - use of the long long abomination. Assumptions in this use. The longlong_t typedef exists to hide the unportabilities of the abomination. It is semi-opaque and might not be exactly long long. It is for the ptype when the format is "%lld". The latter uses precisely long long, so there is a type mismatch if and only if the longlong_t type is needed as a typedef. Also, if long long has to be typedefed because it doesn't exist, then "%lld" probably doesn't exist either. I think longlong_t is always long long in cddl, so this is only an obfuscation. It is declared in a cddl header in /sys/. In /sys/, the long long abomination is too often used, although I terminated most uses of it before it was standardized, but outside of cddl, longlong_t is only used in a couple of places in xdr/xdr.c. xdr.c declares it as quad_t, so it differs from long long on 64-bit arches. rpc/xdr.h uses quad_t directly. The correct format for printing int64_t is "%jd" and the correct ptype for that is intmax_t. libvnpair doesn't even support printing the long long type abomination -- it only uses it cast to match the format, and never starts with a long long. - similarly for the unsigned long long abomination. - wrong ptype for vtype hrtime_t. The ptype is the same as the vtype. This assumes that hrtime_t is unsigned long long to work with format "%llx". It is actually signed long long. As above, ptype exists to avoid making such assumptions. - the sign mismatches for hrtime_t might be more than style bugs. Hex isn't a very good format for times. Hex formats are always unsigned, and if hrtime_t actually needs to be signed then it can hold negative values and these should not be printed as raw hex. Bruce From owner-svn-src-head@FreeBSD.ORG Tue Nov 5 02:20:50 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 515ECFC6; Tue, 5 Nov 2013 02:20:50 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3EC032419; Tue, 5 Nov 2013 02:20:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA52Ko7p050282; Tue, 5 Nov 2013 02:20:50 GMT (envelope-from bdrewery@svn.freebsd.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA52KoBH050281; Tue, 5 Nov 2013 02:20:50 GMT (envelope-from bdrewery@svn.freebsd.org) Message-Id: <201311050220.rA52KoBH050281@svn.freebsd.org> From: Bryan Drewery Date: Tue, 5 Nov 2013 02:20:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257667 - head/etc/pkg X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Nov 2013 02:20:50 -0000 Author: bdrewery (ports committer) Date: Tue Nov 5 02:20:49 2013 New Revision: 257667 URL: http://svnweb.freebsd.org/changeset/base/257667 Log: Enable fingerprint checking as the currently known fingerprint has an uploaded signature on all mirrors. Approved by: bapt MFC after: 2 days Modified: head/etc/pkg/FreeBSD.conf Modified: head/etc/pkg/FreeBSD.conf ============================================================================== --- head/etc/pkg/FreeBSD.conf Tue Nov 5 01:06:22 2013 (r257666) +++ head/etc/pkg/FreeBSD.conf Tue Nov 5 02:20:49 2013 (r257667) @@ -2,7 +2,7 @@ FreeBSD: { url: "pkg+http://pkg.freebsd.org/${ABI}/latest", mirror_type: "srv", - signature_type: "none", + signature_type: "fingerprints", fingerprints: "/usr/share/keys/pkg", enabled: "yes" } From owner-svn-src-head@FreeBSD.ORG Tue Nov 5 02:22:05 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 6F19E199; Tue, 5 Nov 2013 02:22:05 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5B0732422; Tue, 5 Nov 2013 02:22:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA52M52I050532; Tue, 5 Nov 2013 02:22:05 GMT (envelope-from bdrewery@svn.freebsd.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA52M51e050530; Tue, 5 Nov 2013 02:22:05 GMT (envelope-from bdrewery@svn.freebsd.org) Message-Id: <201311050222.rA52M51e050530@svn.freebsd.org> From: Bryan Drewery Date: Tue, 5 Nov 2013 02:22:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257668 - in head: etc/pkg usr.sbin/pkg X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Nov 2013 02:22:05 -0000 Author: bdrewery (ports committer) Date: Tue Nov 5 02:22:04 2013 New Revision: 257668 URL: http://svnweb.freebsd.org/changeset/base/257668 Log: Use proper capitalization for FreeBSD.org Approved by: bapt MFC after: 2 days Modified: head/etc/pkg/FreeBSD.conf head/usr.sbin/pkg/pkg.7 Modified: head/etc/pkg/FreeBSD.conf ============================================================================== --- head/etc/pkg/FreeBSD.conf Tue Nov 5 02:20:49 2013 (r257667) +++ head/etc/pkg/FreeBSD.conf Tue Nov 5 02:22:04 2013 (r257668) @@ -1,6 +1,6 @@ # $FreeBSD$ FreeBSD: { - url: "pkg+http://pkg.freebsd.org/${ABI}/latest", + url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest", mirror_type: "srv", signature_type: "fingerprints", fingerprints: "/usr/share/keys/pkg", Modified: head/usr.sbin/pkg/pkg.7 ============================================================================== --- head/usr.sbin/pkg/pkg.7 Tue Nov 5 02:20:49 2013 (r257667) +++ head/usr.sbin/pkg/pkg.7 Tue Nov 5 02:22:04 2013 (r257668) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 1, 2013 +.Dd November 4, 2013 .Dt PKG 7 .Os .Sh NAME @@ -147,7 +147,7 @@ Global configuration can be stored in .Pa /usr/local/etc/pkg.conf in the following format: .Bd -literal -offset indent -PACKAGESITE: "pkg+http://pkg.freebsd.org/${ABI}/latest", +PACKAGESITE: "pkg+http://pkg.FreeBSD.org/${ABI}/latest", MIRROR_TYPE: "srv", SIGNATURE_TYPE: "none", FINGERPRINTS: "/usr/share/keys/pkg", From owner-svn-src-head@FreeBSD.ORG Tue Nov 5 02:57:37 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B5839710; Tue, 5 Nov 2013 02:57:37 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9FDD9257A; Tue, 5 Nov 2013 02:57:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA52vbSa062178; Tue, 5 Nov 2013 02:57:37 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA52vYmF062162; Tue, 5 Nov 2013 02:57:34 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201311050257.rA52vYmF062162@svn.freebsd.org> From: Ian Lepore Date: Tue, 5 Nov 2013 02:57:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257669 - in head/sys/arm: allwinner arm broadcom/bcm2835 freescale/imx include lpc mv rockchip samsung/exynos tegra ti versatile xilinx X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Nov 2013 02:57:37 -0000 Author: ian Date: Tue Nov 5 02:57:34 2013 New Revision: 257669 URL: http://svnweb.freebsd.org/changeset/base/257669 Log: Call initarm_lastaddr() later in the init sequence, after establishing static device mappings, rather than as the first of the initializations that a platform can hook into. This allows a platform to allocate KVA from the top of the address space downwards for things like static device mapping, and return the final "last usable address" result after that and other early init work is done. Because some platforms were doing work in initarm_lastaddr() that needs to be done early, add a new initarm_early_init() routine and move the early init code to that routine on those platforms. Rename platform_devmap_init() to initarm_devmap_init() to match all the other init routines called from initarm() that are designed to be implemented by platform code. Add a comment block that explains when these routines are called and the type of work expected to be done in each of them. Modified: head/sys/arm/allwinner/a10_machdep.c head/sys/arm/arm/machdep.c head/sys/arm/broadcom/bcm2835/bcm2835_machdep.c head/sys/arm/freescale/imx/imx_machdep.c head/sys/arm/include/machdep.h head/sys/arm/lpc/lpc_machdep.c head/sys/arm/mv/mv_machdep.c head/sys/arm/rockchip/rk30xx_machdep.c head/sys/arm/samsung/exynos/exynos5_machdep.c head/sys/arm/tegra/tegra2_machdep.c head/sys/arm/ti/ti_machdep.c head/sys/arm/versatile/versatile_machdep.c head/sys/arm/xilinx/zy7_machdep.c Modified: head/sys/arm/allwinner/a10_machdep.c ============================================================================== --- head/sys/arm/allwinner/a10_machdep.c Tue Nov 5 02:22:04 2013 (r257668) +++ head/sys/arm/allwinner/a10_machdep.c Tue Nov 5 02:57:34 2013 (r257669) @@ -62,6 +62,12 @@ initarm_lastaddr(void) } void +initarm_early_init(void) +{ + +} + +void initarm_gpio_init(void) { } @@ -80,7 +86,7 @@ static struct arm_devmap_entry fdt_devma * Construct pmap_devmap[] with DT-derived config data. */ int -platform_devmap_init(void) +initarm_devmap_init(void) { int i = 0; Modified: head/sys/arm/arm/machdep.c ============================================================================== --- head/sys/arm/arm/machdep.c Tue Nov 5 02:22:04 2013 (r257668) +++ head/sys/arm/arm/machdep.c Tue Nov 5 02:57:34 2013 (r257669) @@ -1303,7 +1303,7 @@ initarm(struct arm_boot_params *abp) availmem_regions_sz = curr; /* Platform-specific initialisation */ - vm_max_kernel_address = initarm_lastaddr(); + initarm_early_init(); pcpu0_init(); @@ -1419,9 +1419,10 @@ initarm(struct arm_boot_params *abp) pmap_map_entry(l1pagetable, ARM_VECTORS_HIGH, systempage.pv_pa, VM_PROT_READ|VM_PROT_WRITE|VM_PROT_EXECUTE, PTE_CACHE); - /* Map pmap_devmap[] entries */ - err_devmap = platform_devmap_init(); + /* Establish static device mappings. */ + err_devmap = initarm_devmap_init(); arm_devmap_bootstrap(l1pagetable, NULL); + vm_max_kernel_address = initarm_lastaddr(); cpu_domains((DOMAIN_CLIENT << (PMAP_DOMAIN_KERNEL * 2)) | DOMAIN_CLIENT); pmap_pa = kernel_l1pt.pv_pa; Modified: head/sys/arm/broadcom/bcm2835/bcm2835_machdep.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_machdep.c Tue Nov 5 02:22:04 2013 (r257668) +++ head/sys/arm/broadcom/bcm2835/bcm2835_machdep.c Tue Nov 5 02:57:34 2013 (r257669) @@ -70,6 +70,12 @@ initarm_lastaddr(void) } void +initarm_early_init(void) +{ + +} + +void initarm_gpio_init(void) { } @@ -103,7 +109,7 @@ static struct arm_devmap_entry fdt_devma * Construct pmap_devmap[] with DT-derived config data. */ int -platform_devmap_init(void) +initarm_devmap_init(void) { int i = 0; Modified: head/sys/arm/freescale/imx/imx_machdep.c ============================================================================== --- head/sys/arm/freescale/imx/imx_machdep.c Tue Nov 5 02:22:04 2013 (r257668) +++ head/sys/arm/freescale/imx/imx_machdep.c Tue Nov 5 02:57:34 2013 (r257669) @@ -88,31 +88,24 @@ vm_offset_t initarm_lastaddr(void) { + return (devmap_vaddr); +} + +void +initarm_early_init(void) +{ + /* XXX - Get rid of this stuff soon. */ boothowto |= RB_VERBOSE|RB_MULTIPLE; bootverbose = 1; - - /* - * Normally initarm() calls platform_devmap_init() much later in the - * init process to set up static device mappings. To calculate the - * highest available kva address we have to do that setup first. It - * maps downwards from ARM_VECTORS_HIGH and the last usable kva address - * is the point right before the virtual address of the first static - * mapping. So go set up the static mapping table now, then we can - * return the lowest static devmap vaddr as the end of usable kva. - */ - imx_devmap_init(); - - arm_devmap_register_table(devmap_entries); - - return (devmap_vaddr); } int -platform_devmap_init(void) +initarm_devmap_init(void) { - /* On imx this work is done during initarm_lastaddr(). */ + imx_devmap_init(); + arm_devmap_register_table(devmap_entries); return (0); } Modified: head/sys/arm/include/machdep.h ============================================================================== --- head/sys/arm/include/machdep.h Tue Nov 5 02:22:04 2013 (r257668) +++ head/sys/arm/include/machdep.h Tue Nov 5 02:57:34 2013 (r257669) @@ -33,11 +33,39 @@ vm_offset_t linux_parse_boot_param(struc vm_offset_t fake_preload_metadata(struct arm_boot_params *abp); vm_offset_t parse_boot_param(struct arm_boot_params *abp); -/* Called by initarm */ +/* + * Initialization functions called by the common initarm() function in + * arm/machdep.c (but not necessarily from the custom initarm() functions of + * older code). + * + * - initarm_early_init() is called very early, after parsing the boot params + * and after physical memory has been located and sized. + * + * - platform_devmap_init() is called as one of the last steps of early virtual + * memory initialization, shortly before the new page tables are installed. + * + * - initarm_lastaddr() is called after platform_devmap_init(), and must return + * the address of the first byte of unusable KVA space. This allows a + * platform to carve out of the top of the KVA space whatever reserves it + * needs for things like static device mapping, and this is called to get the + * value before calling pmap_bootstrap() which uses the value to size the + * available KVA. + * + * - initarm_gpio_init() is called after the static device mappings are + * established and just before cninit(). The intention is that the routine + * can do any hardware setup (such as gpio or pinmux) necessary to make the + * console functional. + * + * - initarm_late_init() is called just after cninit(). This is the first of + * the init routines that can use printf() and expect the output to appear on + * a standard console. + * + */ +void initarm_early_init(void); +int initarm_devmap_init(void); vm_offset_t initarm_lastaddr(void); void initarm_gpio_init(void); void initarm_late_init(void); -int platform_devmap_init(void); /* Board-specific attributes */ void board_set_serial(uint64_t); Modified: head/sys/arm/lpc/lpc_machdep.c ============================================================================== --- head/sys/arm/lpc/lpc_machdep.c Tue Nov 5 02:22:04 2013 (r257668) +++ head/sys/arm/lpc/lpc_machdep.c Tue Nov 5 02:57:34 2013 (r257669) @@ -63,11 +63,15 @@ vm_offset_t initarm_lastaddr(void) { + return (fdt_immr_va); +} + +void +initarm_early_init(void) +{ + if (fdt_immr_addr(LPC_DEV_BASE) != 0) while (1); - - /* Platform-specific initialisation */ - return (fdt_immr_va); } void @@ -94,7 +98,7 @@ static struct arm_devmap_entry fdt_devma * Construct pmap_devmap[] with DT-derived config data. */ int -platform_devmap_init(void) +initarm_devmap_init(void) { /* Modified: head/sys/arm/mv/mv_machdep.c ============================================================================== --- head/sys/arm/mv/mv_machdep.c Tue Nov 5 02:22:04 2013 (r257668) +++ head/sys/arm/mv/mv_machdep.c Tue Nov 5 02:57:34 2013 (r257669) @@ -203,11 +203,15 @@ vm_offset_t initarm_lastaddr(void) { + return (fdt_immr_va); +} + +void +initarm_early_init(void) +{ + if (fdt_immr_addr(MV_BASE) != 0) while (1); - - /* Platform-specific initialisation */ - return (fdt_immr_va); } void @@ -316,7 +320,7 @@ __weak_reference(mv_default_fdt_pci_devm * Construct pmap_devmap[] with DT-derived config data. */ int -platform_devmap_init(void) +initarm_devmap_init(void) { phandle_t root, child; pcell_t bank_count; Modified: head/sys/arm/rockchip/rk30xx_machdep.c ============================================================================== --- head/sys/arm/rockchip/rk30xx_machdep.c Tue Nov 5 02:22:04 2013 (r257668) +++ head/sys/arm/rockchip/rk30xx_machdep.c Tue Nov 5 02:57:34 2013 (r257669) @@ -60,6 +60,12 @@ initarm_lastaddr(void) } void +initarm_early_init(void) +{ + +} + +void initarm_gpio_init(void) { } @@ -82,7 +88,7 @@ static struct arm_devmap_entry fdt_devma * Construct pmap_devmap[] with DT-derived config data. */ int -platform_devmap_init(void) +initarm_devmap_init(void) { int i = 0; Modified: head/sys/arm/samsung/exynos/exynos5_machdep.c ============================================================================== --- head/sys/arm/samsung/exynos/exynos5_machdep.c Tue Nov 5 02:22:04 2013 (r257668) +++ head/sys/arm/samsung/exynos/exynos5_machdep.c Tue Nov 5 02:57:34 2013 (r257669) @@ -54,6 +54,12 @@ initarm_lastaddr(void) } void +initarm_early_init(void) +{ + +} + +void initarm_gpio_init(void) { } @@ -72,7 +78,7 @@ static struct arm_devmap_entry fdt_devma * Construct pmap_devmap[] with DT-derived config data. */ int -platform_devmap_init(void) +initarm_devmap_init(void) { int i; Modified: head/sys/arm/tegra/tegra2_machdep.c ============================================================================== --- head/sys/arm/tegra/tegra2_machdep.c Tue Nov 5 02:22:04 2013 (r257668) +++ head/sys/arm/tegra/tegra2_machdep.c Tue Nov 5 02:57:34 2013 (r257669) @@ -107,10 +107,15 @@ vm_offset_t initarm_lastaddr(void) { + return (fdt_immr_va); +} + +void +initarm_early_init(void) +{ + if (fdt_immr_addr(TEGRA2_BASE) != 0) /* FIXME ???? */ while (1); - - return (fdt_immr_va); } void @@ -132,7 +137,7 @@ static struct arm_devmap_entry fdt_devma * Construct pmap_devmap[] with DT-derived config data. */ int -platform_devmap_init(void) +initarm_devmap_init(void) { int i = 0; fdt_devmap[i].pd_va = 0xe0000000; Modified: head/sys/arm/ti/ti_machdep.c ============================================================================== --- head/sys/arm/ti/ti_machdep.c Tue Nov 5 02:22:04 2013 (r257668) +++ head/sys/arm/ti/ti_machdep.c Tue Nov 5 02:57:34 2013 (r257669) @@ -63,11 +63,17 @@ vm_offset_t initarm_lastaddr(void) { - ti_cpu_reset = NULL; return (DEVMAP_BOOTSTRAP_MAP_START); } void +initarm_early_init(void) +{ + + ti_cpu_reset = NULL; +} + +void initarm_gpio_init(void) { } @@ -87,7 +93,7 @@ static struct arm_devmap_entry fdt_devma * Construct pmap_devmap[] with DT-derived config data. */ int -platform_devmap_init(void) +initarm_devmap_init(void) { int i = 0; #if defined(SOC_OMAP4) Modified: head/sys/arm/versatile/versatile_machdep.c ============================================================================== --- head/sys/arm/versatile/versatile_machdep.c Tue Nov 5 02:22:04 2013 (r257668) +++ head/sys/arm/versatile/versatile_machdep.c Tue Nov 5 02:57:34 2013 (r257669) @@ -65,6 +65,12 @@ initarm_lastaddr(void) } void +initarm_early_init(void) +{ + +} + +void initarm_gpio_init(void) { } @@ -85,7 +91,7 @@ static struct arm_devmap_entry fdt_devma * Construct pmap_devmap[] with DT-derived config data. */ int -platform_devmap_init(void) +initarm_devmap_init(void) { int i = 0; fdt_devmap[i].pd_va = 0xf0100000; Modified: head/sys/arm/xilinx/zy7_machdep.c ============================================================================== --- head/sys/arm/xilinx/zy7_machdep.c Tue Nov 5 02:22:04 2013 (r257668) +++ head/sys/arm/xilinx/zy7_machdep.c Tue Nov 5 02:57:34 2013 (r257669) @@ -64,6 +64,12 @@ initarm_lastaddr(void) } void +initarm_early_init(void) +{ + +} + +void initarm_gpio_init(void) { } @@ -80,7 +86,7 @@ static struct arm_devmap_entry fdt_devma * Construct pmap_devmap[] with DT-derived config data. */ int -platform_devmap_init(void) +initarm_devmap_init(void) { int i = 0; From owner-svn-src-head@FreeBSD.ORG Tue Nov 5 03:23:54 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C4460CC5; Tue, 5 Nov 2013 03:23:54 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B20D9272E; Tue, 5 Nov 2013 03:23:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA53NsXI073226; Tue, 5 Nov 2013 03:23:54 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA53Nstf073225; Tue, 5 Nov 2013 03:23:54 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201311050323.rA53Nstf073225@svn.freebsd.org> From: Mark Johnston Date: Tue, 5 Nov 2013 03:23:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257670 - head/lib/libproc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Nov 2013 03:23:54 -0000 Author: markj Date: Tue Nov 5 03:23:54 2013 New Revision: 257670 URL: http://svnweb.freebsd.org/changeset/base/257670 Log: Modify the libproc breakpoint add/remove functions to stop the target process if it has not already been stopped, since this is required for ptrace(2) to work. libdtrace does not seem to stop target processes before trying to remove their breakpoints, so we were previously failing to remove the breakpoint on r_debug_state() in rtld. This was causing processes to die with SIGTRAP if they called dlopen(3) after dtrace(1) had detached. Reported by: symbolics@gmx.com Reviewed by: rpaulo MFC after: 1 month Modified: head/lib/libproc/proc_bkpt.c Modified: head/lib/libproc/proc_bkpt.c ============================================================================== --- head/lib/libproc/proc_bkpt.c Tue Nov 5 02:57:34 2013 (r257669) +++ head/lib/libproc/proc_bkpt.c Tue Nov 5 03:23:54 2013 (r257670) @@ -37,8 +37,9 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include +#include +#include #include "_libproc.h" #if defined(__i386__) || defined(__amd64__) @@ -54,12 +55,39 @@ __FBSDID("$FreeBSD$"); #error "Add support for your architecture" #endif +static void +proc_cont(struct proc_handle *phdl) +{ + + ptrace(PT_CONTINUE, proc_getpid(phdl), (caddr_t)1, 0); +} + +static int +proc_stop(struct proc_handle *phdl) +{ + int status; + + if (kill(proc_getpid(phdl), SIGSTOP) == -1) { + DPRINTF("kill %d", proc_getpid(phdl)); + return (-1); + } else if (waitpid(proc_getpid(phdl), &status, WSTOPPED) == -1) { + DPRINTF("waitpid %d", proc_getpid(phdl)); + return (-1); + } else if (!WIFSTOPPED(status)) { + DPRINTFX("waitpid: unexpected status 0x%x", status); + return (-1); + } + + return (0); +} + int proc_bkptset(struct proc_handle *phdl, uintptr_t address, unsigned long *saved) { struct ptrace_io_desc piod; unsigned long paddr, caddr; + int ret = 0; *saved = 0; if (phdl->status == PS_DEAD || phdl->status == PS_UNDEAD || @@ -68,6 +96,12 @@ proc_bkptset(struct proc_handle *phdl, u return (-1); } + DPRINTFX("adding breakpoint at 0x%lx", address); + + if (phdl->status != PS_STOP) + if (proc_stop(phdl) != 0) + return (-1); + /* * Read the original instruction. */ @@ -80,7 +114,8 @@ proc_bkptset(struct proc_handle *phdl, u if (ptrace(PT_IO, proc_getpid(phdl), (caddr_t)&piod, 0) < 0) { DPRINTF("ERROR: couldn't read instruction at address 0x%" PRIuPTR, address); - return (-1); + ret = -1; + goto done; } *saved = paddr; /* @@ -95,10 +130,16 @@ proc_bkptset(struct proc_handle *phdl, u if (ptrace(PT_IO, proc_getpid(phdl), (caddr_t)&piod, 0) < 0) { DPRINTF("ERROR: couldn't write instruction at address 0x%" PRIuPTR, address); - return (-1); + ret = -1; + goto done; } - return (0); +done: + if (phdl->status != PS_STOP) + /* Restart the process if we had to stop it. */ + proc_cont(phdl); + + return (ret); } int @@ -107,13 +148,20 @@ proc_bkptdel(struct proc_handle *phdl, u { struct ptrace_io_desc piod; unsigned long paddr, caddr; + int ret = 0; if (phdl->status == PS_DEAD || phdl->status == PS_UNDEAD || phdl->status == PS_IDLE) { errno = ENOENT; return (-1); } - DPRINTFX("removing breakpoint at 0x%lx\n", address); + + DPRINTFX("removing breakpoint at 0x%lx", address); + + if (phdl->status != PS_STOP) + if (proc_stop(phdl) != 0) + return (-1); + /* * Overwrite the breakpoint instruction that we setup previously. */ @@ -126,10 +174,14 @@ proc_bkptdel(struct proc_handle *phdl, u if (ptrace(PT_IO, proc_getpid(phdl), (caddr_t)&piod, 0) < 0) { DPRINTF("ERROR: couldn't write instruction at address 0x%" PRIuPTR, address); - return (-1); + ret = -1; } + + if (phdl->status != PS_STOP) + /* Restart the process if we had to stop it. */ + proc_cont(phdl); - return (0); + return (ret); } /* From owner-svn-src-head@FreeBSD.ORG Tue Nov 5 03:25:10 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 9568290; Tue, 5 Nov 2013 03:25:10 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 82E272765; Tue, 5 Nov 2013 03:25:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA53PAt1073439; Tue, 5 Nov 2013 03:25:10 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA53PAds073438; Tue, 5 Nov 2013 03:25:10 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201311050325.rA53PAds073438@svn.freebsd.org> From: Mark Johnston Date: Tue, 5 Nov 2013 03:25:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257671 - head/usr.bin/calendar/calendars X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Nov 2013 03:25:10 -0000 Author: markj Date: Tue Nov 5 03:25:10 2013 New Revision: 257671 URL: http://svnweb.freebsd.org/changeset/base/257671 Log: Add myself to the calendar. Modified: head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Tue Nov 5 03:23:54 2013 (r257670) +++ head/usr.bin/calendar/calendars/calendar.freebsd Tue Nov 5 03:25:10 2013 (r257671) @@ -341,6 +341,7 @@ 11/19 Konstantin Belousov born in Kiev, USSR, 1972 11/20 Dmitry Morozovsky born in Moscow, USSR, 1968 11/20 Gavin Atkinson born in Middlesbrough, United Kingdom, 1979 +11/21 Mark Johnston born in Toronto, Ontario, Canada, 1989 11/22 Frederic Culot born in Saint-Germain-En-Laye, France, 1976 11/23 Josef Lawrence Karthauser born in Pembury, Kent, United Kingdom, 1972 11/24 Andrey Zakhvatov born in Chelyabinsk, Russian Federation, 1974 From owner-svn-src-head@FreeBSD.ORG Tue Nov 5 04:06:29 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C6C33A18; Tue, 5 Nov 2013 04:06:29 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B46782936; Tue, 5 Nov 2013 04:06:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA546TUE086612; Tue, 5 Nov 2013 04:06:29 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA546Tdj086611; Tue, 5 Nov 2013 04:06:29 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201311050406.rA546Tdj086611@svn.freebsd.org> From: Ian Lepore Date: Tue, 5 Nov 2013 04:06:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257672 - head/sys/arm/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Nov 2013 04:06:29 -0000 Author: ian Date: Tue Nov 5 04:06:29 2013 New Revision: 257672 URL: http://svnweb.freebsd.org/changeset/base/257672 Log: Make PTE_DEVICE a synonym for PTE_NOCACHE on armv4, to make it easier to share the same code on both architectures. Modified: head/sys/arm/include/pmap.h Modified: head/sys/arm/include/pmap.h ============================================================================== --- head/sys/arm/include/pmap.h Tue Nov 5 03:25:10 2013 (r257671) +++ head/sys/arm/include/pmap.h Tue Nov 5 04:06:29 2013 (r257672) @@ -67,6 +67,7 @@ #else #define PTE_NOCACHE 1 #define PTE_CACHE 2 +#define PTE_DEVICE PTE_NOCACHE #define PTE_PAGETABLE 3 #endif From owner-svn-src-head@FreeBSD.ORG Tue Nov 5 04:30:55 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id E1748202; Tue, 5 Nov 2013 04:30:55 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CF11F2A4F; Tue, 5 Nov 2013 04:30:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA54UtiA095950; Tue, 5 Nov 2013 04:30:55 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA54Utek095947; Tue, 5 Nov 2013 04:30:55 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201311050430.rA54Utek095947@svn.freebsd.org> From: Ian Lepore Date: Tue, 5 Nov 2013 04:30:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257673 - in head/sys/arm: arm include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Nov 2013 04:30:56 -0000 Author: ian Date: Tue Nov 5 04:30:55 2013 New Revision: 257673 URL: http://svnweb.freebsd.org/changeset/base/257673 Log: Add new helper routines for arm static device mapping. The new code allocates kva space from the top down for the device mappings and builds entries in an internal table which is automatically used later by arm_devmap_bootstrap(). The platform code just calls the new arm_devmap_add_entry() function as many times as it needs to (up to 32 entries allowed; most platforms use 2 or 3 at most). There is also a new arm_devmap_lastaddr() function that returns the lowest kva address allocated; this can be used to implement initarm_lastaddr() which is used to initialize vm_max_kernel_address. The new code is based on a similar concept developed for the imx family SoCs recently. They will soon be converted to use this new common code. Modified: head/sys/arm/arm/devmap.c head/sys/arm/include/devmap.h Modified: head/sys/arm/arm/devmap.c ============================================================================== --- head/sys/arm/arm/devmap.c Tue Nov 5 04:06:29 2013 (r257672) +++ head/sys/arm/arm/devmap.c Tue Nov 5 04:30:55 2013 (r257673) @@ -36,9 +36,88 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include static const struct arm_devmap_entry *devmap_table; +static boolean_t devmap_bootstrap_done = false; + +/* + * The allocated-kva (akva) devmap table and metadata. Platforms can call + * arm_devmap_add_entry() to add static device mappings to this table using + * automatically allocated virtual addresses carved out of the top of kva space. + * Allocation begins immediately below the ARM_VECTORS_HIGH address. + */ +#define AKVA_DEVMAP_MAX_ENTRIES 32 +static struct arm_devmap_entry akva_devmap_entries[AKVA_DEVMAP_MAX_ENTRIES]; +static u_int akva_devmap_idx; +static vm_offset_t akva_devmap_vaddr = ARM_VECTORS_HIGH; + +/* + * Return the "last" kva address used by the registered devmap table. It's + * actually the lowest address used by the static mappings, i.e., the address of + * the first unusable byte of KVA. + */ +vm_offset_t +arm_devmap_lastaddr() +{ + const struct arm_devmap_entry *pd; + vm_offset_t lowaddr = ARM_VECTORS_HIGH; + + if (akva_devmap_idx > 0) + return (akva_devmap_vaddr); + + if (devmap_table == NULL) + panic("arm_devmap_lastaddr(): No devmap table registered."); + + for (pd = devmap_table; pd->pd_size != 0; ++pd) { + if (lowaddr > pd->pd_va) + lowaddr = pd->pd_va; + } + + return (lowaddr); +} + +/* + * Add an entry to the internal "akva" static devmap table using the given + * physical address and size and a virtual address allocated from the top of + * kva. This automatically registers the akva table on the first call, so all a + * platform has to do is call this routine to install as many mappings as it + * needs and when initarm() calls arm_devmap_bootstrap() it will pick up all the + * entries in the akva table automatically. + */ +void +arm_devmap_add_entry(vm_paddr_t pa, vm_size_t sz) +{ + struct arm_devmap_entry *m; + + if (devmap_bootstrap_done) + panic("arm_devmap_add_entry() after arm_devmap_bootstrap()"); + + if (akva_devmap_idx == (AKVA_DEVMAP_MAX_ENTRIES - 1)) + panic("AKVA_DEVMAP_MAX_ENTRIES is too small!\n"); + + if (akva_devmap_idx == 0) + arm_devmap_register_table(akva_devmap_entries); + + /* + * Allocate virtual address space from the top of kva downwards. If the + * range being mapped is aligned and sized to 1MB boundaries then also + * align the virtual address to the next-lower 1MB boundary so that we + * end up with a nice efficient section mapping. + */ + if ((pa & 0x000fffff) == 0 && (sz & 0x000fffff) == 0) { + akva_devmap_vaddr = trunc_1mpage(akva_devmap_vaddr - sz); + } else { + akva_devmap_vaddr = trunc_page(akva_devmap_vaddr - sz); + } + m = &akva_devmap_entries[akva_devmap_idx++]; + m->pd_va = akva_devmap_vaddr; + m->pd_pa = pa; + m->pd_size = sz; + m->pd_prot = VM_PROT_READ | VM_PROT_WRITE; + m->pd_cache = PTE_DEVICE; +} /* * Register the given table as the one to use in arm_devmap_bootstrap(). @@ -73,12 +152,14 @@ arm_devmap_bootstrap(vm_offset_t l1pt, c if (table != NULL) devmap_table = table; else if (devmap_table == NULL) - panic("arm_devmap_bootstrap: No devmap table registered."); + panic("arm_devmap_bootstrap(): No devmap table registered."); for (pd = devmap_table; pd->pd_size != 0; ++pd) { pmap_map_chunk(l1pt, pd->pd_va, pd->pd_pa, pd->pd_size, pd->pd_prot,pd->pd_cache); } + + devmap_bootstrap_done = true; } /* Modified: head/sys/arm/include/devmap.h ============================================================================== --- head/sys/arm/include/devmap.h Tue Nov 5 04:06:29 2013 (r257672) +++ head/sys/arm/include/devmap.h Tue Nov 5 04:30:55 2013 (r257673) @@ -42,6 +42,22 @@ struct arm_devmap_entry { }; /* + * Returns the lowest KVA address used in any entry in the registered devmap + * table. This works with whatever table is registered, including the internal + * table used by arm_devmap_add_entry() if that routinue was used. Platforms can + * implement initarm_lastaddr() by calling this if static device mappings are + * their only use of high KVA space. + */ +vm_offset_t arm_devmap_lastaddr(void); + +/* + * Routine to automatically allocate KVA (from the top of the address space + * downwards) and make static device mapping entries in an internal table. The + * internal table is automatically registered on the first call to this. + */ +void arm_devmap_add_entry(vm_paddr_t pa, vm_size_t sz); + +/* * Register a platform-local table to be bootstrapped by the generic * initarm() in arm/machdep.c. This is used by newer code that allocates and * fills in its own local table but does not have its own initarm() routine. @@ -49,9 +65,10 @@ struct arm_devmap_entry { void arm_devmap_register_table(const struct arm_devmap_entry * _table); /* - * Directly process a table; called from initarm() of older platforms that don't - * use the generic initarm() in arm/machdep.c. If the table pointer is NULL, - * this will use the table installed previously by arm_devmap_register_table(). + * Establish mappings for all the entries in the table. This is called + * automatically from the common initarm() in arm/machdep.c, and also from the + * custom initarm() routines in older code. If the table pointer is NULL, this + * will use the table installed previously by arm_devmap_register_table(). */ void arm_devmap_bootstrap(vm_offset_t _l1pt, const struct arm_devmap_entry *_table); From owner-svn-src-head@FreeBSD.ORG Tue Nov 5 05:01:47 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 8820D9C4; Tue, 5 Nov 2013 05:01:47 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 75F402B90; Tue, 5 Nov 2013 05:01:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA551l2b006154; Tue, 5 Nov 2013 05:01:47 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA551lw3006152; Tue, 5 Nov 2013 05:01:47 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201311050501.rA551lw3006152@svn.freebsd.org> From: Ian Lepore Date: Tue, 5 Nov 2013 05:01:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257676 - in head/sys/arm: arm include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Nov 2013 05:01:47 -0000 Author: ian Date: Tue Nov 5 05:01:46 2013 New Revision: 257676 URL: http://svnweb.freebsd.org/changeset/base/257676 Log: Style and comment tweaks, no functional changes. Modified: head/sys/arm/arm/devmap.c head/sys/arm/include/devmap.h Modified: head/sys/arm/arm/devmap.c ============================================================================== --- head/sys/arm/arm/devmap.c Tue Nov 5 04:51:07 2013 (r257675) +++ head/sys/arm/arm/devmap.c Tue Nov 5 05:01:46 2013 (r257676) @@ -62,7 +62,7 @@ vm_offset_t arm_devmap_lastaddr() { const struct arm_devmap_entry *pd; - vm_offset_t lowaddr = ARM_VECTORS_HIGH; + vm_offset_t lowaddr; if (akva_devmap_idx > 0) return (akva_devmap_vaddr); @@ -70,6 +70,7 @@ arm_devmap_lastaddr() if (devmap_table == NULL) panic("arm_devmap_lastaddr(): No devmap table registered."); + lowaddr = ARM_VECTORS_HIGH; for (pd = devmap_table; pd->pd_size != 0; ++pd) { if (lowaddr > pd->pd_va) lowaddr = pd->pd_va; @@ -95,7 +96,7 @@ arm_devmap_add_entry(vm_paddr_t pa, vm_s panic("arm_devmap_add_entry() after arm_devmap_bootstrap()"); if (akva_devmap_idx == (AKVA_DEVMAP_MAX_ENTRIES - 1)) - panic("AKVA_DEVMAP_MAX_ENTRIES is too small!\n"); + panic("AKVA_DEVMAP_MAX_ENTRIES is too small"); if (akva_devmap_idx == 0) arm_devmap_register_table(akva_devmap_entries); @@ -152,7 +153,7 @@ arm_devmap_bootstrap(vm_offset_t l1pt, c if (table != NULL) devmap_table = table; else if (devmap_table == NULL) - panic("arm_devmap_bootstrap(): No devmap table registered."); + panic("arm_devmap_bootstrap(): No devmap table registered"); for (pd = devmap_table; pd->pd_size != 0; ++pd) { pmap_map_chunk(l1pt, pd->pd_va, pd->pd_pa, pd->pd_size, Modified: head/sys/arm/include/devmap.h ============================================================================== --- head/sys/arm/include/devmap.h Tue Nov 5 04:51:07 2013 (r257675) +++ head/sys/arm/include/devmap.h Tue Nov 5 05:01:46 2013 (r257676) @@ -42,18 +42,18 @@ struct arm_devmap_entry { }; /* - * Returns the lowest KVA address used in any entry in the registered devmap + * Return the lowest KVA address used in any entry in the registered devmap * table. This works with whatever table is registered, including the internal - * table used by arm_devmap_add_entry() if that routinue was used. Platforms can + * table used by arm_devmap_add_entry() if that routine was used. Platforms can * implement initarm_lastaddr() by calling this if static device mappings are * their only use of high KVA space. */ vm_offset_t arm_devmap_lastaddr(void); /* - * Routine to automatically allocate KVA (from the top of the address space - * downwards) and make static device mapping entries in an internal table. The - * internal table is automatically registered on the first call to this. + * Automatically allocate KVA (from the top of the address space downwards) and + * make static device mapping entries in an internal table. The internal table + * is automatically registered on the first call to this. */ void arm_devmap_add_entry(vm_paddr_t pa, vm_size_t sz); @@ -74,8 +74,8 @@ void arm_devmap_bootstrap(vm_offset_t _l const struct arm_devmap_entry *_table); /* - * Routines to translate between virtual and physical addresses within a region - * that is static-mapped by the devmap code. If the given address range isn't + * Translate between virtual and physical addresses within a region that is + * static-mapped by the devmap code. If the given address range isn't * static-mapped, then ptov returns NULL and vtop returns DEVMAP_PADDR_NOTFOUND. * The latter implies that you can't vtop just the last byte of physical address * space. This is not as limiting as it might sound, because even if a device From owner-svn-src-head@FreeBSD.ORG Tue Nov 5 05:18:19 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 7AC58E7F; Tue, 5 Nov 2013 05:18:19 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 595032C28; Tue, 5 Nov 2013 05:18:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA55IJ93010112; Tue, 5 Nov 2013 05:18:19 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA55IIwC010108; Tue, 5 Nov 2013 05:18:18 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201311050518.rA55IIwC010108@svn.freebsd.org> From: Ian Lepore Date: Tue, 5 Nov 2013 05:18:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257678 - head/sys/arm/freescale/imx X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Nov 2013 05:18:19 -0000 Author: ian Date: Tue Nov 5 05:18:18 2013 New Revision: 257678 URL: http://svnweb.freebsd.org/changeset/base/257678 Log: Remove local devmap code and use the essentially identical common code that got moved from imx_machdep.c to arm/devmap.c. Modified: head/sys/arm/freescale/imx/imx51_machdep.c head/sys/arm/freescale/imx/imx53_machdep.c head/sys/arm/freescale/imx/imx6_machdep.c head/sys/arm/freescale/imx/imx_machdep.c Modified: head/sys/arm/freescale/imx/imx51_machdep.c ============================================================================== --- head/sys/arm/freescale/imx/imx51_machdep.c Tue Nov 5 05:02:08 2013 (r257677) +++ head/sys/arm/freescale/imx/imx51_machdep.c Tue Nov 5 05:18:18 2013 (r257678) @@ -34,26 +34,58 @@ __FBSDID("$FreeBSD$"); #include #include +#include + +#include +#include #include + #include +vm_offset_t +initarm_lastaddr(void) +{ + + return (arm_devmap_lastaddr()); +} + +void +initarm_early_init(void) +{ + + /* XXX - Get rid of this stuff soon. */ + boothowto |= RB_VERBOSE|RB_MULTIPLE; + bootverbose = 1; +} + +void +initarm_gpio_init(void) +{ + +} + +void +initarm_late_init(void) +{ + +} + /* * Set up static device mappings. This is hand-optimized platform-specific * config data which covers most of the common on-chip devices with a few 1MB * section mappings. * * Notably missing are entries for GPU, IPU, in general anything video related. - * - * Note that for imx this is called from initarm_lastaddr() so that the lowest - * kva address used for static device mapping can be known at that point. */ -void -imx_devmap_init(void) +int +initarm_devmap_init(void) { - imx_devmap_addentry(0x70000000, 0x00100000); - imx_devmap_addentry(0x73f00000, 0x00100000); - imx_devmap_addentry(0x83f00000, 0x00100000); + arm_devmap_add_entry(0x70000000, 0x00100000); + arm_devmap_add_entry(0x73f00000, 0x00100000); + arm_devmap_add_entry(0x83f00000, 0x00100000); + + return (0); } void Modified: head/sys/arm/freescale/imx/imx53_machdep.c ============================================================================== --- head/sys/arm/freescale/imx/imx53_machdep.c Tue Nov 5 05:02:08 2013 (r257677) +++ head/sys/arm/freescale/imx/imx53_machdep.c Tue Nov 5 05:18:18 2013 (r257678) @@ -34,26 +34,57 @@ __FBSDID("$FreeBSD$"); #include #include +#include + +#include +#include #include #include +vm_offset_t +initarm_lastaddr(void) +{ + + return (arm_devmap_lastaddr()); +} + +void +initarm_early_init(void) +{ + + /* XXX - Get rid of this stuff soon. */ + boothowto |= RB_VERBOSE|RB_MULTIPLE; + bootverbose = 1; +} + +void +initarm_gpio_init(void) +{ + +} + +void +initarm_late_init(void) +{ + +} + /* * Set up static device mappings. This is hand-optimized platform-specific * config data which covers most of the common on-chip devices with a few 1MB * section mappings. * * Notably missing are entries for GPU, IPU, in general anything video related. - * - * Note that for imx this is called from initarm_lastaddr() so that the lowest - * kva address used for static device mapping can be known at that point. */ -void -imx_devmap_init(void) +int +initarm_devmap_init(void) { - imx_devmap_addentry(0x50000000, 0x00100000); - imx_devmap_addentry(0x53f00000, 0x00100000); - imx_devmap_addentry(0x63f00000, 0x00100000); + arm_devmap_add_entry(0x50000000, 0x00100000); + arm_devmap_add_entry(0x53f00000, 0x00100000); + arm_devmap_add_entry(0x63f00000, 0x00100000); + + return (0); } void Modified: head/sys/arm/freescale/imx/imx6_machdep.c ============================================================================== --- head/sys/arm/freescale/imx/imx6_machdep.c Tue Nov 5 05:02:08 2013 (r257677) +++ head/sys/arm/freescale/imx/imx6_machdep.c Tue Nov 5 05:18:18 2013 (r257678) @@ -35,19 +35,45 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include +#include #include #include #include +vm_offset_t +initarm_lastaddr(void) +{ + + return (arm_devmap_lastaddr()); +} + +void +initarm_early_init(void) +{ + + /* XXX - Get rid of this stuff soon. */ + boothowto |= RB_VERBOSE|RB_MULTIPLE; + bootverbose = 1; +} + +void +initarm_gpio_init(void) +{ + +} + +void +initarm_late_init(void) +{ + +} + /* - * Set up static device mappings. Note that for imx this is called from - * initarm_lastaddr() so that it can return the lowest address used for static - * device mapping, maximizing kva space. + * Set up static device mappings. * * This attempts to cover the most-used devices with 1MB section mappings, which * is good for performance (uses fewer TLB entries for device access). @@ -62,8 +88,8 @@ __FBSDID("$FreeBSD$"); * static map some of that area. Be careful with other things in that area such * as OCRAM that probably shouldn't be mapped as PTE_DEVICE memory. */ -void -imx_devmap_init(void) +int +initarm_devmap_init(void) { const uint32_t IMX6_ARMMP_PHYS = 0x00a00000; const uint32_t IMX6_ARMMP_SIZE = 0x00100000; @@ -72,9 +98,11 @@ imx_devmap_init(void) const uint32_t IMX6_AIPS2_PHYS = 0x02100000; const uint32_t IMX6_AIPS2_SIZE = 0x00100000; - imx_devmap_addentry(IMX6_ARMMP_PHYS, IMX6_ARMMP_SIZE); - imx_devmap_addentry(IMX6_AIPS1_PHYS, IMX6_AIPS1_SIZE); - imx_devmap_addentry(IMX6_AIPS2_PHYS, IMX6_AIPS2_SIZE); + arm_devmap_add_entry(IMX6_ARMMP_PHYS, IMX6_ARMMP_SIZE); + arm_devmap_add_entry(IMX6_AIPS1_PHYS, IMX6_AIPS1_SIZE); + arm_devmap_add_entry(IMX6_AIPS2_PHYS, IMX6_AIPS2_SIZE); + + return (0); } void Modified: head/sys/arm/freescale/imx/imx_machdep.c ============================================================================== --- head/sys/arm/freescale/imx/imx_machdep.c Tue Nov 5 05:02:08 2013 (r257677) +++ head/sys/arm/freescale/imx/imx_machdep.c Tue Nov 5 05:18:18 2013 (r257678) @@ -45,99 +45,6 @@ __FBSDID("$FreeBSD$"); #include #include -#define IMX_MAX_DEVMAP_ENTRIES 8 - -static struct arm_devmap_entry devmap_entries[IMX_MAX_DEVMAP_ENTRIES]; -static u_int devmap_idx; -static vm_offset_t devmap_vaddr = ARM_VECTORS_HIGH; - -void -imx_devmap_addentry(vm_paddr_t pa, vm_size_t sz) -{ - struct arm_devmap_entry *m; - - /* - * The last table entry is the all-zeroes end-of-table marker. If we're - * about to overwrite it the world is coming to an end. This code runs - * too early for the panic to be printed unless a special early-debug - * console is in use, but there's nothing else we can do. - */ - if (devmap_idx == (IMX_MAX_DEVMAP_ENTRIES - 1)) - panic("IMX_MAX_DEVMAP_ENTRIES is too small!\n"); - - /* - * Allocate virtual address space from the top of kva downwards. If the - * range being mapped is aligned and sized to 1MB boundaries then also - * align the virtual address to the next-lower 1MB boundary so that we - * end up with a section mapping. - */ - if ((pa & 0x000fffff) == 0 && (sz & 0x000fffff) == 0) { - devmap_vaddr = (devmap_vaddr - sz) & ~0x000fffff; - } else { - devmap_vaddr = (devmap_vaddr - sz) & ~0x00000fff; - } - m = &devmap_entries[devmap_idx++]; - m->pd_va = devmap_vaddr; - m->pd_pa = pa; - m->pd_size = sz; - m->pd_prot = VM_PROT_READ | VM_PROT_WRITE; - m->pd_cache = PTE_DEVICE; -} - -vm_offset_t -initarm_lastaddr(void) -{ - - return (devmap_vaddr); -} - -void -initarm_early_init(void) -{ - - /* XXX - Get rid of this stuff soon. */ - boothowto |= RB_VERBOSE|RB_MULTIPLE; - bootverbose = 1; -} - -int -initarm_devmap_init(void) -{ - - imx_devmap_init(); - arm_devmap_register_table(devmap_entries); - return (0); -} - -/* - * Set initial values of GPIO output ports - */ -void -initarm_gpio_init(void) -{ - -} - -void -initarm_late_init(void) -{ - struct arm_devmap_entry *m; - - /* - * We did the static devmap setup earlier, during initarm_lastaddr(), - * but now the console should be working and we can be verbose about - * what we did. - */ - if (bootverbose) { - for (m = devmap_entries; m->pd_va != 0; ++m) { - printf("Devmap: phys 0x%08x virt 0x%08x size %uK\n", - m->pd_pa, m->pd_va, m->pd_size / 1024); - } - } - - -} - struct arm32_dma_range * bus_dma_get_range(void) { From owner-svn-src-head@FreeBSD.ORG Tue Nov 5 05:32:06 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 9634A161; Tue, 5 Nov 2013 05:32:06 +0000 (UTC) (envelope-from jmg@h2.funkthat.com) Received: from h2.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C77AD2CC7; Tue, 5 Nov 2013 05:32:05 +0000 (UTC) Received: from h2.funkthat.com (localhost [127.0.0.1]) by h2.funkthat.com (8.14.3/8.14.3) with ESMTP id rA55VwtB044597 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 4 Nov 2013 21:31:58 -0800 (PST) (envelope-from jmg@h2.funkthat.com) Received: (from jmg@localhost) by h2.funkthat.com (8.14.3/8.14.3/Submit) id rA55Vwdk044596; Mon, 4 Nov 2013 21:31:58 -0800 (PST) (envelope-from jmg) Date: Mon, 4 Nov 2013 21:31:58 -0800 From: John-Mark Gurney To: Eitan Adler Subject: Re: svn commit: r257646 - head/lib/libc/string Message-ID: <20131105053158.GQ73243@funkthat.com> References: <201311041905.rA4J5WT0097968@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201311041905.rA4J5WT0097968@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i X-Operating-System: FreeBSD 7.2-RELEASE i386 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.2 (h2.funkthat.com [127.0.0.1]); Mon, 04 Nov 2013 21:31:58 -0800 (PST) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Nov 2013 05:32:06 -0000 Eitan Adler wrote this message on Mon, Nov 04, 2013 at 19:05 +0000: > Author: eadler > Date: Mon Nov 4 19:05:31 2013 > New Revision: 257646 > URL: http://svnweb.freebsd.org/changeset/base/257646 > > Log: > Use OpenBSD's revamped description of strlcpy and strlcat. > > This explanation is supposed to be simpler and better. In particular > "comparing it to the snprintf API provides lots of value, since it raises the > bar on understanding, so that programmers/auditors will a better job calling > all 3 of these functions." Can we add a warning that it is not safe to just simply replace strncpy with strlcpy? strncpy does something useful in that it NULs out the remaining buffer, which when coping strings from/to kernel buffers prevent information leaks, so I'd argue that strlcpy can be used incorrectly just as strncpy can be... Just a thought... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-svn-src-head@FreeBSD.ORG Tue Nov 5 06:12:32 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A518B649; Tue, 5 Nov 2013 06:12:32 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail107.syd.optusnet.com.au (mail107.syd.optusnet.com.au [211.29.132.53]) by mx1.freebsd.org (Postfix) with ESMTP id 351742E2B; Tue, 5 Nov 2013 06:12:31 +0000 (UTC) Received: from c122-106-156-23.carlnfd1.nsw.optusnet.com.au (c122-106-156-23.carlnfd1.nsw.optusnet.com.au [122.106.156.23]) by mail107.syd.optusnet.com.au (Postfix) with ESMTPS id C84F5D40330; Tue, 5 Nov 2013 17:12:21 +1100 (EST) Date: Tue, 5 Nov 2013 17:12:20 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Dimitry Andric Subject: Re: svn commit: r257645 - head/gnu/lib/libgcc In-Reply-To: <57710455-9B81-47FF-926B-1075EB6F4290@FreeBSD.org> Message-ID: <20131105160307.U5956@besplex.bde.org> References: <201311041815.rA4IFjwO081492@svn.freebsd.org> <57710455-9B81-47FF-926B-1075EB6F4290@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=DstvpgP+ c=1 sm=1 tr=0 a=ebeQFi2P/qHVC0Yw9JDJ4g==:117 a=PO7r1zJSAAAA:8 a=RBhRhik7K8EA:10 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=O6xDf_UZitYA:10 a=6I5d2MoRAAAA:8 a=N-E5Izq8NgJ8tE2gAmoA:9 a=CjuIK1q_8ugA:10 a=SV7veod9ZcQA:10 Cc: svn-src-head@FreeBSD.org, Sean Bruno , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Nov 2013 06:12:32 -0000 On Mon, 4 Nov 2013, Dimitry Andric wrote: > On 04 Nov 2013, at 19:15, Sean Bruno wrote: >> Author: sbruno >> Date: Mon Nov 4 18:15:45 2013 >> New Revision: 257645 >> URL: http://svnweb.freebsd.org/changeset/base/257645 >> >> Log: >> Quiesce warning around gcc_assert() for an inline macro that uses >> a static variable. This code has been moved around in gcc, but is still in >> use in the latest trunk version of the compiler. >> >> gnu/lib/libgcc/../../../contrib/gcc/unwind-dw2.c:208:36: >> warning: static variable 'dwarf_reg_size_table' is used in an inline >> function with external linkage [-Wstatic-in-inline] >> gcc_assert (index < (int) sizeof(dwarf_reg_size_table)); > > The warning is actually correct, since _Unwind_SetGR() is an extern > inline function (although it is not explicitly declared as such), but it extern has very confusing semantics, so it is hard to say what an extern inline function is. C99 broke this, so in C99 "extern inline" means the definition (which must be turned into object code, giving a public function) while plain "inline" means the declaration (which can be omitted from the object code). This is almost perfectly backwards relative to both normal meanings of extern and relative to old gcc extern inline. unwind-fw2.c is clearly not C99 code, since it uses plain "inline" but needs the public function(s). > does access a static variable. It would probably be safest to make the > variable non-static instead, since the function itself cannot be changed > to static inline. This was probably not a bug with old gcc plain inline semantics, but probably was a bug with old gcc extern inline semantics, since old semantics weren't gratuitously strict but static variables just aren't visible except in the file that has them combined with a plain inline function (plain inline in old semantics = extern inline in new semantics). unwind-dw2.c is an example of this working combination unless it is broken by compiling it with new semantics. It seems to take nonstandard warning flags and/or compiling for a standard newer than the code to get this warning. I get it mainly with -std=c99 -pedantic, but there are many clearly broken cases. My test program is: volatile static int x; inline int z(void) { return x; } cc: no warning; null object code gcc: no warning; public function in object code Already there is a huge incompatibility (bug in clang). This is because clang defaults to -std=c99 (or is it -std=clang99?) and thus gets new C99 broken plain inline semantics, while gcc defaults to -std=gnu89 and thus gets old gnu89 less-broken plain inline semantics. cc -std=c99: no warning; null object code gcc -std=c99: no warning; null object code Now both get new inline semantics. I don't see how the plain inline functions in unwind-fw2.c can be public without either turning off new semantics or turning on new semantics and declaring them as extern inline. When the example is modified to add a function that returns z(), z() is still not made public. This is new semantics. z() should only be made public if it is too large to inline and it is called by other functions in the file. Even then, it probably needs to be renamed to avoid conflicts. cc -std=gnu89: no warning; public function in object code gcc -std=gnu89: no warning; public function in object code Correct. cc -std=gnu89 -pedantic: warning; public function in object code gcc -std=gnu89 -pedantic: no warning; public function in object code Bug in clang. It emits the warning even for old semantics, although it gives correct semantics. cc -std=c99 -pedantic -fgnu89-inline: warning; public function ... gcc -std=c99 -pedantic -fgnu89-inline: no warning; public function ... -fgnu89-inline works correctly to restores the inline semantics in otherwise-c99 code, but it doesn't fix the warning. Modifying the example to declare the function as "extern inline" gives perfectly backwards behaviour. E.g., with defaults it is now clang that generates the public function and gcc not. Compile-time flags like the unportable -Wno-static-in-inline, -std=force and -fgnu89-inline are bad ways to modify this behaviour. The semantic changes should be limited to individual functions using attributes. Another bug suite turns up when this is done: volatile static int x; __gnu89_inline int z(void) { return x; } Someone broke the support for doing this correctly by removing __gnu89_inline from together with unportabalizing the code that used it. It now takes a hard-coded __attribute__(()) to do this. I recovered the macro from FreeBSD[7-8] to fix the example: #define __gnu89_inline __attribute__((__gnu_inline__)) __inline (This preserves the design bug that __inline is part of the macro. The related __always_inline macro only gives the attribute.) This works right to the same extent as -fgnu-inline for modifying -std=c99 -- it has limited scope, and is supported by clang, but doesn't fix the warning. Bruce From owner-svn-src-head@FreeBSD.ORG Tue Nov 5 06:13:47 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 226677AA; Tue, 5 Nov 2013 06:13:47 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 000692E33; Tue, 5 Nov 2013 06:13:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA56Dkni028873; Tue, 5 Nov 2013 06:13:46 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA56DkiT028871; Tue, 5 Nov 2013 06:13:46 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201311050613.rA56DkiT028871@svn.freebsd.org> From: Mark Johnston Date: Tue, 5 Nov 2013 06:13:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257679 - in head/sys/cddl/contrib/opensolaris/uts: common/sys intel/dtrace X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Nov 2013 06:13:47 -0000 Author: markj Date: Tue Nov 5 06:13:46 2013 New Revision: 257679 URL: http://svnweb.freebsd.org/changeset/base/257679 Log: Use suword32 and suword64 instead of copyout(9). This fixes a bug in the emulation of the call instruction caused by reversing the uaddr and kaddr arguments when copying data out to userland: the suword* functions take the uaddr as the first argument whereas copyout(9) takes the kaddr as the first argument. This also partially undoes the fixes from r257143. Submitted by: Prashanth Kumar (original version) MFC after: 1 month Modified: head/sys/cddl/contrib/opensolaris/uts/common/sys/fasttrap_impl.h head/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/sys/fasttrap_impl.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/sys/fasttrap_impl.h Tue Nov 5 05:18:18 2013 (r257678) +++ head/sys/cddl/contrib/opensolaris/uts/common/sys/fasttrap_impl.h Tue Nov 5 06:13:46 2013 (r257679) @@ -158,15 +158,15 @@ typedef struct fasttrap_hash { */ #define fasttrap_copyout copyout #define fasttrap_fuword32 fuword32 -#define fasttrap_suword32(_k, _u) copyout((_k), (_u), sizeof(uint32_t)) -#define fasttrap_suword64(_k, _u) copyout((_k), (_u), sizeof(uint64_t)) +#define fasttrap_suword32 suword32 +#define fasttrap_suword64 suword64 #ifdef __amd64__ #define fasttrap_fulword fuword64 -#define fasttrap_sulword fasttrap_suword64 +#define fasttrap_sulword suword64 #else #define fasttrap_fulword fuword32 -#define fasttrap_sulword fasttrap_suword32 +#define fasttrap_sulword suword32 #endif extern void fasttrap_sigtrap(proc_t *, kthread_t *, uintptr_t); Modified: head/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c Tue Nov 5 05:18:18 2013 (r257678) +++ head/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c Tue Nov 5 06:13:46 2013 (r257679) @@ -1399,12 +1399,12 @@ fasttrap_pid_probe(struct reg *rp) #ifdef __amd64 if (p->p_model == DATAMODEL_NATIVE) { rp->r_rsp -= sizeof (uintptr_t); - ret = fasttrap_sulword(&rp->r_rbp, (void *)rp->r_rsp); + ret = fasttrap_sulword((void *)rp->r_rsp, rp->r_rbp); } else { #endif #ifdef __i386__ rp->r_rsp -= sizeof (uint32_t); - ret = fasttrap_suword32(&rp->r_rbp, (void *)rp->r_rsp); + ret = fasttrap_suword32((void *)rp->r_rsp, rp->r_rbp); #endif #ifdef __amd64 } @@ -1499,13 +1499,13 @@ fasttrap_pid_probe(struct reg *rp) if (p->p_model == DATAMODEL_NATIVE) { addr = rp->r_rsp - sizeof (uintptr_t); pcps = pc + tp->ftt_size; - ret = fasttrap_sulword((void *)addr, &pcps); + ret = fasttrap_sulword((void *)addr, pcps); } else { #endif #ifdef __i386__ addr = rp->r_rsp - sizeof (uint32_t); pcps = (uint32_t)(pc + tp->ftt_size); - ret = fasttrap_suword32((void *)addr, &pcps); + ret = fasttrap_suword32((void *)addr, pcps); #endif #ifdef __amd64 } From owner-svn-src-head@FreeBSD.ORG Tue Nov 5 06:18:51 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 2605C92A; Tue, 5 Nov 2013 06:18:51 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 145B52E5C; Tue, 5 Nov 2013 06:18:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA56IoLu029476; Tue, 5 Nov 2013 06:18:50 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA56IopR029475; Tue, 5 Nov 2013 06:18:50 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201311050618.rA56IopR029475@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 5 Nov 2013 06:18:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257680 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Nov 2013 06:18:51 -0000 Author: kib Date: Tue Nov 5 06:18:50 2013 New Revision: 257680 URL: http://svnweb.freebsd.org/changeset/base/257680 Log: Do not coalesce if the swap object belongs to tmpfs vnode. The coalesce would extend the object to keep pages for the anonymous mapping created by the process. The pages has no relations to the tmpfs file content which could be written into the corresponding range, causing anonymous mapping and file content aliasing and subsequent corruption. Another lesser problem created by coalescing is over-accounting on the tmpfs node destruction, since the object size is substracted from the total count of the pages owned by the tmpfs mount. Reported and tested by: bdrewery Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/vm/vm_object.c Modified: head/sys/vm/vm_object.c ============================================================================== --- head/sys/vm/vm_object.c Tue Nov 5 06:13:46 2013 (r257679) +++ head/sys/vm/vm_object.c Tue Nov 5 06:18:50 2013 (r257680) @@ -2099,8 +2099,9 @@ vm_object_coalesce(vm_object_t prev_obje if (prev_object == NULL) return (TRUE); VM_OBJECT_WLOCK(prev_object); - if (prev_object->type != OBJT_DEFAULT && - prev_object->type != OBJT_SWAP) { + if ((prev_object->type != OBJT_DEFAULT && + prev_object->type != OBJT_SWAP) || + (prev_object->flags & OBJ_TMPFS) != 0) { VM_OBJECT_WUNLOCK(prev_object); return (FALSE); } From owner-svn-src-head@FreeBSD.ORG Tue Nov 5 06:32:25 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D168FAE2; Tue, 5 Nov 2013 06:32:25 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BE04D2EEA; Tue, 5 Nov 2013 06:32:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA56WPAE035288; Tue, 5 Nov 2013 06:32:25 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA56WOOA035278; Tue, 5 Nov 2013 06:32:24 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201311050632.rA56WOOA035278@svn.freebsd.org> From: Edwin Groothuis Date: Tue, 5 Nov 2013 06:32:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257681 - head/contrib/tzdata X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Nov 2013 06:32:25 -0000 Author: edwin Date: Tue Nov 5 06:32:23 2013 New Revision: 257681 URL: http://svnweb.freebsd.org/changeset/base/257681 Log: MFV of 255902, tzdata2013f MFV of 257651, tzdata2013h tzdata2013f - Jordan goes to winter time on the last Friday in October. - Tocantins in Brazil will not go into summer time in October. - Indonesian time zones renames. - Lots of cleanups in with regarding to links and historical data. tzdata2013h - Libya didn't go back to DST. - Fix Morocco 2038 issue. - Brazil/Acre and Western Amazonas are chaning timezones. Added: head/contrib/tzdata/leap-seconds.list - copied unchanged from r255902, vendor/tzdata/dist/leap-seconds.list Modified: head/contrib/tzdata/africa head/contrib/tzdata/antarctica head/contrib/tzdata/asia head/contrib/tzdata/australasia head/contrib/tzdata/backward head/contrib/tzdata/etcetera 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 Tue Nov 5 06:18:50 2013 (r257680) +++ head/contrib/tzdata/africa Tue Nov 5 06:32:23 2013 (r257681) @@ -451,6 +451,14 @@ Zone Africa/Monrovia -0:43:08 - LMT 1882 # (either two days before them or five days after them, so as to fall on # lastFri instead of lastSun). +# From Even Scharning (2013-10-25): +# The scheduled end of DST in Libya on Friday, October 25, 2013 was +# cancelled yesterday.... +# http://www.libyaherald.com/2013/10/24/correction-no-time-change-tomorrow/ +# +# From Paul Eggert (2013-10-25): +# For now, assume they're reverting to the pre-2012 rules of permanent UTC+2. + # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Libya 1951 only - Oct 14 2:00 1:00 S Rule Libya 1952 only - Jan 1 0:00 0 - @@ -467,8 +475,8 @@ Rule Libya 1987 1989 - Apr 1 0:00 1:00 Rule Libya 1987 1989 - Oct 1 0:00 0 - Rule Libya 1997 only - Apr 4 0:00 1:00 S Rule Libya 1997 only - Oct 4 0:00 0 - -Rule Libya 2013 max - Mar lastFri 1:00 1:00 S -Rule Libya 2013 max - Oct lastFri 2:00 0 - +Rule Libya 2013 only - Mar lastFri 1:00 1:00 S +Rule Libya 2013 only - Oct lastFri 2:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Africa/Tripoli 0:52:44 - LMT 1920 1:00 Libya CE%sT 1959 @@ -479,7 +487,8 @@ Zone Africa/Tripoli 0:52:44 - LMT 1920 2:00 - EET 1996 Sep 30 1:00 Libya CE%sT 1997 Oct 4 2:00 - EET 2012 Nov 10 2:00 - 1:00 Libya CE%sT + 1:00 Libya CE%sT 2013 Oct 25 2:00 + 2:00 - EET # Madagascar # Zone NAME GMTOFF RULES FORMAT [UNTIL] @@ -684,15 +693,6 @@ Zone Indian/Mayotte 3:00:56 - LMT 1911 J # http://www.google.com/search?hl=en&q=Conseil+de+gouvernement+maroc+heure+avance&btnG=Search # -# From Alex Krivenyshev (2008-05-09): -# Is Western Sahara (part which administrated by Morocco) going to follow -# Morocco DST changes? Any information? What about other part of -# Western Sahara - under administration of POLISARIO Front (also named -# SADR Saharawi Arab Democratic Republic)? - -# From Arthur David Olson (2008-05-09): -# XXX--guess that it is only Morocco for now; guess only 2008 for now. - # From Steffen Thorsen (2008-08-27): # Morocco will change the clocks back on the midnight between August 31 # and September 1. They originally planned to observe DST to near the end @@ -858,13 +858,23 @@ Zone Indian/Mayotte 3:00:56 - LMT 1911 J # transitions would be 2013-07-07 and 2013-08-10; see: # http://www.maroc.ma/en/news/morocco-suspends-daylight-saving-time-july-7-aug10 -# From Paul Eggert (2013-07-03): +# From Steffen Thorsen (2013-09-28): +# Morocco extends DST by one month, on very short notice, just 1 day +# before it was going to end. There is a new decree (2.13.781) for +# this, where DST from now on goes from last Sunday of March at 02:00 +# to last Sunday of October at 03:00, similar to EU rules. Official +# source (French): +# http://www.maroc.gov.ma/fr/actualites/lhoraire-dete-gmt1-maintenu-jusquau-27-octobre-2013 +# Another source (specifying the time for start and end in the decree): +# http://www.lemag.ma/Heure-d-ete-au-Maroc-jusqu-au-27-octobre_a75620.html + +# From Paul Eggert (2013-10-03): # To estimate what the Moroccan government will do in future years, -# transition dates for 2014 through 2021 were determined by running +# transition dates for 2014 through 2038 were determined by running # the following program under GNU Emacs 24.3: # # (let ((islamic-year 1435)) -# (while (< islamic-year 1444) +# (while (< islamic-year 1461) # (let ((a # (calendar-gregorian-from-absolute # (calendar-islamic-to-absolute (list 9 1 islamic-year)))) @@ -879,13 +889,18 @@ Zone Indian/Mayotte 3:00:56 - LMT 1911 J # (car (cdr (cdr b))) (calendar-month-name (car b) t) (car (cdr b))))) # (setq islamic-year (+ 1 islamic-year)))) # -# with the results hand-edited for 2020-2022, when the normal spring-forward -# date falls during the estimated Ramadan. -# -# From 2023 through 2038 Ramadan is not predicted to overlap with -# daylight saving time. Starting in 2039 there will be overlap again, -# but 32-bit time_t values roll around in 2038 so for now do not worry -# about dates after 2038. +# with spring-forward transitions removed for 2023-2025, when the +# normal spring-forward date falls during the estimated Ramadan; with +# all transitions removed for 2026-2035, where the estimated Ramadan +# falls entirely outside daylight-saving time; and with fall-back +# transitions removed for 2036-2037, where the normal fall-back +# date falls during the estimated Ramadan. Normally, the table would +# stop after 2037 because 32-bit time_t values roll around early in 2038, +# but that would imply a prediction of perpetual DST after March 2038 +# due to the year-2037 glitches. So, this table instead stops after +# 2038, the first non-glitchy year after the 32-bit rollover. +# An advantage of stopping after 2038 is that it lets zic guess +# TZ='WET0WEST,M3.5.0,M10.5.0/3' for time stamps far in the future. # RULE NAME FROM TO TYPE IN ON AT SAVE LETTER/S @@ -912,12 +927,14 @@ Rule Morocco 2010 only - May 2 0:00 1: Rule Morocco 2010 only - Aug 8 0:00 0 - Rule Morocco 2011 only - Apr 3 0:00 1:00 S Rule Morocco 2011 only - Jul 31 0 0 - -Rule Morocco 2012 2019 - Apr lastSun 2:00 1:00 S -Rule Morocco 2012 max - Sep lastSun 3:00 0 - +Rule Morocco 2012 2013 - Apr lastSun 2:00 1:00 S +Rule Morocco 2012 only - Sep 30 3:00 0 - Rule Morocco 2012 only - Jul 20 3:00 0 - Rule Morocco 2012 only - Aug 20 2:00 1:00 S Rule Morocco 2013 only - Jul 7 3:00 0 - Rule Morocco 2013 only - Aug 10 2:00 1:00 S +Rule Morocco 2013 2035 - Oct lastSun 3:00 0 - +Rule Morocco 2014 2022 - Mar lastSun 2:00 1:00 S Rule Morocco 2014 only - Jun 29 3:00 0 - Rule Morocco 2014 only - Jul 29 2:00 1:00 S Rule Morocco 2015 only - Jun 18 3:00 0 - @@ -930,20 +947,42 @@ Rule Morocco 2018 only - May 16 3:00 0 Rule Morocco 2018 only - Jun 15 2:00 1:00 S Rule Morocco 2019 only - May 6 3:00 0 - Rule Morocco 2019 only - Jun 5 2:00 1:00 S +Rule Morocco 2020 only - Apr 24 3:00 0 - Rule Morocco 2020 only - May 24 2:00 1:00 S +Rule Morocco 2021 only - Apr 13 3:00 0 - Rule Morocco 2021 only - May 13 2:00 1:00 S +Rule Morocco 2022 only - Apr 3 3:00 0 - Rule Morocco 2022 only - May 3 2:00 1:00 S -Rule Morocco 2023 max - Apr lastSun 2:00 1:00 S +Rule Morocco 2023 only - Apr 22 2:00 1:00 S +Rule Morocco 2024 only - Apr 10 2:00 1:00 S +Rule Morocco 2025 only - Mar 31 2:00 1:00 S +Rule Morocco 2026 max - Mar lastSun 2:00 1:00 S +Rule Morocco 2036 only - Oct 21 3:00 0 - +Rule Morocco 2037 only - Oct 11 3:00 0 - +Rule Morocco 2038 only - Sep 30 3:00 0 - +Rule Morocco 2038 only - Oct 30 2:00 1:00 S +Rule Morocco 2038 max - Oct lastSun 3:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Africa/Casablanca -0:30:20 - LMT 1913 Oct 26 0:00 Morocco WE%sT 1984 Mar 16 1:00 - CET 1986 0:00 Morocco WE%sT + # Western Sahara +# +# From Gwillim Law (2013-10-22): +# A correspondent who is usually well informed about time zone matters +# ... says that Western Sahara observes daylight saving time, just as +# Morocco does. +# +# From Paul Eggert (2013-10-23): +# Assume that this has been true since Western Sahara switched to GMT, +# since most of it was then controlled by Morocco. + Zone Africa/El_Aaiun -0:52:48 - LMT 1934 Jan -1:00 - WAT 1976 Apr 14 - 0:00 - WET + 0:00 Morocco WE%sT # Mozambique # Zone NAME GMTOFF RULES FORMAT [UNTIL] @@ -1100,9 +1139,7 @@ Zone Africa/Khartoum 2:10:08 - LMT 1931 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 +Link Africa/Khartoum Africa/Juba # Swaziland # Zone NAME GMTOFF RULES FORMAT [UNTIL] Modified: head/contrib/tzdata/antarctica ============================================================================== --- head/contrib/tzdata/antarctica Tue Nov 5 06:18:50 2013 (r257680) +++ head/contrib/tzdata/antarctica Tue Nov 5 06:32:23 2013 (r257681) @@ -16,9 +16,9 @@ # # Except for the French entries, # I made up all time zone abbreviations mentioned here; corrections welcome! -# FORMAT is `zzz' and GMTOFF is 0 for locations while uninhabited. +# FORMAT is 'zzz' and GMTOFF is 0 for locations while uninhabited. -# These rules are stolen from the `southamerica' file. +# These rules are stolen from the 'southamerica' file. # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule ArgAQ 1964 1966 - Mar 1 0:00 0 - Rule ArgAQ 1964 1966 - Oct 15 0:00 1:00 S @@ -228,9 +228,10 @@ Zone Antarctica/Syowa 0 - zzz 1957 Jan 2 # Scott Island (never inhabited) # # year-round base -# Scott, Ross Island, since 1957-01, is like Antarctica/McMurdo. +# Scott Base, Ross Island, since 1957-01. +# See Pacific/Auckland. # -# These rules for New Zealand are stolen from the `australasia' file. +# These rules for New Zealand are stolen from the 'australasia' file. # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule NZAQ 1974 only - Nov 3 2:00s 1:00 D Rule NZAQ 1975 1988 - Oct lastSun 2:00s 1:00 D @@ -268,11 +269,11 @@ Rule NZAQ 2008 max - Apr Sun>=1 2:00s 0 # From Lee Hotz (2001-03-08): # I queried the folks at Columbia who spent the summer at Vostok and this is # what they had to say about time there: -# ``in the US Camp (East Camp) we have been on New Zealand (McMurdo) +# "in the US Camp (East Camp) we have been on New Zealand (McMurdo) # time, which is 12 hours ahead of GMT. The Russian Station Vostok was # 6 hours behind that (although only 2 miles away, i.e. 6 hours ahead # of GMT). This is a time zone I think two hours east of Moscow. The -# natural time zone is in between the two: 8 hours ahead of GMT.'' +# natural time zone is in between the two: 8 hours ahead of GMT." # # From Paul Eggert (2001-05-04): # This seems to be hopelessly confusing, so I asked Lee Hotz about it @@ -337,16 +338,8 @@ Zone Antarctica/Palmer 0 - zzz 1965 -4:00 ChileAQ CL%sT # # -# McMurdo, Ross Island, since 1955-12 -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Antarctica/McMurdo 0 - zzz 1956 - 12:00 NZAQ NZ%sT -# -# Amundsen-Scott, South Pole, continuously occupied since 1956-11-20 -# -# From Paul Eggert (1996-09-03): -# Normally it wouldn't have a separate entry, since it's like the -# larger Antarctica/McMurdo since 1970, but it's too famous to omit. +# McMurdo Station, Ross Island, since 1955-12 +# Amundsen-Scott South Pole Station, continuously occupied since 1956-11-20 # # From Chris Carrier (1996-06-27): # Siple, the first commander of the South Pole station, @@ -368,4 +361,4 @@ Zone Antarctica/McMurdo 0 - zzz 1956 # we have to go around and set them back 5 minutes or so. # Maybe if we let them run fast all of the time, we'd get to leave here sooner!! # -Link Antarctica/McMurdo Antarctica/South_Pole +# See 'australasia' for Antarctica/McMurdo. Modified: head/contrib/tzdata/asia ============================================================================== --- head/contrib/tzdata/asia Tue Nov 5 06:18:50 2013 (r257680) +++ head/contrib/tzdata/asia Tue Nov 5 06:32:23 2013 (r257681) @@ -6,7 +6,7 @@ # go ahead and edit the file (and please send any changes to # tz@iana.org for general use in the future). -# From Paul Eggert (2013-02-21): +# From Paul Eggert (2013-08-11): # # A good source for time zone historical data outside the U.S. is # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition), @@ -44,11 +44,11 @@ # 4:00 GST Gulf* # 5:30 IST India # 7:00 ICT Indochina* -# 7:00 WIT west Indonesia -# 8:00 CIT central Indonesia +# 7:00 WIB west Indonesia (Waktu Indonesia Barat) +# 8:00 WITA central Indonesia (Waktu Indonesia Tengah) # 8:00 CST China # 9:00 CJT Central Japanese Time (1896/1937)* -# 9:00 EIT east Indonesia +# 9:00 WIT east Indonesia (Waktu Indonesia Timur) # 9:00 JST JDT Japan # 9:00 KST KDT Korea # 9:30 CST (Australian) Central Standard Time @@ -756,7 +756,7 @@ Zone Asia/Dili 8:22:20 - LMT 1912 8:00 - TLT 1942 Feb 21 23:00 # E Timor Time 9:00 - JST 1945 Sep 23 9:00 - TLT 1976 May 3 - 8:00 - CIT 2000 Sep 17 00:00 + 8:00 - WITA 2000 Sep 17 00:00 9:00 - TLT # India @@ -793,36 +793,53 @@ Zone Asia/Kolkata 5:53:28 - LMT 1880 # K # (Hollandia). For now, assume all Indonesian locations other than Jayapura # switched on 1945-09-23. # +# From Paul Eggert (2013-08-11): +# Normally the tz database uses English-language abbreviations, but in +# Indonesia it's typical to use Indonesian-language abbreviations even +# when writing in English. For example, see the English-language +# summary published by the Time and Frequency Laboratory of the +# Research Center for Calibration, Instrumentation and Metrology, +# Indonesia, (2006-09-29). +# The abbreviations are: +# +# WIB - UTC+7 - Waktu Indonesia Barat (Indonesia western time) +# WITA - UTC+8 - Waktu Indonesia Tengah (Indonesia central time) +# WIT - UTC+9 - Waktu Indonesia Timur (Indonesia eastern time) +# # Zone NAME GMTOFF RULES FORMAT [UNTIL] +# Java, Sumatra Zone Asia/Jakarta 7:07:12 - LMT 1867 Aug 10 # Shanks & Pottenger say the next transition was at 1924 Jan 1 0:13, # but this must be a typo. - 7:07:12 - JMT 1923 Dec 31 23:47:12 # Jakarta + 7:07:12 - BMT 1923 Dec 31 23:47:12 # Batavia 7:20 - JAVT 1932 Nov # Java Time - 7:30 - WIT 1942 Mar 23 + 7:30 - WIB 1942 Mar 23 9:00 - JST 1945 Sep 23 - 7:30 - WIT 1948 May - 8:00 - WIT 1950 May - 7:30 - WIT 1964 - 7:00 - WIT + 7:30 - WIB 1948 May + 8:00 - WIB 1950 May + 7:30 - WIB 1964 + 7:00 - WIB +# west and central Borneo Zone Asia/Pontianak 7:17:20 - LMT 1908 May 7:17:20 - PMT 1932 Nov # Pontianak MT - 7:30 - WIT 1942 Jan 29 + 7:30 - WIB 1942 Jan 29 9:00 - JST 1945 Sep 23 - 7:30 - WIT 1948 May - 8:00 - WIT 1950 May - 7:30 - WIT 1964 - 8:00 - CIT 1988 Jan 1 - 7:00 - WIT + 7:30 - WIB 1948 May + 8:00 - WIB 1950 May + 7:30 - WIB 1964 + 8:00 - WITA 1988 Jan 1 + 7:00 - WIB +# Sulawesi, Lesser Sundas, east and south Borneo Zone Asia/Makassar 7:57:36 - LMT 1920 7:57:36 - MMT 1932 Nov # Macassar MT - 8:00 - CIT 1942 Feb 9 + 8:00 - WITA 1942 Feb 9 9:00 - JST 1945 Sep 23 - 8:00 - CIT + 8:00 - WITA +# Maluku Islands, West Papua, Papua Zone Asia/Jayapura 9:22:48 - LMT 1932 Nov - 9:00 - EIT 1944 Sep 1 + 9:00 - WIT 1944 Sep 1 9:30 - CST 1964 - 9:00 - EIT + 9:00 - WIT # Iran @@ -1364,9 +1381,11 @@ Zone Asia/Tokyo 9:18:59 - LMT 1887 Dec 3 # until about the same time next year (at least). # http://www.petra.gov.jo/Public_News/Nws_NewsDetails.aspx?NewsID=88950 # -# From Paul Eggert (2012-10-25): -# For now, assume this is just a one-year measure. If it becomes -# permanent, we should move Jordan from EET to AST effective tomorrow. +# From Paul Eggert (2013-09-21): +# It's looking like this change will be permanent; see +# Petra News Agency, Cancelling winter saved Jordan $7 million (2013-02-20) +# . +# So move Jordan to UTC+3 as of the abovementioned date. # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Jordan 1973 only - Jun 6 0:00 1:00 S @@ -1392,15 +1411,15 @@ Rule Jordan 1995 1998 - Sep Fri>=15 0:00 Rule Jordan 1999 only - Jul 1 0:00s 1:00 S Rule Jordan 1999 2002 - Sep lastFri 0:00s 0 - Rule Jordan 2000 2001 - Mar lastThu 0:00s 1:00 S -Rule Jordan 2002 max - Mar lastThu 24:00 1:00 S +Rule Jordan 2002 2012 - Mar lastThu 24:00 1:00 S Rule Jordan 2003 only - Oct 24 0:00s 0 - Rule Jordan 2004 only - Oct 15 0:00s 0 - Rule Jordan 2005 only - Sep lastFri 0:00s 0 - -Rule Jordan 2006 2011 - Oct lastFri 0:00s 0 - -Rule Jordan 2013 max - Oct lastFri 0:00s 0 - +Rule Jordan 2006 2012 - Oct lastFri 0:00s 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Amman 2:23:44 - LMT 1931 - 2:00 Jordan EE%sT + 2:00 Jordan EE%sT 2012 Oct 26 0:00s + 3:00 - AST # Kazakhstan @@ -2280,9 +2299,18 @@ Zone Asia/Karachi 4:28:12 - LMT 1907 # http://www.samanews.com/index.php?act=Show&id=154120 # http://safa.ps/details/news/99844/%D8%B1%D8%A7%D9%85-%D8%A7%D9%84%D9%84%D9%87-%D8%A8%D8%AF%D8%A1-%D8%A7%D9%84%D8%AA%D9%88%D9%82%D9%8A%D8%AA-%D8%A7%D9%84%D8%B5%D9%8A%D9%81%D9%8A-29-%D8%A7%D9%84%D8%AC%D8%A7%D8%B1%D9%8A.html -# From Paul Eggert (2013-04-15): +# From Steffen Thorsen (2013-09-24): +# The Gaza and West Bank are ending DST Thursday at midnight +# (2013-09-27 00:00:00) (one hour earlier than last year...). +# This source in English, says "that winter time will go into effect +# at midnight on Thursday in the West Bank and Gaza Strip": +# http://english.wafa.ps/index.php?action=detail&id=23246 +# official source...: +# http://www.palestinecabinet.gov.ps/ar/Views/ViewDetails.aspx?pid=1252 + +# From Paul Eggert (2013-09-24): # For future dates, guess the last Thursday in March at 24:00 through -# the first Friday on or after September 21 at 01:00. This is consistent with +# the first Friday on or after September 21 at 00:00. This is consistent with # the predictions in today's editions of the following URLs, # which are for Gaza and Hebron respectively: # http://www.timeanddate.com/worldclock/timezone.html?n=702 @@ -2313,7 +2341,8 @@ Rule Palestine 2011 only - Aug 1 0:00 0 Rule Palestine 2011 only - Aug 30 0:00 1:00 S Rule Palestine 2011 only - Sep 30 0:00 0 - Rule Palestine 2012 max - Mar lastThu 24:00 1:00 S -Rule Palestine 2012 max - Sep Fri>=21 1:00 0 - +Rule Palestine 2012 only - Sep 21 1:00 0 - +Rule Palestine 2013 max - Sep Fri>=21 0:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Gaza 2:17:52 - LMT 1900 Oct Modified: head/contrib/tzdata/australasia ============================================================================== --- head/contrib/tzdata/australasia Tue Nov 5 06:18:50 2013 (r257680) +++ head/contrib/tzdata/australasia Tue Nov 5 06:32:23 2013 (r257681) @@ -352,16 +352,25 @@ Zone Indian/Cocos 6:27:40 - LMT 1900 # today confirmed that Fiji will start daylight savings at 2 am on Sunday 21st # October 2012 and end at 3 am on Sunday 20th January 2013. # http://www.fiji.gov.fj/index.php?option=com_content&view=article&id=6702&catid=71&Itemid=155 -# -# From Paul Eggert (2012-08-31): -# For now, guess a pattern of the penultimate Sundays in October and January. + +# From the Fijian Government Media Center (2013-08-30) via David Wheeler: +# Fiji will start daylight savings on Sunday 27th October, 2013 and end at 3am +# on Sunday 19th January, 2014.... move clocks forward by one hour from 2am +# http://www.fiji.gov.fj/Media-Center/Press-Releases/DAYLIGHT-SAVING-STARTS-ON-SUNDAY,-27th-OCTOBER-201.aspx +# +# From Paul Eggert (2013-09-09): +# For now, guess that Fiji springs forward the Sunday before the fourth +# Monday in October. This matches both recent practice and +# timeanddate.com's current spring-forward prediction. +# For the January 2014 transition we guessed right while timeanddate.com +# guessed wrong, so leave the fall-back prediction alone. # 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 - Rule Fiji 2009 only - Nov 29 2:00 1:00 S Rule Fiji 2010 only - Mar lastSun 3:00 0 - -Rule Fiji 2010 max - Oct Sun>=18 2:00 1:00 S +Rule Fiji 2010 max - Oct Sun>=21 2:00 1:00 S Rule Fiji 2011 only - Mar Sun>=1 3:00 0 - Rule Fiji 2012 max - Jan Sun>=18 3:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] @@ -487,6 +496,7 @@ Zone Pacific/Auckland 11:39:04 - LMT 186 Zone Pacific/Chatham 12:13:48 - LMT 1957 Jan 1 12:45 Chatham CHA%sT +Link Pacific/Auckland Antarctica/McMurdo # Auckland Is # uninhabited; Maori and Moriori, colonial settlers, pastoralists, sealers, @@ -736,7 +746,7 @@ Zone Pacific/Funafuti 11:56:52 - LMT 190 # 1886-1891; Baker was similar but exact dates are not known. # Inhabited by civilians 1935-1942; U.S. military bases 1943-1944; # uninhabited thereafter. -# Howland observed Hawaii Standard Time (UTC-10:30) in 1937; +# Howland observed Hawaii Standard Time (UT-10:30) in 1937; # see page 206 of Elgen M. Long and Marie K. Long, # Amelia Earhart: the Mystery Solved, Simon & Schuster (2000). # So most likely Howland and Baker observed Hawaii Time from 1935 @@ -749,8 +759,17 @@ Zone Pacific/Funafuti 11:56:52 - LMT 190 # no information; was probably like Pacific/Kiritimati # Johnston -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Pacific/Johnston -10:00 - HST +# +# From Paul Eggert (2013-09-03): +# In his memoirs of June 6th to October 4, 1945 +# (2005), Herbert C. Bach writes, +# "We started our letdown to Kwajalein Atoll and landed there at 5:00 AM +# Johnston time, 1:30 AM Kwajalein time." This was in June 1945, and +# confirms that Johnston kept the same time as Honolulu in summer 1945. +# We have no better information, so for now, assume this has been true +# indefinitely into the past. +# +# See 'northamerica' for Pacific/Johnston. # Kingman # uninhabited Modified: head/contrib/tzdata/backward ============================================================================== --- head/contrib/tzdata/backward Tue Nov 5 06:18:50 2013 (r257680) +++ head/contrib/tzdata/backward Tue Nov 5 06:32:23 2013 (r257681) @@ -22,15 +22,17 @@ Link America/Kentucky/Louisville America Link America/Argentina/Mendoza America/Mendoza Link America/Rio_Branco America/Porto_Acre Link America/Argentina/Cordoba America/Rosario -Link America/St_Thomas America/Virgin +Link America/Denver America/Shiprock +Link America/Port_of_Spain America/Virgin +Link Pacific/Auckland Antarctica/South_Pole Link Asia/Ashgabat Asia/Ashkhabad +Link Asia/Kolkata Asia/Calcutta Link Asia/Chongqing Asia/Chungking Link Asia/Dhaka Asia/Dacca Link Asia/Kathmandu Asia/Katmandu -Link Asia/Kolkata Asia/Calcutta Link Asia/Macau Asia/Macao -Link Asia/Jerusalem Asia/Tel_Aviv Link Asia/Ho_Chi_Minh Asia/Saigon +Link Asia/Jerusalem Asia/Tel_Aviv Link Asia/Thimphu Asia/Thimbu Link Asia/Makassar Asia/Ujung_Pandang Link Asia/Ulaanbaatar Asia/Ulan_Bator @@ -88,10 +90,10 @@ Link Pacific/Auckland NZ Link Pacific/Chatham NZ-CHAT Link America/Denver Navajo Link Asia/Shanghai PRC +Link Pacific/Pohnpei Pacific/Ponape Link Pacific/Pago_Pago Pacific/Samoa -Link Pacific/Chuuk Pacific/Yap Link Pacific/Chuuk Pacific/Truk -Link Pacific/Pohnpei Pacific/Ponape +Link Pacific/Chuuk Pacific/Yap Link Europe/Warsaw Poland Link Europe/Lisbon Portugal Link Asia/Taipei ROC Modified: head/contrib/tzdata/etcetera ============================================================================== --- head/contrib/tzdata/etcetera Tue Nov 5 06:18:50 2013 (r257680) +++ head/contrib/tzdata/etcetera Tue Nov 5 06:32:23 2013 (r257681) @@ -31,9 +31,9 @@ Link Etc/GMT Etc/GMT0 # even though this is the opposite of what many people expect. # POSIX has positive signs west of Greenwich, but many people expect # positive signs east of Greenwich. For example, TZ='Etc/GMT+4' uses -# the abbreviation "GMT+4" and corresponds to 4 hours behind UTC +# the abbreviation "GMT+4" and corresponds to 4 hours behind UT # (i.e. west of Greenwich) even though many people would expect it to -# mean 4 hours ahead of UTC (i.e. east of Greenwich). +# mean 4 hours ahead of UT (i.e. east of Greenwich). # # In the draft 5 of POSIX 1003.1-200x, the angle bracket notation allows for # TZ='+4'; if you want time zone abbreviations conforming to Modified: head/contrib/tzdata/europe ============================================================================== --- head/contrib/tzdata/europe Tue Nov 5 06:18:50 2013 (r257680) +++ head/contrib/tzdata/europe Tue Nov 5 06:32:23 2013 (r257681) @@ -42,7 +42,7 @@ # (1998-09-21, in Portuguese) # -# I invented the abbreviations marked `*' in the following table; +# I invented the abbreviations marked '*' in the following table; # the rest are from earlier versions of this file, or from other sources. # Corrections are welcome! # std dst 2dst @@ -96,7 +96,7 @@ # and a sketch map showing some of the sightlines involved. One paragraph # of the text said: # -# `An old stone obelisk marking a forgotten terrestrial meridian stands +# 'An old stone obelisk marking a forgotten terrestrial meridian stands # beside the river at Kew. In the 18th century, before time and longitude # was standardised by the Royal Observatory in Greenwich, scholars observed # this stone and the movement of stars from Kew Observatory nearby. They @@ -140,7 +140,7 @@ # From Paul Eggert (2003-09-27): # Summer Time was first seriously proposed by William Willett (1857-1915), # a London builder and member of the Royal Astronomical Society -# who circulated a pamphlet ``The Waste of Daylight'' (1907) +# who circulated a pamphlet "The Waste of Daylight" (1907) # that proposed advancing clocks 20 minutes on each of four Sundays in April, # and retarding them by the same amount on four Sundays in September. # A bill was drafted in 1909 and introduced in Parliament several times, @@ -165,10 +165,10 @@ # # From Paul Eggert (1996-09-03): -# The OED Supplement says that the English originally said ``Daylight Saving'' +# The OED Supplement says that the English originally said "Daylight Saving" # when they were debating the adoption of DST in 1908; but by 1916 this # term appears only in quotes taken from DST's opponents, whereas the -# proponents (who eventually won the argument) are quoted as using ``Summer''. +# proponents (who eventually won the argument) are quoted as using "Summer". # From Arthur David Olson (1989-01-19): # @@ -208,9 +208,9 @@ # which could not be said to run counter to any official description. # From Paul Eggert (2000-10-02): -# Howse writes (p 157) `DBST' too, but `BDST' seems to have been common +# Howse writes (p 157) 'DBST' too, but 'BDST' seems to have been common # and follows the more usual convention of putting the location name first, -# so we use `BDST'. +# so we use 'BDST'. # Peter Ilieve (1998-04-19) described at length # the history of summer time legislation in the United Kingdom. @@ -431,6 +431,8 @@ Rule GB-Eire 1981 1989 - Oct Sun>=23 1:0 Rule GB-Eire 1990 1995 - Oct Sun>=22 1:00u 0 GMT # Summer Time Order 1997 (S.I. 1997/2982) # See EU for rules starting in 1996. +# +# Use Europe/London for Jersey, Guernsey, and the Isle of Man. # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Europe/London -0:01:15 - LMT 1847 Dec 1 0:00s @@ -797,7 +799,7 @@ Zone Europe/Brussels 0:17:30 - LMT 1880 1:00 EU CE%sT # Bosnia and Herzegovina -# see Serbia +# See Europe/Belgrade. # Bulgaria # @@ -825,10 +827,10 @@ Zone Europe/Sofia 1:33:16 - LMT 1880 2:00 EU EE%sT # Croatia -# see Serbia +# See Europe/Belgrade. # Cyprus -# Please see the `asia' file for Asia/Nicosia. +# Please see the 'asia' file for Asia/Nicosia. # Czech Republic # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S @@ -845,6 +847,7 @@ Zone Europe/Prague 0:57:44 - LMT 1850 1:00 C-Eur CE%sT 1944 Sep 17 2:00s 1:00 Czech CE%sT 1979 1:00 EU CE%sT +# Use Europe/Prague also for Slovakia. # Denmark, Faroe Islands, and Greenland @@ -1008,12 +1011,12 @@ Zone America/Thule -4:35:08 - LMT 1916 J # From Peter Ilieve (1996-10-28): # [IATA SSIM (1992/1996) claims that the Baltic republics switch at 01:00s, # but a relative confirms that Estonia still switches at 02:00s, writing:] -# ``I do not [know] exactly but there are some little different +# "I do not [know] exactly but there are some little different # (confusing) rules for International Air and Railway Transport Schedules # conversion in Sunday connected with end of summer time in Estonia.... # A discussion is running about the summer time efficiency and effect on # human physiology. It seems that Estonia maybe will not change to -# summer time next spring.'' +# summer time next spring." # From Peter Ilieve (1998-11-04), heavily edited: # @@ -1068,7 +1071,7 @@ Zone Europe/Tallinn 1:39:00 - LMT 1880 # Well, here in Helsinki we're just changing from summer time to regular one, # and it's supposed to change at 4am... -# From Janne Snabb (2010-0715): +# From Janne Snabb (2010-07-15): # # I noticed that the Finland data is not accurate for years 1981 and 1982. # During these two first trial years the DST adjustment was made one hour @@ -1125,7 +1128,7 @@ Link Europe/Helsinki Europe/Mariehamn # -# Shank & Pottenger seem to use `24:00' ambiguously; resolve it with Whitman. +# Shank & Pottenger seem to use '24:00' ambiguously; resolve it with Whitman. # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule France 1916 only - Jun 14 23:00s 1:00 S Rule France 1916 1919 - Oct Sun>=1 23:00s 0 - @@ -1415,7 +1418,7 @@ Zone Atlantic/Reykjavik -1:27:24 - LMT 1 # # Day-light Saving Time in Italy (2006-02-03) # -# (`FP' below), taken from an Italian National Electrotechnical Institute +# ('FP' below), taken from an Italian National Electrotechnical Institute # publication. When the three sources disagree, guess who's right, as follows: # # year FP Shanks&P. (S) Whitman (W) Go with: @@ -1561,10 +1564,22 @@ Zone Europe/Riga 1:36:24 - LMT 1880 2:00 EU EE%sT # Liechtenstein -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Europe/Vaduz 0:38:04 - LMT 1894 Jun - 1:00 - CET 1981 - 1:00 EU CE%sT + +# From Paul Eggert (2013-09-09): +# Shanks & Pottenger say Vaduz is like Zurich. + +# From Alois Treindl (2013-09-18): +# http://www.eliechtensteinensia.li/LIJ/1978/1938-1978/1941.pdf +# ... confirms on p. 6 that Liechtenstein followed Switzerland in 1941 and 1942. +# I ... translate only the last two paragraphs: +# ... during second world war, in the years 1941 and 1942, Liechtenstein +# introduced daylight saving time, adapting to Switzerland. From 1943 on +# central European time was in force throughout the year. +# From a report of the duke's government to the high council, +# regarding the introduction of a time law, of 31 May 1977. + +Link Europe/Zurich Europe/Vaduz + # Lithuania @@ -1652,7 +1667,7 @@ Zone Europe/Luxembourg 0:24:36 - LMT 190 1:00 EU CE%sT # Macedonia -# see Serbia +# See Europe/Belgrade. # Malta # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S @@ -1745,7 +1760,7 @@ Zone Europe/Monaco 0:29:32 - LMT 1891 Ma 1:00 EU CE%sT # Montenegro -# see Serbia +# See Europe/Belgrade. # Netherlands @@ -1860,7 +1875,7 @@ Zone Europe/Oslo 0:43:00 - LMT 1895 Jan # before 1895, and therefore probably changed the local time somewhere # between 1895 and 1925 (inclusive). -# From Paul Eggert (2001-05-01): +# From Paul Eggert (2013-09-04): # # Actually, Jan Mayen was never occupied by Germany during World War II, # so it must have diverged from Oslo time during the war, as Oslo was @@ -1871,7 +1886,7 @@ Zone Europe/Oslo 0:43:00 - LMT 1895 Jan # 1941 with a small Norwegian garrison and continued operations despite # frequent air ttacks from Germans. In 1943 the Americans established a # radiolocating station on the island, called "Atlantic City". Possibly -# the UTC offset changed during the war, but I think it unlikely that +# the UT offset changed during the war, but I think it unlikely that # Jan Mayen used German daylight-saving rules. # # Svalbard is more complicated, as it was raided in August 1941 by an @@ -1884,9 +1899,8 @@ Zone Europe/Oslo 0:43:00 - LMT 1895 Jan # the German armed forces at the Svalbard weather station code-named # Haudegen did not surrender to the Allies until September 1945. # -# All these events predate our cutoff date of 1970. Unless we can -# come up with more definitive info about the timekeeping during the -# war years it's probably best just do...the following for now: +# All these events predate our cutoff date of 1970, so use Europe/Oslo +# for these regions. Link Europe/Oslo Arctic/Longyearbyen # Poland @@ -2144,7 +2158,7 @@ Zone Europe/Bucharest 1:44:24 - LMT 1891 # so we (Novosibirsk) simply did not switch. # # From Andrey A. Chernov (1996-10-04): -# `MSK' and `MSD' were born and used initially on Moscow computers with +# 'MSK' and 'MSD' were born and used initially on Moscow computers with # UNIX-like OSes by several developer groups (e.g. Demos group, Kiae group).... # The next step was the UUCP network, the Relcom predecessor # (used mainly for mail), and MSK/MSD was actively used there. @@ -2443,6 +2457,9 @@ Zone Asia/Anadyr 11:49:56 - LMT 1924 May 11:00 Russia ANA%sT 2011 Mar 27 2:00s 12:00 - ANAT +# San Marino +# See Europe/Rome. + # Serbia # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Europe/Belgrade 1:22:00 - LMT 1884 @@ -2465,7 +2482,7 @@ Link Europe/Belgrade Europe/Zagreb # Cro Link Europe/Prague Europe/Bratislava # Slovenia -# see Serbia +# See Europe/Belgrade. # Spain # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S @@ -2599,7 +2616,7 @@ Zone Europe/Stockholm 1:12:12 - LMT 1879 # and their performance improved enormously. Communities began to keep # mean time in preference to apparent time -- Geneva from 1780 .... # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -# From Whitman (who writes ``Midnight?''): +# From Whitman (who writes "Midnight?"): # Rule Swiss 1940 only - Nov 2 0:00 1:00 S # Rule Swiss 1940 only - Dec 31 0:00 0 - # From Shanks & Pottenger: @@ -2644,23 +2661,53 @@ Zone Europe/Stockholm 1:12:12 - LMT 1879 # The 1940 rules must be deleted. # # One further detail for Switzerland, which is probably out of scope for -# most users of tzdata: -# The zone file -# Zone Europe/Zurich 0:34:08 - LMT 1848 Sep 12 -# 0:29:44 - BMT 1894 Jun #Bern Mean Time -# 1:00 Swiss CE%sT 1981 -# 1:00 EU CE%sT +# most users of tzdata: The [Europe/Zurich zone] ... # describes all of Switzerland correctly, with the exception of # the Cantone Geneve (Geneva, Genf). Between 1848 and 1894 Geneve did not # follow Bern Mean Time but kept its own local mean time. # To represent this, an extra zone would be needed. +# +# From Alois Treindl (2013-09-11): +# The Federal regulations say +# http://www.admin.ch/opc/de/classified-compilation/20071096/index.html +# ... the meridian for Bern mean time ... is 7 degrees 26'22.50". +# Expressed in time, it is 0h29m45.5s. + +# From Pierre-Yves Berger (2013-09-11): +# the "Circulaire du conseil federal" (December 11 1893) +# ... +# clearly states that the [1894-06-01] change should be done at midnight +# but if no one is present after 11 at night, could be postponed until one +# hour before the beginning of service. + +# From Paul Eggert (2013-09-11): +# Round BMT to the nearest even second, 0:29:46. +# +# We can find no reliable source for Shanks's assertion that all of Switzerland +# except Geneva switched to Bern Mean Time at 00:00 on 1848-09-12. This book: +# +# Jakob Messerli. Gleichmassig, punktlich, schnell: Zeiteinteilung und +# Zeitgebrauch in der Schweiz im 19. Jahrhundert. Chronos, Zurich 1995, +# ISBN 3-905311-68-2, OCLC 717570797. +# +# suggests that the transition was more gradual, and that the Swiss did not +# agree about civil time during the transition. The timekeeping it gives the +# most detail for is postal and telegraph time: here, federal legislation (the +# "Bundesgesetz uber die Erstellung von elektrischen Telegraphen") passed on +# 1851-11-23, and an official implementation notice was published 1853-07-16 +# (Bundesblatt 1853, Bd. II, S. 859). On p 72 Messerli writes that in +# practice since July 1853 Bernese time was used in "all postal and telegraph +# offices in Switzerland from Geneva to St. Gallen and Basel to Chiasso" +# (Google translation). For now, model this transition as occurring on +# 1853-07-16, though it probably occurred at some other date in Zurich, and +# legal civil time probably changed at still some other transition date. # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Swiss 1941 1942 - May Mon>=1 1:00 1:00 S Rule Swiss 1941 1942 - Oct Mon>=1 2:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Europe/Zurich 0:34:08 - LMT 1848 Sep 12 - 0:29:44 - BMT 1894 Jun # Bern Mean Time +Zone Europe/Zurich 0:34:08 - LMT 1853 Jul 16 # See above comment. + 0:29:46 - BMT 1894 Jun # Bern Mean Time 1:00 Swiss CE%sT 1981 1:00 EU CE%sT @@ -2884,7 +2931,7 @@ Zone Europe/Simferopol 2:16:24 - LMT 188 # From Paul Eggert (2006-03-22): # The _Economist_ (1994-05-28, p 45) reports that central Crimea switched # from Kiev to Moscow time sometime after the January 1994 elections. -# Shanks (1999) says ``date of change uncertain'', but implies that it happened +# Shanks (1999) says "date of change uncertain", but implies that it happened # sometime between the 1994 DST switches. Shanks & Pottenger simply say # 1994-09-25 03:00, but that can't be right. For now, guess it # changed in May. @@ -2898,6 +2945,9 @@ Zone Europe/Simferopol 2:16:24 - LMT 188 3:00 - MSK 1997 Mar lastSun 1:00u 2:00 EU EE%sT +# Vatican City +# See Europe/Rome. + ############################################################################### # One source shows that Bulgaria, Cyprus, Finland, and Greece observe DST from Copied: head/contrib/tzdata/leap-seconds.list (from r255902, vendor/tzdata/dist/leap-seconds.list) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/tzdata/leap-seconds.list Tue Nov 5 06:32:23 2013 (r257681, copy of r255902, vendor/tzdata/dist/leap-seconds.list) @@ -0,0 +1,231 @@ +# +# In the following text, the symbol '#' introduces +# a comment, which continues from that symbol until +# the end of the line. A plain comment line has a +# whitespace character following the comment indicator. +# There are also special comment lines defined below. +# A special comment will always have a non-whitespace +# character in column 2. +# +# A blank line should be ignored. +# +# The following table shows the corrections that must +# be applied to compute International Atomic Time (TAI) +# from the Coordinated Universal Time (UTC) values that +# are transmitted by almost all time services. +# +# The first column shows an epoch as a number of seconds +# since 1900.0 and the second column shows the number of +# seconds that must be added to UTC to compute TAI for +# any timestamp at or after that epoch. The value on +# each line is valid from the indicated initial instant +# until the epoch given on the next one or indefinitely +# into the future if there is no next line. +# (The comment on each line shows the representation of +# the corresponding initial epoch in the usual +# day-month-year format. The epoch always begins at +# 00:00:00 UTC on the indicated day. See Note 5 below.) +# +# Important notes: +# +# 1. Coordinated Universal Time (UTC) is often referred to +# as Greenwich Mean Time (GMT). The GMT time scale is no +# longer used, and the use of GMT to designate UTC is +# discouraged. +# +# 2. The UTC time scale is realized by many national +# laboratories and timing centers. Each laboratory +# identifies its realization with its name: Thus +# UTC(NIST), UTC(USNO), etc. The differences among +# these different realizations are typically on the +# order of a few nanoseconds (i.e., 0.000 000 00x s) +# and can be ignored for many purposes. These differences +# are tabulated in Circular T, which is published monthly +# by the International Bureau of Weights and Measures +# (BIPM). See www.bipm.fr for more information. +# +# 3. The current defintion of the relationship between UTC +# and TAI dates from 1 January 1972. A number of different +# time scales were in use before than epoch, and it can be +# quite difficult to compute precise timestamps and time +# intervals in those "prehistoric" days. For more information, +# consult: +# +# The Explanatory Supplement to the Astronomical +# Ephemeris. +# or +# Terry Quinn, "The BIPM and the Accurate Measurement +# of Time," Proc. of the IEEE, Vol. 79, pp. 894-905, +# July, 1991. +# +# 4. The insertion of leap seconds into UTC is currently the +# responsibility of the International Earth Rotation Service, +# which is located at the Paris Observatory: +# +# Central Bureau of IERS +# 61, Avenue de l'Observatoire +# 75014 Paris, France. +# +# Leap seconds are announced by the IERS in its Bulletin C +# +# See hpiers.obspm.fr or www.iers.org for more details. +# +# All national laboratories and timing centers use the +# data from the BIPM and the IERS to construct their +# local realizations of UTC. +# +# Although the definition also includes the possibility +# of dropping seconds ("negative" leap seconds), this has +# never been done and is unlikely to be necessary in the +# foreseeable future. +# +# 5. If your system keeps time as the number of seconds since +# some epoch (e.g., NTP timestamps), then the algorithm for +# assigning a UTC time stamp to an event that happens during a positive +# leap second is not well defined. The official name of that leap +# second is 23:59:60, but there is no way of representing that time +# in these systems. +# Many systems of this type effectively stop the system clock for +# one second during the leap second and use a time that is equivalent +# to 23:59:59 UTC twice. For these systems, the corresponding TAI +# timestamp would be obtained by advancing to the next entry in the +# following table when the time equivalent to 23:59:59 UTC +# is used for the second time. Thus the leap second which +# occurred on 30 June 1972 at 23:59:59 UTC would have TAI +# timestamps computed as follows: +# +# ... +# 30 June 1972 23:59:59 (2287785599, first time): TAI= UTC + 10 seconds +# 30 June 1972 23:59:60 (2287785599,second time): TAI= UTC + 11 seconds +# 1 July 1972 00:00:00 (2287785600) TAI= UTC + 11 seconds +# ... +# +# If your system realizes the leap second by repeating 00:00:00 UTC twice +# (this is possible but not usual), then the advance to the next entry +# in the table must occur the second time that a time equivlent to +# 00:00:00 UTC is used. Thus, using the same example as above: +# +# ... +# 30 June 1972 23:59:59 (2287785599): TAI= UTC + 10 seconds +# 30 June 1972 23:59:60 (2287785600, first time): TAI= UTC + 10 seconds +# 1 July 1972 00:00:00 (2287785600,second time): TAI= UTC + 11 seconds +# ... +# +# in both cases the use of timestamps based on TAI produces a smooth +# time scale with no discontinuity in the time interval. +# +# This complexity would not be needed for negative leap seconds (if they +# are ever used). The UTC time would skip 23:59:59 and advance from +# 23:59:58 to 00:00:00 in that case. The TAI offset would decrease by +# 1 second at the same instant. This is a much easier situation to deal +# with, since the difficulty of unambiguously representing the epoch +# during the leap second does not arise. +# +# Questions or comments to: +# Judah Levine +# Time and Frequency Division +# NIST +# Boulder, Colorado +# jlevine@boulder.nist.gov +# +# Last Update of leap second values: 11 January 2012 +# +# The following line shows this last update date in NTP timestamp *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Tue Nov 5 06:44:34 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 444061EE; Tue, 5 Nov 2013 06:44:34 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 323232F64; Tue, 5 Nov 2013 06:44:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA56iYBK039175; Tue, 5 Nov 2013 06:44:34 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA56iYCN039174; Tue, 5 Nov 2013 06:44:34 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201311050644.rA56iYCN039174@svn.freebsd.org> From: Gleb Smirnoff Date: Tue, 5 Nov 2013 06:44:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257686 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Nov 2013 06:44:34 -0000 Author: glebius Date: Tue Nov 5 06:44:33 2013 New Revision: 257686 URL: http://svnweb.freebsd.org/changeset/base/257686 Log: Add required kernel option. Modified: head/share/man/man4/natm.4 Modified: head/share/man/man4/natm.4 ============================================================================== --- head/share/man/man4/natm.4 Tue Nov 5 06:42:01 2013 (r257685) +++ head/share/man/man4/natm.4 Tue Nov 5 06:44:33 2013 (r257686) @@ -14,6 +14,7 @@ ATM software comes with a which provides socket level access to AAL0 and AAL5 virtual circuits. To enable this protocol layer, add .Dl options NATM +.Dl device atm to your kernel configuration file and re-make the kernel (do not forget to do .Dq make clean ) . From owner-svn-src-head@FreeBSD.ORG Tue Nov 5 06:58:09 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 26EF5C59; Tue, 5 Nov 2013 06:58:09 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 81C06201E; Tue, 5 Nov 2013 06:58:08 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.7/8.14.7) with ESMTP id rA56w6fo005493 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 5 Nov 2013 10:58:06 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.7/8.14.7/Submit) id rA56w65P005492; Tue, 5 Nov 2013 10:58:06 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Tue, 5 Nov 2013 10:58:06 +0400 From: Gleb Smirnoff To: ian@FreeBSD.org Subject: r257637 Message-ID: <20131105065806.GG1467@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.22 (2013-10-16) Cc: svn-src-head@FreeBSD.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Nov 2013 06:58:09 -0000 Ian, the r257637 breaks kernel builds. Assuming you have empty /usr/obj, if you run 'make KERNCONF=LINT buildkernel', it will quickly fail due to absence of aicasm. -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Tue Nov 5 07:30:44 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A9D0C479; Tue, 5 Nov 2013 07:30:44 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail106.syd.optusnet.com.au (mail106.syd.optusnet.com.au [211.29.132.42]) by mx1.freebsd.org (Postfix) with ESMTP id BE1F121F5; Tue, 5 Nov 2013 07:30:43 +0000 (UTC) Received: from c122-106-156-23.carlnfd1.nsw.optusnet.com.au (c122-106-156-23.carlnfd1.nsw.optusnet.com.au [122.106.156.23]) by mail106.syd.optusnet.com.au (Postfix) with ESMTPS id AEFC13C2815; Tue, 5 Nov 2013 18:02:31 +1100 (EST) Date: Tue, 5 Nov 2013 18:02:30 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: John-Mark Gurney Subject: Re: svn commit: r257646 - head/lib/libc/string In-Reply-To: <20131105053158.GQ73243@funkthat.com> Message-ID: <20131105174205.E6267@besplex.bde.org> References: <201311041905.rA4J5WT0097968@svn.freebsd.org> <20131105053158.GQ73243@funkthat.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=YYGEuWhf c=1 sm=1 tr=0 a=ebeQFi2P/qHVC0Yw9JDJ4g==:117 a=PO7r1zJSAAAA:8 a=Jjr3N5Xq17sA:10 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=PxnKILAbCc4A:10 a=u51v-DY5DKbaVv9v8HsA:9 a=CjuIK1q_8ugA:10 Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Eitan Adler X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Nov 2013 07:30:44 -0000 On Mon, 4 Nov 2013, John-Mark Gurney wrote: > Eitan Adler wrote this message on Mon, Nov 04, 2013 at 19:05 +0000: >> >> Log: >> Use OpenBSD's revamped description of strlcpy and strlcat. > ... > Can we add a warning that it is not safe to just simply replace strncpy > with strlcpy? strncpy does something useful in that it NULs out the > remaining buffer, which when coping strings from/to kernel buffers > prevent information leaks, so I'd argue that strlcpy can be used > incorrectly just as strncpy can be... Most kernel code handles this by bzeroing the whole buffer before filling it. This is usually necessary anyway, for initializing unnamed padding in structs. strncpy() could only do it all if the syscall is returning a single string. Howver, it is difficult to see that buffers are pre-zeroed before strlcpy()ing into them. A quick grep showed the following nonsense: % static void % fill_kinfo_thread(struct thread *td, struct kinfo_proc *kp, int preferthread) % { % struct proc *p; % % p = td->td_proc; % kp->ki_tdaddr = td; % PROC_LOCK_ASSERT(p, MA_OWNED); % % if (preferthread) % PROC_SLOCK(p); % thread_lock(td); % if (td->td_wmesg != NULL) % strlcpy(kp->ki_wmesg, td->td_wmesg, sizeof(kp->ki_wmesg)); % else % bzero(kp->ki_wmesg, sizeof(kp->ki_wmesg)); % strlcpy(kp->ki_tdname, td->td_name, sizeof(kp->ki_tdname)); I think the whole buffer (*kp) is pre-zeroed, so the strlcpy()'s are correct. But in that case the bzero() is nonsense (unless ki_wmesg is aliased and might have been scribbled on with compatibility cruft if and only if this can only happen when the bzero() case is reached). This function also a strlcpy()/bzero() pair for ki_lockname, and an apparently-unnecessary flags clearing for the bzero() case of that. Several other variables are only touched conditionally. The ki_tdname variable visible in the above used to be one of these. This function also has a laborious explicit initialization to 0. There is just 1 of these (for ki_rqindex), and this one is especially silly since it is attached to a verbose comment which says that it is unusable now and was never used by ps etc. I like to intentionally omit all explicit initializations to 0 after pre-zeroing. Bruce From owner-svn-src-head@FreeBSD.ORG Tue Nov 5 07:32:11 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 5FA4C5D6; Tue, 5 Nov 2013 07:32:11 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4B9A5222D; Tue, 5 Nov 2013 07:32:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA57WBcI058825; Tue, 5 Nov 2013 07:32:11 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA57WAAv058819; Tue, 5 Nov 2013 07:32:10 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201311050732.rA57WAAv058819@svn.freebsd.org> From: Gleb Smirnoff Date: Tue, 5 Nov 2013 07:32:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257689 - in head: sys/net sys/netinet sys/netpfil/ipfw usr.sbin/arp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Nov 2013 07:32:11 -0000 Author: glebius Date: Tue Nov 5 07:32:09 2013 New Revision: 257689 URL: http://svnweb.freebsd.org/changeset/base/257689 Log: Remove net.link.ether.inet.useloopback sysctl tunable. It was always on by default from the very beginning. It was placed in wrong namespace net.link.ether, originally it had been at another wrong namespace. It was incorrectly documented at incorrect manual page arp(8). Since new-ARP commit, the tunable have been consulted only on route addition, and ignored on route deletion. Behaviour of a system with tunable turned off is not fully correct, and has no advantages comparing to normal behavior. Modified: head/sys/net/if_var.h head/sys/netinet/if_ether.c head/sys/netinet/in.c head/sys/netpfil/ipfw/ip_fw2.c head/usr.sbin/arp/arp.4 Modified: head/sys/net/if_var.h ============================================================================== --- head/sys/net/if_var.h Tue Nov 5 06:48:58 2013 (r257688) +++ head/sys/net/if_var.h Tue Nov 5 07:32:09 2013 (r257689) @@ -465,13 +465,11 @@ VNET_DECLARE(struct ifnethead, ifnet); VNET_DECLARE(struct ifgrouphead, ifg_head); VNET_DECLARE(int, if_index); VNET_DECLARE(struct ifnet *, loif); /* first loopback interface */ -VNET_DECLARE(int, useloopback); #define V_ifnet VNET(ifnet) #define V_ifg_head VNET(ifg_head) #define V_if_index VNET(if_index) #define V_loif VNET(loif) -#define V_useloopback VNET(useloopback) int if_addgroup(struct ifnet *, const char *); int if_delgroup(struct ifnet *, const char *); Modified: head/sys/netinet/if_ether.c ============================================================================== --- head/sys/netinet/if_ether.c Tue Nov 5 06:48:58 2013 (r257688) +++ head/sys/netinet/if_ether.c Tue Nov 5 07:32:09 2013 (r257689) @@ -85,8 +85,6 @@ static SYSCTL_NODE(_net_link_ether, PF_A static VNET_DEFINE(int, arpt_keep) = (20*60); /* once resolved, good for 20 * minutes */ static VNET_DEFINE(int, arp_maxtries) = 5; -VNET_DEFINE(int, useloopback) = 1; /* use loopback interface for - * local traffic */ static VNET_DEFINE(int, arp_proxyall) = 0; static VNET_DEFINE(int, arpt_down) = 20; /* keep incomplete entries for * 20 seconds */ @@ -111,9 +109,6 @@ SYSCTL_VNET_INT(_net_link_ether_inet, OI SYSCTL_VNET_INT(_net_link_ether_inet, OID_AUTO, maxtries, CTLFLAG_RW, &VNET_NAME(arp_maxtries), 0, "ARP resolution attempts before returning error"); -SYSCTL_VNET_INT(_net_link_ether_inet, OID_AUTO, useloopback, CTLFLAG_RW, - &VNET_NAME(useloopback), 0, - "Use the loopback interface for local traffic"); SYSCTL_VNET_INT(_net_link_ether_inet, OID_AUTO, proxyall, CTLFLAG_RW, &VNET_NAME(arp_proxyall), 0, "Enable proxy ARP for all suitable requests"); Modified: head/sys/netinet/in.c ============================================================================== --- head/sys/netinet/in.c Tue Nov 5 06:48:58 2013 (r257688) +++ head/sys/netinet/in.c Tue Nov 5 07:32:09 2013 (r257689) @@ -856,7 +856,7 @@ in_ifinit(struct ifnet *ifp, struct in_i /* * add a loopback route to self */ - if (V_useloopback && !vhid && !(ifp->if_flags & IFF_LOOPBACK)) { + if (!vhid && !(ifp->if_flags & IFF_LOOPBACK)) { struct route ia_ro; bzero(&ia_ro, sizeof(ia_ro)); Modified: head/sys/netpfil/ipfw/ip_fw2.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw2.c Tue Nov 5 06:48:58 2013 (r257688) +++ head/sys/netpfil/ipfw/ip_fw2.c Tue Nov 5 07:32:09 2013 (r257689) @@ -434,7 +434,7 @@ verify_path(struct in_addr src, struct i * If ifp is provided, check for equality with rtentry. * We should use rt->rt_ifa->ifa_ifp, instead of rt->rt_ifp, * in order to pass packets injected back by if_simloop(): - * if useloopback == 1 routing entry (via lo0) for our own address + * routing entry (via lo0) for our own address * may exist, so we need to handle routing assymetry. */ if (ifp != NULL && ro.ro_rt->rt_ifa->ifa_ifp != ifp) { Modified: head/usr.sbin/arp/arp.4 ============================================================================== --- head/usr.sbin/arp/arp.4 Tue Nov 5 06:48:58 2013 (r257688) +++ head/usr.sbin/arp/arp.4 Tue Nov 5 07:32:09 2013 (r257689) @@ -28,7 +28,7 @@ .\" @(#)arp4.4 6.5 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd May 11, 2013 +.Dd November 5, 2013 .Dt ARP 4 .Os .Sh NAME @@ -165,10 +165,6 @@ Default is 5 tries. .It Va proxyall Enables ARP proxying for all hosts on net. Turned off by default. -.It Va useloopback -If an ARP entry is added for local address, force the traffic to go through -the loopback interface. -Turned on by default. .It Va wait Lifetime of an incomplete ARP entry. Default is 20 seconds. From owner-svn-src-head@FreeBSD.ORG Tue Nov 5 07:36:18 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 249948EF; Tue, 5 Nov 2013 07:36:18 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EC7702250; Tue, 5 Nov 2013 07:36:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA57aHSf059358; Tue, 5 Nov 2013 07:36:17 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA57aH4l059356; Tue, 5 Nov 2013 07:36:17 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201311050736.rA57aH4l059356@svn.freebsd.org> From: Gleb Smirnoff Date: Tue, 5 Nov 2013 07:36:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257690 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Nov 2013 07:36:18 -0000 Author: glebius Date: Tue Nov 5 07:36:17 2013 New Revision: 257690 URL: http://svnweb.freebsd.org/changeset/base/257690 Log: In complemence to ifa_add_loopback_route() and ifa_del_loopback_route() provide function ifa_switch_loopback_route() that will be used in case when an interface address used for a loopback route goes away, but we have another interface address with same address value and want to preserve loopback route. Sponsored by: Netflix Sponsored by: Nginx, Inc. Modified: head/sys/net/if.c head/sys/net/if_var.h Modified: head/sys/net/if.c ============================================================================== --- head/sys/net/if.c Tue Nov 5 07:32:09 2013 (r257689) +++ head/sys/net/if.c Tue Nov 5 07:36:17 2013 (r257690) @@ -1525,6 +1525,25 @@ ifa_del_loopback_route(struct ifaddr *if return (error); } +int +ifa_switch_loopback_route(struct ifaddr *ifa, struct sockaddr *sa) +{ + struct rtentry *rt; + + rt = rtalloc1_fib(sa, 0, 0, 0); + if (rt == NULL) { + log(LOG_DEBUG, "%s: fail", __func__); + return (EHOSTUNREACH); + } + ((struct sockaddr_dl *)rt->rt_gateway)->sdl_type = + ifa->ifa_ifp->if_type; + ((struct sockaddr_dl *)rt->rt_gateway)->sdl_index = + ifa->ifa_ifp->if_index; + RTFREE_LOCKED(rt); + + return (0); +} + /* * XXX: Because sockaddr_dl has deeper structure than the sockaddr * structs used to represent other address families, it is necessary Modified: head/sys/net/if_var.h ============================================================================== --- head/sys/net/if_var.h Tue Nov 5 07:32:09 2013 (r257689) +++ head/sys/net/if_var.h Tue Nov 5 07:36:17 2013 (r257690) @@ -502,6 +502,7 @@ struct ifnet *ifunit_ref(const char *); int ifa_add_loopback_route(struct ifaddr *, struct sockaddr *); int ifa_del_loopback_route(struct ifaddr *, struct sockaddr *); +int ifa_switch_loopback_route(struct ifaddr *, struct sockaddr *); struct ifaddr *ifa_ifwithaddr(struct sockaddr *); int ifa_ifwithaddr_check(struct sockaddr *); From owner-svn-src-head@FreeBSD.ORG Tue Nov 5 07:37:35 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C70DCA47; Tue, 5 Nov 2013 07:37:35 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B57F9225C; Tue, 5 Nov 2013 07:37:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA57bZaN059530; Tue, 5 Nov 2013 07:37:35 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA57bZkq059529; Tue, 5 Nov 2013 07:37:35 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201311050737.rA57bZkq059529@svn.freebsd.org> From: Dimitry Andric Date: Tue, 5 Nov 2013 07:37:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257691 - head/gnu/lib/libgcc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Nov 2013 07:37:35 -0000 Author: dim Date: Tue Nov 5 07:37:35 2013 New Revision: 257691 URL: http://svnweb.freebsd.org/changeset/base/257691 Log: Fix libgcc build with gcc after r257645, by using -Wno-static-in-inline for clang only. Modified: head/gnu/lib/libgcc/Makefile Modified: head/gnu/lib/libgcc/Makefile ============================================================================== --- head/gnu/lib/libgcc/Makefile Tue Nov 5 07:36:17 2013 (r257690) +++ head/gnu/lib/libgcc/Makefile Tue Nov 5 07:37:35 2013 (r257691) @@ -36,7 +36,9 @@ CFLAGS+= -DIN_GCC -DIN_LIBGCC2 -D__GCC_F # function with external linkage [-Wstatic-in-inline] # gcc_assert (index < (int) sizeof(dwarf_reg_size_table)); # ^ +.if ${COMPILER_TYPE} == "clang" CFLAGS+= -Wno-static-in-inline +.endif LDFLAGS+= -nodefaultlibs LDADD+= -lc From owner-svn-src-head@FreeBSD.ORG Tue Nov 5 07:43:26 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 86322BDA; Tue, 5 Nov 2013 07:43:26 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [IPv6:2001:7b8:3a7:1:2d0:b7ff:fea0:8c26]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4663622C6; Tue, 5 Nov 2013 07:43:26 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7::8cb5:cfe0:d75d:3722] (unknown [IPv6:2001:7b8:3a7:0:8cb5:cfe0:d75d:3722]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 6D70B5C43; Tue, 5 Nov 2013 08:43:21 +0100 (CET) Content-Type: multipart/signed; boundary="Apple-Mail=_9C58165E-4400-46B4-8F10-32EDF0D739CF"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 7.0 \(1816\)) Subject: Re: this breaks builds with gcc (Re: svn commit: r257645 - head/gnu/lib/libgcc From: Dimitry Andric In-Reply-To: Date: Tue, 5 Nov 2013 08:43:13 +0100 Message-Id: <2CD88BB3-5E33-47E1-9618-15AF9CB0BB3F@FreeBSD.org> References: To: Luigi Rizzo X-Mailer: Apple Mail (2.1816) Cc: svn-src-head@freebsd.org, Sean Bruno , src-committers@freebsd.org, svn-src-all@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Nov 2013 07:43:26 -0000 --Apple-Mail=_9C58165E-4400-46B4-8F10-32EDF0D739CF Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=iso-8859-1 On 05 Nov 2013, at 01:31, Luigi Rizzo wrote: > svn257645 (below) breaks the build when gcc is used. > > -Wno-static-in-inline is only for CLANG. Fixed in r257691. -Dimitry --Apple-Mail=_9C58165E-4400-46B4-8F10-32EDF0D739CF Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.22 (Darwin) iEYEARECAAYFAlJ4oZUACgkQsF6jCi4glqMOOACfaGnXm2sqTJM20Xu61Pn/fQ/q 94YAoJBS4VZXYi0ExUIj0BSk1ney2N/t =lmFf -----END PGP SIGNATURE----- --Apple-Mail=_9C58165E-4400-46B4-8F10-32EDF0D739CF-- From owner-svn-src-head@FreeBSD.ORG Tue Nov 5 07:44:15 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A0108D12; Tue, 5 Nov 2013 07:44:15 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8CC7722CA; Tue, 5 Nov 2013 07:44:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA57iF8W062387; Tue, 5 Nov 2013 07:44:15 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA57iFSL062386; Tue, 5 Nov 2013 07:44:15 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201311050744.rA57iFSL062386@svn.freebsd.org> From: Gleb Smirnoff Date: Tue, 5 Nov 2013 07:44:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257692 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Nov 2013 07:44:15 -0000 Author: glebius Date: Tue Nov 5 07:44:15 2013 New Revision: 257692 URL: http://svnweb.freebsd.org/changeset/base/257692 Log: Rewrite in_control(), so that it is comprehendable without getting mad. o Provide separate functions for SIOCAIFADDR and for SIOCDIFADDR, with clear code flow from beginning to the end. After that the rest of in_control() gets very small and clear. o Provide sx(9) lock to protect against parallel ioctl() invocations. o Reimplement logic from r201282, that tried to keep localhost route in table when multiple P2P interfaces with same local address are created and deleted. Discussed with: pluknet, melifaro Sponsored by: Netflix Sponsored by: Nginx, Inc. Modified: head/sys/netinet/in.c Modified: head/sys/netinet/in.c ============================================================================== --- head/sys/netinet/in.c Tue Nov 5 07:37:35 2013 (r257691) +++ head/sys/netinet/in.c Tue Nov 5 07:44:15 2013 (r257692) @@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -71,10 +72,10 @@ static int in_mask2len(struct in_addr *) static void in_len2mask(struct in_addr *, int); static int in_lifaddr_ioctl(struct socket *, u_long, caddr_t, struct ifnet *, struct thread *); +static int in_aifaddr_ioctl(caddr_t, struct ifnet *, struct thread *); +static int in_difaddr_ioctl(caddr_t, struct ifnet *, struct thread *); static void in_socktrim(struct sockaddr_in *); -static int in_ifinit(struct ifnet *, struct in_ifaddr *, - struct sockaddr_in *, int, int); static void in_purgemaddrs(struct ifnet *); static VNET_DEFINE(int, nosameprefix); @@ -86,6 +87,9 @@ SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, VNET_DECLARE(struct inpcbinfo, ripcbinfo); #define V_ripcbinfo VNET(ripcbinfo) +static struct sx in_control_sx; +SX_SYSINIT(in_control_sx, &in_control_sx, "in_control"); + /* * Return 1 if an internet address is for a ``local'' host * (one to which we have a connection). @@ -128,6 +132,29 @@ in_localip(struct in_addr in) } /* + * Return a reference to the interface address which is different to + * the supplied one but with same IP address value. + */ +static struct in_ifaddr * +in_localip_more(struct in_ifaddr *ia) +{ + in_addr_t in = IA_SIN(ia)->sin_addr.s_addr; + struct in_ifaddr *it; + + IN_IFADDR_RLOCK(); + LIST_FOREACH(it, INADDR_HASH(in), ia_hash) { + if (it != ia && IA_SIN(it)->sin_addr.s_addr == in) { + ifa_ref(&it->ia_ifa); + IN_IFADDR_RUNLOCK(); + return (it); + } + } + IN_IFADDR_RUNLOCK(); + + return (NULL); +} + +/* * Determine whether an IP address is in a reserved set of addresses * that may not be forwarded, or whether datagrams to that destination * may be forwarded. @@ -203,380 +230,396 @@ in_len2mask(struct in_addr *mask, int le /* * Generic internet control operations (ioctl's). - * - * ifp is NULL if not an interface-specific ioctl. */ -/* ARGSUSED */ int in_control(struct socket *so, u_long cmd, caddr_t data, struct ifnet *ifp, struct thread *td) { - register struct ifreq *ifr = (struct ifreq *)data; - register struct in_ifaddr *ia, *iap; - register struct ifaddr *ifa; - struct in_addr allhosts_addr; - struct in_addr dst; - struct in_ifinfo *ii; - struct in_aliasreq *ifra = (struct in_aliasreq *)data; - int error, hostIsNew, iaIsNew, maskIsNew; - int iaIsFirst; - u_long ocmd = cmd; - - /* - * Pre-10.x compat: OSIOCAIFADDR passes a shorter - * struct in_aliasreq, without ifra_vhid. - */ - if (cmd == OSIOCAIFADDR) - cmd = SIOCAIFADDR; + struct ifreq *ifr = (struct ifreq *)data; + struct sockaddr_in *addr = (struct sockaddr_in *)&ifr->ifr_addr; + struct in_ifaddr *ia; + int error; - ia = NULL; - iaIsFirst = 0; - iaIsNew = 0; - allhosts_addr.s_addr = htonl(INADDR_ALLHOSTS_GROUP); + if (ifp == NULL) + return (EADDRNOTAVAIL); /* - * Filter out ioctls we implement directly; forward the rest on to - * in_lifaddr_ioctl() and ifp->if_ioctl(). + * Filter out 4 ioctls we implement directly. Forward the rest + * to specific functions and ifp->if_ioctl(). */ switch (cmd) { case SIOCGIFADDR: case SIOCGIFBRDADDR: case SIOCGIFDSTADDR: case SIOCGIFNETMASK: - case SIOCDIFADDR: break; + case SIOCDIFADDR: + sx_xlock(&in_control_sx); + error = in_difaddr_ioctl(data, ifp, td); + sx_xunlock(&in_control_sx); + return (error); case SIOCAIFADDR: - /* - * ifra_addr must be present and be of INET family. - * ifra_broadaddr and ifra_mask are optional. - */ - if (ifra->ifra_addr.sin_len != sizeof(struct sockaddr_in) || - ifra->ifra_addr.sin_family != AF_INET) - return (EINVAL); - if (ifra->ifra_broadaddr.sin_len != 0 && - (ifra->ifra_broadaddr.sin_len != - sizeof(struct sockaddr_in) || - ifra->ifra_broadaddr.sin_family != AF_INET)) - return (EINVAL); -#if 0 - /* - * ifconfig(8) in pre-10.x doesn't set sin_family for the - * mask. The code is disabled for the 10.x timeline, to - * make SIOCAIFADDR compatible with 9.x ifconfig(8). - * The code should be enabled in 11.x - */ - if (ifra->ifra_mask.sin_len != 0 && - (ifra->ifra_mask.sin_len != sizeof(struct sockaddr_in) || - ifra->ifra_mask.sin_family != AF_INET)) - return (EINVAL); -#endif - break; + sx_xlock(&in_control_sx); + error = in_aifaddr_ioctl(data, ifp, td); + sx_xunlock(&in_control_sx); + return (error); + case SIOCALIFADDR: + case SIOCDLIFADDR: + case SIOCGLIFADDR: + return (in_lifaddr_ioctl(so, cmd, data, ifp, td)); case SIOCSIFADDR: case SIOCSIFBRDADDR: case SIOCSIFDSTADDR: case SIOCSIFNETMASK: /* We no longer support that old commands. */ return (EINVAL); - - case SIOCALIFADDR: - if (td != NULL) { - error = priv_check(td, PRIV_NET_ADDIFADDR); - if (error) - return (error); - } - if (ifp == NULL) - return (EINVAL); - return in_lifaddr_ioctl(so, cmd, data, ifp, td); - - case SIOCDLIFADDR: - if (td != NULL) { - error = priv_check(td, PRIV_NET_DELIFADDR); - if (error) - return (error); - } - if (ifp == NULL) - return (EINVAL); - return in_lifaddr_ioctl(so, cmd, data, ifp, td); - - case SIOCGLIFADDR: - if (ifp == NULL) - return (EINVAL); - return in_lifaddr_ioctl(so, cmd, data, ifp, td); - default: - if (ifp == NULL || ifp->if_ioctl == NULL) + if (ifp->if_ioctl == NULL) return (EOPNOTSUPP); return ((*ifp->if_ioctl)(ifp, cmd, data)); } - if (ifp == NULL) - return (EADDRNOTAVAIL); - - /* - * Security checks before we get involved in any work. - */ - switch (cmd) { - case SIOCAIFADDR: - if (td != NULL) { - error = priv_check(td, PRIV_NET_ADDIFADDR); - if (error) - return (error); - } - break; - - case SIOCDIFADDR: - if (td != NULL) { - error = priv_check(td, PRIV_NET_DELIFADDR); - if (error) - return (error); - } - break; - } - /* * Find address for this interface, if it exists. - * - * If an alias address was specified, find that one instead of the - * first one on the interface, if possible. */ - dst = ((struct sockaddr_in *)&ifr->ifr_addr)->sin_addr; IN_IFADDR_RLOCK(); - LIST_FOREACH(iap, INADDR_HASH(dst.s_addr), ia_hash) { - if (iap->ia_ifp == ifp && - iap->ia_addr.sin_addr.s_addr == dst.s_addr) { - if (td == NULL || prison_check_ip4(td->td_ucred, - &dst) == 0) - ia = iap; + LIST_FOREACH(ia, INADDR_HASH(addr->sin_addr.s_addr), ia_hash) { + if (ia->ia_ifp == ifp && + ia->ia_addr.sin_addr.s_addr == addr->sin_addr.s_addr && + prison_check_ip4(td->td_ucred, &addr->sin_addr) == 0) break; - } } - if (ia != NULL) - ifa_ref(&ia->ia_ifa); - IN_IFADDR_RUNLOCK(); + if (ia == NULL) { - IF_ADDR_RLOCK(ifp); - TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { - iap = ifatoia(ifa); - if (iap->ia_addr.sin_family == AF_INET) { - if (td != NULL && - prison_check_ip4(td->td_ucred, - &iap->ia_addr.sin_addr) != 0) - continue; - ia = iap; - break; - } - } - if (ia != NULL) - ifa_ref(&ia->ia_ifa); - IF_ADDR_RUNLOCK(ifp); + IN_IFADDR_RUNLOCK(); + return (EADDRNOTAVAIL); } - if (ia == NULL) - iaIsFirst = 1; error = 0; switch (cmd) { - case SIOCAIFADDR: - case SIOCDIFADDR: - if (ifra->ifra_addr.sin_family == AF_INET) { - struct in_ifaddr *oia; + case SIOCGIFADDR: + *addr = ia->ia_addr; + break; - IN_IFADDR_RLOCK(); - for (oia = ia; ia; ia = TAILQ_NEXT(ia, ia_link)) { - if (ia->ia_ifp == ifp && - ia->ia_addr.sin_addr.s_addr == - ifra->ifra_addr.sin_addr.s_addr) - break; - } - if (ia != NULL && ia != oia) - ifa_ref(&ia->ia_ifa); - if (oia != NULL && ia != oia) - ifa_free(&oia->ia_ifa); - IN_IFADDR_RUNLOCK(); - if ((ifp->if_flags & IFF_POINTOPOINT) - && (cmd == SIOCAIFADDR) - && (ifra->ifra_dstaddr.sin_addr.s_addr - == INADDR_ANY)) { - error = EDESTADDRREQ; - goto out; - } + case SIOCGIFBRDADDR: + if ((ifp->if_flags & IFF_BROADCAST) == 0) { + error = EINVAL; + break; } - if (cmd == SIOCDIFADDR && ia == NULL) { - error = EADDRNOTAVAIL; - goto out; - } - if (ia == NULL) { - ifa = ifa_alloc(sizeof(struct in_ifaddr), M_WAITOK); - ia = (struct in_ifaddr *)ifa; - ifa->ifa_addr = (struct sockaddr *)&ia->ia_addr; - ifa->ifa_dstaddr = (struct sockaddr *)&ia->ia_dstaddr; - ifa->ifa_netmask = (struct sockaddr *)&ia->ia_sockmask; - - ia->ia_sockmask.sin_len = 8; - ia->ia_sockmask.sin_family = AF_INET; - if (ifp->if_flags & IFF_BROADCAST) { - ia->ia_broadaddr.sin_len = sizeof(ia->ia_addr); - ia->ia_broadaddr.sin_family = AF_INET; - } - ia->ia_ifp = ifp; + *addr = ia->ia_broadaddr; + break; - ifa_ref(ifa); /* if_addrhead */ - IF_ADDR_WLOCK(ifp); - TAILQ_INSERT_TAIL(&ifp->if_addrhead, ifa, ifa_link); - IF_ADDR_WUNLOCK(ifp); - ifa_ref(ifa); /* in_ifaddrhead */ - IN_IFADDR_WLOCK(); - TAILQ_INSERT_TAIL(&V_in_ifaddrhead, ia, ia_link); - IN_IFADDR_WUNLOCK(); - iaIsNew = 1; + case SIOCGIFDSTADDR: + if ((ifp->if_flags & IFF_POINTOPOINT) == 0) { + error = EINVAL; + break; } + *addr = ia->ia_dstaddr; break; - case SIOCGIFADDR: case SIOCGIFNETMASK: - case SIOCGIFDSTADDR: - case SIOCGIFBRDADDR: - if (ia == NULL) { - error = EADDRNOTAVAIL; - goto out; - } + *addr = ia->ia_sockmask; break; } + IN_IFADDR_RUNLOCK(); + + return (error); +} + +static int +in_aifaddr_ioctl(caddr_t data, struct ifnet *ifp, struct thread *td) +{ + const struct in_aliasreq *ifra = (struct in_aliasreq *)data; + const struct sockaddr_in *addr = &ifra->ifra_addr; + const struct sockaddr_in *broadaddr = &ifra->ifra_broadaddr; + const struct sockaddr_in *mask = &ifra->ifra_mask; + const struct sockaddr_in *dstaddr = &ifra->ifra_dstaddr; + const int vhid = ifra->ifra_vhid; + struct ifaddr *ifa; + struct in_ifaddr *ia; + bool iaIsFirst; + int error = 0; + + error = priv_check(td, PRIV_NET_ADDIFADDR); + if (error) + return (error); + /* - * Most paths in this switch return directly or via out. Only paths - * that remove the address break in order to hit common removal code. + * ifra_addr must be present and be of INET family. + * ifra_broadaddr/ifra_dstaddr and ifra_mask are optional. */ - switch (cmd) { - case SIOCGIFADDR: - *((struct sockaddr_in *)&ifr->ifr_addr) = ia->ia_addr; - goto out; + if (addr->sin_len != sizeof(struct sockaddr_in) || + addr->sin_family != AF_INET) + return (EINVAL); + if (broadaddr->sin_len != 0 && + (broadaddr->sin_len != sizeof(struct sockaddr_in) || + broadaddr->sin_family != AF_INET)) + return (EINVAL); + if (mask->sin_len != 0 && + (mask->sin_len != sizeof(struct sockaddr_in) || + mask->sin_family != AF_INET)) + return (EINVAL); + if ((ifp->if_flags & IFF_POINTOPOINT) && + (dstaddr->sin_len != sizeof(struct sockaddr_in) || + dstaddr->sin_addr.s_addr == INADDR_ANY)) + return (EDESTADDRREQ); + if (vhid > 0 && carp_attach_p == NULL) + return (EPROTONOSUPPORT); - case SIOCGIFBRDADDR: - if ((ifp->if_flags & IFF_BROADCAST) == 0) { - error = EINVAL; - goto out; - } - *((struct sockaddr_in *)&ifr->ifr_dstaddr) = ia->ia_broadaddr; - goto out; + /* + * See whether address already exist. + */ + iaIsFirst = true; + ia = NULL; + IF_ADDR_RLOCK(ifp); + TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { + struct in_ifaddr *it = ifatoia(ifa); - case SIOCGIFDSTADDR: - if ((ifp->if_flags & IFF_POINTOPOINT) == 0) { - error = EINVAL; - goto out; - } - *((struct sockaddr_in *)&ifr->ifr_dstaddr) = ia->ia_dstaddr; - goto out; + if (it->ia_addr.sin_family != AF_INET) + continue; - case SIOCGIFNETMASK: - *((struct sockaddr_in *)&ifr->ifr_addr) = ia->ia_sockmask; - goto out; + iaIsFirst = false; + if (it->ia_addr.sin_addr.s_addr == addr->sin_addr.s_addr && + prison_check_ip4(td->td_ucred, &addr->sin_addr) == 0) + ia = it; + } + IF_ADDR_RUNLOCK(ifp); - case SIOCAIFADDR: - maskIsNew = 0; - hostIsNew = 1; - error = 0; - if (ifra->ifra_addr.sin_addr.s_addr == - ia->ia_addr.sin_addr.s_addr) - hostIsNew = 0; - if (ifra->ifra_mask.sin_len) { - /* - * QL: XXX - * Need to scrub the prefix here in case - * the issued command is SIOCAIFADDR with - * the same address, but with a different - * prefix length. And if the prefix length - * is the same as before, then the call is - * un-necessarily executed here. - */ - in_scrubprefix(ia, LLE_STATIC); - ia->ia_sockmask = ifra->ifra_mask; - ia->ia_sockmask.sin_family = AF_INET; - ia->ia_subnetmask = - ntohl(ia->ia_sockmask.sin_addr.s_addr); - maskIsNew = 1; - } - if ((ifp->if_flags & IFF_POINTOPOINT) && - (ifra->ifra_dstaddr.sin_family == AF_INET)) { - in_scrubprefix(ia, LLE_STATIC); - ia->ia_dstaddr = ifra->ifra_dstaddr; - maskIsNew = 1; /* We lie; but the effect's the same */ - } - if (hostIsNew || maskIsNew) - error = in_ifinit(ifp, ia, &ifra->ifra_addr, maskIsNew, - (ocmd == cmd ? ifra->ifra_vhid : 0)); - if (error != 0 && iaIsNew) - break; + if (ia != NULL) + (void )in_difaddr_ioctl(data, ifp, td); - if ((ifp->if_flags & IFF_BROADCAST) && - ifra->ifra_broadaddr.sin_len) - ia->ia_broadaddr = ifra->ifra_broadaddr; - if (error == 0) { - ii = ((struct in_ifinfo *)ifp->if_afdata[AF_INET]); - if (iaIsFirst && - (ifp->if_flags & IFF_MULTICAST) != 0) { - error = in_joingroup(ifp, &allhosts_addr, - NULL, &ii->ii_allhosts); - } - EVENTHANDLER_INVOKE(ifaddr_event, ifp); - } - goto out; + ifa = ifa_alloc(sizeof(struct in_ifaddr), M_WAITOK); + ia = (struct in_ifaddr *)ifa; + ifa->ifa_addr = (struct sockaddr *)&ia->ia_addr; + ifa->ifa_dstaddr = (struct sockaddr *)&ia->ia_dstaddr; + ifa->ifa_netmask = (struct sockaddr *)&ia->ia_sockmask; - case SIOCDIFADDR: - /* - * in_scrubprefix() kills the interface route. - */ - in_scrubprefix(ia, LLE_STATIC); + ia->ia_ifp = ifp; + ia->ia_ifa.ifa_metric = ifp->if_metric; + ia->ia_addr = *addr; + if (mask->sin_len != 0) { + ia->ia_sockmask = *mask; + ia->ia_subnetmask = ntohl(ia->ia_sockmask.sin_addr.s_addr); + } else { + in_addr_t i = ntohl(addr->sin_addr.s_addr); /* - * in_ifadown gets rid of all the rest of - * the routes. This is not quite the right - * thing to do, but at least if we are running - * a routing process they will come back. - */ - in_ifadown(&ia->ia_ifa, 1); - EVENTHANDLER_INVOKE(ifaddr_event, ifp); - error = 0; - break; + * Be compatible with network classes, if netmask isn't + * supplied, guess it based on classes. + */ + 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); + } + ia->ia_subnet = ntohl(addr->sin_addr.s_addr) & ia->ia_subnetmask; + in_socktrim(&ia->ia_sockmask); - default: - panic("in_control: unsupported ioctl"); + if (ifp->if_flags & IFF_BROADCAST) { + if (broadaddr->sin_len != 0) { + ia->ia_broadaddr = *broadaddr; + } else if (ia->ia_subnetmask == IN_RFC3021_MASK) { + ia->ia_broadaddr.sin_addr.s_addr = INADDR_BROADCAST; + ia->ia_broadaddr.sin_len = sizeof(struct sockaddr_in); + ia->ia_broadaddr.sin_family = AF_INET; + } else { + ia->ia_broadaddr.sin_addr.s_addr = + htonl(ia->ia_subnet | ~ia->ia_subnetmask); + ia->ia_broadaddr.sin_len = sizeof(struct sockaddr_in); + ia->ia_broadaddr.sin_family = AF_INET; + } } + if (ifp->if_flags & IFF_POINTOPOINT) + ia->ia_dstaddr = *dstaddr; + + /* XXXGL: rtinit() needs this strange assignment. */ + if (ifp->if_flags & IFF_LOOPBACK) + ia->ia_dstaddr = ia->ia_addr; + + ifa_ref(ifa); /* if_addrhead */ + IF_ADDR_WLOCK(ifp); + TAILQ_INSERT_TAIL(&ifp->if_addrhead, ifa, ifa_link); + IF_ADDR_WUNLOCK(ifp); + + ifa_ref(ifa); /* in_ifaddrhead */ + IN_IFADDR_WLOCK(); + TAILQ_INSERT_TAIL(&V_in_ifaddrhead, ia, ia_link); + LIST_INSERT_HEAD(INADDR_HASH(ia->ia_addr.sin_addr.s_addr), ia, ia_hash); + IN_IFADDR_WUNLOCK(); + + if (vhid != 0) + error = (*carp_attach_p)(&ia->ia_ifa, vhid); + if (error) + goto fail1; + + /* + * Give the interface a chance to initialize + * if this is its first address, + * and to validate the address if necessary. + */ + if (ifp->if_ioctl != NULL) + error = (*ifp->if_ioctl)(ifp, SIOCSIFADDR, (caddr_t)ia); + if (error) + goto fail2; + + /* + * Add route for the network. + */ + if (vhid == 0) { + int flags = RTF_UP; + + if (ifp->if_flags & (IFF_LOOPBACK|IFF_POINTOPOINT)) + flags |= RTF_HOST; + + error = in_addprefix(ia, flags); + if (error) + goto fail2; + } + + /* + * Add a loopback route to self. + */ + if (vhid == 0 && (ifp->if_flags & IFF_LOOPBACK) == 0 && + ia->ia_addr.sin_addr.s_addr != INADDR_ANY) { + struct in_ifaddr *eia; + + eia = in_localip_more(ia); + + if (eia == NULL) { + error = ifa_add_loopback_route((struct ifaddr *)ia, + (struct sockaddr *)&ia->ia_addr); + if (error) + goto fail3; + } else + ifa_free(&eia->ia_ifa); + } + + if (iaIsFirst && (ifp->if_flags & IFF_MULTICAST)) { + struct in_addr allhosts_addr; + struct in_ifinfo *ii; + + ii = ((struct in_ifinfo *)ifp->if_afdata[AF_INET]); + allhosts_addr.s_addr = htonl(INADDR_ALLHOSTS_GROUP); + + error = in_joingroup(ifp, &allhosts_addr, NULL, + &ii->ii_allhosts); + } + + EVENTHANDLER_INVOKE(ifaddr_event, ifp); + + return (error); + +fail3: + if (vhid == 0) + (void )in_scrubprefix(ia, LLE_STATIC); + +fail2: if (ia->ia_ifa.ifa_carp) (*carp_detach_p)(&ia->ia_ifa); +fail1: + IF_ADDR_WLOCK(ifp); + TAILQ_REMOVE(&ifp->if_addrhead, &ia->ia_ifa, ifa_link); + IF_ADDR_WUNLOCK(ifp); + ifa_free(&ia->ia_ifa); + + IN_IFADDR_WLOCK(); + TAILQ_REMOVE(&V_in_ifaddrhead, ia, ia_link); + LIST_REMOVE(ia, ia_hash); + IN_IFADDR_WUNLOCK(); + ifa_free(&ia->ia_ifa); + + return (error); +} + +static int +in_difaddr_ioctl(caddr_t data, struct ifnet *ifp, struct thread *td) +{ + const struct ifreq *ifr = (struct ifreq *)data; + const struct sockaddr_in *addr = (struct sockaddr_in *)&ifr->ifr_addr; + struct ifaddr *ifa; + struct in_ifaddr *ia; + bool deleteAny, iaIsLast; + int error; + + if (td != NULL) { + error = priv_check(td, PRIV_NET_DELIFADDR); + if (error) + return (error); + } + + if (addr->sin_len != sizeof(struct sockaddr_in) || + addr->sin_family != AF_INET) + deleteAny = true; + else + deleteAny = false; + + iaIsLast = true; + ia = NULL; IF_ADDR_WLOCK(ifp); - /* Re-check that ia is still part of the list. */ TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { - if (ifa == &ia->ia_ifa) - break; + struct in_ifaddr *it = ifatoia(ifa); + + if (it->ia_addr.sin_family != AF_INET) + continue; + + if (deleteAny && ia == NULL && (td == NULL || + prison_check_ip4(td->td_ucred, &it->ia_addr.sin_addr) == 0)) + ia = it; + + if (it->ia_addr.sin_addr.s_addr == addr->sin_addr.s_addr && + (td == NULL || prison_check_ip4(td->td_ucred, + &addr->sin_addr) == 0)) + ia = it; + + if (it != ia) + iaIsLast = false; } - if (ifa == NULL) { - /* - * If we lost the race with another thread, there is no need to - * try it again for the next loop as there is no other exit - * path between here and out. - */ + + if (ia == NULL) { IF_ADDR_WUNLOCK(ifp); - error = EADDRNOTAVAIL; - goto out; + return (EADDRNOTAVAIL); } + TAILQ_REMOVE(&ifp->if_addrhead, &ia->ia_ifa, ifa_link); IF_ADDR_WUNLOCK(ifp); - ifa_free(&ia->ia_ifa); /* if_addrhead */ + ifa_free(&ia->ia_ifa); /* if_addrhead */ IN_IFADDR_WLOCK(); TAILQ_REMOVE(&V_in_ifaddrhead, ia, ia_link); - LIST_REMOVE(ia, ia_hash); IN_IFADDR_WUNLOCK(); + ifa_free(&ia->ia_ifa); /* in_ifaddrhead */ + + /* + * in_scrubprefix() kills the interface route. + */ + in_scrubprefix(ia, LLE_STATIC); + + /* + * in_ifadown gets rid of all the rest of + * the routes. This is not quite the right + * thing to do, but at least if we are running + * a routing process they will come back. + */ + in_ifadown(&ia->ia_ifa, 1); + + if (ia->ia_ifa.ifa_carp) + (*carp_detach_p)(&ia->ia_ifa); + /* * If this is the last IPv4 address configured on this * interface, leave the all-hosts group. * No state-change report need be transmitted. */ - IFP_TO_IA(ifp, iap); - if (iap == NULL) { + if (iaIsLast && (ifp->if_flags & IFF_MULTICAST)) { + struct in_ifinfo *ii; + ii = ((struct in_ifinfo *)ifp->if_afdata[AF_INET]); IN_MULTI_LOCK(); if (ii->ii_allhosts) { @@ -584,14 +627,11 @@ in_control(struct socket *so, u_long cmd ii->ii_allhosts = NULL; } IN_MULTI_UNLOCK(); - } else - ifa_free(&iap->ia_ifa); + } - ifa_free(&ia->ia_ifa); /* in_ifaddrhead */ -out: - if (ia != NULL) - ifa_free(&ia->ia_ifa); - return (error); + EVENTHANDLER_INVOKE(ifaddr_event, ifp); + + return (0); } /* @@ -616,11 +656,23 @@ in_lifaddr_ioctl(struct socket *so, u_lo { struct if_laddrreq *iflr = (struct if_laddrreq *)data; struct ifaddr *ifa; + int error; - /* sanity checks */ - if (data == NULL || ifp == NULL) { - panic("invalid argument to in_lifaddr_ioctl"); - /*NOTRECHED*/ + switch (cmd) { + case SIOCALIFADDR: + if (td != NULL) { + error = priv_check(td, PRIV_NET_ADDIFADDR); + if (error) + return (error); + } + break; + case SIOCDLIFADDR: + if (td != NULL) { + error = priv_check(td, PRIV_NET_DELIFADDR); + if (error) + return (error); + } + break; } switch (cmd) { @@ -770,115 +822,6 @@ in_lifaddr_ioctl(struct socket *so, u_lo return (EOPNOTSUPP); /*just for safety*/ } -/* - * Initialize an interface's internet address - * and routing table entry. - */ -static int -in_ifinit(struct ifnet *ifp, struct in_ifaddr *ia, struct sockaddr_in *sin, - int masksupplied, int vhid) -{ - register u_long i = ntohl(sin->sin_addr.s_addr); - int flags, error = 0; - - IN_IFADDR_WLOCK(); - if (ia->ia_addr.sin_family == AF_INET) - LIST_REMOVE(ia, ia_hash); - ia->ia_addr = *sin; - LIST_INSERT_HEAD(INADDR_HASH(ia->ia_addr.sin_addr.s_addr), - ia, ia_hash); - IN_IFADDR_WUNLOCK(); - - if (vhid > 0) { - if (carp_attach_p != NULL) - error = (*carp_attach_p)(&ia->ia_ifa, vhid); - else - error = EPROTONOSUPPORT; - } - if (error) - return (error); - - /* - * Give the interface a chance to initialize - * if this is its first address, - * and to validate the address if necessary. - */ - if (ifp->if_ioctl != NULL && - (error = (*ifp->if_ioctl)(ifp, SIOCSIFADDR, (caddr_t)ia)) != 0) - /* LIST_REMOVE(ia, ia_hash) is done in in_control */ - return (error); - - /* - * Be compatible with network classes, if netmask isn't supplied, - * guess it based on classes. - */ - if (!masksupplied) { - 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); - } - ia->ia_subnet = i & ia->ia_subnetmask; - in_socktrim(&ia->ia_sockmask); - - /* - * Add route for the network. - */ - flags = RTF_UP; - ia->ia_ifa.ifa_metric = ifp->if_metric; - if (ifp->if_flags & IFF_BROADCAST) { - 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; - } else if (ifp->if_flags & IFF_POINTOPOINT) { - if (ia->ia_dstaddr.sin_family != AF_INET) - return (0); - flags |= RTF_HOST; - } - if (!vhid && (error = in_addprefix(ia, flags)) != 0) - return (error); - - if (ia->ia_addr.sin_addr.s_addr == INADDR_ANY) - return (0); - - if (ifp->if_flags & IFF_POINTOPOINT && - ia->ia_dstaddr.sin_addr.s_addr == ia->ia_addr.sin_addr.s_addr) - return (0); - - /* - * add a loopback route to self - */ - if (!vhid && !(ifp->if_flags & IFF_LOOPBACK)) { - struct route ia_ro; - - bzero(&ia_ro, sizeof(ia_ro)); - *((struct sockaddr_in *)(&ia_ro.ro_dst)) = ia->ia_addr; - rtalloc_ign_fib(&ia_ro, 0, RT_DEFAULT_FIB); - if ((ia_ro.ro_rt != NULL) && (ia_ro.ro_rt->rt_ifp != NULL) && - (ia_ro.ro_rt->rt_ifp == V_loif)) { - RT_LOCK(ia_ro.ro_rt); - RT_ADDREF(ia_ro.ro_rt); - RTFREE_LOCKED(ia_ro.ro_rt); - } else - error = ifa_add_loopback_route((struct ifaddr *)ia, - (struct sockaddr *)&ia->ia_addr); - if (error == 0) - ia->ia_flags |= IFA_RTSELF; - if (ia_ro.ro_rt != NULL) - RTFREE(ia_ro.ro_rt); - } - - return (error); -} - #define rtinitflags(x) \ ((((x)->ia_ifp->if_flags & (IFF_LOOPBACK | IFF_POINTOPOINT)) != 0) \ ? RTF_HOST : 0) @@ -1007,44 +950,27 @@ in_scrubprefix(struct in_ifaddr *target, /* * Remove the loopback route to the interface address. - * The "useloopback" setting is not consulted because if the - * user configures an interface address, turns off this - * setting, and then tries to delete that interface address, - * checking the current setting of "useloopback" would leave - * that interface address loopback route untouched, which - * would be wrong. Therefore the interface address loopback route - * deletion is unconditional. */ if ((target->ia_addr.sin_addr.s_addr != INADDR_ANY) && !(target->ia_ifp->if_flags & IFF_LOOPBACK) && - (target->ia_flags & IFA_RTSELF)) { - struct route ia_ro; - int freeit = 0; - - bzero(&ia_ro, sizeof(ia_ro)); - *((struct sockaddr_in *)(&ia_ro.ro_dst)) = target->ia_addr; - rtalloc_ign_fib(&ia_ro, 0, 0); - if ((ia_ro.ro_rt != NULL) && (ia_ro.ro_rt->rt_ifp != NULL) && - (ia_ro.ro_rt->rt_ifp == V_loif)) { - RT_LOCK(ia_ro.ro_rt); - if (ia_ro.ro_rt->rt_refcnt <= 1) - freeit = 1; - 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)) { + (flags & LLE_STATIC)) { + struct in_ifaddr *eia; + + eia = in_localip_more(target); + + if (eia != NULL) { + error = ifa_switch_loopback_route((struct ifaddr *)eia, + (struct sockaddr *)&target->ia_addr); + ifa_free(&eia->ia_ifa); + } else { error = ifa_del_loopback_route((struct ifaddr *)target, (struct sockaddr *)&target->ia_addr); - if (error == 0) - target->ia_flags &= ~IFA_RTSELF; } - if ((flags & LLE_STATIC) && - !(target->ia_ifp->if_flags & IFF_NOARP)) + + if (!(target->ia_ifp->if_flags & IFF_NOARP)) /* remove arp cache */ - arp_ifscrub(target->ia_ifp, IA_SIN(target)->sin_addr.s_addr); + arp_ifscrub(target->ia_ifp, + IA_SIN(target)->sin_addr.s_addr); } if (rtinitflags(target)) { From owner-svn-src-head@FreeBSD.ORG Tue Nov 5 07:45:21 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 641E5E54; Tue, 5 Nov 2013 07:45:21 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5213C22D3; Tue, 5 Nov 2013 07:45:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA57jLuI062585; Tue, 5 Nov 2013 07:45:21 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA57jLKK062584; Tue, 5 Nov 2013 07:45:21 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201311050745.rA57jLKK062584@svn.freebsd.org> From: Gleb Smirnoff Date: Tue, 5 Nov 2013 07:45:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257693 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Nov 2013 07:45:21 -0000 Author: glebius Date: Tue Nov 5 07:45:20 2013 New Revision: 257693 URL: http://svnweb.freebsd.org/changeset/base/257693 Log: netinet code no longer uses IFA_RTSELF. Modified: head/sys/netinet/raw_ip.c Modified: head/sys/netinet/raw_ip.c ============================================================================== --- head/sys/netinet/raw_ip.c Tue Nov 5 07:44:15 2013 (r257692) +++ head/sys/netinet/raw_ip.c Tue Nov 5 07:45:20 2013 (r257693) @@ -774,16 +774,12 @@ rip_ctlinput(int cmd, struct sockaddr *s 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; From owner-svn-src-head@FreeBSD.ORG Tue Nov 5 07:47:22 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A85D8FAF; Tue, 5 Nov 2013 07:47:22 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 26FBD22E2; Tue, 5 Nov 2013 07:47:21 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.7/8.14.7) with ESMTP id rA57lJWC005843 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 5 Nov 2013 11:47:19 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.7/8.14.7/Submit) id rA57lJ3U005842; Tue, 5 Nov 2013 11:47:19 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Tue, 5 Nov 2013 11:47:19 +0400 From: Gleb Smirnoff To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r257692 - head/sys/netinet Message-ID: <20131105074719.GK1467@FreeBSD.org> References: <201311050744.rA57iFSL062386@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201311050744.rA57iFSL062386@svn.freebsd.org> User-Agent: Mutt/1.5.22 (2013-10-16) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Nov 2013 07:47:22 -0000 On Tue, Nov 05, 2013 at 07:44:15AM +0000, Gleb Smirnoff wrote: T> Rewrite in_control(), so that it is comprehendable without getting mad. T> T> o Provide separate functions for SIOCAIFADDR and for SIOCDIFADDR, with T> clear code flow from beginning to the end. After that the rest of T> in_control() gets very small and clear. T> o Provide sx(9) lock to protect against parallel ioctl() invocations. T> o Reimplement logic from r201282, that tried to keep localhost route in T> table when multiple P2P interfaces with same local address are created T> and deleted. T> T> Discussed with: pluknet, melifaro T> Sponsored by: Netflix T> Sponsored by: Nginx, Inc. This may break things for someone. I am open at throwing stones at me. :) Please report any strangeness you notice and I'll fix it ASAP. -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Tue Nov 5 09:30:08 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B906DB0E; Tue, 5 Nov 2013 09:30:08 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 970BD28AC; Tue, 5 Nov 2013 09:30:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA59U8en097696; Tue, 5 Nov 2013 09:30:08 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA59U7de097681; Tue, 5 Nov 2013 09:30:07 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201311050930.rA59U7de097681@svn.freebsd.org> From: Gleb Smirnoff Date: Tue, 5 Nov 2013 09:30:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257694 - in head/etc: . defaults namedb periodic/daily rc.d X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Nov 2013 09:30:08 -0000 Author: glebius Date: Tue Nov 5 09:30:06 2013 New Revision: 257694 URL: http://svnweb.freebsd.org/changeset/base/257694 Log: Remove remnants of BIND from /etc, since there is no BIND in base now. Sorry, that would break users running head and BIND from ports, since ports rely on these scripts. The ports will be fixed soon. Reviewed by: erwin Deleted: head/etc/namedb/ head/etc/periodic/daily/470.status-named head/etc/rc.d/named Modified: head/etc/defaults/periodic.conf head/etc/defaults/rc.conf head/etc/freebsd-update.conf head/etc/rc.d/Makefile head/etc/rc.d/ntpdate head/etc/rc.d/rpcbind head/etc/rc.d/syslogd Modified: head/etc/defaults/periodic.conf ============================================================================== --- head/etc/defaults/periodic.conf Tue Nov 5 07:45:20 2013 (r257693) +++ head/etc/defaults/periodic.conf Tue Nov 5 09:30:06 2013 (r257694) @@ -137,10 +137,6 @@ daily_status_mail_rejects_enable="YES" daily_status_mail_rejects_logs=3 # How many logs to check daily_status_mail_rejects_shorten="NO" # Shorten output -# 470.status-named -daily_status_named_enable="YES" -daily_status_named_usedns="YES" # DNS lookups are ok - # 480.status-ntpd daily_status_ntpd_enable="NO" # Check NTP status Modified: head/etc/defaults/rc.conf ============================================================================== --- head/etc/defaults/rc.conf Tue Nov 5 07:45:20 2013 (r257693) +++ head/etc/defaults/rc.conf Tue Nov 5 09:30:06 2013 (r257694) @@ -256,6 +256,7 @@ hostapd_enable="NO" # Run hostap daemon syslogd_enable="YES" # Run syslog daemon (or NO). syslogd_program="/usr/sbin/syslogd" # path to syslogd, if you want a different one. syslogd_flags="-s" # Flags to syslogd (if enabled). +altlog_proglist="" # List of chrooted applicatioins in /var inetd_enable="NO" # Run the network daemon dispatcher (YES/NO). inetd_program="/usr/sbin/inetd" # path to inetd, if you want a different one. inetd_flags="-wW -C 60" # Optional flags to inetd @@ -267,23 +268,6 @@ hastd_program="/sbin/hastd" # path to ha hastd_flags="" # Optional flags to hastd. ctld_enable="NO" # CAM Target Layer / iSCSI target daemon. local_unbound_enable="NO" # local caching resolver -# -# named. It may be possible to run named in a sandbox, man security for -# details. -# -named_enable="NO" # Run named, the DNS server (or NO). -named_program="/usr/sbin/named" # Path to named, if you want a different one. -named_conf="/etc/namedb/named.conf" # Path to the configuration file -#named_flags="" # Use this for flags OTHER than -u and -c -named_uid="bind" # User to run named as -named_chrootdir="/var/named" # Chroot directory (or "" not to auto-chroot it) -named_chroot_autoupdate="YES" # Automatically install/update chrooted - # components of named. See /etc/rc.d/named. -named_symlink_enable="YES" # Symlink the chrooted pid file -named_wait="NO" # Wait for working name service before exiting -named_wait_host="localhost" # Hostname to check if named_wait is enabled -named_auto_forward="NO" # Set up forwarders from /etc/resolv.conf -named_auto_forward_only="NO" # Do "forward only" instead of "forward first" # # kerberos. Do not run the admin daemons on slave servers Modified: head/etc/freebsd-update.conf ============================================================================== --- head/etc/freebsd-update.conf Tue Nov 5 07:45:20 2013 (r257693) +++ head/etc/freebsd-update.conf Tue Nov 5 09:30:06 2013 (r257694) @@ -35,7 +35,7 @@ UpdateIfUnmodified /etc/ /var/ /root/ /. # When upgrading to a new FreeBSD release, files which match MergeChanges # will have any local changes merged into the version from the new release. -MergeChanges /etc/ /var/named/etc/ /boot/device.hints +MergeChanges /etc/ /boot/device.hints ### Default configuration options: Modified: head/etc/rc.d/Makefile ============================================================================== --- head/etc/rc.d/Makefile Tue Nov 5 07:45:20 2013 (r257693) +++ head/etc/rc.d/Makefile Tue Nov 5 09:30:06 2013 (r257694) @@ -90,7 +90,6 @@ FILES= DAEMON \ mroute6d \ mrouted \ msgs \ - named \ natd \ netif \ netoptions \ Modified: head/etc/rc.d/ntpdate ============================================================================== --- head/etc/rc.d/ntpdate Tue Nov 5 07:45:20 2013 (r257693) +++ head/etc/rc.d/ntpdate Tue Nov 5 09:30:06 2013 (r257694) @@ -4,7 +4,7 @@ # # PROVIDE: ntpdate -# REQUIRE: NETWORKING syslogd named +# REQUIRE: NETWORKING syslogd # KEYWORD: nojail . /etc/rc.subr Modified: head/etc/rc.d/rpcbind ============================================================================== --- head/etc/rc.d/rpcbind Tue Nov 5 07:45:20 2013 (r257693) +++ head/etc/rc.d/rpcbind Tue Nov 5 09:30:06 2013 (r257694) @@ -4,7 +4,7 @@ # # PROVIDE: rpcbind -# REQUIRE: NETWORKING ntpdate syslogd named +# REQUIRE: NETWORKING ntpdate syslogd # KEYWORD: shutdown . /etc/rc.subr Modified: head/etc/rc.d/syslogd ============================================================================== --- head/etc/rc.d/syslogd Tue Nov 5 07:45:20 2013 (r257693) +++ head/etc/rc.d/syslogd Tue Nov 5 09:30:06 2013 (r257694) @@ -21,7 +21,6 @@ extra_commands="reload" sockfile="/var/run/syslogd.sockets" evalargs="rc_flags=\"\`set_socketlist\` \$rc_flags\"" -altlog_proglist="named" syslogd_precmd() { From owner-svn-src-head@FreeBSD.ORG Tue Nov 5 09:36:25 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D7846CA5; Tue, 5 Nov 2013 09:36:25 +0000 (UTC) (envelope-from erwin@mail.droso.net) Received: from mail.droso.net (koala.droso.dk [IPv6:2a01:4f8:a0:7163::2]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9ADF82907; Tue, 5 Nov 2013 09:36:25 +0000 (UTC) Received: by mail.droso.net (Postfix, from userid 1001) id 8006BC5F; Tue, 5 Nov 2013 10:36:23 +0100 (CET) Date: Tue, 5 Nov 2013 10:36:23 +0100 From: Erwin Lansing To: Gleb Smirnoff Subject: Re: svn commit: r257694 - in head/etc: . defaults namedb periodic/daily rc.d Message-ID: <20131105093623.GB90670@droso.dk> References: <201311050930.rA59U7de097681@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <201311050930.rA59U7de097681@svn.freebsd.org> X-Operating-System: FreeBSD/amd64 9.1-RELEASE User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Nov 2013 09:36:25 -0000 On Tue, Nov 05, 2013 at 09:30:07AM +0000, Gleb Smirnoff wrote: > Author: glebius > Date: Tue Nov 5 09:30:06 2013 > New Revision: 257694 > URL: http://svnweb.freebsd.org/changeset/base/257694 > > Log: > Remove remnants of BIND from /etc, since there is no BIND in base now. > Thanks for taking care of this! Erwin From owner-svn-src-head@FreeBSD.ORG Tue Nov 5 09:46:02 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 351D9F01; Tue, 5 Nov 2013 09:46:02 +0000 (UTC) (envelope-from oleg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 097182974; Tue, 5 Nov 2013 09:46:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA59k10Q003758; Tue, 5 Nov 2013 09:46:01 GMT (envelope-from oleg@svn.freebsd.org) Received: (from oleg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA59k1hn003757; Tue, 5 Nov 2013 09:46:01 GMT (envelope-from oleg@svn.freebsd.org) Message-Id: <201311050946.rA59k1hn003757@svn.freebsd.org> From: Oleg Bulyzhin Date: Tue, 5 Nov 2013 09:46:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257695 - head/sys/dev/ixgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Nov 2013 09:46:02 -0000 Author: oleg Date: Tue Nov 5 09:46:01 2013 New Revision: 257695 URL: http://svnweb.freebsd.org/changeset/base/257695 Log: - Fix link loss on vlan reconfiguration. - Fix issues with 'vlanhwfilter'. MFC after: 1 week Silence from: jfv 5 weeks Modified: head/sys/dev/ixgbe/ixgbe.c Modified: head/sys/dev/ixgbe/ixgbe.c ============================================================================== --- head/sys/dev/ixgbe/ixgbe.c Tue Nov 5 09:30:06 2013 (r257694) +++ head/sys/dev/ixgbe/ixgbe.c Tue Nov 5 09:46:01 2013 (r257695) @@ -1253,9 +1253,6 @@ ixgbe_init_locked(struct adapter *adapte IXGBE_WRITE_REG(hw, IXGBE_RDT(i), adapter->num_rx_desc - 1); } - /* Set up VLAN support and filter */ - ixgbe_setup_vlan_hw_support(adapter); - /* Enable Receive engine */ rxctrl = IXGBE_READ_REG(hw, IXGBE_RXCTRL); if (hw->mac.type == ixgbe_mac_82598EB) @@ -1339,6 +1336,9 @@ ixgbe_init_locked(struct adapter *adapte /* Initialize the FC settings */ ixgbe_start_hw(hw); + /* Set up VLAN support and filter */ + ixgbe_setup_vlan_hw_support(adapter); + /* And now turn on interrupts */ ixgbe_enable_intr(adapter); @@ -4688,7 +4688,7 @@ ixgbe_register_vlan(void *arg, struct if bit = vtag & 0x1F; adapter->shadow_vfta[index] |= (1 << bit); ++adapter->num_vlans; - ixgbe_init_locked(adapter); + ixgbe_setup_vlan_hw_support(adapter); IXGBE_CORE_UNLOCK(adapter); } @@ -4715,7 +4715,7 @@ ixgbe_unregister_vlan(void *arg, struct adapter->shadow_vfta[index] &= ~(1 << bit); --adapter->num_vlans; /* Re-init to load the changes */ - ixgbe_init_locked(adapter); + ixgbe_setup_vlan_hw_support(adapter); IXGBE_CORE_UNLOCK(adapter); } @@ -4737,6 +4737,20 @@ ixgbe_setup_vlan_hw_support(struct adapt if (adapter->num_vlans == 0) return; + /* Setup the queues for vlans */ + for (int i = 0; i < adapter->num_queues; i++) { + rxr = &adapter->rx_rings[i]; + /* On 82599 the VLAN enable is per/queue in RXDCTL */ + if (hw->mac.type != ixgbe_mac_82598EB) { + ctrl = IXGBE_READ_REG(hw, IXGBE_RXDCTL(i)); + ctrl |= IXGBE_RXDCTL_VME; + IXGBE_WRITE_REG(hw, IXGBE_RXDCTL(i), ctrl); + } + rxr->vtag_strip = TRUE; + } + + if ((ifp->if_capenable & IFCAP_VLAN_HWFILTER) == 0) + return; /* ** A soft reset zero's out the VFTA, so ** we need to repopulate it now. @@ -4755,18 +4769,6 @@ ixgbe_setup_vlan_hw_support(struct adapt if (hw->mac.type == ixgbe_mac_82598EB) ctrl |= IXGBE_VLNCTRL_VME; IXGBE_WRITE_REG(hw, IXGBE_VLNCTRL, ctrl); - - /* Setup the queues for vlans */ - for (int i = 0; i < adapter->num_queues; i++) { - rxr = &adapter->rx_rings[i]; - /* On 82599 the VLAN enable is per/queue in RXDCTL */ - if (hw->mac.type != ixgbe_mac_82598EB) { - ctrl = IXGBE_READ_REG(hw, IXGBE_RXDCTL(i)); - ctrl |= IXGBE_RXDCTL_VME; - IXGBE_WRITE_REG(hw, IXGBE_RXDCTL(i), ctrl); - } - rxr->vtag_strip = TRUE; - } } static void From owner-svn-src-head@FreeBSD.ORG Tue Nov 5 09:48:10 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 30281F9; Tue, 5 Nov 2013 09:48:10 +0000 (UTC) (envelope-from oleg@lath.rinet.ru) Received: from lath.rinet.ru (lath.rinet.ru [195.54.192.90]) by mx1.freebsd.org (Postfix) with ESMTP id E03D72985; Tue, 5 Nov 2013 09:48:09 +0000 (UTC) Received: by lath.rinet.ru (Postfix, from userid 222) id DF21BD61; Tue, 5 Nov 2013 13:48:08 +0400 (MSK) Date: Tue, 5 Nov 2013 13:48:08 +0400 From: Oleg Bulyzhin To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r257695 - head/sys/dev/ixgbe Message-ID: <20131105094808.GE40862@lath.rinet.ru> References: <201311050946.rA59k1hn003757@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201311050946.rA59k1hn003757@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Nov 2013 09:48:10 -0000 Discussion is here: http://lists.freebsd.org/pipermail/freebsd-stable/2013-September/075280.html -- Oleg. ================================================================ === Oleg Bulyzhin -- OBUL-RIPN -- OBUL-RIPE -- oleg@rinet.ru === ================================================================ From owner-svn-src-head@FreeBSD.ORG Tue Nov 5 10:13:43 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 705EDA9A; Tue, 5 Nov 2013 10:13:43 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 2E6A22B3F; Tue, 5 Nov 2013 10:13:41 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id MAA02001; Tue, 05 Nov 2013 12:13:40 +0200 (EET) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1Vdddj-000AUb-Vd; Tue, 05 Nov 2013 12:13:40 +0200 Message-ID: <5278C496.4000002@FreeBSD.org> Date: Tue, 05 Nov 2013 12:12:38 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: Xin LI , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org Subject: Re: svn commit: r256132 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs References: <201310080138.r981cPcT048197@svn.freebsd.org> In-Reply-To: <201310080138.r981cPcT048197@svn.freebsd.org> X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Nov 2013 10:13:43 -0000 on 08/10/2013 04:38 Xin LI said the following: > Author: delphij > Date: Tue Oct 8 01:38:24 2013 > New Revision: 256132 > URL: http://svnweb.freebsd.org/changeset/base/256132 > > Log: > Improve lzjb decompress performance by reorganizing the code > to tighten the copy loop. > > Submitted by: Denis Ahrens > MFC after: 2 weeks > Approved by: re (gjb) > > Modified: > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lzjb.c > > Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lzjb.c > ============================================================================== > --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lzjb.c Mon Oct 7 22:30:03 2013 (r256131) > +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lzjb.c Tue Oct 8 01:38:24 2013 (r256132) > @@ -117,7 +117,9 @@ lzjb_decompress(void *s_start, void *d_s > src += 2; > if ((cpy = dst - offset) < (uchar_t *)d_start) > return (-1); > - while (--mlen >= 0 && dst < d_end) > + if (mlen > (d_end - dst)) > + mlen = d_end - dst; > + while (--mlen >= 0) > *dst++ = *cpy++; > } else { > *dst++ = *src++; > Intuitively it might seem that this change is indeed an improvement. But given how "not dumb" (not sure if that always amounts to smart) the modern compilers are, has anyone actually measured if this change indeed improves the performance? Judging from the conversations on the ZFS mailing lists this change event hurt performance in some environments. Looks like the upstream is not going to take this change. So does it make any sense for us to make the code more obscure and different from upstream? Unless performance benefits could indeed be demonstrated. -- Andriy Gapon From owner-svn-src-head@FreeBSD.ORG Tue Nov 5 10:29:50 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 26F50DB4; Tue, 5 Nov 2013 10:29:50 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 03AF52BFF; Tue, 5 Nov 2013 10:29:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA5ATndR017807; Tue, 5 Nov 2013 10:29:49 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA5ATmmM017799; Tue, 5 Nov 2013 10:29:48 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201311051029.rA5ATmmM017799@svn.freebsd.org> From: Gleb Smirnoff Date: Tue, 5 Nov 2013 10:29:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257696 - in head: libexec/rbootd share/man/man9 sys/compat/svr4 sys/net sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Nov 2013 10:29:50 -0000 Author: glebius Date: Tue Nov 5 10:29:47 2013 New Revision: 257696 URL: http://svnweb.freebsd.org/changeset/base/257696 Log: Drop support for historic ioctls and also undefine them, so that code that checks their presence via ifdef, won't use them. Bump __FreeBSD_version as safety measure. Modified: head/libexec/rbootd/bpf.c head/share/man/man9/ifnet.9 head/sys/compat/svr4/svr4_sockio.c head/sys/net/if.c head/sys/net/if.h head/sys/net/if_tap.c head/sys/sys/param.h head/sys/sys/sockio.h Modified: head/libexec/rbootd/bpf.c ============================================================================== --- head/libexec/rbootd/bpf.c Tue Nov 5 09:46:01 2013 (r257695) +++ head/libexec/rbootd/bpf.c Tue Nov 5 10:29:47 2013 (r257696) @@ -237,19 +237,11 @@ BpfGetIntfName(char **errmsg) ifc.ifc_len = sizeof ibuf; ifc.ifc_buf = (caddr_t)ibuf; -#ifdef OSIOCGIFCONF - if (ioctl(fd, OSIOCGIFCONF, (char *)&ifc) < 0 || - ifc.ifc_len < sizeof(struct ifreq)) { - (void) strcpy(errbuf, "bpf: ioctl(OSIOCGIFCONF): %m"); - return(NULL); - } -#else if (ioctl(fd, SIOCGIFCONF, (char *)&ifc) < 0 || ifc.ifc_len < sizeof(struct ifreq)) { (void) strcpy(errbuf, "bpf: ioctl(SIOCGIFCONF): %m"); return(NULL); } -#endif ifrp = ibuf; ifend = (struct ifreq *)((char *)ibuf + ifc.ifc_len); Modified: head/share/man/man9/ifnet.9 ============================================================================== --- head/share/man/man9/ifnet.9 Tue Nov 5 09:46:01 2013 (r257695) +++ head/share/man/man9/ifnet.9 Tue Nov 5 10:29:47 2013 (r257696) @@ -1284,9 +1284,8 @@ further interpretation. The following commands are handled by .Fn ifioctl : .Pp -.Bl -tag -width ".Dv OSIOCGIFNETMASK" -offset indent -compact +.Bl -tag -width ".Dv SIOCGIFNETMASK" -offset indent -compact .It Dv SIOCGIFCONF -.It Dv OSIOCGIFCONF Get interface configuration. (No call-down to driver.) .Pp @@ -1380,17 +1379,6 @@ function is called to perform the operat The socket's protocol control routine is called to implement the requested action. .Pp -.It Dv OSIOCGIFADDR -.It Dv OSIOCGIFDSTADDR -.It Dv OSIOCGIFBRDADDR -.It Dv OSIOCGIFNETMASK -The socket's protocol control routine is called to implement the -requested action. -On return, -.Vt sockaddr -structures are converted into old-style (no -.Va sa_len -member). .El .El .Pp Modified: head/sys/compat/svr4/svr4_sockio.c ============================================================================== --- head/sys/compat/svr4/svr4_sockio.c Tue Nov 5 09:46:01 2013 (r257695) +++ head/sys/compat/svr4/svr4_sockio.c Tue Nov 5 10:29:47 2013 (r257696) @@ -144,6 +144,7 @@ svr4_sock_ioctl(fp, td, retval, fd, cmd, case SVR4_SIOCGIFCONF: { struct svr4_ifconf sc; + struct ifconf *ifc; if ((error = copyin(data, &sc, sizeof(sc))) != 0) return error; @@ -152,9 +153,18 @@ svr4_sock_ioctl(fp, td, retval, fd, cmd, sizeof(struct ifreq), sizeof(struct svr4_ifreq), sc.svr4_ifc_len)); - if ((error = fo_ioctl(fp, OSIOCGIFCONF, - (caddr_t) &sc, td->td_ucred, - td)) != 0) + ifc = (struct ifconf *)≻ + ifc->ifc_req.ifr_addr.sa_family = + sc.svr4_ifc_req.svr4_ifr_addr.sa_family; + ifc->ifc_req.ifr_addr.sa_len = sizeof(struct osockaddr); + + error = fo_ioctl(fp, SIOCGIFCONF, &sc, + td->td_ucred, td)); + + sc.svr4_ifc_req.svr4_ifr_addr.sa_family = + ifc->ifc_req.ifr_addr.sa_family; + + if (error != 0) return error; DPRINTF(("SIOCGIFCONF\n")); Modified: head/sys/net/if.c ============================================================================== --- head/sys/net/if.c Tue Nov 5 09:46:01 2013 (r257695) +++ head/sys/net/if.c Tue Nov 5 10:29:47 2013 (r257696) @@ -2511,7 +2511,6 @@ ifioctl(struct socket *so, u_long cmd, c CURVNET_SET(so->so_vnet); switch (cmd) { case SIOCGIFCONF: - case OSIOCGIFCONF: error = ifconf(cmd, data); CURVNET_RESTORE(); return (error); @@ -2611,71 +2610,12 @@ ifioctl(struct socket *so, u_long cmd, c * layer, and do not perform any credentials checks or input * validation. */ -#ifndef COMPAT_43 - error = ((*so->so_proto->pr_usrreqs->pru_control)(so, cmd, - data, - ifp, td)); + error = ((*so->so_proto->pr_usrreqs->pru_control)(so, cmd, data, + ifp, td)); if (error == EOPNOTSUPP && ifp != NULL && ifp->if_ioctl != NULL && cmd != SIOCSIFADDR && cmd != SIOCSIFBRDADDR && cmd != SIOCSIFDSTADDR && cmd != SIOCSIFNETMASK) error = (*ifp->if_ioctl)(ifp, cmd, data); -#else - { - u_long ocmd = cmd; - - switch (cmd) { - - case SIOCSIFDSTADDR: - case SIOCSIFADDR: - case SIOCSIFBRDADDR: - case SIOCSIFNETMASK: -#if BYTE_ORDER != BIG_ENDIAN - if (ifr->ifr_addr.sa_family == 0 && - ifr->ifr_addr.sa_len < 16) { - ifr->ifr_addr.sa_family = ifr->ifr_addr.sa_len; - ifr->ifr_addr.sa_len = 16; - } -#else - if (ifr->ifr_addr.sa_len == 0) - ifr->ifr_addr.sa_len = 16; -#endif - break; - - case OSIOCGIFADDR: - cmd = SIOCGIFADDR; - break; - - case OSIOCGIFDSTADDR: - cmd = SIOCGIFDSTADDR; - break; - - case OSIOCGIFBRDADDR: - cmd = SIOCGIFBRDADDR; - break; - - case OSIOCGIFNETMASK: - cmd = SIOCGIFNETMASK; - } - error = ((*so->so_proto->pr_usrreqs->pru_control)(so, - cmd, - data, - ifp, td)); - if (error == EOPNOTSUPP && ifp != NULL && - ifp->if_ioctl != NULL && - cmd != SIOCSIFADDR && cmd != SIOCSIFBRDADDR && - cmd != SIOCSIFDSTADDR && cmd != SIOCSIFNETMASK) - error = (*ifp->if_ioctl)(ifp, cmd, data); - switch (ocmd) { - - case OSIOCGIFADDR: - case OSIOCGIFDSTADDR: - case OSIOCGIFBRDADDR: - case OSIOCGIFNETMASK: - *(u_short *)&ifr->ifr_addr = ifr->ifr_addr.sa_family; - - } - } -#endif /* COMPAT_43 */ if ((oif_flags ^ ifp->if_flags) & IFF_UP) { #ifdef INET6 @@ -2841,16 +2781,6 @@ again: if (prison_if(curthread->td_ucred, sa) != 0) continue; addrs++; -#ifdef COMPAT_43 - if (cmd == OSIOCGIFCONF) { - struct osockaddr *osa = - (struct osockaddr *)&ifr.ifr_addr; - ifr.ifr_addr = *sa; - osa->sa_family = sa->sa_family; - sbuf_bcat(sb, &ifr, sizeof(ifr)); - max_len += sizeof(ifr); - } else -#endif if (sa->sa_len <= sizeof(*sa)) { ifr.ifr_addr = *sa; sbuf_bcat(sb, &ifr, sizeof(ifr)); Modified: head/sys/net/if.h ============================================================================== --- head/sys/net/if.h Tue Nov 5 09:46:01 2013 (r257695) +++ head/sys/net/if.h Tue Nov 5 10:29:47 2013 (r257696) @@ -412,14 +412,6 @@ struct ifaliasreq { int ifra_vhid; }; -/* Compat with pre-10.x */ -struct oifaliasreq { - char ifra_name[IFNAMSIZ]; - struct sockaddr ifra_addr; - struct sockaddr ifra_broadaddr; - struct sockaddr ifra_mask; -}; - struct ifmediareq { char ifm_name[IFNAMSIZ]; /* if name, e.g. "en0" */ int ifm_current; /* current media options */ Modified: head/sys/net/if_tap.c ============================================================================== --- head/sys/net/if_tap.c Tue Nov 5 09:46:01 2013 (r257695) +++ head/sys/net/if_tap.c Tue Nov 5 10:29:47 2013 (r257696) @@ -829,8 +829,7 @@ tapioctl(struct cdev *dev, u_long cmd, c mtx_unlock(&tp->tap_mtx); break; - case OSIOCGIFADDR: /* get MAC address of the remote side */ - case SIOCGIFADDR: + case SIOCGIFADDR: /* get MAC address of the remote side */ mtx_lock(&tp->tap_mtx); bcopy(tp->ether_addr, data, sizeof(tp->ether_addr)); mtx_unlock(&tp->tap_mtx); Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Tue Nov 5 09:46:01 2013 (r257695) +++ head/sys/sys/param.h Tue Nov 5 10:29:47 2013 (r257696) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1100001 /* Master, propagated to newvers */ +#define __FreeBSD_version 1100002 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, Modified: head/sys/sys/sockio.h ============================================================================== --- head/sys/sys/sockio.h Tue Nov 5 09:46:01 2013 (r257695) +++ head/sys/sys/sockio.h Tue Nov 5 10:29:47 2013 (r257696) @@ -50,25 +50,25 @@ #define SIOCGETSGCNT _IOWR('r', 16, struct sioc_sg_req) /* get s,g pkt cnt */ #define SIOCSIFADDR _IOW('i', 12, struct ifreq) /* set ifnet address */ -#define OSIOCGIFADDR _IOWR('i', 13, struct ifreq) /* get ifnet address */ +/* OSIOCGIFADDR _IOWR('i', 13, struct ifreq) 4.3BSD */ #define SIOCGIFADDR _IOWR('i', 33, struct ifreq) /* get ifnet address */ #define SIOCSIFDSTADDR _IOW('i', 14, struct ifreq) /* set p-p address */ -#define OSIOCGIFDSTADDR _IOWR('i', 15, struct ifreq) /* get p-p address */ +/* OSIOCGIFDSTADDR _IOWR('i', 15, struct ifreq) 4.3BSD */ #define SIOCGIFDSTADDR _IOWR('i', 34, struct ifreq) /* get p-p address */ #define SIOCSIFFLAGS _IOW('i', 16, struct ifreq) /* set ifnet flags */ #define SIOCGIFFLAGS _IOWR('i', 17, struct ifreq) /* get ifnet flags */ -#define OSIOCGIFBRDADDR _IOWR('i', 18, struct ifreq) /* get broadcast addr */ +/* OSIOCGIFBRDADDR _IOWR('i', 18, struct ifreq) 4.3BSD */ #define SIOCGIFBRDADDR _IOWR('i', 35, struct ifreq) /* get broadcast addr */ #define SIOCSIFBRDADDR _IOW('i', 19, struct ifreq) /* set broadcast addr */ -#define OSIOCGIFCONF _IOWR('i', 20, struct ifconf) /* get ifnet list */ +/* OSIOCGIFCONF _IOWR('i', 20, struct ifconf) 4.3BSD */ #define SIOCGIFCONF _IOWR('i', 36, struct ifconf) /* get ifnet list */ -#define OSIOCGIFNETMASK _IOWR('i', 21, struct ifreq) /* get net addr mask */ +/* OSIOCGIFNETMASK _IOWR('i', 21, struct ifreq) 4.3BSD */ #define SIOCGIFNETMASK _IOWR('i', 37, struct ifreq) /* get net addr mask */ #define SIOCSIFNETMASK _IOW('i', 22, struct ifreq) /* set net addr mask */ #define SIOCGIFMETRIC _IOWR('i', 23, struct ifreq) /* get IF metric */ #define SIOCSIFMETRIC _IOW('i', 24, struct ifreq) /* set IF metric */ #define SIOCDIFADDR _IOW('i', 25, struct ifreq) /* delete IF addr */ -#define OSIOCAIFADDR _IOW('i', 26, struct oifaliasreq)/* add/chg IF alias */ +/* OSIOCAIFADDR _IOW('i', 26, struct oifaliasreq) FreeBSD 9.x */ #define SIOCALIFADDR _IOW('i', 27, struct if_laddrreq) /* add IF addr */ #define SIOCGLIFADDR _IOWR('i', 28, struct if_laddrreq) /* get IF addr */ #define SIOCDLIFADDR _IOW('i', 29, struct if_laddrreq) /* delete IF addr */ From owner-svn-src-head@FreeBSD.ORG Tue Nov 5 12:52:57 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 877AADE9; Tue, 5 Nov 2013 12:52:57 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7385924F2; Tue, 5 Nov 2013 12:52:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA5Cqvc2067941; Tue, 5 Nov 2013 12:52:57 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA5CquWr067935; Tue, 5 Nov 2013 12:52:56 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201311051252.rA5CquWr067935@svn.freebsd.org> From: Gleb Smirnoff Date: Tue, 5 Nov 2013 12:52:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257699 - in head: share/man/man9 sys/compat/linux sys/net usr.sbin/route6d X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Nov 2013 12:52:57 -0000 Author: glebius Date: Tue Nov 5 12:52:56 2013 New Revision: 257699 URL: http://svnweb.freebsd.org/changeset/base/257699 Log: Axe IFF_SMART. Fortunately this layering violating flag was never used, it was just declared. Modified: head/share/man/man9/ifnet.9 head/sys/compat/linux/linux_ioctl.c head/sys/net/if.c head/sys/net/if.h head/usr.sbin/route6d/route6d.c Modified: head/share/man/man9/ifnet.9 ============================================================================== --- head/share/man/man9/ifnet.9 Tue Nov 5 11:19:34 2013 (r257698) +++ head/share/man/man9/ifnet.9 Tue Nov 5 12:52:56 2013 (r257699) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 26, 2013 +.Dd November 5, 2013 .Dt IFNET 9 .Os .Sh NAME @@ -583,14 +583,6 @@ The interface is a loopback device. The interface is point-to-point; .Dq broadcast address is actually the address of the other end. -.It Dv IFF_SMART -.Aq S* -The interface manages its own routes, rather than using the generic -code in -.Fn if_up -and -.Fn if_down . -This is probably useful for serial lines. .It Dv IFF_DRV_RUNNING .Aq D* The interface has been configured and dynamic resources were Modified: head/sys/compat/linux/linux_ioctl.c ============================================================================== --- head/sys/compat/linux/linux_ioctl.c Tue Nov 5 11:19:34 2013 (r257698) +++ head/sys/compat/linux/linux_ioctl.c Tue Nov 5 12:52:56 2013 (r257699) @@ -2287,7 +2287,7 @@ linux_gifflags(struct thread *td, struct flags = (ifp->if_flags | ifp->if_drv_flags) & 0xffff; /* these flags have no Linux equivalent */ - flags &= ~(IFF_SMART|IFF_DRV_OACTIVE|IFF_SIMPLEX| + flags &= ~(IFF_DRV_OACTIVE|IFF_SIMPLEX| IFF_LINK0|IFF_LINK1|IFF_LINK2); /* Linux' multicast flag is in a different bit */ if (flags & IFF_MULTICAST) { Modified: head/sys/net/if.c ============================================================================== --- head/sys/net/if.c Tue Nov 5 11:19:34 2013 (r257698) +++ head/sys/net/if.c Tue Nov 5 12:52:56 2013 (r257699) @@ -2210,9 +2210,7 @@ ifhwioctl(u_long cmd, struct ifnet *ifp, */ new_flags = (ifr->ifr_flags & 0xffff) | (ifr->ifr_flagshigh << 16); - if (ifp->if_flags & IFF_SMART) { - /* Smart drivers twiddle their own routes */ - } else if (ifp->if_flags & IFF_UP && + if (ifp->if_flags & IFF_UP && (new_flags & IFF_UP) == 0) { if_down(ifp); } else if (new_flags & IFF_UP && Modified: head/sys/net/if.h ============================================================================== --- head/sys/net/if.h Tue Nov 5 11:19:34 2013 (r257698) +++ head/sys/net/if.h Tue Nov 5 12:52:56 2013 (r257699) @@ -129,7 +129,7 @@ struct if_data { #define IFF_DEBUG 0x4 /* (n) turn on debugging */ #define IFF_LOOPBACK 0x8 /* (i) is a loopback net */ #define IFF_POINTOPOINT 0x10 /* (i) is a point-to-point link */ -#define IFF_SMART 0x20 /* (i) interface manages own routes */ +/* 0x20 was IFF_SMART */ #define IFF_DRV_RUNNING 0x40 /* (d) resources allocated */ #define IFF_NOARP 0x80 /* (n) no address resolution protocol */ #define IFF_PROMISC 0x100 /* (n) receive all packets */ @@ -159,7 +159,7 @@ struct if_data { /* flags set internally only: */ #define IFF_CANTCHANGE \ (IFF_BROADCAST|IFF_POINTOPOINT|IFF_DRV_RUNNING|IFF_DRV_OACTIVE|\ - IFF_SIMPLEX|IFF_MULTICAST|IFF_ALLMULTI|IFF_SMART|IFF_PROMISC|\ + IFF_SIMPLEX|IFF_MULTICAST|IFF_ALLMULTI|IFF_PROMISC|\ IFF_DYING|IFF_CANTCONFIG) /* Modified: head/usr.sbin/route6d/route6d.c ============================================================================== --- head/usr.sbin/route6d/route6d.c Tue Nov 5 11:19:34 2013 (r257698) +++ head/usr.sbin/route6d/route6d.c Tue Nov 5 12:52:56 2013 (r257699) @@ -2585,9 +2585,6 @@ do { \ #ifdef IFF_NOTRAILERS IFFLAG("NOTRAILERS", IFF_NOTRAILERS); #endif -#ifdef IFF_SMART - IFFLAG("SMART", IFF_SMART); -#endif IFFLAG("RUNNING", IFF_RUNNING); IFFLAG("NOARP", IFF_NOARP); IFFLAG("PROMISC", IFF_PROMISC); From owner-svn-src-head@FreeBSD.ORG Tue Nov 5 13:36:05 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 9D5A6128; Tue, 5 Nov 2013 13:36:05 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8ADAE27F3; Tue, 5 Nov 2013 13:36:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA5Da5C9082081; Tue, 5 Nov 2013 13:36:05 GMT (envelope-from bdrewery@svn.freebsd.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA5Da5Cw082080; Tue, 5 Nov 2013 13:36:05 GMT (envelope-from bdrewery@svn.freebsd.org) Message-Id: <201311051336.rA5Da5Cw082080@svn.freebsd.org> From: Bryan Drewery Date: Tue, 5 Nov 2013 13:36:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257701 - head/usr.sbin/pkg X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Nov 2013 13:36:05 -0000 Author: bdrewery (ports committer) Date: Tue Nov 5 13:36:05 2013 New Revision: 257701 URL: http://svnweb.freebsd.org/changeset/base/257701 Log: Remove condition which can never be true as the previous loop is never exited while remote == NULL. Reported by: Coverity Approved by: bapt MFC after: 2 days Modified: head/usr.sbin/pkg/pkg.c Modified: head/usr.sbin/pkg/pkg.c ============================================================================== --- head/usr.sbin/pkg/pkg.c Tue Nov 5 12:55:28 2013 (r257700) +++ head/usr.sbin/pkg/pkg.c Tue Nov 5 13:36:05 2013 (r257701) @@ -233,9 +233,6 @@ fetch_to_fd(const char *url, char *path) } } - if (remote == NULL) - goto fetchfail; - while (done < st.size) { if ((r = fread(buf, 1, sizeof(buf), remote)) < 1) break; From owner-svn-src-head@FreeBSD.ORG Tue Nov 5 13:48:36 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D90F7482; Tue, 5 Nov 2013 13:48:36 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C454328A9; Tue, 5 Nov 2013 13:48:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA5DmaBH085541; Tue, 5 Nov 2013 13:48:36 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA5DmYN9085528; Tue, 5 Nov 2013 13:48:34 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201311051348.rA5DmYN9085528@svn.freebsd.org> From: Nathan Whitehorn Date: Tue, 5 Nov 2013 13:48:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257702 - in head/sys: arm/arm arm/broadcom/bcm2835 arm/freescale/imx arm/mv conf dev/fdt mips/mips powerpc/mpc85xx X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Nov 2013 13:48:36 -0000 Author: nwhitehorn Date: Tue Nov 5 13:48:34 2013 New Revision: 257702 URL: http://svnweb.freebsd.org/changeset/base/257702 Log: Teach nexus(4) about Open Firmware (e.g. FDT) on ARM and MIPS, retiring fdtbus in most cases. This brings ARM and MIPS more in line with existing Open Firmware platforms like sparc64 and powerpc, as well as preventing double-enumeration of the OF tree on embedded PowerPC (first through nexus, then through fdtbus). This change is also designed to simplify resource management on FDT platforms by letting there exist a platform-defined root bus resource_activate() call instead of replying on fdtbus to do the right thing through fdt_bs_tag. The OFW_BUS_MAP_INTR() and OFW_BUS_CONFIG_INTR() kobj methods are also available to implement for similar purposes. Discussed on: -arm, -mips Tested by: zbb, brooks, imp, and others MFC after: 6 weeks Modified: head/sys/arm/arm/nexus.c head/sys/arm/broadcom/bcm2835/bcm2835_fb.c head/sys/arm/freescale/imx/tzic.c head/sys/arm/mv/mv_localbus.c head/sys/arm/mv/mv_pci.c head/sys/conf/files head/sys/dev/fdt/simplebus.c head/sys/mips/mips/nexus.c head/sys/powerpc/mpc85xx/lbc.c head/sys/powerpc/mpc85xx/pci_mpc85xx.c Modified: head/sys/arm/arm/nexus.c ============================================================================== --- head/sys/arm/arm/nexus.c Tue Nov 5 13:36:05 2013 (r257701) +++ head/sys/arm/arm/nexus.c Tue Nov 5 13:48:34 2013 (r257702) @@ -60,6 +60,12 @@ __FBSDID("$FreeBSD$"); #include #include +#include "opt_platform.h" + +#ifdef FDT +#include +#include +#else static MALLOC_DEFINE(M_NEXUSDEV, "nexusdev", "Nexus device"); struct nexus_device { @@ -76,13 +82,18 @@ static int nexus_print_child(device_t, d static device_t nexus_add_child(device_t, u_int, const char *, int); static struct resource *nexus_alloc_resource(device_t, device_t, int, int *, u_long, u_long, u_long, u_int); +#endif static int nexus_activate_resource(device_t, device_t, int, int, struct resource *); +static int nexus_deactivate_resource(device_t, device_t, int, int, + struct resource *); + static int nexus_setup_intr(device_t dev, device_t child, struct resource *res, int flags, driver_filter_t *filt, driver_intr_t *intr, void *arg, void **cookiep); static int nexus_teardown_intr(device_t, device_t, struct resource *, void *); static device_method_t nexus_methods[] = { +#ifndef FDT /* Device interface */ DEVMETHOD(device_probe, nexus_probe), DEVMETHOD(device_attach, nexus_attach), @@ -90,19 +101,28 @@ static device_method_t nexus_methods[] = DEVMETHOD(bus_print_child, nexus_print_child), DEVMETHOD(bus_add_child, nexus_add_child), DEVMETHOD(bus_alloc_resource, nexus_alloc_resource), +#endif DEVMETHOD(bus_activate_resource, nexus_activate_resource), + DEVMETHOD(bus_deactivate_resource, nexus_deactivate_resource), DEVMETHOD(bus_setup_intr, nexus_setup_intr), DEVMETHOD(bus_teardown_intr, nexus_teardown_intr), { 0, 0 } }; +static devclass_t nexus_devclass; +#ifndef FDT static driver_t nexus_driver = { "nexus", nexus_methods, 1 /* no softc */ }; -static devclass_t nexus_devclass; +#else +DEFINE_CLASS_1(nexus, nexus_driver, nexus_methods, + sizeof(struct ofw_nexus_softc), ofw_nexus_driver); +#endif +DRIVER_MODULE(nexus, root, nexus_driver, nexus_devclass, 0, 0); +#ifndef FDT static int nexus_probe(device_t dev) { @@ -113,30 +133,6 @@ nexus_probe(device_t dev) } static int -nexus_setup_intr(device_t dev, device_t child, struct resource *res, int flags, - driver_filter_t *filt, driver_intr_t *intr, void *arg, void **cookiep) -{ - int irq; - - if ((rman_get_flags(res) & RF_SHAREABLE) == 0) - flags |= INTR_EXCL; - - for (irq = rman_get_start(res); irq <= rman_get_end(res); irq++) { - arm_setup_irqhandler(device_get_nameunit(child), - filt, intr, arg, irq, flags, cookiep); - arm_unmask_irq(irq); - } - return (0); -} - -static int -nexus_teardown_intr(device_t dev, device_t child, struct resource *r, void *ih) -{ - - return (arm_remove_irqhandler(rman_get_start(r), ih)); -} - -static int nexus_attach(device_t dev) { @@ -156,7 +152,6 @@ nexus_attach(device_t dev) return (0); } - static int nexus_print_child(device_t bus, device_t child) { @@ -193,7 +188,6 @@ nexus_add_child(device_t bus, u_int orde * child of one of our descendants, not a direct child of nexus0. * (Exceptions include footbridge.) */ -#define ARM_BUS_SPACE_MEM 1 static struct resource * nexus_alloc_resource(device_t bus, device_t child, int type, int *rid, u_long start, u_long end, u_long count, u_int flags) @@ -204,6 +198,7 @@ nexus_alloc_resource(device_t bus, devic switch (type) { case SYS_RES_MEMORY: + case SYS_RES_IOPORT: rm = &mem_rman; break; @@ -216,7 +211,6 @@ nexus_alloc_resource(device_t bus, devic return (0); rman_set_rid(rv, *rid); - rman_set_bustag(rv, (void*)ARM_BUS_SPACE_MEM); rman_set_bushandle(rv, rman_get_start(rv)); if (needactivate) { @@ -228,6 +222,31 @@ nexus_alloc_resource(device_t bus, devic return (rv); } +#endif + +static int +nexus_setup_intr(device_t dev, device_t child, struct resource *res, int flags, + driver_filter_t *filt, driver_intr_t *intr, void *arg, void **cookiep) +{ + int irq; + + if ((rman_get_flags(res) & RF_SHAREABLE) == 0) + flags |= INTR_EXCL; + + for (irq = rman_get_start(res); irq <= rman_get_end(res); irq++) { + arm_setup_irqhandler(device_get_nameunit(child), + filt, intr, arg, irq, flags, cookiep); + arm_unmask_irq(irq); + } + return (0); +} + +static int +nexus_teardown_intr(device_t dev, device_t child, struct resource *r, void *ih) +{ + + return (arm_remove_irqhandler(rman_get_start(r), ih)); +} static int @@ -237,7 +256,7 @@ nexus_activate_resource(device_t bus, de /* * If this is a memory resource, map it into the kernel. */ - if (rman_get_bustag(r) == (void*)ARM_BUS_SPACE_MEM) { + if (type == SYS_RES_MEMORY || type == SYS_RES_IOPORT) { caddr_t vaddr = 0; u_int32_t paddr; u_int32_t psize; @@ -248,9 +267,21 @@ nexus_activate_resource(device_t bus, de poffs = paddr - trunc_page(paddr); vaddr = (caddr_t) pmap_mapdev(paddr-poffs, psize+poffs) + poffs; rman_set_virtual(r, vaddr); +#ifdef FDT + rman_set_bustag(r, fdtbus_bs_tag); +#else + rman_set_bustag(r, (void *)1); +#endif rman_set_bushandle(r, (bus_space_handle_t) vaddr); } return (rman_activate_resource(r)); } -DRIVER_MODULE(nexus, root, nexus_driver, nexus_devclass, 0, 0); +static int +nexus_deactivate_resource(device_t bus, device_t child, int type, int rid, + struct resource *res) +{ + + return (rman_deactivate_resource(res)); +} + Modified: head/sys/arm/broadcom/bcm2835/bcm2835_fb.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_fb.c Tue Nov 5 13:36:05 2013 (r257701) +++ head/sys/arm/broadcom/bcm2835/bcm2835_fb.c Tue Nov 5 13:48:34 2013 (r257702) @@ -361,7 +361,7 @@ static driver_t bcm_fb_driver = { sizeof(struct bcmsc_softc), }; -DRIVER_MODULE(bcm2835fb, fdtbus, bcm_fb_driver, bcm_fb_devclass, 0, 0); +DRIVER_MODULE(bcm2835fb, nexus, bcm_fb_driver, bcm_fb_devclass, 0, 0); /* * Video driver routines and glue. Modified: head/sys/arm/freescale/imx/tzic.c ============================================================================== --- head/sys/arm/freescale/imx/tzic.c Tue Nov 5 13:36:05 2013 (r257701) +++ head/sys/arm/freescale/imx/tzic.c Tue Nov 5 13:48:34 2013 (r257702) @@ -142,9 +142,9 @@ static devclass_t tzic_devclass; /* * Memory space of controller located outside of device range, so let him to - * attach not only to simplebus, but fdtbus also. + * attach not only to simplebus, but nexus also. */ -EARLY_DRIVER_MODULE(tzic, fdtbus, tzic_driver, tzic_devclass, 0, 0, +EARLY_DRIVER_MODULE(tzic, nexus, tzic_driver, tzic_devclass, 0, 0, BUS_PASS_INTERRUPT); EARLY_DRIVER_MODULE(tzic, simplebus, tzic_driver, tzic_devclass, 0, 0, BUS_PASS_INTERRUPT); Modified: head/sys/arm/mv/mv_localbus.c ============================================================================== --- head/sys/arm/mv/mv_localbus.c Tue Nov 5 13:36:05 2013 (r257701) +++ head/sys/arm/mv/mv_localbus.c Tue Nov 5 13:48:34 2013 (r257702) @@ -156,7 +156,7 @@ static struct localbus_bank localbus_ban devclass_t localbus_devclass; -DRIVER_MODULE(localbus, fdtbus, localbus_driver, localbus_devclass, 0, 0); +DRIVER_MODULE(localbus, nexus, localbus_driver, localbus_devclass, 0, 0); static int fdt_localbus_reg_decode(phandle_t node, struct localbus_softc *sc, Modified: head/sys/arm/mv/mv_pci.c ============================================================================== --- head/sys/arm/mv/mv_pci.c Tue Nov 5 13:36:05 2013 (r257701) +++ head/sys/arm/mv/mv_pci.c Tue Nov 5 13:48:34 2013 (r257702) @@ -230,7 +230,7 @@ static driver_t mv_pcib_driver = { devclass_t pcib_devclass; -DRIVER_MODULE(pcib, fdtbus, mv_pcib_driver, pcib_devclass, 0, 0); +DRIVER_MODULE(pcib, nexus, mv_pcib_driver, pcib_devclass, 0, 0); static struct mtx pcicfg_mtx; Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Tue Nov 5 13:36:05 2013 (r257701) +++ head/sys/conf/files Tue Nov 5 13:48:34 2013 (r257702) @@ -1401,7 +1401,7 @@ dev/fdt/fdt_pci.c optional fdt pci dev/fdt/fdt_slicer.c optional fdt cfi | fdt nand dev/fdt/fdt_static_dtb.S optional fdt fdt_dtb_static \ dependency "$S/boot/fdt/dts/${FDT_DTS_FILE}" -dev/fdt/fdtbus.c optional fdt +dev/fdt/fdtbus.c optional fdtbus dev/fdt/simplebus.c optional fdt dev/fe/if_fe.c optional fe dev/fe/if_fe_pccard.c optional fe pccard Modified: head/sys/dev/fdt/simplebus.c ============================================================================== --- head/sys/dev/fdt/simplebus.c Tue Nov 5 13:36:05 2013 (r257701) +++ head/sys/dev/fdt/simplebus.c Tue Nov 5 13:48:34 2013 (r257702) @@ -138,7 +138,7 @@ static driver_t simplebus_driver = { devclass_t simplebus_devclass; -DRIVER_MODULE(simplebus, fdtbus, simplebus_driver, simplebus_devclass, 0, 0); +DRIVER_MODULE(simplebus, nexus, simplebus_driver, simplebus_devclass, 0, 0); DRIVER_MODULE(simplebus, simplebus, simplebus_driver, simplebus_devclass, 0, 0); Modified: head/sys/mips/mips/nexus.c ============================================================================== --- head/sys/mips/mips/nexus.c Tue Nov 5 13:36:05 2013 (r257701) +++ head/sys/mips/mips/nexus.c Tue Nov 5 13:48:34 2013 (r257702) @@ -58,6 +58,12 @@ __FBSDID("$FreeBSD$"); #include #include +#include "opt_platform.h" + +#ifdef FDT +#include +#endif + #undef NEXUS_DEBUG #ifdef NEXUS_DEBUG #define dprintf printf @@ -65,6 +71,9 @@ __FBSDID("$FreeBSD$"); #define dprintf(x, arg...) #endif /* NEXUS_DEBUG */ +#define NUM_MIPS_IRQS 6 + +#ifndef FDT static MALLOC_DEFINE(M_NEXUSDEV, "nexusdev", "Nexus device"); struct nexus_device { @@ -72,7 +81,6 @@ struct nexus_device { }; #define DEVTONX(dev) ((struct nexus_device *)device_get_ivars(dev)) -#define NUM_MIPS_IRQS 6 static struct rman irq_rman; static struct rman mem_rman; @@ -80,18 +88,13 @@ static struct rman mem_rman; static struct resource * nexus_alloc_resource(device_t, device_t, int, int *, u_long, u_long, u_long, u_int); -static int nexus_activate_resource(device_t, device_t, int, int, - struct resource *); static device_t nexus_add_child(device_t, u_int, const char *, int); static int nexus_attach(device_t); -static int nexus_deactivate_resource(device_t, device_t, int, int, - struct resource *); static void nexus_delete_resource(device_t, device_t, int, int); static struct resource_list * nexus_get_reslist(device_t, device_t); static int nexus_get_resource(device_t, device_t, int, int, u_long *, u_long *); -static void nexus_hinted_child(device_t, const char *, int); static int nexus_print_child(device_t, device_t); static int nexus_print_all_resources(device_t dev); static int nexus_probe(device_t); @@ -99,6 +102,12 @@ static int nexus_release_resource(device struct resource *); static int nexus_set_resource(device_t, device_t, int, int, u_long, u_long); +#endif +static int nexus_activate_resource(device_t, device_t, int, int, + struct resource *); +static int nexus_deactivate_resource(device_t, device_t, int, int, + struct resource *); +static void nexus_hinted_child(device_t, const char *, int); static int nexus_setup_intr(device_t dev, device_t child, struct resource *res, int flags, driver_filter_t *filt, driver_intr_t *intr, void *arg, void **cookiep); @@ -106,35 +115,43 @@ static int nexus_teardown_intr(device_t, void *); static device_method_t nexus_methods[] = { +#ifndef FDT /* Device interface */ DEVMETHOD(device_probe, nexus_probe), DEVMETHOD(device_attach, nexus_attach), /* Bus interface */ DEVMETHOD(bus_add_child, nexus_add_child), - DEVMETHOD(bus_activate_resource,nexus_activate_resource), DEVMETHOD(bus_alloc_resource, nexus_alloc_resource), - DEVMETHOD(bus_deactivate_resource, nexus_deactivate_resource), DEVMETHOD(bus_delete_resource, nexus_delete_resource), DEVMETHOD(bus_get_resource, nexus_get_resource), DEVMETHOD(bus_get_resource_list, nexus_get_reslist), - DEVMETHOD(bus_hinted_child, nexus_hinted_child), DEVMETHOD(bus_print_child, nexus_print_child), DEVMETHOD(bus_release_resource, nexus_release_resource), DEVMETHOD(bus_set_resource, nexus_set_resource), +#endif DEVMETHOD(bus_setup_intr, nexus_setup_intr), DEVMETHOD(bus_teardown_intr, nexus_teardown_intr), + DEVMETHOD(bus_activate_resource,nexus_activate_resource), + DEVMETHOD(bus_deactivate_resource, nexus_deactivate_resource), + DEVMETHOD(bus_hinted_child, nexus_hinted_child), { 0, 0 } }; +#ifndef FDT static driver_t nexus_driver = { "nexus", nexus_methods, 1 /* no softc */ }; +#else +DEFINE_CLASS_1(nexus, nexus_driver, nexus_methods, + sizeof(struct ofw_nexus_softc), ofw_nexus_driver); +#endif static devclass_t nexus_devclass; +#ifndef FDT static int nexus_probe(device_t dev) { @@ -163,34 +180,6 @@ nexus_probe(device_t dev) } static int -nexus_setup_intr(device_t dev, device_t child, struct resource *res, int flags, - driver_filter_t *filt, driver_intr_t *intr, void *arg, void **cookiep) -{ - register_t s; - int irq; - - s = intr_disable(); - irq = rman_get_start(res); - if (irq >= NUM_MIPS_IRQS) { - intr_restore(s); - return (0); - } - - cpu_establish_hardintr(device_get_nameunit(child), filt, intr, arg, - irq, flags, cookiep); - intr_restore(s); - return (0); -} - -static int -nexus_teardown_intr(device_t dev, device_t child, struct resource *r, void *ih) -{ - - printf("Unimplemented %s at %s:%d\n", __func__, __FILE__, __LINE__); - return (0); -} - -static int nexus_attach(device_t dev) { @@ -231,59 +220,6 @@ nexus_print_all_resources(device_t dev) return (retval); } -static void -nexus_hinted_child(device_t bus, const char *dname, int dunit) -{ - device_t child; - long maddr; - int msize; - int order; - int result; - int irq; - int mem_hints_count; - - if ((resource_int_value(dname, dunit, "order", &order)) != 0) - order = 1000; - child = BUS_ADD_CHILD(bus, order, dname, dunit); - if (child == NULL) - return; - - /* - * Set hard-wired resources for hinted child using - * specific RIDs. - */ - mem_hints_count = 0; - if (resource_long_value(dname, dunit, "maddr", &maddr) == 0) - mem_hints_count++; - if (resource_int_value(dname, dunit, "msize", &msize) == 0) - mem_hints_count++; - - /* check if all info for mem resource has been provided */ - if ((mem_hints_count > 0) && (mem_hints_count < 2)) { - printf("Either maddr or msize hint is missing for %s%d\n", - dname, dunit); - } - else if (mem_hints_count) { - dprintf("%s: discovered hinted child %s at maddr %p(%d)\n", - __func__, device_get_nameunit(child), - (void *)(intptr_t)maddr, msize); - - result = bus_set_resource(child, SYS_RES_MEMORY, 0, maddr, - msize); - if (result != 0) { - device_printf(bus, - "warning: bus_set_resource() failed\n"); - } - } - - if (resource_int_value(dname, dunit, "irq", &irq) == 0) { - result = bus_set_resource(child, SYS_RES_IRQ, 0, irq, 1); - if (result != 0) - device_printf(bus, - "warning: bus_set_resource() failed\n"); - } -} - static device_t nexus_add_child(device_t bus, u_int order, const char *name, int unit) { @@ -381,30 +317,6 @@ nexus_alloc_resource(device_t bus, devic return (rv); } -static int -nexus_activate_resource(device_t bus, device_t child, int type, int rid, - struct resource *r) -{ - void *vaddr; - vm_paddr_t paddr; - vm_size_t psize; - - /* - * If this is a memory resource, use pmap_mapdev to map it. - */ - if (type == SYS_RES_MEMORY) { - paddr = rman_get_start(r); - psize = rman_get_size(r); - vaddr = pmap_mapdev(paddr, psize); - - rman_set_virtual(r, vaddr); - rman_set_bustag(r, mips_bus_space_generic); - rman_set_bushandle(r, (bus_space_handle_t)(uintptr_t)vaddr); - } - - return (rman_activate_resource(r)); -} - static struct resource_list * nexus_get_reslist(device_t dev, device_t child) { @@ -475,6 +387,31 @@ nexus_release_resource(device_t bus, dev return (rman_release_resource(r)); } +#endif + +static int +nexus_activate_resource(device_t bus, device_t child, int type, int rid, + struct resource *r) +{ + void *vaddr; + vm_paddr_t paddr; + vm_size_t psize; + + /* + * If this is a memory resource, use pmap_mapdev to map it. + */ + if (type == SYS_RES_MEMORY || type == SYS_RES_IOPORT) { + paddr = rman_get_start(r); + psize = rman_get_size(r); + vaddr = pmap_mapdev(paddr, psize); + + rman_set_virtual(r, vaddr); + rman_set_bustag(r, mips_bus_space_generic); + rman_set_bushandle(r, (bus_space_handle_t)(uintptr_t)vaddr); + } + + return (rman_activate_resource(r)); +} static int nexus_deactivate_resource(device_t bus, device_t child, int type, int rid, @@ -490,4 +427,85 @@ nexus_deactivate_resource(device_t bus, return (rman_deactivate_resource(r)); } +static int +nexus_setup_intr(device_t dev, device_t child, struct resource *res, int flags, + driver_filter_t *filt, driver_intr_t *intr, void *arg, void **cookiep) +{ + register_t s; + int irq; + + s = intr_disable(); + irq = rman_get_start(res); + if (irq >= NUM_MIPS_IRQS) { + intr_restore(s); + return (0); + } + + cpu_establish_hardintr(device_get_nameunit(child), filt, intr, arg, + irq, flags, cookiep); + intr_restore(s); + return (0); +} + +static int +nexus_teardown_intr(device_t dev, device_t child, struct resource *r, void *ih) +{ + + printf("Unimplemented %s at %s:%d\n", __func__, __FILE__, __LINE__); + return (0); +} + +static void +nexus_hinted_child(device_t bus, const char *dname, int dunit) +{ + device_t child; + long maddr; + int msize; + int order; + int result; + int irq; + int mem_hints_count; + + if ((resource_int_value(dname, dunit, "order", &order)) != 0) + order = 1000; + child = BUS_ADD_CHILD(bus, order, dname, dunit); + if (child == NULL) + return; + + /* + * Set hard-wired resources for hinted child using + * specific RIDs. + */ + mem_hints_count = 0; + if (resource_long_value(dname, dunit, "maddr", &maddr) == 0) + mem_hints_count++; + if (resource_int_value(dname, dunit, "msize", &msize) == 0) + mem_hints_count++; + + /* check if all info for mem resource has been provided */ + if ((mem_hints_count > 0) && (mem_hints_count < 2)) { + printf("Either maddr or msize hint is missing for %s%d\n", + dname, dunit); + } + else if (mem_hints_count) { + dprintf("%s: discovered hinted child %s at maddr %p(%d)\n", + __func__, device_get_nameunit(child), + (void *)(intptr_t)maddr, msize); + + result = bus_set_resource(child, SYS_RES_MEMORY, 0, maddr, + msize); + if (result != 0) { + device_printf(bus, + "warning: bus_set_resource() failed\n"); + } + } + + if (resource_int_value(dname, dunit, "irq", &irq) == 0) { + result = bus_set_resource(child, SYS_RES_IRQ, 0, irq, 1); + if (result != 0) + device_printf(bus, + "warning: bus_set_resource() failed\n"); + } +} + DRIVER_MODULE(nexus, root, nexus_driver, nexus_devclass, 0, 0); Modified: head/sys/powerpc/mpc85xx/lbc.c ============================================================================== --- head/sys/powerpc/mpc85xx/lbc.c Tue Nov 5 13:36:05 2013 (r257701) +++ head/sys/powerpc/mpc85xx/lbc.c Tue Nov 5 13:48:34 2013 (r257702) @@ -113,7 +113,7 @@ static driver_t lbc_driver = { devclass_t lbc_devclass; -DRIVER_MODULE(lbc, fdtbus, lbc_driver, lbc_devclass, 0, 0); +DRIVER_MODULE(lbc, nexus, lbc_driver, lbc_devclass, 0, 0); /* * Calculate address mask used by OR(n) registers. Use memory region size to Modified: head/sys/powerpc/mpc85xx/pci_mpc85xx.c ============================================================================== --- head/sys/powerpc/mpc85xx/pci_mpc85xx.c Tue Nov 5 13:36:05 2013 (r257701) +++ head/sys/powerpc/mpc85xx/pci_mpc85xx.c Tue Nov 5 13:48:34 2013 (r257702) @@ -170,7 +170,7 @@ static devclass_t fsl_pcib_devclass; DEFINE_CLASS_1(pcib, fsl_pcib_driver, fsl_pcib_methods, sizeof(struct fsl_pcib_softc), ofw_pci_driver); -DRIVER_MODULE(pcib, fdtbus, fsl_pcib_driver, fsl_pcib_devclass, 0, 0); +DRIVER_MODULE(pcib, nexus, fsl_pcib_driver, fsl_pcib_devclass, 0, 0); static int fsl_pcib_probe(device_t dev) From owner-svn-src-head@FreeBSD.ORG Tue Nov 5 14:07:31 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 47BE1D56; Tue, 5 Nov 2013 14:07:31 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3543B2A12; Tue, 5 Nov 2013 14:07:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA5E7VX9092230; Tue, 5 Nov 2013 14:07:31 GMT (envelope-from theraven@svn.freebsd.org) Received: (from theraven@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA5E7Vmh092229; Tue, 5 Nov 2013 14:07:31 GMT (envelope-from theraven@svn.freebsd.org) Message-Id: <201311051407.rA5E7Vmh092229@svn.freebsd.org> From: David Chisnall Date: Tue, 5 Nov 2013 14:07:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257703 - head/usr.bin/dtc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Nov 2013 14:07:31 -0000 Author: theraven Date: Tue Nov 5 14:07:30 2013 New Revision: 257703 URL: http://svnweb.freebsd.org/changeset/base/257703 Log: When writing DTS to a file, don't write some of it to stderr. Reported by: ray Modified: head/usr.bin/dtc/fdt.cc Modified: head/usr.bin/dtc/fdt.cc ============================================================================== --- head/usr.bin/dtc/fdt.cc Tue Nov 5 13:48:34 2013 (r257702) +++ head/usr.bin/dtc/fdt.cc Tue Nov 5 14:07:30 2013 (r257703) @@ -1190,7 +1190,7 @@ device_tree::write_dts(int fd) for (std::vector::iterator i=reservations.begin(), e=reservations.end() ; i!=e ; ++i) { - fprintf(stderr, " %" PRIx64 " %" PRIx64, i->first, i->second); + fprintf(file, " %" PRIx64 " %" PRIx64, i->first, i->second); } fputs(";\n\n", file); } From owner-svn-src-head@FreeBSD.ORG Tue Nov 5 14:11:31 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id EF6CE75; Tue, 5 Nov 2013 14:11:31 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DD0252A8E; Tue, 5 Nov 2013 14:11:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA5EBV51094969; Tue, 5 Nov 2013 14:11:31 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA5EBVcF094968; Tue, 5 Nov 2013 14:11:31 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201311051411.rA5EBVcF094968@svn.freebsd.org> From: Gleb Smirnoff Date: Tue, 5 Nov 2013 14:11:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257704 - head/sbin/ifconfig X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Nov 2013 14:11:32 -0000 Author: glebius Date: Tue Nov 5 14:11:31 2013 New Revision: 257704 URL: http://svnweb.freebsd.org/changeset/base/257704 Log: Axe IFF_SMART. Submitted by: pluknet Modified: head/sbin/ifconfig/ifconfig.c Modified: head/sbin/ifconfig/ifconfig.c ============================================================================== --- head/sbin/ifconfig/ifconfig.c Tue Nov 5 14:07:30 2013 (r257703) +++ head/sbin/ifconfig/ifconfig.c Tue Nov 5 14:11:31 2013 (r257704) @@ -909,7 +909,7 @@ unsetifdescr(const char *val, int value, } #define IFFBITS \ -"\020\1UP\2BROADCAST\3DEBUG\4LOOPBACK\5POINTOPOINT\6SMART\7RUNNING" \ +"\020\1UP\2BROADCAST\3DEBUG\4LOOPBACK\5POINTOPOINT\7RUNNING" \ "\10NOARP\11PROMISC\12ALLMULTI\13OACTIVE\14SIMPLEX\15LINK0\16LINK1\17LINK2" \ "\20MULTICAST\22PPROMISC\23MONITOR\24STATICARP" From owner-svn-src-head@FreeBSD.ORG Tue Nov 5 14:20:40 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 7E3E4422; Tue, 5 Nov 2013 14:20:40 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 691392B10; Tue, 5 Nov 2013 14:20:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA5EKeK5098105; Tue, 5 Nov 2013 14:20:40 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA5EKe7M098104; Tue, 5 Nov 2013 14:20:40 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201311051420.rA5EKe7M098104@svn.freebsd.org> From: Sergey Kandaurov Date: Tue, 5 Nov 2013 14:20:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257705 - head/tools/tools/syscall_timing X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Nov 2013 14:20:40 -0000 Author: pluknet Date: Tue Nov 5 14:20:39 2013 New Revision: 257705 URL: http://svnweb.freebsd.org/changeset/base/257705 Log: Clean up -Wtautological-compare -Wformat warnings. Modified: head/tools/tools/syscall_timing/syscall_timing.c Modified: head/tools/tools/syscall_timing/syscall_timing.c ============================================================================== --- head/tools/tools/syscall_timing/syscall_timing.c Tue Nov 5 14:11:31 2013 (r257704) +++ head/tools/tools/syscall_timing/syscall_timing.c Tue Nov 5 14:20:39 2013 (r257705) @@ -192,7 +192,8 @@ test_pipe(uintmax_t num, uintmax_t int_a uintmax_t test_socket_stream(uintmax_t num, uintmax_t int_arg, const char *path) { - uintmax_t i, so; + uintmax_t i; + int so; so = socket(int_arg, SOCK_STREAM, 0); if (so < 0) @@ -214,7 +215,8 @@ test_socket_stream(uintmax_t num, uintma uintmax_t test_socket_dgram(uintmax_t num, uintmax_t int_arg, const char *path) { - uintmax_t i, so; + uintmax_t i; + int so; so = socket(int_arg, SOCK_DGRAM, 0); if (so < 0) @@ -408,7 +410,8 @@ test_dup(uintmax_t num, uintmax_t int_ar uintmax_t test_shmfd(uintmax_t num, uintmax_t int_arg, const char *path) { - uintmax_t i, shmfd; + uintmax_t i; + int shmfd; shmfd = shm_open(SHM_ANON, O_CREAT | O_RDWR, 0600); if (shmfd < 0) @@ -431,7 +434,8 @@ uintmax_t test_fstat_shmfd(uintmax_t num, uintmax_t int_arg, const char *path) { struct stat sb; - uintmax_t i, shmfd; + uintmax_t i; + int shmfd; shmfd = shm_open(SHM_ANON, O_CREAT | O_RDWR, 0600); if (shmfd < 0) @@ -785,7 +789,7 @@ main(int argc, char *argv[]) path); timespecsub(&ts_end, &ts_start); printf("%s\t%d\t", the_test->t_name, k); - printf("%ju.%09ju\t%d\t", (uintmax_t)ts_end.tv_sec, + printf("%ju.%09ju\t%ju\t", (uintmax_t)ts_end.tv_sec, (uintmax_t)ts_end.tv_nsec, calls); /* From owner-svn-src-head@FreeBSD.ORG Tue Nov 5 14:34:37 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 71760D00; Tue, 5 Nov 2013 14:34:37 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mho-01-ewr.mailhop.org (mho-03-ewr.mailhop.org [204.13.248.66]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 48EDE2C04; Tue, 5 Nov 2013 14:34:36 +0000 (UTC) Received: from c-24-8-230-52.hsd1.co.comcast.net ([24.8.230.52] helo=damnhippie.dyndns.org) by mho-01-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1VdhiA-000D3U-FH; Tue, 05 Nov 2013 14:34:30 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by damnhippie.dyndns.org (8.14.3/8.14.3) with ESMTP id rA5EYQfd062002; Tue, 5 Nov 2013 07:34:26 -0700 (MST) (envelope-from ian@FreeBSD.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 24.8.230.52 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX1+xztsZ5qqAuePa4of/kB3x Subject: Re: r257637 From: Ian Lepore To: Gleb Smirnoff In-Reply-To: <20131105065806.GG1467@FreeBSD.org> References: <20131105065806.GG1467@FreeBSD.org> Content-Type: text/plain; charset="us-ascii" Date: Tue, 05 Nov 2013 07:34:26 -0700 Message-ID: <1383662066.31172.156.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Nov 2013 14:34:37 -0000 On Tue, 2013-11-05 at 10:58 +0400, Gleb Smirnoff wrote: > Ian, > > the r257637 breaks kernel builds. Assuming you have empty /usr/obj, > if you run 'make KERNCONF=LINT buildkernel', it will quickly fail > due to absence of aicasm. > I think you may need to run "make kernel-toolchain". The aicasm tool used to be built as part of the kernel, now it's part of the toolchain. -- Ian From owner-svn-src-head@FreeBSD.ORG Tue Nov 5 14:35:54 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 6867ED77; Tue, 5 Nov 2013 14:35:54 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DD0CB2C1B; Tue, 5 Nov 2013 14:35:53 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.7/8.14.7) with ESMTP id rA5EZpvT008701 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 5 Nov 2013 18:35:51 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.7/8.14.7/Submit) id rA5EZpER008700; Tue, 5 Nov 2013 18:35:51 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Tue, 5 Nov 2013 18:35:51 +0400 From: Gleb Smirnoff To: Ian Lepore Subject: Re: r257637 Message-ID: <20131105143550.GB7577@glebius.int.ru> References: <20131105065806.GG1467@FreeBSD.org> <1383662066.31172.156.camel@revolution.hippie.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1383662066.31172.156.camel@revolution.hippie.lan> User-Agent: Mutt/1.5.22 (2013-10-16) Cc: svn-src-head@FreeBSD.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Nov 2013 14:35:54 -0000 On Tue, Nov 05, 2013 at 07:34:26AM -0700, Ian Lepore wrote: I> > the r257637 breaks kernel builds. Assuming you have empty /usr/obj, I> > if you run 'make KERNCONF=LINT buildkernel', it will quickly fail I> > due to absence of aicasm. I> > I> I> I think you may need to run "make kernel-toolchain". The aicasm tool I> used to be built as part of the kernel, now it's part of the toolchain. I already replied in similar thread in current@, that requiring to have toolchain for not a cross build isn't acceptable. -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Tue Nov 5 15:43:35 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D49E095; Tue, 5 Nov 2013 15:43:35 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.59.238]) by mx1.freebsd.org (Postfix) with ESMTP id 9602D20EE; Tue, 5 Nov 2013 15:43:31 +0000 (UTC) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id A6D567300A; Tue, 5 Nov 2013 16:45:19 +0100 (CET) Date: Tue, 5 Nov 2013 16:45:19 +0100 From: Luigi Rizzo To: Dimitry Andric Subject: Re: svn commit: r257691 - head/gnu/lib/libgcc Message-ID: <20131105154519.GD65141@onelab2.iet.unipi.it> References: <201311050737.rA57bZkq059529@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201311050737.rA57bZkq059529@svn.freebsd.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Nov 2013 15:43:35 -0000 On Tue, Nov 05, 2013 at 07:37:35AM +0000, Dimitry Andric wrote: > Author: dim > Date: Tue Nov 5 07:37:35 2013 > New Revision: 257691 > URL: http://svnweb.freebsd.org/changeset/base/257691 > > Log: > Fix libgcc build with gcc after r257645, by using -Wno-static-in-inline > for clang only. thanks. I wonder if it is worthwhile adding to the default rules some compiler-specific CFLAGS, say CFLAGS_CLANG and CFLAGS_GCC (there is only a handful of cases now so maybe it is overkill, and it harms readability; on the other hand, the Makefiles already make a lot of assumptions on variable names) % find ../head -name Makefile -exec grep -H COMPILER_TYPE \{\} \; ../head/gnu/lib/libgcc/Makefile:.if ${COMPILER_TYPE} != "clang" || ${TARGET_CPUARCH} != "arm" ../head/gnu/lib/libgcc/Makefile:.if ${COMPILER_TYPE} == "clang" ../head/gnu/lib/libsupc++/Makefile:.if ${COMPILER_TYPE} == "clang" ../head/gnu/lib/libstdc++/Makefile:.if ${COMPILER_TYPE} == "clang" ../head/tools/tools/ath/athstats/Makefile:.if (${COMPILER_TYPE} == "clang") ../head/tools/tools/net80211/wlanstats/Makefile:.if ${COMPILER_TYPE} == "clang" cheers luigi > Modified: > head/gnu/lib/libgcc/Makefile > > Modified: head/gnu/lib/libgcc/Makefile > ============================================================================== > --- head/gnu/lib/libgcc/Makefile Tue Nov 5 07:36:17 2013 (r257690) > +++ head/gnu/lib/libgcc/Makefile Tue Nov 5 07:37:35 2013 (r257691) > @@ -36,7 +36,9 @@ CFLAGS+= -DIN_GCC -DIN_LIBGCC2 -D__GCC_F > # function with external linkage [-Wstatic-in-inline] > # gcc_assert (index < (int) sizeof(dwarf_reg_size_table)); > # ^ > +.if ${COMPILER_TYPE} == "clang" > CFLAGS+= -Wno-static-in-inline > +.endif > > LDFLAGS+= -nodefaultlibs > LDADD+= -lc From owner-svn-src-head@FreeBSD.ORG Tue Nov 5 16:54:26 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 6CBA6DC5; Tue, 5 Nov 2013 16:54:26 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 578C02577; Tue, 5 Nov 2013 16:54:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA5GsQlr053383; Tue, 5 Nov 2013 16:54:26 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA5GsQbU053382; Tue, 5 Nov 2013 16:54:26 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201311051654.rA5GsQbU053382@svn.freebsd.org> From: Gleb Smirnoff Date: Tue, 5 Nov 2013 16:54:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257710 - head/sys/netpfil/pf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Nov 2013 16:54:26 -0000 Author: glebius Date: Tue Nov 5 16:54:25 2013 New Revision: 257710 URL: http://svnweb.freebsd.org/changeset/base/257710 Log: Fix fallout from r257223. Since pf_test_state_icmp() can call pf_icmp_state_lookup() twice, we need to unlock previously found state. Reported & tested by: gavin Modified: head/sys/netpfil/pf/pf.c Modified: head/sys/netpfil/pf/pf.c ============================================================================== --- head/sys/netpfil/pf/pf.c Tue Nov 5 15:57:24 2013 (r257709) +++ head/sys/netpfil/pf/pf.c Tue Nov 5 16:54:25 2013 (r257710) @@ -4607,6 +4607,8 @@ pf_test_state_icmp(struct pf_state **sta if (ret >= 0) { if (ret == PF_DROP && pd->af == AF_INET6 && icmp_dir == PF_OUT) { + if (*state) + PF_STATE_UNLOCK(*state); ret = pf_icmp_state_lookup(&key, pd, state, m, direction, kif, virtual_id, virtual_type, icmp_dir, &iidx, multi); @@ -5058,6 +5060,8 @@ pf_test_state_icmp(struct pf_state **sta if (ret >= 0) { if (ret == PF_DROP && pd->af == AF_INET6 && icmp_dir == PF_OUT) { + if (*state) + PF_STATE_UNLOCK(*state); ret = pf_icmp_state_lookup(&key, pd, state, m, direction, kif, virtual_id, virtual_type, From owner-svn-src-head@FreeBSD.ORG Tue Nov 5 18:23:19 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 02DAC90; Tue, 5 Nov 2013 18:23:19 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CFF122C2F; Tue, 5 Nov 2013 18:23:18 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id DCA7FB96E; Tue, 5 Nov 2013 13:23:17 -0500 (EST) From: John Baldwin To: Gleb Smirnoff Subject: Re: svn commit: r257696 - in head: libexec/rbootd share/man/man9 sys/compat/svr4 sys/net sys/sys Date: Tue, 5 Nov 2013 11:56:09 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20130906; KDE/4.5.5; amd64; ; ) References: <201311051029.rA5ATmmM017799@svn.freebsd.org> In-Reply-To: <201311051029.rA5ATmmM017799@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201311051156.09819.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 05 Nov 2013 13:23:18 -0500 (EST) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Nov 2013 18:23:19 -0000 On Tuesday, November 05, 2013 5:29:48 am Gleb Smirnoff wrote: > Author: glebius > Date: Tue Nov 5 10:29:47 2013 > New Revision: 257696 > URL: http://svnweb.freebsd.org/changeset/base/257696 > > Log: > Drop support for historic ioctls and also undefine them, so that code > that checks their presence via ifdef, won't use them. Most of these are COMPAT_43, but one appears to be a 9.x ioctl? If that's the case it's implementation should probably stick around under appropriate COMPAT_FREEBSD macros. It looks like it goes all the way back to 4.4BSD, so at least COMPAT_FREEBSD4 and later should define the implementation to preserve ABI compat for old binaries. > Modified: head/sys/sys/sockio.h > ============================================================================== > --- head/sys/sys/sockio.h Tue Nov 5 09:46:01 2013 (r257695) > +++ head/sys/sys/sockio.h Tue Nov 5 10:29:47 2013 (r257696) > #define SIOCGIFMETRIC _IOWR('i', 23, struct ifreq) /* get IF metric */ > #define SIOCSIFMETRIC _IOW('i', 24, struct ifreq) /* set IF metric */ > #define SIOCDIFADDR _IOW('i', 25, struct ifreq) /* delete IF addr */ > -#define OSIOCAIFADDR _IOW('i', 26, struct oifaliasreq)/* add/chg IF alias */ > +/* OSIOCAIFADDR _IOW('i', 26, struct oifaliasreq) FreeBSD 9.x */ > #define SIOCALIFADDR _IOW('i', 27, struct if_laddrreq) /* add IF addr */ > #define SIOCGLIFADDR _IOWR('i', 28, struct if_laddrreq) /* get IF addr */ > #define SIOCDLIFADDR _IOW('i', 29, struct if_laddrreq) /* delete IF addr */ -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Tue Nov 5 18:27:26 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 5DC6D7E0; Tue, 5 Nov 2013 18:27:26 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4AB872CA8; Tue, 5 Nov 2013 18:27:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA5IRQoX085437; Tue, 5 Nov 2013 18:27:26 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA5IRQJ5085436; Tue, 5 Nov 2013 18:27:26 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201311051827.rA5IRQJ5085436@svn.freebsd.org> From: Hans Petter Selasky Date: Tue, 5 Nov 2013 18:27:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257712 - head/sys/dev/usb/wlan X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Nov 2013 18:27:26 -0000 Author: hselasky Date: Tue Nov 5 18:27:25 2013 New Revision: 257712 URL: http://svnweb.freebsd.org/changeset/base/257712 Log: Protect the "ratectl_ch" callout in the "run" driver by the "run" softc's "sc->sc_mtx" mutex. Currently the callout was marked multi-processor safe, which is fine, but it is better to start/stop/reset callouts while holding the "run" drivers own mutex. While at it add a missing "ULL" at end of the 64-bit unsigned integer constant. MFC after: 1 week Modified: head/sys/dev/usb/wlan/if_run.c Modified: head/sys/dev/usb/wlan/if_run.c ============================================================================== --- head/sys/dev/usb/wlan/if_run.c Tue Nov 5 17:19:51 2013 (r257711) +++ head/sys/dev/usb/wlan/if_run.c Tue Nov 5 18:27:25 2013 (r257712) @@ -700,7 +700,7 @@ run_attach(device_t self) TASK_INIT(&sc->cmdq_task, 0, run_cmdq_cb, sc); TASK_INIT(&sc->ratectl_task, 0, run_ratectl_cb, sc); - callout_init((struct callout *)&sc->ratectl_ch, 1); + usb_callout_init_mtx(&sc->ratectl_ch, &sc->sc_mtx, 0); if (bootverbose) ieee80211_announce(ic); @@ -1010,7 +1010,7 @@ run_load_microcode(struct run_softc *sc) /* cheap sanity check */ temp = fw->data; bytes = *temp; - if (bytes != be64toh(0xffffff0210280210)) { + if (bytes != be64toh(0xffffff0210280210ULL)) { device_printf(sc->sc_dev, "firmware checksum failed\n"); error = EINVAL; goto fail; @@ -2237,8 +2237,10 @@ run_ratectl_cb(void *arg, int pending) ieee80211_iterate_nodes(&ic->ic_sta, run_iter_func, sc); } + RUN_LOCK(sc); if(sc->ratectl_run != RUN_RATECTL_OFF) usb_callout_reset(&sc->ratectl_ch, hz, run_ratectl_to, sc); + RUN_UNLOCK(sc); } static void From owner-svn-src-head@FreeBSD.ORG Tue Nov 5 19:17:20 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 48DF83EA; Tue, 5 Nov 2013 19:17:20 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 35EBB2FE0; Tue, 5 Nov 2013 19:17:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA5JHKRd003177; Tue, 5 Nov 2013 19:17:20 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA5JHKF9003176; Tue, 5 Nov 2013 19:17:20 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201311051917.rA5JHKF9003176@svn.freebsd.org> From: Gleb Smirnoff Date: Tue, 5 Nov 2013 19:17:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257713 - head/sys/compat/svr4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Nov 2013 19:17:20 -0000 Author: glebius Date: Tue Nov 5 19:17:19 2013 New Revision: 257713 URL: http://svnweb.freebsd.org/changeset/base/257713 Log: Fix build. Pointy hat to: glebius Modified: head/sys/compat/svr4/svr4_sockio.c Modified: head/sys/compat/svr4/svr4_sockio.c ============================================================================== --- head/sys/compat/svr4/svr4_sockio.c Tue Nov 5 18:27:25 2013 (r257712) +++ head/sys/compat/svr4/svr4_sockio.c Tue Nov 5 19:17:19 2013 (r257713) @@ -154,15 +154,16 @@ svr4_sock_ioctl(fp, td, retval, fd, cmd, sc.svr4_ifc_len)); ifc = (struct ifconf *)≻ - ifc->ifc_req.ifr_addr.sa_family = - sc.svr4_ifc_req.svr4_ifr_addr.sa_family; - ifc->ifc_req.ifr_addr.sa_len = sizeof(struct osockaddr); + ifc->ifc_req->ifr_addr.sa_family = + sc.svr4_ifc_req->svr4_ifr_addr.sa_family; + ifc->ifc_req->ifr_addr.sa_len = + sizeof(struct osockaddr); - error = fo_ioctl(fp, SIOCGIFCONF, &sc, - td->td_ucred, td)); + error = fo_ioctl(fp, SIOCGIFCONF, &sc, td->td_ucred, + td); - sc.svr4_ifc_req.svr4_ifr_addr.sa_family = - ifc->ifc_req.ifr_addr.sa_family; + sc.svr4_ifc_req->svr4_ifr_addr.sa_family = + ifc->ifc_req->ifr_addr.sa_family; if (error != 0) return error; From owner-svn-src-head@FreeBSD.ORG Tue Nov 5 19:29:08 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 0BF3A847; Tue, 5 Nov 2013 19:29:08 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7356E20C4; Tue, 5 Nov 2013 19:29:06 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.7/8.14.7) with ESMTP id rA5JT4v2010089 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 5 Nov 2013 23:29:04 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.7/8.14.7/Submit) id rA5JT48T010088; Tue, 5 Nov 2013 23:29:04 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Tue, 5 Nov 2013 23:29:04 +0400 From: Gleb Smirnoff To: John Baldwin Subject: Re: svn commit: r257696 - in head: libexec/rbootd share/man/man9 sys/compat/svr4 sys/net sys/sys Message-ID: <20131105192904.GG7577@FreeBSD.org> References: <201311051029.rA5ATmmM017799@svn.freebsd.org> <201311051156.09819.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201311051156.09819.jhb@freebsd.org> User-Agent: Mutt/1.5.22 (2013-10-16) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Nov 2013 19:29:08 -0000 On Tue, Nov 05, 2013 at 11:56:09AM -0500, John Baldwin wrote: J> On Tuesday, November 05, 2013 5:29:48 am Gleb Smirnoff wrote: J> > Author: glebius J> > Date: Tue Nov 5 10:29:47 2013 J> > New Revision: 257696 J> > URL: http://svnweb.freebsd.org/changeset/base/257696 J> > J> > Log: J> > Drop support for historic ioctls and also undefine them, so that code J> > that checks their presence via ifdef, won't use them. J> J> Most of these are COMPAT_43, but one appears to be a 9.x ioctl? If that's the J> case it's implementation should probably stick around under appropriate J> COMPAT_FREEBSD macros. It looks like it goes all the way back to 4.4BSD, J> so at least COMPAT_FREEBSD4 and later should define the implementation to J> preserve ABI compat for old binaries. Why should we support such broken configurations as running new kernel and ancient core base system utilities? The efforts to keep this are much more expensive, then yields. The only reason I see is to keep compat for the previous major version, since we guarantee only consequtive upgrades to a next major. If something goes wrong during upgrade a sysadmin can use old tools with new kernel. I agree on that, and when changing SIOCAIFADDR two years ago, I provided compatibility. But why the hell should we support an insane who will try to run ifconfig(8) from FreeBSD 4 on FreeBSD 11? Not speaking about this tool from 4.4BSD, LOL :) This is not what COMPAT_FREEBSD4 meant to be. If we claim to support that, then we must have an extensive set of unit tests, and every time we produce a release, we must ensure that the kernel is still compatible with ancient ifconfig(8), mount(8) and a dozen of oether tools. We don't do this, and I'm pretty sure that if we try, the unit tests will fail here and there. And to fix them, an enourmous efforts need to be made. And for what sake? For a very strange idea to run ancient *config or *ctl on modern kernel. I vote with both hands on keeping compatibility at generic syscalls layer, so that closed source, 3rd party, binary applications could run on newer systems. But not for the core system utilities, that configure our kernel and are shipped in the base system. Leaving all this compat cruft bloats the code, makes it difficult to understand. It weakens constraints on the input from userland. For example in 9.x ifconfig didn't fill in sockaddr structure correctly. Compat code even can bring security issues. If I was agressive enough 2 years ago to wipe SIOCSIFADDR entirely, then SA-13:12.ifioctl would not be applicable to 10.x and 11.x. -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Tue Nov 5 19:45:53 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D42A3184; Tue, 5 Nov 2013 19:45:53 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-qc0-x232.google.com (mail-qc0-x232.google.com [IPv6:2607:f8b0:400d:c01::232]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4B0F021B3; Tue, 5 Nov 2013 19:45:53 +0000 (UTC) Received: by mail-qc0-f178.google.com with SMTP id x19so5079095qcw.37 for ; Tue, 05 Nov 2013 11:45:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=vBnK2lFmfl4IsWFzlHq/PCWtB4dOKsaB3uKAc24DBk4=; b=ImiWSCq51mkx4p1eorLTNSv3cgTnJBHSjd6tzHM5B9fGAg4TcfYC6JlwT1N3AnN8+I aKE8DS2QqdYlxKPJfxJKCO7E1mEnd/wKhCevYBf5B/bw2Z7x6/bqgi3m2X7ouhqJuC+w Ys/6GIDuBbpMCOeCE/5JQB9EBupbEJA3Ywf29jIyG+4oiwgFF2T0E4Xh68CWCX3rqpVg OBVuepXNLJgtvtwKh0wm/gY9am+orgY9UV9rRI53LXpuxSKmCeUlNth93PfToOiXzBbw 28kJTXm+ag+sTv8o5+P652j6ndaQudDgfHQPfNAuy71l9ZkI2aDpRfLGaTUIZs9/lFFK PHQg== MIME-Version: 1.0 X-Received: by 10.224.36.201 with SMTP id u9mr30275qad.76.1383680752432; Tue, 05 Nov 2013 11:45:52 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.224.207.66 with HTTP; Tue, 5 Nov 2013 11:45:52 -0800 (PST) In-Reply-To: <20131105192904.GG7577@FreeBSD.org> References: <201311051029.rA5ATmmM017799@svn.freebsd.org> <201311051156.09819.jhb@freebsd.org> <20131105192904.GG7577@FreeBSD.org> Date: Tue, 5 Nov 2013 11:45:52 -0800 X-Google-Sender-Auth: MLn3BYaac3idZTnCjjArzN0Eq3U Message-ID: Subject: Re: svn commit: r257696 - in head: libexec/rbootd share/man/man9 sys/compat/svr4 sys/net sys/sys From: Adrian Chadd To: Gleb Smirnoff Content-Type: text/plain; charset=ISO-8859-1 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , John Baldwin X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Nov 2013 19:45:54 -0000 Who says the only thing written out there that's old and would want a list of interfaces and interface configs via some legacy old ioctl API is ifconfig? -adrian On 5 November 2013 11:29, Gleb Smirnoff wrote: > On Tue, Nov 05, 2013 at 11:56:09AM -0500, John Baldwin wrote: > J> On Tuesday, November 05, 2013 5:29:48 am Gleb Smirnoff wrote: > J> > Author: glebius > J> > Date: Tue Nov 5 10:29:47 2013 > J> > New Revision: 257696 > J> > URL: http://svnweb.freebsd.org/changeset/base/257696 > J> > > J> > Log: > J> > Drop support for historic ioctls and also undefine them, so that code > J> > that checks their presence via ifdef, won't use them. > J> > J> Most of these are COMPAT_43, but one appears to be a 9.x ioctl? If that's the > J> case it's implementation should probably stick around under appropriate > J> COMPAT_FREEBSD macros. It looks like it goes all the way back to 4.4BSD, > J> so at least COMPAT_FREEBSD4 and later should define the implementation to > J> preserve ABI compat for old binaries. > > Why should we support such broken configurations as running new kernel and > ancient core base system utilities? The efforts to keep this are much more > expensive, then yields. > > The only reason I see is to keep compat for the previous major version, since > we guarantee only consequtive upgrades to a next major. If something goes > wrong during upgrade a sysadmin can use old tools with new kernel. I agree on > that, and when changing SIOCAIFADDR two years ago, I provided compatibility. > > But why the hell should we support an insane who will try to run ifconfig(8) > from FreeBSD 4 on FreeBSD 11? Not speaking about this tool from 4.4BSD, LOL :) > This is not what COMPAT_FREEBSD4 meant to be. > > If we claim to support that, then we must have an extensive set of unit tests, > and every time we produce a release, we must ensure that the kernel is still > compatible with ancient ifconfig(8), mount(8) and a dozen of oether tools. > We don't do this, and I'm pretty sure that if we try, the unit tests will fail > here and there. And to fix them, an enourmous efforts need to be made. And > for what sake? For a very strange idea to run ancient *config or *ctl on > modern kernel. > > > I vote with both hands on keeping compatibility at generic syscalls layer, so > that closed source, 3rd party, binary applications could run on newer systems. > But not for the core system utilities, that configure our kernel and are shipped > in the base system. > > > Leaving all this compat cruft bloats the code, makes it difficult to understand. > It weakens constraints on the input from userland. For example in 9.x ifconfig > didn't fill in sockaddr structure correctly. Compat code even can bring security > issues. If I was agressive enough 2 years ago to wipe SIOCSIFADDR entirely, then > SA-13:12.ifioctl would not be applicable to 10.x and 11.x. > > -- > Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Tue Nov 5 19:49:06 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D559F381; Tue, 5 Nov 2013 19:49:06 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A5CB621D8; Tue, 5 Nov 2013 19:49:06 +0000 (UTC) Received: from julian-mbp3.pixel8networks.com (50-196-156-133-static.hfc.comcastbusiness.net [50.196.156.133]) (authenticated bits=0) by vps1.elischer.org (8.14.7/8.14.7) with ESMTP id rA5Jn4Qg050309 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Tue, 5 Nov 2013 11:49:05 -0800 (PST) (envelope-from julian@freebsd.org) Message-ID: <52794BAB.6010202@freebsd.org> Date: Tue, 05 Nov 2013 11:48:59 -0800 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: Gleb Smirnoff , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r257694 - in head/etc: . defaults namedb periodic/daily rc.d References: <201311050930.rA59U7de097681@svn.freebsd.org> In-Reply-To: <201311050930.rA59U7de097681@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Nov 2013 19:49:06 -0000 On 11/5/13, 1:30 AM, Gleb Smirnoff wrote: > Author: glebius > Date: Tue Nov 5 09:30:06 2013 > New Revision: 257694 > URL: http://svnweb.freebsd.org/changeset/base/257694 > > Log: > Remove remnants of BIND from /etc, since there is no BIND in base now. > > Sorry, that would break users running head and BIND from ports, since > ports rely on these scripts. The ports will be fixed soon. as long as you don't remove these from existing systems on upgrade... THAT would be bad.. > > Reviewed by: erwin > > Deleted: > head/etc/namedb/ > head/etc/periodic/daily/470.status-named > head/etc/rc.d/named > Modified: > head/etc/defaults/periodic.conf > head/etc/defaults/rc.conf > head/etc/freebsd-update.conf > head/etc/rc.d/Makefile > head/etc/rc.d/ntpdate > head/etc/rc.d/rpcbind > head/etc/rc.d/syslogd > From owner-svn-src-head@FreeBSD.ORG Tue Nov 5 19:49:24 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 0B6C04BC; Tue, 5 Nov 2013 19:49:24 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D81DA21DB; Tue, 5 Nov 2013 19:49:23 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id C91B5B990; Tue, 5 Nov 2013 14:49:21 -0500 (EST) From: John Baldwin To: Gleb Smirnoff Subject: Re: svn commit: r257696 - in head: libexec/rbootd share/man/man9 sys/compat/svr4 sys/net sys/sys Date: Tue, 5 Nov 2013 14:47:52 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20130906; KDE/4.5.5; amd64; ; ) References: <201311051029.rA5ATmmM017799@svn.freebsd.org> <201311051156.09819.jhb@freebsd.org> <20131105192904.GG7577@FreeBSD.org> In-Reply-To: <20131105192904.GG7577@FreeBSD.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201311051447.52382.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 05 Nov 2013 14:49:21 -0500 (EST) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Nov 2013 19:49:24 -0000 On Tuesday, November 05, 2013 2:29:04 pm Gleb Smirnoff wrote: > On Tue, Nov 05, 2013 at 11:56:09AM -0500, John Baldwin wrote: > J> On Tuesday, November 05, 2013 5:29:48 am Gleb Smirnoff wrote: > J> > Author: glebius > J> > Date: Tue Nov 5 10:29:47 2013 > J> > New Revision: 257696 > J> > URL: http://svnweb.freebsd.org/changeset/base/257696 > J> > > J> > Log: > J> > Drop support for historic ioctls and also undefine them, so that code > J> > that checks their presence via ifdef, won't use them. > J> > J> Most of these are COMPAT_43, but one appears to be a 9.x ioctl? If that's the > J> case it's implementation should probably stick around under appropriate > J> COMPAT_FREEBSD macros. It looks like it goes all the way back to 4.4BSD, > J> so at least COMPAT_FREEBSD4 and later should define the implementation to > J> preserve ABI compat for old binaries. > > Why should we support such broken configurations as running new kernel and > ancient core base system utilities? The efforts to keep this are much more > expensive, then yields. Is this ioctl only ever used by ifconfig and not suitable for public consumption? If so, then I think removing it is fine. However, it's not clear that this is the case from the commit, and it's good to make sure it is really the case. It might be nice to hide ioctls we think are internal under some #ifdef that tools like ifconfig #define to expose them so we are more explicit about which ioctls are purely internal, etc. -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Tue Nov 5 19:49:53 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A65085F7; Tue, 5 Nov 2013 19:49:53 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9251C21DF; Tue, 5 Nov 2013 19:49:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA5JnrvY013301; Tue, 5 Nov 2013 19:49:53 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA5Jnr1c013300; Tue, 5 Nov 2013 19:49:53 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201311051949.rA5Jnr1c013300@svn.freebsd.org> From: John Baldwin Date: Tue, 5 Nov 2013 19:49:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257715 - head/etc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Nov 2013 19:49:53 -0000 Author: jhb Date: Tue Nov 5 19:49:53 2013 New Revision: 257715 URL: http://svnweb.freebsd.org/changeset/base/257715 Log: Don't explicitly invoke ifn_start on new child interfaces (vaps and subinterfaces) after they are created. Interfaces are already started by devd invoking /etc/pccard_ether when they are created, so the explicit calls in childif_create() resulted in interfaces being started twice. Note that interfaces created via cloned_interfaces are not explicitly started but depend on the devd mechanism already. MFC after: 1 week Modified: head/etc/network.subr Modified: head/etc/network.subr ============================================================================== --- head/etc/network.subr Tue Nov 5 19:40:34 2013 (r257714) +++ head/etc/network.subr Tue Nov 5 19:49:53 2013 (r257715) @@ -1429,9 +1429,6 @@ childif_create() fi ${IFCONFIG_CMD} $i name $child && cfg=0 fi - if autoif $child; then - ifn_start $child - fi done # Create vlan interfaces @@ -1455,9 +1452,6 @@ childif_create() ${IFCONFIG_CMD} $i name $child && cfg=0 fi fi - if autoif $child; then - ifn_start $child - fi done return ${cfg} From owner-svn-src-head@FreeBSD.ORG Tue Nov 5 19:55:21 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 5F68FB06; Tue, 5 Nov 2013 19:55:21 +0000 (UTC) (envelope-from jmg@h2.funkthat.com) Received: from h2.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3EB482248; Tue, 5 Nov 2013 19:55:21 +0000 (UTC) Received: from h2.funkthat.com (localhost [127.0.0.1]) by h2.funkthat.com (8.14.3/8.14.3) with ESMTP id rA5JtKV7056156 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 5 Nov 2013 11:55:20 -0800 (PST) (envelope-from jmg@h2.funkthat.com) Received: (from jmg@localhost) by h2.funkthat.com (8.14.3/8.14.3/Submit) id rA5JtKjv056155; Tue, 5 Nov 2013 11:55:20 -0800 (PST) (envelope-from jmg) Date: Tue, 5 Nov 2013 11:55:20 -0800 From: John-Mark Gurney To: Andriy Gapon Subject: Re: svn commit: r256132 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs Message-ID: <20131105195519.GX73243@funkthat.com> References: <201310080138.r981cPcT048197@svn.freebsd.org> <5278C496.4000002@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5278C496.4000002@FreeBSD.org> User-Agent: Mutt/1.4.2.3i X-Operating-System: FreeBSD 7.2-RELEASE i386 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.2 (h2.funkthat.com [127.0.0.1]); Tue, 05 Nov 2013 11:55:20 -0800 (PST) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Xin LI X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Nov 2013 19:55:21 -0000 Andriy Gapon wrote this message on Tue, Nov 05, 2013 at 12:12 +0200: > on 08/10/2013 04:38 Xin LI said the following: > > Author: delphij > > Date: Tue Oct 8 01:38:24 2013 > > New Revision: 256132 > > URL: http://svnweb.freebsd.org/changeset/base/256132 > > > > Log: > > Improve lzjb decompress performance by reorganizing the code > > to tighten the copy loop. > > > > Submitted by: Denis Ahrens > > MFC after: 2 weeks > > Approved by: re (gjb) > > > > Modified: > > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lzjb.c > > > > Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lzjb.c > > ============================================================================== > > --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lzjb.c Mon Oct 7 22:30:03 2013 (r256131) > > +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lzjb.c Tue Oct 8 01:38:24 2013 (r256132) > > @@ -117,7 +117,9 @@ lzjb_decompress(void *s_start, void *d_s > > src += 2; > > if ((cpy = dst - offset) < (uchar_t *)d_start) > > return (-1); > > - while (--mlen >= 0 && dst < d_end) > > + if (mlen > (d_end - dst)) > > + mlen = d_end - dst; > > + while (--mlen >= 0) > > *dst++ = *cpy++; > > } else { > > *dst++ = *src++; > > > > Intuitively it might seem that this change is indeed an improvement. > But given how "not dumb" (not sure if that always amounts to smart) the modern > compilers are, has anyone actually measured if this change indeed improves the > performance? > > Judging from the conversations on the ZFS mailing lists this change event hurt > performance in some environments. > Looks like the upstream is not going to take this change. > > So does it make any sense for us to make the code more obscure and different > from upstream? Unless performance benefits could indeed be demonstrated. The old code compiles to: 62c13: 49 f7 de neg %r14 62c16: 44 8d 58 ff lea -0x1(%rax),%r11d 62c1a: 4c 89 d3 mov %r10,%rbx 62c1d: 0f 1f 00 nopl (%rax) 62c20: 42 8a 14 33 mov (%rbx,%r14,1),%dl 62c24: 88 13 mov %dl,(%rbx) 62c26: 48 ff c3 inc %rbx 62c29: ff c8 dec %eax 62c2b: 85 c0 test %eax,%eax 62c2d: 7f f1 jg 62c20 The load/store line is addresses 62c20-62c29... So it looks like clang is already doing the optimization that was added... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-svn-src-head@FreeBSD.ORG Tue Nov 5 20:35:53 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id E0F4FA44; Tue, 5 Nov 2013 20:35:53 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5EBA924ED; Tue, 5 Nov 2013 20:35:52 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.7/8.14.7) with ESMTP id rA5KZoML010503 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 6 Nov 2013 00:35:50 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.7/8.14.7/Submit) id rA5KZopv010502; Wed, 6 Nov 2013 00:35:50 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Wed, 6 Nov 2013 00:35:50 +0400 From: Gleb Smirnoff To: Julian Elischer Subject: Re: svn commit: r257694 - in head/etc: . defaults namedb periodic/daily rc.d Message-ID: <20131105203550.GI7577@FreeBSD.org> References: <201311050930.rA59U7de097681@svn.freebsd.org> <52794BAB.6010202@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <52794BAB.6010202@freebsd.org> User-Agent: Mutt/1.5.22 (2013-10-16) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Nov 2013 20:35:54 -0000 On Tue, Nov 05, 2013 at 11:48:59AM -0800, Julian Elischer wrote: J> On 11/5/13, 1:30 AM, Gleb Smirnoff wrote: J> > Author: glebius J> > Date: Tue Nov 5 09:30:06 2013 J> > New Revision: 257694 J> > URL: http://svnweb.freebsd.org/changeset/base/257694 J> > J> > Log: J> > Remove remnants of BIND from /etc, since there is no BIND in base now. J> > J> > Sorry, that would break users running head and BIND from ports, since J> > ports rely on these scripts. The ports will be fixed soon. J> as long as you don't remove these from existing systems on upgrade... J> THAT would be bad.. One do that decision manually in mergemaster. -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Tue Nov 5 20:42:20 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id DE0C2D5E; Tue, 5 Nov 2013 20:42:20 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 423E12557; Tue, 5 Nov 2013 20:42:19 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.7/8.14.7) with ESMTP id rA5KgHL1010549 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 6 Nov 2013 00:42:17 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.7/8.14.7/Submit) id rA5KgHed010548; Wed, 6 Nov 2013 00:42:17 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Wed, 6 Nov 2013 00:42:17 +0400 From: Gleb Smirnoff To: John Baldwin Subject: Re: svn commit: r257696 - in head: libexec/rbootd share/man/man9 sys/compat/svr4 sys/net sys/sys Message-ID: <20131105204217.GK7577@FreeBSD.org> References: <201311051029.rA5ATmmM017799@svn.freebsd.org> <201311051156.09819.jhb@freebsd.org> <20131105192904.GG7577@FreeBSD.org> <201311051447.52382.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201311051447.52382.jhb@freebsd.org> User-Agent: Mutt/1.5.22 (2013-10-16) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Nov 2013 20:42:21 -0000 John, On Tue, Nov 05, 2013 at 02:47:52PM -0500, John Baldwin wrote: J> On Tuesday, November 05, 2013 2:29:04 pm Gleb Smirnoff wrote: J> > On Tue, Nov 05, 2013 at 11:56:09AM -0500, John Baldwin wrote: J> > J> On Tuesday, November 05, 2013 5:29:48 am Gleb Smirnoff wrote: J> > J> > Author: glebius J> > J> > Date: Tue Nov 5 10:29:47 2013 J> > J> > New Revision: 257696 J> > J> > URL: http://svnweb.freebsd.org/changeset/base/257696 J> > J> > J> > J> > Log: J> > J> > Drop support for historic ioctls and also undefine them, so that code J> > J> > that checks their presence via ifdef, won't use them. J> > J> J> > J> Most of these are COMPAT_43, but one appears to be a 9.x ioctl? If that's the J> > J> case it's implementation should probably stick around under appropriate J> > J> COMPAT_FREEBSD macros. It looks like it goes all the way back to 4.4BSD, J> > J> so at least COMPAT_FREEBSD4 and later should define the implementation to J> > J> preserve ABI compat for old binaries. J> > J> > Why should we support such broken configurations as running new kernel and J> > ancient core base system utilities? The efforts to keep this are much more J> > expensive, then yields. J> J> Is this ioctl only ever used by ifconfig and not suitable for public consumption? J> If so, then I think removing it is fine. However, it's not clear that this is J> the case from the commit, and it's good to make sure it is really the case. J> J> It might be nice to hide ioctls we think are internal under some #ifdef that tools J> like ifconfig #define to expose them so we are more explicit about which ioctls J> are purely internal, etc. Well, it isn't hidden and actually some applications as zebra/quagga can use it. On previous hacking session at this area, 2 years ago, I noticed that zebra/quagga do use SIOCAIFADDR and it actually does better at filling sockaddrs than our ifconfig :) I am pretty sure that no closed source, but available to wide public, application that configures addresses in FreeBSD kernel exist. In case of open source applications, like zebra/quagga, supporting one major release behind should be enough. -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Tue Nov 5 20:57:37 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id DD0D52BB; Tue, 5 Nov 2013 20:57:37 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [IPv6:2001:7b8:3a7:1:2d0:b7ff:fea0:8c26]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 749CF2608; Tue, 5 Nov 2013 20:57:37 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7::432:d81e:b512:b3] (unknown [IPv6:2001:7b8:3a7:0:432:d81e:b512:b3]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 4BFD55C43; Tue, 5 Nov 2013 21:57:29 +0100 (CET) Content-Type: multipart/signed; boundary="Apple-Mail=_4214C5BC-9A5B-4515-924B-11B1B02FAD47"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 7.0 \(1816\)) Subject: Re: svn commit: r257691 - head/gnu/lib/libgcc From: Dimitry Andric In-Reply-To: <20131105154519.GD65141@onelab2.iet.unipi.it> Date: Tue, 5 Nov 2013 21:57:22 +0100 Message-Id: <1A78125D-160B-4AE6-BA02-072A35DE4F93@FreeBSD.org> References: <201311050737.rA57bZkq059529@svn.freebsd.org> <20131105154519.GD65141@onelab2.iet.unipi.it> To: Luigi Rizzo X-Mailer: Apple Mail (2.1816) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Nov 2013 20:57:37 -0000 --Apple-Mail=_4214C5BC-9A5B-4515-924B-11B1B02FAD47 Content-Type: multipart/mixed; boundary="Apple-Mail=_A0510B65-227D-4604-9321-614C968B6927" --Apple-Mail=_A0510B65-227D-4604-9321-614C968B6927 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 05 Nov 2013, at 16:45, Luigi Rizzo wrote: ... > I wonder if it is worthwhile adding to the default rules some > compiler-specific CFLAGS, say CFLAGS_CLANG and CFLAGS_GCC >=20 > (there is only a handful of cases now so maybe it is overkill, > and it harms readability; on the other hand, the Makefiles > already make a lot of assumptions on variable names) >=20 > % find ../head -name Makefile -exec grep -H COMPILER_TYPE \{\} \; > ../head/gnu/lib/libgcc/Makefile:.if ${COMPILER_TYPE} !=3D "clang" || = ${TARGET_CPUARCH} !=3D "arm" > ../head/gnu/lib/libgcc/Makefile:.if ${COMPILER_TYPE} =3D=3D "clang" > ../head/gnu/lib/libsupc++/Makefile:.if ${COMPILER_TYPE} =3D=3D "clang" > ../head/gnu/lib/libstdc++/Makefile:.if ${COMPILER_TYPE} =3D=3D "clang" > ../head/tools/tools/ath/athstats/Makefile:.if (${COMPILER_TYPE} =3D=3D = "clang") > ../head/tools/tools/net80211/wlanstats/Makefile:.if ${COMPILER_TYPE} = =3D=3D "clang" Something like the attached? We already had NO_WERROR.clang and NO_WFORMAT.clang, so I added CFLAGS.clang, CXXFLAGS.clang and their counterparts CFLAGS.gcc and CXXFLAGS.gcc. The only potential problem is flag ordering, since these are added to CFLAGS and CXXFLAGS in bsd.sys.mk, so they might appear earlier on the command line than when you specify them explicitly in individual Makefiles. I'm currently running test builds with clang and gcc, and it seems to run fine until now, but I will probably want to build a full universe before I commit it... -Dimitry --Apple-Mail=_A0510B65-227D-4604-9321-614C968B6927 Content-Disposition: attachment; filename=add-clang-and-gcc-specific-cflags-1.diff Content-Type: application/octet-stream; x-unix-mode=0644; name="add-clang-and-gcc-specific-cflags-1.diff" Content-Transfer-Encoding: 7bit Index: gnu/lib/libgcc/Makefile =================================================================== --- gnu/lib/libgcc/Makefile (revision 257620) +++ gnu/lib/libgcc/Makefile (working copy) @@ -112,9 +112,7 @@ LIB2_DIVMOD_FUNCS = _divdi3 _moddi3 _udivdi3 _umod .if ${TARGET_CPUARCH} == "arm" # from config/arm/t-strongarm-elf CFLAGS+= -Dinhibit_libc -fno-inline -.if ${COMPILER_TYPE} == "clang" -CFLAGS+= -fheinous-gnu-extensions -.endif +CFLAGS.clang+= -fheinous-gnu-extensions LIB1ASMSRC = lib1funcs.asm LIB1ASMFUNCS = _dvmd_tls _bb_init_func Index: gnu/lib/libstdc++/Makefile =================================================================== --- gnu/lib/libstdc++/Makefile (revision 257620) +++ gnu/lib/libstdc++/Makefile (working copy) @@ -637,6 +637,4 @@ CLEANFILES+= ${VERSION_MAP} # Filter out libc++-specific flags, and -std= flags above c++98 or gnu++98. CXXFLAGS:= ${CXXFLAGS:N-stdlib=libc++:N-std=c++[01][13x]:N-std=gnu++[01][13x]} -.if ${COMPILER_TYPE} == "clang" -CXXFLAGS+= -stdlib=libstdc++ -.endif +CXXFLAGS.clang+= -stdlib=libstdc++ Index: gnu/lib/libsupc++/Makefile =================================================================== --- gnu/lib/libsupc++/Makefile (revision 257620) +++ gnu/lib/libsupc++/Makefile (working copy) @@ -57,6 +57,4 @@ VERSION_MAP= ${.CURDIR}/Version.map # Filter out libc++-specific flags, and -std= flags above c++98 or gnu++98. CXXFLAGS:= ${CXXFLAGS:N-stdlib=libc++:N-std=c++[01][13x]:N-std=gnu++[01][13x]} -.if ${COMPILER_TYPE} == "clang" -CXXFLAGS+= -stdlib=libstdc++ -.endif +CXXFLAGS.clang+= -stdlib=libstdc++ Index: share/mk/bsd.sys.mk =================================================================== --- share/mk/bsd.sys.mk (revision 257620) +++ share/mk/bsd.sys.mk (working copy) @@ -114,12 +114,19 @@ CWARNFLAGS+= -Wno-format CWARNFLAGS+= -Wno-unknown-pragmas .endif # IGNORE_PRAGMA -.if ${COMPILER_TYPE} == "clang" && !defined(EARLY_BUILD) +.if !defined(EARLY_BUILD) +.if ${COMPILER_TYPE} == "clang" CLANG_NO_IAS= -no-integrated-as CLANG_OPT_SMALL= -mstack-alignment=8 -mllvm -inline-threshold=3\ -mllvm -enable-load-pre=false -mllvm -simplifycfg-dup-ret CFLAGS+= -Qunused-arguments +CFLAGS+= ${CFLAGS.clang} +CXXFLAGS+= ${CXXFLAGS.clang} +.else # !CLANG +CFLAGS+= ${CFLAGS.gcc} +CXXFLAGS+= ${CXXFLAGS.gcc} .endif # CLANG +.endif # !EARLY_BUILD .if ${MK_SSP} != "no" && ${MACHINE_CPUARCH} != "ia64" && \ ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips" Index: sys/conf/Makefile.arm =================================================================== --- sys/conf/Makefile.arm (revision 257620) +++ sys/conf/Makefile.arm (working copy) @@ -39,21 +39,17 @@ SYSTEM_DEP:= ${SYSTEM_DEP:$S/conf/ldscript.$M=ldsc STRIP_FLAGS = -S .endif -.if ${COMPILER_TYPE} != "clang" -CFLAGS += -mno-thumb-interwork -.endif +CFLAGS.gcc += -mno-thumb-interwork .if empty(DDB_ENABLED) -.if defined(WITHOUT_ARM_EABI) && ${COMPILER_TYPE} != "clang" -CFLAGS += -mno-apcs-frame +.if defined(WITHOUT_ARM_EABI) +CFLAGS.gcc += -mno-apcs-frame .endif .elif !defined(WITHOUT_ARM_EABI) CFLAGS += -funwind-tables -.if ${COMPILER_TYPE} == "clang" # clang requires us to tell it to emit assembly with unwind information -CFLAGS += -mllvm -arm-enable-ehabi +CFLAGS.clang += -mllvm -arm-enable-ehabi .endif -.endif SYSTEM_LD_ = ${LD} -Bdynamic -T ldscript.$M.noheader ${LDFLAGS} \ -warn-common -export-dynamic -dynamic-linker /red/herring -o \ Index: tools/tools/ath/athstats/Makefile =================================================================== --- tools/tools/ath/athstats/Makefile (revision 257620) +++ tools/tools/ath/athstats/Makefile (working copy) @@ -21,9 +21,7 @@ CLEANFILES+= opt_ah.h CFLAGS+=-DATH_SUPPORT_ANI CFLAGS+=-DATH_SUPPORT_TDMA -.if (${COMPILER_TYPE} == "clang") -CFLAGS+=-fbracket-depth=512 -.endif +CFLAGS.clang+= -fbracket-depth=512 opt_ah.h: echo "#define AH_DEBUG 1" > opt_ah.h Index: tools/tools/net80211/wlanstats/Makefile =================================================================== --- tools/tools/net80211/wlanstats/Makefile (revision 257620) +++ tools/tools/net80211/wlanstats/Makefile (working copy) @@ -7,8 +7,6 @@ BINDIR= /usr/local/bin NO_MAN= SRCS= statfoo.c wlanstats.c main.c -.if ${COMPILER_TYPE} == "clang" -CFLAGS+= -fbracket-depth=512 -.endif +CFLAGS.clang+= -fbracket-depth=512 .include Index: usr.bin/mkcsmapper/Makefile.inc =================================================================== --- usr.bin/mkcsmapper/Makefile.inc (revision 257620) +++ usr.bin/mkcsmapper/Makefile.inc (working copy) @@ -6,6 +6,4 @@ SRCS+= lex.l yacc.y CFLAGS+= -I${.CURDIR} -I${.CURDIR}/../mkcsmapper \ -I${.CURDIR}/../../lib/libc/iconv \ -I${.CURDIR}/../../lib/libiconv_modules/mapper_std -.if ${COMPILER_TYPE} == "gcc" -CFLAGS+= --param max-inline-insns-single=64 -.endif +CFLAGS.gcc+= --param max-inline-insns-single=64 --Apple-Mail=_A0510B65-227D-4604-9321-614C968B6927 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii --Apple-Mail=_A0510B65-227D-4604-9321-614C968B6927-- --Apple-Mail=_4214C5BC-9A5B-4515-924B-11B1B02FAD47 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.22 (Darwin) iEYEARECAAYFAlJ5W7cACgkQsF6jCi4glqMljwCg1Z9M3qzP6jfZWiEGEw5uUgEx FJEAoK93CH+G/a6SwjY1IpeAhQuInbMv =eEGs -----END PGP SIGNATURE----- --Apple-Mail=_4214C5BC-9A5B-4515-924B-11B1B02FAD47-- From owner-svn-src-head@FreeBSD.ORG Tue Nov 5 21:47:01 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 868CB58E; Tue, 5 Nov 2013 21:47:01 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 72D20297A; Tue, 5 Nov 2013 21:47:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA5Ll193053685; Tue, 5 Nov 2013 21:47:01 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA5Ll1kC053684; Tue, 5 Nov 2013 21:47:01 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201311052147.rA5Ll1kC053684@svn.freebsd.org> From: Glen Barber Date: Tue, 5 Nov 2013 21:47:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257720 - head/lib/libc/string X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Nov 2013 21:47:01 -0000 Author: gjb Date: Tue Nov 5 21:47:00 2013 New Revision: 257720 URL: http://svnweb.freebsd.org/changeset/base/257720 Log: Fix .Dd after r257646. DST affects the day by one hour, but the number of days in the week stay the same. Modified: head/lib/libc/string/strlcpy.3 Modified: head/lib/libc/string/strlcpy.3 ============================================================================== --- head/lib/libc/string/strlcpy.3 Tue Nov 5 20:00:17 2013 (r257719) +++ head/lib/libc/string/strlcpy.3 Tue Nov 5 21:47:00 2013 (r257720) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 10, 2013 +.Dd November 4, 2013 .Dt STRLCPY 3 .Os .Sh NAME From owner-svn-src-head@FreeBSD.ORG Tue Nov 5 22:19:33 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B16E6A5C; Tue, 5 Nov 2013 22:19:33 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 87B132BA7; Tue, 5 Nov 2013 22:19:33 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 8B2F2B990; Tue, 5 Nov 2013 17:19:32 -0500 (EST) From: John Baldwin To: Gleb Smirnoff Subject: Re: svn commit: r257696 - in head: libexec/rbootd share/man/man9 sys/compat/svr4 sys/net sys/sys Date: Tue, 5 Nov 2013 17:18:26 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20130906; KDE/4.5.5; amd64; ; ) References: <201311051029.rA5ATmmM017799@svn.freebsd.org> <201311051447.52382.jhb@freebsd.org> <20131105204217.GK7577@FreeBSD.org> In-Reply-To: <20131105204217.GK7577@FreeBSD.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201311051718.26356.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 05 Nov 2013 17:19:32 -0500 (EST) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Nov 2013 22:19:33 -0000 On Tuesday, November 05, 2013 3:42:17 pm Gleb Smirnoff wrote: > John, > > On Tue, Nov 05, 2013 at 02:47:52PM -0500, John Baldwin wrote: > J> On Tuesday, November 05, 2013 2:29:04 pm Gleb Smirnoff wrote: > J> > On Tue, Nov 05, 2013 at 11:56:09AM -0500, John Baldwin wrote: > J> > J> On Tuesday, November 05, 2013 5:29:48 am Gleb Smirnoff wrote: > J> > J> > Author: glebius > J> > J> > Date: Tue Nov 5 10:29:47 2013 > J> > J> > New Revision: 257696 > J> > J> > URL: http://svnweb.freebsd.org/changeset/base/257696 > J> > J> > > J> > J> > Log: > J> > J> > Drop support for historic ioctls and also undefine them, so that code > J> > J> > that checks their presence via ifdef, won't use them. > J> > J> > J> > J> Most of these are COMPAT_43, but one appears to be a 9.x ioctl? If that's the > J> > J> case it's implementation should probably stick around under appropriate > J> > J> COMPAT_FREEBSD macros. It looks like it goes all the way back to 4.4BSD, > J> > J> so at least COMPAT_FREEBSD4 and later should define the implementation to > J> > J> preserve ABI compat for old binaries. > J> > > J> > Why should we support such broken configurations as running new kernel and > J> > ancient core base system utilities? The efforts to keep this are much more > J> > expensive, then yields. > J> > J> Is this ioctl only ever used by ifconfig and not suitable for public consumption? > J> If so, then I think removing it is fine. However, it's not clear that this is > J> the case from the commit, and it's good to make sure it is really the case. > J> > J> It might be nice to hide ioctls we think are internal under some #ifdef that tools > J> like ifconfig #define to expose them so we are more explicit about which ioctls > J> are purely internal, etc. > > Well, it isn't hidden and actually some applications as zebra/quagga can use it. > > On previous hacking session at this area, 2 years ago, I noticed that zebra/quagga > do use SIOCAIFADDR and it actually does better at filling sockaddrs than our > ifconfig :) > > I am pretty sure that no closed source, but available to wide public, application > that configures addresses in FreeBSD kernel exist. > > In case of open source applications, like zebra/quagga, supporting one major > release behind should be enough. Mmmm, people run older versions of binaries (even open source ones) on newer OS's perhaps more often than you think. The COMPAT_43 stuff can be dropped certainly, but people will almost certainly do rolling upgrades where they upgrade the OS on their machines before they upgrade their packages. -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Tue Nov 5 22:25:14 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id AA3F3CF2; Tue, 5 Nov 2013 22:25:14 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-qe0-x22c.google.com (mail-qe0-x22c.google.com [IPv6:2607:f8b0:400d:c02::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 24D092C05; Tue, 5 Nov 2013 22:25:14 +0000 (UTC) Received: by mail-qe0-f44.google.com with SMTP id 6so5525493qeb.31 for ; Tue, 05 Nov 2013 14:25:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=4ALtbC2g0JpaMI8o/J9eyuxJeLGFGA/trhFr/DrlPJg=; b=F78I4edcLM5K/nYcDrRWWAvdUiCeM3DpTicPoJbT0WYq1IOGiqHhAA5ZyFL8wwAltj JbZzf44PJxk87S4Zpsc5X+Bs4DpISB+sblaQiyZ4JxrrdDFif6rrIH89QSh5iTPk4HyT W9j8d+YkqoPGX/PUfMrnHjKHT7kGagtvHJV/3f+QLMpHNAGB/JdaUV2MNIv9XVvGpehB +y4auRdpEN2shB7ATNcmBsds8FOXMYBi4GdjiFvS+7QLNQwuXnTGg+3lXqfPRik0bqYS UuIXOd0KHxky0X5VK6GP5A7ivfHbAQR/suxoidFZVBP33BVY+Rjh0o3HRIeNMWlwe1FA KTrQ== MIME-Version: 1.0 X-Received: by 10.224.113.199 with SMTP id b7mr1317459qaq.4.1383690313172; Tue, 05 Nov 2013 14:25:13 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.224.207.66 with HTTP; Tue, 5 Nov 2013 14:25:13 -0800 (PST) In-Reply-To: <201311051718.26356.jhb@freebsd.org> References: <201311051029.rA5ATmmM017799@svn.freebsd.org> <201311051447.52382.jhb@freebsd.org> <20131105204217.GK7577@FreeBSD.org> <201311051718.26356.jhb@freebsd.org> Date: Tue, 5 Nov 2013 14:25:13 -0800 X-Google-Sender-Auth: TlGMXLguinRf7woveCMAuOB8y7o Message-ID: Subject: Re: svn commit: r257696 - in head: libexec/rbootd share/man/man9 sys/compat/svr4 sys/net sys/sys From: Adrian Chadd To: John Baldwin Content-Type: text/plain; charset=ISO-8859-1 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , Gleb Smirnoff , "src-committers@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Nov 2013 22:25:14 -0000 [snip] My main worry about this kind of work is that you're just steamrolling through stuff that yes, should be done, but with little warning and no API deprecation schedule. I'd much rather see this stuff handled more formally - we mark the API as deprecated and remove it in the next release. I really don't like seeing steamrolling through the kernel and deprecating APIs with minimal warning and having no (optional) backwards compatibility implementations. That's what made us stand out from Linux - we kept old APIs around as much as we could. Linux wasn't terribly good at this. -adrian From owner-svn-src-head@FreeBSD.ORG Wed Nov 6 00:15:07 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B19975A3 for ; Wed, 6 Nov 2013 00:15:07 +0000 (UTC) (envelope-from peter@wemm.org) Received: from mail-pd0-x233.google.com (mail-pd0-x233.google.com [IPv6:2607:f8b0:400e:c02::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 80FF121BA for ; Wed, 6 Nov 2013 00:15:07 +0000 (UTC) Received: by mail-pd0-f179.google.com with SMTP id y10so9289811pdj.38 for ; Tue, 05 Nov 2013 16:15:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wemm.org; s=google; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=0DIIApSiimuxGhYMaceCoxjVNskqoHw0EMjw0QEsvgU=; b=YQTROaGc9iIp0KaQfToGA25avdLP8xFhXRuge2zQO/3MC8plhELuvz+jMHbf5nzJ7z 1tJOnx2Y3KGaUUoHDdFLFZ4z9B3VZCgMdqvIynEk+0lSsuzD61NNkVFTneUkfUJVO3SR CgFgr3c7EVoOqsmow06U3xt5dVvH5MLMDCkYE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=0DIIApSiimuxGhYMaceCoxjVNskqoHw0EMjw0QEsvgU=; b=GVfYBswJ5zz55EApR/UhjtYfvnu8jIuOUr1KSBl8+02/cBlty5HGLnks0lSdmjjXX0 mvRHpqCeg2b4tGjzm6353GbJKk4a90V06qCNdB90NZ5B4qLq9TkD8GDG3o70BYkMWZ/S xgSIG+uG29vL6V2PsSjBZ8iVtUNmsN3nPi8C2RPYP88u7z3ufkuUIYDjQnaWCqBLKY0/ V81GFVZkeMxuNE3/5pesjTa6FEZnKnP1M3KaveTOXT+qURqvHaA9xwVBresIXf3dWH8A Jb3HhZt1IrdY4TIVfbIE8ia8AaXVUir2/U/PPEi4ZElq+zTKlzRVIbfuXR7EFzNAa2j6 FFcA== X-Gm-Message-State: ALoCoQnO8N3r24smtYnKruTdGMeYcFwHHY91X7WFUte+KutDabfb8+q/OfDfZdVZx43+wxa5oPVb X-Received: by 10.68.143.231 with SMTP id sh7mr273393pbb.35.1383696906572; Tue, 05 Nov 2013 16:15:06 -0800 (PST) Received: from hater-dm.corp.yahoo.com (nat-dip4.cfw-a-gci.corp.yahoo.com. [209.131.62.113]) by mx.google.com with ESMTPSA id ye1sm43368912pab.19.2013.11.05.16.15.05 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 05 Nov 2013 16:15:05 -0800 (PST) Message-ID: <52798A09.5020303@wemm.org> Date: Tue, 05 Nov 2013 16:15:05 -0800 From: Peter Wemm User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: John Baldwin , Gleb Smirnoff Subject: Re: svn commit: r257696 - in head: libexec/rbootd share/man/man9 sys/compat/svr4 sys/net sys/sys References: <201311051029.rA5ATmmM017799@svn.freebsd.org> <201311051447.52382.jhb@freebsd.org> <20131105204217.GK7577@FreeBSD.org> <201311051718.26356.jhb@freebsd.org> In-Reply-To: <201311051718.26356.jhb@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Nov 2013 00:15:07 -0000 On 11/5/13, 2:18 PM, John Baldwin wrote: > On Tuesday, November 05, 2013 3:42:17 pm Gleb Smirnoff wrote: >> John, >> >> On Tue, Nov 05, 2013 at 02:47:52PM -0500, John Baldwin wrote: >> J> On Tuesday, November 05, 2013 2:29:04 pm Gleb Smirnoff wrote: >> J> > On Tue, Nov 05, 2013 at 11:56:09AM -0500, John Baldwin wrote: >> J> > J> On Tuesday, November 05, 2013 5:29:48 am Gleb Smirnoff wrote: >> J> > J> > Author: glebius >> J> > J> > Date: Tue Nov 5 10:29:47 2013 >> J> > J> > New Revision: 257696 >> J> > J> > URL: http://svnweb.freebsd.org/changeset/base/257696 >> J> > J> > >> J> > J> > Log: >> J> > J> > Drop support for historic ioctls and also undefine them, so that code >> J> > J> > that checks their presence via ifdef, won't use them. >> J> > J> >> J> > J> Most of these are COMPAT_43, but one appears to be a 9.x ioctl? If that's the >> J> > J> case it's implementation should probably stick around under appropriate >> J> > J> COMPAT_FREEBSD macros. It looks like it goes all the way back to 4.4BSD, >> J> > J> so at least COMPAT_FREEBSD4 and later should define the implementation to >> J> > J> preserve ABI compat for old binaries. >> J> > >> J> > Why should we support such broken configurations as running new kernel and >> J> > ancient core base system utilities? The efforts to keep this are much more >> J> > expensive, then yields. >> J> >> J> Is this ioctl only ever used by ifconfig and not suitable for public consumption? >> J> If so, then I think removing it is fine. However, it's not clear that this is >> J> the case from the commit, and it's good to make sure it is really the case. >> J> >> J> It might be nice to hide ioctls we think are internal under some #ifdef that tools >> J> like ifconfig #define to expose them so we are more explicit about which ioctls >> J> are purely internal, etc. >> >> Well, it isn't hidden and actually some applications as zebra/quagga can use it. >> >> On previous hacking session at this area, 2 years ago, I noticed that zebra/quagga >> do use SIOCAIFADDR and it actually does better at filling sockaddrs than our >> ifconfig :) >> >> I am pretty sure that no closed source, but available to wide public, application >> that configures addresses in FreeBSD kernel exist. >> >> In case of open source applications, like zebra/quagga, supporting one major >> release behind should be enough. > Mmmm, people run older versions of binaries (even open source ones) on newer OS's > perhaps more often than you think. The COMPAT_43 stuff can be dropped certainly, > but people will almost certainly do rolling upgrades where they upgrade the OS > on their machines before they upgrade their packages. > This change is actually even worse than it appears. One of the key features that was removed was the workaround for code that doesn't know about sockaddr.sa_len. eg: /usr/sbin/traceroute after the change: # traceroute www.freebsd.org traceroute: ifaddrlist: SIOCGIFADDR: bge0: Can't assign requested address Hint: linux doesn't have a sa_len, so code that originates on Linux will no longer work. The code glebius removed used to work around this. This is not old binaries, this is binaries compiled *today*. -Peter From owner-svn-src-head@FreeBSD.ORG Wed Nov 6 00:25:18 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id E5B1B783; Wed, 6 Nov 2013 00:25:18 +0000 (UTC) (envelope-from grehan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D1FEE221E; Wed, 6 Nov 2013 00:25:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA60PIOG010734; Wed, 6 Nov 2013 00:25:18 GMT (envelope-from grehan@svn.freebsd.org) Received: (from grehan@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA60PH4x010728; Wed, 6 Nov 2013 00:25:17 GMT (envelope-from grehan@svn.freebsd.org) Message-Id: <201311060025.rA60PH4x010728@svn.freebsd.org> From: Peter Grehan Date: Wed, 6 Nov 2013 00:25:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257729 - head/usr.sbin/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Nov 2013 00:25:19 -0000 Author: grehan Date: Wed Nov 6 00:25:17 2013 New Revision: 257729 URL: http://svnweb.freebsd.org/changeset/base/257729 Log: Add the VM name to the process name with setproctitle(). Remove the VM name from some of the thread-naming calls since it is now in the proc title. Slightly modify the thread-naming for the net and block threads. This improves readability when using top/ps with the -a and -H options on a system with a large number of bhyve VMs. Requested by: Michael Dexter Reviewed by: neel MFC after: 4 weeks Modified: head/usr.sbin/bhyve/bhyverun.c head/usr.sbin/bhyve/block_if.c head/usr.sbin/bhyve/mevent.c head/usr.sbin/bhyve/pci_ahci.c head/usr.sbin/bhyve/pci_virtio_net.c Modified: head/usr.sbin/bhyve/bhyverun.c ============================================================================== --- head/usr.sbin/bhyve/bhyverun.c Tue Nov 5 23:16:52 2013 (r257728) +++ head/usr.sbin/bhyve/bhyverun.c Wed Nov 6 00:25:17 2013 (r257729) @@ -190,7 +190,7 @@ fbsdrun_start_thread(void *param) mtp = param; vcpu = mtp->mt_vcpu; - snprintf(tname, sizeof(tname), "%s vcpu %d", vmname, vcpu); + snprintf(tname, sizeof(tname), "vcpu %d", vcpu); pthread_set_name_np(mtp->mt_thr, tname); vm_loop(mtp->mt_ctx, vcpu, vmexit[vcpu].rip); @@ -685,6 +685,11 @@ main(int argc, char *argv[]) } /* + * Change the proc title to include the VM name. + */ + setproctitle("%s", vmname); + + /* * Add CPU 0 */ fbsdrun_addcpu(ctx, BSP, rip); Modified: head/usr.sbin/bhyve/block_if.c ============================================================================== --- head/usr.sbin/bhyve/block_if.c Tue Nov 5 23:16:52 2013 (r257728) +++ head/usr.sbin/bhyve/block_if.c Wed Nov 6 00:25:17 2013 (r257729) @@ -293,7 +293,7 @@ blockif_open(const char *optstr, const c pthread_create(&bc->bc_btid, NULL, blockif_thr, bc); - snprintf(tname, sizeof(tname), "%s blk-%s", vmname, ident); + snprintf(tname, sizeof(tname), "blk-%s", ident); pthread_set_name_np(bc->bc_btid, tname); return (bc); Modified: head/usr.sbin/bhyve/mevent.c ============================================================================== --- head/usr.sbin/bhyve/mevent.c Tue Nov 5 23:16:52 2013 (r257728) +++ head/usr.sbin/bhyve/mevent.c Wed Nov 6 00:25:17 2013 (r257729) @@ -381,10 +381,8 @@ mevent_delete_close(struct mevent *evp) static void mevent_set_name(void) { - char tname[MAXCOMLEN + 1]; - snprintf(tname, sizeof(tname), "%s mevent", vmname); - pthread_set_name_np(mevent_tid, tname); + pthread_set_name_np(mevent_tid, "mevent"); } void Modified: head/usr.sbin/bhyve/pci_ahci.c ============================================================================== --- head/usr.sbin/bhyve/pci_ahci.c Tue Nov 5 23:16:52 2013 (r257728) +++ head/usr.sbin/bhyve/pci_ahci.c Wed Nov 6 00:25:17 2013 (r257729) @@ -1714,11 +1714,9 @@ pci_ahci_init(struct vmctx *ctx, struct /* * Attempt to open the backing image. Use the PCI - * slot/func/ahci_port for the identifier string - * since that uniquely identifies a storage device. + * slot/func for the identifier string. */ - snprintf(bident, sizeof(bident), "%d:%d:%d", pi->pi_slot, pi->pi_func, - 0); + snprintf(bident, sizeof(bident), "%d:%d", pi->pi_slot, pi->pi_func); bctxt = blockif_open(opts, bident); if (bctxt == NULL) { ret = 1; Modified: head/usr.sbin/bhyve/pci_virtio_net.c ============================================================================== --- head/usr.sbin/bhyve/pci_virtio_net.c Tue Nov 5 23:16:52 2013 (r257728) +++ head/usr.sbin/bhyve/pci_virtio_net.c Wed Nov 6 00:25:17 2013 (r257729) @@ -588,7 +588,7 @@ pci_vtnet_init(struct vmctx *ctx, struct */ if (!mac_provided) { snprintf(nstr, sizeof(nstr), "%d-%d-%s", pi->pi_slot, - pi->pi_func, vmname); + pi->pi_func, vmname); MD5Init(&mdctx); MD5Update(&mdctx, nstr, strlen(nstr)); @@ -632,7 +632,8 @@ pci_vtnet_init(struct vmctx *ctx, struct pthread_mutex_init(&sc->tx_mtx, NULL); pthread_cond_init(&sc->tx_cond, NULL); pthread_create(&sc->tx_tid, NULL, pci_vtnet_tx_thread, (void *)sc); - snprintf(tname, sizeof(tname), "%s vtnet%d tx", vmname, pi->pi_slot); + snprintf(tname, sizeof(tname), "vtnet-%d:%d tx", pi->pi_slot, + pi->pi_func); pthread_set_name_np(sc->tx_tid, tname); return (0); From owner-svn-src-head@FreeBSD.ORG Wed Nov 6 00:32:41 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 68BEC9F9; Wed, 6 Nov 2013 00:32:41 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3C819227A; Wed, 6 Nov 2013 00:32:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA60Wfv0013676; Wed, 6 Nov 2013 00:32:41 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA60WfMT013675; Wed, 6 Nov 2013 00:32:41 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201311060032.rA60WfMT013675@svn.freebsd.org> From: Ian Lepore Date: Wed, 6 Nov 2013 00:32:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257730 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Nov 2013 00:32:41 -0000 Author: ian Date: Wed Nov 6 00:32:40 2013 New Revision: 257730 URL: http://svnweb.freebsd.org/changeset/base/257730 Log: Do not build aicasm with the cross-tools/kernel-toolchain, instead add a proper kernel-tools step/target modeled after the world build-tools stuff. Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Wed Nov 6 00:25:17 2013 (r257729) +++ head/Makefile.inc1 Wed Nov 6 00:32:40 2013 (r257730) @@ -439,6 +439,16 @@ IMAKE_MTREE= MTREE_CMD="nmtree ${MTREEFL KMAKEENV= ${WMAKEENV} KMAKE= ${KMAKEENV} ${MAKE} ${.MAKEFLAGS} ${KERNEL_FLAGS} KERNEL=${INSTKERNNAME} +# kernel build-tools stage +KTMAKE= MAKEOBJDIRPREFIX=${WORLDTMP} \ + ${WMAKEENV} ${MAKE} -f Makefile.inc1 \ + TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ + DESTDIR= \ + BOOTSTRAPPING=${OSRELDATE} \ + SSP_CFLAGS= \ + -DNO_LINT \ + -DNO_CPU_CFLAGS -DNO_WARNS -DNO_CTF -DEARLY_BUILD + # # buildworld # @@ -1019,7 +1029,7 @@ buildkernel: @echo "--------------------------------------------------------------" @echo ">>> stage 2.3: build tools" @echo "--------------------------------------------------------------" - @# Currently no special kernel tools to build. + ${_+_}cd ${.CURDIR}; ${KTMAKE} kernel-tools .if !defined(NO_KERNELDEPEND) @echo @echo "--------------------------------------------------------------" @@ -1347,6 +1357,23 @@ build-tools: .MAKE .endfor # +# kernel-tools: Build kernel-building tools +# +kernel-tools: .MAKE + mkdir -p ${WORLDTMP}/usr + mtree -deU -f ${.CURDIR}/etc/mtree/BSD.usr.dist \ + -p ${WORLDTMP}/usr >/dev/null +.for _tool in \ + sys/dev/aic7xxx/aicasm + ${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all,install)"; \ + cd ${.CURDIR}/${_tool} && \ + ${MAKE} DIRPRFX=${_tool}/ obj && \ + ${MAKE} DIRPRFX=${_tool}/ depend && \ + ${MAKE} DIRPRFX=${_tool}/ all && \ + ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${WORLDTMP} install +.endfor + +# # cross-tools: Build cross-building tools # .if ${TARGET_ARCH} != ${MACHINE_ARCH} || ${BOOTSTRAPPING} < 800035 @@ -1393,7 +1420,6 @@ cross-tools: .MAKE ${_btxld} \ ${_crunchide} \ ${_kgzip} \ - sys/dev/aic7xxx/aicasm ${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all,install)"; \ cd ${.CURDIR}/${_tool} && \ ${MAKE} DIRPRFX=${_tool}/ obj && \ From owner-svn-src-head@FreeBSD.ORG Wed Nov 6 00:34:45 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id F317BB4C for ; Wed, 6 Nov 2013 00:34:45 +0000 (UTC) (envelope-from peter@wemm.org) Received: from mail-pd0-x232.google.com (mail-pd0-x232.google.com [IPv6:2607:f8b0:400e:c02::232]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C3A51228A for ; Wed, 6 Nov 2013 00:34:45 +0000 (UTC) Received: by mail-pd0-f178.google.com with SMTP id x10so9288107pdj.23 for ; Tue, 05 Nov 2013 16:34:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wemm.org; s=google; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=yJm5MFfqmAm6dxobdJS2gJ5kOijyr/3czLJx2LLeupg=; b=ydZxkltsL28fGFIuyinpLCrbE2l0z5tNCkF4MColllzS9raV0zji34P9cOPhNjOaTh 1S3o7Dx42bWEUy0ipfDQuC0A3NmaMUcDAw4X69+d7KqKx4wky6C8sjdcVlodCq54vZT4 6lGTyGmrrdiCVDVbd0qOvx23uBVDCeBG7QC34= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=yJm5MFfqmAm6dxobdJS2gJ5kOijyr/3czLJx2LLeupg=; b=g4Hn6nWxU81o3V0aNGU2Vh09WNzxXYZCIfrJbH18bwGSFNRtzZZXNqSNmXqDRq/qdu QJ4tg9NOIj8K2uabsGytabW/+UxWQSGzRza3NTufwozCtC7lGjVSWxwb4GhXxq0/thM2 HcBMgJAaZXAq6TSOUmQ1WMaY0MqdNVPSGufXfI58RjgvpyH/V6KiAk45EfUxmkJoFwxN y3GhFPb/V8Wr+1o5W3vFCR3FZCe4Z2dt5FUPE4efsxGeOWHmG315/Rktva5HfIy+6aGR t+q/IKNwG67IjT2H5MjnW0UHYU66sj2Jg5Vywx3W/Wc4DNqwu3oS8LOX1EPPqEIdfAjA UYKA== X-Gm-Message-State: ALoCoQn2oAovbux1s/08+kCBSNRXJzTV/w37xfpUmUK9svVnRxbznuDuMHf0wotfiVN8XywZw0sB X-Received: by 10.66.146.199 with SMTP id te7mr1097787pab.106.1383698085086; Tue, 05 Nov 2013 16:34:45 -0800 (PST) Received: from hater-dm.corp.yahoo.com (nat-dip4.cfw-a-gci.corp.yahoo.com. [209.131.62.113]) by mx.google.com with ESMTPSA id hu10sm37228121pbc.11.2013.11.05.16.34.43 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 05 Nov 2013 16:34:44 -0800 (PST) Message-ID: <52798EA3.2060407@wemm.org> Date: Tue, 05 Nov 2013 16:34:43 -0800 From: Peter Wemm User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: John Baldwin , Gleb Smirnoff Subject: Re: svn commit: r257696 - in head: libexec/rbootd share/man/man9 sys/compat/svr4 sys/net sys/sys References: <201311051029.rA5ATmmM017799@svn.freebsd.org> <201311051447.52382.jhb@freebsd.org> <20131105204217.GK7577@FreeBSD.org> <201311051718.26356.jhb@freebsd.org> <52798A09.5020303@wemm.org> In-Reply-To: <52798A09.5020303@wemm.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Nov 2013 00:34:46 -0000 On 11/5/13, 4:15 PM, Peter Wemm wrote: > On 11/5/13, 2:18 PM, John Baldwin wrote: >> On Tuesday, November 05, 2013 3:42:17 pm Gleb Smirnoff wrote: >>> John, >>> >>> On Tue, Nov 05, 2013 at 02:47:52PM -0500, John Baldwin wrote: >>> J> On Tuesday, November 05, 2013 2:29:04 pm Gleb Smirnoff wrote: >>> J> > On Tue, Nov 05, 2013 at 11:56:09AM -0500, John Baldwin wrote: >>> J> > J> On Tuesday, November 05, 2013 5:29:48 am Gleb Smirnoff wrote: >>> J> > J> > Author: glebius >>> J> > J> > Date: Tue Nov 5 10:29:47 2013 >>> J> > J> > New Revision: 257696 >>> J> > J> > URL: http://svnweb.freebsd.org/changeset/base/257696 >>> J> > J> > >>> J> > J> > Log: >>> J> > J> > Drop support for historic ioctls and also undefine them, >>> so that code >>> J> > J> > that checks their presence via ifdef, won't use them. >>> J> > J> >>> J> > J> Most of these are COMPAT_43, but one appears to be a 9.x >>> ioctl? If that's the >>> J> > J> case it's implementation should probably stick around under >>> appropriate >>> J> > J> COMPAT_FREEBSD macros. It looks like it goes all the way >>> back to 4.4BSD, >>> J> > J> so at least COMPAT_FREEBSD4 and later should define the >>> implementation to >>> J> > J> preserve ABI compat for old binaries. >>> J> > >>> J> > Why should we support such broken configurations as running new >>> kernel and >>> J> > ancient core base system utilities? The efforts to keep this >>> are much more >>> J> > expensive, then yields. >>> J> >>> J> Is this ioctl only ever used by ifconfig and not suitable for >>> public consumption? >>> J> If so, then I think removing it is fine. However, it's not clear >>> that this is >>> J> the case from the commit, and it's good to make sure it is really >>> the case. >>> J> >>> J> It might be nice to hide ioctls we think are internal under some >>> #ifdef that tools >>> J> like ifconfig #define to expose them so we are more explicit >>> about which ioctls >>> J> are purely internal, etc. >>> >>> Well, it isn't hidden and actually some applications as zebra/quagga >>> can use it. >>> >>> On previous hacking session at this area, 2 years ago, I noticed >>> that zebra/quagga >>> do use SIOCAIFADDR and it actually does better at filling sockaddrs >>> than our >>> ifconfig :) >>> >>> I am pretty sure that no closed source, but available to wide >>> public, application >>> that configures addresses in FreeBSD kernel exist. >>> >>> In case of open source applications, like zebra/quagga, supporting >>> one major >>> release behind should be enough. >> Mmmm, people run older versions of binaries (even open source ones) >> on newer OS's >> perhaps more often than you think. The COMPAT_43 stuff can be >> dropped certainly, >> but people will almost certainly do rolling upgrades where they >> upgrade the OS >> on their machines before they upgrade their packages. >> > This change is actually even worse than it appears. One of the key > features that was removed was the workaround for code that doesn't > know about sockaddr.sa_len. > > eg: /usr/sbin/traceroute after the change: > # traceroute www.freebsd.org > traceroute: ifaddrlist: SIOCGIFADDR: bge0: Can't assign requested address > > Hint: linux doesn't have a sa_len, so code that originates on Linux > will no longer work. The code glebius removed used to work around this. > > This is not old binaries, this is binaries compiled *today*. > I may have to take this back. I mis-read the removed code for SIOCSIFADDR etc that had the sa_len emulation in it. I might be hitting a bug in r257692 ("rewrite in_control"). I will check and report back. My apologies for potentially jumping the gun on this. -Peter From owner-svn-src-head@FreeBSD.ORG Wed Nov 6 01:14:01 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 19D631A8; Wed, 6 Nov 2013 01:14:01 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 07AA12441; Wed, 6 Nov 2013 01:14:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA61E0kX027386; Wed, 6 Nov 2013 01:14:00 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA61E0vG027384; Wed, 6 Nov 2013 01:14:00 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201311060114.rA61E0vG027384@svn.freebsd.org> From: Nathan Whitehorn Date: Wed, 6 Nov 2013 01:14:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257731 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Nov 2013 01:14:01 -0000 Author: nwhitehorn Date: Wed Nov 6 01:14:00 2013 New Revision: 257731 URL: http://svnweb.freebsd.org/changeset/base/257731 Log: Fix build on GCC. Modified: head/sys/netinet/in.c Modified: head/sys/netinet/in.c ============================================================================== --- head/sys/netinet/in.c Wed Nov 6 00:32:40 2013 (r257730) +++ head/sys/netinet/in.c Wed Nov 6 01:14:00 2013 (r257731) @@ -541,7 +541,8 @@ static int in_difaddr_ioctl(caddr_t data, struct ifnet *ifp, struct thread *td) { const struct ifreq *ifr = (struct ifreq *)data; - const struct sockaddr_in *addr = (struct sockaddr_in *)&ifr->ifr_addr; + const struct sockaddr_in *addr = (const struct sockaddr_in *) + &ifr->ifr_addr; struct ifaddr *ifa; struct in_ifaddr *ia; bool deleteAny, iaIsLast; From owner-svn-src-head@FreeBSD.ORG Wed Nov 6 02:49:16 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id AB93CA69; Wed, 6 Nov 2013 02:49:16 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9926128A3; Wed, 6 Nov 2013 02:49:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA62nGsn062247; Wed, 6 Nov 2013 02:49:16 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA62nG75062246; Wed, 6 Nov 2013 02:49:16 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201311060249.rA62nG75062246@svn.freebsd.org> From: Kevin Lo Date: Wed, 6 Nov 2013 02:49:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257732 - head/sys/dev/usb/wlan X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Nov 2013 02:49:16 -0000 Author: kevlo Date: Wed Nov 6 02:49:16 2013 New Revision: 257732 URL: http://svnweb.freebsd.org/changeset/base/257732 Log: Reading the RT2860_ASIC_VER_ID register is not needed and returns completely bogus value. Modified: head/sys/dev/usb/wlan/if_run.c Modified: head/sys/dev/usb/wlan/if_run.c ============================================================================== --- head/sys/dev/usb/wlan/if_run.c Wed Nov 6 01:14:00 2013 (r257731) +++ head/sys/dev/usb/wlan/if_run.c Wed Nov 6 02:49:16 2013 (r257732) @@ -1016,7 +1016,6 @@ run_load_microcode(struct run_softc *sc) goto fail; } - run_read(sc, RT2860_ASIC_VER_ID, &tmp); /* write microcode image */ run_write_region_1(sc, RT2870_FW_BASE, base, 4096); run_write(sc, RT2860_H2M_MAILBOX_CID, 0xffffffff); From owner-svn-src-head@FreeBSD.ORG Wed Nov 6 03:36:44 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 8392C903; Wed, 6 Nov 2013 03:36:44 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6F9422C91; Wed, 6 Nov 2013 03:36:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA63aiUA081762; Wed, 6 Nov 2013 03:36:44 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA63aiVO081761; Wed, 6 Nov 2013 03:36:44 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201311060336.rA63aiVO081761@svn.freebsd.org> From: Glen Barber Date: Wed, 6 Nov 2013 03:36:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257733 - head/gnu/lib/libgcc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Nov 2013 03:36:44 -0000 Author: gjb Date: Wed Nov 6 03:36:43 2013 New Revision: 257733 URL: http://svnweb.freebsd.org/changeset/base/257733 Log: Revert r257691, r257645: Let amd64/amd64 build again. Modified: head/gnu/lib/libgcc/Makefile Modified: head/gnu/lib/libgcc/Makefile ============================================================================== --- head/gnu/lib/libgcc/Makefile Wed Nov 6 02:49:16 2013 (r257732) +++ head/gnu/lib/libgcc/Makefile Wed Nov 6 03:36:43 2013 (r257733) @@ -27,19 +27,6 @@ CFLAGS+= -DIN_GCC -DIN_LIBGCC2 -D__GCC_F -I${GCCDIR}/config -I${GCCDIR} -I. \ -I${.CURDIR}/../../usr.bin/cc/cc_tools -# Added to quiesce warning around gcc_assert() for an inline macro that uses -# a static variable. This code has been moved around in gcc, but is still in -# use in the latest trunk version of the compiler. -# -# gnu/lib/libgcc/../../../contrib/gcc/unwind-dw2.c:208:36: -# warning: static variable 'dwarf_reg_size_table' is used in an inline -# function with external linkage [-Wstatic-in-inline] -# gcc_assert (index < (int) sizeof(dwarf_reg_size_table)); -# ^ -.if ${COMPILER_TYPE} == "clang" -CFLAGS+= -Wno-static-in-inline -.endif - LDFLAGS+= -nodefaultlibs LDADD+= -lc From owner-svn-src-head@FreeBSD.ORG Wed Nov 6 03:45:18 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id DCCA7B8F; Wed, 6 Nov 2013 03:45:17 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail107.syd.optusnet.com.au (mail107.syd.optusnet.com.au [211.29.132.53]) by mx1.freebsd.org (Postfix) with ESMTP id 852082CFA; Wed, 6 Nov 2013 03:45:17 +0000 (UTC) Received: from c122-106-156-23.carlnfd1.nsw.optusnet.com.au (c122-106-156-23.carlnfd1.nsw.optusnet.com.au [122.106.156.23]) by mail107.syd.optusnet.com.au (Postfix) with ESMTPS id 91B39D43509; Wed, 6 Nov 2013 14:44:58 +1100 (EST) Date: Wed, 6 Nov 2013 14:44:55 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: John-Mark Gurney Subject: Re: svn commit: r256132 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs In-Reply-To: <20131105195519.GX73243@funkthat.com> Message-ID: <20131106135214.I3083@besplex.bde.org> References: <201310080138.r981cPcT048197@svn.freebsd.org> <5278C496.4000002@FreeBSD.org> <20131105195519.GX73243@funkthat.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=bpB1Wiqi c=1 sm=1 tr=0 a=ebeQFi2P/qHVC0Yw9JDJ4g==:117 a=PO7r1zJSAAAA:8 a=5YL3BuiIPZQA:10 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=c4KWZsxl0uEA:10 a=6I5d2MoRAAAA:8 a=c7uO3wGGmkYMksNKIE8A:9 a=CjuIK1q_8ugA:10 Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Xin LI , Andriy Gapon X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Nov 2013 03:45:18 -0000 On Tue, 5 Nov 2013, John-Mark Gurney wrote: > Andriy Gapon wrote this message on Tue, Nov 05, 2013 at 12:12 +0200: >> on 08/10/2013 04:38 Xin LI said the following: >>> Author: delphij >>> Date: Tue Oct 8 01:38:24 2013 >>> New Revision: 256132 >>> URL: http://svnweb.freebsd.org/changeset/base/256132 >>> >>> Log: >>> Improve lzjb decompress performance by reorganizing the code >>> to tighten the copy loop. >>> >>> Submitted by: Denis Ahrens >>> MFC after: 2 weeks >>> Approved by: re (gjb) >>> >>> Modified: >>> head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lzjb.c >>> >>> Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lzjb.c >>> ============================================================================== >>> --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lzjb.c Mon Oct 7 22:30:03 2013 (r256131) >>> +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lzjb.c Tue Oct 8 01:38:24 2013 (r256132) >>> @@ -117,7 +117,9 @@ lzjb_decompress(void *s_start, void *d_s >>> src += 2; >>> if ((cpy = dst - offset) < (uchar_t *)d_start) >>> return (-1); >>> - while (--mlen >= 0 && dst < d_end) >>> + if (mlen > (d_end - dst)) >>> + mlen = d_end - dst; >>> + while (--mlen >= 0) >>> *dst++ = *cpy++; >>> } else { >>> *dst++ = *src++; >>> >> >> Intuitively it might seem that this change is indeed an improvement. >> But given how "not dumb" (not sure if that always amounts to smart) the modern >> compilers are, has anyone actually measured if this change indeed improves the >> performance? >> >> Judging from the conversations on the ZFS mailing lists this change event hurt >> performance in some environments. >> Looks like the upstream is not going to take this change. >> >> So does it make any sense for us to make the code more obscure and different >> from upstream? Unless performance benefits could indeed be demonstrated. > > The old code compiles to: > 62c13: 49 f7 de neg %r14 > 62c16: 44 8d 58 ff lea -0x1(%rax),%r11d > 62c1a: 4c 89 d3 mov %r10,%rbx > 62c1d: 0f 1f 00 nopl (%rax) > 62c20: 42 8a 14 33 mov (%rbx,%r14,1),%dl > 62c24: 88 13 mov %dl,(%rbx) > 62c26: 48 ff c3 inc %rbx > 62c29: ff c8 dec %eax > 62c2b: 85 c0 test %eax,%eax > 62c2d: 7f f1 jg 62c20 > > The load/store line is addresses 62c20-62c29... So it looks like clang > is already doing the optimization that was added... It is unlikely to make a difference, but this is fairly bad source and object code: - byte at a time accesses. The loop just copies data. Even calling memcpy might be faster. Compilers used to inline memcpy too much, but they now know that they don't understand memory, so the call would probably be external, though it should be inline iff the size of the copy is small - the source code asks for, and gets a slow signed comparison. The compiler is apparently not able to optimized, and the extra instruction at 62c2b is needed. - rewrites to change the loop termination condition are often to change it from (--v >= 0) to (--v == 0). This isn't done here, so there is still the extra instruction at 62c2b. I don't like signed variables, this optimization often occurse automatically because size_t is used for byte counts and it is unsigned. mlen is apparently signed and not size_t, else the optimization would occur automatically (if you write ">= 0", this makes no sense for unsigned variables, and the compiler will translate it to "== 0". - oops, the extra instruction at 62c2b is not needed. The compiler could have used "subl $1,%eax" instead of "decl %eax" to set the sign flags. A minimal bytewise copying loop on 64-bit x86 looks like: 1: movb (%rsi,rcx,1),%al # from top down movb %al,(%rdi,rcx,1) decq %rcx jne 1b # end with last byte not copied ... # copy last byte now, or modfify end condition 4 instructions instead of 6. But this probably makes little difference on OOE x86. This can use subl too, to allow using jg so as not to need an extra step to copy the last byte. Using decl is a good optimization for space on 32-bit values, but IIRC decq is not a single byte instruction so using it is not such a good optimization for space and using subl loses less space. This already copies from the top down so as to allow an end condition of nearly %rcx == 0. Perhaps the pointers and counters can be adjusted a bit more to get to exactly %rcx == 0, but this probably has more setup overheads. Getting the end condition to be exactly '--v == 0' tends to take more C code too. Compilers know about this problem, and sometimes generate an extra step outside of the loop even if you structure the loop unnaturally to try to avoid this. The loop could also be unrolled a bit. ISTR noticing clang doing automatic unrolling. Perhaps this is the main thing affected by manual optimizations. They might be harmful because the confuse the compiler into not doing automatic unrolling, or harmful because they help the compiler do automatic unrolling when it shouldn't, or helpful... In my copy benchmarks, I didn't find reducing the loop overhead by adjusting only the count register to be very useful, since loop overhead is easy to hide in the src/dst access overhead. When there are cache misses for src/dst, loop overhead is in the noise, so all of this is only interesting for the L1-cached case. It usually takes only minor (bit often some) unrolling to amortize the loop overhead in the L1-cached case. Bruce From owner-svn-src-head@FreeBSD.ORG Wed Nov 6 04:30:53 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 466091EC; Wed, 6 Nov 2013 04:30:53 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail109.syd.optusnet.com.au (mail109.syd.optusnet.com.au [211.29.132.80]) by mx1.freebsd.org (Postfix) with ESMTP id 0374920AC; Wed, 6 Nov 2013 04:30:52 +0000 (UTC) Received: from c122-106-156-23.carlnfd1.nsw.optusnet.com.au (c122-106-156-23.carlnfd1.nsw.optusnet.com.au [122.106.156.23]) by mail109.syd.optusnet.com.au (Postfix) with ESMTPS id 8DFFED617CE; Wed, 6 Nov 2013 15:30:42 +1100 (EST) Date: Wed, 6 Nov 2013 15:30:41 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Luigi Rizzo Subject: Re: svn commit: r257691 - head/gnu/lib/libgcc In-Reply-To: <20131105154519.GD65141@onelab2.iet.unipi.it> Message-ID: <20131106144724.I3234@besplex.bde.org> References: <201311050737.rA57bZkq059529@svn.freebsd.org> <20131105154519.GD65141@onelab2.iet.unipi.it> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=DstvpgP+ c=1 sm=1 tr=0 a=ebeQFi2P/qHVC0Yw9JDJ4g==:117 a=PO7r1zJSAAAA:8 a=cCbrWYaO2fIA:10 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=O6xDf_UZitYA:10 a=lfqv2VCxg68aSHk5MQEA:9 a=CjuIK1q_8ugA:10 Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Dimitry Andric X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Nov 2013 04:30:53 -0000 On Tue, 5 Nov 2013, Luigi Rizzo wrote: > On Tue, Nov 05, 2013 at 07:37:35AM +0000, Dimitry Andric wrote: >> Log: >> Fix libgcc build with gcc after r257645, by using -Wno-static-in-inline >> for clang only. This still just breaks the warning. See my previous reply. (For gcc, it is unclear if the missing warning is due too fewer warnings by default or if it is because gcc's default for plain inline is different from clang's so that the code is correct for gcc.). > I wonder if it is worthwhile adding to the default rules some > compiler-specific CFLAGS, say CFLAGS_CLANG and CFLAGS_GCC > > (there is only a handful of cases now so maybe it is overkill, > and it harms readability; on the other hand, the Makefiles > already make a lot of assumptions on variable names) No, that would further simplify breaking warnings instead of fixing the bugs exposed by warnings. The code should be portable so that it works with any compiler. That is just not so easy for contrib'ed code unless the vendor made it portable. I checked that libgcc is compiled by default with -std=gnu99. This is just the default from bsd.sys.mk. It is obviously wrong for libgcc, since the plain inlines in it require gnu89. gnu99 gives consistenly broken C99 semantic for both gcc and clang. Only clang warned about this, and the warning has been broken. Contribed code could easily depend on either newer or older standards than the one is defaulted. gcc should be more portable than most contribed code, especially in parts required to bootstrap itself. It seems to never use extern inline, but that means that all of its uses of plain inline assume gnu89 and are thus unportable to pre-c99 compilers other than itself and to post-c99 compilers including itself. Maybe its own autoconfigued makefiles avoid this problem by forcing -std=gnu89 or by avoiding -std=c99. Or -Dinline= might work for bootstrapping. Bruce From owner-svn-src-head@FreeBSD.ORG Wed Nov 6 04:38:49 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D7A5C48E; Wed, 6 Nov 2013 04:38:49 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AAE0B20E3; Wed, 6 Nov 2013 04:38:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA64cnX7002018; Wed, 6 Nov 2013 04:38:49 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA64cnbe002017; Wed, 6 Nov 2013 04:38:49 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201311060438.rA64cnbe002017@svn.freebsd.org> From: Glen Barber Date: Wed, 6 Nov 2013 04:38:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257734 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Nov 2013 04:38:49 -0000 Author: gjb Date: Wed Nov 6 04:38:49 2013 New Revision: 257734 URL: http://svnweb.freebsd.org/changeset/base/257734 Log: Revert r257730: Make head/ buildable again, instead of spewing garbage like: /src/gnu/lib/csu/../../../contrib/gcc/config/rs6000/crtsavres.asm:280: Error: no such instruction: `lwz 28,-16(11)' Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Wed Nov 6 03:36:43 2013 (r257733) +++ head/Makefile.inc1 Wed Nov 6 04:38:49 2013 (r257734) @@ -439,16 +439,6 @@ IMAKE_MTREE= MTREE_CMD="nmtree ${MTREEFL KMAKEENV= ${WMAKEENV} KMAKE= ${KMAKEENV} ${MAKE} ${.MAKEFLAGS} ${KERNEL_FLAGS} KERNEL=${INSTKERNNAME} -# kernel build-tools stage -KTMAKE= MAKEOBJDIRPREFIX=${WORLDTMP} \ - ${WMAKEENV} ${MAKE} -f Makefile.inc1 \ - TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ - DESTDIR= \ - BOOTSTRAPPING=${OSRELDATE} \ - SSP_CFLAGS= \ - -DNO_LINT \ - -DNO_CPU_CFLAGS -DNO_WARNS -DNO_CTF -DEARLY_BUILD - # # buildworld # @@ -1029,7 +1019,7 @@ buildkernel: @echo "--------------------------------------------------------------" @echo ">>> stage 2.3: build tools" @echo "--------------------------------------------------------------" - ${_+_}cd ${.CURDIR}; ${KTMAKE} kernel-tools + @# Currently no special kernel tools to build. .if !defined(NO_KERNELDEPEND) @echo @echo "--------------------------------------------------------------" @@ -1357,23 +1347,6 @@ build-tools: .MAKE .endfor # -# kernel-tools: Build kernel-building tools -# -kernel-tools: .MAKE - mkdir -p ${WORLDTMP}/usr - mtree -deU -f ${.CURDIR}/etc/mtree/BSD.usr.dist \ - -p ${WORLDTMP}/usr >/dev/null -.for _tool in \ - sys/dev/aic7xxx/aicasm - ${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all,install)"; \ - cd ${.CURDIR}/${_tool} && \ - ${MAKE} DIRPRFX=${_tool}/ obj && \ - ${MAKE} DIRPRFX=${_tool}/ depend && \ - ${MAKE} DIRPRFX=${_tool}/ all && \ - ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${WORLDTMP} install -.endfor - -# # cross-tools: Build cross-building tools # .if ${TARGET_ARCH} != ${MACHINE_ARCH} || ${BOOTSTRAPPING} < 800035 @@ -1420,6 +1393,7 @@ cross-tools: .MAKE ${_btxld} \ ${_crunchide} \ ${_kgzip} \ + sys/dev/aic7xxx/aicasm ${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all,install)"; \ cd ${.CURDIR}/${_tool} && \ ${MAKE} DIRPRFX=${_tool}/ obj && \ From owner-svn-src-head@FreeBSD.ORG Wed Nov 6 05:26:16 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id E1EF9D30; Wed, 6 Nov 2013 05:26:16 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B51CD22D6; Wed, 6 Nov 2013 05:26:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA65QGYo018535; Wed, 6 Nov 2013 05:26:16 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA65QG1V018533; Wed, 6 Nov 2013 05:26:16 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201311060526.rA65QG1V018533@svn.freebsd.org> From: Warner Losh Date: Wed, 6 Nov 2013 05:26:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257735 - in head/sys: conf mips/cavium X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Nov 2013 05:26:17 -0000 Author: imp Date: Wed Nov 6 05:26:15 2013 New Revision: 257735 URL: http://svnweb.freebsd.org/changeset/base/257735 Log: Remove the gross hack for the Octeon Simple Executive to the least intrusive place for it to be: the octeon std file. Fix a comment while I'm here. Allow for future architectural specific flags. Reviewed by: jmallet@ Modified: head/sys/conf/kern.pre.mk head/sys/mips/cavium/std.octeon1 Modified: head/sys/conf/kern.pre.mk ============================================================================== --- head/sys/conf/kern.pre.mk Wed Nov 6 04:38:49 2013 (r257734) +++ head/sys/conf/kern.pre.mk Wed Nov 6 05:26:15 2013 (r257735) @@ -80,16 +80,17 @@ INCLUDES+= -I$S/dev/cxgb -I$S/dev/cxgbe CFLAGS= ${COPTFLAGS} ${C_DIALECT} ${DEBUG} ${CWARNFLAGS} CFLAGS+= ${INCLUDES} -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h +CFLAGS_PARAM_INLINE_UNIT_GROWTH?=100 +CFLAGS_PARAM_LARGE_FUNCTION_GROWTH?=1000 +.if ${MACHINE_CPUARCH} == "mips" +CFLAGS_ARCH_PARAMS?=--param max-inline-insns-single=1000 +.endif .if ${COMPILER_TYPE} != "clang" CFLAGS+= -fno-common -finline-limit=${INLINE_LIMIT} -.if ${MACHINE_CPUARCH} != "mips" -CFLAGS+= --param inline-unit-growth=100 -CFLAGS+= --param large-function-growth=1000 -.else -# XXX Actually a gross hack just for Octeon because of the Simple Executive. -CFLAGS+= --param inline-unit-growth=10000 -CFLAGS+= --param large-function-growth=100000 -CFLAGS+= --param max-inline-insns-single=10000 +CFLAGS+= --param inline-unit-growth=${CFLAGS_PARAM_INLINE_UNIT_GROWTH} +CFLAGS+= --param large-function-growth=${CFLAGS_PARAM_LARGE_FUNCTION_GROWTH} +.if defined(CFLAGS_ARCH_PARAMS) +CFLAGS+=${CFLAGS_ARCH_PARAMS} .endif .endif WERROR?= -Werror @@ -193,7 +194,7 @@ MKMODULESENV+= WITHOUT_MODULES="${WITHOU MKMODULESENV+= DEBUG_FLAGS="${DEBUG}" .endif -# Are various things configured? +# Detect knerel config options that force stack frames to be turned on. DDB_ENABLED!= grep DDB opt_ddb.h || true ; echo DTR_ENABLED!= grep KDTRACE_FRAME opt_kdtrace.h || true ; echo HWPMC_ENABLED!= grep HWPMC opt_hwpmc_hooks.h || true ; echo Modified: head/sys/mips/cavium/std.octeon1 ============================================================================== --- head/sys/mips/cavium/std.octeon1 Wed Nov 6 04:38:49 2013 (r257734) +++ head/sys/mips/cavium/std.octeon1 Wed Nov 6 05:26:15 2013 (r257735) @@ -3,3 +3,7 @@ files "../cavium/files.octeon1" machine mips mips64 cpu CPU_CNMIPS + +makeoptions CFLAGS_PARAM_INLINE_UNIT_GROWTH=10000 +makeoptions CFLAGS_PARAM_LARGE_FUNCTION_GROWTH=100000 +makeoptions CFLAGS_ARCH_PARAMS="--param max-inline-insns-single=10000" From owner-svn-src-head@FreeBSD.ORG Wed Nov 6 06:11:19 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 69166535; Wed, 6 Nov 2013 06:11:19 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DCE722474; Wed, 6 Nov 2013 06:11:17 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.7/8.14.7) with ESMTP id rA66BF6j013649 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 6 Nov 2013 10:11:15 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.7/8.14.7/Submit) id rA66BFAS013648; Wed, 6 Nov 2013 10:11:15 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Wed, 6 Nov 2013 10:11:15 +0400 From: Gleb Smirnoff To: Peter Wemm Subject: Re: svn commit: r257696 - in head: libexec/rbootd share/man/man9 sys/compat/svr4 sys/net sys/sys Message-ID: <20131106061115.GO7577@FreeBSD.org> References: <201311051029.rA5ATmmM017799@svn.freebsd.org> <201311051447.52382.jhb@freebsd.org> <20131105204217.GK7577@FreeBSD.org> <201311051718.26356.jhb@freebsd.org> <52798A09.5020303@wemm.org> <52798EA3.2060407@wemm.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <52798EA3.2060407@wemm.org> User-Agent: Mutt/1.5.22 (2013-10-16) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, John Baldwin X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Nov 2013 06:11:19 -0000 On Tue, Nov 05, 2013 at 04:34:43PM -0800, Peter Wemm wrote: P> > eg: /usr/sbin/traceroute after the change: P> > # traceroute www.freebsd.org P> > traceroute: ifaddrlist: SIOCGIFADDR: bge0: Can't assign requested address P> > P> > Hint: linux doesn't have a sa_len, so code that originates on Linux P> > will no longer work. The code glebius removed used to work around this. P> > P> > This is not old binaries, this is binaries compiled *today*. P> > P> I may have to take this back. I mis-read the removed code for P> SIOCSIFADDR etc that had the sa_len emulation in it. I might be hitting P> a bug in r257692 ("rewrite in_control"). P> P> I will check and report back. My apologies for potentially jumping the P> gun on this. Yes, much more probable that this is a regression from my in_control() rewrite. Sorry. I will look at this today. -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Wed Nov 6 06:20:32 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B3438720; Wed, 6 Nov 2013 06:20:32 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3007B24C9; Wed, 6 Nov 2013 06:20:31 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.7/8.14.7) with ESMTP id rA66KTXK013685 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 6 Nov 2013 10:20:29 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.7/8.14.7/Submit) id rA66KTUr013684; Wed, 6 Nov 2013 10:20:29 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Wed, 6 Nov 2013 10:20:29 +0400 From: Gleb Smirnoff To: John Baldwin , Adrian Chadd Subject: Re: svn commit: r257696 - in head: libexec/rbootd share/man/man9 sys/compat/svr4 sys/net sys/sys Message-ID: <20131106062029.GP7577@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201311051718.26356.jhb@freebsd.org> User-Agent: Mutt/1.5.22 (2013-10-16) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Nov 2013 06:20:32 -0000 John, Adrian, On Tue, Nov 05, 2013 at 05:18:26PM -0500, John Baldwin wrote: J> Mmmm, people run older versions of binaries (even open source ones) on newer OS's J> perhaps more often than you think. The COMPAT_43 stuff can be dropped certainly, J> but people will almost certainly do rolling upgrades where they upgrade the OS J> on their machines before they upgrade their packages. On Tue, Nov 05, 2013 at 02:25:13PM -0800, Adrian Chadd wrote: A> My main worry about this kind of work is that you're just steamrolling A> through stuff that yes, should be done, but with little warning and no A> API deprecation schedule. A> A> I'd much rather see this stuff handled more formally - we mark the API A> as deprecated and remove it in the next release. A> A> I really don't like seeing steamrolling through the kernel and A> deprecating APIs with minimal warning and having no (optional) A> backwards compatibility implementations. That's what made us stand out A> from Linux - we kept old APIs around as much as we could. Linux wasn't A> terribly good at this. One reply to both of you. The schedule is the following: we are compatible with previous major version. The interface had changed in early 10.0-CURRENT, and during the entire 10.0-CURRENT life it has supported the new and the old interface and this went into stable/10. When doing the change, I have pronounced this deprecation schedule. If anyone upgrades to next major: 9.x -> 10.x, or 10.x -> 11.x, including package sets, then everything will be working for him. -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Wed Nov 6 06:42:10 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D7BDACB2; Wed, 6 Nov 2013 06:42:10 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 509992593; Wed, 6 Nov 2013 06:42:09 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.7/8.14.7) with ESMTP id rA66g7B0013800 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 6 Nov 2013 10:42:07 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.7/8.14.7/Submit) id rA66g7Lv013799; Wed, 6 Nov 2013 10:42:07 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Wed, 6 Nov 2013 10:42:07 +0400 From: Gleb Smirnoff To: Peter Wemm Subject: Re: svn commit: r257696 - in head: libexec/rbootd share/man/man9 sys/compat/svr4 sys/net sys/sys Message-ID: <20131106064207.GQ7577@FreeBSD.org> References: <201311051029.rA5ATmmM017799@svn.freebsd.org> <201311051447.52382.jhb@freebsd.org> <20131105204217.GK7577@FreeBSD.org> <201311051718.26356.jhb@freebsd.org> <52798A09.5020303@wemm.org> <52798EA3.2060407@wemm.org> <20131106061115.GO7577@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20131106061115.GO7577@FreeBSD.org> User-Agent: Mutt/1.5.22 (2013-10-16) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, John Baldwin X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Nov 2013 06:42:10 -0000 On Wed, Nov 06, 2013 at 10:11:15AM +0400, Gleb Smirnoff wrote: T> On Tue, Nov 05, 2013 at 04:34:43PM -0800, Peter Wemm wrote: T> P> > eg: /usr/sbin/traceroute after the change: T> P> > # traceroute www.freebsd.org T> P> > traceroute: ifaddrlist: SIOCGIFADDR: bge0: Can't assign requested address T> P> > T> P> > Hint: linux doesn't have a sa_len, so code that originates on Linux T> P> > will no longer work. The code glebius removed used to work around this. T> P> > T> P> > This is not old binaries, this is binaries compiled *today*. T> P> > T> P> I may have to take this back. I mis-read the removed code for T> P> SIOCSIFADDR etc that had the sa_len emulation in it. I might be hitting T> P> a bug in r257692 ("rewrite in_control"). T> P> T> P> I will check and report back. My apologies for potentially jumping the T> P> gun on this. T> T> Yes, much more probable that this is a regression from my in_control() T> rewrite. Sorry. I will look at this today. Oh, a terrible braino from me. I'll fix it today. -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Wed Nov 6 07:46:10 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B41467CA; Wed, 6 Nov 2013 07:46:10 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A172328A7; Wed, 6 Nov 2013 07:46:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA67kA61067574; Wed, 6 Nov 2013 07:46:10 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA67kApH067573; Wed, 6 Nov 2013 07:46:10 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201311060746.rA67kApH067573@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Wed, 6 Nov 2013 07:46:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257736 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Nov 2013 07:46:10 -0000 Author: pjd Date: Wed Nov 6 07:46:10 2013 New Revision: 257736 URL: http://svnweb.freebsd.org/changeset/base/257736 Log: - Remove mac_get_fd/mac_set_fd - those are not syscalls. The __mac_get_fd() and __mac_set_fd() syscalls are listed earlier. - Correct typo in syscall name. It should be sched_rr_get_interval, not sched_rr_getinterval. Submitted by: David Drysdale MFC after: 3 days Modified: head/sys/kern/capabilities.conf Modified: head/sys/kern/capabilities.conf ============================================================================== --- head/sys/kern/capabilities.conf Wed Nov 6 05:26:15 2013 (r257735) +++ head/sys/kern/capabilities.conf Wed Nov 6 07:46:10 2013 (r257736) @@ -386,13 +386,6 @@ listen lseek ## -## Allow MAC label operations by file descriptor, subject to capability -## rights. -## -mac_get_fd -mac_set_fd - -## ## Allow simple VM operations on the current process. ## madvise @@ -552,7 +545,7 @@ sched_get_priority_min ## sched_getparam sched_getscheduler -sched_rr_getinterval +sched_rr_get_interval sched_setparam sched_setscheduler sched_yield From owner-svn-src-head@FreeBSD.ORG Wed Nov 6 07:55:32 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 940DCD8B; Wed, 6 Nov 2013 07:55:32 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 314D8291B; Wed, 6 Nov 2013 07:55:31 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7::432:d81e:b512:b3] (unknown [IPv6:2001:7b8:3a7:0:432:d81e:b512:b3]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id BC3F95C43; Wed, 6 Nov 2013 08:55:23 +0100 (CET) Content-Type: multipart/signed; boundary="Apple-Mail=_6BFB7C6F-9464-4F54-83A1-21954AA0A6C1"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 7.0 \(1816\)) Subject: Re: svn commit: r257691 - head/gnu/lib/libgcc From: Dimitry Andric In-Reply-To: <20131106144724.I3234@besplex.bde.org> Date: Wed, 6 Nov 2013 08:55:16 +0100 Message-Id: <38BB8918-1311-4C23-8992-43A272250F05@FreeBSD.org> References: <201311050737.rA57bZkq059529@svn.freebsd.org> <20131105154519.GD65141@onelab2.iet.unipi.it> <20131106144724.I3234@besplex.bde.org> To: Bruce Evans X-Mailer: Apple Mail (2.1816) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Luigi Rizzo X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Nov 2013 07:55:32 -0000 --Apple-Mail=_6BFB7C6F-9464-4F54-83A1-21954AA0A6C1 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 06 Nov 2013, at 05:30, Bruce Evans wrote: > On Tue, 5 Nov 2013, Luigi Rizzo wrote: >> On Tue, Nov 05, 2013 at 07:37:35AM +0000, Dimitry Andric wrote: >>> Log: >>> Fix libgcc build with gcc after r257645, by using = -Wno-static-in-inline >>> for clang only. > This still just breaks the warning. See my previous reply. (For gcc, > it is unclear if the missing warning is due too fewer warnings by > default or if it is because gcc's default for plain inline is = different > from clang's so that the code is correct for gcc.). First of all, gcc only emits this warning when using -pedantic, see contrib/gcc/c-typeck.c, around line 2123. However, our copy of gcc also ships with a faulty C99 test in contrib/gcclibs/include/ansidecl.h, which has (around line 176): /* inline requires special treatment; it's in C99, and GCC >=3D2.7 = supports = =20 it too, but it's not in C89. */ = = =20 #undef inline = = =20 #if __STDC_VERSION__ > 199901L = = =20 /* it's a keyword */ = = =20 #else = = =20 # if GCC_VERSION >=3D 2007 = = =20 # define inline __inline__ /* __inline__ prevents -pedantic warnings = */ = =20 # else = = =20 # define inline /* nothing */ = = =20 # endif = = =20 #endif = = =20 Upstream gcc fixed this here: = http://gcc.gnu.org/viewcvs/gcc/trunk/include/ansidecl.h?r1=3D155654&r2=3D1= 55653&pathrev=3D155654 >> I wonder if it is worthwhile adding to the default rules some >> compiler-specific CFLAGS, say CFLAGS_CLANG and CFLAGS_GCC >>=20 >> (there is only a handful of cases now so maybe it is overkill, >> and it harms readability; on the other hand, the Makefiles >> already make a lot of assumptions on variable names) > No, that would further simplify breaking warnings instead of fixing = the > bugs exposed by warnings. The code should be portable so that it = works > with any compiler. That is just not so easy for contrib'ed code = unless > the vendor made it portable. I agree for this particular case, but there are other places in the tree where we must pass either clang-specific or gcc-specific flags. Introducing the variables Luigi suggested makes those Makefiles a little less ugly, at least. > I checked that libgcc is compiled by default with -std=3Dgnu99. This > is just the default from bsd.sys.mk. It is obviously wrong for = libgcc, > since the plain inlines in it require gnu89. Yes, I agree. This can be fixed in libgcc's Makefile, but unfortunately clang will still emit the warning. > gnu99 gives consistenly > broken C99 semantic for both gcc and clang. Only clang warned about > this, and the warning has been broken. Indeed, it always emits the warning, even for -std=3Dgnu89, and even = when __inline__ is explicitly used. This could probably be considered a bug, but I think upstream has meant this as a general warning towards making code C99-compliant. Is it too hard to make a static variable non-static? :) -Dimitry --Apple-Mail=_6BFB7C6F-9464-4F54-83A1-21954AA0A6C1 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.22 (Darwin) iEYEARECAAYFAlJ59egACgkQsF6jCi4glqMJdwCg8LcU1cOJaXrM7CAgmu4Qk2Ug uvQAnRSn724ttJkCOZOL89vm7i0UQiwm =VRbA -----END PGP SIGNATURE----- --Apple-Mail=_6BFB7C6F-9464-4F54-83A1-21954AA0A6C1-- From owner-svn-src-head@FreeBSD.ORG Wed Nov 6 08:36:08 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id AA343F1D; Wed, 6 Nov 2013 08:36:08 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 961AF2B2E; Wed, 6 Nov 2013 08:36:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA68a8oa084675; Wed, 6 Nov 2013 08:36:08 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA68a8Zk084674; Wed, 6 Nov 2013 08:36:08 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201311060836.rA68a8Zk084674@svn.freebsd.org> From: Gleb Smirnoff Date: Wed, 6 Nov 2013 08:36:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257737 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Nov 2013 08:36:08 -0000 Author: glebius Date: Wed Nov 6 08:36:08 2013 New Revision: 257737 URL: http://svnweb.freebsd.org/changeset/base/257737 Log: Fix my braino in r257692. For SIOCG*ADDR we don't need exact match on specified address, actually in most cases the address isn't specified. Reported by: peter Modified: head/sys/netinet/in.c Modified: head/sys/netinet/in.c ============================================================================== --- head/sys/netinet/in.c Wed Nov 6 07:46:10 2013 (r257736) +++ head/sys/netinet/in.c Wed Nov 6 08:36:08 2013 (r257737) @@ -237,6 +237,7 @@ in_control(struct socket *so, u_long cmd { struct ifreq *ifr = (struct ifreq *)data; struct sockaddr_in *addr = (struct sockaddr_in *)&ifr->ifr_addr; + struct ifaddr *ifa; struct in_ifaddr *ia; int error; @@ -279,19 +280,25 @@ in_control(struct socket *so, u_long cmd return ((*ifp->if_ioctl)(ifp, cmd, data)); } + if (addr->sin_addr.s_addr != INADDR_ANY && + prison_check_ip4(td->td_ucred, &addr->sin_addr) != 0) + return (EADDRNOTAVAIL); + /* - * Find address for this interface, if it exists. + * For SIOCGIFADDR, pick the first address. For the rest of + * ioctls, try to find specified address. */ - IN_IFADDR_RLOCK(); - LIST_FOREACH(ia, INADDR_HASH(addr->sin_addr.s_addr), ia_hash) { - if (ia->ia_ifp == ifp && - ia->ia_addr.sin_addr.s_addr == addr->sin_addr.s_addr && - prison_check_ip4(td->td_ucred, &addr->sin_addr) == 0) + IF_ADDR_RLOCK(ifp); + TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { + ia = (struct in_ifaddr *)ifa; + if (cmd == SIOCGIFADDR || addr->sin_addr.s_addr == INADDR_ANY) + break; + if (ia->ia_addr.sin_addr.s_addr == addr->sin_addr.s_addr) break; } - if (ia == NULL) { - IN_IFADDR_RUNLOCK(); + if (ifa == NULL) { + IF_ADDR_RUNLOCK(ifp); return (EADDRNOTAVAIL); } @@ -322,7 +329,7 @@ in_control(struct socket *so, u_long cmd break; } - IN_IFADDR_RUNLOCK(); + IF_ADDR_RUNLOCK(ifp); return (error); } From owner-svn-src-head@FreeBSD.ORG Wed Nov 6 08:36:31 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B0119E4; Wed, 6 Nov 2013 08:36:31 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2AAAD2B31; Wed, 6 Nov 2013 08:36:30 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.7/8.14.7) with ESMTP id rA68aSSo014366 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 6 Nov 2013 12:36:28 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.7/8.14.7/Submit) id rA68aRYw014365; Wed, 6 Nov 2013 12:36:27 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Wed, 6 Nov 2013 12:36:27 +0400 From: Gleb Smirnoff To: Peter Wemm Subject: Re: svn commit: r257696 - in head: libexec/rbootd share/man/man9 sys/compat/svr4 sys/net sys/sys Message-ID: <20131106083627.GS7577@FreeBSD.org> References: <201311051029.rA5ATmmM017799@svn.freebsd.org> <201311051447.52382.jhb@freebsd.org> <20131105204217.GK7577@FreeBSD.org> <201311051718.26356.jhb@freebsd.org> <52798A09.5020303@wemm.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <52798A09.5020303@wemm.org> User-Agent: Mutt/1.5.22 (2013-10-16) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, John Baldwin X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Nov 2013 08:36:31 -0000 On Tue, Nov 05, 2013 at 04:15:05PM -0800, Peter Wemm wrote: P> eg: /usr/sbin/traceroute after the change: P> # traceroute www.freebsd.org P> traceroute: ifaddrlist: SIOCGIFADDR: bge0: Can't assign requested address Fixed. -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Wed Nov 6 09:41:20 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 21A8FA3E; Wed, 6 Nov 2013 09:41:20 +0000 (UTC) (envelope-from ray@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0F1742FB4; Wed, 6 Nov 2013 09:41:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA69fJ7p009271; Wed, 6 Nov 2013 09:41:19 GMT (envelope-from ray@svn.freebsd.org) Received: (from ray@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA69fJOi009270; Wed, 6 Nov 2013 09:41:19 GMT (envelope-from ray@svn.freebsd.org) Message-Id: <201311060941.rA69fJOi009270@svn.freebsd.org> From: Aleksandr Rybalko Date: Wed, 6 Nov 2013 09:41:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257738 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Nov 2013 09:41:20 -0000 Author: ray Date: Wed Nov 6 09:41:19 2013 New Revision: 257738 URL: http://svnweb.freebsd.org/changeset/base/257738 Log: Add common bus_space tag definition shared for most supported ARMv6/v7 SoCs. Tested by: ian, ray Added: head/sys/arm/arm/bus_space-v6.c (contents, props changed) Added: head/sys/arm/arm/bus_space-v6.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/arm/bus_space-v6.c Wed Nov 6 09:41:19 2013 (r257738) @@ -0,0 +1,153 @@ +/*- + * Copyright (c) 2012 Damjan Marion + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include + +#include + +/* Prototypes for all the bus_space structure functions */ +bs_protos(generic); +bs_protos(generic_armv4); + +/* + * The bus space tag. This is constant for all instances, so + * we never have to explicitly "create" it. + */ +static struct bus_space _base_tag = { + /* cookie */ + (void *) 0, + + /* mapping/unmapping */ + generic_bs_map, + generic_bs_unmap, + generic_bs_subregion, + + /* allocation/deallocation */ + generic_bs_alloc, + generic_bs_free, + + /* barrier */ + generic_bs_barrier, + + /* read (single) */ + generic_bs_r_1, + generic_armv4_bs_r_2, + generic_bs_r_4, + NULL, + + /* read multiple */ + generic_bs_rm_1, + generic_armv4_bs_rm_2, + generic_bs_rm_4, + NULL, + + /* read region */ + generic_bs_rr_1, + generic_armv4_bs_rr_2, + generic_bs_rr_4, + NULL, + + /* write (single) */ + generic_bs_w_1, + generic_armv4_bs_w_2, + generic_bs_w_4, + NULL, + + /* write multiple */ + generic_bs_wm_1, + generic_armv4_bs_wm_2, + generic_bs_wm_4, + NULL, + + /* write region */ + generic_bs_wr_1, + generic_armv4_bs_wr_2, + generic_bs_wr_4, + NULL, + + /* set multiple */ + NULL, + NULL, + NULL, + NULL, + + /* set region */ + generic_bs_sr_1, + generic_armv4_bs_sr_2, + generic_bs_sr_4, + NULL, + + /* copy */ + NULL, + generic_armv4_bs_c_2, + NULL, + NULL, + + /* read stream (single) */ + NULL, + NULL, + NULL, + NULL, + + /* read multiple stream */ + NULL, + generic_armv4_bs_rm_2, /* bus_space_read_multi_stream_2 */ + NULL, + NULL, + + /* read region stream */ + NULL, + NULL, + NULL, + NULL, + + /* write stream (single) */ + NULL, + NULL, + NULL, + NULL, + + /* write multiple stream */ + NULL, + generic_armv4_bs_wm_2, /* bus_space_write_multi_stream_2 */ + NULL, + NULL, + + /* write region stream */ + NULL, + NULL, + NULL, + NULL +}; + +bus_space_tag_t fdtbus_bs_tag = &_base_tag; From owner-svn-src-head@FreeBSD.ORG Wed Nov 6 09:44:34 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 01830BD4; Wed, 6 Nov 2013 09:44:34 +0000 (UTC) (envelope-from ray@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C92C62FDB; Wed, 6 Nov 2013 09:44:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA69iXwh009689; Wed, 6 Nov 2013 09:44:33 GMT (envelope-from ray@svn.freebsd.org) Received: (from ray@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA69iXmJ009683; Wed, 6 Nov 2013 09:44:33 GMT (envelope-from ray@svn.freebsd.org) Message-Id: <201311060944.rA69iXmJ009683@svn.freebsd.org> From: Aleksandr Rybalko Date: Wed, 6 Nov 2013 09:44:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257739 - head/sys/arm/freescale/imx X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Nov 2013 09:44:34 -0000 Author: ray Date: Wed Nov 6 09:44:32 2013 New Revision: 257739 URL: http://svnweb.freebsd.org/changeset/base/257739 Log: Switch to use common ARMv6/v7 bus_space tag. Tested by: ian, ray Deleted: head/sys/arm/freescale/imx/bus_space.c Modified: head/sys/arm/freescale/imx/files.imx51 head/sys/arm/freescale/imx/files.imx53 head/sys/arm/freescale/imx/files.imx6 Modified: head/sys/arm/freescale/imx/files.imx51 ============================================================================== --- head/sys/arm/freescale/imx/files.imx51 Wed Nov 6 09:41:19 2013 (r257738) +++ head/sys/arm/freescale/imx/files.imx51 Wed Nov 6 09:44:32 2013 (r257739) @@ -11,7 +11,7 @@ kern/kern_clocksource.c standard arm/freescale/imx/imx_machdep.c standard arm/freescale/imx/imx51_machdep.c standard arm/freescale/imx/common.c standard -arm/freescale/imx/bus_space.c standard +arm/arm/bus_space-v6.c standard # Dummy serial console #arm/freescale/imx/console.c standard Modified: head/sys/arm/freescale/imx/files.imx53 ============================================================================== --- head/sys/arm/freescale/imx/files.imx53 Wed Nov 6 09:41:19 2013 (r257738) +++ head/sys/arm/freescale/imx/files.imx53 Wed Nov 6 09:44:32 2013 (r257739) @@ -11,7 +11,7 @@ kern/kern_clocksource.c standard arm/freescale/imx/imx_machdep.c standard arm/freescale/imx/imx53_machdep.c standard arm/freescale/imx/common.c standard -arm/freescale/imx/bus_space.c standard +arm/arm/bus_space-v6.c standard # Special serial console for debuging early boot code #arm/freescale/imx/console.c standard Modified: head/sys/arm/freescale/imx/files.imx6 ============================================================================== --- head/sys/arm/freescale/imx/files.imx6 Wed Nov 6 09:41:19 2013 (r257738) +++ head/sys/arm/freescale/imx/files.imx6 Wed Nov 6 09:44:32 2013 (r257739) @@ -16,7 +16,7 @@ kern/kern_clocksource.c standard # arm/arm/gic.c standard arm/arm/pl310.c standard -arm/freescale/imx/bus_space.c standard +arm/arm/bus_space-v6.c standard arm/freescale/imx/common.c standard arm/freescale/imx/imx6_anatop.c standard arm/freescale/imx/imx6_ccm.c standard From owner-svn-src-head@FreeBSD.ORG Wed Nov 6 10:31:54 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 06088702; Wed, 6 Nov 2013 10:31:54 +0000 (UTC) (envelope-from ray@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CDC1022E6; Wed, 6 Nov 2013 10:31:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA6AVr2f027961; Wed, 6 Nov 2013 10:31:53 GMT (envelope-from ray@svn.freebsd.org) Received: (from ray@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA6AVraS027958; Wed, 6 Nov 2013 10:31:53 GMT (envelope-from ray@svn.freebsd.org) Message-Id: <201311061031.rA6AVraS027958@svn.freebsd.org> From: Aleksandr Rybalko Date: Wed, 6 Nov 2013 10:31:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257740 - in head/sys/arm: allwinner allwinner/a20 rockchip X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Nov 2013 10:31:54 -0000 Author: ray Date: Wed Nov 6 10:31:52 2013 New Revision: 257740 URL: http://svnweb.freebsd.org/changeset/base/257740 Log: Switch allwinner A10/A20 and rockchip ports to use common ARMv6/v7 bus_space tag. Tested by: ganbold Deleted: head/sys/arm/allwinner/bus_space.c head/sys/arm/rockchip/bus_space.c Modified: head/sys/arm/allwinner/a20/files.a20 head/sys/arm/allwinner/files.a10 head/sys/arm/rockchip/files.rk30xx Modified: head/sys/arm/allwinner/a20/files.a20 ============================================================================== --- head/sys/arm/allwinner/a20/files.a20 Wed Nov 6 09:44:32 2013 (r257739) +++ head/sys/arm/allwinner/a20/files.a20 Wed Nov 6 10:31:52 2013 (r257740) @@ -16,6 +16,6 @@ arm/allwinner/a10_gpio.c optional gpio arm/allwinner/a10_ehci.c optional ehci arm/allwinner/a10_wdog.c standard arm/allwinner/timer.c standard -arm/allwinner/bus_space.c standard +arm/arm/bus_space-v6.c standard arm/allwinner/common.c standard arm/allwinner/a10_machdep.c standard Modified: head/sys/arm/allwinner/files.a10 ============================================================================== --- head/sys/arm/allwinner/files.a10 Wed Nov 6 09:44:32 2013 (r257739) +++ head/sys/arm/allwinner/files.a10 Wed Nov 6 10:31:52 2013 (r257740) @@ -16,7 +16,7 @@ arm/allwinner/a10_ehci.c optional ehci arm/allwinner/a10_wdog.c standard arm/allwinner/timer.c standard arm/allwinner/aintc.c standard -arm/allwinner/bus_space.c standard +arm/arm/bus_space-v6.c standard arm/allwinner/common.c standard #arm/allwinner/console.c standard arm/allwinner/a10_machdep.c standard Modified: head/sys/arm/rockchip/files.rk30xx ============================================================================== --- head/sys/arm/rockchip/files.rk30xx Wed Nov 6 09:44:32 2013 (r257739) +++ head/sys/arm/rockchip/files.rk30xx Wed Nov 6 10:31:52 2013 (r257740) @@ -12,7 +12,7 @@ arm/arm/irq_dispatch.S standard arm/arm/gic.c standard arm/arm/mpcore_timer.c standard -arm/rockchip/bus_space.c standard +arm/arm/bus_space-v6.c standard arm/rockchip/common.c standard arm/rockchip/rk30xx_machdep.c standard arm/rockchip/rk30xx_pmu.c standard From owner-svn-src-head@FreeBSD.ORG Wed Nov 6 12:45:09 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 99C77433; Wed, 6 Nov 2013 12:45:09 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail105.syd.optusnet.com.au (mail105.syd.optusnet.com.au [211.29.132.249]) by mx1.freebsd.org (Postfix) with ESMTP id 430DE2C3B; Wed, 6 Nov 2013 12:45:09 +0000 (UTC) Received: from c122-106-156-23.carlnfd1.nsw.optusnet.com.au (c122-106-156-23.carlnfd1.nsw.optusnet.com.au [122.106.156.23]) by mail105.syd.optusnet.com.au (Postfix) with ESMTPS id 0934610419B2; Wed, 6 Nov 2013 23:44:55 +1100 (EST) Date: Wed, 6 Nov 2013 23:44:54 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Dimitry Andric Subject: Re: svn commit: r257691 - head/gnu/lib/libgcc In-Reply-To: <38BB8918-1311-4C23-8992-43A272250F05@FreeBSD.org> Message-ID: <20131106224119.U4460@besplex.bde.org> References: <201311050737.rA57bZkq059529@svn.freebsd.org> <20131105154519.GD65141@onelab2.iet.unipi.it> <20131106144724.I3234@besplex.bde.org> <38BB8918-1311-4C23-8992-43A272250F05@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=bpB1Wiqi c=1 sm=1 tr=0 a=ebeQFi2P/qHVC0Yw9JDJ4g==:117 a=PO7r1zJSAAAA:8 a=cCbrWYaO2fIA:10 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=O6xDf_UZitYA:10 a=mDV3o1hIAAAA:8 a=ltDKUUI1AAAA:8 a=LEBouNvmz1CrLLyC-pIA:9 a=CjuIK1q_8ugA:10 a=kT6dOc83ZcwA:10 Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Luigi Rizzo , Bruce Evans X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Nov 2013 12:45:09 -0000 On Wed, 6 Nov 2013, Dimitry Andric wrote: > On 06 Nov 2013, at 05:30, Bruce Evans wrote: >> On Tue, 5 Nov 2013, Luigi Rizzo wrote: >>> On Tue, Nov 05, 2013 at 07:37:35AM +0000, Dimitry Andric wrote: >>>> Log: >>>> Fix libgcc build with gcc after r257645, by using -Wno-static-in-inline >>>> for clang only. >> This still just breaks the warning. See my previous reply. (For gcc, >> it is unclear if the missing warning is due too fewer warnings by >> default or if it is because gcc's default for plain inline is different >> from clang's so that the code is correct for gcc.). I think I saw it backed out because it breaks the build even more than the previous version. > First of all, gcc only emits this warning when using -pedantic, see > contrib/gcc/c-typeck.c, around line 2123. Bug in gcc or clang to be inconsistent. > However, our copy of gcc also > ships with a faulty C99 test in contrib/gcclibs/include/ansidecl.h, > which has (around line 176): > > /* inline requires special treatment; it's in C99, and GCC >=2.7 supports > it too, but it's not in C89. */ > #undef inline > #if __STDC_VERSION__ > 199901L > /* it's a keyword */ > #else > # if GCC_VERSION >= 2007 > # define inline __inline__ /* __inline__ prevents -pedantic warnings */ > # else > # define inline /* nothing */ > # endif > #endif > > Upstream gcc fixed this here: > > http://gcc.gnu.org/viewcvs/gcc/trunk/include/ansidecl.h?r1=155654&r2=155653&pathrev=155654 Something mangled the diff. The inequality test is strange. C99 only gives == 199901, and I think only C11 goes higher and that was impossible until recently, long after the gcc-4.2.1 code was written. Ah, I see the test changed to >= in the most mangled part of the diff. However, that will increase the chance that inline is not defined away. Now I don't see why it is not defined away for everything except C11: - __STDC_VERSION__ > 199901L is false because equality holds for C99 - GCC_VERSION >= 2007 is false because neither gcc nor clang define it. gcc-4.2.1 is too old to define it that large anyway. >> I checked that libgcc is compiled by default with -std=gnu99. This >> is just the default from bsd.sys.mk. It is obviously wrong for libgcc, >> since the plain inlines in it require gnu89. > > Yes, I agree. This can be fixed in libgcc's Makefile, but unfortunately > clang will still emit the warning. Actually, it is not obviously wrong. There are some extern declarations in unwind-generic.h that modify the plain inline declarations in unwind-dw2.c so that the latter are (non-tentative) definitions for C99 inline semantics. E.g., _Unwind_GetGR () is declared as extern [not inline] in the header and as [plain] inline in the .c file. The externs are explicit, but this is just a style bug -- prototypes without extern give the same nasty behaviour of turning tentative inlines into functions. So if an application declares malloc() "for safety" before including , then it will break any C99 tentative inline in the implementation. Here it mostly unbreaks the tentative inlines. >> gnu99 gives consistenly >> broken C99 semantic for both gcc and clang. Only clang warned about >> this, and the warning has been broken. > > Indeed, it always emits the warning, even for -std=gnu89, and even when > __inline__ is explicitly used. This could probably be considered a bug, > but I think upstream has meant this as a general warning towards making > code C99-compliant. Is it too hard to make a static variable > non-static? :) Yes, it is too hard since it requires more care with namespaces. The variable would have to be named with leading underscore[s], and if it is used a lot then the code becomes uglier, or obfuscated if the underscore name is renamed back to the static name using a macro. Actually, -std=gnu99 doesn't even give consistent breakage. It is inconsistent with its documentation. Parts of gcc.1 and gcc.info say that it gives C99 with gnu extensions. Another part overrides this with: % `-fgnu89-inline' % The option `-fgnu89-inline' tells GCC to use the traditional GNU % semantics for `inline' functions when in C99 mode. *Note An % Inline Function is As Fast As a Macro: Inline. Using this option % is roughly equivalent to adding the `gnu_inline' function % attribute to all inline functions (*note Function Attributes::). % % This option is accepted by GCC versions 4.1.3 and up. In GCC % versions prior to 4.3, C99 inline semantics are not supported, and ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ This is wrong. FreeBSD's gcc-4.2.1 is not quite 4.2.1. It has been modified to support C99 inline semantics. But the modifications didn't update at least this part of the man page. It is unclear what std=-gnu99 does. Arguably, it should mean gcc semantics in 1999 and not change in later gcc's. But I think it did change (not just for inline in 4.3). clang has a hard time being compatible with gcc-4.2 when later gcc's aren't compatible. % thus this option is effectively assumed to be present regardless % of whether or not it is specified; the only effect of specifying % it explicitly is to disable warnings about using inline functions % in C99 mode. Likewise, the option `-fno-gnu89-inline' is not % supported in versions of GCC before 4.3. It will be supported % only in C99 or gnu99 mode, not in C89 or gnu89 mode. This is also wrong about -fno-gnu89-inline in FreeBSD's gcc-4.2.1. So portable code can't use the gnu89-inline flag or attribute any more than it can use the clang anti-warning flag :-(. This reminds me that all compiler-specific options in Makefiles are bugs. They are bad enough in *.mk in WARNS. % % The preprocesor macros `__GNUC_GNU_INLINE__' and % `__GNUC_STDC_INLINE__' may be used to check which semantics are in % effect for `inline' functions. *Note Common Predefined Macros: % (cpp)Common Predefined Macros. FreeBSD did update these. Bruce From owner-svn-src-head@FreeBSD.ORG Wed Nov 6 12:57:03 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 92EA79BB; Wed, 6 Nov 2013 12:57:03 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7ED9D2D07; Wed, 6 Nov 2013 12:57:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA6Cv3ZT076858; Wed, 6 Nov 2013 12:57:03 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA6Cv1cV076847; Wed, 6 Nov 2013 12:57:01 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201311061257.rA6Cv1cV076847@svn.freebsd.org> From: Hans Petter Selasky Date: Wed, 6 Nov 2013 12:57:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257743 - head/sys/dev/usb/wlan X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Nov 2013 12:57:03 -0000 Author: hselasky Date: Wed Nov 6 12:57:01 2013 New Revision: 257743 URL: http://svnweb.freebsd.org/changeset/base/257743 Log: Check for "ieee80211_vap_setup()" failure in all USB WLAN drivers. MFC after: 1 week Modified: head/sys/dev/usb/wlan/if_rsu.c head/sys/dev/usb/wlan/if_rum.c head/sys/dev/usb/wlan/if_run.c head/sys/dev/usb/wlan/if_uath.c head/sys/dev/usb/wlan/if_upgt.c head/sys/dev/usb/wlan/if_ural.c head/sys/dev/usb/wlan/if_urtw.c head/sys/dev/usb/wlan/if_urtwn.c head/sys/dev/usb/wlan/if_zyd.c Modified: head/sys/dev/usb/wlan/if_rsu.c ============================================================================== --- head/sys/dev/usb/wlan/if_rsu.c Wed Nov 6 11:42:45 2013 (r257742) +++ head/sys/dev/usb/wlan/if_rsu.c Wed Nov 6 12:57:01 2013 (r257743) @@ -481,8 +481,13 @@ rsu_vap_create(struct ieee80211com *ic, if (uvp == NULL) return (NULL); vap = &uvp->vap; - ieee80211_vap_setup(ic, vap, name, unit, opmode, - flags, bssid, mac); + + if (ieee80211_vap_setup(ic, vap, name, unit, opmode, + flags, bssid, mac) != 0) { + /* out of memory */ + free(uvp, M_80211_VAP); + return (NULL); + } /* override state transition machine */ uvp->newstate = vap->iv_newstate; Modified: head/sys/dev/usb/wlan/if_rum.c ============================================================================== --- head/sys/dev/usb/wlan/if_rum.c Wed Nov 6 11:42:45 2013 (r257742) +++ head/sys/dev/usb/wlan/if_rum.c Wed Nov 6 12:57:01 2013 (r257743) @@ -605,8 +605,13 @@ rum_vap_create(struct ieee80211com *ic, return NULL; vap = &rvp->vap; /* enable s/w bmiss handling for sta mode */ - ieee80211_vap_setup(ic, vap, name, unit, opmode, - flags | IEEE80211_CLONE_NOBEACONS, bssid, mac); + + if (ieee80211_vap_setup(ic, vap, name, unit, opmode, + flags | IEEE80211_CLONE_NOBEACONS, bssid, mac) != 0) { + /* out of memory */ + free(rvp, M_80211_VAP); + return (NULL); + } /* override state transition machine */ rvp->newstate = vap->iv_newstate; Modified: head/sys/dev/usb/wlan/if_run.c ============================================================================== --- head/sys/dev/usb/wlan/if_run.c Wed Nov 6 11:42:45 2013 (r257742) +++ head/sys/dev/usb/wlan/if_run.c Wed Nov 6 12:57:01 2013 (r257743) @@ -804,7 +804,13 @@ run_vap_create(struct ieee80211com *ic, if (rvp == NULL) return (NULL); vap = &rvp->vap; - ieee80211_vap_setup(ic, vap, name, unit, opmode, flags, bssid, mac); + + if (ieee80211_vap_setup(ic, vap, name, unit, + opmode, flags, bssid, mac) != 0) { + /* out of memory */ + free(rvp, M_80211_VAP); + return (NULL); + } vap->iv_key_update_begin = run_key_update_begin; vap->iv_key_update_end = run_key_update_end; Modified: head/sys/dev/usb/wlan/if_uath.c ============================================================================== --- head/sys/dev/usb/wlan/if_uath.c Wed Nov 6 11:42:45 2013 (r257742) +++ head/sys/dev/usb/wlan/if_uath.c Wed Nov 6 12:57:01 2013 (r257743) @@ -1073,8 +1073,13 @@ uath_vap_create(struct ieee80211com *ic, return (NULL); vap = &uvp->vap; /* enable s/w bmiss handling for sta mode */ - ieee80211_vap_setup(ic, vap, name, unit, opmode, - flags | IEEE80211_CLONE_NOBEACONS, bssid, mac); + + if (ieee80211_vap_setup(ic, vap, name, unit, opmode, + flags | IEEE80211_CLONE_NOBEACONS, bssid, mac) != 0) { + /* out of memory */ + free(uvp, M_80211_VAP); + return (NULL); + } /* override state transition machine */ uvp->newstate = vap->iv_newstate; Modified: head/sys/dev/usb/wlan/if_upgt.c ============================================================================== --- head/sys/dev/usb/wlan/if_upgt.c Wed Nov 6 11:42:45 2013 (r257742) +++ head/sys/dev/usb/wlan/if_upgt.c Wed Nov 6 12:57:01 2013 (r257743) @@ -1041,8 +1041,13 @@ upgt_vap_create(struct ieee80211com *ic, return NULL; vap = &uvp->vap; /* enable s/w bmiss handling for sta mode */ - ieee80211_vap_setup(ic, vap, name, unit, opmode, - flags | IEEE80211_CLONE_NOBEACONS, bssid, mac); + + if (ieee80211_vap_setup(ic, vap, name, unit, opmode, + flags | IEEE80211_CLONE_NOBEACONS, bssid, mac) != 0) { + /* out of memory */ + free(uvp, M_80211_VAP); + return (NULL); + } /* override state transition machine */ uvp->newstate = vap->iv_newstate; Modified: head/sys/dev/usb/wlan/if_ural.c ============================================================================== --- head/sys/dev/usb/wlan/if_ural.c Wed Nov 6 11:42:45 2013 (r257742) +++ head/sys/dev/usb/wlan/if_ural.c Wed Nov 6 12:57:01 2013 (r257743) @@ -590,8 +590,13 @@ ural_vap_create(struct ieee80211com *ic, return NULL; vap = &uvp->vap; /* enable s/w bmiss handling for sta mode */ - ieee80211_vap_setup(ic, vap, name, unit, opmode, - flags | IEEE80211_CLONE_NOBEACONS, bssid, mac); + + if (ieee80211_vap_setup(ic, vap, name, unit, opmode, + flags | IEEE80211_CLONE_NOBEACONS, bssid, mac) != 0) { + /* out of memory */ + free(uvp, M_80211_VAP); + return (NULL); + } /* override state transition machine */ uvp->newstate = vap->iv_newstate; Modified: head/sys/dev/usb/wlan/if_urtw.c ============================================================================== --- head/sys/dev/usb/wlan/if_urtw.c Wed Nov 6 11:42:45 2013 (r257742) +++ head/sys/dev/usb/wlan/if_urtw.c Wed Nov 6 12:57:01 2013 (r257743) @@ -1036,8 +1036,13 @@ urtw_vap_create(struct ieee80211com *ic, return (NULL); vap = &uvp->vap; /* enable s/w bmiss handling for sta mode */ - ieee80211_vap_setup(ic, vap, name, unit, opmode, - flags | IEEE80211_CLONE_NOBEACONS, bssid, mac); + + if (ieee80211_vap_setup(ic, vap, name, unit, opmode, + flags | IEEE80211_CLONE_NOBEACONS, bssid, mac) != 0) { + /* out of memory */ + free(uvp, M_80211_VAP); + return (NULL); + } /* override state transition machine */ uvp->newstate = vap->iv_newstate; Modified: head/sys/dev/usb/wlan/if_urtwn.c ============================================================================== --- head/sys/dev/usb/wlan/if_urtwn.c Wed Nov 6 11:42:45 2013 (r257742) +++ head/sys/dev/usb/wlan/if_urtwn.c Wed Nov 6 12:57:01 2013 (r257743) @@ -549,8 +549,13 @@ urtwn_vap_create(struct ieee80211com *ic return (NULL); vap = &uvp->vap; /* enable s/w bmiss handling for sta mode */ - ieee80211_vap_setup(ic, vap, name, unit, opmode, - flags | IEEE80211_CLONE_NOBEACONS, bssid, mac); + + if (ieee80211_vap_setup(ic, vap, name, unit, opmode, + flags | IEEE80211_CLONE_NOBEACONS, bssid, mac) != 0) { + /* out of memory */ + free(uvp, M_80211_VAP); + return (NULL); + } /* override state transition machine */ uvp->newstate = vap->iv_newstate; Modified: head/sys/dev/usb/wlan/if_zyd.c ============================================================================== --- head/sys/dev/usb/wlan/if_zyd.c Wed Nov 6 11:42:45 2013 (r257742) +++ head/sys/dev/usb/wlan/if_zyd.c Wed Nov 6 12:57:01 2013 (r257743) @@ -489,9 +489,14 @@ zyd_vap_create(struct ieee80211com *ic, if (zvp == NULL) return (NULL); vap = &zvp->vap; + /* enable s/w bmiss handling for sta mode */ - ieee80211_vap_setup(ic, vap, name, unit, opmode, - flags | IEEE80211_CLONE_NOBEACONS, bssid, mac); + if (ieee80211_vap_setup(ic, vap, name, unit, opmode, + flags | IEEE80211_CLONE_NOBEACONS, bssid, mac) != 0) { + /* out of memory */ + free(zvp, M_80211_VAP); + return (NULL); + } /* override state transition machine */ zvp->newstate = vap->iv_newstate; From owner-svn-src-head@FreeBSD.ORG Wed Nov 6 14:33:38 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 3435ED79; Wed, 6 Nov 2013 14:33:38 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2160523A5; Wed, 6 Nov 2013 14:33:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA6EXbm5010330; Wed, 6 Nov 2013 14:33:38 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA6EXbrF010329; Wed, 6 Nov 2013 14:33:37 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201311061433.rA6EXbrF010329@svn.freebsd.org> From: Nathan Whitehorn Date: Wed, 6 Nov 2013 14:33:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257745 - head/sys/dev/ofw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Nov 2013 14:33:38 -0000 Author: nwhitehorn Date: Wed Nov 6 14:33:37 2013 New Revision: 257745 URL: http://svnweb.freebsd.org/changeset/base/257745 Log: Make OF_nextprop() work correctly for FDT by using the libfdt fdt_next_property_offset() API. The old code would sometimes (e.g. on the device tree supplied by the RB800 boot loader) get confused and stop partway through listing properties. MFC after: 1 week Modified: head/sys/dev/ofw/ofw_fdt.c Modified: head/sys/dev/ofw/ofw_fdt.c ============================================================================== --- head/sys/dev/ofw/ofw_fdt.c Wed Nov 6 14:24:24 2013 (r257744) +++ head/sys/dev/ofw/ofw_fdt.c Wed Nov 6 14:33:37 2013 (r257745) @@ -137,26 +137,6 @@ fdt_phandle_offset(phandle_t p) return (pint - dtoff); } -static int -fdt_pointer_offset(const void *ptr) -{ - uintptr_t dt_struct, p; - int offset; - - p = (uintptr_t)ptr; - dt_struct = (uintptr_t)fdtp + fdt_off_dt_struct(fdtp); - - if ((p < dt_struct) || - p > (dt_struct + fdt_size_dt_struct(fdtp))) - return (-1); - - offset = p - dt_struct; - if (offset < 0) - return (-1); - - return (offset); -} - /* Return the next sibling of this node or 0. */ static phandle_t ofw_fdt_peer(ofw_t ofw, phandle_t node) @@ -285,41 +265,6 @@ ofw_fdt_getprop(ofw_t ofw, phandle_t pac return (len); } -static int -fdt_nextprop(int offset, char *buf, size_t size) -{ - const struct fdt_property *prop; - const char *name; - uint32_t tag; - int nextoffset, depth; - - depth = 0; - tag = fdt_next_tag(fdtp, offset, &nextoffset); - - /* Find the next prop */ - do { - offset = nextoffset; - tag = fdt_next_tag(fdtp, offset, &nextoffset); - - if (tag == FDT_BEGIN_NODE) - depth++; - else if (tag == FDT_END_NODE) - depth--; - else if ((tag == FDT_PROP) && (depth == 0)) { - prop = - (const struct fdt_property *)fdt_offset_ptr(fdtp, - offset, sizeof(*prop)); - name = fdt_string(fdtp, - fdt32_to_cpu(prop->nameoff)); - strncpy(buf, name, size); - return (strlen(name)); - } else - depth = -1; - } while (depth >= 0); - - return (0); -} - /* * Get the next property of a package. Return the actual len of retrieved * prop name. @@ -329,26 +274,40 @@ ofw_fdt_nextprop(ofw_t ofw, phandle_t pa size_t size) { const struct fdt_property *prop; - int offset, rv; + const char *name; + int offset; offset = fdt_phandle_offset(package); if (offset < 0) return (-1); - if (previous == NULL) - /* Find the first prop in the node */ - return (fdt_nextprop(offset, buf, size)); + /* Find the first prop in the node */ + offset = fdt_first_property_offset(fdtp, offset); - /* - * Advance to the previous prop - */ - prop = fdt_get_property(fdtp, offset, previous, NULL); + if (previous != NULL) { + while (offset >= 0) { + prop = fdt_get_property_by_offset(fdtp, offset, NULL); + if (prop == NULL) + return (-1); /* Internal error */ + + offset = fdt_next_property_offset(fdtp, offset); + if (offset < 0) + return (0); /* No more properties */ + + /* Check if the last one was the one we wanted */ + name = fdt_string(fdtp, fdt32_to_cpu(prop->nameoff)); + if (strcmp(name, previous) == 0) + break; + } + } + + prop = fdt_get_property_by_offset(fdtp, offset, &offset); if (prop == NULL) - return (-1); + return (-1); /* Internal error */ - offset = fdt_pointer_offset(prop); - rv = fdt_nextprop(offset, buf, size); - return (rv); + strncpy(buf, fdt_string(fdtp, fdt32_to_cpu(prop->nameoff)), size); + + return (strlen(buf)); } /* Set the value of a property of a package. */ From owner-svn-src-head@FreeBSD.ORG Wed Nov 6 14:36:39 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 1B989F1C; Wed, 6 Nov 2013 14:36:39 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0926823D0; Wed, 6 Nov 2013 14:36:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA6EacpT010715; Wed, 6 Nov 2013 14:36:38 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA6Eacd4010714; Wed, 6 Nov 2013 14:36:38 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201311061436.rA6Eacd4010714@svn.freebsd.org> From: Nathan Whitehorn Date: Wed, 6 Nov 2013 14:36:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257746 - head/sys/powerpc/booke X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Nov 2013 14:36:39 -0000 Author: nwhitehorn Date: Wed Nov 6 14:36:38 2013 New Revision: 257746 URL: http://svnweb.freebsd.org/changeset/base/257746 Log: Do not panic if pmap_mincore() is called. This prevents crashing userland binaries from bringing down the kernel. MFC after: 3 days Modified: head/sys/powerpc/booke/pmap.c Modified: head/sys/powerpc/booke/pmap.c ============================================================================== --- head/sys/powerpc/booke/pmap.c Wed Nov 6 14:33:37 2013 (r257745) +++ head/sys/powerpc/booke/pmap.c Wed Nov 6 14:36:38 2013 (r257746) @@ -2759,7 +2759,7 @@ mmu_booke_mincore(mmu_t mmu, pmap_t pmap vm_paddr_t *locked_pa) { - TODO; + /* XXX: this should be implemented at some point */ return (0); } From owner-svn-src-head@FreeBSD.ORG Wed Nov 6 14:38:54 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 781A0129; Wed, 6 Nov 2013 14:38:54 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 65A3423EA; Wed, 6 Nov 2013 14:38:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA6Ecsg2010977; Wed, 6 Nov 2013 14:38:54 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA6Ecskd010976; Wed, 6 Nov 2013 14:38:54 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201311061438.rA6Ecskd010976@svn.freebsd.org> From: Nathan Whitehorn Date: Wed, 6 Nov 2013 14:38:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257747 - head/sys/dev/ofw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Nov 2013 14:38:54 -0000 Author: nwhitehorn Date: Wed Nov 6 14:38:53 2013 New Revision: 257747 URL: http://svnweb.freebsd.org/changeset/base/257747 Log: An addendum: it is possible, though of questionable utility, for a node to have no properties at all. Do the right thing in such cases. Modified: head/sys/dev/ofw/ofw_fdt.c Modified: head/sys/dev/ofw/ofw_fdt.c ============================================================================== --- head/sys/dev/ofw/ofw_fdt.c Wed Nov 6 14:36:38 2013 (r257746) +++ head/sys/dev/ofw/ofw_fdt.c Wed Nov 6 14:38:53 2013 (r257747) @@ -283,6 +283,8 @@ ofw_fdt_nextprop(ofw_t ofw, phandle_t pa /* Find the first prop in the node */ offset = fdt_first_property_offset(fdtp, offset); + if (offset < 0) + return (0); /* No properties */ if (previous != NULL) { while (offset >= 0) { From owner-svn-src-head@FreeBSD.ORG Wed Nov 6 15:32:37 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C63ACF6; Wed, 6 Nov 2013 15:32:37 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B2FE227D0; Wed, 6 Nov 2013 15:32:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA6FWbLl031159; Wed, 6 Nov 2013 15:32:37 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA6FWbWe031158; Wed, 6 Nov 2013 15:32:37 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201311061532.rA6FWbWe031158@svn.freebsd.org> From: Hans Petter Selasky Date: Wed, 6 Nov 2013 15:32:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257748 - head/sys/dev/usb/wlan X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Nov 2013 15:32:37 -0000 Author: hselasky Date: Wed Nov 6 15:32:37 2013 New Revision: 257748 URL: http://svnweb.freebsd.org/changeset/base/257748 Log: Implement a working write region function to speed up loading of the firmware. You can test this change by switching the "#if 1" statement right above in the patched code to "#if 0" ! MFC after: 1 week Modified: head/sys/dev/usb/wlan/if_run.c Modified: head/sys/dev/usb/wlan/if_run.c ============================================================================== --- head/sys/dev/usb/wlan/if_run.c Wed Nov 6 14:38:53 2013 (r257747) +++ head/sys/dev/usb/wlan/if_run.c Wed Nov 6 15:32:37 2013 (r257748) @@ -1170,13 +1170,32 @@ run_write_region_1(struct run_softc *sc, return (error); #else usb_device_request_t req; + int error = 0; - req.bmRequestType = UT_WRITE_VENDOR_DEVICE; - req.bRequest = RT2870_WRITE_REGION_1; - USETW(req.wValue, 0); - USETW(req.wIndex, reg); - USETW(req.wLength, len); - return (run_do_request(sc, &req, buf)); + /* + * NOTE: It appears the WRITE_REGION_1 command cannot be + * passed a huge amount of data, which will crash the + * firmware. Limit amount of data passed to 64-bytes at a + * time: + */ + while (len > 0) { + int delta = 64; + if (delta > len) + delta = len; + + req.bmRequestType = UT_WRITE_VENDOR_DEVICE; + req.bRequest = RT2870_WRITE_REGION_1; + USETW(req.wValue, 0); + USETW(req.wIndex, reg); + USETW(req.wLength, delta); + error = run_do_request(sc, &req, __DECONST(uint8_t *, buf)); + if (error != 0) + break; + reg += delta; + buf += delta; + len -= delta; + } + return (error); #endif } From owner-svn-src-head@FreeBSD.ORG Wed Nov 6 15:49:31 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id DDA2C7D5; Wed, 6 Nov 2013 15:49:31 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CB9D228A4; Wed, 6 Nov 2013 15:49:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA6FnVnX035356; Wed, 6 Nov 2013 15:49:31 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA6FnVta035354; Wed, 6 Nov 2013 15:49:31 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201311061549.rA6FnVta035354@svn.freebsd.org> From: Glen Barber Date: Wed, 6 Nov 2013 15:49:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257749 - head/usr.sbin/bsdinstall/scripts X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Nov 2013 15:49:31 -0000 Author: gjb Date: Wed Nov 6 15:49:31 2013 New Revision: 257749 URL: http://svnweb.freebsd.org/changeset/base/257749 Log: Switch to using pkg(8) for the doc install in bsdinstall(8). This also bootstraps the system with pkg(8) for future use. PR: 183488 Submitted by: Joe Ennis MFC after: 3 days Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/bsdinstall/scripts/docsinstall Modified: head/usr.sbin/bsdinstall/scripts/docsinstall ============================================================================== --- head/usr.sbin/bsdinstall/scripts/docsinstall Wed Nov 6 15:32:37 2013 (r257748) +++ head/usr.sbin/bsdinstall/scripts/docsinstall Wed Nov 6 15:49:31 2013 (r257749) @@ -59,7 +59,7 @@ NB: This requires a working, configured test $? -eq 0 || exit 0 exec 3>&- -# Let pkg_add be able to use name servers +# Let pkg(8) be able to use name servers cp ${BSDINSTALL_TMPETC}/resolv.conf ${BSDINSTALL_CHROOT}/etc error() { @@ -74,6 +74,13 @@ echo "FreeBSD Installer" echo "========================" echo +echo "Please wait while the repository metadata is fetched." +echo "This may take a few moments." + +env ASSUME_ALWAYS_YES=1 pkg -c ${BSDINSTALL_CHROOT} install pkg \ + || error pkg + for i in $DOCS; do - pkg_add -C ${BSDINSTALL_CHROOT} -r ${i}-freebsd-doc || error $i-freebsd-doc + env ASSUME_ALWAYS_YES=1 pkg -c ${BSDINSTALL_CHROOT} install ${i}-freebsd-doc \ + || error $i-freebsd-doc done From owner-svn-src-head@FreeBSD.ORG Wed Nov 6 15:56:04 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 8C642B9D; Wed, 6 Nov 2013 15:56:04 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7A073292D; Wed, 6 Nov 2013 15:56:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA6Fu43d038189; Wed, 6 Nov 2013 15:56:04 GMT (envelope-from jhibbits@svn.freebsd.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA6Fu41E038188; Wed, 6 Nov 2013 15:56:04 GMT (envelope-from jhibbits@svn.freebsd.org) Message-Id: <201311061556.rA6Fu41E038188@svn.freebsd.org> From: Justin Hibbits Date: Wed, 6 Nov 2013 15:56:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257750 - head/sys/powerpc/powerpc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Nov 2013 15:56:04 -0000 Author: jhibbits Date: Wed Nov 6 15:56:03 2013 New Revision: 257750 URL: http://svnweb.freebsd.org/changeset/base/257750 Log: Make the powerpc dumpsys() more consistent with the other architectures. MFC after: 10.0-RELEASE Modified: head/sys/powerpc/powerpc/dump_machdep.c Modified: head/sys/powerpc/powerpc/dump_machdep.c ============================================================================== --- head/sys/powerpc/powerpc/dump_machdep.c Wed Nov 6 15:49:31 2013 (r257749) +++ head/sys/powerpc/powerpc/dump_machdep.c Wed Nov 6 15:56:03 2013 (r257750) @@ -260,7 +260,7 @@ dumpsys(struct dumperinfo *di) ehdr.e_phnum); /* Dump leader */ - error = di->dumper(di->priv, &kdh, 0, dumplo, sizeof(kdh)); + error = dump_write(di, &kdh, 0, dumplo, sizeof(kdh)); if (error) goto fail; dumplo += sizeof(kdh); @@ -291,12 +291,12 @@ dumpsys(struct dumperinfo *di) goto fail; /* Dump trailer */ - error = di->dumper(di->priv, &kdh, 0, dumplo, sizeof(kdh)); + error = dump_write(di, &kdh, 0, dumplo, sizeof(kdh)); if (error) goto fail; /* Signal completion, signoff and exit stage left. */ - di->dumper(di->priv, NULL, 0, 0, 0); + dump_write(di, NULL, 0, 0, 0); printf("\nDump complete\n"); return; @@ -306,6 +306,8 @@ dumpsys(struct dumperinfo *di) if (error == ECANCELED) printf("\nDump aborted\n"); + else if (error == ENOSPC) + printf("\nDump failed. Partition too small.\n"); else printf("\n** DUMP FAILED (ERROR %d) **\n", error); } From owner-svn-src-head@FreeBSD.ORG Wed Nov 6 16:28:27 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B8C4EDA4; Wed, 6 Nov 2013 16:28:27 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A58A82B2C; Wed, 6 Nov 2013 16:28:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA6GSRlc049102; Wed, 6 Nov 2013 16:28:27 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA6GSRxU049100; Wed, 6 Nov 2013 16:28:27 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201311061628.rA6GSRxU049100@svn.freebsd.org> From: Nathan Whitehorn Date: Wed, 6 Nov 2013 16:28:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257751 - head/sys/dev/mii X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Nov 2013 16:28:27 -0000 Author: nwhitehorn Date: Wed Nov 6 16:28:26 2013 New Revision: 257751 URL: http://svnweb.freebsd.org/changeset/base/257751 Log: Add definition for the Atheros 8021 gigabit PHY. MFC after: 1 week Modified: head/sys/dev/mii/atphy.c head/sys/dev/mii/miidevs Modified: head/sys/dev/mii/atphy.c ============================================================================== --- head/sys/dev/mii/atphy.c Wed Nov 6 15:56:03 2013 (r257750) +++ head/sys/dev/mii/atphy.c Wed Nov 6 16:28:26 2013 (r257751) @@ -80,6 +80,7 @@ static int atphy_setmedia(struct mii_sof static const struct mii_phydesc atphys[] = { MII_PHY_DESC(xxATHEROS, F1), MII_PHY_DESC(xxATHEROS, F1_7), + MII_PHY_DESC(xxATHEROS, AR8021), MII_PHY_DESC(xxATHEROS, F2), MII_PHY_END }; Modified: head/sys/dev/mii/miidevs ============================================================================== --- head/sys/dev/mii/miidevs Wed Nov 6 15:56:03 2013 (r257750) +++ head/sys/dev/mii/miidevs Wed Nov 6 16:28:26 2013 (r257751) @@ -136,6 +136,7 @@ model yyAMD 79c901home 0x0039 Am79C901 /* Atheros Communications/Attansic PHYs */ model xxATHEROS F1 0x0001 Atheros F1 10/100/1000 PHY model xxATHEROS F2 0x0002 Atheros F2 10/100 PHY +model xxATHEROS AR8021 0x0004 Atheros AR8021 10/100/1000 PHY model xxATHEROS F1_7 0x0007 Atheros F1 10/100/1000 PHY /* Asix semiconductor PHYs */ From owner-svn-src-head@FreeBSD.ORG Wed Nov 6 16:30:45 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 74D70F1A for ; Wed, 6 Nov 2013 16:30:45 +0000 (UTC) (envelope-from peter@wemm.org) Received: from mail-vc0-x233.google.com (mail-vc0-x233.google.com [IPv6:2607:f8b0:400c:c03::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2C3662B72 for ; Wed, 6 Nov 2013 16:30:45 +0000 (UTC) Received: by mail-vc0-f179.google.com with SMTP id hz11so6902328vcb.10 for ; Wed, 06 Nov 2013 08:30:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wemm.org; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=FB4y07dpovne5BRmif6WarfbTDcSbmQio3rFgklMVzg=; b=39pb+K2jZjln7nsfyNpRBwdNDQN2N+c73c1Le2Fttc1iU853yGGjYBQ03SwI2wHIcf k2bJ6MidjZd3SOs288wp2YbUOMq9zXmPxWRb7jKUTDaMcDNMauC21F9nvhteSCELounk h/Jxh2kgmCmmaiGFak2zFdAsCEflBPB6xCIOo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=FB4y07dpovne5BRmif6WarfbTDcSbmQio3rFgklMVzg=; b=MyjNsnz6W0j4RWxXcmNlG20j2htxscOuRJ9c0DCJTYdAdoXwXlVRD9XoruTpD8vQfD Ytq76UBBRGcGRFBVWv/1tLxt7hbVQCDjh3GTr3FNn+N+Y2MoJ4A491NLGSBw1WBm0gfy 1dHbGva2KSgvle9gNz+r7T2QGkpi+YP+CZvieivaMob+edhx78A7hjrZq+lSQlh3HHOZ BTHpewaephaLQgrXEzJ75rGVTaiLFuGtgbYx8g1n2hfHbpicp9Q+qDt8vT27LSNmntRI mdMMeFrEddCw+wdPjjkkSi9hJw2vF8Z1fRk+d0H1G4mHIZ9Ihu4u+mox8uoXZYBl4ZpM Ty2A== X-Gm-Message-State: ALoCoQnc44rq6sn13i3k+NxkRjYjtxHWsg0ccJvZ7I+N4hPTRei4Ca994GGyf/j7IPuVNi/tLJLa MIME-Version: 1.0 X-Received: by 10.52.27.243 with SMTP id w19mr2514496vdg.3.1383755443975; Wed, 06 Nov 2013 08:30:43 -0800 (PST) Received: by 10.220.167.74 with HTTP; Wed, 6 Nov 2013 08:30:43 -0800 (PST) In-Reply-To: <20131105192904.GG7577@FreeBSD.org> References: <201311051029.rA5ATmmM017799@svn.freebsd.org> <201311051156.09819.jhb@freebsd.org> <20131105192904.GG7577@FreeBSD.org> Date: Wed, 6 Nov 2013 08:30:43 -0800 Message-ID: Subject: Re: svn commit: r257696 - in head: libexec/rbootd share/man/man9 sys/compat/svr4 sys/net sys/sys From: Peter Wemm To: Gleb Smirnoff Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: "svn-src-head@freebsd.org" , svn-src-all , "src-committers@freebsd.org" , John Baldwin X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Nov 2013 16:30:45 -0000 On Tue, Nov 5, 2013 at 11:29 AM, Gleb Smirnoff wrote: > On Tue, Nov 05, 2013 at 11:56:09AM -0500, John Baldwin wrote: > J> On Tuesday, November 05, 2013 5:29:48 am Gleb Smirnoff wrote: > J> > Author: glebius > J> > Date: Tue Nov 5 10:29:47 2013 > J> > New Revision: 257696 > J> > URL: http://svnweb.freebsd.org/changeset/base/257696 > J> > > J> > Log: > J> > Drop support for historic ioctls and also undefine them, so that > code > J> > that checks their presence via ifdef, won't use them. > J> > J> Most of these are COMPAT_43, but one appears to be a 9.x ioctl? If > that's the > J> case it's implementation should probably stick around under appropriate > J> COMPAT_FREEBSD macros. It looks like it goes all the way back to > 4.4BSD, > J> so at least COMPAT_FREEBSD4 and later should define the implementation > to > J> preserve ABI compat for old binaries. > > Why should we support such broken configurations as running new kernel and > ancient core base system utilities? The efforts to keep this are much more > expensive, then yields. > > Why? because up until now you could run a FreeBSD4 jail on a modern system and reasonably expect it to work. No, we don't really "support" system level tools, but examining network state is widely used. No, one doesn't run ifconfig to set interface configs in jails, but there's a lot of scripts to read the configuration. > The only reason I see is to keep compat for the previous major version, > since > we guarantee only consequtive upgrades to a next major. If something goes > wrong during upgrade a sysadmin can use old tools with new kernel. I agree > on > that, and when changing SIOCAIFADDR two years ago, I provided > compatibility. > > But why the hell should we support an insane who will try to run > ifconfig(8) > from FreeBSD 4 on FreeBSD 11? Not speaking about this tool from 4.4BSD, > LOL :) > This is not what COMPAT_FREEBSD4 meant to be. > Insane? Perhaps, but it's keeping FreeBSD alive in a fairly large company I know of. We'll have to locally revert this change, most likely, and spend time supporting it ourselves instead of doing other potentially more useful things to help FreeBSD in general. -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com; KI6FJV From owner-svn-src-head@FreeBSD.ORG Wed Nov 6 17:01:00 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id E66199DD; Wed, 6 Nov 2013 17:01:00 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-qc0-x229.google.com (mail-qc0-x229.google.com [IPv6:2607:f8b0:400d:c01::229]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5E6D72D52; Wed, 6 Nov 2013 17:01:00 +0000 (UTC) Received: by mail-qc0-f169.google.com with SMTP id x12so6219642qcv.28 for ; Wed, 06 Nov 2013 09:00:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=qzaO1GdmTS+z7R7vnEO6slVJOJD0SYcedo37TRbR7Qk=; b=jPg5RLGTWUzOl5v5YAVum5SyD83mB0x4zB4qx/jobzdmdxCsop4BepTHvn3Tk6XZ72 Nu/jw8rfghh5moCnxr6hRPFKfByMBMEumtiW3DLzmeBim+a+2IFjAye1UN9y/ZZJBDHs eguxYVz6t1+BlE7Ch4roTmA6QsXaomLeFX6CdcpbX+ZJKzTlpAugpiRRSTFIwhv448J+ MY/Aalqa7VUZhwIUHzoF2il+VlN+qzfvL54voEM8iJwI7tX/VuyoIpVMMkctNU2cLfbU DLJpDxdHgcHBe0KKUxJmDthpr1vEd+iknLy8ki/QtMIpnQ6E+v+vr17ajiRpQSBpV/ic kQOg== MIME-Version: 1.0 X-Received: by 10.224.113.199 with SMTP id b7mr7443546qaq.4.1383757259251; Wed, 06 Nov 2013 09:00:59 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.224.207.66 with HTTP; Wed, 6 Nov 2013 09:00:59 -0800 (PST) In-Reply-To: References: <201311051029.rA5ATmmM017799@svn.freebsd.org> <201311051156.09819.jhb@freebsd.org> <20131105192904.GG7577@FreeBSD.org> Date: Wed, 6 Nov 2013 09:00:59 -0800 X-Google-Sender-Auth: kffA_guJzrl6EV5HiaxGHXEJ4Qg Message-ID: Subject: Re: svn commit: r257696 - in head: libexec/rbootd share/man/man9 sys/compat/svr4 sys/net sys/sys From: Adrian Chadd To: Peter Wemm Content-Type: text/plain; charset=ISO-8859-1 Cc: "svn-src-head@freebsd.org" , svn-src-all , Gleb Smirnoff , "src-committers@freebsd.org" , John Baldwin X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Nov 2013 17:01:01 -0000 I think the important thing here is that there _are_ organisations that rely on some reasonable attempt at supporting historical APIs where needed. This IMHO should've explicitly gone into a compat macro for people who want support of this older stuff. My suggestion for a saner way to handle this deprecation schedule: * do the announce - I'd have to go looking for that, but we should be placing these somewhere obvious (like a wiki page that lists deprecated APIs in order, with the date/release they're going to be deprecated); * deprecate the userland use of the ioctl values first so they use the newer API; * deprecate the kernel API after the announced amount of time, hiding things behind COMPAT_xxx as appropriate. -adrian From owner-svn-src-head@FreeBSD.ORG Wed Nov 6 17:20:49 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D149BEB2; Wed, 6 Nov 2013 17:20:49 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BD5F92E70; Wed, 6 Nov 2013 17:20:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA6HKnvp068123; Wed, 6 Nov 2013 17:20:49 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA6HKn4d068122; Wed, 6 Nov 2013 17:20:49 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201311061720.rA6HKn4d068122@svn.freebsd.org> From: Adrian Chadd Date: Wed, 6 Nov 2013 17:20:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257754 - head/sys/net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Nov 2013 17:20:49 -0000 Author: adrian Date: Wed Nov 6 17:20:49 2013 New Revision: 257754 URL: http://svnweb.freebsd.org/changeset/base/257754 Log: Don't return ENOBUFS if the transmit path handles the frame but queues it (eg in power save.) This is definitely an MFC candidate for 10.0-REL. MFC after: 1 week Modified: head/sys/net80211/ieee80211_output.c Modified: head/sys/net80211/ieee80211_output.c ============================================================================== --- head/sys/net80211/ieee80211_output.c Wed Nov 6 16:53:10 2013 (r257753) +++ head/sys/net80211/ieee80211_output.c Wed Nov 6 17:20:49 2013 (r257754) @@ -144,8 +144,12 @@ ieee80211_vap_pkt_send_dest(struct ieee8 */ (void) ieee80211_pwrsave(ni, m); ieee80211_free_node(ni); - /* XXX better status? */ - return (ENOBUFS); + + /* + * We queued it fine, so tell the upper layer + * that we consumed it. + */ + return (0); } /* calculate priority so drivers can find the tx queue */ if (ieee80211_classify(ni, m)) { @@ -156,8 +160,9 @@ ieee80211_vap_pkt_send_dest(struct ieee8 ifp->if_oerrors++; m_freem(m); ieee80211_free_node(ni); + /* XXX better status? */ - return (ENOBUFS); + return (0); } /* * Stash the node pointer. Note that we do this after @@ -169,7 +174,6 @@ ieee80211_vap_pkt_send_dest(struct ieee8 BPF_MTAP(ifp, m); /* 802.3 tx */ - /* * Check if A-MPDU tx aggregation is setup or if we * should try to enable it. The sta must be associated From owner-svn-src-head@FreeBSD.ORG Wed Nov 6 17:48:40 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 4843C7EE for ; Wed, 6 Nov 2013 17:48:40 +0000 (UTC) (envelope-from peter@wemm.org) Received: from mail-pa0-x22f.google.com (mail-pa0-x22f.google.com [IPv6:2607:f8b0:400e:c03::22f]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 09CE32FCF for ; Wed, 6 Nov 2013 17:48:40 +0000 (UTC) Received: by mail-pa0-f47.google.com with SMTP id lf10so10775861pab.6 for ; Wed, 06 Nov 2013 09:48:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wemm.org; s=google; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=bsxyLuMcGvFfyWvvU5FGhClMKoxoTS+G2MsvWCV1tfg=; b=SD1I9c6/jBXFwJPLAiWP8bhUVZXI2ToOVNnMFEaYMvi7+Z15Cz9JFYRHyQdKRSZsfE lNm7XYI1hX7V9RTH0EHtt2/Y/7OeLKBxK5JDUg9pBQLKtOYPOeVHDavQbVu8BS2rKLyZ 7OsFIpgYzWO/eFO3cBOFZl14MePnkXYlESc6s= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=bsxyLuMcGvFfyWvvU5FGhClMKoxoTS+G2MsvWCV1tfg=; b=MaHiy6H+CL8J092PpKPPSSRlucbiOstP4QPvBZRUrGaIfJM62ieJ2VSIrwzuE0t/Hm zBFjY6/m+37OOTkmngyUrcexCJI+9SE00P4hdYEGM5Md69UgpLZaBbLJhVO1IviEa0aY lFqMQ/tFieuX/rv37f8/A7ehQd5qeWpRvqXrCFzM379xMyacY86aMgU6pv8EfZ1ET3AO CxpaHIm+bN68shjKlsWOoV6Zqo68MkiM0Y9bfDhImQ/jg+4wRG+WicgYSm6pmBb3DTkT QCeJDrFsBHp7wfKgC8T0U0CQZ71ME0AFEf14zJsxwEAgIgC8zS6KDfJPI4EqtfaBSURc C8Fw== X-Gm-Message-State: ALoCoQlog+cXrHhGx+oAr/fDf3gbT/pPhgKCZgfeMlCxuAjBwMRNH2wax3JEKI655izw1ke7CFeV X-Received: by 10.66.190.10 with SMTP id gm10mr5120508pac.126.1383760118928; Wed, 06 Nov 2013 09:48:38 -0800 (PST) Received: from hater-dm.corp.yahoo.com (nat-dip4.cfw-a-gci.corp.yahoo.com. [209.131.62.113]) by mx.google.com with ESMTPSA id og5sm42821113pbb.10.2013.11.06.09.48.37 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 06 Nov 2013 09:48:38 -0800 (PST) Message-ID: <527A80F4.1090405@wemm.org> Date: Wed, 06 Nov 2013 09:48:36 -0800 From: Peter Wemm User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: Adrian Chadd Subject: Re: svn commit: r257696 - in head: libexec/rbootd share/man/man9 sys/compat/svr4 sys/net sys/sys References: <201311051029.rA5ATmmM017799@svn.freebsd.org> <201311051156.09819.jhb@freebsd.org> <20131105192904.GG7577@FreeBSD.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: "svn-src-head@freebsd.org" , svn-src-all , Gleb Smirnoff , "src-committers@freebsd.org" , John Baldwin X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Nov 2013 17:48:40 -0000 On 11/6/13, 9:00 AM, Adrian Chadd wrote: > I think the important thing here is that there _are_ organisations > that rely on some reasonable attempt at supporting historical APIs > where needed. > > This IMHO should've explicitly gone into a compat macro for people who > want support of this older stuff. > > My suggestion for a saner way to handle this deprecation schedule: > > * do the announce - I'd have to go looking for that, but we should be > placing these somewhere obvious (like a wiki page that lists > deprecated APIs in order, with the date/release they're going to be > deprecated); > * deprecate the userland use of the ioctl values first so they use the > newer API; > * deprecate the kernel API after the announced amount of time, hiding > things behind COMPAT_xxx as appropriate. That's how it was before - behind COMPAT_43 etc and he removed it. COMPAT_43 now does less than it did before. There were a bunch of ioctl's that had been renamed ages ago with an O prefix that were exposed to userland. While they weren't part of any API they should probably have been #ifdef COMPAT_43 in the includes to avoid accidental use. However, things like ktrace/kdump/strace wanted access to them for decoding so it would have made the change even messier. -Peter From owner-svn-src-head@FreeBSD.ORG Wed Nov 6 18:20:01 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 435B1531; Wed, 6 Nov 2013 18:20:01 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 86C8C223A; Wed, 6 Nov 2013 18:19:59 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.7/8.14.7) with ESMTP id rA6IJuGx017434 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 6 Nov 2013 22:19:56 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.7/8.14.7/Submit) id rA6IJu0R017433; Wed, 6 Nov 2013 22:19:56 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Wed, 6 Nov 2013 22:19:56 +0400 From: Gleb Smirnoff To: Peter Wemm Subject: Re: svn commit: r257696 - in head: libexec/rbootd share/man/man9 sys/compat/svr4 sys/net sys/sys Message-ID: <20131106181956.GC7577@FreeBSD.org> References: <201311051029.rA5ATmmM017799@svn.freebsd.org> <201311051156.09819.jhb@freebsd.org> <20131105192904.GG7577@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.22 (2013-10-16) Cc: "svn-src-head@freebsd.org" , svn-src-all , "src-committers@freebsd.org" , John Baldwin X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Nov 2013 18:20:01 -0000 On Wed, Nov 06, 2013 at 08:30:43AM -0800, Peter Wemm wrote: P> > Why should we support such broken configurations as running new kernel and P> > ancient core base system utilities? The efforts to keep this are much more P> > expensive, then yields. P> > P> Why? because up until now you could run a FreeBSD4 jail on a modern system P> and reasonably expect it to work. No, we don't really "support" system P> level tools, but examining network state is widely used. No, one doesn't P> run ifconfig to set interface configs in jails, but there's a lot of P> scripts to read the configuration. Examining interface configs are done via getifaddrs(3), which uses NET_RT_IFLISTL sysctl, and this is not touched by this commit. P> > But why the hell should we support an insane who will try to run P> > ifconfig(8) P> > from FreeBSD 4 on FreeBSD 11? Not speaking about this tool from 4.4BSD, P> > LOL :) P> > This is not what COMPAT_FREEBSD4 meant to be. P> > P> P> Insane? Perhaps, but it's keeping FreeBSD alive in a fairly large company I P> know of. We'll have to locally revert this change, most likely, and spend P> time supporting it ourselves instead of doing other potentially more useful P> things to help FreeBSD in general. I will not agree that an insane idea gets sane, if it is performed by a large company. "Large" doesn't mean "right". Can you please describe the scenario that may urge someone to run ifconfig(9) that is several major versions backwards on a modern kernel? What does prevent someone to install appropriate world, or at least ifconfig(8)? May be it is worth to invest time into improving our upgrading technics? We've got freebsd-update(1). Doesn't it work for large companies? We have at minimum 2 years before 11.0-RELEASE will be released. We can invest time into upgrading technics, or into writing down compat layers. If you can explain what can prevent someone to upgrade ifconfig, but to push kernel to 11.0, then we could work on it. May be we should fix these obstacles on the upgrade path, instead of layering one compat layer over another? Ok, if you need to, you can just revert commit right here in FreeBSD svn, I will not start a commit war. I am already very close to abandon idea on cleaning network stack, since this work is very very ungrateful. Let it rot as it is. While other OSes are pushing forward, let us be an illustartion to "TCP/IP Illustrated: The implementation", published in 1995. After two decades, the closer 11.0-RELEASE in 2015 will be to original implementation, the funnier it'll be. -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Wed Nov 6 18:26:39 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id F24FEA11; Wed, 6 Nov 2013 18:26:38 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C5EC822E0; Wed, 6 Nov 2013 18:26:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA6IQcHC089767; Wed, 6 Nov 2013 18:26:38 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA6IQcTb089766; Wed, 6 Nov 2013 18:26:38 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201311061826.rA6IQcTb089766@svn.freebsd.org> From: Devin Teske Date: Wed, 6 Nov 2013 18:26:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257755 - head/usr.sbin/bsdconfig/share/media X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Nov 2013 18:26:39 -0000 Author: dteske Date: Wed Nov 6 18:26:38 2013 New Revision: 257755 URL: http://svnweb.freebsd.org/changeset/base/257755 Log: Add support for dereferencing SRV records via f_host_lookup(). Takes the media choice into consideration for determining the appropriate SRV records to query (e.g., _http._tcp, _ftp._tcp, _nfs.tcp, _nfs.udp, etc.). Modified: head/usr.sbin/bsdconfig/share/media/tcpip.subr Modified: head/usr.sbin/bsdconfig/share/media/tcpip.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/media/tcpip.subr Wed Nov 6 17:20:49 2013 (r257754) +++ head/usr.sbin/bsdconfig/share/media/tcpip.subr Wed Nov 6 18:26:38 2013 (r257755) @@ -1020,10 +1020,41 @@ f_host_lookup() # Fall back to host(1) -- which is further governed by nsswitch.conf(5) # - local __output __ip6 __addrs="" __wait="" - f_getvar $VAR_MEDIA_TIMEOUT __wait - [ "$__wait" ] && __wait="-W $(( $__wait / 2 ))" + local __output __ip6 __addrs= f_getvar $VAR_IPV6_ENABLE __ip6 + + # If we have a TCP media type configured, check for an SRV record + local __srvtypes= + { f_quietly f_getvar $VAR_HTTP_PATH || + f_quietly f_getvar $VAR_HTTP_PROXY_PATH + } && __srvtypes="$__srvtypes _http._tcp" + f_quietly f_getvar $VAR_FTP_PATH && __srvtypes="$__srvtypes _ftp._tcp" + f_quietly f_getvar $VAR_NFS_PATH && + __srvtypes="$__srvtypes _nfs._tcp _nfs._udp" + + # Calculate wait time as dividend of total time and host(1) invocations + local __host_runs __wait + if [ "$__ip6" = "YES" ]; then + __host_runs=$(( 2 + $( set -- $__srvtypes; echo $# ) )) + else + __host_runs=$(( 1 + $( set -- $__srvtypes; echo $# ) )) + fi + f_getvar $VAR_MEDIA_TIMEOUT __wait + [ "$__wait" ] && __wait="-W $(( $__wait / $__host_runs ))" + + # Query SRV types first (1st host response taken as new host to query) + for __type in $__srvtypes; do + if __output=$( + host -t SRV $__wait -- "$__type.$__host" \ + 2> /dev/null + ); then + __host=$( echo "$__output" | + awk '/ SRV /{print $NF;exit}' ) + break + fi + done + + # Try IPv6 first (if enabled) if [ "$__ip6" = "YES" ]; then if ! __output=$( host -t AAAA $__wait -- "$__host" 2>&1 ); then # An error occurred, display in-full and return error @@ -1031,13 +1062,17 @@ f_host_lookup() setvar "$__var_to_set" "$__output" return $FAILURE fi + # Add the IPv6 addresses and fall-through to collect IPv4 too __addrs=$( echo "$__output" | awk '/ address /{print $NF}' ) fi + + # Good ol' IPv4 if ! __output=$( host -t A $__wait -- "$__host" 2>&1 ); then # An error occurred, display it in-full and return error [ "$__var_to_set" ] && setvar "$__var_to_set" "$__output" return $FAILURE fi + __addrs="$__addrs${__addrs:+ }$( echo "$__output" | awk '/ address /{print $NF}' )" if [ "$__var_to_set" ]; then From owner-svn-src-head@FreeBSD.ORG Wed Nov 6 18:43:16 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D43A2EB9; Wed, 6 Nov 2013 18:43:16 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C15FE23FD; Wed, 6 Nov 2013 18:43:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA6IhG3t095812; Wed, 6 Nov 2013 18:43:16 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA6IhGmP095811; Wed, 6 Nov 2013 18:43:16 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201311061843.rA6IhGmP095811@svn.freebsd.org> From: Devin Teske Date: Wed, 6 Nov 2013 18:43:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257756 - head/usr.sbin/bsdconfig/share/media X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Nov 2013 18:43:16 -0000 Author: dteske Date: Wed Nov 6 18:43:16 2013 New Revision: 257756 URL: http://svnweb.freebsd.org/changeset/base/257756 Log: Fix a bug that resulted in spurious error message "f_media_shutdown_http: not found" from /usr/libexec/bsdconfig/030.packages/packages. Modified: head/usr.sbin/bsdconfig/share/media/http.subr Modified: head/usr.sbin/bsdconfig/share/media/http.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/media/http.subr Wed Nov 6 18:26:38 2013 (r257755) +++ head/usr.sbin/bsdconfig/share/media/http.subr Wed Nov 6 18:43:16 2013 (r257756) @@ -321,7 +321,7 @@ f_media_set_http() device_http set type $DEVICE_TYPE_HTTP device_http set init f_media_init_http device_http set get f_media_get_http - device_http set shutdown f_media_shutdown_http + device_http set shutdown : device_http set private network f_struct_copy device_http device_media f_struct_free device_http From owner-svn-src-head@FreeBSD.ORG Wed Nov 6 18:55:01 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 848B520B; Wed, 6 Nov 2013 18:55:01 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-qe0-x231.google.com (mail-qe0-x231.google.com [IPv6:2607:f8b0:400d:c02::231]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DCB1E24B9; Wed, 6 Nov 2013 18:55:00 +0000 (UTC) Received: by mail-qe0-f49.google.com with SMTP id a11so6649786qen.36 for ; Wed, 06 Nov 2013 10:55:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=PXVk8YSF8RjNeEqdAB7FS9dL5r25kG/sXbyC+VdvSRc=; b=bqlJXOPlgQFipuk40n7fTlxlzLXzDcZVTrbDvrSlw0ZhXng6c1Ss6jOsadWR2NXdMe CO7HWA1qPa0zmNHqqjX3Ww2r3NINGp5cnr3tJBwE+jGjKSQPj9R28WLoMErJiTOemALc 4Xx/aSqNjoqZxnYG2GDx2BpnWGpH3DykNYrQxmOZujiwzucmEZjZUQ1qwdZvLIQRCXJe 8Y1VCB//psACNWbMI0qE65Jxh23csF3EObR2I8RZSd35T05dhsRmry1ZIDfUYmsnSMi7 dbVJGjmxPSmkT0Odzvu6Cc9e2Q0sUhvRgGIh/dMXilp797KhxQQRgxW54PrFfPtszIW7 +HpA== MIME-Version: 1.0 X-Received: by 10.224.51.131 with SMTP id d3mr8285379qag.0.1383764100016; Wed, 06 Nov 2013 10:55:00 -0800 (PST) Received: by 10.224.207.66 with HTTP; Wed, 6 Nov 2013 10:54:59 -0800 (PST) Received: by 10.224.207.66 with HTTP; Wed, 6 Nov 2013 10:54:59 -0800 (PST) In-Reply-To: <20131106181956.GC7577@FreeBSD.org> References: <201311051029.rA5ATmmM017799@svn.freebsd.org> <201311051156.09819.jhb@freebsd.org> <20131105192904.GG7577@FreeBSD.org> <20131106181956.GC7577@FreeBSD.org> Date: Wed, 6 Nov 2013 10:54:59 -0800 Message-ID: Subject: Re: svn commit: r257696 - in head: libexec/rbootd share/man/man9 sys/compat/svr4 sys/net sys/sys From: Adrian Chadd To: Gleb Smirnoff Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: svn-src-head@freebsd.org, svn-src-all , "src-committers@freebsd.org" , Peter Wemm , John Baldwin X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Nov 2013 18:55:01 -0000 Gleb, I think you are confusing evolving and improving with tearing out legacy APIs. You can likely do the former without the latter. So don't think you need to stop fixing things. Just don't conflate removing old APIs with evolving things. They're not the same thing. Adrian On Nov 6, 2013 1:20 PM, "Gleb Smirnoff" wrote: > On Wed, Nov 06, 2013 at 08:30:43AM -0800, Peter Wemm wrote: > P> > Why should we support such broken configurations as running new > kernel and > P> > ancient core base system utilities? The efforts to keep this are much > more > P> > expensive, then yields. > P> > > P> Why? because up until now you could run a FreeBSD4 jail on a modern > system > P> and reasonably expect it to work. No, we don't really "support" system > P> level tools, but examining network state is widely used. No, one > doesn't > P> run ifconfig to set interface configs in jails, but there's a lot of > P> scripts to read the configuration. > > Examining interface configs are done via getifaddrs(3), which uses > NET_RT_IFLISTL > sysctl, and this is not touched by this commit. > > P> > But why the hell should we support an insane who will try to run > P> > ifconfig(8) > P> > from FreeBSD 4 on FreeBSD 11? Not speaking about this tool from > 4.4BSD, > P> > LOL :) > P> > This is not what COMPAT_FREEBSD4 meant to be. > P> > > P> > P> Insane? Perhaps, but it's keeping FreeBSD alive in a fairly large > company I > P> know of. We'll have to locally revert this change, most likely, and > spend > P> time supporting it ourselves instead of doing other potentially more > useful > P> things to help FreeBSD in general. > > I will not agree that an insane idea gets sane, if it is performed by a > large > company. "Large" doesn't mean "right". Can you please describe the > scenario that > may urge someone to run ifconfig(9) that is several major versions > backwards > on a modern kernel? What does prevent someone to install appropriate > world, or > at least ifconfig(8)? > > May be it is worth to invest time into improving our upgrading technics? > We've > got freebsd-update(1). Doesn't it work for large companies? We have at > minimum > 2 years before 11.0-RELEASE will be released. We can invest time into > upgrading > technics, or into writing down compat layers. If you can explain what can > prevent > someone to upgrade ifconfig, but to push kernel to 11.0, then we could work > on it. May be we should fix these obstacles on the upgrade path, instead of > layering one compat layer over another? > > > > Ok, if you need to, you can just revert commit right here in FreeBSD svn, I > will not start a commit war. I am already very close to abandon idea on > cleaning > network stack, since this work is very very ungrateful. Let it rot as it > is. > While other OSes are pushing forward, let us be an illustartion to > "TCP/IP Illustrated: The implementation", published in 1995. After two > decades, > the closer 11.0-RELEASE in 2015 will be to original implementation, the > funnier > it'll be. > > -- > Totus tuus, Glebius. > From owner-svn-src-head@FreeBSD.ORG Wed Nov 6 19:05:08 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 0CC3AD87; Wed, 6 Nov 2013 19:05:08 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7440F2570; Wed, 6 Nov 2013 19:05:07 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.7/8.14.7) with ESMTP id rA6J557q017639 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 6 Nov 2013 23:05:05 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.7/8.14.7/Submit) id rA6J54GL017638; Wed, 6 Nov 2013 23:05:04 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Wed, 6 Nov 2013 23:05:04 +0400 From: Gleb Smirnoff To: Adrian Chadd Subject: Re: svn commit: r257696 - in head: libexec/rbootd share/man/man9 sys/compat/svr4 sys/net sys/sys Message-ID: <20131106190504.GD7577@FreeBSD.org> References: <201311051029.rA5ATmmM017799@svn.freebsd.org> <201311051156.09819.jhb@freebsd.org> <20131105192904.GG7577@FreeBSD.org> <20131106181956.GC7577@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.22 (2013-10-16) Cc: svn-src-head@freebsd.org, svn-src-all , "src-committers@freebsd.org" , Peter Wemm , John Baldwin X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Nov 2013 19:05:08 -0000 On Wed, Nov 06, 2013 at 10:54:59AM -0800, Adrian Chadd wrote: A> Gleb, A> A> I think you are confusing evolving and improving with tearing out legacy A> APIs. A> A> You can likely do the former without the latter. A> A> So don't think you need to stop fixing things. Just don't conflate removing A> old APIs with evolving things. They're not the same thing. When you rewrite some code, that has a very large percentage of compat APIs, you must rewrite more code, handle all compats, and test them all to comply. This can double amount of job needed or even more than double. When it comes to really ancient APIs like COMPAT_43, it is very difficult to find motivation to continue working on all this stuff. 4.3BSD is already 22 years in the past. I suggest to drop it in 11.0-R, which would probably happen in 2015, meaning close to 25 years. What commercial product ever offered such long compatibilty? And we aren't commercial, we are enthusiast project. Do you know any person who finds fun in maintaining compatibility layers? -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Wed Nov 6 19:14:50 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C108F5C6; Wed, 6 Nov 2013 19:14:50 +0000 (UTC) (envelope-from jmg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9DCCF261E; Wed, 6 Nov 2013 19:14:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA6JEouV007648; Wed, 6 Nov 2013 19:14:50 GMT (envelope-from jmg@svn.freebsd.org) Received: (from jmg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA6JEo4w007645; Wed, 6 Nov 2013 19:14:50 GMT (envelope-from jmg@svn.freebsd.org) Message-Id: <201311061914.rA6JEo4w007645@svn.freebsd.org> From: John-Mark Gurney Date: Wed, 6 Nov 2013 19:14:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257757 - head/sys/crypto/aesni X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Nov 2013 19:14:50 -0000 Author: jmg Date: Wed Nov 6 19:14:49 2013 New Revision: 257757 URL: http://svnweb.freebsd.org/changeset/base/257757 Log: make it so that from/to can be missaligned as it can happen (the geli regression manages to do it)... We use a packed struct to coerce gcc/clang into producing unaligned loads (there is not packed pointer attribute, otherwise this would be easier)... use _storeu_ and _loadu_ when using the structure is overkill... be better at using types properly... Since we allocate our own key schedule and make sure it's aligned, use the __m128i type in various arguments to functions... clang ignores __aligned on prototypes and gcc errors on them, leave them in comments to document that these function arguments are require to be aligned... about all that changes is movdqa -> movdqu from reading the diff of the disassembly output... Noticed by: symbolics at gmx.com MFC after: 3 days Modified: head/sys/crypto/aesni/aesencdec.h head/sys/crypto/aesni/aesni.h head/sys/crypto/aesni/aesni_wrap.c Modified: head/sys/crypto/aesni/aesencdec.h ============================================================================== --- head/sys/crypto/aesni/aesencdec.h Wed Nov 6 18:43:16 2013 (r257756) +++ head/sys/crypto/aesni/aesencdec.h Wed Nov 6 19:14:49 2013 (r257757) @@ -30,11 +30,10 @@ #include static inline void -aesni_enc8(int rounds, const uint8_t *key_schedule, __m128i a, +aesni_enc8(int rounds, const __m128i *keysched, __m128i a, __m128i b, __m128i c, __m128i d, __m128i e, __m128i f, __m128i g, __m128i h, __m128i out[8]) { - const __m128i *keysched = (const __m128i *)key_schedule; int i; a ^= keysched[0]; @@ -68,11 +67,10 @@ aesni_enc8(int rounds, const uint8_t *ke } static inline void -aesni_dec8(int rounds, const uint8_t *key_schedule, __m128i a, +aesni_dec8(int rounds, const __m128i *keysched, __m128i a, __m128i b, __m128i c, __m128i d, __m128i e, __m128i f, __m128i g, __m128i h, __m128i out[8]) { - const __m128i *keysched = (const __m128i *)key_schedule; int i; a ^= keysched[0]; @@ -106,10 +104,9 @@ aesni_dec8(int rounds, const uint8_t *ke } static inline __m128i -aesni_enc(int rounds, const uint8_t *key_schedule, const __m128i from) +aesni_enc(int rounds, const __m128i *keysched, const __m128i from) { __m128i tmp; - const __m128i *keysched = (const __m128i *)key_schedule; int i; tmp = from ^ keysched[0]; @@ -121,10 +118,9 @@ aesni_enc(int rounds, const uint8_t *key } static inline __m128i -aesni_dec(int rounds, const uint8_t *key_schedule, const __m128i from) +aesni_dec(int rounds, const __m128i *keysched, const __m128i from) { __m128i tmp; - const __m128i *keysched = (const __m128i *)key_schedule; int i; tmp = from ^ keysched[0]; Modified: head/sys/crypto/aesni/aesni.h ============================================================================== --- head/sys/crypto/aesni/aesni.h Wed Nov 6 18:43:16 2013 (r257756) +++ head/sys/crypto/aesni/aesni.h Wed Nov 6 19:14:49 2013 (r257757) @@ -71,29 +71,30 @@ struct aesni_session { /* * Internal functions, implemented in assembler. */ -void aesni_set_enckey(const uint8_t *userkey, uint8_t *encrypt_schedule, - int number_of_rounds); -void aesni_set_deckey(const uint8_t *encrypt_schedule, - uint8_t *decrypt_schedule, int number_of_rounds); +void aesni_set_enckey(const uint8_t *userkey, + uint8_t *encrypt_schedule /*__aligned(16)*/, int number_of_rounds); +void aesni_set_deckey(const uint8_t *encrypt_schedule /*__aligned(16)*/, + uint8_t *decrypt_schedule /*__aligned(16)*/, int number_of_rounds); /* * Slightly more public interfaces. */ -void aesni_encrypt_cbc(int rounds, const void *key_schedule, size_t len, - const uint8_t *from, uint8_t *to, const uint8_t iv[AES_BLOCK_LEN]); -void aesni_decrypt_cbc(int rounds, const void *key_schedule, size_t len, - uint8_t *buf, const uint8_t iv[AES_BLOCK_LEN]); -void aesni_encrypt_ecb(int rounds, const void *key_schedule, size_t len, - const uint8_t from[AES_BLOCK_LEN], uint8_t to[AES_BLOCK_LEN]); -void aesni_decrypt_ecb(int rounds, const void *key_schedule, size_t len, - const uint8_t from[AES_BLOCK_LEN], uint8_t to[AES_BLOCK_LEN]); - -void aesni_encrypt_xts(int rounds, const void *data_schedule, - const void *tweak_schedule, size_t len, const uint8_t *from, uint8_t *to, - const uint8_t iv[AES_BLOCK_LEN]); -void aesni_decrypt_xts(int rounds, const void *data_schedule, - const void *tweak_schedule, size_t len, const uint8_t *from, uint8_t *to, +void aesni_encrypt_cbc(int rounds, const void *key_schedule /*__aligned(16)*/, + size_t len, const uint8_t *from, uint8_t *to, const uint8_t iv[AES_BLOCK_LEN]); +void aesni_decrypt_cbc(int rounds, const void *key_schedule /*__aligned(16)*/, + size_t len, uint8_t *buf, const uint8_t iv[AES_BLOCK_LEN]); +void aesni_encrypt_ecb(int rounds, const void *key_schedule /*__aligned(16)*/, + size_t len, const uint8_t *from, uint8_t *to); +void aesni_decrypt_ecb(int rounds, const void *key_schedule /*__aligned(16)*/, + size_t len, const uint8_t *from, uint8_t *to); + +void aesni_encrypt_xts(int rounds, const void *data_schedule /*__aligned(16)*/, + const void *tweak_schedule /*__aligned(16)*/, size_t len, + const uint8_t *from, uint8_t *to, const uint8_t iv[AES_BLOCK_LEN]); +void aesni_decrypt_xts(int rounds, const void *data_schedule /*__aligned(16)*/, + const void *tweak_schedule /*__aligned(16)*/, size_t len, + const uint8_t *from, uint8_t *to, const uint8_t iv[AES_BLOCK_LEN]); int aesni_cipher_setup(struct aesni_session *ses, struct cryptoini *encini); @@ -103,4 +104,4 @@ int aesni_cipher_process(struct aesni_se uint8_t *aesni_cipher_alloc(struct cryptodesc *enccrd, struct cryptop *crp, int *allocated); -#endif +#endif /* _AESNI_H_ */ Modified: head/sys/crypto/aesni/aesni_wrap.c ============================================================================== --- head/sys/crypto/aesni/aesni_wrap.c Wed Nov 6 18:43:16 2013 (r257756) +++ head/sys/crypto/aesni/aesni_wrap.c Wed Nov 6 19:14:49 2013 (r257757) @@ -41,6 +41,10 @@ __FBSDID("$FreeBSD$"); MALLOC_DECLARE(M_AESNI); +struct blocks8 { + __m128i blk[8]; +} __packed; + void aesni_encrypt_cbc(int rounds, const void *key_schedule, size_t len, const uint8_t *from, uint8_t *to, const uint8_t iv[AES_BLOCK_LEN]) @@ -65,20 +69,20 @@ aesni_decrypt_cbc(int rounds, const void uint8_t *buf, const uint8_t iv[AES_BLOCK_LEN]) { __m128i blocks[8]; - __m128i *bufs; + struct blocks8 *blks; __m128i ivreg, nextiv; size_t i, j, cnt; ivreg = _mm_loadu_si128((const __m128i *)iv); cnt = len / AES_BLOCK_LEN / 8; for (i = 0; i < cnt; i++) { - bufs = (__m128i *)buf; - aesni_dec8(rounds - 1, key_schedule, bufs[0], bufs[1], - bufs[2], bufs[3], bufs[4], bufs[5], bufs[6], - bufs[7], &blocks[0]); + blks = (struct blocks8 *)buf; + aesni_dec8(rounds - 1, key_schedule, blks->blk[0], blks->blk[1], + blks->blk[2], blks->blk[3], blks->blk[4], blks->blk[5], + blks->blk[6], blks->blk[7], &blocks[0]); for (j = 0; j < 8; j++) { - nextiv = bufs[j]; - bufs[j] = blocks[j] ^ ivreg; + nextiv = blks->blk[j]; + blks->blk[j] = blocks[j] ^ ivreg; ivreg = nextiv; } buf += AES_BLOCK_LEN * 8; @@ -86,9 +90,9 @@ aesni_decrypt_cbc(int rounds, const void i *= 8; cnt = len / AES_BLOCK_LEN; for (; i < cnt; i++) { - bufs = (__m128i *)buf; - nextiv = bufs[0]; - bufs[0] = aesni_dec(rounds - 1, key_schedule, bufs[0]) ^ ivreg; + nextiv = _mm_loadu_si128((void *)buf); + _mm_storeu_si128((void *)buf, + aesni_dec(rounds - 1, key_schedule, nextiv) ^ ivreg); ivreg = nextiv; buf += AES_BLOCK_LEN; } @@ -99,15 +103,26 @@ aesni_encrypt_ecb(int rounds, const void const uint8_t *from, uint8_t *to) { __m128i tot; - const __m128i *blocks; + __m128i tout[8]; + struct blocks8 *top; + const struct blocks8 *blks; size_t i, cnt; cnt = len / AES_BLOCK_LEN / 8; for (i = 0; i < cnt; i++) { - blocks = (const __m128i *)from; - aesni_enc8(rounds - 1, key_schedule, blocks[0], blocks[1], - blocks[2], blocks[3], blocks[4], blocks[5], blocks[6], - blocks[7], (__m128i *)to); + blks = (const struct blocks8 *)from; + top = (struct blocks8 *)to; + aesni_enc8(rounds - 1, key_schedule, blks->blk[0], blks->blk[1], + blks->blk[2], blks->blk[3], blks->blk[4], blks->blk[5], + blks->blk[6], blks->blk[7], tout); + top->blk[0] = tout[0]; + top->blk[1] = tout[1]; + top->blk[2] = tout[2]; + top->blk[3] = tout[3]; + top->blk[4] = tout[4]; + top->blk[5] = tout[5]; + top->blk[6] = tout[6]; + top->blk[7] = tout[7]; from += AES_BLOCK_LEN * 8; to += AES_BLOCK_LEN * 8; } @@ -127,15 +142,26 @@ aesni_decrypt_ecb(int rounds, const void const uint8_t from[AES_BLOCK_LEN], uint8_t to[AES_BLOCK_LEN]) { __m128i tot; - const __m128i *blocks; + __m128i tout[8]; + const struct blocks8 *blks; + struct blocks8 *top; size_t i, cnt; cnt = len / AES_BLOCK_LEN / 8; for (i = 0; i < cnt; i++) { - blocks = (const __m128i *)from; - aesni_dec8(rounds - 1, key_schedule, blocks[0], blocks[1], - blocks[2], blocks[3], blocks[4], blocks[5], blocks[6], - blocks[7], (__m128i *)to); + blks = (const struct blocks8 *)from; + top = (struct blocks8 *)to; + aesni_dec8(rounds - 1, key_schedule, blks->blk[0], blks->blk[1], + blks->blk[2], blks->blk[3], blks->blk[4], blks->blk[5], + blks->blk[6], blks->blk[7], tout); + top->blk[0] = tout[0]; + top->blk[1] = tout[1]; + top->blk[2] = tout[2]; + top->blk[3] = tout[3]; + top->blk[4] = tout[4]; + top->blk[5] = tout[5]; + top->blk[6] = tout[6]; + top->blk[7] = tout[7]; from += AES_BLOCK_LEN * 8; to += AES_BLOCK_LEN * 8; } @@ -173,31 +199,33 @@ xts_crank_lfsr(__m128i inp) } static void -aesni_crypt_xts_block(int rounds, const void *key_schedule, __m128i *tweak, - const __m128i *from, __m128i *to, int do_encrypt) +aesni_crypt_xts_block(int rounds, const __m128i *key_schedule, __m128i *tweak, + const uint8_t *from, uint8_t *to, int do_encrypt) { __m128i block; - block = *from ^ *tweak; + block = _mm_loadu_si128((const __m128i *)from) ^ *tweak; if (do_encrypt) block = aesni_enc(rounds - 1, key_schedule, block); else block = aesni_dec(rounds - 1, key_schedule, block); - *to = block ^ *tweak; + _mm_storeu_si128((__m128i *)to, block ^ *tweak); *tweak = xts_crank_lfsr(*tweak); } static void -aesni_crypt_xts_block8(int rounds, const void *key_schedule, __m128i *tweak, - const __m128i *from, __m128i *to, int do_encrypt) +aesni_crypt_xts_block8(int rounds, const __m128i *key_schedule, __m128i *tweak, + const uint8_t *from, uint8_t *to, int do_encrypt) { __m128i tmptweak; __m128i a, b, c, d, e, f, g, h; __m128i tweaks[8]; __m128i tmp[8]; + __m128i *top; + const __m128i *fromp; tmptweak = *tweak; @@ -205,10 +233,12 @@ aesni_crypt_xts_block8(int rounds, const * unroll the loop. This lets gcc put values directly in the * register and saves memory accesses. */ + fromp = (const __m128i *)from; #define PREPINP(v, pos) \ do { \ tweaks[(pos)] = tmptweak; \ - (v) = from[(pos)] ^ tmptweak; \ + (v) = _mm_loadu_si128(&fromp[pos]) ^ \ + tmptweak; \ tmptweak = xts_crank_lfsr(tmptweak); \ } while (0) PREPINP(a, 0); @@ -228,20 +258,21 @@ aesni_crypt_xts_block8(int rounds, const aesni_dec8(rounds - 1, key_schedule, a, b, c, d, e, f, g, h, tmp); - to[0] = tmp[0] ^ tweaks[0]; - to[1] = tmp[1] ^ tweaks[1]; - to[2] = tmp[2] ^ tweaks[2]; - to[3] = tmp[3] ^ tweaks[3]; - to[4] = tmp[4] ^ tweaks[4]; - to[5] = tmp[5] ^ tweaks[5]; - to[6] = tmp[6] ^ tweaks[6]; - to[7] = tmp[7] ^ tweaks[7]; + top = (__m128i *)to; + _mm_storeu_si128(&top[0], tmp[0] ^ tweaks[0]); + _mm_storeu_si128(&top[1], tmp[1] ^ tweaks[1]); + _mm_storeu_si128(&top[2], tmp[2] ^ tweaks[2]); + _mm_storeu_si128(&top[3], tmp[3] ^ tweaks[3]); + _mm_storeu_si128(&top[4], tmp[4] ^ tweaks[4]); + _mm_storeu_si128(&top[5], tmp[5] ^ tweaks[5]); + _mm_storeu_si128(&top[6], tmp[6] ^ tweaks[6]); + _mm_storeu_si128(&top[7], tmp[7] ^ tweaks[7]); } static void -aesni_crypt_xts(int rounds, const void *data_schedule, - const void *tweak_schedule, size_t len, const uint8_t *from, uint8_t *to, - const uint8_t iv[AES_BLOCK_LEN], int do_encrypt) +aesni_crypt_xts(int rounds, const __m128i *data_schedule, + const __m128i *tweak_schedule, size_t len, const uint8_t *from, + uint8_t *to, const uint8_t iv[AES_BLOCK_LEN], int do_encrypt) { __m128i tweakreg; uint8_t tweak[AES_XTS_BLOCKSIZE] __aligned(16); @@ -264,7 +295,7 @@ aesni_crypt_xts(int rounds, const void * cnt = len / AES_XTS_BLOCKSIZE / 8; for (i = 0; i < cnt; i++) { aesni_crypt_xts_block8(rounds, data_schedule, &tweakreg, - (const __m128i *)from, (__m128i *)to, do_encrypt); + from, to, do_encrypt); from += AES_XTS_BLOCKSIZE * 8; to += AES_XTS_BLOCKSIZE * 8; } @@ -272,7 +303,7 @@ aesni_crypt_xts(int rounds, const void * cnt = len / AES_XTS_BLOCKSIZE; for (; i < cnt; i++) { aesni_crypt_xts_block(rounds, data_schedule, &tweakreg, - (const __m128i *)from, (__m128i *)to, do_encrypt); + from, to, do_encrypt); from += AES_XTS_BLOCKSIZE; to += AES_XTS_BLOCKSIZE; } From owner-svn-src-head@FreeBSD.ORG Wed Nov 6 19:18:20 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B704F756; Wed, 6 Nov 2013 19:18:20 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8E4402646; Wed, 6 Nov 2013 19:18:20 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 794E1B94A; Wed, 6 Nov 2013 14:18:19 -0500 (EST) From: John Baldwin To: Gleb Smirnoff Subject: Re: svn commit: r257696 - in head: libexec/rbootd share/man/man9 sys/compat/svr4 sys/net sys/sys Date: Wed, 6 Nov 2013 10:24:08 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20130906; KDE/4.5.5; amd64; ; ) References: <20131106062029.GP7577@FreeBSD.org> In-Reply-To: <20131106062029.GP7577@FreeBSD.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201311061024.09200.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 06 Nov 2013 14:18:19 -0500 (EST) Cc: svn-src-head@freebsd.org, Adrian Chadd , src-committers@freebsd.org, svn-src-all@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Nov 2013 19:18:20 -0000 On Wednesday, November 06, 2013 1:20:29 am Gleb Smirnoff wrote: > John, Adrian, > > On Tue, Nov 05, 2013 at 05:18:26PM -0500, John Baldwin wrote: > J> Mmmm, people run older versions of binaries (even open source ones) on newer OS's > J> perhaps more often than you think. The COMPAT_43 stuff can be dropped certainly, > J> but people will almost certainly do rolling upgrades where they upgrade the OS > J> on their machines before they upgrade their packages. > > On Tue, Nov 05, 2013 at 02:25:13PM -0800, Adrian Chadd wrote: > A> My main worry about this kind of work is that you're just steamrolling > A> through stuff that yes, should be done, but with little warning and no > A> API deprecation schedule. > A> > A> I'd much rather see this stuff handled more formally - we mark the API > A> as deprecated and remove it in the next release. > A> > A> I really don't like seeing steamrolling through the kernel and > A> deprecating APIs with minimal warning and having no (optional) > A> backwards compatibility implementations. That's what made us stand out > A> from Linux - we kept old APIs around as much as we could. Linux wasn't > A> terribly good at this. > > One reply to both of you. The schedule is the following: we are compatible > with previous major version. The interface had changed in early > 10.0-CURRENT, and during the entire 10.0-CURRENT life it has supported the > new and the old interface and this went into stable/10. When doing the change, > I have pronounced this deprecation schedule. > > If anyone upgrades to next major: 9.x -> 10.x, or 10.x -> 11.x, including > package sets, then everything will be working for him. As I said, you ignore users who run older binaries on a large cluster of machines while doing staged OS upgrades. By your logic, we shouldn't have any COMPAT_FREEBSD options at all except for . The presence of such options would seem to indicate that your assumption is incorrect. -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Wed Nov 6 19:18:28 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 420F9845; Wed, 6 Nov 2013 19:18:28 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1763C264A; Wed, 6 Nov 2013 19:18:28 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 294F0B981; Wed, 6 Nov 2013 14:18:27 -0500 (EST) From: John Baldwin To: Adrian Chadd Subject: Re: svn commit: r257696 - in head: libexec/rbootd share/man/man9 sys/compat/svr4 sys/net sys/sys Date: Wed, 6 Nov 2013 12:08:35 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20130906; KDE/4.5.5; amd64; ; ) References: <201311051029.rA5ATmmM017799@svn.freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201311061208.36029.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 06 Nov 2013 14:18:27 -0500 (EST) Cc: "svn-src-head@freebsd.org" , svn-src-all , Gleb Smirnoff , "src-committers@freebsd.org" , Peter Wemm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Nov 2013 19:18:28 -0000 On Wednesday, November 06, 2013 12:00:59 pm Adrian Chadd wrote: > I think the important thing here is that there _are_ organisations > that rely on some reasonable attempt at supporting historical APIs > where needed. > > This IMHO should've explicitly gone into a compat macro for people who > want support of this older stuff. > > My suggestion for a saner way to handle this deprecation schedule: > > * do the announce - I'd have to go looking for that, but we should be > placing these somewhere obvious (like a wiki page that lists > deprecated APIs in order, with the date/release they're going to be > deprecated); > * deprecate the userland use of the ioctl values first so they use the > newer API; > * deprecate the kernel API after the announced amount of time, hiding > things behind COMPAT_xxx as appropriate. Actually, Gleb has mostly done this, it's just that the last step turned into an rm rather than moving under an #ifdef COMPAT_xxxx. -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Wed Nov 6 19:18:39 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 902C6A89; Wed, 6 Nov 2013 19:18:39 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7CCCA265A; Wed, 6 Nov 2013 19:18:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA6JIdZd008173; Wed, 6 Nov 2013 19:18:39 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA6JIdBD008172; Wed, 6 Nov 2013 19:18:39 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201311061918.rA6JIdBD008172@svn.freebsd.org> From: Luigi Rizzo Date: Wed, 6 Nov 2013 19:18:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257758 - head/sys/dev/netmap X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Nov 2013 19:18:39 -0000 Author: luigi Date: Wed Nov 6 19:18:39 2013 New Revision: 257758 URL: http://svnweb.freebsd.org/changeset/base/257758 Log: remove a debugging message Modified: head/sys/dev/netmap/netmap.c Modified: head/sys/dev/netmap/netmap.c ============================================================================== --- head/sys/dev/netmap/netmap.c Wed Nov 6 19:14:49 2013 (r257757) +++ head/sys/dev/netmap/netmap.c Wed Nov 6 19:18:39 2013 (r257758) @@ -3008,7 +3008,7 @@ netmap_reset(struct netmap_adapter *na, return NULL; /* no netmap support here */ } if (!(na->ifp->if_capenable & IFCAP_NETMAP)) { - D("interface not in netmap mode"); + ND("interface not in netmap mode"); return NULL; /* nothing to reinitialize */ } From owner-svn-src-head@FreeBSD.ORG Wed Nov 6 19:46:21 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A76C851D; Wed, 6 Nov 2013 19:46:21 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 917AE28BF; Wed, 6 Nov 2013 19:46:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA6JkLUL017948; Wed, 6 Nov 2013 19:46:21 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA6JkLcJ017945; Wed, 6 Nov 2013 19:46:21 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201311061946.rA6JkLcJ017945@svn.freebsd.org> From: Gleb Smirnoff Date: Wed, 6 Nov 2013 19:46:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257761 - in head/sys: net netinet sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Nov 2013 19:46:21 -0000 Author: glebius Date: Wed Nov 6 19:46:20 2013 New Revision: 257761 URL: http://svnweb.freebsd.org/changeset/base/257761 Log: Provide compat layer for OSIOCAIFADDR. Modified: head/sys/net/if.h head/sys/netinet/in.c head/sys/sys/sockio.h Modified: head/sys/net/if.h ============================================================================== --- head/sys/net/if.h Wed Nov 6 19:35:06 2013 (r257760) +++ head/sys/net/if.h Wed Nov 6 19:46:20 2013 (r257761) @@ -412,6 +412,14 @@ struct ifaliasreq { int ifra_vhid; }; +/* 9.x compat */ +struct oifaliasreq { + char ifra_name[IFNAMSIZ]; + struct sockaddr ifra_addr; + struct sockaddr ifra_broadaddr; + struct sockaddr ifra_mask; +}; + struct ifmediareq { char ifm_name[IFNAMSIZ]; /* if name, e.g. "en0" */ int ifm_current; /* current media options */ Modified: head/sys/netinet/in.c ============================================================================== --- head/sys/netinet/in.c Wed Nov 6 19:35:06 2013 (r257760) +++ head/sys/netinet/in.c Wed Nov 6 19:46:20 2013 (r257761) @@ -72,7 +72,7 @@ static int in_mask2len(struct in_addr *) static void in_len2mask(struct in_addr *, int); static int in_lifaddr_ioctl(struct socket *, u_long, caddr_t, struct ifnet *, struct thread *); -static int in_aifaddr_ioctl(caddr_t, struct ifnet *, struct thread *); +static int in_aifaddr_ioctl(u_long, caddr_t, struct ifnet *, struct thread *); static int in_difaddr_ioctl(caddr_t, struct ifnet *, struct thread *); static void in_socktrim(struct sockaddr_in *); @@ -259,9 +259,10 @@ in_control(struct socket *so, u_long cmd error = in_difaddr_ioctl(data, ifp, td); sx_xunlock(&in_control_sx); return (error); + case OSIOCAIFADDR: /* 9.x compat */ case SIOCAIFADDR: sx_xlock(&in_control_sx); - error = in_aifaddr_ioctl(data, ifp, td); + error = in_aifaddr_ioctl(cmd, data, ifp, td); sx_xunlock(&in_control_sx); return (error); case SIOCALIFADDR: @@ -335,14 +336,14 @@ in_control(struct socket *so, u_long cmd } static int -in_aifaddr_ioctl(caddr_t data, struct ifnet *ifp, struct thread *td) +in_aifaddr_ioctl(u_long cmd, caddr_t data, struct ifnet *ifp, struct thread *td) { const struct in_aliasreq *ifra = (struct in_aliasreq *)data; const struct sockaddr_in *addr = &ifra->ifra_addr; const struct sockaddr_in *broadaddr = &ifra->ifra_broadaddr; const struct sockaddr_in *mask = &ifra->ifra_mask; const struct sockaddr_in *dstaddr = &ifra->ifra_dstaddr; - const int vhid = ifra->ifra_vhid; + const int vhid = (cmd == SIOCAIFADDR) ? ifra->ifra_vhid : 0; struct ifaddr *ifa; struct in_ifaddr *ia; bool iaIsFirst; Modified: head/sys/sys/sockio.h ============================================================================== --- head/sys/sys/sockio.h Wed Nov 6 19:35:06 2013 (r257760) +++ head/sys/sys/sockio.h Wed Nov 6 19:46:20 2013 (r257761) @@ -68,7 +68,7 @@ #define SIOCGIFMETRIC _IOWR('i', 23, struct ifreq) /* get IF metric */ #define SIOCSIFMETRIC _IOW('i', 24, struct ifreq) /* set IF metric */ #define SIOCDIFADDR _IOW('i', 25, struct ifreq) /* delete IF addr */ -/* OSIOCAIFADDR _IOW('i', 26, struct oifaliasreq) FreeBSD 9.x */ +#define OSIOCAIFADDR _IOW('i', 26, struct oifaliasreq) /* FreeBSD 9.x */ #define SIOCALIFADDR _IOW('i', 27, struct if_laddrreq) /* add IF addr */ #define SIOCGLIFADDR _IOWR('i', 28, struct if_laddrreq) /* get IF addr */ #define SIOCDLIFADDR _IOW('i', 29, struct if_laddrreq) /* delete IF addr */ From owner-svn-src-head@FreeBSD.ORG Wed Nov 6 19:49:20 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 89B097E7; Wed, 6 Nov 2013 19:49:20 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0890C28EA; Wed, 6 Nov 2013 19:49:19 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.7/8.14.7) with ESMTP id rA6JnHZv017955 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 6 Nov 2013 23:49:17 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.7/8.14.7/Submit) id rA6JnHoN017954; Wed, 6 Nov 2013 23:49:17 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Wed, 6 Nov 2013 23:49:17 +0400 From: Gleb Smirnoff To: Peter Wemm Subject: Re: svn commit: r257696 - in head: libexec/rbootd share/man/man9 sys/compat/svr4 sys/net sys/sys Message-ID: <20131106194917.GG7577@FreeBSD.org> References: <201311051029.rA5ATmmM017799@svn.freebsd.org> <201311051156.09819.jhb@freebsd.org> <20131105192904.GG7577@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.22 (2013-10-16) Cc: "svn-src-head@freebsd.org" , svn-src-all , "src-committers@freebsd.org" , John Baldwin X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Nov 2013 19:49:20 -0000 Peter, with r257761 and r257762, the ifconfig(8) from FreeBSD 9.3 will run on 11.0-RELEASE. -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Wed Nov 6 20:03:26 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 9AC34E7E; Wed, 6 Nov 2013 20:03:26 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6F4CB29F9; Wed, 6 Nov 2013 20:03:26 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 8F5BAB918; Wed, 6 Nov 2013 15:03:25 -0500 (EST) From: John Baldwin To: Peter Wemm Subject: Re: svn commit: r257696 - in head: libexec/rbootd share/man/man9 sys/compat/svr4 sys/net sys/sys Date: Wed, 6 Nov 2013 14:22:17 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20130906; KDE/4.5.5; amd64; ; ) References: <201311051029.rA5ATmmM017799@svn.freebsd.org> <527A80F4.1090405@wemm.org> In-Reply-To: <527A80F4.1090405@wemm.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201311061422.17627.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 06 Nov 2013 15:03:25 -0500 (EST) Cc: "svn-src-head@freebsd.org" , Adrian Chadd , Gleb Smirnoff , "src-committers@freebsd.org" , svn-src-all X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Nov 2013 20:03:26 -0000 On Wednesday, November 06, 2013 12:48:36 pm Peter Wemm wrote: > On 11/6/13, 9:00 AM, Adrian Chadd wrote: > > I think the important thing here is that there _are_ organisations > > that rely on some reasonable attempt at supporting historical APIs > > where needed. > > > > This IMHO should've explicitly gone into a compat macro for people who > > want support of this older stuff. > > > > My suggestion for a saner way to handle this deprecation schedule: > > > > * do the announce - I'd have to go looking for that, but we should be > > placing these somewhere obvious (like a wiki page that lists > > deprecated APIs in order, with the date/release they're going to be > > deprecated); > > * deprecate the userland use of the ioctl values first so they use the > > newer API; > > * deprecate the kernel API after the announced amount of time, hiding > > things behind COMPAT_xxx as appropriate. > > That's how it was before - behind COMPAT_43 etc and he removed it. > COMPAT_43 now does less than it did before. I think removing COMPAT_43 is a separate issue from removing what should be under COMPAT_FREEBSD9. I doubt much of anything is using COMPAT_43 ioctls, but there are likely things using the older version of the still-current ioctl that would need to be under COMPAT_FREEBSD[4-9]. -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Wed Nov 6 20:53:54 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id E637B109 for ; Wed, 6 Nov 2013 20:53:53 +0000 (UTC) (envelope-from peter@wemm.org) Received: from mail-pb0-x233.google.com (mail-pb0-x233.google.com [IPv6:2607:f8b0:400e:c01::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B424B2D72 for ; Wed, 6 Nov 2013 20:53:53 +0000 (UTC) Received: by mail-pb0-f51.google.com with SMTP id xa7so47017pbc.38 for ; Wed, 06 Nov 2013 12:53:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wemm.org; s=google; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=SVwmfK5dzXA3PpQsfbKxRcHsNAeWSPjG1DjMg2g+GBM=; b=XmrpbfYsangXLD3BwUTlryoNqXq7mu0/8fz/zwISWaBEj6jdtV58Fc+Hr07KxJjGw1 EabIicCqg1DEzLiaVMIsg6jhF2fl7XJj9ppWTAq8H6AWwDizM8CMJldrCZ5KJ61OUmbX qki53XnxTzgINN2PWrtpYOv7XDy8EwSMlL8/0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=SVwmfK5dzXA3PpQsfbKxRcHsNAeWSPjG1DjMg2g+GBM=; b=PCeZxKp0ORjmOHRo6DAixFmsnRH67Ge/h93kQA24KnqgeFjOI7++3bcXBsmrEWRylz yUUqz2ovl3hBFgzRQ+rleQj6dSa7ZmwVh6CY99JL6SWw+y760r0aLsjLGNuc06I6Zk2F H3Moypy+EuAaZsaHarMVDKCYlSmmWn/DDmWOJmprOw2LkTlwsNSZTtiklaS0OhROftHM 27Ks0nXTkALI3Nm25LKEKqsZx9ujBFUCbnMbobMNPYqp9DdhpXhrXuIpsWZzHshdm39Q tMcp+3baYJFtXvE6mgU+hqGThNJqFqxKwOcQI2X1kwwtF56Qyl3tYm37DPvbZLfnjfh2 kXbQ== X-Gm-Message-State: ALoCoQmcHSWGQ0gIInRdpFX+MKRXeFlIwwlOcIiv1hV2TFpndsWnJE3Dw3Hg7HIlmwQSeKXgHgJ0 X-Received: by 10.68.253.129 with SMTP id aa1mr5157895pbd.189.1383771233039; Wed, 06 Nov 2013 12:53:53 -0800 (PST) Received: from hater-dm.corp.yahoo.com (nat-dip4.cfw-a-gci.corp.yahoo.com. [209.131.62.113]) by mx.google.com with ESMTPSA id xe9sm755429pab.0.2013.11.06.12.53.51 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 06 Nov 2013 12:53:52 -0800 (PST) Message-ID: <527AAC5F.9040009@wemm.org> Date: Wed, 06 Nov 2013 12:53:51 -0800 From: Peter Wemm User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: Gleb Smirnoff Subject: Re: svn commit: r257696 - in head: libexec/rbootd share/man/man9 sys/compat/svr4 sys/net sys/sys References: <201311051029.rA5ATmmM017799@svn.freebsd.org> <201311051156.09819.jhb@freebsd.org> <20131105192904.GG7577@FreeBSD.org> <20131106181956.GC7577@FreeBSD.org> In-Reply-To: <20131106181956.GC7577@FreeBSD.org> X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: "svn-src-head@freebsd.org" , svn-src-all , "src-committers@freebsd.org" , John Baldwin X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Nov 2013 20:53:54 -0000 On 11/6/13, 10:19 AM, Gleb Smirnoff wrote: > On Wed, Nov 06, 2013 at 08:30:43AM -0800, Peter Wemm wrote: > P> > Why should we support such broken configurations as running new kernel and > P> > ancient core base system utilities? The efforts to keep this are much more > P> > expensive, then yields. > P> > > P> Why? because up until now you could run a FreeBSD4 jail on a modern system > P> and reasonably expect it to work. No, we don't really "support" system > P> level tools, but examining network state is widely used. No, one doesn't > P> run ifconfig to set interface configs in jails, but there's a lot of > P> scripts to read the configuration. > > Examining interface configs are done via getifaddrs(3), which uses NET_RT_IFLISTL > sysctl, and this is not touched by this commit. Sorry, getifaddrs(3) was a BSD addition. It is far from universally used. eg:on a typical Linux, it has: CONFORMING TO getifaddrs(3) is not in POSIX.1-2001. This function first appeared in BSDi and is present on some BSD systems, but with different semantics... The highest common interface is SIOCGIF*. I'm not talking about just ifconfig(8), but also third party binary tools. > P> > But why the hell should we support an insane who will try to run > P> > ifconfig(8) > P> > from FreeBSD 4 on FreeBSD 11? Not speaking about this tool from 4.4BSD, > P> > LOL :) > P> > This is not what COMPAT_FREEBSD4 meant to be. > P> > > P> > P> Insane? Perhaps, but it's keeping FreeBSD alive in a fairly large company I > P> know of. We'll have to locally revert this change, most likely, and spend > P> time supporting it ourselves instead of doing other potentially more useful > P> things to help FreeBSD in general. > > I will not agree that an insane idea gets sane, if it is performed by a large > company. "Large" doesn't mean "right". Can you please describe the scenario that > may urge someone to run ifconfig(9) that is several major versions backwards > on a modern kernel? What does prevent someone to install appropriate world, or > at least ifconfig(8)? We run old binaries in jails because that's what they were shipped with. For example, we had to implement the 32 bit freebsd-4 interface to /dev/pci so that the 4.x 32 bit pciconf(8) runs. One scenario is: Scrape old FreeBSD-4.x machine. Put it in a jail on a current host. That implicitly brings old binaries with it. > May be it is worth to invest time into improving our upgrading technics? We've > got freebsd-update(1). Doesn't it work for large companies? We have at minimum > 2 years before 11.0-RELEASE will be released. We can invest time into upgrading > technics, or into writing down compat layers. We don't use anything that you'd recognize as a FreeBSD "release" so freebsd-update(1) isn't interesting. We use compat layers to keep the old binaries running just well enough. Unfortunately for us, we have to go a bit further than regular freebsd because we need to keep a selection of system level tools running that can examine system state. eg: a 12 year old pciconf(8) binary so that it can list the pci devices present. > If you can explain what can prevent > someone to upgrade ifconfig, but to push kernel to 11.0, then we could work > on it. May be we should fix these obstacles on the upgrade path, instead of > layering one compat layer over another? All that we need is for ancient 4.x binaries to keep running that *read* interface state. Stuff that was compiled years ago by people who no longer work at the company and we have no way to reproduce. That's what things like COMPAT_FREEBSD4 etc is for. We have some commercial 3.x and 4.x binary "things" that will never be updated. > Ok, if you need to, you can just revert commit right here in FreeBSD svn, I > will not start a commit war. I am already very close to abandon idea on cleaning > network stack, since this work is very very ungrateful. There is no need for that, we'll just re-implement the COMPAT_* that was removed in our tree at work, as needed. I just suspect that since some 9.x binaries are affected by the compat removal that more people than just us will be affected. -Peter From owner-svn-src-head@FreeBSD.ORG Wed Nov 6 21:42:58 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id BD47BF33; Wed, 6 Nov 2013 21:42:58 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AB1F720E6; Wed, 6 Nov 2013 21:42:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA6LgwS2057710; Wed, 6 Nov 2013 21:42:58 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA6Lgwuj057709; Wed, 6 Nov 2013 21:42:58 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201311062142.rA6Lgwuj057709@svn.freebsd.org> From: Luigi Rizzo Date: Wed, 6 Nov 2013 21:42:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257765 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Nov 2013 21:42:58 -0000 Author: luigi Date: Wed Nov 6 21:42:58 2013 New Revision: 257765 URL: http://svnweb.freebsd.org/changeset/base/257765 Log: the number of slots used by a packet is NS_RFRAGS() not ns_cnt Modified: head/share/man/man4/netmap.4 Modified: head/share/man/man4/netmap.4 ============================================================================== --- head/share/man/man4/netmap.4 Wed Nov 6 21:00:18 2013 (r257764) +++ head/share/man/man4/netmap.4 Wed Nov 6 21:42:58 2013 (r257765) @@ -346,13 +346,12 @@ indicates that the packet continues with the last buffer in a packet must have the flag clear. The maximum length of a chain is 64 buffers. .Em This is only supported on virtual ports -.It ns_ctr -on receive rings, contains the number of remaining buffers +.It NS_RFRAGS(slot) +on receive rings, returns the number of remaining buffers in a packet, including this one. Slots with a value greater than 1 also have NS_MOREFRAG set. The length refers to the individual buffer, there is no -field for the total length -XXX maybe put it in the ptr field ? +field for the total length. .Pp On transmit rings, if NS_DST is set, it is passed to the lookup function, which can use it e.g. as the index of the destination From owner-svn-src-head@FreeBSD.ORG Wed Nov 6 22:35:52 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id CFB4B563; Wed, 6 Nov 2013 22:35:52 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BD2992479; Wed, 6 Nov 2013 22:35:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA6MZqpu075292; Wed, 6 Nov 2013 22:35:52 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA6MZqLV075291; Wed, 6 Nov 2013 22:35:52 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201311062235.rA6MZqLV075291@svn.freebsd.org> From: Neel Natu Date: Wed, 6 Nov 2013 22:35:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257767 - head/usr.sbin/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Nov 2013 22:35:52 -0000 Author: neel Date: Wed Nov 6 22:35:52 2013 New Revision: 257767 URL: http://svnweb.freebsd.org/changeset/base/257767 Log: Fix an off-by-one error when iterating over the emulated PCI BARs. Submitted by: Tycho Nightingale (tycho.nightingale@pluribusnetworks.com) Modified: head/usr.sbin/bhyve/pci_emul.c Modified: head/usr.sbin/bhyve/pci_emul.c ============================================================================== --- head/usr.sbin/bhyve/pci_emul.c Wed Nov 6 22:35:23 2013 (r257766) +++ head/usr.sbin/bhyve/pci_emul.c Wed Nov 6 22:35:52 2013 (r257767) @@ -1252,7 +1252,7 @@ pci_emul_cmdwrite(struct pci_devinst *pi * If the MMIO or I/O address space decoding has changed then * register/unregister all BARs that decode that address space. */ - for (i = 0; i < PCI_BARMAX; i++) { + for (i = 0; i <= PCI_BARMAX; i++) { switch (pi->pi_bar[i].type) { case PCIBAR_NONE: case PCIBAR_MEMHI64: From owner-svn-src-head@FreeBSD.ORG Wed Nov 6 23:29:30 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D7FF0B2B; Wed, 6 Nov 2013 23:29:30 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C092D2792; Wed, 6 Nov 2013 23:29:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA6NTPTt095175; Wed, 6 Nov 2013 23:29:25 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA6NTPr4095174; Wed, 6 Nov 2013 23:29:25 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201311062329.rA6NTPr4095174@svn.freebsd.org> From: Sean Bruno Date: Wed, 6 Nov 2013 23:29:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257769 - head/sys/x86/cpufreq X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Nov 2013 23:29:30 -0000 Author: sbruno Date: Wed Nov 6 23:29:25 2013 New Revision: 257769 URL: http://svnweb.freebsd.org/changeset/base/257769 Log: Fix powerd/states on AMD cpus. Resolves issues with system reporting: hwpstate0: set freq failed, err 6 Tested on FX-8150 and others. PR: 167018 Submitted by: avg MFC after: 2 weeks Modified: head/sys/x86/cpufreq/hwpstate.c Modified: head/sys/x86/cpufreq/hwpstate.c ============================================================================== --- head/sys/x86/cpufreq/hwpstate.c Wed Nov 6 22:36:36 2013 (r257768) +++ head/sys/x86/cpufreq/hwpstate.c Wed Nov 6 23:29:25 2013 (r257769) @@ -184,16 +184,21 @@ hwpstate_goto_pstate(device_t dev, int p id, PCPU_GET(cpuid)); /* Go To Px-state */ wrmsr(MSR_AMD_10H_11H_CONTROL, id); + } + CPU_FOREACH(i) { + /* Bind to each cpu. */ + thread_lock(curthread); + sched_bind(curthread, i); + thread_unlock(curthread); /* wait loop (100*100 usec is enough ?) */ for(j = 0; j < 100; j++){ + /* get the result. not assure msr=id */ msr = rdmsr(MSR_AMD_10H_11H_STATUS); if(msr == id){ break; } DELAY(100); } - /* get the result. not assure msr=id */ - msr = rdmsr(MSR_AMD_10H_11H_STATUS); HWPSTATE_DEBUG(dev, "result P%d-state on cpu%d\n", (int)msr, PCPU_GET(cpuid)); if (msr != id) { From owner-svn-src-head@FreeBSD.ORG Wed Nov 6 23:44:53 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C88FB6DB; Wed, 6 Nov 2013 23:44:53 +0000 (UTC) (envelope-from kargl@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B45B428E4; Wed, 6 Nov 2013 23:44:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA6NirkR001252; Wed, 6 Nov 2013 23:44:53 GMT (envelope-from kargl@svn.freebsd.org) Received: (from kargl@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA6Niqkf001246; Wed, 6 Nov 2013 23:44:52 GMT (envelope-from kargl@svn.freebsd.org) Message-Id: <201311062344.rA6Niqkf001246@svn.freebsd.org> From: Steve Kargl Date: Wed, 6 Nov 2013 23:44:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257770 - head/lib/msun/src X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Nov 2013 23:44:54 -0000 Author: kargl Date: Wed Nov 6 23:44:52 2013 New Revision: 257770 URL: http://svnweb.freebsd.org/changeset/base/257770 Log: * Use "math.h" instead of . * Use bit twiddling. This requires inclusion of math_private.h and inclusion of float.h in s_roundl.c. Raise invalid exception. * Use literal integer constants where possible. Let the compiler do the appropriate conversion. * In s_roundf.c, use an F suffix on float constants instead of promoting float to double and then converting the result back to float. In s_roundl.c, use an L suffix. * In s_roundl.c, use the ENTERI and RETURNI macros. This requires the inclusion of fpmath.h and on __i386__ class hardware ieeefp.h. Reviewed by: bde Modified: head/lib/msun/src/s_round.c head/lib/msun/src/s_roundf.c head/lib/msun/src/s_roundl.c Modified: head/lib/msun/src/s_round.c ============================================================================== --- head/lib/msun/src/s_round.c Wed Nov 6 23:29:25 2013 (r257769) +++ head/lib/msun/src/s_round.c Wed Nov 6 23:44:52 2013 (r257770) @@ -27,25 +27,28 @@ #include __FBSDID("$FreeBSD$"); -#include +#include "math.h" +#include "math_private.h" double round(double x) { double t; + uint32_t hx; - if (!isfinite(x)) - return (x); + GET_HIGH_WORD(hx, x); + if ((hx & 0x7fffffff) == 0x7ff00000) + return (x + x); - if (x >= 0.0) { + if (!(hx & 0x80000000)) { t = floor(x); if (t - x <= -0.5) - t += 1.0; + t += 1; return (t); } else { t = floor(-x); if (t + x <= -0.5) - t += 1.0; + t += 1; return (-t); } } Modified: head/lib/msun/src/s_roundf.c ============================================================================== --- head/lib/msun/src/s_roundf.c Wed Nov 6 23:29:25 2013 (r257769) +++ head/lib/msun/src/s_roundf.c Wed Nov 6 23:44:52 2013 (r257770) @@ -27,25 +27,28 @@ #include __FBSDID("$FreeBSD$"); -#include +#include "math.h" +#include "math_private.h" float roundf(float x) { float t; + uint32_t hx; - if (!isfinite(x)) - return (x); + GET_FLOAT_WORD(hx, x); + if ((hx & 0x7fffffff) == 0x7f800000) + return (x + x); - if (x >= 0.0) { + if (!(hx & 0x80000000)) { t = floorf(x); - if (t - x <= -0.5) - t += 1.0; + if (t - x <= -0.5F) + t += 1; return (t); } else { t = floorf(-x); - if (t + x <= -0.5) - t += 1.0; + if (t + x <= -0.5F) + t += 1; return (-t); } } Modified: head/lib/msun/src/s_roundl.c ============================================================================== --- head/lib/msun/src/s_roundl.c Wed Nov 6 23:29:25 2013 (r257769) +++ head/lib/msun/src/s_roundl.c Wed Nov 6 23:44:52 2013 (r257770) @@ -27,25 +27,36 @@ #include __FBSDID("$FreeBSD$"); -#include +#include +#ifdef __i386__ +#include +#endif + +#include "fpmath.h" +#include "math.h" +#include "math_private.h" long double roundl(long double x) { long double t; + uint16_t hx; + + GET_LDBL_EXPSIGN(hx, x); + if ((hx & 0x7fff) == 0x7fff) + return (x + x); - if (!isfinite(x)) - return (x); + ENTERI(); - if (x >= 0.0) { + if (!(hx & 0x8000)) { t = floorl(x); - if (t - x <= -0.5) - t += 1.0; - return (t); + if (t - x <= -0.5L) + t += 1; + RETURNI(t); } else { t = floorl(-x); - if (t + x <= -0.5) - t += 1.0; - return (-t); + if (t + x <= -0.5L) + t += 1; + RETURNI(-t); } } From owner-svn-src-head@FreeBSD.ORG Thu Nov 7 00:05:38 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 513F921A; Thu, 7 Nov 2013 00:05:38 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2B0462A2F; Thu, 7 Nov 2013 00:05:37 +0000 (UTC) Received: from julian-mbp3.pixel8networks.com (50-196-156-133-static.hfc.comcastbusiness.net [50.196.156.133]) (authenticated bits=0) by vps1.elischer.org (8.14.7/8.14.7) with ESMTP id rA705PN5054618 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Wed, 6 Nov 2013 16:05:30 -0800 (PST) (envelope-from julian@freebsd.org) Message-ID: <527AD940.7010605@freebsd.org> Date: Wed, 06 Nov 2013 16:05:20 -0800 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: John Baldwin , Gleb Smirnoff Subject: Re: svn commit: r257696 - in head: libexec/rbootd share/man/man9 sys/compat/svr4 sys/net sys/sys References: <201311051029.rA5ATmmM017799@svn.freebsd.org> <201311051447.52382.jhb@freebsd.org> <20131105204217.GK7577@FreeBSD.org> <201311051718.26356.jhb@freebsd.org> In-Reply-To: <201311051718.26356.jhb@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Nov 2013 00:05:38 -0000 On 11/5/13, 2:18 PM, John Baldwin wrote: > On Tuesday, November 05, 2013 3:42:17 pm Gleb Smirnoff wrote: >> John, >> >> On Tue, Nov 05, 2013 at 02:47:52PM -0500, John Baldwin wrote: >> J> On Tuesday, November 05, 2013 2:29:04 pm Gleb Smirnoff wrote: >> J> > On Tue, Nov 05, 2013 at 11:56:09AM -0500, John Baldwin wrote: >> J> > J> On Tuesday, November 05, 2013 5:29:48 am Gleb Smirnoff wrote: >> J> > J> > Author: glebius >> J> > J> > Date: Tue Nov 5 10:29:47 2013 >> J> > J> > New Revision: 257696 >> J> > J> > URL: http://svnweb.freebsd.org/changeset/base/257696 >> J> > J> > >> J> > J> > Log: >> J> > J> > Drop support for historic ioctls and also undefine them, so that code >> J> > J> > that checks their presence via ifdef, won't use them. >> J> > J> >> J> > J> Most of these are COMPAT_43, but one appears to be a 9.x ioctl? If that's the >> J> > J> case it's implementation should probably stick around under appropriate >> J> > J> COMPAT_FREEBSD macros. It looks like it goes all the way back to 4.4BSD, >> J> > J> so at least COMPAT_FREEBSD4 and later should define the implementation to >> J> > J> preserve ABI compat for old binaries. >> J> > >> J> > Why should we support such broken configurations as running new kernel and >> J> > ancient core base system utilities? The efforts to keep this are much more >> J> > expensive, then yields. >> J> >> J> Is this ioctl only ever used by ifconfig and not suitable for public consumption? >> J> If so, then I think removing it is fine. However, it's not clear that this is >> J> the case from the commit, and it's good to make sure it is really the case. >> J> >> J> It might be nice to hide ioctls we think are internal under some #ifdef that tools >> J> like ifconfig #define to expose them so we are more explicit about which ioctls >> J> are purely internal, etc. >> >> Well, it isn't hidden and actually some applications as zebra/quagga can use it. >> >> On previous hacking session at this area, 2 years ago, I noticed that zebra/quagga >> do use SIOCAIFADDR and it actually does better at filling sockaddrs than our >> ifconfig :) >> >> I am pretty sure that no closed source, but available to wide public, application >> that configures addresses in FreeBSD kernel exist. >> >> In case of open source applications, like zebra/quagga, supporting one major >> release behind should be enough. > Mmmm, people run older versions of binaries (even open source ones) on newer OS's > perhaps more often than you think. The COMPAT_43 stuff can be dropped certainly, > but people will almost certainly do rolling upgrades where they upgrade the OS > on their machines before they upgrade their packages. > There are people running binaries back to the 2.x days I'm sure. Personally every now and then I fire up a 1.1 jail and I'll be very sad if I can't do that any more. I don't expect ifconfig or netstat (or ps) to run, but it'd be a pitty if standard 'apps' stopped working. for a laugh you should time "make world" in such a jail.. it shows how much cost our progress comes at. Certainly, I'd like to be able to compile and package freebsd 1 or 2 based systems for very small embeded x86 based appliances.. some still exist.. From owner-svn-src-head@FreeBSD.ORG Thu Nov 7 00:16:29 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 39C56571; Thu, 7 Nov 2013 00:16:29 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DD1F22ABF; Thu, 7 Nov 2013 00:16:28 +0000 (UTC) Received: from julian-mbp3.pixel8networks.com (50-196-156-133-static.hfc.comcastbusiness.net [50.196.156.133]) (authenticated bits=0) by vps1.elischer.org (8.14.7/8.14.7) with ESMTP id rA70GQTi054657 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Wed, 6 Nov 2013 16:16:27 -0800 (PST) (envelope-from julian@freebsd.org) Message-ID: <527ADBD5.5010908@freebsd.org> Date: Wed, 06 Nov 2013 16:16:21 -0800 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: Adrian Chadd , Peter Wemm Subject: Re: svn commit: r257696 - in head: libexec/rbootd share/man/man9 sys/compat/svr4 sys/net sys/sys References: <201311051029.rA5ATmmM017799@svn.freebsd.org> <201311051156.09819.jhb@freebsd.org> <20131105192904.GG7577@FreeBSD.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: "svn-src-head@freebsd.org" , svn-src-all , Gleb Smirnoff , "src-committers@freebsd.org" , John Baldwin X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Nov 2013 00:16:29 -0000 On 11/6/13, 9:00 AM, Adrian Chadd wrote: > I think the important thing here is that there _are_ organisations > that rely on some reasonable attempt at supporting historical APIs > where needed. > > This IMHO should've explicitly gone into a compat macro for people who > want support of this older stuff. > > My suggestion for a saner way to handle this deprecation schedule: > > * do the announce - I'd have to go looking for that, but we should be > placing these somewhere obvious (like a wiki page that lists > deprecated APIs in order, with the date/release they're going to be > deprecated); > * deprecate the userland use of the ioctl values first so they use the > newer API; > * deprecate the kernel API after the announced amount of time, hiding > things behind COMPAT_xxx as appropriate. > > > -adrian > the important thing for me is the ability to run *old jails*. such jails already require a special 'ps' for example (taken from a new /rescue) but there are apps that do special things for which new binaries are not available. typical case: freebsd user company in 1996: "Hey vendor can we have a binary of your "x" app for freebsd? Just compile your 'sun' version on a freebsd machine", vendor: "ok it'll take some time but we'll try it out.." 5 years later: vendor: "we never sold more than 2 of these on FreeBSD so we are discontinuing support.." 10 years later: user company: "thank god this still runs with the compat-4 option" 2014: "shit we're screwed" :-) OR "The binaries for this still run thank god, since we lost all the sources when mumble's machine crashed." From owner-svn-src-head@FreeBSD.ORG Thu Nov 7 00:25:50 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 62957AAC; Thu, 7 Nov 2013 00:25:50 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 35D642B58; Thu, 7 Nov 2013 00:25:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA70Po6C015841; Thu, 7 Nov 2013 00:25:50 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA70Popq015840; Thu, 7 Nov 2013 00:25:50 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201311070025.rA70Popq015840@svn.freebsd.org> From: Navdeep Parhar Date: Thu, 7 Nov 2013 00:25:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257772 - head/sys/dev/cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Nov 2013 00:25:50 -0000 Author: np Date: Thu Nov 7 00:25:49 2013 New Revision: 257772 URL: http://svnweb.freebsd.org/changeset/base/257772 Log: cxgbe(4): Tidy up the display for payload memory statistics (pm_stats). # sysctl -n dev.t4nex.0.misc.pm_stats # sysctl -n dev.t5nex.0.misc.pm_stats MFC after: 1 week Modified: head/sys/dev/cxgbe/t4_main.c Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Wed Nov 6 23:59:19 2013 (r257771) +++ head/sys/dev/cxgbe/t4_main.c Thu Nov 7 00:25:49 2013 (r257772) @@ -5955,10 +5955,13 @@ sysctl_pm_stats(SYSCTL_HANDLER_ARGS) struct adapter *sc = arg1; struct sbuf *sb; int rc, i; - uint32_t tx_cnt[PM_NSTATS], rx_cnt[PM_NSTATS]; - uint64_t tx_cyc[PM_NSTATS], rx_cyc[PM_NSTATS]; - static const char *pm_stats[] = { - "Read:", "Write bypass:", "Write mem:", "Flush:", "FIFO wait:" + uint32_t cnt[PM_NSTATS]; + uint64_t cyc[PM_NSTATS]; + static const char *rx_stats[] = { + "Read:", "Write bypass:", "Write mem:", "Flush:" + }; + static const char *tx_stats[] = { + "Read:", "Write bypass:", "Write mem:", "Bypass + mem:" }; rc = sysctl_wire_old_buffer(req, 0); @@ -5969,14 +5972,17 @@ sysctl_pm_stats(SYSCTL_HANDLER_ARGS) if (sb == NULL) return (ENOMEM); - t4_pmtx_get_stats(sc, tx_cnt, tx_cyc); - t4_pmrx_get_stats(sc, rx_cnt, rx_cyc); - - sbuf_printf(sb, " Tx count Tx cycles " - "Rx count Rx cycles"); - for (i = 0; i < PM_NSTATS; i++) - sbuf_printf(sb, "\n%-13s %10u %20ju %10u %20ju", - pm_stats[i], tx_cnt[i], tx_cyc[i], rx_cnt[i], rx_cyc[i]); + t4_pmtx_get_stats(sc, cnt, cyc); + sbuf_printf(sb, " Tx pcmds Tx bytes"); + for (i = 0; i < ARRAY_SIZE(tx_stats); i++) + sbuf_printf(sb, "\n%-13s %10u %20ju", tx_stats[i], cnt[i], + cyc[i]); + + t4_pmrx_get_stats(sc, cnt, cyc); + sbuf_printf(sb, "\n Rx pcmds Rx bytes"); + for (i = 0; i < ARRAY_SIZE(rx_stats); i++) + sbuf_printf(sb, "\n%-13s %10u %20ju", rx_stats[i], cnt[i], + cyc[i]); rc = sbuf_finish(sb); sbuf_delete(sb); From owner-svn-src-head@FreeBSD.ORG Thu Nov 7 00:36:40 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 4A001D00; Thu, 7 Nov 2013 00:36:40 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 374612BD2; Thu, 7 Nov 2013 00:36:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA70aeV7019176; Thu, 7 Nov 2013 00:36:40 GMT (envelope-from sjg@svn.freebsd.org) Received: (from sjg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA70aeH3019175; Thu, 7 Nov 2013 00:36:40 GMT (envelope-from sjg@svn.freebsd.org) Message-Id: <201311070036.rA70aeH3019175@svn.freebsd.org> From: "Simon J. Gerraty" Date: Thu, 7 Nov 2013 00:36:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257773 - head/contrib/telnet/telnetd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Nov 2013 00:36:40 -0000 Author: sjg Date: Thu Nov 7 00:36:39 2013 New Revision: 257773 URL: http://svnweb.freebsd.org/changeset/base/257773 Log: Propagate ancient fix from Junos. Use of -h is not supposed to depend on AUTHENTICATION being defined. Reviewed by: markm Modified: head/contrib/telnet/telnetd/sys_term.c Modified: head/contrib/telnet/telnetd/sys_term.c ============================================================================== --- head/contrib/telnet/telnetd/sys_term.c Thu Nov 7 00:25:49 2013 (r257772) +++ head/contrib/telnet/telnetd/sys_term.c Thu Nov 7 00:36:39 2013 (r257773) @@ -1052,11 +1052,11 @@ start_login(char *host undef1, int autol */ if ((auth_level < 0) || (autologin != AUTH_VALID)) # endif +#endif /* AUTHENTICATION */ { argv = addarg(argv, "-h"); argv = addarg(argv, host); } -#endif /* AUTHENTICATION */ #endif #if !defined(NO_LOGIN_P) argv = addarg(argv, "-p"); From owner-svn-src-head@FreeBSD.ORG Thu Nov 7 04:02:09 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 46BD7D0C; Thu, 7 Nov 2013 04:02:09 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 34B3B27A2; Thu, 7 Nov 2013 04:02:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA7429ii097340; Thu, 7 Nov 2013 04:02:09 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA74292F097339; Thu, 7 Nov 2013 04:02:09 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201311070402.rA74292F097339@svn.freebsd.org> From: Ian Lepore Date: Thu, 7 Nov 2013 04:02:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257774 - head/sys/arm/broadcom/bcm2835 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Nov 2013 04:02:09 -0000 Author: ian Date: Thu Nov 7 04:02:08 2013 New Revision: 257774 URL: http://svnweb.freebsd.org/changeset/base/257774 Log: Switch to the new common bus_space-v6.c, remove the local one. Deleted: head/sys/arm/broadcom/bcm2835/bus_space.c Modified: head/sys/arm/broadcom/bcm2835/files.bcm2835 Modified: head/sys/arm/broadcom/bcm2835/files.bcm2835 ============================================================================== --- head/sys/arm/broadcom/bcm2835/files.bcm2835 Thu Nov 7 00:36:39 2013 (r257773) +++ head/sys/arm/broadcom/bcm2835/files.bcm2835 Thu Nov 7 04:02:08 2013 (r257774) @@ -11,10 +11,10 @@ arm/broadcom/bcm2835/bcm2835_sdhci.c op arm/broadcom/bcm2835/bcm2835_spi.c optional bcm2835_spi arm/broadcom/bcm2835/bcm2835_systimer.c standard arm/broadcom/bcm2835/bcm2835_wdog.c standard -arm/broadcom/bcm2835/bus_space.c optional fdt arm/broadcom/bcm2835/common.c optional fdt dev/usb/controller/dwc_otg_fdt.c optional dwcotg +arm/arm/bus_space-v6.c standard arm/arm/bus_space_generic.c standard arm/arm/bus_space_asm_generic.S standard arm/arm/cpufunc_asm_arm11.S standard From owner-svn-src-head@FreeBSD.ORG Thu Nov 7 04:09:19 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C59D9FC2; Thu, 7 Nov 2013 04:09:19 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B295727E7; Thu, 7 Nov 2013 04:09:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA749J2d098375; Thu, 7 Nov 2013 04:09:19 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA749J8n098374; Thu, 7 Nov 2013 04:09:19 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201311070409.rA749J8n098374@svn.freebsd.org> From: Ian Lepore Date: Thu, 7 Nov 2013 04:09:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257775 - head/sys/arm/ti X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Nov 2013 04:09:19 -0000 Author: ian Date: Thu Nov 7 04:09:19 2013 New Revision: 257775 URL: http://svnweb.freebsd.org/changeset/base/257775 Log: Switch to the new common bus_space-v6.c, remove the local one. Deleted: head/sys/arm/ti/bus_space.c Modified: head/sys/arm/ti/files.ti Modified: head/sys/arm/ti/files.ti ============================================================================== --- head/sys/arm/ti/files.ti Thu Nov 7 04:02:08 2013 (r257774) +++ head/sys/arm/ti/files.ti Thu Nov 7 04:09:19 2013 (r257775) @@ -2,6 +2,7 @@ kern/kern_clocksource.c standard +arm/arm/bus_space-v6.c standard arm/arm/bus_space_generic.c standard arm/arm/bus_space_asm_generic.S standard arm/arm/cpufunc_asm_armv5.S standard @@ -10,7 +11,6 @@ arm/arm/cpufunc_asm_arm11.S standard arm/arm/cpufunc_asm_armv7.S standard arm/arm/irq_dispatch.S standard -arm/ti/bus_space.c standard arm/ti/common.c standard arm/ti/ti_cpuid.c standard arm/ti/ti_machdep.c standard From owner-svn-src-head@FreeBSD.ORG Thu Nov 7 04:31:22 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 4CA675A3; Thu, 7 Nov 2013 04:31:22 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2057528F6; Thu, 7 Nov 2013 04:31:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA74VLbT007620; Thu, 7 Nov 2013 04:31:21 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA74VLAp007619; Thu, 7 Nov 2013 04:31:21 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201311070431.rA74VLAp007619@svn.freebsd.org> From: Ian Lepore Date: Thu, 7 Nov 2013 04:31:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257777 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Nov 2013 04:31:22 -0000 Author: ian Date: Thu Nov 7 04:31:21 2013 New Revision: 257777 URL: http://svnweb.freebsd.org/changeset/base/257777 Log: Do not build aicasm with the cross-tools/kernel-toolchain, instead add a proper kernel-tools step/target modeled after the world build-tools stuff. This is a re-do of r257730 which was backed out in r257734, but this time it's one byte smaller... a leftover trailing backslash resulted in a .for loop with no rules, so no compiler stuff got built and later steps built with the wrong toolset. Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Thu Nov 7 04:13:27 2013 (r257776) +++ head/Makefile.inc1 Thu Nov 7 04:31:21 2013 (r257777) @@ -439,6 +439,16 @@ IMAKE_MTREE= MTREE_CMD="nmtree ${MTREEFL KMAKEENV= ${WMAKEENV} KMAKE= ${KMAKEENV} ${MAKE} ${.MAKEFLAGS} ${KERNEL_FLAGS} KERNEL=${INSTKERNNAME} +# kernel build-tools stage +KTMAKE= MAKEOBJDIRPREFIX=${WORLDTMP} \ + ${WMAKEENV} ${MAKE} -f Makefile.inc1 \ + TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ + DESTDIR= \ + BOOTSTRAPPING=${OSRELDATE} \ + SSP_CFLAGS= \ + -DNO_LINT \ + -DNO_CPU_CFLAGS -DNO_WARNS -DNO_CTF -DEARLY_BUILD + # # buildworld # @@ -1019,7 +1029,7 @@ buildkernel: @echo "--------------------------------------------------------------" @echo ">>> stage 2.3: build tools" @echo "--------------------------------------------------------------" - @# Currently no special kernel tools to build. + ${_+_}cd ${.CURDIR}; ${KTMAKE} kernel-tools .if !defined(NO_KERNELDEPEND) @echo @echo "--------------------------------------------------------------" @@ -1347,6 +1357,23 @@ build-tools: .MAKE .endfor # +# kernel-tools: Build kernel-building tools +# +kernel-tools: .MAKE + mkdir -p ${WORLDTMP}/usr + mtree -deU -f ${.CURDIR}/etc/mtree/BSD.usr.dist \ + -p ${WORLDTMP}/usr >/dev/null +.for _tool in \ + sys/dev/aic7xxx/aicasm + ${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all,install)"; \ + cd ${.CURDIR}/${_tool} && \ + ${MAKE} DIRPRFX=${_tool}/ obj && \ + ${MAKE} DIRPRFX=${_tool}/ depend && \ + ${MAKE} DIRPRFX=${_tool}/ all && \ + ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${WORLDTMP} install +.endfor + +# # cross-tools: Build cross-building tools # .if ${TARGET_ARCH} != ${MACHINE_ARCH} || ${BOOTSTRAPPING} < 800035 @@ -1392,8 +1419,7 @@ cross-tools: .MAKE usr.bin/xlint/lint1 usr.bin/xlint/lint2 usr.bin/xlint/xlint \ ${_btxld} \ ${_crunchide} \ - ${_kgzip} \ - sys/dev/aic7xxx/aicasm + ${_kgzip} ${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all,install)"; \ cd ${.CURDIR}/${_tool} && \ ${MAKE} DIRPRFX=${_tool}/ obj && \ From owner-svn-src-head@FreeBSD.ORG Thu Nov 7 07:22:53 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 4CAFCE76; Thu, 7 Nov 2013 07:22:53 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3849820BB; Thu, 7 Nov 2013 07:22:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA77MrlA065463; Thu, 7 Nov 2013 07:22:53 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA77MqQk065458; Thu, 7 Nov 2013 07:22:52 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201311070722.rA77MqQk065458@svn.freebsd.org> From: Hans Petter Selasky Date: Thu, 7 Nov 2013 07:22:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257779 - head/share/examples/libusb20 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Nov 2013 07:22:53 -0000 Author: hselasky Date: Thu Nov 7 07:22:51 2013 New Revision: 257779 URL: http://svnweb.freebsd.org/changeset/base/257779 Log: - Use libusb20_strerror() function instead of custom usb_error() one. - Rename "aux.[ch]" to "util.[ch]" which is a more common name for utility functions and allows checkout on some non-FreeBSD systems where the "aux.*" namespace is reserved. - Fix some compile warnings while at it. PR: usb/183728 MFC after: 2 weeks Added: head/share/examples/libusb20/util.c - copied, changed from r238603, head/share/examples/libusb20/aux.c head/share/examples/libusb20/util.h - copied, changed from r238603, head/share/examples/libusb20/aux.h Deleted: head/share/examples/libusb20/aux.c head/share/examples/libusb20/aux.h Modified: head/share/examples/libusb20/Makefile head/share/examples/libusb20/bulk.c head/share/examples/libusb20/control.c Modified: head/share/examples/libusb20/Makefile ============================================================================== --- head/share/examples/libusb20/Makefile Thu Nov 7 04:52:25 2013 (r257778) +++ head/share/examples/libusb20/Makefile Thu Nov 7 07:22:51 2013 (r257779) @@ -1,13 +1,14 @@ # $FreeBSD$ TARGETS= bulk control +CFLAGS+= -Wall all: $(TARGETS) -bulk: bulk.o aux.o - $(CC) $(CFLAGS) -o bulk bulk.o aux.o -lusb +bulk: bulk.o util.o + $(CC) $(CFLAGS) -o bulk bulk.o util.o -lusb -control: control.o aux.o - $(CC) $(CFLAGS) -o control control.o aux.o -lusb +control: control.o util.o + $(CC) $(CFLAGS) -o control control.o util.o -lusb clean: rm -f $(TARGETS) *.o *~ Modified: head/share/examples/libusb20/bulk.c ============================================================================== --- head/share/examples/libusb20/bulk.c Thu Nov 7 04:52:25 2013 (r257778) +++ head/share/examples/libusb20/bulk.c Thu Nov 7 07:22:51 2013 (r257779) @@ -41,7 +41,7 @@ #include #include -#include "aux.h" +#include "util.h" /* * If you want to see the details of the internal datastructures @@ -74,7 +74,7 @@ doit(struct libusb20_device *dev) */ if ((rv = libusb20_dev_open(dev, 2)) != 0) { - fprintf(stderr, "libusb20_dev_open: %s\n", usb_error(rv)); + fprintf(stderr, "libusb20_dev_open: %s\n", libusb20_strerror(rv)); return; } @@ -84,7 +84,7 @@ doit(struct libusb20_device *dev) */ if ((rv = libusb20_dev_set_config_index(dev, 0)) != 0) { - fprintf(stderr, "libusb20_dev_set_config_index: %s\n", usb_error(rv)); + fprintf(stderr, "libusb20_dev_set_config_index: %s\n", libusb20_strerror(rv)); return; } @@ -97,7 +97,7 @@ doit(struct libusb20_device *dev) if (xfr_in == NULL || xfr_out == NULL) { - fprintf(stderr, "libusb20_tr_get_pointer: %s\n", usb_error(rv)); + fprintf(stderr, "libusb20_tr_get_pointer: %s\n", libusb20_strerror(rv)); return; } @@ -107,12 +107,12 @@ doit(struct libusb20_device *dev) */ if ((rv = libusb20_tr_open(xfr_out, 0, 1, out_ep)) != 0) { - fprintf(stderr, "libusb20_tr_open: %s\n", usb_error(rv)); + fprintf(stderr, "libusb20_tr_open: %s\n", libusb20_strerror(rv)); return; } if ((rv = libusb20_tr_open(xfr_in, 0, 1, in_ep)) != 0) { - fprintf(stderr, "libusb20_tr_open: %s\n", usb_error(rv)); + fprintf(stderr, "libusb20_tr_open: %s\n", libusb20_strerror(rv)); return; } @@ -124,7 +124,7 @@ doit(struct libusb20_device *dev) if ((rv = libusb20_tr_bulk_intr_sync(xfr_out, out_buf, out_len, &rlen, TIMEOUT)) != 0) { - fprintf(stderr, "libusb20_tr_bulk_intr_sync (OUT): %s\n", usb_error(rv)); + fprintf(stderr, "libusb20_tr_bulk_intr_sync (OUT): %s\n", libusb20_strerror(rv)); } printf("sent %d bytes\n", rlen); } @@ -132,7 +132,7 @@ doit(struct libusb20_device *dev) if ((rv = libusb20_tr_bulk_intr_sync(xfr_in, in_buf, BUFLEN, &rlen, TIMEOUT)) != 0) { - fprintf(stderr, "libusb20_tr_bulk_intr_sync: %s\n", usb_error(rv)); + fprintf(stderr, "libusb20_tr_bulk_intr_sync: %s\n", libusb20_strerror(rv)); } printf("received %d bytes\n", rlen); if (rlen > 0) Modified: head/share/examples/libusb20/control.c ============================================================================== --- head/share/examples/libusb20/control.c Thu Nov 7 04:52:25 2013 (r257778) +++ head/share/examples/libusb20/control.c Thu Nov 7 07:22:51 2013 (r257779) @@ -11,8 +11,6 @@ /* * Simple demo program to illustrate the handling of FreeBSD's * libusb20. - * - * XXX */ /* @@ -38,12 +36,15 @@ #include #include #include +#include #include #include #include +#include "util.h" + /* * If you want to see the details of the internal datastructures * in the debugger, unifdef the following. @@ -86,7 +87,7 @@ doit(struct libusb20_device *dev) */ if ((rv = libusb20_dev_open(dev, 1)) != 0) { - fprintf(stderr, "libusb20_dev_open: %s\n", usb_error(rv)); + fprintf(stderr, "libusb20_dev_open: %s\n", libusb20_strerror(rv)); return; } @@ -96,7 +97,7 @@ doit(struct libusb20_device *dev) */ if ((rv = libusb20_dev_set_config_index(dev, 0)) != 0) { - fprintf(stderr, "libusb20_dev_set_config_index: %s\n", usb_error(rv)); + fprintf(stderr, "libusb20_dev_set_config_index: %s\n", libusb20_strerror(rv)); return; } @@ -126,7 +127,7 @@ doit(struct libusb20_device *dev) 0 /* flags */)) != 0) { fprintf(stderr, - "libusb20_dev_request_sync: %s\n", usb_error(rv)); + "libusb20_dev_request_sync: %s\n", libusb20_strerror(rv)); } printf("sent %d bytes\n", actlen); if ((setup.bmRequestType & 0x80) != 0) @@ -146,7 +147,7 @@ doit(struct libusb20_device *dev) if (xfr_intr == NULL) { - fprintf(stderr, "libusb20_tr_get_pointer: %s\n", usb_error(rv)); + fprintf(stderr, "libusb20_tr_get_pointer: %s\n", libusb20_strerror(rv)); return; } @@ -155,7 +156,7 @@ doit(struct libusb20_device *dev) */ if ((rv = libusb20_tr_open(xfr_intr, 0, 1, intr_ep)) != 0) { - fprintf(stderr, "libusb20_tr_open: %s\n", usb_error(rv)); + fprintf(stderr, "libusb20_tr_open: %s\n", libusb20_strerror(rv)); return; } @@ -165,7 +166,7 @@ doit(struct libusb20_device *dev) if ((rv = libusb20_tr_bulk_intr_sync(xfr_intr, in_buf, BUFLEN, &rlen, TIMEOUT)) != 0) { - fprintf(stderr, "libusb20_tr_bulk_intr_sync: %s\n", usb_error(rv)); + fprintf(stderr, "libusb20_tr_bulk_intr_sync: %s\n", libusb20_strerror(rv)); } printf("received %d bytes\n", rlen); if (rlen > 0) Copied and modified: head/share/examples/libusb20/util.c (from r238603, head/share/examples/libusb20/aux.c) ============================================================================== --- head/share/examples/libusb20/aux.c Wed Jul 18 21:30:17 2012 (r238603, copy source) +++ head/share/examples/libusb20/util.c Thu Nov 7 07:22:51 2013 (r257779) @@ -19,77 +19,7 @@ #include #include -#include "aux.h" - -/* - * Return a textual description for error "r". - */ -const char * -usb_error(enum libusb20_error r) -{ - const char *msg = "UNKNOWN"; - - switch (r) - { - case LIBUSB20_SUCCESS: - msg = "success"; - break; - - case LIBUSB20_ERROR_IO: - msg = "IO error"; - break; - - case LIBUSB20_ERROR_INVALID_PARAM: - msg = "Invalid parameter"; - break; - - case LIBUSB20_ERROR_ACCESS: - msg = "Access denied"; - break; - - case LIBUSB20_ERROR_NO_DEVICE: - msg = "No such device"; - break; - - case LIBUSB20_ERROR_NOT_FOUND: - msg = "Entity not found"; - break; - - case LIBUSB20_ERROR_BUSY: - msg = "Resource busy"; - break; - - case LIBUSB20_ERROR_TIMEOUT: - msg = "Operation timed out"; - break; - - case LIBUSB20_ERROR_OVERFLOW: - msg = "Overflow"; - break; - - case LIBUSB20_ERROR_PIPE: - msg = "Pipe error"; - break; - - case LIBUSB20_ERROR_INTERRUPTED: - msg = "System call interrupted"; - break; - - case LIBUSB20_ERROR_NO_MEM: - msg = "Insufficient memory"; - break; - - case LIBUSB20_ERROR_NOT_SUPPORTED: - msg = "Operation not supported"; - break; - - case LIBUSB20_ERROR_OTHER: - msg = "Other error"; - break; - } - - return msg; -} +#include "util.h" /* * Print "len" bytes from "buf" in hex, followed by an ASCII Copied and modified: head/share/examples/libusb20/util.h (from r238603, head/share/examples/libusb20/aux.h) ============================================================================== --- head/share/examples/libusb20/aux.h Wed Jul 18 21:30:17 2012 (r238603, copy source) +++ head/share/examples/libusb20/util.h Thu Nov 7 07:22:51 2013 (r257779) @@ -11,5 +11,4 @@ #include #include -const char *usb_error(enum libusb20_error r); void print_formatted(uint8_t *buf, uint32_t len); From owner-svn-src-head@FreeBSD.ORG Thu Nov 7 10:09:01 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 96EDEA7E; Thu, 7 Nov 2013 10:09:01 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8535B2DA7; Thu, 7 Nov 2013 10:09:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA7A91jK022621; Thu, 7 Nov 2013 10:09:01 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA7A9190022620; Thu, 7 Nov 2013 10:09:01 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201311071009.rA7A9190022620@svn.freebsd.org> From: Devin Teske Date: Thu, 7 Nov 2013 10:09:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257780 - head/usr.sbin/bsdconfig X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Nov 2013 10:09:01 -0000 Author: dteske Date: Thu Nov 7 10:09:01 2013 New Revision: 257780 URL: http://svnweb.freebsd.org/changeset/base/257780 Log: Whitespace. Modified: head/usr.sbin/bsdconfig/bsdconfig Modified: head/usr.sbin/bsdconfig/bsdconfig ============================================================================== --- head/usr.sbin/bsdconfig/bsdconfig Thu Nov 7 07:22:51 2013 (r257779) +++ head/usr.sbin/bsdconfig/bsdconfig Thu Nov 7 10:09:01 2013 (r257780) @@ -342,7 +342,7 @@ while getopts f:h$GETOPTS_STDARGS flag; h|\?) usage ;; esac done -shift $(( $OPTIND -1 )) +shift $(( $OPTIND - 1 )) # If we've loaded any scripts, do not continue any further [ $scripts_loaded -gt 0 ] && exit From owner-svn-src-head@FreeBSD.ORG Thu Nov 7 10:14:41 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 8B8B5F66; Thu, 7 Nov 2013 10:14:41 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6A5852E4F; Thu, 7 Nov 2013 10:14:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA7AEflI025671; Thu, 7 Nov 2013 10:14:41 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA7AEfgm025670; Thu, 7 Nov 2013 10:14:41 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201311071014.rA7AEfgm025670@svn.freebsd.org> From: Devin Teske Date: Thu, 7 Nov 2013 10:14:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257781 - head/usr.sbin/bsdconfig/share X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Nov 2013 10:14:41 -0000 Author: dteske Date: Thu Nov 7 10:14:40 2013 New Revision: 257781 URL: http://svnweb.freebsd.org/changeset/base/257781 Log: Comments. Replace a funny syntax with f_isset() while here. Modified: head/usr.sbin/bsdconfig/share/common.subr Modified: head/usr.sbin/bsdconfig/share/common.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/common.subr Thu Nov 7 10:09:01 2013 (r257780) +++ head/usr.sbin/bsdconfig/share/common.subr Thu Nov 7 10:14:40 2013 (r257781) @@ -106,7 +106,7 @@ GETOPTS_ALLFLAGS="${GETOPTS_ALLFLAGS}012 ############################################################ FUNCTIONS -# f_dprintf $fmt [ $opts ... ] +# f_dprintf $format [$arguments ...] # # Sensible debug function. Override in ~/.bsdconfigrc if desired. # See /usr/share/examples/bsdconfig/bsdconfigrc for example. @@ -174,8 +174,7 @@ f_debug_init() if ( umask 022 && :> "$_debug_file" ); then f_dprintf "Successfully initialized debugFile \`%s'" \ "$_debug_file" - [ "${debug+set}" ] || - debug=1 # turn debugging on if not set + f_isset debug || debug=1 # turn debugging on if not set else unset debugFile f_dprintf "Unable to initialize debugFile \`%s'" \ @@ -184,7 +183,7 @@ f_debug_init() fi } -# f_err $fmt [ $opts ... ] +# f_err $format [$arguments ...] # # Print a message to stderr (fd=2). # @@ -193,7 +192,7 @@ f_err() printf "$@" >&${TERMINAL_STDERR_PASSTHRU:-2} } -# f_quietly $command [ $arguments ... ] +# f_quietly $command [$arguments ...] # # Run a command quietly (quell any output to stdout or stderr) # @@ -275,7 +274,7 @@ f_isset() eval [ \"\${${1%%[$IFS]*}+set}\" ] } -# f_die [ $status [ $fmt [ $opts ... ]]] +# f_die [$status [$format [$arguments ...]]] # # Abruptly terminate due to an error optionally displaying a message in a # dialog box using printf(1) syntax. @@ -309,7 +308,7 @@ f_interrupt() f_die } -# f_show_info $fmt [ $opts ... ] +# f_show_info $format [$arguments ...] # # Display a message in a dialog infobox using printf(1) syntax. # @@ -330,7 +329,7 @@ f_show_info() fi } -# f_show_msg $fmt [ $opts ... ] +# f_show_msg $format [$arguments ...] # # Display a message in a dialog box using printf(1) syntax. # @@ -352,7 +351,7 @@ f_show_msg() } -# f_yesno $fmt [ $opts ... ] +# f_yesno $format [$arguments ...] # # Display a message in a dialog yes/no box using printf(1) syntax. # @@ -373,7 +372,7 @@ f_yesno() fi } -# f_noyes $fmt [ $opts ... ] +# f_noyes $format [$arguments ...] # # Display a message in a dialog yes/no box using printf(1) syntax. # NOTE: THis is just like the f_yesno function except "No" is default. @@ -466,7 +465,7 @@ f_include_lang() fi } -# f_usage $file [ $key1 $value1 ... ] +# f_usage $file [$key1 $value1 ...] # # Display USAGE file with optional pre-processor macro definitions. The first # argument is the template file containing the usage text to be displayed. If From owner-svn-src-head@FreeBSD.ORG Thu Nov 7 10:20:20 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 74D934DB; Thu, 7 Nov 2013 10:20:20 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 495E72EF3; Thu, 7 Nov 2013 10:20:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA7AKKSY027928; Thu, 7 Nov 2013 10:20:20 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA7AKKnt027927; Thu, 7 Nov 2013 10:20:20 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201311071020.rA7AKKnt027927@svn.freebsd.org> From: Devin Teske Date: Thu, 7 Nov 2013 10:20:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257782 - head/usr.sbin/bsdconfig/share X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Nov 2013 10:20:20 -0000 Author: dteske Date: Thu Nov 7 10:20:19 2013 New Revision: 257782 URL: http://svnweb.freebsd.org/changeset/base/257782 Log: Add global DEBUG_INITIALIZE_FILE environment variable for controlling whether the debugFile is truncated upon initialization (useful for when children implicitly re-initialize debugging and you want children to append to your existing debugFile). Modified: head/usr.sbin/bsdconfig/share/common.subr Modified: head/usr.sbin/bsdconfig/share/common.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/common.subr Thu Nov 7 10:14:40 2013 (r257781) +++ head/usr.sbin/bsdconfig/share/common.subr Thu Nov 7 10:20:19 2013 (r257782) @@ -68,6 +68,14 @@ export UNAME_R="$(uname -r)" # Release L : ${DEBUG_SELF_INITIALIZE=1} # +# Default behavior of f_debug_init() is to truncate $debugFile (set to NULL to +# disable truncating the debug file when initializing). To get child processes +# to append to the same log file, export this variarable (with a NULL value) +# and also export debugFile with the desired value. +# +: ${DEBUG_INITIALIZE_FILE=1} + +# # Define standard optstring arguments that should be supported by all programs # using this include (unless DEBUG_SELF_INITIALIZE is set to NULL to prevent # f_debug_init() from autamatically processing "$@" for the below arguments): @@ -164,13 +172,13 @@ f_debug_init() [ "$debugFile" ] && export debugFile # - # Truncate the debug file upon. Note that we will trim a leading plus - # (`+') from the value of debugFile to support persistant meaning that - # f_dprintf() should print both to standard output and $debugFile - # (minus the leading plus, of course). + # Truncate debug file unless requested otherwise. Note that we will + # trim a leading plus (`+') from the value of debugFile to support + # persistant meaning that f_dprintf() should print both to standard + # output and $debugFile (minus the leading plus, of course). # local _debug_file="${debugFile#+}" - if [ "$_debug_file" ]; then + if [ "$_debug_file" -a "$DEBUG_INITIALIZE_FILE" ]; then if ( umask 022 && :> "$_debug_file" ); then f_dprintf "Successfully initialized debugFile \`%s'" \ "$_debug_file" From owner-svn-src-head@FreeBSD.ORG Thu Nov 7 10:23:38 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B7C3E9E7; Thu, 7 Nov 2013 10:23:38 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8C0412F4D; Thu, 7 Nov 2013 10:23:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA7ANcdq028975; Thu, 7 Nov 2013 10:23:38 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA7ANcMn028972; Thu, 7 Nov 2013 10:23:38 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201311071023.rA7ANcMn028972@svn.freebsd.org> From: Devin Teske Date: Thu, 7 Nov 2013 10:23:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257783 - in head/usr.sbin/bsdconfig: include share X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Nov 2013 10:23:38 -0000 Author: dteske Date: Thu Nov 7 10:23:37 2013 New Revision: 257783 URL: http://svnweb.freebsd.org/changeset/base/257783 Log: Add an f_show_err() function -- acts pretty much the same as f_show_msg() except it stylizes the msgbox widget to indicate an Error has occurred by setting an appropriate title and default message. Modified: head/usr.sbin/bsdconfig/include/messages.subr head/usr.sbin/bsdconfig/share/common.subr Modified: head/usr.sbin/bsdconfig/include/messages.subr ============================================================================== --- head/usr.sbin/bsdconfig/include/messages.subr Thu Nov 7 10:20:19 2013 (r257782) +++ head/usr.sbin/bsdconfig/include/messages.subr Thu Nov 7 10:23:37 2013 (r257783) @@ -40,6 +40,7 @@ msg_afterstep_desc="Ports to support the msg_all="All" msg_all_desc="All available packages in all categories." msg_always_try_sudo_when_run_as="Always try sudo(8) when run as %s" +msg_an_unknown_error_occurred="An unknown error occurred" msg_arabic_desc="Ported software for Arab countries." msg_archivers_desc="Utilities for archiving and unarchiving data." msg_armenia="Armenia" Modified: head/usr.sbin/bsdconfig/share/common.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/common.subr Thu Nov 7 10:20:19 2013 (r257782) +++ head/usr.sbin/bsdconfig/share/common.subr Thu Nov 7 10:23:37 2013 (r257783) @@ -358,6 +358,30 @@ f_show_msg() fi } +# f_show_err $format [$arguments ...] +# +# Display a message in a dialog box with ``Error'' i18n title (overridden by +# setting msg_error) using printf(1) syntax. If running non-interactively, +# the process will terminate (using [above] f_die()). +# +f_show_err() +{ + [ "$nonInteractive" ] && f_die + + local msg + msg=$( printf "$@" ) + + : ${msg:=${msg_an_unknown_error_occurred:-An unknown error occurred}} + + if [ "$_DIALOG_SUBR" ]; then + f_dialog_title "${msg_error:-Error}" + f_dialog_msgbox "$msg" + f_dialog_title_restore + else + dialog --title "${msg_error:-Error}" --msgbox "$msg" 0 0 + fi + return $SUCCESS +} # f_yesno $format [$arguments ...] # From owner-svn-src-head@FreeBSD.ORG Thu Nov 7 10:30:20 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B452A19C; Thu, 7 Nov 2013 10:30:20 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A2F8F2FDA; Thu, 7 Nov 2013 10:30:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA7AUKsX031497; Thu, 7 Nov 2013 10:30:20 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA7AUKli031496; Thu, 7 Nov 2013 10:30:20 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201311071030.rA7AUKli031496@svn.freebsd.org> From: Devin Teske Date: Thu, 7 Nov 2013 10:30:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257785 - head/usr.sbin/bsdconfig/share X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Nov 2013 10:30:20 -0000 Author: dteske Date: Thu Nov 7 10:30:20 2013 New Revision: 257785 URL: http://svnweb.freebsd.org/changeset/base/257785 Log: Use dialog(1) to obtain maximum-size; stty fails when running in a pipe- chain. This allows dialogs to reach full size even when executed as an rvalue operand to a pipe (e.g., cat file | bsdconfig -f-). Modified: head/usr.sbin/bsdconfig/share/dialog.subr Modified: head/usr.sbin/bsdconfig/share/dialog.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/dialog.subr Thu Nov 7 10:28:12 2013 (r257784) +++ head/usr.sbin/bsdconfig/share/dialog.subr Thu Nov 7 10:30:20 2013 (r257785) @@ -301,7 +301,16 @@ f_dialog_max_size() if [ "$USE_XDIALOG" ]; then __max_size="$XDIALOG_MAXSIZE" # see CONFIGURATION else - __max_size=$( stty size 2> /dev/null ) # usually "24 80" + if __max_size=$( $DIALOG --print-maxsize \ + 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD ) + then + # usually "MaxSize: 24, 80" + __max_size="${__max_size#*: }" + f_replaceall "$__max_size" "," "" __max_size + else + __max_size=$( stty size 2> /dev/null ) + # usually "24 80" + fi : ${__max_size:=$DEFAULT_TERMINAL_SIZE} fi if [ "$__var_height" ]; then From owner-svn-src-head@FreeBSD.ORG Thu Nov 7 10:28:12 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id BDC9BDB0; Thu, 7 Nov 2013 10:28:12 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id ABABB2FA2; Thu, 7 Nov 2013 10:28:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA7ASCjG029505; Thu, 7 Nov 2013 10:28:12 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA7ASCOV029504; Thu, 7 Nov 2013 10:28:12 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201311071028.rA7ASCOV029504@svn.freebsd.org> From: Devin Teske Date: Thu, 7 Nov 2013 10:28:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257784 - head/usr.sbin/bsdconfig/share X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Nov 2013 10:28:12 -0000 Author: dteske Date: Thu Nov 7 10:28:12 2013 New Revision: 257784 URL: http://svnweb.freebsd.org/changeset/base/257784 Log: Add an f_eval_catch() function for debugging individual commands in a series of commands. Accepts the `-d' flag as a first argument to skip displaying messages in a dialog box. The command is logged as it appears to the shell prior to the first pass of parameter expansion to allow copy/pasting into a real shell (opposed to simply echo'ing the command which would produce debug output that has undergone at least one pass of parameter expansion, thus no-longer copacetic for copy/paste). Takes printf(1) style syntax and a utility identifier for error messages. Modified: head/usr.sbin/bsdconfig/share/common.subr Modified: head/usr.sbin/bsdconfig/share/common.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/common.subr Thu Nov 7 10:23:37 2013 (r257783) +++ head/usr.sbin/bsdconfig/share/common.subr Thu Nov 7 10:28:12 2013 (r257784) @@ -777,6 +777,88 @@ f_mounted() mount | grep -Eq " on $dir \([^)]+\)$" } +# f_eval_catch [-d] $funcname $utility $format [$arguments ...] +# +# Silently evaluate a command in a sub-shell and test for error. If debugging +# is enabled a copy of the command and its output is sent to debug (either +# stdout or file depending on environment). If an error occurs, output of the +# command is displayed in a dialog(1) msgbox using the [above] f_show_err() +# function (unless optional `-d' flag is the first argument, then no dialog). +# The $funcname argument is sent to debugging while the $utility argument is +# used in the title of the dialog box. The command that is sent to debugging +# along with $funcname is the product of the printf(1) syntax produced by +# $format with optional $arguments. +# +# Example 1: +# +# debug=1 +# f_eval_catch myfunc cat 'contents=$( cat "%s" )' /some/file +# # Error displayed ``cat: /some/file: No such file or directory'' +# +# Produces the following debug output: +# +# DEBUG: myfunc: cat "/some/file" +# DEBUG: myfunc: retval=1 +# cat: /some/file: No such file or directory +# +# Example 2: +# +# debug=1 +# f_eval_catch myfunc echo 'echo "%s"' "Hello, World!" +# # No error displayed +# +# Produces the following debug output: +# +# DEBUG: myfunc: echo "Hello, World!" +# DEBUG: myfunc: retval=0 +# Hello, World! +# +# Example 3: +# +# debug=1 +# echo 123 | f_eval_catch myfunc rev rev +# # No error displayed +# +# Produces the following debug output: +# +# DEBUG: myfunc: rev +# DEBUG: myfunc: retval=0 +# 321 +# +# Example 4: +# +# debug=1 +# f_eval_catch myfunc true true +# # No error displayed +# +# Produces the following debug output: +# +# DEBUG: myfunc: true +# DEBUG: myfunc: retval=0 +# +f_eval_catch() +{ + local no_dialog= + [ "$1" = "-d" ] && no_dialog=1 && shift 1 + local funcname="$1" utility="$2"; shift 2 + local cmd output retval + cmd=$( printf -- "$@" ) + f_dprintf "%s: %s" "$funcname" "$cmd" # Log command *before* eval + output=$( exec 2>&1; eval "$cmd" ) + retval=$? + if [ "$output" ]; then + f_dprintf "%s: retval=%i \n%s" "$funcname" \ + $retval "$output" + else + f_dprintf "%s: retval=%i " "$funcname" $retval + fi + ! [ "$no_dialog" -o "$nonInteractive" -o $retval -eq $SUCCESS ] && + msg_error="${msg_error:-Error}${utility:+: $utility}" \ + f_show_err "%s" "$output" + # NB: f_show_err will handle NULL output appropriately + return $retval +} + ############################################################ MAIN # From owner-svn-src-head@FreeBSD.ORG Thu Nov 7 10:36:25 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 41B4D831; Thu, 7 Nov 2013 10:36:25 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2DFB82096; Thu, 7 Nov 2013 10:36:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA7AaPh4032767; Thu, 7 Nov 2013 10:36:25 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA7AaPlo032766; Thu, 7 Nov 2013 10:36:25 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201311071036.rA7AaPlo032766@svn.freebsd.org> From: Devin Teske Date: Thu, 7 Nov 2013 10:36:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257787 - head/usr.sbin/bsdconfig/share/media X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Nov 2013 10:36:25 -0000 Author: dteske Date: Thu Nov 7 10:36:24 2013 New Revision: 257787 URL: http://svnweb.freebsd.org/changeset/base/257787 Log: Fix a silly bug that would result in attempting to fetch (literally) the URI "httpDirectory" (oops). Modified: head/usr.sbin/bsdconfig/share/media/http.subr Modified: head/usr.sbin/bsdconfig/share/media/http.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/media/http.subr Thu Nov 7 10:32:37 2013 (r257786) +++ head/usr.sbin/bsdconfig/share/media/http.subr Thu Nov 7 10:36:24 2013 (r257787) @@ -481,7 +481,7 @@ f_media_init_http() case "$rel" in __RELEASE|any) - setvar $VAR_HTTP_PATH "$VAR_HTTP_DIR" + f_getvar $VAR_HTTP_DIR $VAR_HTTP_PATH f_http_check_access http_found=$? ;; From owner-svn-src-head@FreeBSD.ORG Thu Nov 7 10:40:19 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id EE22FBF0; Thu, 7 Nov 2013 10:40:19 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DC14C20D1; Thu, 7 Nov 2013 10:40:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA7AeJ7U034979; Thu, 7 Nov 2013 10:40:19 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA7AeJJu034978; Thu, 7 Nov 2013 10:40:19 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201311071040.rA7AeJJu034978@svn.freebsd.org> From: Devin Teske Date: Thu, 7 Nov 2013 10:40:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257788 - head/usr.sbin/bsdconfig/share/media X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Nov 2013 10:40:20 -0000 Author: dteske Date: Thu Nov 7 10:40:19 2013 New Revision: 257788 URL: http://svnweb.freebsd.org/changeset/base/257788 Log: Add some helpful debugging (showing the resolved host address). Modified: head/usr.sbin/bsdconfig/share/media/http.subr Modified: head/usr.sbin/bsdconfig/share/media/http.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/media/http.subr Thu Nov 7 10:36:24 2013 (r257787) +++ head/usr.sbin/bsdconfig/share/media/http.subr Thu Nov 7 10:40:19 2013 (r257788) @@ -595,6 +595,7 @@ f_media_get_http() local url="$http_path/$file" rx f_dprintf "sending http request for: %s" "$url" + f_dprintf "using nc to connect to: %s:%s" "$host" "$http_port" printf "GET %s HTTP/1.0\r\n\r\n" "$url" | nc -n "$host" "$http_port" | ( # From owner-svn-src-head@FreeBSD.ORG Thu Nov 7 10:45:25 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id E140D2CE; Thu, 7 Nov 2013 10:45:25 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CFC042146; Thu, 7 Nov 2013 10:45:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA7AjPvV036202; Thu, 7 Nov 2013 10:45:25 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA7AjPAH036201; Thu, 7 Nov 2013 10:45:25 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201311071045.rA7AjPAH036201@svn.freebsd.org> From: Devin Teske Date: Thu, 7 Nov 2013 10:45:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257790 - head/usr.sbin/bsdconfig/share X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Nov 2013 10:45:26 -0000 Author: dteske Date: Thu Nov 7 10:45:25 2013 New Revision: 257790 URL: http://svnweb.freebsd.org/changeset/base/257790 Log: Fix a bug where a format with leading `-' could be mistaken for printf getopts argument(s). Modified: head/usr.sbin/bsdconfig/share/strings.subr Modified: head/usr.sbin/bsdconfig/share/strings.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/strings.subr Thu Nov 7 10:44:24 2013 (r257789) +++ head/usr.sbin/bsdconfig/share/strings.subr Thu Nov 7 10:45:25 2013 (r257790) @@ -66,7 +66,8 @@ f_snprintf() { local __var_to_set="$1" __size="$2" shift 2 # var_to_set size - eval "$__var_to_set"=\$\( printf \"\$@\" \| awk -v max=\"\$__size\" \'' + eval "$__var_to_set"=\$\( printf -- \"\$@\" \| \ + awk -v max=\"\$__size\" \'' { len = length($0) max -= len From owner-svn-src-head@FreeBSD.ORG Thu Nov 7 10:48:00 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 9FBD768B; Thu, 7 Nov 2013 10:48:00 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8E05F217E; Thu, 7 Nov 2013 10:48:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA7Am0Bt036550; Thu, 7 Nov 2013 10:48:00 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA7Am0Pc036548; Thu, 7 Nov 2013 10:48:00 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201311071048.rA7Am0Pc036548@svn.freebsd.org> From: Devin Teske Date: Thu, 7 Nov 2013 10:48:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257792 - head/usr.sbin/bsdconfig/startup/share X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Nov 2013 10:48:00 -0000 Author: dteske Date: Thu Nov 7 10:48:00 2013 New Revision: 257792 URL: http://svnweb.freebsd.org/changeset/base/257792 Log: Comments. Modified: head/usr.sbin/bsdconfig/startup/share/rcconf.subr Modified: head/usr.sbin/bsdconfig/startup/share/rcconf.subr ============================================================================== --- head/usr.sbin/bsdconfig/startup/share/rcconf.subr Thu Nov 7 10:47:12 2013 (r257791) +++ head/usr.sbin/bsdconfig/startup/share/rcconf.subr Thu Nov 7 10:48:00 2013 (r257792) @@ -119,7 +119,7 @@ f_startup_rcconf_map() fi # - # create the in-memory cache (potentially from validated on-disk cache) + # Create the in-memory cache (potentially from validated on-disk cache) # # @@ -140,7 +140,7 @@ f_startup_rcconf_map() # the current value and provide error exit status. # STARTUP_RCCONF_MAP=$( - ( # Get digest as the first word on the first line + ( # Get digest as the first word on first line read digest rest_ignored # From owner-svn-src-head@FreeBSD.ORG Thu Nov 7 10:44:24 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B893416A; Thu, 7 Nov 2013 10:44:24 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A6BE6212B; Thu, 7 Nov 2013 10:44:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA7AiOQ5035881; Thu, 7 Nov 2013 10:44:24 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA7AiOEZ035880; Thu, 7 Nov 2013 10:44:24 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201311071044.rA7AiOEZ035880@svn.freebsd.org> From: Devin Teske Date: Thu, 7 Nov 2013 10:44:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257789 - head/usr.sbin/bsdconfig/share X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Nov 2013 10:44:24 -0000 Author: dteske Date: Thu Nov 7 10:44:24 2013 New Revision: 257789 URL: http://svnweb.freebsd.org/changeset/base/257789 Log: Comments. Modified: head/usr.sbin/bsdconfig/share/strings.subr Modified: head/usr.sbin/bsdconfig/share/strings.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/strings.subr Thu Nov 7 10:40:19 2013 (r257788) +++ head/usr.sbin/bsdconfig/share/strings.subr Thu Nov 7 10:44:24 2013 (r257789) @@ -46,7 +46,7 @@ VALID_VARNAME_CHARS="0-9ABCDEFGHIJKLMNOP ############################################################ FUNCTIONS -# f_substr "$string" $start [ $length ] +# f_substr "$string" $start [$length] # # Simple wrapper to awk(1)'s `substr' function. # @@ -56,16 +56,16 @@ f_substr() echo "$string" | awk "{ print substr(\$0, $start, $len) }" } -# f_snprintf $var_to_set $size $format ... +# f_snprintf $var_to_set $size $format [$arguments ...] # # Similar to snprintf(3), write at most $size number of bytes into $var_to_set -# using printf(1) syntax (`$format ...'). The value of $var_to_set is NULL -# unless at-least one byte is stored from the output. +# using printf(1) syntax (`$format [$arguments ...]'). The value of $var_to_set +# is NULL unless at-least one byte is stored from the output. # f_snprintf() { local __var_to_set="$1" __size="$2" - shift 2 # var_to_set/size + shift 2 # var_to_set size eval "$__var_to_set"=\$\( printf \"\$@\" \| awk -v max=\"\$__size\" \'' { len = length($0) From owner-svn-src-head@FreeBSD.ORG Thu Nov 7 10:47:13 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 01DEF53A; Thu, 7 Nov 2013 10:47:13 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E41A32169; Thu, 7 Nov 2013 10:47:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA7AlCkr036432; Thu, 7 Nov 2013 10:47:12 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA7AlCpx036431; Thu, 7 Nov 2013 10:47:12 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201311071047.rA7AlCpx036431@svn.freebsd.org> From: Devin Teske Date: Thu, 7 Nov 2013 10:47:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257791 - head/usr.sbin/bsdconfig/share X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Nov 2013 10:47:13 -0000 Author: dteske Date: Thu Nov 7 10:47:12 2013 New Revision: 257791 URL: http://svnweb.freebsd.org/changeset/base/257791 Log: Add f_sprintf() and f_vsprintf() to go along with previously added f_snprintf() and f_vsnprintf() (size-constraint) functions. Modified: head/usr.sbin/bsdconfig/share/strings.subr Modified: head/usr.sbin/bsdconfig/share/strings.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/strings.subr Thu Nov 7 10:45:25 2013 (r257790) +++ head/usr.sbin/bsdconfig/share/strings.subr Thu Nov 7 10:47:12 2013 (r257791) @@ -77,6 +77,18 @@ f_snprintf() }'\' \) } +# f_sprintf $var_to_set $format [$arguments ...] +# +# Similar to sprintf(3), write a string into $var_to_set using printf(1) syntax +# (`$format [$arguments ...]'). +# +f_sprintf() +{ + local __var_to_set="$1" + shift 1 # var_to_set + eval "$__var_to_set"=\$\( printf -- \"\$@\" \) +} + # f_vsnprintf $var_to_set $size $format $format_args # # Similar to vsnprintf(3), write at most $size number of bytes into $var_to_set @@ -112,6 +124,16 @@ f_vsnprintf() eval f_snprintf \"\$1\" \"\$2\" \"\$3\" $4 } +# f_vsprintf $var_to_set $format $format_args +# +# Similar to vsprintf(3), write a string into $var_to_set using printf(1) +# syntax (`$format $format_args'). +# +f_vsprintf() +{ + eval f_sprintf \"\$1\" \"\$2\" $3 +} + # f_longest_line_length # # Simple wrapper to an awk(1) script to print the length of the longest line of From owner-svn-src-head@FreeBSD.ORG Thu Nov 7 11:20:51 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 6914FADB; Thu, 7 Nov 2013 11:20:51 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 573922467; Thu, 7 Nov 2013 11:20:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA7BKpe4049421; Thu, 7 Nov 2013 11:20:51 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA7BKpBh049420; Thu, 7 Nov 2013 11:20:51 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201311071120.rA7BKpBh049420@svn.freebsd.org> From: Devin Teske Date: Thu, 7 Nov 2013 11:20:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257793 - head/usr.sbin/bsdconfig/share X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Nov 2013 11:20:51 -0000 Author: dteske Date: Thu Nov 7 11:20:50 2013 New Revision: 257793 URL: http://svnweb.freebsd.org/changeset/base/257793 Log: Fix an off-by-one error that was causing menus to look funny. Modified: head/usr.sbin/bsdconfig/share/dialog.subr Modified: head/usr.sbin/bsdconfig/share/dialog.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/dialog.subr Thu Nov 7 10:48:00 2013 (r257792) +++ head/usr.sbin/bsdconfig/share/dialog.subr Thu Nov 7 11:20:50 2013 (r257793) @@ -527,7 +527,7 @@ f_dialog_menu_constrain() : ${__min_rows:=0} fi - local __max_rows=$(( $__max_height_menu_constrain - 8 )) + local __max_rows=$(( $__max_height_menu_constrain - 7 )) # If prompt_len is zero (no prompt), bump the max-rows by 1 # Default assumption is (if no argument) that there's no prompt [ ${__prompt_len:-0} -gt 0 ] || From owner-svn-src-head@FreeBSD.ORG Thu Nov 7 12:12:09 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 1235733E; Thu, 7 Nov 2013 12:12:09 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id BC85528B3; Thu, 7 Nov 2013 12:12:07 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id OAA11999; Thu, 07 Nov 2013 14:11:59 +0200 (EET) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1VeORL-000JL9-K3; Thu, 07 Nov 2013 14:11:59 +0200 Message-ID: <527B8357.5070200@FreeBSD.org> Date: Thu, 07 Nov 2013 14:11:03 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: Alan Somers , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org Subject: Re: svn commit: r252481 - in head: etc sbin/devd References: <201307012120.r61LKIxI059332@svn.freebsd.org> In-Reply-To: <201307012120.r61LKIxI059332@svn.freebsd.org> X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Nov 2013 12:12:09 -0000 First, apologies for this very delayed reaction. on 02/07/2013 00:20 Alan Somers said the following: > Author: asomers > Date: Mon Jul 1 21:20:17 2013 > New Revision: 252481 > URL: http://svnweb.freebsd.org/changeset/base/252481 > > Log: > Add syslog(3) support to devd(8). > [snip] > @@ -243,8 +244,7 @@ bool > action::do_action(config &c) > { > string s = c.expand_string(_cmd.c_str()); > - if (Dflag) > - fprintf(stderr, "Executing '%s'\n", s.c_str()); > + devdlog(LOG_NOTICE, "Executing '%s'\n", s.c_str()); My opinion that this message does not deserve LOG_NOTICE message. LOG_NOTICE Conditions that are not error conditions, but should possi‐ bly be handled specially. I don't think that devd reacting to an event deserves any special handling from an administrator. All LOG_NOTICE messages are logged into /var/log/messages by default. Besides, many actions already explicitly call logger(1) and sometimes that's the only thing that they do. So on a system with default syslog configuration one can see messages like: devd: Executing 'logger Unknown USB device: vendor 0x03f0 product 0x102a bus uhub7' root: Unknown USB device: vendor 0x03f0 product 0x102a bus uhub7 I think that LOG_INFO should be fine for these messages. > my_system(s.c_str()); > return (true); > } > @@ -1078,10 +1090,27 @@ gensighand(int) > romeo_must_die = 1; > } > > +/* > + * Local logging function. Prints to syslog if we're daemonized; syslog > + * otherwise. > + */ Minor nit: there is a typo in this comment. > +static void > +devdlog(int priority, const char* fmt, ...) > +{ > + va_list argp; > + > + va_start(argp, fmt); > + if (dflag) > + vfprintf(stderr, fmt, argp); > + else > + vsyslog(priority, fmt, argp); > + va_end(argp); > +} > + -- Andriy Gapon From owner-svn-src-head@FreeBSD.ORG Thu Nov 7 12:40:44 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id F25DD771; Thu, 7 Nov 2013 12:40:43 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DEDCD2BB4; Thu, 7 Nov 2013 12:40:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA7CehNP076271; Thu, 7 Nov 2013 12:40:43 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA7CehoC076264; Thu, 7 Nov 2013 12:40:43 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201311071240.rA7CehoC076264@svn.freebsd.org> From: Devin Teske Date: Thu, 7 Nov 2013 12:40:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257795 - in head/usr.sbin/bsdconfig: include share share/media share/packages X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Nov 2013 12:40:44 -0000 Author: dteske Date: Thu Nov 7 12:40:42 2013 New Revision: 257795 URL: http://svnweb.freebsd.org/changeset/base/257795 Log: Replace pkg-tools with pkgng. Modified: head/usr.sbin/bsdconfig/include/messages.subr head/usr.sbin/bsdconfig/share/common.subr head/usr.sbin/bsdconfig/share/media/http.subr head/usr.sbin/bsdconfig/share/packages/index.subr head/usr.sbin/bsdconfig/share/packages/packages.subr Modified: head/usr.sbin/bsdconfig/include/messages.subr ============================================================================== --- head/usr.sbin/bsdconfig/include/messages.subr Thu Nov 7 11:21:08 2013 (r257794) +++ head/usr.sbin/bsdconfig/include/messages.subr Thu Nov 7 12:40:42 2013 (r257795) @@ -49,7 +49,7 @@ msg_assume_yes_to_all_non_critical_dialo msg_astro_desc="Applications related to astronomy." msg_attempt_automatic_dhcp_configuration="Attempt automatic DHCP configuration of interfaces" msg_attempt_ipv6_configuration_of_interfaces="Attempt IPv6 configuration of interfaces" -msg_attempting_to_fetch_file_from_selected_media="Attempting to fetch %s file from selected media." +msg_attempting_to_update_repository_catalogue="Attempting to update repository catalogue from selected media." msg_audio_desc="Audio utilities - most require a supported sound card." msg_australia="Australia" msg_austria="Austria" @@ -138,9 +138,12 @@ msg_ftp_desc="FTP client and server util msg_ftp_passive="FTP Passive" msg_ftp_username="FTP username" msg_games_desc="Various games and sundry amusements." +msg_generating_index_from_pkg_database="Generating INDEX from pkg(8) database\n(this can take a while)..." msg_geography_desc="Geography-related software." msg_german_desc="Ported software for Germanic countries." msg_germany="Germany" +msg_getting_package_categories_via_pkg_rquery="Getting package categories via pkg-rquery(8)..." +msg_getting_package_dependencies_via_pkg_rquery="Getting package dependencyes via pkg-rquery(8)\n(this can take a while)..." msg_gnome_desc="Components of the Gnome Desktop environment." msg_gnustep_desc="Software for GNUstep desktop environment." msg_graphics_desc="Graphics libraries and utilities." @@ -176,7 +179,7 @@ msg_invalid_name_server_ip_address_speci msg_invalid_netmask_value="Invalid netmask value" msg_invalid_nfs_path_specification="Invalid NFS path specification. Must be of the form:\nhost:/full/pathname/to/FreeBSD/distdir" msg_io_error_while_reading_in_the_package="I/O error while reading in the %s package." -msg_io_or_format_error_on_index_file="I/O or format error on %s file.\nPlease verify media (or path to media) and try again." +msg_io_or_format_error_on_index_file="I/O or format error on INDEX file.\nPlease verify media (or path to media) and try again." msg_ipv4_address="IPv4 Address" msg_ipv4_gateway="IPv4 Gateway" msg_ipv6="IPv6" @@ -246,6 +249,7 @@ msg_no_gateway_has_been_set="No gateway msg_no_network_devices="No network devices available!" msg_no_package_name_passed_in_package_variable="No package name passed in package variable" msg_no_packages_were_selected_for_extraction="No packages were selected for extraction." +msg_no_pkg_database_found="No pkg(8) database found!" msg_no_such_file_or_directory="%s: %s: No such file or directory" msg_no_usb_devices_found="No USB devices found (try Options/Re-scan Devices)" msg_no_username="No username provided!" @@ -257,10 +261,9 @@ msg_ok="OK" msg_options="Options" msg_options_editor="Options Editor" msg_other="other" -msg_pkg_delete_failed="Warning: pkg_delete of %s failed.\n Run with debugging for details." +msg_pkg_delete_failed="Warning: pkg-delete(8) of %s failed.\n Run with debugging for details." msg_package_is_needed_by_other_installed_packages="Warning: Package %s is needed by\n %d other installed package%s." msg_package_not_installed_cannot_delete="Warning: package %s not installed\n No package can be deleted." -msg_package_read_successfully_waiting_for_pkg_add="Package %s read successfully - waiting for pkg_add(1)" msg_package_temp="Package Temp" msg_package_was_added_successfully="Package %s was added successfully" msg_packages="packages" @@ -270,7 +273,7 @@ msg_parallel_desc="Applications dealing msg_pear_desc="Software related to the Pear PHP framework." msg_perl5_desc="Utilities/modules for the PERL5 language." msg_permission_denied="%s: %s: Permission denied" -msg_pkg_add_apparently_did_not_like_the_package="pkg_add(1) apparently did not like the %s package." +msg_pkg_install_apparently_did_not_like_the_package="pkg-install(8) apparently did not like the %s package." msg_plan9_desc="Software from the Plan9 operating system." msg_please_check_the_url_and_try_again="No such directory: %s\nplease check the URL and try again.\n" msg_please_enter_password="Please enter your password for sudo(8):" @@ -372,10 +375,13 @@ msg_unable_to_get_file_from_selected_med msg_unable_to_get_proper_ftp_path="Unable to get proper FTP path. FTP media not initialized." msg_unable_to_initialize_media_type_for_package_extract="Unable to initialize media type for package extract." msg_unable_to_make_directory_mountpoint="Unable to make %s directory mountpoint for %s!" +msg_unable_to_pkg_rquery_package_dependeices="Unable to pkg-rquery(8) package dependencies!" +msg_unable_to_pkg_rquery_package_categories="Unable to pkg-rquery(8) package categories!" msg_unable_to_open="Unable to open %s" +msg_unable_to_update_pkg_from_selected_media="Unable to update pkg(8) from selected media." msg_uninstall="Uninstall" msg_uninstall_desc="Mark this package for deletion" -msg_uninstalling_package_waiting_for_pkg_delete="Uninstalling %s package - waiting for pkg_delete(1)" +msg_uninstalling_package_waiting_for_pkg_delete="Uninstalling %s package - waiting for pkg-delete(8)" msg_unknown="unknown" msg_unknown_user="Unknown user: %s" msg_url_was_not_found="%s was not found, maybe directory or release-version are wrong?" Modified: head/usr.sbin/bsdconfig/share/common.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/common.subr Thu Nov 7 11:21:08 2013 (r257794) +++ head/usr.sbin/bsdconfig/share/common.subr Thu Nov 7 12:40:42 2013 (r257795) @@ -60,7 +60,15 @@ FAILURE=1 # export UNAME_S="$(uname -s)" # Operating System (i.e. FreeBSD) export UNAME_P="$(uname -p)" # Processor Architecture (i.e. i386) +export UNAME_M="$(uname -m)" # Machine platform (i.e. i386) export UNAME_R="$(uname -r)" # Release Level (i.e. X.Y-RELEASE) +if [ ! "$UNAME_PKG" ]; then + case "$UNAME_M:$UNAME_P" in + i386:i386) UNAME_PKG="x86:32" ;; + amd64:amd64) UNAME_PKG="x86:64" ;; + *) UNAME_PKG="$UNAME_M:$UNAME_P" + esac +fi # # Default behavior is to call f_debug_init() automatically when loaded. Modified: head/usr.sbin/bsdconfig/share/media/http.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/media/http.subr Thu Nov 7 11:21:08 2013 (r257794) +++ head/usr.sbin/bsdconfig/share/media/http.subr Thu Nov 7 12:40:42 2013 (r257795) @@ -77,7 +77,8 @@ f_dialog_menu_media_http() f_dialog_title_restore local prompt="$msg_please_select_the_site_closest_to_you_or_other" local menu_list=" - '$msg_main_site' 'ftp.freebsd.org' + 'dist $msg_main_site' 'ftp.freebsd.org' + 'pkg $msg_main_site' 'pkg.freebsd.org' 'URL' '$msg_specify_some_other_http_site' " # END-QUOTE local hline="$msg_select_a_site_thats_close" @@ -321,7 +322,7 @@ f_media_set_http() device_http set type $DEVICE_TYPE_HTTP device_http set init f_media_init_http device_http set get f_media_get_http - device_http set shutdown : + device_http set shutdown f_media_shutdown_http device_http set private network f_struct_copy device_http device_media f_struct_free device_http @@ -452,6 +453,11 @@ f_media_init_http() local dev="$1" f_dprintf "Init routine called for HTTP device. dev=[%s]" "$dev" + if [ "$HTTP_INITIALIZED" ]; then + f_dprintf "HTTP device already initialized." + return $SUCCESS + fi + # # First verify access # @@ -493,22 +499,31 @@ f_media_init_http() # local fdir hp f_getvar $VAR_HTTP_PATH%/ hp - for fdir in $HTTP_DIRS; do - setvar $VAR_HTTP_PATH "$hp/$fdir/$rel" - if f_http_check_access; then - http_found=$SUCCESS - break - fi - done + setvar $VAR_HTTP_PATH \ + "$hp/freebsd:${UNAME_R%%.*}:$UNAME_PKG/latest" + if f_http_check_access; then + http_found=$SUCCESS + else + for fdir in $HTTP_DIRS; do + setvar $VAR_HTTP_PATH "$hp/$fdir/$rel" + if f_http_check_access; then + http_found=$SUCCESS + break + fi + done + fi esac - [ $http_found -eq $SUCCESS ] && break + if [ $http_found -eq $SUCCESS ]; then + HTTP_INITIALIZED=YES + break + fi f_getvar $VAR_HTTP_PATH http_path f_show_msg "$msg_please_check_the_url_and_try_again" \ "$http_path" - unset $VAR_HTTP_PATH + unset HTTP_INITIALIZED $VAR_HTTP_PATH f_media_set_http || break done @@ -558,6 +573,11 @@ f_media_get_http() f_getvar $VAR_HTTP_HOST http_host f_getvar $VAR_HTTP_PORT http_port + if [ ! "$HTTP_INITIALIZED" ]; then + f_dprintf "No HTTP connection open, can't get file %s" "$file" + return $FAILURE + fi + if ! { f_validate_ipaddr "$http_host" || f_validate_ipaddr6 "$http_host" || @@ -649,6 +669,18 @@ f_media_get_http() return $FAILURE } +# f_media_shutdown_http $device +# +# Shuts down the HTTP device. Return status should be ignored. Note that since +# we don't maintain an open connection to the HTTP server, nothing to do. +# +f_media_shutdown_http() +{ + [ "$HTTP_INITIALIZED" ] || return $SUCCESS + + unset HTTP_INITIALIZED +} + ############################################################ MAIN f_dprintf "%s: Successfully loaded." media/http.subr Modified: head/usr.sbin/bsdconfig/share/packages/index.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/packages/index.subr Thu Nov 7 11:21:08 2013 (r257794) +++ head/usr.sbin/bsdconfig/share/packages/index.subr Thu Nov 7 12:40:42 2013 (r257795) @@ -43,24 +43,52 @@ f_include_lang $BSDCFG_LIBE/include/mess PACKAGE_INDEX= _INDEX_INITTED= +# +# Default path to pkg(8) repo-packagesite.sqlite database +# +SQLITE_REPO="/var/db/pkg/repo-packagesite.sqlite" + +# +# Default path to on-disk cache INDEX file +# +PACKAGES_INDEX_CACHEFILE="/var/run/bsdconfig/packages_INDEX.cache" + +# +# INDEX format for FreeBSD-6.0 or higher: +# +# package|port-origin|install-prefix|comment|port-desc-file|maintainer| +# categories|build-deps|run-deps|www-site|reserve|reserve|reserve|disc +# +INDEX_FORMAT="%n-%v" # package +INDEX_FORMAT="$INDEX_FORMAT|/usr/ports/%o" # port-origin +INDEX_FORMAT="$INDEX_FORMAT|%p" # install-prefix +INDEX_FORMAT="$INDEX_FORMAT|%c" # comment +INDEX_FORMAT="$INDEX_FORMAT|/usr/ports/%o/pkg-descr" # port-desc-file +INDEX_FORMAT="$INDEX_FORMAT|%m" # maintainer +INDEX_FORMAT="$INDEX_FORMAT|@CATEGORIES@" # place-holder +INDEX_FORMAT="$INDEX_FORMAT|" # build-deps +INDEX_FORMAT="$INDEX_FORMAT|@RUNDEPS@" # place-holder +INDEX_FORMAT="$INDEX_FORMAT|%w" # www-site +INDEX_FORMAT="$INDEX_FORMAT|" # reserved +INDEX_FORMAT="$INDEX_FORMAT|" # reserved +INDEX_FORMAT="$INDEX_FORMAT|" # reserved +INDEX_FORMAT="$INDEX_FORMAT|" # disc + ############################################################ FUNCTIONS -# f_index_initialize $path [$var_to_set] +# f_index_initialize [$var_to_set] # -# Read and initialize the global index. $path is to be relative to the chosen -# media (not necessarily the filesystem; e.g. FTP) -- this is usually going to -# be `packages/INDEX'. Returns success unless media cannot be initialized for -# any reason (e.g. user cancels media selection dialog) or an error occurs. The -# index is sorted before being loaded into $var_to_set. +# Read and initialize the global index. Returns success unless media cannot be +# initialized for any reason (e.g. user cancels media selection dialog or an +# error occurs). The index is sorted before being loaded into $var_to_set. # # NOTE: The index is processed with f_index_read() [below] after being loaded. # f_index_initialize() { - local __path="$1" __var_to_set="${2:-PACKAGE_INDEX}" + local __var_to_set="${2:-PACKAGE_INDEX}" [ "$_INDEX_INITTED" ] && return $SUCCESS - [ "$__path" ] || return $FAILURE # Got any media? f_media_verify || return $FAILURE @@ -68,20 +96,163 @@ f_index_initialize() # Does it move when you kick it? f_device_init media || return $FAILURE - f_show_info "$msg_attempting_to_fetch_file_from_selected_media" \ - "$__path" - eval "$__var_to_set"='$( f_device_get media "$__path" )' - if [ $? -ne $SUCCESS ]; then - f_show_msg "$msg_unable_to_get_file_from_selected_media" \ - "$__path" + f_show_info "$msg_attempting_to_update_repository_catalogue" + + # + # Generate $PACKAGESITE variable for pkg(8) based on media type + # + local __type __data __site + device_media get type __type + device_media get private __data + case "$__type" in + $DEVICE_TYPE_UFS|$DEVICE_TYPE_DISK) __site="file://$MOUNTPOINT" ;; + $DEVICE_TYPE_DIRECTORY) __site="file://$__data" ;; + $DEVICE_TYPE_FLOPPY) __site="file://${__data:-$MOUNTPOINT}" ;; + $DEVICE_TYPE_FTP) f_getvar $VAR_FTP_PATH __site ;; + $DEVICE_TYPE_HTTP_PROXY) f_getvar $VAR_HTTP_PROXY_PATH __site ;; + $DEVICE_TYPE_HTTP) f_getvar $VAR_HTTP_PATH __site ;; + $DEVICE_TYPE_CDROM) __site="file://$MOUNTPOINT" ;; + $DEVICE_TYPE_USB) __site="file://$MOUNTPOINT" ;; + $DEVICE_TYPE_DOS) __site="file://$MOUNTPOINT" ;; + $DEVICE_TYPE_NFS) __site="file://$MOUNTPOINT" ;; + esac + + if ! PACKAGESITE="$__site" f_quietly pkg update; then + f_show_err "$msg_unable_to_update_pkg_from_selected_media" f_device_shutdown media return $FAILURE fi + + # + # Try to get contents from validated on-disk cache + # + + # + # Calculate digest used to determine if the on-disk persistant cache + # INDEX (containing this digest on the first line) is valid and can be + # used to quickly populate the environment. + # + local __sqlite_digest + if ! __sqlite_digest=$( md5 < "$SQLITE_REPO" 2> /dev/null ); then + f_show_err "$msg_no_pkg_database_found" + f_device_shutdown media + return $FAILURE + fi + + # + # Check to see if the persistant cache INDEX file exists + # + if [ -f "$PACKAGES_INDEX_CACHEFILE" ]; then + # + # Attempt to populate the environment with the (soon to be) + # validated on-disk cache. If validation fails, fall-back to + # generating a fresh cache. + # + if eval $__var_to_set='$( + ( # Get digest as the first word on first line + read digest rest_ignored + + # + # If the stored digest matches the calculated- + # one populate the environment from the on-disk + # cache and provide success exit status. + # + if [ "$digest" = "$__sqlite_digest" ]; then + cat + exit $SUCCESS + else + # Otherwise, return the current value + eval echo \"\$__var_to_set\" + exit $FAILURE + fi + ) < "$PACKAGES_INDEX_CACHEFILE" 2> /dev/null + )'; then + f_show_info \ + "$msg_located_index_now_reading_package_data_from_it" + if ! f_index_read "$__var_to_set"; then + f_show_err \ + "$msg_io_or_format_error_on_index_file" + return $FAILURE + fi + _INDEX_INITTED=1 + return $SUCCESS + fi + # Otherwise, fall-thru to create a fresh cache from scratch + fi + + # + # If we reach this point, we need to generate the data from scratch + # + + f_show_info "$msg_getting_package_categories_via_pkg_rquery" + if ! eval "$( pkg rquery "%n-%v %C" | awk ' + { categories[$1] = categories[$1] " " $2 } + END { + for (package in categories) + { + cats = categories[package] + sub(/^ /, "", cats) + gsub(/[^[:alnum:]_]/, "_", package) + printf "local _%s_categories=\"%s\";\n", package, cats + } + }' )"; then + f_show_err "$msg_unable_to_pkg_rquery_package_dependeices" + f_device_shutdown media + return $FAILURE + fi + + f_show_info "$msg_getting_package_dependencies_via_pkg_rquery" + if ! eval "$( pkg rquery "%n-%v %dn-%dv" | awk ' + { rundeps[$1] = rundeps[$1] " " $2 } + END { + for (package in rundeps) + { + deps = rundeps[package] + sub(/^ /, "", deps) + gsub(/[^[:alnum:]_]/, "_", package) + printf "local _%s_rundeps=\"%s\";\n", package, deps + } + }' )"; then + f_show_err "$msg_unable_to_pkg_rquery_package_dependeices" + f_device_shutdown media + return $FAILURE + fi + + f_show_info "$msg_generating_index_from_pkg_database" + eval "$__var_to_set"='$( pkg rquery "$INDEX_FORMAT" | + while read LINE; do + package="${LINE%%|*}"; + f_str2varname "$package" varpkg; + eval f_replaceall \"\$LINE\" \"\|@CATEGORIES@\|\" \ + \"\|\$_${varpkg}_categories\|\" LINE + eval f_replaceall \"\$LINE\" \"\|@RUNDEPS@\|\" \ + \"\|\$_${varpkg}_rundeps\|\" LINE + echo "$LINE" + done + )' # always returns true (status of last item in pipe-chain) eval "$__var_to_set"='$( debug= f_getvar "$__var_to_set" | sort )' + # + # Attempt to create the persistant on-disk cache + # + + # Create a new temporary file to write to + local __tmpfile="$( mktemp -t "$pgm" )" + if [ "$__tmpfile" ]; then + # Write the temporary file contents + echo "$__sqlite_digest" > "$__tmpfile" + debug= f_getvar "$__var_to_set" >> "$__tmpfile" + + # Finally, move the temporary file into place + case "$PACKAGES_INDEX_CACHEFILE" in + */*) f_quietly mkdir -p "${PACKAGES_INDEX_CACHEFILE%/*}" + esac + f_quietly mv -f "$__tmpfile" "$PACKAGES_INDEX_CACHEFILE" + fi + f_show_info "$msg_located_index_now_reading_package_data_from_it" if ! f_index_read "$__var_to_set"; then - f_show_msg "$msg_io_or_format_error_on_index_file" "$__path" + f_show_err "$msg_io_or_format_error_on_index_file" return $FAILURE fi Modified: head/usr.sbin/bsdconfig/share/packages/packages.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/packages/packages.subr Thu Nov 7 11:21:08 2013 (r257794) +++ head/usr.sbin/bsdconfig/share/packages/packages.subr Thu Nov 7 12:40:42 2013 (r257795) @@ -53,7 +53,7 @@ f_include_lang $BSDCFG_LIBE/include/mess # # Package extensions to try # -PACKAGE_EXTENSIONS=".tbz .tbz2 .tgz" +PACKAGE_EXTENSIONS=".txz .tbz .tbz2 .tgz" # # Variables used to track runtime states @@ -164,24 +164,13 @@ f_package_deselect() # f_package_detect_installed # -# Detect installed packages. Currently this searches /var/db/pkg for directory +# Detect installed packages. Currently this uses pkg-query(8) for querying # entries and marks each entry as an installed/selected package. # f_package_detect_installed() { - local installed package varpkg - # - # XXX KLUDGE ALERT! This makes evil assumptions about how XXX - # packages register themselves and should *really* be done with - # `pkg_info -e ' except that this is too slow for an - # item check routine.. :-( - # - # NOTE: When transitioning to pkgng, make a single fork to `pkg' to - # produce a list of all installed packages and parse _that_ - # - installed=$( find -s /var/db/pkg -mindepth 1 -maxdepth 1 -type d | - sed -e 's:/var/db/pkg/::' ) - for package in $installed; do + local package varpkg + for package in $( pkg query "%n-%v" ); do f_str2varname $package varpkg export _mark_$varpkg=X # exported for awk(1) ENVIRON[] f_package_select $package @@ -985,14 +974,10 @@ f_package_extract() local path case "$name" in */*) path="$name" ;; - *) - case "$name" in - *-*|*_*) path="packages/All/$name" ;; - *) path="packages/Latest/$name" - esac + *) path="All/$name" ;; esac - # We have a path, call the device strategy routine to get the file + # We have a path, call the device strategy routine to check the file local pkg_ext found= for pkg_ext in "" $PACKAGE_EXTENSIONS; do if f_device_get $device "$path$pkg_ext" $PROBE_EXIST; then @@ -1017,7 +1002,7 @@ f_package_extract() return $FAILURE fi - local devname= + local orphan devname= f_struct device_$device get name devname if [ "$depended" ]; then f_show_info "$msg_adding_package_as_a_dependency_from_media" \ @@ -1026,27 +1011,14 @@ f_package_extract() f_show_info "$msg_adding_package_from_media" "$name" "$devname" fi - # Get package data and pipe into pkg_add(1) while providing feedback - { - if ! f_device_get $device "$path"; then - $alert "$msg_io_error_while_reading_in_the_package" \ - "$name" \ - >&$DIALOG_TERMINAL_PASSTHRU_FD 2> /dev/null - [ "$no_confirm" ] && sleep 2 - else - f_show_info \ - "$msg_package_read_successfully_waiting_for_pkg_add" \ - "$name" >&$DIALOG_TERMINAL_PASSTHRU_FD 2> /dev/null - fi - } | { - if f_debugging; then - /usr/sbin/pkg_add -v - - else - f_quietly /usr/sbin/pkg_add - - fi - } + # Request the package be added via pkg-install(8) + if f_debugging; then + pkg -d install -y $orphan "$name" + else + f_quietly pkg install -y "$name" + fi if [ $? -ne $SUCCESS ]; then - $alert "$msg_pkg_add_apparently_did_not_like_the_package" \ + $alert "$msg_pkg_install_apparently_did_not_like_the_package" \ "$name" [ "$no_confirm" ] && sleep 2 else @@ -1172,15 +1144,15 @@ f_package_delete() # f_show_info "$msg_uninstalling_package_waiting_for_pkg_delete" "$name" if f_debugging; then - pkg_delete -v "$name" + pkg -d delete -y "$name" else - f_quietly pkg_delete "$name" + f_quietly pkg delete -y "$name" fi if [ $? -ne $SUCCESS ]; then f_show_msg "$msg_pkg_delete_failed" "$name" return $FAILURE else - f_dprintf "%s: pkg_delete(1) of %s successful" $fname "$name" + f_dprintf "%s: pkg-delete(8) of %s successful" $fname "$name" f_str2varname "$name" varpkg setvar _mark_$varpkg "" fi From owner-svn-src-head@FreeBSD.ORG Thu Nov 7 14:05:50 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B269DA8D; Thu, 7 Nov 2013 14:05:50 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A02AF2261; Thu, 7 Nov 2013 14:05:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA7E5odS006659; Thu, 7 Nov 2013 14:05:50 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA7E5ocD006656; Thu, 7 Nov 2013 14:05:50 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201311071405.rA7E5ocD006656@svn.freebsd.org> From: Gleb Smirnoff Date: Thu, 7 Nov 2013 14:05:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257796 - in head: . share/examples X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Nov 2013 14:05:50 -0000 Author: glebius Date: Thu Nov 7 14:05:49 2013 New Revision: 257796 URL: http://svnweb.freebsd.org/changeset/base/257796 Log: Finish r257779. PR: usb/183728 Modified: head/ObsoleteFiles.inc head/share/examples/Makefile Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Thu Nov 7 12:40:42 2013 (r257795) +++ head/ObsoleteFiles.inc Thu Nov 7 14:05:49 2013 (r257796) @@ -38,6 +38,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20131107: example files removed +OLD_FILES+=usr/share/examples/libusb20/aux.c +OLD_FILES+=usr/share/examples/libusb20/aux.h # 20131103: WITH_LIBICONV_COMPAT removal OLD_FILES+=usr/include/_libiconv_compat.h OLD_FILES+=usr/lib/libiconv.a Modified: head/share/examples/Makefile ============================================================================== --- head/share/examples/Makefile Thu Nov 7 12:40:42 2013 (r257795) +++ head/share/examples/Makefile Thu Nov 7 14:05:49 2013 (r257796) @@ -107,8 +107,8 @@ XFILES= BSD_daemon/FreeBSD.pfa \ kld/syscall/test/call.c \ libusb20/Makefile \ libusb20/README \ - libusb20/aux.c \ - libusb20/aux.h \ + libusb20/util.c \ + libusb20/util.h \ libusb20/bulk.c \ libusb20/control.c \ libvgl/Makefile \ From owner-svn-src-head@FreeBSD.ORG Thu Nov 7 15:55:31 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 72CFF7D9; Thu, 7 Nov 2013 15:55:31 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-wi0-x22c.google.com (mail-wi0-x22c.google.com [IPv6:2a00:1450:400c:c05::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9602929A5; Thu, 7 Nov 2013 15:55:30 +0000 (UTC) Received: by mail-wi0-f172.google.com with SMTP id ez12so828980wid.17 for ; Thu, 07 Nov 2013 07:55:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=Z0DeF6Oq7mw8EzucTQsR4vLXo5tBiG1NnPq3dvszBWg=; b=VwYJUs5GFK4NN0pRF4GKkcLW1mMG3XYWdeGKy3mbGKhOIUvTEjNkqgi15W/c5DBT9F 0JeU3H3iajkrD3/csVQIr/YuznolqVVMfV26W21aunpoTrDpmK0miUfYWNOKYD7oJrOZ 5BAJaurilOTwPhZvYy7T/LHmRhLTiFXjtoXKiErxYDtwXuvO130gjA0i1KQ3qAnDJ1GA nO4RB8HfmiEIxjp5DehiCtMUbg0TSyCfrWj/IgoVhShCYJ41e2gfC984JyNu/fZiB85B uh4AXHaesTEgauS1NOmhNgq7ObRr7YEvkyvElcFVGCoYTDzqyCmYK3o6wPcReg9Vk1qJ DqrA== MIME-Version: 1.0 X-Received: by 10.194.176.163 with SMTP id cj3mr8074637wjc.8.1383839728960; Thu, 07 Nov 2013 07:55:28 -0800 (PST) Sender: asomers@gmail.com Received: by 10.194.171.35 with HTTP; Thu, 7 Nov 2013 07:55:28 -0800 (PST) In-Reply-To: <527B8357.5070200@FreeBSD.org> References: <201307012120.r61LKIxI059332@svn.freebsd.org> <527B8357.5070200@FreeBSD.org> Date: Thu, 7 Nov 2013 08:55:28 -0700 X-Google-Sender-Auth: 0CkAMZHgr10dBlzH0SUCRtyxlh8 Message-ID: Subject: Re: svn commit: r252481 - in head: etc sbin/devd From: Alan Somers To: Andriy Gapon 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 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Nov 2013 15:55:31 -0000 On Thu, Nov 7, 2013 at 5:11 AM, Andriy Gapon wrote: > > First, apologies for this very delayed reaction. > > on 02/07/2013 00:20 Alan Somers said the following: >> Author: asomers >> Date: Mon Jul 1 21:20:17 2013 >> New Revision: 252481 >> URL: http://svnweb.freebsd.org/changeset/base/252481 >> >> Log: >> Add syslog(3) support to devd(8). >> > [snip] >> @@ -243,8 +244,7 @@ bool >> action::do_action(config &c) >> { >> string s =3D c.expand_string(_cmd.c_str()); >> - if (Dflag) >> - fprintf(stderr, "Executing '%s'\n", s.c_str()); >> + devdlog(LOG_NOTICE, "Executing '%s'\n", s.c_str()); > > My opinion that this message does not deserve LOG_NOTICE message. > > LOG_NOTICE Conditions that are not error conditions, but should p= ossi=E2=80=90 > bly be handled specially. > > I don't think that devd reacting to an event deserves any special handlin= g from > an administrator. All LOG_NOTICE messages are logged into /var/log/messa= ges by > default. > Besides, many actions already explicitly call logger(1) and sometimes tha= t's the > only thing that they do. > > So on a system with default syslog configuration one can see messages lik= e: > devd: Executing 'logger Unknown USB device: vendor 0x03f0 product 0x102a = bus uhub7' > root: Unknown USB device: vendor 0x03f0 product 0x102a bus uhub7 > > I think that LOG_INFO should be fine for these messages. Yep, I agree. LOG_INFO should be fine. > >> my_system(s.c_str()); >> return (true); >> } > >> @@ -1078,10 +1090,27 @@ gensighand(int) >> romeo_must_die =3D 1; >> } >> >> +/* >> + * Local logging function. Prints to syslog if we're daemonized; syslo= g >> + * otherwise. >> + */ > > Minor nit: there is a typo in this comment. Oops. Would you like me to make these changes, or will you take care of it? -Alan From owner-svn-src-head@FreeBSD.ORG Thu Nov 7 16:01:45 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 1DA42CA8; Thu, 7 Nov 2013 16:01:45 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id B983E2A21; Thu, 7 Nov 2013 16:01:43 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id SAA15086; Thu, 07 Nov 2013 18:01:41 +0200 (EET) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1VeS1d-000JZ4-Fs; Thu, 07 Nov 2013 18:01:41 +0200 Message-ID: <527BB92D.70702@FreeBSD.org> Date: Thu, 07 Nov 2013 18:00:45 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: Alan Somers Subject: Re: svn commit: r252481 - in head: etc sbin/devd References: <201307012120.r61LKIxI059332@svn.freebsd.org> <527B8357.5070200@FreeBSD.org> In-Reply-To: X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Nov 2013 16:01:45 -0000 on 07/11/2013 17:55 Alan Somers said the following: > Would you like me to make these changes, or will you take care of it? Yep, I can / will do it. Thanks! -- Andriy Gapon From owner-svn-src-head@FreeBSD.ORG Thu Nov 7 16:22:05 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 40847635; Thu, 7 Nov 2013 16:22:05 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2E2622B62; Thu, 7 Nov 2013 16:22:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA7GM5GO058351; Thu, 7 Nov 2013 16:22:05 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA7GM5N2058350; Thu, 7 Nov 2013 16:22:05 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201311071622.rA7GM5N2058350@svn.freebsd.org> From: Andriy Gapon Date: Thu, 7 Nov 2013 16:22:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257798 - head/sbin/devd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Nov 2013 16:22:05 -0000 Author: avg Date: Thu Nov 7 16:22:04 2013 New Revision: 257798 URL: http://svnweb.freebsd.org/changeset/base/257798 Log: devd: fix a typo in a comment Reviewed by: asomers Modified: head/sbin/devd/devd.cc Modified: head/sbin/devd/devd.cc ============================================================================== --- head/sbin/devd/devd.cc Thu Nov 7 15:43:41 2013 (r257797) +++ head/sbin/devd/devd.cc Thu Nov 7 16:22:04 2013 (r257798) @@ -1111,7 +1111,7 @@ siginfohand(int) } /* - * Local logging function. Prints to syslog if we're daemonized; syslog + * Local logging function. Prints to syslog if we're daemonized; stderr * otherwise. */ static void From owner-svn-src-head@FreeBSD.ORG Thu Nov 7 16:24:32 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 6DDF979F; Thu, 7 Nov 2013 16:24:32 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5B92A2B7F; Thu, 7 Nov 2013 16:24:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA7GOWpx058690; Thu, 7 Nov 2013 16:24:32 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA7GOWfa058689; Thu, 7 Nov 2013 16:24:32 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201311071624.rA7GOWfa058689@svn.freebsd.org> From: Andriy Gapon Date: Thu, 7 Nov 2013 16:24:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257799 - head/sbin/devd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Nov 2013 16:24:32 -0000 Author: avg Date: Thu Nov 7 16:24:31 2013 New Revision: 257799 URL: http://svnweb.freebsd.org/changeset/base/257799 Log: devd: lower priority of action execution logging to info Reviewed by: asomers Modified: head/sbin/devd/devd.cc Modified: head/sbin/devd/devd.cc ============================================================================== --- head/sbin/devd/devd.cc Thu Nov 7 16:22:04 2013 (r257798) +++ head/sbin/devd/devd.cc Thu Nov 7 16:24:31 2013 (r257799) @@ -248,7 +248,7 @@ bool action::do_action(config &c) { string s = c.expand_string(_cmd.c_str()); - devdlog(LOG_NOTICE, "Executing '%s'\n", s.c_str()); + devdlog(LOG_INFO, "Executing '%s'\n", s.c_str()); my_system(s.c_str()); return (true); } From owner-svn-src-head@FreeBSD.ORG Thu Nov 7 16:37:13 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 0CEA5F9D; Thu, 7 Nov 2013 16:37:13 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EE2502C66; Thu, 7 Nov 2013 16:37:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA7GbCKT063696; Thu, 7 Nov 2013 16:37:12 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA7GbCvW063692; Thu, 7 Nov 2013 16:37:12 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201311071637.rA7GbCvW063692@svn.freebsd.org> From: Michael Tuexen Date: Thu, 7 Nov 2013 16:37:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257800 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Nov 2013 16:37:13 -0000 Author: tuexen Date: Thu Nov 7 16:37:12 2013 New Revision: 257800 URL: http://svnweb.freebsd.org/changeset/base/257800 Log: Use htons()/ntohs() appropriately. These issues were reported by Andrew Galante. MFC after: 3 days Modified: head/sys/netinet/sctp_asconf.c head/sys/netinet/sctputil.c Modified: head/sys/netinet/sctp_asconf.c ============================================================================== --- head/sys/netinet/sctp_asconf.c Thu Nov 7 16:24:31 2013 (r257799) +++ head/sys/netinet/sctp_asconf.c Thu Nov 7 16:37:12 2013 (r257800) @@ -2737,7 +2737,7 @@ sctp_compose_asconf(struct sctp_tcb *stc /* chain it all together */ SCTP_BUF_NEXT(m_asconf_chk) = m_asconf; *retlen = SCTP_BUF_LEN(m_asconf_chk) + SCTP_BUF_LEN(m_asconf); - acp->ch.chunk_length = ntohs(*retlen); + acp->ch.chunk_length = htons(*retlen); return (m_asconf_chk); } Modified: head/sys/netinet/sctputil.c ============================================================================== --- head/sys/netinet/sctputil.c Thu Nov 7 16:24:31 2013 (r257799) +++ head/sys/netinet/sctputil.c Thu Nov 7 16:37:12 2013 (r257800) @@ -2602,7 +2602,7 @@ sctp_notify_assoc_change(uint16_t state, if (sctp_stcb_is_feature_on(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_RECVASSOCEVNT)) { notif_len = sizeof(struct sctp_assoc_change); if (abort != NULL) { - abort_len = htons(abort->ch.chunk_length); + abort_len = ntohs(abort->ch.chunk_length); } else { abort_len = 0; } @@ -3474,7 +3474,7 @@ sctp_notify_remote_error(struct sctp_tcb return; } if (chunk != NULL) { - chunk_len = htons(chunk->ch.chunk_length); + chunk_len = ntohs(chunk->ch.chunk_length); } else { chunk_len = 0; } From owner-svn-src-head@FreeBSD.ORG Thu Nov 7 16:42:34 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 24F6F571; Thu, 7 Nov 2013 16:42:34 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0EA4C2CEB; Thu, 7 Nov 2013 16:42:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA7GgXcQ067677; Thu, 7 Nov 2013 16:42:33 GMT (envelope-from gabor@svn.freebsd.org) Received: (from gabor@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA7GgTAV067649; Thu, 7 Nov 2013 16:42:29 GMT (envelope-from gabor@svn.freebsd.org) Message-Id: <201311071642.rA7GgTAV067649@svn.freebsd.org> From: Gabor Kovesdan Date: Thu, 7 Nov 2013 16:42:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257801 - in head/release/doc: de_DE.ISO8859-1/early-adopter de_DE.ISO8859-1/errata de_DE.ISO8859-1/hardware/alpha de_DE.ISO8859-1/hardware/common de_DE.ISO8859-1/hardware/i386 de_DE.IS... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Nov 2013 16:42:34 -0000 Author: gabor Date: Thu Nov 7 16:42:28 2013 New Revision: 257801 URL: http://svnweb.freebsd.org/changeset/base/257801 Log: - Update release noted to DocBook 5.0 so that they work with the new tree Deleted: head/release/doc/fr_FR.ISO8859-1/installation/common/abstract.xml head/release/doc/ru_RU.KOI8-R/installation/common/abstract.xml Modified: head/release/doc/de_DE.ISO8859-1/early-adopter/article.xml head/release/doc/de_DE.ISO8859-1/errata/article.xml head/release/doc/de_DE.ISO8859-1/hardware/alpha/article.xml head/release/doc/de_DE.ISO8859-1/hardware/alpha/proc-alpha.xml head/release/doc/de_DE.ISO8859-1/hardware/common/artheader.xml head/release/doc/de_DE.ISO8859-1/hardware/common/dev.xml head/release/doc/de_DE.ISO8859-1/hardware/common/intro.xml head/release/doc/de_DE.ISO8859-1/hardware/i386/article.xml head/release/doc/de_DE.ISO8859-1/hardware/i386/proc-i386.xml head/release/doc/de_DE.ISO8859-1/hardware/ia64/article.xml head/release/doc/de_DE.ISO8859-1/hardware/ia64/proc-ia64.xml head/release/doc/de_DE.ISO8859-1/hardware/pc98/article.xml head/release/doc/de_DE.ISO8859-1/hardware/pc98/proc-pc98.xml head/release/doc/de_DE.ISO8859-1/hardware/sparc64/article.xml head/release/doc/de_DE.ISO8859-1/hardware/sparc64/dev-sparc64.xml head/release/doc/de_DE.ISO8859-1/hardware/sparc64/proc-sparc64.xml head/release/doc/de_DE.ISO8859-1/installation/alpha/Makefile head/release/doc/de_DE.ISO8859-1/installation/alpha/article.xml head/release/doc/de_DE.ISO8859-1/installation/common/abstract.xml head/release/doc/de_DE.ISO8859-1/installation/common/artheader.xml head/release/doc/de_DE.ISO8859-1/installation/common/install.ent head/release/doc/de_DE.ISO8859-1/installation/common/install.xml head/release/doc/de_DE.ISO8859-1/installation/common/layout.xml head/release/doc/de_DE.ISO8859-1/installation/common/trouble.xml head/release/doc/de_DE.ISO8859-1/installation/common/upgrade.xml head/release/doc/de_DE.ISO8859-1/installation/i386/Makefile head/release/doc/de_DE.ISO8859-1/installation/i386/article.xml head/release/doc/de_DE.ISO8859-1/installation/ia64/Makefile head/release/doc/de_DE.ISO8859-1/installation/ia64/article.xml head/release/doc/de_DE.ISO8859-1/installation/pc98/Makefile head/release/doc/de_DE.ISO8859-1/installation/pc98/article.xml head/release/doc/de_DE.ISO8859-1/installation/sparc64/article.xml head/release/doc/de_DE.ISO8859-1/installation/sparc64/install.xml head/release/doc/de_DE.ISO8859-1/readme/article.xml head/release/doc/de_DE.ISO8859-1/relnotes/alpha/article.xml head/release/doc/de_DE.ISO8859-1/relnotes/common/new.xml head/release/doc/de_DE.ISO8859-1/relnotes/i386/article.xml head/release/doc/de_DE.ISO8859-1/relnotes/ia64/article.xml head/release/doc/de_DE.ISO8859-1/relnotes/pc98/article.xml head/release/doc/de_DE.ISO8859-1/relnotes/sparc64/article.xml head/release/doc/en_US.ISO8859-1/errata/article.xml head/release/doc/en_US.ISO8859-1/hardware/article.xml head/release/doc/en_US.ISO8859-1/readme/article.xml head/release/doc/en_US.ISO8859-1/relnotes/article.xml head/release/doc/fr_FR.ISO8859-1/early-adopter/article.xml head/release/doc/fr_FR.ISO8859-1/errata/article.xml head/release/doc/fr_FR.ISO8859-1/hardware/alpha/article.xml head/release/doc/fr_FR.ISO8859-1/hardware/alpha/proc-alpha.xml head/release/doc/fr_FR.ISO8859-1/hardware/common/artheader.xml head/release/doc/fr_FR.ISO8859-1/hardware/common/dev.xml head/release/doc/fr_FR.ISO8859-1/hardware/common/intro.xml head/release/doc/fr_FR.ISO8859-1/hardware/i386/article.xml head/release/doc/fr_FR.ISO8859-1/hardware/i386/proc-i386.xml head/release/doc/fr_FR.ISO8859-1/hardware/ia64/article.xml head/release/doc/fr_FR.ISO8859-1/hardware/ia64/proc-ia64.xml head/release/doc/fr_FR.ISO8859-1/hardware/pc98/article.xml head/release/doc/fr_FR.ISO8859-1/hardware/pc98/proc-pc98.xml head/release/doc/fr_FR.ISO8859-1/hardware/sparc64/article.xml head/release/doc/fr_FR.ISO8859-1/hardware/sparc64/dev-sparc64.xml head/release/doc/fr_FR.ISO8859-1/hardware/sparc64/proc-sparc64.xml head/release/doc/fr_FR.ISO8859-1/installation/alpha/Makefile head/release/doc/fr_FR.ISO8859-1/installation/alpha/article.xml head/release/doc/fr_FR.ISO8859-1/installation/common/artheader.xml head/release/doc/fr_FR.ISO8859-1/installation/common/install.ent head/release/doc/fr_FR.ISO8859-1/installation/common/install.xml head/release/doc/fr_FR.ISO8859-1/installation/common/layout.xml head/release/doc/fr_FR.ISO8859-1/installation/common/trouble.xml head/release/doc/fr_FR.ISO8859-1/installation/common/upgrade.xml head/release/doc/fr_FR.ISO8859-1/installation/i386/Makefile head/release/doc/fr_FR.ISO8859-1/installation/i386/article.xml head/release/doc/fr_FR.ISO8859-1/installation/pc98/Makefile head/release/doc/fr_FR.ISO8859-1/installation/pc98/article.xml head/release/doc/fr_FR.ISO8859-1/installation/sparc64/article.xml head/release/doc/fr_FR.ISO8859-1/installation/sparc64/install.xml head/release/doc/fr_FR.ISO8859-1/relnotes/alpha/article.xml head/release/doc/fr_FR.ISO8859-1/relnotes/common/new.xml head/release/doc/fr_FR.ISO8859-1/relnotes/i386/article.xml head/release/doc/ja_JP.eucJP/errata/article.xml head/release/doc/ja_JP.eucJP/hardware/alpha/article.xml head/release/doc/ja_JP.eucJP/hardware/amd64/article.xml head/release/doc/ja_JP.eucJP/hardware/amd64/proc-amd64.xml head/release/doc/ja_JP.eucJP/hardware/common/artheader.xml head/release/doc/ja_JP.eucJP/hardware/common/dev.xml head/release/doc/ja_JP.eucJP/hardware/common/intro.xml head/release/doc/ja_JP.eucJP/hardware/i386/article.xml head/release/doc/ja_JP.eucJP/hardware/i386/proc-i386.xml head/release/doc/ja_JP.eucJP/hardware/ia64/article.xml head/release/doc/ja_JP.eucJP/hardware/ia64/proc-ia64.xml head/release/doc/ja_JP.eucJP/hardware/pc98/article.xml head/release/doc/ja_JP.eucJP/hardware/pc98/proc-pc98.xml head/release/doc/ja_JP.eucJP/hardware/sparc64/article.xml head/release/doc/ja_JP.eucJP/hardware/sparc64/proc-sparc64.xml head/release/doc/ja_JP.eucJP/relnotes/alpha/article.xml head/release/doc/ja_JP.eucJP/relnotes/amd64/article.xml head/release/doc/ja_JP.eucJP/relnotes/common/new.xml head/release/doc/ja_JP.eucJP/relnotes/i386/article.xml head/release/doc/ja_JP.eucJP/relnotes/ia64/article.xml head/release/doc/ja_JP.eucJP/relnotes/pc98/article.xml head/release/doc/ja_JP.eucJP/relnotes/sparc64/article.xml head/release/doc/ja_JP.eucJP/share/xml/catalog.xml head/release/doc/ru_RU.KOI8-R/errata/article.xml head/release/doc/ru_RU.KOI8-R/hardware/alpha/article.xml head/release/doc/ru_RU.KOI8-R/hardware/amd64/article.xml head/release/doc/ru_RU.KOI8-R/hardware/amd64/proc-amd64.xml head/release/doc/ru_RU.KOI8-R/hardware/common/artheader.xml head/release/doc/ru_RU.KOI8-R/hardware/common/dev.xml head/release/doc/ru_RU.KOI8-R/hardware/common/intro.xml head/release/doc/ru_RU.KOI8-R/hardware/i386/article.xml head/release/doc/ru_RU.KOI8-R/hardware/i386/proc-i386.xml head/release/doc/ru_RU.KOI8-R/hardware/ia64/article.xml head/release/doc/ru_RU.KOI8-R/hardware/ia64/proc-ia64.xml head/release/doc/ru_RU.KOI8-R/hardware/pc98/article.xml head/release/doc/ru_RU.KOI8-R/hardware/pc98/proc-pc98.xml head/release/doc/ru_RU.KOI8-R/hardware/sparc64/article.xml head/release/doc/ru_RU.KOI8-R/hardware/sparc64/proc-sparc64.xml head/release/doc/ru_RU.KOI8-R/installation/alpha/Makefile head/release/doc/ru_RU.KOI8-R/installation/alpha/article.xml head/release/doc/ru_RU.KOI8-R/installation/amd64/Makefile head/release/doc/ru_RU.KOI8-R/installation/amd64/article.xml head/release/doc/ru_RU.KOI8-R/installation/common/artheader.xml head/release/doc/ru_RU.KOI8-R/installation/common/install.ent head/release/doc/ru_RU.KOI8-R/installation/common/install.xml head/release/doc/ru_RU.KOI8-R/installation/common/layout.xml head/release/doc/ru_RU.KOI8-R/installation/common/trouble.xml head/release/doc/ru_RU.KOI8-R/installation/common/upgrade.xml head/release/doc/ru_RU.KOI8-R/installation/i386/Makefile head/release/doc/ru_RU.KOI8-R/installation/i386/article.xml head/release/doc/ru_RU.KOI8-R/installation/ia64/Makefile head/release/doc/ru_RU.KOI8-R/installation/ia64/article.xml head/release/doc/ru_RU.KOI8-R/installation/pc98/Makefile head/release/doc/ru_RU.KOI8-R/installation/pc98/article.xml head/release/doc/ru_RU.KOI8-R/installation/sparc64/Makefile head/release/doc/ru_RU.KOI8-R/installation/sparc64/article.xml head/release/doc/ru_RU.KOI8-R/readme/article.xml head/release/doc/ru_RU.KOI8-R/relnotes/alpha/article.xml head/release/doc/ru_RU.KOI8-R/relnotes/amd64/article.xml head/release/doc/ru_RU.KOI8-R/relnotes/common/new.xml head/release/doc/ru_RU.KOI8-R/relnotes/i386/article.xml head/release/doc/ru_RU.KOI8-R/relnotes/ia64/article.xml head/release/doc/ru_RU.KOI8-R/relnotes/pc98/article.xml head/release/doc/ru_RU.KOI8-R/relnotes/sparc64/article.xml head/release/doc/ru_RU.KOI8-R/share/xml/catalog.xml head/release/doc/share/misc/man2hwnotes.pl head/release/doc/share/xml/catalog.xml head/release/doc/zh_CN.GB2312/errata/article.xml head/release/doc/zh_CN.GB2312/hardware/article.xml head/release/doc/zh_CN.GB2312/readme/article.xml head/release/doc/zh_CN.GB2312/relnotes/article.xml Modified: head/release/doc/de_DE.ISO8859-1/early-adopter/article.xml ============================================================================== --- head/release/doc/de_DE.ISO8859-1/early-adopter/article.xml Thu Nov 7 16:37:12 2013 (r257800) +++ head/release/doc/de_DE.ISO8859-1/early-adopter/article.xml Thu Nov 7 16:42:28 2013 (r257801) @@ -1,13 +1,12 @@ - %release; -X"> -X"> +X"> +X"> ]> - - -
- - Hinweise für die ersten Anwender von &os; +<article xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0" xml:lang="de"> + <info><title>Hinweise für die ersten Anwender von &os; &release.current; + - The &os; Release Engineering Team + The &os; Release Engineering Team $FreeBSD$ @@ -48,9 +46,9 @@ ein paar Hinweise für die Aktualisierung bestehender Systeme. - + - + Einführung Nach über zwei Jahren steht mit &os; &release.5x; @@ -101,7 +99,7 @@ &release.4x; Systems auf 5.0 beachtet werden muß. - + Veröffentlichung neuer &os;-Versionen Das Prinzip der &os;-Entwicklung ist die Verwendung mehrerer @@ -157,17 +155,14 @@ Weitere Informationen über den Ablauf bei der Veröffentlichung einer neuen &os; Version finden Sie auf - den Release - Engineering Web pages und im Artikel &os; - Release Engineering. Informationen über den - geplanten Entwicklungszweig 5-STABLE finden Sie auf der The - Roadmap for 5-STABLE. + den Release + Engineering Web pages und im Artikel &os; + Release Engineering. Informationen über den + geplanten Entwicklungszweig 5-STABLE finden Sie auf der The + Roadmap for 5-STABLE. - + Neuerungen Die Glanzpunkte von &os; &release.5x; sind die vielen Neuerungen. @@ -252,7 +247,7 @@ für &os; &release.prev; und &release.current;. - + Nachteile für frühe Anwender Ein Nachteil der Neuerungen in &os; &release.5x; ist, @@ -334,10 +329,8 @@ - Die Dokumentation (wie z.B. das &os; Handbuch - und der FAQ) + Die Dokumentation (wie z.B. das &os; Handbuch + und der FAQ) ist teilweise noch nicht auf dem Stand von &os; &release.5x;. @@ -351,7 +344,7 @@ geworden sind. - + Die Zukunft des Entwicklungszweiges 4-STABLE Die Veröffentlichung von &os; 5.0 bedeutete nicht das @@ -380,9 +373,8 @@ Neue Versionen auf Basis des Entwicklungszweiges 4-STABLE werden vom &a.security-officer; im üblichen Rahmen unterstützt werden, genauere Informationen dazu finden Sie - auf der Security - page auf der &os; Webseite. In der Regel werden die + auf der Security + page auf der &os; Webseite. In der Regel werden die letzten beiden Versionen jedes Entwicklungszweiges durch die Veröffentlichung von Sicherheitshinweisen und Patches unterstützt; dem Team ist es allerdings freigestellt, diese @@ -390,7 +382,7 @@ auszudehnen. - + Hinweise für die Aktualisierung von &os; &release.4x; Dieses Kapitel enthält Hinweise für Anwender, die @@ -498,7 +490,7 @@ /usr/include zu löschen. Im allgemeinen ist es ausreichend, dieses Verzeichnis vor der Installation bzw. vor dem - installworld zu entfernen. Wird das + installworld zu entfernen. Wird das Verzeichnis nicht entfernt, kann es zu Problemen kommen (speziell mit C++-Programmen), da der Compiler dann einen Mix aus alten und neuen Headerdateien verwendet. @@ -527,7 +519,7 @@ - + Zusammenfassung &os; &release.current; enthält zwar viele interessante Modified: head/release/doc/de_DE.ISO8859-1/errata/article.xml ============================================================================== --- head/release/doc/de_DE.ISO8859-1/errata/article.xml Thu Nov 7 16:37:12 2013 (r257800) +++ head/release/doc/de_DE.ISO8859-1/errata/article.xml Thu Nov 7 16:42:28 2013 (r257801) @@ -1,10 +1,9 @@ - %release; ]> - +
+ &os; &release; Errata -
- - - &os; &release; Errata + - Das &os; Projekt + Das &os; Projekt $FreeBSD$ @@ -44,7 +42,6 @@ 2003 The FreeBSD German Documentation Project - Dieses Dokument enthält die Errata für &os; &release;, @@ -61,8 +58,9 @@ Erscheinen von &os; 5.1-RELEASE weiter aktualisiert werden. + - + Einleitung Diese Errata enthalten brandheiße @@ -78,7 +76,7 @@ CDROM) ist per Definition veraltet. Allerdings sind im Internet aktualisierte Versionen verfügbar, die die aktuellen Errata für diese Version sind. Diese Versionen - sind bei + sind bei http://www.FreeBSD.org/releases/ und allen aktuellen Mirrors dieser Webseite verfügbar. @@ -89,19 +87,17 @@ Dokumentes. Die Liste der &os; CERT security advisories finden Sie bei - oder - . + http://www.FreeBSD.org/security/ oder + ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/. - + Sicherheitshinweise Ein über das Netzwerk nutzbarer Fehler in CVS könnte dazu führen, daß ein Angreifer beliebige Programme auf dem CVS Server - ausführen kann. Weitere Informationen finden Sie in FreeBSD-SA-03:01. + ausführen kann. Weitere Informationen finden Sie in FreeBSD-SA-03:01. Durch Auswertung der Antwortzeiten von OpenSSL wäre es einem Angreifer @@ -113,8 +109,7 @@ den für Sicherheitsprobleme unterstützten Entwicklungszweigen wurde der Fehler durch die neue OpenSSL Version 0.9.6i behoben. - Weitere Informationen finden Sie in FreeBSD-SA-03:02 + Weitere Informationen finden Sie in FreeBSD-SA-03:02 Es ist theoretisch möglich, daß ein Angreifer den geheimen Schlüssel ermittelt, der von der Erweiterung @@ -122,8 +117,7 @@ Effektivität beim Schutz vor TCP SYN Flood Denial-of-Service Angriffen. Hinweise, wie sie das Problem umgehen können und weitere Informationen finden Sie in - FreeBSD-SA-03:03. + FreeBSD-SA-03:03. Durch diverse Puffer-Überläufe in den von sendmail genutzten Routinen zum @@ -132,26 +126,22 @@ und so beliebige Programme ausführen zu lassen. Diese Programme verfügten über die Rechte des Benutzers, unter dessen Kennung &man.sendmail.8; lief, also typischerweise - root. Weitere Informationen und Verweise - auf Patches finden Sie in FreeBSD-SA-03:04 - und FreeBSD-SA-03:07. + root. Weitere Informationen und Verweise + auf Patches finden Sie in FreeBSD-SA-03:04 + und FreeBSD-SA-03:07. Durch einen Puffer-Überlauf im XDR Kodierer/Dekodierer war es einem Angreifer möglich, den Service zum Absturz zu bringen. Informationen, wie Sie den Fehler beheben, finden Sie - in FreeBSD-SA-03:05. + in FreeBSD-SA-03:05. OpenSSL enthält zwei Schwachstellen, die erst vor kurzer Zeit bekannt gemacht wurden. Informationen, wie Sie die Probleme umgehen können und - weitere Informationen finden Sie in FreeBSD-SA-03:06. + weitere Informationen finden Sie in FreeBSD-SA-03:06. - + Aktuelle Informationen GEOM @@ -294,11 +284,11 @@ &os; &release.prev; enthält einen kleinen Fehler im Bereich der Berechtigungen von /dev/tty. Dieser Fehler tritt auf, wenn sich ein Benutzer einloggt, der - weder root noch Mitglied der Gruppe - tty ist. Wechselt dieser Benutzer nun mit + weder root noch Mitglied der Gruppe + tty ist. Wechselt dieser Benutzer nun mit &man.su.1; zu einer anderen Benutzerkennung, die ebenfalls - weder root noch Mitglied der Gruppe - tty ist, kann er &man.ssh.1; nicht + weder root noch Mitglied der Gruppe + tty ist, kann er &man.ssh.1; nicht nutzen, da es /dev/tty nicht öffnen kann. Dieser Fehler wurde in &release.current; bereits behoben. @@ -364,8 +354,7 @@ Die &os; Mailinglisten werden jetzt mit Mailman und nicht mehr mit Majordomo verwaltet. Weitere Informationen finden sie - auf der FreeBSD Mailman - Info Page. + auf der FreeBSD Mailman + Info Page.
Modified: head/release/doc/de_DE.ISO8859-1/hardware/alpha/article.xml ============================================================================== --- head/release/doc/de_DE.ISO8859-1/hardware/alpha/article.xml Thu Nov 7 16:37:12 2013 (r257800) +++ head/release/doc/de_DE.ISO8859-1/hardware/alpha/article.xml Thu Nov 7 16:42:28 2013 (r257801) @@ -1,6 +1,6 @@ - %release; %sections; @@ -10,14 +10,12 @@ ]> - - -
+
&artheader; §.intro; §.proc.alpha; Modified: head/release/doc/de_DE.ISO8859-1/hardware/alpha/proc-alpha.xml ============================================================================== --- head/release/doc/de_DE.ISO8859-1/hardware/alpha/proc-alpha.xml Thu Nov 7 16:37:12 2013 (r257800) +++ head/release/doc/de_DE.ISO8859-1/hardware/alpha/proc-alpha.xml Thu Nov 7 16:42:28 2013 (r257801) @@ -4,21 +4,14 @@ $FreeBSDde: de-docproj/relnotes/de_DE.ISO8859-1/hardware/alpha/proc-alpha.xml,v 1.35 2003/05/24 19:11:43 ue Exp $ basiert auf: 1.60 --> - - - + + Unterstützte Prozessoren und Mainboards - - Wilko - - Bulte - - Gepflegt von - + WilkoBulteGepflegt von - + - Unterstützte Prozessoren und Mainboards + Wir freuen uns über Ergänzungen, Korrekturen und konstruktive Kritik. Informationen über Fehlverhalten von @@ -75,9 +68,8 @@ Compaq stellt auf seinen Webseiten Informationen für Linux-Entwickler bereit. Auch für &os; Anwender sind diese durchaus nützlich. Werfen Sie einmal einen Blick - auf Linux Alpha - Power tools. + auf Linux Alpha + Power tools. @@ -538,9 +530,8 @@ DIN-Variante sollte aber für &os; ausreichend sein. - Lesen Sie nach Möglichkeit das - OEM manual. + Lesen Sie nach Möglichkeit das + OEM manual. Die Konfigurationsdatei für den Kernel einer NoName muß die folgenden Zeilen enthalten: @@ -734,8 +725,7 @@ cpu EV4 mit voller Drehzahl (und Lautstärke) betrieben. Hüten Sie sich vor PCI-Karten, die sehr viel Strom brauchen. Falls Ihr System trotzdem sterben sollten, - könnten Ihnen die Multia-Heat-Death Seiten auf der Website von NetBSD bei + könnten Ihnen die Multia-Heat-Death Seiten auf der Website von NetBSD bei der Reparatur weiterhelfen. Die Intel 82378ZB PCI to ISA Bridge ermöglicht es, @@ -779,11 +769,10 @@ cpu EV4 options DEC_AXPPCI_33 cpu EV4 - Wichtige Informationen zur Multia finden Sie unter - http://www.netbsd.org/Ports/alpha/multiafaq.html und - - http://www.brouhaha.com/~eric/computers/udb.html. + Wichtige Informationen zur Multia finden Sie unter + http://www.netbsd.org/Ports/alpha/multiafaq.html und + + http://www.brouhaha.com/~eric/computers/udb.html. @@ -959,7 +948,7 @@ cpu EV4 Der vollständige Befehl lautet: - >>> SET PCI_DEVICE_OVERRIDE <vendor_id><device_id> + >>> SET PCI_DEVICE_OVERRIDE <vendor_id><device_id> Zum Beispiel: @@ -1078,8 +1067,7 @@ device sbc sollten Sie die SRM Firmware auf V7.2-1 (oder neuer) aktualisieren. Diese Version erschien zuerst auf der Firmware Update CD V5.7, ist aber auch auf - http://www.compaq.com/ + http://www.compaq.com/ erhältlich. Damit wird dieser Fehler des SRM sowohl bei der Miata MX5 als auch bei der Miata GL behoben. @@ -3771,7 +3759,7 @@ cpu EV5 Um dieses Dokument zusammenzustellen, wurden viele Quellen genutzt; aber die wichtigste und wertvollste Quelle waren die - NetBSD Webseiten. + NetBSD Webseiten. Ohne NetBSD/alpha gäbe es kein &os;/alpha. Die folgenden Personen haben mich bei der Arbeit an diesem Modified: head/release/doc/de_DE.ISO8859-1/hardware/common/artheader.xml ============================================================================== --- head/release/doc/de_DE.ISO8859-1/hardware/common/artheader.xml Thu Nov 7 16:37:12 2013 (r257800) +++ head/release/doc/de_DE.ISO8859-1/hardware/common/artheader.xml Thu Nov 7 16:42:28 2013 (r257801) @@ -3,11 +3,10 @@ $FreeBSDde: de-docproj/relnotes/de_DE.ISO8859-1/hardware/common/artheader.xml,v 1.4 2003/01/09 12:14:47 ue Exp $ basiert auf: 1.4 --> +&os;/&arch; &release.current; Hardware Information + - - &os;/&arch; &release.current; Hardware Information - - The FreeBSD German Documentation Project + The FreeBSD German Documentation Project 2000 @@ -30,4 +29,12 @@ The FreeBSD German Documentation Project - + + + Dieser Artikel enthält eine kurze Anleitung für die + Installation von &os;/&arch; &release.current;, dabei wird + besonderen Wert auf den Bezug einer &os; gelegt. Außerdem + enthält er einige Tips zur Fehlersuche sowie Antworten zu + einigen häufig gestellten Fragen. + + Modified: head/release/doc/de_DE.ISO8859-1/hardware/common/dev.xml ============================================================================== --- head/release/doc/de_DE.ISO8859-1/hardware/common/dev.xml Thu Nov 7 16:37:12 2013 (r257800) +++ head/release/doc/de_DE.ISO8859-1/hardware/common/dev.xml Thu Nov 7 16:42:28 2013 (r257801) @@ -32,13 +32,12 @@ this file to fix "missed" conversions are likely to break the build. --> - - - + + Unterstützte Geräte $FreeBSD$ - + - Unterstützte Geräte + Dieses Kapitel enthält alle Geräte, die auf jeden Fall von &os; auf &arch; Systemen unterstützt werden. Andere @@ -1112,7 +1111,7 @@ - + Netzwerkkarten Adaptec Duralink PCI Fast Ethernet @@ -3710,7 +3709,7 @@ (&man.meteor.4; Treiber) - + USB Geräte &os; unterstützt viele verschiedene Arten von @@ -3724,8 +3723,7 @@ USB Netzwerkkarten finden Sie in einem eigenen Abschnitt - im Kapitel Netzwerkkarten. + im Kapitel Netzwerkkarten. @@ -4227,7 +4225,7 @@ - + IEEE 1394 (Firewire) Geräte Host Controller (&man.fwohci.4; @@ -4269,7 +4267,7 @@ - + Bluetooth Geräte PCCARD Host Kontroller (&man.ng.bt3c.4; @@ -4371,8 +4369,7 @@ Informationen über spezielle Grafikkarten und ihre Kompatibilität mit XFree86 - können Sie bei finden. + können Sie bei http://www.xfree86.org/ finden. @@ -4429,8 +4426,7 @@ In &man.moused.8; finden Sie weitere Informationen zur Nutzung von Mäusen in &os;. Informationen über die Nutzung von Mäusen in - XFree86 erhalten Sie bei . + XFree86 erhalten Sie bei http://www.xfree86.org/. @@ -4463,8 +4459,8 @@ Karten auf Basis des Xilinx XC6200, die mit dem - HOT1 von Virtual - Computers kompatibel sind (xrpu Treiber). + HOT1 von Virtual + Computers kompatibel sind (xrpu Treiber). Power Management Controller im NEC PC-98 Note (pmc Treiber) Modified: head/release/doc/de_DE.ISO8859-1/hardware/common/intro.xml ============================================================================== --- head/release/doc/de_DE.ISO8859-1/hardware/common/intro.xml Thu Nov 7 16:37:12 2013 (r257800) +++ head/release/doc/de_DE.ISO8859-1/hardware/common/intro.xml Thu Nov 7 16:42:28 2013 (r257801) @@ -3,8 +3,7 @@ $FreeBSDde: de-docproj/relnotes/de_DE.ISO8859-1/hardware/common/intro.xml,v 1.6 2003/05/24 21:35:15 ue Exp $ basiert auf: 1.6 --> - - + Einführung Dieses Dokument enthält die Liste der unterstützen @@ -24,7 +23,6 @@ Weitergehende Informationen über &os;/&arch; - finden Sie auf den Webseiten des &os;/&arch; - Project. + finden Sie auf den Webseiten des &os;/&arch; + Project. Modified: head/release/doc/de_DE.ISO8859-1/hardware/i386/article.xml ============================================================================== --- head/release/doc/de_DE.ISO8859-1/hardware/i386/article.xml Thu Nov 7 16:37:12 2013 (r257800) +++ head/release/doc/de_DE.ISO8859-1/hardware/i386/article.xml Thu Nov 7 16:42:28 2013 (r257801) @@ -1,6 +1,6 @@ - %release; %sections; @@ -10,14 +10,12 @@ ]> - - -
+
&artheader; §.intro; §.proc.i386; Modified: head/release/doc/de_DE.ISO8859-1/hardware/i386/proc-i386.xml ============================================================================== --- head/release/doc/de_DE.ISO8859-1/hardware/i386/proc-i386.xml Thu Nov 7 16:37:12 2013 (r257800) +++ head/release/doc/de_DE.ISO8859-1/hardware/i386/proc-i386.xml Thu Nov 7 16:42:28 2013 (r257801) @@ -3,8 +3,7 @@ $FreeBSDde: de-docproj/relnotes/de_DE.ISO8859-1/hardware/i386/proc-i386.xml,v 1.13 2003/05/24 21:49:22 ue Exp $ basiert auf: 1.11 --> - - + Unterstützte Prozessoren und Mainboards &os;/i386 kann auf vielen IBM PC kompatiblen @@ -107,10 +106,8 @@ Descriptor Table (DSDT), die vom BIOS bereitgestellt wird. Einige Systemen haben fehlerhafte oder unvollständige DSDTs, daher kann ACPI auf diesen Maschinen nicht korrekt funktionieren. - Korrigierte DSDTs für einige Maschinen sind im Bereich DSDT der - Webseiten des ACPI4Linux Projekts + Korrigierte DSDTs für einige Maschinen sind im Bereich DSDT der + Webseiten des ACPI4Linux Projekts verfügbar. &os; kann diese DSDTs an Stelle der vom BIOS bereitgestellten DSDT nutzen, weitere Informationen dazu finden Sie in der Onlinehilfe zu &man.acpi.4; Modified: head/release/doc/de_DE.ISO8859-1/hardware/ia64/article.xml ============================================================================== --- head/release/doc/de_DE.ISO8859-1/hardware/ia64/article.xml Thu Nov 7 16:37:12 2013 (r257800) +++ head/release/doc/de_DE.ISO8859-1/hardware/ia64/article.xml Thu Nov 7 16:42:28 2013 (r257801) @@ -1,6 +1,6 @@ - %release; %sections; @@ -10,25 +10,13 @@ ]> - - -
+
&artheader; - - - Dieses Dokument befindet sich noch in einem sehr frühen - Stadium. Die Angaben sind unvollständig und müssen - dringend erweitert werden. Wenn Sie Informationen über - &os; &arch.print; Prozessoren, Mainboards und andere Geräte - haben, die mit &os; funktionieren, senden Sie sie bitte an die - &a.ia64; Mailingliste. - - §.intro; §.proc.ia64; §.dev; Modified: head/release/doc/de_DE.ISO8859-1/hardware/ia64/proc-ia64.xml ============================================================================== --- head/release/doc/de_DE.ISO8859-1/hardware/ia64/proc-ia64.xml Thu Nov 7 16:37:12 2013 (r257800) +++ head/release/doc/de_DE.ISO8859-1/hardware/ia64/proc-ia64.xml Thu Nov 7 16:42:28 2013 (r257801) @@ -3,22 +3,19 @@ $FreeBSDde: de-docproj/relnotes/de_DE.ISO8859-1/hardware/ia64/proc-ia64.xml,v 1.5 2003/05/24 22:16:24 ue Exp $ basiert auf: 1.7 --> - + Unterstützte Prozessoren und Mainboards - Zur Zeit werden die Itanium - und Itanium - 2 Prozessoren unterstützt. Die folgenden + Zur Zeit werden die Itanium + und Itanium + 2 Prozessoren unterstützt. Die folgenden Mainboard-Chipsätze werden unterstützt: HP zx1 (nur auf dem Entwicklungszweig, weitere - Informationen finden Sie im Perforce - repository) + Informationen finden Sie im Perforce + repository) Modified: head/release/doc/de_DE.ISO8859-1/hardware/pc98/article.xml ============================================================================== --- head/release/doc/de_DE.ISO8859-1/hardware/pc98/article.xml Thu Nov 7 16:37:12 2013 (r257800) +++ head/release/doc/de_DE.ISO8859-1/hardware/pc98/article.xml Thu Nov 7 16:42:28 2013 (r257801) @@ -1,6 +1,6 @@ - %release; %sections; @@ -10,14 +10,12 @@ ]> - - -
+
&artheader; §.intro; §.proc.pc98; Modified: head/release/doc/de_DE.ISO8859-1/hardware/pc98/proc-pc98.xml ============================================================================== --- head/release/doc/de_DE.ISO8859-1/hardware/pc98/proc-pc98.xml Thu Nov 7 16:37:12 2013 (r257800) +++ head/release/doc/de_DE.ISO8859-1/hardware/pc98/proc-pc98.xml Thu Nov 7 16:42:28 2013 (r257801) @@ -3,8 +3,7 @@ $FreeBSDde: de-docproj/relnotes/de_DE.ISO8859-1/hardware/pc98/proc-pc98.xml,v 1.3 2003/01/13 20:30:49 ue Exp $ basiert auf: 1.4 --> - - + Unterstützte Systeme NEC PC-9801/9821 Systeme mit fast allen i386-kompatiblen Modified: head/release/doc/de_DE.ISO8859-1/hardware/sparc64/article.xml ============================================================================== --- head/release/doc/de_DE.ISO8859-1/hardware/sparc64/article.xml Thu Nov 7 16:37:12 2013 (r257800) +++ head/release/doc/de_DE.ISO8859-1/hardware/sparc64/article.xml Thu Nov 7 16:42:28 2013 (r257801) @@ -1,6 +1,6 @@ - %release; %sections; @@ -10,14 +10,12 @@ ]> - - -
+
&artheader; §.intro; §.proc.sparc64; Modified: head/release/doc/de_DE.ISO8859-1/hardware/sparc64/dev-sparc64.xml ============================================================================== --- head/release/doc/de_DE.ISO8859-1/hardware/sparc64/dev-sparc64.xml Thu Nov 7 16:37:12 2013 (r257800) +++ head/release/doc/de_DE.ISO8859-1/hardware/sparc64/dev-sparc64.xml Thu Nov 7 16:42:28 2013 (r257801) @@ -3,13 +3,12 @@ $Id: dev-sparc64.xml,v 1.4 2002/03/10 15:37:16 ue Exp $ basiert auf: 1.3 --> - - - + + Unterstützte Geräte $FreeBSD$ - + - Unterstützte Geräte + Dieses Kapitel enthält alle Geräte, die auf jeden Fall von &os; auf &arch; Systemen unterstützt werden. Andere @@ -50,13 +49,13 @@ - &man.ata.4;, atadisk, - atapicd (allerdings weder atapift + &man.ata.4;, atadisk, + atapicd (allerdings weder atapift noch atapist) - gem (Sun GEM/ERI Ethernet, ist + gem (Sun GEM/ERI Ethernet, ist in der Blade 100 eingebaut) @@ -150,7 +149,7 @@ Graphikkarten/Bildschirmspeicher, Tastatur (außer der indirekten Unterstützung im Textmodus durch den - ofw_console Treiber) + ofw_console Treiber) @@ -164,7 +163,7 @@ serielle Tastaturen (außer der indirekten Unterstützung durch den - ofw_console Treiber) + ofw_console Treiber) Modified: head/release/doc/de_DE.ISO8859-1/hardware/sparc64/proc-sparc64.xml ============================================================================== --- head/release/doc/de_DE.ISO8859-1/hardware/sparc64/proc-sparc64.xml Thu Nov 7 16:37:12 2013 (r257800) +++ head/release/doc/de_DE.ISO8859-1/hardware/sparc64/proc-sparc64.xml Thu Nov 7 16:42:28 2013 (r257801) @@ -3,15 +3,14 @@ $FreeBSDde: de-docproj/relnotes/de_DE.ISO8859-1/hardware/sparc64/proc-sparc64.xml,v 1.10 2003/02/08 07:43:14 ue Exp $ basiert auf: 1.11 --> - + Unterstützte Systeme In diesem Kapitel sind alle Systeme aufgeführt, von denen wir wissen, daß sie von &os; für &arch.print; unterstützt werden. Zusätzliche Informationen zu den - einzelnen Systemen finden Sie im Sun System - Handbook. + einzelnen Systemen finden Sie im Sun System + Handbook. SMP wird auf allen Systemen mit mehr als einem Prozessor unterstützt. Modified: head/release/doc/de_DE.ISO8859-1/installation/alpha/Makefile ============================================================================== --- head/release/doc/de_DE.ISO8859-1/installation/alpha/Makefile Thu Nov 7 16:37:12 2013 (r257800) +++ head/release/doc/de_DE.ISO8859-1/installation/alpha/Makefile Thu Nov 7 16:42:28 2013 (r257801) @@ -13,7 +13,6 @@ INSTALL_ONLY_COMPRESSED?= # SGML content SRCS+= article.xml SRCS+= ../common/artheader.xml -SRCS+= ../common/abstract.xml SRCS+= ../common/install.xml SRCS+= ../common/layout.xml SRCS+= ../common/trouble.xml Modified: head/release/doc/de_DE.ISO8859-1/installation/alpha/article.xml ============================================================================== --- head/release/doc/de_DE.ISO8859-1/installation/alpha/article.xml Thu Nov 7 16:37:12 2013 (r257800) +++ head/release/doc/de_DE.ISO8859-1/installation/alpha/article.xml Thu Nov 7 16:42:28 2013 (r257801) @@ -1,6 +1,6 @@ - %release; %sections; @@ -10,16 +10,13 @@ ]> - - -
+
&artheader; - &abstract; §.install; §.layout; §.upgrade; Modified: head/release/doc/de_DE.ISO8859-1/installation/common/abstract.xml ============================================================================== --- head/release/doc/de_DE.ISO8859-1/installation/common/abstract.xml Thu Nov 7 16:37:12 2013 (r257800) +++ head/release/doc/de_DE.ISO8859-1/installation/common/abstract.xml Thu Nov 7 16:42:28 2013 (r257801) @@ -4,8 +4,7 @@ $Id: abstract.xml,v 1.2 2002/03/10 15:37:17 ue Exp $ basiert auf: 1.2 --> - - + Dieser Artikel enthält eine kurze Anleitung für die Installation von &os;/&arch; &release.current;, dabei wird besonderen Wert auf den Bezug einer &os; gelegt. Außerdem Modified: head/release/doc/de_DE.ISO8859-1/installation/common/artheader.xml ============================================================================== --- head/release/doc/de_DE.ISO8859-1/installation/common/artheader.xml Thu Nov 7 16:37:12 2013 (r257800) +++ head/release/doc/de_DE.ISO8859-1/installation/common/artheader.xml Thu Nov 7 16:42:28 2013 (r257801) @@ -3,13 +3,12 @@ $FreeBSDde: de-docproj/relnotes/de_DE.ISO8859-1/installation/common/artheader.xml,v 1.3 2003/01/09 12:17:18 ue Exp $ basiert auf: 1.4 --> +&os;/&arch; &release.current; Installationsanleitung + - - &os;/&arch; &release.current; Installationsanleitung - - + The &os; Project - + 2000 @@ -24,4 +23,12 @@ 2003 The FreeBSD German Documentation Project - + + + Dieser Artikel enthält eine kurze Anleitung für die + Installation von &os;/&arch; &release.current;, dabei wird + besonderen Wert auf den Bezug einer &os; gelegt. Außerdem + enthält er einige Tips zur Fehlersuche sowie Antworten zu + einigen häufig gestellten Fragen. + + Modified: head/release/doc/de_DE.ISO8859-1/installation/common/install.ent ============================================================================== --- head/release/doc/de_DE.ISO8859-1/installation/common/install.ent Thu Nov 7 16:37:12 2013 (r257800) +++ head/release/doc/de_DE.ISO8859-1/installation/common/install.ent Thu Nov 7 16:42:28 2013 (r257801) @@ -12,7 +12,6 @@ - Modified: head/release/doc/de_DE.ISO8859-1/installation/common/install.xml ============================================================================== --- head/release/doc/de_DE.ISO8859-1/installation/common/install.xml Thu Nov 7 16:37:12 2013 (r257800) +++ head/release/doc/de_DE.ISO8859-1/installation/common/install.xml Thu Nov 7 16:42:28 2013 (r257801) @@ -10,18 +10,15 @@ This file has architecture-dependent ins from {alpha,i386}/INSTALL.TXT. --> - - + Wie installiere ich &os; In diesem Kapitel erfahren Sie, wie Sie &os; installieren. Der Schwerpunkt liegt dabei auf dem Bezug der &os; &release.current; Distribution und dem Start der Installation. Im - Kapitel Installing - FreeBSD des FreeBSD - Handbuch finden Sie genauere Informationen über das + Kapitel Installing + FreeBSD des FreeBSD + Handbuch finden Sie genauere Informationen über das Installationsprogramm, einschließlich einer ausführlichen, bebilderten Installationsleitung. @@ -29,7 +26,7 @@ from {alpha,i386}/INSTALL.TXT. wollen, sollten Sie , Aktualisierung von FreeBSD, lesen. - + Der Einstieg Bevor Sie mit der Installation beginnen, sollten Sie auf @@ -43,12 +40,10 @@ from {alpha,i386}/INSTALL.TXT. Dokumentation des Installationsprogramms zur Verfügung. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Thu Nov 7 16:58:10 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 266F2D16; Thu, 7 Nov 2013 16:58:10 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1363A2DC0; Thu, 7 Nov 2013 16:58:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA7Gw9Ni071859; Thu, 7 Nov 2013 16:58:09 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA7Gw9eN071858; Thu, 7 Nov 2013 16:58:09 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201311071658.rA7Gw9eN071858@svn.freebsd.org> From: Warner Losh Date: Thu, 7 Nov 2013 16:58:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257802 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Nov 2013 16:58:10 -0000 Author: imp Date: Thu Nov 7 16:58:09 2013 New Revision: 257802 URL: http://svnweb.freebsd.org/changeset/base/257802 Log: Save some space by noting we don't have any alternative instruction formats. Modified: head/share/man/man4/ddb.4 Modified: head/share/man/man4/ddb.4 ============================================================================== --- head/share/man/man4/ddb.4 Thu Nov 7 16:42:28 2013 (r257801) +++ head/share/man/man4/ddb.4 Thu Nov 7 16:58:09 2013 (r257802) @@ -251,19 +251,7 @@ The location is also displayed in hex at display as an instruction .It Cm I display as an instruction with possible alternate formats depending on the -machine: -.Bl -tag -width ".Tn powerpc" -compact -.It Tn amd64 -No alternate format. -.It Tn i386 -No alternate format. -.It Tn ia64 -No alternate format. -.It Tn powerpc -No alternate format. -.It Tn sparc64 -No alternate format. -.El +machine, but none of the supported architectures have an alternate format. .It Cm S display a symbol name for the pointer stored at the address .El From owner-svn-src-head@FreeBSD.ORG Thu Nov 7 17:08:09 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B6C355BE; Thu, 7 Nov 2013 17:08:09 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A42C22E75; Thu, 7 Nov 2013 17:08:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA7H89V7075504; Thu, 7 Nov 2013 17:08:09 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA7H89wZ075503; Thu, 7 Nov 2013 17:08:09 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201311071708.rA7H89wZ075503@svn.freebsd.org> From: Michael Tuexen Date: Thu, 7 Nov 2013 17:08:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257803 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Nov 2013 17:08:09 -0000 Author: tuexen Date: Thu Nov 7 17:08:09 2013 New Revision: 257803 URL: http://svnweb.freebsd.org/changeset/base/257803 Log: Make sure that we don't try to build an ASCONF-ACK chunk larger than what fits in the the mbuf cluster. This issue was reported by Andrew Galante. MFC after: 3 days Modified: head/sys/netinet/sctp_asconf.c Modified: head/sys/netinet/sctp_asconf.c ============================================================================== --- head/sys/netinet/sctp_asconf.c Thu Nov 7 16:58:09 2013 (r257802) +++ head/sys/netinet/sctp_asconf.c Thu Nov 7 17:08:09 2013 (r257803) @@ -2616,7 +2616,8 @@ sctp_compose_asconf(struct sctp_tcb *stc /* get the parameter length */ p_length = SCTP_SIZE32(aa->ap.aph.ph.param_length); /* will it fit in current chunk? */ - if (SCTP_BUF_LEN(m_asconf) + p_length > stcb->asoc.smallest_mtu) { + if ((SCTP_BUF_LEN(m_asconf) + p_length > stcb->asoc.smallest_mtu) || + (SCTP_BUF_LEN(m_asconf) + p_length > MCLBYTES)) { /* won't fit, so we're done with this chunk */ break; } From owner-svn-src-head@FreeBSD.ORG Thu Nov 7 18:50:12 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B0C7BB70; Thu, 7 Nov 2013 18:50:12 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 84A782505; Thu, 7 Nov 2013 18:50:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA7IoCqA009613; Thu, 7 Nov 2013 18:50:12 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA7IoCiK009611; Thu, 7 Nov 2013 18:50:12 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201311071850.rA7IoCiK009611@svn.freebsd.org> From: Michael Tuexen Date: Thu, 7 Nov 2013 18:50:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257804 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Nov 2013 18:50:12 -0000 Author: tuexen Date: Thu Nov 7 18:50:11 2013 New Revision: 257804 URL: http://svnweb.freebsd.org/changeset/base/257804 Log: Get rid of the artification limitation enforced by SCTP_AUTH_RANDOM_SIZE_MAX. This was suggested by Andrew Galante. MFC after: 3 days Modified: head/sys/netinet/sctp_auth.c head/sys/netinet/sctp_auth.h Modified: head/sys/netinet/sctp_auth.c ============================================================================== --- head/sys/netinet/sctp_auth.c Thu Nov 7 17:08:09 2013 (r257803) +++ head/sys/netinet/sctp_auth.c Thu Nov 7 18:50:11 2013 (r257804) @@ -333,10 +333,6 @@ sctp_generate_random_key(uint32_t keylen { sctp_key_t *new_key; - /* validate keylen */ - if (keylen > SCTP_AUTH_RANDOM_SIZE_MAX) - keylen = SCTP_AUTH_RANDOM_SIZE_MAX; - new_key = sctp_alloc_key(keylen); if (new_key == NULL) { /* out of memory */ @@ -374,7 +370,7 @@ sctp_compare_key(sctp_key_t * key1, sctp uint32_t i; uint32_t key1len, key2len; uint8_t *key_1, *key_2; - uint8_t temp[SCTP_AUTH_RANDOM_SIZE_MAX]; + uint8_t val1, val2; /* sanity/length check */ key1len = sctp_get_keylen(key1); @@ -386,38 +382,24 @@ sctp_compare_key(sctp_key_t * key1, sctp else if (key2len == 0) return (1); - if (key1len != key2len) { - if (key1len >= key2len) - maxlen = key1len; - else - maxlen = key2len; - bzero(temp, maxlen); - if (key1len < maxlen) { - /* prepend zeroes to key1 */ - bcopy(key1->key, temp + (maxlen - key1len), key1len); - key_1 = temp; - key_2 = key2->key; - } else { - /* prepend zeroes to key2 */ - bcopy(key2->key, temp + (maxlen - key2len), key2len); - key_1 = key1->key; - key_2 = temp; - } + if (key1len < key2len) { + maxlen = key2len; } else { maxlen = key1len; - key_1 = key1->key; - key_2 = key2->key; } - + key_1 = key1->key; + key_2 = key2->key; + /* check for numeric equality */ for (i = 0; i < maxlen; i++) { - if (*key_1 > *key_2) + /* left-pad with zeros */ + val1 = (i < (maxlen - key1len)) ? 0 : *(key_1++); + val2 = (i < (maxlen - key2len)) ? 0 : *(key_2++); + if (val1 > val2) { return (1); - else if (*key_1 < *key_2) + } else if (val1 < val2) { return (-1); - key_1++; - key_2++; + } } - /* keys are equal value, so check lengths */ if (key1len == key2len) return (0); Modified: head/sys/netinet/sctp_auth.h ============================================================================== --- head/sys/netinet/sctp_auth.h Thu Nov 7 17:08:09 2013 (r257803) +++ head/sys/netinet/sctp_auth.h Thu Nov 7 18:50:11 2013 (r257804) @@ -46,7 +46,6 @@ __FBSDID("$FreeBSD$"); /* random sizes */ #define SCTP_AUTH_RANDOM_SIZE_DEFAULT 32 #define SCTP_AUTH_RANDOM_SIZE_REQUIRED 32 -#define SCTP_AUTH_RANDOM_SIZE_MAX 256 /* union of all supported HMAC algorithm contexts */ typedef union sctp_hash_context { From owner-svn-src-head@FreeBSD.ORG Thu Nov 7 18:53:56 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B2878D69; Thu, 7 Nov 2013 18:53:56 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 85F1E256B; Thu, 7 Nov 2013 18:53:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA7IruYF011893; Thu, 7 Nov 2013 18:53:56 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA7Irujx011892; Thu, 7 Nov 2013 18:53:56 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201311071853.rA7Irujx011892@svn.freebsd.org> From: Glen Barber Date: Thu, 7 Nov 2013 18:53:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257805 - head/release X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Nov 2013 18:53:56 -0000 Author: gjb Date: Thu Nov 7 18:53:55 2013 New Revision: 257805 URL: http://svnweb.freebsd.org/changeset/base/257805 Log: Add a 'mini-memstick.img' release target, which will use the 'bootonly.iso' components to create a smaller memory stick image. This is useful for system recovery, where a full memstick.img image is not necessarily needed (or wanted). In addition, it is possible to do bootonly-style installation, where the base.txz, kernel.txz, etc. are fetched from a remote source. Provide backwards-compatible target (mini-memstick), to keep in sync with the targets documented in release/Makefile. Prompted by: wblock MFC after: 1 week X-MFC-after: 10.0-RELEASE Sponsored by: The FreeBSD Foundation Modified: head/release/Makefile Modified: head/release/Makefile ============================================================================== --- head/release/Makefile Thu Nov 7 18:50:11 2013 (r257804) +++ head/release/Makefile Thu Nov 7 18:53:55 2013 (r257805) @@ -5,6 +5,7 @@ # User-driven targets: # cdrom: Builds release CD-ROM media (disc1.iso) # memstick: Builds memory stick image (memstick.img) +# mini-memstick: Builds minimal memory stick image (mini-memstick.img) # ftp: Sets up FTP distribution area (ftp) # release: Build all media and FTP distribution area # install: Copies all release media into ${DESTDIR} @@ -74,7 +75,9 @@ IMAGES+= disc1.iso bootonly.iso .endif .if exists(${.CURDIR}/${TARGET}/make-memstick.sh) RELEASE_TARGETS+= memstick.img +RELEASE_TARGETS+= mini-memstick.img IMAGES+= memstick.img +IMAGES+= mini-memstick.img .endif .include @@ -168,10 +171,14 @@ disc1.iso: system bootonly.iso: bootonly sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b FreeBSD_Install ${.TARGET} bootonly -memstick: memstick.img +memstick: memstick.img mini-memstick.img memstick.img: system sh ${.CURDIR}/${TARGET}/make-memstick.sh release ${.TARGET} +mini-memstick: mini-memstick.img +mini-memstick.img: system + sh ${.CURDIR}/${TARGET}/make-memstick.sh bootonly ${.TARGET} + packagesystem: base.txz kernel.txz ${EXTRA_PACKAGES} sh ${.CURDIR}/scripts/make-manifest.sh *.txz > MANIFEST touch ${.TARGET} From owner-svn-src-head@FreeBSD.ORG Thu Nov 7 18:59:06 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 958C9F24; Thu, 7 Nov 2013 18:59:06 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 836FD2598; Thu, 7 Nov 2013 18:59:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA7Ix6ZX012545; Thu, 7 Nov 2013 18:59:06 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA7Ix6pZ012544; Thu, 7 Nov 2013 18:59:06 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201311071859.rA7Ix6pZ012544@svn.freebsd.org> From: Glen Barber Date: Thu, 7 Nov 2013 18:59:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257806 - head/release X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Nov 2013 18:59:06 -0000 Author: gjb Date: Thu Nov 7 18:59:06 2013 New Revision: 257806 URL: http://svnweb.freebsd.org/changeset/base/257806 Log: Remove extra target from 'memstick' that I forgot to remove before previous commit. MFC after: 1 week X-MFC-After: 10.0-RELEASE X-MFC-With: r257805 Sponsored by: The FreeBSD Foundation Modified: head/release/Makefile Modified: head/release/Makefile ============================================================================== --- head/release/Makefile Thu Nov 7 18:53:55 2013 (r257805) +++ head/release/Makefile Thu Nov 7 18:59:06 2013 (r257806) @@ -171,7 +171,7 @@ disc1.iso: system bootonly.iso: bootonly sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b FreeBSD_Install ${.TARGET} bootonly -memstick: memstick.img mini-memstick.img +memstick: memstick.img memstick.img: system sh ${.CURDIR}/${TARGET}/make-memstick.sh release ${.TARGET} From owner-svn-src-head@FreeBSD.ORG Thu Nov 7 19:03:40 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 2508129A; Thu, 7 Nov 2013 19:03:40 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from mail0.glenbarber.us (mail0.glenbarber.us [208.86.227.67]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EF9C925FE; Thu, 7 Nov 2013 19:03:39 +0000 (UTC) Received: from glenbarber.us (70.15.88.86.res-cmts.sewb.ptd.net [70.15.88.86]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: gjb) by mail0.glenbarber.us (Postfix) with ESMTPSA id D5BA012358; Thu, 7 Nov 2013 19:03:37 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.8.3 mail0.glenbarber.us D5BA012358 Authentication-Results: mail0.glenbarber.us; dkim=none reason="no signature"; dkim-adsp=none Date: Thu, 7 Nov 2013 14:03:35 -0500 From: Glen Barber To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r257805 - head/release Message-ID: <20131107190335.GD89594@glenbarber.us> References: <201311071853.rA7Irujx011892@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="n/aVsWSeQ4JHkrmm" Content-Disposition: inline In-Reply-To: <201311071853.rA7Irujx011892@svn.freebsd.org> X-Operating-System: FreeBSD 11.0-CURRENT amd64 User-Agent: Mutt/1.5.22 (2013-10-16) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Nov 2013 19:03:40 -0000 --n/aVsWSeQ4JHkrmm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Nov 07, 2013 at 06:53:56PM +0000, Glen Barber wrote: > Log: > Add a 'mini-memstick.img' release target, which will use the > 'bootonly.iso' components to create a smaller memory stick image. > =20 > This is useful for system recovery, where a full memstick.img image > is not necessarily needed (or wanted). In addition, it is possible to > do bootonly-style installation, where the base.txz, kernel.txz, etc. > are fetched from a remote source. > =20 Test builds (with NOPORTS=3D1 NOSRC=3D1 NODOC=3D1 set) provide quite a significant reduction in file size, compared to the memstick.img. FreeBSD-11.0-CURRENT-amd64-memstick.img - 570M FreeBSD-11.0-CURRENT-amd64-mini-memstick.img - 221M Glen --n/aVsWSeQ4JHkrmm Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQIcBAEBCAAGBQJSe+QHAAoJELls3eqvi17Q1dkP/3EVeLPMKXTLqgEs/mbZhGd1 f+CbQ6fphftC4aN5lG6Eh/m0+y8sdW5IJVQS542S+4+NK2pw2J6W9BYmA+EAbicV EE+SEIcA14GsXd/MI8em1P4Ztqpf/X1mh/dEi2QM/DaNWrqeDv+C0vnjOku18dgJ zMjB4alPQi32Dkj783xWeCZwMUJgNsxIFaZbh3xH0LQJTAqYO3t3yHRKRQurU7+E lkJOET3UVLnOfrgiKe1YpkxExFCAKnuKGt7KDObnjwyLlEZxzYNxCzF14JXQjoO9 4taCMwmRGDY4YYyOTq0lgAFU/UMW1lic8XtgcdgMJgQQREm4Ve27w7u2cgCwqhyx QDy7UdsXoTH57b/dmlswnQG/oBw/Zr+OhKhC75XSrUAUTTcIoEgeG1goSqvTFe0S uC08eNYESPdR1Wix89l1kDSeihfqt4JxgDYtvozpNqgiXTRNQhSl0nyPPsxeOJRQ TNmjOVaqRPAyDH2Dq9TdWKaFRtSuCNu1A4QuhPCfcCH6vjwIxZHcB9VTKFXpU/2R nB550iH5j2vI+dGAgBVkZbgah8yVOEH8Bpj2KPifEc3rvqUDCpgu60p/wM0JdaKQ thyAun8aIh8OQFmdlKsN10aCixy0VU8Iv0NeZ3K7eRFxKaeMHugpxwFoZliY+5Gs Cumt0imd/NaKbwYWkbfe =B+7f -----END PGP SIGNATURE----- --n/aVsWSeQ4JHkrmm-- From owner-svn-src-head@FreeBSD.ORG Thu Nov 7 19:17:18 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 52D538BC; Thu, 7 Nov 2013 19:17:18 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3F8B526E1; Thu, 7 Nov 2013 19:17:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA7JHIDH019501; Thu, 7 Nov 2013 19:17:18 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA7JHIph019500; Thu, 7 Nov 2013 19:17:18 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201311071917.rA7JHIph019500@svn.freebsd.org> From: Glen Barber Date: Thu, 7 Nov 2013 19:17:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257807 - head/share/man/man7 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Nov 2013 19:17:18 -0000 Author: gjb Date: Thu Nov 7 19:17:17 2013 New Revision: 257807 URL: http://svnweb.freebsd.org/changeset/base/257807 Log: Update release(7) to include 'mini-memstick' after r257805. MFC after: 1 week X-MFC-After: 10.0-RELEASE X-MFC-With: r257805, r257806 Sponsored by: The FreeBSD Foundation Modified: head/share/man/man7/release.7 Modified: head/share/man/man7/release.7 ============================================================================== --- head/share/man/man7/release.7 Thu Nov 7 18:59:06 2013 (r257806) +++ head/share/man/man7/release.7 Thu Nov 7 19:17:17 2013 (r257807) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 14, 2013 +.Dd November 7, 2013 .Dt RELEASE 7 .Os .Sh NAME @@ -279,6 +279,11 @@ Requires that the .Pq memory disk device driver be present in the kernel .Pq either by being compiled in or available as a module . +.It Cm mini-memstick +Similar to +.Cm memstick , +with the exception that the installation distribution sets +are not included. .It Cm ftp Creates a directory named .Pa ftp From owner-svn-src-head@FreeBSD.ORG Thu Nov 7 19:38:20 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 0710DFC7; Thu, 7 Nov 2013 19:38:20 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E91722840; Thu, 7 Nov 2013 19:38:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA7JcJUT026041; Thu, 7 Nov 2013 19:38:19 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA7JcJnR026040; Thu, 7 Nov 2013 19:38:19 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201311071938.rA7JcJnR026040@svn.freebsd.org> From: Sean Bruno Date: Thu, 7 Nov 2013 19:38:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257808 - head/sys/dev/uart X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Nov 2013 19:38:20 -0000 Author: sbruno Date: Thu Nov 7 19:38:19 2013 New Revision: 257808 URL: http://svnweb.freebsd.org/changeset/base/257808 Log: Add new AMT serial port PCI ID on Intel Lynx Point chipset Submitted by: Dmitry Luhtionov MFC after: 2 weeks Modified: head/sys/dev/uart/uart_bus_pci.c Modified: head/sys/dev/uart/uart_bus_pci.c ============================================================================== --- head/sys/dev/uart/uart_bus_pci.c Thu Nov 7 19:17:17 2013 (r257807) +++ head/sys/dev/uart/uart_bus_pci.c Thu Nov 7 19:38:19 2013 (r257808) @@ -122,6 +122,7 @@ static const struct pci_id pci_ns8250_id { 0x8086, 0x8812, 0xffff, 0, "Intel EG20T Serial Port 1", 0x10 }, { 0x8086, 0x8813, 0xffff, 0, "Intel EG20T Serial Port 2", 0x10 }, { 0x8086, 0x8814, 0xffff, 0, "Intel EG20T Serial Port 3", 0x10 }, +{ 0x8086, 0x8c3d, 0xffff, 0, "Intel Lynx Point KT Controller", 0x10 }, { 0x9710, 0x9820, 0x1000, 1, "NetMos NM9820 Serial Port", 0x10 }, { 0x9710, 0x9835, 0x1000, 1, "NetMos NM9835 Serial Port", 0x10 }, { 0x9710, 0x9865, 0xa000, 0x1000, "NetMos NM9865 Serial Port", 0x10 }, From owner-svn-src-head@FreeBSD.ORG Thu Nov 7 19:40:53 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 3B83C3D3; Thu, 7 Nov 2013 19:40:53 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2959D289A; Thu, 7 Nov 2013 19:40:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA7Jer5G028363; Thu, 7 Nov 2013 19:40:53 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA7Jerkm028362; Thu, 7 Nov 2013 19:40:53 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201311071940.rA7Jerkm028362@svn.freebsd.org> From: Adrian Chadd Date: Thu, 7 Nov 2013 19:40:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257809 - head/sys/modules/iwnfw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Nov 2013 19:40:53 -0000 Author: adrian Date: Thu Nov 7 19:40:52 2013 New Revision: 257809 URL: http://svnweb.freebsd.org/changeset/base/257809 Log: Build the iwn2000 firmware too. Modified: head/sys/modules/iwnfw/Makefile Modified: head/sys/modules/iwnfw/Makefile ============================================================================== --- head/sys/modules/iwnfw/Makefile Thu Nov 7 19:38:19 2013 (r257808) +++ head/sys/modules/iwnfw/Makefile Thu Nov 7 19:40:52 2013 (r257809) @@ -1,5 +1,5 @@ # $FreeBSD$ -SUBDIR= iwn1000 iwn4965 iwn5000 iwn5150 iwn6000 iwn6000g2a iwn6000g2b iwn6050 iwn2030 +SUBDIR= iwn1000 iwn4965 iwn5000 iwn5150 iwn6000 iwn6000g2a iwn6000g2b iwn6050 iwn2000 iwn2030 .include From owner-svn-src-head@FreeBSD.ORG Thu Nov 7 19:58:05 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 5C2F1AB9; Thu, 7 Nov 2013 19:58:05 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mho-01-ewr.mailhop.org (mho-03-ewr.mailhop.org [204.13.248.66]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1ED362989; Thu, 7 Nov 2013 19:58:04 +0000 (UTC) Received: from c-24-8-230-52.hsd1.co.comcast.net ([24.8.230.52] helo=damnhippie.dyndns.org) by mho-01-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1VeViN-000Ni4-PA; Thu, 07 Nov 2013 19:58:03 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by damnhippie.dyndns.org (8.14.3/8.14.3) with ESMTP id rA7Jw1k8065206; Thu, 7 Nov 2013 12:58:01 -0700 (MST) (envelope-from ian@FreeBSD.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 24.8.230.52 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX18DoOmhL0K2dX8vc/v0hJiE Subject: Re: svn commit: r257770 - head/lib/msun/src From: Ian Lepore To: Steve Kargl In-Reply-To: <201311062344.rA6Niqkf001246@svn.freebsd.org> References: <201311062344.rA6Niqkf001246@svn.freebsd.org> Content-Type: text/plain; charset="us-ascii" Date: Thu, 07 Nov 2013 12:58:01 -0700 Message-ID: <1383854281.31172.214.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Nov 2013 19:58:05 -0000 On Wed, 2013-11-06 at 23:44 +0000, Steve Kargl wrote: > Author: kargl > Date: Wed Nov 6 23:44:52 2013 > New Revision: 257770 > URL: http://svnweb.freebsd.org/changeset/base/257770 > > Log: > * Use "math.h" instead of . > * Use bit twiddling. This requires inclusion of math_private.h > and inclusion of float.h in s_roundl.c. Raise invalid exception. > * Use literal integer constants where possible. Let the compiler > do the appropriate conversion. > * In s_roundf.c, use an F suffix on float constants instead of > promoting float to double and then converting the result back > to float. In s_roundl.c, use an L suffix. > * In s_roundl.c, use the ENTERI and RETURNI macros. This requires > the inclusion of fpmath.h and on __i386__ class hardware ieeefp.h. > > Reviewed by: bde > > Modified: > head/lib/msun/src/s_round.c > head/lib/msun/src/s_roundf.c > head/lib/msun/src/s_roundl.c > [snip] FYI, this seems to be causing build failures on non-x86 platforms. For example... ===> lib/msun (obj,depend,all,install) cc -fpic -DPIC -O -pipe -I/local/build/staging/freebsd/bb/src/lib/msun/src -I/local/build/staging/freebsd/bb/src/lib/msun/../libc/include -I/local/build/staging/freebsd/bb/src/lib/msun/../libc/arm -std=gnu99 -Qunused-arguments -Wsystem-headers -Werror -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-conversion -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter -Wno-parentheses -c /local/build/staging/freebsd/bb/src/lib/msun/src/s_roundl.c -o s_roundl.So /local/build/staging/freebsd/bb/src/lib/msun/src/s_roundl.c:45:2: error: no member named 'xbits' in 'union IEEEl2bits'; did you mean 'bits'? GET_LDBL_EXPSIGN(hx, x); ^ /local/build/staging/freebsd/bb/src/lib/msun/src/math_private.h:224:14: note: expanded from macro 'GET_LDBL_EXPSIGN' (i) = ge_u.xbits.expsign; \ ^ /local/build/staging/freebsd/bb/src/lib/msun/../libc/arm/_fpmath.h:54:4: note: 'bits' declared here } bits; ^ /local/build/staging/freebsd/bb/src/lib/msun/src/s_roundl.c:45:2: error: no member named 'expsign' in 'struct IEEEl2bits::' GET_LDBL_EXPSIGN(hx, x); ^~~~~~~~~~~~~~~~~~~~~~~ /local/build/staging/freebsd/bb/src/lib/msun/src/math_private.h:224:20: note: expanded from macro 'GET_LDBL_EXPSIGN' (i) = ge_u.xbits.expsign; \ ~~~~~~~~~~ ^ 2 errors generated. *** [s_roundl.So] Error code 1 bmake[3]: stopped in /local/build/staging/freebsd/bb/src/lib/msun cc -O -pipe -I/local/build/staging/freebsd/bb/src/lib/msun/src -I/local/build/staging/freebsd/bb/src/lib/msun/../libc/include -I/local/build/staging/freebsd/bb/src/lib/msun/../libc/arm -std=gnu99 -Qunused-arguments -Wsystem-headers -Werror -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-conversion -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter -Wno-parentheses -c /local/build/staging/freebsd/bb/src/lib/msun/src/s_roundl.c -o s_roundl.o /local/build/staging/freebsd/bb/src/lib/msun/src/s_roundl.c:45:2: error: no member named 'xbits' in 'union IEEEl2bits'; did you mean 'bits'? GET_LDBL_EXPSIGN(hx, x); ^ /local/build/staging/freebsd/bb/src/lib/msun/src/math_private.h:224:14: note: expanded from macro 'GET_LDBL_EXPSIGN' (i) = ge_u.xbits.expsign; \ ^ /local/build/staging/freebsd/bb/src/lib/msun/../libc/arm/_fpmath.h:54:4: note: 'bits' declared here } bits; ^ /local/build/staging/freebsd/bb/src/lib/msun/src/s_roundl.c:45:2: error: no member named 'expsign' in 'struct IEEEl2bits::' GET_LDBL_EXPSIGN(hx, x); ^~~~~~~~~~~~~~~~~~~~~~~ /local/build/staging/freebsd/bb/src/lib/msun/src/math_private.h:224:20: note: expanded from macro 'GET_LDBL_EXPSIGN' (i) = ge_u.xbits.expsign; \ ~~~~~~~~~~ ^ 2 errors generated. *** [s_roundl.o] Error code 1 bmake[3]: stopped in /local/build/staging/freebsd/bb/src/lib/msun -- Ian From owner-svn-src-head@FreeBSD.ORG Thu Nov 7 20:19:47 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 055F4472; Thu, 7 Nov 2013 20:19:47 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BE2F02B1B; Thu, 7 Nov 2013 20:19:46 +0000 (UTC) Received: from troutmask.apl.washington.edu (localhost.apl.washington.edu [127.0.0.1]) by troutmask.apl.washington.edu (8.14.7/8.14.7) with ESMTP id rA7KJkao059034; Thu, 7 Nov 2013 12:19:46 -0800 (PST) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.14.7/8.14.7/Submit) id rA7KJkaJ059033; Thu, 7 Nov 2013 12:19:46 -0800 (PST) (envelope-from sgk) Date: Thu, 7 Nov 2013 12:19:46 -0800 From: Steve Kargl To: Ian Lepore Subject: Re: svn commit: r257770 - head/lib/msun/src Message-ID: <20131107201946.GA58797@troutmask.apl.washington.edu> References: <201311062344.rA6Niqkf001246@svn.freebsd.org> <1383854281.31172.214.camel@revolution.hippie.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1383854281.31172.214.camel@revolution.hippie.lan> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Steve Kargl X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Nov 2013 20:19:47 -0000 On Thu, Nov 07, 2013 at 12:58:01PM -0700, Ian Lepore wrote: > On Wed, 2013-11-06 at 23:44 +0000, Steve Kargl wrote: > > Author: kargl > > Date: Wed Nov 6 23:44:52 2013 > > New Revision: 257770 > > URL: http://svnweb.freebsd.org/changeset/base/257770 > > > > Log: > > * Use "math.h" instead of . > > * Use bit twiddling. This requires inclusion of math_private.h > > and inclusion of float.h in s_roundl.c. Raise invalid exception. > > * Use literal integer constants where possible. Let the compiler > > do the appropriate conversion. > > * In s_roundf.c, use an F suffix on float constants instead of > > promoting float to double and then converting the result back > > to float. In s_roundl.c, use an L suffix. > > * In s_roundl.c, use the ENTERI and RETURNI macros. This requires > > the inclusion of fpmath.h and on __i386__ class hardware ieeefp.h. > > > > Reviewed by: bde > > > > Modified: > > head/lib/msun/src/s_round.c > > head/lib/msun/src/s_roundf.c > > head/lib/msun/src/s_roundl.c > > [snip] > > FYI, this seems to be causing build failures on non-x86 platforms. For > example... > > ===> lib/msun (obj,depend,all,install) > cc -fpic -DPIC -O -pipe -I/local/build/staging/freebsd/bb/src/lib/msun/src -I/local/build/staging/freebsd/bb/src/lib/msun/../libc/include -I/local/build/staging/freebsd/bb/src/lib/msun/../libc/arm -std=gnu99 -Qunused-arguments -Wsystem-headers -Werror -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-conversion -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter -Wno-parentheses -c /local/build/staging/freebsd/bb/src/lib/msun/src/s_roundl.c -o s_roundl.So > /local/build/staging/freebsd/bb/src/lib/msun/src/s_roundl.c:45:2: error: no member named 'xbits' in 'union IEEEl2bits'; did you mean 'bits'? > GET_LDBL_EXPSIGN(hx, x); > ^ > /local/build/staging/freebsd/bb/src/lib/msun/src/math_private.h:224:14: note: expanded from macro 'GET_LDBL_EXPSIGN' > (i) = ge_u.xbits.expsign; \ > ^ > /local/build/staging/freebsd/bb/src/lib/msun/../libc/arm/_fpmath.h:54:4: note: 'bits' declared here > } bits; I zero about floating-point on arm. Does long double have 64, 80, or 113-bit significands? -- Steve From owner-svn-src-head@FreeBSD.ORG Thu Nov 7 20:30:26 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 24242B29; Thu, 7 Nov 2013 20:30:26 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mho-01-ewr.mailhop.org (mho-03-ewr.mailhop.org [204.13.248.66]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EB7C42BDE; Thu, 7 Nov 2013 20:30:25 +0000 (UTC) Received: from c-24-8-230-52.hsd1.co.comcast.net ([24.8.230.52] helo=damnhippie.dyndns.org) by mho-01-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1VeWDg-0000AF-QI; Thu, 07 Nov 2013 20:30:24 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by damnhippie.dyndns.org (8.14.3/8.14.3) with ESMTP id rA7KULLB065242; Thu, 7 Nov 2013 13:30:22 -0700 (MST) (envelope-from ian@FreeBSD.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 24.8.230.52 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX1+loCIf6Efyjo9HUP0ALqEy Subject: Re: svn commit: r257770 - head/lib/msun/src From: Ian Lepore To: Steve Kargl In-Reply-To: <20131107201946.GA58797@troutmask.apl.washington.edu> References: <201311062344.rA6Niqkf001246@svn.freebsd.org> <1383854281.31172.214.camel@revolution.hippie.lan> <20131107201946.GA58797@troutmask.apl.washington.edu> Content-Type: text/plain; charset="us-ascii" Date: Thu, 07 Nov 2013 13:30:21 -0700 Message-ID: <1383856221.31172.226.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Steve Kargl X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Nov 2013 20:30:26 -0000 On Thu, 2013-11-07 at 12:19 -0800, Steve Kargl wrote: > On Thu, Nov 07, 2013 at 12:58:01PM -0700, Ian Lepore wrote: > > On Wed, 2013-11-06 at 23:44 +0000, Steve Kargl wrote: > > > Author: kargl > > > Date: Wed Nov 6 23:44:52 2013 > > > New Revision: 257770 > > > URL: http://svnweb.freebsd.org/changeset/base/257770 > > > > > > Log: > > > * Use "math.h" instead of . > > > * Use bit twiddling. This requires inclusion of math_private.h > > > and inclusion of float.h in s_roundl.c. Raise invalid exception. > > > * Use literal integer constants where possible. Let the compiler > > > do the appropriate conversion. > > > * In s_roundf.c, use an F suffix on float constants instead of > > > promoting float to double and then converting the result back > > > to float. In s_roundl.c, use an L suffix. > > > * In s_roundl.c, use the ENTERI and RETURNI macros. This requires > > > the inclusion of fpmath.h and on __i386__ class hardware ieeefp.h. > > > > > > Reviewed by: bde > > > > > > Modified: > > > head/lib/msun/src/s_round.c > > > head/lib/msun/src/s_roundf.c > > > head/lib/msun/src/s_roundl.c > > > [snip] > > > > FYI, this seems to be causing build failures on non-x86 platforms. For > > example... > > > > ===> lib/msun (obj,depend,all,install) > > cc -fpic -DPIC -O -pipe -I/local/build/staging/freebsd/bb/src/lib/msun/src -I/local/build/staging/freebsd/bb/src/lib/msun/../libc/include -I/local/build/staging/freebsd/bb/src/lib/msun/../libc/arm -std=gnu99 -Qunused-arguments -Wsystem-headers -Werror -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-conversion -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter -Wno-parentheses -c /local/build/staging/freebsd/bb/src/lib/msun/src/s_roundl.c -o s_roundl.So > > /local/build/staging/freebsd/bb/src/lib/msun/src/s_roundl.c:45:2: error: no member named 'xbits' in 'union IEEEl2bits'; did you mean 'bits'? > > GET_LDBL_EXPSIGN(hx, x); > > ^ > > /local/build/staging/freebsd/bb/src/lib/msun/src/math_private.h:224:14: note: expanded from macro 'GET_LDBL_EXPSIGN' > > (i) = ge_u.xbits.expsign; \ > > ^ > > /local/build/staging/freebsd/bb/src/lib/msun/../libc/arm/_fpmath.h:54:4: note: 'bits' declared here > > } bits; > > I zero about floating-point on arm. Does long double have > 64, 80, or 113-bit significands? > I don't know either (for some reason I'm thinking long double is synonym for double on arm, but I can't remember why I think that). This compile failure isn't just arm, btw, it's also powerpc and mips. sparc and x86 seem to be okay. -- Ian From owner-svn-src-head@FreeBSD.ORG Thu Nov 7 20:34:38 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C9424DD5; Thu, 7 Nov 2013 20:34:38 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A62CC2C31; Thu, 7 Nov 2013 20:34:38 +0000 (UTC) Received: from troutmask.apl.washington.edu (localhost.apl.washington.edu [127.0.0.1]) by troutmask.apl.washington.edu (8.14.7/8.14.7) with ESMTP id rA7KYbjC060798; Thu, 7 Nov 2013 12:34:37 -0800 (PST) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.14.7/8.14.7/Submit) id rA7KYbTj060797; Thu, 7 Nov 2013 12:34:37 -0800 (PST) (envelope-from sgk) Date: Thu, 7 Nov 2013 12:34:37 -0800 From: Steve Kargl To: Ian Lepore Subject: Re: svn commit: r257770 - head/lib/msun/src Message-ID: <20131107203437.GA60686@troutmask.apl.washington.edu> References: <201311062344.rA6Niqkf001246@svn.freebsd.org> <1383854281.31172.214.camel@revolution.hippie.lan> <20131107201946.GA58797@troutmask.apl.washington.edu> <1383856221.31172.226.camel@revolution.hippie.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1383856221.31172.226.camel@revolution.hippie.lan> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Steve Kargl X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Nov 2013 20:34:38 -0000 On Thu, Nov 07, 2013 at 01:30:21PM -0700, Ian Lepore wrote: > > > > I zero about floating-point on arm. Does long double have I know ... > > 64, 80, or 113-bit significands? > > > > I don't know either (for some reason I'm thinking long double is synonym > for double on arm, but I can't remember why I think that). > > This compile failure isn't just arm, btw, it's also powerpc and mips. > sparc and x86 seem to be okay. > Inspection of the various _fpmath.h files shows that failures are on long double == double platforms. Can you test this patch? Index: Makefile =================================================================== --- Makefile (revision 257810) +++ Makefile (working copy) @@ -71,7 +71,7 @@ s_lround.c s_lroundf.c s_lroundl.c s_modff.c \ s_nan.c s_nearbyint.c s_nextafter.c s_nextafterf.c \ s_nexttowardf.c s_remquo.c s_remquof.c \ - s_rint.c s_rintf.c s_round.c s_roundf.c s_roundl.c \ + s_rint.c s_rintf.c s_round.c s_roundf.c \ s_scalbln.c s_scalbn.c s_scalbnf.c s_signbit.c \ s_signgam.c s_significand.c s_significandf.c s_sin.c s_sinf.c \ s_tan.c s_tanf.c s_tanh.c s_tanhf.c s_tgammaf.c s_trunc.c s_truncf.c \ @@ -101,7 +101,7 @@ s_asinhl.c s_atanl.c s_cbrtl.c s_ceill.c s_cosl.c s_cprojl.c \ s_csqrtl.c s_exp2l.c s_expl.c s_floorl.c s_fmal.c \ s_frexpl.c s_logbl.c s_logl.c s_nanl.c s_nextafterl.c \ - s_nexttoward.c s_remquol.c s_rintl.c s_scalbnl.c \ + s_nexttoward.c s_remquol.c s_rintl.c s_roundl.c s_scalbnl.c \ s_sinl.c s_tanl.c s_truncl.c w_cabsl.c .endif Index: src/s_round.c =================================================================== --- src/s_round.c (revision 257810) +++ src/s_round.c (working copy) @@ -52,3 +52,7 @@ return (-t); } } + +#if (LDBL_MANT_DIG == 53) +__weak_reference(round, roundl); +#endif -- Steve From owner-svn-src-head@FreeBSD.ORG Thu Nov 7 20:45:51 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 8789632F; Thu, 7 Nov 2013 20:45:51 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7510B2CEB; Thu, 7 Nov 2013 20:45:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA7Kjp1X049911; Thu, 7 Nov 2013 20:45:51 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA7KjpWi049910; Thu, 7 Nov 2013 20:45:51 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201311072045.rA7KjpWi049910@svn.freebsd.org> From: Mark Johnston Date: Thu, 7 Nov 2013 20:45:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257811 - head/libexec/rtld-elf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Nov 2013 20:45:51 -0000 Author: markj Date: Thu Nov 7 20:45:50 2013 New Revision: 257811 URL: http://svnweb.freebsd.org/changeset/base/257811 Log: Include rtld itself when iterating over loaded ELF objects in dl_iterate_phdr(3). Reviewed by: kib Modified: head/libexec/rtld-elf/rtld.c Modified: head/libexec/rtld-elf/rtld.c ============================================================================== --- head/libexec/rtld-elf/rtld.c Thu Nov 7 19:51:19 2013 (r257810) +++ head/libexec/rtld-elf/rtld.c Thu Nov 7 20:45:50 2013 (r257811) @@ -3269,6 +3269,11 @@ dl_iterate_phdr(__dl_iterate_hdr_callbac break; } + if (error == 0) { + rtld_fill_dl_phdr_info(&obj_rtld, &phdr_info); + error = callback(&phdr_info, sizeof(phdr_info), param); + } + lock_release(rtld_bind_lock, &bind_lockstate); lock_release(rtld_phdr_lock, &phdr_lockstate); From owner-svn-src-head@FreeBSD.ORG Thu Nov 7 21:02:58 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 02A6CB7D; Thu, 7 Nov 2013 21:02:58 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E25FB2E09; Thu, 7 Nov 2013 21:02:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA7L2vWf056278; Thu, 7 Nov 2013 21:02:57 GMT (envelope-from jhibbits@svn.freebsd.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA7L2vqw056277; Thu, 7 Nov 2013 21:02:57 GMT (envelope-from jhibbits@svn.freebsd.org) Message-Id: <201311072102.rA7L2vqw056277@svn.freebsd.org> From: Justin Hibbits Date: Thu, 7 Nov 2013 21:02:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257813 - head/sys/powerpc/powerpc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Nov 2013 21:02:58 -0000 Author: jhibbits Date: Thu Nov 7 21:02:57 2013 New Revision: 257813 URL: http://svnweb.freebsd.org/changeset/base/257813 Log: Clamp the dump block size to the dump device max I/O size. Modified: head/sys/powerpc/powerpc/dump_machdep.c Modified: head/sys/powerpc/powerpc/dump_machdep.c ============================================================================== --- head/sys/powerpc/powerpc/dump_machdep.c Thu Nov 7 20:54:52 2013 (r257812) +++ head/sys/powerpc/powerpc/dump_machdep.c Thu Nov 7 21:02:57 2013 (r257813) @@ -114,7 +114,7 @@ cb_dumpdata(struct pmap_md *md, int seqn { struct dumperinfo *di = (struct dumperinfo*)arg; vm_offset_t va; - size_t counter, ofs, resid, sz; + size_t counter, ofs, resid, sz, maxsz; int c, error, twiddle; error = 0; @@ -123,11 +123,12 @@ cb_dumpdata(struct pmap_md *md, int seqn ofs = 0; /* Logical offset within the chunk */ resid = md->md_size; + maxsz = min(DFLTPHYS, di->maxiosize); printf(" chunk %d: %lu bytes ", seqnr, (u_long)resid); while (resid) { - sz = (resid > DFLTPHYS) ? DFLTPHYS : resid; + sz = min(resid, maxsz); va = pmap_dumpsys_map(md, ofs, &sz); counter += sz; if (counter >> 24) { From owner-svn-src-head@FreeBSD.ORG Thu Nov 7 21:16:33 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 48AE628C; Thu, 7 Nov 2013 21:16:33 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 35C182EB8; Thu, 7 Nov 2013 21:16:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA7LGX73060652; Thu, 7 Nov 2013 21:16:33 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA7LGWOC060646; Thu, 7 Nov 2013 21:16:32 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201311072116.rA7LGWOC060646@svn.freebsd.org> From: Devin Teske Date: Thu, 7 Nov 2013 21:16:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257817 - in head/usr.sbin/bsdconfig: include share/packages X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Nov 2013 21:16:33 -0000 Author: dteske Date: Thu Nov 7 21:16:32 2013 New Revision: 257817 URL: http://svnweb.freebsd.org/changeset/base/257817 Log: Fix cosmetic typos (since the typo's in the variable names were copied and pasted, it wasn't noticed). Modified: head/usr.sbin/bsdconfig/include/messages.subr head/usr.sbin/bsdconfig/share/packages/index.subr head/usr.sbin/bsdconfig/share/packages/packages.subr Modified: head/usr.sbin/bsdconfig/include/messages.subr ============================================================================== --- head/usr.sbin/bsdconfig/include/messages.subr Thu Nov 7 21:12:20 2013 (r257816) +++ head/usr.sbin/bsdconfig/include/messages.subr Thu Nov 7 21:16:32 2013 (r257817) @@ -143,7 +143,7 @@ msg_geography_desc="Geography-related so msg_german_desc="Ported software for Germanic countries." msg_germany="Germany" msg_getting_package_categories_via_pkg_rquery="Getting package categories via pkg-rquery(8)..." -msg_getting_package_dependencies_via_pkg_rquery="Getting package dependencyes via pkg-rquery(8)\n(this can take a while)..." +msg_getting_package_dependencies_via_pkg_rquery="Getting package dependencies via pkg-rquery(8)\n(this can take a while)..." msg_gnome_desc="Components of the Gnome Desktop environment." msg_gnustep_desc="Software for GNUstep desktop environment." msg_graphics_desc="Graphics libraries and utilities." @@ -375,7 +375,7 @@ msg_unable_to_get_file_from_selected_med msg_unable_to_get_proper_ftp_path="Unable to get proper FTP path. FTP media not initialized." msg_unable_to_initialize_media_type_for_package_extract="Unable to initialize media type for package extract." msg_unable_to_make_directory_mountpoint="Unable to make %s directory mountpoint for %s!" -msg_unable_to_pkg_rquery_package_dependeices="Unable to pkg-rquery(8) package dependencies!" +msg_unable_to_pkg_rquery_package_dependencies="Unable to pkg-rquery(8) package dependencies!" msg_unable_to_pkg_rquery_package_categories="Unable to pkg-rquery(8) package categories!" msg_unable_to_open="Unable to open %s" msg_unable_to_update_pkg_from_selected_media="Unable to update pkg(8) from selected media." Modified: head/usr.sbin/bsdconfig/share/packages/index.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/packages/index.subr Thu Nov 7 21:12:20 2013 (r257816) +++ head/usr.sbin/bsdconfig/share/packages/index.subr Thu Nov 7 21:16:32 2013 (r257817) @@ -196,7 +196,7 @@ f_index_initialize() printf "local _%s_categories=\"%s\";\n", package, cats } }' )"; then - f_show_err "$msg_unable_to_pkg_rquery_package_dependeices" + f_show_err "$msg_unable_to_pkg_rquery_package_dependencies" f_device_shutdown media return $FAILURE fi @@ -213,7 +213,7 @@ f_index_initialize() printf "local _%s_rundeps=\"%s\";\n", package, deps } }' )"; then - f_show_err "$msg_unable_to_pkg_rquery_package_dependeices" + f_show_err "$msg_unable_to_pkg_rquery_package_dependencies" f_device_shutdown media return $FAILURE fi Modified: head/usr.sbin/bsdconfig/share/packages/packages.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/packages/packages.subr Thu Nov 7 21:12:20 2013 (r257816) +++ head/usr.sbin/bsdconfig/share/packages/packages.subr Thu Nov 7 21:16:32 2013 (r257817) @@ -1134,8 +1134,8 @@ f_package_delete() # Chase dependencies that are marked for uninstallation # for pkgsel in $udeps; do - f_dprintf "%s: Uninstalling dependecy %s (marked for delete)" \ - $fname "$pkgsel" + f_dprintf "%s: Uninstalling dependency %s (%s)" \ + $fname "$pkgsel" "marked for delete" f_package_delete "$pkgsel" done From owner-svn-src-head@FreeBSD.ORG Thu Nov 7 21:20:35 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 5A69047F; Thu, 7 Nov 2013 21:20:35 +0000 (UTC) (envelope-from kargl@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4668E2F05; Thu, 7 Nov 2013 21:20:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA7LKZMX061514; Thu, 7 Nov 2013 21:20:35 GMT (envelope-from kargl@svn.freebsd.org) Received: (from kargl@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA7LKY1J061512; Thu, 7 Nov 2013 21:20:34 GMT (envelope-from kargl@svn.freebsd.org) Message-Id: <201311072120.rA7LKY1J061512@svn.freebsd.org> From: Steve Kargl Date: Thu, 7 Nov 2013 21:20:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257818 - in head/lib/msun: . src X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Nov 2013 21:20:35 -0000 Author: kargl Date: Thu Nov 7 21:20:34 2013 New Revision: 257818 URL: http://svnweb.freebsd.org/changeset/base/257818 Log: Fix bulding libm on platforms with LDBL_MANT_DIG == 53. Reported by: ian Modified: head/lib/msun/Makefile head/lib/msun/src/s_round.c Modified: head/lib/msun/Makefile ============================================================================== --- head/lib/msun/Makefile Thu Nov 7 21:16:32 2013 (r257817) +++ head/lib/msun/Makefile Thu Nov 7 21:20:34 2013 (r257818) @@ -71,7 +71,7 @@ COMMON_SRCS= b_exp.c b_log.c b_tgamma.c s_lround.c s_lroundf.c s_lroundl.c s_modff.c \ s_nan.c s_nearbyint.c s_nextafter.c s_nextafterf.c \ s_nexttowardf.c s_remquo.c s_remquof.c \ - s_rint.c s_rintf.c s_round.c s_roundf.c s_roundl.c \ + s_rint.c s_rintf.c s_round.c s_roundf.c \ s_scalbln.c s_scalbn.c s_scalbnf.c s_signbit.c \ s_signgam.c s_significand.c s_significandf.c s_sin.c s_sinf.c \ s_tan.c s_tanf.c s_tanh.c s_tanhf.c s_tgammaf.c s_trunc.c s_truncf.c \ @@ -101,7 +101,7 @@ COMMON_SRCS+= e_acoshl.c e_acosl.c e_asi s_asinhl.c s_atanl.c s_cbrtl.c s_ceill.c s_cosl.c s_cprojl.c \ s_csqrtl.c s_exp2l.c s_expl.c s_floorl.c s_fmal.c \ s_frexpl.c s_logbl.c s_logl.c s_nanl.c s_nextafterl.c \ - s_nexttoward.c s_remquol.c s_rintl.c s_scalbnl.c \ + s_nexttoward.c s_remquol.c s_rintl.c s_roundl.c s_scalbnl.c \ s_sinl.c s_tanl.c s_truncl.c w_cabsl.c .endif Modified: head/lib/msun/src/s_round.c ============================================================================== --- head/lib/msun/src/s_round.c Thu Nov 7 21:16:32 2013 (r257817) +++ head/lib/msun/src/s_round.c Thu Nov 7 21:20:34 2013 (r257818) @@ -52,3 +52,7 @@ round(double x) return (-t); } } + +#if (LDBL_MANT_DIG == 53) +__weak_reference(round, roundl); +#endif From owner-svn-src-head@FreeBSD.ORG Thu Nov 7 21:38:47 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 41586A41; Thu, 7 Nov 2013 21:38:47 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2C7CA2FC7; Thu, 7 Nov 2013 21:38:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA7LclOe067370; Thu, 7 Nov 2013 21:38:47 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA7Lck2Z067365; Thu, 7 Nov 2013 21:38:46 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201311072138.rA7Lck2Z067365@svn.freebsd.org> From: Devin Teske Date: Thu, 7 Nov 2013 21:38:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257819 - in head/usr.sbin/bsdconfig/share: . media X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Nov 2013 21:38:47 -0000 Author: dteske Date: Thu Nov 7 21:38:46 2013 New Revision: 257819 URL: http://svnweb.freebsd.org/changeset/base/257819 Log: Use `pkg -vv' to obtain ABI for validating a chosen media server (done prior to diving head-long into a pkg-update(8), et. al). This should also be more future-proof than what was being done just before this. Modified: head/usr.sbin/bsdconfig/share/common.subr head/usr.sbin/bsdconfig/share/media/http.subr Modified: head/usr.sbin/bsdconfig/share/common.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/common.subr Thu Nov 7 21:20:34 2013 (r257818) +++ head/usr.sbin/bsdconfig/share/common.subr Thu Nov 7 21:38:46 2013 (r257819) @@ -62,12 +62,10 @@ export UNAME_S="$(uname -s)" # Operating export UNAME_P="$(uname -p)" # Processor Architecture (i.e. i386) export UNAME_M="$(uname -m)" # Machine platform (i.e. i386) export UNAME_R="$(uname -r)" # Release Level (i.e. X.Y-RELEASE) -if [ ! "$UNAME_PKG" ]; then - case "$UNAME_M:$UNAME_P" in - i386:i386) UNAME_PKG="x86:32" ;; - amd64:amd64) UNAME_PKG="x86:64" ;; - *) UNAME_PKG="$UNAME_M:$UNAME_P" - esac +if [ ! "${PKG_ABI+set}" ]; then + export PKG_ABI="$( + pkg -vv | awk '$1=="ABI:"{print $2;exit}' 2> /dev/null + )" fi # Modified: head/usr.sbin/bsdconfig/share/media/http.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/media/http.subr Thu Nov 7 21:20:34 2013 (r257818) +++ head/usr.sbin/bsdconfig/share/media/http.subr Thu Nov 7 21:38:46 2013 (r257819) @@ -499,9 +499,8 @@ f_media_init_http() # local fdir hp f_getvar $VAR_HTTP_PATH%/ hp - setvar $VAR_HTTP_PATH \ - "$hp/freebsd:${UNAME_R%%.*}:$UNAME_PKG/latest" - if f_http_check_access; then + setvar $VAR_HTTP_PATH "$hp/$PKG_ABI/latest" + if [ "$PKG_ABI" ] && f_http_check_access; then http_found=$SUCCESS else for fdir in $HTTP_DIRS; do From owner-svn-src-head@FreeBSD.ORG Thu Nov 7 21:42:14 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 2CF1FBD5; Thu, 7 Nov 2013 21:42:14 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mho-02-ewr.mailhop.org (mho-02-ewr.mailhop.org [204.13.248.72]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 00DC22019; Thu, 7 Nov 2013 21:42:13 +0000 (UTC) Received: from c-24-8-230-52.hsd1.co.comcast.net ([24.8.230.52] helo=damnhippie.dyndns.org) by mho-02-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1VeXLA-0001AN-0G; Thu, 07 Nov 2013 21:42:12 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by damnhippie.dyndns.org (8.14.3/8.14.3) with ESMTP id rA7Lg98w065312; Thu, 7 Nov 2013 14:42:09 -0700 (MST) (envelope-from ian@FreeBSD.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 24.8.230.52 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX1+bQPkxNLk7MJcL+wZ2RkQk Subject: Re: svn commit: r257818 - in head/lib/msun: . src From: Ian Lepore To: Steve Kargl In-Reply-To: <201311072120.rA7LKY1J061512@svn.freebsd.org> References: <201311072120.rA7LKY1J061512@svn.freebsd.org> Content-Type: text/plain; charset="us-ascii" Date: Thu, 07 Nov 2013 14:42:09 -0700 Message-ID: <1383860529.31172.233.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Nov 2013 21:42:14 -0000 On Thu, 2013-11-07 at 21:20 +0000, Steve Kargl wrote: > Author: kargl > Date: Thu Nov 7 21:20:34 2013 > New Revision: 257818 > URL: http://svnweb.freebsd.org/changeset/base/257818 > > Log: > Fix bulding libm on platforms with LDBL_MANT_DIG == 53. > > Reported by: ian > > Modified: > head/lib/msun/Makefile > head/lib/msun/src/s_round.c > > Modified: head/lib/msun/Makefile > ============================================================================== > --- head/lib/msun/Makefile Thu Nov 7 21:16:32 2013 (r257817) > +++ head/lib/msun/Makefile Thu Nov 7 21:20:34 2013 (r257818) > @@ -71,7 +71,7 @@ COMMON_SRCS= b_exp.c b_log.c b_tgamma.c > s_lround.c s_lroundf.c s_lroundl.c s_modff.c \ > s_nan.c s_nearbyint.c s_nextafter.c s_nextafterf.c \ > s_nexttowardf.c s_remquo.c s_remquof.c \ > - s_rint.c s_rintf.c s_round.c s_roundf.c s_roundl.c \ > + s_rint.c s_rintf.c s_round.c s_roundf.c \ > s_scalbln.c s_scalbn.c s_scalbnf.c s_signbit.c \ > s_signgam.c s_significand.c s_significandf.c s_sin.c s_sinf.c \ > s_tan.c s_tanf.c s_tanh.c s_tanhf.c s_tgammaf.c s_trunc.c s_truncf.c \ > @@ -101,7 +101,7 @@ COMMON_SRCS+= e_acoshl.c e_acosl.c e_asi > s_asinhl.c s_atanl.c s_cbrtl.c s_ceill.c s_cosl.c s_cprojl.c \ > s_csqrtl.c s_exp2l.c s_expl.c s_floorl.c s_fmal.c \ > s_frexpl.c s_logbl.c s_logl.c s_nanl.c s_nextafterl.c \ > - s_nexttoward.c s_remquol.c s_rintl.c s_scalbnl.c \ > + s_nexttoward.c s_remquol.c s_rintl.c s_roundl.c s_scalbnl.c \ > s_sinl.c s_tanl.c s_truncl.c w_cabsl.c > .endif > > > Modified: head/lib/msun/src/s_round.c > ============================================================================== > --- head/lib/msun/src/s_round.c Thu Nov 7 21:16:32 2013 (r257817) > +++ head/lib/msun/src/s_round.c Thu Nov 7 21:20:34 2013 (r257818) > @@ -52,3 +52,7 @@ round(double x) > return (-t); > } > } > + > +#if (LDBL_MANT_DIG == 53) > +__weak_reference(round, roundl); > +#endif I don't think that's a complete fix. I got a linker "undefined reference" error when testing your patch. I decided to make sure it wasn't a -DNO_CLEAN artifact and did a fresh build, and it just failed: --- games.all__D --- /local/build/staging/freebsd/bb/obj/arm.armv6/local/build/staging/freebsd/bb/src/tmp/usr/lib/libm.so: undefined reference to `roundl' The complete log is here: http://people.freebsd.org/~ian/make.log -- Ian From owner-svn-src-head@FreeBSD.ORG Thu Nov 7 21:48:00 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 6603CF1B; Thu, 7 Nov 2013 21:48:00 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 43D53206E; Thu, 7 Nov 2013 21:48:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA7Lm0Go070674; Thu, 7 Nov 2013 21:48:00 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA7Llxw9070669; Thu, 7 Nov 2013 21:47:59 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201311072147.rA7Llxw9070669@svn.freebsd.org> From: Sean Bruno Date: Thu, 7 Nov 2013 21:47:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257820 - head/usr.sbin/mfiutil X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Nov 2013 21:48:00 -0000 Author: sbruno Date: Thu Nov 7 21:47:59 2013 New Revision: 257820 URL: http://svnweb.freebsd.org/changeset/base/257820 Log: Add support for controlling mfi(4) controller properties: allow user control of rebuild rate allow user control of silence/enable alarm MFC after: 2 weeks Sponsored by: Yahoo! Inc. Added: head/usr.sbin/mfiutil/mfi_properties.c (contents, props changed) Modified: head/usr.sbin/mfiutil/Makefile head/usr.sbin/mfiutil/mfiutil.8 head/usr.sbin/mfiutil/mfiutil.c Modified: head/usr.sbin/mfiutil/Makefile ============================================================================== --- head/usr.sbin/mfiutil/Makefile Thu Nov 7 21:38:46 2013 (r257819) +++ head/usr.sbin/mfiutil/Makefile Thu Nov 7 21:47:59 2013 (r257820) @@ -2,7 +2,8 @@ PROG= mfiutil SRCS= mfiutil.c mfi_bbu.c mfi_cmd.c mfi_config.c mfi_drive.c mfi_evt.c \ - mfi_flash.c mfi_patrol.c mfi_show.c mfi_volume.c mfi_foreign.c + mfi_flash.c mfi_patrol.c mfi_show.c mfi_volume.c mfi_foreign.c \ + mfi_properties.c MAN8= mfiutil.8 CFLAGS+= -fno-builtin-strftime Added: head/usr.sbin/mfiutil/mfi_properties.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/mfiutil/mfi_properties.c Thu Nov 7 21:47:59 2013 (r257820) @@ -0,0 +1,171 @@ +/*- + * Copyright (c) 2013 Yahoo!, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * + * $FreeBSD$ + */ + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include "mfiutil.h" +#include + +MFI_TABLE(top, ctrlprop); + +static int +mfi_ctrl_get_properties(int fd, struct mfi_ctrl_props *info) +{ + + return (mfi_dcmd_command(fd, MFI_DCMD_CTRL_GET_PROPS, info, + sizeof(struct mfi_ctrl_props), NULL, 0, NULL)); +} + +static int +mfi_ctrl_set_properties(int fd, struct mfi_ctrl_props *info) +{ + + return (mfi_dcmd_command(fd, MFI_DCMD_CTRL_SET_PROPS, info, + sizeof(struct mfi_ctrl_props), NULL, 0, NULL)); +} + +/* + * aquite the controller properties data structure modify the + * rebuild rate if requested and then retun + */ +static int +mfi_ctrl_rebuild_rate(int ac, char **av) +{ + int error, fd; + struct mfi_ctrl_props ctrl_props; + + if (ac > 2) { + warn("mfi_ctrl_set_rebuild_rate"); + return(-1); + } + + fd = mfi_open(mfi_unit, O_RDWR); + if (fd < 0) { + error = errno; + warn("mfi_open"); + return (error); + } + + error = mfi_ctrl_get_properties(fd, &ctrl_props); + if ( error < 0) { + error = errno; + warn("Failed to get controller properties"); + close(fd); + return (error); + } + /* + * User requested a change to the rebuild rate + */ + if (ac > 1) { + ctrl_props.rebuild_rate = atoi(av[ac - 1]); + error = mfi_ctrl_set_properties(fd, &ctrl_props); + if ( error < 0) { + error = errno; + warn("Failed to set controller properties"); + close(fd); + return (error); + } + + error = mfi_ctrl_get_properties(fd, &ctrl_props); + if ( error < 0) { + error = errno; + warn("Failed to get controller properties"); + close(fd); + return (error); + } + } + printf ("controller rebuild rate: %%%u \n", + ctrl_props.rebuild_rate); + return (0); +} +MFI_COMMAND(ctrlprop, rebuild, mfi_ctrl_rebuild_rate); + +static int +mfi_ctrl_alarm_enable(int ac, char **av) +{ + int error, fd; + struct mfi_ctrl_props ctrl_props; + + if (ac > 2) { + warn("mfi_ctrl_alarm_enable"); + return(-1); + } + + fd = mfi_open(mfi_unit, O_RDWR); + if (fd < 0) { + error = errno; + warn("mfi_open"); + return (error); + } + + error = mfi_ctrl_get_properties(fd, &ctrl_props); + if ( error < 0) { + error = errno; + warn("Failed to get controller properties"); + close(fd); + return (error); + } + printf ("controller alarm was : %s\n", + (ctrl_props.alarm_enable ? "enabled" : "disabled")); + + if (ac > 1) { + ctrl_props.alarm_enable = atoi(av[ac - 1]); + error = mfi_ctrl_set_properties(fd, &ctrl_props); + if ( error < 0) { + error = errno; + warn("Failed to set controller properties"); + close(fd); + return (error); + } + + error = mfi_ctrl_get_properties(fd, &ctrl_props); + if ( error < 0) { + error = errno; + warn("Failed to get controller properties"); + close(fd); + return (error); + } + } + printf ("controller alarm was : %s\n", + (ctrl_props.alarm_enable ? "enabled" : "disabled")); + return (0); +} + +MFI_COMMAND(ctrlprop, alarm, mfi_ctrl_alarm_enable); Modified: head/usr.sbin/mfiutil/mfiutil.8 ============================================================================== --- head/usr.sbin/mfiutil/mfiutil.8 Thu Nov 7 21:38:46 2013 (r257819) +++ head/usr.sbin/mfiutil/mfiutil.8 Thu Nov 7 21:47:59 2013 (r257820) @@ -168,6 +168,12 @@ .Nm .Op Fl u Ar unit .Cm bbu Ar setting Ar value +.Nm +.Op Fl u Ar unit +.Cm ctrlprop Ar rebuild Op Ar rate +.Nm +.Op Fl u Ar unit +.Cm ctrlprop Ar alarm Op Ar 0/1 .Sh DESCRIPTION The .Nm @@ -659,6 +665,12 @@ inclusive. Modes 1, 2 and 3 enable a transparent learn cycle, whereas modes 4 and 5 do not. The BBU's data retention time is greater when transparent learning is not used. .El +.It Cm ctrlprop Ar rebuild Op Ar rate +With no arguments display the rate of rebuild (percentage)a for volumes. +With an integer argument (0-100), set that value as the new rebuild rate for volumes. +.It Cm ctrlprop Ar alarm Op Ar 0/1 +With no arguments display the current alarm enable/disable status. +With a 0, disable alarms. With a 1, enable alarms. .El .Sh EXAMPLES Configure the cache for volume mfid0 to cache only writes: @@ -699,6 +711,10 @@ patrol read starting in 5 minutes: Display the second detected foreign configuration: .Pp .Dl Nm Cm show foreign 1 +.Pp +Set the current rebuild rate for volumes to 40%: +.Dl Nm Cm ctrlprop rebuild 40 +.Pp .Sh SEE ALSO .Xr mfi 4 .Sh HISTORY Modified: head/usr.sbin/mfiutil/mfiutil.c ============================================================================== --- head/usr.sbin/mfiutil/mfiutil.c Thu Nov 7 21:38:46 2013 (r257819) +++ head/usr.sbin/mfiutil/mfiutil.c Thu Nov 7 21:47:59 2013 (r257820) @@ -93,6 +93,8 @@ usage(void) fprintf(stderr, " flash \n"); fprintf(stderr, " start learn - start a BBU relearn\n"); fprintf(stderr, " bbu - set BBU properties\n"); + fprintf(stderr, " ctrlprop rebuild [rate] - get/set the volume rebuild rate\n"); + fprintf(stderr, " ctrlprop alarm [0/1] - enable/disable controller alarms\n"); #ifdef DEBUG fprintf(stderr, " debug - debug 'show config'\n"); fprintf(stderr, " dump - display 'saved' config\n"); From owner-svn-src-head@FreeBSD.ORG Thu Nov 7 21:52:05 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id DFD3442D; Thu, 7 Nov 2013 21:52:05 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B2E2520DF; Thu, 7 Nov 2013 21:52:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA7Lq5f1073362; Thu, 7 Nov 2013 21:52:05 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA7Lq5IR073356; Thu, 7 Nov 2013 21:52:05 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201311072152.rA7Lq5IR073356@svn.freebsd.org> From: Devin Teske Date: Thu, 7 Nov 2013 21:52:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257821 - head/sys/boot/forth X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Nov 2013 21:52:06 -0000 Author: dteske Date: Thu Nov 7 21:52:04 2013 New Revision: 257821 URL: http://svnweb.freebsd.org/changeset/base/257821 Log: Extend loader_delay as-documented in beastie.4th(8) and delay.4th(8), making it available to architectures that do not use or load the beastie menu. This is reported to save headaches on some PPC systems where unload followed by load does not produce the desired results wherein if-given the opportunicy to abort the initial loading sequence, you can customize the first load. Reviewed by: nwhitehorn, kan Discussed on: -current Modified: head/sys/boot/forth/beastie.4th head/sys/boot/forth/loader.4th head/sys/boot/forth/loader.conf Modified: head/sys/boot/forth/beastie.4th ============================================================================== --- head/sys/boot/forth/beastie.4th Thu Nov 7 21:47:59 2013 (r257820) +++ head/sys/boot/forth/beastie.4th Thu Nov 7 21:52:04 2013 (r257821) @@ -28,8 +28,6 @@ marker task-beastie.4th -include /boot/delay.4th - only forth definitions also support-functions variable logoX Modified: head/sys/boot/forth/loader.4th ============================================================================== --- head/sys/boot/forth/loader.4th Thu Nov 7 21:47:59 2013 (r257820) +++ head/sys/boot/forth/loader.4th Thu Nov 7 21:52:04 2013 (r257821) @@ -41,6 +41,7 @@ s" arch-i386" environment? [if] [if] include /boot/support.4th include /boot/color.4th +include /boot/delay.4th only forth also support-functions also builtins definitions @@ -141,8 +142,17 @@ include /boot/check-password.4th \ Will *NOT* try to load kernel and modules if no configuration file \ was succesfully loaded! any_conf_read? if - load_kernel - load_modules + s" loader_delay" getenv -1 = if + load_kernel + load_modules + else + drop + ." Loading Kernel and Modules (Ctrl-C to Abort)" cr + s" also support-functions" evaluate + s" set delay_command='load_kernel load_modules'" evaluate + s" set delay_showdots" evaluate + delay_execute + then then ; Modified: head/sys/boot/forth/loader.conf ============================================================================== --- head/sys/boot/forth/loader.conf Thu Nov 7 21:47:59 2013 (r257820) +++ head/sys/boot/forth/loader.conf Thu Nov 7 21:52:04 2013 (r257821) @@ -53,6 +53,8 @@ entropy_cache_type="/boot/entropy" ### Loader settings ######################################## ############################################################## +#loader_delay="3" # Delay in seconds before loading anything. + # Default is unset and disabled (no delay). #autoboot_delay="10" # Delay in seconds before autobooting, # set to -1 if you don't want user to be # allowed to interrupt autoboot process and From owner-svn-src-head@FreeBSD.ORG Thu Nov 7 22:13:09 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 6CA60C4B; Thu, 7 Nov 2013 22:13:09 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 324CC21F9; Thu, 7 Nov 2013 22:13:09 +0000 (UTC) Received: from troutmask.apl.washington.edu (localhost.apl.washington.edu [127.0.0.1]) by troutmask.apl.washington.edu (8.14.7/8.14.7) with ESMTP id rA7MD8uR062235; Thu, 7 Nov 2013 14:13:08 -0800 (PST) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.14.7/8.14.7/Submit) id rA7MD8H4062234; Thu, 7 Nov 2013 14:13:08 -0800 (PST) (envelope-from sgk) Date: Thu, 7 Nov 2013 14:13:08 -0800 From: Steve Kargl To: Ian Lepore Subject: Re: svn commit: r257818 - in head/lib/msun: . src Message-ID: <20131107221308.GA61870@troutmask.apl.washington.edu> References: <201311072120.rA7LKY1J061512@svn.freebsd.org> <1383860529.31172.233.camel@revolution.hippie.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1383860529.31172.233.camel@revolution.hippie.lan> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Steve Kargl X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Nov 2013 22:13:09 -0000 On Thu, Nov 07, 2013 at 02:42:09PM -0700, Ian Lepore wrote: > On Thu, 2013-11-07 at 21:20 +0000, Steve Kargl wrote: > > --- head/lib/msun/src/s_round.c Thu Nov 7 21:16:32 2013 (r257817) > > +++ head/lib/msun/src/s_round.c Thu Nov 7 21:20:34 2013 (r257818) > > @@ -52,3 +52,7 @@ round(double x) > > return (-t); > > } > > } > > + > > +#if (LDBL_MANT_DIG == 53) > > +__weak_reference(round, roundl); > > +#endif > > I don't think that's a complete fix. I got a linker "undefined > reference" error when testing your patch. I decided to make sure it > wasn't a -DNO_CLEAN artifact and did a fresh build, and it just failed: > I just can't win today. I forgot "#include " where LDBL_MANT_DIG is defined. Can you try? Index: src/s_round.c =================================================================== --- src/s_round.c (revision 257818) +++ src/s_round.c (working copy) @@ -27,6 +27,8 @@ #include __FBSDID("$FreeBSD$"); +#include + #include "math.h" #include "math_private.h" -- Steve From owner-svn-src-head@FreeBSD.ORG Thu Nov 7 22:37:20 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id F366A361; Thu, 7 Nov 2013 22:37:19 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mho-02-ewr.mailhop.org (mho-02-ewr.mailhop.org [204.13.248.72]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C3B22239D; Thu, 7 Nov 2013 22:37:19 +0000 (UTC) Received: from c-24-8-230-52.hsd1.co.comcast.net ([24.8.230.52] helo=damnhippie.dyndns.org) by mho-02-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1VeYCU-000OCe-Uv; Thu, 07 Nov 2013 22:37:19 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by damnhippie.dyndns.org (8.14.3/8.14.3) with ESMTP id rA7MbF4w065361; Thu, 7 Nov 2013 15:37:16 -0700 (MST) (envelope-from ian@FreeBSD.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 24.8.230.52 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX181MWcxEn36tYHGTjY21M1g Subject: Re: svn commit: r257818 - in head/lib/msun: . src From: Ian Lepore To: Steve Kargl In-Reply-To: <20131107221308.GA61870@troutmask.apl.washington.edu> References: <201311072120.rA7LKY1J061512@svn.freebsd.org> <1383860529.31172.233.camel@revolution.hippie.lan> <20131107221308.GA61870@troutmask.apl.washington.edu> Content-Type: text/plain; charset="us-ascii" Date: Thu, 07 Nov 2013 15:37:15 -0700 Message-ID: <1383863835.31172.235.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Steve Kargl X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Nov 2013 22:37:20 -0000 On Thu, 2013-11-07 at 14:13 -0800, Steve Kargl wrote: > On Thu, Nov 07, 2013 at 02:42:09PM -0700, Ian Lepore wrote: > > On Thu, 2013-11-07 at 21:20 +0000, Steve Kargl wrote: > > > --- head/lib/msun/src/s_round.c Thu Nov 7 21:16:32 2013 (r257817) > > > +++ head/lib/msun/src/s_round.c Thu Nov 7 21:20:34 2013 (r257818) > > > @@ -52,3 +52,7 @@ round(double x) > > > return (-t); > > > } > > > } > > > + > > > +#if (LDBL_MANT_DIG == 53) > > > +__weak_reference(round, roundl); > > > +#endif > > > > I don't think that's a complete fix. I got a linker "undefined > > reference" error when testing your patch. I decided to make sure it > > wasn't a -DNO_CLEAN artifact and did a fresh build, and it just failed: > > > > I just can't win today. I forgot "#include " where > LDBL_MANT_DIG is defined. Can you try? > > Index: src/s_round.c > =================================================================== > --- src/s_round.c (revision 257818) > +++ src/s_round.c (working copy) > @@ -27,6 +27,8 @@ > #include > __FBSDID("$FreeBSD$"); > > +#include > + > #include "math.h" > #include "math_private.h" > That seems to have fixed things. Don't feel bad, I've got more tries in on the aicasm build thing and I still don't have it right. I supposedly learned my lesson about messing with build stuff 20 years ago, but I guess I'm getting a refresher. -- Ian From owner-svn-src-head@FreeBSD.ORG Thu Nov 7 22:46:13 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A77BB5EF; Thu, 7 Nov 2013 22:46:13 +0000 (UTC) (envelope-from kargl@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 94A682420; Thu, 7 Nov 2013 22:46:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA7MkDhx090888; Thu, 7 Nov 2013 22:46:13 GMT (envelope-from kargl@svn.freebsd.org) Received: (from kargl@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA7MkDk9090887; Thu, 7 Nov 2013 22:46:13 GMT (envelope-from kargl@svn.freebsd.org) Message-Id: <201311072246.rA7MkDk9090887@svn.freebsd.org> From: Steve Kargl Date: Thu, 7 Nov 2013 22:46:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257823 - head/lib/msun/src X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Nov 2013 22:46:13 -0000 Author: kargl Date: Thu Nov 7 22:46:13 2013 New Revision: 257823 URL: http://svnweb.freebsd.org/changeset/base/257823 Log: Yet, another attempt to fix the libm breakage due to the changes in s_roundl.c to use bit twiddling. Reported by: ian Modified: head/lib/msun/src/s_round.c Modified: head/lib/msun/src/s_round.c ============================================================================== --- head/lib/msun/src/s_round.c Thu Nov 7 22:08:04 2013 (r257822) +++ head/lib/msun/src/s_round.c Thu Nov 7 22:46:13 2013 (r257823) @@ -27,6 +27,8 @@ #include __FBSDID("$FreeBSD$"); +#include + #include "math.h" #include "math_private.h" From owner-svn-src-head@FreeBSD.ORG Thu Nov 7 22:47:52 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A2A2E731; Thu, 7 Nov 2013 22:47:52 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8F8E12428; Thu, 7 Nov 2013 22:47:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA7Mlqtb091091; Thu, 7 Nov 2013 22:47:52 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA7Mlq8j091090; Thu, 7 Nov 2013 22:47:52 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201311072247.rA7Mlq8j091090@svn.freebsd.org> From: Devin Teske Date: Thu, 7 Nov 2013 22:47:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257824 - head/usr.sbin/sysrc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Nov 2013 22:47:52 -0000 Author: dteske Date: Thu Nov 7 22:47:52 2013 New Revision: 257824 URL: http://svnweb.freebsd.org/changeset/base/257824 Log: Fix a bug that prevented `-d' from working as-documented in sysrc(8). Rather, prevent a bunch of debugging information from spewing onto the screen when using the `describe' flag (misinterpreted as `debug' by the automatatic initialization routines). Modified: head/usr.sbin/sysrc/sysrc Modified: head/usr.sbin/sysrc/sysrc ============================================================================== --- head/usr.sbin/sysrc/sysrc Thu Nov 7 22:46:13 2013 (r257823) +++ head/usr.sbin/sysrc/sysrc Thu Nov 7 22:47:52 2013 (r257824) @@ -28,6 +28,9 @@ # ############################################################ INCLUDES +# Prevent `-d' from being interpreted as a debug flag by common.subr +DEBUG_SELF_INITIALIZE= + BSDCFG_SHARE="/usr/share/bsdconfig" [ "$_COMMON_SUBR" ] || . $BSDCFG_SHARE/common.subr || exit 1 [ "$_SYSRC_SUBR" ] || f_include $BSDCFG_SHARE/sysrc.subr @@ -179,6 +182,7 @@ jail_depend() # # Print include dependencies # + echo DEBUG_SELF_INITIALIZE= cat $BSDCFG_SHARE/common.subr cat $BSDCFG_SHARE/sysrc.subr } From owner-svn-src-head@FreeBSD.ORG Thu Nov 7 22:48:05 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 2C7C686D; Thu, 7 Nov 2013 22:48:05 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 012E4242B; Thu, 7 Nov 2013 22:48:04 +0000 (UTC) Received: from troutmask.apl.washington.edu (localhost.apl.washington.edu [127.0.0.1]) by troutmask.apl.washington.edu (8.14.7/8.14.7) with ESMTP id rA7Mm4pc063119; Thu, 7 Nov 2013 14:48:04 -0800 (PST) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.14.7/8.14.7/Submit) id rA7Mm464063118; Thu, 7 Nov 2013 14:48:04 -0800 (PST) (envelope-from sgk) Date: Thu, 7 Nov 2013 14:48:04 -0800 From: Steve Kargl To: Ian Lepore Subject: Re: svn commit: r257818 - in head/lib/msun: . src Message-ID: <20131107224804.GA63097@troutmask.apl.washington.edu> References: <201311072120.rA7LKY1J061512@svn.freebsd.org> <1383860529.31172.233.camel@revolution.hippie.lan> <20131107221308.GA61870@troutmask.apl.washington.edu> <1383863835.31172.235.camel@revolution.hippie.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1383863835.31172.235.camel@revolution.hippie.lan> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Steve Kargl X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Nov 2013 22:48:05 -0000 On Thu, Nov 07, 2013 at 03:37:15PM -0700, Ian Lepore wrote: > > That seems to have fixed things. > Thanks for the feeback. I've hopefully got it fixed now. > Don't feel bad, I've got more tries in on the aicasm build thing and I > still don't have it right. I supposedly learned my lesson about messing > with build stuff 20 years ago, but I guess I'm getting a refresher. Can I claim that I was trying to divert attention away from you? ;-) -- Steve From owner-svn-src-head@FreeBSD.ORG Thu Nov 7 22:50:43 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 5F77AA2D; Thu, 7 Nov 2013 22:50:43 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 32C9C246F; Thu, 7 Nov 2013 22:50:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA7MohOK093368; Thu, 7 Nov 2013 22:50:43 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA7Mohmm093366; Thu, 7 Nov 2013 22:50:43 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201311072250.rA7Mohmm093366@svn.freebsd.org> From: Ian Lepore Date: Thu, 7 Nov 2013 22:50:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257825 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Nov 2013 22:50:43 -0000 Author: ian Date: Thu Nov 7 22:50:42 2013 New Revision: 257825 URL: http://svnweb.freebsd.org/changeset/base/257825 Log: Instead of modeling the kernel-tools build after the bootstrap tools, build kernel tools the way cross-tools get built. This seems to result in the tool getting installed in the right place. It also seems more correct in retrospect, because if a tool emitted code or binary data as part of building the kernel, it should do so in target-specific ways (endianess, architecture, whatever). That issue is moot for aicasm, our only current tool, but it still seems to be more correct in principle. Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Thu Nov 7 22:47:52 2013 (r257824) +++ head/Makefile.inc1 Thu Nov 7 22:50:42 2013 (r257825) @@ -439,16 +439,6 @@ IMAKE_MTREE= MTREE_CMD="nmtree ${MTREEFL KMAKEENV= ${WMAKEENV} KMAKE= ${KMAKEENV} ${MAKE} ${.MAKEFLAGS} ${KERNEL_FLAGS} KERNEL=${INSTKERNNAME} -# kernel build-tools stage -KTMAKE= MAKEOBJDIRPREFIX=${WORLDTMP} \ - ${WMAKEENV} ${MAKE} -f Makefile.inc1 \ - TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ - DESTDIR= \ - BOOTSTRAPPING=${OSRELDATE} \ - SSP_CFLAGS= \ - -DNO_LINT \ - -DNO_CPU_CFLAGS -DNO_WARNS -DNO_CTF -DEARLY_BUILD - # # buildworld # @@ -1029,7 +1019,7 @@ buildkernel: @echo "--------------------------------------------------------------" @echo ">>> stage 2.3: build tools" @echo "--------------------------------------------------------------" - ${_+_}cd ${.CURDIR}; ${KTMAKE} kernel-tools + ${_+_}cd ${.CURDIR}; ${XMAKE} kernel-tools .if !defined(NO_KERNELDEPEND) @echo @echo "--------------------------------------------------------------" @@ -1360,9 +1350,9 @@ build-tools: .MAKE # kernel-tools: Build kernel-building tools # kernel-tools: .MAKE - mkdir -p ${WORLDTMP}/usr + mkdir -p ${MAKEOBJDIRPREFIX}/usr mtree -deU -f ${.CURDIR}/etc/mtree/BSD.usr.dist \ - -p ${WORLDTMP}/usr >/dev/null + -p ${MAKEOBJDIRPREFIX}/usr >/dev/null .for _tool in \ sys/dev/aic7xxx/aicasm ${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all,install)"; \ @@ -1370,7 +1360,7 @@ kernel-tools: .MAKE ${MAKE} DIRPRFX=${_tool}/ obj && \ ${MAKE} DIRPRFX=${_tool}/ depend && \ ${MAKE} DIRPRFX=${_tool}/ all && \ - ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${WORLDTMP} install + ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX} install .endfor # From owner-svn-src-head@FreeBSD.ORG Thu Nov 7 22:52:11 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 74B9DC5F; Thu, 7 Nov 2013 22:52:11 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 496932480; Thu, 7 Nov 2013 22:52:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA7MqBC3093808; Thu, 7 Nov 2013 22:52:11 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA7MqAaF093806; Thu, 7 Nov 2013 22:52:10 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201311072252.rA7MqAaF093806@svn.freebsd.org> From: Devin Teske Date: Thu, 7 Nov 2013 22:52:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257826 - head/usr.sbin/sysrc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Nov 2013 22:52:11 -0000 Author: dteske Date: Thu Nov 7 22:52:10 2013 New Revision: 257826 URL: http://svnweb.freebsd.org/changeset/base/257826 Log: Add new `--version' long option for getting the version (good for comparing against the ports revision). Modified: head/usr.sbin/sysrc/sysrc head/usr.sbin/sysrc/sysrc.8 Modified: head/usr.sbin/sysrc/sysrc ============================================================================== --- head/usr.sbin/sysrc/sysrc Thu Nov 7 22:50:42 2013 (r257825) +++ head/usr.sbin/sysrc/sysrc Thu Nov 7 22:52:10 2013 (r257826) @@ -38,6 +38,11 @@ BSDCFG_SHARE="/usr/share/bsdconfig" ############################################################ GLOBALS # +# Version information +# +SYSRC_VERSION="6.0 Nov-07,2013" + +# # Options # DELETE= @@ -133,6 +138,8 @@ help() "Verbose. Print the pathname of the specific rc.conf(5)" f_err "$optfmt" "" \ "file where the directive was found." + f_err "$optfmt" "--version" \ + "Print version information to stdout and exit." f_err "$optfmt" "-x" \ "Remove variable(s) from specified file(s)." f_err "\n" @@ -195,19 +202,22 @@ jail_depend() [ $# -gt 0 ] || usage # -# Check for `--help' command-line option +# Check for `--help' and `--version' command-line option # ( # Operate in sub-shell to protect $@ in parent while [ $# -gt 0 ]; do case "$1" in - --help) exit 1;; + --help) help ;; + --version) # see GLOBALS + echo "$SYSRC_VERSION" + exit 1 ;; -[fRj]) # These flags take an argument shift 1;; esac shift 1 done exit 0 -) || help +) || die # # Process command-line flags Modified: head/usr.sbin/sysrc/sysrc.8 ============================================================================== --- head/usr.sbin/sysrc/sysrc.8 Thu Nov 7 22:50:42 2013 (r257825) +++ head/usr.sbin/sysrc/sysrc.8 Thu Nov 7 22:52:10 2013 (r257826) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd Jul 5, 2013 +.Dd Nov 7, 2013 .Dt SYSRC 8 .Os .Sh NAME @@ -112,6 +112,8 @@ Verbose. Print the pathname of the specific .Xr rc.conf 5 file where the directive was found. +.It Fl -version +Print version information to stdout and exit. .It Fl x Remove variable(s) from specified file(s). .El From owner-svn-src-head@FreeBSD.ORG Thu Nov 7 23:00:12 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id CE555E85; Thu, 7 Nov 2013 23:00:12 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AD1EA24CB; Thu, 7 Nov 2013 23:00:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA7N0Cm6095422; Thu, 7 Nov 2013 23:00:12 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA7N0CWT095415; Thu, 7 Nov 2013 23:00:12 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201311072300.rA7N0CWT095415@svn.freebsd.org> From: Devin Teske Date: Thu, 7 Nov 2013 23:00:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257827 - head/usr.sbin/sysrc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Nov 2013 23:00:12 -0000 Author: dteske Date: Thu Nov 7 23:00:11 2013 New Revision: 257827 URL: http://svnweb.freebsd.org/changeset/base/257827 Log: Add a `-c' option for `check only' to determine if a value is set (get command) or if the current value is the same as what is desired (set command). In those cases, the return status is success. Otherwise, if the variable is unset (get command) or set to a different value that what is desired (set command), returns with error status. This is useful for puppet integration as well as everyday scripting. Modified: head/usr.sbin/sysrc/sysrc head/usr.sbin/sysrc/sysrc.8 Modified: head/usr.sbin/sysrc/sysrc ============================================================================== --- head/usr.sbin/sysrc/sysrc Thu Nov 7 22:52:10 2013 (r257826) +++ head/usr.sbin/sysrc/sysrc Thu Nov 7 23:00:11 2013 (r257827) @@ -45,6 +45,7 @@ SYSRC_VERSION="6.0 Nov-07,2013" # # Options # +CHECK_ONLY= DELETE= DESCRIBE= IGNORE_UNKNOWNS= @@ -100,6 +101,8 @@ help() "Dump a list of all non-default configuration variables." f_err "$optfmt" "-A" \ "Dump a list of all configuration variables (incl. defaults)." + f_err "$optfmt" "-c" \ + "Check. Return success if no changes needed, else error." f_err "$optfmt" "-d" \ "Print a description of the given variable." f_err "$optfmt" "-D" \ @@ -222,10 +225,11 @@ jail_depend() # # Process command-line flags # -while getopts aAdDef:Fhij:nNqR:vxX flag; do +while getopts aAcdDef:Fhij:nNqR:vxX flag; do case "$flag" in a) SHOW_ALL=${SHOW_ALL:-1};; A) SHOW_ALL=2;; + c) CHECK_ONLY=1;; d) DESCRIBE=1;; D) RC_CONFS=;; e) SHOW_EQUALS=1;; @@ -287,6 +291,12 @@ if [ "$DELETE" -a "$SHOW_ALL" ]; then fi # +# Pre-flight for `-c' command-line option +# +[ "$CHECK_ONLY" -a "$SHOW_ALL" ] && + die "$pgm: \`-c' option incompatible with \`-a'/\`-A' options" + +# # Process `-e', `-n', and `-N' command-line options # SEP=': ' @@ -312,6 +322,7 @@ if [ "$JAIL" -o "$ROOTDIR" ]; then $( [ "$DELETE" = "2" ] && echo \ -X ) $( [ "$SHOW_ALL" = "1" ] && echo \ -a ) $( [ "$SHOW_ALL" = "2" ] && echo \ -A ) + ${CHECK_ONLY:+-c} ${DESCRIBE:+-d} ${SHOW_EQUALS:+-e} ${IGNORE_UNKNOWNS:+-i} @@ -422,7 +433,7 @@ if [ "$SHOW_ALL" ]; then EXCEPT="IFS|EXCEPT|PATH|RC_DEFAULTS|OPTIND|DESCRIBE|SEP" EXCEPT="$EXCEPT|DELETE|SHOW_ALL|SHOW_EQUALS|SHOW_NAME" EXCEPT="$EXCEPT|SHOW_VALUE|SHOW_FILE|SYSRC_VERBOSE|RC_CONFS" - EXCEPT="$EXCEPT|pgm|SUCCESS|FAILURE" + EXCEPT="$EXCEPT|pgm|SUCCESS|FAILURE|CHECK_ONLY" EXCEPT="$EXCEPT|f_sysrc_desc_awk|f_sysrc_delete_awk" # @@ -515,6 +526,7 @@ fi # # Process command-line arguments # +costatus=$SUCCESS while [ $# -gt 0 ]; do NAME="${1%%=*}" @@ -528,7 +540,7 @@ while [ $# -gt 0 ]; do # first describe, then attempt to set # - if [ "$SYSRC_VERBOSE" ]; then + if [ "$SYSRC_VERBOSE" -a ! "$CHECK_ONLY" ]; then file=$( f_sysrc_find "$NAME" ) [ "$file" = "$RC_DEFAULTS" -o ! "$file" ] && \ file=$( f_sysrc_get 'rc_conf_files%%[$IFS]*' ) @@ -546,6 +558,20 @@ while [ $# -gt 0 ]; do fi # + # If `-c' is passed, simply compare and move on + # + if [ "$CHECK_ONLY" ]; then + if ! IGNORED=$( f_sysrc_get "$NAME?" ); then + costatus=$FAILURE + else + value=$( f_sysrc_get "$NAME" ) + [ "$value" = "${1#*=}" ] || costatus=$FAILURE + fi + shift 1 + continue + fi + + # # If `-N' is passed, simplify the output # if [ ! "$SHOW_VALUE" ]; then @@ -572,9 +598,16 @@ while [ $# -gt 0 ]; do fi ;; *) - if ! IGNORED="$( f_sysrc_get "$NAME?" )"; then - [ "$IGNORE_UNKNOWNS" ] \ - || echo "$pgm: unknown variable '$NAME'" + if ! IGNORED=$( f_sysrc_get "$NAME?" ); then + [ "$IGNORE_UNKNOWNS" ] || + echo "$pgm: unknown variable '$NAME'" + shift 1 + costatus=$FAILURE + continue + fi + + # The above check told us what we needed for `-c' + if [ "$CHECK_ONLY" ]; then shift 1 continue fi @@ -623,3 +656,5 @@ while [ $# -gt 0 ]; do esac shift 1 done + +[ ! "$CHECK_ONLY" ] || exit $costatus Modified: head/usr.sbin/sysrc/sysrc.8 ============================================================================== --- head/usr.sbin/sysrc/sysrc.8 Thu Nov 7 22:52:10 2013 (r257826) +++ head/usr.sbin/sysrc/sysrc.8 Thu Nov 7 23:00:11 2013 (r257827) @@ -32,13 +32,13 @@ .Nd safely edit system rc files .Sh SYNOPSIS .Nm -.Op Fl dDeFhinNqvx +.Op Fl cdDeFhinNqvx .Op Fl f Ar file .Op Fl j Ar jail | Fl R Ar dir .Ar name Ns Op = Ns Ar value .Ar ... .Nm -.Op Fl dDeFhinNqvx +.Op Fl cdDeFhinNqvx .Op Fl f Ar file .Op Fl j Ar jail | Fl R Ar dir .Fl a | A @@ -57,6 +57,12 @@ Dump a list of all non-default configura .It Fl A Dump a list of all configuration variables .Pq incl. defaults . +.It Fl c +Check if the value will change when assigning a new value. +If verbose +.Pq see Dq Fl v +prints a message stating whether a change would occur. +Exits with success if no change is necessary, else returns error status. .It Fl d Print a description of the given variable. .It Fl D From owner-svn-src-head@FreeBSD.ORG Thu Nov 7 23:01:41 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D674FFDF; Thu, 7 Nov 2013 23:01:41 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C3C362508; Thu, 7 Nov 2013 23:01:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA7N1fED097912; Thu, 7 Nov 2013 23:01:41 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA7N1fXT097911; Thu, 7 Nov 2013 23:01:41 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201311072301.rA7N1fXT097911@svn.freebsd.org> From: Devin Teske Date: Thu, 7 Nov 2013 23:01:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257828 - head/usr.sbin/sysrc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Nov 2013 23:01:41 -0000 Author: dteske Date: Thu Nov 7 23:01:41 2013 New Revision: 257828 URL: http://svnweb.freebsd.org/changeset/base/257828 Log: Comments and whitespace. Modified: head/usr.sbin/sysrc/sysrc Modified: head/usr.sbin/sysrc/sysrc ============================================================================== --- head/usr.sbin/sysrc/sysrc Thu Nov 7 23:00:11 2013 (r257827) +++ head/usr.sbin/sysrc/sysrc Thu Nov 7 23:01:41 2013 (r257828) @@ -215,7 +215,7 @@ jail_depend() echo "$SYSRC_VERSION" exit 1 ;; -[fRj]) # These flags take an argument - shift 1;; + shift 1 ;; esac shift 1 done @@ -537,9 +537,10 @@ while [ $# -gt 0 ]; do *=*) # # Like sysctl(8), if both `-d' AND "name=value" is passed, - # first describe, then attempt to set + # first describe (done above), then attempt to set # + # If verbose, prefix line with where the directive lives if [ "$SYSRC_VERBOSE" -a ! "$CHECK_ONLY" ]; then file=$( f_sysrc_find "$NAME" ) [ "$file" = "$RC_DEFAULTS" -o ! "$file" ] && \ @@ -613,8 +614,8 @@ while [ $# -gt 0 ]; do fi # - # Like sysctl(8), when `-d' is passed, - # desribe it rather than expanding it + # Like sysctl(8), when `-d' is passed, desribe it + # (already done above) rather than expanding it # if [ "$DESCRIBE" ]; then @@ -658,3 +659,7 @@ while [ $# -gt 0 ]; do done [ ! "$CHECK_ONLY" ] || exit $costatus + +################################################################################ +# END +################################################################################ From owner-svn-src-head@FreeBSD.ORG Thu Nov 7 23:04:41 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 370711C9; Thu, 7 Nov 2013 23:04:41 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 15128251B; Thu, 7 Nov 2013 23:04:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA7N4eWt098752; Thu, 7 Nov 2013 23:04:40 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA7N4eix098749; Thu, 7 Nov 2013 23:04:40 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201311072304.rA7N4eix098749@svn.freebsd.org> From: Devin Teske Date: Thu, 7 Nov 2013 23:04:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257829 - head/usr.sbin/sysrc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Nov 2013 23:04:41 -0000 Author: dteske Date: Thu Nov 7 23:04:40 2013 New Revision: 257829 URL: http://svnweb.freebsd.org/changeset/base/257829 Log: Fix a bug with `-e' that broke sometime around when I added `-F'. Also, revamp the `-e' output to truly be sh(1) compatible syntax (even if passed in `-v' for verbose output). Modified: head/usr.sbin/sysrc/sysrc head/usr.sbin/sysrc/sysrc.8 Modified: head/usr.sbin/sysrc/sysrc ============================================================================== --- head/usr.sbin/sysrc/sysrc Thu Nov 7 23:01:41 2013 (r257828) +++ head/usr.sbin/sysrc/sysrc Thu Nov 7 23:04:40 2013 (r257829) @@ -300,13 +300,14 @@ fi # Process `-e', `-n', and `-N' command-line options # SEP=': ' -[ "$SHOW_EQUALS" ] && SEP='="' +[ "$SHOW_FILE" ] && SHOW_EQUALS= [ "$SHOW_NAME" ] || SHOW_EQUALS= [ "$SYSRC_VERBOSE" = "0" ] && SYSRC_VERBOSE= if [ ! "$SHOW_VALUE" ]; then SHOW_NAME=1 SHOW_EQUALS= fi +[ "$SHOW_EQUALS" ] && SEP='="' # # Process `-j jail' and `-R dir' command-line options @@ -545,7 +546,11 @@ while [ $# -gt 0 ]; do file=$( f_sysrc_find "$NAME" ) [ "$file" = "$RC_DEFAULTS" -o ! "$file" ] && \ file=$( f_sysrc_get 'rc_conf_files%%[$IFS]*' ) - echo -n "$file: " + if [ "$SHOW_EQUALS" ]; then + echo -n ": $file; " + else + echo -n "$file: " + fi fi # @@ -587,14 +592,13 @@ while [ $# -gt 0 ]; do if f_sysrc_set "$NAME" "${1#*=}"; then if [ "$SHOW_FILE" ]; then after=$( f_sysrc_find "$NAME" ) - echo -n "${SHOW_NAME:+$NAME$SEP}" - echo -n "$before${SHOW_EQUALS:+\"}" - echo " -> $after" else after=$( f_sysrc_get "$NAME" ) - echo -n "${SHOW_NAME:+$NAME$SEP}" - echo "$before -> $after" fi + echo -n "${SHOW_NAME:+$NAME$SEP}" + echo -n "$before${SHOW_EQUALS:+\" #}" + echo -n " -> ${SHOW_EQUALS:+\"}$after" + echo "${SHOW_EQUALS:+\"}" fi fi ;; @@ -642,8 +646,13 @@ while [ $# -gt 0 ]; do continue fi - [ "$SYSRC_VERBOSE" ] && \ - echo -n "$( f_sysrc_find "$NAME" ): " + if [ "$SYSRC_VERBOSE" ]; then + if [ "$SHOW_EQUALS" ]; then + echo -n ": $( f_sysrc_find "$NAME" ); " + else + echo -n "$( f_sysrc_find "$NAME" ): " + fi + fi # # If `-N' is passed, simplify the output Modified: head/usr.sbin/sysrc/sysrc.8 ============================================================================== --- head/usr.sbin/sysrc/sysrc.8 Thu Nov 7 23:01:41 2013 (r257828) +++ head/usr.sbin/sysrc/sysrc.8 Thu Nov 7 23:04:40 2013 (r257829) @@ -70,10 +70,13 @@ Show default value(s) only (this is the passing `-f' with a NULL file-argument). .It Fl e Print query results as -.Ql var=value -.Pq useful for producing output to be fed back in . -Ignored if -.Fl n +.Xr sh 1 +compatible syntax +.Pq for example, Ql var=value . +Ignored if either +.Ql Fl n +or +.Ql Fl F is specified. .It Fl f Ar file Operate on the specified file(s) instead of the files obtained by reading the From owner-svn-src-head@FreeBSD.ORG Thu Nov 7 23:05:17 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id EED7B3FB; Thu, 7 Nov 2013 23:05:17 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DC32F251F; Thu, 7 Nov 2013 23:05:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA7N5Hne098941; Thu, 7 Nov 2013 23:05:17 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA7N5HWO098940; Thu, 7 Nov 2013 23:05:17 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201311072305.rA7N5HWO098940@svn.freebsd.org> From: Devin Teske Date: Thu, 7 Nov 2013 23:05:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257830 - head/usr.sbin/sysrc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Nov 2013 23:05:18 -0000 Author: dteske Date: Thu Nov 7 23:05:17 2013 New Revision: 257830 URL: http://svnweb.freebsd.org/changeset/base/257830 Log: Document SYSRC_VERBOSE enviroment variable in the manual. Modified: head/usr.sbin/sysrc/sysrc.8 Modified: head/usr.sbin/sysrc/sysrc.8 ============================================================================== --- head/usr.sbin/sysrc/sysrc.8 Thu Nov 7 23:04:40 2013 (r257829) +++ head/usr.sbin/sysrc/sysrc.8 Thu Nov 7 23:05:17 2013 (r257830) @@ -185,7 +185,7 @@ be called repeatedly). .Sh ENVIRONMENT The following environment variables are referenced by .Nm : -.Bl -tag -width ".Ev RC_DEFAULTS" +.Bl -tag -width ".Ev SYSRC_VERBOSE" .It Ev RC_CONFS Override default .Ql rc_conf_files @@ -194,6 +194,9 @@ Override default Location of .Ql /etc/defaults/rc.conf file. +.It Ev SYSRC_VERBOSE +Default verbosity. +Set to non-NULL to enable. .El .Sh DEPENDENCIES The following standard commands are required by From owner-svn-src-head@FreeBSD.ORG Thu Nov 7 23:21:52 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B7E60A97; Thu, 7 Nov 2013 23:21:52 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A3A3C2641; Thu, 7 Nov 2013 23:21:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA7NLq8D005568; Thu, 7 Nov 2013 23:21:52 GMT (envelope-from smh@svn.freebsd.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA7NLqrS005567; Thu, 7 Nov 2013 23:21:52 GMT (envelope-from smh@svn.freebsd.org) Message-Id: <201311072321.rA7NLqrS005567@svn.freebsd.org> From: Steven Hartland Date: Thu, 7 Nov 2013 23:21:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257831 - head/sys/cam/scsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Nov 2013 23:21:52 -0000 Author: smh Date: Thu Nov 7 23:21:52 2013 New Revision: 257831 URL: http://svnweb.freebsd.org/changeset/base/257831 Log: Corrected definition for old_rate to match d_rotation_rate MFC after: 2 Days X-MFC-With: r256956 Modified: head/sys/cam/scsi/scsi_da.c Modified: head/sys/cam/scsi/scsi_da.c ============================================================================== --- head/sys/cam/scsi/scsi_da.c Thu Nov 7 23:05:17 2013 (r257830) +++ head/sys/cam/scsi/scsi_da.c Thu Nov 7 23:21:52 2013 (r257831) @@ -3364,7 +3364,7 @@ dadone(struct cam_periph *periph, union * Disable queue sorting for non-rotational media * by default. */ - u_int old_rate = softc->disk->d_rotation_rate; + u_int16_t old_rate = softc->disk->d_rotation_rate; softc->disk->d_rotation_rate = scsi_2btoul(bdc->medium_rotation_rate); From owner-svn-src-head@FreeBSD.ORG Fri Nov 8 05:11:32 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id EA951981; Fri, 8 Nov 2013 05:11:32 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D92B42D3D; Fri, 8 Nov 2013 05:11:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA85BWPU027761; Fri, 8 Nov 2013 05:11:32 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA85BWAB027760; Fri, 8 Nov 2013 05:11:32 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201311080511.rA85BWAB027760@svn.freebsd.org> From: Ian Lepore Date: Fri, 8 Nov 2013 05:11:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257838 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Nov 2013 05:11:33 -0000 Author: ian Date: Fri Nov 8 05:11:32 2013 New Revision: 257838 URL: http://svnweb.freebsd.org/changeset/base/257838 Log: Build kernel tools along with other tools during world build, as well as during kernel build (if they didn't get done with world). This will make -DMODULES_WITH_WORLD work, and it ensures the kernel tools are built as part of 'make kernel-toolchain'. Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Fri Nov 8 03:02:42 2013 (r257837) +++ head/Makefile.inc1 Fri Nov 8 05:11:32 2013 (r257838) @@ -540,6 +540,7 @@ _cross-tools: @echo ">>> stage 3: cross tools" @echo "--------------------------------------------------------------" ${_+_}cd ${.CURDIR}; ${XMAKE} cross-tools + ${_+_}cd ${.CURDIR}; ${XMAKE} kernel-tools _includes: @echo @echo "--------------------------------------------------------------" From owner-svn-src-head@FreeBSD.ORG Fri Nov 8 08:44:10 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 9F4D0EF9; Fri, 8 Nov 2013 08:44:10 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8B3262981; Fri, 8 Nov 2013 08:44:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA88iAaI097672; Fri, 8 Nov 2013 08:44:10 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA88iAUB097671; Fri, 8 Nov 2013 08:44:10 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201311080844.rA88iAUB097671@svn.freebsd.org> From: Gleb Smirnoff Date: Fri, 8 Nov 2013 08:44:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257841 - head/sys/netsmb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Nov 2013 08:44:10 -0000 Author: glebius Date: Fri Nov 8 08:44:09 2013 New Revision: 257841 URL: http://svnweb.freebsd.org/changeset/base/257841 Log: Catch up with sb_timeo type change in r255138. This fixes smbfs operation. PR: kern/182963 Submitted by: Tomoaki AOKI Modified: head/sys/netsmb/smb_trantcp.c Modified: head/sys/netsmb/smb_trantcp.c ============================================================================== --- head/sys/netsmb/smb_trantcp.c Fri Nov 8 05:26:30 2013 (r257840) +++ head/sys/netsmb/smb_trantcp.c Fri Nov 8 08:44:09 2013 (r257841) @@ -155,8 +155,8 @@ nb_connect_in(struct nbpcb *nbp, struct SOCKBUF_LOCK(&so->so_rcv); soupcall_set(so, SO_RCV, nb_upcall, nbp); SOCKBUF_UNLOCK(&so->so_rcv); - so->so_rcv.sb_timeo = (5 * hz); - so->so_snd.sb_timeo = (5 * hz); + so->so_rcv.sb_timeo = (5 * SBT_1S); + so->so_snd.sb_timeo = (5 * SBT_1S); error = soreserve(so, nbp->nbp_sndbuf, nbp->nbp_rcvbuf); if (error) goto bad; From owner-svn-src-head@FreeBSD.ORG Fri Nov 8 09:57:06 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 2E1156F3; Fri, 8 Nov 2013 09:57:06 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1A2402DB5; Fri, 8 Nov 2013 09:57:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA89v6o2021347; Fri, 8 Nov 2013 09:57:06 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA89v3Xa021331; Fri, 8 Nov 2013 09:57:03 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201311080957.rA89v3Xa021331@svn.freebsd.org> From: Devin Teske Date: Fri, 8 Nov 2013 09:57:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257842 - in head/usr.sbin/bsdinstall: . scripts X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Nov 2013 09:57:06 -0000 Author: dteske Date: Fri Nov 8 09:57:03 2013 New Revision: 257842 URL: http://svnweb.freebsd.org/changeset/base/257842 Log: A series of changes tested together as a whole: + Add a `-D FILE" command-line option for overriding the path to the bsdinstall log file (BSDINSTALL_LOG env var). + Document new `-D FILE' in the man page for bsdinstall. + If FILE in `-D FILE' begins with a +, debug output goes to stdout (interleaved between dialog(1) invocations/output) as well as to FILE (minus the leading + of course). + If BSDINSTALL_LOG cannot be written, then debugging is disabled (except in the case of a leading + in the pathname, wherein debug will still be printed to stdout). + Update source code formatting style. + Fix a dangling participle ("Begun ..." -> "Began ...") + Rewrite the docsinstall script (was necessary to abate direct dependency on BSDINSTALL_LOG (instead, use fault-tolerant bsdconfig framework which displays appropriate errors for package management). NB: docsinstall is still using pkg(8) after this change. + Add additional debug output for dhclient/rtsol/wpa_cliscan + Display script errors in a textbox rather than just on stdout + Update many coments. + Add new f_show_err() API call (like f_show_msg but changes the dialog title to "Error")(see bsdconfig's `common.subr'). + Add new f_eval_catch() API call for executing a command via eval but not before logging the command to debug. Several example cases documented in API header for function in bsdconfig's `common.subr'. + Fix dialog auto-sizing when launched as an rvalue to a pipe for indirected scripts (previously would default to 24x80 sizing in this case, now it can autosize to full size even when in a pipe chain). + Fix bug in f_snprintf if $format argument began with "-"; printf would misinterpret as a flag. (this is in bsdcofig's `strings.subr'). + Add accompanying f_sprintf() and f_vsprintf() to go along with already existing f_snprintf() and f_vsnprintf() (see bsdconfig's `strings.subr'). + Remove some unnecessary default ZFS datasets from the automatic "zfsboot" script. Such as: /usr/ports/distfiles /usr/ports/packages /usr/obj /var/db /var/empty /var/mail and /var/run (these can all be created as-needed once the system is installed). + Remove setuid=off for /usr/home (as discussed from last round of CFT). + Fix some i18n string violations in "zfsboot". + Bolster debugging output in "zfsboot". + Fix some string quoting issues in "zfsboot". + Fix some variable scope issues in "zfsboot". + Change "Create" to "Install" in "zfsboot" main menu. + Increase error checking in "zfsboot" (type-check arguments and such). + Add call to "graid destroy" killing automatic metadata (part of the series of pedantic destructions we do when bootstrapping a new/naked disk). + Make judicious use of new f_eval_catch() in "zfsboot". + Fixup some variable names for consistency (zfsboot). + Fix an underride syntax parameter expansion folly (zfsboot). + Confirm layout if not explicitly chosen when blindly proceeding (no longer have to touch anything on the ZFS menu if it scares you, just choose the omnibus "Install" option at the top and you'll be prompted to select vdev type and disks in the layout confirmation dialog). + Change numbered menu items to alphabetic for more efficient navigation. + Consolidate vdev selection and disk selection into a single stateful menu which performs validation and allows backing out to each previous menu as you go deeper. + Redesign the ``Last Chance'' dialog (still using the same colors, but make it conform to a tolerable width and make disks appear in a block- quote style indented region). + Fix a bug wherein we used the a lowercase variable name by accident (actual variable name declared as all-uppercase) at the time of initializing fstab(5) (not believed to cause any issues though). + Update the geli setup infobox for each provider being initialized (not just at the onset -- since each ``geli init'' causes kernel messages to push our infobox off-screen). Reviewed by: Allan Jude Discussed on: -current MFC after: 3 days Modified: head/usr.sbin/bsdinstall/bsdinstall head/usr.sbin/bsdinstall/bsdinstall.8 head/usr.sbin/bsdinstall/scripts/auto head/usr.sbin/bsdinstall/scripts/config head/usr.sbin/bsdinstall/scripts/docsinstall head/usr.sbin/bsdinstall/scripts/jail head/usr.sbin/bsdinstall/scripts/netconfig_ipv4 head/usr.sbin/bsdinstall/scripts/netconfig_ipv6 head/usr.sbin/bsdinstall/scripts/script head/usr.sbin/bsdinstall/scripts/wlanconfig head/usr.sbin/bsdinstall/scripts/zfsboot Modified: head/usr.sbin/bsdinstall/bsdinstall ============================================================================== --- head/usr.sbin/bsdinstall/bsdinstall Fri Nov 8 08:44:09 2013 (r257841) +++ head/usr.sbin/bsdinstall/bsdinstall Fri Nov 8 09:57:03 2013 (r257842) @@ -1,6 +1,7 @@ #!/bin/sh #- # Copyright (c) 2011 Nathan Whitehorn +# Copyright (c) 2013 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -25,17 +26,62 @@ # SUCH DAMAGE. # # $FreeBSD$ +# +############################################################ INCLUDES + +# Delay processing of debug flags as the parent until MAIN. export'd to disable +# re-processing of flags (all children log to the parent's log file). +# +export DEBUG_SELF_INITIALIZE= + +BSDCFG_SHARE="/usr/share/bsdconfig" +. $BSDCFG_SHARE/common.subr || exit 1 + +############################################################ GLOBALS -: ${BSDINSTALL_LOG="/tmp/bsdinstall_log"}; export BSDINSTALL_LOG : ${BSDINSTALL_TMPETC="/tmp/bsdinstall_etc"}; export BSDINSTALL_TMPETC : ${BSDINSTALL_TMPBOOT="/tmp/bsdinstall_boot"}; export BSDINSTALL_TMPBOOT : ${PATH_FSTAB="$BSDINSTALL_TMPETC/fstab"}; export PATH_FSTAB : ${BSDINSTALL_DISTDIR="/usr/freebsd-dist"}; export BSDINSTALL_DISTDIR : ${BSDINSTALL_CHROOT="/mnt"}; export BSDINSTALL_CHROOT -VERB=${1:-auto}; shift +export debugFile="${debugFile-${BSDINSTALL_LOG-/tmp/bsdinstall_log}}" + +############################################################ MAIN + +# +# Process command-line arguments +# +while getopts $GETOPTS_STDARGS ignored; do + : just skipping known flags +done +shift $(( $OPTIND - 1 )) + +# What are we here to do? +VERB="${1:-auto}"; shift [ -d "$BSDINSTALL_TMPETC" ] || mkdir -p "$BSDINSTALL_TMPETC" [ -d "$BSDINSTALL_TMPBOOT" ] || mkdir -p "$BSDINSTALL_TMPBOOT" -echo "Running installation step: $VERB $@" >> "$BSDINSTALL_LOG" -exec "/usr/libexec/bsdinstall/$VERB" "$@" 2>> "$BSDINSTALL_LOG" + +# Only enable debugging if debugFile is non-NULL and can be initialized +f_quietly f_debug_init +f_isset debugFile || debug= + +f_dprintf "Running installation step: %s %s" "$VERB" "$*" +if [ "$debug" ]; then + case "$debugFile" in + # If NULL, send errors to the bit-bucket + "") exec "/usr/libexec/bsdinstall/$VERB" "$@" 2> /dev/null ;; + # If begins with `+', send errors to both terminal and file (no `+') + +*) exec "/usr/libexec/bsdinstall/$VERB" "$@" \ + 2>&1 >&$TERMINAL_STDOUT_PASSTHRU | tee "${debugFile#+}" ;; + # Otherwise, just send errors to the file specified + *) exec "/usr/libexec/bsdinstall/$VERB" "$@" 2>> "$debugFile" + esac +else + exec "/usr/libexec/bsdinstall/$VERB" "$@" 2> /dev/null +fi + +################################################################################ +# END +################################################################################ Modified: head/usr.sbin/bsdinstall/bsdinstall.8 ============================================================================== --- head/usr.sbin/bsdinstall/bsdinstall.8 Fri Nov 8 08:44:09 2013 (r257841) +++ head/usr.sbin/bsdinstall/bsdinstall.8 Fri Nov 8 09:57:03 2013 (r257842) @@ -33,6 +33,7 @@ .Nd system installer .Sh SYNOPSIS .Nm +.Op Ar options .Op Ar target .Op Ar ... .Sh DESCRIPTION @@ -49,6 +50,17 @@ invoked with no arguments, it will invok target, which provides a standard interactive installation, invoking the others in sequence. To perform a scripted installation, these subtargets can be invoked separately by an installation script. +.Sh OPTIONS +.Nm +supports the following options, global to all targets: +.Bl -tag -width indent+ +.It Fl D Ar file +Provide a path for the installation log file +.Pq overrides Ev BSDINSTALL_LOG . +See +.Sx ENVIRONMENT VARIABLES +for more information on +.Ev BSDINSTALL_LOG . .Sh TARGETS Most of the following targets are only useful for scripting the installer. For interactive use, most users will be interested only in the Modified: head/usr.sbin/bsdinstall/scripts/auto ============================================================================== --- head/usr.sbin/bsdinstall/scripts/auto Fri Nov 8 08:44:09 2013 (r257841) +++ head/usr.sbin/bsdinstall/scripts/auto Fri Nov 8 09:57:03 2013 (r257842) @@ -1,6 +1,7 @@ #!/bin/sh #- # Copyright (c) 2011 Nathan Whitehorn +# Copyright (c) 2013 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -25,8 +26,13 @@ # SUCH DAMAGE. # # $FreeBSD$ +# +############################################################ INCLUDES + +BSDCFG_SHARE="/usr/share/bsdconfig" +. $BSDCFG_SHARE/common.subr || exit 1 -echo "Begun Installation at $(date)" > $BSDINSTALL_LOG +############################################################ FUNCTIONS error() { test -n "$DISTDIR_IS_UNIONFS" && umount -f $BSDINSTALL_DISTDIR @@ -41,6 +47,9 @@ error() { fi } +############################################################ MAIN + +f_dprintf "Began Installation at %s" "$( date )" rm -rf $BSDINSTALL_TMPETC mkdir $BSDINSTALL_TMPETC @@ -126,7 +135,12 @@ case "$PARTMODE" in sh 2>&1 ;; "Manual") # Manual - bsdinstall partedit || error + if f_isset debugFile; then + # Give partedit the path to our logfile so it can append + BSDINSTALL_LOG="${debugFile#+}" bsdinstall partedit || error + else + bsdinstall partedit || error + fi bsdinstall mount || error ;; "ZFS") # ZFS @@ -247,5 +261,8 @@ fi bsdinstall entropy bsdinstall umount -echo "Installation Completed at $(date)" >> $BSDINSTALL_LOG +f_dprintf "Installation Completed at %s" "$( date )" +################################################################################ +# END +################################################################################ Modified: head/usr.sbin/bsdinstall/scripts/config ============================================================================== --- head/usr.sbin/bsdinstall/scripts/config Fri Nov 8 08:44:09 2013 (r257841) +++ head/usr.sbin/bsdinstall/scripts/config Fri Nov 8 09:57:03 2013 (r257842) @@ -1,6 +1,7 @@ #!/bin/sh #- # Copyright (c) 2011 Nathan Whitehorn +# Copyright (c) 2013 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -25,6 +26,83 @@ # SUCH DAMAGE. # # $FreeBSD$ +# +############################################################ CONFIGURATION + +# +# Location of ttys(5) +# +ETC_TTYS=/etc/ttys + +############################################################ FUNCTIONS + +# ttus_set_type $serterm +# +# Set terminal type of `ttyu*' and entries in ttys(5) to $serterm. +# +ttus_set_type() +{ + local serterm="$1" err + + # + # Create new temporary file to write our ttys(5) update with new types. + # + local tmpfile="$( mktemp -t "pgm" )" + [ "$tmpfile" ] || return $FAILURE + + # + # Fixup permissions and ownership (mktemp(1) creates the temporary file + # with 0600 permissions -- change the permissions and ownership to + # match ttys(5) before we write it out and mv(1) it into place). + # + local mode="$( stat -f '%#Lp' "$ETC_TTYS" 2> /dev/null )" + local owner="$( stat -f '%u:%g' "$ETC_TTYS" 2> /dev/null )" + f_quietly chmod "${mode:-0644}" "$tmpfile" + f_quietly chown "${owner:-root:wheel}" "$tmpfile" + + # + # Operate on ttys(5), replacing only the types of `ttyu*' terminals + # with the new type. + # + if ! err=$( awk -v serterm="$serterm" ' + BEGIN { + } + { + # "Skip" blank-lines, lines containing only whitespace, and + # lines containing only a comment or whitespace-then-comment. + # + if ( $0 ~ /^[[:space:]]*(#|$)/ ) { print; next } + + # "Skip" terminal types other than those supported + # + if ( $1 !~ /^ttyu.*$/ ) { print; next } + + # Change the terminal type to the new value and enable it + # + match($0, + /[[:alnum:]\.\+-_]+[[:space:]]+(on|off)([[:space:]]|$).*$/) + if ( ! RSTART ) { print; next } + start = RSTART + left=substr($0, 0, RSTART - 1) + right=substr($0, start) + match(right, + /[[:alnum:]\.\+-_]+[[:space:]]+(on|off)([[:space:]]+|$)/) + right=substr(right, RSTART + RLENGTH) + printf "%s%s on %s\n", left, serterm, right + } + ' "$ETC_TTYS" > "$tmpfile" 2>&1 ); then + f_show_err "%s" "$err" + return $FAILURE + fi + if ! err=$( mv -f "$tmpfile" "$ETC_TTYS" 2>&1 ); then + f_show_err "%s" "$err" + return $FAILURE + fi + + return $SUCCESS +} + +############################################################ MAIN cat $BSDINSTALL_TMPETC/rc.conf.* >> $BSDINSTALL_TMPETC/rc.conf rm $BSDINSTALL_TMPETC/rc.conf.* @@ -39,3 +117,8 @@ cp $BSDINSTALL_TMPBOOT/* $BSDINSTALL_CHR # Set up other things from installed config chroot $BSDINSTALL_CHROOT /usr/bin/newaliases +kbdcontrol -d || ttus_set_type vt100 + +################################################################################ +# END +################################################################################ Modified: head/usr.sbin/bsdinstall/scripts/docsinstall ============================================================================== --- head/usr.sbin/bsdinstall/scripts/docsinstall Fri Nov 8 08:44:09 2013 (r257841) +++ head/usr.sbin/bsdinstall/scripts/docsinstall Fri Nov 8 09:57:03 2013 (r257842) @@ -1,6 +1,7 @@ #!/bin/sh #- # Copyright (c) 2011 Marc Fonvieille +# Copyright (c) 2013 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -25,62 +26,137 @@ # SUCH DAMAGE. # # $FreeBSD$ +# +############################################################ INCLUDES + +BSDCFG_SHARE="/usr/share/bsdconfig" +. $BSDCFG_SHARE/common.subr || exit 1 +f_dprintf "%s: loading includes..." "$0" +f_include $BSDCFG_SHARE/dialog.subr +f_include $BSDCFG_SHARE/mustberoot.subr +f_include $BSDCFG_SHARE/packages/packages.subr +############################################################ CONFIGURATION -exec 3>&1 -DOCS=$(dialog --backtitle "FreeBSD Installer" \ - --title "FreeBSD Documentation Installation" --separate-output \ - --checklist "This menu will allow you to install the whole documentation set -from the FreeBSD Documentation Project: Handbook, FAQ and articles.\n\n -Please select the language versions you wish to install. At minimum, -you should install the English version, this is the original version -of the documentation.\n\n -NB: This requires a working, configured network connection." 0 0 0 \ - bn "Bengali Documentation" ${DIST_DOC_BN:-off} \ - da "Danish Documentation" ${DIST_DOC_DA:-off} \ - de "German Documentation" ${DIST_DOC_DE:-off} \ - el "Greek Documentation" ${DIST_DOC_EL:-off} \ - en "English Documentation (recommended)" ${DIST_DOC_EN:-on} \ - es "Spanish Documentation" ${DIST_DOC_ES:-off} \ - fr "French Documentation" ${DIST_DOC_FR:-off} \ - hu "Hungarian Documentation" ${DIST_DOC_HU:-off} \ - it "Italian Documentation" ${DIST_DOC_IT:-off} \ - ja "Japanese Documentation" ${DIST_DOC_JA:-off} \ - mn "Mongolian Documentation" ${DIST_DOC_MN:-off} \ - nl "Dutch Documentation" ${DIST_DOC_NL:-off} \ - pl "Polish Documentation" ${DIST_DOC_PL:-off} \ - pt "Portuguese Documentation" ${DIST_DOC_PT:-off} \ - ru "Russian Documentation" ${DIST_DOC_RU:-off} \ - sr "Serbian Documentation" ${DIST_DOC_SR:-off} \ - tr "Turkish Documentation" ${DIST_DOC_TR:-off} \ - zh_cn "Simplified Chinese Documentation" ${DIST_DOC_ZH_CN:-off} \ - zh_tw "Traditional Chinese Documentation" ${DIST_DOC_ZH_TW:-off} \ -2>&1 1>&3) -test $? -eq 0 || exit 0 -exec 3>&- - -# Let pkg(8) be able to use name servers -cp ${BSDINSTALL_TMPETC}/resolv.conf ${BSDINSTALL_CHROOT}/etc - -error() { - dialog --backtitle "FreeBSD Installer" --title "Error" --msgbox \ - "Could not install package $1 (`tail -n 1 ${BSDINSTALL_LOG}`)" 0 0 - exit 1 +# +# List of languages to display (descriptions pulled from $msg_{lang}doc_desc) +# +: ${DOCSINSTALL_LANGS:=\ + bn da de el en es fr hu it ja mn nl pl pt ru sr tr zh_cn zh_tw \ } +############################################################ GLOBALS + +# +# Strings that should be moved to an i18n file and loaded with f_include_lang() +# +hline_arrows_space_tab_enter="Use arrows, SPACE, TAB or ENTER" +msg_bndoc_desc="Bengali Documentation" +msg_cancel="Cancel" +msg_dadoc_desc="Danish Documentation" +msg_dedoc_desc="German Documentation" +msg_docsinstall_menu_text="This menu allows you to install the whole documentation set from\nthe FreeBSD Documentation Project: Handbook, FAQ, and articles.\n\nPlease select the language versions you wish to install. At\nminimum, you should install the English version, the original\nversion of the documentation." +msg_eldoc_desc="Greek Documentation" +msg_endoc_desc="English Documentation (recommended)" +msg_esdoc_desc="Spanish Documentation" +msg_frdoc_desc="French Documentation" +msg_freebsd_documentation_installation="FreeBSD Documentation Installation" +msg_freebsd_installer="FreeBSD Installer" +msg_hudoc_desc="Hungarian Documentation" +msg_itdoc_desc="Italian Documentation" +msg_jadoc_desc="Japanese Documentation" +msg_mndoc_desc="Mongolian Documentation" +msg_nldoc_desc="Dutch Documentation" +msg_ok="OK" +msg_pldoc_desc="Polish Documentation" +msg_ptdoc_desc="Portuguese Documentation" +msg_rudoc_desc="Russian Documentation" +msg_srdoc_desc="Serbian Documentation" +msg_trdoc_desc="Turkish Documentation" +msg_zh_cndoc_desc="Simplified Chinese Documentation" +msg_zh_twdoc_desc="Traditional Chinese Documentation" + +############################################################ FUNCTIONS + +# dialog_menu_main +# +# Display the dialog(1)-based application main menu. +# +dialog_menu_main() +{ + local title="$DIALOG_TITLE" + local btitle="$DIALOG_BACKTITLE" + local prompt="$msg_docsinstall_menu_text" + local check_list= # Calculated below + local hline="$hline_arrows_space_tab_enter" + + local lang desc upper status + for lang in $DOCSINSTALL_LANGS; do + # Fetch the i18n description to display + f_getvar msg_${lang}doc_desc desc + f_shell_escape "$desc" desc + + # Get default status for each language + upper=$( echo "$lang" | awk '{print toupper($0)}' ) + case "$lang" in + en) f_getvar DIST_DOC_$upper:-on status ;; + *) f_getvar DIST_DOC_$upper:-off status + esac + + check_list="$check_list + '$lang' '$desc' '$status' + " # END-QUOTE + done + + local height width rows + eval f_dialog_checklist_size height width rows \ + \"\$title\" \ + \"\$btitle\" \ + \"\$prompt\" \ + \"\$hline\" \ + $check_list + local selected + selected=$( eval $DIALOG \ + --title \"\$title\" \ + --backtitle \"\$btitle\" \ + --hline \"\$hline\" \ + --ok-label \"\$msg_ok\" \ + --cancel-label \"\$msg_cancel\" \ + --checklist \"\$prompt\" \ + $height $width $rows \ + $check_list \ + 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD + ) + local retval=$? + f_dialog_menutag_store -s "$selected" + return $retval +} -clear -echo "FreeBSD Installer" -echo "========================" -echo - -echo "Please wait while the repository metadata is fetched." -echo "This may take a few moments." - -env ASSUME_ALWAYS_YES=1 pkg -c ${BSDINSTALL_CHROOT} install pkg \ - || error pkg - -for i in $DOCS; do - env ASSUME_ALWAYS_YES=1 pkg -c ${BSDINSTALL_CHROOT} install ${i}-freebsd-doc \ - || error $i-freebsd-doc +############################################################ MAIN + +# +# Initialize +# +f_dialog_title "$msg_freebsd_documentation_installation" +f_dialog_backtitle "$msg_freebsd_installer" +f_mustberoot_init + +# +# Launch application main menu +# +dialog_menu_main || f_die +f_dialog_menutag_fetch selected + +# Let pkg_add be able to use name servers +f_quietly cp -f $BSDINSTALL_TMPETC/resolv.conf $BSDINSTALL_CHROOT/etc/ + +# +# Install each of the selected packages +# +for lang in $selected; do + f_package_add $lang-freebsd-doc || return $FAILURE done + +################################################################################ +# END +################################################################################ Modified: head/usr.sbin/bsdinstall/scripts/jail ============================================================================== --- head/usr.sbin/bsdinstall/scripts/jail Fri Nov 8 08:44:09 2013 (r257841) +++ head/usr.sbin/bsdinstall/scripts/jail Fri Nov 8 09:57:03 2013 (r257842) @@ -1,6 +1,7 @@ #!/bin/sh #- # Copyright (c) 2011 Nathan Whitehorn +# Copyright (c) 2013 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -25,8 +26,15 @@ # SUCH DAMAGE. # # $FreeBSD$ +# +############################################################ INCLUDES + +BSDCFG_SHARE="/usr/share/bsdconfig" +. $BSDCFG_SHARE/common.subr || exit 1 + +############################################################ MAIN -echo "Begun Installation at $(date)" > $BSDINSTALL_LOG +f_dprintf "Began Installation at %s" "$( date )" export BSDINSTALL_CHROOT=$1 error() { @@ -112,5 +120,8 @@ cp /etc/localtime $1/etc bsdinstall entropy -echo "Installation Completed at $(date)" >> $BSDINSTALL_LOG +f_dprintf "Installation Completed at %s" "$(date)" +################################################################################ +# END +################################################################################ Modified: head/usr.sbin/bsdinstall/scripts/netconfig_ipv4 ============================================================================== --- head/usr.sbin/bsdinstall/scripts/netconfig_ipv4 Fri Nov 8 08:44:09 2013 (r257841) +++ head/usr.sbin/bsdinstall/scripts/netconfig_ipv4 Fri Nov 8 09:57:03 2013 (r257842) @@ -1,6 +1,7 @@ #!/bin/sh #- # Copyright (c) 2011 Nathan Whitehorn +# Copyright (c) 2013 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -25,13 +26,15 @@ # SUCH DAMAGE. # # $FreeBSD$ +# +############################################################ INCLUDES + +BSDCFG_SHARE="/usr/share/bsdconfig" +. $BSDCFG_SHARE/common.subr || exit 1 +f_dprintf "%s: loading includes..." "$0" +f_include $BSDCFG_SHARE/dialog.subr -: ${DIALOG_OK=0} -: ${DIALOG_CANCEL=1} -: ${DIALOG_HELP=2} -: ${DIALOG_EXTRA=3} -: ${DIALOG_ITEM_HELP=4} -: ${DIALOG_ESC=255} +############################################################ MAIN INTERFACE=$1 IFCONFIG_PREFIX="$2" @@ -49,8 +52,9 @@ if [ $? -eq $DIALOG_OK ]; then if [ ! -z $BSDINSTALL_CONFIGCURRENT ]; then dialog --backtitle 'FreeBSD Installer' --infobox "Acquiring DHCP lease..." 0 0 - dhclient $INTERFACE 2>> $BSDINSTALL_LOG + err=$( dhclient $INTERFACE 2>&1 ) if [ $? -ne 0 ]; then + f_dprintf "%s" "$err" dialog --backtitle 'FreeBSD Installer' --msgbox "DHCP lease acquisition failed." 0 0 exec $0 ${INTERFACE} "${IFCONFIG_PREFIX}" fi @@ -86,3 +90,6 @@ if [ ! -z $BSDINSTALL_CONFIGCURRENT ]; t fi fi +################################################################################ +# END +################################################################################ Modified: head/usr.sbin/bsdinstall/scripts/netconfig_ipv6 ============================================================================== --- head/usr.sbin/bsdinstall/scripts/netconfig_ipv6 Fri Nov 8 08:44:09 2013 (r257841) +++ head/usr.sbin/bsdinstall/scripts/netconfig_ipv6 Fri Nov 8 09:57:03 2013 (r257842) @@ -1,8 +1,8 @@ #!/bin/sh #- # Copyright (c) 2011 Nathan Whitehorn -# All rights reserved. # Copyright (c) 2011 The FreeBSD Foundation +# Copyright (c) 2013 Devin Teske # All rights reserved. # # Portions of this software were developed by Bjoern Zeeb @@ -30,19 +30,21 @@ # SUCH DAMAGE. # # $FreeBSD$ +# +############################################################ INCLUDES + +BSDCFG_SHARE="/usr/share/bsdconfig" +. $BSDCFG_SHARE/common.subr || exit 1 +f_dprintf "%s: loading includes..." "$0" +f_include $BSDCFG_SHARE/dialog.subr + +############################################################ MAIN # # TODO: # - Add DHCPv6 support once FreeBSD ships with it. # -: ${DIALOG_OK=0} -: ${DIALOG_CANCEL=1} -: ${DIALOG_HELP=2} -: ${DIALOG_EXTRA=3} -: ${DIALOG_ITEM_HELP=4} -: ${DIALOG_ESC=255} - INTERFACE=$1 case "${INTERFACE}" in "") dialog --backtitle 'FreeBSD Installer' --title 'Network Configuration' \ @@ -61,8 +63,9 @@ while : ; do dialog --backtitle 'FreeBSD Installer' \ --infobox "Sending Router Solicitation ..." 0 0 ifconfig ${INTERFACE} inet6 -ifdisabled accept_rtadv up - rtsol -F $INTERFACE 2>> $BSDINSTALL_LOG + err=$( rtsol -F $INTERFACE 2>&1 ) if [ $? -ne 0 ]; then + f_dprintf "%s" "$err" dialog --backtitle 'FreeBSD Installer' --msgbox "SLAAC failed." 0 0 AGAIN=" again" continue @@ -148,3 +151,6 @@ if [ ! -z $BSDINSTALL_CONFIGCURRENT ]; t fi fi +################################################################################ +# END +################################################################################ Modified: head/usr.sbin/bsdinstall/scripts/script ============================================================================== --- head/usr.sbin/bsdinstall/scripts/script Fri Nov 8 08:44:09 2013 (r257841) +++ head/usr.sbin/bsdinstall/scripts/script Fri Nov 8 09:57:03 2013 (r257842) @@ -1,6 +1,7 @@ #!/bin/sh #- # Copyright (c) 2013 Nathan Whitehorn +# Copyright (c) 2013 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -25,27 +26,55 @@ # SUCH DAMAGE. # # $FreeBSD$ +# +############################################################ INCLUDES + +BSDCFG_SHARE="/usr/share/bsdconfig" +. $BSDCFG_SHARE/common.subr || exit 1 +f_dprintf "%s: loading includes..." "$0" +f_include $BSDCFG_SHARE/dialog.subr +f_include $BSDCFG_SHARE/variable.subr + +############################################################ CONFIGURATION # VARIABLES: # PARTITIONS # DISTRIBUTIONS # BSDINSTALL_DISTDIR -error() { - test -f $PATH_FSTAB && bsdinstall umount - echo "Installation Error!" - cat $BSDINSTALL_LOG - echo "Installation Error!" +############################################################ GLOBALS + +# +# Strings that should be moved to an i18n file and loaded with f_include_lang() +# +msg_installation_error="Installation Error!" + +############################################################ FUNCTIONS + +error() +{ + [ -f "$PATH_FSTAB" ] && bsdinstall umount + + local file + f_getvar "$VAR_DEBUG_FILE#+" file + if [ "$file" ]; then + f_dialog_title "$msg_installation_error" + f_dialog_textbox "$file" + # No need to restore title, pining for the fjords + fi + exit 1 } +############################################################ MAIN + set -e trap error EXIT SCRIPT="$1" shift -echo "Begun Installation at $(date)" > $BSDINSTALL_LOG +f_dprintf "Began Instalation at %s" "$( date )" rm -rf $BSDINSTALL_TMPETC mkdir $BSDINSTALL_TMPETC @@ -55,6 +84,14 @@ split -a 2 -p '^#!.*' "$SCRIPT" /tmp/bsd : ${DISTRIBUTIONS="kernel.txz base.txz"}; export DISTRIBUTIONS export BSDINSTALL_DISTDIR +# Re-initialize a new log if preamble changed BSDINSTALL_LOG +if [ "$BSDINSTALL_LOG" != "${debugFile#+}" ]; then + export debugFile="$BSDINSTALL_LOG" + f_quietly f_debug_init + # NB: Being scripted, let debug go to terminal for invalid debugFile + f_dprintf "Began Instalation at %s" "$( date )" +fi + # Make partitions rm -f $PATH_FSTAB touch $PATH_FSTAB @@ -86,6 +123,10 @@ fi bsdinstall entropy bsdinstall umount -echo "Installation Completed at $(date)" >> $BSDINSTALL_LOG +f_dprintf "Installation Completed at %s" "$( date )" trap true EXIT + +################################################################################ +# END +################################################################################ Modified: head/usr.sbin/bsdinstall/scripts/wlanconfig ============================================================================== --- head/usr.sbin/bsdinstall/scripts/wlanconfig Fri Nov 8 08:44:09 2013 (r257841) +++ head/usr.sbin/bsdinstall/scripts/wlanconfig Fri Nov 8 09:57:03 2013 (r257842) @@ -1,6 +1,7 @@ #!/bin/sh #- # Copyright (c) 2011 Nathan Whitehorn +# Copyright (c) 2013 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -25,6 +26,13 @@ # SUCH DAMAGE. # # $FreeBSD$ +# +############################################################ INCLUDES + +BSDCFG_SHARE="/usr/share/bsdconfig" +. $BSDCFG_SHARE/common.subr || exit 1 + +############################################################ MAIN echo -n > $BSDINSTALL_TMPETC/wpa_supplicant.conf chmod 0600 $BSDINSTALL_TMPETC/wpa_supplicant.conf @@ -50,7 +58,8 @@ if [ $? -ne 0 -a -z $BSDINSTALL_CONFIGCU exit 1 fi -wpa_cli scan >>$BSDINSTALL_LOG +output=$( wpa_cli scan 2>&1 ) +f_dprintf "%s" "$output" dialog --backtitle "FreeBSD Installer" --title "Scanning" --ok-label "Skip" \ --pause "Waiting 5 seconds to scan for wireless networks..." \ 9 40 5 || exit 1 @@ -132,6 +141,13 @@ echo "network={ }" >> $BSDINSTALL_TMPETC/wpa_supplicant.conf # Bring up new network -test ! -z $BSDINSTALL_CONFIGCURRENT && wpa_cli reconfigure >>$BSDINSTALL_LOG +if [ "$BSDINSTALL_CONFIGCURRENT" ]; then + output=$( wpa_cli reconfigure 2>&1 ) + f_dprintf "%s" "$output" +fi exit 0 + +################################################################################ +# END +################################################################################ Modified: head/usr.sbin/bsdinstall/scripts/zfsboot ============================================================================== --- head/usr.sbin/bsdinstall/scripts/zfsboot Fri Nov 8 08:44:09 2013 (r257841) +++ head/usr.sbin/bsdinstall/scripts/zfsboot Fri Nov 8 09:57:03 2013 (r257842) @@ -67,7 +67,7 @@ f_include $BSDCFG_SHARE/variable.subr # # Should we use geli(8) to encrypt the drives? # -: ${ZFSBOOT_GELI_ENCRYPTION:=} +: ${ZFSBOOT_GELI_ENCRYPTION=} # # Default name the unencrypted pool when using geli(8) to encrypt the drives @@ -101,7 +101,7 @@ f_include $BSDCFG_SHARE/variable.subr : ${ZFSBOOT_SWAP_SIZE:=2g} # -# Default ZFS layout for root zpool +# Default ZFS datasets for root zpool # # NOTE: Requires /tmp, /var/tmp, /$ZFSBOOT_BOOTFS_NAME/$ZFSBOOT_BOOTFS_NAME # NOTE: Anything after pound/hash character [#] is ignored as a comment. @@ -120,65 +120,109 @@ f_isset ZFSBOOT_DATASETS || ZFSBOOT_DATA /usr mountpoint=/usr,canmount=off # Home directories separated so they are common to all BEs - /usr/home setuid=off + /usr/home # NB: /home is a symlink to /usr/home # Ports tree /usr/ports compression=lz4,setuid=off - /usr/ports/distfiles compression=off,exec=off,setuid=off - /usr/ports/packages compression=off,exec=off,setuid=off # Source tree (compressed) /usr/src compression=lz4,exec=off,setuid=off - /usr/obj # Object files # Create /var and friends /var mountpoint=/var /var/crash compression=lz4,exec=off,setuid=off - /var/db exec=off,setuid=off - /var/empty exec=off,setuid=off /var/log compression=lz4,exec=off,setuid=off - /var/mail compression=lz4,exec=off,setuid=off - /var/run exec=off,setuid=off /var/tmp compression=lz4,exec=on,setuid=off " # END-QUOTE +# +# If interactive and the user has not explicitly chosen a vdev type or disks, +# make the user confirm scripted/default choices when proceeding to install. +# +: ${ZFSBOOT_CONFIRM_LAYOUT:=1} + ############################################################ GLOBALS # +# Format of a line in printf(1) syntax to add to fstab(5) +# +FSTAB_FMT="%s\t\t%s\t%s\t%s\t\t%s\t%s\n" + +# +# Command strings for various tasks +# +CHMOD_MODE='chmod %s "%s"' +DD_WITH_OPTIONS='dd if="%s" of="%s" %s' +ECHO_APPEND='echo "%s" >> "%s"' +GELI_ATTACH='geli attach -j - -k "%s" "%s"' +GELI_PASSWORD_INIT='geli init -b -B "%s" -e %s -J - -K "%s" -l 256 -s 4096 "%s"' +GNOP_CREATE='gnop create -S 4096 "%s"' +GPART_ADD='gpart add -t %s "%s"' +GPART_ADD_INDEX='gpart add -i %s -t %s "%s"' +GPART_ADD_INDEX_WITH_SIZE='gpart add -i %s -t %s -s %s "%s"' +GPART_ADD_LABEL='gpart add -l %s -t %s "%s"' +GPART_ADD_LABEL_WITH_SIZE='gpart add -l %s -t %s -s %s "%s"' +GPART_BOOTCODE='gpart bootcode -b "%s" "%s"' +GPART_BOOTCODE_PART='gpart bootcode -b "%s" -p "%s" -i %s "%s"' +GPART_CREATE='gpart create -s %s "%s"' +GPART_SET_ACTIVE='gpart set -a active -i %s "%s"' +LN_SF='ln -sf "%s" "%s"' +MKDIR_P='mkdir -p "%s"' +MOUNT_TYPE='mount -t %s "%s" "%s"' +PRINTF_CONF="printf '%s=\"%%s\"\\\n' %s >> \"%s\"" +PRINTF_FSTAB='printf "$FSTAB_FMT" "%s" "%s" "%s" "%s" "%s" "%s" >> "%s"' +SHELL_TRUNCATE=':> "%s"' +ZFS_CREATE_WITH_OPTIONS='zfs create %s "%s"' +ZFS_SET='zfs set "%s" "%s"' +ZFS_UNMOUNT='zfs unmount "%s"' +ZPOOL_CREATE_WITH_OPTIONS='zpool create %s "%s" %s %s' +ZPOOL_EXPORT='zpool export "%s"' +ZPOOL_IMPORT_WITH_OPTIONS='zpool import %s "%s"' +ZPOOL_SET='zpool set %s "%s"' + +# # Strings that should be moved to an i18n file and loaded with f_include_lang() # hline_alnum_arrows_punc_tab_enter="Use alnum, arrows, punctuation, TAB or ENTER" hline_arrows_space_tab_enter="Use arrows, SPACE, TAB or ENTER" hline_arrows_tab_enter="Press arrows, TAB or ENTER" +msg_an_unknown_error_occurred="An unknown error occurred" msg_back="Back" msg_cancel="Cancel" -msg_change="Change Selection" +msg_change_selection="Change Selection" msg_configure_options="Configure Options:" -msg_create="Install" -msg_create_desc="Proceed with Installation" -msg_create_help="Create ZFS boot pool with displayed options" msg_detailed_disk_info="gpart(8) show %s:\n%s\n\ncamcontrol(8) inquiry %s:\n%s\n\n\ncamcontrol(8) identify %s:\n%s\n" msg_disk_info="Disk Info" msg_disk_info_help="Get detailed information on disk device(s)" -msg_disks_to_use="Disks To Use" -msg_disks_to_use_help="Choose which disks to use for the Virtual Device (Required)" +msg_encrypt_disks="Encrypt Disks?" +msg_encrypt_disks_help="Use geli(8) to encrypt all data partitions" +msg_error="Error" msg_force_4k_sectors="Force 4K Sectors?" msg_force_4k_sectors_help="Use gnop(8) to configure forced 4K sector alignment" msg_freebsd_installer="FreeBSD Installer" -msg_geli_encryption="Encrypt Disks?" -msg_geli_encryption_help="Use geli(8) to encrypt all data partitions" msg_geli_password="Enter a strong passphrase, used to protect your encryption keys. You will be required to enter this passphrase each time the system is booted" msg_geli_setup="Initializing encryption on the selected disks, this will take several seconds per disk" +msg_install="Install" +msg_install_desc="Proceed with Installation" +msg_install_help="Create ZFS boot pool with displayed options" +msg_invalid_disk_argument="Invalid disk argument \`%s'" +msg_invalid_geli_boot_size="Invalid geli(8) boot size \`%s'" +msg_invalid_index_argument="Invalid index argument \`%s'" +msg_invalid_swap_size="Invalid swap size \`%s'" msg_invalid_virtual_device_type="Invalid Virtual Device type \`%s'" -msg_invalid_virtual_device_type_help="Select another Virtual Device type or Cancel to\nreturn to the ZFS menu. From there you can select\nmore disks or rescan for additional devices." -msg_last_chance_are_you_sure="Last Chance! Are you sure you want to destroy the current contents of the following disks:\n%s" -msg_last_chance_are_you_sure_color="\\\\ZrLast Chance!\\\\ZR Are you \\\\Z1sure\\\\Zn you want to \\\\Zr\\\\Z1destroy\\\\Zn the current contents of the following disks:\n%s" +msg_last_chance_are_you_sure="Last Chance! Are you sure you want to destroy\nthe current contents of the following disks:\n\n %s" +msg_last_chance_are_you_sure_color='\\ZrLast Chance!\\ZR Are you \\Z1sure\\Zn you want to \\Zr\\Z1destroy\\Zn\nthe current contents of the following disks:\n\n %s' msg_mirror_desc="Mirror - n-Way Mirroring" msg_mirror_help="[2+ Disks] Mirroring provides the best performance, but the least storage" +msg_missing_disk_arguments="missing disk arguments" +msg_missing_one_or_more_scripted_disks="Missing one or more scripted disks!" msg_no="NO" msg_no_disks_present_to_configure="No disk(s) present to configure" msg_no_disks_selected="No disks selected." -msg_not_enough_disks_selected="Not enough disks selected. (%u < %u wanted)" +msg_not_enough_disks_selected="Not enough disks selected. (%u < %u minimum)" +msg_null_disk_argument="NULL disk argument" +msg_null_index_argument="NULL index argument" +msg_null_poolname="NULL poolname" msg_ok="OK" msg_partition_scheme="Partition Scheme" msg_partition_scheme_help="Toggle between GPT and MBR partitioning schemes" @@ -188,6 +232,8 @@ msg_please_select_one_or_more_disks="Ple msg_pool_name="Pool Name" msg_pool_name_cannot_be_empty="Pool name cannot be empty." msg_pool_name_help="Customize the name of the zpool to be created (Required)" +msg_pool_type_disks="Pool Type/Disks:" +msg_pool_type_disks_help="Choose type of ZFS Virtual Device and disks to use (Required)" msg_processing_selection="Processing selection..." msg_raidz1_desc="RAID-Z1 - Single Redundant RAID" msg_raidz1_help="[3+ Disks] Withstand failure of 1 disk. Recommended for: 3, 5 or 9 disks" @@ -204,11 +250,12 @@ msg_stripe_desc="Stripe - No Redundancy" msg_stripe_help="[1+ Disks] Striping provides maximum storage but no redundancy" msg_swap_size="Swap Size" msg_swap_size_help="Customize how much swap space is allocated to each selected disk" -msg_these_disks_are_too_small="These disks are too small given the amount of requested\nswap (%s) and/or GELI (%s) partitions, which would take\n50%% or more (not recommended) of each of the following\nselected disk devices:\n\n %s\n\nRecommend changing partition size(s) and/or selecting a\ndifferent set of devices." +msg_these_disks_are_too_small="These disks are too small given the amount of requested\nswap (%s) and/or geli(8) (%s) partitions, which would\ntake 50%% or more of each of the following selected disk\ndevices (not recommended):\n\n %s\n\nRecommend changing partition size(s) and/or selecting a\ndifferent set of devices." +msg_unable_to_get_disk_capacity="Unable to get disk capacity of \`%s'" +msg_unsupported_partition_scheme="%s is an unsupported partition scheme" +msg_user_cancelled="User Cancelled." msg_yes="YES" msg_zfs_configuration="ZFS Configuration" -msg_zfs_vdev_type="ZFS VDev Type" -msg_zfs_vdev_type_help="Select type of ZFS Virtual Device to create" ############################################################ FUNCTIONS @@ -225,26 +272,26 @@ dialog_menu_main() local usegeli="$msg_no" [ "$ZFSBOOT_GNOP_4K_FORCE_ALIGN" ] && force4k="$msg_yes" [ "$ZFSBOOT_GELI_ENCRYPTION" ] && usegeli="$msg_yes" + local disks n=$( set -- $ZFSBOOT_DISKS; echo $# ) + { [ $n -eq 1 ] && disks=disk; } || disks=disks # grammar local menu_list=" - '>>> $msg_create' '$msg_create_desc' - '$msg_create_help' + '>>> $msg_install' '$msg_install_desc' + '$msg_install_help' + 'T $msg_pool_type_disks' '$ZFSBOOT_VDEV_TYPE: $n $disks' + '$msg_pool_type_disks_help' '- $msg_rescan_devices' '*' '$msg_rescan_devices_help' '- $msg_disk_info' '*' '$msg_disk_info_help' - '1 $msg_pool_name' '$ZFSBOOT_POOL_NAME' + 'N $msg_pool_name' '$ZFSBOOT_POOL_NAME' '$msg_pool_name_help' - '2 $msg_disks_to_use' '$ZFSBOOT_DISKS' - '$msg_disks_to_use_help' - '3 $msg_zfs_vdev_type' '$ZFSBOOT_VDEV_TYPE' - '$msg_zfs_vdev_type_help' '4 $msg_force_4k_sectors' '$force4k' '$msg_force_4k_sectors_help' - '5 $msg_geli_encryption' '$usegeli' - '$msg_geli_encryption_help' - '6 $msg_partition_scheme' '$ZFSBOOT_PARTITION_SCHEME' + 'E $msg_encrypt_disks' '$usegeli' + '$msg_encrypt_disks_help' + 'P $msg_partition_scheme' '$ZFSBOOT_PARTITION_SCHEME' '$msg_partition_scheme_help' - '7 $msg_swap_size' '$ZFSBOOT_SWAP_SIZE' + 'S $msg_swap_size' '$ZFSBOOT_SWAP_SIZE' '$msg_swap_size_help' " # END-QUOTE local defaultitem= # Calculated below @@ -281,158 +328,279 @@ dialog_menu_main() return $retval } -# dialog_edit_disks +# dialog_last_chance $disks ... # -# Edit the list of disks to be used by the ZFS boot pool. +# Display a list of the disks that the user is about to destroy. The default +# action is to return error status unless the user explicitly (non-default) +# selects "Yes" from the noyes dialog. # -dialog_edit_disks() +dialog_last_chance() { local title="$DIALOG_TITLE" local btitle="$DIALOG_BACKTITLE" - local prompt="$msg_please_select_one_or_more_disks" - local check_list= # Calculated below - local hline="$hline_arrows_space_tab_enter" - local dev vardev disks= + local prompt # Calculated below + local hline="$hline_arrows_tab_enter" - # *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Fri Nov 8 10:09:35 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 7E686C0B; Fri, 8 Nov 2013 10:09:35 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5D44F2E67; Fri, 8 Nov 2013 10:09:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA8A9Ztf025310; Fri, 8 Nov 2013 10:09:35 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA8A9Zrn025309; Fri, 8 Nov 2013 10:09:35 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201311081009.rA8A9Zrn025309@svn.freebsd.org> From: Devin Teske Date: Fri, 8 Nov 2013 10:09:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257843 - head/usr.sbin/bsdinstall/scripts X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Nov 2013 10:09:35 -0000 Author: dteske Date: Fri Nov 8 10:09:34 2013 New Revision: 257843 URL: http://svnweb.freebsd.org/changeset/base/257843 Log: Semi-revert this one file out of r257842. The ttys(5) stuff, as we discussed on -current, was not supposed to go in but get solved in a different way -- e.g., init(8) logic). Discussed on: -current Modified: head/usr.sbin/bsdinstall/scripts/config Modified: head/usr.sbin/bsdinstall/scripts/config ============================================================================== --- head/usr.sbin/bsdinstall/scripts/config Fri Nov 8 09:57:03 2013 (r257842) +++ head/usr.sbin/bsdinstall/scripts/config Fri Nov 8 10:09:34 2013 (r257843) @@ -27,81 +27,6 @@ # # $FreeBSD$ # -############################################################ CONFIGURATION - -# -# Location of ttys(5) -# -ETC_TTYS=/etc/ttys - -############################################################ FUNCTIONS - -# ttus_set_type $serterm -# -# Set terminal type of `ttyu*' and entries in ttys(5) to $serterm. -# -ttus_set_type() -{ - local serterm="$1" err - - # - # Create new temporary file to write our ttys(5) update with new types. - # - local tmpfile="$( mktemp -t "pgm" )" - [ "$tmpfile" ] || return $FAILURE - - # - # Fixup permissions and ownership (mktemp(1) creates the temporary file - # with 0600 permissions -- change the permissions and ownership to - # match ttys(5) before we write it out and mv(1) it into place). - # - local mode="$( stat -f '%#Lp' "$ETC_TTYS" 2> /dev/null )" - local owner="$( stat -f '%u:%g' "$ETC_TTYS" 2> /dev/null )" - f_quietly chmod "${mode:-0644}" "$tmpfile" - f_quietly chown "${owner:-root:wheel}" "$tmpfile" - - # - # Operate on ttys(5), replacing only the types of `ttyu*' terminals - # with the new type. - # - if ! err=$( awk -v serterm="$serterm" ' - BEGIN { - } - { - # "Skip" blank-lines, lines containing only whitespace, and - # lines containing only a comment or whitespace-then-comment. - # - if ( $0 ~ /^[[:space:]]*(#|$)/ ) { print; next } - - # "Skip" terminal types other than those supported - # - if ( $1 !~ /^ttyu.*$/ ) { print; next } - - # Change the terminal type to the new value and enable it - # - match($0, - /[[:alnum:]\.\+-_]+[[:space:]]+(on|off)([[:space:]]|$).*$/) - if ( ! RSTART ) { print; next } - start = RSTART - left=substr($0, 0, RSTART - 1) - right=substr($0, start) - match(right, - /[[:alnum:]\.\+-_]+[[:space:]]+(on|off)([[:space:]]+|$)/) - right=substr(right, RSTART + RLENGTH) - printf "%s%s on %s\n", left, serterm, right - } - ' "$ETC_TTYS" > "$tmpfile" 2>&1 ); then - f_show_err "%s" "$err" - return $FAILURE - fi - if ! err=$( mv -f "$tmpfile" "$ETC_TTYS" 2>&1 ); then - f_show_err "%s" "$err" - return $FAILURE - fi - - return $SUCCESS -} - ############################################################ MAIN cat $BSDINSTALL_TMPETC/rc.conf.* >> $BSDINSTALL_TMPETC/rc.conf @@ -117,8 +42,6 @@ cp $BSDINSTALL_TMPBOOT/* $BSDINSTALL_CHR # Set up other things from installed config chroot $BSDINSTALL_CHROOT /usr/bin/newaliases -kbdcontrol -d || ttus_set_type vt100 - ################################################################################ # END ################################################################################ From owner-svn-src-head@FreeBSD.ORG Fri Nov 8 10:14:33 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 055B2E26; Fri, 8 Nov 2013 10:14:33 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E75322ED1; Fri, 8 Nov 2013 10:14:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA8AEWWi028199; Fri, 8 Nov 2013 10:14:32 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA8AEWDu028198; Fri, 8 Nov 2013 10:14:32 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201311081014.rA8AEWDu028198@svn.freebsd.org> From: Devin Teske Date: Fri, 8 Nov 2013 10:14:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257844 - head/usr.sbin/bsdinstall/scripts X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Nov 2013 10:14:33 -0000 Author: dteske Date: Fri Nov 8 10:14:32 2013 New Revision: 257844 URL: http://svnweb.freebsd.org/changeset/base/257844 Log: Copy the install log to the deployed /var/log directory so that we have post-mortem data on how the machine was configured/installed. Modified: head/usr.sbin/bsdinstall/scripts/config Modified: head/usr.sbin/bsdinstall/scripts/config ============================================================================== --- head/usr.sbin/bsdinstall/scripts/config Fri Nov 8 10:09:34 2013 (r257843) +++ head/usr.sbin/bsdinstall/scripts/config Fri Nov 8 10:14:32 2013 (r257844) @@ -39,6 +39,8 @@ rm $BSDINSTALL_TMPBOOT/loader.conf.* cp $BSDINSTALL_TMPBOOT/* $BSDINSTALL_CHROOT/boot +[ "$debugFile" ] && cp "$debugFile" $BSDINSTALL_CHROOT/var/log/ + # Set up other things from installed config chroot $BSDINSTALL_CHROOT /usr/bin/newaliases From owner-svn-src-head@FreeBSD.ORG Fri Nov 8 10:19:49 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 2B60BFFC; Fri, 8 Nov 2013 10:19:49 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 18A552F06; Fri, 8 Nov 2013 10:19:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA8AJmcq028897; Fri, 8 Nov 2013 10:19:48 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA8AJmV4028896; Fri, 8 Nov 2013 10:19:48 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201311081019.rA8AJmV4028896@svn.freebsd.org> From: Devin Teske Date: Fri, 8 Nov 2013 10:19:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257845 - head/usr.sbin/bsdinstall/scripts X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Nov 2013 10:19:49 -0000 Author: dteske Date: Fri Nov 8 10:19:48 2013 New Revision: 257845 URL: http://svnweb.freebsd.org/changeset/base/257845 Log: I often forget that debugFile can begin with a + for deciding that debug should be sent to both the file (minus the leading +) and stdout. Modified: head/usr.sbin/bsdinstall/scripts/config Modified: head/usr.sbin/bsdinstall/scripts/config ============================================================================== --- head/usr.sbin/bsdinstall/scripts/config Fri Nov 8 10:14:32 2013 (r257844) +++ head/usr.sbin/bsdinstall/scripts/config Fri Nov 8 10:19:48 2013 (r257845) @@ -39,7 +39,7 @@ rm $BSDINSTALL_TMPBOOT/loader.conf.* cp $BSDINSTALL_TMPBOOT/* $BSDINSTALL_CHROOT/boot -[ "$debugFile" ] && cp "$debugFile" $BSDINSTALL_CHROOT/var/log/ +[ "${debugFile#+}" ] && cp "${debugFile#+}" $BSDINSTALL_CHROOT/var/log/ # Set up other things from installed config chroot $BSDINSTALL_CHROOT /usr/bin/newaliases From owner-svn-src-head@FreeBSD.ORG Fri Nov 8 13:04:15 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C9911638; Fri, 8 Nov 2013 13:04:15 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9D8382808; Fri, 8 Nov 2013 13:04:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA8D4F5L086338; Fri, 8 Nov 2013 13:04:15 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA8D4FG9086336; Fri, 8 Nov 2013 13:04:15 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201311081304.rA8D4FG9086336@svn.freebsd.org> From: Gleb Smirnoff Date: Fri, 8 Nov 2013 13:04:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257846 - in head: share/man/man4 sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Nov 2013 13:04:15 -0000 Author: glebius Date: Fri Nov 8 13:04:14 2013 New Revision: 257846 URL: http://svnweb.freebsd.org/changeset/base/257846 Log: Make TCP_KEEP* socket options readable. At least PostgreSQL wants to read the values. Reported by: sobomax Modified: head/share/man/man4/tcp.4 head/sys/netinet/tcp_usrreq.c Modified: head/share/man/man4/tcp.4 ============================================================================== --- head/share/man/man4/tcp.4 Fri Nov 8 10:19:48 2013 (r257845) +++ head/share/man/man4/tcp.4 Fri Nov 8 13:04:14 2013 (r257846) @@ -38,7 +38,7 @@ .\" From: @(#)tcp.4 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd March 7, 2012 +.Dd November 8, 2013 .Dt TCP 4 .Os .Sh NAME @@ -48,6 +48,7 @@ .In sys/types.h .In sys/socket.h .In netinet/in.h +.In netinet/tcp.h .Ft int .Fn socket AF_INET SOCK_STREAM 0 .Sh DESCRIPTION @@ -147,7 +148,7 @@ See .Xr mod_cc 4 for details. .It Dv TCP_KEEPINIT -This write-only +This .Xr setsockopt 2 option accepts a per-socket timeout argument of .Vt "u_int" @@ -160,7 +161,7 @@ in the .Sx MIB Variables section further down. .It Dv TCP_KEEPIDLE -This write-only +This .Xr setsockopt 2 option accepts an argument of .Vt "u_int" @@ -176,7 +177,7 @@ in the .Sx MIB Variables section further down. .It Dv TCP_KEEPINTVL -This write-only +This .Xr setsockopt 2 option accepts an argument of .Vt "u_int" @@ -191,7 +192,7 @@ in the .Sx MIB Variables section further down. .It Dv TCP_KEEPCNT -This write-only +This .Xr setsockopt 2 option accepts an argument of .Vt "u_int" Modified: head/sys/netinet/tcp_usrreq.c ============================================================================== --- head/sys/netinet/tcp_usrreq.c Fri Nov 8 10:19:48 2013 (r257845) +++ head/sys/netinet/tcp_usrreq.c Fri Nov 8 13:04:14 2013 (r257846) @@ -1585,6 +1585,27 @@ unlock_and_done: INP_WUNLOCK(inp); error = sooptcopyout(sopt, buf, TCP_CA_NAME_MAX); break; + case TCP_KEEPIDLE: + case TCP_KEEPINTVL: + case TCP_KEEPINIT: + case TCP_KEEPCNT: + switch (sopt->sopt_name) { + case TCP_KEEPIDLE: + ui = tp->t_keepidle / hz; + break; + case TCP_KEEPINTVL: + ui = tp->t_keepintvl / hz; + break; + case TCP_KEEPINIT: + ui = tp->t_keepinit / hz; + break; + case TCP_KEEPCNT: + ui = tp->t_keepcnt; + break; + } + INP_WUNLOCK(inp); + error = sooptcopyout(sopt, &ui, sizeof(ui)); + break; default: INP_WUNLOCK(inp); error = ENOPROTOOPT; From owner-svn-src-head@FreeBSD.ORG Fri Nov 8 13:23:27 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 1712FCC8; Fri, 8 Nov 2013 13:23:27 +0000 (UTC) (envelope-from achim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 02FEB2967; Fri, 8 Nov 2013 13:23:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA8DNQlT093259; Fri, 8 Nov 2013 13:23:26 GMT (envelope-from achim@svn.freebsd.org) Received: (from achim@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA8DNQf1093256; Fri, 8 Nov 2013 13:23:26 GMT (envelope-from achim@svn.freebsd.org) Message-Id: <201311081323.rA8DNQf1093256@svn.freebsd.org> From: Achim Leubner Date: Fri, 8 Nov 2013 13:23:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257847 - head/sys/dev/aacraid X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Nov 2013 13:23:27 -0000 Author: achim Date: Fri Nov 8 13:23:26 2013 New Revision: 257847 URL: http://svnweb.freebsd.org/changeset/base/257847 Log: Update aacraid to version 3.2.5. Full MSI-X interrupt support added. Timeout and reset handling reworked, firmware flash update test added. Support for drives with 4KB block size added. Changes made to avoid exposure of phys. array components by default. Approved by: scottl (mentor), emaste (co-mentor) Modified: head/sys/dev/aacraid/aacraid.c head/sys/dev/aacraid/aacraid_cam.c head/sys/dev/aacraid/aacraid_reg.h head/sys/dev/aacraid/aacraid_var.h Modified: head/sys/dev/aacraid/aacraid.c ============================================================================== --- head/sys/dev/aacraid/aacraid.c Fri Nov 8 13:04:14 2013 (r257846) +++ head/sys/dev/aacraid/aacraid.c Fri Nov 8 13:23:26 2013 (r257847) @@ -98,8 +98,11 @@ static int aac_alloc(struct aac_softc *s static void aac_common_map(void *arg, bus_dma_segment_t *segs, int nseg, int error); static int aac_check_firmware(struct aac_softc *sc); +static void aac_define_int_mode(struct aac_softc *sc); static int aac_init(struct aac_softc *sc); +static int aac_find_pci_capability(struct aac_softc *sc, int cap); static int aac_setup_intr(struct aac_softc *sc); +static int aac_check_config(struct aac_softc *sc); /* PMC SRC interface */ static int aac_src_get_fwstatus(struct aac_softc *sc); @@ -110,7 +113,7 @@ static void aac_src_set_mailbox(struct a u_int32_t arg0, u_int32_t arg1, u_int32_t arg2, u_int32_t arg3); static int aac_src_get_mailbox(struct aac_softc *sc, int mb); -static void aac_src_set_interrupts(struct aac_softc *sc, int enable); +static void aac_src_access_devreg(struct aac_softc *sc, int mode); static int aac_src_send_command(struct aac_softc *sc, struct aac_command *cm); static int aac_src_get_outb_queue(struct aac_softc *sc); static void aac_src_set_outb_queue(struct aac_softc *sc, int index); @@ -122,7 +125,7 @@ struct aac_interface aacraid_src_interfa aac_src_clear_istatus, aac_src_set_mailbox, aac_src_get_mailbox, - aac_src_set_interrupts, + aac_src_access_devreg, aac_src_send_command, aac_src_get_outb_queue, aac_src_set_outb_queue @@ -141,7 +144,7 @@ struct aac_interface aacraid_srcv_interf aac_src_clear_istatus, aac_srcv_set_mailbox, aac_srcv_get_mailbox, - aac_src_set_interrupts, + aac_src_access_devreg, aac_src_send_command, aac_src_get_outb_queue, aac_src_set_outb_queue @@ -258,6 +261,7 @@ aacraid_attach(struct aac_softc *sc) /* * Check that the firmware on the card is supported. */ + sc->msi_enabled = FALSE; if ((error = aac_check_firmware(sc)) != 0) return(error); @@ -278,6 +282,7 @@ aacraid_attach(struct aac_softc *sc) if ((error = aac_alloc(sc)) != 0) return(error); if (!(sc->flags & AAC_FLAGS_SYNC_MODE)) { + aac_define_int_mode(sc); if ((error = aac_init(sc)) != 0) return(error); } @@ -341,7 +346,7 @@ aacraid_attach(struct aac_softc *sc) sc->aac_state &= ~AAC_STATE_SUSPEND; /* enable interrupts now */ - AAC_UNMASK_INTERRUPTS(sc); + AAC_ACCESS_DEVREG(sc, AAC_ENABLE_INTERRUPT); #if __FreeBSD_version >= 800000 mtx_lock(&sc->aac_io_lock); @@ -442,6 +447,7 @@ aac_get_container_info(struct aac_softc struct aac_fib *fib; struct aac_mntinfo *mi; struct aac_cnt_config *ccfg; + int rval; if (sync_fib == NULL) { if (aacraid_alloc_command(sc, &cm)) { @@ -499,9 +505,10 @@ aac_get_container_info(struct aac_softc *uid = cid; if (mir->MntTable[0].VolType != CT_NONE && !(mir->MntTable[0].ContentState & AAC_FSCS_HIDDEN)) { - if (!(sc->aac_support_opt2 & AAC_SUPPORTED_VARIABLE_BLOCK_SIZE)) - mir->MntTable[0].ObjExtension.BlockSize = 0x200; - + if (!(sc->aac_support_opt2 & AAC_SUPPORTED_VARIABLE_BLOCK_SIZE)) { + mir->MntTable[0].ObjExtension.BlockDevice.BlockSize = 0x200; + mir->MntTable[0].ObjExtension.BlockDevice.bdLgclPhysMap = 0; + } ccfg = (struct aac_cnt_config *)&fib->data[0]; bzero(ccfg, sizeof (*ccfg) - CT_PACKET_SIZE); ccfg->Command = VM_ContainerConfig; @@ -509,9 +516,10 @@ aac_get_container_info(struct aac_softc ccfg->CTCommand.param[0] = cid; if (sync_fib) { - if (aac_sync_fib(sc, ContainerCommand, 0, fib, - sizeof(struct aac_cnt_config) == 0) && - ccfg->CTCommand.param[0] == ST_OK && + rval = aac_sync_fib(sc, ContainerCommand, 0, fib, + sizeof(struct aac_cnt_config)); + if (rval == 0 && ccfg->Command == ST_OK && + ccfg->CTCommand.param[0] == CT_OK && mir->MntTable[0].VolType != CT_PASSTHRU) *uid = ccfg->CTCommand.param[1]; } else { @@ -527,8 +535,9 @@ aac_get_container_info(struct aac_softc AAC_FIBSTATE_ASYNC | AAC_FIBSTATE_FAST_RESPONSE; fib->Header.Command = ContainerCommand; - if (aacraid_wait_command(cm) == 0 && - ccfg->CTCommand.param[0] == ST_OK && + rval = aacraid_wait_command(cm); + if (rval == 0 && ccfg->Command == ST_OK && + ccfg->CTCommand.param[0] == CT_OK && mir->MntTable[0].VolType != CT_PASSTHRU) *uid = ccfg->CTCommand.param[1]; aacraid_release_command(cm); @@ -681,6 +690,8 @@ aac_alloc(struct aac_softc *sc) void aacraid_free(struct aac_softc *sc) { + int i; + fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); /* remove the control device */ @@ -704,11 +715,18 @@ aacraid_free(struct aac_softc *sc) bus_dma_tag_destroy(sc->aac_common_dmat); /* disconnect the interrupt handler */ - if (sc->aac_intr) - bus_teardown_intr(sc->aac_dev, sc->aac_irq, sc->aac_intr); - if (sc->aac_irq != NULL) - bus_release_resource(sc->aac_dev, SYS_RES_IRQ, sc->aac_irq_rid, - sc->aac_irq); + for (i = 0; i < AAC_MAX_MSIX; ++i) { + if (sc->aac_intr[i]) + bus_teardown_intr(sc->aac_dev, + sc->aac_irq[i], sc->aac_intr[i]); + if (sc->aac_irq[i]) + bus_release_resource(sc->aac_dev, SYS_RES_IRQ, + sc->aac_irq_rid[i], sc->aac_irq[i]); + else + break; + } + if (sc->msi_enabled) + pci_release_msi(sc->aac_dev); /* destroy data-transfer DMA tag */ if (sc->aac_buffer_dmat) @@ -815,14 +833,14 @@ aacraid_shutdown(device_t dev) bzero(cc, sizeof(struct aac_close_command)); cc->Command = VM_CloseAll; - cc->ContainerId = 0xffffffff; + cc->ContainerId = 0xfffffffe; if (aac_sync_fib(sc, ContainerCommand, 0, fib, sizeof(struct aac_close_command))) printf("FAILED.\n"); else printf("done\n"); - AAC_MASK_INTERRUPTS(sc); + AAC_ACCESS_DEVREG(sc, AAC_DISABLE_INTERRUPT); aac_release_sync_fib(sc); mtx_unlock(&sc->aac_io_lock); @@ -842,7 +860,7 @@ aacraid_suspend(device_t dev) fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); sc->aac_state |= AAC_STATE_SUSPEND; - AAC_MASK_INTERRUPTS(sc); + AAC_ACCESS_DEVREG(sc, AAC_DISABLE_INTERRUPT); return(0); } @@ -858,7 +876,7 @@ aacraid_resume(device_t dev) fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); sc->aac_state &= ~AAC_STATE_SUSPEND; - AAC_UNMASK_INTERRUPTS(sc); + AAC_ACCESS_DEVREG(sc, AAC_ENABLE_INTERRUPT); return(0); } @@ -868,23 +886,75 @@ aacraid_resume(device_t dev) void aacraid_new_intr_type1(void *arg) { + struct aac_msix_ctx *ctx; struct aac_softc *sc; + int vector_no; struct aac_command *cm; struct aac_fib *fib; u_int32_t bellbits, bellbits_shifted, index, handle; - int isFastResponse, isAif, noMoreAif; + int isFastResponse, isAif, noMoreAif, mode; - sc = (struct aac_softc *)arg; + ctx = (struct aac_msix_ctx *)arg; + sc = ctx->sc; + vector_no = ctx->vector_no; fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); mtx_lock(&sc->aac_io_lock); - bellbits = AAC_MEM0_GETREG4(sc, AAC_SRC_ODBR_R); - if (bellbits & AAC_DB_RESPONSE_SENT_NS) { - bellbits = AAC_DB_RESPONSE_SENT_NS; - AAC_MEM0_SETREG4(sc, AAC_SRC_ODBR_C, bellbits); - AAC_MEM0_GETREG4(sc, AAC_SRC_ODBR_R); /* ODR readback,Prep #238630 */ + + if (sc->msi_enabled) { + mode = AAC_INT_MODE_MSI; + if (vector_no == 0) { + bellbits = AAC_MEM0_GETREG4(sc, AAC_SRC_ODBR_MSI); + if (bellbits & 0x40000) + mode |= AAC_INT_MODE_AIF; + else if (bellbits & 0x1000) + mode |= AAC_INT_MODE_SYNC; + } + } else { + mode = AAC_INT_MODE_INTX; + bellbits = AAC_MEM0_GETREG4(sc, AAC_SRC_ODBR_R); + if (bellbits & AAC_DB_RESPONSE_SENT_NS) { + bellbits = AAC_DB_RESPONSE_SENT_NS; + AAC_MEM0_SETREG4(sc, AAC_SRC_ODBR_C, bellbits); + } else { + bellbits_shifted = (bellbits >> AAC_SRC_ODR_SHIFT); + AAC_MEM0_SETREG4(sc, AAC_SRC_ODBR_C, bellbits); + if (bellbits_shifted & AAC_DB_AIF_PENDING) + mode |= AAC_INT_MODE_AIF; + else if (bellbits_shifted & AAC_DB_SYNC_COMMAND) + mode |= AAC_INT_MODE_SYNC; + } + /* ODR readback, Prep #238630 */ + AAC_MEM0_GETREG4(sc, AAC_SRC_ODBR_R); + } + + if (mode & AAC_INT_MODE_SYNC) { + if (sc->aac_sync_cm) { + cm = sc->aac_sync_cm; + cm->cm_flags |= AAC_CMD_COMPLETED; + /* is there a completion handler? */ + if (cm->cm_complete != NULL) { + cm->cm_complete(cm); + } else { + /* assume that someone is sleeping on this command */ + wakeup(cm); + } + sc->flags &= ~AAC_QUEUE_FRZN; + sc->aac_sync_cm = NULL; + } + mode = 0; + } + + if (mode & AAC_INT_MODE_AIF) { + if (mode & AAC_INT_MODE_INTX) { + aac_request_aif(sc); + mode = 0; + } + } + + if (mode) { /* handle async. status */ - index = sc->aac_host_rrq_idx; + index = sc->aac_host_rrq_idx[vector_no]; for (;;) { isFastResponse = isAif = noMoreAif = 0; /* remove toggle bit (31) */ @@ -901,6 +971,7 @@ aacraid_new_intr_type1(void *arg) cm = sc->aac_commands + (handle - 1); fib = cm->cm_fib; + sc->aac_rrq_outstanding[vector_no]--; if (isAif) { noMoreAif = (fib->Header.XferState & AAC_FIBSTATE_NOMOREAIF) ? 1:0; if (!noMoreAif) @@ -928,34 +999,19 @@ aacraid_new_intr_type1(void *arg) } sc->aac_common->ac_host_rrq[index++] = 0; - if (index == sc->aac_max_fibs) - index = 0; - sc->aac_host_rrq_idx = index; + if (index == (vector_no + 1) * sc->aac_vector_cap) + index = vector_no * sc->aac_vector_cap; + sc->aac_host_rrq_idx[vector_no] = index; if ((isAif && !noMoreAif) || sc->aif_pending) aac_request_aif(sc); } - } else { - bellbits_shifted = (bellbits >> AAC_SRC_ODR_SHIFT); - AAC_MEM0_SETREG4(sc, AAC_SRC_ODBR_C, bellbits); - if (bellbits_shifted & AAC_DB_AIF_PENDING) { - /* handle AIF */ - aac_request_aif(sc); - } else if (bellbits_shifted & AAC_DB_SYNC_COMMAND) { - if (sc->aac_sync_cm) { - cm = sc->aac_sync_cm; - cm->cm_flags |= AAC_CMD_COMPLETED; - /* is there a completion handler? */ - if (cm->cm_complete != NULL) { - cm->cm_complete(cm); - } else { - /* assume that someone is sleeping on this command */ - wakeup(cm); - } - sc->flags &= ~AAC_QUEUE_FRZN; - sc->aac_sync_cm = NULL; - } - } + } + + if (mode & AAC_INT_MODE_AIF) { + aac_request_aif(sc); + AAC_ACCESS_DEVREG(sc, AAC_CLEAR_AIF_BIT); + mode = 0; } /* see if we can start some more I/O */ @@ -1479,32 +1535,47 @@ static int aac_check_firmware(struct aac_softc *sc) { u_int32_t code, major, minor, maxsize; - u_int32_t options = 0, atu_size = 0, status; + u_int32_t options = 0, atu_size = 0, status, waitCount; time_t then; fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); + + /* check if flash update is running */ + if (AAC_GET_FWSTATUS(sc) & AAC_FLASH_UPD_PENDING) { + then = time_uptime; + do { + code = AAC_GET_FWSTATUS(sc); + if (time_uptime > (then + AAC_FWUPD_TIMEOUT)) { + device_printf(sc->aac_dev, + "FATAL: controller not coming ready, " + "status %x\n", code); + return(ENXIO); + } + } while (!(code & AAC_FLASH_UPD_SUCCESS) && !(code & AAC_FLASH_UPD_FAILED)); + /* + * Delay 10 seconds. Because right now FW is doing a soft reset, + * do not read scratch pad register at this time + */ + waitCount = 10 * 10000; + while (waitCount) { + DELAY(100); /* delay 100 microseconds */ + waitCount--; + } + } + /* * Wait for the adapter to come ready. */ then = time_uptime; do { code = AAC_GET_FWSTATUS(sc); - if (code & AAC_SELF_TEST_FAILED) { - device_printf(sc->aac_dev, "FATAL: selftest failed\n"); - return(ENXIO); - } - if (code & AAC_KERNEL_PANIC) { - device_printf(sc->aac_dev, - "FATAL: controller kernel panic"); - return(ENXIO); - } if (time_uptime > (then + AAC_BOOT_TIMEOUT)) { device_printf(sc->aac_dev, "FATAL: controller not coming ready, " "status %x\n", code); return(ENXIO); } - } while (!(code & AAC_UP_AND_RUNNING)); + } while (!(code & AAC_UP_AND_RUNNING) || code == 0xffffffff); /* * Retrieve the firmware version numbers. Dell PERC2/QC cards with @@ -1629,9 +1700,13 @@ aac_check_firmware(struct aac_softc *sc) options = AAC_GET_MAILBOX(sc, 2); sc->aac_sg_tablesize = (options >> 16); options = AAC_GET_MAILBOX(sc, 3); - sc->aac_max_fibs = (options & 0xFFFF); + sc->aac_max_fibs = ((options >> 16) & 0xFFFF); + if (sc->aac_max_fibs == 0 || sc->aac_hwif != AAC_HWIF_SRCV) + sc->aac_max_fibs = (options & 0xFFFF); options = AAC_GET_MAILBOX(sc, 4); sc->aac_max_aif = (options & 0xFFFF); + options = AAC_GET_MAILBOX(sc, 5); + sc->aac_max_msix =(sc->flags & AAC_FLAGS_NEW_COMM_TYPE2) ? options : 0; } maxsize = sc->aac_max_fib_size + 31; @@ -1661,12 +1736,14 @@ static int aac_init(struct aac_softc *sc) { struct aac_adapter_init *ip; - int error; + int i, error; fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); /* reset rrq index */ - sc->aac_host_rrq_idx = 0; + sc->aac_fibs_pushed_no = 0; + for (i = 0; i < sc->aac_max_msix; i++) + sc->aac_host_rrq_idx[i] = i * sc->aac_vector_cap; /* * Fill in the init structure. This tells the adapter about the @@ -1678,7 +1755,7 @@ aac_init(struct aac_softc *sc) ip->InitStructRevision = AAC_INIT_STRUCT_REVISION_4; sc->flags |= AAC_FLAGS_RAW_IO; } - ip->MiniPortRevision = AAC_INIT_STRUCT_MINIPORT_REVISION; + ip->NoOfMSIXVectors = sc->aac_max_msix; ip->AdapterFibsPhysicalAddress = sc->aac_common_busaddr + offsetof(struct aac_common, ac_fibs); @@ -1708,7 +1785,6 @@ aac_init(struct aac_softc *sc) ip->InitStructRevision = AAC_INIT_STRUCT_REVISION_6; ip->InitFlags |= (AAC_INITFLAGS_NEW_COMM_TYPE1_SUPPORTED | AAC_INITFLAGS_FAST_JBOD_SUPPORTED); - ip->MiniPortRevision = 0L; device_printf(sc->aac_dev, "New comm. interface type1 enabled\n"); } else if (sc->flags & AAC_FLAGS_NEW_COMM_TYPE2) { ip->InitStructRevision = AAC_INIT_STRUCT_REVISION_7; @@ -1750,31 +1826,209 @@ aac_init(struct aac_softc *sc) goto out; } + /* + * Check configuration issues + */ + if ((error = aac_check_config(sc)) != 0) + goto out; + error = 0; out: return(error); } +static void +aac_define_int_mode(struct aac_softc *sc) +{ + device_t dev; + int cap, msi_count, error = 0; + uint32_t val; + + dev = sc->aac_dev; + + /* max. vectors from AAC_MONKER_GETCOMMPREF */ + if (sc->aac_max_msix == 0) { + sc->aac_max_msix = 1; + sc->aac_vector_cap = sc->aac_max_fibs; + return; + } + + /* OS capability */ + msi_count = pci_msix_count(dev); + if (msi_count > AAC_MAX_MSIX) + msi_count = AAC_MAX_MSIX; + if (msi_count > sc->aac_max_msix) + msi_count = sc->aac_max_msix; + if (msi_count == 0 || (error = pci_alloc_msix(dev, &msi_count)) != 0) { + device_printf(dev, "alloc msix failed - msi_count=%d, err=%d; " + "will try MSI\n", msi_count, error); + pci_release_msi(dev); + } else { + sc->msi_enabled = TRUE; + device_printf(dev, "using MSI-X interrupts (%u vectors)\n", + msi_count); + } + + if (!sc->msi_enabled) { + msi_count = 1; + if ((error = pci_alloc_msi(dev, &msi_count)) != 0) { + device_printf(dev, "alloc msi failed - err=%d; " + "will use INTx\n", error); + pci_release_msi(dev); + } else { + sc->msi_enabled = TRUE; + device_printf(dev, "using MSI interrupts\n"); + } + } + + if (sc->msi_enabled) { + /* now read controller capability from PCI config. space */ + cap = aac_find_pci_capability(sc, PCIY_MSIX); + val = (cap != 0 ? pci_read_config(dev, cap + 2, 2) : 0); + if (!(val & AAC_PCI_MSI_ENABLE)) { + pci_release_msi(dev); + sc->msi_enabled = FALSE; + } + } + + if (!sc->msi_enabled) { + device_printf(dev, "using legacy interrupts\n"); + sc->aac_max_msix = 1; + } else { + AAC_ACCESS_DEVREG(sc, AAC_ENABLE_MSIX); + if (sc->aac_max_msix > msi_count) + sc->aac_max_msix = msi_count; + } + sc->aac_vector_cap = sc->aac_max_fibs / sc->aac_max_msix; + + fwprintf(sc, HBA_FLAGS_DBG_DEBUG_B, "msi_enabled %d vector_cap %d max_fibs %d max_msix %d", + sc->msi_enabled,sc->aac_vector_cap, sc->aac_max_fibs, sc->aac_max_msix); +} + static int -aac_setup_intr(struct aac_softc *sc) +aac_find_pci_capability(struct aac_softc *sc, int cap) { - sc->aac_irq_rid = 0; - if ((sc->aac_irq = bus_alloc_resource_any(sc->aac_dev, SYS_RES_IRQ, - &sc->aac_irq_rid, - RF_SHAREABLE | - RF_ACTIVE)) == NULL) { - device_printf(sc->aac_dev, "can't allocate interrupt\n"); - return (EINVAL); + device_t dev; + uint32_t status; + uint8_t ptr; + + dev = sc->aac_dev; + + status = pci_read_config(dev, PCIR_STATUS, 2); + if (!(status & PCIM_STATUS_CAPPRESENT)) + return (0); + + status = pci_read_config(dev, PCIR_HDRTYPE, 1); + switch (status & PCIM_HDRTYPE) { + case 0: + case 1: + ptr = PCIR_CAP_PTR; + break; + case 2: + ptr = PCIR_CAP_PTR_2; + break; + default: + return (0); + break; } - if (aac_bus_setup_intr(sc->aac_dev, sc->aac_irq, - INTR_MPSAFE|INTR_TYPE_BIO, NULL, - aacraid_new_intr_type1, sc, &sc->aac_intr)) { - device_printf(sc->aac_dev, "can't set up interrupt\n"); - return (EINVAL); + ptr = pci_read_config(dev, ptr, 1); + + while (ptr != 0) { + int next, val; + next = pci_read_config(dev, ptr + PCICAP_NEXTPTR, 1); + val = pci_read_config(dev, ptr + PCICAP_ID, 1); + if (val == cap) + return (ptr); + ptr = next; + } + + return (0); +} + +static int +aac_setup_intr(struct aac_softc *sc) +{ + int i, msi_count, rid; + struct resource *res; + void *tag; + + msi_count = sc->aac_max_msix; + rid = (sc->msi_enabled ? 1:0); + + for (i = 0; i < msi_count; i++, rid++) { + if ((res = bus_alloc_resource_any(sc->aac_dev,SYS_RES_IRQ, &rid, + RF_SHAREABLE | RF_ACTIVE)) == NULL) { + device_printf(sc->aac_dev,"can't allocate interrupt\n"); + return (EINVAL); + } + sc->aac_irq_rid[i] = rid; + sc->aac_irq[i] = res; + if (aac_bus_setup_intr(sc->aac_dev, res, + INTR_MPSAFE | INTR_TYPE_BIO, NULL, + aacraid_new_intr_type1, &sc->aac_msix[i], &tag)) { + device_printf(sc->aac_dev, "can't set up interrupt\n"); + return (EINVAL); + } + sc->aac_msix[i].vector_no = i; + sc->aac_msix[i].sc = sc; + sc->aac_intr[i] = tag; } + return (0); } +static int +aac_check_config(struct aac_softc *sc) +{ + struct aac_fib *fib; + struct aac_cnt_config *ccfg; + struct aac_cf_status_hdr *cf_shdr; + int rval; + + mtx_lock(&sc->aac_io_lock); + aac_alloc_sync_fib(sc, &fib); + + ccfg = (struct aac_cnt_config *)&fib->data[0]; + bzero(ccfg, sizeof (*ccfg) - CT_PACKET_SIZE); + ccfg->Command = VM_ContainerConfig; + ccfg->CTCommand.command = CT_GET_CONFIG_STATUS; + ccfg->CTCommand.param[CNT_SIZE] = sizeof(struct aac_cf_status_hdr); + + rval = aac_sync_fib(sc, ContainerCommand, 0, fib, + sizeof (struct aac_cnt_config)); + cf_shdr = (struct aac_cf_status_hdr *)ccfg->CTCommand.data; + if (rval == 0 && ccfg->Command == ST_OK && + ccfg->CTCommand.param[0] == CT_OK) { + if (cf_shdr->action <= CFACT_PAUSE) { + bzero(ccfg, sizeof (*ccfg) - CT_PACKET_SIZE); + ccfg->Command = VM_ContainerConfig; + ccfg->CTCommand.command = CT_COMMIT_CONFIG; + + rval = aac_sync_fib(sc, ContainerCommand, 0, fib, + sizeof (struct aac_cnt_config)); + if (rval == 0 && ccfg->Command == ST_OK && + ccfg->CTCommand.param[0] == CT_OK) { + /* successful completion */ + rval = 0; + } else { + /* auto commit aborted due to error(s) */ + rval = -2; + } + } else { + /* auto commit aborted due to adapter indicating + config. issues too dangerous to auto commit */ + rval = -3; + } + } else { + /* error */ + rval = -1; + } + + aac_release_sync_fib(sc); + mtx_unlock(&sc->aac_io_lock); + return(rval); +} + /* * Send a synchronous command to the controller and wait for a result. * Indicate if the controller completed the command with an error status. @@ -1793,7 +2047,8 @@ aacraid_sync_command(struct aac_softc *s AAC_SET_MAILBOX(sc, command, arg0, arg1, arg2, arg3); /* ensure the sync command doorbell flag is cleared */ - AAC_CLEAR_ISTATUS(sc, AAC_DB_SYNC_COMMAND); + if (!sc->msi_enabled) + AAC_CLEAR_ISTATUS(sc, AAC_DB_SYNC_COMMAND); /* then set it to signal the adapter */ AAC_QNOTIFY(sc, AAC_DB_SYNC_COMMAND); @@ -1802,7 +2057,7 @@ aacraid_sync_command(struct aac_softc *s /* spin waiting for the command to complete */ then = time_uptime; do { - if (time_uptime > (then + AAC_IMMEDIATE_TIMEOUT)) { + if (time_uptime > (then + AAC_SYNC_TIMEOUT)) { fwprintf(sc, HBA_FLAGS_DBG_ERROR_B, "timed out"); return(EIO); } @@ -1849,14 +2104,13 @@ aac_sync_fib(struct aac_softc *sc, u_int fib->Header.SenderSize = sizeof(struct aac_fib); fib->Header.SenderFibAddress = 0; /* Not needed */ fib->Header.u.ReceiverFibAddress = sc->aac_common_busaddr + - offsetof(struct aac_common, - ac_sync_fib); + offsetof(struct aac_common, ac_sync_fib); /* * Give the FIB to the controller, wait for a response. */ if (aacraid_sync_command(sc, AAC_MONKER_SYNCFIB, - fib->Header.u.ReceiverFibAddress, 0, 0, 0, NULL, NULL)) { + fib->Header.u.ReceiverFibAddress, 0, 0, 0, NULL, NULL)) { fwprintf(sc, HBA_FLAGS_DBG_ERROR_B, "IO error"); return(EIO); } @@ -1873,7 +2127,7 @@ aac_timeout(struct aac_softc *sc) { struct aac_command *cm; time_t deadline; - int timedout, code; + int timedout; fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); /* @@ -1883,9 +2137,7 @@ aac_timeout(struct aac_softc *sc) timedout = 0; deadline = time_uptime - AAC_CMD_TIMEOUT; TAILQ_FOREACH(cm, &sc->aac_busy, cm_link) { - if ((cm->cm_timestamp < deadline) - /* && !(cm->cm_flags & AAC_CMD_TIMEDOUT) */) { - cm->cm_flags |= AAC_CMD_TIMEDOUT; + if (cm->cm_timestamp < deadline) { device_printf(sc->aac_dev, "COMMAND %p TIMEOUT AFTER %d SECONDS\n", cm, (int)(time_uptime-cm->cm_timestamp)); @@ -1894,14 +2146,8 @@ aac_timeout(struct aac_softc *sc) } } - if (timedout) { - code = AAC_GET_FWSTATUS(sc); - if (code != AAC_UP_AND_RUNNING) { - device_printf(sc->aac_dev, "WARNING! Controller is no " - "longer running! code= 0x%x\n", code); - aac_reset_adapter(sc); - } - } + if (timedout) + aac_reset_adapter(sc); aacraid_print_queues(sc); } @@ -1937,9 +2183,20 @@ aac_src_qnotify(struct aac_softc *sc, in static int aac_src_get_istatus(struct aac_softc *sc) { + int val; + fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - return(AAC_MEM0_GETREG4(sc, AAC_SRC_ODBR_R) >> AAC_SRC_ODR_SHIFT); + if (sc->msi_enabled) { + val = AAC_MEM0_GETREG4(sc, AAC_SRC_ODBR_MSI); + if (val & AAC_MSI_SYNC_STATUS) + val = AAC_DB_SYNC_COMMAND; + else + val = 0; + } else { + val = AAC_MEM0_GETREG4(sc, AAC_SRC_ODBR_R) >> AAC_SRC_ODR_SHIFT; + } + return(val); } /* @@ -1950,7 +2207,12 @@ aac_src_clear_istatus(struct aac_softc * { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - AAC_MEM0_SETREG4(sc, AAC_SRC_ODBR_C, mask << AAC_SRC_ODR_SHIFT); + if (sc->msi_enabled) { + if (mask == AAC_DB_SYNC_COMMAND) + AAC_ACCESS_DEVREG(sc, AAC_CLEAR_SYNC_BIT); + } else { + AAC_MEM0_SETREG4(sc, AAC_SRC_ODBR_C, mask << AAC_SRC_ODR_SHIFT); + } } /* @@ -2005,14 +2267,77 @@ aac_srcv_get_mailbox(struct aac_softc *s * Set/clear interrupt masks */ static void -aac_src_set_interrupts(struct aac_softc *sc, int enable) +aac_src_access_devreg(struct aac_softc *sc, int mode) { - fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, "%sable interrupts", enable ? "en" : "dis"); + u_int32_t val; - if (enable) { - AAC_MEM0_SETREG4(sc, AAC_SRC_OIMR, ~AAC_DB_INT_NEW_COMM_TYPE1); - } else { - AAC_MEM0_SETREG4(sc, AAC_SRC_OIMR, ~0); + fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); + + switch (mode) { + case AAC_ENABLE_INTERRUPT: + AAC_MEM0_SETREG4(sc, AAC_SRC_OIMR, + (sc->msi_enabled ? AAC_INT_ENABLE_TYPE1_MSIX : + AAC_INT_ENABLE_TYPE1_INTX)); + break; + + case AAC_DISABLE_INTERRUPT: + AAC_MEM0_SETREG4(sc, AAC_SRC_OIMR, AAC_INT_DISABLE_ALL); + break; + + case AAC_ENABLE_MSIX: + /* set bit 6 */ + val = AAC_MEM0_GETREG4(sc, AAC_SRC_IDBR); + val |= 0x40; + AAC_MEM0_SETREG4(sc, AAC_SRC_IDBR, val); + AAC_MEM0_GETREG4(sc, AAC_SRC_IDBR); + /* unmask int. */ + val = PMC_ALL_INTERRUPT_BITS; + AAC_MEM0_SETREG4(sc, AAC_SRC_IOAR, val); + val = AAC_MEM0_GETREG4(sc, AAC_SRC_OIMR); + AAC_MEM0_SETREG4(sc, AAC_SRC_OIMR, + val & (~(PMC_GLOBAL_INT_BIT2 | PMC_GLOBAL_INT_BIT0))); + break; + + case AAC_DISABLE_MSIX: + /* reset bit 6 */ + val = AAC_MEM0_GETREG4(sc, AAC_SRC_IDBR); + val &= ~0x40; + AAC_MEM0_SETREG4(sc, AAC_SRC_IDBR, val); + AAC_MEM0_GETREG4(sc, AAC_SRC_IDBR); + break; + + case AAC_CLEAR_AIF_BIT: + /* set bit 5 */ + val = AAC_MEM0_GETREG4(sc, AAC_SRC_IDBR); + val |= 0x20; + AAC_MEM0_SETREG4(sc, AAC_SRC_IDBR, val); + AAC_MEM0_GETREG4(sc, AAC_SRC_IDBR); + break; + + case AAC_CLEAR_SYNC_BIT: + /* set bit 4 */ + val = AAC_MEM0_GETREG4(sc, AAC_SRC_IDBR); + val |= 0x10; + AAC_MEM0_SETREG4(sc, AAC_SRC_IDBR, val); + AAC_MEM0_GETREG4(sc, AAC_SRC_IDBR); + break; + + case AAC_ENABLE_INTX: + /* set bit 7 */ + val = AAC_MEM0_GETREG4(sc, AAC_SRC_IDBR); + val |= 0x80; + AAC_MEM0_SETREG4(sc, AAC_SRC_IDBR, val); + AAC_MEM0_GETREG4(sc, AAC_SRC_IDBR); + /* unmask int. */ + val = PMC_ALL_INTERRUPT_BITS; + AAC_MEM0_SETREG4(sc, AAC_SRC_IOAR, val); + val = AAC_MEM0_GETREG4(sc, AAC_SRC_OIMR); + AAC_MEM0_SETREG4(sc, AAC_SRC_OIMR, + val & (~(PMC_GLOBAL_INT_BIT2))); + break; + + default: + break; } } @@ -2028,6 +2353,34 @@ aac_src_send_command(struct aac_softc *s fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, "send command (new comm. type1)"); + if (sc->msi_enabled && cm->cm_fib->Header.Command != AifRequest && + sc->aac_max_msix > 1) { + u_int16_t vector_no, first_choice = 0xffff; + + vector_no = sc->aac_fibs_pushed_no % sc->aac_max_msix; + do { + vector_no += 1; + if (vector_no == sc->aac_max_msix) + vector_no = 1; + if (sc->aac_rrq_outstanding[vector_no] < + sc->aac_vector_cap) + break; + if (0xffff == first_choice) + first_choice = vector_no; + else if (vector_no == first_choice) + break; + } while (1); + if (vector_no == first_choice) + vector_no = 0; + sc->aac_rrq_outstanding[vector_no]++; + if (sc->aac_fibs_pushed_no == 0xffffffff) + sc->aac_fibs_pushed_no = 0; + else + sc->aac_fibs_pushed_no++; + + cm->cm_fib->Header.Handle += (vector_no << 16); + } + if (sc->flags & AAC_FLAGS_NEW_COMM_TYPE2) { /* Calculate the amount to the fibsize bits */ fibsize = (cm->cm_fib->Header.Size + 127) / 128 - 1; @@ -3364,9 +3717,11 @@ aac_reset_adapter(struct aac_softc *sc) struct aac_command *cm; struct aac_fib *fib; struct aac_pause_command *pc; - u_int32_t status, old_flags, reset_mask, waitCount; + u_int32_t status, reset_mask, waitCount, max_msix_orig; + int msi_enabled_orig; fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); + mtx_assert(&sc->aac_io_lock, MA_OWNED); if (sc->aac_state & AAC_STATE_RESET) { device_printf(sc->aac_dev, "aac_reset_adapter() already in progress\n"); @@ -3375,7 +3730,7 @@ aac_reset_adapter(struct aac_softc *sc) sc->aac_state |= AAC_STATE_RESET; /* disable interrupt */ - AAC_MASK_INTERRUPTS(sc); + AAC_ACCESS_DEVREG(sc, AAC_DISABLE_INTERRUPT); /* * Abort all pending commands: @@ -3458,35 +3813,39 @@ aac_reset_adapter(struct aac_softc *sc) } } else if (sc->aac_support_opt2 & AAC_SUPPORTED_DOORBELL_RESET) { AAC_MEM0_SETREG4(sc, AAC_SRC_IDBR, reset_mask); - /* We need to wait for 5 seconds before accessing the doorbell again - * 10000 * 100us = 1000,000us = 1000ms = 1s + /* + * We need to wait for 5 seconds before accessing the doorbell + * again, 10000 * 100us = 1000,000us = 1000ms = 1s */ waitCount = 5 * 10000; while (waitCount) { - DELAY(100); /* delay 100 microseconds */ + DELAY(100); /* delay 100 microseconds */ waitCount--; } } /* - * Re-read and renegotiate the FIB parameters, as one of the actions - * that can result from an IOP reset is the running of a new firmware - * image. - */ - old_flags = sc->flags; - /* * Initialize the adapter. */ + max_msix_orig = sc->aac_max_msix; + msi_enabled_orig = sc->msi_enabled; + sc->msi_enabled = FALSE; if (aac_check_firmware(sc) != 0) goto finish; if (!(sc->flags & AAC_FLAGS_SYNC_MODE)) { - if (aac_init(sc) != 0) - goto finish; + sc->aac_max_msix = max_msix_orig; + if (msi_enabled_orig) { + sc->msi_enabled = msi_enabled_orig; + AAC_ACCESS_DEVREG(sc, AAC_ENABLE_MSIX); + } + mtx_unlock(&sc->aac_io_lock); + aac_init(sc); + mtx_lock(&sc->aac_io_lock); } finish: sc->aac_state &= ~AAC_STATE_RESET; - AAC_UNMASK_INTERRUPTS(sc); + AAC_ACCESS_DEVREG(sc, AAC_ENABLE_INTERRUPT); aacraid_startio(sc); return (0); } Modified: head/sys/dev/aacraid/aacraid_cam.c ============================================================================== --- head/sys/dev/aacraid/aacraid_cam.c Fri Nov 8 13:04:14 2013 (r257846) +++ head/sys/dev/aacraid/aacraid_cam.c Fri Nov 8 13:23:26 2013 (r257847) @@ -709,7 +709,7 @@ aac_container_special_command(struct cam "Container READ_CAPACITY id %d lun %d len %d", ccb->ccb_h.target_id, ccb->ccb_h.target_lun, ccb->csio.dxfer_len); - scsi_ulto4b(co->co_mntobj.ObjExtension.BlockSize, p->length); + scsi_ulto4b(co->co_mntobj.ObjExtension.BlockDevice.BlockSize, p->length); /* check if greater than 2TB */ if (co->co_mntobj.CapacityHigh) { if (sc->flags & AAC_FLAGS_LBA_64BIT) @@ -737,9 +737,20 @@ aac_container_special_command(struct cam xpt_done(ccb); return; } - scsi_ulto4b(co->co_mntobj.ObjExtension.BlockSize, p->length); + scsi_ulto4b(co->co_mntobj.ObjExtension.BlockDevice.BlockSize, p->length); scsi_ulto4b(co->co_mntobj.CapacityHigh, p->addr); scsi_ulto4b(co->co_mntobj.Capacity-1, &p->addr[4]); + + if (ccb->csio.dxfer_len >= 14) { + u_int32_t mapping = co->co_mntobj.ObjExtension.BlockDevice.bdLgclPhysMap; + p->prot_lbppbe = 0; + while (mapping > 1) { + mapping >>= 1; + p->prot_lbppbe++; + } + p->prot_lbppbe &= 0x0f; + } + ccb->ccb_h.status = CAM_REQ_CMP; break; } @@ -769,7 +780,7 @@ aac_container_special_command(struct cam p->hd.block_descr_len = sizeof(struct scsi_mode_block_descr); p->hd.datalen += p->hd.block_descr_len; - scsi_ulto3b(co->co_mntobj.ObjExtension.BlockSize, p->bd.block_len); + scsi_ulto3b(co->co_mntobj.ObjExtension.BlockDevice.BlockSize, p->bd.block_len); if (co->co_mntobj.Capacity > 0xffffff || co->co_mntobj.CapacityHigh) { p->bd.num_blocks[0] = 0xff; @@ -1213,11 +1224,20 @@ aac_cam_complete(struct aac_command *cm) */ if ((device == T_DIRECT && !(sc->aac_feature_bits & AAC_SUPPL_SUPPORTED_JBOD)) || - (device == T_PROCESSOR) || - (sc->flags & AAC_FLAGS_CAM_PASSONLY)) + (device == T_PROCESSOR)) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Fri Nov 8 14:20:23 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 18E4AB8F; Fri, 8 Nov 2013 14:20:23 +0000 (UTC) (envelope-from jmmv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 061F92C57; Fri, 8 Nov 2013 14:20:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA8EKMhX012947; Fri, 8 Nov 2013 14:20:22 GMT (envelope-from jmmv@svn.freebsd.org) Received: (from jmmv@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA8EKMZk012945; Fri, 8 Nov 2013 14:20:22 GMT (envelope-from jmmv@svn.freebsd.org) Message-Id: <201311081420.rA8EKMZk012945@svn.freebsd.org> From: Julio Merino Date: Fri, 8 Nov 2013 14:20:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257848 - in head: . share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Nov 2013 14:20:23 -0000 Author: jmmv Date: Fri Nov 8 14:20:22 2013 New Revision: 257848 URL: http://svnweb.freebsd.org/changeset/base/257848 Log: Fix buildworld when WITH_TESTS is enabled. The addition of the TESTS knob and its enabling of the build of tests in lib/libcrypt/tests/ broke the build. The reason is that we cannot descend into tests/ subdirectories until all prerequisites have been built, which in the case of tests may be "a lot of things" (libatf-c in this case). Ensure that we do not walk tests/ directories during the bootstrapping of the libraries as part of buildworld. Reviewed by: freebsd-testing Approved by: rpaulo (mentor) Modified: head/Makefile.inc1 head/share/mk/bsd.own.mk Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Fri Nov 8 13:23:26 2013 (r257847) +++ head/Makefile.inc1 Fri Nov 8 14:20:22 2013 (r257848) @@ -1602,10 +1602,12 @@ ${_lib}__PL: .PHONY .MAKE .if exists(${.CURDIR}/${_lib}) ${_+_}@${ECHODIR} "===> ${_lib} (obj,depend,all,install)"; \ cd ${.CURDIR}/${_lib} && \ - ${MAKE} DIRPRFX=${_lib}/ obj && \ - ${MAKE} DIRPRFX=${_lib}/ depend && \ - ${MAKE} -DNO_PROFILE -DNO_PIC DIRPRFX=${_lib}/ all && \ - ${MAKE} -DNO_PROFILE -DNO_PIC DIRPRFX=${_lib}/ install + ${MAKE} -DNO_TESTS DIRPRFX=${_lib}/ obj && \ + ${MAKE} -DNO_TESTS DIRPRFX=${_lib}/ depend && \ + ${MAKE} -DNO_TESTS -DNO_PROFILE -DNO_PIC \ + DIRPRFX=${_lib}/ all && \ + ${MAKE} -DNO_TESTS -DNO_PROFILE -DNO_PIC \ + DIRPRFX=${_lib}/ install .endif .endfor @@ -1614,10 +1616,10 @@ ${_lib}__L: .PHONY .MAKE .if exists(${.CURDIR}/${_lib}) ${_+_}@${ECHODIR} "===> ${_lib} (obj,depend,all,install)"; \ cd ${.CURDIR}/${_lib} && \ - ${MAKE} DIRPRFX=${_lib}/ obj && \ - ${MAKE} DIRPRFX=${_lib}/ depend && \ - ${MAKE} DIRPRFX=${_lib}/ all && \ - ${MAKE} DIRPRFX=${_lib}/ install + ${MAKE} -DNO_TESTS DIRPRFX=${_lib}/ obj && \ + ${MAKE} -DNO_TESTS DIRPRFX=${_lib}/ depend && \ + ${MAKE} -DNO_TESTS DIRPRFX=${_lib}/ all && \ + ${MAKE} -DNO_TESTS DIRPRFX=${_lib}/ install .endif .endfor @@ -1627,10 +1629,12 @@ ${_lib}__L: .PHONY .MAKE lib/libpam__L: .PHONY .MAKE ${_+_}@${ECHODIR} "===> lib/libpam (obj,depend,all,install)"; \ cd ${.CURDIR}/lib/libpam && \ - ${MAKE} DIRPRFX=lib/libpam/ obj && \ - ${MAKE} DIRPRFX=lib/libpam/ depend && \ - ${MAKE} DIRPRFX=lib/libpam/ -D_NO_LIBPAM_SO_YET all && \ - ${MAKE} DIRPRFX=lib/libpam/ -D_NO_LIBPAM_SO_YET install + ${MAKE} -DNO_TESTS DIRPRFX=lib/libpam/ obj && \ + ${MAKE} -DNO_TESTS DIRPRFX=lib/libpam/ depend && \ + ${MAKE} -DNO_TESTS DIRPRFX=lib/libpam/ \ + -D_NO_LIBPAM_SO_YET all && \ + ${MAKE} -DNO_TESTS DIRPRFX=lib/libpam/ \ + -D_NO_LIBPAM_SO_YET install _prereq_libs: ${_prereq_libs:S/$/__PL/} _startup_libs: ${_startup_libs:S/$/__L/} Modified: head/share/mk/bsd.own.mk ============================================================================== --- head/share/mk/bsd.own.mk Fri Nov 8 13:23:26 2013 (r257847) +++ head/share/mk/bsd.own.mk Fri Nov 8 14:20:22 2013 (r257848) @@ -556,6 +556,20 @@ MK_CLANG_FULL:= no MK_LLDB:= no .endif +.if defined(NO_TESTS) +# This should be handled above along the handling of all other NO_* options. +# However, the above is broken when WITH_*=yes are passed to make(1) as +# command line arguments. See PR bin/183762. +# +# Because the TESTS option is new and it will default to yes, it's likely +# that people will pass WITHOUT_TESTS=yes to make(1) directly and get a broken +# build. So, just in case, it's better to explicitly handle this case here. +# +# TODO(jmmv): Either fix make to allow us putting this override where it +# belongs above or fix this file to cope with the make bug. +MK_TESTS:= no +.endif + # # Set defaults for the MK_*_SUPPORT variables. # From owner-svn-src-head@FreeBSD.ORG Fri Nov 8 14:22:17 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 01D86D03; Fri, 8 Nov 2013 14:22:17 +0000 (UTC) (envelope-from jmmv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E409C2C67; Fri, 8 Nov 2013 14:22:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA8EMGVa013778; Fri, 8 Nov 2013 14:22:16 GMT (envelope-from jmmv@svn.freebsd.org) Received: (from jmmv@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA8EMGPZ013777; Fri, 8 Nov 2013 14:22:16 GMT (envelope-from jmmv@svn.freebsd.org) Message-Id: <201311081422.rA8EMGPZ013777@svn.freebsd.org> From: Julio Merino Date: Fri, 8 Nov 2013 14:22:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257849 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Nov 2013 14:22:17 -0000 Author: jmmv Date: Fri Nov 8 14:22:16 2013 New Revision: 257849 URL: http://svnweb.freebsd.org/changeset/base/257849 Log: Add libatf-c++ to the prebuild libs. Some tests may require C++ so we must ensure this library exists as part of the bootstrap process or else they will fail to build. Do this by just depending on lib/atf as part of the bootstrap libraries instead of using lib/atf/libatf-c. Submitted by: Garrett Cooper Approved by: rpaulo (mentor) Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Fri Nov 8 14:20:22 2013 (r257848) +++ head/Makefile.inc1 Fri Nov 8 14:22:16 2013 (r257849) @@ -1478,7 +1478,7 @@ _prebuild_libs= ${_kerberos5_lib_libasn1 ${_kerberos5_lib_libhx509} ${_kerberos5_lib_libkrb5} \ ${_kerberos5_lib_libroken} \ ${_kerberos5_lib_libwind} \ - ${_lib_atf_libatf_c} \ + ${_lib_atf} \ lib/libbz2 ${_libcom_err} lib/libcrypt \ lib/libelf lib/libexpat \ ${_lib_libgssapi} ${_lib_libipx} \ @@ -1493,7 +1493,7 @@ _prebuild_libs= ${_kerberos5_lib_libasn1 ${_secure_lib_libssh} ${_secure_lib_libssl} .if ${MK_ATF} != "no" -_lib_atf_libatf_c= lib/atf/libatf-c +_lib_atf= lib/atf .endif .if ${MK_LIBTHR} != "no" From owner-svn-src-head@FreeBSD.ORG Fri Nov 8 14:24:50 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id DA188FDF; Fri, 8 Nov 2013 14:24:49 +0000 (UTC) (envelope-from jmmv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C5D022C95; Fri, 8 Nov 2013 14:24:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA8EOnU7014138; Fri, 8 Nov 2013 14:24:49 GMT (envelope-from jmmv@svn.freebsd.org) Received: (from jmmv@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA8EOlnr014128; Fri, 8 Nov 2013 14:24:47 GMT (envelope-from jmmv@svn.freebsd.org) Message-Id: <201311081424.rA8EOlnr014128@svn.freebsd.org> From: Julio Merino Date: Fri, 8 Nov 2013 14:24:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257850 - in head: . lib libexec share/doc share/man/man1 share/man/man4 share/mk tools/build/mk usr.bin X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Nov 2013 14:24:50 -0000 Author: jmmv Date: Fri Nov 8 14:24:47 2013 New Revision: 257850 URL: http://svnweb.freebsd.org/changeset/base/257850 Log: Subsume the functionality of MK_ATF into MK_TESTS. There is no reason to keep the two knobs separate: if tests are enabled, the ATF libraries are required; and if tests are disabled, the ATF libraries are not necessary. Keeping the two just serves to complicate the build. Reviewed by: freebsd-testing Approved by: rpaulo (mentor) Modified: head/Makefile.inc1 head/UPDATING head/lib/Makefile head/libexec/Makefile head/share/doc/Makefile head/share/man/man1/Makefile head/share/man/man4/Makefile head/share/mk/Makefile head/tools/build/mk/OptionalObsoleteFiles.inc head/usr.bin/Makefile Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Fri Nov 8 14:22:16 2013 (r257849) +++ head/Makefile.inc1 Fri Nov 8 14:24:47 2013 (r257850) @@ -1492,7 +1492,7 @@ _prebuild_libs= ${_kerberos5_lib_libasn1 ${_secure_lib_libcrypto} ${_lib_libldns} \ ${_secure_lib_libssh} ${_secure_lib_libssl} -.if ${MK_ATF} != "no" +.if ${MK_TESTS} != "no" _lib_atf= lib/atf .endif Modified: head/UPDATING ============================================================================== --- head/UPDATING Fri Nov 8 14:22:16 2013 (r257849) +++ head/UPDATING Fri Nov 8 14:24:47 2013 (r257850) @@ -31,6 +31,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11 disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20131108: + The WITHOUT_ATF build knob has been removed and its functionality + has been subsumed into the more generic WITHOUT_TESTS. If you were + using the former to disable the build of the ATF libraries, you + should change your settings to use the latter. + 20131025: The default version of mtree is nmtree which is obtained from NetBSD. The output is generally the same, but may vary Modified: head/lib/Makefile ============================================================================== --- head/lib/Makefile Fri Nov 8 14:22:16 2013 (r257849) +++ head/lib/Makefile Fri Nov 8 14:24:47 2013 (r257850) @@ -140,10 +140,6 @@ _csu=csu # NB: keep these sorted by MK_* knobs -.if ${MK_ATF} != "no" -_atf= atf -.endif - .if ${MK_ATM} != "no" _libngatm= libngatm .endif @@ -253,6 +249,10 @@ _libsmutil= libsmutil _libtelnet= libtelnet .endif +.if ${MK_TESTS} != "no" +_atf= atf +.endif + .if ${MK_UNBOUND} != "no" _libunbound= libunbound .endif Modified: head/libexec/Makefile ============================================================================== --- head/libexec/Makefile Fri Nov 8 14:22:16 2013 (r257849) +++ head/libexec/Makefile Fri Nov 8 14:24:47 2013 (r257850) @@ -33,10 +33,6 @@ SUBDIR= ${_atf} \ ulog-helper \ ${_ypxfr} -.if ${MK_ATF} != "no" -_atf= atf -.endif - .if ${MK_AT} != "no" _atrun= atrun .endif @@ -76,4 +72,8 @@ _smrsh= smrsh _telnetd= telnetd .endif +.if ${MK_TESTS} != "no" +_atf= atf +.endif + .include Modified: head/share/doc/Makefile ============================================================================== --- head/share/doc/Makefile Fri Nov 8 14:22:16 2013 (r257849) +++ head/share/doc/Makefile Fri Nov 8 14:24:47 2013 (r257850) @@ -9,7 +9,7 @@ SUBDIR= ${_IPv6} \ ${_llvm} \ ${_roffdocs} -.if ${MK_ATF} != "no" +.if ${MK_TESTS} != "no" _atf= atf .endif Modified: head/share/man/man1/Makefile ============================================================================== --- head/share/man/man1/Makefile Fri Nov 8 14:22:16 2013 (r257849) +++ head/share/man/man1/Makefile Fri Nov 8 14:24:47 2013 (r257850) @@ -5,7 +5,7 @@ MAN= builtin.1 intro.1 -.if ${MK_ATF} != "no" +.if ${MK_TESTS} != "no" ATF= ${.CURDIR}/../../../contrib/atf .PATH: ${ATF}/doc MAN+= atf-test-program.1 Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Fri Nov 8 14:22:16 2013 (r257849) +++ head/share/man/man4/Makefile Fri Nov 8 14:24:47 2013 (r257850) @@ -829,7 +829,7 @@ _nvram2env.4= nvram2env.4 SUBDIR= man4.${MACHINE_CPUARCH} .endif -.if ${MK_ATF} != "no" +.if ${MK_TESTS} != "no" ATF= ${.CURDIR}/../../../contrib/atf .PATH: ${ATF}/doc _atf_test_case.4= atf-test-case.4 Modified: head/share/mk/Makefile ============================================================================== --- head/share/mk/Makefile Fri Nov 8 14:22:16 2013 (r257849) +++ head/share/mk/Makefile Fri Nov 8 14:24:47 2013 (r257850) @@ -43,7 +43,7 @@ FILES= \ NO_OBJ= FILESDIR= ${BINDIR}/mk -.if ${MK_ATF} != "no" +.if ${MK_TESTS} != "no" FILES+= atf.test.mk .endif Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Fri Nov 8 14:22:16 2013 (r257849) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Fri Nov 8 14:24:47 2013 (r257850) @@ -68,54 +68,6 @@ OLD_FILES+=usr/share/man/man1/batch.1.gz OLD_FILES+=usr/share/man/man8/atrun.8.gz .endif -.if ${MK_ATF} == no -OLD_FILES+=usr/bin/atf-sh -OLD_DIRS+=usr/include/atf-c -OLD_FILES+=usr/include/atf-c/build.h -OLD_FILES+=usr/include/atf-c/check.h -OLD_FILES+=usr/include/atf-c/config.h -OLD_FILES+=usr/include/atf-c/defs.h -OLD_FILES+=usr/include/atf-c/error.h -OLD_FILES+=usr/include/atf-c/error_fwd.h -OLD_FILES+=usr/include/atf-c/macros.h -OLD_FILES+=usr/include/atf-c/tc.h -OLD_FILES+=usr/include/atf-c/tp.h -OLD_FILES+=usr/include/atf-c/utils.h -OLD_FILES+=usr/include/atf-c.h -OLD_DIRS+=usr/include/atf-c++ -OLD_FILES+=usr/include/atf-c++/build.hpp -OLD_FILES+=usr/include/atf-c++/check.hpp -OLD_FILES+=usr/include/atf-c++/config.hpp -OLD_FILES+=usr/include/atf-c++/macros.hpp -OLD_FILES+=usr/include/atf-c++/tests.hpp -OLD_FILES+=usr/include/atf-c++/utils.hpp -OLD_FILES+=usr/include/atf-c++.hpp -OLD_FILES+=usr/lib/libatf-c_p.a -OLD_FILES+=usr/lib/libatf-c.so.1 -OLD_FILES+=usr/lib/libatf-c.so -OLD_FILES+=usr/lib/libatf-c++.a -OLD_FILES+=usr/lib/libatf-c++_p.a -OLD_FILES+=usr/lib/libatf-c++.so.1 -OLD_FILES+=usr/lib/libatf-c++.so -OLD_FILES+=usr/lib/libatf-c.a -OLD_FILES+=usr/libexec/atf-check -OLD_DIRS+=usr/share/atf -OLD_FILES+=usr/share/atf/libatf-sh.subr -OLD_DIRS+=usr/share/doc/atf -OLD_FILES+=usr/share/doc/atf/AUTHORS -OLD_FILES+=usr/share/doc/atf/COPYING -OLD_FILES+=usr/share/doc/atf/NEWS -OLD_FILES+=usr/share/doc/atf/README -OLD_FILES+=usr/share/man/man1/atf-check.1.gz -OLD_FILES+=usr/share/man/man1/atf-sh.1.gz -OLD_FILES+=usr/share/man/man1/atf-test-program.1.gz -OLD_FILES+=usr/share/man/man3/atf-c-api.3.gz -OLD_FILES+=usr/share/man/man3/atf-c++-api.3.gz -OLD_FILES+=usr/share/man/man3/atf-sh-api.3.gz -OLD_FILES+=usr/share/man/man4/atf-test-case.4.gz -OLD_FILES+=usr/share/mk/atf.test.mk -.endif - .if ${MK_ATM} == no OLD_FILES+=rescue/atmconfig OLD_FILES+=sbin/atmconfig @@ -4104,6 +4056,58 @@ OLD_FILES+=usr/share/man/man1/telnet.1.g OLD_FILES+=usr/share/man/man8/telnetd.8.gz .endif +.if ${MK_TESTS} == no +# ATF libraries. +OLD_FILES+=usr/bin/atf-sh +OLD_DIRS+=usr/include/atf-c +OLD_FILES+=usr/include/atf-c/build.h +OLD_FILES+=usr/include/atf-c/check.h +OLD_FILES+=usr/include/atf-c/config.h +OLD_FILES+=usr/include/atf-c/defs.h +OLD_FILES+=usr/include/atf-c/error.h +OLD_FILES+=usr/include/atf-c/error_fwd.h +OLD_FILES+=usr/include/atf-c/macros.h +OLD_FILES+=usr/include/atf-c/tc.h +OLD_FILES+=usr/include/atf-c/tp.h +OLD_FILES+=usr/include/atf-c/utils.h +OLD_FILES+=usr/include/atf-c.h +OLD_DIRS+=usr/include/atf-c++ +OLD_FILES+=usr/include/atf-c++/build.hpp +OLD_FILES+=usr/include/atf-c++/check.hpp +OLD_FILES+=usr/include/atf-c++/config.hpp +OLD_FILES+=usr/include/atf-c++/macros.hpp +OLD_FILES+=usr/include/atf-c++/tests.hpp +OLD_FILES+=usr/include/atf-c++/utils.hpp +OLD_FILES+=usr/include/atf-c++.hpp +OLD_FILES+=usr/lib/libatf-c_p.a +OLD_FILES+=usr/lib/libatf-c.so.1 +OLD_FILES+=usr/lib/libatf-c.so +OLD_FILES+=usr/lib/libatf-c++.a +OLD_FILES+=usr/lib/libatf-c++_p.a +OLD_FILES+=usr/lib/libatf-c++.so.1 +OLD_FILES+=usr/lib/libatf-c++.so +OLD_FILES+=usr/lib/libatf-c.a +OLD_FILES+=usr/libexec/atf-check +OLD_DIRS+=usr/share/atf +OLD_FILES+=usr/share/atf/libatf-sh.subr +OLD_DIRS+=usr/share/doc/atf +OLD_FILES+=usr/share/doc/atf/AUTHORS +OLD_FILES+=usr/share/doc/atf/COPYING +OLD_FILES+=usr/share/doc/atf/NEWS +OLD_FILES+=usr/share/doc/atf/README +OLD_FILES+=usr/share/man/man1/atf-check.1.gz +OLD_FILES+=usr/share/man/man1/atf-sh.1.gz +OLD_FILES+=usr/share/man/man1/atf-test-program.1.gz +OLD_FILES+=usr/share/man/man3/atf-c-api.3.gz +OLD_FILES+=usr/share/man/man3/atf-c++-api.3.gz +OLD_FILES+=usr/share/man/man3/atf-sh-api.3.gz +OLD_FILES+=usr/share/man/man4/atf-test-case.4.gz +OLD_FILES+=usr/share/mk/atf.test.mk + +# Test suite. +# TODO(jmmv): To be filled in. +.endif + #.if ${MK_TOOLCHAIN} == no # to be filled in #.endif Modified: head/usr.bin/Makefile ============================================================================== --- head/usr.bin/Makefile Fri Nov 8 14:22:16 2013 (r257849) +++ head/usr.bin/Makefile Fri Nov 8 14:24:47 2013 (r257850) @@ -210,10 +210,6 @@ SUBDIR= alias \ SUBDIR+= at .endif -.if ${MK_ATF} != "no" -_atf= atf -.endif - .if ${MK_ATM} != "no" SUBDIR+= atm .endif @@ -332,6 +328,10 @@ SUBDIR+= vacation SUBDIR+= telnet .endif +.if ${MK_TESTS} != "no" +_atf= atf +.endif + .if ${MK_TEXTPROC} != "no" SUBDIR+= checknr SUBDIR+= colcrt From owner-svn-src-head@FreeBSD.ORG Fri Nov 8 14:26:53 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 49E4E1C6; Fri, 8 Nov 2013 14:26:53 +0000 (UTC) (envelope-from jmmv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 365792CA8; Fri, 8 Nov 2013 14:26:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA8EQrd4014412; Fri, 8 Nov 2013 14:26:53 GMT (envelope-from jmmv@svn.freebsd.org) Received: (from jmmv@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA8EQr8w014411; Fri, 8 Nov 2013 14:26:53 GMT (envelope-from jmmv@svn.freebsd.org) Message-Id: <201311081426.rA8EQr8w014411@svn.freebsd.org> From: Julio Merino Date: Fri, 8 Nov 2013 14:26:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257851 - head/tools/build/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Nov 2013 14:26:53 -0000 Author: jmmv Date: Fri Nov 8 14:26:52 2013 New Revision: 257851 URL: http://svnweb.freebsd.org/changeset/base/257851 Log: Handle the removal of the test suite when WITHOUT_TESTS=yes. Add all files from /usr/tests to the obsoleted files list when the build of the tests is disabled via the WITHOUT_TESTS knob. Do this automatically so that we do not have to suffer the pain of maintaining such list by hand. Reviewed by: freebsd-testing Approved by: rpaulo (mentor) Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Fri Nov 8 14:24:47 2013 (r257850) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Fri Nov 8 14:26:52 2013 (r257851) @@ -4105,7 +4105,10 @@ OLD_FILES+=usr/share/man/man4/atf-test-c OLD_FILES+=usr/share/mk/atf.test.mk # Test suite. -# TODO(jmmv): To be filled in. +TESTS_DIRS!=find ${DESTDIR}/usr/tests -type d | sed -e 's,^${DESTDIR}/,,' +OLD_DIRS+=${TESTS_DIRS} +TESTS_FILES!=find ${DESTDIR}/usr/tests \! -type d | sed -e 's,^${DESTDIR}/,,' +OLD_FILES+=${TESTS_FILES} .endif #.if ${MK_TOOLCHAIN} == no From owner-svn-src-head@FreeBSD.ORG Fri Nov 8 14:29:07 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A9E67383; Fri, 8 Nov 2013 14:29:07 +0000 (UTC) (envelope-from jmmv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9772F2CC3; Fri, 8 Nov 2013 14:29:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA8ET7kh014758; Fri, 8 Nov 2013 14:29:07 GMT (envelope-from jmmv@svn.freebsd.org) Received: (from jmmv@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA8ET62u014754; Fri, 8 Nov 2013 14:29:06 GMT (envelope-from jmmv@svn.freebsd.org) Message-Id: <201311081429.rA8ET62u014754@svn.freebsd.org> From: Julio Merino Date: Fri, 8 Nov 2013 14:29:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257852 - in head: lib lib/tests tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Nov 2013 14:29:07 -0000 Author: jmmv Date: Fri Nov 8 14:29:06 2013 New Revision: 257852 URL: http://svnweb.freebsd.org/changeset/base/257852 Log: Install category Kyuafiles from their category directories. Move the installation of /usr/tests/lib/Kyuafile from src/tests/lib/ to src/lib/. This is to keep the src/tests/ hierarchy unaware of the rest of the tree, which makes things clearer in general. In particular: 1) Everything related to the construction of /usr/tests/lib/ is kept in src/lib/. There is no need to think about different directories and how they relate to each other. (The same applies for libexec, usr.bin, etc. but these are not yet handled.) 2) src/tests becomes the place to keep cross-functional test programs and nothing else, which also helps in simplifying things. Reviewed by: freebsd-testing Approved by: rpaulo (mentor) Added: head/lib/tests/ head/lib/tests/Makefile (contents, props changed) Modified: head/lib/Makefile head/tests/Makefile head/tests/README Modified: head/lib/Makefile ============================================================================== --- head/lib/Makefile Fri Nov 8 14:26:52 2013 (r257851) +++ head/lib/Makefile Fri Nov 8 14:29:06 2013 (r257852) @@ -126,7 +126,8 @@ SUBDIR= ${SUBDIR_ORDERED} \ libyaml \ libz \ ${_atf} \ - ${_clang} + ${_clang} \ + ${_tests} .if exists(${.CURDIR}/csu/${MACHINE_ARCH}-elf) _csu=csu/${MACHINE_ARCH}-elf @@ -251,6 +252,7 @@ _libtelnet= libtelnet .if ${MK_TESTS} != "no" _atf= atf +_tests= tests .endif .if ${MK_UNBOUND} != "no" Added: head/lib/tests/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/tests/Makefile Fri Nov 8 14:29:06 2013 (r257852) @@ -0,0 +1,10 @@ +# $FreeBSD$ + +.include + +TESTSDIR= ${TESTSBASE}/lib + +.PATH: ${.CURDIR:H:H}/tests +KYUAFILE= yes + +.include Modified: head/tests/Makefile ============================================================================== --- head/tests/Makefile Fri Nov 8 14:26:52 2013 (r257851) +++ head/tests/Makefile Fri Nov 8 14:29:06 2013 (r257852) @@ -2,10 +2,9 @@ .include -TESTS_SUBDIRS= lib +SUBDIR= # still empty TESTSDIR= ${TESTSBASE} - KYUAFILE= yes .include Modified: head/tests/README ============================================================================== --- head/tests/README Fri Nov 8 14:26:52 2013 (r257851) +++ head/tests/README Fri Nov 8 14:29:06 2013 (r257852) @@ -44,13 +44,12 @@ tree-- the top-level Kyuafile does not k exist upfront. Instead, such Kyuafile automatically detects, at run-time, which */Kyuafile files exist and uses those directly. -Similarly, every category subdirectory within src/tests/ provides the -same Kyuafile with auto-discovery features. For example: src/tests/lib/ -holds a generic Makefile to install test-suite related material but such -directory does not know upfront which libraries within src/lib/ will -install tests. For this reason, the Kyuafile in src/tests/lib/ has to -also use the auto-discovery features. The same applies for any other -category subdirectory (e.g. bin, usr.sbin, etc.). +Similarly, every directory in src/ that wants to install a Kyuafile to +just recurse into other subdirectories reuses this Kyuafile with +auto-discovery features. As an example, take a look at src/lib/tests/ +whose sole purpose is to install a Kyuafile into /usr/tests/lib/. +The goal in this specific case is for /usr/tests/lib/ to be generated +entirely from src/lib/. -- $FreeBSD$ From owner-svn-src-head@FreeBSD.ORG Fri Nov 8 14:33:47 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 2A7C564A; Fri, 8 Nov 2013 14:33:47 +0000 (UTC) (envelope-from jmmv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 130B32D20; Fri, 8 Nov 2013 14:33:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA8EXl6l017794; Fri, 8 Nov 2013 14:33:47 GMT (envelope-from jmmv@svn.freebsd.org) Received: (from jmmv@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA8EXfOD017761; Fri, 8 Nov 2013 14:33:41 GMT (envelope-from jmmv@svn.freebsd.org) Message-Id: <201311081433.rA8EXfOD017761@svn.freebsd.org> From: Julio Merino Date: Fri, 8 Nov 2013 14:33:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257853 - in head: etc/mtree lib/atf lib/atf/libatf-c lib/atf/libatf-c++ lib/atf/libatf-c++/tests lib/atf/libatf-c/tests lib/atf/tests lib/atf/tests/test-programs libexec libexec/atf li... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Nov 2013 14:33:47 -0000 Author: jmmv Date: Fri Nov 8 14:33:41 2013 New Revision: 257853 URL: http://svnweb.freebsd.org/changeset/base/257853 Log: Build and install the atf tests. Reviewed by: freebsd-testing Approved by: rpaulo (mentor) Added: head/lib/atf/libatf-c++/Makefile.inc (contents, props changed) head/lib/atf/libatf-c++/tests/ head/lib/atf/libatf-c++/tests/Makefile (contents, props changed) head/lib/atf/libatf-c/Makefile.inc (contents, props changed) head/lib/atf/libatf-c/tests/ head/lib/atf/libatf-c/tests/Makefile (contents, props changed) head/lib/atf/tests/ head/lib/atf/tests/Makefile (contents, props changed) head/lib/atf/tests/test-programs/ head/lib/atf/tests/test-programs/Makefile (contents, props changed) head/libexec/atf/atf-check/Makefile.inc (contents, props changed) head/libexec/atf/atf-check/tests/ head/libexec/atf/atf-check/tests/Makefile (contents, props changed) head/libexec/atf/tests/ head/libexec/atf/tests/Makefile (contents, props changed) head/libexec/tests/ head/libexec/tests/Makefile (contents, props changed) head/usr.bin/atf/atf-sh/tests/ head/usr.bin/atf/atf-sh/tests/Makefile (contents, props changed) head/usr.bin/atf/tests/ head/usr.bin/atf/tests/Makefile (contents, props changed) head/usr.bin/tests/ head/usr.bin/tests/Makefile (contents, props changed) Modified: head/etc/mtree/BSD.tests.dist head/lib/atf/Makefile head/lib/atf/Makefile.inc head/lib/atf/libatf-c++/Makefile head/lib/atf/libatf-c/Makefile head/libexec/Makefile head/libexec/atf/Makefile head/libexec/atf/Makefile.inc head/libexec/atf/atf-check/Makefile head/usr.bin/Makefile head/usr.bin/atf/Makefile head/usr.bin/atf/Makefile.inc head/usr.bin/atf/atf-sh/Makefile Modified: head/etc/mtree/BSD.tests.dist ============================================================================== --- head/etc/mtree/BSD.tests.dist Fri Nov 8 14:29:06 2013 (r257852) +++ head/etc/mtree/BSD.tests.dist Fri Nov 8 14:33:41 2013 (r257853) @@ -6,7 +6,27 @@ /set type=dir uname=root gname=wheel mode=0755 . lib + atf + libatf-c + .. + libatf-c++ + .. + test-programs + .. + .. libcrypt .. .. + libexec + atf + atf-check + .. + .. + .. + usr.bin + atf + atf-sh + .. + .. + .. .. Modified: head/lib/atf/Makefile ============================================================================== --- head/lib/atf/Makefile Fri Nov 8 14:29:06 2013 (r257852) +++ head/lib/atf/Makefile Fri Nov 8 14:33:41 2013 (r257853) @@ -27,9 +27,13 @@ .include -SUBDIR= \ - libatf-c \ - libatf-c++ +SUBDIR= libatf-c \ + libatf-c++ \ + ${_tests} + +.if ${MK_TESTS} != "no" +_tests= tests +.endif .ORDER: ${SUBDIR} Modified: head/lib/atf/Makefile.inc ============================================================================== --- head/lib/atf/Makefile.inc Fri Nov 8 14:29:06 2013 (r257852) +++ head/lib/atf/Makefile.inc Fri Nov 8 14:33:41 2013 (r257853) @@ -25,8 +25,6 @@ # # $FreeBSD$ -ATF= ${.CURDIR}/../../../contrib/atf - _CFLAGS:= ${CFLAGS} _CPPFLAGS:= ${CPPFLAGS} _CXXFLAGS:= ${CXXFLAGS} Modified: head/lib/atf/libatf-c++/Makefile ============================================================================== --- head/lib/atf/libatf-c++/Makefile Fri Nov 8 14:29:06 2013 (r257852) +++ head/lib/atf/libatf-c++/Makefile Fri Nov 8 14:33:41 2013 (r257853) @@ -36,6 +36,7 @@ LDADD= -latf-c LDFLAGS+= -L${.OBJDIR}/../libatf-c +ATF= ${.CURDIR:H:H:H}/contrib/atf .PATH: ${ATF} .PATH: ${ATF}/atf-c++ .PATH: ${ATF}/atf-c++/detail @@ -73,4 +74,8 @@ INCSDIR_atf-c++.hpp= ${INCLUDEDIR} MAN= atf-c++-api.3 +.if ${MK_TESTS} != "no" +SUBDIR= tests +.endif + .include Added: head/lib/atf/libatf-c++/Makefile.inc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/atf/libatf-c++/Makefile.inc Fri Nov 8 14:33:41 2013 (r257853) @@ -0,0 +1,3 @@ +# $FreeBSD$ + +.include "../Makefile.inc" Added: head/lib/atf/libatf-c++/tests/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/atf/libatf-c++/tests/Makefile Fri Nov 8 14:33:41 2013 (r257853) @@ -0,0 +1,47 @@ +# $FreeBSD$ + +.include + +TESTSDIR= ${TESTSBASE}/lib/atf/libatf-c++ + +ATF= ${.CURDIR:H:H:H:H}/contrib/atf +.PATH: ${ATF}/atf-c++ +.PATH: ${ATF}/atf-c++/detail + +CFLAGS+= -I${ATF} + +FILESDIR= ${TESTSDIR} +FILES= macros_hpp_test.cpp +FILES+= unused_test.cpp + +# Tests in atf-c++. +.for _T in atf_c++_test \ + build_test \ + check_test \ + config_test \ + macros_test \ + tests_test \ + utils_test +ATF_TESTS_CXX+= ${_T} +SRCS_${_T}= ${_T}.cpp test_helpers.cpp +.endfor + +ATF_TESTS_SH= pkg_config_test + +# Tests in atf-c++/detail. + +.for _T in application_test \ + env_test \ + exceptions_test \ + expand_test \ + fs_test \ + parser_test \ + process_test \ + sanity_test \ + text_test \ + ui_test +ATF_TESTS_CXX+= ${_T} +SRCS_${_T}= ${_T}.cpp test_helpers.cpp +.endfor + +.include Modified: head/lib/atf/libatf-c/Makefile ============================================================================== --- head/lib/atf/libatf-c/Makefile Fri Nov 8 14:29:06 2013 (r257852) +++ head/lib/atf/libatf-c/Makefile Fri Nov 8 14:33:41 2013 (r257853) @@ -30,6 +30,7 @@ LIB= atf-c SHLIB_MAJOR= 1 +ATF= ${.CURDIR:H:H:H}/contrib/atf .PATH: ${ATF} .PATH: ${ATF}/atf-c .PATH: ${ATF}/atf-c/detail @@ -73,4 +74,8 @@ INCSDIR_atf-c.h= ${INCLUDEDIR} MAN= atf-c-api.3 +.if ${MK_TESTS} != "no" +SUBDIR= tests +.endif + .include Added: head/lib/atf/libatf-c/Makefile.inc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/atf/libatf-c/Makefile.inc Fri Nov 8 14:33:41 2013 (r257853) @@ -0,0 +1,3 @@ +# $FreeBSD$ + +.include "../Makefile.inc" Added: head/lib/atf/libatf-c/tests/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/atf/libatf-c/tests/Makefile Fri Nov 8 14:33:41 2013 (r257853) @@ -0,0 +1,62 @@ +# $FreeBSD$ + +.include + +TESTSDIR= ${TESTSBASE}/lib/atf/libatf-c + +ATF= ${.CURDIR:H:H:H:H}/contrib/atf +.PATH: ${ATF}/atf-c +.PATH: ${ATF}/atf-c/detail + +CFLAGS+= -I${ATF} + +.if ${COMPILER_TYPE} == "clang" +# macros_test.c contains a double 'const const' which will be gone with +# the import of atf-0.18. +# TODO(jmmv): Remove this workaround once we do that update. +CFLAGS+= -Wno-duplicate-decl-specifier +.endif + +FILESDIR= ${TESTSDIR} +FILES= macros_h_test.c +FILES+= unused_test.c + +# Tests in atf-c. + +.for _T in atf_c_test \ + build_test \ + check_test \ + config_test \ + error_test \ + macros_test \ + tc_test \ + tp_test \ + utils_test +ATF_TESTS_C+= ${_T} +SRCS_${_T}= ${_T}.c test_helpers.c +.endfor + +ATF_TESTS_SH= pkg_config_test + +# Tests in atf-c/detail. + +.for _T in dynstr_test \ + env_test \ + fs_test \ + list_test \ + map_test \ + process_test \ + sanity_test \ + test_helpers_test \ + text_test \ + user_test +ATF_TESTS_C+= ${_T} +SRCS_${_T}= ${_T}.c test_helpers.c +.endfor + +PROGS+= process_helpers +SRCS_process_helpers= process_helpers.c +MAN_process_helpers= # defined +BINDIR_process_helpers= ${TESTSDIR} + +.include Added: head/lib/atf/tests/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/atf/tests/Makefile Fri Nov 8 14:33:41 2013 (r257853) @@ -0,0 +1,12 @@ +# $FreeBSD$ + +.include + +TESTSDIR= ${TESTSBASE}/lib/atf + +.PATH: ${.CURDIR:H:H:H}/tests +KYUAFILE= yes + +SUBDIR= test-programs + +.include Added: head/lib/atf/tests/test-programs/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/atf/tests/test-programs/Makefile Fri Nov 8 14:33:41 2013 (r257853) @@ -0,0 +1,24 @@ +# $FreeBSD$ + +.include + +TESTSDIR= ${TESTSBASE}/lib/atf/test-programs +KYUAFILE= yes + +ATF= ${.CURDIR:H:H:H:H}/contrib/atf +.PATH: ${ATF}/test-programs + +CFLAGS+= -I${ATF} + +ATF_TESTS_C= c_helpers + +ATF_TESTS_CXX= cpp_helpers +SRCS_cpp_helpers= cpp_helpers.cpp + +ATF_TESTS_SH= sh_helpers +.for _T in config_test expect_test fork_test meta_data_test result_test srcdir_test +ATF_TESTS_SH+= ${_T} +ATF_TESTS_SH_SRC_${_T}= common.sh ${_T}.sh +.endfor + +.include Modified: head/libexec/Makefile ============================================================================== --- head/libexec/Makefile Fri Nov 8 14:29:06 2013 (r257852) +++ head/libexec/Makefile Fri Nov 8 14:33:41 2013 (r257853) @@ -28,6 +28,7 @@ SUBDIR= ${_atf} \ talkd \ tcpd \ ${_telnetd} \ + ${_tests} \ tftpd \ ${_tftp-proxy} \ ulog-helper \ @@ -74,6 +75,7 @@ _telnetd= telnetd .if ${MK_TESTS} != "no" _atf= atf +_tests= tests .endif .include Modified: head/libexec/atf/Makefile ============================================================================== --- head/libexec/atf/Makefile Fri Nov 8 14:29:06 2013 (r257852) +++ head/libexec/atf/Makefile Fri Nov 8 14:33:41 2013 (r257853) @@ -25,6 +25,6 @@ # # $FreeBSD$ -SUBDIR= atf-check +SUBDIR= atf-check tests .include Modified: head/libexec/atf/Makefile.inc ============================================================================== --- head/libexec/atf/Makefile.inc Fri Nov 8 14:29:06 2013 (r257852) +++ head/libexec/atf/Makefile.inc Fri Nov 8 14:33:41 2013 (r257853) @@ -25,8 +25,6 @@ # # $FreeBSD$ -ATF = ${.CURDIR}/../../../contrib/atf - CFLAGS+= -DHAVE_CONFIG_H WARNS?= 3 Modified: head/libexec/atf/atf-check/Makefile ============================================================================== --- head/libexec/atf/atf-check/Makefile Fri Nov 8 14:29:06 2013 (r257852) +++ head/libexec/atf/atf-check/Makefile Fri Nov 8 14:33:41 2013 (r257853) @@ -27,6 +27,7 @@ .include +ATF= ${.CURDIR:H:H:H}/contrib/atf .PATH: ${ATF}/atf-sh BINDIR= /usr/libexec @@ -42,4 +43,8 @@ LDFLAGS+= -L${.OBJDIR}/../../../lib/atf/ LDFLAGS+= -L${.OBJDIR}/../../../lib/atf/libatf-c LDADD+= -latf-c++ -latf-c +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include Added: head/libexec/atf/atf-check/Makefile.inc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/libexec/atf/atf-check/Makefile.inc Fri Nov 8 14:33:41 2013 (r257853) @@ -0,0 +1,3 @@ +# $FreeBSD$ + +.include "../Makefile.inc" Added: head/libexec/atf/atf-check/tests/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/libexec/atf/atf-check/tests/Makefile Fri Nov 8 14:33:41 2013 (r257853) @@ -0,0 +1,12 @@ +# $FreeBSD$ + +.include + +TESTSDIR= ${TESTSBASE}/libexec/atf/atf-check + +ATF= ${.CURDIR:H:H:H:H}/contrib/atf +.PATH: ${ATF}/atf-sh + +ATF_TESTS_SH= atf-check_test + +.include Added: head/libexec/atf/tests/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/libexec/atf/tests/Makefile Fri Nov 8 14:33:41 2013 (r257853) @@ -0,0 +1,10 @@ +# $FreeBSD$ + +.include + +TESTSDIR= ${TESTSBASE}/libexec/atf + +.PATH: ${.CURDIR:H:H:H}/tests +KYUAFILE= yes + +.include Added: head/libexec/tests/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/libexec/tests/Makefile Fri Nov 8 14:33:41 2013 (r257853) @@ -0,0 +1,10 @@ +# $FreeBSD$ + +.include + +TESTSDIR= ${TESTSBASE}/libexec + +.PATH: ${.CURDIR:H:H}/tests +KYUAFILE= yes + +.include Modified: head/usr.bin/Makefile ============================================================================== --- head/usr.bin/Makefile Fri Nov 8 14:29:06 2013 (r257852) +++ head/usr.bin/Makefile Fri Nov 8 14:33:41 2013 (r257853) @@ -160,6 +160,7 @@ SUBDIR= alias \ tar \ tcopy \ tee \ + ${_tests} \ tftp \ time \ tip \ @@ -330,6 +331,7 @@ SUBDIR+= telnet .if ${MK_TESTS} != "no" _atf= atf +_tests= tests .endif .if ${MK_TEXTPROC} != "no" Modified: head/usr.bin/atf/Makefile ============================================================================== --- head/usr.bin/atf/Makefile Fri Nov 8 14:29:06 2013 (r257852) +++ head/usr.bin/atf/Makefile Fri Nov 8 14:33:41 2013 (r257853) @@ -25,6 +25,6 @@ # # $FreeBSD$ -SUBDIR= atf-sh +SUBDIR= atf-sh tests .include Modified: head/usr.bin/atf/Makefile.inc ============================================================================== --- head/usr.bin/atf/Makefile.inc Fri Nov 8 14:29:06 2013 (r257852) +++ head/usr.bin/atf/Makefile.inc Fri Nov 8 14:33:41 2013 (r257853) @@ -1,6 +1,4 @@ # $FreeBSD$ -ATF= ${.CURDIR}/../../../contrib/atf - BINDIR?= /usr/bin WARNS?= 3 Modified: head/usr.bin/atf/atf-sh/Makefile ============================================================================== --- head/usr.bin/atf/atf-sh/Makefile Fri Nov 8 14:29:06 2013 (r257852) +++ head/usr.bin/atf/atf-sh/Makefile Fri Nov 8 14:33:41 2013 (r257853) @@ -27,6 +27,7 @@ .include +ATF= ${.CURDIR:H:H:H}/contrib/atf .PATH: ${ATF}/atf-sh PROG_CXX= atf-sh @@ -44,4 +45,8 @@ FILESGROUPS= SUBR SUBRDIR= ${SHAREDIR}/atf SUBR= libatf-sh.subr +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include Added: head/usr.bin/atf/atf-sh/tests/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/atf/atf-sh/tests/Makefile Fri Nov 8 14:33:41 2013 (r257853) @@ -0,0 +1,18 @@ +# $FreeBSD$ + +.include + +TESTSDIR= ${TESTSBASE}/usr.bin/atf/atf-sh + +ATF= ${.CURDIR:H:H:H:H}/contrib/atf +.PATH: ${ATF}/atf-sh + +ATF_TESTS_SH+= atf_check_test +ATF_TESTS_SH+= config_test +ATF_TESTS_SH+= integration_test +ATF_TESTS_SH+= misc_helpers +ATF_TESTS_SH+= normalize_test +ATF_TESTS_SH+= tc_test +ATF_TESTS_SH+= tp_test + +.include Added: head/usr.bin/atf/tests/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/atf/tests/Makefile Fri Nov 8 14:33:41 2013 (r257853) @@ -0,0 +1,10 @@ +# $FreeBSD$ + +.include + +TESTSDIR= ${TESTSBASE}/usr.bin/atf + +.PATH: ${.CURDIR:H:H:H}/tests +KYUAFILE= yes + +.include Added: head/usr.bin/tests/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/tests/Makefile Fri Nov 8 14:33:41 2013 (r257853) @@ -0,0 +1,10 @@ +# $FreeBSD$ + +.include + +TESTSDIR= ${TESTSBASE}/usr.bin + +.PATH: ${.CURDIR:H:H}/tests +KYUAFILE= yes + +.include From owner-svn-src-head@FreeBSD.ORG Fri Nov 8 16:25:02 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 8005C626; Fri, 8 Nov 2013 16:25:02 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 552C4239B; Fri, 8 Nov 2013 16:25:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA8GP2gH056195; Fri, 8 Nov 2013 16:25:02 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA8GP07m056174; Fri, 8 Nov 2013 16:25:00 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201311081625.rA8GP07m056174@svn.freebsd.org> From: Alan Cox Date: Fri, 8 Nov 2013 16:25:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257854 - in head/sys: amd64/include arm/include i386/include ia64/include kern mips/include powerpc/include sparc64/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Nov 2013 16:25:02 -0000 Author: alc Date: Fri Nov 8 16:25:00 2013 New Revision: 257854 URL: http://svnweb.freebsd.org/changeset/base/257854 Log: As of r257209, all architectures have defined VM_KMEM_SIZE_SCALE. In other words, every architecture is now auto-sizing the kmem arena. This revision changes kmeminit() so that the definition of VM_KMEM_SIZE_SCALE becomes mandatory and the definition of VM_KMEM_SIZE becomes optional. Replace or eliminate all existing definitions of VM_KMEM_SIZE. With auto-sizing enabled, VM_KMEM_SIZE effectively became an alternate spelling for VM_KMEM_SIZE_MIN on most architectures. Use VM_KMEM_SIZE_MIN for clarity. Change kmeminit() so that the effect of defining VM_KMEM_SIZE is similar to that of setting the tunable vm.kmem_size. Whereas the macros VM_KMEM_SIZE_{MAX,MIN,SCALE} have had the same effect as the tunables vm.kmem_size_{max,min,scale}, the effects of VM_KMEM_SIZE and vm.kmem_size have been distinct. In particular, whereas VM_KMEM_SIZE was overridden by VM_KMEM_SIZE_{MAX,MIN,SCALE} and vm.kmem_size_{max,min,scale}, vm.kmem_size was not. Remedy this inconsistency. Now, VM_KMEM_SIZE can be used to set the size of the kmem arena at compile-time without that value being overridden by auto-sizing. Update the nearby comments to reflect the kmem submap being replaced by the kmem arena. Stop duplicating the auto-sizing formula in every machine- dependent vmparam.h and place it in kmeminit() where auto-sizing takes place. Reviewed by: kib (an earlier version) Sponsored by: EMC / Isilon Storage Division Modified: head/sys/amd64/include/vmparam.h head/sys/arm/include/vmparam.h head/sys/i386/include/vmparam.h head/sys/ia64/include/vmparam.h head/sys/kern/kern_malloc.c head/sys/mips/include/vmparam.h head/sys/powerpc/include/vmparam.h head/sys/sparc64/include/vmparam.h Modified: head/sys/amd64/include/vmparam.h ============================================================================== --- head/sys/amd64/include/vmparam.h Fri Nov 8 14:33:41 2013 (r257853) +++ head/sys/amd64/include/vmparam.h Fri Nov 8 16:25:00 2013 (r257854) @@ -178,23 +178,16 @@ #define PHYS_TO_DMAP(x) ((x) | DMAP_MIN_ADDRESS) #define DMAP_TO_PHYS(x) ((x) & ~DMAP_MIN_ADDRESS) -/* virtual sizes (bytes) for various kernel submaps */ -#ifndef VM_KMEM_SIZE -#define VM_KMEM_SIZE (12 * 1024 * 1024) -#endif - /* - * How many physical pages per KVA page allocated. - * min(max(max(VM_KMEM_SIZE, Physical memory/VM_KMEM_SIZE_SCALE), - * VM_KMEM_SIZE_MIN), VM_KMEM_SIZE_MAX) - * is the total KVA space allocated for kmem_map. + * How many physical pages per kmem arena virtual page. */ #ifndef VM_KMEM_SIZE_SCALE #define VM_KMEM_SIZE_SCALE (1) #endif /* - * Ceiling on amount of kmem_map kva space. + * Optional ceiling (in bytes) on the size of the kmem arena: 60% of the + * kernel map. */ #ifndef VM_KMEM_SIZE_MAX #define VM_KMEM_SIZE_MAX ((VM_MAX_KERNEL_ADDRESS - \ Modified: head/sys/arm/include/vmparam.h ============================================================================== --- head/sys/arm/include/vmparam.h Fri Nov 8 14:33:41 2013 (r257853) +++ head/sys/arm/include/vmparam.h Fri Nov 8 16:25:00 2013 (r257854) @@ -165,17 +165,22 @@ #define VM_MAX_KERNEL_ADDRESS (vm_max_kernel_address) /* - * Virtual size (bytes) for various kernel submaps. + * How many physical pages per kmem arena virtual page. */ -#ifndef VM_KMEM_SIZE -#define VM_KMEM_SIZE (12*1024*1024) -#endif #ifndef VM_KMEM_SIZE_SCALE -#define VM_KMEM_SIZE_SCALE (3) +#define VM_KMEM_SIZE_SCALE (3) +#endif + +/* + * Optional floor (in bytes) on the size of the kmem arena. + */ +#ifndef VM_KMEM_SIZE_MIN +#define VM_KMEM_SIZE_MIN (12 * 1024 * 1024) #endif /* - * Ceiling on the size of the kmem submap: 40% of the kernel map. + * Optional ceiling (in bytes) on the size of the kmem arena: 40% of the + * kernel map. */ #ifndef VM_KMEM_SIZE_MAX #define VM_KMEM_SIZE_MAX ((vm_max_kernel_address - \ Modified: head/sys/i386/include/vmparam.h ============================================================================== --- head/sys/i386/include/vmparam.h Fri Nov 8 14:33:41 2013 (r257853) +++ head/sys/i386/include/vmparam.h Fri Nov 8 16:25:00 2013 (r257854) @@ -164,24 +164,23 @@ #define VM_MAX_ADDRESS VADDR(PTDPTDI, PTDPTDI) #define VM_MIN_ADDRESS ((vm_offset_t)0) -/* virtual sizes (bytes) for various kernel submaps */ -#ifndef VM_KMEM_SIZE -#define VM_KMEM_SIZE (12 * 1024 * 1024) -#endif - /* - * How many physical pages per KVA page allocated. - * min(max(max(VM_KMEM_SIZE, Physical memory/VM_KMEM_SIZE_SCALE), - * VM_KMEM_SIZE_MIN), VM_KMEM_SIZE_MAX) - * is the total KVA space allocated for kmem_map. + * How many physical pages per kmem arena virtual page. */ #ifndef VM_KMEM_SIZE_SCALE #define VM_KMEM_SIZE_SCALE (3) #endif /* - * Ceiling on the amount of kmem_map KVA space: 40% of the entire KVA space - * rounded to the nearest multiple of the superpage size. + * Optional floor (in bytes) on the size of the kmem arena. + */ +#ifndef VM_KMEM_SIZE_MIN +#define VM_KMEM_SIZE_MIN (12 * 1024 * 1024) +#endif + +/* + * Optional ceiling (in bytes) on the size of the kmem arena: 40% of the + * kernel map rounded to the nearest multiple of the superpage size. */ #ifndef VM_KMEM_SIZE_MAX #define VM_KMEM_SIZE_MAX (((((VM_MAX_KERNEL_ADDRESS - \ Modified: head/sys/ia64/include/vmparam.h ============================================================================== --- head/sys/ia64/include/vmparam.h Fri Nov 8 14:33:41 2013 (r257853) +++ head/sys/ia64/include/vmparam.h Fri Nov 8 16:25:00 2013 (r257854) @@ -189,19 +189,11 @@ #define USRSTACK VM_MAXUSER_ADDRESS #define IA64_BACKINGSTORE (USRSTACK - (2 * MAXSSIZ) - PAGE_SIZE) -/* virtual sizes (bytes) for various kernel submaps */ -#ifndef VM_KMEM_SIZE -#define VM_KMEM_SIZE (12 * 1024 * 1024) -#endif - /* - * How many physical pages per KVA page allocated. - * min(max(max(VM_KMEM_SIZE, Physical memory/VM_KMEM_SIZE_SCALE), - * VM_KMEM_SIZE_MIN), VM_KMEM_SIZE_MAX) - * is the total KVA space allocated for kmem_map. + * How many physical pages per kmem arena virtual page. */ #ifndef VM_KMEM_SIZE_SCALE -#define VM_KMEM_SIZE_SCALE (4) /* XXX 8192 byte pages */ +#define VM_KMEM_SIZE_SCALE (4) #endif /* initial pagein size of beginning of executable file */ Modified: head/sys/kern/kern_malloc.c ============================================================================== --- head/sys/kern/kern_malloc.c Fri Nov 8 14:33:41 2013 (r257853) +++ head/sys/kern/kern_malloc.c Fri Nov 8 16:25:00 2013 (r257854) @@ -684,41 +684,47 @@ kmem_reclaim(vmem_t *vm, int flags) pagedaemon_wakeup(); } +CTASSERT(VM_KMEM_SIZE_SCALE >= 1); + /* - * Initialize the kernel memory arena. + * Initialize the kernel memory (kmem) arena. */ void kmeminit(void) { u_long mem_size, tmp; - + /* - * Try to auto-tune the kernel memory size, so that it is - * more applicable for a wider range of machine sizes. The - * VM_KMEM_SIZE_MAX is dependent on the maximum KVA space - * available. + * Calculate the amount of kernel virtual address (KVA) space that is + * preallocated to the kmem arena. In order to support a wide range + * of machines, it is a function of the physical memory size, + * specifically, + * + * min(max(physical memory size / VM_KMEM_SIZE_SCALE, + * VM_KMEM_SIZE_MIN), VM_KMEM_SIZE_MAX) * - * Note that the kmem arena is also used by the zone allocator, - * so make sure that there is enough space. + * Every architecture must define an integral value for + * VM_KMEM_SIZE_SCALE. However, the definitions of VM_KMEM_SIZE_MIN + * and VM_KMEM_SIZE_MAX, which represent respectively the floor and + * ceiling on this preallocation, are optional. Typically, + * VM_KMEM_SIZE_MAX is itself a function of the available KVA space on + * a given architecture. */ - vm_kmem_size = VM_KMEM_SIZE; mem_size = cnt.v_page_count; -#if defined(VM_KMEM_SIZE_SCALE) vm_kmem_size_scale = VM_KMEM_SIZE_SCALE; -#endif TUNABLE_INT_FETCH("vm.kmem_size_scale", &vm_kmem_size_scale); - if (vm_kmem_size_scale > 0 && - (mem_size / vm_kmem_size_scale) > (vm_kmem_size / PAGE_SIZE)) - vm_kmem_size = (mem_size / vm_kmem_size_scale) * PAGE_SIZE; + if (vm_kmem_size_scale < 1) + vm_kmem_size_scale = VM_KMEM_SIZE_SCALE; + + vm_kmem_size = (mem_size / vm_kmem_size_scale) * PAGE_SIZE; #if defined(VM_KMEM_SIZE_MIN) vm_kmem_size_min = VM_KMEM_SIZE_MIN; #endif TUNABLE_ULONG_FETCH("vm.kmem_size_min", &vm_kmem_size_min); - if (vm_kmem_size_min > 0 && vm_kmem_size < vm_kmem_size_min) { + if (vm_kmem_size_min > 0 && vm_kmem_size < vm_kmem_size_min) vm_kmem_size = vm_kmem_size_min; - } #if defined(VM_KMEM_SIZE_MAX) vm_kmem_size_max = VM_KMEM_SIZE_MAX; @@ -727,15 +733,17 @@ kmeminit(void) if (vm_kmem_size_max > 0 && vm_kmem_size >= vm_kmem_size_max) vm_kmem_size = vm_kmem_size_max; - /* Allow final override from the kernel environment */ - TUNABLE_ULONG_FETCH("vm.kmem_size", &vm_kmem_size); - /* - * Limit kmem virtual size to twice the physical memory. - * This allows for kmem map sparseness, but limits the size - * to something sane. Be careful to not overflow the 32bit - * ints while doing the check or the adjustment. + * Alternatively, the amount of KVA space that is preallocated to the + * kmem arena can be set statically at compile-time or manually + * through the kernel environment. However, it is still limited to + * twice the physical memory size, which has been sufficient to handle + * the most severe cases of external fragmentation in the kmem arena. */ +#if defined(VM_KMEM_SIZE) + vm_kmem_size = VM_KMEM_SIZE; +#endif + TUNABLE_ULONG_FETCH("vm.kmem_size", &vm_kmem_size); if (vm_kmem_size / 2 / PAGE_SIZE > mem_size) vm_kmem_size = 2 * mem_size * PAGE_SIZE; Modified: head/sys/mips/include/vmparam.h ============================================================================== --- head/sys/mips/include/vmparam.h Fri Nov 8 14:33:41 2013 (r257853) +++ head/sys/mips/include/vmparam.h Fri Nov 8 16:25:00 2013 (r257854) @@ -108,22 +108,23 @@ #define VM_NRESERVLEVEL 0 #endif -/* virtual sizes (bytes) for various kernel submaps */ -#ifndef VM_KMEM_SIZE -#define VM_KMEM_SIZE (12 * 1024 * 1024) -#endif - /* - * How many physical pages per KVA page allocated. - * min(max(VM_KMEM_SIZE, Physical memory/VM_KMEM_SIZE_SCALE), VM_KMEM_SIZE_MAX) - * is the total KVA space allocated for kmem_map. + * How many physical pages per kmem arena virtual page. */ #ifndef VM_KMEM_SIZE_SCALE #define VM_KMEM_SIZE_SCALE (3) #endif /* - * Ceiling on the amount of kmem_map KVA space: 40% of the entire KVA space. + * Optional floor (in bytes) on the size of the kmem arena. + */ +#ifndef VM_KMEM_SIZE_MIN +#define VM_KMEM_SIZE_MIN (12 * 1024 * 1024) +#endif + +/* + * Optional ceiling (in bytes) on the size of the kmem arena: 40% of the + * kernel map. */ #ifndef VM_KMEM_SIZE_MAX #define VM_KMEM_SIZE_MAX ((VM_MAX_KERNEL_ADDRESS - \ Modified: head/sys/powerpc/include/vmparam.h ============================================================================== --- head/sys/powerpc/include/vmparam.h Fri Nov 8 14:33:41 2013 (r257853) +++ head/sys/powerpc/include/vmparam.h Fri Nov 8 16:25:00 2013 (r257854) @@ -172,21 +172,23 @@ struct pmap_physseg { #define SGROWSIZ (128UL*1024) /* amount to grow stack */ #endif -#ifndef VM_KMEM_SIZE -#define VM_KMEM_SIZE (12 * 1024 * 1024) +/* + * How many physical pages per kmem arena virtual page. + */ +#ifndef VM_KMEM_SIZE_SCALE +#define VM_KMEM_SIZE_SCALE (3) #endif /* - * How many physical pages per KVA page allocated. - * min(max(VM_KMEM_SIZE, Physical memory/VM_KMEM_SIZE_SCALE), VM_KMEM_SIZE_MAX) - * is the total KVA space allocated for kmem_map. + * Optional floor (in bytes) on the size of the kmem arena. */ -#ifndef VM_KMEM_SIZE_SCALE -#define VM_KMEM_SIZE_SCALE (3) +#ifndef VM_KMEM_SIZE_MIN +#define VM_KMEM_SIZE_MIN (12 * 1024 * 1024) #endif /* - * Ceiling on the amount of kmem_map KVA space: 40% of the entire KVA space. + * Optional ceiling (in bytes) on the size of the kmem arena: 40% of the + * usable KVA space. */ #ifndef VM_KMEM_SIZE_MAX #define VM_KMEM_SIZE_MAX ((VM_MAX_SAFE_KERNEL_ADDRESS - \ Modified: head/sys/sparc64/include/vmparam.h ============================================================================== --- head/sys/sparc64/include/vmparam.h Fri Nov 8 14:33:41 2013 (r257853) +++ head/sys/sparc64/include/vmparam.h Fri Nov 8 16:25:00 2013 (r257854) @@ -198,24 +198,22 @@ #define USRSTACK (VM_MAX_USER_ADDRESS) /* - * Virtual size (bytes) for various kernel submaps. + * How many physical pages per kmem arena virtual page. */ -#ifndef VM_KMEM_SIZE -#define VM_KMEM_SIZE (16*1024*1024) +#ifndef VM_KMEM_SIZE_SCALE +#define VM_KMEM_SIZE_SCALE (tsb_kernel_ldd_phys == 0 ? 3 : 2) #endif /* - * How many physical pages per KVA page allocated. - * min(max(max(VM_KMEM_SIZE, Physical memory/VM_KMEM_SIZE_SCALE), - * VM_KMEM_SIZE_MIN), VM_KMEM_SIZE_MAX) - * is the total KVA space allocated for kmem_map. + * Optional floor (in bytes) on the size of the kmem arena. */ -#ifndef VM_KMEM_SIZE_SCALE -#define VM_KMEM_SIZE_SCALE (tsb_kernel_ldd_phys == 0 ? 3 : 2) +#ifndef VM_KMEM_SIZE_MIN +#define VM_KMEM_SIZE_MIN (16 * 1024 * 1024) #endif /* - * Ceiling on amount of kmem_map kva space. + * Optional ceiling (in bytes) on the size of the kmem arena: 60% of the + * kernel map. */ #ifndef VM_KMEM_SIZE_MAX #define VM_KMEM_SIZE_MAX ((VM_MAX_KERNEL_ADDRESS - \ From owner-svn-src-head@FreeBSD.ORG Fri Nov 8 16:28:01 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 822728D9; Fri, 8 Nov 2013 16:28:01 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6EE0723D1; Fri, 8 Nov 2013 16:28:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA8GS1PD056539; Fri, 8 Nov 2013 16:28:01 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA8GS171056538; Fri, 8 Nov 2013 16:28:01 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201311081628.rA8GS171056538@svn.freebsd.org> From: Ian Lepore Date: Fri, 8 Nov 2013 16:28:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257855 - head/sys/contrib/dev/ath/ath_hal/ar9300 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Nov 2013 16:28:01 -0000 Author: ian Date: Fri Nov 8 16:28:00 2013 New Revision: 257855 URL: http://svnweb.freebsd.org/changeset/base/257855 Log: Remove 'inline' from ar9300_init_pll(), it's too big to inline. Submitted by: adrian@ Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_reset.c Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_reset.c ============================================================================== --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_reset.c Fri Nov 8 16:25:00 2013 (r257854) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_reset.c Fri Nov 8 16:28:00 2013 (r257855) @@ -1332,7 +1332,7 @@ ar9300_set_operating_mode(struct ath_hal } /* XXX need the logic for Osprey */ -inline void +void ar9300_init_pll(struct ath_hal *ah, struct ieee80211_channel *chan) { u_int32_t pll; From owner-svn-src-head@FreeBSD.ORG Fri Nov 8 16:32:31 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 2CB4BB9E; Fri, 8 Nov 2013 16:32:31 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 094F2242E; Fri, 8 Nov 2013 16:32:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA8GWU3b059222; Fri, 8 Nov 2013 16:32:30 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA8GWUvn059219; Fri, 8 Nov 2013 16:32:30 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201311081632.rA8GWUvn059219@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 8 Nov 2013 16:32:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257856 - in head/sys: amd64/amd64 i386/i386 x86/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Nov 2013 16:32:31 -0000 Author: kib Date: Fri Nov 8 16:32:30 2013 New Revision: 257856 URL: http://svnweb.freebsd.org/changeset/base/257856 Log: Add bits for the AMD features from CPUID function 0x80000001 ECX, described in the rev. 3.0 of the Kabini BKDG, document 48751.pdf. Partially based on the patch submitted by: Dmitry Luhtionov Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/amd64/amd64/identcpu.c head/sys/i386/i386/identcpu.c head/sys/x86/include/specialreg.h Modified: head/sys/amd64/amd64/identcpu.c ============================================================================== --- head/sys/amd64/amd64/identcpu.c Fri Nov 8 16:28:00 2013 (r257855) +++ head/sys/amd64/amd64/identcpu.c Fri Nov 8 16:32:30 2013 (r257856) @@ -366,18 +366,18 @@ printcpuinfo(void) "\017" "\020LWP" /* Lightweight Profiling */ "\021FMA4" /* 4-operand FMA instructions */ - "\022" + "\022TCE" /* Translation Cache Extension */ "\023" "\024NodeId" /* NodeId MSR support */ "\025" "\026TBM" /* Trailing Bit Manipulation */ "\027Topology" /* Topology Extensions */ - "\030" - "\031" + "\030PCXC" /* Core perf count */ + "\031PNXC" /* NB perf count */ "\032" - "\033" - "\034" - "\035" + "\033DBE" /* Data Breakpoint extension */ + "\034PTSC" /* Performance TSC */ + "\035PL2I" /* L2I perf count */ "\036" "\037" "\040" Modified: head/sys/i386/i386/identcpu.c ============================================================================== --- head/sys/i386/i386/identcpu.c Fri Nov 8 16:28:00 2013 (r257855) +++ head/sys/i386/i386/identcpu.c Fri Nov 8 16:32:30 2013 (r257856) @@ -842,18 +842,18 @@ printcpuinfo(void) "\017" "\020LWP" /* Lightweight Profiling */ "\021FMA4" /* 4-operand FMA instructions */ - "\022" + "\022TCE" /* Translation Cache Extension */ "\023" "\024NodeId" /* NodeId MSR support */ "\025" "\026TBM" /* Trailing Bit Manipulation */ "\027Topology" /* Topology Extensions */ - "\030" - "\031" + "\030PCXC" /* Core perf count */ + "\031PNXC" /* NB perf count */ "\032" - "\033" - "\034" - "\035" + "\033DBE" /* Data Breakpoint extension */ + "\034PTSC" /* Performance TSC */ + "\035PL2I" /* L2I perf count */ "\036" "\037" "\040" Modified: head/sys/x86/include/specialreg.h ============================================================================== --- head/sys/x86/include/specialreg.h Fri Nov 8 16:28:00 2013 (r257855) +++ head/sys/x86/include/specialreg.h Fri Nov 8 16:32:30 2013 (r257856) @@ -201,9 +201,15 @@ #define AMDID2_WDT 0x00002000 #define AMDID2_LWP 0x00008000 #define AMDID2_FMA4 0x00010000 +#define AMDID2_TCE 0x00020000 #define AMDID2_NODE_ID 0x00080000 #define AMDID2_TBM 0x00200000 #define AMDID2_TOPOLOGY 0x00400000 +#define AMDID2_PCXC 0x00800000 +#define AMDID2_PNXC 0x01000000 +#define AMDID2_DBE 0x04000000 +#define AMDID2_PTSC 0x08000000 +#define AMDID2_PTSCEL2I 0x10000000 /* * CPUID instruction 1 eax info From owner-svn-src-head@FreeBSD.ORG Fri Nov 8 16:56:14 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 10D72F2B; Fri, 8 Nov 2013 16:56:14 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id F1CB02520; Fri, 8 Nov 2013 16:56:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA8GuDVN066109; Fri, 8 Nov 2013 16:56:13 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA8GuDV1066108; Fri, 8 Nov 2013 16:56:13 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201311081656.rA8GuDV1066108@svn.freebsd.org> From: Alan Cox Date: Fri, 8 Nov 2013 16:56:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257857 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Nov 2013 16:56:14 -0000 Author: alc Date: Fri Nov 8 16:56:13 2013 New Revision: 257857 URL: http://svnweb.freebsd.org/changeset/base/257857 Log: Eliminate an unused macro. Modified: head/sys/arm/arm/pmap.c Modified: head/sys/arm/arm/pmap.c ============================================================================== --- head/sys/arm/arm/pmap.c Fri Nov 8 16:32:30 2013 (r257856) +++ head/sys/arm/arm/pmap.c Fri Nov 8 16:56:13 2013 (r257857) @@ -2393,9 +2393,6 @@ pmap_bootstrap(vm_offset_t firstaddr, st * Reserve some special page table entries/VA space for temporary * mapping of pages. */ -#define SYSMAP(c, p, v, n) \ - v = (c)va; va += ((n)*PAGE_SIZE); p = pte; pte += (n); - pmap_alloc_specials(&virtual_avail, 1, &csrcp, &csrc_pte); pmap_set_pt_cache_mode(kernel_l1pt, (vm_offset_t)csrc_pte); pmap_alloc_specials(&virtual_avail, 1, &cdstp, &cdst_pte); From owner-svn-src-head@FreeBSD.ORG Fri Nov 8 16:57:56 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 69C6F10D; Fri, 8 Nov 2013 16:57:56 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 56AF32532; Fri, 8 Nov 2013 16:57:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA8GvulK066308; Fri, 8 Nov 2013 16:57:56 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA8Gvup4066307; Fri, 8 Nov 2013 16:57:56 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201311081657.rA8Gvup4066307@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 8 Nov 2013 16:57:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257858 - head/sys/i386/i386 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Nov 2013 16:57:56 -0000 Author: kib Date: Fri Nov 8 16:57:55 2013 New Revision: 257858 URL: http://svnweb.freebsd.org/changeset/base/257858 Log: Fix signal delivery for the iBCS2 binaries. The iBCS2 sysvec uses current FreeBSD signal trampoline, but does not specifies sv_sigcode_base, since shared page is not mapped. This results in the zero %eip for the signal frame. Fall back to calculating %eip as offset from the psstrings when sv_sigcode_base is not initialized. Reported by: Rich Naill Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/i386/i386/machdep.c Modified: head/sys/i386/i386/machdep.c ============================================================================== --- head/sys/i386/i386/machdep.c Fri Nov 8 16:56:13 2013 (r257857) +++ head/sys/i386/i386/machdep.c Fri Nov 8 16:57:55 2013 (r257858) @@ -757,6 +757,8 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, regs->tf_esp = (int)sfp; regs->tf_eip = p->p_sysent->sv_sigcode_base; + if (regs->tf_eip == 0) + regs->tf_eip = p->p_sysent->sv_psstrings - szsigcode; regs->tf_eflags &= ~(PSL_T | PSL_D); regs->tf_cs = _ucodesel; regs->tf_ds = _udatasel; From owner-svn-src-head@FreeBSD.ORG Fri Nov 8 17:23:38 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 37EA4709; Fri, 8 Nov 2013 17:23:38 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 247DF267B; Fri, 8 Nov 2013 17:23:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA8HNbIu076315; Fri, 8 Nov 2013 17:23:37 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA8HNbJq076314; Fri, 8 Nov 2013 17:23:37 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201311081723.rA8HNbJq076314@svn.freebsd.org> From: Dimitry Andric Date: Fri, 8 Nov 2013 17:23:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257859 - head/lib/libc/iconv X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Nov 2013 17:23:38 -0000 Author: dim Date: Fri Nov 8 17:23:37 2013 New Revision: 257859 URL: http://svnweb.freebsd.org/changeset/base/257859 Log: Fix typo in include guard, found by clang 3.4. MFC after: 3 days Modified: head/lib/libc/iconv/citrus_csmapper.h Modified: head/lib/libc/iconv/citrus_csmapper.h ============================================================================== --- head/lib/libc/iconv/citrus_csmapper.h Fri Nov 8 16:57:55 2013 (r257858) +++ head/lib/libc/iconv/citrus_csmapper.h Fri Nov 8 17:23:37 2013 (r257859) @@ -28,7 +28,7 @@ */ #ifndef _CITRUS_CSMAPPER_H_ -#define _CITRUS_CSMAPPER_H +#define _CITRUS_CSMAPPER_H_ #define _citrus_csmapper _citrus_mapper #define _citrus_csmapper_close _citrus_mapper_close From owner-svn-src-head@FreeBSD.ORG Fri Nov 8 17:27:23 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 77E7A872; Fri, 8 Nov 2013 17:27:23 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 64E5C2695; Fri, 8 Nov 2013 17:27:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA8HRNAZ076754; Fri, 8 Nov 2013 17:27:23 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA8HRNJZ076753; Fri, 8 Nov 2013 17:27:23 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201311081727.rA8HRNJZ076753@svn.freebsd.org> From: Dimitry Andric Date: Fri, 8 Nov 2013 17:27:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257860 - head/sys/x86/iommu X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Nov 2013 17:27:23 -0000 Author: dim Date: Fri Nov 8 17:27:22 2013 New Revision: 257860 URL: http://svnweb.freebsd.org/changeset/base/257860 Log: Initialize variable in sys/x86/iommu/busdma_dmar.c, to avoid possible uninitialized use. Reviewed by: kib Modified: head/sys/x86/iommu/busdma_dmar.c Modified: head/sys/x86/iommu/busdma_dmar.c ============================================================================== --- head/sys/x86/iommu/busdma_dmar.c Fri Nov 8 17:23:37 2013 (r257859) +++ head/sys/x86/iommu/busdma_dmar.c Fri Nov 8 17:27:22 2013 (r257860) @@ -341,6 +341,7 @@ dmar_bus_dmamap_load_something1(struct b segs = tag->segments; ctx = tag->ctx; seg = *segp; + error = 0; idx = 0; while (buflen > 0) { seg++; From owner-svn-src-head@FreeBSD.ORG Fri Nov 8 17:27:39 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 3364C9AE; Fri, 8 Nov 2013 17:27:39 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 071252697; Fri, 8 Nov 2013 17:27:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA8HRcUt076817; Fri, 8 Nov 2013 17:27:38 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA8HRcOj076814; Fri, 8 Nov 2013 17:27:38 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201311081727.rA8HRcOj076814@svn.freebsd.org> From: Glen Barber Date: Fri, 8 Nov 2013 17:27:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257861 - head/release X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Nov 2013 17:27:39 -0000 Author: gjb Date: Fri Nov 8 17:27:38 2013 New Revision: 257861 URL: http://svnweb.freebsd.org/changeset/base/257861 Log: Remove generate-release.sh from head/. The release.sh (based heavily on generate-release.sh) has been used for the 9.2-RELEASE and 10.0-RELEASE cycles, so make sure there is no confusion on what is currently being used by having two similar scripts. A big "thank you" to Nathan Whitehorn, the author of the generate-release.sh script, for writing this utility. No objection: nwhitehorn MFC after: never Sponsored by: The FreeBSD Foundation Deleted: head/release/generate-release.sh From owner-svn-src-head@FreeBSD.ORG Fri Nov 8 18:20:20 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id F24F5456; Fri, 8 Nov 2013 18:20:19 +0000 (UTC) (envelope-from alfred@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DF8A92956; Fri, 8 Nov 2013 18:20:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA8IKJMs095759; Fri, 8 Nov 2013 18:20:19 GMT (envelope-from alfred@svn.freebsd.org) Received: (from alfred@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA8IKJMj095758; Fri, 8 Nov 2013 18:20:19 GMT (envelope-from alfred@svn.freebsd.org) Message-Id: <201311081820.rA8IKJMj095758@svn.freebsd.org> From: Alfred Perlstein Date: Fri, 8 Nov 2013 18:20:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257862 - head/sys/ofed/include/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Nov 2013 18:20:20 -0000 Author: alfred Date: Fri Nov 8 18:20:19 2013 New Revision: 257862 URL: http://svnweb.freebsd.org/changeset/base/257862 Log: Use explicit long cast to avoid overflow in bitopts. This was causing problems with the buddy allocator inside of ofed. Submitted by: odeds Modified: head/sys/ofed/include/linux/bitops.h Modified: head/sys/ofed/include/linux/bitops.h ============================================================================== --- head/sys/ofed/include/linux/bitops.h Fri Nov 8 17:27:38 2013 (r257861) +++ head/sys/ofed/include/linux/bitops.h Fri Nov 8 18:20:19 2013 (r257862) @@ -286,14 +286,14 @@ bitmap_empty(unsigned long *addr, int si #define NBLONG (NBBY * sizeof(long)) #define set_bit(i, a) \ - atomic_set_long(&((volatile long *)(a))[(i)/NBLONG], 1 << (i) % NBLONG) + atomic_set_long(&((volatile long *)(a))[(i)/NBLONG], 1UL << (i) % NBLONG) #define clear_bit(i, a) \ - atomic_clear_long(&((volatile long *)(a))[(i)/NBLONG], 1 << (i) % NBLONG) + atomic_clear_long(&((volatile long *)(a))[(i)/NBLONG], 1UL << (i) % NBLONG) #define test_bit(i, a) \ !!(atomic_load_acq_long(&((volatile long *)(a))[(i)/NBLONG]) & \ - 1 << ((i) % NBLONG)) + 1UL << ((i) % NBLONG)) static inline long test_and_clear_bit(long bit, long *var) From owner-svn-src-head@FreeBSD.ORG Fri Nov 8 18:26:29 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 6EE887C4; Fri, 8 Nov 2013 18:26:29 +0000 (UTC) (envelope-from alfred@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4C98A29A6; Fri, 8 Nov 2013 18:26:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA8IQTMW097200; Fri, 8 Nov 2013 18:26:29 GMT (envelope-from alfred@svn.freebsd.org) Received: (from alfred@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA8IQS97097197; Fri, 8 Nov 2013 18:26:28 GMT (envelope-from alfred@svn.freebsd.org) Message-Id: <201311081826.rA8IQS97097197@svn.freebsd.org> From: Alfred Perlstein Date: Fri, 8 Nov 2013 18:26:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257863 - head/sys/ofed/drivers/net/mlx4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Nov 2013 18:26:29 -0000 Author: alfred Date: Fri Nov 8 18:26:28 2013 New Revision: 257863 URL: http://svnweb.freebsd.org/changeset/base/257863 Log: Fix for bad performance when mtu is increased. Update the auto moderation behavior in the mlxen driver to match the new LINUX OFED code. Submitted by: odeds Modified: head/sys/ofed/drivers/net/mlx4/en_ethtool.c head/sys/ofed/drivers/net/mlx4/en_netdev.c head/sys/ofed/drivers/net/mlx4/mlx4_en.h Modified: head/sys/ofed/drivers/net/mlx4/en_ethtool.c ============================================================================== --- head/sys/ofed/drivers/net/mlx4/en_ethtool.c Fri Nov 8 18:20:19 2013 (r257862) +++ head/sys/ofed/drivers/net/mlx4/en_ethtool.c Fri Nov 8 18:26:28 2013 (r257863) @@ -366,13 +366,13 @@ static int mlx4_en_set_coalesce(struct n priv->rx_usecs_high = coal->rx_coalesce_usecs_high; priv->sample_interval = coal->rate_sample_interval; priv->adaptive_rx_coal = coal->use_adaptive_rx_coalesce; - priv->last_moder_time = MLX4_EN_AUTO_CONF; if (priv->adaptive_rx_coal) return 0; for (i = 0; i < priv->rx_ring_num; i++) { priv->rx_cq[i].moder_cnt = priv->rx_frames; priv->rx_cq[i].moder_time = priv->rx_usecs; + priv->last_moder_time[i] = MLX4_EN_AUTO_CONF; err = mlx4_en_set_cq_moder(priv, &priv->rx_cq[i]); if (err) return err; @@ -418,6 +418,7 @@ static int mlx4_en_set_ringparam(struct u32 rx_size, tx_size; int port_up = 0; int err = 0; + int i; if (param->rx_jumbo_pending || param->rx_mini_pending) return -EINVAL; @@ -456,6 +457,15 @@ static int mlx4_en_set_ringparam(struct en_err(priv, "Failed starting port\n"); } + for (i = 0; i < priv->rx_ring_num; i++) { + priv->rx_cq[i].moder_cnt = priv->rx_frames; + priv->rx_cq[i].moder_time = priv->rx_usecs; + priv->last_moder_time[i] = MLX4_EN_AUTO_CONF; + err = mlx4_en_set_cq_moder(priv, &priv->rx_cq[i]); + if (err) + goto out; + } + out: mutex_unlock(&mdev->state_lock); return err; Modified: head/sys/ofed/drivers/net/mlx4/en_netdev.c ============================================================================== --- head/sys/ofed/drivers/net/mlx4/en_netdev.c Fri Nov 8 18:20:19 2013 (r257862) +++ head/sys/ofed/drivers/net/mlx4/en_netdev.c Fri Nov 8 18:26:28 2013 (r257863) @@ -318,6 +318,9 @@ static void mlx4_en_set_default_moderati cq = &priv->rx_cq[i]; cq->moder_cnt = priv->rx_frames; cq->moder_time = priv->rx_usecs; + priv->last_moder_time[i] = MLX4_EN_AUTO_CONF; + priv->last_moder_packets[i] = 0; + priv->last_moder_bytes[i] = 0; } for (i = 0; i < priv->tx_ring_num; i++) { @@ -333,11 +336,8 @@ static void mlx4_en_set_default_moderati priv->rx_usecs_high = MLX4_EN_RX_COAL_TIME_HIGH; priv->sample_interval = MLX4_EN_SAMPLE_INTERVAL; priv->adaptive_rx_coal = 1; - priv->last_moder_time = MLX4_EN_AUTO_CONF; priv->last_moder_jiffies = 0; - priv->last_moder_packets = 0; priv->last_moder_tx_packets = 0; - priv->last_moder_bytes = 0; } static void mlx4_en_auto_moderation(struct mlx4_en_priv *priv) @@ -349,43 +349,29 @@ static void mlx4_en_auto_moderation(stru unsigned long avg_pkt_size; unsigned long rx_packets; unsigned long rx_bytes; - unsigned long tx_packets; - unsigned long tx_pkt_diff; unsigned long rx_pkt_diff; int moder_time; - int i, err; + int ring, err; if (!priv->adaptive_rx_coal || period < priv->sample_interval * HZ) return; - - spin_lock(&priv->stats_lock); - rx_packets = priv->dev->if_ipackets; - rx_bytes = priv->dev->if_ibytes; - tx_packets = priv->dev->if_opackets; - spin_unlock(&priv->stats_lock); - - if (!priv->last_moder_jiffies || !period) - goto out; - - tx_pkt_diff = ((unsigned long) (tx_packets - - priv->last_moder_tx_packets)); - rx_pkt_diff = ((unsigned long) (rx_packets - - priv->last_moder_packets)); - packets = max(tx_pkt_diff, rx_pkt_diff); - rate = packets * HZ / period; - avg_pkt_size = packets ? ((unsigned long) (rx_bytes - - priv->last_moder_bytes)) / packets : 0; - - /* Apply auto-moderation only when packet rate exceeds a rate that - * it matters */ - if (rate > MLX4_EN_RX_RATE_THRESH) { - /* If tx and rx packet rates are not balanced, assume that - * traffic is mainly BW bound and apply maximum moderation. - * Otherwise, moderate according to packet rate */ - if (2 * tx_pkt_diff > 3 * rx_pkt_diff || - 2 * rx_pkt_diff > 3 * tx_pkt_diff) { - moder_time = priv->rx_usecs_high; - } else { + for (ring = 0; ring < priv->rx_ring_num; ring++) { + spin_lock(&priv->stats_lock); + rx_packets = priv->rx_ring[ring].packets; + rx_bytes = priv->rx_ring[ring].bytes; + spin_unlock(&priv->stats_lock); + + rx_pkt_diff = ((unsigned long) (rx_packets - + priv->last_moder_packets[ring])); + packets = rx_pkt_diff; + rate = packets * HZ / period; + avg_pkt_size = packets ? ((unsigned long) (rx_bytes - + priv->last_moder_bytes[ring])) / packets : 0; + + /* Apply auto-moderation only when packet rate + * exceeds a rate that it matters */ + if (rate > (MLX4_EN_RX_RATE_THRESH / priv->rx_ring_num) && + avg_pkt_size > MLX4_EN_AVG_PKT_SMALL) { if (rate < priv->pkt_rate_low || avg_pkt_size < MLX4_EN_AVG_PKT_SMALL) moder_time = priv->rx_usecs_low; @@ -396,38 +382,23 @@ static void mlx4_en_auto_moderation(stru (priv->rx_usecs_high - priv->rx_usecs_low) / (priv->pkt_rate_high - priv->pkt_rate_low) + priv->rx_usecs_low; + } else { + moder_time = priv->rx_usecs_low; } - } else { - /* When packet rate is low, use default moderation rather than - * 0 to prevent interrupt storms if traffic suddenly increases */ - moder_time = priv->rx_usecs; - } - - en_dbg(INTR, priv, "tx rate:%lu rx_rate:%lu\n", - tx_pkt_diff * HZ / period, rx_pkt_diff * HZ / period); - - en_dbg(INTR, priv, "Rx moder_time changed from:%d to %d period:%lu " - "[jiff] packets:%lu avg_pkt_size:%lu rate:%lu [p/s])\n", - priv->last_moder_time, moder_time, period, packets, - avg_pkt_size, rate); - - if (moder_time != priv->last_moder_time) { - priv->last_moder_time = moder_time; - for (i = 0; i < priv->rx_ring_num; i++) { - cq = &priv->rx_cq[i]; + + if (moder_time != priv->last_moder_time[ring]) { + priv->last_moder_time[ring] = moder_time; + cq = &priv->rx_cq[ring]; cq->moder_time = moder_time; err = mlx4_en_set_cq_moder(priv, cq); - if (err) { - en_err(priv, "Failed modifying moderation for cq:%d\n", i); - break; - } + if (err) + en_err(priv, "Failed modifying moderation " + "for cq:%d\n", ring); } + priv->last_moder_packets[ring] = rx_packets; + priv->last_moder_bytes[ring] = rx_bytes; } -out: - priv->last_moder_packets = rx_packets; - priv->last_moder_tx_packets = tx_packets; - priv->last_moder_bytes = rx_bytes; priv->last_moder_jiffies = jiffies; } Modified: head/sys/ofed/drivers/net/mlx4/mlx4_en.h ============================================================================== --- head/sys/ofed/drivers/net/mlx4/mlx4_en.h Fri Nov 8 18:20:19 2013 (r257862) +++ head/sys/ofed/drivers/net/mlx4/mlx4_en.h Fri Nov 8 18:26:28 2013 (r257863) @@ -494,11 +494,11 @@ struct mlx4_en_priv { struct mlx4_en_port_state port_state; spinlock_t stats_lock; - unsigned long last_moder_packets; + unsigned long last_moder_packets[MAX_RX_RINGS]; unsigned long last_moder_tx_packets; - unsigned long last_moder_bytes; + unsigned long last_moder_bytes[MAX_RX_RINGS]; unsigned long last_moder_jiffies; - int last_moder_time; + int last_moder_time[MAX_RX_RINGS]; u16 rx_usecs; u16 rx_frames; u16 tx_usecs; @@ -568,7 +568,6 @@ enum mlx4_en_wol { MLX4_EN_WOL_DO_MODIFY = (1ULL << 63), }; - int mlx4_en_transmit(struct net_device *dev, struct mbuf *mb); void mlx4_en_qflush(struct net_device *dev); From owner-svn-src-head@FreeBSD.ORG Fri Nov 8 18:28:49 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C848C919; Fri, 8 Nov 2013 18:28:49 +0000 (UTC) (envelope-from alfred@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9A4AD29B5; Fri, 8 Nov 2013 18:28:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA8ISnrl097474; Fri, 8 Nov 2013 18:28:49 GMT (envelope-from alfred@svn.freebsd.org) Received: (from alfred@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA8ISnTq097472; Fri, 8 Nov 2013 18:28:49 GMT (envelope-from alfred@svn.freebsd.org) Message-Id: <201311081828.rA8ISnTq097472@svn.freebsd.org> From: Alfred Perlstein Date: Fri, 8 Nov 2013 18:28:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257864 - head/sys/ofed/drivers/net/mlx4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Nov 2013 18:28:49 -0000 Author: alfred Date: Fri Nov 8 18:28:48 2013 New Revision: 257864 URL: http://svnweb.freebsd.org/changeset/base/257864 Log: Do not use a sleep lock when protecting the driver flags. This was causing a locking issue with lagg Submitted by: odeds Modified: head/sys/ofed/drivers/net/mlx4/en_netdev.c head/sys/ofed/drivers/net/mlx4/mlx4_en.h Modified: head/sys/ofed/drivers/net/mlx4/en_netdev.c ============================================================================== --- head/sys/ofed/drivers/net/mlx4/en_netdev.c Fri Nov 8 18:26:28 2013 (r257863) +++ head/sys/ofed/drivers/net/mlx4/en_netdev.c Fri Nov 8 18:28:48 2013 (r257864) @@ -919,6 +919,7 @@ void mlx4_en_destroy_netdev(struct net_d mtx_destroy(&priv->stats_lock.m); mtx_destroy(&priv->vlan_lock.m); + mtx_destroy(&priv->ioctl_lock.m); kfree(priv); if_free(dev); } @@ -1087,9 +1088,9 @@ static int mlx4_en_ioctl(struct ifnet *d break; case SIOCADDMULTI: case SIOCDELMULTI: - mutex_lock(&mdev->state_lock); + spin_lock(&priv->ioctl_lock); mlx4_en_set_multicast(dev); - mutex_unlock(&mdev->state_lock); + spin_unlock(&priv->ioctl_lock); break; case SIOCSIFMEDIA: case SIOCGIFMEDIA: @@ -1510,6 +1511,7 @@ int mlx4_en_init_netdev(struct mlx4_en_d priv->msg_enable = MLX4_EN_MSG_LEVEL; priv->ip_reasm = priv->mdev->profile.ip_reasm; mtx_init(&priv->stats_lock.m, "mlx4 stats", NULL, MTX_DEF); + mtx_init(&priv->ioctl_lock.m, "mlx4 ioctl", NULL, MTX_DEF); mtx_init(&priv->vlan_lock.m, "mlx4 vlan", NULL, MTX_DEF); INIT_WORK(&priv->mcast_task, mlx4_en_do_set_multicast); INIT_WORK(&priv->watchdog_task, mlx4_en_restart); Modified: head/sys/ofed/drivers/net/mlx4/mlx4_en.h ============================================================================== --- head/sys/ofed/drivers/net/mlx4/mlx4_en.h Fri Nov 8 18:26:28 2013 (r257863) +++ head/sys/ofed/drivers/net/mlx4/mlx4_en.h Fri Nov 8 18:28:48 2013 (r257864) @@ -493,6 +493,7 @@ struct mlx4_en_priv { spinlock_t vlan_lock; struct mlx4_en_port_state port_state; spinlock_t stats_lock; + spinlock_t ioctl_lock; unsigned long last_moder_packets[MAX_RX_RINGS]; unsigned long last_moder_tx_packets; From owner-svn-src-head@FreeBSD.ORG Fri Nov 8 20:11:16 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 5B7F57DA; Fri, 8 Nov 2013 20:11:16 +0000 (UTC) (envelope-from hiren@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4952C2E68; Fri, 8 Nov 2013 20:11:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA8KBGW1033585; Fri, 8 Nov 2013 20:11:16 GMT (envelope-from hiren@svn.freebsd.org) Received: (from hiren@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA8KBG6b033584; Fri, 8 Nov 2013 20:11:16 GMT (envelope-from hiren@svn.freebsd.org) Message-Id: <201311082011.rA8KBG6b033584@svn.freebsd.org> From: Hiren Panchasara Date: Fri, 8 Nov 2013 20:11:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257865 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Nov 2013 20:11:16 -0000 Author: hiren Date: Fri Nov 8 20:11:15 2013 New Revision: 257865 URL: http://svnweb.freebsd.org/changeset/base/257865 Log: Fix typo in a comment. Modified: head/sys/kern/uipc_socket.c Modified: head/sys/kern/uipc_socket.c ============================================================================== --- head/sys/kern/uipc_socket.c Fri Nov 8 18:28:48 2013 (r257864) +++ head/sys/kern/uipc_socket.c Fri Nov 8 20:11:15 2013 (r257865) @@ -479,7 +479,7 @@ SYSCTL_INT(_regression, OID_AUTO, sonewc * connections, sonewconn is called. If the connection is possible (subject * to space constraints, etc.) then we allocate a new structure, propoerly * linked into the data structure of the original socket, and return this. - * Connstatus may be 0, or SO_ISCONFIRMING, or SO_ISCONNECTED. + * Connstatus may be 0, or SS_ISCONFIRMING, or SS_ISCONNECTED. * * Note: the ref count on the socket is 0 on return. */ From owner-svn-src-head@FreeBSD.ORG Fri Nov 8 20:34:39 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 69119D0E; Fri, 8 Nov 2013 20:34:39 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.dawidek.net (garage.dawidek.net [91.121.88.72]) by mx1.freebsd.org (Postfix) with ESMTP id 2F6D22F78; Fri, 8 Nov 2013 20:34:38 +0000 (UTC) Received: from localhost (unknown [216.9.110.3]) by mail.dawidek.net (Postfix) with ESMTPSA id 49E333AD; Fri, 8 Nov 2013 21:28:21 +0100 (CET) Date: Fri, 8 Nov 2013 21:34:35 +0100 From: Pawel Jakub Dawidek To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r257633 - in head: lib/libc/capability lib/libc/gen lib/libc/sys share/man/man4 Message-ID: <20131108203434.GB1511@garage.freebsd.pl> References: <201311041410.rA4EAMmb095901@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="24zk1gE8NUlDmwG9" Content-Disposition: inline In-Reply-To: <201311041410.rA4EAMmb095901@svn.freebsd.org> X-OS: FreeBSD 10.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Nov 2013 20:34:39 -0000 --24zk1gE8NUlDmwG9 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Nov 04, 2013 at 02:10:22PM +0000, Pawel Jakub Dawidek wrote: > Author: pjd > Date: Mon Nov 4 14:10:22 2013 > New Revision: 257633 > URL: http://svnweb.freebsd.org/changeset/base/257633 >=20 > Log: > - Add manual pages for capability rights (rights(4)), cap_rights_init(3) > family of functions and cap_rights_get(3) function. > - Update remaining Capsicum-related manual pages. > =20 > Reviewed by: bdrewery > MFC after: 3 days This work was sponsored by the FreeBSD Foundation. --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://mobter.com --24zk1gE8NUlDmwG9 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (FreeBSD) iEYEARECAAYFAlJ9StoACgkQForvXbEpPzSf2wCfeI/+oLg3PozvBFSN3h/xhhYi kDoAn1H45GvOP8vIfpOux6TxC152rUiL =2xRS -----END PGP SIGNATURE----- --24zk1gE8NUlDmwG9-- From owner-svn-src-head@FreeBSD.ORG Fri Nov 8 22:40:33 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id E0267330; Fri, 8 Nov 2013 22:40:33 +0000 (UTC) (envelope-from zec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CDE9A252D; Fri, 8 Nov 2013 22:40:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA8MeXb3085178; Fri, 8 Nov 2013 22:40:33 GMT (envelope-from zec@svn.freebsd.org) Received: (from zec@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA8MeXJC085177; Fri, 8 Nov 2013 22:40:33 GMT (envelope-from zec@svn.freebsd.org) Message-Id: <201311082240.rA8MeXJC085177@svn.freebsd.org> From: Marko Zec Date: Fri, 8 Nov 2013 22:40:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257868 - head/sys/netgraph X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Nov 2013 22:40:34 -0000 Author: zec Date: Fri Nov 8 22:40:33 2013 New Revision: 257868 URL: http://svnweb.freebsd.org/changeset/base/257868 Log: Eliminate duplicated & dead code. MFC after: 3 days Modified: head/sys/netgraph/ng_pipe.c Modified: head/sys/netgraph/ng_pipe.c ============================================================================== --- head/sys/netgraph/ng_pipe.c Fri Nov 8 22:29:07 2013 (r257867) +++ head/sys/netgraph/ng_pipe.c Fri Nov 8 22:40:33 2013 (r257868) @@ -705,35 +705,6 @@ ngp_rcvdata(hook_p hook, item_p item) } hinfo->run.qin_frames--; hinfo->stats.in_disc_frames++; - } else if (hinfo->run.qin_frames > hinfo->cfg.qin_size_limit) { - struct mbuf *m1; - int longest = 0; - - /* Find the longest queue */ - TAILQ_FOREACH(ngp_f1, &hinfo->fifo_head, fifo_le) - if (ngp_f1->packets > longest) { - longest = ngp_f1->packets; - ngp_f = ngp_f1; - } - - /* Drop a frame from the queue head/tail, depending on cfg */ - if (hinfo->cfg.drophead) - ngp_h = TAILQ_FIRST(&ngp_f->packet_head); - else - ngp_h = TAILQ_LAST(&ngp_f->packet_head, p_head); - TAILQ_REMOVE(&ngp_f->packet_head, ngp_h, ngp_link); - m1 = ngp_h->m; - uma_zfree(ngp_zone, ngp_h); - hinfo->run.qin_octets -= m1->m_pkthdr.len; - hinfo->stats.in_disc_octets += m1->m_pkthdr.len; - m_freem(m1); - if (--(ngp_f->packets) == 0) { - TAILQ_REMOVE(&hinfo->fifo_head, ngp_f, fifo_le); - uma_zfree(ngp_zone, ngp_f); - hinfo->run.fifo_queues--; - } - hinfo->run.qin_frames--; - hinfo->stats.in_disc_frames++; } /* From owner-svn-src-head@FreeBSD.ORG Fri Nov 8 22:44:47 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 1BA544A9; Fri, 8 Nov 2013 22:44:47 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 08C6B256D; Fri, 8 Nov 2013 22:44:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA8MikmL086077; Fri, 8 Nov 2013 22:44:46 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA8Mikth086075; Fri, 8 Nov 2013 22:44:46 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201311082244.rA8Mikth086075@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Fri, 8 Nov 2013 22:44:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257869 - in head/sys/dev/drm2: . radeon X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Nov 2013 22:44:47 -0000 Author: dumbbell Date: Fri Nov 8 22:44:46 2013 New Revision: 257869 URL: http://svnweb.freebsd.org/changeset/base/257869 Log: drm: Initialize "handle" to 0 before calling drm_gem_handle_create() This is variable is being checked in drm_gem_name_create() before being set. Modified: head/sys/dev/drm2/drm_crtc.c head/sys/dev/drm2/radeon/radeon_gem.c Modified: head/sys/dev/drm2/drm_crtc.c ============================================================================== --- head/sys/dev/drm2/drm_crtc.c Fri Nov 8 22:40:33 2013 (r257868) +++ head/sys/dev/drm2/drm_crtc.c Fri Nov 8 22:44:46 2013 (r257869) @@ -2317,6 +2317,7 @@ int drm_mode_getfb(struct drm_device *de r->depth = fb->depth; r->bpp = fb->bits_per_pixel; r->pitch = fb->pitches[0]; + r->handle = 0; fb->funcs->create_handle(fb, file_priv, &r->handle); out: Modified: head/sys/dev/drm2/radeon/radeon_gem.c ============================================================================== --- head/sys/dev/drm2/radeon/radeon_gem.c Fri Nov 8 22:40:33 2013 (r257868) +++ head/sys/dev/drm2/radeon/radeon_gem.c Fri Nov 8 22:44:46 2013 (r257869) @@ -567,6 +567,7 @@ int radeon_mode_dumb_create(struct drm_f if (r) return -ENOMEM; + handle = 0; r = drm_gem_handle_create(file_priv, gobj, &handle); /* drop reference from allocate - handle holds it now */ drm_gem_object_unreference_unlocked(gobj); From owner-svn-src-head@FreeBSD.ORG Fri Nov 8 22:47:43 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 94822623; Fri, 8 Nov 2013 22:47:43 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 81D8B2590; Fri, 8 Nov 2013 22:47:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA8MlhfH086462; Fri, 8 Nov 2013 22:47:43 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA8MlhWd086461; Fri, 8 Nov 2013 22:47:43 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201311082247.rA8MlhWd086461@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Fri, 8 Nov 2013 22:47:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257870 - head/sys/dev/drm2/radeon X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Nov 2013 22:47:43 -0000 Author: dumbbell Date: Fri Nov 8 22:47:43 2013 New Revision: 257870 URL: http://svnweb.freebsd.org/changeset/base/257870 Log: drm/radeon: Wake up userland after page flip For instance, this caused issues in KDE, such as stuttered animations (with desktop effects enabled). Modified: head/sys/dev/drm2/radeon/radeon_display.c Modified: head/sys/dev/drm2/radeon/radeon_display.c ============================================================================== --- head/sys/dev/drm2/radeon/radeon_display.c Fri Nov 8 22:44:46 2013 (r257869) +++ head/sys/dev/drm2/radeon/radeon_display.c Fri Nov 8 22:47:43 2013 (r257870) @@ -336,9 +336,7 @@ void radeon_crtc_handle_flip(struct rade e->event.tv_sec = now.tv_sec; e->event.tv_usec = now.tv_usec; list_add_tail(&e->base.link, &e->base.file_priv->event_list); -#ifdef DUMBBELL_WIP - wake_up_interruptible(&e->base.file_priv->event_wait); -#endif /* DUMBBELL_WIP */ + drm_event_wakeup(&e->base); } DRM_SPINUNLOCK_IRQRESTORE(&rdev->ddev->event_lock, flags); From owner-svn-src-head@FreeBSD.ORG Fri Nov 8 23:08:01 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id CA855B70; Fri, 8 Nov 2013 23:08:01 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B5E772691; Fri, 8 Nov 2013 23:08:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA8N81im093335; Fri, 8 Nov 2013 23:08:01 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA8N81rJ093334; Fri, 8 Nov 2013 23:08:01 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201311082308.rA8N81rJ093334@svn.freebsd.org> From: Joel Dahl Date: Fri, 8 Nov 2013 23:08:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257871 - head/usr.sbin/mfiutil X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Nov 2013 23:08:01 -0000 Author: joel (doc committer) Date: Fri Nov 8 23:08:01 2013 New Revision: 257871 URL: http://svnweb.freebsd.org/changeset/base/257871 Log: mdoc: remove superfluous paragraph macro. Modified: head/usr.sbin/mfiutil/mfiutil.8 Modified: head/usr.sbin/mfiutil/mfiutil.8 ============================================================================== --- head/usr.sbin/mfiutil/mfiutil.8 Fri Nov 8 22:47:43 2013 (r257870) +++ head/usr.sbin/mfiutil/mfiutil.8 Fri Nov 8 23:08:01 2013 (r257871) @@ -714,7 +714,6 @@ Display the second detected foreign conf .Pp Set the current rebuild rate for volumes to 40%: .Dl Nm Cm ctrlprop rebuild 40 -.Pp .Sh SEE ALSO .Xr mfi 4 .Sh HISTORY From owner-svn-src-head@FreeBSD.ORG Fri Nov 8 23:11:05 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 77C07E4C; Fri, 8 Nov 2013 23:11:05 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 653A226E4; Fri, 8 Nov 2013 23:11:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA8NB5Bb096026; Fri, 8 Nov 2013 23:11:05 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA8NB5NG096024; Fri, 8 Nov 2013 23:11:05 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201311082311.rA8NB5NG096024@svn.freebsd.org> From: Joel Dahl Date: Fri, 8 Nov 2013 23:11:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257872 - head/usr.sbin/bsdinstall X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Nov 2013 23:11:05 -0000 Author: joel (doc committer) Date: Fri Nov 8 23:11:04 2013 New Revision: 257872 URL: http://svnweb.freebsd.org/changeset/base/257872 Log: mdoc: add missing El. Modified: head/usr.sbin/bsdinstall/bsdinstall.8 Modified: head/usr.sbin/bsdinstall/bsdinstall.8 ============================================================================== --- head/usr.sbin/bsdinstall/bsdinstall.8 Fri Nov 8 23:08:01 2013 (r257871) +++ head/usr.sbin/bsdinstall/bsdinstall.8 Fri Nov 8 23:11:04 2013 (r257872) @@ -61,6 +61,7 @@ See .Sx ENVIRONMENT VARIABLES for more information on .Ev BSDINSTALL_LOG . +.El .Sh TARGETS Most of the following targets are only useful for scripting the installer. For interactive use, most users will be interested only in the From owner-svn-src-head@FreeBSD.ORG Sat Nov 9 00:15:37 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 84631BD0; Sat, 9 Nov 2013 00:15:37 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 62EA52A38; Sat, 9 Nov 2013 00:15:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA90Fbor017644; Sat, 9 Nov 2013 00:15:37 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA90Fbjx017643; Sat, 9 Nov 2013 00:15:37 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201311090015.rA90Fbjx017643@svn.freebsd.org> From: Ian Lepore Date: Sat, 9 Nov 2013 00:15:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257873 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Nov 2013 00:15:37 -0000 Author: ian Date: Sat Nov 9 00:15:36 2013 New Revision: 257873 URL: http://svnweb.freebsd.org/changeset/base/257873 Log: This change builds kernel tools based on the same assumption as building the kernel itself: If building for the same architecture as the build host, the kernel build assumes that the host toolchain is capable of building the kernel. If it's not, "make kernel-toolchain" will bootstrap a new set of tools that will work. With this change the same assumptions are made for building kernel tools, and the existing host toolchain is used to do the build (notably, the build doesn't link the tools with the legacy libraries, which may not even exist). If ever for some reason the host toolchain isn't capable of building the kernel tools, then doing a "make kernel-toolchain" will bootstrap newer tools to get the job done. So when built as part of buildworld or kernel-toolchain, the kernel tools are built using the XMAKE (via BMAKE) commands and environment. When built as part of building just the kernel on a same-target host, the tools are built using the new KTMAKE commands and environment. What doesn't jump out at you in the diffs is that the difference between BMAKE and KTMAKE is that BMAKE contains this magic line which changes how the build is done because it changes what files get included for .include and other standard includes: MAKEFLAGS="-m ${.CURDIR}/tools/build/mk ${.MAKEFLAGS}" and KTMAKE doesn't, and contains this instead: TOOLS_PREFIX=${WORLDTMP} Hopefully this brings the "how to build aicasm with the right toolchain" saga to a conclusion that works in all usage scenarios that have historically been supported. Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Fri Nov 8 23:11:04 2013 (r257872) +++ head/Makefile.inc1 Sat Nov 9 00:15:36 2013 (r257873) @@ -263,6 +263,21 @@ XMAKE= TOOLS_PREFIX=${WORLDTMP} ${BMAKE TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ -DWITHOUT_GDB +# kernel-tools stage +KTMAKEENV= INSTALL="sh ${.CURDIR}/tools/install.sh" \ + PATH=${BPATH}:${PATH} \ + WORLDTMP=${WORLDTMP} \ + VERSION="${VERSION}" \ + COMPILER_TYPE=${COMPILER_TYPE} +KTMAKE= TOOLS_PREFIX=${WORLDTMP} MAKEOBJDIRPREFIX=${WORLDTMP} \ + ${KTMAKEENV} ${MAKE} ${WORLD_FLAGS} -f Makefile.inc1 \ + DESTDIR= \ + BOOTSTRAPPING=${OSRELDATE} \ + SSP_CFLAGS= \ + -DWITHOUT_HTML -DWITHOUT_INFO -DNO_LINT -DWITHOUT_MAN \ + -DNO_PIC -DNO_PROFILE -DNO_SHARED \ + -DNO_CPU_CFLAGS -DNO_WARNS -DNO_CTF -DEARLY_BUILD + # world stage WMAKEENV= ${CROSSENV} \ _SHLIBDIRPREFIX=${WORLDTMP} \ @@ -1020,7 +1035,7 @@ buildkernel: @echo "--------------------------------------------------------------" @echo ">>> stage 2.3: build tools" @echo "--------------------------------------------------------------" - ${_+_}cd ${.CURDIR}; ${XMAKE} kernel-tools + ${_+_}cd ${.CURDIR}; ${KTMAKE} kernel-tools .if !defined(NO_KERNELDEPEND) @echo @echo "--------------------------------------------------------------" From owner-svn-src-head@FreeBSD.ORG Sat Nov 9 00:36:10 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 2EDEB312; Sat, 9 Nov 2013 00:36:10 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1BEF72B85; Sat, 9 Nov 2013 00:36:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA90a96i024218; Sat, 9 Nov 2013 00:36:09 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA90a9Ng024215; Sat, 9 Nov 2013 00:36:09 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201311090036.rA90a9Ng024215@svn.freebsd.org> From: Sergey Kandaurov Date: Sat, 9 Nov 2013 00:36:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257874 - in head: . lib/libc/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Nov 2013 00:36:10 -0000 Author: pluknet Date: Sat Nov 9 00:36:09 2013 New Revision: 257874 URL: http://svnweb.freebsd.org/changeset/base/257874 Log: Fix extattr(2) MLINKS. MFC after: 1 week Modified: head/ObsoleteFiles.inc head/lib/libc/sys/Makefile.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Sat Nov 9 00:15:36 2013 (r257873) +++ head/ObsoleteFiles.inc Sat Nov 9 00:36:09 2013 (r257874) @@ -38,6 +38,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20131109: extattr(2) mlinks fixed +OLD_FILES+=usr/share/man/man2/extattr_delete_list.2.gz +OLD_FILES+=usr/share/man/man2/extattr_get_list.2.gz # 20131107: example files removed OLD_FILES+=usr/share/examples/libusb20/aux.c OLD_FILES+=usr/share/examples/libusb20/aux.h Modified: head/lib/libc/sys/Makefile.inc ============================================================================== --- head/lib/libc/sys/Makefile.inc Sat Nov 9 00:15:36 2013 (r257873) +++ head/lib/libc/sys/Makefile.inc Sat Nov 9 00:36:09 2013 (r257874) @@ -300,9 +300,9 @@ MLINKS+=execve.2 fexecve.2 MLINKS+=extattr_get_file.2 extattr.2 \ extattr_get_file.2 extattr_delete_fd.2 \ extattr_get_file.2 extattr_delete_file.2 \ - extattr_get_file.2 extattr_delete_list.2 \ + extattr_get_file.2 extattr_delete_link.2 \ extattr_get_file.2 extattr_get_fd.2 \ - extattr_get_file.2 extattr_get_list.2 \ + extattr_get_file.2 extattr_get_link.2 \ extattr_get_file.2 extattr_list_fd.2 \ extattr_get_file.2 extattr_list_file.2 \ extattr_get_file.2 extattr_list_link.2 \ From owner-svn-src-head@FreeBSD.ORG Sat Nov 9 01:23:50 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id BB1DF96C; Sat, 9 Nov 2013 01:23:50 +0000 (UTC) (envelope-from cochard@gmail.com) Received: from mail-vc0-x231.google.com (mail-vc0-x231.google.com [IPv6:2607:f8b0:400c:c03::231]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 438F52D7E; Sat, 9 Nov 2013 01:23:50 +0000 (UTC) Received: by mail-vc0-f177.google.com with SMTP id ib11so1884650vcb.8 for ; Fri, 08 Nov 2013 17:23:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=bLvTMuZhTdATh1UpAR6j4SfmMBTWhjVXZzVYT1joGUs=; b=bLP5jQk/9EKemXQ9t7YbjCtj8Wx8wbjSVb53AK1Vz6IJZw7BLgsiAt2Afi/NBnzIfW XIxlPm8erLbyQCnLrzErcwqYsZjRzPq/WQYEfJoWypNSh0aR3cZ+d6AUjwH4M6B6scxC lQz0JcWHwZEXJU8ebHrndB+hyQF0W9ksyld3rqwIcXO4mWpGd1tunX81n1V3/26qkoRD ZBlZ9k2kGNecdgTcbWuvqZT7YpW0Azchdmz1FU7JeoINsN9cBTNINmfaHaAHjrhIVyct wSLaIzPmnaJC5LUzaD3iQ8w3yGSM5JJBo1DIKYlsy4Osa42SqQQEFI7zFODR0ShwxVT6 58QA== X-Received: by 10.52.171.198 with SMTP id aw6mr330188vdc.51.1383960228667; Fri, 08 Nov 2013 17:23:48 -0800 (PST) MIME-Version: 1.0 Sender: cochard@gmail.com Received: by 10.58.1.72 with HTTP; Fri, 8 Nov 2013 17:23:28 -0800 (PST) In-Reply-To: <201311012121.rA1LLFCd058167@svn.freebsd.org> References: <201311012121.rA1LLFCd058167@svn.freebsd.org> From: =?ISO-8859-1?Q?Olivier_Cochard=2DLabb=E9?= Date: Sat, 9 Nov 2013 02:23:28 +0100 X-Google-Sender-Auth: Hjh6gp_s_LbgyEDYYIJNC2BzdAo Message-ID: Subject: Re: svn commit: r257529 - in head: share/man/man4 sys/conf sys/dev/e1000 sys/dev/ixgbe sys/dev/netmap sys/dev/re sys/net tools/tools/netmap To: Luigi Rizzo Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head , svn-src-all , src-committers X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Nov 2013 01:23:50 -0000 On Fri, Nov 1, 2013 at 10:21 PM, Luigi Rizzo wrote: > > Author: luigi > Date: Fri Nov 1 21:21:14 2013 > New Revision: 257529 > URL: http://svnweb.freebsd.org/changeset/base/257529 > > Log: > update to the latest netmap snapshot. > This includes the following: > - use separate memory regions for VALE ports > - locking fixes > - some simplifications in the NIC-specific routines > - performance improvements for the VALE switch > - some new features in the pkt-gen test program > Thanks a lot's for adding the range feature to pkt-gen ! But there is a problem with this new option: The checksum is not updated when the IP addresses are updated. If we use the IP src or dst range, only the packet using the first IP addresse has a correct checksum, all other paquets checksum are wrong. As example, if I start pkt-gen with -d 2.3.3.1-2.3.3.4 -s 1.3.3.1-1.3.3.4, give me these errors : [root@bsdrp2]~# tcpdump -npi igb2 -c 100 -v tcpdump: listening on igb2, link-type EN10MB (Ethernet), capture size 65535 bytes 00:00:56.439325 IP (tos 0x10, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 28, bad cksum 31ba (->31b9)!) 1.3.3.2.0 > 2.3.3.1.0: UDP, length 0 00:00:56.439325 IP (tos 0x10, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 28, bad cksum 31ba (->31b5)!) 1.3.3.3.0 > 2.3.3.4.0: UDP, length 0 00:00:56.439326 IP (tos 0x10, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 28, bad cksum 31ba (->31b8)!) 1.3.3.3.0 > 2.3.3.1.0: UDP, length 0 00:00:56.439327 IP (tos 0x10, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 28, bad cksum 31ba (->31b8)!) 1.3.3.2.0 > 2.3.3.2.0: UDP, length 0 00:00:56.439330 IP (tos 0x10, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 28) 1.3.3.1.0 > 2.3.3.1.0: UDP, length 0 00:00:56.439332 IP (tos 0x10, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 28, bad cksum 31ba (->31b7)!) 1.3.3.4.0 > 2.3.3.1.0: UDP, length 0 00:00:56.439332 IP (tos 0x10, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 28, bad cksum 31ba (->31b6)!) 1.3.3.4.0 > 2.3.3.2.0: UDP, length 0 00:00:56.439333 IP (tos 0x10, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 28, bad cksum 31ba (->31b9)!) 1.3.3.1.0 > 2.3.3.2.0: UDP, length 0 00:00:56.439334 IP (tos 0x10, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 28, bad cksum 31ba (->31b8)!) 1.3.3.1.0 > 2.3.3.3.0: UDP, length 0 Regards, Olivier From owner-svn-src-head@FreeBSD.ORG Sat Nov 9 03:07:49 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 98A8235D; Sat, 9 Nov 2013 03:07:49 +0000 (UTC) (envelope-from gibbs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 860742207; Sat, 9 Nov 2013 03:07:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA937nEY076077; Sat, 9 Nov 2013 03:07:49 GMT (envelope-from gibbs@svn.freebsd.org) Received: (from gibbs@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA937nP7076076; Sat, 9 Nov 2013 03:07:49 GMT (envelope-from gibbs@svn.freebsd.org) Message-Id: <201311090307.rA937nP7076076@svn.freebsd.org> From: "Justin T. Gibbs" Date: Sat, 9 Nov 2013 03:07:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257876 - head/sys/dev/xen/control X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Nov 2013 03:07:49 -0000 Author: gibbs Date: Sat Nov 9 03:07:48 2013 New Revision: 257876 URL: http://svnweb.freebsd.org/changeset/base/257876 Log: On XenServer the "halt" message is used instead of "poweroff", which makes FreeBSD halt but not poweroff (as expected when issuing a shutdown from the VM manager). Fix this by using the same handler for both "halt" and "poweroff". NB: The "halt" signal seems to be used on XenServer only. The OSS Xen toolstack (xl) uses "poweroff" instead. Submitted by: Roger Pau Monné Sponsored by: Citrix Systems R&D Reviewed by: gibbs MFC after: 2 days Modified: head/sys/dev/xen/control/control.c Modified: head/sys/dev/xen/control/control.c ============================================================================== --- head/sys/dev/xen/control/control.c Sat Nov 9 00:59:31 2013 (r257875) +++ head/sys/dev/xen/control/control.c Sat Nov 9 03:07:48 2013 (r257876) @@ -158,7 +158,6 @@ static xctrl_shutdown_handler_t xctrl_po static xctrl_shutdown_handler_t xctrl_reboot; static xctrl_shutdown_handler_t xctrl_suspend; static xctrl_shutdown_handler_t xctrl_crash; -static xctrl_shutdown_handler_t xctrl_halt; /*-------------------------- Private Data Structures -------------------------*/ /** Element type for lookup table of event name to handler. */ @@ -173,7 +172,7 @@ static const struct xctrl_shutdown_reaso { "reboot", xctrl_reboot }, { "suspend", xctrl_suspend }, { "crash", xctrl_crash }, - { "halt", xctrl_halt }, + { "halt", xctrl_poweroff }, }; struct xctrl_softc { @@ -441,12 +440,6 @@ xctrl_crash() panic("Xen directed crash"); } -static void -xctrl_halt() -{ - shutdown_nice(RB_HALT); -} - /*------------------------------ Event Reception -----------------------------*/ static void xctrl_on_watch_event(struct xs_watch *watch, const char **vec, unsigned int len) From owner-svn-src-head@FreeBSD.ORG Sat Nov 9 04:38:17 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 2125C313; Sat, 9 Nov 2013 04:38:17 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0C33F2682; Sat, 9 Nov 2013 04:38:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA94cG8t006242; Sat, 9 Nov 2013 04:38:16 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA94cGhX006241; Sat, 9 Nov 2013 04:38:16 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201311090438.rA94cGhX006241@svn.freebsd.org> From: Mark Johnston Date: Sat, 9 Nov 2013 04:38:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257877 - head/cddl/contrib/opensolaris/lib/libdtrace/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Nov 2013 04:38:17 -0000 Author: markj Date: Sat Nov 9 04:38:16 2013 New Revision: 257877 URL: http://svnweb.freebsd.org/changeset/base/257877 Log: Don't try to use the 32-bit drti.o unless the data model is explicitly set to ILP32. Otherwise dtrace -G will attempt to use it on amd64 if it can't determine which data model to use, which happens when -64 is omitted and no object files are provided, e.g. with # dtrace -G -n BEGIN This would result in a linker error, but now works properly. Also remove an unnecessary #ifdef. MFC after: 2 weeks Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Sat Nov 9 03:07:48 2013 (r257876) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Sat Nov 9 04:38:16 2013 (r257877) @@ -1864,7 +1864,7 @@ dtrace_program_link(dtrace_hdl_t *dtp, d * Arches which default to 64-bit need to explicitly use * the 32-bit library path. */ - int use_32 = !(dtp->dt_oflags & DTRACE_O_LP64); + int use_32 = (dtp->dt_oflags & DTRACE_O_ILP32); #else /* * Arches which are 32-bit only just use the normal @@ -1879,9 +1879,7 @@ dtrace_program_link(dtrace_hdl_t *dtp, d len = snprintf(&tmp, 1, fmt, dtp->dt_ld_path, file, tfile, drti) + 1; -#if !defined(sun) len *= 2; -#endif cmd = alloca(len); (void) snprintf(cmd, len, fmt, dtp->dt_ld_path, file, From owner-svn-src-head@FreeBSD.ORG Sat Nov 9 04:50:06 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 2AC555F3; Sat, 9 Nov 2013 04:50:06 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1752726FD; Sat, 9 Nov 2013 04:50:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA94o5Q6009730; Sat, 9 Nov 2013 04:50:05 GMT (envelope-from cperciva@svn.freebsd.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA94o59j009729; Sat, 9 Nov 2013 04:50:05 GMT (envelope-from cperciva@svn.freebsd.org) Message-Id: <201311090450.rA94o59j009729@svn.freebsd.org> From: Colin Percival Date: Sat, 9 Nov 2013 04:50:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257879 - head/usr.sbin/freebsd-update X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Nov 2013 04:50:06 -0000 Author: cperciva Date: Sat Nov 9 04:50:05 2013 New Revision: 257879 URL: http://svnweb.freebsd.org/changeset/base/257879 Log: Fix typo in r256646: We want to generate lists of directories in INDEX-OLD and INDEX-NEW and compare them, not generate the same list of directories from INDEX-OLD twice... Pointy hats to: cperciva & everybody who didn't proofread EN-13:04 enough Modified: head/usr.sbin/freebsd-update/freebsd-update.sh Modified: head/usr.sbin/freebsd-update/freebsd-update.sh ============================================================================== --- head/usr.sbin/freebsd-update/freebsd-update.sh Sat Nov 9 04:40:32 2013 (r257878) +++ head/usr.sbin/freebsd-update/freebsd-update.sh Sat Nov 9 04:50:05 2013 (r257879) @@ -2884,8 +2884,8 @@ again to finish installing updates. install_delete INDEX-OLD INDEX-NEW || return 1 # Remove old directories - grep -vE '^/boot/' $1/INDEX-OLD | - grep -E '^[^|]+\|d\|' > INDEX-OLD + grep -vE '^/boot/' $1/INDEX-NEW | + grep -E '^[^|]+\|d\|' > INDEX-NEW grep -vE '^/boot/' $1/INDEX-OLD | grep -E '^[^|]+\|d\|' > INDEX-OLD install_delete INDEX-OLD INDEX-NEW || return 1 From owner-svn-src-head@FreeBSD.ORG Sat Nov 9 06:30:09 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id ED7D526B; Sat, 9 Nov 2013 06:30:09 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DB0E82C52; Sat, 9 Nov 2013 06:30:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA96U998043141; Sat, 9 Nov 2013 06:30:09 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA96U9Ko043140; Sat, 9 Nov 2013 06:30:09 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201311090630.rA96U9Ko043140@svn.freebsd.org> From: Adrian Chadd Date: Sat, 9 Nov 2013 06:30:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257880 - head/sys/dev/iwn X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Nov 2013 06:30:10 -0000 Author: adrian Date: Sat Nov 9 06:30:09 2013 New Revision: 257880 URL: http://svnweb.freebsd.org/changeset/base/257880 Log: Add some new driver definitions as part of the chip support updates: This is a no-op for now! * Add a new flag value for "there are no extra bits" for some random field; * Add a definition for the maximum number of calibration entries in the calibration data cache in iwn_softc. It's not yet used. * Add regulatory bands for the 2030 NIC. Submitted by: Cedric Gross Modified: head/sys/dev/iwn/if_iwnreg.h Modified: head/sys/dev/iwn/if_iwnreg.h ============================================================================== --- head/sys/dev/iwn/if_iwnreg.h Sat Nov 9 04:50:05 2013 (r257879) +++ head/sys/dev/iwn/if_iwnreg.h Sat Nov 9 06:30:09 2013 (r257880) @@ -224,6 +224,7 @@ #define IWN_GP_DRIVER_CALIB_VER6 (1 << 2) #define IWN_GP_DRIVER_6050_1X2 (1 << 3) #define IWN_GP_DRIVER_REG_BIT_RADIO_IQ_INVERT (1 << 7) +#define IWN_GP_DRIVER_NONE 0 /* Possible flags for register IWN_UCODE_GP1_CLR. */ #define IWN_UCODE_GP1_RFKILL (1 << 1) @@ -1104,6 +1105,12 @@ struct iwn_enhanced_sensitivity_cmd { uint16_t reserved; } __packed; +/* + * Define maximal number of calib result send to runtime firmware + * PS: TEMP_OFFSET count for 2 (std and v2) + */ +#define IWN5000_PHY_CALIB_MAX_RESULT 8 + /* Structures for command IWN_CMD_PHY_CALIB. */ struct iwn_phy_calib { uint8_t code; @@ -1734,6 +1741,16 @@ static const uint32_t iwn1000_regulatory IWN5000_EEPROM_NO_HT40, }; +static const uint32_t iwn2030_regulatory_bands[IWN_NBANDS] = { + IWN5000_EEPROM_BAND1, + IWN5000_EEPROM_BAND2, + IWN5000_EEPROM_BAND3, + IWN5000_EEPROM_BAND4, + IWN5000_EEPROM_BAND5, + IWN6000_EEPROM_BAND6, + IWN5000_EEPROM_BAND7 +}; + #define IWN_CHAN_BANDS_COUNT 7 #define IWN_MAX_CHAN_PER_BAND 14 static const struct iwn_chan_band { From owner-svn-src-head@FreeBSD.ORG Sat Nov 9 07:30:14 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 599FCA3D; Sat, 9 Nov 2013 07:30:14 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2D9212EB2; Sat, 9 Nov 2013 07:30:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA97UEhG063026; Sat, 9 Nov 2013 07:30:14 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA97UEcn063025; Sat, 9 Nov 2013 07:30:14 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201311090730.rA97UEcn063025@svn.freebsd.org> From: Adrian Chadd Date: Sat, 9 Nov 2013 07:30:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257881 - head/sys/net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Nov 2013 07:30:14 -0000 Author: adrian Date: Sat Nov 9 07:30:13 2013 New Revision: 257881 URL: http://svnweb.freebsd.org/changeset/base/257881 Log: Fix AMRR to correctly select the initial rate. There were two bugs: * If the initial lowest rate didn't go through the loop at least once, the AMRR rate index would be the highest rate in the table (eg the rix mapping to MCS15) but rate would stay at the default value, namely 0. This meant that the initial rate selection would be MCS15 _but_ the node ni_txrate value would be MCS0. * If the node is 11n, then break out of the loop correctly. Beforehand, my initial 11n AMRR commit would immediately exit out as it would fail the 11n check, then it would always fall through to the non-11n rate which would then see if it was < 36mbit (ie, "72"), which would always match. Hence, it'd always return MCS15. Tested: * Intel Centrino 2230 STA (local changes), STA mode * Intel Wifi 5100, STA Modified: head/sys/net80211/ieee80211_amrr.c Modified: head/sys/net80211/ieee80211_amrr.c ============================================================================== --- head/sys/net80211/ieee80211_amrr.c Sat Nov 9 06:30:09 2013 (r257880) +++ head/sys/net80211/ieee80211_amrr.c Sat Nov 9 07:30:13 2013 (r257881) @@ -199,13 +199,13 @@ amrr_node_init(struct ieee80211_node *ni amn->amn_rix--) { /* legacy - anything < 36mbit, stop searching */ /* 11n - stop at MCS4 / MCS12 / MCS28 */ - if (amrr_node_is_11n(ni) && - (rs->rs_rates[amn->amn_rix] & 0x7) < 4) + if (amrr_node_is_11n(ni)) { + if ((rs->rs_rates[amn->amn_rix] & 0x7) < 4) + break; + } else if ((rs->rs_rates[amn->amn_rix] & IEEE80211_RATE_VAL) <= 72) break; - else if ((rs->rs_rates[amn->amn_rix] & IEEE80211_RATE_VAL) <= 72) - break; - rate = rs->rs_rates[amn->amn_rix] & IEEE80211_RATE_VAL; } + rate = rs->rs_rates[amn->amn_rix] & IEEE80211_RATE_VAL; /* if the rate is an 11n rate, ensure the MCS bit is set */ if (amrr_node_is_11n(ni)) From owner-svn-src-head@FreeBSD.ORG Sat Nov 9 08:11:25 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 4EAC4F13; Sat, 9 Nov 2013 08:11:25 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3AE6120D4; Sat, 9 Nov 2013 08:11:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA98BPsq078437; Sat, 9 Nov 2013 08:11:25 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA98BPQk078436; Sat, 9 Nov 2013 08:11:25 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201311090811.rA98BPQk078436@svn.freebsd.org> From: Adrian Chadd Date: Sat, 9 Nov 2013 08:11:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257882 - head/sys/modules/bwi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Nov 2013 08:11:25 -0000 Author: adrian Date: Sat Nov 9 08:11:24 2013 New Revision: 257882 URL: http://svnweb.freebsd.org/changeset/base/257882 Log: Strip out this cruft; people should be making modules with a complete kernel config environment anyway. Modified: head/sys/modules/bwi/Makefile Modified: head/sys/modules/bwi/Makefile ============================================================================== --- head/sys/modules/bwi/Makefile Sat Nov 9 07:30:13 2013 (r257881) +++ head/sys/modules/bwi/Makefile Sat Nov 9 08:11:24 2013 (r257882) @@ -7,8 +7,4 @@ KMOD = if_bwi SRCS = if_bwi.c if_bwi_pci.c bwimac.c bwiphy.c bwirf.c SRCS += device_if.h bus_if.h pci_if.h opt_inet.h opt_bwi.h opt_wlan.h -opt_bwi.h: - echo '#define BWI_DEBUG 1' > opt_bwi.h -# echo '#define BWI_DEBUG_VERBOSE 1' >> opt_bwi.h - .include From owner-svn-src-head@FreeBSD.ORG Sat Nov 9 08:27:56 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 88484360; Sat, 9 Nov 2013 08:27:56 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7590A216F; Sat, 9 Nov 2013 08:27:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA98RuNj082761; Sat, 9 Nov 2013 08:27:56 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA98RuYj082760; Sat, 9 Nov 2013 08:27:56 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201311090827.rA98RuYj082760@svn.freebsd.org> From: Eitan Adler Date: Sat, 9 Nov 2013 08:27:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257883 - head/sys/dev/ppc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Nov 2013 08:27:56 -0000 Author: eadler Date: Sat Nov 9 08:27:55 2013 New Revision: 257883 URL: http://svnweb.freebsd.org/changeset/base/257883 Log: Add support for SIIG x1 pci-e single parallel port card (JJ-E01211-S1) PR: kern/182217 Submitted by: Craig Leres MFC After: 1 week Modified: head/sys/dev/ppc/ppc_pci.c Modified: head/sys/dev/ppc/ppc_pci.c ============================================================================== --- head/sys/dev/ppc/ppc_pci.c Sat Nov 9 08:11:24 2013 (r257882) +++ head/sys/dev/ppc/ppc_pci.c Sat Nov 9 08:27:55 2013 (r257883) @@ -88,6 +88,7 @@ static struct pci_id pci_ids[] = { { 0x80001407, "Lava Computers 2SP-PCI parallel port", 0x10 }, { 0x84031415, "Oxford Semiconductor OX12PCI840 Parallel port", 0x10 }, { 0x95131415, "Oxford Semiconductor OX16PCI954 Parallel port", 0x10 }, + { 0xc1101415, "Oxford Semiconductor OXPCIe952 Parallel port", 0x10 }, { 0x98059710, "NetMos NM9805 1284 Printer port", 0x10 }, { 0x98659710, "MosChip MCS9865 1284 Printer port", 0x10 }, { 0x99019710, "MosChip MCS9901 PCIe to Peripheral Controller", 0x10 }, From owner-svn-src-head@FreeBSD.ORG Sat Nov 9 08:46:14 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 233B25F7; Sat, 9 Nov 2013 08:46:14 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail107.syd.optusnet.com.au (mail107.syd.optusnet.com.au [211.29.132.53]) by mx1.freebsd.org (Postfix) with ESMTP id 7AC7F2220; Sat, 9 Nov 2013 08:46:13 +0000 (UTC) Received: from c122-106-156-23.carlnfd1.nsw.optusnet.com.au (c122-106-156-23.carlnfd1.nsw.optusnet.com.au [122.106.156.23]) by mail107.syd.optusnet.com.au (Postfix) with ESMTPS id 25709D42216; Sat, 9 Nov 2013 19:46:09 +1100 (EST) Date: Sat, 9 Nov 2013 19:46:08 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Eitan Adler Subject: Re: svn commit: r257883 - head/sys/dev/ppc In-Reply-To: <201311090827.rA98RuYj082760@svn.freebsd.org> Message-ID: <20131109194526.O1128@besplex.bde.org> References: <201311090827.rA98RuYj082760@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=bpB1Wiqi c=1 sm=1 tr=0 a=ebeQFi2P/qHVC0Yw9JDJ4g==:117 a=PO7r1zJSAAAA:8 a=v_ry3Y7z3OsA:10 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=Z5zpL04VkhMA:10 a=QIKyT51v6OvtLoXBi6kA:9 a=CjuIK1q_8ugA:10 Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Nov 2013 08:46:14 -0000 On Sat, 9 Nov 2013, Eitan Adler wrote: > Log: > Add support for SIIG x1 pci-e single parallel port card (JJ-E01211-S1) > > PR: kern/182217 > Submitted by: Craig Leres > MFC After: 1 week > > Modified: head/sys/dev/ppc/ppc_pci.c > ============================================================================== > --- head/sys/dev/ppc/ppc_pci.c Sat Nov 9 08:11:24 2013 (r257882) > +++ head/sys/dev/ppc/ppc_pci.c Sat Nov 9 08:27:55 2013 (r257883) > @@ -88,6 +88,7 @@ static struct pci_id pci_ids[] = { > { 0x80001407, "Lava Computers 2SP-PCI parallel port", 0x10 }, > { 0x84031415, "Oxford Semiconductor OX12PCI840 Parallel port", 0x10 }, > { 0x95131415, "Oxford Semiconductor OX16PCI954 Parallel port", 0x10 }, > + { 0xc1101415, "Oxford Semiconductor OXPCIe952 Parallel port", 0x10 }, > { 0x98059710, "NetMos NM9805 1284 Printer port", 0x10 }, > { 0x98659710, "MosChip MCS9865 1284 Printer port", 0x10 }, > { 0x99019710, "MosChip MCS9901 PCIe to Peripheral Controller", 0x10 }, Any chance of keeping sorted lists sorted? Bruce From owner-svn-src-head@FreeBSD.ORG Sat Nov 9 08:57:22 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 6CF01851; Sat, 9 Nov 2013 08:57:22 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 412A0226A; Sat, 9 Nov 2013 08:57:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA98vMhD092527; Sat, 9 Nov 2013 08:57:22 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA98vLVM092525; Sat, 9 Nov 2013 08:57:21 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201311090857.rA98vLVM092525@svn.freebsd.org> From: Eitan Adler Date: Sat, 9 Nov 2013 08:57:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257884 - head/usr.bin/split X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Nov 2013 08:57:22 -0000 Author: eadler Date: Sat Nov 9 08:57:21 2013 New Revision: 257884 URL: http://svnweb.freebsd.org/changeset/base/257884 Log: Change manual string conversion to expand_number Reviewed by: adrian Modified: head/usr.bin/split/Makefile head/usr.bin/split/split.c Modified: head/usr.bin/split/Makefile ============================================================================== --- head/usr.bin/split/Makefile Sat Nov 9 08:27:55 2013 (r257883) +++ head/usr.bin/split/Makefile Sat Nov 9 08:57:21 2013 (r257884) @@ -2,5 +2,6 @@ # $FreeBSD$ PROG= split +LDADD= -lutil .include Modified: head/usr.bin/split/split.c ============================================================================== --- head/usr.bin/split/split.c Sat Nov 9 08:27:55 2013 (r257883) +++ head/usr.bin/split/split.c Sat Nov 9 08:57:21 2013 (r257884) @@ -49,6 +49,7 @@ static const char sccsid[] = "@(#)split. #include #include #include +#include #include #include #include @@ -83,9 +84,8 @@ static void usage(void); int main(int argc, char **argv) { - intmax_t bytecnti; - long scale; int ch; + int error; char *ep, *p; setlocale(LC_ALL, ""); @@ -118,21 +118,9 @@ main(int argc, char **argv) break; case 'b': /* Byte count. */ errno = 0; - if ((bytecnti = strtoimax(optarg, &ep, 10)) <= 0 || - strchr("kKmMgG", *ep) == NULL || errno != 0) - errx(EX_USAGE, - "%s: illegal byte count", optarg); - if (*ep == 'k' || *ep == 'K') - scale = 1024; - else if (*ep == 'm' || *ep == 'M') - scale = 1024 * 1024; - else if (*ep == 'g' || *ep == 'G') - scale = 1024 * 1024 * 1024; - else - scale = 1; - if (bytecnti > OFF_MAX / scale) + error = expand_number(optarg, &bytecnt); + if (error == -1) errx(EX_USAGE, "%s: offset too large", optarg); - bytecnt = (off_t)(bytecnti * scale); break; case 'd': /* Decimal suffix */ dflag = true; From owner-svn-src-head@FreeBSD.ORG Sat Nov 9 08:59:09 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 6E469996 for ; Sat, 9 Nov 2013 08:59:09 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-qc0-x22b.google.com (mail-qc0-x22b.google.com [IPv6:2607:f8b0:400d:c01::22b]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2BF682278 for ; Sat, 9 Nov 2013 08:59:09 +0000 (UTC) Received: by mail-qc0-f171.google.com with SMTP id i8so1658477qcq.30 for ; Sat, 09 Nov 2013 00:59:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=IbbZLk/FMdoAxGUjIvJI6TNjPDe0b1Tq04LaroTAEBE=; b=dnZoxNgUM3bFRbX3NA72API83eAxcPyWzwGmPmd7MaK5a6oE8/CqJKm3dwqh4eZKFp T/hOIOALWfFSx5yo0gb0gOoy1v7jSaT0q+JYFgW9JrpN3rjP7SHYoIsaTqgyHCMkTTi9 qJU1sj6u+RqHNp4MMg4oLoffMKF11VqMj1dNw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-type; bh=IbbZLk/FMdoAxGUjIvJI6TNjPDe0b1Tq04LaroTAEBE=; b=Zawp2N1T3o/8xmrXUOMWTGq5aHIiVLCOKT3EBVY7b5xLv027VKJIOFdcnowH7LB70d rL4rMrN3eaH8ZF5E9/cx86Ws5Ay020zUdTWVfTHlO6rotWHEQ/t5Um+vxS7d/LMWDk+j WvJzenfStne08jQL08QiSadZ2QF6Jo0XPam8iSQFmJdtXbO5ryzLO2bjeG6tOD9KZrLk fE6T3N4BYCwVNN84Y5nzwG8aGi/Q4APBmSUJs1IGAhConGJTrPGsQqRy2t4rAIRWb3TX sXqpSDr5liALSk08Xjmb19j5Jjq8xkrpJACr0qwOdgPgfn5SYOQz3ch97nIsA0tQyEgi ojyw== X-Gm-Message-State: ALoCoQlSFrV6M9IG7253D9aAriQpDloz8Or2+tOjbgePhjD075J5vzZQwZplcgg03P83TX9rHmPX X-Received: by 10.49.116.19 with SMTP id js19mr29396256qeb.34.1383987548365; Sat, 09 Nov 2013 00:59:08 -0800 (PST) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.96.63.101 with HTTP; Sat, 9 Nov 2013 00:58:38 -0800 (PST) In-Reply-To: <20131109194526.O1128@besplex.bde.org> References: <201311090827.rA98RuYj082760@svn.freebsd.org> <20131109194526.O1128@besplex.bde.org> From: Eitan Adler Date: Sat, 9 Nov 2013 03:58:38 -0500 X-Google-Sender-Auth: wgEv9baKGlMcGOZuhAUP1BX3zJw Message-ID: Subject: Re: svn commit: r257883 - head/sys/dev/ppc To: Bruce Evans Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Nov 2013 08:59:09 -0000 On Sat, Nov 9, 2013 at 3:46 AM, Bruce Evans wrote: > On Sat, 9 Nov 2013, Eitan Adler wrote: > >> Log: >> Add support for SIIG x1 pci-e single parallel port card (JJ-E01211-S1) >> >> PR: kern/182217 >> Submitted by: Craig Leres >> MFC After: 1 week >> >> Modified: head/sys/dev/ppc/ppc_pci.c >> >> ============================================================================== >> --- head/sys/dev/ppc/ppc_pci.c Sat Nov 9 08:11:24 2013 (r257882) >> +++ head/sys/dev/ppc/ppc_pci.c Sat Nov 9 08:27:55 2013 (r257883) >> @@ -88,6 +88,7 @@ static struct pci_id pci_ids[] = { >> { 0x80001407, "Lava Computers 2SP-PCI parallel port", 0x10 }, >> { 0x84031415, "Oxford Semiconductor OX12PCI840 Parallel port", >> 0x10 }, >> { 0x95131415, "Oxford Semiconductor OX16PCI954 Parallel port", >> 0x10 }, >> + { 0xc1101415, "Oxford Semiconductor OXPCIe952 Parallel port", 0x10 >> }, >> { 0x98059710, "NetMos NM9805 1284 Printer port", 0x10 }, >> { 0x98659710, "MosChip MCS9865 1284 Printer port", 0x10 }, >> { 0x99019710, "MosChip MCS9901 PCIe to Peripheral Controller", >> 0x10 }, > > > Any chance of keeping sorted lists sorted? Sure. Shall I sort by ID or English text? -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams From owner-svn-src-head@FreeBSD.ORG Sat Nov 9 09:05:51 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 404B9AFD; Sat, 9 Nov 2013 09:05:51 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1433522CF; Sat, 9 Nov 2013 09:05:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA995oot095922; Sat, 9 Nov 2013 09:05:50 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA995oXB095921; Sat, 9 Nov 2013 09:05:50 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201311090905.rA995oXB095921@svn.freebsd.org> From: Eitan Adler Date: Sat, 9 Nov 2013 09:05:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257885 - head/usr.bin/split X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Nov 2013 09:05:51 -0000 Author: eadler Date: Sat Nov 9 09:05:50 2013 New Revision: 257885 URL: http://svnweb.freebsd.org/changeset/base/257885 Log: Add missed DPADD Reported by: swildner@DragonflyBSD.org Modified: head/usr.bin/split/Makefile Modified: head/usr.bin/split/Makefile ============================================================================== --- head/usr.bin/split/Makefile Sat Nov 9 08:57:21 2013 (r257884) +++ head/usr.bin/split/Makefile Sat Nov 9 09:05:50 2013 (r257885) @@ -3,5 +3,6 @@ PROG= split LDADD= -lutil +DPADD= ${LIBUTIL} .include From owner-svn-src-head@FreeBSD.ORG Sat Nov 9 14:48:51 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 0A89C2A6; Sat, 9 Nov 2013 14:48:51 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DC23F21DC; Sat, 9 Nov 2013 14:48:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA9Emo5K009786; Sat, 9 Nov 2013 14:48:50 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA9EmobU009784; Sat, 9 Nov 2013 14:48:50 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201311091448.rA9EmobU009784@svn.freebsd.org> From: Gleb Smirnoff Date: Sat, 9 Nov 2013 14:48:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257888 - in head: contrib/smbfs/lib/smb usr.sbin/mount_smbfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Nov 2013 14:48:51 -0000 Author: glebius Date: Sat Nov 9 14:48:50 2013 New Revision: 257888 URL: http://svnweb.freebsd.org/changeset/base/257888 Log: Use system libiconv, instead of trying to dlopen() it. PR: 183153 Submitted by: Dominic Fandrey Modified: head/contrib/smbfs/lib/smb/nls.c head/usr.sbin/mount_smbfs/Makefile Modified: head/contrib/smbfs/lib/smb/nls.c ============================================================================== --- head/contrib/smbfs/lib/smb/nls.c Sat Nov 9 14:46:24 2013 (r257887) +++ head/contrib/smbfs/lib/smb/nls.c Sat Nov 9 14:48:50 2013 (r257888) @@ -36,12 +36,9 @@ __FBSDID("$FreeBSD$"); #include -#include +#include #include #include -#ifndef APPLE -#include -#endif #include #include #include @@ -50,21 +47,10 @@ __FBSDID("$FreeBSD$"); #include #include -/* - * prototype iconv* functions - */ -typedef void *iconv_t; - -static iconv_t (*my_iconv_open)(const char *, const char *); -static size_t(*my_iconv)(iconv_t, const char **, size_t *, char **, size_t *); -static int(*my_iconv_close)(iconv_t); - u_char nls_lower[256]; u_char nls_upper[256]; static iconv_t nls_toext, nls_toloc; -static int iconv_loaded; -static void *iconv_lib; int nls_setlocale(const char *name) @@ -90,32 +76,18 @@ nls_setrecode(const char *local, const c #else iconv_t icd; - if (iconv_loaded == 2) - return ENOENT; - else if (iconv_loaded == 0) { - iconv_loaded++; - iconv_lib = dlopen("libiconv.so", RTLD_LAZY | RTLD_GLOBAL); - if (iconv_lib == NULL) { - warn("Unable to load iconv library: %s\n", dlerror()); - iconv_loaded++; - return ENOENT; - } - my_iconv_open = dlsym(iconv_lib, "iconv_open"); - my_iconv = dlsym(iconv_lib, "iconv"); - my_iconv_close = dlsym(iconv_lib, "iconv_close"); - } if (nls_toext) - my_iconv_close(nls_toext); + iconv_close(nls_toext); if (nls_toloc) - my_iconv_close(nls_toloc); + iconv_close(nls_toloc); nls_toext = nls_toloc = (iconv_t)0; - icd = my_iconv_open(external, local); + icd = iconv_open(external, local); if (icd == (iconv_t)-1) return errno; nls_toext = icd; - icd = my_iconv_open(local, external); + icd = iconv_open(local, external); if (icd == (iconv_t)-1) { - my_iconv_close(nls_toext); + iconv_close(nls_toext); nls_toext = (iconv_t)0; return errno; } @@ -130,14 +102,11 @@ nls_str_toloc(char *dst, const char *src char *p = dst; size_t inlen, outlen; - if (!iconv_loaded) - return strcpy(dst, src); - if (nls_toloc == (iconv_t)0) return strcpy(dst, src); inlen = outlen = strlen(src); - my_iconv(nls_toloc, NULL, NULL, &p, &outlen); - while (my_iconv(nls_toloc, &src, &inlen, &p, &outlen) == -1) { + iconv(nls_toloc, NULL, NULL, &p, &outlen); + while (iconv(nls_toloc, &src, &inlen, &p, &outlen) == -1) { *p++ = *src++; inlen--; outlen--; @@ -152,14 +121,11 @@ nls_str_toext(char *dst, const char *src char *p = dst; size_t inlen, outlen; - if (!iconv_loaded) - return strcpy(dst, src); - if (nls_toext == (iconv_t)0) return strcpy(dst, src); inlen = outlen = strlen(src); - my_iconv(nls_toext, NULL, NULL, &p, &outlen); - while (my_iconv(nls_toext, &src, &inlen, &p, &outlen) == -1) { + iconv(nls_toext, NULL, NULL, &p, &outlen); + while (iconv(nls_toext, &src, &inlen, &p, &outlen) == -1) { *p++ = *src++; inlen--; outlen--; @@ -175,17 +141,14 @@ nls_mem_toloc(void *dst, const void *src const char *s = src; size_t inlen, outlen; - if (!iconv_loaded) - return memcpy(dst, src, size); - if (size == 0) return NULL; if (nls_toloc == (iconv_t)0) return memcpy(dst, src, size); inlen = outlen = size; - my_iconv(nls_toloc, NULL, NULL, &p, &outlen); - while (my_iconv(nls_toloc, &s, &inlen, &p, &outlen) == -1) { + iconv(nls_toloc, NULL, NULL, &p, &outlen); + while (iconv(nls_toloc, &s, &inlen, &p, &outlen) == -1) { *p++ = *s++; inlen--; outlen--; @@ -203,12 +166,12 @@ nls_mem_toext(void *dst, const void *src if (size == 0) return NULL; - if (!iconv_loaded || nls_toext == (iconv_t)0) + if (nls_toext == (iconv_t)0) return memcpy(dst, src, size); inlen = outlen = size; - my_iconv(nls_toext, NULL, NULL, &p, &outlen); - while (my_iconv(nls_toext, &s, &inlen, &p, &outlen) == -1) { + iconv(nls_toext, NULL, NULL, &p, &outlen); + while (iconv(nls_toext, &s, &inlen, &p, &outlen) == -1) { *p++ = *s++; inlen--; outlen--; Modified: head/usr.sbin/mount_smbfs/Makefile ============================================================================== --- head/usr.sbin/mount_smbfs/Makefile Sat Nov 9 14:46:24 2013 (r257887) +++ head/usr.sbin/mount_smbfs/Makefile Sat Nov 9 14:48:50 2013 (r257888) @@ -11,11 +11,6 @@ CFLAGS+= -DSMBFS -I${MOUNTDIR} -I${CONTR LDADD= -lsmb -lkiconv DPADD= ${LIBSMB} ${LIBKICONV} -# Needs to be dynamically linked for optional dlopen() access to -# userland libiconv (see the -E option). -# -NO_SHARED?= NO - .PATH: ${CONTRIBDIR}/mount_smbfs .PATH: ${MOUNTDIR} From owner-svn-src-head@FreeBSD.ORG Sat Nov 9 16:20:43 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 45AA22C1; Sat, 9 Nov 2013 16:20:43 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 33E622757; Sat, 9 Nov 2013 16:20:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA9GKhTs043865; Sat, 9 Nov 2013 16:20:43 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA9GKhGa043864; Sat, 9 Nov 2013 16:20:43 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201311091620.rA9GKhGa043864@svn.freebsd.org> From: Sergey Kandaurov Date: Sat, 9 Nov 2013 16:20:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257891 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Nov 2013 16:20:43 -0000 Author: pluknet Date: Sat Nov 9 16:20:42 2013 New Revision: 257891 URL: http://svnweb.freebsd.org/changeset/base/257891 Log: pkg_install has been removed on 20131031. Approved by: portmgr (bdrewery) Modified: head/MAINTAINERS Modified: head/MAINTAINERS ============================================================================== --- head/MAINTAINERS Sat Nov 9 15:10:07 2013 (r257890) +++ head/MAINTAINERS Sat Nov 9 16:20:42 2013 (r257891) @@ -99,7 +99,6 @@ nfs alfred Will be happy to review code rpc.lockd alfred Will be happy to review code, but not mandatory. truss alfred Will be happy to review code, but not mandatory. rpc alfred Pre-commit review requested. -pkg_install portmgr Pre-commit review or approval from portmgr@ requested. linux emul emulation Please discuss changes here. bs{diff,patch} cperciva Pre-commit review requested. portsnap cperciva Pre-commit review requested. From owner-svn-src-head@FreeBSD.ORG Sat Nov 9 18:46:12 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 9CC1E97D; Sat, 9 Nov 2013 18:46:12 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 70D212D2F; Sat, 9 Nov 2013 18:46:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA9IkCq5090529; Sat, 9 Nov 2013 18:46:12 GMT (envelope-from br@svn.freebsd.org) Received: (from br@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA9IkBf4090524; Sat, 9 Nov 2013 18:46:11 GMT (envelope-from br@svn.freebsd.org) Message-Id: <201311091846.rA9IkBf4090524@svn.freebsd.org> From: Ruslan Bukin Date: Sat, 9 Nov 2013 18:46:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257892 - head/sys/dev/nand X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Nov 2013 18:46:12 -0000 Author: br Date: Sat Nov 9 18:46:11 2013 New Revision: 257892 URL: http://svnweb.freebsd.org/changeset/base/257892 Log: o Add ONFI signature check. o Add Micron chip found in Freescale Vybrid Family Phytec COSMIC board. Approved by: cognet (mentor) Modified: head/sys/dev/nand/nand.h head/sys/dev/nand/nand_generic.c head/sys/dev/nand/nand_id.c Modified: head/sys/dev/nand/nand.h ============================================================================== --- head/sys/dev/nand/nand.h Sat Nov 9 16:20:42 2013 (r257891) +++ head/sys/dev/nand/nand.h Sat Nov 9 18:46:11 2013 (r257892) @@ -122,7 +122,8 @@ MALLOC_DECLARE(M_NAND); #define NAND_MAN_SAMSUNG 0xec #define NAND_MAN_HYNIX 0xad -#define NAND_MAN_STMICRO 0x20 +#define NAND_MAN_STMICRO 0x20 +#define NAND_MAN_MICRON 0x2c struct nand_id { uint8_t man_id; Modified: head/sys/dev/nand/nand_generic.c ============================================================================== --- head/sys/dev/nand/nand_generic.c Sat Nov 9 16:20:42 2013 (r257891) +++ head/sys/dev/nand/nand_generic.c Sat Nov 9 18:46:11 2013 (r257892) @@ -341,8 +341,12 @@ onfi_read_parameter(struct nand_chip *ch NANDBUS_READ_BUFFER(nandbus, params, sizeof(struct onfi_params)); + if (memcmp(params->signature, "ONFI", sizeof(params->signature))) { + device_printf(chip->dev, "Error: bad signature\n"); + return (ENXIO); + } + /* TODO */ - /* Check for signature */ /* Check CRC */ /* Use redundant page if necessary */ Modified: head/sys/dev/nand/nand_id.c ============================================================================== --- head/sys/dev/nand/nand_id.c Sat Nov 9 16:20:42 2013 (r257891) +++ head/sys/dev/nand/nand_id.c Sat Nov 9 18:46:11 2013 (r257892) @@ -47,6 +47,8 @@ struct nand_params nand_ids[] = { 0x80, 0x200, 0x10, 0x20, 0 }, { { NAND_MAN_STMICRO, 0xf1 }, "STMicro 128MB 3,3V 8-bit", 0x80, 2048, 64, 0x40, 0 }, + { { NAND_MAN_MICRON, 0xcc }, "Micron NAND 512MiB 3,3V 16-bit", + 0x200, 2048, 64, 0x40, 0 }, }; struct nand_params *nand_get_params(struct nand_id *id) From owner-svn-src-head@FreeBSD.ORG Sat Nov 9 19:56:01 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 08D66AB4 for ; Sat, 9 Nov 2013 19:56:01 +0000 (UTC) (envelope-from sean_bruno@yahoo.com) Received: from nm19-vm0.bullet.mail.bf1.yahoo.com (nm19-vm0.bullet.mail.bf1.yahoo.com [98.139.213.162]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9C7962FAD for ; Sat, 9 Nov 2013 19:56:00 +0000 (UTC) Received: from [98.139.212.152] by nm19.bullet.mail.bf1.yahoo.com with NNFMP; 09 Nov 2013 19:55:52 -0000 Received: from [98.139.213.13] by tm9.bullet.mail.bf1.yahoo.com with NNFMP; 09 Nov 2013 19:55:52 -0000 Received: from [127.0.0.1] by smtp113.mail.bf1.yahoo.com with NNFMP; 09 Nov 2013 19:55:52 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1384026952; bh=0alwmTCuDBIrnHY3slVX+j8+MMpFHiGqkxFKhBM7ffI=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:X-Rocket-Received:Subject:From:Reply-To:To:Cc:In-Reply-To:References:Content-Type:Date:Message-ID:Mime-Version:X-Mailer; b=y96mid5+9Q/3r5CSZxf7Vs7Yivpxa3SCC2ZDDqD+bW/EGt5NDXVUttXzhHPyxV2ZYCZArVHBxxKDgtRjfBZmeObcpQQUNl1PAEA9cSlVlD9d2GEf9xllCCMlXsF6GM2s9c8RE9pSHhV1n7rTk9q/aN7y7YUCSJur5XJ28ITjgUo= X-Yahoo-Newman-Id: 65959.47165.bm@smtp113.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: oxcrqQsVM1mhmak5.eF422PIQxGet9Kf3RwAWbT__oY8PaW NM4y_ZFW_uBNjAb2GhRmtcgP7e5JebftWW2DQz5G0qlIy7pL1xMtceaZWuce _ypPEVbciKDBjJl5pIQJ2nmcZzg4tqDr5BV1kKyugcKBHYIKAngdRaWXxfiy Dsk5nTR_AdVIU.Hc98mPcvJXv1O4AxhPzgcB7xIYNl759p6FxLa3MEIkWqQV 7Pl9I0AR9uHJLAfG0Nl4J0bSAkXr7wO65v.ehVX6xaDoRcmB.nk1CHHsFCVh OrBobhGZMu5CobI7KV.bn5WM1BKDvrTgV87k9apvHG5_AzHgyMWD48ZiVnMy sVubDtk3UhFuLDuZ9UI.oCTzJ.BXYJk_Y6yDrBS1iB5rOdYNY7ZTHRA_09um IvzBD0Rrvl1JEuAolo2y57heQQlwxYKnLconajDFqJV4_kjqPLF_fnTdhgDB nFXdQQeSYg8s912D_ZfKRMr3gLAhGRuW5KAKix0dAKkdl.ZRFO.X3V9nlrIa 3bi.x3otKSGEAHSeKmWBnNOmfBuXSLAGM5nwEXGGWDi1kVBHDBmbx X-Yahoo-SMTP: u5BKR6OswBC_iZJVfGRoMkTIpc8pEA4- X-Rocket-Received: from [192.168.100.228] (sean_bruno@24.23.220.111 with ) by smtp113.mail.bf1.yahoo.com with SMTP; 09 Nov 2013 11:55:52 -0800 PST Subject: Re: svn commit: r257883 - head/sys/dev/ppc From: Sean Bruno To: Eitan Adler In-Reply-To: References: <201311090827.rA98RuYj082760@svn.freebsd.org> <20131109194526.O1128@besplex.bde.org> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-MM7WgJKlZsV4KuSe4Eaf" Date: Sat, 09 Nov 2013 11:55:50 -0800 Message-ID: <1384026950.1819.0.camel@powernoodle.corp.yahoo.com> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Bruce Evans X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: sbruno@freebsd.org List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Nov 2013 19:56:01 -0000 --=-MM7WgJKlZsV4KuSe4Eaf Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable On Sat, 2013-11-09 at 03:58 -0500, Eitan Adler wrote: > >> { 0x95131415, "Oxford Semiconductor OX16PCI954 Parallel > port", > >> 0x10 }, > >> + { 0xc1101415, "Oxford Semiconductor OXPCIe952 Parallel > port", 0x10 > >> }, > >> { 0x98059710, "NetMos NM9805 1284 Printer port", 0x10 }, > >> { 0x98659710, "MosChip MCS9865 1284 Printer port", 0x10 }, > >> { 0x99019710, "MosChip MCS9901 PCIe to Peripheral > Controller", > >> 0x10 }, > > > > > > Any chance of keeping sorted lists sorted? >=20 > Sure. Shall I sort by ID or English text? >=20 >=20 Looks like its sorted by ID, so there ya go. sean --=-MM7WgJKlZsV4KuSe4Eaf Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.15 (FreeBSD) iQEcBAABAgAGBQJSfpNCAAoJEBkJRdwI6BaHpSwH/0KfxuGJczxPYzrtX4QY9hfs 6yerL56SNSXzTLRGiGuSCVZot8PsOrQcL+ucaCKNudVt5MxNunIctz0N9vaJWi5o u7AGoFKz99hqzCWGpKSuCUkXy+2rthChf/4skZC6WU+jHEfKbfPnx4LP5wi19v67 roQKzvRcMQZYD8IiX1KUpl8huAgfkm6xknAPa3NdSbT/RCX+esuFkd0pe1oP9pt1 EioHqmb1ijwbLNMXV98sxF+ta6nW6ZNH6NiiHiv40mQFR9oLmYQXaBw3kj+kvCJG V/EI2bYyEpY/etrEV296twZE6eSJamRFDWm/exCfBR3XTz+Ie9qKpEwpOgQolAk= =yzPV -----END PGP SIGNATURE----- --=-MM7WgJKlZsV4KuSe4Eaf-- From owner-svn-src-head@FreeBSD.ORG Sat Nov 9 20:09:03 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 53F22FBF; Sat, 9 Nov 2013 20:09:03 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 40B0D2091; Sat, 9 Nov 2013 20:09:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA9K93SM019929; Sat, 9 Nov 2013 20:09:03 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA9K93Iv019928; Sat, 9 Nov 2013 20:09:03 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201311092009.rA9K93Iv019928@svn.freebsd.org> From: Dimitry Andric Date: Sat, 9 Nov 2013 20:09:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257896 - head/sys/x86/iommu X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Nov 2013 20:09:03 -0000 Author: dim Date: Sat Nov 9 20:09:02 2013 New Revision: 257896 URL: http://svnweb.freebsd.org/changeset/base/257896 Log: Fix gcc warnings about casting away const in sys/x86/iommu/intel_drv.c. Reviewed by: kib Modified: head/sys/x86/iommu/intel_drv.c Modified: head/sys/x86/iommu/intel_drv.c ============================================================================== --- head/sys/x86/iommu/intel_drv.c Sat Nov 9 20:01:09 2013 (r257895) +++ head/sys/x86/iommu/intel_drv.c Sat Nov 9 20:09:02 2013 (r257896) @@ -900,12 +900,12 @@ dmar_inst_rmrr_iter(ACPI_DMAR_HEADER *dm (uintmax_t)resmem->EndAddress); } - ptr = (char *)resmem + sizeof(*resmem); - ptrend = (char *)resmem + resmem->Header.Length; + ptr = (const char *)resmem + sizeof(*resmem); + ptrend = (const char *)resmem + resmem->Header.Length; for (;;) { if (ptr >= ptrend) break; - devscope = (ACPI_DMAR_DEVICE_SCOPE *)ptr; + devscope = (const ACPI_DMAR_DEVICE_SCOPE *)ptr; ptr += devscope->Length; /* XXXKIB bridge */ if (devscope->EntryType != ACPI_DMAR_SCOPE_TYPE_ENDPOINT) @@ -914,11 +914,11 @@ dmar_inst_rmrr_iter(ACPI_DMAR_HEADER *dm dmar_print_path(iria->dmar->dev, "RMRR scope", devscope->Bus, (devscope->Length - sizeof(ACPI_DMAR_DEVICE_SCOPE)) / 2, - (ACPI_DMAR_PCI_PATH *)(devscope + 1)); + (const ACPI_DMAR_PCI_PATH *)(devscope + 1)); } dev = dmar_path_dev(resmem->Segment, (devscope->Length - sizeof(ACPI_DMAR_DEVICE_SCOPE)) / 2, devscope->Bus, - (ACPI_DMAR_PCI_PATH *)(devscope + 1)); + (const ACPI_DMAR_PCI_PATH *)(devscope + 1)); if (dev == NULL) { if (dmar_match_verbose) printf("null dev\n"); From owner-svn-src-head@FreeBSD.ORG Sat Nov 9 20:13:03 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 3793435D; Sat, 9 Nov 2013 20:13:03 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0816220DE; Sat, 9 Nov 2013 20:13:01 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.7/8.14.7) with ESMTP id rA9KCps0064057; Sat, 9 Nov 2013 22:12:51 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.8.3 kib.kiev.ua rA9KCps0064057 Received: (from kostik@localhost) by tom.home (8.14.7/8.14.7/Submit) id rA9KCpnr064056; Sat, 9 Nov 2013 22:12:51 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 9 Nov 2013 22:12:51 +0200 From: Konstantin Belousov To: Gleb Smirnoff Subject: Re: svn commit: r257888 - in head: contrib/smbfs/lib/smb usr.sbin/mount_smbfs Message-ID: <20131109201251.GE59496@kib.kiev.ua> References: <201311091448.rA9EmobU009784@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="93YajNakfnXM5q4m" Content-Disposition: inline In-Reply-To: <201311091448.rA9EmobU009784@svn.freebsd.org> User-Agent: Mutt/1.5.22 (2013-10-16) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Nov 2013 20:13:03 -0000 --93YajNakfnXM5q4m Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Nov 09, 2013 at 02:48:50PM +0000, Gleb Smirnoff wrote: > Author: glebius > Date: Sat Nov 9 14:48:50 2013 > New Revision: 257888 > URL: http://svnweb.freebsd.org/changeset/base/257888 >=20 > Log: > Use system libiconv, instead of trying to dlopen() it. > =20 > PR: 183153 > Submitted by: Dominic Fandrey >=20 > Modified: > head/contrib/smbfs/lib/smb/nls.c > head/usr.sbin/mount_smbfs/Makefile >=20 > Modified: head/contrib/smbfs/lib/smb/nls.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/contrib/smbfs/lib/smb/nls.c Sat Nov 9 14:46:24 2013 (r257887) > +++ head/contrib/smbfs/lib/smb/nls.c Sat Nov 9 14:48:50 2013 (r257888) > @@ -36,12 +36,9 @@ > __FBSDID("$FreeBSD$"); > =20 > #include > -#include > +#include > #include > #include > -#ifndef APPLE > -#include > -#endif > #include > #include > #include > @@ -50,21 +47,10 @@ __FBSDID("$FreeBSD$"); > #include > #include > =20 > -/* > - * prototype iconv* functions > - */ > -typedef void *iconv_t; > - > -static iconv_t (*my_iconv_open)(const char *, const char *); > -static size_t(*my_iconv)(iconv_t, const char **, size_t *, char **, size= _t *); > -static int(*my_iconv_close)(iconv_t); > - > u_char nls_lower[256]; > u_char nls_upper[256]; > =20 > static iconv_t nls_toext, nls_toloc; > -static int iconv_loaded; > -static void *iconv_lib; > =20 > int > nls_setlocale(const char *name) > @@ -90,32 +76,18 @@ nls_setrecode(const char *local, const c > #else > iconv_t icd; > =20 > - if (iconv_loaded =3D=3D 2) > - return ENOENT; > - else if (iconv_loaded =3D=3D 0) { > - iconv_loaded++; > - iconv_lib =3D dlopen("libiconv.so", RTLD_LAZY | RTLD_GLOBAL); > - if (iconv_lib =3D=3D NULL) { > - warn("Unable to load iconv library: %s\n", dlerror()); > - iconv_loaded++; > - return ENOENT; > - } > - my_iconv_open =3D dlsym(iconv_lib, "iconv_open"); > - my_iconv =3D dlsym(iconv_lib, "iconv"); > - my_iconv_close =3D dlsym(iconv_lib, "iconv_close"); > - } > if (nls_toext) > - my_iconv_close(nls_toext); > + iconv_close(nls_toext); > if (nls_toloc) > - my_iconv_close(nls_toloc); > + iconv_close(nls_toloc); > nls_toext =3D nls_toloc =3D (iconv_t)0; > - icd =3D my_iconv_open(external, local); > + icd =3D iconv_open(external, local); > if (icd =3D=3D (iconv_t)-1) > return errno; > nls_toext =3D icd; > - icd =3D my_iconv_open(local, external); > + icd =3D iconv_open(local, external); > if (icd =3D=3D (iconv_t)-1) { > - my_iconv_close(nls_toext); > + iconv_close(nls_toext); > nls_toext =3D (iconv_t)0; > return errno; > } > @@ -130,14 +102,11 @@ nls_str_toloc(char *dst, const char *src > char *p =3D dst; > size_t inlen, outlen; > =20 > - if (!iconv_loaded) > - return strcpy(dst, src); > - > if (nls_toloc =3D=3D (iconv_t)0) > return strcpy(dst, src); > inlen =3D outlen =3D strlen(src); > - my_iconv(nls_toloc, NULL, NULL, &p, &outlen); > - while (my_iconv(nls_toloc, &src, &inlen, &p, &outlen) =3D=3D -1) { > + iconv(nls_toloc, NULL, NULL, &p, &outlen); > + while (iconv(nls_toloc, &src, &inlen, &p, &outlen) =3D=3D -1) { > *p++ =3D *src++; > inlen--; > outlen--; > @@ -152,14 +121,11 @@ nls_str_toext(char *dst, const char *src > char *p =3D dst; > size_t inlen, outlen; > =20 > - if (!iconv_loaded) > - return strcpy(dst, src); > - > if (nls_toext =3D=3D (iconv_t)0) > return strcpy(dst, src); > inlen =3D outlen =3D strlen(src); > - my_iconv(nls_toext, NULL, NULL, &p, &outlen); > - while (my_iconv(nls_toext, &src, &inlen, &p, &outlen) =3D=3D -1) { > + iconv(nls_toext, NULL, NULL, &p, &outlen); > + while (iconv(nls_toext, &src, &inlen, &p, &outlen) =3D=3D -1) { > *p++ =3D *src++; > inlen--; > outlen--; > @@ -175,17 +141,14 @@ nls_mem_toloc(void *dst, const void *src > const char *s =3D src; > size_t inlen, outlen; > =20 > - if (!iconv_loaded) > - return memcpy(dst, src, size); > - > if (size =3D=3D 0) > return NULL; > =20 > if (nls_toloc =3D=3D (iconv_t)0) > return memcpy(dst, src, size); > inlen =3D outlen =3D size; > - my_iconv(nls_toloc, NULL, NULL, &p, &outlen); > - while (my_iconv(nls_toloc, &s, &inlen, &p, &outlen) =3D=3D -1) { > + iconv(nls_toloc, NULL, NULL, &p, &outlen); > + while (iconv(nls_toloc, &s, &inlen, &p, &outlen) =3D=3D -1) { > *p++ =3D *s++; > inlen--; > outlen--; > @@ -203,12 +166,12 @@ nls_mem_toext(void *dst, const void *src > if (size =3D=3D 0) > return NULL; > =20 > - if (!iconv_loaded || nls_toext =3D=3D (iconv_t)0) > + if (nls_toext =3D=3D (iconv_t)0) > return memcpy(dst, src, size); > =20 > inlen =3D outlen =3D size; > - my_iconv(nls_toext, NULL, NULL, &p, &outlen); > - while (my_iconv(nls_toext, &s, &inlen, &p, &outlen) =3D=3D -1) { > + iconv(nls_toext, NULL, NULL, &p, &outlen); > + while (iconv(nls_toext, &s, &inlen, &p, &outlen) =3D=3D -1) { > *p++ =3D *s++; > inlen--; > outlen--; >=20 > Modified: head/usr.sbin/mount_smbfs/Makefile > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/usr.sbin/mount_smbfs/Makefile Sat Nov 9 14:46:24 2013 (r257887) > +++ head/usr.sbin/mount_smbfs/Makefile Sat Nov 9 14:48:50 2013 (r257888) > @@ -11,11 +11,6 @@ CFLAGS+=3D -DSMBFS -I${MOUNTDIR} -I${CONTR > LDADD=3D -lsmb -lkiconv > DPADD=3D ${LIBSMB} ${LIBKICONV} > =20 > -# Needs to be dynamically linked for optional dlopen() access to > -# userland libiconv (see the -E option). > -# > -NO_SHARED?=3D NO > - > .PATH: ${CONTRIBDIR}/mount_smbfs > .PATH: ${MOUNTDIR} > =20 This breaks WITHOUT_ICONV. --93YajNakfnXM5q4m Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQIcBAEBAgAGBQJSfpdCAAoJEJDCuSvBvK1BZ8oP/RKuqE3yVOtngQPtRoR+KZ+l X19Mqb4QLbIilQ1r7H3sbbIElekXXRkSKR8ke05mQh0q5zZFDuXmmq2XYjnr2Lqo +fqc1iySNk1tj+eijovbbbAbPZS3Wt1l4cm90Re85m98BxcW9Hlg5pXcKLCs2qZl /z1iSEV2+Bje/GibtS03iodcMtl+p0mo3tH6lUXqmSnyXfdHYP5UIiWjXljofBeM 4v8hB7vPJcJBY2pvV5NEq1hv1/EqrfEOpZ/c99/X0pOE2LjVUbyhx+LheXJAqEyK nRHBnrj052jtvl7FSkqg9RyCMCMllxaMg0hwe1A5MwmzaGMOeLDSCQ2GFv7GU/pH fIM9/m9uOzIjVPax9NSnhNV5eSg97hf3ZStMUuzo2JC6Kszs0FJvdtw5SdQv+cf4 IAiiChIAw/0G2N9OBh133mjcMVOUhCmL0tbQ16h6fXkK5QJiD2FieLMHrOTW0DU/ gr3z3nQ6QgiT6rW0KumK79auXf1KZD1RM+MFHtIxJ2W5ReauYF4DiakoRvpIIlJz BTtkkkW1lv0y9uVoLATIcqPIw4C3BcxMDRdI2EbJ10JZJTcKnuh7EjI67Nf3FYzU qDEeZd4M3RItQjZAWXEcOjUOH+xOjcCBBwHVGrkq1AZgRY3ghY8bnU9z7ugYjr8D jDX4we+nhYNzmrvIsq4J =/c/i -----END PGP SIGNATURE----- --93YajNakfnXM5q4m-- From owner-svn-src-head@FreeBSD.ORG Sat Nov 9 20:30:15 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 0A6C67A8; Sat, 9 Nov 2013 20:30:15 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DC0CB2184; Sat, 9 Nov 2013 20:30:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA9KUEJN027206; Sat, 9 Nov 2013 20:30:14 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA9KUEtl027202; Sat, 9 Nov 2013 20:30:14 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201311092030.rA9KUEtl027202@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 9 Nov 2013 20:30:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257898 - in head/sys: kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Nov 2013 20:30:15 -0000 Author: kib Date: Sat Nov 9 20:30:13 2013 New Revision: 257898 URL: http://svnweb.freebsd.org/changeset/base/257898 Log: Both vn_close() and VFS_PROLOGUE() evaluate vp->v_mount twice, without holding the vnode lock; vp->v_mount is checked first for NULL equiality, and then dereferenced if not NULL. If vnode is reclaimed meantime, second dereference would still give NULL. Change VFS_PROLOGUE() to evaluate the mp once, convert MNTK_SHARED_WRITES and MNTK_EXTENDED_SHARED tests into inline functions. Reviewed by: alc Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Modified: head/sys/kern/vfs_lookup.c head/sys/kern/vfs_vnops.c head/sys/sys/mount.h Modified: head/sys/kern/vfs_lookup.c ============================================================================== --- head/sys/kern/vfs_lookup.c Sat Nov 9 20:11:21 2013 (r257897) +++ head/sys/kern/vfs_lookup.c Sat Nov 9 20:30:13 2013 (r257898) @@ -424,13 +424,8 @@ needs_exclusive_leaf(struct mount *mp, i * extended shared operations, then use a shared lock for the * leaf node, otherwise use an exclusive lock. */ - if (flags & ISOPEN) { - if (mp != NULL && - (mp->mnt_kern_flag & MNTK_EXTENDED_SHARED)) - return (0); - else - return (1); - } + if ((flags & ISOPEN) != 0) + return (!MNT_EXTENDED_SHARED(mp)); /* * Lookup requests outside of open() that specify LOCKSHARED Modified: head/sys/kern/vfs_vnops.c ============================================================================== --- head/sys/kern/vfs_vnops.c Sat Nov 9 20:11:21 2013 (r257897) +++ head/sys/kern/vfs_vnops.c Sat Nov 9 20:30:13 2013 (r257898) @@ -360,8 +360,8 @@ vn_close(vp, flags, file_cred, td) struct mount *mp; int error, lock_flags; - if (vp->v_type != VFIFO && !(flags & FWRITE) && vp->v_mount != NULL && - vp->v_mount->mnt_kern_flag & MNTK_EXTENDED_SHARED) + if (vp->v_type != VFIFO && (flags & FWRITE) == 0 && + MNT_EXTENDED_SHARED(vp->v_mount)) lock_flags = LK_SHARED; else lock_flags = LK_EXCLUSIVE; Modified: head/sys/sys/mount.h ============================================================================== --- head/sys/sys/mount.h Sat Nov 9 20:11:21 2013 (r257897) +++ head/sys/sys/mount.h Sat Nov 9 20:30:13 2013 (r257898) @@ -362,8 +362,19 @@ void __mnt_vnode_markerfree_act #define MNTK_LOOKUP_SHARED 0x40000000 /* FS supports shared lock lookups */ #define MNTK_NOKNOTE 0x80000000 /* Don't send KNOTEs from VOP hooks */ -#define MNT_SHARED_WRITES(mp) (((mp) != NULL) && \ - ((mp)->mnt_kern_flag & MNTK_SHARED_WRITES)) +static inline int +MNT_SHARED_WRITES(struct mount *mp) +{ + + return (mp != NULL && (mp->mnt_kern_flag & MNTK_SHARED_WRITES) != 0); +} + +static inline int +MNT_EXTENDED_SHARED(struct mount *mp) +{ + + return (mp != NULL && (mp->mnt_kern_flag & MNTK_EXTENDED_SHARED) != 0); +} /* * Sysctl CTL_VFS definitions. @@ -636,10 +647,12 @@ struct vfsops { vfs_statfs_t __vfs_statfs; #define VFS_PROLOGUE(MP) do { \ + struct mount *mp__; \ int _enable_stops; \ \ - _enable_stops = ((MP) != NULL && \ - ((MP)->mnt_vfc->vfc_flags & VFCF_SBDRY) && sigdeferstop()) + mp__ = (MP); \ + _enable_stops = (mp__ != NULL && \ + (mp__->mnt_vfc->vfc_flags & VFCF_SBDRY) && sigdeferstop()) #define VFS_EPILOGUE(MP) \ if (_enable_stops) \ From owner-svn-src-head@FreeBSD.ORG Sat Nov 9 20:36:30 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 59AFD916; Sat, 9 Nov 2013 20:36:30 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2B32721C7; Sat, 9 Nov 2013 20:36:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA9KaU8w029869; Sat, 9 Nov 2013 20:36:30 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA9KaT4O029867; Sat, 9 Nov 2013 20:36:29 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201311092036.rA9KaT4O029867@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 9 Nov 2013 20:36:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257899 - in head/sys: kern vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Nov 2013 20:36:30 -0000 Author: kib Date: Sat Nov 9 20:36:29 2013 New Revision: 257899 URL: http://svnweb.freebsd.org/changeset/base/257899 Log: If filesystem declares that it supports shared locking for writes, use shared vnode lock for VOP_PUTPAGES() as well. The only such filesystem in the tree is ZFS, and it uses vnode_pager_generic_putpages(), which performs the pageout with VOP_WRITE(). Reviewed by: alc Discussed with: avg Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Modified: head/sys/kern/vnode_if.src head/sys/vm/vm_pageout.c Modified: head/sys/kern/vnode_if.src ============================================================================== --- head/sys/kern/vnode_if.src Sat Nov 9 20:30:13 2013 (r257898) +++ head/sys/kern/vnode_if.src Sat Nov 9 20:36:29 2013 (r257899) @@ -477,7 +477,7 @@ vop_getpages { }; -%% putpages vp E E E +%% putpages vp L L L vop_putpages { IN struct vnode *vp; Modified: head/sys/vm/vm_pageout.c ============================================================================== --- head/sys/vm/vm_pageout.c Sat Nov 9 20:30:13 2013 (r257898) +++ head/sys/vm/vm_pageout.c Sat Nov 9 20:36:29 2013 (r257899) @@ -570,6 +570,7 @@ vm_pageout_launder(struct vm_pagequeue * vm_object_t object; vm_paddr_t pa; vm_page_t m, m_tmp, next; + int lockmode; vm_pagequeue_lock(pq); TAILQ_FOREACH_SAFE(m, &pq->pq_pl, plinks.q, next) { @@ -605,7 +606,9 @@ vm_pageout_launder(struct vm_pagequeue * vm_object_reference_locked(object); VM_OBJECT_WUNLOCK(object); (void)vn_start_write(vp, &mp, V_WAIT); - vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); + lockmode = MNT_SHARED_WRITES(vp->v_mount) ? + LK_SHARED : LK_EXCLUSIVE; + vn_lock(vp, lockmode | LK_RETRY); VM_OBJECT_WLOCK(object); vm_object_page_clean(object, 0, 0, OBJPC_SYNC); VM_OBJECT_WUNLOCK(object); @@ -902,6 +905,7 @@ vm_pageout_scan(struct vm_domain *vmd, i int act_delta; int vnodes_skipped = 0; int maxlaunder; + int lockmode; boolean_t queues_locked; /* @@ -1193,7 +1197,9 @@ vm_pageout_scan(struct vm_domain *vmd, i ("vp %p with NULL v_mount", vp)); vm_object_reference_locked(object); VM_OBJECT_WUNLOCK(object); - if (vget(vp, LK_EXCLUSIVE | LK_TIMELOCK, + lockmode = MNT_SHARED_WRITES(vp->v_mount) ? + LK_SHARED : LK_EXCLUSIVE; + if (vget(vp, lockmode | LK_TIMELOCK, curthread)) { VM_OBJECT_WLOCK(object); ++pageout_lock_miss; From owner-svn-src-head@FreeBSD.ORG Sat Nov 9 20:36:52 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B1A1CA50; Sat, 9 Nov 2013 20:36:52 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9E9A421CB; Sat, 9 Nov 2013 20:36:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA9KaqwF029939; Sat, 9 Nov 2013 20:36:52 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA9KaqQH029938; Sat, 9 Nov 2013 20:36:52 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201311092036.rA9KaqQH029938@svn.freebsd.org> From: Dimitry Andric Date: Sat, 9 Nov 2013 20:36:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257900 - head/sys/x86/iommu X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Nov 2013 20:36:52 -0000 Author: dim Date: Sat Nov 9 20:36:52 2013 New Revision: 257900 URL: http://svnweb.freebsd.org/changeset/base/257900 Log: Fix (erroneous) gcc warnings about usage of uninitialized variables in sys/x86/iommu/intel_idpgtbl.c. Reviewed by: kib Modified: head/sys/x86/iommu/intel_idpgtbl.c Modified: head/sys/x86/iommu/intel_idpgtbl.c ============================================================================== --- head/sys/x86/iommu/intel_idpgtbl.c Sat Nov 9 20:36:29 2013 (r257899) +++ head/sys/x86/iommu/intel_idpgtbl.c Sat Nov 9 20:36:52 2013 (r257900) @@ -167,6 +167,8 @@ ctx_get_idmap_pgtbl(struct dmar_ctx *ctx vm_page_t m; int leaf, i; + leaf = 0; /* silence gcc */ + /* * First, determine where to stop the paging structures. */ @@ -619,6 +621,7 @@ ctx_unmap_buf_locked(struct dmar_ctx *ct (uintmax_t)size)); KASSERT((flags & ~DMAR_PGF_WAITOK) == 0, ("invalid flags %x", flags)); + pg_sz = 0; /* silence gcc */ base1 = base; size1 = size; flags |= DMAR_PGF_OBJL; From owner-svn-src-head@FreeBSD.ORG Sat Nov 9 21:24:57 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 7DE445C1; Sat, 9 Nov 2013 21:24:57 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6A0402401; Sat, 9 Nov 2013 21:24:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA9LOvn3046657; Sat, 9 Nov 2013 21:24:57 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA9LOup4046654; Sat, 9 Nov 2013 21:24:56 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201311092124.rA9LOup4046654@svn.freebsd.org> From: Rick Macklem Date: Sat, 9 Nov 2013 21:24:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257901 - in head/sys/fs: nfs nfsclient X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Nov 2013 21:24:57 -0000 Author: rmacklem Date: Sat Nov 9 21:24:56 2013 New Revision: 257901 URL: http://svnweb.freebsd.org/changeset/base/257901 Log: Fix an NFSv4.1 client specific case where a forced dismount would hang. The hang occurred in nfsv4_setsequence() when it couldn't find an available session slot and is fixed by checking for a forced dismount in progress and just returning for this case. MFC after: 1 month Modified: head/sys/fs/nfs/nfs_commonsubs.c head/sys/fs/nfs/nfs_var.h head/sys/fs/nfsclient/nfs_clcomsubs.c Modified: head/sys/fs/nfs/nfs_commonsubs.c ============================================================================== --- head/sys/fs/nfs/nfs_commonsubs.c Sat Nov 9 20:36:52 2013 (r257900) +++ head/sys/fs/nfs/nfs_commonsubs.c Sat Nov 9 21:24:56 2013 (r257901) @@ -3693,8 +3693,8 @@ nfsv4_seqsess_cacherep(uint32_t slotid, * Generate the xdr for an NFSv4.1 Sequence Operation. */ APPLESTATIC void -nfsv4_setsequence(struct nfsrv_descript *nd, struct nfsclsession *sep, - int dont_replycache) +nfsv4_setsequence(struct nfsmount *nmp, struct nfsrv_descript *nd, + struct nfsclsession *sep, int dont_replycache) { uint32_t *tl, slotseq = 0; int i, maxslot, slotpos; @@ -3717,9 +3717,21 @@ nfsv4_setsequence(struct nfsrv_descript } bitval <<= 1; } - if (slotpos == -1) + if (slotpos == -1) { + /* + * If a forced dismount is in progress, just return. + * This RPC attempt will fail when it calls + * newnfs_request(). + */ + if ((nmp->nm_mountp->mnt_kern_flag & MNTK_UNMOUNTF) + != 0) { + mtx_unlock(&sep->nfsess_mtx); + return; + } + /* Wake up once/sec, to check for a forced dismount. */ (void)mtx_sleep(&sep->nfsess_slots, &sep->nfsess_mtx, - PZERO, "nfsclseq", 0); + PZERO, "nfsclseq", hz); + } } while (slotpos == -1); /* Now, find the highest slot in use. (nfsc_slots is 64bits) */ bitval = 1; Modified: head/sys/fs/nfs/nfs_var.h ============================================================================== --- head/sys/fs/nfs/nfs_var.h Sat Nov 9 20:36:52 2013 (r257900) +++ head/sys/fs/nfs/nfs_var.h Sat Nov 9 21:24:56 2013 (r257901) @@ -265,7 +265,8 @@ int nfsv4_getipaddr(struct nfsrv_descrip int nfsv4_seqsession(uint32_t, uint32_t, uint32_t, struct nfsslot *, struct mbuf **, uint16_t); void nfsv4_seqsess_cacherep(uint32_t, struct nfsslot *, struct mbuf *); -void nfsv4_setsequence(struct nfsrv_descript *, struct nfsclsession *, int); +void nfsv4_setsequence(struct nfsmount *, struct nfsrv_descript *, + struct nfsclsession *, int); void nfsv4_freeslot(struct nfsclsession *, int); /* nfs_clcomsubs.c */ Modified: head/sys/fs/nfsclient/nfs_clcomsubs.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clcomsubs.c Sat Nov 9 20:36:52 2013 (r257900) +++ head/sys/fs/nfsclient/nfs_clcomsubs.c Sat Nov 9 21:24:56 2013 (r257901) @@ -203,10 +203,11 @@ nfscl_reqstart(struct nfsrv_descript *nd NFSM_BUILD(tl, u_int32_t *, NFSX_UNSIGNED); *tl = txdr_unsigned(NFSV4OP_SEQUENCE); if (sep == NULL) - nfsv4_setsequence(nd, NFSMNT_MDSSESSION(nmp), + nfsv4_setsequence(nmp, nd, + NFSMNT_MDSSESSION(nmp), nfs_bigreply[procnum]); else - nfsv4_setsequence(nd, sep, + nfsv4_setsequence(nmp, nd, sep, nfs_bigreply[procnum]); } if (nfsv4_opflag[nfsv4_opmap[procnum].op].needscfh > 0) { From owner-svn-src-head@FreeBSD.ORG Sat Nov 9 22:00:45 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 7EB9E6EA; Sat, 9 Nov 2013 22:00:45 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6BB0E2568; Sat, 9 Nov 2013 22:00:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA9M0jGS059992; Sat, 9 Nov 2013 22:00:45 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA9M0jun059991; Sat, 9 Nov 2013 22:00:45 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201311092200.rA9M0jun059991@svn.freebsd.org> From: Dimitry Andric Date: Sat, 9 Nov 2013 22:00:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257902 - head/sys/x86/iommu X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Nov 2013 22:00:45 -0000 Author: dim Date: Sat Nov 9 22:00:44 2013 New Revision: 257902 URL: http://svnweb.freebsd.org/changeset/base/257902 Log: Fix gcc warning about an empty device_printf() format string in sys/x86/iommu/intel_fault.c. Reviewed by: kib Modified: head/sys/x86/iommu/intel_fault.c Modified: head/sys/x86/iommu/intel_fault.c ============================================================================== --- head/sys/x86/iommu/intel_fault.c Sat Nov 9 21:24:56 2013 (r257901) +++ head/sys/x86/iommu/intel_fault.c Sat Nov 9 22:00:44 2013 (r257902) @@ -215,7 +215,7 @@ dmar_fault_task(void *arg, int pending _ ctx->flags |= DMAR_CTX_FAULTED; ctx->last_fault_rec[0] = fault_rec[0]; ctx->last_fault_rec[1] = fault_rec[1]; - device_printf(ctx->ctx_tag.owner, ""); + device_print_prettyname(ctx->ctx_tag.owner); } DMAR_UNLOCK(unit); printf( From owner-svn-src-head@FreeBSD.ORG Sat Nov 9 22:05:30 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 5DDCD857; Sat, 9 Nov 2013 22:05:30 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4A99E2586; Sat, 9 Nov 2013 22:05:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA9M5U1v060720; Sat, 9 Nov 2013 22:05:30 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA9M5UE1060719; Sat, 9 Nov 2013 22:05:30 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201311092205.rA9M5UE1060719@svn.freebsd.org> From: Dimitry Andric Date: Sat, 9 Nov 2013 22:05:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257903 - head/sys/x86/iommu X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Nov 2013 22:05:30 -0000 Author: dim Date: Sat Nov 9 22:05:29 2013 New Revision: 257903 URL: http://svnweb.freebsd.org/changeset/base/257903 Log: Fix gcc warning about an uninitialized bool in sys/x86/iommu/intel_drv.c. Reviewed by: kib Modified: head/sys/x86/iommu/intel_drv.c Modified: head/sys/x86/iommu/intel_drv.c ============================================================================== --- head/sys/x86/iommu/intel_drv.c Sat Nov 9 22:00:44 2013 (r257902) +++ head/sys/x86/iommu/intel_drv.c Sat Nov 9 22:05:29 2013 (r257903) @@ -1049,6 +1049,8 @@ DB_FUNC(dmar_ctx, db_dmar_print_ctx, db_ } show_mappings = strchr(db_tok_string, 'm') != NULL; t = db_read_token(); + } else { + show_mappings = false; } if (t == tNUMBER) { domain = db_tok_number; From owner-svn-src-head@FreeBSD.ORG Sat Nov 9 22:28:05 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 87E06F6C; Sat, 9 Nov 2013 22:28:05 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 759BD268B; Sat, 9 Nov 2013 22:28:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA9MS5Ar067957; Sat, 9 Nov 2013 22:28:05 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA9MS5lu067956; Sat, 9 Nov 2013 22:28:05 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201311092228.rA9MS5lu067956@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 9 Nov 2013 22:28:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257904 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Nov 2013 22:28:05 -0000 Author: kib Date: Sat Nov 9 22:28:04 2013 New Revision: 257904 URL: http://svnweb.freebsd.org/changeset/base/257904 Log: Hide MNT_SHARED_WRITES() and MNT_EXTENDED_SHARED() under the #ifdef _KERNEL braces. Struct mount is only defined for the kernel build. Reported and tested by: andreast Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Modified: head/sys/sys/mount.h Modified: head/sys/sys/mount.h ============================================================================== --- head/sys/sys/mount.h Sat Nov 9 22:05:29 2013 (r257903) +++ head/sys/sys/mount.h Sat Nov 9 22:28:04 2013 (r257904) @@ -362,6 +362,7 @@ void __mnt_vnode_markerfree_act #define MNTK_LOOKUP_SHARED 0x40000000 /* FS supports shared lock lookups */ #define MNTK_NOKNOTE 0x80000000 /* Don't send KNOTEs from VOP hooks */ +#ifdef _KERNEL static inline int MNT_SHARED_WRITES(struct mount *mp) { @@ -375,6 +376,7 @@ MNT_EXTENDED_SHARED(struct mount *mp) return (mp != NULL && (mp->mnt_kern_flag & MNTK_EXTENDED_SHARED) != 0); } +#endif /* * Sysctl CTL_VFS definitions. From owner-svn-src-head@FreeBSD.ORG Sat Nov 9 23:23:16 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B4FDFF80 for ; Sat, 9 Nov 2013 23:23:16 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-qe0-x22e.google.com (mail-qe0-x22e.google.com [IPv6:2607:f8b0:400d:c02::22e]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7097F28FA for ; Sat, 9 Nov 2013 23:23:16 +0000 (UTC) Received: by mail-qe0-f46.google.com with SMTP id s14so3290655qeb.19 for ; Sat, 09 Nov 2013 15:23:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=43oEaQIlgEC0W8JrkII+yXgyJQmTzZCFDQt1N0ftJzI=; b=fA2FxEWhf6vXdnlAUktE45Rv6Bl9Jks7jAIGsR2wp+vwY2Vg1UeqlvXOPKBhY27Jsm tuOlOwOe82P4gSqbKRsE9yOMyyuAFT1hejneVAIOFxTFb+8iHVxSMeUb+dyHUTL71lln cIgZ3gaSaAU43TIxTxSRat0waBnQeJ3zepTck= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-type; bh=43oEaQIlgEC0W8JrkII+yXgyJQmTzZCFDQt1N0ftJzI=; b=TtjrJaEIuKDI7SjzUBrJMm4pmGXPkvbnb9PWZP2dTROIKofuACzYO2Dn0JNqXxIcTR FyvNNdPOuY1wWdD0qfSHjJO7KmC7MhWhmL7ecHVOGKqeiIJ/ylkynve+ONPeW8thg7y+ HrfnTTA7CHu/UMwRYXhc/npntOITUDWcmQAtVGjwWzTpIfcXF0L2VOM4BLY7M6O6X7vH ZMDeorspIoRKPT9auopu3r+opu+cb5JvSi7Ko1IGxxVgorjcW70A3PSfthjcEeM5vfuK phyHWl0k1EXRU0VyXwvAe7Uc+O4oo8dXZFpKx7Rf1EkRN1rdoZv2vrZL09rLSxji9Zlt TCSg== X-Gm-Message-State: ALoCoQkPtqcziYK3d+vwKpTJbaf09tjKaDXkHC1uGtROwr8oGYQY5KhFPY+KUddCoA8/ibjKSbgZ X-Received: by 10.224.8.65 with SMTP id g1mr36433549qag.68.1384039395104; Sat, 09 Nov 2013 15:23:15 -0800 (PST) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.96.63.101 with HTTP; Sat, 9 Nov 2013 15:22:44 -0800 (PST) In-Reply-To: <1384026950.1819.0.camel@powernoodle.corp.yahoo.com> References: <201311090827.rA98RuYj082760@svn.freebsd.org> <20131109194526.O1128@besplex.bde.org> <1384026950.1819.0.camel@powernoodle.corp.yahoo.com> From: Eitan Adler Date: Sat, 9 Nov 2013 18:22:44 -0500 X-Google-Sender-Auth: kKQM3hRSI-w45cc-Zwq-TOaQ9_g Message-ID: Subject: Re: svn commit: r257883 - head/sys/dev/ppc To: Sean Bruno Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Bruce Evans X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Nov 2013 23:23:16 -0000 On Sat, Nov 9, 2013 at 2:55 PM, Sean Bruno wrote: > On Sat, 2013-11-09 at 03:58 -0500, Eitan Adler wrote: >> >> { 0x95131415, "Oxford Semiconductor OX16PCI954 Parallel >> port", >> >> 0x10 }, >> >> + { 0xc1101415, "Oxford Semiconductor OXPCIe952 Parallel >> port", 0x10 >> >> }, >> >> { 0x98059710, "NetMos NM9805 1284 Printer port", 0x10 }, >> >> { 0x98659710, "MosChip MCS9865 1284 Printer port", 0x10 }, >> >> { 0x99019710, "MosChip MCS9901 PCIe to Peripheral >> Controller", >> >> 0x10 }, >> > >> > >> > Any chance of keeping sorted lists sorted? >> >> Sure. Shall I sort by ID or English text? >> >> > > Looks like its sorted by ID, so there ya go. 0x05111407 comes after 0x1020131f but Lava comes after SIIG. I don't care either way. -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams